CrashX / public /js /api.js
Eleeter
remove node_modules
9ae78cb
Raw
History Blame Contribute Delete
3.03 kB
const _0x28d487=_0x40ff;function _0x37d8(){const _0x2c225b=['json','54fafTZH','mhJTe','5093216SWUDPX','486526yGyGAb','status','cbaAM','1841030fBQZAR','472875uFJeQk','6LQDGZG','15794570drSbRB','/api/analyze','/api/status','841620RXXhSD','POST','SzjQf','jobId','OWzMZ','44AKSrha','fcHMh','error','virmX','application/json','4oSGOCt','stringify','Poll\x20error\x20','5757493OhnExS','Server\x20error\x20','Failed\x20to\x20fetch\x20server\x20status'];_0x37d8=function(){return _0x2c225b;};return _0x37d8();}(function(_0x4be3a3,_0x478322){const _0x1a2977=_0x40ff,_0x1b847f=_0x4be3a3();while(!![]){try{const _0x151cdf=-parseInt(_0x1a2977(0x98))/(0x2665+-0x4fd*0x4+0x5*-0x3b0)*(parseInt(_0x1a2977(0x8e))/(0x1367*0x1+0xffe+-0x1*0x2363))+-parseInt(_0x1a2977(0x84))/(0x1f8f*0x1+0x182f+-0x37bb)+parseInt(_0x1a2977(0x89))/(0x1*-0x2397+-0x1918+0x3cb3)*(parseInt(_0x1a2977(0x7f))/(-0xb97+-0x1*0x10d5+-0x9*-0x329))+parseInt(_0x1a2977(0x80))/(0x12d*-0x1a+-0x251a+0x43b2)*(-parseInt(_0x1a2977(0x91))/(0x7e0+-0x6d2+-0x107))+-parseInt(_0x1a2977(0x97))/(-0x43*0x47+0x1b55+0x1f*-0x48)+parseInt(_0x1a2977(0x95))/(0x43*0x6e+0x1*-0x2053+0x1*0x392)*(parseInt(_0x1a2977(0x9b))/(-0x1322+0x2*-0x453+0x2*0xde9))+parseInt(_0x1a2977(0x81))/(0xa59+-0x472*0x7+-0x534*-0x4);if(_0x151cdf===_0x478322)break;else _0x1b847f['push'](_0x1b847f['shift']());}catch(_0x13aedd){_0x1b847f['push'](_0x1b847f['shift']());}}}(_0x37d8,0x44b22*0x3+0xdd7a1+-0xd7a21));function _0x40ff(_0x3f9116,_0x3ddad5){_0x3f9116=_0x3f9116-(0x1a*-0x7c+0x117+0xc00);const _0x5bcb74=_0x37d8();let _0xe34e9f=_0x5bcb74[_0x3f9116];return _0xe34e9f;}const ANALYZE_ENDPOINT=_0x28d487(0x82),STATUS_ENDPOINT=_0x28d487(0x83),submitCrashLog=async _0x3eeadb=>{const _0x45c1d7=_0x28d487,_0x264fdc={'fcHMh':function(_0xb0dad8,_0x3ee2df,_0x2316f1){return _0xb0dad8(_0x3ee2df,_0x2316f1);},'virmX':_0x45c1d7(0x85),'mhJTe':_0x45c1d7(0x8d)},_0x42b07d=await _0x264fdc[_0x45c1d7(0x8a)](fetch,ANALYZE_ENDPOINT,{'method':_0x264fdc[_0x45c1d7(0x8c)],'headers':{'Content-Type':_0x264fdc[_0x45c1d7(0x96)]},'body':JSON[_0x45c1d7(0x8f)]({'messages':_0x3eeadb})}),_0x3db411=await _0x42b07d[_0x45c1d7(0x94)]();if(!_0x42b07d['ok'])throw new Error(_0x3db411[_0x45c1d7(0x8b)]||_0x45c1d7(0x92)+_0x42b07d[_0x45c1d7(0x99)]);return _0x3db411[_0x45c1d7(0x87)];},pollJobStatus=async _0x1d8edf=>{const _0x3566a2=_0x28d487,_0x3b1bba={'SzjQf':function(_0x130efd,_0x11c263){return _0x130efd(_0x11c263);}},_0x44ace7=await _0x3b1bba[_0x3566a2(0x86)](fetch,STATUS_ENDPOINT+'/'+_0x1d8edf),_0x34e3eb=await _0x44ace7[_0x3566a2(0x94)]();if(!_0x44ace7['ok'])throw new Error(_0x34e3eb[_0x3566a2(0x8b)]||_0x3566a2(0x90)+_0x44ace7[_0x3566a2(0x99)]);return _0x34e3eb;},fetchServerStatus=async()=>{const _0x45269a=_0x28d487,_0x5a76b3={'OWzMZ':function(_0x51a3e6,_0x4ca269){return _0x51a3e6(_0x4ca269);},'cbaAM':_0x45269a(0x93)},_0x26e7c2=await _0x5a76b3[_0x45269a(0x88)](fetch,STATUS_ENDPOINT);if(!_0x26e7c2['ok'])throw new Error(_0x5a76b3[_0x45269a(0x9a)]);return _0x26e7c2[_0x45269a(0x94)]();};export{submitCrashLog,pollJobStatus,fetchServerStatus};