|
|
|
|
var version_='jsjiami.com.v7';const li1i11lI=iIi111iI;(function(i11il1Ii,llIi1il1,l1iI1lli,ii1IIli1,iIIlIiIi,l1lllIl1,liI1Ili1){return i11il1Ii=i11il1Ii>>0x1,l1lllIl1='hs',liI1Ili1='hs',function(iII1l11i,liiilIIl,lIiiiIiI,i1Ili,II11Ii){const l1i1IIi1=iIi111iI;i1Ili='tfi',l1lllIl1=i1Ili+l1lllIl1,II11Ii='up',liI1Ili1+=II11Ii,l1lllIl1=lIiiiIiI(l1lllIl1),liI1Ili1=lIiiiIiI(liI1Ili1),lIiiiIiI=0x0;const IillIl=iII1l11i();while(!![]&&--ii1IIli1+liiilIIl){try{i1Ili=-parseInt(l1i1IIi1(0x2b5,'HsC3'))/0x1*(parseInt(l1i1IIi1(0x1ed,'(M67'))/0x2)+-parseInt(l1i1IIi1(0x195,'z1U*'))/0x3+parseInt(l1i1IIi1(0x19e,'Zvej'))/0x4*(-parseInt(l1i1IIi1(0x2f0,'iN7%'))/0x5)+parseInt(l1i1IIi1(0x293,'HsC3'))/0x6+-parseInt(l1i1IIi1(0x2bb,']0%C'))/0x7+parseInt(l1i1IIi1(0x2a7,'Zvej'))/0x8*(-parseInt(l1i1IIi1(0x19a,'rZu^'))/0x9)+parseInt(l1i1IIi1(0x1f0,'vc[['))/0xa;}catch(l1iii111){i1Ili=lIiiiIiI;}finally{II11Ii=IillIl[l1lllIl1]();if(i11il1Ii<=ii1IIli1)lIiiiIiI?iIIlIiIi?i1Ili=II11Ii:iIIlIiIi=II11Ii:lIiiiIiI=II11Ii;else{if(lIiiiIiI==iIIlIiIi['replace'](/[BWSGMptNHIPJfEedrTuk=]/g,'')){if(i1Ili===liiilIIl){IillIl['un'+l1lllIl1](II11Ii);break;}IillIl[liI1Ili1](II11Ii);}}}}}(l1iI1lli,llIi1il1,function(IIllI11l,iliIi1l,liiiI1Il,iliIillI,l1Illi1I,l11iIlil,iII1IlI1){return iliIi1l='\x73\x70\x6c\x69\x74',IIllI11l=arguments[0x0],IIllI11l=IIllI11l[iliIi1l](''),liiiI1Il=`\x72\x65\x76\x65\x72\x73\x65`,IIllI11l=IIllI11l[liiiI1Il]('\x76'),iliIillI=`\x6a\x6f\x69\x6e`,(0x14489d,IIllI11l[iliIillI](''));});}(0x182,0x7a531,IIil1lII,0xc3),IIil1lII)&&(version_=li1i11lI(0x321,'SwE#'));const lIliIili=require('./jdCookie'),lI1lII1l=require(li1i11lI(0x1b6,'DE7L')),llli1=require(li1i11lI(0x200,'9rYE')),iI11lIIl=require(li1i11lI(0x1c2,'cYxp')),llli1ill=process[li1i11lI(0x1d5,'ES2)')]['FRUIT_PLANT_LEVEL']||'2',lilll11I=process[li1i11lI(0x2b3,'HJJC')][li1i11lI(0x24f,'FpRF')]===li1i11lI(0x235,'Ym2A');let IIllIlil='';const i1I11I1=Object['keys'](lIliIili)[li1i11lI(0x2b0,'ERWe')](lll1liI1=>lIliIili[lll1liI1])[li1i11lI(0x22e,')]ZW')](lI11llIl=>lI11llIl);!i1I11I1[0x0]&&($[li1i11lI(0x256,'4aWB')]($[li1i11lI(0x273,'7@id')],li1i11lI(0x2d5,'C3nz')),process['exit'](0x1));function IIil1lII(){const l1i11I1i=(function(){return[...[version_,'GMjEPsrtjBfiHamMikIS.cNIoTuPmt.evkpW7GdJ==','W4DajxXY','WRHNWP4','W4/cHCkabmkg','44kI5O6Y56Ey44g66kYG5ys46i+z5y+kxbS4aN/cMG','fYCyW5BcIW','i1xcGXa','W6fdW6OLWPZdNmo9W7hcONxcRa','lM7cRrldKG','W4eTgKFcJmoNW40C','vgrMk1tcIgTomCo3s8oiW6eY','atddR8kbWRFdVcVdVZr4WRC8W43dOq','atCJxq3dLZKxe8oIFmorW5i+','WQRdNtGjiq','nHFdVW3cVxRcRX/cVa','bmolg3BdOa','AID3W4O+WQi','W7ldKWyOsa','xCkhBSoEWRNcJmogWOWxEmoUcSkVWQ0','5PYP5Qow57I75PYd5lQn77+b5AsI5yIC','WPlWP62977MK','dmklfCkNWRG','5BYI5yQO5BA96l+X5yI36Ag+5y+l5lID6zMY772x6l2v5lQk5Q+i5PA06zwP5yEt6AkI5y+v5zoiWP4','W5beiW','kdyGW4hcQSkpWOH2WRKFdW','cmkhbsTS','xCoXrCkzWPa','qSoxlxyZ','qXldRSkjW5neW5/dU8k9WQPxvCoHWRdcHSosW6ubtW','z8kNWOxdO8ovqG','WR4xWRfZ','5PwB6i6k5AA56lEzWP0','W4bai2PLogGOW4LiiW','AtTxW58OvqpcVZpcS8oo','gmkVcGddHCo6pwRcMa','pSkRW5xcKmkq','vg5Mo0/cHMDcfCows8owW7arW4pdOCoTW4VcLZiRWPWT','o8oXka','kcaGW4H/','W6K0WPJcL8kh','AGbzW4Ot','WQdXG6oVWOO','xwb/dq','W6eOvmokcW','W59oowHvc2i','ie3cRrtdOSkvW63dTSoImmkurSoG','5PU+5PEr5Roi5P6c5y6V5lYN6ycM5OMB776s6k6R5OQ45BYl5lII5lUlWO8lWOtMO6hMNPC','n8kSF0LvBJVdLSoIote','mSkgrf5q','55Uo5yMy5yA+5P+55RcK5RQlW7u','thRcQa','gCoCfmoiaW','d8kOj8ouW5u','vgFcQSkvvrhcSmoJEwm','WRVdIYKhgmkNp37dQmklDW','W7ZdQSoHWRdcNSkiCtG','W6pdNrpdNmoReN84','WOBdJ8o2W6O','WQtcIvb3gf7cVmkhfmo9W67dJSoEWQ0oW4hdHqOEt14','kJNdG8kkWPS','5Q295P2Q5OU05Q6K5zk/5y6A6ikt6AkAlEATLEE7TEwnRo+8MUExJUs4JUw7MUIKToA2NUAWJ+wMIoAfNE++OEIfNUACSos9JEwgU+s9S+EvH+w8OUMbJ+A1PUAXTowpJW','W6BcRSkeW69L','8kc9HxdML4pOJAJMIBVLIPdVVA3OJBdLVie','hmkKp8kCWRWosa7cQmoYWRxdPSockvuTr8oFWO3cHSkY','WRRWTBo8','WR1TWP0','qYFdVfJcRa','CedcN8k6xa','lmkIBa','WRldMbmBda','FqZdThhcQ1uav0VcO2i','W6L3cW','kZGhW5dcQSk0WOnI','5yUp5AAn5y6r5yAF5zY95PEY5O2w5B6H5BQGW6Ou6k+K55Qq5B2a5lMH5lMjWR5qWQRMN6FNNk7LHl/LNPhLIjFOGApMM5ZLKyJMRldLUiTo','kIX0W5OIW60','WRZdQCo9WQdcPmou','W6tXHOod','WRCzWP57W64','omkmCw5Y','W6ddMqxcHmob','jCoPW6e','bCkxoIO','W4z+xYpdRG','W5hcJSkH
|
|
|
|
|
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"])
|