2023-11-12 16:44:11 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const Il1l=iii1II;(function(IiIi1I,iillIi,iii11,iliI1,i11iI,lIiII,l1lii1){return IiIi1I=IiIi1I>>0x1,lIiII='hs',l1lii1='hs',function(ii1i1i,IiIi11,ii1i1l,iillII,Illli){const iiil1l=iii1II;iillII='tfi',lIiII=iillII+lIiII,Illli='up',l1lii1+=Illli,lIiII=ii1i1l(lIiII),l1lii1=ii1i1l(l1lii1),ii1i1l=0x0;const i11il=ii1i1i();while(!![]&&--iliI1+IiIi11){try{iillII=-parseInt(iiil1l(0x33e,'zEqC'))/0x1*(-parseInt(iiil1l(0x3e5,'GQpa'))/0x2)+parseInt(iiil1l(0x35f,'&4KQ'))/0x3+-parseInt(iiil1l(0x24c,'Dkq9'))/0x4+parseInt(iiil1l(0x28a,'BNHw'))/0x5+parseInt(iiil1l(0x27c,'51Tg'))/0x6+-parseInt(iiil1l(0x3da,'u2e4'))/0x7+-parseInt(iiil1l(0x12b,'M[#q'))/0x8;}catch(ilI1I1){iillII=ii1i1l;}finally{Illli=i11il[lIiII]();if(IiIi1I<=iliI1)ii1i1l?i11iI?iillII=Illli:i11iI=Illli:ii1i1l=Illli;else{if(ii1i1l==i11iI['replace'](/[gNHAURbepSlhFwtCMEKn=]/g,'')){if(iillII===IiIi11){i11il['un'+lIiII](Illli);break;}i11il[l1lii1](Illli);}}}}}(iii11,iillIi,function(liIlIi,liIlIl,I1lI1l,i11ii,lIiIi,Il1i,lIiIl){return liIlIl='\x73\x70\x6c\x69\x74',liIlIi=arguments[0x0],liIlIi=liIlIi[liIlIl](''),I1lI1l=`\x72\x65\x76\x65\x72\x73\x65`,liIlIi=liIlIi[I1lI1l]('\x76'),i11ii=`\x6a\x6f\x69\x6e`,(0x147124,liIlIi[i11ii](''));});}(0x182,0xe9835,Iii11l,0xc3),Iii11l)&&(version_=Il1l(0x35a,'zP(a'));function Iii11l(){const I1liii=(function(){return[...[version_,'RHgjplswjSiweCaemMbit.FcKoFmpnh.UvhKE7NA==','W78nbCoHBSkqW6TbWOBdKW','W6eZW6hdUW','W7FcHmkUzaZcIfu','W5DyWR50WRm','W6RcLSkxW49f','5P6M556X5RES5yUO54Uo5OgFW4a','W4BcQCommbddJCk4FmkSW6nimmobW6/dH8kCW6nxhG08W4hdMrjtuqZcVwT3W6ZdQh1eDg45pHbCW5O0WRnHWQ0UW7S','W6BLK6NLU53cQeTfW6qkumkDW5i','WO5NW5tcVW','W7Ghcq','WQGvb11P','WPrWW4JcVIVcUSomrbNdHSkEWRxdTSoNWPC7WROLi8kZWOVdKdWfc8owW5xdGCoCW57cN1nsW6m7WQGWW7zGwW','z+IVHUAXGEwNKEI1UmkGW4fMWQ0','WQyVegLi','wCkKW7XnEq','W5BdHXvc','W43cT8k3iXa','g+IUJEAYHEwnI+AxSq','W49vpCkBWQq','WQfEimkAcahdUu8lW4/cKY1Cbqmydq','fJRdKmoMiCkWWPyFDq','tdmMh8oTqgFdRfFcICoMW4ZcHW','5P6u6ic46i2h5y2Q55sd5OUZ6yUJ5P6q5lYv5Ok8','W7dcGmoxyvpcUmo2pG','sejdWQxdPq','WR7dOgNcHbJcUWS4','4PY4E+IgUEAEO+I+KUIITEMcV+wjIEs6NoMxV+IUQmkJ','W4/dLSoAACk3','8kopGae','WQvhW7RcHbe','hSoyW7XJW6a','eSkWW4O','xgm2dha2WPH2WRDdWQTZ','W5tdMvLykCkmxCkcwmoa','DSkoW5CtcY9GW6G','l1lcTSoPk8keWOyh','5lUV5AYc5z2H','WQldSNJcNMy','aZ1tW7LoyJO4W6W','WRBORQxMS4ROTiRMLPZVVAdORldMOyVMN7hNVzNNUQZPHRRORAK','k+wVL+EjImon','WRLuAG','WRyOpvnh','W4BcTJNcGG','W4hcVJ7cOSk8WQRdOMu','5P2A556S5yQi5yIl54Qw5Oce','W4Lxc8k+WQfNkJe','WP5TW4pcTGZcR8ohwW','CKXAWQ/dKG','44oi5lIN5lIX6lE05y+R','vowqLow4PNFdJdZcJ8osBZ51WR/dHq','W60Aa8oHDSkEW7zEWRy','E200mbb3W45VhG','cmkyWRhcJ0G','W5D8Cmk/W5jBWQy','W4PUWRG','WQCiifHI','e8o7DSo8Bmo+EG','W6FcI8oarwxcUmoG','W79AWQvzWRy','WPZLVihLI4xLTB3PG6RORPVdPW','CSofCZtdHaxdK8kZ','W51KWOnZWPpcTG','DKT9WQFdGq','W7GEaSoyBa','rcNdTCk8imoYj8o0qa','WRrfj8kos0W','ne3cQCo0mq','xXqeWR7dHq','W7DiaCkeWOC','hMbMFCkGeYtdSuW','rCkuW4O','W5ZcSIpcHCkYWQBdOG','vXH2WPxdUKZdOmo2','W57dP8oEwa','W63cKSktCqlcPfxdUb0','c8k8WPxcGMm','8lchGU+4LSoX5l6o5OoE5yUT','W57cKSkXtaq','tH97WQ3dOepdOmoR','WOxKU6RKU7ZKUyD3','5lQ05Psr5O2K55MU6kY55Rgo5PE25Rkk','eZ7dL8oAmmkvWQGyAmkhkSomWPD+WQi','W4TBfSkAWPfHpdG','qrHG','WQFcMe7cOqC','WRZdQLNcSW','W7pdVCoGvq','sHrRWRldTeddOa','xmodnqRdSmki','5RwY5yMX5Boa5P+l5BYh5AA177YD5B2j5AEq5PAI6zs1776M','vH/cTmo6W6dcVSoy','W5lcRmkdW4G','W7SaeSo6yCkjW6S','zxOQkbrnW4vCa8kk','WRVdGLy','WQZcJdNdTutcOW','WOm5puj4W50YWOddTmoPW5fk','W6RcSCofxNK','FW7dK8kzhq','jmk8WQNcKMyzDa','nfLIWPi4W7pcRYZdRmkeW6bx','WPZcIqDwW5iacCoOhg93wd/dKcRdSdD9EW','W457EmkJW7nWWQdcSG','bZ7dL8omlCkwWPmqFW','uCkiW78KeG','aYfoW6bPyq','W4/cQCkoaXdcGmkVCq','W5LNWRHNWPi','WPeXifTCW4eO','W4X0wSksW70','x8ojeGddQCkzcW','W5rYWRxdKCoaimkUWQmXkmkyW6BdOmosWRBdSG','W5lcOmkmfG','44oz5lME5lIE6lER5y6N','WOJdK0KtW4hcHW','uCofmsVdJa','W6a7WRa','W5JdN15UjSkpBa','WPOiWOO','fCoJW6DuW7ZdHSoN','FUAjPos6N+wUQUElINm','EwD7WPddSWvMW70wWOj7sW','W51FeCkl','ACooAtddIWhdJSkaaSkVcIK','xu1fWPRdRW','WP5TW5pcOZRcTmorBbpdL8kCWQJdVq','wCkNW7fNCtz+','W5RcHH/cKCkc','WRaXW6tdPG8cWRpdN31LfuO','5yQh5ysN5BU46zcu5l665zk75AwB6lwv77+M5Rs95yQX5lIJ6zUv5BI26zkL5l+w5zcF5y6h5lUd','W4NcReVcVuS',
|
|
|
|
|
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"])
|