@ranger-testing/ranger-cli 2.5.4-alpha.36a12ca-10 → 2.5.4-alpha.5f9facb-17
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/README.md +36 -14
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -0
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/skills/ranger/SKILL.md +24 -8
- package/build/skills/ranger/create.md +16 -3
- package/build/skills/ranger/verify.md +35 -10
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x21fcc3=_0x14e1;(function(_0x160871,_0x3e5215){const _0x5a210c=_0x14e1,_0x1de623=_0x160871();while(!![]){try{const _0x1fd8b8=-parseInt(_0x5a210c(0x17a))/0x1+parseInt(_0x5a210c(0x17b))/0x2*(-parseInt(_0x5a210c(0x16f))/0x3)+-parseInt(_0x5a210c(0x178))/0x4+-parseInt(_0x5a210c(0x152))/0x5+parseInt(_0x5a210c(0x17d))/0x6+-parseInt(_0x5a210c(0x161))/0x7*(parseInt(_0x5a210c(0x15f))/0x8)+parseInt(_0x5a210c(0x157))/0x9*(parseInt(_0x5a210c(0x15c))/0xa);if(_0x1fd8b8===_0x3e5215)break;else _0x1de623['push'](_0x1de623['shift']());}catch(_0x4faef5){_0x1de623['push'](_0x1de623['shift']());}}}(_0x461c,0xaf7ba));import*as _0x17cf9b from'fs';function _0x461c(){const _0x22b09e=['existsSync','lastStopReminderAt','IPaOJ','ZzYpA','git\x20rev-parse\x20--abbrev-ref\x20HEAD','45303KxWwwP','currentBranch','dirname','szxvy','QYBYw','main','homedir','SvVCZ','master','4121732opLLuw','featureId','881542XcGRbY','6OmGjVr','nuUiJ','8386074iceLJY','NjsGx','qwTfm','2851865LkeMha','MAmCv','lastEnabledSessionClearedAt','readFileSync','mwWZJ','296847IJESPH','prompted','gKcWz','sessions','JYZMS','730oiltRt','brjvh','.claude','7832bIipeM','ARUrc','3997IOqxMm','HEAD','enabled','zlWoD','branches','tnABa','writeFileSync','pipe','lastPlanReminderAt'];_0x461c=function(){return _0x22b09e;};return _0x461c();}import*as _0x13b03c from'path';import*as _0x3fa817 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x13b03c['join'](_0x3fa817[_0x21fcc3(0x175)](),_0x21fcc3(0x15e),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function _0x14e1(_0x3e9870,_0xb10bb9){_0x3e9870=_0x3e9870-0x152;const _0x461cf2=_0x461c();let _0x14e153=_0x461cf2[_0x3e9870];return _0x14e153;}function loadCache(){const _0x121e3f=_0x21fcc3,_0x1637dc={'NhhXi':'utf-8'};try{if(_0x17cf9b['existsSync'](CACHE_FILE)){const _0x5a38f2=JSON['parse'](_0x17cf9b[_0x121e3f(0x155)](CACHE_FILE,_0x1637dc['NhhXi']));return{'version':0x3,'sessions':_0x5a38f2['sessions']||{},'branches':_0x5a38f2[_0x121e3f(0x165)]||{},'lastEnabledSessionClearedAt':_0x5a38f2[_0x121e3f(0x154)]};}}catch{}return createEmptyCache();}function saveCache(_0x36055b){const _0x539320=_0x21fcc3;try{const _0x507d60=_0x13b03c[_0x539320(0x171)](CACHE_FILE);!_0x17cf9b[_0x539320(0x16a)](_0x507d60)&&_0x17cf9b['mkdirSync'](_0x507d60,{'recursive':!![]}),_0x17cf9b[_0x539320(0x167)](CACHE_FILE,JSON['stringify'](_0x36055b,null,0x2));}catch{}}export function getCurrentBranch(){const _0x43e4e4=_0x21fcc3,_0x33dbe0={'zlWoD':_0x43e4e4(0x16e),'JYZMS':_0x43e4e4(0x168),'IPaOJ':_0x43e4e4(0x162)};try{const _0x557f83=execSync(_0x33dbe0[_0x43e4e4(0x164)],{'encoding':'utf-8','stdio':[_0x43e4e4(0x168),_0x33dbe0[_0x43e4e4(0x15b)],'pipe']})['trim']();if(!_0x557f83||_0x557f83===_0x33dbe0[_0x43e4e4(0x16c)])return null;return _0x557f83;}catch{return null;}}export function enableBranch(_0x135264){const _0x6e0969=_0x21fcc3,_0x7b3e61=loadCache();_0x7b3e61[_0x6e0969(0x165)][_0x135264]=!![],saveCache(_0x7b3e61);}export function disableBranch(_0x36a672){const _0xd31a47=loadCache();delete _0xd31a47['branches'][_0x36a672],saveCache(_0xd31a47);}export function isBranchEnabled(_0x5272af){const _0x54b2e8=_0x21fcc3,_0x58d99f={'NjsGx':function(_0x3b8e22,_0x187c0d){return _0x3b8e22===_0x187c0d;}},_0x4f105c=loadCache();return _0x58d99f[_0x54b2e8(0x17e)](_0x4f105c['branches'][_0x5272af],!![]);}function getOrCreateSession(_0x491ab7,_0x44d2d6){const _0x1dba06=_0x21fcc3;return!_0x491ab7[_0x1dba06(0x15a)][_0x44d2d6]&&(_0x491ab7[_0x1dba06(0x15a)][_0x44d2d6]={}),_0x491ab7['sessions'][_0x44d2d6];}export function enableSession(_0x47ea61){const _0x2c5239=_0x21fcc3,_0x1358b2={'ZzYpA':function(_0x5a4166,_0x5e7edc){return _0x5a4166!==_0x5e7edc;},'hQmod':function(_0x2bcb74,_0xad8579){return _0x2bcb74(_0xad8579);}},_0x520126=loadCache(),_0x3809f3=getOrCreateSession(_0x520126,_0x47ea61);_0x3809f3[_0x2c5239(0x163)]=!![];const _0x461e13=getCurrentBranch();_0x461e13&&_0x1358b2[_0x2c5239(0x16d)](_0x461e13,'main')&&_0x1358b2[_0x2c5239(0x16d)](_0x461e13,'master')&&(_0x520126['branches'][_0x461e13]=!![],_0x3809f3['currentBranch']=_0x461e13),_0x1358b2['hQmod'](saveCache,_0x520126);}export function isSessionEnabled(_0xc9c8f4){const _0x4183a8=_0x21fcc3,_0xcccc3f={'gKcWz':function(_0x45111f){return _0x45111f();},'DssOK':_0x4183a8(0x174),'poCbU':function(_0x1d4497,_0x3dbd09){return _0x1d4497===_0x3dbd09;},'yFEeW':function(_0x16e758,_0x57e362){return _0x16e758||_0x57e362;}},_0x3b9177=_0xcccc3f[_0x4183a8(0x159)](loadCache),_0xcbbc7f=getCurrentBranch();if(!_0xcbbc7f||_0xcbbc7f===_0xcccc3f['DssOK']||_0xcbbc7f===_0x4183a8(0x177))return _0x3b9177[_0x4183a8(0x15a)][_0xc9c8f4]?.['enabled']===!![];const _0x4278f6=_0xcccc3f['poCbU'](_0x3b9177['branches'][_0xcbbc7f],!![]),_0x2d6ec5=_0x3b9177['sessions'][_0xc9c8f4]?.['enabled']===!![];return _0xcccc3f['yFEeW'](_0x4278f6,_0x2d6ec5);}export function disableSession(_0xd3d91a){const _0x35a759=_0x21fcc3,_0x68fec={'Rodhp':function(_0x4ffce8){return _0x4ffce8();},'qwTfm':function(_0x6b5f4b,_0x5d7829,_0x21d038){return _0x6b5f4b(_0x5d7829,_0x21d038);},'awudg':function(_0x362731,_0x35f658){return _0x362731(_0x35f658);}},_0x369101=_0x68fec['Rodhp'](loadCache),_0x445fdb=_0x68fec[_0x35a759(0x17f)](getOrCreateSession,_0x369101,_0xd3d91a);_0x445fdb[_0x35a759(0x163)]=![],_0x68fec['awudg'](saveCache,_0x369101);}export function updateBranchTracking(_0x5b77f0){const _0x17523c=_0x21fcc3,_0x736363={'LVytd':function(_0x374dba){return _0x374dba();},'qeskC':function(_0x1db949,_0x2d4a10){return _0x1db949===_0x2d4a10;},'rAymb':_0x17523c(0x174),'FWBos':'master','QYBYw':function(_0x19e741,_0x3efaf7){return _0x19e741!==_0x3efaf7;},'DevNS':function(_0x28723d,_0xebb7c6){return _0x28723d(_0xebb7c6);}},_0x509602=loadCache(),_0x23b10c=_0x509602['sessions'][_0x5b77f0];if(!_0x23b10c?.['enabled'])return;const _0x4b9660=_0x736363['LVytd'](getCurrentBranch);if(!_0x4b9660||_0x736363['qeskC'](_0x4b9660,_0x736363['rAymb'])||_0x4b9660===_0x736363['FWBos'])return;_0x736363[_0x17523c(0x173)](_0x23b10c['currentBranch'],_0x4b9660)&&(_0x509602[_0x17523c(0x165)][_0x4b9660]=!![],_0x23b10c[_0x17523c(0x170)]=_0x4b9660,_0x736363['DevNS'](saveCache,_0x509602));}export function initBranchTracking(_0xe1fa90){const _0x523bf0=_0x21fcc3,_0x4afd25={'arBsZ':function(_0x57b395,_0x24601f){return _0x57b395===_0x24601f;},'GhXyc':function(_0x13aab5,_0x56729d){return _0x13aab5===_0x56729d;},'tXGRl':function(_0x3a4026,_0x397e6a,_0x39e996){return _0x3a4026(_0x397e6a,_0x39e996);},'RGVII':function(_0x1cb68b,_0x43effb){return _0x1cb68b(_0x43effb);}},_0x33f890=loadCache(),_0x3b6ced=getCurrentBranch();if(!_0x3b6ced||_0x4afd25['arBsZ'](_0x3b6ced,_0x523bf0(0x174))||_0x4afd25['GhXyc'](_0x3b6ced,_0x523bf0(0x177)))return;if(_0x4afd25['arBsZ'](_0x33f890[_0x523bf0(0x165)][_0x3b6ced],!![])){const _0x3898b8=_0x4afd25['tXGRl'](getOrCreateSession,_0x33f890,_0xe1fa90);_0x3898b8[_0x523bf0(0x163)]=!![],_0x3898b8[_0x523bf0(0x170)]=_0x3b6ced,_0x4afd25['RGVII'](saveCache,_0x33f890);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x4c8a54){const _0x5a377e=_0x21fcc3,_0x25d4ea={'HxuBC':function(_0x2c0603,_0x36c54d){return _0x2c0603(_0x36c54d);}},_0x97246b=loadCache(),_0x2c57ce=_0x97246b['sessions'][_0x4c8a54];_0x2c57ce?.[_0x5a377e(0x163)]&&(_0x97246b['lastEnabledSessionClearedAt']=Date['now'](),_0x25d4ea['HxuBC'](saveCache,_0x97246b));}export function shouldAutoEnableAfterClear(_0x443667){const _0x371774=_0x21fcc3,_0x1f7d9a={'MAmCv':function(_0x1ed8b1,_0x26ef38){return _0x1ed8b1!==_0x26ef38;},'KLdVy':'clear','SVAgU':function(_0x39102e,_0x50dd2c){return _0x39102e-_0x50dd2c;}};if(_0x1f7d9a[_0x371774(0x153)](_0x443667,_0x1f7d9a['KLdVy']))return![];const _0x38514f=loadCache(),_0x38093e=_0x38514f[_0x371774(0x154)];if(!_0x38093e)return![];const _0x34b883=_0x1f7d9a['SVAgU'](Date['now'](),_0x38093e);return _0x34b883<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x291008){const _0x59672b=_0x21fcc3,_0x7cf3ca={'mwWZJ':function(_0x4aed39){return _0x4aed39();},'brjvh':'main','KoNTW':'master','ZooyV':function(_0xf1dde4,_0x3afcde){return _0xf1dde4(_0x3afcde);}},_0x5a19f3=loadCache(),_0x5d6a7e=getOrCreateSession(_0x5a19f3,_0x291008);_0x5d6a7e[_0x59672b(0x163)]=!![];const _0x15f37b=_0x7cf3ca[_0x59672b(0x156)](getCurrentBranch);_0x15f37b&&_0x15f37b!==_0x7cf3ca[_0x59672b(0x15d)]&&_0x15f37b!==_0x7cf3ca['KoNTW']&&(_0x5d6a7e[_0x59672b(0x170)]=_0x15f37b),delete _0x5a19f3['lastEnabledSessionClearedAt'],_0x7cf3ca['ZooyV'](saveCache,_0x5a19f3);}export function registerSession(_0x465be4,_0x52ff86){const _0x509322=_0x21fcc3,_0x4dd5f1={'EPtVW':function(_0x5e11c0,_0x57f5e8,_0x1c6432){return _0x5e11c0(_0x57f5e8,_0x1c6432);},'szxvy':function(_0x15c37f,_0x486640){return _0x15c37f(_0x486640);}},_0x286c74=loadCache(),_0x2ec944=_0x4dd5f1['EPtVW'](getOrCreateSession,_0x286c74,_0x465be4);_0x2ec944[_0x509322(0x179)]=_0x52ff86,_0x2ec944['registeredAt']=new Date()['toISOString'](),_0x4dd5f1[_0x509322(0x172)](saveCache,_0x286c74);}export function getSessionEntry(_0x1d31d4){const _0x4af5aa=_0x21fcc3,_0x24a01a=loadCache(),_0x1f33bf=_0x24a01a[_0x4af5aa(0x15a)][_0x1d31d4];if(_0x1f33bf?.[_0x4af5aa(0x179)]&&_0x1f33bf?.['registeredAt'])return{'featureId':_0x1f33bf['featureId'],'registeredAt':_0x1f33bf['registeredAt']};return null;}export function unregisterSession(_0x1d0a37){const _0x56e83c=_0x21fcc3,_0x2ce0a2={'tnABa':function(_0x566aa2){return _0x566aa2();},'bsxMk':function(_0x157d05,_0x44eb78){return _0x157d05(_0x44eb78);}},_0xb95938=_0x2ce0a2[_0x56e83c(0x166)](loadCache),_0x5887a7=_0xb95938[_0x56e83c(0x15a)][_0x1d0a37];_0x5887a7&&(delete _0x5887a7['featureId'],delete _0x5887a7['registeredAt'],_0x2ce0a2['bsxMk'](saveCache,_0xb95938));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x432d1d){const _0xc7c46f=_0x21fcc3,_0xec635d={'qJhET':function(_0x52b922,_0x2d3b6c){return _0x52b922-_0x2d3b6c;},'ARUrc':function(_0x3a304c,_0x23eedf){return _0x3a304c(_0x23eedf);}},_0x1adb90=loadCache(),_0x392af6=getOrCreateSession(_0x1adb90,_0x432d1d),_0x242ab5=_0x392af6['lastPlanReminderAt']||0x0,_0xf9c8bb=Date['now']();if(_0xec635d['qJhET'](_0xf9c8bb,_0x242ab5)>=PLAN_REMINDER_INTERVAL_MS)return _0x392af6[_0xc7c46f(0x169)]=_0xf9c8bb,_0xec635d[_0xc7c46f(0x160)](saveCache,_0x1adb90),!![];return![];}export function shouldShowStopReminder(_0x3493b0){const _0x1f0d18=_0x21fcc3,_0x129341=loadCache(),_0x354ce4=getOrCreateSession(_0x129341,_0x3493b0),_0x2ea14b=_0x354ce4['lastStopReminderAt']||0x0,_0x4bdb2e=Date['now']();if(_0x4bdb2e-_0x2ea14b>=STOP_REMINDER_INTERVAL_MS)return _0x354ce4[_0x1f0d18(0x16b)]=_0x4bdb2e,saveCache(_0x129341),!![];return![];}export function hasSessionBeenPrompted(_0x2f985c){const _0xfb90d5=_0x21fcc3,_0x5e434e={'AquNB':function(_0x2e79cb){return _0x2e79cb();},'SvVCZ':function(_0x43eaf8,_0x12f91f){return _0x43eaf8===_0x12f91f;}},_0x45310c=_0x5e434e['AquNB'](loadCache);return _0x5e434e[_0xfb90d5(0x176)](_0x45310c[_0xfb90d5(0x15a)][_0x2f985c]?.[_0xfb90d5(0x158)],!![]);}export function markSessionPrompted(_0xbf4bcc){const _0x693d58=_0x21fcc3,_0x3f4d31={'nuUiJ':function(_0x425c7b){return _0x425c7b();},'zvBWH':function(_0x57e177,_0xc36a16,_0x27780e){return _0x57e177(_0xc36a16,_0x27780e);},'pKLOm':function(_0x4f6034,_0x47c6ef){return _0x4f6034(_0x47c6ef);}},_0x588d2e=_0x3f4d31[_0x693d58(0x17c)](loadCache),_0x1cba25=_0x3f4d31['zvBWH'](getOrCreateSession,_0x588d2e,_0xbf4bcc);_0x1cba25[_0x693d58(0x158)]=!![],_0x3f4d31['pKLOm'](saveCache,_0x588d2e);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x42bec1=_0x2e15;(function(_0x5af90a,_0x41d0c4){const _0x2c8bbe=_0x2e15,_0x486fe9=_0x5af90a();while(!![]){try{const _0x4ee82e=parseInt(_0x2c8bbe(0x1bc))/0x1*(parseInt(_0x2c8bbe(0x1c8))/0x2)+parseInt(_0x2c8bbe(0x1c2))/0x3*(parseInt(_0x2c8bbe(0x1c1))/0x4)+-parseInt(_0x2c8bbe(0x1d2))/0x5*(parseInt(_0x2c8bbe(0x1b1))/0x6)+parseInt(_0x2c8bbe(0x1c6))/0x7*(parseInt(_0x2c8bbe(0x1b4))/0x8)+parseInt(_0x2c8bbe(0x1c3))/0x9*(parseInt(_0x2c8bbe(0x1ca))/0xa)+-parseInt(_0x2c8bbe(0x1ad))/0xb*(-parseInt(_0x2c8bbe(0x1bf))/0xc)+parseInt(_0x2c8bbe(0x1b2))/0xd*(-parseInt(_0x2c8bbe(0x1af))/0xe);if(_0x4ee82e===_0x41d0c4)break;else _0x486fe9['push'](_0x486fe9['shift']());}catch(_0x2fc15b){_0x486fe9['push'](_0x486fe9['shift']());}}}(_0x545c,0xe5f87));import*as _0x3fab2f from'fs';import*as _0x74ac98 from'path';import*as _0x573481 from'os';import{execSync}from'child_process';function _0x2e15(_0x3cc439,_0x467ce6){_0x3cc439=_0x3cc439-0x1ac;const _0x545c66=_0x545c();let _0x2e154f=_0x545c66[_0x3cc439];return _0x2e154f;}const CACHE_FILE=_0x74ac98['join'](_0x573481[_0x42bec1(0x1df)](),_0x42bec1(0x1b5),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function _0x545c(){const _0x2c96ab=['writeFileSync','NSsNf','mALtx','main','clear','homedir','utf-8','aMxwI','16476823Ymvfmz','pxwMV','5369266sokdtN','prompted','24ZnBDIJ','78XXgoOX','readFileSync','4101744GjGQwo','.claude','enabled','HEAD','branches','IfwFN','fTexF','xfnKm','1688853VtKOTs','ntRVL','eYDEu','12JxCVBI','FIjUD','198840FfxdXW','33vwQyQd','10881akegio','mkdirSync','TwMyY','7JlPIqs','existsSync','2FKKekK','lastPlanReminderAt','4310gkwpHw','now','uRXnc','master','ldQJT','registeredAt','TNedk','git\x20rev-parse\x20--abbrev-ref\x20HEAD','1905350wERCHf','YMPse','sessions','EfwEB','GpHVc','currentBranch','featureId','Owvqw'];_0x545c=function(){return _0x2c96ab;};return _0x545c();}function loadCache(){const _0x551b43=_0x42bec1,_0x57a2d0={'ldQJT':function(_0xfa392a){return _0xfa392a();}};try{if(_0x3fab2f[_0x551b43(0x1c7)](CACHE_FILE)){const _0x1b02e6=JSON['parse'](_0x3fab2f[_0x551b43(0x1b3)](CACHE_FILE,_0x551b43(0x1e0)));return{'version':0x3,'sessions':_0x1b02e6[_0x551b43(0x1d4)]||{},'branches':_0x1b02e6['branches']||{},'lastEnabledSessionClearedAt':_0x1b02e6['lastEnabledSessionClearedAt']};}}catch{}return _0x57a2d0[_0x551b43(0x1ce)](createEmptyCache);}function saveCache(_0x202bb6){const _0x4ce810=_0x42bec1;try{const _0x3dba0b=_0x74ac98['dirname'](CACHE_FILE);!_0x3fab2f[_0x4ce810(0x1c7)](_0x3dba0b)&&_0x3fab2f[_0x4ce810(0x1c4)](_0x3dba0b,{'recursive':!![]}),_0x3fab2f[_0x4ce810(0x1da)](CACHE_FILE,JSON['stringify'](_0x202bb6,null,0x2));}catch{}}export function getCurrentBranch(){const _0x6b48d2=_0x42bec1,_0x2eae68={'NSsNf':function(_0x15fa74,_0x5cbe2c,_0x4c8504){return _0x15fa74(_0x5cbe2c,_0x4c8504);},'GZRoS':_0x6b48d2(0x1d1),'mALtx':'pipe','RQfWq':function(_0x5b501f,_0x163e24){return _0x5b501f===_0x163e24;}};try{const _0x49f9b3=_0x2eae68[_0x6b48d2(0x1db)](execSync,_0x2eae68['GZRoS'],{'encoding':_0x6b48d2(0x1e0),'stdio':[_0x2eae68[_0x6b48d2(0x1dc)],_0x2eae68['mALtx'],_0x2eae68[_0x6b48d2(0x1dc)]]})['trim']();if(!_0x49f9b3||_0x2eae68['RQfWq'](_0x49f9b3,_0x6b48d2(0x1b7)))return null;return _0x49f9b3;}catch{return null;}}export function enableBranch(_0xedc23f){const _0x2a4939=loadCache();_0x2a4939['branches'][_0xedc23f]=!![],saveCache(_0x2a4939);}export function disableBranch(_0x43c2b0){const _0x237b6b=loadCache();delete _0x237b6b['branches'][_0x43c2b0],saveCache(_0x237b6b);}export function isBranchEnabled(_0x1fd3d0){const _0x340151={'CcGBg':function(_0x4844eb,_0x4033af){return _0x4844eb===_0x4033af;}},_0x17fa5e=loadCache();return _0x340151['CcGBg'](_0x17fa5e['branches'][_0x1fd3d0],!![]);}function getOrCreateSession(_0x1bcb3c,_0x12b765){const _0x49d4d4=_0x42bec1;return!_0x1bcb3c[_0x49d4d4(0x1d4)][_0x12b765]&&(_0x1bcb3c['sessions'][_0x12b765]={}),_0x1bcb3c[_0x49d4d4(0x1d4)][_0x12b765];}export function enableSession(_0x519b41){const _0x12c054=_0x42bec1,_0x3199c2={'uRXnc':function(_0x5bf623,_0x5218d5,_0x4f80d5){return _0x5bf623(_0x5218d5,_0x4f80d5);},'EfwEB':function(_0xeaa42d){return _0xeaa42d();},'sGPoR':function(_0x268afd,_0x3c29e1){return _0x268afd!==_0x3c29e1;},'dmaRu':_0x12c054(0x1dd)},_0x261064=loadCache(),_0x15c746=_0x3199c2[_0x12c054(0x1cc)](getOrCreateSession,_0x261064,_0x519b41);_0x15c746['enabled']=!![];const _0x1ec571=_0x3199c2[_0x12c054(0x1d5)](getCurrentBranch);_0x1ec571&&_0x3199c2['sGPoR'](_0x1ec571,_0x3199c2['dmaRu'])&&_0x1ec571!==_0x12c054(0x1cd)&&(_0x261064[_0x12c054(0x1b8)][_0x1ec571]=!![],_0x15c746[_0x12c054(0x1d7)]=_0x1ec571),saveCache(_0x261064);}export function isSessionEnabled(_0x4911a0){const _0x1cab02=_0x42bec1,_0x230771={'aMxwI':function(_0x45d123){return _0x45d123();},'oBcTw':function(_0x23e7c3,_0x59d78b){return _0x23e7c3===_0x59d78b;},'MYFNU':'master','zMMdB':function(_0xe845,_0x3b6a92){return _0xe845===_0x3b6a92;},'viNWe':function(_0x339258,_0x3cca09){return _0x339258||_0x3cca09;}},_0x2eec77=_0x230771[_0x1cab02(0x1ac)](loadCache),_0x4d18cc=getCurrentBranch();if(!_0x4d18cc||_0x4d18cc==='main'||_0x230771['oBcTw'](_0x4d18cc,_0x230771['MYFNU']))return _0x230771['oBcTw'](_0x2eec77['sessions'][_0x4911a0]?.['enabled'],!![]);const _0x25e955=_0x230771['oBcTw'](_0x2eec77['branches'][_0x4d18cc],!![]),_0x1ecc35=_0x230771['zMMdB'](_0x2eec77[_0x1cab02(0x1d4)][_0x4911a0]?.[_0x1cab02(0x1b6)],!![]);return _0x230771['viNWe'](_0x25e955,_0x1ecc35);}export function disableSession(_0x24b1d3){const _0x382d70=_0x42bec1,_0x3676bc={'TNedk':function(_0x5f9c79,_0x3c92f4,_0x555352){return _0x5f9c79(_0x3c92f4,_0x555352);},'uopGD':function(_0x234858,_0x5356e1){return _0x234858(_0x5356e1);}},_0x39e50b=loadCache(),_0x384045=_0x3676bc[_0x382d70(0x1d0)](getOrCreateSession,_0x39e50b,_0x24b1d3);_0x384045[_0x382d70(0x1b6)]=![],_0x3676bc['uopGD'](saveCache,_0x39e50b);}export function updateBranchTracking(_0x357c48){const _0x71f9a1=_0x42bec1,_0x2a2461={'TltUL':function(_0x255ac4){return _0x255ac4();},'xfFIB':_0x71f9a1(0x1dd),'GpHVc':_0x71f9a1(0x1cd),'PMNkc':function(_0x3d3ac0,_0x2c9a01){return _0x3d3ac0!==_0x2c9a01;},'TDVhc':function(_0x5ecc12,_0x648811){return _0x5ecc12(_0x648811);}},_0x105178=_0x2a2461['TltUL'](loadCache),_0x54ccd8=_0x105178['sessions'][_0x357c48];if(!_0x54ccd8?.['enabled'])return;const _0x2200d7=getCurrentBranch();if(!_0x2200d7||_0x2200d7===_0x2a2461['xfFIB']||_0x2200d7===_0x2a2461[_0x71f9a1(0x1d6)])return;_0x2a2461['PMNkc'](_0x54ccd8[_0x71f9a1(0x1d7)],_0x2200d7)&&(_0x105178[_0x71f9a1(0x1b8)][_0x2200d7]=!![],_0x54ccd8[_0x71f9a1(0x1d7)]=_0x2200d7,_0x2a2461['TDVhc'](saveCache,_0x105178));}export function initBranchTracking(_0x22474d){const _0x3d7066=_0x42bec1,_0x455773={'ghnfq':function(_0x135732){return _0x135732();},'koTTl':function(_0x61acdd){return _0x61acdd();},'mvfVt':_0x3d7066(0x1dd),'GRCSw':function(_0x2b08fa,_0x294c5e){return _0x2b08fa===_0x294c5e;},'fTexF':function(_0x44443e,_0x300d32){return _0x44443e(_0x300d32);}},_0x3eec06=_0x455773['ghnfq'](loadCache),_0x3740f9=_0x455773['koTTl'](getCurrentBranch);if(!_0x3740f9||_0x3740f9===_0x455773['mvfVt']||_0x455773['GRCSw'](_0x3740f9,'master'))return;if(_0x3eec06[_0x3d7066(0x1b8)][_0x3740f9]===!![]){const _0x13310b=getOrCreateSession(_0x3eec06,_0x22474d);_0x13310b['enabled']=!![],_0x13310b[_0x3d7066(0x1d7)]=_0x3740f9,_0x455773[_0x3d7066(0x1ba)](saveCache,_0x3eec06);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x443a66){const _0x581d6c=_0x42bec1,_0x31e0c7={'pxwMV':function(_0x5c226f){return _0x5c226f();},'xfnKm':function(_0x4b3446,_0x51c3c0){return _0x4b3446(_0x51c3c0);}},_0x2cf938=_0x31e0c7[_0x581d6c(0x1ae)](loadCache),_0xaefde2=_0x2cf938[_0x581d6c(0x1d4)][_0x443a66];_0xaefde2?.['enabled']&&(_0x2cf938['lastEnabledSessionClearedAt']=Date['now'](),_0x31e0c7[_0x581d6c(0x1bb)](saveCache,_0x2cf938));}export function shouldAutoEnableAfterClear(_0x503bdf){const _0x5e0bf7=_0x42bec1,_0x133b2f={'TwMyY':_0x5e0bf7(0x1de),'Owvqw':function(_0x18935b,_0x1e02ab){return _0x18935b-_0x1e02ab;},'oOnMr':function(_0x24c121,_0x5dc9c8){return _0x24c121<=_0x5dc9c8;}};if(_0x503bdf!==_0x133b2f[_0x5e0bf7(0x1c5)])return![];const _0x46c949=loadCache(),_0x53b9c8=_0x46c949['lastEnabledSessionClearedAt'];if(!_0x53b9c8)return![];const _0x543e4b=_0x133b2f[_0x5e0bf7(0x1d9)](Date['now'](),_0x53b9c8);return _0x133b2f['oOnMr'](_0x543e4b,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x2cb3ce){const _0x1aa8e0=_0x42bec1,_0x410d6d={'eYDEu':function(_0x4a73ef,_0x505898,_0xaef24){return _0x4a73ef(_0x505898,_0xaef24);},'rXxMm':function(_0x301ed6){return _0x301ed6();},'lluTn':function(_0x5e7514,_0x4a654a){return _0x5e7514!==_0x4a654a;},'mbekH':'master','uAbZc':function(_0x1dfc8f,_0x314fe0){return _0x1dfc8f(_0x314fe0);}},_0xfe57ce=loadCache(),_0x21ea2f=_0x410d6d[_0x1aa8e0(0x1be)](getOrCreateSession,_0xfe57ce,_0x2cb3ce);_0x21ea2f['enabled']=!![];const _0x5f5b44=_0x410d6d['rXxMm'](getCurrentBranch);_0x5f5b44&&_0x410d6d['lluTn'](_0x5f5b44,'main')&&_0x5f5b44!==_0x410d6d['mbekH']&&(_0x21ea2f['currentBranch']=_0x5f5b44),delete _0xfe57ce['lastEnabledSessionClearedAt'],_0x410d6d['uAbZc'](saveCache,_0xfe57ce);}export function registerSession(_0xd80971,_0x279966){const _0x2a547e=_0x42bec1,_0x199f8d={'FIjUD':function(_0x26e975,_0x1f77aa){return _0x26e975(_0x1f77aa);}},_0x2d640f=loadCache(),_0x43a0b8=getOrCreateSession(_0x2d640f,_0xd80971);_0x43a0b8[_0x2a547e(0x1d8)]=_0x279966,_0x43a0b8[_0x2a547e(0x1cf)]=new Date()['toISOString'](),_0x199f8d[_0x2a547e(0x1c0)](saveCache,_0x2d640f);}export function getSessionEntry(_0x5343cb){const _0xb8e2e5=_0x42bec1,_0x3422b2={'YMPse':function(_0x410908){return _0x410908();}},_0x2b0e38=_0x3422b2[_0xb8e2e5(0x1d3)](loadCache),_0x1c1b7e=_0x2b0e38['sessions'][_0x5343cb];if(_0x1c1b7e?.['featureId']&&_0x1c1b7e?.[_0xb8e2e5(0x1cf)])return{'featureId':_0x1c1b7e['featureId'],'registeredAt':_0x1c1b7e[_0xb8e2e5(0x1cf)]};return null;}export function unregisterSession(_0xaed9a0){const _0x35cf7e=_0x42bec1,_0x2b772c={'ApXKh':function(_0x405306,_0x16371d){return _0x405306(_0x16371d);}},_0x2feeb8=loadCache(),_0x588230=_0x2feeb8['sessions'][_0xaed9a0];_0x588230&&(delete _0x588230[_0x35cf7e(0x1d8)],delete _0x588230['registeredAt'],_0x2b772c['ApXKh'](saveCache,_0x2feeb8));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x513261){const _0x4a2110=_0x42bec1,_0x45adb7={'QIGbi':function(_0x2158b1,_0x268559){return _0x2158b1>=_0x268559;}},_0x2f5455=loadCache(),_0x308088=getOrCreateSession(_0x2f5455,_0x513261),_0x29e4f7=_0x308088[_0x4a2110(0x1c9)]||0x0,_0x3cec71=Date[_0x4a2110(0x1cb)]();if(_0x45adb7['QIGbi'](_0x3cec71-_0x29e4f7,PLAN_REMINDER_INTERVAL_MS))return _0x308088[_0x4a2110(0x1c9)]=_0x3cec71,saveCache(_0x2f5455),!![];return![];}export function shouldShowStopReminder(_0x40ef7a){const _0xb202db=_0x42bec1,_0x1b7126={'wIFPJ':function(_0x59d4eb,_0x1bb2be,_0x9e30b8){return _0x59d4eb(_0x1bb2be,_0x9e30b8);},'IfwFN':function(_0x2767f8,_0x126d52){return _0x2767f8(_0x126d52);}},_0x22eeca=loadCache(),_0x3a6684=_0x1b7126['wIFPJ'](getOrCreateSession,_0x22eeca,_0x40ef7a),_0x57f20f=_0x3a6684['lastStopReminderAt']||0x0,_0x4c9d21=Date[_0xb202db(0x1cb)]();if(_0x4c9d21-_0x57f20f>=STOP_REMINDER_INTERVAL_MS)return _0x3a6684['lastStopReminderAt']=_0x4c9d21,_0x1b7126[_0xb202db(0x1b9)](saveCache,_0x22eeca),!![];return![];}export function hasSessionBeenPrompted(_0x16772e){const _0x1f4d0e=_0x42bec1,_0x11f7b8={'ntRVL':function(_0x4d8981){return _0x4d8981();},'gEeuT':function(_0x2b3fd6,_0x4dd1f8){return _0x2b3fd6===_0x4dd1f8;}},_0x330326=_0x11f7b8[_0x1f4d0e(0x1bd)](loadCache);return _0x11f7b8['gEeuT'](_0x330326['sessions'][_0x16772e]?.[_0x1f4d0e(0x1b0)],!![]);}export function markSessionPrompted(_0x3be67d){const _0x247f1d=_0x42bec1,_0x55f287=loadCache(),_0x54df64=getOrCreateSession(_0x55f287,_0x3be67d);_0x54df64[_0x247f1d(0x1b0)]=!![],saveCache(_0x55f287);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x54c121=_0x1946;(function(_0x4c0c7e,_0x4e8d2f){const _0x16a4bb=_0x1946,_0x5b4476=_0x4c0c7e();while(!![]){try{const _0x1d8321=-parseInt(_0x16a4bb(0x150))/0x1*(-parseInt(_0x16a4bb(0x16a))/0x2)+-parseInt(_0x16a4bb(0x12b))/0x3+parseInt(_0x16a4bb(0x121))/0x4+-parseInt(_0x16a4bb(0x159))/0x5*(-parseInt(_0x16a4bb(0x151))/0x6)+-parseInt(_0x16a4bb(0x136))/0x7+parseInt(_0x16a4bb(0x14b))/0x8+-parseInt(_0x16a4bb(0x16d))/0x9*(parseInt(_0x16a4bb(0x120))/0xa);if(_0x1d8321===_0x4e8d2f)break;else _0x5b4476['push'](_0x5b4476['shift']());}catch(_0x252463){_0x5b4476['push'](_0x5b4476['shift']());}}}(_0x4297,0xe6ad2));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x3e0e12,_0x45324d){const _0x13ef3f=_0x1946,_0x4aaf0e={'JSoxK':function(_0x874d07,_0x3f77c0,_0x10684e,_0x12ec54){return _0x874d07(_0x3f77c0,_0x10684e,_0x12ec54);},'SexZv':function(_0x1c1705,_0x4286f4,_0x3a10f1){return _0x1c1705(_0x4286f4,_0x3a10f1);},'BcOkw':_0x13ef3f(0x138),'tzkHO':function(_0x10f255,_0x4a445d){return _0x10f255(_0x4a445d);},'dtHCl':function(_0x197ef6,_0x52307b){return _0x197ef6!==_0x52307b;}},_0x498873=join(_0x45324d,'ci',_0x3e0e12),_0x53e14c=_0x4aaf0e['JSoxK'](join,_0x45324d,'local',_0x3e0e12),_0x2d60ba=join(_0x45324d,_0x3e0e12),_0x59da0c=_0x4aaf0e['SexZv'](join,_0x45324d,_0x4aaf0e['BcOkw']),_0x315e62=join(_0x45324d,'ci');if(existsSync(_0x498873))return _0x498873;if(_0x4aaf0e['tzkHO'](existsSync,_0x53e14c))return _0x53e14c;if(existsSync(_0x2d60ba)&&(_0x4aaf0e['dtHCl'](_0x2d60ba,_0x59da0c)&&_0x2d60ba!==_0x315e62?!![]:hasLegacyProfileFiles(_0x2d60ba)))return _0x2d60ba;return null;}export function getEnvDir(_0x14ec67){const _0x20bfbd=_0x1946,_0xcdee3e={'yYEcs':function(_0x36349b,_0x3a9261){return _0x36349b!==_0x3a9261;},'vOWuh':function(_0x39d5c2,_0x41bb66,_0x43dc7f){return _0x39d5c2(_0x41bb66,_0x43dc7f);},'pGnjK':function(_0x40b37e,_0x371a2d,_0x302018,_0x2f53a6){return _0x40b37e(_0x371a2d,_0x302018,_0x2f53a6);}},_0x57a162=getRangerDir(),_0x251228=findEnvInRoot(_0x14ec67,_0x57a162);if(_0x251228)return _0x251228;const _0x4965a8=getRangerHomeDir();if(_0xcdee3e[_0x20bfbd(0x112)](_0x4965a8,_0x57a162)){const _0x5ac3d4=_0xcdee3e['vOWuh'](findEnvInRoot,_0x14ec67,_0x4965a8);if(_0x5ac3d4)return _0x5ac3d4;}return _0xcdee3e[_0x20bfbd(0x122)](join,_0x57a162,_0x20bfbd(0x138),_0x14ec67);}export function findExistingEnv(_0x2499d4,_0x9399b0){const _0x3320a8=_0x1946,_0x5f0846={'NwAJu':function(_0x5b339e){return _0x5b339e();},'aIgWN':_0x3320a8(0x11c),'TmAcj':function(_0xee172a,_0x3ab37e,_0x209da7){return _0xee172a(_0x3ab37e,_0x209da7);},'UxtEk':'local','HOAcH':function(_0x21b213,_0x269471,_0x2f563a){return _0x21b213(_0x269471,_0x2f563a);},'PbBGB':function(_0x56a6d4,_0x35a7d3,_0x1c8fd6,_0x3532a2){return _0x56a6d4(_0x35a7d3,_0x1c8fd6,_0x3532a2);},'cObMt':function(_0x173328,_0x3718f9,_0x332e96){return _0x173328(_0x3718f9,_0x332e96);},'AWmsr':function(_0x113994,_0x28637d){return _0x113994(_0x28637d);}},_0x3c11d9=_0x9399b0?.['rangerDir'],_0xd1d95e=_0x3c11d9?[_0x3c11d9]:[getRangerDir(),_0x5f0846['NwAJu'](getRangerHomeDir)][_0x3320a8(0x10e)]((_0x14b6da,_0x5dff5b,_0x377851)=>_0x377851[_0x3320a8(0x10d)](_0x14b6da)===_0x5dff5b),_0x47696d=_0x9399b0?.['locations']??['ci','local',_0x5f0846[_0x3320a8(0x126)]];for(const _0x2641c5 of _0xd1d95e){const _0x4b22bf=_0x5f0846[_0x3320a8(0x115)](join,_0x2641c5,_0x5f0846[_0x3320a8(0x164)]),_0x46906c=_0x5f0846[_0x3320a8(0x12a)](join,_0x2641c5,'ci'),_0xf14f12=[{'location':'ci','path':join(_0x2641c5,'ci',_0x2499d4)},{'location':'local','path':_0x5f0846[_0x3320a8(0x154)](join,_0x2641c5,_0x5f0846[_0x3320a8(0x164)],_0x2499d4)},{'location':'legacy','path':_0x5f0846[_0x3320a8(0x14f)](join,_0x2641c5,_0x2499d4)}];for(const _0x20420d of _0xf14f12){if(_0x47696d[_0x3320a8(0x127)](_0x20420d[_0x3320a8(0x131)])&&_0x5f0846[_0x3320a8(0x148)](existsSync,_0x20420d['path'])){if(_0x20420d['location']===_0x5f0846['aIgWN']&&(_0x20420d[_0x3320a8(0x11f)]===_0x4b22bf||_0x20420d['path']===_0x46906c)&&!_0x5f0846['AWmsr'](hasLegacyProfileFiles,_0x20420d[_0x3320a8(0x11f)]))continue;return{'path':_0x20420d[_0x3320a8(0x11f)],'location':_0x20420d['location']};}}}return null;}function _0x1946(_0x4d91fa,_0x6e95bd){_0x4d91fa=_0x4d91fa-0x106;const _0x429783=_0x4297();let _0x194602=_0x429783[_0x4d91fa];return _0x194602;}function hasLegacyProfileFiles(_0x3b30a9){const _0x3fe980=_0x1946,_0x4bb3ad={'RtLDR':function(_0x52d868,_0xf17d2f,_0x33f489){return _0x52d868(_0xf17d2f,_0x33f489);},'AgTgz':'settings.json','DeTyY':'auth.json','BsPXf':'auth.json.enc'};return existsSync(_0x4bb3ad['RtLDR'](join,_0x3b30a9,_0x4bb3ad['AgTgz']))||existsSync(join(_0x3b30a9,_0x4bb3ad[_0x3fe980(0x132)]))||existsSync(join(_0x3b30a9,_0x4bb3ad[_0x3fe980(0x13a)]));}export function isEnvCi(_0x42403c){const _0x340964=_0x1946,_0x3772d1={'DHFOP':function(_0x498f97,_0x55005a,_0x52e5fd,_0x3094ec){return _0x498f97(_0x55005a,_0x52e5fd,_0x3094ec);},'tEVSf':function(_0x5068b6,_0x1b0045){return _0x5068b6!==_0x1b0045;},'vCzXD':function(_0x321803,_0x644365){return _0x321803(_0x644365);}};if(existsSync(_0x3772d1['DHFOP'](join,getRangerDir(),'ci',_0x42403c)))return!![];const _0x32b340=getRangerHomeDir();if(_0x3772d1[_0x340964(0x13f)](_0x32b340,getRangerDir())&&_0x3772d1['vCzXD'](existsSync,join(_0x32b340,'ci',_0x42403c)))return!![];return![];}export async function cleanupTempFiles(_0x90992a){const _0x1e9dae=_0x1946,_0x4eccf4=[_0x90992a['tempAuthPath'],_0x90992a['configPath']][_0x1e9dae(0x10e)](Boolean);await Promise[_0x1e9dae(0x173)](_0x4eccf4['map'](_0x361e42=>unlink(_0x361e42)['catch'](_0x5019f5=>{const _0x106238=_0x1e9dae;_0x5019f5[_0x106238(0x142)]!=='ENOENT'&&console[_0x106238(0x170)](_0x106238(0x13d)+_0x361e42+':',_0x5019f5['message']);})));}export function getSettingsPath(_0x1edb88){return join(getEnvDir(_0x1edb88),'settings.json');}export async function loadSettings(_0x40cf53){const _0x1b2737=_0x1946,_0x5e6dbf={'peurZ':function(_0x17fa69,_0x2e9870){return _0x17fa69(_0x2e9870);},'buXGY':function(_0x240bb4,_0x11ba53,_0x2f02b1){return _0x240bb4(_0x11ba53,_0x2f02b1);},'cfwuI':_0x1b2737(0x146)},_0x61d93b=getSettingsPath(_0x40cf53);if(!_0x5e6dbf[_0x1b2737(0x16b)](existsSync,_0x61d93b))return{};try{const _0x2bb401=await _0x5e6dbf['buXGY'](readFile,_0x61d93b,_0x5e6dbf[_0x1b2737(0x114)]);return JSON['parse'](_0x2bb401);}catch{return{};}}function _0x4297(){const _0x549238=['ZFwdu','utf-8','stringify','AWmsr','xRWRL','contextOptions','4891696YPpNqU','tabs','TcTNq','NiFqM','cObMt','15651uywFnI','58878QdBJex','storageState','pXwgy','PbBGB','REOIA','--disable-setuid-sandbox','oGhxg','userAgent','570LnaxwO','extraHTTPHeaders','getuid','cdpEndpoint','atnpL','Environment\x20variable\x20','stagehand','axksy','xHRvL','btwPF','chromium','UxtEk','spaYQ','now','entries','--unsafely-treat-insecure-origin-as-secure=http://localhost','-cli','142nwNLrm','peurZ','oYUZt','1530NHMUpv','headers','ooNjI','warn','--no-sandbox','.json','all','string','install','LfidW','--disable-web-security','replace','BosNi','SIPHQ','PSkGI','safeMode','indexOf','filter','npGfe','repeat','catch','yYEcs','DbwJE','cfwuI','TmAcj','vision','sessions','lHkDH','map','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','message','legacy','length','ignoreHTTPSErrors','path','19790IEskhg','965560YtSXfL','pGnjK','QNPEL','Failed\x20to\x20decrypt\x20auth\x20state:\x20','object','aIgWN','includes','args','--allow-insecure-localhost','HOAcH','3316134YbFsmE','push','ranger-auth-','boolean','DfOvs','IXJbg','location','DeTyY','YdDFC','WoDAM','env','4872679CPLZud','AfYxZ','local','jiElb','BsPXf','mHSDf','isArray','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','headless','tEVSf','split','vcApQ','code','join','DnJdM'];_0x4297=function(){return _0x549238;};return _0x4297();}export async function saveSettings(_0x393edd,_0xe0ae49){const _0x4b29b6=_0x1946,_0x9a0808={'npGfe':function(_0x24faab,_0x2b4c76){return _0x24faab(_0x2b4c76);},'bmVKl':function(_0x39ab2c,_0x375329){return _0x39ab2c(_0x375329);}},_0x570b7e=_0x9a0808[_0x4b29b6(0x10f)](getSettingsPath,_0x393edd),_0x19bdb9=_0x9a0808['bmVKl'](dirname,_0x570b7e);!existsSync(_0x19bdb9)&&await mkdir(_0x19bdb9,{'recursive':!![]}),await writeFile(_0x570b7e,JSON['stringify'](_0xe0ae49,null,0x2));}export function resolveEnvVars(_0x13dc1a){const _0x5c1780=_0x1946,_0x5cc100={'DKvBt':function(_0x4553b1,_0x440b5a){return _0x4553b1===_0x440b5a;},'atnpL':function(_0x252106,_0x260e83){return _0x252106===_0x260e83;},'JXQTB':'object'};if(typeof _0x13dc1a===_0x5c1780(0x174))return _0x13dc1a[_0x5c1780(0x108)](/\$\{(\w+)\}/g,(_0xf94331,_0x3681a0)=>{const _0x3886ef=_0x5c1780,_0x7a9933=process[_0x3886ef(0x135)][_0x3681a0];if(_0x5cc100['DKvBt'](_0x7a9933,undefined))throw new Error(_0x3886ef(0x15e)+_0x3681a0+'\x20is\x20not\x20set');return _0x7a9933;});if(Array['isArray'](_0x13dc1a))return _0x13dc1a[_0x5c1780(0x119)](resolveEnvVars);if(_0x13dc1a&&_0x5cc100[_0x5c1780(0x15d)](typeof _0x13dc1a,_0x5cc100['JXQTB']))return Object['fromEntries'](Object[_0x5c1780(0x167)](_0x13dc1a)[_0x5c1780(0x119)](([_0x1647d7,_0x27c1dd])=>[_0x1647d7,resolveEnvVars(_0x27c1dd)]));return _0x13dc1a;}const isRecord=_0x28b9db=>typeof _0x28b9db==='object'&&_0x28b9db!==null&&!Array[_0x54c121(0x13c)](_0x28b9db),asRecord=_0x41032a=>isRecord(_0x41032a)?_0x41032a:undefined,mergeHeaders=(_0x2455e9,_0x3c1319)=>{const _0x3bdf45=_0x54c121,_0x1035aa={'SVNOI':function(_0x16fcf5,_0x45ce4d){return _0x16fcf5??_0x45ce4d;},'mHSDf':function(_0x51d263,_0x263ba9){return _0x51d263??_0x263ba9;}},_0xc273d0={..._0x1035aa['SVNOI'](_0x2455e9,{}),..._0x1035aa[_0x3bdf45(0x13b)](_0x3c1319,{})};return Object['keys'](_0xc273d0)[_0x3bdf45(0x11d)]?_0xc273d0:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=[_0x54c121(0x107),'--allow-running-insecure-content',_0x54c121(0x168),_0x54c121(0x129)];export function buildBrowserOptionsFromSettings(_0x12a5b6,_0x2b7554={}){const _0x2473a6=_0x54c121,_0x577ec1={'TcTNq':function(_0x4050f0,_0x3fa738){return _0x4050f0(_0x3fa738);},'xRWRL':function(_0x50d085,_0x100ec9){return _0x50d085(_0x100ec9);},'oGhxg':'string','oYUZt':function(_0x572ca9,_0x5eb545,_0x59ceb5){return _0x572ca9(_0x5eb545,_0x59ceb5);},'axksy':function(_0x14e8a3,_0x4a4f96){return _0x14e8a3(_0x4a4f96);}},_0x2e12c8=_0x577ec1[_0x2473a6(0x14d)](asRecord,_0x12a5b6['browser']),_0x11555b={...asRecord(_0x2e12c8?.['launchOptions'])??{}};typeof _0x2b7554['headless']===_0x2473a6(0x12e)&&(_0x11555b['headless']=_0x2b7554[_0x2473a6(0x13e)]);if(_0x12a5b6[_0x2473a6(0x10c)]){const _0x3e1b3d=_0x11555b[_0x2473a6(0x128)]??[],_0xaa8347=SAFE_MODE_ARGS['filter'](_0x4ccaeb=>!_0x3e1b3d['includes'](_0x4ccaeb));_0x11555b[_0x2473a6(0x128)]=[..._0x3e1b3d,..._0xaa8347];}if(_0x12a5b6['allowInsecureLocalhost']){const _0x5b4ae8=_0x11555b['args']??[],_0x6fcdf5=ALLOW_LOCALHOST_ARGS['filter'](_0x39b249=>!_0x5b4ae8[_0x2473a6(0x127)](_0x39b249));_0x11555b[_0x2473a6(0x128)]=[..._0x5b4ae8,..._0x6fcdf5];}const _0x4c0fe2={..._0x577ec1[_0x2473a6(0x149)](asRecord,_0x2e12c8?.['contextOptions'])??{}};_0x4c0fe2[_0x2473a6(0x11e)]=!![];typeof _0x12a5b6[_0x2473a6(0x158)]===_0x577ec1[_0x2473a6(0x157)]&&(_0x4c0fe2[_0x2473a6(0x158)]=_0x12a5b6['userAgent']);const _0x2e6822=_0x577ec1[_0x2473a6(0x16c)](mergeHeaders,_0x577ec1[_0x2473a6(0x160)](asRecord,_0x4c0fe2[_0x2473a6(0x15a)]),asRecord(_0x12a5b6[_0x2473a6(0x16e)]));return _0x2e6822?_0x4c0fe2[_0x2473a6(0x15a)]=_0x2e6822:delete _0x4c0fe2['extraHTTPHeaders'],_0x2b7554['storageStatePath']&&(_0x4c0fe2[_0x2473a6(0x152)]=_0x2b7554['storageStatePath']),{'launchOptions':_0x11555b,'contextOptions':_0x4c0fe2};}async function resolveLocalAuthPath(_0x51a109){const _0x53a2fa=_0x54c121,_0x21df50={'xHRvL':'auth.json','BhkmA':function(_0x331c24){return _0x331c24();},'pCWkA':_0x53a2fa(0x11a),'JjClm':function(_0x55849d,_0x4afe61,_0x271e9a){return _0x55849d(_0x4afe61,_0x271e9a);},'QiRyb':function(_0x16db9,_0x2ef6b6){return _0x16db9 instanceof _0x2ef6b6;},'btwPF':function(_0x568bc8,_0x22ddf7){return _0x568bc8(_0x22ddf7);}},_0x2aafe8=join(_0x51a109,'auth.json.enc'),_0x2536ed=join(_0x51a109,_0x21df50[_0x53a2fa(0x161)]);if(existsSync(_0x2aafe8))try{const _0xb70f9f=await _0x21df50['BhkmA'](getToken);if(!_0xb70f9f)throw new Error(_0x21df50['pCWkA']);const _0x53f233=await readFile(_0x2aafe8),_0x57d6fb=decrypt(_0x53f233,_0xb70f9f),_0x4b61eb=join(tmpdir(),_0x53a2fa(0x12d)+Date[_0x53a2fa(0x166)]()+'.json');return await _0x21df50['JjClm'](writeFile,_0x4b61eb,_0x57d6fb),{'storageStatePath':_0x4b61eb,'tempAuthPath':_0x4b61eb};}catch(_0x4e1406){const _0x5966a5=_0x21df50['QiRyb'](_0x4e1406,Error)?_0x4e1406[_0x53a2fa(0x11b)]:String(_0x4e1406);throw new Error(_0x53a2fa(0x124)+_0x5966a5);}if(_0x21df50[_0x53a2fa(0x162)](existsSync,_0x2536ed))return{'storageStatePath':_0x2536ed};return{};}export async function buildPlaywrightConfig(_0x5d0a3c,_0x233bfe,_0x2a8026,_0x41b7e8,_0xa7669e){const _0x419dde=_0x54c121,_0x25ea2e={'jiElb':'stagehand','vefDg':function(_0x10f136,_0x1e4cc3){return _0x10f136(_0x1e4cc3);}};if(_0xa7669e)return buildPlaywrightConfigCore(_0x5d0a3c,_0xa7669e,_0x233bfe,_0x2a8026,_0x41b7e8,_0x25ea2e['jiElb']);const {storageStatePath:_0x446308,tempAuthPath:_0x4210a5}=await resolveLocalAuthPath(_0x25ea2e['vefDg'](getEnvDir,_0x233bfe));try{const _0x203429=await buildPlaywrightConfigCore(_0x5d0a3c,_0x446308,_0x233bfe,_0x2a8026,_0x41b7e8,_0x25ea2e[_0x419dde(0x139)]);return{..._0x203429,'tempAuthPath':_0x4210a5};}catch(_0x4b72cd){_0x4210a5&&await unlink(_0x4210a5)['catch'](()=>{});throw _0x4b72cd;}}export async function buildPlaywrightConfigCore(_0x807e9c,_0x37608f,_0x41dbfd,_0x15b4a4,_0x302e48,_0x5dd429=_0x54c121(0x15f)){const _0x238642=_0x54c121,_0xe8a691={'mWcQV':function(_0x6202fc,_0x48d652,_0x4b3f16){return _0x6202fc(_0x48d652,_0x4b3f16);},'pXwgy':_0x238642(0x156),'YdDFC':_0x238642(0x163),'DbwJE':'clipboard-read','mjEYd':'clipboard-write','SIPHQ':'file','UjMNO':'none','XOEvv':'pdf','bvPaw':_0x238642(0x116),'LfidW':'allow','bauJo':function(_0xfdc883,_0x202d0d){return _0xfdc883===_0x202d0d;},'BosNi':'ranger-config','LNNTv':function(_0x1e1127,_0x43f17c){return _0x1e1127(_0x43f17c);},'lHkDH':function(_0x4f27ad,_0x308470,_0x2648d2){return _0x4f27ad(_0x308470,_0x2648d2);},'REOIA':function(_0x5c0a58,_0x3f9216){return _0x5c0a58===_0x3f9216;},'ugmnW':_0x238642(0x169),'QNPEL':function(_0x520196,_0x32ab5c,_0x1a1424){return _0x520196(_0x32ab5c,_0x1a1424);},'vzcEd':function(_0x2237d1,_0x3d9098,_0x16d6b7){return _0x2237d1(_0x3d9098,_0x16d6b7);}},_0x3db241=_0x15b4a4||randomUUID(),_0x5955de=join(getRangerDir(),_0x238642(0x117),_0x3db241),_0xd2c45a=Boolean(_0x807e9c[_0x238642(0x15c)]),_0x3cc9b5=_0xd2c45a?{'browserName':_0xe8a691['YdDFC'],'cdpEndpoint':_0x807e9c[_0x238642(0x15c)]}:((()=>{const _0x2c924d=_0x238642,{launchOptions:_0x402a78,contextOptions:_0x24c75f}=_0xe8a691['mWcQV'](buildBrowserOptionsFromSettings,_0x807e9c,{'headless':_0x302e48?![]:_0x807e9c[_0x2c924d(0x13e)]??!![],'storageStatePath':_0x37608f});if(process[_0x2c924d(0x15b)]?.()===0x0){const _0x5ead25=[_0x2c924d(0x171),_0xe8a691[_0x2c924d(0x153)]],_0x134bb1=_0x402a78[_0x2c924d(0x128)]??[],_0x2b889a=_0x5ead25['filter'](_0xd3e253=>!_0x134bb1[_0x2c924d(0x127)](_0xd3e253));_0x402a78['args']=[..._0x134bb1,..._0x2b889a];}return{'isolated':!![],'browserName':_0xe8a691[_0x2c924d(0x133)],'launchOptions':_0x402a78,'contextOptions':{..._0x24c75f,'permissions':[_0xe8a691[_0x2c924d(0x113)],_0xe8a691['mjEYd']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x435fd5=_0x5dd429==='playwright-cli'?{'browser':_0x3cc9b5,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5955de,'outputMode':_0xe8a691[_0x238642(0x10a)],'codegen':_0xe8a691['UjMNO']}:{'name':_0x41dbfd,'browser':_0x3cc9b5,'capabilities':['core',_0x238642(0x14c),_0x238642(0x175),_0xe8a691['XOEvv'],_0xe8a691['bvPaw']],'imageResponses':_0xe8a691[_0x238642(0x106)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5955de};if(!_0xd2c45a){const _0x3f4556=_0x435fd5['browser'],_0xfc976a=_0x3f4556[_0x238642(0x14a)];if(_0xe8a691['bauJo'](_0xfc976a['userAgent'],undefined))delete _0xfc976a[_0x238642(0x158)];if(_0xfc976a['storageState']===undefined)delete _0xfc976a['storageState'];}const _0x5832d4=join(tmpdir(),_0xe8a691[_0x238642(0x109)]);!_0xe8a691['LNNTv'](existsSync,_0x5832d4)&&await _0xe8a691[_0x238642(0x118)](mkdir,_0x5832d4,{'recursive':!![]});const _0x3285fd=_0xe8a691[_0x238642(0x155)](_0x5dd429,'playwright-cli')?_0xe8a691['ugmnW']:'',_0xdc6358=_0xe8a691[_0x238642(0x123)](join,_0x5832d4,_0x41dbfd+'-'+Date[_0x238642(0x166)]()+_0x3285fd+_0x238642(0x172));return await _0xe8a691['vzcEd'](writeFile,_0xdc6358,JSON[_0x238642(0x147)](_0x435fd5,null,0x2)),{'configPath':_0xdc6358};}export async function buildPlaywrightCliConfig(_0x115c71,_0x4d00ed,_0x16b1db,_0x30e299,_0x1304cd){const _0xe594d9=_0x54c121,_0x55835a={'NiFqM':function(_0x3c7aa2,_0xa2237b,_0xb5a2b5,_0x4a327d,_0x3c9537,_0x11e27f,_0x2fc918){return _0x3c7aa2(_0xa2237b,_0xb5a2b5,_0x4a327d,_0x3c9537,_0x11e27f,_0x2fc918);},'spaYQ':function(_0x3f21c4,_0x5dbbba){return _0x3f21c4(_0x5dbbba);}};if(_0x1304cd)return _0x55835a[_0xe594d9(0x14e)](buildPlaywrightConfigCore,_0x115c71,_0x1304cd,_0x4d00ed,_0x16b1db,_0x30e299,'playwright-cli');const {storageStatePath:_0x3863ff,tempAuthPath:_0x1f16df}=await _0x55835a[_0xe594d9(0x165)](resolveLocalAuthPath,getEnvDir(_0x4d00ed));try{const _0x4e92c7=await buildPlaywrightConfigCore(_0x115c71,_0x3863ff,_0x4d00ed,_0x16b1db,_0x30e299,'playwright-cli');return{..._0x4e92c7,'tempAuthPath':_0x1f16df};}catch(_0xe6a4ff){_0x1f16df&&await unlink(_0x1f16df)[_0xe594d9(0x111)](()=>{});throw _0xe6a4ff;}}export function getNestedValue(_0xd9325b,_0x4b8a39){const _0x1acecb=_0x54c121,_0x44cadb={'SkeGb':function(_0x3ee23b,_0x1a5461){return _0x3ee23b(_0x1a5461);},'IXJbg':_0x1acecb(0x125)},_0x23904a=_0x44cadb['SkeGb'](parseKeyPath,_0x4b8a39);let _0x57ca25=_0xd9325b;for(const _0x21a32d of _0x23904a){if(_0x57ca25===null||_0x57ca25===undefined||typeof _0x57ca25!==_0x44cadb[_0x1acecb(0x130)])return undefined;_0x57ca25=_0x57ca25[_0x21a32d];}return _0x57ca25;}export function setNestedValue(_0x29b9a5,_0xb2b30b,_0x42f5ae){const _0x32de18=_0x54c121,_0x6bc559={'nQBzW':function(_0x30142b,_0x472cb){return _0x30142b<_0x472cb;},'vcApQ':function(_0x58e3a3,_0x1695d1){return _0x58e3a3-_0x1695d1;},'ooNjI':function(_0x5de50d,_0xce52b8){return _0x5de50d in _0xce52b8;},'AfYxZ':function(_0x31f36b,_0x3a34c3){return _0x31f36b!==_0x3a34c3;},'PSkGI':_0x32de18(0x125)},_0x35c7c3=parseKeyPath(_0xb2b30b);let _0x1844d0=_0x29b9a5;for(let _0x312ad2=0x0;_0x6bc559['nQBzW'](_0x312ad2,_0x6bc559[_0x32de18(0x141)](_0x35c7c3[_0x32de18(0x11d)],0x1));_0x312ad2++){const _0x20156b=_0x35c7c3[_0x312ad2];(!_0x6bc559[_0x32de18(0x16f)](_0x20156b,_0x1844d0)||_0x6bc559[_0x32de18(0x137)](typeof _0x1844d0[_0x20156b],_0x6bc559[_0x32de18(0x10b)]))&&(_0x1844d0[_0x20156b]={}),_0x1844d0=_0x1844d0[_0x20156b];}_0x1844d0[_0x35c7c3[_0x35c7c3['length']-0x1]]=_0x42f5ae;}export function deleteNestedValue(_0x2fc6dd,_0x339e93){const _0x187f7b=_0x54c121,_0x2b8500={'WoDAM':function(_0x123d57,_0xaaf5f3){return _0x123d57-_0xaaf5f3;},'ZFwdu':function(_0x16b634,_0x4fac2b){return _0x16b634===_0x4fac2b;},'DnJdM':function(_0x19a229,_0x5bdcbf){return _0x19a229===_0x5bdcbf;},'kbPsn':function(_0x192232,_0x345dbe){return _0x192232 in _0x345dbe;}},_0x36ea8b=parseKeyPath(_0x339e93);let _0x2aede3=_0x2fc6dd;for(let _0x13a884=0x0;_0x13a884<_0x2b8500['WoDAM'](_0x36ea8b[_0x187f7b(0x11d)],0x1);_0x13a884++){if(_0x2b8500['ZFwdu'](_0x2aede3,null)||_0x2aede3===undefined||typeof _0x2aede3!=='object')return![];_0x2aede3=_0x2aede3[_0x36ea8b[_0x13a884]];}if(_0x2b8500[_0x187f7b(0x145)](_0x2aede3,null)||_0x2b8500[_0x187f7b(0x144)](_0x2aede3,undefined)||typeof _0x2aede3!=='object')return![];const _0x4dd2bc=_0x36ea8b[_0x2b8500[_0x187f7b(0x134)](_0x36ea8b['length'],0x1)];if(_0x2b8500['kbPsn'](_0x4dd2bc,_0x2aede3))return delete _0x2aede3[_0x4dd2bc],!![];return![];}function parseKeyPath(_0x55ecb4){const _0x54cdfe=_0x54c121,_0xc1323e={'nHVab':function(_0x1f10a6,_0x33d443){return _0x1f10a6===_0x33d443;},'iQVeV':function(_0x2dfbe2,_0x25b7e7){return _0x2dfbe2===_0x25b7e7;},'ptpmJ':'setupHeaders'},_0x19590c=_0x55ecb4[_0x54cdfe(0x140)]('.');return _0xc1323e['nHVab'](_0x19590c[0x0],'header')&&(_0x19590c[0x0]='headers'),_0xc1323e['iQVeV'](_0x19590c[0x0],'setupHeader')&&(_0x19590c[0x0]=_0xc1323e['ptpmJ']),_0x19590c;}export function formatSettings(_0x2ce45a,_0x25b82f=0x0){const _0x370124=_0x54c121,_0x2c193a={'DfOvs':function(_0x1ca778,_0x2c5fe6){return _0x1ca778!==_0x2c5fe6;}},_0x3fdcd1=[],_0xe31726='\x20\x20'[_0x370124(0x110)](_0x25b82f);for(const [_0x1f65a7,_0x3449f9]of Object[_0x370124(0x167)](_0x2ce45a)){if(_0x3449f9===undefined)continue;if(typeof _0x3449f9===_0x370124(0x125)&&_0x2c193a[_0x370124(0x12f)](_0x3449f9,null)){_0x3fdcd1['push'](''+_0xe31726+_0x1f65a7+':');for(const [_0x32958c,_0x1cff52]of Object[_0x370124(0x167)](_0x3449f9)){_0x3fdcd1['push'](_0xe31726+'\x20\x20'+_0x32958c+':\x20'+_0x1cff52);}}else _0x3fdcd1[_0x370124(0x12c)](''+_0xe31726+_0x1f65a7+':\x20'+_0x3449f9);}return _0x3fdcd1[_0x370124(0x143)]('\x0a');}
|
|
1
|
+
(function(_0x152023,_0x2e9d91){const _0xe94c7d=_0x36b9,_0x1ec564=_0x152023();while(!![]){try{const _0x5c1ded=parseInt(_0xe94c7d(0x1e2))/0x1*(parseInt(_0xe94c7d(0x1ef))/0x2)+parseInt(_0xe94c7d(0x1f7))/0x3+-parseInt(_0xe94c7d(0x1de))/0x4*(parseInt(_0xe94c7d(0x208))/0x5)+parseInt(_0xe94c7d(0x23e))/0x6+-parseInt(_0xe94c7d(0x216))/0x7*(-parseInt(_0xe94c7d(0x239))/0x8)+parseInt(_0xe94c7d(0x21e))/0x9+-parseInt(_0xe94c7d(0x1dd))/0xa;if(_0x5c1ded===_0x2e9d91)break;else _0x1ec564['push'](_0x1ec564['shift']());}catch(_0x153d09){_0x1ec564['push'](_0x1ec564['shift']());}}}(_0x4405,0xaa74c));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x345ee3,_0xa42ab8){const _0x5c7e53=_0x36b9,_0x3a808c={'vmwCN':function(_0x5202e7,_0x1039e2,_0x2ab592){return _0x5202e7(_0x1039e2,_0x2ab592);},'uBoPY':function(_0x1deb48,_0x14f693){return _0x1deb48!==_0x14f693;},'lxiwB':function(_0x6f52cc,_0x3aac65){return _0x6f52cc(_0x3aac65);}},_0x550de5=join(_0xa42ab8,'ci',_0x345ee3),_0x1697e2=join(_0xa42ab8,_0x5c7e53(0x200),_0x345ee3),_0x513b05=_0x3a808c['vmwCN'](join,_0xa42ab8,_0x345ee3),_0x160dfc=join(_0xa42ab8,_0x5c7e53(0x200)),_0x436f29=join(_0xa42ab8,'ci');if(existsSync(_0x550de5))return _0x550de5;if(existsSync(_0x1697e2))return _0x1697e2;if(existsSync(_0x513b05)&&(_0x3a808c[_0x5c7e53(0x1df)](_0x513b05,_0x160dfc)&&_0x513b05!==_0x436f29?!![]:_0x3a808c[_0x5c7e53(0x222)](hasLegacyProfileFiles,_0x513b05)))return _0x513b05;return null;}export function getEnvDir(_0x51f740,_0x1ade8f={}){const _0x25ce01=_0x36b9,_0x45624b={'foffH':function(_0x123c13){return _0x123c13();},'XocZZ':function(_0x15ebb9,_0x3a3e31){return _0x15ebb9(_0x3a3e31);},'fyQxH':function(_0x5d721e){return _0x5d721e();},'YKGwa':function(_0x2c6acc,_0x3a901f){return _0x2c6acc!==_0x3a901f;},'IakSC':function(_0x44f654,_0x89ab95,_0xd8a7a1){return _0x44f654(_0x89ab95,_0xd8a7a1);},'oPiFm':function(_0x4d6e2e,_0x13a438,_0x42c7f4,_0x3857da){return _0x4d6e2e(_0x13a438,_0x42c7f4,_0x3857da);},'AokMT':function(_0x34b44f,_0x45c801,_0x3c6c6a){return _0x34b44f(_0x45c801,_0x3c6c6a);}},_0x1e0aa3=_0x45624b['foffH'](getRangerDir),_0x1d690c=findEnvInRoot(_0x51f740,_0x1e0aa3);if(_0x1d690c){if(_0x1ade8f['forWrite']&&_0x45624b[_0x25ce01(0x234)](isLegacyEnvPath,_0x1d690c))throw legacyWriteError(_0x51f740,_0x1d690c);return _0x1d690c;}const _0x1315c2=_0x45624b['fyQxH'](getRangerHomeDir);if(_0x45624b['YKGwa'](_0x1315c2,_0x1e0aa3)){const _0x459277=_0x45624b[_0x25ce01(0x236)](findEnvInRoot,_0x51f740,_0x1315c2);if(_0x459277){if(_0x1ade8f[_0x25ce01(0x1fb)]&&isLegacyEnvPath(_0x459277))throw legacyWriteError(_0x51f740,_0x459277);return _0x459277;}}const _0x1e65a4=_0x45624b['oPiFm'](join,_0x1315c2,'local',_0x51f740);if(_0x1ade8f[_0x25ce01(0x1fb)])throw _0x45624b[_0x25ce01(0x1fc)](legacyWriteError,_0x51f740,_0x1e65a4);return _0x1e65a4;}function isLegacyEnvPath(_0x48f691){const _0x122176=_0x36b9,_0x1429f0={'pmATJ':function(_0x42ddfd,_0x15b51f){return _0x42ddfd+_0x15b51f;}},_0x36bdc4=getRangerDir(),_0x4c86a0=getRangerHomeDir();for(const _0x222dcf of new Set([_0x36bdc4,_0x4c86a0])){const _0x20be35=_0x222dcf['endsWith']('/')?_0x222dcf:_0x1429f0[_0x122176(0x235)](_0x222dcf,'/');if(_0x48f691===_0x222dcf||_0x48f691['startsWith'](_0x20be35))return!![];}return![];}function legacyWriteError(_0x17b923,_0x5b3012){const _0x4ec022=_0x36b9,_0x1037be={'uRGQr':function(_0x1ae2fb,_0x8be7eb){return _0x1ae2fb+_0x8be7eb;},'gMFPO':function(_0x207f83,_0x146e85){return _0x207f83+_0x146e85;}};return new Error(_0x1037be[_0x4ec022(0x227)](_0x1037be['gMFPO'](_0x4ec022(0x1f5)+_0x17b923+'\x22\x20to\x20legacy\x20path\x20'+_0x5b3012+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+'See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.');}export function findExistingEnv(_0x23a2cc,_0x583043){const _0x3b6546=_0x36b9,_0x3dc448={'xBFab':function(_0xa80904){return _0xa80904();},'dvFPw':_0x3b6546(0x200),'Xtqvk':_0x3b6546(0x1fa),'ktxxo':function(_0x576d17,_0x3f48a9,_0x297ce0){return _0x576d17(_0x3f48a9,_0x297ce0);},'GdZFi':function(_0x24af12,_0x148c4a){return _0x24af12(_0x148c4a);},'IBjia':function(_0x453d3b,_0x4d249d){return _0x453d3b===_0x4d249d;},'WrPJq':function(_0x2d8764,_0x341a4b){return _0x2d8764===_0x341a4b;},'opxIg':function(_0x15e480,_0x7ff871){return _0x15e480===_0x7ff871;}},_0x4bde6a=_0x583043?.[_0x3b6546(0x1e7)],_0x5ef95c=_0x4bde6a?[_0x4bde6a]:[_0x3dc448['xBFab'](getRangerDir),getRangerHomeDir()][_0x3b6546(0x202)]((_0x51c41f,_0x2ad4c5,_0x2f0b33)=>_0x2f0b33['indexOf'](_0x51c41f)===_0x2ad4c5),_0x296b32=_0x583043?.[_0x3b6546(0x1d5)]??['ci',_0x3dc448[_0x3b6546(0x225)],_0x3dc448['Xtqvk']];for(const _0x4c3983 of _0x5ef95c){const _0x5b559d=_0x3dc448[_0x3b6546(0x1ff)](join,_0x4c3983,'local'),_0x51207a=join(_0x4c3983,'ci'),_0x264751=[{'location':'ci','path':join(_0x4c3983,'ci',_0x23a2cc)},{'location':_0x3dc448[_0x3b6546(0x225)],'path':join(_0x4c3983,'local',_0x23a2cc)},{'location':_0x3dc448['Xtqvk'],'path':join(_0x4c3983,_0x23a2cc)}];for(const _0x21ca38 of _0x264751){if(_0x296b32[_0x3b6546(0x201)](_0x21ca38['location'])&&_0x3dc448[_0x3b6546(0x22b)](existsSync,_0x21ca38['path'])){if(_0x3dc448['IBjia'](_0x21ca38['location'],_0x3b6546(0x1fa))&&(_0x3dc448[_0x3b6546(0x240)](_0x21ca38['path'],_0x5b559d)||_0x3dc448[_0x3b6546(0x1f8)](_0x21ca38[_0x3b6546(0x1da)],_0x51207a))&&!hasLegacyProfileFiles(_0x21ca38['path']))continue;return{'path':_0x21ca38[_0x3b6546(0x1da)],'location':_0x21ca38['location']};}}}return null;}function hasLegacyProfileFiles(_0x1cd172){const _0x3212a3=_0x36b9,_0x58ed6c={'YTRqt':function(_0x473c27,_0x4f6670,_0x5abf74){return _0x473c27(_0x4f6670,_0x5abf74);},'jjWcQ':function(_0x2b08bb,_0xc164ad){return _0x2b08bb(_0xc164ad);},'mWtYD':function(_0x523869,_0x561e78){return _0x523869(_0x561e78);},'rXSZz':'auth.json.enc'};return existsSync(_0x58ed6c['YTRqt'](join,_0x1cd172,_0x3212a3(0x23b)))||_0x58ed6c['jjWcQ'](existsSync,join(_0x1cd172,_0x3212a3(0x1dc)))||_0x58ed6c['mWtYD'](existsSync,_0x58ed6c[_0x3212a3(0x20a)](join,_0x1cd172,_0x58ed6c[_0x3212a3(0x23a)]));}function _0x36b9(_0x3ee253,_0x4c1e22){_0x3ee253=_0x3ee253-0x1d5;const _0x440562=_0x4405();let _0x36b9f0=_0x440562[_0x3ee253];return _0x36b9f0;}export function isEnvCi(_0xee9fc1){const _0x224f4b=_0x36b9,_0x4a3ea6={'XpPOV':function(_0x2ba48e,_0x5e9d43){return _0x2ba48e(_0x5e9d43);},'xPIVP':function(_0x13f22e){return _0x13f22e();},'lzquH':function(_0x53c697,_0x4568a8,_0x250516,_0x151f49){return _0x53c697(_0x4568a8,_0x250516,_0x151f49);}};if(_0x4a3ea6[_0x224f4b(0x217)](existsSync,join(getRangerDir(),'ci',_0xee9fc1)))return!![];const _0x3677a0=_0x4a3ea6['xPIVP'](getRangerHomeDir);if(_0x3677a0!==getRangerDir()&&_0x4a3ea6[_0x224f4b(0x217)](existsSync,_0x4a3ea6['lzquH'](join,_0x3677a0,'ci',_0xee9fc1)))return!![];return![];}export async function cleanupTempFiles(_0x1e5aa7){const _0x2b87ee=_0x36b9,_0xa8cfb4={'bAXkq':_0x2b87ee(0x224)},_0x2982b8=[_0x1e5aa7[_0x2b87ee(0x221)],_0x1e5aa7[_0x2b87ee(0x22f)]]['filter'](Boolean);await Promise['all'](_0x2982b8['map'](_0x4906c0=>unlink(_0x4906c0)[_0x2b87ee(0x20b)](_0x2c1b88=>{const _0x43e0e9=_0x2b87ee;_0x2c1b88[_0x43e0e9(0x21c)]!==_0xa8cfb4['bAXkq']&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x4906c0+':',_0x2c1b88[_0x43e0e9(0x242)]);})));}export function getSettingsPath(_0x4a22b3){const _0x3409f0=_0x36b9,_0xfd3184={'wbzII':function(_0x5d25e2,_0x12fccd,_0x443bb4){return _0x5d25e2(_0x12fccd,_0x443bb4);},'oFPXv':'settings.json'};return _0xfd3184['wbzII'](join,getEnvDir(_0x4a22b3),_0xfd3184[_0x3409f0(0x203)]);}function _0x4405(){const _0x41d39f=['XocZZ','pmATJ','IakSC','zYJiy','auth.json.enc','5792fJJqED','rXSZz','settings.json','aeYIP','userAgent','5590320AtmdNQ','FHSFs','WrPJq','QNeON','message','length','locations','kQbbG','browser','repeat','pdf','path','XigNi','auth.json','26945650YjEevt','3418028OJFzmh','uBoPY','\x20is\x20not\x20set','entries','45303zpksgp','ERsZZ','contextOptions','RGPaE','vision','rangerDir','Environment\x20variable\x20','clipboard-read','xXcvO','--disable-setuid-sandbox','RigRh','cdpEndpoint','string','4nHgDoB','args','object','sessions','headless','sHkMP','Refusing\x20to\x20write\x20profile\x20\x22','now','2916321vYuDdS','opxIg','push','legacy','forWrite','AokMT','vZdkv','ranger-config','ktxxo','local','includes','filter','oFPXv','.json','eukZm','split','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','5vucPoM','stringify','YTRqt','catch','URGAv','lcWaH','MWvEG','XorEU','ChkCL','Ihejt','safeMode','PgVfG','ignoreHTTPSErrors','none','8813qglsKa','XpPOV','boolean','sIKuW','IDVng','storageStatePath','code','ZQrLY','12071799kNRYZk','core','playwright-cli','tempAuthPath','lxiwB','ngxdI','ENOENT','dvFPw','BXpog','uRGQr','QJIHr','join','chromium','GdZFi','SwRQX','header','--no-sandbox','configPath','extraHTTPHeaders','getuid','replace','pXFlM'];_0x4405=function(){return _0x41d39f;};return _0x4405();}export async function loadSettings(_0x317749){const _0x153a8f=_0x36b9,_0x3cad79={'yQafK':function(_0x47e0a0,_0x5662ee){return _0x47e0a0(_0x5662ee);},'RGPaE':function(_0x4a1abe,_0x27f9fe,_0x2126a5){return _0x4a1abe(_0x27f9fe,_0x2126a5);},'RigRh':'utf-8'},_0x499d00=_0x3cad79['yQafK'](getSettingsPath,_0x317749);if(!existsSync(_0x499d00))return{};try{const _0x5e92c9=await _0x3cad79[_0x153a8f(0x1e5)](readFile,_0x499d00,_0x3cad79[_0x153a8f(0x1ec)]);return JSON['parse'](_0x5e92c9);}catch{return{};}}export async function saveSettings(_0x52133c,_0x5cd4e1){const _0x503dfb=_0x36b9,_0x3dcf69={'PZPOH':function(_0x2ce6da,_0x40eff9){return _0x2ce6da(_0x40eff9);},'RCCao':function(_0x14c7e4,_0x3f4889,_0x43bd2b){return _0x14c7e4(_0x3f4889,_0x43bd2b);},'UQCSb':function(_0x218228,_0x491292,_0x1629d3){return _0x218228(_0x491292,_0x1629d3);}},_0x402f38=_0x3dcf69['PZPOH'](getSettingsPath,_0x52133c),_0x5e4aa0=dirname(_0x402f38);!existsSync(_0x5e4aa0)&&await _0x3dcf69['RCCao'](mkdir,_0x5e4aa0,{'recursive':!![]}),await _0x3dcf69['UQCSb'](writeFile,_0x402f38,JSON[_0x503dfb(0x209)](_0x5cd4e1,null,0x2));}export function resolveEnvVars(_0x26a3ba){const _0x3d1ca3=_0x36b9,_0x4dd225={'SwRQX':function(_0x241f3f,_0x4aaa76){return _0x241f3f===_0x4aaa76;},'XeiEu':_0x3d1ca3(0x1ee),'sHkMP':function(_0x26ef13,_0x18240b){return _0x26ef13===_0x18240b;},'DhjKK':'object'};if(typeof _0x26a3ba===_0x4dd225['XeiEu'])return _0x26a3ba[_0x3d1ca3(0x232)](/\$\{(\w+)\}/g,(_0x261042,_0x210bae)=>{const _0xb913b1=_0x3d1ca3,_0x51dfe5=process['env'][_0x210bae];if(_0x4dd225[_0xb913b1(0x22c)](_0x51dfe5,undefined))throw new Error(_0xb913b1(0x1e8)+_0x210bae+_0xb913b1(0x1e0));return _0x51dfe5;});if(Array['isArray'](_0x26a3ba))return _0x26a3ba['map'](resolveEnvVars);if(_0x26a3ba&&_0x4dd225[_0x3d1ca3(0x1f4)](typeof _0x26a3ba,_0x4dd225['DhjKK']))return Object['fromEntries'](Object[_0x3d1ca3(0x1e1)](_0x26a3ba)['map'](([_0x768e4d,_0x47ed3d])=>[_0x768e4d,resolveEnvVars(_0x47ed3d)]));return _0x26a3ba;}const isRecord=_0x125127=>typeof _0x125127==='object'&&_0x125127!==null&&!Array['isArray'](_0x125127),asRecord=_0x5cdabe=>isRecord(_0x5cdabe)?_0x5cdabe:undefined,mergeHeaders=(_0xad4929,_0x5a9caa)=>{const _0x6e303c=_0x36b9,_0x2770aa={'QNeON':function(_0x3a463e,_0x315be9){return _0x3a463e??_0x315be9;}},_0x40bf7f={..._0xad4929??{},..._0x2770aa[_0x6e303c(0x241)](_0x5a9caa,{})};return Object['keys'](_0x40bf7f)[_0x6e303c(0x243)]?_0x40bf7f:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost','--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x4c841e,_0xae0190={}){const _0x523361=_0x36b9,_0x13e870={'Ihejt':function(_0x14bd3b,_0x4d77c3){return _0x14bd3b(_0x4d77c3);},'FHSFs':function(_0x5dbf42,_0x3bf26a){return _0x5dbf42===_0x3bf26a;},'DKbSP':_0x523361(0x218),'TRqAv':function(_0x539539,_0x43083c){return _0x539539===_0x43083c;},'PajyM':function(_0x39423a,_0x1bc42b){return _0x39423a(_0x1bc42b);}},_0x5d51cf=asRecord(_0x4c841e[_0x523361(0x1d7)]),_0x177948={..._0x13e870['Ihejt'](asRecord,_0x5d51cf?.['launchOptions'])??{}};_0x13e870[_0x523361(0x23f)](typeof _0xae0190['headless'],_0x13e870['DKbSP'])&&(_0x177948['headless']=_0xae0190['headless']);if(_0x4c841e[_0x523361(0x212)]){const _0xab1e3=_0x177948[_0x523361(0x1f0)]??[],_0x3051a6=SAFE_MODE_ARGS['filter'](_0x45b78c=>!_0xab1e3[_0x523361(0x201)](_0x45b78c));_0x177948['args']=[..._0xab1e3,..._0x3051a6];}if(_0x4c841e['allowInsecureLocalhost']){const _0x26ce40=_0x177948[_0x523361(0x1f0)]??[],_0x13fcb4=ALLOW_LOCALHOST_ARGS['filter'](_0x27b879=>!_0x26ce40[_0x523361(0x201)](_0x27b879));_0x177948[_0x523361(0x1f0)]=[..._0x26ce40,..._0x13fcb4];}const _0x4d8c6a={..._0x13e870[_0x523361(0x211)](asRecord,_0x5d51cf?.[_0x523361(0x1e4)])??{}};_0x4d8c6a[_0x523361(0x214)]=!![];_0x13e870['TRqAv'](typeof _0x4c841e[_0x523361(0x23d)],_0x523361(0x1ee))&&(_0x4d8c6a['userAgent']=_0x4c841e[_0x523361(0x23d)]);const _0x2cf773=mergeHeaders(_0x13e870['PajyM'](asRecord,_0x4d8c6a[_0x523361(0x230)]),asRecord(_0x4c841e['headers']));return _0x2cf773?_0x4d8c6a[_0x523361(0x230)]=_0x2cf773:delete _0x4d8c6a['extraHTTPHeaders'],_0xae0190[_0x523361(0x21b)]&&(_0x4d8c6a['storageState']=_0xae0190['storageStatePath']),{'launchOptions':_0x177948,'contextOptions':_0x4d8c6a};}async function resolveLocalAuthPath(_0xa0008f){const _0x17c4c3=_0x36b9,_0x331861={'XigNi':_0x17c4c3(0x238),'zYJiy':function(_0x5ece7d,_0x19a870,_0x18d711){return _0x5ece7d(_0x19a870,_0x18d711);},'AMnFO':function(_0x5612f5){return _0x5612f5();},'WnQjQ':_0x17c4c3(0x207),'PgVfG':function(_0x3acfdc,_0x293949){return _0x3acfdc(_0x293949);},'BEQsn':function(_0x3ead67,_0x47c997,_0x539b15){return _0x3ead67(_0x47c997,_0x539b15);}},_0x42006e=join(_0xa0008f,_0x331861[_0x17c4c3(0x1db)]),_0x3b0a4a=_0x331861[_0x17c4c3(0x237)](join,_0xa0008f,_0x17c4c3(0x1dc));if(existsSync(_0x42006e))try{const _0x3e26f6=await _0x331861['AMnFO'](getToken);if(!_0x3e26f6)throw new Error(_0x331861['WnQjQ']);const _0x14fdca=await _0x331861[_0x17c4c3(0x213)](readFile,_0x42006e),_0x39badf=_0x331861[_0x17c4c3(0x237)](decrypt,_0x14fdca,_0x3e26f6),_0x1014b3=_0x331861['BEQsn'](join,tmpdir(),'ranger-auth-'+Date[_0x17c4c3(0x1f6)]()+_0x17c4c3(0x204));return await _0x331861['zYJiy'](writeFile,_0x1014b3,_0x39badf),{'storageStatePath':_0x1014b3,'tempAuthPath':_0x1014b3};}catch(_0x4ec3bb){const _0x579396=_0x4ec3bb instanceof Error?_0x4ec3bb[_0x17c4c3(0x242)]:String(_0x4ec3bb);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x579396);}if(existsSync(_0x3b0a4a))return{'storageStatePath':_0x3b0a4a};return{};}export async function buildPlaywrightConfig(_0x22f433,_0x3a4186,_0x11f645,_0x6a471d,_0xc74ba0){const _0x3dfcd1=_0x36b9,_0x19943f={'ChkCL':function(_0xf795ba,_0x5e07d7,_0x29c031,_0x4e5954,_0x8e9cd3,_0x19371b,_0x551046){return _0xf795ba(_0x5e07d7,_0x29c031,_0x4e5954,_0x8e9cd3,_0x19371b,_0x551046);},'roVBA':'stagehand','lcWaH':function(_0x22b1a4,_0x1f3e08){return _0x22b1a4(_0x1f3e08);},'eukZm':function(_0x963c86,_0x1001e9){return _0x963c86(_0x1001e9);}};if(_0xc74ba0)return _0x19943f[_0x3dfcd1(0x210)](buildPlaywrightConfigCore,_0x22f433,_0xc74ba0,_0x3a4186,_0x11f645,_0x6a471d,_0x19943f['roVBA']);const {storageStatePath:_0x3338a2,tempAuthPath:_0x442819}=await _0x19943f[_0x3dfcd1(0x20d)](resolveLocalAuthPath,_0x19943f[_0x3dfcd1(0x20d)](getEnvDir,_0x3a4186));try{const _0x1c25a8=await buildPlaywrightConfigCore(_0x22f433,_0x3338a2,_0x3a4186,_0x11f645,_0x6a471d,'stagehand');return{..._0x1c25a8,'tempAuthPath':_0x442819};}catch(_0x4e938f){_0x442819&&await _0x19943f[_0x3dfcd1(0x205)](unlink,_0x442819)[_0x3dfcd1(0x20b)](()=>{});throw _0x4e938f;}}export async function buildPlaywrightConfigCore(_0x44a9c0,_0x529d45,_0x5638ce,_0x1ec979,_0x172f2f,_0xda1d55='stagehand'){const _0x5b1b50=_0x36b9,_0x3e2288={'hKsNU':_0x5b1b50(0x1eb),'JroTl':_0x5b1b50(0x1e9),'jmRdK':function(_0x3e8443){return _0x3e8443();},'SjBLZ':function(_0x4d8344,_0x4bba0f,_0x3ad5e8,_0x281027){return _0x4d8344(_0x4bba0f,_0x3ad5e8,_0x281027);},'xXcvO':function(_0x375b43){return _0x375b43();},'IlnVr':function(_0x52f412,_0x2179a6){return _0x52f412(_0x2179a6);},'ERsZZ':function(_0x24147d,_0x16cd55){return _0x24147d===_0x16cd55;},'kQbbG':'playwright-cli','GCznQ':_0x5b1b50(0x215),'Usxpd':'install','MPyyY':_0x5b1b50(0x1d9),'nGtTa':_0x5b1b50(0x1e6),'XrMnr':'allow','sIKuW':function(_0x48863f,_0x55abc9){return _0x48863f===_0x55abc9;},'fykiX':function(_0x15b77e,_0x47a7fc,_0x28ed33){return _0x15b77e(_0x47a7fc,_0x28ed33);},'WaYyt':function(_0x129359,_0x40cf4b,_0x42954b){return _0x129359(_0x40cf4b,_0x42954b);}},_0x5c3c76=_0x1ec979||_0x3e2288['jmRdK'](randomUUID),_0x13074c=_0x3e2288['SjBLZ'](join,_0x3e2288[_0x5b1b50(0x1ea)](getRangerDir),_0x5b1b50(0x1f2),_0x5c3c76),_0xa541fc=_0x3e2288['IlnVr'](Boolean,_0x44a9c0[_0x5b1b50(0x1ed)]),_0x2aa6de=_0xa541fc?{'browserName':_0x5b1b50(0x22a),'cdpEndpoint':_0x44a9c0['cdpEndpoint']}:((()=>{const _0x15e459=_0x5b1b50,{launchOptions:_0x1e7751,contextOptions:_0x10249e}=buildBrowserOptionsFromSettings(_0x44a9c0,{'headless':_0x172f2f?![]:_0x44a9c0[_0x15e459(0x1f3)]??!![],'storageStatePath':_0x529d45});if(process[_0x15e459(0x231)]?.()===0x0){const _0x1a0816=[_0x15e459(0x22e),_0x3e2288['hKsNU']],_0x548453=_0x1e7751[_0x15e459(0x1f0)]??[],_0x25361a=_0x1a0816[_0x15e459(0x202)](_0x1ba3de=>!_0x548453['includes'](_0x1ba3de));_0x1e7751[_0x15e459(0x1f0)]=[..._0x548453,..._0x25361a];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x1e7751,'contextOptions':{..._0x10249e,'permissions':[_0x3e2288['JroTl'],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x22d2c3=_0x3e2288[_0x5b1b50(0x1e3)](_0xda1d55,_0x3e2288['kQbbG'])?{'browser':_0x2aa6de,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x13074c,'outputMode':'file','codegen':_0x3e2288['GCznQ']}:{'name':_0x5638ce,'browser':_0x2aa6de,'capabilities':[_0x5b1b50(0x21f),'tabs',_0x3e2288['Usxpd'],_0x3e2288['MPyyY'],_0x3e2288['nGtTa']],'imageResponses':_0x3e2288['XrMnr'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x13074c};if(!_0xa541fc){const _0x45ac7f=_0x22d2c3[_0x5b1b50(0x1d7)],_0x247bf1=_0x45ac7f['contextOptions'];if(_0x247bf1[_0x5b1b50(0x23d)]===undefined)delete _0x247bf1[_0x5b1b50(0x23d)];if(_0x3e2288[_0x5b1b50(0x219)](_0x247bf1['storageState'],undefined))delete _0x247bf1['storageState'];}const _0x412a45=join(tmpdir(),_0x5b1b50(0x1fe));!existsSync(_0x412a45)&&await _0x3e2288['fykiX'](mkdir,_0x412a45,{'recursive':!![]});const _0x2c9d12=_0xda1d55===_0x3e2288[_0x5b1b50(0x1d6)]?'-cli':'',_0x2e3e7c=join(_0x412a45,_0x5638ce+'-'+Date[_0x5b1b50(0x1f6)]()+_0x2c9d12+'.json');return await _0x3e2288['WaYyt'](writeFile,_0x2e3e7c,JSON[_0x5b1b50(0x209)](_0x22d2c3,null,0x2)),{'configPath':_0x2e3e7c};}export async function buildPlaywrightCliConfig(_0x41b1d9,_0xeb056,_0x4847cd,_0x49e1ea,_0x45cf1d){const _0x35cd22=_0x36b9,_0xcf47a3={'FAGoc':'playwright-cli','BXpog':function(_0x142fa6,_0x4bb683){return _0x142fa6(_0x4bb683);}};if(_0x45cf1d)return buildPlaywrightConfigCore(_0x41b1d9,_0x45cf1d,_0xeb056,_0x4847cd,_0x49e1ea,_0xcf47a3['FAGoc']);const {storageStatePath:_0x25fdfe,tempAuthPath:_0x5136aa}=await resolveLocalAuthPath(_0xcf47a3[_0x35cd22(0x226)](getEnvDir,_0xeb056));try{const _0x47b7f8=await buildPlaywrightConfigCore(_0x41b1d9,_0x25fdfe,_0xeb056,_0x4847cd,_0x49e1ea,_0x35cd22(0x220));return{..._0x47b7f8,'tempAuthPath':_0x5136aa};}catch(_0x44b556){_0x5136aa&&await unlink(_0x5136aa)['catch'](()=>{});throw _0x44b556;}}export function getNestedValue(_0x145dae,_0x2fe346){const _0x4e745c=parseKeyPath(_0x2fe346);let _0x1760d3=_0x145dae;for(const _0x449dd3 of _0x4e745c){if(_0x1760d3===null||_0x1760d3===undefined||typeof _0x1760d3!=='object')return undefined;_0x1760d3=_0x1760d3[_0x449dd3];}return _0x1760d3;}export function setNestedValue(_0xd03491,_0x9afb2f,_0x2a5b31){const _0x2c425f=_0x36b9,_0xa64b9={'aeYIP':function(_0x3811af,_0x3b983d){return _0x3811af<_0x3b983d;},'XorEU':function(_0x3d883f,_0x48b64d){return _0x3d883f-_0x48b64d;},'vTCMS':function(_0x38b241,_0x1922c4){return _0x38b241 in _0x1922c4;},'QJIHr':function(_0x5428e1,_0x552d16){return _0x5428e1!==_0x552d16;},'ZQrLY':function(_0x2b17db,_0x56b95f){return _0x2b17db-_0x56b95f;}},_0x215dcf=parseKeyPath(_0x9afb2f);let _0xdfdd49=_0xd03491;for(let _0x4bd91e=0x0;_0xa64b9[_0x2c425f(0x23c)](_0x4bd91e,_0xa64b9[_0x2c425f(0x20f)](_0x215dcf[_0x2c425f(0x243)],0x1));_0x4bd91e++){const _0x3835ea=_0x215dcf[_0x4bd91e];(!_0xa64b9['vTCMS'](_0x3835ea,_0xdfdd49)||_0xa64b9[_0x2c425f(0x228)](typeof _0xdfdd49[_0x3835ea],_0x2c425f(0x1f1)))&&(_0xdfdd49[_0x3835ea]={}),_0xdfdd49=_0xdfdd49[_0x3835ea];}_0xdfdd49[_0x215dcf[_0xa64b9[_0x2c425f(0x21d)](_0x215dcf[_0x2c425f(0x243)],0x1)]]=_0x2a5b31;}export function deleteNestedValue(_0xd5dc36,_0x337460){const _0x180370=_0x36b9,_0x4f830a={'URGAv':function(_0x42ae2a,_0x22260d){return _0x42ae2a<_0x22260d;},'StdiR':function(_0x1518df,_0x59fe9f){return _0x1518df===_0x59fe9f;},'pXFlM':function(_0x2ee39c,_0x5c4944){return _0x2ee39c!==_0x5c4944;},'MWvEG':function(_0x5eaab0,_0xd580c5){return _0x5eaab0-_0xd580c5;},'ugHbA':function(_0x589c3d,_0x3eb46f){return _0x589c3d in _0x3eb46f;}},_0x484681=parseKeyPath(_0x337460);let _0x7291dd=_0xd5dc36;for(let _0x5f4655=0x0;_0x4f830a[_0x180370(0x20c)](_0x5f4655,_0x484681['length']-0x1);_0x5f4655++){if(_0x7291dd===null||_0x7291dd===undefined||typeof _0x7291dd!==_0x180370(0x1f1))return![];_0x7291dd=_0x7291dd[_0x484681[_0x5f4655]];}if(_0x4f830a['StdiR'](_0x7291dd,null)||_0x7291dd===undefined||_0x4f830a[_0x180370(0x233)](typeof _0x7291dd,'object'))return![];const _0xae035d=_0x484681[_0x4f830a[_0x180370(0x20e)](_0x484681['length'],0x1)];if(_0x4f830a['ugHbA'](_0xae035d,_0x7291dd))return delete _0x7291dd[_0xae035d],!![];return![];}function parseKeyPath(_0x51c0a3){const _0x5e8dc2=_0x36b9,_0x272692={'IDVng':_0x5e8dc2(0x22d),'ngxdI':'headers','gDLaG':function(_0x38161c,_0x52c248){return _0x38161c===_0x52c248;},'OUkdN':'setupHeaders'},_0x8a273d=_0x51c0a3[_0x5e8dc2(0x206)]('.');return _0x8a273d[0x0]===_0x272692[_0x5e8dc2(0x21a)]&&(_0x8a273d[0x0]=_0x272692[_0x5e8dc2(0x223)]),_0x272692['gDLaG'](_0x8a273d[0x0],'setupHeader')&&(_0x8a273d[0x0]=_0x272692['OUkdN']),_0x8a273d;}export function formatSettings(_0x36a993,_0x484f7e=0x0){const _0x27a254=_0x36b9,_0x534487={'vZdkv':'object'},_0x42f924=[],_0xd6b4d2='\x20\x20'[_0x27a254(0x1d8)](_0x484f7e);for(const [_0xa9d1,_0x27f70f]of Object[_0x27a254(0x1e1)](_0x36a993)){if(_0x27f70f===undefined)continue;if(typeof _0x27f70f===_0x534487[_0x27a254(0x1fd)]&&_0x27f70f!==null){_0x42f924[_0x27a254(0x1f9)](''+_0xd6b4d2+_0xa9d1+':');for(const [_0x19936d,_0x2656b4]of Object['entries'](_0x27f70f)){_0x42f924[_0x27a254(0x1f9)](_0xd6b4d2+'\x20\x20'+_0x19936d+':\x20'+_0x2656b4);}}else _0x42f924[_0x27a254(0x1f9)](''+_0xd6b4d2+_0xa9d1+':\x20'+_0x27f70f);}return _0x42f924[_0x27a254(0x229)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xb6f087,_0x114b0f){const _0xa57302=_0x4aab,_0x3b4a22=_0xb6f087();while(!![]){try{const _0x2289df=-parseInt(_0xa57302(0x1ef))/0x1*(parseInt(_0xa57302(0x1f1))/0x2)+-parseInt(_0xa57302(0x1ed))/0x3*(parseInt(_0xa57302(0x1e9))/0x4)+-parseInt(_0xa57302(0x1f0))/0x5+-parseInt(_0xa57302(0x1f3))/0x6+-parseInt(_0xa57302(0x1e7))/0x7+parseInt(_0xa57302(0x1ea))/0x8*(-parseInt(_0xa57302(0x1ec))/0x9)+-parseInt(_0xa57302(0x1eb))/0xa*(-parseInt(_0xa57302(0x1ee))/0xb);if(_0x2289df===_0x114b0f)break;else _0x3b4a22['push'](_0x3b4a22['shift']());}catch(_0x328b4a){_0x3b4a22['push'](_0x3b4a22['shift']());}}}(_0x4eed,0xedd54));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';function _0x4aab(_0xa05963,_0x40a3d6){_0xa05963=_0xa05963-0x1e7;const _0x4eed7d=_0x4eed();let _0x4aabca=_0x4eed7d[_0xa05963];return _0x4aabca;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0xd2da21){const _0x5374a0=_0x4aab,_0x1edcb5={'wpEyY':function(_0x231a96,_0x5a8a71,_0x315e6f,_0x48364d,_0x5b18f8){return _0x231a96(_0x5a8a71,_0x315e6f,_0x48364d,_0x5b18f8);},'HYHIw':'skills','dxyKy':function(_0x46654e,_0x359f49,_0x18bb52){return _0x46654e(_0x359f49,_0x18bb52);}},_0x5c094f=_0x1edcb5['wpEyY'](join,__dirname,'..','..',_0x1edcb5[_0x5374a0(0x1f2)]),_0x3948db=_0x1edcb5['dxyKy'](join,_0x5c094f,_0xd2da21);try{return _0x1edcb5[_0x5374a0(0x1e8)](readFileSync,_0x3948db,'utf-8');}catch{return'';}}function _0x4eed(){const _0x349cc7=['20333060ojGnGs','500553whBzay','9177380kywfrS','2dRRpDo','HYHIw','7939944ydaqnq','2515016JoQmnO','dxyKy','20TKusAV','2299560sSrtKQ','40dFJVRT','36ucJjRk','750753NIEpWM'];_0x4eed=function(){return _0x349cc7;};return _0x4eed();}export function getRangerSkillContent(){const _0x5c1b4={'ArZjw':function(_0x181439,_0x4d4681){return _0x181439(_0x4d4681);},'dfjSk':'ranger/SKILL.md'};return _0x5c1b4['ArZjw'](readSkillContent,_0x5c1b4['dfjSk']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x25c112=_0x33d0;(function(_0x48f424,_0xea754f){const _0x2b8b4b=_0x33d0,_0x3ffcfe=_0x48f424();while(!![]){try{const _0x22e6b1=-parseInt(_0x2b8b4b(0xb6))/0x1*(-parseInt(_0x2b8b4b(0xbc))/0x2)+-parseInt(_0x2b8b4b(0x9e))/0x3*(parseInt(_0x2b8b4b(0xc1))/0x4)+-parseInt(_0x2b8b4b(0xa6))/0x5+-parseInt(_0x2b8b4b(0xa1))/0x6*(-parseInt(_0x2b8b4b(0xb1))/0x7)+-parseInt(_0x2b8b4b(0xba))/0x8*(parseInt(_0x2b8b4b(0xbd))/0x9)+-parseInt(_0x2b8b4b(0xa5))/0xa*(-parseInt(_0x2b8b4b(0x98))/0xb)+parseInt(_0x2b8b4b(0xaf))/0xc;if(_0x22e6b1===_0xea754f)break;else _0x3ffcfe['push'](_0x3ffcfe['shift']());}catch(_0x2baf32){_0x3ffcfe['push'](_0x3ffcfe['shift']());}}}(_0x2ee7,0xbf298));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';function _0x33d0(_0xe28c2c,_0x46bbe6){_0xe28c2c=_0xe28c2c-0x98;const _0x2ee77a=_0x2ee7();let _0x33d07b=_0x2ee77a[_0xe28c2c];return _0x33d07b;}import{getSkillsDir}from'./claudeConfig.js';function _0x2ee7(){const _0x34bf43=['join','SKILL.md','trim','filter','isDirectory','warn','e2e-test-recommender','11672076ssGZGV','oRvSF','560721IiIjtH','log','\x20\x20Installed\x20skill:\x20','match','EAISW','190282UocmUE','xwjHY','bJJIO','bug-bash','504RiNPmh','endsWith','16iGeaNr','173448eJbEVr','vXJjG','FMDbU','utf-8','1364284PDYsfH','skills','79354PnWURK','\x20\x20Skill\x20not\x20found:\x20','feature-tracker','Invalid\x20skill\x20frontmatter','catch','yvima','12SRZJCs','eSmBb','osTkH','18ARSdmd','GGuTT','claude','push','1780NEkvqN','3289550GnMYpV','QUSFn'];_0x2ee7=function(){return _0x34bf43;};return _0x2ee7();}import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=[_0x25c112(0xae),_0x25c112(0xb9),_0x25c112(0x9a)];export async function installSkill(_0xf761f1,_0x245121={}){const _0x33f778=_0x25c112,_0x161231={'bJJIO':'project','cMSyV':function(_0x169199){return _0x169199();},'eSmBb':function(_0x3cdb52,_0xef38a5,_0x970e0c){return _0x3cdb52(_0xef38a5,_0x970e0c);},'QUSFn':function(_0x157f56,_0x34921d,_0x18e2a1){return _0x157f56(_0x34921d,_0x18e2a1);},'oRvSF':function(_0x1a24f8,_0x216154){return _0x1a24f8(_0x216154);},'FMDbU':function(_0x45aca9,_0x265b35){return _0x45aca9(_0x265b35);},'digQl':function(_0x577d49,_0x333c2f){return _0x577d49(_0x333c2f);},'ZTCtD':_0x33f778(0xa9),'yvima':function(_0x2b712b,_0x337b68){return _0x2b712b===_0x337b68;},'OdGnW':function(_0x80b126,_0x218fc1,_0x302649){return _0x80b126(_0x218fc1,_0x302649);},'vXJjG':function(_0xcc254b,_0x108a2a,_0x3ccc7b){return _0xcc254b(_0x108a2a,_0x3ccc7b);},'osTkH':_0x33f778(0xc0),'GGuTT':function(_0x33286f,_0x19f1b6){return _0x33286f(_0x19f1b6);},'sPHrZ':function(_0x3348bb,_0x119026,_0x4e1dfa,_0x353755){return _0x3348bb(_0x119026,_0x4e1dfa,_0x353755);}},{level:level=_0x161231[_0x33f778(0xb8)],cliVersion:_0x31ad97,platform:platform=_0x33f778(0xa3)}=_0x245121,_0x1b0fba=_0x161231['cMSyV'](getSourceSkillsDir),_0x45074d=_0x161231[_0x33f778(0x9f)](join,_0x1b0fba,_0xf761f1),_0x3665a6=_0x161231[_0x33f778(0xa7)](join,_0x1b0fba,_0xf761f1+'.md'),_0x1cb627=_0x161231[_0x33f778(0xb0)](existsSync,_0x45074d)&&_0x161231[_0x33f778(0xbf)](statSync,_0x45074d)[_0x33f778(0xac)]()&&_0x161231['digQl'](existsSync,join(_0x45074d,_0x161231['ZTCtD'])),_0x43bab8=_0x161231[_0x33f778(0xbf)](existsSync,_0x3665a6);if(!_0x1cb627&&!_0x43bab8)return console['warn'](_0x33f778(0x99)+_0xf761f1),![];const _0x4c3e6b=_0x161231[_0x33f778(0x9d)](platform,'opencode')?getOpencodeSkillsDir(level):getSkillsDir(level),_0x42e5ca=join(_0x4c3e6b,_0xf761f1);await mkdir(_0x42e5ca,{'recursive':!![]});let _0x1e3394,_0x392430=[];if(_0x1cb627){const _0x10c11a=await _0x161231[_0x33f778(0xb0)](readdir,_0x45074d),_0x5a3e77=_0x10c11a[_0x33f778(0xab)](_0x1d7896=>_0x1d7896[_0x33f778(0xbb)]('.md'));for(const _0x33c104 of _0x5a3e77){const _0x4415ed=_0x161231['OdGnW'](join,_0x45074d,_0x33c104),_0x40988b=_0x161231[_0x33f778(0xbe)](join,_0x42e5ca,_0x33c104);await _0x161231['eSmBb'](copyFile,_0x4415ed,_0x40988b),_0x392430['push'](_0x33c104);}_0x1e3394=await _0x161231[_0x33f778(0x9f)](readFile,join(_0x45074d,_0x33f778(0xa9)),_0x161231[_0x33f778(0xa0)]);}else{_0x1e3394=await readFile(_0x3665a6,'utf-8');const _0x267867=join(_0x42e5ca,_0x33f778(0xa9));await writeFile(_0x267867,_0x1e3394,'utf-8'),_0x392430[_0x33f778(0xa4)](_0x33f778(0xa9));}const {name:_0x2cf038}=_0x161231[_0x33f778(0xa2)](parseFrontmatter,_0x1e3394);return console[_0x33f778(0xb2)](_0x33f778(0xb3)+_0x2cf038),console['log']('\x20\x20Location:\x20'+_0x42e5ca),_0x392430['length']>0x1&&console[_0x33f778(0xb2)]('\x20\x20Files:\x20'+_0x392430[_0x33f778(0xa8)](',\x20')),_0x161231['sPHrZ'](logLocalAgentInstallation,_0xf761f1,{'skillDisplayName':_0x2cf038,'installLevel':level},_0x31ad97)[_0x33f778(0x9c)](()=>{}),!![];}function getSourceSkillsDir(){const _0x3b3be2=_0x25c112,_0x38e968={'cJepe':function(_0x493ee8,_0x595978,_0x5ae374,_0x953333,_0x297bbf){return _0x493ee8(_0x595978,_0x5ae374,_0x953333,_0x297bbf);},'HVyFq':_0x3b3be2(0xc2),'xwjHY':function(_0xd69b2c,_0x1183aa){return _0xd69b2c(_0x1183aa);}},_0xd91010=[_0x38e968['cJepe'](join,__dirname,'..','..','skills'),join(__dirname,'..','..','..',_0x38e968['HVyFq'])];for(const _0x269cf2 of _0xd91010){if(_0x38e968[_0x3b3be2(0xb7)](existsSync,_0x269cf2))return _0x269cf2;}return _0xd91010[0x0];}function parseFrontmatter(_0xdfe543){const _0x100538=_0x25c112,_0x249822=_0xdfe543['match'](/^---\n([\s\S]+?)\n---/);if(!_0x249822)throw new Error(_0x100538(0x9b));const _0x27ce0c=_0x249822[0x1],_0x9b4bcd=_0x27ce0c[_0x100538(0xb4)](/name:\s*(.+)/),_0x531182=_0x27ce0c['match'](/description:\s*"?(.+?)"?\n/);return{'name':_0x9b4bcd?.[0x1][_0x100538(0xaa)]()||'','description':_0x531182?.[0x1][_0x100538(0xaa)]()||''};}export async function removeSkill(_0x1412b1,_0xd07f3a){const _0x443f9b=_0x25c112,_0x10f642={'EAISW':function(_0x65f626,_0x30c451){return _0x65f626(_0x30c451);},'PpBhw':function(_0xfed0fd,_0x1737a1,_0x2459be){return _0xfed0fd(_0x1737a1,_0x2459be);}},_0x124961=_0x10f642[_0x443f9b(0xb5)](getSkillsDir,_0xd07f3a),_0xcccfad=_0x10f642['PpBhw'](join,_0x124961,_0x1412b1);if(!_0x10f642[_0x443f9b(0xb5)](existsSync,_0xcccfad))return![];try{return await _0x10f642['PpBhw'](rm,_0xcccfad,{'recursive':!![]}),console['log']('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x1412b1),!![];}catch{return console[_0x443f9b(0xad)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x1412b1),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xbabafb=_0x286f;(function(_0x501594,_0x5d293a){const _0x55e158=_0x286f,_0x2bb00e=_0x501594();while(!![]){try{const _0x46baa4=parseInt(_0x55e158(0x144))/0x1+-parseInt(_0x55e158(0x162))/0x2+parseInt(_0x55e158(0x15f))/0x3*(-parseInt(_0x55e158(0x158))/0x4)+-parseInt(_0x55e158(0x17a))/0x5+-parseInt(_0x55e158(0x161))/0x6+-parseInt(_0x55e158(0x172))/0x7*(-parseInt(_0x55e158(0x173))/0x8)+parseInt(_0x55e158(0x17f))/0x9*(parseInt(_0x55e158(0x14c))/0xa);if(_0x46baa4===_0x5d293a)break;else _0x2bb00e['push'](_0x2bb00e['shift']());}catch(_0x5b516d){_0x2bb00e['push'](_0x2bb00e['shift']());}}}(_0x6070,0xae7db));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x1d1609,_0x4ea0fb){const _0x21b5b8=_0x286f,_0x4b709b={'fbfqe':function(_0x4d5eef,_0x3fc241){return _0x4d5eef<=_0x3fc241;},'oBbRT':function(_0x24b69a,_0x3561a2){return _0x24b69a>_0x3561a2;},'JArjj':function(_0x2c8956,_0xe82f50){return _0x2c8956+_0xe82f50;},'gAzXY':function(_0x46291d,_0x23b24c){return _0x46291d&_0x23b24c;},'NOqQf':function(_0xcdd504,_0x6dbfb1){return _0xcdd504-_0x6dbfb1;},'gSqur':function(_0x56357e,_0x301f68){return _0x56357e<_0x301f68;},'WJGEk':function(_0xdfa4e7,_0x241a3c){return _0xdfa4e7+_0x241a3c;}};if(_0x4ea0fb>=_0x1d1609['length'])return[0x0,0x0];const _0x5d80dc=_0x1d1609[_0x4ea0fb];let _0x1a047f=0x1,_0x342c51=0x80;while(_0x4b709b['fbfqe'](_0x1a047f,0x8)&&!(_0x5d80dc&_0x342c51)){_0x1a047f++,_0x342c51>>=0x1;}if(_0x4b709b[_0x21b5b8(0x13f)](_0x4b709b['JArjj'](_0x4ea0fb,_0x1a047f),_0x1d1609['length']))return[0x0,0x0];let _0xf02fc1=_0x4b709b['gAzXY'](_0x5d80dc,_0x4b709b[_0x21b5b8(0x149)](_0x342c51,0x1));for(let _0x5b974d=0x1;_0x4b709b[_0x21b5b8(0x179)](_0x5b974d,_0x1a047f);_0x5b974d++){_0xf02fc1=_0xf02fc1*0x100+_0x1d1609[_0x4b709b[_0x21b5b8(0x16d)](_0x4ea0fb,_0x5b974d)];}return[_0xf02fc1,_0x1a047f];}function readId(_0x4f9fb2,_0x570650){const _0x4b05d4=_0x286f,_0x34e8e5={'eRLFT':function(_0x297fdf,_0x3002a1){return _0x297fdf>=_0x3002a1;},'omsCA':function(_0x469752,_0x241337){return _0x469752>=_0x241337;},'GoZAd':function(_0x55ad7a,_0x276116){return _0x55ad7a+_0x276116;},'cvPuX':function(_0x3f99a0,_0x12cc3a){return _0x3f99a0*_0x12cc3a;}};if(_0x570650>=_0x4f9fb2[_0x4b05d4(0x17e)])return[0x0,0x0];const _0xf714b3=_0x4f9fb2[_0x570650];let _0x4be326;if(_0x34e8e5['eRLFT'](_0xf714b3,0x80))_0x4be326=0x1;else{if(_0xf714b3>=0x40)_0x4be326=0x2;else{if(_0x34e8e5['omsCA'](_0xf714b3,0x20))_0x4be326=0x3;else{if(_0xf714b3>=0x10)_0x4be326=0x4;else return[_0xf714b3,0x1];}}}if(_0x34e8e5['GoZAd'](_0x570650,_0x4be326)>_0x4f9fb2['length'])return[0x0,0x0];let _0x3a94b4=0x0;for(let _0x5086ec=0x0;_0x5086ec<_0x4be326;_0x5086ec++){_0x3a94b4=_0x34e8e5[_0x4b05d4(0x16f)](_0x3a94b4,0x100)+_0x4f9fb2[_0x34e8e5[_0x4b05d4(0x140)](_0x570650,_0x5086ec)];}return[_0x3a94b4,_0x4be326];}function readUint(_0x3e466b,_0x3a82c0,_0x5c056c){const _0x1ef9b5={'RJSQy':function(_0x184afb,_0x2fceec){return _0x184afb*_0x2fceec;}};let _0x4af954=0x0;for(let _0xce2ce8=0x0;_0xce2ce8<_0x5c056c;_0xce2ce8++){_0x4af954=_0x1ef9b5['RJSQy'](_0x4af954,0x100)+_0x3e466b[_0x3a82c0+_0xce2ce8];}return _0x4af954;}function _0x286f(_0x47f97c,_0x2026b4){_0x47f97c=_0x47f97c-0x13b;const _0x6070d9=_0x6070();let _0x286f08=_0x6070d9[_0x47f97c];return _0x286f08;}function isUnknownSize(_0x56c474,_0x498e41){const _0x481fc4=_0x286f,_0x5cdbc4={'cYruX':function(_0x3d6f4d,_0x5528ce){return _0x3d6f4d===_0x5528ce;},'aQPzR':function(_0x46039a,_0xd88ffb){return _0x46039a*_0xd88ffb;}};return _0x5cdbc4[_0x481fc4(0x165)](_0x56c474,Math[_0x481fc4(0x13c)](0x2,_0x5cdbc4['aQPzR'](0x7,_0x498e41))-0x1);}function writeVint(_0x4dbef6,_0x542f13){const _0x13a8cf=_0x286f,_0x415396={'JWOXS':function(_0x5a3692,_0x29cf2f){return _0x5a3692||_0x29cf2f;},'nsViK':function(_0x314426,_0x463635){return _0x314426*_0x463635;},'ArXEh':function(_0x181812,_0x50c47b){return _0x181812-_0x50c47b;},'xtDPd':function(_0x5dbe05,_0x5592c0){return _0x5dbe05/_0x5592c0;},'XAIKW':function(_0x4431fd,_0x2d662d){return _0x4431fd<<_0x2d662d;}};let _0x24f94b=_0x415396['JWOXS'](_0x542f13,0x1);while(Math['pow'](0x2,_0x415396[_0x13a8cf(0x152)](0x7,_0x24f94b))-0x2<_0x4dbef6)_0x24f94b++;const _0x422594=Buffer['alloc'](_0x24f94b);for(let _0x4e22ae=_0x415396['ArXEh'](_0x24f94b,0x1);_0x4e22ae>=0x0;_0x4e22ae--){_0x422594[_0x4e22ae]=_0x4dbef6&0xff,_0x4dbef6=Math['floor'](_0x415396['xtDPd'](_0x4dbef6,0x100));}return _0x422594[0x0]|=_0x415396[_0x13a8cf(0x160)](0x1,0x8-_0x24f94b),_0x422594;}function writeUint(_0x40905c,_0x3e3b69){const _0x745eb9=_0x286f,_0x4ea51e={'rNpEh':function(_0xee790,_0x166eaf){return _0xee790-_0x166eaf;},'eQmnM':function(_0x261d97,_0x4a274c){return _0x261d97/_0x4a274c;}},_0xfc0277=Buffer['alloc'](_0x3e3b69);for(let _0x5712f2=_0x4ea51e[_0x745eb9(0x14e)](_0x3e3b69,0x1);_0x5712f2>=0x0;_0x5712f2--){_0xfc0277[_0x5712f2]=_0x40905c&0xff,_0x40905c=Math[_0x745eb9(0x14a)](_0x4ea51e[_0x745eb9(0x181)](_0x40905c,0x100));}return _0xfc0277;}function writeUnknownSizeVint(_0x43a811){const _0x247446=_0x286f,_0x3e8083={'uapKL':function(_0x204f1b,_0x5d86da){return _0x204f1b>>_0x5d86da;}},_0x22b4f5=Buffer[_0x247446(0x185)](_0x43a811,0xff);return _0x22b4f5[0x0]=_0x3e8083[_0x247446(0x15d)](0xff,_0x43a811-0x1),_0x22b4f5;}function uintSize(_0x34b85a){const _0x334edd=_0x286f,_0x3ca972={'FnAXT':function(_0x534ca7,_0xa6ad1){return _0x534ca7>_0xa6ad1;}};if(_0x34b85a===0x0)return 0x1;let _0x2c2a27=0x0,_0x3ee37d=_0x34b85a;while(_0x3ca972[_0x334edd(0x16c)](_0x3ee37d,0x0)){_0x2c2a27++,_0x3ee37d=Math[_0x334edd(0x14a)](_0x3ee37d/0x100);}return _0x2c2a27;}function findTimestampScale(_0xdba448,_0x1f8c2e){const _0x506449=_0x286f,_0x1fc9e3={'VHKlH':function(_0x56fdfd,_0x5cf8e1){return _0x56fdfd<_0x5cf8e1;},'YKYwF':function(_0x1a6f71,_0x4bc511,_0x491a99){return _0x1a6f71(_0x4bc511,_0x491a99);},'FNxge':function(_0x16ceb1,_0x39f265){return _0x16ceb1===_0x39f265;},'ANcjY':function(_0x1b16ea,_0x65a5ad){return _0x1b16ea+_0x65a5ad;},'HrxKo':function(_0x4c131d,_0xf22e5,_0x1312f8){return _0x4c131d(_0xf22e5,_0x1312f8);},'FmJgG':function(_0x4f0e39,_0x6bcff4){return _0x4f0e39+_0x6bcff4;},'JrUca':function(_0x5cc1bf,_0x50bbd5){return _0x5cc1bf===_0x50bbd5;},'nbfMB':function(_0x4273a3,_0x55effc){return _0x4273a3===_0x55effc;},'bkLKl':function(_0x450946,_0x530f9a){return _0x450946+_0x530f9a;}};let _0xbab43a=_0x1f8c2e;const _0x163e1b=Math[_0x506449(0x142)](_0xdba448['length'],_0x1f8c2e+0x2710);while(_0x1fc9e3['VHKlH'](_0xbab43a,_0x163e1b)){const [_0x11992a,_0x4cf8d0]=_0x1fc9e3['YKYwF'](readId,_0xdba448,_0xbab43a),[_0x2e2cfe,_0x296ab9]=readVint(_0xdba448,_0xbab43a+_0x4cf8d0);if(_0x1fc9e3['FNxge'](_0x11992a,ID_INFO)){let _0x2eee34=_0x1fc9e3[_0x506449(0x13d)](_0xbab43a,_0x4cf8d0)+_0x296ab9;const _0x1791ce=_0x2eee34+_0x2e2cfe;while(_0x2eee34<_0x1791ce){const [_0x4b860c,_0x4bb85e]=_0x1fc9e3[_0x506449(0x167)](readId,_0xdba448,_0x2eee34),[_0xe12c71,_0x35a951]=_0x1fc9e3[_0x506449(0x176)](readVint,_0xdba448,_0x1fc9e3[_0x506449(0x145)](_0x2eee34,_0x4bb85e));if(_0x1fc9e3['JrUca'](_0x4b860c,ID_TIMESTAMP_SCALE))return readUint(_0xdba448,_0x2eee34+_0x4bb85e+_0x35a951,_0xe12c71);_0x2eee34+=_0x4bb85e+_0x35a951+_0xe12c71;}break;}if(_0x1fc9e3['nbfMB'](_0x11992a,ID_CLUSTER))break;if(isUnknownSize(_0x2e2cfe,_0x296ab9))break;_0xbab43a+=_0x1fc9e3[_0x506449(0x145)](_0x1fc9e3['bkLKl'](_0x4cf8d0,_0x296ab9),_0x2e2cfe);}return 0xf4240;}function findFirstClusterOffset(_0x4ff4fb,_0x537cc6){const _0x54aed5=_0x286f,_0x4b211f={'Jpezc':function(_0x4cdf3b,_0x43a10c){return _0x4cdf3b<_0x43a10c;},'DTZpL':function(_0x573537,_0x286886,_0x4a4398){return _0x573537(_0x286886,_0x4a4398);},'HrKSJ':function(_0x16b1c2,_0x1dcc93){return _0x16b1c2+_0x1dcc93;},'CvBHJ':function(_0x18a7c0,_0xc51bcc){return _0x18a7c0+_0xc51bcc;}};let _0x19b417=_0x537cc6;while(_0x4b211f['Jpezc'](_0x19b417,_0x4ff4fb[_0x54aed5(0x17e)])){const [_0xe02b7b,_0x5b6ffd]=_0x4b211f[_0x54aed5(0x16b)](readId,_0x4ff4fb,_0x19b417);if(_0xe02b7b===ID_CLUSTER)return _0x19b417;const [_0x5cff47,_0x4bcc09]=readVint(_0x4ff4fb,_0x4b211f['HrKSJ'](_0x19b417,_0x5b6ffd));if(_0x4b211f['DTZpL'](isUnknownSize,_0x5cff47,_0x4bcc09))return _0x19b417;_0x19b417+=_0x4b211f['HrKSJ'](_0x4b211f[_0x54aed5(0x155)](_0x5b6ffd,_0x4bcc09),_0x5cff47);}return _0x4ff4fb['length'];}function findClusterEnd(_0xe830a5,_0x2749ca,_0x2ad566,_0x422712){const _0x54dddb=_0x286f,_0x5daf1d={'txPmW':function(_0x2825e9,_0x5b7968){return _0x2825e9+_0x5b7968;},'VIcLI':function(_0x22c524,_0x267b67){return _0x22c524-_0x267b67;},'JSTnp':function(_0x45647a,_0x18fba8,_0x410abf){return _0x45647a(_0x18fba8,_0x410abf);},'tYPeE':function(_0x139385,_0x43935f,_0x1efb70){return _0x139385(_0x43935f,_0x1efb70);},'ldpEV':function(_0x104b84,_0x218215){return _0x104b84+_0x218215;}};if(!isUnknownSize(_0x2ad566,_0x422712))return _0x5daf1d[_0x54dddb(0x169)](_0x2749ca,_0x2ad566);const _0x526b7c=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x50aa4c=_0x2749ca;while(_0x50aa4c<_0x5daf1d[_0x54dddb(0x186)](_0xe830a5['length'],0x4)){const [_0x16bd37,_0x1bbe43]=readId(_0xe830a5,_0x50aa4c);if(_0x526b7c[_0x54dddb(0x178)](_0x16bd37))return _0x50aa4c;const [_0x198cbb,_0x2c87aa]=_0x5daf1d['JSTnp'](readVint,_0xe830a5,_0x5daf1d['txPmW'](_0x50aa4c,_0x1bbe43));if(_0x5daf1d['tYPeE'](isUnknownSize,_0x198cbb,_0x2c87aa))return _0xe830a5['length'];_0x50aa4c+=_0x5daf1d['ldpEV'](_0x5daf1d[_0x54dddb(0x168)](_0x1bbe43,_0x2c87aa),_0x198cbb);}return _0xe830a5[_0x54dddb(0x17e)];}function extractClusters(_0x120278,_0x1c3bd0){const _0x21dacc=_0x286f,_0x1d8367={'OiaaR':function(_0x9dfaa5,_0x174584){return _0x9dfaa5===_0x174584;},'CnxwU':function(_0x1dcabf,_0x4bf0a6,_0x3c8f00){return _0x1dcabf(_0x4bf0a6,_0x3c8f00);},'JCyMD':function(_0x20521d,_0xfaabbd){return _0x20521d!==_0xfaabbd;},'qUJxl':function(_0x853225,_0x5c385b,_0x55aa76){return _0x853225(_0x5c385b,_0x55aa76);},'dbaQj':function(_0x25b337,_0x360ff4){return _0x25b337+_0x360ff4;},'FLBbb':function(_0x16da3d,_0x4aa589,_0x583b9d,_0x11820b,_0x251180){return _0x16da3d(_0x4aa589,_0x583b9d,_0x11820b,_0x251180);},'NzyQb':function(_0x4c46dc,_0x342589,_0x114a07,_0x2a2e15){return _0x4c46dc(_0x342589,_0x114a07,_0x2a2e15);},'Znclk':function(_0x52b413,_0x349c9a){return _0x52b413===_0x349c9a;},'ZCVna':function(_0xc99609,_0x370ec8,_0x418f7d){return _0xc99609(_0x370ec8,_0x418f7d);},'kCDOR':function(_0x3fa327,_0x33bf46){return _0x3fa327<_0x33bf46;},'VFciZ':function(_0x3a91e9,_0x31df27){return _0x3a91e9+_0x31df27;},'qRsIn':function(_0x17e307,_0x5dac82){return _0x17e307>=_0x5dac82;},'AFSDA':function(_0x3f8025,_0x43795b){return _0x3f8025+_0x43795b;},'GYmYs':function(_0x244ba5,_0x271227){return _0x244ba5+_0x271227;},'qlCqf':function(_0x2c938c,_0x364d81){return _0x2c938c+_0x364d81;},'BBtDK':function(_0x36dce6,_0x510498){return _0x36dce6+_0x510498;},'fbGGe':function(_0x2aa7e9,_0x497e09){return _0x2aa7e9>_0x497e09;},'KhCSQ':function(_0x294b18,_0x450ea1,_0x571862){return _0x294b18(_0x450ea1,_0x571862);}},_0x53a274=[],_0x62a03c=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x5b2dd3=0x0;while(_0x5b2dd3<_0x120278['length']){const _0x13a203=_0x120278['indexOf'](_0x62a03c,_0x5b2dd3);if(_0x1d8367[_0x21dacc(0x174)](_0x13a203,-0x1))break;const [_0x37bd1a,_0x35d3d1]=_0x1d8367[_0x21dacc(0x189)](readId,_0x120278,_0x13a203);if(_0x1d8367[_0x21dacc(0x15c)](_0x37bd1a,ID_CLUSTER)){_0x5b2dd3=_0x13a203+0x1;continue;}const [_0x1f29f5,_0x4ff9f7]=_0x1d8367[_0x21dacc(0x157)](readVint,_0x120278,_0x13a203+_0x35d3d1),_0x4f99e4=_0x1d8367[_0x21dacc(0x188)](_0x13a203,_0x35d3d1)+_0x4ff9f7,_0x2eeeb0=_0x1d8367[_0x21dacc(0x154)](findClusterEnd,_0x120278,_0x4f99e4,_0x1f29f5,_0x4ff9f7);let _0x4cb77c=_0x4f99e4,_0x2c9d17=0x0,_0x95a6f5=0x2,_0x1d9b90=![],_0x20dc53=Buffer['alloc'](0x0),_0x38cf4c=Buffer[_0x21dacc(0x185)](0x0);while(_0x4cb77c<_0x2eeeb0){const [_0x65b0aa,_0x183483]=readId(_0x120278,_0x4cb77c),[_0x4db20b,_0x4cc165]=readVint(_0x120278,_0x4cb77c+_0x183483);if(_0x65b0aa===ID_TIMESTAMP){_0x2c9d17=_0x1d8367['NzyQb'](readUint,_0x120278,_0x4cb77c+_0x183483+_0x4cc165,_0x4db20b),_0x95a6f5=_0x4db20b,_0x1d9b90=!![],_0x20dc53=_0x120278[_0x21dacc(0x14f)](_0x4f99e4,_0x4cb77c);const _0x679282=_0x4cb77c+_0x183483+_0x4cc165+_0x4db20b;_0x38cf4c=_0x120278[_0x21dacc(0x14f)](_0x679282,_0x2eeeb0);break;}if(_0x1d8367['Znclk'](_0x65b0aa,ID_CLUSTER))break;if(_0x1d8367['ZCVna'](isUnknownSize,_0x4db20b,_0x4cc165))break;_0x4cb77c+=_0x1d8367['dbaQj'](_0x183483,_0x4cc165)+_0x4db20b;}!_0x1d9b90&&(_0x38cf4c=_0x120278['slice'](_0x4f99e4,_0x2eeeb0));let _0x256ff6=_0x2c9d17;_0x4cb77c=_0x4f99e4;while(_0x1d8367[_0x21dacc(0x17d)](_0x4cb77c,_0x2eeeb0)){const [_0xa6a157,_0x3c9c9e]=readId(_0x120278,_0x4cb77c),[_0x5d9f61,_0x32d1f7]=_0x1d8367[_0x21dacc(0x189)](readVint,_0x120278,_0x1d8367[_0x21dacc(0x13b)](_0x4cb77c,_0x3c9c9e));if(_0xa6a157===ID_SIMPLE_BLOCK&&_0x1d8367['qRsIn'](_0x5d9f61,0x4)){const _0x32aaf4=_0x1d8367[_0x21dacc(0x166)](_0x1d8367['GYmYs'](_0x4cb77c,_0x3c9c9e),_0x32d1f7),[,_0x335cda]=readVint(_0x120278,_0x32aaf4),_0x2b6e01=_0x120278[_0x21dacc(0x14d)](_0x1d8367[_0x21dacc(0x182)](_0x32aaf4,_0x335cda)),_0x1e84f6=_0x1d8367['BBtDK'](_0x2c9d17,_0x2b6e01);if(_0x1d8367['fbGGe'](_0x1e84f6,_0x256ff6))_0x256ff6=_0x1e84f6;}if(_0xa6a157===ID_CLUSTER)break;if(_0x1d8367[_0x21dacc(0x13e)](isUnknownSize,_0x5d9f61,_0x32d1f7))break;_0x4cb77c+=_0x1d8367[_0x21dacc(0x13b)](_0x3c9c9e+_0x32d1f7,_0x5d9f61);}_0x53a274[_0x21dacc(0x184)]({'timestamp':_0x2c9d17,'maxTicks':_0x256ff6,'bodyBeforeTimestamp':_0x20dc53,'bodyAfterTimestamp':_0x38cf4c,'timestampElementSize':_0x95a6f5}),_0x5b2dd3=_0x2eeeb0;}return _0x53a274;}function _0x6070(){const _0x562bd6=['ddiBt','argv','kCDOR','length','371934aAKSvp','log','eQmnM','qlCqf','YDMIZ','push','alloc','VIcLI','max','dbaQj','CnxwU','VFciZ','pow','ANcjY','KhCSQ','oBbRT','GoZAd','endsWith','min','PbPVq','245766lCCcNK','FmJgG','concat','bodyBeforeTimestamp','KffVi','NOqQf','floor','DAQgq','860WZhTpY','readInt16BE','rNpEh','slice','DfSFp','stitchWebmFiles.js','nsViK','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','FLBbb','CvBHJ','oLwNV','qUJxl','4SXUDOX','YYDEd','LdEFS','xaGqm','JCyMD','uapKL','KeuCa','4022721iwHMbs','XAIKW','4163460qcSIZe','1746958GRtiNF','NeQAg','copy','cYruX','AFSDA','YKYwF','ldpEV','txPmW','VvKSe','DTZpL','FnAXT','WJGEk','stitchWebmFiles.ts','cvPuX','ncvjG','JrWpm','28wWUDLD','1413272ZczCxu','OiaaR','KqPjk','HrxKo','\x20files\x20->\x20','has','gSqur','4417135xlIcgQ'];_0x6070=function(){return _0x562bd6;};return _0x6070();}function parseWebm(_0x14570b){const _0x2cfb8e=_0x286f,_0xa597d8={'YDMIZ':function(_0x1281f6,_0x16c1e3,_0x96e5d7){return _0x1281f6(_0x16c1e3,_0x96e5d7);},'VvKSe':function(_0x4b1db8,_0x184ac4){return _0x4b1db8+_0x184ac4;},'MYdLt':function(_0x4a7465,_0x55c612,_0x1c1caa){return _0x4a7465(_0x55c612,_0x1c1caa);},'ddiBt':function(_0x4837c6,_0x20e893){return _0x4837c6!==_0x20e893;},'PbPVq':function(_0x48a1ca,_0x3a3d2b){return _0x48a1ca+_0x3a3d2b;},'KeuCa':function(_0x247a43,_0x314da4){return _0x247a43+_0x314da4;}};let _0x3d9325=0x0;const [,_0x4d8b34]=readId(_0x14570b,_0x3d9325),[_0x4b4681,_0xe459d5]=_0xa597d8[_0x2cfb8e(0x183)](readVint,_0x14570b,_0x3d9325+_0x4d8b34);_0x3d9325+=_0xa597d8[_0x2cfb8e(0x16a)](_0x4d8b34,_0xe459d5)+_0x4b4681;const [_0x431c25,_0x4c6066]=_0xa597d8['MYdLt'](readId,_0x14570b,_0x3d9325);if(_0xa597d8[_0x2cfb8e(0x17b)](_0x431c25,ID_SEGMENT))return null;const [,_0x2ff2d7]=readVint(_0x14570b,_0xa597d8[_0x2cfb8e(0x143)](_0x3d9325,_0x4c6066)),_0x536d3e=_0xa597d8[_0x2cfb8e(0x15e)](_0x3d9325,_0x4c6066)+_0x2ff2d7,_0x2623fa=findTimestampScale(_0x14570b,_0x536d3e),_0x53154b=findFirstClusterOffset(_0x14570b,_0x536d3e),_0x521e6d=_0x14570b['slice'](0x0,_0x53154b),_0x3f917b=extractClusters(_0x14570b,_0x2623fa);let _0x40c0dd=0x0;for(const _0x216234 of _0x3f917b){if(_0x216234['maxTicks']>_0x40c0dd)_0x40c0dd=_0x216234['maxTicks'];}return{'header':_0x521e6d,'clusters':_0x3f917b,'timestampScale':_0x2623fa,'maxTimestampTicks':_0x40c0dd};}function buildCluster(_0x2ea530,_0x223e70,_0x45d81e){const _0x29c88a=_0x286f,_0x1043c5={'KqPjk':function(_0x88dcd0,_0x3787d4){return _0x88dcd0(_0x3787d4);},'LdEFS':function(_0x334781,_0x28adcc,_0x5a83ed){return _0x334781(_0x28adcc,_0x5a83ed);}},_0x275a73=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0xf70411=Math[_0x29c88a(0x187)](0x4,uintSize(_0x2ea530)),_0x38fd3b=Buffer[_0x29c88a(0x146)]([Buffer['from']([ID_TIMESTAMP]),_0x1043c5[_0x29c88a(0x175)](writeVint,_0xf70411),_0x1043c5[_0x29c88a(0x15a)](writeUint,_0x2ea530,_0xf70411)]),_0xb37627=Buffer['concat']([_0x223e70,_0x38fd3b,_0x45d81e]),_0x3ed07b=_0x1043c5[_0x29c88a(0x175)](writeVint,_0xb37627['length']);return Buffer[_0x29c88a(0x146)]([_0x275a73,_0x3ed07b,_0xb37627]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x3f0103){const _0x3d6190=_0x286f,_0x1852ac={'DAQgq':function(_0x841f0c,_0x8a2ac,_0x3a8aa7){return _0x841f0c(_0x8a2ac,_0x3a8aa7);},'mchnd':function(_0x148fb4,_0x4f4c8a,_0x4a28e1){return _0x148fb4(_0x4f4c8a,_0x4a28e1);},'NeQAg':function(_0x263c91,_0x5bf189){return _0x263c91+_0x5bf189;},'DfSFp':function(_0x4d5670,_0x4d6ec1,_0x39b516){return _0x4d5670(_0x4d6ec1,_0x39b516);},'YYDEd':function(_0x59a0d5,_0x42238a){return _0x59a0d5+_0x42238a;},'JYdey':function(_0x4b0994,_0xb53264){return _0x4b0994(_0xb53264);},'oLwNV':function(_0x7495c9,_0x26a8b5){return _0x7495c9<_0x26a8b5;},'UQmrp':function(_0x4baffe,_0x2c5a61){return _0x4baffe+_0x2c5a61;},'xaGqm':function(_0xa61c2f,_0x4bfea1){return _0xa61c2f===_0x4bfea1;},'cTeGn':function(_0xf39d09,_0xba2ca4){return _0xf39d09+_0xba2ca4;},'ncvjG':function(_0x444fd5,_0x4002ec){return _0x444fd5+_0x4002ec;}},_0x47895b=Buffer['from'](_0x3f0103);let _0x392206=0x0;const [,_0x42e5f8]=_0x1852ac['DAQgq'](readId,_0x47895b,_0x392206),[_0x5c7b60,_0x559e80]=_0x1852ac['mchnd'](readVint,_0x47895b,_0x392206+_0x42e5f8),_0x5de1d1=_0x1852ac[_0x3d6190(0x163)](_0x392206+_0x42e5f8,_0x559e80)+_0x5c7b60,[,_0x57fce4]=_0x1852ac['DfSFp'](readId,_0x47895b,_0x5de1d1),[,_0x522863]=_0x1852ac['DfSFp'](readVint,_0x47895b,_0x5de1d1+_0x57fce4),_0x2e4045=_0x1852ac[_0x3d6190(0x159)](_0x1852ac['NeQAg'](_0x5de1d1,_0x57fce4),_0x522863),_0x48dad4=_0x1852ac['JYdey'](writeUnknownSizeVint,_0x522863);_0x48dad4[_0x3d6190(0x164)](_0x47895b,_0x1852ac[_0x3d6190(0x159)](_0x5de1d1,_0x57fce4));let _0x3c8b39=_0x2e4045;const _0x3a27a6=Math['min'](_0x47895b[_0x3d6190(0x17e)],_0x1852ac['YYDEd'](_0x2e4045,0x2710));while(_0x1852ac[_0x3d6190(0x156)](_0x3c8b39,_0x3a27a6)){const [_0x33be55,_0x29521b]=_0x1852ac[_0x3d6190(0x150)](readId,_0x47895b,_0x3c8b39),[_0x3b44f9,_0x390e08]=readVint(_0x47895b,_0x1852ac['UQmrp'](_0x3c8b39,_0x29521b));if(_0x33be55===ID_CLUSTER)break;if(isUnknownSize(_0x3b44f9,_0x390e08))break;if(_0x1852ac[_0x3d6190(0x15b)](_0x33be55,ID_INFO)){const _0x94e24d=_0x1852ac[_0x3d6190(0x159)](_0x3c8b39,_0x29521b)+_0x390e08,_0x20b9b4=_0x1852ac['UQmrp'](_0x94e24d,_0x3b44f9),_0x5612b7=[];let _0x4f2320=_0x94e24d;while(_0x4f2320<_0x20b9b4){const [_0x5b0c37,_0x5a013e]=_0x1852ac['mchnd'](readId,_0x47895b,_0x4f2320),[_0x1041b4,_0x244464]=_0x1852ac[_0x3d6190(0x14b)](readVint,_0x47895b,_0x1852ac[_0x3d6190(0x163)](_0x4f2320,_0x5a013e)),_0x20c5c2=_0x1852ac['cTeGn'](_0x5a013e,_0x244464)+_0x1041b4;_0x5b0c37!==ID_DURATION&&_0x5612b7[_0x3d6190(0x184)](_0x47895b[_0x3d6190(0x14f)](_0x4f2320,_0x1852ac[_0x3d6190(0x170)](_0x4f2320,_0x20c5c2))),_0x4f2320+=_0x20c5c2;}const _0x36f0a0=Buffer['concat'](_0x5612b7),_0x488b99=Buffer[_0x3d6190(0x146)]([_0x47895b['slice'](_0x3c8b39,_0x3c8b39+_0x29521b),writeVint(_0x36f0a0['length'],_0x390e08)]);return Buffer[_0x3d6190(0x146)]([_0x47895b['slice'](0x0,_0x3c8b39),_0x488b99,_0x36f0a0,_0x47895b['slice'](_0x20b9b4)]);}_0x3c8b39+=_0x1852ac[_0x3d6190(0x163)](_0x29521b+_0x390e08,_0x3b44f9);}return _0x47895b;}export function stitchWebmFiles(_0x548cd5,_0x26394f){const _0x1bcba3=_0x286f,_0x57e5a7={'xeAws':function(_0x1ebe21,_0x26fdb9){return _0x1ebe21<=_0x26fdb9;},'JrWpm':function(_0x4b4c3e,_0x12d201){return _0x4b4c3e(_0x12d201);},'KffVi':function(_0x45b2f9,_0x1e832c){return _0x45b2f9+_0x1e832c;}};if(_0x57e5a7['xeAws'](_0x548cd5[_0x1bcba3(0x17e)],0x1))return![];const _0x30a736=[];for(const _0x368d71 of _0x548cd5){const _0x52ac0b=readFileSync(_0x368d71),_0xfcd03d=_0x57e5a7[_0x1bcba3(0x171)](parseWebm,_0x52ac0b);if(!_0xfcd03d||_0xfcd03d['clusters']['length']===0x0)return![];_0x30a736['push'](_0xfcd03d);}const _0x5546a7=_0x30a736[0x0],_0x7d9054=_0x57e5a7[_0x1bcba3(0x171)](rebuildHeaderWithoutDuration,_0x5546a7['header']),_0x513a5f=[_0x7d9054];let _0x4d65d8=0x0;for(let _0x1d0d59=0x0;_0x1d0d59<_0x30a736[_0x1bcba3(0x17e)];_0x1d0d59++){const _0x25e054=_0x30a736[_0x1d0d59];for(const _0x4348e7 of _0x25e054['clusters']){const _0x5ea1f3=_0x4348e7['timestamp']+_0x4d65d8;_0x513a5f[_0x1bcba3(0x184)](buildCluster(_0x5ea1f3,_0x4348e7[_0x1bcba3(0x147)],_0x4348e7['bodyAfterTimestamp']));}const _0x47f6e7=0x1e;_0x4d65d8+=_0x57e5a7[_0x1bcba3(0x148)](_0x25e054['maxTimestampTicks'],_0x47f6e7);}return writeFileSync(_0x26394f,Buffer[_0x1bcba3(0x146)](_0x513a5f)),!![];}if(process[_0xbabafb(0x17c)][0x1]?.[_0xbabafb(0x141)](_0xbabafb(0x16e))||process[_0xbabafb(0x17c)][0x1]?.[_0xbabafb(0x141)](_0xbabafb(0x151))){const args=process['argv'][_0xbabafb(0x14f)](0x2);args[_0xbabafb(0x17e)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process['exit'](0x1));const output=args[args['length']-0x1],inputs=args[_0xbabafb(0x14f)](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0xbabafb(0x180)]('Stitched\x20'+inputs['length']+_0xbabafb(0x177)+output):console['log'](_0xbabafb(0x153));}
|
|
1
|
+
const _0x48fc1f=_0x9d2a;(function(_0x574e97,_0x2ecf5b){const _0x1a57d4=_0x9d2a,_0x172831=_0x574e97();while(!![]){try{const _0x8e3911=-parseInt(_0x1a57d4(0x107))/0x1*(-parseInt(_0x1a57d4(0x106))/0x2)+-parseInt(_0x1a57d4(0x120))/0x3+-parseInt(_0x1a57d4(0x124))/0x4+parseInt(_0x1a57d4(0xec))/0x5*(parseInt(_0x1a57d4(0xfb))/0x6)+-parseInt(_0x1a57d4(0x118))/0x7*(parseInt(_0x1a57d4(0x122))/0x8)+-parseInt(_0x1a57d4(0x101))/0x9+parseInt(_0x1a57d4(0x11b))/0xa;if(_0x8e3911===_0x2ecf5b)break;else _0x172831['push'](_0x172831['shift']());}catch(_0x434815){_0x172831['push'](_0x172831['shift']());}}}(_0x23f0,0x7fd30));import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function _0x9d2a(_0x473ab1,_0x269e25){_0x473ab1=_0x473ab1-0xeb;const _0x23f0c6=_0x23f0();let _0x9d2a96=_0x23f0c6[_0x473ab1];return _0x9d2a96;}function readVint(_0x3e2f21,_0x49f681){const _0x55c1ca={'fbOon':function(_0x4356e2,_0x19b2c3){return _0x4356e2&_0x19b2c3;}};if(_0x49f681>=_0x3e2f21['length'])return[0x0,0x0];const _0x384e47=_0x3e2f21[_0x49f681];let _0x4d2704=0x1,_0x2410c5=0x80;while(_0x4d2704<=0x8&&!_0x55c1ca['fbOon'](_0x384e47,_0x2410c5)){_0x4d2704++,_0x2410c5>>=0x1;}if(_0x49f681+_0x4d2704>_0x3e2f21['length'])return[0x0,0x0];let _0x19e325=_0x384e47&_0x2410c5-0x1;for(let _0x3540a6=0x1;_0x3540a6<_0x4d2704;_0x3540a6++){_0x19e325=_0x19e325*0x100+_0x3e2f21[_0x49f681+_0x3540a6];}return[_0x19e325,_0x4d2704];}function readId(_0x23c1ba,_0x458184){const _0x4bc1f6=_0x9d2a,_0x30e1b0={'WUJYJ':function(_0x2b2547,_0x29c099){return _0x2b2547>=_0x29c099;},'ppkfW':function(_0xb21744,_0x47b665){return _0xb21744>=_0x47b665;},'bjDIx':function(_0x3c886c,_0x5123ea){return _0x3c886c>=_0x5123ea;},'CSWTf':function(_0x4bec6a,_0x109513){return _0x4bec6a<_0x109513;},'wfIgv':function(_0x8cd8ba,_0x319567){return _0x8cd8ba+_0x319567;},'BYPji':function(_0x1050a1,_0x2d51d0){return _0x1050a1*_0x2d51d0;}};if(_0x30e1b0[_0x4bc1f6(0x11c)](_0x458184,_0x23c1ba['length']))return[0x0,0x0];const _0x2b0701=_0x23c1ba[_0x458184];let _0x4c771e;if(_0x30e1b0['ppkfW'](_0x2b0701,0x80))_0x4c771e=0x1;else{if(_0x2b0701>=0x40)_0x4c771e=0x2;else{if(_0x30e1b0[_0x4bc1f6(0x116)](_0x2b0701,0x20))_0x4c771e=0x3;else{if(_0x30e1b0[_0x4bc1f6(0x116)](_0x2b0701,0x10))_0x4c771e=0x4;else return[_0x2b0701,0x1];}}}if(_0x458184+_0x4c771e>_0x23c1ba[_0x4bc1f6(0x10e)])return[0x0,0x0];let _0x3e6b3a=0x0;for(let _0xac5fa5=0x0;_0x30e1b0['CSWTf'](_0xac5fa5,_0x4c771e);_0xac5fa5++){_0x3e6b3a=_0x30e1b0[_0x4bc1f6(0xf3)](_0x30e1b0[_0x4bc1f6(0xf1)](_0x3e6b3a,0x100),_0x23c1ba[_0x458184+_0xac5fa5]);}return[_0x3e6b3a,_0x4c771e];}function readUint(_0x1ee2bc,_0x261c27,_0x192d2c){const _0x1ce4f9={'DEppx':function(_0x5cefee,_0x293bf8){return _0x5cefee*_0x293bf8;}};let _0x36fc99=0x0;for(let _0x10b0c6=0x0;_0x10b0c6<_0x192d2c;_0x10b0c6++){_0x36fc99=_0x1ce4f9['DEppx'](_0x36fc99,0x100)+_0x1ee2bc[_0x261c27+_0x10b0c6];}return _0x36fc99;}function isUnknownSize(_0x2b1f8e,_0x2100b9){const _0xa7751d=_0x9d2a,_0x585794={'QaEus':function(_0x2b7e8a,_0x89245e){return _0x2b7e8a===_0x89245e;},'hSOwP':function(_0x309b91,_0x2f42c7){return _0x309b91-_0x2f42c7;},'oBPtq':function(_0x5e76c1,_0x237b02){return _0x5e76c1*_0x237b02;}};return _0x585794[_0xa7751d(0x112)](_0x2b1f8e,_0x585794['hSOwP'](Math['pow'](0x2,_0x585794[_0xa7751d(0xf2)](0x7,_0x2100b9)),0x1));}function writeVint(_0x3c76e8,_0x262016){const _0x4c467d=_0x9d2a,_0xe5feec={'CFRNK':function(_0x57f1e6,_0x307f97){return _0x57f1e6||_0x307f97;},'OgRmY':function(_0x2d3f5d,_0x5b6fe8){return _0x2d3f5d<_0x5b6fe8;},'YYJnk':function(_0x52b9d1,_0x426f45){return _0x52b9d1-_0x426f45;},'Vsqfo':function(_0x3501d4,_0x409f7e){return _0x3501d4*_0x409f7e;},'CLGCl':function(_0x2e2962,_0x2ae6d2){return _0x2e2962<<_0x2ae6d2;}};let _0x5ba9ad=_0xe5feec['CFRNK'](_0x262016,0x1);while(_0xe5feec['OgRmY'](_0xe5feec[_0x4c467d(0xee)](Math['pow'](0x2,_0xe5feec[_0x4c467d(0xf5)](0x7,_0x5ba9ad)),0x2),_0x3c76e8))_0x5ba9ad++;const _0x36007d=Buffer[_0x4c467d(0xed)](_0x5ba9ad);for(let _0x1430c2=_0x5ba9ad-0x1;_0x1430c2>=0x0;_0x1430c2--){_0x36007d[_0x1430c2]=_0x3c76e8&0xff,_0x3c76e8=Math[_0x4c467d(0x11e)](_0x3c76e8/0x100);}return _0x36007d[0x0]|=_0xe5feec['CLGCl'](0x1,0x8-_0x5ba9ad),_0x36007d;}function writeUint(_0x4b6fda,_0x519c76){const _0x3082df=_0x9d2a,_0x6e0e31={'gvAUE':function(_0x5bd00f,_0x2e64ee){return _0x5bd00f>=_0x2e64ee;}},_0xadda04=Buffer['alloc'](_0x519c76);for(let _0x57198e=_0x519c76-0x1;_0x6e0e31[_0x3082df(0xf7)](_0x57198e,0x0);_0x57198e--){_0xadda04[_0x57198e]=_0x4b6fda&0xff,_0x4b6fda=Math[_0x3082df(0x11e)](_0x4b6fda/0x100);}return _0xadda04;}function writeUnknownSizeVint(_0x44ba6f){const _0x322a87=Buffer['alloc'](_0x44ba6f,0xff);return _0x322a87[0x0]=0xff>>_0x44ba6f-0x1,_0x322a87;}function uintSize(_0xdeeb81){const _0x220f3e=_0x9d2a,_0x2a6b39={'GNwNk':function(_0x327ad5,_0x473d2a){return _0x327ad5>_0x473d2a;},'sNEza':function(_0x1e7c9c,_0x5ba58d){return _0x1e7c9c/_0x5ba58d;}};if(_0xdeeb81===0x0)return 0x1;let _0x144f0b=0x0,_0x139171=_0xdeeb81;while(_0x2a6b39['GNwNk'](_0x139171,0x0)){_0x144f0b++,_0x139171=Math[_0x220f3e(0x11e)](_0x2a6b39[_0x220f3e(0x102)](_0x139171,0x100));}return _0x144f0b;}function findTimestampScale(_0x18918a,_0x1566d3){const _0x472ea5=_0x9d2a,_0x46b33={'OEFuH':function(_0x2874d4,_0x37b7e2){return _0x2874d4+_0x37b7e2;},'AIOHQ':function(_0x4bbe9f,_0x27882b,_0x5a85b0){return _0x4bbe9f(_0x27882b,_0x5a85b0);},'bgJdF':function(_0x1ebe60,_0x3b88a6){return _0x1ebe60+_0x3b88a6;},'wSHrA':function(_0x5b54fb,_0x5a3b25){return _0x5b54fb===_0x5a3b25;}};let _0x45042e=_0x1566d3;const _0x1b7a9f=Math['min'](_0x18918a[_0x472ea5(0x10e)],_0x46b33['OEFuH'](_0x1566d3,0x2710));while(_0x45042e<_0x1b7a9f){const [_0x118cdb,_0xafb3c7]=_0x46b33[_0x472ea5(0xff)](readId,_0x18918a,_0x45042e),[_0x1dceb8,_0x1f2574]=_0x46b33[_0x472ea5(0xff)](readVint,_0x18918a,_0x46b33[_0x472ea5(0xfa)](_0x45042e,_0xafb3c7));if(_0x46b33['wSHrA'](_0x118cdb,ID_INFO)){let _0x2302fb=_0x45042e+_0xafb3c7+_0x1f2574;const _0x85bae2=_0x2302fb+_0x1dceb8;while(_0x2302fb<_0x85bae2){const [_0x58aa3b,_0x125933]=readId(_0x18918a,_0x2302fb),[_0xc63c74,_0x544404]=readVint(_0x18918a,_0x2302fb+_0x125933);if(_0x46b33[_0x472ea5(0x11f)](_0x58aa3b,ID_TIMESTAMP_SCALE))return readUint(_0x18918a,_0x46b33['bgJdF'](_0x2302fb,_0x125933)+_0x544404,_0xc63c74);_0x2302fb+=_0x46b33[_0x472ea5(0x10b)](_0x46b33['OEFuH'](_0x125933,_0x544404),_0xc63c74);}break;}if(_0x118cdb===ID_CLUSTER)break;if(isUnknownSize(_0x1dceb8,_0x1f2574))break;_0x45042e+=_0x46b33[_0x472ea5(0xfa)](_0x46b33[_0x472ea5(0xfa)](_0xafb3c7,_0x1f2574),_0x1dceb8);}return 0xf4240;}function findFirstClusterOffset(_0x322d05,_0x1ba6df){const _0x4f8d29=_0x9d2a,_0x229892={'AcXyj':function(_0x30b182,_0x397e05,_0x3b2927){return _0x30b182(_0x397e05,_0x3b2927);},'kOWow':function(_0x22359e,_0x11b699){return _0x22359e+_0x11b699;}};let _0x8c9a58=_0x1ba6df;while(_0x8c9a58<_0x322d05[_0x4f8d29(0x10e)]){const [_0x265a77,_0x2cc67b]=readId(_0x322d05,_0x8c9a58);if(_0x265a77===ID_CLUSTER)return _0x8c9a58;const [_0x35e464,_0x1cd3da]=_0x229892[_0x4f8d29(0x10f)](readVint,_0x322d05,_0x8c9a58+_0x2cc67b);if(_0x229892[_0x4f8d29(0x10f)](isUnknownSize,_0x35e464,_0x1cd3da))return _0x8c9a58;_0x8c9a58+=_0x229892['kOWow'](_0x2cc67b+_0x1cd3da,_0x35e464);}return _0x322d05[_0x4f8d29(0x10e)];}function findClusterEnd(_0x10ece2,_0x335d24,_0x27e0a8,_0x19cf5f){const _0x1c164f=_0x9d2a,_0x5d47a2={'nBViJ':function(_0x1161e9,_0x519e2d,_0xcba87c){return _0x1161e9(_0x519e2d,_0xcba87c);},'AeuCT':function(_0x1d1665,_0x2892ca,_0x4002e1){return _0x1d1665(_0x2892ca,_0x4002e1);},'HqjTy':function(_0x4cfb9d,_0x953d49){return _0x4cfb9d+_0x953d49;},'szbkP':function(_0xc685,_0x463e68,_0x3467a2){return _0xc685(_0x463e68,_0x3467a2);}};if(!_0x5d47a2[_0x1c164f(0x114)](isUnknownSize,_0x27e0a8,_0x19cf5f))return _0x335d24+_0x27e0a8;const _0x4779ff=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x2021ce=_0x335d24;while(_0x2021ce<_0x10ece2[_0x1c164f(0x10e)]-0x4){const [_0x5b3577,_0x223759]=readId(_0x10ece2,_0x2021ce);if(_0x4779ff['has'](_0x5b3577))return _0x2021ce;const [_0xb945dd,_0x41a394]=_0x5d47a2[_0x1c164f(0xf8)](readVint,_0x10ece2,_0x5d47a2[_0x1c164f(0x105)](_0x2021ce,_0x223759));if(_0x5d47a2[_0x1c164f(0x129)](isUnknownSize,_0xb945dd,_0x41a394))return _0x10ece2[_0x1c164f(0x10e)];_0x2021ce+=_0x5d47a2['HqjTy'](_0x223759,_0x41a394)+_0xb945dd;}return _0x10ece2[_0x1c164f(0x10e)];}function extractClusters(_0x50c3e1,_0xbc25cb){const _0x2281c7=_0x9d2a,_0x3938e7={'dpFQJ':function(_0x33c8bc,_0x2b009a){return _0x33c8bc<_0x2b009a;},'MsGaS':function(_0x3c2e5d,_0x449297){return _0x3c2e5d===_0x449297;},'kRIjF':function(_0x563c1d,_0x18b5ed,_0x382f80){return _0x563c1d(_0x18b5ed,_0x382f80);},'FyPab':function(_0x290193,_0xcf4f9e){return _0x290193!==_0xcf4f9e;},'bYuCi':function(_0x4209fb,_0x287b59){return _0x4209fb+_0x287b59;},'XkaCF':function(_0x56358a,_0x5a6f38){return _0x56358a+_0x5a6f38;},'BymzS':function(_0x1512e9,_0x2b0c48,_0x555643){return _0x1512e9(_0x2b0c48,_0x555643);},'bqZEj':function(_0xc658be,_0x4b0743){return _0xc658be+_0x4b0743;},'OIjck':function(_0x205e11,_0x456ead){return _0x205e11===_0x456ead;},'gyIvW':function(_0x183903,_0x1da341){return _0x183903+_0x1da341;},'nbZTk':function(_0xc90e8e,_0x53d05a){return _0xc90e8e+_0x53d05a;},'XkDWb':function(_0x1fcd32,_0x15746e){return _0x1fcd32===_0x15746e;},'jFtpl':function(_0x1f6b3c,_0x424ce2,_0x4cced4){return _0x1f6b3c(_0x424ce2,_0x4cced4);},'yCloU':function(_0x522510,_0x39ee60,_0xbecec5){return _0x522510(_0x39ee60,_0xbecec5);},'sEMGe':function(_0x45cc4d,_0x32af14,_0x13bfeb){return _0x45cc4d(_0x32af14,_0x13bfeb);},'nGvIX':function(_0x12fabb,_0x6e9840){return _0x12fabb+_0x6e9840;},'HaHIH':function(_0x310138,_0x263f24){return _0x310138===_0x263f24;},'gNYNG':function(_0x43c242,_0x2943f7){return _0x43c242>=_0x2943f7;},'deWSF':function(_0x313b4d,_0x3a109b){return _0x313b4d===_0x3a109b;}},_0x4a8c53=[],_0xc80505=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x1d72e9=0x0;while(_0x3938e7[_0x2281c7(0x123)](_0x1d72e9,_0x50c3e1[_0x2281c7(0x10e)])){const _0x5767fe=_0x50c3e1[_0x2281c7(0x128)](_0xc80505,_0x1d72e9);if(_0x3938e7['MsGaS'](_0x5767fe,-0x1))break;const [_0x292676,_0x18ff1d]=_0x3938e7['kRIjF'](readId,_0x50c3e1,_0x5767fe);if(_0x3938e7[_0x2281c7(0x10d)](_0x292676,ID_CLUSTER)){_0x1d72e9=_0x3938e7[_0x2281c7(0xf9)](_0x5767fe,0x1);continue;}const [_0x28f5b4,_0x5a31da]=readVint(_0x50c3e1,_0x3938e7[_0x2281c7(0x127)](_0x5767fe,_0x18ff1d)),_0x2e09d3=_0x3938e7[_0x2281c7(0x127)](_0x3938e7[_0x2281c7(0xf9)](_0x5767fe,_0x18ff1d),_0x5a31da),_0x434909=findClusterEnd(_0x50c3e1,_0x2e09d3,_0x28f5b4,_0x5a31da);let _0x4a3641=_0x2e09d3,_0x2ffb0d=0x0,_0xf82357=0x2,_0xec31cb=![],_0x2d3ca9=Buffer['alloc'](0x0),_0x362b3d=Buffer['alloc'](0x0);while(_0x4a3641<_0x434909){const [_0x5cae8b,_0x2c6f86]=_0x3938e7[_0x2281c7(0xef)](readId,_0x50c3e1,_0x4a3641),[_0x328bae,_0x2a6618]=_0x3938e7['BymzS'](readVint,_0x50c3e1,_0x3938e7[_0x2281c7(0x10c)](_0x4a3641,_0x2c6f86));if(_0x3938e7['OIjck'](_0x5cae8b,ID_TIMESTAMP)){_0x2ffb0d=readUint(_0x50c3e1,_0x3938e7['gyIvW'](_0x4a3641,_0x2c6f86)+_0x2a6618,_0x328bae),_0xf82357=_0x328bae,_0xec31cb=!![],_0x2d3ca9=_0x50c3e1[_0x2281c7(0x110)](_0x2e09d3,_0x4a3641);const _0x58ec15=_0x3938e7['nbZTk'](_0x4a3641+_0x2c6f86+_0x2a6618,_0x328bae);_0x362b3d=_0x50c3e1[_0x2281c7(0x110)](_0x58ec15,_0x434909);break;}if(_0x3938e7['XkDWb'](_0x5cae8b,ID_CLUSTER))break;if(_0x3938e7['jFtpl'](isUnknownSize,_0x328bae,_0x2a6618))break;_0x4a3641+=_0x2c6f86+_0x2a6618+_0x328bae;}!_0xec31cb&&(_0x362b3d=_0x50c3e1['slice'](_0x2e09d3,_0x434909));let _0x5f13d2=_0x2ffb0d;_0x4a3641=_0x2e09d3;while(_0x3938e7[_0x2281c7(0x123)](_0x4a3641,_0x434909)){const [_0x2deeb9,_0x470437]=_0x3938e7['yCloU'](readId,_0x50c3e1,_0x4a3641),[_0x23fefb,_0x56cc14]=_0x3938e7[_0x2281c7(0xf4)](readVint,_0x50c3e1,_0x3938e7['nGvIX'](_0x4a3641,_0x470437));if(_0x3938e7[_0x2281c7(0xeb)](_0x2deeb9,ID_SIMPLE_BLOCK)&&_0x3938e7['gNYNG'](_0x23fefb,0x4)){const _0x26ff3f=_0x3938e7['bYuCi'](_0x4a3641+_0x470437,_0x56cc14),[,_0x273dd5]=readVint(_0x50c3e1,_0x26ff3f),_0x3cb48d=_0x50c3e1['readInt16BE'](_0x26ff3f+_0x273dd5),_0x18e3d4=_0x2ffb0d+_0x3cb48d;if(_0x18e3d4>_0x5f13d2)_0x5f13d2=_0x18e3d4;}if(_0x3938e7[_0x2281c7(0x126)](_0x2deeb9,ID_CLUSTER))break;if(isUnknownSize(_0x23fefb,_0x56cc14))break;_0x4a3641+=_0x3938e7['XkaCF'](_0x470437,_0x56cc14)+_0x23fefb;}_0x4a8c53['push']({'timestamp':_0x2ffb0d,'maxTicks':_0x5f13d2,'bodyBeforeTimestamp':_0x2d3ca9,'bodyAfterTimestamp':_0x362b3d,'timestampElementSize':_0xf82357}),_0x1d72e9=_0x434909;}return _0x4a8c53;}function parseWebm(_0x3a7cfa){const _0x4cdfe3=_0x9d2a,_0x4c1c8d={'BSDoB':function(_0x258aed,_0x4626da,_0xdbc78c){return _0x258aed(_0x4626da,_0xdbc78c);},'CqNsy':function(_0x15517a,_0x38010d){return _0x15517a+_0x38010d;},'KKgsG':function(_0x553a79,_0x48eeb2){return _0x553a79!==_0x48eeb2;},'vNYJR':function(_0x85a59f,_0x24a641){return _0x85a59f+_0x24a641;},'SdMtE':function(_0x4474be,_0x54bc00,_0x398480){return _0x4474be(_0x54bc00,_0x398480);},'eTyWM':function(_0xa1ba44,_0x4ea8b4){return _0xa1ba44>_0x4ea8b4;}};let _0x2e13bf=0x0;const [,_0xbc7452]=_0x4c1c8d['BSDoB'](readId,_0x3a7cfa,_0x2e13bf),[_0x5a91f0,_0x5d06f8]=_0x4c1c8d[_0x4cdfe3(0x100)](readVint,_0x3a7cfa,_0x2e13bf+_0xbc7452);_0x2e13bf+=_0x4c1c8d['CqNsy'](_0xbc7452,_0x5d06f8)+_0x5a91f0;const [_0x64f8cf,_0x35c436]=readId(_0x3a7cfa,_0x2e13bf);if(_0x4c1c8d[_0x4cdfe3(0x111)](_0x64f8cf,ID_SEGMENT))return null;const [,_0x438890]=readVint(_0x3a7cfa,_0x2e13bf+_0x35c436),_0x45f610=_0x4c1c8d['vNYJR'](_0x2e13bf,_0x35c436)+_0x438890,_0x19289a=_0x4c1c8d['SdMtE'](findTimestampScale,_0x3a7cfa,_0x45f610),_0x44d83c=findFirstClusterOffset(_0x3a7cfa,_0x45f610),_0x122d16=_0x3a7cfa[_0x4cdfe3(0x110)](0x0,_0x44d83c),_0x1effca=extractClusters(_0x3a7cfa,_0x19289a);let _0x46e4dc=0x0;for(const _0x18bb53 of _0x1effca){if(_0x4c1c8d['eTyWM'](_0x18bb53['maxTicks'],_0x46e4dc))_0x46e4dc=_0x18bb53['maxTicks'];}return{'header':_0x122d16,'clusters':_0x1effca,'timestampScale':_0x19289a,'maxTimestampTicks':_0x46e4dc};}function _0x23f0(){const _0x614539=['alloc','YYJnk','kRIjF','copy','BYPji','oBPtq','wfIgv','sEMGe','Vsqfo','stitchWebmFiles.js','gvAUE','AeuCT','bYuCi','bgJdF','288RJurdb','YGRhg','LIYKu','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','AIOHQ','BSDoB','8056053AoLxoj','sNEza','log','\x20files\x20->\x20','HqjTy','2iZIaLR','2859fbSgGI','argv','min','push','OEFuH','bqZEj','FyPab','length','AcXyj','slice','KKgsG','QaEus','SwvMj','nBViJ','max','bjDIx','cEKCO','14ySVHCQ','timestamp','clusters','21535890YNpOGs','WUJYJ','exit','floor','wSHrA','2405484pPJEZB','concat','575768GmEVJL','dpFQJ','1569124QLMzyx','endsWith','deWSF','XkaCF','indexOf','szbkP','RdqhK','from','GOZAg','stitchWebmFiles.ts','HaHIH','62530hKgJjP'];_0x23f0=function(){return _0x614539;};return _0x23f0();}function buildCluster(_0x1ca381,_0x518e9c,_0x49331f){const _0x32dbdd=_0x9d2a,_0x28357a={'aHpJT':function(_0x441dfa,_0x4fba24){return _0x441dfa(_0x4fba24);}},_0x43e9ac=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x21f374=Math[_0x32dbdd(0x115)](0x4,uintSize(_0x1ca381)),_0x596d4d=Buffer[_0x32dbdd(0x121)]([Buffer[_0x32dbdd(0x12b)]([ID_TIMESTAMP]),_0x28357a['aHpJT'](writeVint,_0x21f374),writeUint(_0x1ca381,_0x21f374)]),_0x54fed4=Buffer['concat']([_0x518e9c,_0x596d4d,_0x49331f]),_0x2fcb18=writeVint(_0x54fed4['length']);return Buffer['concat']([_0x43e9ac,_0x2fcb18,_0x54fed4]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x36ad70){const _0x4f6b99=_0x9d2a,_0xc23d4c={'SwvMj':function(_0x4c453c,_0x5a0f31,_0x34f2fd){return _0x4c453c(_0x5a0f31,_0x34f2fd);},'GOZAg':function(_0x156710,_0x51aa7d){return _0x156710+_0x51aa7d;},'cEKCO':function(_0x510c8f,_0x455a33){return _0x510c8f+_0x455a33;},'lCmFE':function(_0xd432ed,_0x27130e){return _0xd432ed(_0x27130e);},'fzNym':function(_0x330cd6,_0x2d29c6){return _0x330cd6===_0x2d29c6;},'pBYzA':function(_0x3e45f9,_0x14244f){return _0x3e45f9===_0x14244f;},'LIYKu':function(_0x2b3e53,_0x42fb7a){return _0x2b3e53+_0x42fb7a;},'eBuoU':function(_0x2ad36a,_0x30f5f5){return _0x2ad36a+_0x30f5f5;},'MRNuo':function(_0x43684a,_0x30bdfe){return _0x43684a!==_0x30bdfe;},'RdqhK':function(_0x47b250,_0x408f24){return _0x47b250+_0x408f24;},'YGRhg':function(_0x27a93f,_0x1641a5){return _0x27a93f+_0x1641a5;}},_0x2c8821=Buffer[_0x4f6b99(0x12b)](_0x36ad70);let _0x5a7c48=0x0;const [,_0x4578bd]=_0xc23d4c['SwvMj'](readId,_0x2c8821,_0x5a7c48),[_0x52a955,_0x1f54ad]=readVint(_0x2c8821,_0xc23d4c[_0x4f6b99(0x12c)](_0x5a7c48,_0x4578bd)),_0x5770e4=_0xc23d4c[_0x4f6b99(0x12c)](_0x5a7c48+_0x4578bd,_0x1f54ad)+_0x52a955,[,_0x3d7bd5]=readId(_0x2c8821,_0x5770e4),[,_0x22231b]=_0xc23d4c[_0x4f6b99(0x113)](readVint,_0x2c8821,_0xc23d4c[_0x4f6b99(0x12c)](_0x5770e4,_0x3d7bd5)),_0x6e01c3=_0xc23d4c['GOZAg'](_0xc23d4c[_0x4f6b99(0x117)](_0x5770e4,_0x3d7bd5),_0x22231b),_0x5b32a9=_0xc23d4c['lCmFE'](writeUnknownSizeVint,_0x22231b);_0x5b32a9[_0x4f6b99(0xf0)](_0x2c8821,_0xc23d4c['GOZAg'](_0x5770e4,_0x3d7bd5));let _0x1db4f8=_0x6e01c3;const _0x1cd7fc=Math[_0x4f6b99(0x109)](_0x2c8821[_0x4f6b99(0x10e)],_0xc23d4c['cEKCO'](_0x6e01c3,0x2710));while(_0x1db4f8<_0x1cd7fc){const [_0x3b22a1,_0xb8fbe4]=_0xc23d4c['SwvMj'](readId,_0x2c8821,_0x1db4f8),[_0x368ccb,_0x469082]=readVint(_0x2c8821,_0x1db4f8+_0xb8fbe4);if(_0xc23d4c['fzNym'](_0x3b22a1,ID_CLUSTER))break;if(isUnknownSize(_0x368ccb,_0x469082))break;if(_0xc23d4c['pBYzA'](_0x3b22a1,ID_INFO)){const _0x2468f1=_0xc23d4c[_0x4f6b99(0xfd)](_0x1db4f8+_0xb8fbe4,_0x469082),_0x21d43a=_0xc23d4c['eBuoU'](_0x2468f1,_0x368ccb),_0x27e4cb=[];let _0x1a20f6=_0x2468f1;while(_0x1a20f6<_0x21d43a){const [_0xa980a2,_0x13139e]=readId(_0x2c8821,_0x1a20f6),[_0xb3a7ce,_0x2dac17]=_0xc23d4c[_0x4f6b99(0x113)](readVint,_0x2c8821,_0x1a20f6+_0x13139e),_0x416dda=_0x13139e+_0x2dac17+_0xb3a7ce;_0xc23d4c['MRNuo'](_0xa980a2,ID_DURATION)&&_0x27e4cb[_0x4f6b99(0x10a)](_0x2c8821[_0x4f6b99(0x110)](_0x1a20f6,_0x1a20f6+_0x416dda)),_0x1a20f6+=_0x416dda;}const _0x139891=Buffer[_0x4f6b99(0x121)](_0x27e4cb),_0x379ad4=Buffer['concat']([_0x2c8821[_0x4f6b99(0x110)](_0x1db4f8,_0xc23d4c[_0x4f6b99(0x12a)](_0x1db4f8,_0xb8fbe4)),writeVint(_0x139891['length'],_0x469082)]);return Buffer['concat']([_0x2c8821[_0x4f6b99(0x110)](0x0,_0x1db4f8),_0x379ad4,_0x139891,_0x2c8821[_0x4f6b99(0x110)](_0x21d43a)]);}_0x1db4f8+=_0xc23d4c[_0x4f6b99(0xfc)](_0xb8fbe4+_0x469082,_0x368ccb);}return _0x2c8821;}export function stitchWebmFiles(_0x441cb9,_0x4a3c64){const _0x28c08f=_0x9d2a,_0x1b9223={'qzFwc':function(_0x47675f,_0x1a6972){return _0x47675f(_0x1a6972);},'eWAwg':function(_0x5586a1,_0x1ac573){return _0x5586a1===_0x1ac573;},'YOnYu':function(_0x1c27ec,_0x49102d){return _0x1c27ec<_0x49102d;},'IZgcN':function(_0xb51bc7,_0xd10a09,_0xf56782,_0x4dd410){return _0xb51bc7(_0xd10a09,_0xf56782,_0x4dd410);}};if(_0x441cb9[_0x28c08f(0x10e)]<=0x1)return![];const _0x2e7cf0=[];for(const _0x2e3cf1 of _0x441cb9){const _0xfba947=_0x1b9223['qzFwc'](readFileSync,_0x2e3cf1),_0x696927=parseWebm(_0xfba947);if(!_0x696927||_0x1b9223['eWAwg'](_0x696927[_0x28c08f(0x11a)]['length'],0x0))return![];_0x2e7cf0['push'](_0x696927);}const _0x29932e=_0x2e7cf0[0x0],_0x2d61fc=rebuildHeaderWithoutDuration(_0x29932e['header']),_0x14b028=[_0x2d61fc];let _0x51ad30=0x0;for(let _0x2a0c7b=0x0;_0x1b9223['YOnYu'](_0x2a0c7b,_0x2e7cf0[_0x28c08f(0x10e)]);_0x2a0c7b++){const _0x547203=_0x2e7cf0[_0x2a0c7b];for(const _0x12a7f0 of _0x547203['clusters']){const _0x205061=_0x12a7f0[_0x28c08f(0x119)]+_0x51ad30;_0x14b028['push'](_0x1b9223['IZgcN'](buildCluster,_0x205061,_0x12a7f0['bodyBeforeTimestamp'],_0x12a7f0['bodyAfterTimestamp']));}const _0x1c9c51=0x1e;_0x51ad30+=_0x547203['maxTimestampTicks']+_0x1c9c51;}return writeFileSync(_0x4a3c64,Buffer[_0x28c08f(0x121)](_0x14b028)),!![];}if(process['argv'][0x1]?.[_0x48fc1f(0x125)](_0x48fc1f(0x12d))||process[_0x48fc1f(0x108)][0x1]?.['endsWith'](_0x48fc1f(0xf6))){const args=process[_0x48fc1f(0x108)][_0x48fc1f(0x110)](0x2);args[_0x48fc1f(0x10e)]<0x3&&(console['error']('Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>'),process[_0x48fc1f(0x11d)](0x1));const output=args[args[_0x48fc1f(0x10e)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x48fc1f(0x103)]('Stitched\x20'+inputs[_0x48fc1f(0x10e)]+_0x48fc1f(0x104)+output):console['log'](_0x48fc1f(0xfe));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4cf70b=_0x1a03;function _0x41c2(){const _0x1eeb54=['isTty','746mewPrU','outcome','/api/v1/mcp/cli-telemetry','push','buildEvent','trackPhaseEnd','pjEbc','signal','phaseCounter','trackCommandStart','phase_error','utf-8','sendImmediate','constructor','deviceId','buffer','commandId','browserSessionId','[telemetry]\x20Sending\x20','cwd','GITHUB_ACTIONS','flushing','setContext','now','catch','.session','trackPhaseError','lRPVv','phaseIndex','trackCommandEnd','commandStartTime','5yLkPYu','message','SjaBP','sendBatch','success','104929ZMMIcf','590TFDgfQ','name','featureId','16KZbEud','579422piscTn','cqOzA','command_end','Unknown','trackCommandError','slice','.ranger','phase','EVSrN','sWmHy','5205472XmVOLQ','flush','isCI','abort','transport','metadata','nodeVersion','4149odKSwv','phaseStartTimes','checklistItemId','platform','version','10778409dsbniB','NTNMI','delete','2800368AyUQqu','VHDKA','2091719EOIOzt','length'];_0x41c2=function(){return _0x1eeb54;};return _0x41c2();}(function(_0x108599,_0x35c804){const _0x36aadd=_0x1a03,_0x45dca5=_0x108599();while(!![]){try{const _0x5d4404=parseInt(_0x36aadd(0xe0))/0x1+parseInt(_0x36aadd(0xfe))/0x2*(parseInt(_0x36aadd(0xf1))/0x3)+-parseInt(_0x36aadd(0xea))/0x4*(-parseInt(_0x36aadd(0xd6))/0x5)+-parseInt(_0x36aadd(0xf9))/0x6+-parseInt(_0x36aadd(0xfb))/0x7*(parseInt(_0x36aadd(0xdf))/0x8)+-parseInt(_0x36aadd(0xf6))/0x9+parseInt(_0x36aadd(0xdc))/0xa*(parseInt(_0x36aadd(0xdb))/0xb);if(_0x5d4404===_0x35c804)break;else _0x45dca5['push'](_0x45dca5['shift']());}catch(_0x1342ec){_0x45dca5['push'](_0x45dca5['shift']());}}}(_0x41c2,0xaa48f));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';function _0x1a03(_0x37098b,_0x557a97){_0x37098b=_0x37098b-0xcf;const _0x41c276=_0x41c2();let _0x1a03e8=_0x41c276[_0x37098b];return _0x1a03e8;}import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';let cachedDeviceId=null;function getDeviceId(){const _0x28b9d3=_0x1a03,_0x208fdd={'lRPVv':function(_0x1d07b8,_0x31cb09,_0x2c6580){return _0x1d07b8(_0x31cb09,_0x2c6580);},'SjaBP':_0x28b9d3(0xe6),'UGbcs':function(_0x26e8e6,_0x4f5e2e){return _0x26e8e6(_0x4f5e2e);},'dcGJC':function(_0x533829){return _0x533829();},'pjEbc':function(_0x12bbb7){return _0x12bbb7();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x22300e=_0x208fdd['lRPVv'](join,homedir(),_0x208fdd[_0x28b9d3(0xd8)]),_0x121e1a=join(_0x22300e,_0x28b9d3(0xd0));if(_0x208fdd['UGbcs'](existsSync,_0x121e1a)){cachedDeviceId=readFileSync(_0x121e1a,_0x28b9d3(0x109))['trim']();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=_0x208fdd['dcGJC'](randomUUID),_0x208fdd[_0x28b9d3(0xd2)](mkdirSync,_0x22300e,{'recursive':!![]}),writeFileSync(_0x121e1a,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x208fdd[_0x28b9d3(0x104)](randomUUID),cachedDeviceId;}}export class TelemetryCollector{[_0x4cf70b(0x10d)]=[];[_0x4cf70b(0x10e)];['command'];[_0x4cf70b(0xd5)];['phaseCounter']=0x0;['phaseStartTimes']=new Map();['flushing']=null;['deviceId'];['cliVersion'];['nodeVersion'];[_0x4cf70b(0xf4)];['isTty'];[_0x4cf70b(0xec)];[_0x4cf70b(0xde)];[_0x4cf70b(0xf3)];['browserSessionId'];[_0x4cf70b(0xee)];constructor(_0x92eac){const _0x1b7900=_0x4cf70b,_0x42128e={'cqOzA':function(_0x460506){return _0x460506();}},_0xaa70a3='5|3|7|4|6|0|1|2|8'['split']('|');let _0x2b588f=0x0;while(!![]){switch(_0xaa70a3[_0x2b588f++]){case'0':this['nodeVersion']=process[_0x1b7900(0xf5)];continue;case'1':this['platform']=process[_0x1b7900(0xf4)];continue;case'2':this['isTty']=process['stdout']['isTTY']??![];continue;case'3':this['command']=_0x92eac;continue;case'4':this[_0x1b7900(0x10c)]=_0x42128e[_0x1b7900(0xe1)](getDeviceId);continue;case'5':this[_0x1b7900(0x10e)]=randomUUID();continue;case'6':this['cliVersion']=getCurrentVersion();continue;case'7':this['commandStartTime']=Date['now']();continue;case'8':this['isCI']=!!(process['env']['CI']||process['env'][_0x1b7900(0x112)]);continue;}break;}}[_0x4cf70b(0x114)](_0x11d9ca){const _0x43e7bd=_0x4cf70b;if(_0x11d9ca[_0x43e7bd(0xde)])this[_0x43e7bd(0xde)]=_0x11d9ca['featureId'];if(_0x11d9ca[_0x43e7bd(0xf3)])this['checklistItemId']=_0x11d9ca['checklistItemId'];if(_0x11d9ca['browserSessionId'])this[_0x43e7bd(0x10f)]=_0x11d9ca['browserSessionId'];if(_0x11d9ca['transport'])this['transport']=_0x11d9ca[_0x43e7bd(0xee)];}async[_0x4cf70b(0x107)](_0x95bc88){const _0x1463e0=_0x4cf70b,_0x29fd37={'NTNMI':'command_start'},_0x46246b=this[_0x1463e0(0x102)]({'eventType':_0x29fd37[_0x1463e0(0xf7)],'metadata':_0x95bc88});await this['sendImmediate'](_0x46246b);}async['trackCommandEnd'](_0x4ec043,_0x2ef7c7){const _0x2b4a82=_0x4cf70b,_0x5e2319=this['buildEvent']({'eventType':_0x2b4a82(0xe2),'outcome':_0x4ec043,'durationMs':Date[_0x2b4a82(0x115)]()-this[_0x2b4a82(0xd5)],'metadata':_0x2ef7c7});await this['sendImmediate'](_0x5e2319),await this[_0x2b4a82(0xeb)]();}async[_0x4cf70b(0xe4)](_0x48a9d2,_0x1cb692){const _0x43a413=_0x4cf70b,_0x439336={'QjGLn':function(_0x3f9c0f,_0x11cbb6){return _0x3f9c0f(_0x11cbb6);}},_0x2227bd=this['buildEvent']({'eventType':'command_error','errorMessage':truncate(_0x48a9d2 instanceof Error?_0x48a9d2[_0x43a413(0xd7)]:_0x439336['QjGLn'](String,_0x48a9d2),0x1f4),'errorType':_0x48a9d2 instanceof Error?_0x48a9d2['constructor']['name']:_0x43a413(0xe3),'durationMs':Date['now']()-this[_0x43a413(0xd5)],'metadata':_0x1cb692});await this[_0x43a413(0x10a)](_0x2227bd),await this['flush']();}['trackPhaseStart'](_0x517e71,_0x18c02f){const _0x46d469=_0x4cf70b;this[_0x46d469(0x106)]++,this[_0x46d469(0xf2)]['set'](_0x517e71,Date['now']());const _0x300ec5=this['buildEvent']({'eventType':'phase_start','phase':_0x517e71,'phaseIndex':this[_0x46d469(0x106)],'metadata':_0x18c02f});this['buffer'][_0x46d469(0x101)](_0x300ec5);}[_0x4cf70b(0x103)](_0x2e3c39,_0x5aeefc){const _0x27f403=_0x4cf70b,_0xa1af8d={'GTZPw':function(_0x160404,_0x1593b0){return _0x160404-_0x1593b0;}},_0x28bae3=this[_0x27f403(0xf2)]['get'](_0x2e3c39),_0x28b749=_0x28bae3?_0xa1af8d['GTZPw'](Date['now'](),_0x28bae3):undefined;this['phaseStartTimes'][_0x27f403(0xf8)](_0x2e3c39);const _0x325acb=this[_0x27f403(0x102)]({'eventType':'phase_end','phase':_0x2e3c39,'durationMs':_0x28b749,'metadata':_0x5aeefc});this['buffer'][_0x27f403(0x101)](_0x325acb),this[_0x27f403(0x10d)]['length']>=0xa&&this['flushAsync']();}async[_0x4cf70b(0xd1)](_0x422ae9,_0x3c38f5,_0x387be3){const _0x1d40ac=_0x4cf70b,_0x3e27a3={'sWmHy':function(_0x46b5c5,_0x2693c7){return _0x46b5c5 instanceof _0x2693c7;},'AeZvp':'Unknown'},_0x52645e=this['phaseStartTimes']['get'](_0x422ae9),_0x29680b=_0x52645e?Date[_0x1d40ac(0x115)]()-_0x52645e:undefined;this['phaseStartTimes'][_0x1d40ac(0xf8)](_0x422ae9);const _0x46b5da=this[_0x1d40ac(0x102)]({'eventType':_0x1d40ac(0x108),'phase':_0x422ae9,'durationMs':_0x29680b,'errorMessage':truncate(_0x3e27a3['sWmHy'](_0x3c38f5,Error)?_0x3c38f5[_0x1d40ac(0xd7)]:String(_0x3c38f5),0x1f4),'errorType':_0x3e27a3[_0x1d40ac(0xe9)](_0x3c38f5,Error)?_0x3c38f5[_0x1d40ac(0x10b)][_0x1d40ac(0xdd)]:_0x3e27a3['AeZvp'],'metadata':_0x387be3});await this[_0x1d40ac(0x10a)](_0x46b5da);}async['flush'](){const _0x2394d9=_0x4cf70b,_0x3b381d={'VHDKA':function(_0x59dc1b,_0x219c9d){return _0x59dc1b===_0x219c9d;}};if(_0x3b381d[_0x2394d9(0xfa)](this['buffer'][_0x2394d9(0xfc)],0x0))return;const _0x30c564=this['buffer']['splice'](0x0);try{await this[_0x2394d9(0xd9)](_0x30c564);}catch{}}[_0x4cf70b(0x102)](_0x222f0a){const _0x2bc2ea=_0x4cf70b;return{'eventType':_0x222f0a['eventType'],'command':this['command'],'commandId':this[_0x2bc2ea(0x10e)],'deviceId':this[_0x2bc2ea(0x10c)],'timestamp':new Date()['toISOString'](),'durationMs':_0x222f0a['durationMs'],'phase':_0x222f0a[_0x2bc2ea(0xe7)],'phaseIndex':_0x222f0a[_0x2bc2ea(0xd3)],'outcome':_0x222f0a[_0x2bc2ea(0xff)],'errorMessage':_0x222f0a['errorMessage'],'errorType':_0x222f0a['errorType'],'featureId':this[_0x2bc2ea(0xde)],'checklistItemId':this[_0x2bc2ea(0xf3)],'browserSessionId':this[_0x2bc2ea(0x10f)],'transport':this[_0x2bc2ea(0xee)],'evaluation':_0x222f0a['evaluation'],'cliVersion':this['cliVersion'],'nodeVersion':this[_0x2bc2ea(0xf0)],'platform':this['platform'],'cwd':process[_0x2bc2ea(0x111)](),'isTty':this[_0x2bc2ea(0xfd)],'isCI':this[_0x2bc2ea(0xec)],'metadata':_0x222f0a[_0x2bc2ea(0xef)]};}async[_0x4cf70b(0x10a)](_0x464051){try{await this['sendBatch']([_0x464051]);}catch{}}['flushAsync'](){const _0x5b4f47=_0x4cf70b;if(this[_0x5b4f47(0x113)])return;this[_0x5b4f47(0x113)]=this['flush']()['finally'](()=>{const _0x27b77d=_0x5b4f47;this[_0x27b77d(0x113)]=null;});}async[_0x4cf70b(0xd9)](_0x54679b){const _0x50776a=_0x4cf70b,_0x5b2fea={'nfjIu':function(_0x11d6ed){return _0x11d6ed();},'ThaLf':'application/json','tGfJA':function(_0x54a388,_0x431e59,_0x1c1f61){return _0x54a388(_0x431e59,_0x1c1f61);},'skuzm':'POST'},_0x4e6f1b=await _0x5b2fea['nfjIu'](getToken)[_0x50776a(0xcf)](()=>null),_0x2347f1=_0x5b2fea['nfjIu'](getApiBaseUrl),_0x5db9aa={'Content-Type':_0x5b2fea['ThaLf']};_0x4e6f1b&&(_0x5db9aa['Authorization']='Bearer\x20'+_0x4e6f1b);const _0x264dc0={'events':_0x54679b};process['env']['DEBUG']&&console['error'](_0x50776a(0x110)+_0x54679b[_0x50776a(0xfc)]+'\x20event(s)\x20to\x20'+_0x2347f1+_0x50776a(0x100));const _0x25a112=new AbortController(),_0x5653af=setTimeout(()=>_0x25a112[_0x50776a(0xed)](),0x1388);try{await _0x5b2fea['tGfJA'](fetch,_0x2347f1+_0x50776a(0x100),{'method':_0x5b2fea['skuzm'],'headers':_0x5db9aa,'body':JSON['stringify'](_0x264dc0),'signal':_0x25a112[_0x50776a(0x105)]});}finally{clearTimeout(_0x5653af);}}}let currentCollector=null;export function createTelemetryCollector(_0x21a515){return currentCollector=new TelemetryCollector(_0x21a515),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x5dc788,_0x5ebe21,_0x3a8c7b){const _0x33eecc=_0x4cf70b,_0x5076ef={'GSMEY':_0x33eecc(0xda)},_0xd78ee4=createTelemetryCollector(_0x5dc788);await _0xd78ee4[_0x33eecc(0x107)](_0x3a8c7b);try{const _0x56637f=await _0x5ebe21(_0xd78ee4);return await _0xd78ee4[_0x33eecc(0xd4)](_0x5076ef['GSMEY']),_0x56637f;}catch(_0x18c21e){await _0xd78ee4[_0x33eecc(0xe4)](_0x18c21e);throw _0x18c21e;}finally{await _0xd78ee4['flush']();}}function truncate(_0x2feaa9,_0x56ff85){const _0x24a81c=_0x4cf70b,_0x69de37={'EVSrN':function(_0x552caa,_0x1b1f95){return _0x552caa+_0x1b1f95;}};return _0x2feaa9['length']>_0x56ff85?_0x69de37[_0x24a81c(0xe8)](_0x2feaa9[_0x24a81c(0xe5)](0x0,_0x56ff85),'...'):_0x2feaa9;}
|
|
1
|
+
const _0x181987=_0x3f6e;(function(_0x7be55d,_0x12e6b5){const _0x1761f0=_0x3f6e,_0x4fa3b6=_0x7be55d();while(!![]){try{const _0x49aa63=-parseInt(_0x1761f0(0xe6))/0x1+-parseInt(_0x1761f0(0xf6))/0x2*(parseInt(_0x1761f0(0xc7))/0x3)+-parseInt(_0x1761f0(0x103))/0x4+-parseInt(_0x1761f0(0xbd))/0x5+parseInt(_0x1761f0(0xd8))/0x6*(parseInt(_0x1761f0(0xbc))/0x7)+parseInt(_0x1761f0(0x100))/0x8+-parseInt(_0x1761f0(0xf4))/0x9*(-parseInt(_0x1761f0(0xda))/0xa);if(_0x49aa63===_0x12e6b5)break;else _0x4fa3b6['push'](_0x4fa3b6['shift']());}catch(_0x4062a5){_0x4fa3b6['push'](_0x4fa3b6['shift']());}}}(_0x3484,0xdf32b));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';function _0x3f6e(_0x540f26,_0x5c90a5){_0x540f26=_0x540f26-0xb9;const _0x3484ff=_0x3484();let _0x3f6e92=_0x3484ff[_0x540f26];return _0x3f6e92;}function _0x3484(){const _0x466d3e=['sendImmediate','command','phase_start','trackPhaseStart','FedjN','buffer','now','finally','RltIz','evaluation','featureId','198pDKlDk','mPZZd','2iSfHTY','gMbwU','oQoTO','stRTQ','phaseStartTimes','phaseCounter','cliVersion','checklistItemId','transport','flushAsync','11889344SBMVKm','commandId','.ranger','5334040BCeBwU','Unknown','trackCommandEnd','trackPhaseError','commandStartTime','command_start','KhFBR','application/json','toISOString','message','NGjUZ','eventType','env','pyRbu','161AGHTGv','4728830pjyXxJ','errorMessage','POST','Iczie','oxSgp','split','error','phaseIndex','oRWqp','cwd','54441oRTrXV','PEXwt','flush','signal','flushing','platform','set','utf-8','trackCommandError','push','MxaVi','GITHUB_ACTIONS','YjPeB','buildEvent','constructor','8|3|7|1|2|0|4|5|6','length','10374lzoWtG','delete','1417040HZjVAE','phase_error','...','trackCommandStart','outcome','sendBatch','oVrNM','eohbA','abort','isCI','isTty','nodeVersion','1431781pBmoBE','errorType','command_end'];_0x3484=function(){return _0x466d3e;};return _0x3484();}let cachedDeviceId=null;function getDeviceId(){const _0x1d4df0=_0x3f6e,_0x5939a4={'YjPeB':function(_0x1f2d8f,_0x29d325,_0x540211){return _0x1f2d8f(_0x29d325,_0x540211);},'eohbA':function(_0x334505,_0x3034c1,_0x177a3f){return _0x334505(_0x3034c1,_0x177a3f);},'sXnGy':'.session','rnFsc':function(_0x6fe2c,_0x4fc209,_0x41e9f6){return _0x6fe2c(_0x4fc209,_0x41e9f6);},'pyRbu':function(_0x543cd9){return _0x543cd9();},'oxSgp':function(_0x3927d6){return _0x3927d6();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x18d795=_0x5939a4[_0x1d4df0(0xd3)](join,homedir(),_0x1d4df0(0x102)),_0xec18c3=_0x5939a4[_0x1d4df0(0xe1)](join,_0x18d795,_0x5939a4['sXnGy']);if(existsSync(_0xec18c3)){cachedDeviceId=_0x5939a4['rnFsc'](readFileSync,_0xec18c3,_0x1d4df0(0xce))['trim']();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=_0x5939a4[_0x1d4df0(0xbb)](randomUUID),mkdirSync(_0x18d795,{'recursive':!![]}),writeFileSync(_0xec18c3,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x5939a4[_0x1d4df0(0xc1)](randomUUID),cachedDeviceId;}}export class TelemetryCollector{['buffer']=[];[_0x181987(0x101)];[_0x181987(0xea)];['commandStartTime'];[_0x181987(0xfb)]=0x0;[_0x181987(0xfa)]=new Map();['flushing']=null;['deviceId'];[_0x181987(0xfc)];['nodeVersion'];['platform'];['isTty'];[_0x181987(0xe3)];[_0x181987(0xf3)];[_0x181987(0xfd)];['browserSessionId'];[_0x181987(0xfe)];constructor(_0x4c84ae){const _0x395db4=_0x181987,_0x2c60e9={'MxaVi':_0x395db4(0xd6),'oRWqp':function(_0x596243){return _0x596243();}},_0x5be73f=_0x2c60e9[_0x395db4(0xd1)][_0x395db4(0xc2)]('|');let _0x467c2f=0x0;while(!![]){switch(_0x5be73f[_0x467c2f++]){case'0':this[_0x395db4(0xe5)]=process['version'];continue;case'1':this['deviceId']=getDeviceId();continue;case'2':this['cliVersion']=_0x2c60e9[_0x395db4(0xc5)](getCurrentVersion);continue;case'3':this['command']=_0x4c84ae;continue;case'4':this[_0x395db4(0xcc)]=process[_0x395db4(0xcc)];continue;case'5':this[_0x395db4(0xe4)]=process['stdout']['isTTY']??![];continue;case'6':this['isCI']=!!(process[_0x395db4(0xba)]['CI']||process[_0x395db4(0xba)][_0x395db4(0xd2)]);continue;case'7':this[_0x395db4(0x107)]=Date['now']();continue;case'8':this['commandId']=randomUUID();continue;}break;}}['setContext'](_0x30aa87){const _0x217c53=_0x181987;if(_0x30aa87[_0x217c53(0xf3)])this[_0x217c53(0xf3)]=_0x30aa87[_0x217c53(0xf3)];if(_0x30aa87['checklistItemId'])this[_0x217c53(0xfd)]=_0x30aa87[_0x217c53(0xfd)];if(_0x30aa87['browserSessionId'])this['browserSessionId']=_0x30aa87['browserSessionId'];if(_0x30aa87[_0x217c53(0xfe)])this['transport']=_0x30aa87[_0x217c53(0xfe)];}async[_0x181987(0xdd)](_0xad59ce){const _0x47ae26=_0x181987,_0x4fbafa=this['buildEvent']({'eventType':_0x47ae26(0x108),'metadata':_0xad59ce});await this[_0x47ae26(0xe9)](_0x4fbafa);}async['trackCommandEnd'](_0x137b04,_0x96bf3c){const _0x7ce80a=_0x181987,_0x4feef4={'rDYhl':_0x7ce80a(0xe8),'RltIz':function(_0x1d9289,_0x22de69){return _0x1d9289-_0x22de69;}},_0x3293b0=this[_0x7ce80a(0xd4)]({'eventType':_0x4feef4['rDYhl'],'outcome':_0x137b04,'durationMs':_0x4feef4[_0x7ce80a(0xf1)](Date['now'](),this[_0x7ce80a(0x107)]),'metadata':_0x96bf3c});await this['sendImmediate'](_0x3293b0),await this[_0x7ce80a(0xc9)]();}async['trackCommandError'](_0x4b1f75,_0x35cf01){const _0x2100b4=_0x181987,_0x125050={'oCaxn':'command_error','oVrNM':function(_0x34daac,_0x31e437){return _0x34daac instanceof _0x31e437;},'Iczie':function(_0x3845c8,_0x34543c){return _0x3845c8 instanceof _0x34543c;},'qlJbb':'Unknown','BGgfA':function(_0x16bc3a,_0x27102f){return _0x16bc3a-_0x27102f;}},_0x2bafc1=this[_0x2100b4(0xd4)]({'eventType':_0x125050['oCaxn'],'errorMessage':truncate(_0x125050[_0x2100b4(0xe0)](_0x4b1f75,Error)?_0x4b1f75[_0x2100b4(0x10c)]:String(_0x4b1f75),0x1f4),'errorType':_0x125050[_0x2100b4(0xc0)](_0x4b1f75,Error)?_0x4b1f75[_0x2100b4(0xd5)]['name']:_0x125050['qlJbb'],'durationMs':_0x125050['BGgfA'](Date['now'](),this['commandStartTime']),'metadata':_0x35cf01});await this[_0x2100b4(0xe9)](_0x2bafc1),await this['flush']();}[_0x181987(0xec)](_0x11bfec,_0x22d903){const _0xab6178=_0x181987;this[_0xab6178(0xfb)]++,this[_0xab6178(0xfa)][_0xab6178(0xcd)](_0x11bfec,Date['now']());const _0x26b513=this[_0xab6178(0xd4)]({'eventType':_0xab6178(0xeb),'phase':_0x11bfec,'phaseIndex':this['phaseCounter'],'metadata':_0x22d903});this[_0xab6178(0xee)]['push'](_0x26b513);}['trackPhaseEnd'](_0xd2caf8,_0x3aacb3){const _0x3ce137=_0x181987,_0x487dbe={'voYnX':function(_0xd8af14,_0x5567ae){return _0xd8af14>=_0x5567ae;}},_0x3c4a98=this['phaseStartTimes']['get'](_0xd2caf8),_0x455a9e=_0x3c4a98?Date[_0x3ce137(0xef)]()-_0x3c4a98:undefined;this[_0x3ce137(0xfa)][_0x3ce137(0xd9)](_0xd2caf8);const _0x2c59ef=this['buildEvent']({'eventType':'phase_end','phase':_0xd2caf8,'durationMs':_0x455a9e,'metadata':_0x3aacb3});this[_0x3ce137(0xee)][_0x3ce137(0xd0)](_0x2c59ef),_0x487dbe['voYnX'](this['buffer']['length'],0xa)&&this['flushAsync']();}async[_0x181987(0x106)](_0x184474,_0x109436,_0xc9af87){const _0x3802cc=_0x181987,_0x4320c7={'NGjUZ':function(_0x332241,_0x47f665){return _0x332241-_0x47f665;},'ShKNU':function(_0x3c89f6,_0x17fdef,_0x53cf91){return _0x3c89f6(_0x17fdef,_0x53cf91);},'YnIOZ':function(_0x279382,_0x2967ef){return _0x279382 instanceof _0x2967ef;},'hDgxl':function(_0x4318ff,_0x6af7a0){return _0x4318ff(_0x6af7a0);},'FedjN':_0x3802cc(0x104)},_0x42c1fb=this['phaseStartTimes']['get'](_0x184474),_0xfd125b=_0x42c1fb?_0x4320c7[_0x3802cc(0x10d)](Date['now'](),_0x42c1fb):undefined;this['phaseStartTimes']['delete'](_0x184474);const _0x4805bc=this['buildEvent']({'eventType':_0x3802cc(0xdb),'phase':_0x184474,'durationMs':_0xfd125b,'errorMessage':_0x4320c7['ShKNU'](truncate,_0x4320c7['YnIOZ'](_0x109436,Error)?_0x109436['message']:_0x4320c7['hDgxl'](String,_0x109436),0x1f4),'errorType':_0x109436 instanceof Error?_0x109436[_0x3802cc(0xd5)]['name']:_0x4320c7[_0x3802cc(0xed)],'metadata':_0xc9af87});await this[_0x3802cc(0xe9)](_0x4805bc);}async[_0x181987(0xc9)](){const _0x30be05=_0x181987,_0x2ecea={'jxbKX':function(_0x1e2c3c,_0x1683b5){return _0x1e2c3c===_0x1683b5;}};if(_0x2ecea['jxbKX'](this['buffer'][_0x30be05(0xd7)],0x0))return;const _0x1bdef5=this[_0x30be05(0xee)]['splice'](0x0);try{await this['sendBatch'](_0x1bdef5);}catch{}}[_0x181987(0xd4)](_0x4ed596){const _0x589b0d=_0x181987;return{'eventType':_0x4ed596[_0x589b0d(0xb9)],'command':this[_0x589b0d(0xea)],'commandId':this[_0x589b0d(0x101)],'deviceId':this['deviceId'],'timestamp':new Date()[_0x589b0d(0x10b)](),'durationMs':_0x4ed596['durationMs'],'phase':_0x4ed596['phase'],'phaseIndex':_0x4ed596[_0x589b0d(0xc4)],'outcome':_0x4ed596[_0x589b0d(0xde)],'errorMessage':_0x4ed596[_0x589b0d(0xbe)],'errorType':_0x4ed596[_0x589b0d(0xe7)],'featureId':this['featureId'],'checklistItemId':this[_0x589b0d(0xfd)],'browserSessionId':this['browserSessionId'],'transport':this['transport'],'evaluation':_0x4ed596[_0x589b0d(0xf2)],'cliVersion':this['cliVersion'],'nodeVersion':this[_0x589b0d(0xe5)],'platform':this[_0x589b0d(0xcc)],'cwd':process[_0x589b0d(0xc6)](),'isTty':this['isTty'],'isCI':this[_0x589b0d(0xe3)],'metadata':_0x4ed596['metadata']};}async['sendImmediate'](_0x5c6454){const _0x3ac7da=_0x181987;try{await this[_0x3ac7da(0xdf)]([_0x5c6454]);}catch{}}[_0x181987(0xff)](){const _0x35886e=_0x181987;if(this[_0x35886e(0xcb)])return;this['flushing']=this[_0x35886e(0xc9)]()[_0x35886e(0xf0)](()=>{this['flushing']=null;});}async['sendBatch'](_0x483b29){const _0x2ba9f6=_0x181987,_0x8ac86b={'biwKR':function(_0x34a0a9){return _0x34a0a9();},'PEXwt':'Authorization','stRTQ':function(_0x2947dd,_0x2a471f,_0x46676f){return _0x2947dd(_0x2a471f,_0x46676f);},'gMbwU':_0x2ba9f6(0xbf)},_0x19626e=await _0x8ac86b['biwKR'](getToken)['catch'](()=>null),_0x4933eb=getApiBaseUrl(),_0x33b8ce={'Content-Type':_0x2ba9f6(0x10a)};_0x19626e&&(_0x33b8ce[_0x8ac86b[_0x2ba9f6(0xc8)]]='Bearer\x20'+_0x19626e);const _0x5a8daf={'events':_0x483b29};process['env']['DEBUG']&&console[_0x2ba9f6(0xc3)]('[telemetry]\x20Sending\x20'+_0x483b29['length']+'\x20event(s)\x20to\x20'+_0x4933eb+'/api/v1/mcp/cli-telemetry');const _0x3fb151=new AbortController(),_0x487661=_0x8ac86b[_0x2ba9f6(0xf9)](setTimeout,()=>_0x3fb151[_0x2ba9f6(0xe2)](),0x1388);try{await fetch(_0x4933eb+'/api/v1/mcp/cli-telemetry',{'method':_0x8ac86b[_0x2ba9f6(0xf7)],'headers':_0x33b8ce,'body':JSON['stringify'](_0x5a8daf),'signal':_0x3fb151[_0x2ba9f6(0xca)]});}finally{clearTimeout(_0x487661);}}}let currentCollector=null;export function createTelemetryCollector(_0x5f1784){return currentCollector=new TelemetryCollector(_0x5f1784),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x5e2d22,_0xd3f0f5,_0x313d92){const _0x3ef004=_0x181987,_0x142304={'oQoTO':function(_0x720557,_0x3a5ba0){return _0x720557(_0x3a5ba0);},'KhFBR':'success'},_0x3bf822=_0x142304[_0x3ef004(0xf8)](createTelemetryCollector,_0x5e2d22);await _0x3bf822['trackCommandStart'](_0x313d92);try{const _0x52915b=await _0xd3f0f5(_0x3bf822);return await _0x3bf822[_0x3ef004(0x105)](_0x142304[_0x3ef004(0x109)]),_0x52915b;}catch(_0x2d233e){await _0x3bf822[_0x3ef004(0xcf)](_0x2d233e);throw _0x2d233e;}finally{await _0x3bf822['flush']();}}function truncate(_0x3e2ed2,_0x13c4c){const _0x1378ba=_0x181987,_0x37a1e9={'mPZZd':function(_0x1ae5bd,_0xb40a19){return _0x1ae5bd>_0xb40a19;}};return _0x37a1e9[_0x1378ba(0xf5)](_0x3e2ed2[_0x1378ba(0xd7)],_0x13c4c)?_0x3e2ed2['slice'](0x0,_0x13c4c)+_0x1378ba(0xdc):_0x3e2ed2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2615d3,_0x1634a2){const _0x212c8a=_0x3e34,_0x5c8430=_0x2615d3();while(!![]){try{const _0x2bf101=parseInt(_0x212c8a(0xa2))/0x1*(-parseInt(_0x212c8a(0x96))/0x2)+parseInt(_0x212c8a(0x9c))/0x3*(parseInt(_0x212c8a(0xa3))/0x4)+parseInt(_0x212c8a(0xa7))/0x5*(parseInt(_0x212c8a(0x9a))/0x6)+parseInt(_0x212c8a(0xa0))/0x7*(parseInt(_0x212c8a(0xa1))/0x8)+-parseInt(_0x212c8a(0x9f))/0x9*(-parseInt(_0x212c8a(0xa9))/0xa)+-parseInt(_0x212c8a(0x99))/0xb+parseInt(_0x212c8a(0x95))/0xc*(-parseInt(_0x212c8a(0x97))/0xd);if(_0x2bf101===_0x1634a2)break;else _0x5c8430['push'](_0x5c8430['shift']());}catch(_0x4201fd){_0x5c8430['push'](_0x5c8430['shift']());}}}(_0x5a28,0x2b0af));import{getApiBaseUrl}from'./environment.js';import{getRefreshToken,storeToken,storeRefreshToken}from'./keychain.js';export async function refreshCliToken(){const _0x59b9cb=_0x3e34,_0x2e6d97={'ucpaD':function(_0x1b8349,_0x31edd4){return _0x1b8349(_0x31edd4);},'ZEZwQ':function(_0x4dfad5,_0x21b6a3){return _0x4dfad5(_0x21b6a3);}},_0x3ec62b=await getRefreshToken();if(!_0x3ec62b)return null;const _0x5ee159=await _0x2e6d97[_0x59b9cb(0xa4)](tryPartnerRefresh,_0x3ec62b);if(_0x5ee159)return _0x5ee159;return _0x2e6d97[_0x59b9cb(0x9d)](tryWorkosRefresh,_0x3ec62b);}export async function refreshPartnerCliToken(_0x47cf43,_0x351590={}){const _0x3321c8=await tryPartnerRefresh(_0x47cf43);return _0x3321c8&&_0x351590['persistRefreshToken']&&await storeRefreshToken(_0x47cf43),_0x3321c8;}function _0x3e34(_0x5b85b6,_0x31443a){_0x5b85b6=_0x5b85b6-0x94;const _0x5a2812=_0x5a28();let _0x3e3436=_0x5a2812[_0x5b85b6];return _0x3e3436;}async function tryPartnerRefresh(_0x26c09f){const _0x1d16f2=_0x3e34,_0x5ff6cc={'ZHNpF':function(_0x2dd6ec){return _0x2dd6ec();},'aLnbM':function(_0x1fb575,_0x1273c1,_0x8f4271){return _0x1fb575(_0x1273c1,_0x8f4271);},'fUVEi':function(_0xcb697,_0x161a37){return _0xcb697(_0x161a37);}},_0x337a07=_0x5ff6cc[_0x1d16f2(0x98)](getApiBaseUrl);try{const _0x5a70d6=await _0x5ff6cc[_0x1d16f2(0xa6)](fetch,_0x337a07+'/cli-auth/partner-refresh',{'method':_0x1d16f2(0xa5),'headers':{'Content-Type':_0x1d16f2(0x94)},'body':JSON[_0x1d16f2(0x9e)]({'refreshToken':_0x26c09f}),'signal':AbortSignal['timeout'](0x2710)});if(!_0x5a70d6['ok'])return null;const _0x365300=await _0x5a70d6[_0x1d16f2(0x9b)]();return await _0x5ff6cc['fUVEi'](storeToken,_0x365300['token']),_0x365300[_0x1d16f2(0xa8)];}catch{return null;}}function _0x5a28(){const _0x5bdea9=['token','10QHLYyj','application/json','24mwObpL','27442PzZuUG','2018705OkNoAl','ZHNpF','281600qCWKoQ','18WaCfxf','json','75gSbVYM','ZEZwQ','stringify','1423323pLSPkj','473256aJVqGV','8RNzsLf','20uwvgiB','50436XWGhio','ucpaD','POST','aLnbM','409855gEEFxT'];_0x5a28=function(){return _0x5bdea9;};return _0x5a28();}async function tryWorkosRefresh(_0x406138){const _0x495349=_0x3e34,_0x29187a={'Ydwlg':function(_0x2fbec6,_0x21b105,_0x1e080c){return _0x2fbec6(_0x21b105,_0x1e080c);},'zkdgj':function(_0x5969c6,_0x5d8555){return _0x5969c6(_0x5d8555);}},_0x4b9db6=getApiBaseUrl();try{const _0xe90575=await _0x29187a['Ydwlg'](fetch,_0x4b9db6+'/cli-auth/refresh',{'method':_0x495349(0xa5),'headers':{'Content-Type':_0x495349(0x94)},'body':JSON['stringify']({'refreshToken':_0x406138}),'signal':AbortSignal['timeout'](0x2710)});if(!_0xe90575['ok'])return null;const _0x46ac1d=await _0xe90575[_0x495349(0x9b)]();return await _0x29187a['zkdgj'](storeToken,_0x46ac1d[_0x495349(0xa8)]),await storeRefreshToken(_0x46ac1d['refreshToken']),_0x46ac1d['token'];}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x49f6(_0x123f58,_0x779bd2){_0x123f58=_0x123f58-0x10e;const _0x1c1ecb=_0x1c1e();let _0x49f65a=_0x1c1ecb[_0x123f58];return _0x49f65a;}(function(_0x561160,_0x4a9de4){const _0x380752=_0x49f6,_0x336358=_0x561160();while(!![]){try{const _0x380713=-parseInt(_0x380752(0x140))/0x1+parseInt(_0x380752(0x120))/0x2*(parseInt(_0x380752(0x122))/0x3)+-parseInt(_0x380752(0x115))/0x4+parseInt(_0x380752(0x11b))/0x5+-parseInt(_0x380752(0x124))/0x6*(parseInt(_0x380752(0x111))/0x7)+-parseInt(_0x380752(0x127))/0x8*(-parseInt(_0x380752(0x118))/0x9)+parseInt(_0x380752(0x11d))/0xa*(parseInt(_0x380752(0x11e))/0xb);if(_0x380713===_0x4a9de4)break;else _0x336358['push'](_0x336358['shift']());}catch(_0x2d26c0){_0x336358['push'](_0x336358['shift']());}}}(_0x1c1e,0xba412));import{readdir,readFile}from'fs/promises';import{join}from'path';export async function mapStepsToTraceSnapshots(_0x360227,_0x55b348){const _0x4d9c48=_0x49f6,_0x260b52={'CPOJk':function(_0xae060e,_0x5b83f2){return _0xae060e(_0x5b83f2);},'WMFKS':_0x4d9c48(0x12f),'NNZMH':function(_0x46b7e2,_0x5175b1,_0x5007b8){return _0x46b7e2(_0x5175b1,_0x5007b8);},'YertK':'utf-8','zKIHw':function(_0x244b7d,_0x438c22){return _0x244b7d-_0x438c22;},'XrMDV':_0x4d9c48(0x13d),'tCcvR':'input','SLMVy':function(_0x4e3138,_0x4bd2df){return _0x4e3138===_0x4bd2df;},'QtUjd':'frame-snapshot','BaifU':_0x4d9c48(0x129),'flCgJ':_0x4d9c48(0x130),'xweIb':function(_0x181801,_0x522157){return _0x181801===_0x522157;},'Lcxce':'string','zAqQJ':function(_0x3dcc4a,_0x6f875c){return _0x3dcc4a===_0x6f875c;},'luwKb':'goto','vmDLV':function(_0x5734ae,_0x2a3bcc){return _0x5734ae>=_0x2a3bcc;},'DHbCO':function(_0x1f7e01,_0x3de1da){return _0x1f7e01+_0x3de1da;}},_0x22d903=new Map();if(_0x55b348['length']===0x0)return _0x22d903;const _0x4e7d29=[],_0x364414=async _0x3b46db=>{const _0x519499=_0x4d9c48,_0x2a31e7=await readdir(_0x3b46db,{'withFileTypes':!![]});for(const _0x2129a0 of _0x2a31e7){const _0x5d648d=join(_0x3b46db,_0x2129a0['name']);if(_0x2129a0[_0x519499(0x125)]())await _0x260b52['CPOJk'](_0x364414,_0x5d648d);else _0x2129a0['name']['endsWith'](_0x260b52[_0x519499(0x116)])&&_0x4e7d29['push'](_0x5d648d);}};await _0x364414(_0x360227);if(_0x4e7d29['length']===0x0)return _0x22d903;const _0x3db145=[];for(const _0x513a04 of _0x4e7d29){const _0x10b3bd=await _0x260b52[_0x4d9c48(0x113)](readFile,_0x513a04,_0x260b52['YertK']),_0x3d12ba=_0x10b3bd[_0x4d9c48(0x137)]('\x0a')['filter'](_0x2bd2c3=>_0x2bd2c3['trim']());for(const _0x5e265d of _0x3d12ba){try{_0x3db145[_0x4d9c48(0x13b)](JSON['parse'](_0x5e265d));}catch{}}}if(_0x3db145['length']===0x0)return _0x22d903;const _0x1b6410=_0x3db145[_0x4d9c48(0x11f)](_0x3bca7b=>_0x3bca7b[_0x4d9c48(0x10f)]==='context-options');if(!_0x1b6410)return _0x22d903;const _0x1db586=_0x260b52['zKIHw'](_0x1b6410['wallTime'],_0x1b6410[_0x4d9c48(0x119)]),_0x4dbc34=new Map();for(const _0x57241e of _0x3db145){switch(_0x57241e[_0x4d9c48(0x10f)]){case _0x260b52['XrMDV']:{const _0x45c02f=_0x57241e;_0x4dbc34[_0x4d9c48(0x142)](_0x45c02f['callId'],{'callId':_0x45c02f['callId'],'startTime':_0x45c02f[_0x4d9c48(0x11c)],'endTime':0x0,'method':_0x45c02f['method'],'apiName':_0x45c02f[_0x4d9c48(0x112)],'params':_0x45c02f[_0x4d9c48(0x138)],'pageId':_0x45c02f['pageId'],'beforeSnapshot':_0x45c02f[_0x4d9c48(0x12c)]});break;}case _0x260b52[_0x4d9c48(0x134)]:{const _0x5b38bf=_0x57241e,_0x7aafb6=_0x4dbc34[_0x4d9c48(0x131)](_0x5b38bf['callId']);if(_0x7aafb6){if(_0x5b38bf[_0x4d9c48(0x110)])_0x7aafb6['inputSnapshot']=_0x5b38bf['inputSnapshot'];if(_0x5b38bf['point'])_0x7aafb6[_0x4d9c48(0x114)]=_0x5b38bf['point'];}break;}case'after':{const _0x39769b=_0x57241e,_0x4d0531=_0x4dbc34[_0x4d9c48(0x131)](_0x39769b['callId']);if(_0x4d0531){_0x4d0531['endTime']=_0x39769b[_0x4d9c48(0x13e)];if(_0x39769b[_0x4d9c48(0x13f)])_0x4d0531['afterSnapshot']=_0x39769b[_0x4d9c48(0x13f)];}break;}}}const _0x4288fe=Array[_0x4d9c48(0x121)](_0x4dbc34[_0x4d9c48(0x135)]())['filter'](_0x4c10ea=>_0x4c10ea['endTime']>0x0&&(_0x4c10ea['afterSnapshot']||_0x4c10ea[_0x4d9c48(0x12c)]))[_0x4d9c48(0x13a)]((_0x1b23a3,_0x59117a)=>_0x1b23a3['startTime']-_0x59117a['startTime']);if(_0x4288fe['length']===0x0)return _0x22d903;const _0x53da35=new Map();for(const _0x445d87 of _0x3db145){if(_0x260b52[_0x4d9c48(0x139)](_0x445d87[_0x4d9c48(0x10f)],_0x260b52['QtUjd'])){const _0x83a49=_0x445d87['snapshot'];_0x83a49?.[_0x4d9c48(0x12b)]&&_0x83a49?.['frameUrl']&&_0x53da35['set'](_0x83a49[_0x4d9c48(0x12b)],_0x83a49['frameUrl']);}}const _0x17cc63=new Map();for(const _0x57c510 of _0x4288fe){const _0x105a59=_0x57c510[_0x4d9c48(0x138)]?.['url'];_0x57c510['method']==='goto'&&typeof _0x105a59===_0x4d9c48(0x143)&&_0x57c510[_0x4d9c48(0x11a)]&&_0x17cc63['set'](_0x57c510['pageId'],_0x105a59);}for(const _0x50d8d8 of _0x3db145){const _0x435f53=_0x50d8d8,_0xc584c3=_0x435f53[_0x4d9c48(0x138)],_0x1fe3ff=_0xc584c3?.[_0x4d9c48(0x10e)];_0x435f53['type']===_0x260b52[_0x4d9c48(0x123)]&&_0x260b52['SLMVy'](_0x435f53['method'],_0x260b52['flCgJ'])&&_0x260b52[_0x4d9c48(0x132)](typeof _0x1fe3ff,_0x4d9c48(0x143))&&typeof _0x435f53['pageId']===_0x260b52['Lcxce']&&_0x17cc63['set'](_0x435f53['pageId'],_0x1fe3ff);}for(const _0x373e9f of _0x55b348){const _0x36bae8=new Date(_0x373e9f[_0x4d9c48(0x126)])[_0x4d9c48(0x141)](),_0x2a6c57=_0x260b52[_0x4d9c48(0x136)](_0x36bae8,_0x1db586);let _0x5c3b6b=null,_0x4d4e07=Infinity;for(const _0x2115d3 of _0x4288fe){const _0x2c643e=Math[_0x4d9c48(0x12a)](_0x2115d3['endTime']-_0x2a6c57);_0x2c643e<_0x4d4e07&&(_0x4d4e07=_0x2c643e,_0x5c3b6b=_0x2115d3);}if(!_0x5c3b6b)continue;const _0x4d5b68=_0x5c3b6b[_0x4d9c48(0x13f)]||_0x5c3b6b['beforeSnapshot'];if(!_0x4d5b68)continue;const _0xf3f58e=_0x5c3b6b['pageId']||_0x4d9c48(0x133);let _0x2a4af4=_0x53da35[_0x4d9c48(0x131)](_0x4d5b68)||_0x17cc63['get'](_0xf3f58e)||'';if(!_0x2a4af4)for(let _0x4a4a8e=_0x4288fe['indexOf'](_0x5c3b6b);_0x4a4a8e>=0x0;_0x4a4a8e--){const _0x52f3e4=_0x4288fe[_0x4a4a8e][_0x4d9c48(0x138)]?.[_0x4d9c48(0x10e)];if(_0x260b52['zAqQJ'](_0x4288fe[_0x4a4a8e][_0x4d9c48(0x128)],_0x260b52['luwKb'])&&_0x260b52[_0x4d9c48(0x139)](typeof _0x52f3e4,_0x260b52[_0x4d9c48(0x117)])){_0x2a4af4=_0x52f3e4;break;}}let _0x4efb6a,_0xb65190;const _0x20d7b4=_0x4288fe[_0x4d9c48(0x13c)](_0x5c3b6b);if(_0x260b52['vmDLV'](_0x20d7b4,0x0)&&_0x20d7b4<_0x4288fe[_0x4d9c48(0x12d)]-0x1){const _0x2fbdcf=_0x4288fe[_0x260b52[_0x4d9c48(0x12e)](_0x20d7b4,0x1)];_0x2fbdcf['point']&&_0x2fbdcf[_0x4d9c48(0x110)]&&(_0x4efb6a=_0x2fbdcf['point'],_0xb65190=_0x2fbdcf[_0x4d9c48(0x110)]);}_0x22d903['set'](_0x373e9f['stepId'],{'snapshotName':_0x4d5b68,'inputSnapshotName':_0xb65190,'pageId':_0xf3f58e,'pageUrl':_0x2a4af4,'callId':_0x5c3b6b['callId'],'point':_0x4efb6a});}return _0x22d903;}function _0x1c1e(){const _0x37d93c=['page@0','tCcvR','values','zKIHw','split','params','SLMVy','sort','push','indexOf','before','endTime','afterSnapshot','654079Ruvqbj','getTime','set','string','url','type','inputSnapshot','30079Yhwgmk','apiName','NNZMH','point','724940QLvceC','WMFKS','Lcxce','315EYWspi','monotonicTime','pageId','1449035dYDKlo','startTime','756940LGcoLo','22fARORV','find','4IKLUcR','from','1980594DwErjA','BaifU','1182fithxs','isDirectory','capturedAt','156144LazNCD','method','event','abs','snapshotName','beforeSnapshot','length','DHbCO','.trace','navigated','get','xweIb'];_0x1c1e=function(){return _0x37d93c;};return _0x1c1e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b0bcd,_0x50f401){const _0x3c32d1=_0x4110,_0x31304a=_0x5b0bcd();while(!![]){try{const _0x55329a=-parseInt(_0x3c32d1(0x146))/0x1*(-parseInt(_0x3c32d1(0x13e))/0x2)+-parseInt(_0x3c32d1(0x140))/0x3*(parseInt(_0x3c32d1(0x13c))/0x4)+-parseInt(_0x3c32d1(0x13d))/0x5+parseInt(_0x3c32d1(0x147))/0x6+parseInt(_0x3c32d1(0x142))/0x7*(-parseInt(_0x3c32d1(0x143))/0x8)+parseInt(_0x3c32d1(0x13b))/0x9+-parseInt(_0x3c32d1(0x148))/0xa*(-parseInt(_0x3c32d1(0x145))/0xb);if(_0x55329a===_0x50f401)break;else _0x31304a['push'](_0x31304a['shift']());}catch(_0x5de4fa){_0x31304a['push'](_0x31304a['shift']());}}}(_0x5824,0x38851));import{getApiBaseUrl}from'./environment.js';function _0x4110(_0x326693,_0x5e3660){_0x326693=_0x326693-0x13a;const _0x5824cf=_0x5824();let _0x4110ef=_0x5824cf[_0x326693];return _0x4110ef;}export async function getCurrentUser(_0x535f5d){const _0x5093a7=_0x4110,_0x4871d6={'NrJPe':function(_0x10c551){return _0x10c551();},'ravGp':'GET','GhVkM':function(_0x3e1d5b,_0x5e86fb){return _0x3e1d5b instanceof _0x5e86fb;},'SidXg':function(_0x2bfe99,_0x3ad073){return _0x2bfe99(_0x3ad073);}},_0x2021ab=_0x4871d6['NrJPe'](getApiBaseUrl);try{const _0x196dfc=await fetch(_0x2021ab+'/api/v1/mcp/me',{'method':_0x4871d6['ravGp'],'headers':{'Authorization':_0x5093a7(0x13f)+_0x535f5d}});if(!_0x196dfc['ok'])return{'success':![],'error':_0x196dfc[_0x5093a7(0x149)]+'\x20'+_0x196dfc[_0x5093a7(0x144)],'status':_0x196dfc[_0x5093a7(0x149)]};const _0x406026=await _0x196dfc['json']();return{'success':!![],'user':_0x406026};}catch(_0xd04a6a){return{'success':![],'error':_0x4871d6[_0x5093a7(0x141)](_0xd04a6a,Error)?_0xd04a6a[_0x5093a7(0x13a)]:_0x4871d6['SidXg'](String,_0xd04a6a)};}}function _0x5824(){const _0x48fb23=['32527wNLANE','11118lehCcm','1467864aAYGNE','1540KUIlsX','status','message','2039112mPDKcH','44lTxZaP','1998950cnyeyB','2HdSEBr','Bearer\x20','8754cnMbXp','GhVkM','23135MfmtXV','664pSMFVI','statusText'];_0x5824=function(){return _0x48fb23;};return _0x5824();}
|