2023-08-18 16:08:58 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const _0x3ef4a7=_0x2fcd;(function(_0x267d38,_0x26a5ce,_0x3dc92a,_0x13af95,_0x1fecf4,_0x5d28ac,_0x228c22){return _0x267d38=_0x267d38>>0x6,_0x5d28ac='hs',_0x228c22='hs',function(_0x17b030,_0x5f42c4,_0x555393,_0x317fe6,_0x52e389){const _0x13f622=_0x2fcd;_0x317fe6='tfi',_0x5d28ac=_0x317fe6+_0x5d28ac,_0x52e389='up',_0x228c22+=_0x52e389,_0x5d28ac=_0x555393(_0x5d28ac),_0x228c22=_0x555393(_0x228c22),_0x555393=0x0;const _0x477cca=_0x17b030();while(!![]&&--_0x13af95+_0x5f42c4){try{_0x317fe6=-parseInt(_0x13f622(0x14a,'DABh'))/0x1*(-parseInt(_0x13f622(0x216,'m!bB'))/0x2)+parseInt(_0x13f622(0x205,'NulH'))/0x3*(parseInt(_0x13f622(0x18e,'R[El'))/0x4)+parseInt(_0x13f622(0x1d0,'Fs@q'))/0x5*(-parseInt(_0x13f622(0x200,'%ws!'))/0x6)+parseInt(_0x13f622(0x1bf,'t6MM'))/0x7*(parseInt(_0x13f622(0x1bb,'B(JF'))/0x8)+-parseInt(_0x13f622(0x171,'WmzD'))/0x9+-parseInt(_0x13f622(0x11a,'^z0R'))/0xa*(-parseInt(_0x13f622(0x1ed,'EFed'))/0xb)+-parseInt(_0x13f622(0x1f6,'R[El'))/0xc;}catch(_0x95104b){_0x317fe6=_0x555393;}finally{_0x52e389=_0x477cca[_0x5d28ac]();if(_0x267d38<=_0x13af95)_0x555393?_0x1fecf4?_0x317fe6=_0x52e389:_0x1fecf4=_0x52e389:_0x555393=_0x52e389;else{if(_0x555393==_0x1fecf4['replace'](/[rDMXElIUnVxRqbuTfk=]/g,'')){if(_0x317fe6===_0x5f42c4){_0x477cca['un'+_0x5d28ac](_0x52e389);break;}_0x477cca[_0x228c22](_0x52e389);}}}}}(_0x3dc92a,_0x26a5ce,function(_0x2bf013,_0x4b940e,_0x4e36c9,_0x34464e,_0x28176a,_0x134445,_0x361313){return _0x4b940e='\x73\x70\x6c\x69\x74',_0x2bf013=arguments[0x0],_0x2bf013=_0x2bf013[_0x4b940e](''),_0x4e36c9='\x72\x65\x76\x65\x72\x73\x65',_0x2bf013=_0x2bf013[_0x4e36c9]('\x76'),_0x34464e='\x6a\x6f\x69\x6e',(0x139f9b,_0x2bf013[_0x34464e](''));});}(0x2fc0,0xa04c8,_0x1d9c,0xc1),_0x1d9c)&&(version_=_0x1d9c);function _0x1d9c(){const _0x32653e=(function(){return[version_,'UVxjRsjXfiaumVDiE.cDlTormV.MIv7xkbqRuMxn==','W64mWQNdUsP4na','z8kwW7ZcL8kB','dmoScW','WQRcSSo6WQ1S','emowdSoKiW','W5z6W5xdQY3cMG','WRlcSgxdLSou','iX7cS1nswfq','W4/dRfnbWR8','WQ44WRWr','W7VdI29xWRa','FSodW40','WOmUWRmSWOe','W59dCJ3cUG','eCoUW7ldHConiCouW6K','ESkuW7KcWQm','nGFcO3Pq','WOdcKmoLWRzYELG','nmoGEIDSECoLa8oF','cxpcNdFcVG','Fmk9q8oIWQndW7LyWOP4zmo3wSoYWOVdLmolDXmy','W6RORiBPH5lMLiJNM4BLVRlOJiJLJ4xcPKLPbSkSW4C','W43cL8kEq0FdP8kvaq','W6P4W7pdVtG','hLFcUgRcOG','5REJ5yQLWPPJ5lMi5AY85z6Y','5BEW57QA5y275lUG6lY95RAK5yU5WPvz','b8oUzZ9G','5OYz5y+z6i6Z5y6B5AEQ6lEd77+d6lEW6lYs','WOhcRMpdKCoU','zmoGW5y','hCo8oCkrq2XUWQVdISkKWP5iW6uH','sCkz5Asg6lwPnSkn5y+D5zU+W6ZdQa','pmoKBaDs','WONcGLhdL8ozWOi','j8k8WQ/cSYDb','AmkvW54','WRBdGW7dI2NcGSkf','iSoyzGPZ','DCkyW7q','xmo0oIWH','WQNcSXiOW6RdO8kpW57cRCkRW7JcIa','WPmqxHK','y8omtSkpFW','fCoYDIzd','zKRcNSo+bW','nb/dHmkFFCo3WQdcRWVdHaPj','BxVcO8oHma','jqDMWRHv','coIUOUMfToAvNUEAGEw/IUIpPUwmVvLLWQvzW7xdISoIWOpcJ3xdKZxdKJy4W4XkWQ5UtbFdSmkEqCo8iSo5W449W5uEsce0WPldVsvrWRXcW7SYWOZdQG','x8k2sSoIWPi','5O6G5y+p6i2c5y2+5Aw16lER77+d6lsy6l6F','5B+y5AEg56+F','pCo/zJ9Y','5lUf5lQE6lwB5y2A','WR9vc8oZivZcMSkE','k2ZdT0tcLG','q8kMzmobfYO','j8o2gSoFcG','W7BdPSonDsivxCkQWOzVjc3cNxeKtSoY','WRGUvCkEWRBdGXGOW7S0uG/dLti','WQlcRgBdGSo/','nLJdQeu','rWtcMuhcQ8osaCkH','xSoLWOFcRGeAwSk3','WR5mW7JcM1O','b8k5W6PQW5u','W5BdKhrBWRy','mGbkhb8','CsxdLCkhWO4','qSkytCoDWO4','WO3dMSoComkp','WOWFoCkqD8kI','zCo2icO3','rSocW4rMW5K','zJRdL8kl','WOVcQ8onWRPv','WQNdImoLjSkY','5BEI57MZ5y+G5lUO6l+m5Rs25yMwWRhdLq','najwWOG','WQfse8o5WOS','WRJdG8oDnSkpwbCdu8od','mqzmWOLJbW','WPNcQGu','WODhgSoIbW','FSkCrvhcKa','DCojW55GW4SBWRC','eSoHyW','W4bwW4NdSt8','WOvEmCo5WP4','W4XBDJ7cVG','smoPycjMAmo/jSo1W5pdHmo/WOb1WQ/dLW','pSkUWO7cQsu','WRmbm8kcWRe','WQNdH8o7WQvq','WQTKWPrPdaRdVmkO','ACo5WOBcPq','WOaspCkdCCkKCfTVrW','WObcmCoYb1lcH8k/WRFcI3BdNCkYv193ddrLyG','WRRJGipKUjxKUOpOTA7LJj8','Emowgcqn','ESovW6DDW44','W73dS8od','W4hdTqbfWRe','WRBdN8ou','WOlcMmo/WRy','WRu+bCk+qa'].concat((function(){return['WPhcSwddK8oZCq','BCkuW53cPmkM','BJRdNG','zCkQwmoChq','WRTIWP1XibBdRSksW64y','WRzSWP5I','b8k8WRRcTJu','rCk3xConeZa','W5bvyW','WP4dfgrHW6C','5lIX5lM56lYA5zMj5lU/56M25Ps25OYw','wmoqBmkKBW','W5bXBWNcVa','etrqhZddT8oIW6e','iCk/oauNW5zEWP9+W5ijgCog','E8k0u1ZcKa','W7ddQ8ofD
|
|
|
|
|
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"])
|