@ranger-testing/ranger-cli 2.5.4-alpha.feb9faf-20 → 3.0.0
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/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/deleteProfile.js +1 -0
- 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 -1
- 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/novaActCli.js +1 -0
- 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/commands/verifyFeatureNovaCli.js +1 -0
- package/build/skills/ranger/SKILL.md +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x11ea68,_0x2149d9){const _0x1c23f1=_0x55b1,_0x57311d=_0x11ea68();while(!![]){try{const _0x37ff=-parseInt(_0x1c23f1(0xcb))/0x1+-parseInt(_0x1c23f1(0xbf))/0x2+-parseInt(_0x1c23f1(0xb8))/0x3+-parseInt(_0x1c23f1(0xba))/0x4+parseInt(_0x1c23f1(0xd4))/0x5+-parseInt(_0x1c23f1(0xd2))/0x6*(parseInt(_0x1c23f1(0xc3))/0x7)+-parseInt(_0x1c23f1(0xc5))/0x8*(-parseInt(_0x1c23f1(0xd3))/0x9);if(_0x37ff===_0x2149d9)break;else _0x57311d['push'](_0x57311d['shift']());}catch(_0x281c1d){_0x57311d['push'](_0x57311d['shift']());}}}(_0x3086,0x49cb1));import{existsSync,mkdirSync,readFileSync,renameSync,writeFileSync}from'fs';import{unlinkSync}from'fs';import{dirname,join}from'path';function _0x3086(){const _0x139471=['4566eeNYUz','25344kZneqI','629530EWTxZz','pfIsj','projects','GmMmu','eyGrv','isArray','frlhZ','warn','setupHeaders',').\x20Ignoring\x20local\x20profile\x20overrides.','734127UpiDke','VZrQN','2298604FnXCKf','cAPCw','length','[ranger]\x20Warning:\x20','hHVZg','1128954qRZRIq','.tmp','object','YnSlQ','4361cAjcnP','UadTL','6144pBWjKL','KfMky','message','profiles','Vklku','lastProfile','128397cTpYXn','zVVtI','NiKna','QQFlZ','headers','split','settings'];_0x3086=function(){return _0x139471;};return _0x3086();}import{getRangerHomeDir}from'./rangerRoot.js';const CURRENT_VERSION=0x1;export function getProjectsConfigPath(){const _0x543e65=_0x55b1,_0xd371a9={'rUqpT':function(_0x880e0e,_0x5df93e,_0x5dacee){return _0x880e0e(_0x5df93e,_0x5dacee);},'pfIsj':function(_0x1ff715){return _0x1ff715();}};return _0xd371a9['rUqpT'](join,_0xd371a9[_0x543e65(0xd5)](getRangerHomeDir),'projects.json');}function _0x55b1(_0x216556,_0xf1d8e3){_0x216556=_0x216556-0xb7;const _0x30861b=_0x3086();let _0x55b1ef=_0x30861b[_0x216556];return _0x55b1ef;}function emptyConfig(){return{'version':CURRENT_VERSION,'projects':{}};}export function readProjectsConfig(){const _0xe4b3f9=_0x55b1,_0x2fd0fc={'UIBhk':function(_0x1aecb7){return _0x1aecb7();},'TuWwD':function(_0xdf1e90,_0x189772){return _0xdf1e90(_0x189772);},'RtZak':function(_0x421031,_0x1cb553){return _0x421031 instanceof _0x1cb553;},'zVVtI':function(_0x1613a5,_0x17037f){return _0x1613a5(_0x17037f);},'YnSlQ':function(_0x132da2){return _0x132da2();},'FFTeh':'object','cAPCw':function(_0x3dcc2e){return _0x3dcc2e();}},_0x3ded00=_0x2fd0fc['UIBhk'](getProjectsConfigPath);if(!_0x2fd0fc['TuWwD'](existsSync,_0x3ded00))return _0x2fd0fc['UIBhk'](emptyConfig);let _0x5c8ff3;try{_0x5c8ff3=readFileSync(_0x3ded00,'utf-8');}catch(_0x44ce9b){const _0x3604c3=_0x44ce9b instanceof Error?_0x44ce9b[_0xe4b3f9(0xc7)]:String(_0x44ce9b);return console[_0xe4b3f9(0xdb)]('[ranger]\x20Warning:\x20failed\x20to\x20read\x20'+_0x3ded00+':\x20'+_0x3604c3+'.\x20Ignoring\x20local\x20profile\x20overrides.'),emptyConfig();}let _0x29486a;try{_0x29486a=JSON['parse'](_0x5c8ff3);}catch(_0x5a0959){const _0xe7172b=_0x2fd0fc['RtZak'](_0x5a0959,Error)?_0x5a0959[_0xe4b3f9(0xc7)]:_0x2fd0fc[_0xe4b3f9(0xcc)](String,_0x5a0959);return console[_0xe4b3f9(0xdb)](_0xe4b3f9(0xbd)+_0x3ded00+'\x20is\x20not\x20valid\x20JSON\x20('+_0xe7172b+_0xe4b3f9(0xb7)),_0x2fd0fc[_0xe4b3f9(0xc2)](emptyConfig);}if(!_0x29486a||typeof _0x29486a!==_0x2fd0fc['FFTeh']||Array['isArray'](_0x29486a)||_0x29486a['version']!==CURRENT_VERSION||typeof _0x29486a['projects']!==_0x2fd0fc['FFTeh']||_0x29486a[_0xe4b3f9(0xd6)]===null||Array['isArray'](_0x29486a['projects']))return console[_0xe4b3f9(0xdb)](_0xe4b3f9(0xbd)+_0x3ded00+'\x20has\x20an\x20unexpected\x20shape.\x20Ignoring\x20local\x20profile\x20overrides.'),_0x2fd0fc[_0xe4b3f9(0xbb)](emptyConfig);return _0x29486a;}export function writeProjectsConfig(_0x14353b){const _0x454a31=_0x55b1,_0x569a88={'Vklku':function(_0x2eca1f){return _0x2eca1f();},'ybjJd':function(_0x4cdc30,_0x28ebd4){return _0x4cdc30(_0x28ebd4);},'KYGmZ':'utf-8','eyGrv':function(_0x106f47,_0x4fb6c1){return _0x106f47(_0x4fb6c1);}},_0x14665c=_0x569a88[_0x454a31(0xc9)](getProjectsConfigPath),_0x434373=dirname(_0x14665c);!_0x569a88['ybjJd'](existsSync,_0x434373)&&mkdirSync(_0x434373,{'recursive':!![]});const _0x18c424=_0x14665c+'.'+process['pid']+'.'+Date['now']()+_0x454a31(0xc0),_0x40f53e=JSON['stringify'](_0x14353b,null,0x2)+'\x0a';try{writeFileSync(_0x18c424,_0x40f53e,{'encoding':_0x569a88['KYGmZ'],'mode':0x180}),renameSync(_0x18c424,_0x14665c);}catch(_0x8dec5c){try{_0x569a88[_0x454a31(0xd8)](existsSync,_0x18c424)&&_0x569a88[_0x454a31(0xd8)](unlinkSync,_0x18c424);}catch{}throw _0x8dec5c;}}export function readProfileOverrides(_0x3b8252,_0x592bee){const _0x1e5c35=_0x55b1,_0x5d99df={'NiKna':function(_0x2f5e5a){return _0x2f5e5a();}},_0xdff72=_0x5d99df[_0x1e5c35(0xcd)](readProjectsConfig),_0x220ddf=_0xdff72[_0x1e5c35(0xd6)][_0x3b8252];if(!_0x220ddf||!_0x220ddf[_0x1e5c35(0xc8)])return null;const _0x3f6474=_0x220ddf[_0x1e5c35(0xc8)][_0x592bee];if(!_0x3f6474||!_0x3f6474['settings'])return null;return _0x3f6474[_0x1e5c35(0xd1)]??null;}export function setProfileOverride(_0x3f1821,_0x51e813,_0xcb0632,_0xa843bf){const _0x17c611={'TBzns':'keyPath\x20is\x20required','OjSrl':function(_0x561a13,_0x2fb05b){return _0x561a13(_0x2fb05b);}};if(!_0xcb0632)throw new Error(_0x17c611['TBzns']);const _0x31abc0=readProjectsConfig(),_0x291f21=_0x31abc0['projects'][_0x3f1821]??={},_0x4da2f2=_0x291f21['profiles']??={},_0x4a19f9=_0x4da2f2[_0x51e813]??={},_0x2c3bb4=_0x4a19f9['settings']??={};setByKeyPath(_0x2c3bb4,_0xcb0632,_0xa843bf),_0x17c611['OjSrl'](writeProjectsConfig,_0x31abc0);}export function unsetProfileOverride(_0x39db3e,_0x305c03,_0x280cad){const _0x2c2c13=_0x55b1,_0x2e2007={'lcKKO':function(_0x5533bc){return _0x5533bc();}};if(!_0x280cad)throw new Error('keyPath\x20is\x20required');const _0x39e782=_0x2e2007['lcKKO'](readProjectsConfig),_0x3a3c2e=_0x39e782['projects'][_0x39db3e];if(!_0x3a3c2e?.[_0x2c2c13(0xc8)])return![];const _0x342ac6=_0x3a3c2e[_0x2c2c13(0xc8)][_0x305c03];if(!_0x342ac6?.[_0x2c2c13(0xd1)])return![];const _0x13d794=deleteByKeyPath(_0x342ac6[_0x2c2c13(0xd1)],_0x280cad);if(!_0x13d794)return![];return writeProjectsConfig(_0x39e782),!![];}export function resetProfileOverrides(_0x83a3b,_0x526c5f){const _0x3fa931=_0x55b1,_0x2d7d68={'BQjYY':function(_0x45ca36){return _0x45ca36();},'UadTL':function(_0x25277c,_0xefebe0){return _0x25277c in _0xefebe0;},'hHVZg':function(_0x55afd9,_0x26c5c3){return _0x55afd9(_0x26c5c3);}},_0x3984c1=_0x2d7d68['BQjYY'](readProjectsConfig),_0x485b30=_0x3984c1[_0x3fa931(0xd6)][_0x83a3b];if(!_0x485b30?.['profiles'])return;if(!_0x2d7d68[_0x3fa931(0xc4)](_0x526c5f,_0x485b30['profiles']))return;delete _0x485b30[_0x3fa931(0xc8)][_0x526c5f],Object['keys'](_0x485b30['profiles'])['length']===0x0&&(!_0x485b30['lastProfile']?delete _0x3984c1['projects'][_0x83a3b]:_0x485b30[_0x3fa931(0xc8)]={}),_0x2d7d68[_0x3fa931(0xbe)](writeProjectsConfig,_0x3984c1);}export function readLastProfile(_0x2e0fcb){const _0x5e56b4=_0x55b1,_0xd3cae5={'QQFlZ':function(_0x421f18){return _0x421f18();}},_0x55bd7e=_0xd3cae5[_0x5e56b4(0xce)](readProjectsConfig),_0x8facb2=_0x55bd7e[_0x5e56b4(0xd6)][_0x2e0fcb];return _0x8facb2?.[_0x5e56b4(0xca)]??null;}export function writeLastProfile(_0x583af1,_0x5259f5){const _0x5cf83d=_0x55b1,_0x1ed865=readProjectsConfig(),_0x16ec2f=_0x1ed865[_0x5cf83d(0xd6)][_0x583af1]??={};_0x16ec2f['lastProfile']=_0x5259f5,writeProjectsConfig(_0x1ed865);}export function mergeCloudProfileSettings(_0x1f2e8e,_0xeca5e3){const _0x3a6ad4=_0x55b1,_0x26e263={'EEnbw':function(_0x4b27e4,_0x33f0ba){return _0x4b27e4??_0x33f0ba;},'GmMmu':function(_0x332427,_0x29f64e){return _0x332427===_0x29f64e;},'tGzVU':function(_0x52873a,_0x1f8ace){return _0x52873a(_0x1f8ace);},'tjoGq':function(_0x37d278,_0x4178c8){return _0x37d278(_0x4178c8);},'OrDEX':function(_0x29fd8a,_0x57e19f){return _0x29fd8a!==_0x57e19f;}},_0x5c7251={..._0x26e263['EEnbw'](_0x1f2e8e,{})};if(!_0xeca5e3)return _0x5c7251;for(const [_0x2c57c0,_0x245bab]of Object['entries'](_0xeca5e3)){if(_0x245bab===undefined)continue;if(_0x26e263[_0x3a6ad4(0xd7)](_0x245bab,null)){delete _0x5c7251[_0x2c57c0];continue;}if(_0x26e263['GmMmu'](_0x2c57c0,_0x3a6ad4(0xcf))||_0x26e263['GmMmu'](_0x2c57c0,_0x3a6ad4(0xdc))){const _0xd23e57=_0x26e263['tGzVU'](asRecord,_0x5c7251[_0x2c57c0])??{},_0x17884f=_0x26e263['tjoGq'](asRecord,_0x245bab);if(!_0x17884f){_0x5c7251[_0x2c57c0]=_0x245bab;continue;}const _0x5cd8ba={..._0xd23e57};for(const [_0x49d550,_0x1460cd]of Object['entries'](_0x17884f)){if(_0x1460cd===null)delete _0x5cd8ba[_0x49d550];else _0x26e263['OrDEX'](_0x1460cd,undefined)&&(_0x5cd8ba[_0x49d550]=_0x1460cd);}_0x5c7251[_0x2c57c0]=_0x5cd8ba;continue;}_0x5c7251[_0x2c57c0]=_0x245bab;}return _0x5c7251;}function asRecord(_0x1db3f4){const _0x376a22=_0x55b1,_0x43c722={'KfMky':_0x376a22(0xc1)};return _0x1db3f4&&typeof _0x1db3f4===_0x43c722[_0x376a22(0xc6)]&&!Array[_0x376a22(0xd9)](_0x1db3f4)?_0x1db3f4:undefined;}function setByKeyPath(_0x22eb02,_0x2d4824,_0x10cdf5){const _0xbd4fb=_0x55b1,_0x8a28c7={'BMPbO':function(_0x1f0018,_0x1bb797){return _0x1f0018<_0x1bb797;},'frlhZ':function(_0xc1fe85,_0x598a8a){return _0xc1fe85-_0x598a8a;},'hSkOc':function(_0x405bc8,_0x51ef95){return _0x405bc8!==_0x51ef95;}},_0x54668a=_0x2d4824[_0xbd4fb(0xd0)]('.');let _0x41fe06=_0x22eb02;for(let _0x46e595=0x0;_0x8a28c7['BMPbO'](_0x46e595,_0x8a28c7[_0xbd4fb(0xda)](_0x54668a['length'],0x1));_0x46e595++){const _0x466e74=_0x54668a[_0x46e595],_0x1b4f2c=_0x41fe06[_0x466e74];(!_0x1b4f2c||_0x8a28c7['hSkOc'](typeof _0x1b4f2c,_0xbd4fb(0xc1))||Array['isArray'](_0x1b4f2c))&&(_0x41fe06[_0x466e74]={}),_0x41fe06=_0x41fe06[_0x466e74];}_0x41fe06[_0x54668a[_0x8a28c7[_0xbd4fb(0xda)](_0x54668a['length'],0x1)]]=_0x10cdf5;}function deleteByKeyPath(_0x26fa4c,_0x3ca55c){const _0x29e3f1=_0x55b1,_0x2c5c29={'BLZGA':function(_0x546255,_0x11c32b){return _0x546255<_0x11c32b;},'VZrQN':function(_0x52a726,_0x4d9fc6){return _0x52a726-_0x4d9fc6;}},_0x3b351c=_0x3ca55c[_0x29e3f1(0xd0)]('.');let _0x547040=_0x26fa4c;for(let _0x573e63=0x0;_0x2c5c29['BLZGA'](_0x573e63,_0x2c5c29['VZrQN'](_0x3b351c[_0x29e3f1(0xbc)],0x1));_0x573e63++){const _0xa00204=_0x3b351c[_0x573e63],_0x5c8df5=_0x547040[_0xa00204];if(!_0x5c8df5||typeof _0x5c8df5!==_0x29e3f1(0xc1)||Array[_0x29e3f1(0xd9)](_0x5c8df5))return![];_0x547040=_0x5c8df5;}const _0x1b680a=_0x3b351c[_0x2c5c29[_0x29e3f1(0xb9)](_0x3b351c[_0x29e3f1(0xbc)],0x1)];if(!(_0x1b680a in _0x547040))return![];return delete _0x547040[_0x1b680a],!![];}
|
|
1
|
+
(function(_0x5c5be1,_0x396d37){const _0x25dc88=_0x5717,_0x5e7f27=_0x5c5be1();while(!![]){try{const _0x4418a1=-parseInt(_0x25dc88(0x151))/0x1+parseInt(_0x25dc88(0x15b))/0x2*(-parseInt(_0x25dc88(0x138))/0x3)+parseInt(_0x25dc88(0x14c))/0x4+parseInt(_0x25dc88(0x156))/0x5+parseInt(_0x25dc88(0x141))/0x6*(-parseInt(_0x25dc88(0x15f))/0x7)+-parseInt(_0x25dc88(0x15d))/0x8*(parseInt(_0x25dc88(0x15c))/0x9)+parseInt(_0x25dc88(0x146))/0xa;if(_0x4418a1===_0x396d37)break;else _0x5e7f27['push'](_0x5e7f27['shift']());}catch(_0x3ee416){_0x5e7f27['push'](_0x5e7f27['shift']());}}}(_0x19d0,0x3620a));import{existsSync,mkdirSync,readFileSync,renameSync,writeFileSync}from'fs';import{unlinkSync}from'fs';import{dirname,join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';const CURRENT_VERSION=0x1;function _0x19d0(){const _0x2ae736=['8RDUpQo','zphTy','7mvCzUo','VWKdZ','.\x20Ignoring\x20local\x20profile\x20overrides.','keyPath\x20is\x20required','kNvvh','setupHeaders','lWYGk','object','gEOxW','3IMrevk','entries','keys','\x20has\x20an\x20unexpected\x20shape.\x20Ignoring\x20local\x20profile\x20overrides.','length','rxUfI','message',').\x20Ignoring\x20local\x20profile\x20overrides.','[ranger]\x20Warning:\x20failed\x20to\x20read\x20','1375116vmtmxj','warn','settings','PwSqz','FtJfN','13091680HgUbRj','QvjWG','UxTWP','projects','split','isArray','117340BBbpFd','version','lmjgq','profiles','XFQcm','238517kWBhPV','[ranger]\x20Warning:\x20','utf-8','sWEDn','yrILs','162915SlszKw','zoViQ','dhsDW','lastProfile','DWVBv','701920hmdEzZ','2976453TZqOOj'];_0x19d0=function(){return _0x2ae736;};return _0x19d0();}export function getProjectsConfigPath(){return join(getRangerHomeDir(),'projects.json');}function emptyConfig(){return{'version':CURRENT_VERSION,'projects':{}};}export function readProjectsConfig(){const _0x175e17=_0x5717,_0x15c432={'vhLCa':function(_0x53d680){return _0x53d680();},'gEOxW':function(_0x307fbf,_0x4e6353){return _0x307fbf(_0x4e6353);},'dhsDW':function(_0x4405ba,_0x19a04b){return _0x4405ba instanceof _0x19a04b;},'FtJfN':function(_0x32af60,_0x58f6bc){return _0x32af60(_0x58f6bc);},'DWVBv':_0x175e17(0x136),'loVsU':function(_0x5615b0,_0x1c9817){return _0x5615b0!==_0x1c9817;},'kTgVK':function(_0x206599,_0x467538){return _0x206599===_0x467538;}},_0xbc63af=_0x15c432['vhLCa'](getProjectsConfigPath);if(!_0x15c432[_0x175e17(0x137)](existsSync,_0xbc63af))return emptyConfig();let _0x4ed688;try{_0x4ed688=readFileSync(_0xbc63af,'utf-8');}catch(_0x50cd51){const _0x92db6=_0x15c432[_0x175e17(0x158)](_0x50cd51,Error)?_0x50cd51['message']:_0x15c432['gEOxW'](String,_0x50cd51);return console[_0x175e17(0x142)](_0x175e17(0x140)+_0xbc63af+':\x20'+_0x92db6+_0x175e17(0x161)),emptyConfig();}let _0x1cc6ed;try{_0x1cc6ed=JSON['parse'](_0x4ed688);}catch(_0x463f9e){const _0x5ab67b=_0x15c432['dhsDW'](_0x463f9e,Error)?_0x463f9e[_0x175e17(0x13e)]:_0x15c432[_0x175e17(0x145)](String,_0x463f9e);return console[_0x175e17(0x142)](_0x175e17(0x152)+_0xbc63af+'\x20is\x20not\x20valid\x20JSON\x20('+_0x5ab67b+_0x175e17(0x13f)),_0x15c432['vhLCa'](emptyConfig);}if(!_0x1cc6ed||typeof _0x1cc6ed!==_0x15c432[_0x175e17(0x15a)]||Array['isArray'](_0x1cc6ed)||_0x15c432['loVsU'](_0x1cc6ed[_0x175e17(0x14d)],CURRENT_VERSION)||_0x15c432['loVsU'](typeof _0x1cc6ed[_0x175e17(0x149)],'object')||_0x15c432['kTgVK'](_0x1cc6ed[_0x175e17(0x149)],null)||Array[_0x175e17(0x14b)](_0x1cc6ed['projects']))return console[_0x175e17(0x142)]('[ranger]\x20Warning:\x20'+_0xbc63af+_0x175e17(0x13b)),_0x15c432['vhLCa'](emptyConfig);return _0x1cc6ed;}export function writeProjectsConfig(_0x354ae2){const _0x245316=_0x5717,_0x3b1c0c={'pqkeA':function(_0x5bae19){return _0x5bae19();},'sWEDn':function(_0x3aa136,_0x20b664){return _0x3aa136(_0x20b664);},'yrILs':function(_0x42d38a,_0x1fae4c,_0x567201){return _0x42d38a(_0x1fae4c,_0x567201);},'UxTWP':function(_0xf01e4f,_0x296156,_0x55eb65,_0x4eadd0){return _0xf01e4f(_0x296156,_0x55eb65,_0x4eadd0);},'zphTy':_0x245316(0x153),'yvPwl':function(_0x513d3f,_0x360636){return _0x513d3f(_0x360636);}},_0x362407=_0x3b1c0c['pqkeA'](getProjectsConfigPath),_0x467cf9=_0x3b1c0c['sWEDn'](dirname,_0x362407);!_0x3b1c0c[_0x245316(0x154)](existsSync,_0x467cf9)&&_0x3b1c0c[_0x245316(0x155)](mkdirSync,_0x467cf9,{'recursive':!![]});const _0x17daeb=_0x362407+'.'+process['pid']+'.'+Date['now']()+'.tmp',_0x208962=JSON['stringify'](_0x354ae2,null,0x2)+'\x0a';try{_0x3b1c0c[_0x245316(0x148)](writeFileSync,_0x17daeb,_0x208962,{'encoding':_0x3b1c0c[_0x245316(0x15e)],'mode':0x180}),renameSync(_0x17daeb,_0x362407);}catch(_0x57598f){try{_0x3b1c0c['yvPwl'](existsSync,_0x17daeb)&&unlinkSync(_0x17daeb);}catch{}throw _0x57598f;}}export function readProfileOverrides(_0x920ef4,_0x35a38e){const _0x2eac01=_0x5717,_0x354f1c=readProjectsConfig(),_0x2690df=_0x354f1c[_0x2eac01(0x149)][_0x920ef4];if(!_0x2690df||!_0x2690df[_0x2eac01(0x14f)])return null;const _0x2b1d20=_0x2690df['profiles'][_0x35a38e];if(!_0x2b1d20||!_0x2b1d20['settings'])return null;return _0x2b1d20['settings']??null;}export function setProfileOverride(_0x1b7b6c,_0x366a4c,_0x5e5633,_0xdc493a){const _0x1a401f=_0x5717,_0x366911={'QPnff':'keyPath\x20is\x20required','XFQcm':function(_0x426c76,_0x4c560b){return _0x426c76(_0x4c560b);}};if(!_0x5e5633)throw new Error(_0x366911['QPnff']);const _0x524cb3=readProjectsConfig(),_0x49a06f=_0x524cb3['projects'][_0x1b7b6c]??={},_0xb2ee4c=_0x49a06f['profiles']??={},_0x596b5c=_0xb2ee4c[_0x366a4c]??={},_0x38dd0e=_0x596b5c[_0x1a401f(0x143)]??={};setByKeyPath(_0x38dd0e,_0x5e5633,_0xdc493a),_0x366911[_0x1a401f(0x150)](writeProjectsConfig,_0x524cb3);}export function unsetProfileOverride(_0x178264,_0x28700a,_0x119aa2){const _0x2c61d4=_0x5717,_0x3da217={'rxUfI':function(_0xc868ad){return _0xc868ad();},'HumFL':function(_0x3f52f8,_0x5774f6,_0x136f56){return _0x3f52f8(_0x5774f6,_0x136f56);},'vfNOO':function(_0x23c4d1,_0x218236){return _0x23c4d1(_0x218236);}};if(!_0x119aa2)throw new Error(_0x2c61d4(0x162));const _0x57f0fa=_0x3da217[_0x2c61d4(0x13d)](readProjectsConfig),_0x58679e=_0x57f0fa[_0x2c61d4(0x149)][_0x178264];if(!_0x58679e?.['profiles'])return![];const _0x565daf=_0x58679e['profiles'][_0x28700a];if(!_0x565daf?.[_0x2c61d4(0x143)])return![];const _0x53d9f2=_0x3da217['HumFL'](deleteByKeyPath,_0x565daf['settings'],_0x119aa2);if(!_0x53d9f2)return![];return _0x3da217['vfNOO'](writeProjectsConfig,_0x57f0fa),!![];}export function resetProfileOverrides(_0x395f6b,_0xa8e106){const _0x38f55b=_0x5717,_0x2226ac={'PNPoV':function(_0x32de26,_0x610020){return _0x32de26 in _0x610020;},'kNvvh':function(_0x2a5986,_0x32a946){return _0x2a5986===_0x32a946;},'QvjWG':function(_0x36125a,_0x2e6ea1){return _0x36125a(_0x2e6ea1);}},_0x1d4bde=readProjectsConfig(),_0x197495=_0x1d4bde[_0x38f55b(0x149)][_0x395f6b];if(!_0x197495?.['profiles'])return;if(!_0x2226ac['PNPoV'](_0xa8e106,_0x197495[_0x38f55b(0x14f)]))return;delete _0x197495[_0x38f55b(0x14f)][_0xa8e106],_0x2226ac[_0x38f55b(0x163)](Object[_0x38f55b(0x13a)](_0x197495[_0x38f55b(0x14f)])[_0x38f55b(0x13c)],0x0)&&(!_0x197495[_0x38f55b(0x159)]?delete _0x1d4bde[_0x38f55b(0x149)][_0x395f6b]:_0x197495[_0x38f55b(0x14f)]={}),_0x2226ac[_0x38f55b(0x147)](writeProjectsConfig,_0x1d4bde);}export function readLastProfile(_0x30af4c){const _0x437dea=_0x5717,_0x5ef441={'VWKdZ':function(_0x4c490c){return _0x4c490c();}},_0x1da170=_0x5ef441[_0x437dea(0x160)](readProjectsConfig),_0x3e0972=_0x1da170['projects'][_0x30af4c];return _0x3e0972?.['lastProfile']??null;}export function writeLastProfile(_0x1eb32a,_0x12ee4a){const _0x423319=_0x5717,_0x15ec2c={'hAgJW':function(_0x42d263){return _0x42d263();}},_0x824f16=_0x15ec2c['hAgJW'](readProjectsConfig),_0x1d9fd9=_0x824f16[_0x423319(0x149)][_0x1eb32a]??={};_0x1d9fd9[_0x423319(0x159)]=_0x12ee4a,writeProjectsConfig(_0x824f16);}export function clearLastProfile(_0x2cd0df,_0x105dc5){const _0x59d2cd=_0x5717,_0x5adefb={'lWYGk':function(_0x211084){return _0x211084();},'JqHlz':function(_0x15767b,_0x56d05b){return _0x15767b===_0x56d05b;}},_0x4d43fa=_0x5adefb[_0x59d2cd(0x135)](readProjectsConfig),_0x46e24e=_0x4d43fa[_0x59d2cd(0x149)][_0x2cd0df];if(!_0x46e24e||_0x46e24e['lastProfile']!==_0x105dc5)return![];return delete _0x46e24e['lastProfile'],(!_0x46e24e[_0x59d2cd(0x14f)]||_0x5adefb['JqHlz'](Object['keys'](_0x46e24e['profiles'])[_0x59d2cd(0x13c)],0x0))&&delete _0x4d43fa[_0x59d2cd(0x149)][_0x2cd0df],writeProjectsConfig(_0x4d43fa),!![];}export function mergeCloudProfileSettings(_0x5ac5cf,_0x14b78e){const _0x42230f=_0x5717,_0x4d9f5c={'zoViQ':function(_0x538f71,_0x331e91){return _0x538f71===_0x331e91;},'PwSqz':_0x42230f(0x164),'fncqm':function(_0x30d29,_0xb77333){return _0x30d29(_0xb77333);},'lmjgq':function(_0x36e319,_0x3055b4){return _0x36e319!==_0x3055b4;}},_0x3a1505={..._0x5ac5cf??{}};if(!_0x14b78e)return _0x3a1505;for(const [_0x28bd6b,_0x5bd592]of Object['entries'](_0x14b78e)){if(_0x5bd592===undefined)continue;if(_0x4d9f5c[_0x42230f(0x157)](_0x5bd592,null)){delete _0x3a1505[_0x28bd6b];continue;}if(_0x4d9f5c['zoViQ'](_0x28bd6b,'headers')||_0x28bd6b===_0x4d9f5c[_0x42230f(0x144)]){const _0x241ece=asRecord(_0x3a1505[_0x28bd6b])??{},_0x3e0970=_0x4d9f5c['fncqm'](asRecord,_0x5bd592);if(!_0x3e0970){_0x3a1505[_0x28bd6b]=_0x5bd592;continue;}const _0x5bafa1={..._0x241ece};for(const [_0x1ef530,_0x4a4880]of Object[_0x42230f(0x139)](_0x3e0970)){if(_0x4a4880===null)delete _0x5bafa1[_0x1ef530];else _0x4d9f5c[_0x42230f(0x14e)](_0x4a4880,undefined)&&(_0x5bafa1[_0x1ef530]=_0x4a4880);}_0x3a1505[_0x28bd6b]=_0x5bafa1;continue;}_0x3a1505[_0x28bd6b]=_0x5bd592;}return _0x3a1505;}function _0x5717(_0x5cde0f,_0x176655){_0x5cde0f=_0x5cde0f-0x135;const _0x19d00f=_0x19d0();let _0x571762=_0x19d00f[_0x5cde0f];return _0x571762;}function asRecord(_0x371321){return _0x371321&&typeof _0x371321==='object'&&!Array['isArray'](_0x371321)?_0x371321:undefined;}function setByKeyPath(_0x471758,_0x50625a,_0x56c853){const _0xe5cfab=_0x5717,_0x62d7c6={'TJlHA':function(_0x124362,_0x3b0532){return _0x124362<_0x3b0532;},'DZGbf':'object'},_0x552e23=_0x50625a[_0xe5cfab(0x14a)]('.');let _0x1ce8c9=_0x471758;for(let _0xb2f74e=0x0;_0x62d7c6['TJlHA'](_0xb2f74e,_0x552e23['length']-0x1);_0xb2f74e++){const _0x17ed9d=_0x552e23[_0xb2f74e],_0x504c28=_0x1ce8c9[_0x17ed9d];(!_0x504c28||typeof _0x504c28!==_0x62d7c6['DZGbf']||Array[_0xe5cfab(0x14b)](_0x504c28))&&(_0x1ce8c9[_0x17ed9d]={}),_0x1ce8c9=_0x1ce8c9[_0x17ed9d];}_0x1ce8c9[_0x552e23[_0x552e23[_0xe5cfab(0x13c)]-0x1]]=_0x56c853;}function deleteByKeyPath(_0x36369c,_0x1113aa){const _0x3c662e=_0x5717,_0x13f50e={'PIiOi':function(_0x535c43,_0x32b77f){return _0x535c43<_0x32b77f;},'xZwAG':function(_0x50189f,_0x2a03b5){return _0x50189f-_0x2a03b5;}},_0x1ab0c0=_0x1113aa['split']('.');let _0x2777b6=_0x36369c;for(let _0x2dac89=0x0;_0x13f50e['PIiOi'](_0x2dac89,_0x1ab0c0['length']-0x1);_0x2dac89++){const _0x257da1=_0x1ab0c0[_0x2dac89],_0x52d081=_0x2777b6[_0x257da1];if(!_0x52d081||typeof _0x52d081!=='object'||Array[_0x3c662e(0x14b)](_0x52d081))return![];_0x2777b6=_0x52d081;}const _0x359f8c=_0x1ab0c0[_0x13f50e['xZwAG'](_0x1ab0c0['length'],0x1)];if(!(_0x359f8c in _0x2777b6))return![];return delete _0x2777b6[_0x359f8c],!![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0xda2a(_0x3f3719,_0x138892){_0x3f3719=_0x3f3719-0xd1;const _0x1dd57e=_0x1dd5();let _0xda2afa=_0x1dd57e[_0x3f3719];return _0xda2afa;}(function(_0x174381,_0x5586a7){const _0x2ba340=_0xda2a,_0xc45f42=_0x174381();while(!![]){try{const _0xfb2ee4=parseInt(_0x2ba340(0xdc))/0x1+-parseInt(_0x2ba340(0xdd))/0x2+-parseInt(_0x2ba340(0xd8))/0x3+-parseInt(_0x2ba340(0xd9))/0x4+parseInt(_0x2ba340(0xd1))/0x5*(-parseInt(_0x2ba340(0xd5))/0x6)+-parseInt(_0x2ba340(0xdb))/0x7*(parseInt(_0x2ba340(0xde))/0x8)+parseInt(_0x2ba340(0xe0))/0x9*(parseInt(_0x2ba340(0xd2))/0xa);if(_0xfb2ee4===_0x5586a7)break;else _0xc45f42['push'](_0xc45f42['shift']());}catch(_0x3d05b6){_0xc45f42['push'](_0xc45f42['shift']());}}}(_0x1dd5,0xe91f4));import{readFile}from'fs/promises';import{existsSync}from'fs';function _0x1dd5(){const _0x38f0ce=['warn','7gzJsdm','619079BcLIbp','1420178TiPrEf','64360UhJooP','vkpar','9ARwpEW','444915MKjBth','49036810pbZphf','feyfy','utf-8','90xrufQO','model','XnTxw','3055821ldXHAj','5985624sYBGiF'];_0x1dd5=function(){return _0x38f0ce;};return _0x1dd5();}import{join}from'path';import{getRangerDir}from'./rangerRoot.js';export function getRangerConfigPath(){const _0x185504=_0xda2a,_0x2b67e4={'XnTxw':function(_0x2624ea){return _0x2624ea();},'feyfy':'config.json'};return join(_0x2b67e4[_0x185504(0xd7)](getRangerDir),_0x2b67e4[_0x185504(0xd3)]);}export async function loadRangerConfig(){const _0xab643f=_0xda2a,_0x4881a1={'beURN':function(_0x13f23d){return _0x13f23d();},'qOVKq':function(_0x5dca9d,_0x159dc2){return _0x5dca9d(_0x159dc2);},'rgiTc':function(_0x513d03,_0x3de4b9){return _0x513d03!==_0x3de4b9;},'vkpar':function(_0x5aedb0,_0xec1401){return _0x5aedb0===_0xec1401;}},_0x41b3e4=_0x4881a1['beURN'](getRangerConfigPath);if(!_0x4881a1['qOVKq'](existsSync,_0x41b3e4))return{};try{const _0x1a150e=await readFile(_0x41b3e4,_0xab643f(0xd4)),_0x3605d7=JSON['parse'](_0x1a150e);if(!_0x3605d7||_0x4881a1['rgiTc'](typeof _0x3605d7,'object')||Array['isArray'](_0x3605d7))return{};const _0x324b2d={},_0x311288=_0x3605d7[_0xab643f(0xd6)];return _0x4881a1[_0xab643f(0xdf)](typeof _0x311288,'string')&&(_0x324b2d['model']=_0x311288),_0x324b2d;}catch(_0x1a3556){const _0x715af5=_0x1a3556 instanceof Error?_0x1a3556['message']:_0x4881a1['qOVKq'](String,_0x1a3556);return console[_0xab643f(0xda)]('Failed\x20to\x20read\x20Ranger\x20config\x20at\x20'+_0x41b3e4+':\x20'+_0x715af5),{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x2b5c(){const _0x119189=['87741ckuohc','.git','7FoVUtV','.ranger','4lGXMwI','9023528iSDhuL','12768492cSANpR','LWTbo','5712324PxhoeZ','root','KjYVr','22ZGCNFU','cwd','11sFnOyp','72183vwTjsM','UDJDs','1400LXspJr','8702798EYXExN','3435603zplpuu','AdsGe','5biWNOC','ynNLp','sWYON'];_0x2b5c=function(){return _0x119189;};return _0x2b5c();}(function(_0x498cbf,_0x50c95b){const _0x29d7a0=_0x140b,_0x2d21d4=_0x498cbf();while(!![]){try{const _0x16b8e3=parseInt(_0x29d7a0(0xf3))/0x1*(parseInt(_0x29d7a0(0xf0))/0x2)+-parseInt(_0x29d7a0(0xf7))/0x3*(parseInt(_0x29d7a0(0xe9))/0x4)+parseInt(_0x29d7a0(0xf9))/0x5*(parseInt(_0x29d7a0(0xed))/0x6)+-parseInt(_0x29d7a0(0xfe))/0x7*(-parseInt(_0x29d7a0(0xea))/0x8)+-parseInt(_0x29d7a0(0xfc))/0x9*(parseInt(_0x29d7a0(0xf5))/0xa)+-parseInt(_0x29d7a0(0xf2))/0xb*(-parseInt(_0x29d7a0(0xeb))/0xc)+-parseInt(_0x29d7a0(0xf6))/0xd;if(_0x16b8e3===_0x50c95b)break;else _0x2d21d4['push'](_0x2d21d4['shift']());}catch(_0x51233f){_0x2d21d4['push'](_0x2d21d4['shift']());}}}(_0x2b5c,0xb930e));import{dirname,join,parse}from'path';import{existsSync}from'fs';function _0x140b(_0x4b8277,_0x56261b){_0x4b8277=_0x4b8277-0xe8;const _0x2b5ce2=_0x2b5c();let _0x140b89=_0x2b5ce2[_0x4b8277];return _0x140b89;}import{homedir}from'os';export function getRangerRoot(){const _0xe78449=_0x140b,_0x44bbb1={'uHkuZ':function(_0x17ed98,_0x2be659){return _0x17ed98(_0x2be659);},'ynNLp':_0xe78449(0xe8),'AdsGe':function(_0x2046a6,_0x5688d1){return _0x2046a6(_0x5688d1);},'qyrSz':function(_0x1406af,_0x106c65,_0x49b5bc){return _0x1406af(_0x106c65,_0x49b5bc);}};let _0x4a5842=process[_0xe78449(0xf1)]();const _0x29520d=parse(_0x4a5842)[_0xe78449(0xee)];while(_0x4a5842!==_0x29520d){if(_0x44bbb1['uHkuZ'](existsSync,join(_0x4a5842,_0x44bbb1[_0xe78449(0xfa)])))return _0x4a5842;_0x4a5842=_0x44bbb1['uHkuZ'](dirname,_0x4a5842);}if(_0x44bbb1[_0xe78449(0xf8)](existsSync,_0x44bbb1['qyrSz'](join,_0x29520d,'.ranger')))return _0x29520d;const _0x44efbd=findGitRoot();if(_0x44efbd)return _0x44efbd;return process['cwd']();}export function getRangerDir(){const _0x4d9797=_0x140b,_0x20d14f={'CdPSq':function(_0x1ac099){return _0x1ac099();},'LWTbo':'.ranger'};return join(_0x20d14f['CdPSq'](getRangerRoot),_0x20d14f[_0x4d9797(0xec)]);}export function findGitRoot(){const _0x34de53=_0x140b,_0x408362={'wVMie':function(_0x44057b,_0x34fc5c){return _0x44057b!==_0x34fc5c;},'UDJDs':function(_0x11c4ab,_0x21a64c,_0x5ae5db){return _0x11c4ab(_0x21a64c,_0x5ae5db);},'gNLyH':function(_0x27b977,_0x4d78dc){return _0x27b977(_0x4d78dc);},'KjYVr':function(_0x2097ac,_0x2be1bb,_0x112397){return _0x2097ac(_0x2be1bb,_0x112397);},'sWYON':'.git'};let _0x124ca=process['cwd']();const _0x5efc4c=parse(_0x124ca)['root'];while(_0x408362['wVMie'](_0x124ca,_0x5efc4c)){if(existsSync(_0x408362[_0x34de53(0xf4)](join,_0x124ca,_0x34de53(0xfd))))return _0x124ca;_0x124ca=dirname(_0x124ca);}if(_0x408362['gNLyH'](existsSync,_0x408362[_0x34de53(0xef)](join,_0x5efc4c,_0x408362[_0x34de53(0xfb)])))return _0x5efc4c;return null;}export function getRangerHomeDir(){const _0x267f78=_0x140b,_0x486349={'sSIpE':function(_0x3ac404,_0x32b5e8,_0x296d9d){return _0x3ac404(_0x32b5e8,_0x296d9d);},'SxdBK':function(_0x2c7cd9){return _0x2c7cd9();},'CQzgp':_0x267f78(0xe8)};return _0x486349['sSIpE'](join,_0x486349['SxdBK'](homedir),_0x486349['CQzgp']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3cabb6,_0x11d586){const _0x142e63=_0x2491,_0x4a2e95=_0x3cabb6();while(!![]){try{const _0x3ad94e=parseInt(_0x142e63(0xc4))/0x1+-parseInt(_0x142e63(0xde))/0x2*(-parseInt(_0x142e63(0xd8))/0x3)+parseInt(_0x142e63(0xef))/0x4*(-parseInt(_0x142e63(0xc0))/0x5)+-parseInt(_0x142e63(0xda))/0x6*(parseInt(_0x142e63(0xeb))/0x7)+-parseInt(_0x142e63(0xc2))/0x8+parseInt(_0x142e63(0xd0))/0x9+parseInt(_0x142e63(0xcc))/0xa;if(_0x3ad94e===_0x11d586)break;else _0x4a2e95['push'](_0x4a2e95['shift']());}catch(_0x3c656c){_0x4a2e95['push'](_0x4a2e95['shift']());}}}(_0x1d05,0x7a96a));import{existsSync}from'fs';import _0x29e424 from'inquirer';import{ApiError,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';function _0x2491(_0x1ae238,_0x433ccf){_0x1ae238=_0x1ae238-0xbe;const _0x1d057e=_0x1d05();let _0x2491a1=_0x1d057e[_0x1ae238];return _0x2491a1;}import{readActiveProfileName}from'./activeProfile.js';function _0x1d05(){const _0x3736e3=['54501CWLgTP','Local\x20profile','762vOsKUu','OVaJS','fQAme','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','46beReed','kuCDE','SAweO','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','Profile\x20\x22','XTLBM','pKDtn','bQTOB','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','SOuCD','envBaseUrl','status','nTNdr','10612jruWJM','length','env','RANGER_SESSION_STATE_PATH','1717872UbcyaP','`ranger\x20profile\x20add`\x20to\x20create\x20one.','cloud','10BbBkWX','list','3640256iXnSNP','IScrK','624PVHIyO','shynf','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','url','startPath','local','string','log','11427400GhLRze','cdpEndpoint','profile','authPath','4026753qbbIxo','wccgS','settings','baseUrl','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','name','domains'];_0x1d05=function(){return _0x3736e3;};return _0x1d05();}export async function resolveProfileContext(_0x806909){const _0x7fdcea=_0x2491,_0x3992c3={'shynf':function(_0x5b71e1){return _0x5b71e1();},'wccgS':function(_0xd31ed5,_0x56ba7e){return _0xd31ed5+_0x56ba7e;},'pKDtn':function(_0x43a220,_0x7ec8a2){return _0x43a220+_0x7ec8a2;},'kuCDE':'\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','TaqmE':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','isgYK':function(_0x5bf5e0,_0x5ae8ec){return _0x5bf5e0(_0x5ae8ec);},'bQTOB':function(_0x471e41,_0x41a11f){return _0x471e41(_0x41a11f);},'QOoqq':function(_0xebca67,_0x53320f){return _0xebca67 instanceof _0x53320f;},'ugztb':function(_0x32dfbf,_0x22ba1d){return _0x32dfbf===_0x22ba1d;},'nTNdr':function(_0x549637,_0x50aa59){return _0x549637&&_0x50aa59;},'oaQLE':_0x7fdcea(0xdd),'SOuCD':'source','ijfUu':'Cloud\x20profile\x20(recommended)','ajCZc':_0x7fdcea(0xbf),'XTLBM':function(_0x1216b7,_0x5796a9){return _0x1216b7(_0x5796a9);},'ZdUdM':function(_0x2d74d9,_0xcb5127,_0x5ed0b7){return _0x2d74d9(_0xcb5127,_0x5ed0b7);},'OVaJS':function(_0x1c30e4,_0x35a02d){return _0x1c30e4(_0x35a02d);},'IScrK':function(_0x15fc18,_0x2e446a){return _0x15fc18(_0x2e446a);}},_0x60a193=_0x806909[_0x7fdcea(0xce)];let _0x3c77af=_0x806909['profile']??await readActiveProfileName(),_0x5694cd=null;if(!_0x3c77af&&process[_0x7fdcea(0xed)]['RANGER_TEST_USERNAME']){const _0x420953=await _0x3992c3[_0x7fdcea(0xc5)](resolveAdHocProfile);_0x420953&&(_0x3c77af=_0x420953['name'],_0x5694cd=_0x420953['profile']);}if(!_0x3c77af)try{const _0x3f0333=await listCloudProfiles();if(_0x3f0333[_0x7fdcea(0xec)]===0x1){const _0xdb3af8=_0x3f0333[0x0];_0x3c77af=_0xdb3af8['name'],console[_0x7fdcea(0xcb)](_0x7fdcea(0xd5)+_0xdb3af8[_0x7fdcea(0xd6)]),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x3c77af)throw new Error(_0x3992c3[_0x7fdcea(0xd1)](_0x3992c3[_0x7fdcea(0xe4)](_0x3992c3['pKDtn']('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a',_0x3992c3[_0x7fdcea(0xdf)])+_0x7fdcea(0xe1),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'),_0x3992c3['TaqmE']));const _0x37ab15=_0x3992c3['isgYK'](getEnvDir,_0x3c77af),_0x2bee08=_0x3992c3['bQTOB'](existsSync,_0x37ab15);let _0x124437=_0x5694cd,_0x1559a5=![];if(!_0x124437)try{_0x124437=await fetchCloudProfile(_0x3c77af);if(!_0x124437)_0x1559a5=!![];}catch(_0x1520c6){_0x3992c3['QOoqq'](_0x1520c6,ApiError)&&_0x3992c3['ugztb'](_0x1520c6[_0x7fdcea(0xe9)],0x194)&&(_0x1559a5=!![]);}if(_0x3992c3[_0x7fdcea(0xea)](_0x60a193,_0x1559a5)&&!_0x2bee08&&!_0x124437)throw new Error('Profile\x20\x22'+_0x60a193+_0x7fdcea(0xe6)+_0x3992c3['oaQLE']+_0x7fdcea(0xbe));if(_0x124437&&_0x2bee08){let _0x5d571e=!![];if(isInteractive()){const {source:_0x1aecd4}=await _0x29e424['prompt']([{'type':_0x7fdcea(0xc1),'name':_0x3992c3[_0x7fdcea(0xe7)],'message':_0x7fdcea(0xe2)+_0x3c77af+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x3992c3['ijfUu'],'value':'cloud'},{'name':_0x7fdcea(0xd9),'value':_0x7fdcea(0xc9)}],'default':'cloud'}]);_0x5d571e=_0x3992c3['ugztb'](_0x1aecd4,_0x3992c3['ajCZc']);}if(!_0x5d571e)_0x124437=null;}const _0x37318d=readProfileOverrides(process['cwd'](),_0x3c77af);let _0x33431e=null,_0x1ff3a1,_0xfcdd91,_0x3b5458,_0x6fd28,_0x2ec204=null,_0x13d6f6;const _0x5ab405=_0x3992c3[_0x7fdcea(0xe3)](expandOverrides,_0x37318d);if(_0x124437){_0x33431e=_0x124437;const _0x5d854a=_0x124437[_0x7fdcea(0xd2)]??{},_0x75c96b=_0x3992c3['ZdUdM'](mergeCloudProfileSettings,_0x5d854a,_0x37318d??undefined),_0x1e1e6f={..._0x124437,'settings':_0x75c96b},_0x1c957f=process['env'][_0x7fdcea(0xee)];if(_0x1c957f){if(!existsSync(_0x1c957f))throw new Error('RANGER_SESSION_STATE_PATH='+_0x1c957f+'\x20does\x20not\x20exist.');_0x1ff3a1=_0x1c957f,_0xfcdd91=resolveEnvVars(_0x75c96b),_0x3b5458=_0x3992c3['isgYK'](Boolean,_0xfcdd91['cdpEndpoint']),_0x2ec204={'baseUrl':expandString(_0x5d854a[_0x7fdcea(0xd3)]),'startPath':_0x3992c3['OVaJS'](expandString,_0x5d854a[_0x7fdcea(0xc8)])};}else{const _0x1a414d=await resolveCloudProfileSession(_0x1e1e6f);_0x1ff3a1=_0x1a414d[_0x7fdcea(0xcf)],_0xfcdd91=_0x3992c3[_0x7fdcea(0xe3)](resolveEnvVars,_0x75c96b),_0x3b5458=_0x3992c3[_0x7fdcea(0xe5)](Boolean,_0xfcdd91['cdpEndpoint']),_0x2ec204={'baseUrl':_0x3992c3[_0x7fdcea(0xdb)](expandString,_0x5d854a[_0x7fdcea(0xd3)]),'startPath':_0x3992c3[_0x7fdcea(0xc3)](expandString,_0x5d854a['startPath'])},_0x13d6f6=_0x1a414d['resolvedEnv']?.[_0x7fdcea(0xd7)]?.[0x0];}}else{if(!_0x2bee08)throw new Error('Profile\x20\x22'+_0x3c77af+_0x7fdcea(0xd4)+_0x3c77af);const _0x5be47d=await loadSettings(_0x3c77af);_0xfcdd91=resolveEnvVars(_0x5be47d),_0x3b5458=Boolean(_0xfcdd91[_0x7fdcea(0xcd)]),_0x6fd28=_0xfcdd91[_0x7fdcea(0xd3)];}const _0x2fc745=readUrlEnvVars(),_0x3f2d3d=resolveProfileUrl({'flagBaseUrl':_0x806909[_0x7fdcea(0xd3)],'flagStartPath':_0x806909[_0x7fdcea(0xc8)],'envBaseUrl':_0x2fc745[_0x7fdcea(0xe8)],'envStartPath':_0x2fc745['envStartPath'],'localSettingsBaseUrl':_0x6fd28,'projectOverrides':_0x5ab405,'cloudSettings':_0x2ec204,'authEnvironmentDomain':_0x13d6f6}),_0x40ee67=_0x3f2d3d[_0x7fdcea(0xc7)]??_0x3f2d3d['baseUrl'];if(_0x3992c3['nTNdr'](!_0x40ee67,!_0x3b5458))throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x3c77af+_0x7fdcea(0xc6)+_0x3c77af+'\x20baseUrl\x20<url>');return{'activeProfile':_0x3c77af,'resolvedCloudProfile':_0x33431e,'cloudAuthPath':_0x1ff3a1,'resolvedSettings':_0xfcdd91,'isCdpMode':_0x3b5458,'url':_0x40ee67,'startPath':_0x3f2d3d['startPath']};}function expandString(_0x35250c){const _0x26f66a=_0x2491,_0x52670e={'uTsKa':function(_0x4ea984,_0x4559f6){return _0x4ea984!==_0x4559f6;},'zsuTI':_0x26f66a(0xca)};if(_0x52670e['uTsKa'](typeof _0x35250c,_0x52670e['zsuTI']))return _0x35250c;return resolveEnvVars(_0x35250c);}function expandOverrides(_0x53faf9){const _0x485479=_0x2491,_0x277fac={'VAlqX':function(_0x2b88be,_0x59db23){return _0x2b88be(_0x59db23);},'Rwhps':function(_0x461dc1,_0xd06a0e){return _0x461dc1===_0xd06a0e;},'fQAme':'string','SAweO':function(_0x121ffb,_0x2a45dc){return _0x121ffb(_0x2a45dc);}};if(!_0x53faf9)return _0x53faf9;const _0x35f461={..._0x53faf9};return typeof _0x35f461[_0x485479(0xd3)]===_0x485479(0xca)&&(_0x35f461['baseUrl']=_0x277fac['VAlqX'](resolveEnvVars,_0x35f461['baseUrl'])),_0x277fac['Rwhps'](typeof _0x35f461[_0x485479(0xc8)],_0x277fac[_0x485479(0xdc)])&&(_0x35f461[_0x485479(0xc8)]=_0x277fac[_0x485479(0xe0)](resolveEnvVars,_0x35f461['startPath'])),_0x35f461;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x108b80=_0x1fc1;(function(_0x46448b,_0x165538){const _0x2b89c9=_0x1fc1,_0x43711e=_0x46448b();while(!![]){try{const _0x3cd974=-parseInt(_0x2b89c9(0x1a9))/0x1*(-parseInt(_0x2b89c9(0x1b1))/0x2)+-parseInt(_0x2b89c9(0x1ae))/0x3+-parseInt(_0x2b89c9(0x19e))/0x4*(-parseInt(_0x2b89c9(0x19a))/0x5)+parseInt(_0x2b89c9(0x1ac))/0x6+-parseInt(_0x2b89c9(0x1aa))/0x7*(parseInt(_0x2b89c9(0x1b4))/0x8)+-parseInt(_0x2b89c9(0x1af))/0x9*(-parseInt(_0x2b89c9(0x19c))/0xa)+-parseInt(_0x2b89c9(0x19d))/0xb;if(_0x3cd974===_0x165538)break;else _0x43711e['push'](_0x43711e['shift']());}catch(_0x1c516e){_0x43711e['push'](_0x43711e['shift']());}}}(_0xd715,0xf0945));function firstDefined(..._0x197929){const _0x4233f9={'UzhyV':function(_0x12ad22,_0x5462f7){return _0x12ad22!==_0x5462f7;}};for(const _0x4d9d83 of _0x197929){if(_0x4d9d83!==undefined&&_0x4d9d83!==null&&_0x4233f9['UzhyV'](_0x4d9d83,''))return _0x4d9d83;}return undefined;}function _0xd715(){const _0x376d0f=['SFXjT','djrzM','startPath','DTUcW','test','slice','10nxvyGP','3049193CbkkkZ','DstZx','9982986QOVtsq','flagBaseUrl','361386yLqAJM','3465otEZLx','RANGER_START_PATH','171788wxvCTE','authEnvironmentDomain','envStartPath','8mgDhMK','env','TghJS','projectOverrides','1055mMEdaC','AdHqj','47050ukVOaF','45623083uuImFX','25684LNvCjL','flagStartPath','baseUrl','endsWith','cloudSettings'];_0xd715=function(){return _0x376d0f;};return _0xd715();}function normalizeAuthEnvironmentDomain(_0x424e47){const _0x55a707=_0x1fc1;if(!_0x424e47)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x55a707(0x1a7)](_0x424e47))return _0x424e47;return'https://'+_0x424e47;}function _0x1fc1(_0x549833,_0x42b150){_0x549833=_0x549833-0x198;const _0xd71583=_0xd715();let _0x1fc18a=_0xd71583[_0x549833];return _0x1fc18a;}export function resolveBaseUrl(_0x3914f6){const _0x477bc0=_0x1fc1,_0x13ece1={'GuMpy':function(_0x5bed8d,_0x7b2a6){return _0x5bed8d in _0x7b2a6;},'SFXjT':function(_0xcfe05c,_0x265308){return _0xcfe05c===_0x265308;}},_0x4a3bd0=_0x3914f6[_0x477bc0(0x199)],_0x30e7c8=!!_0x4a3bd0&&_0x13ece1['GuMpy'](_0x477bc0(0x1a0),_0x4a3bd0),_0x24ee1a=_0x4a3bd0?.[_0x477bc0(0x1a0)],_0x3c12dd=!(_0x30e7c8&&_0x13ece1[_0x477bc0(0x1a3)](_0x24ee1a,null));return firstDefined(_0x3914f6[_0x477bc0(0x1ad)],_0x3914f6['envBaseUrl'],_0x3914f6['localSettingsBaseUrl'],_0x13ece1[_0x477bc0(0x1a3)](typeof _0x24ee1a,'string')?_0x24ee1a:undefined,_0x3c12dd?_0x3914f6['cloudSettings']?.['baseUrl']:undefined,_0x3c12dd?normalizeAuthEnvironmentDomain(_0x3914f6[_0x477bc0(0x1b2)]):undefined);}export function resolveStartPath(_0x55833f){const _0x34adfa=_0x1fc1,_0x37bc47={'djrzM':function(_0x483b9e,_0x48053c){return _0x483b9e in _0x48053c;},'AdHqj':function(_0xd27719,_0x271197){return _0xd27719===_0x271197;},'TghJS':function(_0x2d5c67,_0x689133,_0x2a7c83,_0x3a5398,_0x55d034){return _0x2d5c67(_0x689133,_0x2a7c83,_0x3a5398,_0x55d034);},'DTUcW':'string'},_0x4e0f6e=_0x55833f[_0x34adfa(0x199)],_0x609b0c=!!_0x4e0f6e&&_0x37bc47[_0x34adfa(0x1a4)](_0x34adfa(0x1a5),_0x4e0f6e),_0x3eab8c=_0x4e0f6e?.['startPath'],_0x578cfa=!(_0x609b0c&&_0x37bc47[_0x34adfa(0x19b)](_0x3eab8c,null));return _0x37bc47[_0x34adfa(0x198)](firstDefined,_0x55833f[_0x34adfa(0x19f)],_0x55833f[_0x34adfa(0x1b3)],typeof _0x3eab8c===_0x37bc47[_0x34adfa(0x1a6)]?_0x3eab8c:undefined,_0x578cfa?_0x55833f[_0x34adfa(0x1a2)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x504f74,_0x5d2269){const _0x5b628f=_0x1fc1,_0x567091={'Waabk':function(_0x10c211,_0x57b9a3){return _0x10c211+_0x57b9a3;},'DstZx':function(_0x3115fb,_0x334dd6){return _0x3115fb+_0x334dd6;}};if(!_0x504f74)return undefined;if(!_0x5d2269)return _0x504f74;const _0x41dddd=_0x504f74[_0x5b628f(0x1a1)]('/')?_0x504f74[_0x5b628f(0x1a8)](0x0,-0x1):_0x504f74,_0x573b75=_0x5d2269['startsWith']('/')?_0x5d2269:_0x567091['Waabk']('/',_0x5d2269);return _0x567091[_0x5b628f(0x1ab)](_0x41dddd,_0x573b75);}export function resolveProfileUrl(_0x2eafba){const _0x1cb1f4=resolveBaseUrl(_0x2eafba),_0x2e1a93=resolveStartPath(_0x2eafba);return{'baseUrl':_0x1cb1f4,'startPath':_0x2e1a93,'url':joinBaseAndPath(_0x1cb1f4,_0x2e1a93)};}export function readUrlEnvVars(_0x57a834=process[_0x108b80(0x1b5)]){const _0x4c5825=_0x108b80;return{'envBaseUrl':_0x57a834['RANGER_BASE_URL'],'envStartPath':_0x57a834[_0x4c5825(0x1b0)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x1dcf(){const _0x3b5bad=['2077272NMSRqp','7qkWyxI','982990QNYPmy','baseDelayMs','1159078IBNwdI','DKbsp','ms...','QnghS','12NiMfHj','MUnqY','1378664CpeaiA','1928152NhaxcP','33953ZwkEJB','\x20failed\x20(attempt\x20','993378dpopwm'];_0x1dcf=function(){return _0x3b5bad;};return _0x1dcf();}(function(_0xf049e7,_0x879a4d){const _0x4b74c6=_0x5a42,_0x51c30f=_0xf049e7();while(!![]){try{const _0x2ba496=parseInt(_0x4b74c6(0xc7))/0x1+-parseInt(_0x4b74c6(0xce))/0x2+parseInt(_0x4b74c6(0xc9))/0x3+-parseInt(_0x4b74c6(0xc5))/0x4+parseInt(_0x4b74c6(0xcc))/0x5*(parseInt(_0x4b74c6(0xd2))/0x6)+-parseInt(_0x4b74c6(0xcb))/0x7*(-parseInt(_0x4b74c6(0xc6))/0x8)+parseInt(_0x4b74c6(0xca))/0x9;if(_0x2ba496===_0x879a4d)break;else _0x51c30f['push'](_0x51c30f['shift']());}catch(_0x136db3){_0x51c30f['push'](_0x51c30f['shift']());}}}(_0x1dcf,0x4aae9));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x5a42(_0x5bdcec,_0x5f0dc7){_0x5bdcec=_0x5bdcec-0xc5;const _0x1dcf28=_0x1dcf();let _0x5a42be=_0x1dcf28[_0x5bdcec];return _0x5a42be;}export async function withRetry(_0x39215c,_0x7213a9){const _0xe2c04c=_0x5a42,_0x22490e={'QnghS':function(_0x123913,_0x339aba){return _0x123913(_0x339aba);},'DKbsp':function(_0x108804,_0x2a5c6a){return _0x108804<_0x2a5c6a;},'MUnqY':function(_0x26b841,_0x20f98c){return _0x26b841+_0x20f98c;}},_0xb73311=_0x7213a9?.['maxRetries']??DEFAULT_MAX_RETRIES,_0x1e93bd=_0x7213a9?.[_0xe2c04c(0xcd)]??DEFAULT_BASE_DELAY_MS;let _0x1cca23;for(let _0x411f51=0x0;_0x411f51<=_0xb73311;_0x411f51++){try{return await _0x39215c();}catch(_0x44ae84){_0x1cca23=_0x44ae84 instanceof Error?_0x44ae84:new Error(_0x22490e[_0xe2c04c(0xd1)](String,_0x44ae84));if(_0x22490e[_0xe2c04c(0xcf)](_0x411f51,_0xb73311)){const _0x2663d4=_0x1e93bd*Math['pow'](0x2,_0x411f51);_0x7213a9?.['label']&&console['error'](_0x7213a9['label']+_0xe2c04c(0xc8)+(_0x411f51+0x1)+'/'+_0x22490e[_0xe2c04c(0xd3)](_0xb73311,0x1)+'),\x20retrying\x20in\x20'+_0x2663d4+_0xe2c04c(0xd0)),await new Promise(_0x3090e1=>setTimeout(_0x3090e1,_0x2663d4));}}}throw _0x1cca23;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x26a228=_0x2de8;(function(_0x22200e,_0x24dadb){const _0x5dadce=_0x2de8,_0x371c07=_0x22200e();while(!![]){try{const _0x40c2e7=-parseInt(_0x5dadce(0xce))/0x1+parseInt(_0x5dadce(0xd1))/0x2+parseInt(_0x5dadce(0xd3))/0x3+parseInt(_0x5dadce(0xf8))/0x4*(parseInt(_0x5dadce(0xe5))/0x5)+parseInt(_0x5dadce(0xdc))/0x6+-parseInt(_0x5dadce(0xcb))/0x7+-parseInt(_0x5dadce(0xf9))/0x8*(parseInt(_0x5dadce(0xdd))/0x9);if(_0x40c2e7===_0x24dadb)break;else _0x371c07['push'](_0x371c07['shift']());}catch(_0x20455d){_0x371c07['push'](_0x371c07['shift']());}}}(_0x3225,0xbd78c));function _0x2de8(_0x477d4c,_0x26e075){_0x477d4c=_0x477d4c-0xc8;const _0x32252e=_0x3225();let _0x2de857=_0x32252e[_0x477d4c];return _0x2de857;}import*as _0x18288d from'fs';import*as _0x392e86 from'path';import*as _0x50d671 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x392e86[_0x26a228(0xd6)](_0x50d671['homedir'](),_0x26a228(0xe8),'.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x23b092=_0x26a228;try{if(_0x18288d['existsSync'](CACHE_FILE)){const _0x2c4154=JSON['parse'](_0x18288d[_0x23b092(0xee)](CACHE_FILE,_0x23b092(0xf0)));return{'version':0x3,'sessions':_0x2c4154[_0x23b092(0xf1)]||{},'branches':_0x2c4154[_0x23b092(0xf3)]||{},'lastEnabledSessionClearedAt':_0x2c4154[_0x23b092(0xe6)]};}}catch{}return createEmptyCache();}function saveCache(_0x1a7f43){try{const _0x5acf14=_0x392e86['dirname'](CACHE_FILE);!_0x18288d['existsSync'](_0x5acf14)&&_0x18288d['mkdirSync'](_0x5acf14,{'recursive':!![]}),_0x18288d['writeFileSync'](CACHE_FILE,JSON['stringify'](_0x1a7f43,null,0x2));}catch{}}export function getCurrentBranch(){const _0x4483c6=_0x26a228,_0x228791={'vVqxX':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','ZeGfQ':'pipe','MtWLA':'HEAD'};try{const _0x468fb0=execSync(_0x228791[_0x4483c6(0xd9)],{'encoding':'utf-8','stdio':[_0x4483c6(0xdb),_0x228791[_0x4483c6(0xef)],_0x228791['ZeGfQ']]})['trim']();if(!_0x468fb0||_0x468fb0===_0x228791[_0x4483c6(0xca)])return null;return _0x468fb0;}catch{return null;}}export function enableBranch(_0x32809c){const _0x557aba=loadCache();_0x557aba['branches'][_0x32809c]=!![],saveCache(_0x557aba);}export function disableBranch(_0x3800c4){const _0x2227f9=_0x26a228,_0x1e5e12={'nDrRc':function(_0x240c49){return _0x240c49();}},_0x255dff=_0x1e5e12[_0x2227f9(0xea)](loadCache);delete _0x255dff[_0x2227f9(0xf3)][_0x3800c4],saveCache(_0x255dff);}export function isBranchEnabled(_0x10612d){const _0x13570f=_0x26a228,_0x3cb633={'MjNYG':function(_0x3b931d,_0x5ee231){return _0x3b931d===_0x5ee231;}},_0x2cb49a=loadCache();return _0x3cb633['MjNYG'](_0x2cb49a[_0x13570f(0xf3)][_0x10612d],!![]);}function getOrCreateSession(_0x360213,_0x38e3ba){const _0x42c062=_0x26a228;return!_0x360213['sessions'][_0x38e3ba]&&(_0x360213[_0x42c062(0xf1)][_0x38e3ba]={}),_0x360213['sessions'][_0x38e3ba];}export function enableSession(_0x5e90a9){const _0x13fcb3=_0x26a228,_0x105994={'upNGU':function(_0x306d46,_0x40c9a7,_0x513564){return _0x306d46(_0x40c9a7,_0x513564);},'hmBuK':function(_0x19e4a7,_0x2879f9){return _0x19e4a7!==_0x2879f9;},'LUuxP':'main'},_0x56c562=loadCache(),_0x490185=_0x105994['upNGU'](getOrCreateSession,_0x56c562,_0x5e90a9);_0x490185[_0x13fcb3(0xd4)]=!![];const _0x1f2e13=getCurrentBranch();_0x1f2e13&&_0x105994[_0x13fcb3(0xe0)](_0x1f2e13,_0x105994['LUuxP'])&&_0x1f2e13!=='master'&&(_0x56c562[_0x13fcb3(0xf3)][_0x1f2e13]=!![],_0x490185[_0x13fcb3(0xf5)]=_0x1f2e13),saveCache(_0x56c562);}export function isSessionEnabled(_0x4e8b27){const _0x32227b=_0x26a228,_0x7e9c26={'Wwgpo':function(_0x3d6b2d){return _0x3d6b2d();},'JYbGz':function(_0x19a542,_0x337520){return _0x19a542===_0x337520;}},_0x2afd83=loadCache(),_0x4e3f53=_0x7e9c26[_0x32227b(0xd0)](getCurrentBranch);if(!_0x4e3f53||_0x7e9c26[_0x32227b(0xcc)](_0x4e3f53,_0x32227b(0xf4))||_0x4e3f53==='master')return _0x7e9c26[_0x32227b(0xcc)](_0x2afd83['sessions'][_0x4e8b27]?.['enabled'],!![]);const _0x39dfba=_0x7e9c26[_0x32227b(0xcc)](_0x2afd83['branches'][_0x4e3f53],!![]),_0x52252c=_0x2afd83['sessions'][_0x4e8b27]?.['enabled']===!![];return _0x39dfba||_0x52252c;}function _0x3225(){const _0x1bcf32=['enabled','toISOString','join','LDuwP','uHDxM','vVqxX','VMlQx','pipe','8743008MtbAoW','477qovbRa','fDkbe','KepEA','hmBuK','itjgP','lyyCu','leYmT','dGXMp','5jBwOLg','lastEnabledSessionClearedAt','zCOiB','.claude','lastPlanReminderAt','nDrRc','njhnQ','mVWkA','IkcAD','readFileSync','ZeGfQ','utf-8','sessions','featureId','branches','main','currentBranch','registeredAt','mduQZ','3140828yOKpAR','116168lVNdhw','now','master','MtWLA','3593268bWaiXC','JYbGz','prompted','1549414sdWKtx','lTuto','Wwgpo','2299048ZGMMvn','foFWJ','649584BeZZDI'];_0x3225=function(){return _0x1bcf32;};return _0x3225();}export function disableSession(_0x2616f7){const _0x45145f=_0x26a228,_0x38c72c={'xWZFQ':function(_0x4572b4){return _0x4572b4();},'mduQZ':function(_0x1ba32a,_0x36895a,_0x449b63){return _0x1ba32a(_0x36895a,_0x449b63);},'mVWkA':function(_0x5394f3,_0x507cca){return _0x5394f3(_0x507cca);}},_0x31d9a5=_0x38c72c['xWZFQ'](loadCache),_0x2bafcc=_0x38c72c[_0x45145f(0xf7)](getOrCreateSession,_0x31d9a5,_0x2616f7);_0x2bafcc[_0x45145f(0xd4)]=![],_0x38c72c[_0x45145f(0xec)](saveCache,_0x31d9a5);}export function updateBranchTracking(_0x1bdfa0){const _0x481f85=_0x26a228,_0x3fd992={'VMlQx':function(_0x2159a6){return _0x2159a6();},'KepEA':function(_0x69ac55,_0x49a8a0){return _0x69ac55===_0x49a8a0;},'Qcyds':function(_0x1be60a,_0x1f7e8d){return _0x1be60a===_0x1f7e8d;},'HSzCz':function(_0x3a2546,_0x279854){return _0x3a2546(_0x279854);}},_0x57eb5e=loadCache(),_0x40d970=_0x57eb5e['sessions'][_0x1bdfa0];if(!_0x40d970?.['enabled'])return;const _0x3d3e12=_0x3fd992[_0x481f85(0xda)](getCurrentBranch);if(!_0x3d3e12||_0x3fd992[_0x481f85(0xdf)](_0x3d3e12,_0x481f85(0xf4))||_0x3fd992['Qcyds'](_0x3d3e12,_0x481f85(0xc9)))return;_0x40d970[_0x481f85(0xf5)]!==_0x3d3e12&&(_0x57eb5e['branches'][_0x3d3e12]=!![],_0x40d970['currentBranch']=_0x3d3e12,_0x3fd992['HSzCz'](saveCache,_0x57eb5e));}export function initBranchTracking(_0x4d1f1e){const _0x113a90=_0x26a228,_0x222fcc={'LDuwP':function(_0x187f13){return _0x187f13();},'leYmT':'main','MNgKZ':function(_0x1a321f,_0x3745ed){return _0x1a321f===_0x3745ed;},'rWWpY':_0x113a90(0xc9),'yOGJd':function(_0x2db5b0,_0x1409ee){return _0x2db5b0===_0x1409ee;},'lyyCu':function(_0x293eaf,_0x36a63b){return _0x293eaf(_0x36a63b);}},_0x1945de=_0x222fcc[_0x113a90(0xd7)](loadCache),_0x4f4379=getCurrentBranch();if(!_0x4f4379||_0x4f4379===_0x222fcc[_0x113a90(0xe3)]||_0x222fcc['MNgKZ'](_0x4f4379,_0x222fcc['rWWpY']))return;if(_0x222fcc['yOGJd'](_0x1945de['branches'][_0x4f4379],!![])){const _0x5b549e=getOrCreateSession(_0x1945de,_0x4d1f1e);_0x5b549e['enabled']=!![],_0x5b549e['currentBranch']=_0x4f4379,_0x222fcc[_0x113a90(0xe2)](saveCache,_0x1945de);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x56715f){const _0x59dc49=_0x26a228,_0xde39f6=loadCache(),_0x4a1a52=_0xde39f6[_0x59dc49(0xf1)][_0x56715f];_0x4a1a52?.[_0x59dc49(0xd4)]&&(_0xde39f6[_0x59dc49(0xe6)]=Date['now'](),saveCache(_0xde39f6));}export function shouldAutoEnableAfterClear(_0x20c0cf){const _0x2ecae5=_0x26a228,_0x2da1da={'yysJv':'clear','EJZrY':function(_0x41ed53,_0x55c332){return _0x41ed53-_0x55c332;},'jWbiv':function(_0x376884,_0x29d4d0){return _0x376884<=_0x29d4d0;}};if(_0x20c0cf!==_0x2da1da['yysJv'])return![];const _0x2ea6bc=loadCache(),_0x1eba3b=_0x2ea6bc[_0x2ecae5(0xe6)];if(!_0x1eba3b)return![];const _0x126e7b=_0x2da1da['EJZrY'](Date['now'](),_0x1eba3b);return _0x2da1da['jWbiv'](_0x126e7b,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x204ecc){const _0xe424a1=_0x26a228,_0x554a62={'dGXMp':function(_0x1207a5){return _0x1207a5();},'fDkbe':function(_0x7e918,_0x56f412){return _0x7e918!==_0x56f412;}},_0x30893f=_0x554a62['dGXMp'](loadCache),_0x44158f=getOrCreateSession(_0x30893f,_0x204ecc);_0x44158f[_0xe424a1(0xd4)]=!![];const _0x42252d=_0x554a62[_0xe424a1(0xe4)](getCurrentBranch);_0x42252d&&_0x554a62[_0xe424a1(0xde)](_0x42252d,'main')&&_0x42252d!==_0xe424a1(0xc9)&&(_0x44158f['currentBranch']=_0x42252d),delete _0x30893f['lastEnabledSessionClearedAt'],saveCache(_0x30893f);}export function registerSession(_0x3eb081,_0x5680a5){const _0x10aac9=_0x26a228,_0x15319a={'xWfPn':function(_0x26613a,_0x446ddb,_0x3c9fa1){return _0x26613a(_0x446ddb,_0x3c9fa1);}},_0xa279db=loadCache(),_0x17bca9=_0x15319a['xWfPn'](getOrCreateSession,_0xa279db,_0x3eb081);_0x17bca9[_0x10aac9(0xf2)]=_0x5680a5,_0x17bca9[_0x10aac9(0xf6)]=new Date()[_0x10aac9(0xd5)](),saveCache(_0xa279db);}export function getSessionEntry(_0x1435b5){const _0x48ed65={'FtpaI':function(_0x30d026){return _0x30d026();}},_0x212552=_0x48ed65['FtpaI'](loadCache),_0x502146=_0x212552['sessions'][_0x1435b5];if(_0x502146?.['featureId']&&_0x502146?.['registeredAt'])return{'featureId':_0x502146['featureId'],'registeredAt':_0x502146['registeredAt']};return null;}export function unregisterSession(_0x5d3c65){const _0x1d9d5a=_0x26a228,_0x4b6172={'kPWoy':function(_0xc34a9,_0x511d6c){return _0xc34a9(_0x511d6c);}},_0x55f8e2=loadCache(),_0x3bf427=_0x55f8e2[_0x1d9d5a(0xf1)][_0x5d3c65];_0x3bf427&&(delete _0x3bf427[_0x1d9d5a(0xf2)],delete _0x3bf427[_0x1d9d5a(0xf6)],_0x4b6172['kPWoy'](saveCache,_0x55f8e2));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x53c030){const _0x55d064=_0x26a228,_0x47eb79={'itjgP':function(_0x11c9b3,_0xa1d300){return _0x11c9b3>=_0xa1d300;},'aPMMP':function(_0x2f33dc,_0xc28180){return _0x2f33dc-_0xc28180;},'nMAkh':function(_0x29d4eb,_0x555763){return _0x29d4eb(_0x555763);}},_0x4b139e=loadCache(),_0x5a99a5=getOrCreateSession(_0x4b139e,_0x53c030),_0x50da10=_0x5a99a5[_0x55d064(0xe9)]||0x0,_0x3dfeb0=Date[_0x55d064(0xc8)]();if(_0x47eb79[_0x55d064(0xe1)](_0x47eb79['aPMMP'](_0x3dfeb0,_0x50da10),PLAN_REMINDER_INTERVAL_MS))return _0x5a99a5[_0x55d064(0xe9)]=_0x3dfeb0,_0x47eb79['nMAkh'](saveCache,_0x4b139e),!![];return![];}export function shouldShowStopReminder(_0x26dd73){const _0x50afc7=_0x26a228,_0x47f706={'foFWJ':function(_0x4a0a4b,_0x2f6a81,_0x52e28e){return _0x4a0a4b(_0x2f6a81,_0x52e28e);},'uHDxM':function(_0x12a4d6,_0x1fc9e9){return _0x12a4d6>=_0x1fc9e9;},'zTvOC':function(_0x4c76ba,_0x21f75c){return _0x4c76ba-_0x21f75c;},'IkcAD':function(_0x32d4f2,_0x5bfe21){return _0x32d4f2(_0x5bfe21);}},_0x86786d=loadCache(),_0x17b45a=_0x47f706[_0x50afc7(0xd2)](getOrCreateSession,_0x86786d,_0x26dd73),_0xd53b66=_0x17b45a['lastStopReminderAt']||0x0,_0x23705b=Date['now']();if(_0x47f706[_0x50afc7(0xd8)](_0x47f706['zTvOC'](_0x23705b,_0xd53b66),STOP_REMINDER_INTERVAL_MS))return _0x17b45a['lastStopReminderAt']=_0x23705b,_0x47f706[_0x50afc7(0xed)](saveCache,_0x86786d),!![];return![];}export function hasSessionBeenPrompted(_0x22563b){const _0x13a4f8=_0x26a228,_0x25af49={'njhnQ':function(_0x17854a){return _0x17854a();}},_0x432b26=_0x25af49[_0x13a4f8(0xeb)](loadCache);return _0x432b26['sessions'][_0x22563b]?.[_0x13a4f8(0xcd)]===!![];}export function markSessionPrompted(_0x7b08b4){const _0xdeebee=_0x26a228,_0x23983d={'lTuto':function(_0x3594f8,_0x1ea13e,_0x5784fb){return _0x3594f8(_0x1ea13e,_0x5784fb);},'zCOiB':function(_0x159dc9,_0x126cf4){return _0x159dc9(_0x126cf4);}},_0x317c4f=loadCache(),_0x1c8a66=_0x23983d[_0xdeebee(0xcf)](getOrCreateSession,_0x317c4f,_0x7b08b4);_0x1c8a66['prompted']=!![],_0x23983d[_0xdeebee(0xe7)](saveCache,_0x317c4f);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x4b0824=_0x5351;(function(_0x564d09,_0x3d1e3c){const _0x1880f4=_0x5351,_0x3b3112=_0x564d09();while(!![]){try{const _0xa23e49=parseInt(_0x1880f4(0x181))/0x1*(-parseInt(_0x1880f4(0x175))/0x2)+parseInt(_0x1880f4(0x163))/0x3*(parseInt(_0x1880f4(0x151))/0x4)+-parseInt(_0x1880f4(0x16f))/0x5+-parseInt(_0x1880f4(0x161))/0x6*(-parseInt(_0x1880f4(0x15a))/0x7)+parseInt(_0x1880f4(0x16b))/0x8+-parseInt(_0x1880f4(0x157))/0x9+parseInt(_0x1880f4(0x16d))/0xa;if(_0xa23e49===_0x3d1e3c)break;else _0x3b3112['push'](_0x3b3112['shift']());}catch(_0x6b8f99){_0x3b3112['push'](_0x3b3112['shift']());}}}(_0x28ed,0xc0692));import*as _0x40578d from'fs';import*as _0x494f09 from'path';function _0x28ed(){const _0x57e6f6=['3741488DlOOkW','NOVcz','19487280RSWAkk','XNJUK','2933855rUABgy','YhTRW','Anomr','olnZI','fymwe','dknHf','10xHZigD','dzLIe','sessions','main','VtHee','stringify','now','mkdirSync','prompted','parse','tBWAs','master','154263toXYxE','featureId','VwqRs','.ranger_cache.json','212tzoVkX','registeredAt','FrNgL','adMED','branches','trim','5636223nKRfhC','currentBranch','OBJhl','14315PjjJgG','ObrZu','writeFileSync','Ogtpa','ftIsu','iAjjX','lastEnabledSessionClearedAt','396IjsVlH','git\x20rev-parse\x20--abbrev-ref\x20HEAD','12513KBWgDL','pipe','dirname','tdwBR','UnsUY','bHeAI','LBqMU','enabled'];_0x28ed=function(){return _0x57e6f6;};return _0x28ed();}import*as _0x180567 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x494f09['join'](_0x180567['homedir'](),'.claude',_0x4b0824(0x184));function _0x5351(_0x40bb56,_0x1b485){_0x40bb56=_0x40bb56-0x151;const _0x28ed4c=_0x28ed();let _0x535151=_0x28ed4c[_0x40bb56];return _0x535151;}function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x15cfee=_0x4b0824;try{if(_0x40578d['existsSync'](CACHE_FILE)){const _0x4690f4=JSON[_0x15cfee(0x17e)](_0x40578d['readFileSync'](CACHE_FILE,'utf-8'));return{'version':0x3,'sessions':_0x4690f4['sessions']||{},'branches':_0x4690f4[_0x15cfee(0x155)]||{},'lastEnabledSessionClearedAt':_0x4690f4[_0x15cfee(0x160)]};}}catch{}return createEmptyCache();}function saveCache(_0x14208c){const _0xca028b=_0x4b0824;try{const _0x3e2bfa=_0x494f09[_0xca028b(0x165)](CACHE_FILE);!_0x40578d['existsSync'](_0x3e2bfa)&&_0x40578d[_0xca028b(0x17c)](_0x3e2bfa,{'recursive':!![]}),_0x40578d[_0xca028b(0x15c)](CACHE_FILE,JSON[_0xca028b(0x17a)](_0x14208c,null,0x2));}catch{}}export function getCurrentBranch(){const _0x58be8d=_0x4b0824,_0x4bb43e={'dknHf':function(_0x5dbd22,_0x5f2b42,_0x20de43){return _0x5dbd22(_0x5f2b42,_0x20de43);},'FrNgL':_0x58be8d(0x164),'DErIA':function(_0x5b7ebd,_0x1582b8){return _0x5b7ebd===_0x1582b8;}};try{const _0x1ca2c2=_0x4bb43e[_0x58be8d(0x174)](execSync,_0x58be8d(0x162),{'encoding':'utf-8','stdio':[_0x4bb43e[_0x58be8d(0x153)],_0x4bb43e[_0x58be8d(0x153)],_0x4bb43e['FrNgL']]})[_0x58be8d(0x156)]();if(!_0x1ca2c2||_0x4bb43e['DErIA'](_0x1ca2c2,'HEAD'))return null;return _0x1ca2c2;}catch{return null;}}export function enableBranch(_0x2a950a){const _0x25a4fa=_0x4b0824,_0x3aba52=loadCache();_0x3aba52[_0x25a4fa(0x155)][_0x2a950a]=!![],saveCache(_0x3aba52);}export function disableBranch(_0x48d85d){const _0x3ae8c7={'WJIMe':function(_0x5a3e25){return _0x5a3e25();},'PmCmQ':function(_0x3ceaaf,_0x3ddbe4){return _0x3ceaaf(_0x3ddbe4);}},_0x2fa2c6=_0x3ae8c7['WJIMe'](loadCache);delete _0x2fa2c6['branches'][_0x48d85d],_0x3ae8c7['PmCmQ'](saveCache,_0x2fa2c6);}export function isBranchEnabled(_0x3eee5f){const _0x2d6cb1=_0x4b0824,_0x14970f={'sSeQz':function(_0x3bc522){return _0x3bc522();},'OBJhl':function(_0x41d746,_0x42d155){return _0x41d746===_0x42d155;}},_0x511933=_0x14970f['sSeQz'](loadCache);return _0x14970f[_0x2d6cb1(0x159)](_0x511933[_0x2d6cb1(0x155)][_0x3eee5f],!![]);}function getOrCreateSession(_0x140fb0,_0x41197d){const _0x339471=_0x4b0824;return!_0x140fb0['sessions'][_0x41197d]&&(_0x140fb0[_0x339471(0x177)][_0x41197d]={}),_0x140fb0['sessions'][_0x41197d];}export function enableSession(_0x4d83e2){const _0x5d1283=_0x4b0824,_0xa63c56={'NOVcz':function(_0xee481e,_0x15b637,_0x4264ed){return _0xee481e(_0x15b637,_0x4264ed);},'BqdsA':function(_0x5973c3,_0x45b99a){return _0x5973c3!==_0x45b99a;}},_0x4a1ddb=loadCache(),_0x11c3a7=_0xa63c56[_0x5d1283(0x16c)](getOrCreateSession,_0x4a1ddb,_0x4d83e2);_0x11c3a7[_0x5d1283(0x16a)]=!![];const _0x526b6d=getCurrentBranch();_0x526b6d&&_0x526b6d!==_0x5d1283(0x178)&&_0xa63c56['BqdsA'](_0x526b6d,_0x5d1283(0x180))&&(_0x4a1ddb[_0x5d1283(0x155)][_0x526b6d]=!![],_0x11c3a7['currentBranch']=_0x526b6d),saveCache(_0x4a1ddb);}export function isSessionEnabled(_0x368dff){const _0x3a0122=_0x4b0824,_0x439d19={'olnZI':function(_0x27d082){return _0x27d082();},'Yhpcd':function(_0x1c9d2a,_0x5c3f05){return _0x1c9d2a===_0x5c3f05;},'VtHee':function(_0x233fd6,_0x2067c1){return _0x233fd6===_0x2067c1;}},_0x35e86b=_0x439d19[_0x3a0122(0x172)](loadCache),_0x51738a=getCurrentBranch();if(!_0x51738a||_0x439d19['Yhpcd'](_0x51738a,_0x3a0122(0x178))||_0x439d19[_0x3a0122(0x179)](_0x51738a,'master'))return _0x35e86b['sessions'][_0x368dff]?.[_0x3a0122(0x16a)]===!![];const _0x81d06=_0x439d19[_0x3a0122(0x179)](_0x35e86b[_0x3a0122(0x155)][_0x51738a],!![]),_0x11ad53=_0x439d19['VtHee'](_0x35e86b[_0x3a0122(0x177)][_0x368dff]?.['enabled'],!![]);return _0x81d06||_0x11ad53;}export function disableSession(_0x130a85){const _0x181940=_0x4b0824,_0x57c9fd={'Ogtpa':function(_0x26e413){return _0x26e413();},'VODgz':function(_0x4f387e,_0x234bfd,_0x5b031d){return _0x4f387e(_0x234bfd,_0x5b031d);},'uiwiJ':function(_0x3083fe,_0x5c036b){return _0x3083fe(_0x5c036b);}},_0x18a9fd=_0x57c9fd[_0x181940(0x15d)](loadCache),_0x58203e=_0x57c9fd['VODgz'](getOrCreateSession,_0x18a9fd,_0x130a85);_0x58203e['enabled']=![],_0x57c9fd['uiwiJ'](saveCache,_0x18a9fd);}export function updateBranchTracking(_0x5e913f){const _0x350c82=_0x4b0824,_0x3d9fab={'UnsUY':function(_0x3e5295,_0x194b8a){return _0x3e5295===_0x194b8a;},'ObrZu':'main','yrPFO':function(_0x3f4f5d,_0x36e76d){return _0x3f4f5d===_0x36e76d;},'Hwvpe':'master'},_0x1119ca=loadCache(),_0x4401d2=_0x1119ca[_0x350c82(0x177)][_0x5e913f];if(!_0x4401d2?.[_0x350c82(0x16a)])return;const _0xe16086=getCurrentBranch();if(!_0xe16086||_0x3d9fab[_0x350c82(0x167)](_0xe16086,_0x3d9fab[_0x350c82(0x15b)])||_0x3d9fab['yrPFO'](_0xe16086,_0x3d9fab['Hwvpe']))return;_0x4401d2['currentBranch']!==_0xe16086&&(_0x1119ca[_0x350c82(0x155)][_0xe16086]=!![],_0x4401d2[_0x350c82(0x158)]=_0xe16086,saveCache(_0x1119ca));}export function initBranchTracking(_0x347b79){const _0x427c2d=_0x4b0824,_0x1e8c26={'VwqRs':function(_0x3c76a6){return _0x3c76a6();},'LBqMU':function(_0x2ff810,_0x36fab2){return _0x2ff810===_0x36fab2;}},_0x3845d5=_0x1e8c26[_0x427c2d(0x183)](loadCache),_0x4b2df9=getCurrentBranch();if(!_0x4b2df9||_0x1e8c26['LBqMU'](_0x4b2df9,_0x427c2d(0x178))||_0x1e8c26[_0x427c2d(0x169)](_0x4b2df9,_0x427c2d(0x180)))return;if(_0x1e8c26[_0x427c2d(0x169)](_0x3845d5['branches'][_0x4b2df9],!![])){const _0x57a948=getOrCreateSession(_0x3845d5,_0x347b79);_0x57a948[_0x427c2d(0x16a)]=!![],_0x57a948[_0x427c2d(0x158)]=_0x4b2df9,saveCache(_0x3845d5);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x5c9a37){const _0x8f6477=_0x4b0824,_0x146b3f={'AOqGx':function(_0x55dc88,_0x4e410e){return _0x55dc88(_0x4e410e);}},_0x439a33=loadCache(),_0x4a3a8f=_0x439a33[_0x8f6477(0x177)][_0x5c9a37];_0x4a3a8f?.[_0x8f6477(0x16a)]&&(_0x439a33[_0x8f6477(0x160)]=Date[_0x8f6477(0x17b)](),_0x146b3f['AOqGx'](saveCache,_0x439a33));}export function shouldAutoEnableAfterClear(_0x3b0910){const _0x45a4f5={'PZPMA':function(_0x334956,_0x548a2c){return _0x334956<=_0x548a2c;}};if(_0x3b0910!=='clear')return![];const _0x40f036=loadCache(),_0x3504e6=_0x40f036['lastEnabledSessionClearedAt'];if(!_0x3504e6)return![];const _0x281eb7=Date['now']()-_0x3504e6;return _0x45a4f5['PZPMA'](_0x281eb7,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x25de1a){const _0x432263=_0x4b0824,_0xa45808={'adMED':function(_0x1ac7dc){return _0x1ac7dc();},'ftIsu':function(_0x435214,_0x43a2ed){return _0x435214!==_0x43a2ed;},'bHeAI':'main','BEoZP':_0x432263(0x180)},_0x401cbd=_0xa45808[_0x432263(0x154)](loadCache),_0x1bcd76=getOrCreateSession(_0x401cbd,_0x25de1a);_0x1bcd76[_0x432263(0x16a)]=!![];const _0x17a358=getCurrentBranch();_0x17a358&&_0xa45808[_0x432263(0x15e)](_0x17a358,_0xa45808[_0x432263(0x168)])&&_0xa45808[_0x432263(0x15e)](_0x17a358,_0xa45808['BEoZP'])&&(_0x1bcd76['currentBranch']=_0x17a358),delete _0x401cbd[_0x432263(0x160)],saveCache(_0x401cbd);}export function registerSession(_0x45dcee,_0x4bed82){const _0x3d1e94=_0x4b0824,_0x33b2e3={'dJoTs':function(_0x352f04){return _0x352f04();},'Anomr':function(_0x42c682,_0x14c5aa,_0x3c97fd){return _0x42c682(_0x14c5aa,_0x3c97fd);},'nExbe':function(_0x1cc024,_0x3ecfa4){return _0x1cc024(_0x3ecfa4);}},_0x333342=_0x33b2e3['dJoTs'](loadCache),_0x54bf28=_0x33b2e3[_0x3d1e94(0x171)](getOrCreateSession,_0x333342,_0x45dcee);_0x54bf28[_0x3d1e94(0x182)]=_0x4bed82,_0x54bf28[_0x3d1e94(0x152)]=new Date()['toISOString'](),_0x33b2e3['nExbe'](saveCache,_0x333342);}export function getSessionEntry(_0xfdd965){const _0xdf1a67=_0x4b0824,_0x1e5d86={'WQlGk':function(_0xe40eb0){return _0xe40eb0();}},_0x55a73c=_0x1e5d86['WQlGk'](loadCache),_0x159a2a=_0x55a73c['sessions'][_0xfdd965];if(_0x159a2a?.[_0xdf1a67(0x182)]&&_0x159a2a?.['registeredAt'])return{'featureId':_0x159a2a[_0xdf1a67(0x182)],'registeredAt':_0x159a2a[_0xdf1a67(0x152)]};return null;}export function unregisterSession(_0x1bd836){const _0x2b1b47=_0x4b0824,_0x56e02d={'wAAmb':function(_0x257936,_0x53075c){return _0x257936(_0x53075c);}},_0x464c0c=loadCache(),_0x2cf493=_0x464c0c[_0x2b1b47(0x177)][_0x1bd836];_0x2cf493&&(delete _0x2cf493['featureId'],delete _0x2cf493['registeredAt'],_0x56e02d['wAAmb'](saveCache,_0x464c0c));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0xe4501){const _0xcbbad4=_0x4b0824,_0x1ec688={'BByGE':function(_0x4c394c,_0x3e4f04,_0x53201f){return _0x4c394c(_0x3e4f04,_0x53201f);},'tBWAs':function(_0x408648,_0x43c93e){return _0x408648-_0x43c93e;}},_0x195f49=loadCache(),_0x5ec455=_0x1ec688['BByGE'](getOrCreateSession,_0x195f49,_0xe4501),_0x56a638=_0x5ec455['lastPlanReminderAt']||0x0,_0x5ea169=Date[_0xcbbad4(0x17b)]();if(_0x1ec688[_0xcbbad4(0x17f)](_0x5ea169,_0x56a638)>=PLAN_REMINDER_INTERVAL_MS)return _0x5ec455['lastPlanReminderAt']=_0x5ea169,saveCache(_0x195f49),!![];return![];}export function shouldShowStopReminder(_0x39180f){const _0x444533=_0x4b0824,_0x4f4188={'XNJUK':function(_0x39fc85){return _0x39fc85();},'iAjjX':function(_0x4bbe66,_0x58f027){return _0x4bbe66(_0x58f027);}},_0x3a9964=_0x4f4188[_0x444533(0x16e)](loadCache),_0x4ca200=getOrCreateSession(_0x3a9964,_0x39180f),_0x50b748=_0x4ca200['lastStopReminderAt']||0x0,_0x4d51c6=Date['now']();if(_0x4d51c6-_0x50b748>=STOP_REMINDER_INTERVAL_MS)return _0x4ca200['lastStopReminderAt']=_0x4d51c6,_0x4f4188[_0x444533(0x15f)](saveCache,_0x3a9964),!![];return![];}export function hasSessionBeenPrompted(_0x1550c9){const _0xfed590=_0x4b0824,_0x5d8630={'fymwe':function(_0x3a05b6){return _0x3a05b6();},'YhTRW':function(_0xba9b0f,_0x193b25){return _0xba9b0f===_0x193b25;}},_0x56eab8=_0x5d8630[_0xfed590(0x173)](loadCache);return _0x5d8630[_0xfed590(0x170)](_0x56eab8[_0xfed590(0x177)][_0x1550c9]?.['prompted'],!![]);}export function markSessionPrompted(_0x280f3c){const _0x16a4da=_0x4b0824,_0x1bc308={'tdwBR':function(_0x5e5395){return _0x5e5395();},'dzLIe':function(_0x540e30,_0x1d1f79){return _0x540e30(_0x1d1f79);}},_0xef9717=_0x1bc308[_0x16a4da(0x166)](loadCache),_0x1892f3=getOrCreateSession(_0xef9717,_0x280f3c);_0x1892f3[_0x16a4da(0x17d)]=!![],_0x1bc308[_0x16a4da(0x176)](saveCache,_0xef9717);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5b1811=_0x5b85;(function(_0x4c5598,_0x438a7d){const _0x48ad2f=_0x5b85,_0x3e2fa7=_0x4c5598();while(!![]){try{const _0x4102d6=parseInt(_0x48ad2f(0xe9))/0x1+-parseInt(_0x48ad2f(0xce))/0x2+parseInt(_0x48ad2f(0xc2))/0x3+-parseInt(_0x48ad2f(0xdf))/0x4+-parseInt(_0x48ad2f(0xf0))/0x5*(-parseInt(_0x48ad2f(0xea))/0x6)+parseInt(_0x48ad2f(0xc4))/0x7*(parseInt(_0x48ad2f(0xb4))/0x8)+-parseInt(_0x48ad2f(0xc7))/0x9;if(_0x4102d6===_0x438a7d)break;else _0x3e2fa7['push'](_0x3e2fa7['shift']());}catch(_0x1a6e91){_0x3e2fa7['push'](_0x3e2fa7['shift']());}}}(_0x5b1f,0x2ce9f));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';function _0x5b85(_0x9dc27c,_0x5dd8d5){_0x9dc27c=_0x9dc27c-0x9d;const _0x5b1fc2=_0x5b1f();let _0x5b8539=_0x5b1fc2[_0x9dc27c];return _0x5b8539;}import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0xfaeeb8,_0x353064){const _0x280b3d=_0x5b85,_0x7a8f8b={'cQcvD':function(_0x1429d1,_0x1c5845,_0x16c8d7,_0x466dc8){return _0x1429d1(_0x1c5845,_0x16c8d7,_0x466dc8);},'MNdHq':function(_0x3de07d,_0x3720c0,_0x41807e,_0x28fedf){return _0x3de07d(_0x3720c0,_0x41807e,_0x28fedf);},'Tthhc':_0x280b3d(0xcd),'COdEn':function(_0x1c4300,_0x54740a){return _0x1c4300(_0x54740a);}},_0x15d43f=_0x7a8f8b['cQcvD'](join,_0x353064,'ci',_0xfaeeb8),_0x6b83dc=_0x7a8f8b[_0x280b3d(0xa7)](join,_0x353064,_0x7a8f8b['Tthhc'],_0xfaeeb8),_0x3a4e14=join(_0x353064,_0xfaeeb8),_0x4824a5=join(_0x353064,_0x7a8f8b['Tthhc']),_0x544ca4=join(_0x353064,'ci');if(existsSync(_0x15d43f))return _0x15d43f;if(_0x7a8f8b['COdEn'](existsSync,_0x6b83dc))return _0x6b83dc;if(_0x7a8f8b['COdEn'](existsSync,_0x3a4e14)&&(_0x3a4e14!==_0x4824a5&&_0x3a4e14!==_0x544ca4?!![]:hasLegacyProfileFiles(_0x3a4e14)))return _0x3a4e14;return null;}export function getEnvDir(_0x565de6,_0x2a9c39={}){const _0x2ada3f=_0x5b85,_0xf5b7b8={'MCrFl':function(_0x1c35dd,_0x573edc,_0x3c6db0){return _0x1c35dd(_0x573edc,_0x3c6db0);},'ywHvJ':function(_0x13712c,_0x466f1b){return _0x13712c(_0x466f1b);},'qEpgr':function(_0x5cd453){return _0x5cd453();},'mwDbz':_0x2ada3f(0xcd)},_0x1da0fa=getRangerDir(),_0x240d76=_0xf5b7b8['MCrFl'](findEnvInRoot,_0x565de6,_0x1da0fa);if(_0x240d76){if(_0x2a9c39['forWrite']&&_0xf5b7b8['ywHvJ'](isLegacyEnvPath,_0x240d76))throw _0xf5b7b8['MCrFl'](legacyWriteError,_0x565de6,_0x240d76);return _0x240d76;}const _0x1d8dce=_0xf5b7b8['qEpgr'](getRangerHomeDir);if(_0x1d8dce!==_0x1da0fa){const _0x79d670=_0xf5b7b8['MCrFl'](findEnvInRoot,_0x565de6,_0x1d8dce);if(_0x79d670){if(_0x2a9c39[_0x2ada3f(0xfd)]&&_0xf5b7b8['ywHvJ'](isLegacyEnvPath,_0x79d670))throw legacyWriteError(_0x565de6,_0x79d670);return _0x79d670;}}const _0x500b07=join(_0x1d8dce,_0xf5b7b8[_0x2ada3f(0xf7)],_0x565de6);if(_0x2a9c39[_0x2ada3f(0xfd)])throw legacyWriteError(_0x565de6,_0x500b07);return _0x500b07;}function isLegacyEnvPath(_0x47bdfc){const _0x3ccbbf=_0x5b85,_0x12877f={'XBpGl':function(_0x41eddd,_0xf75a17){return _0x41eddd===_0xf75a17;}},_0x1b4a70=getRangerDir(),_0x1e1859=getRangerHomeDir();for(const _0x50b0cc of new Set([_0x1b4a70,_0x1e1859])){const _0x54dfbe=_0x50b0cc[_0x3ccbbf(0xc5)]('/')?_0x50b0cc:_0x50b0cc+'/';if(_0x12877f[_0x3ccbbf(0xf4)](_0x47bdfc,_0x50b0cc)||_0x47bdfc['startsWith'](_0x54dfbe))return!![];}return![];}function legacyWriteError(_0x39064a,_0x3a407d){const _0x360561=_0x5b85,_0x2902e5={'JjfZJ':function(_0x53016d,_0x1a0816){return _0x53016d+_0x1a0816;}};return new Error(_0x2902e5[_0x360561(0xf2)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0x39064a+_0x360561(0x105)+_0x3a407d+'.\x0a'+_0x360561(0xae),_0x360561(0x9f))+_0x360561(0xb0));}export function findExistingEnv(_0x5d2b6a,_0x2b05b5){const _0x48d003=_0x5b85,_0x170526={'rZLwF':function(_0x3e2024){return _0x3e2024();},'NBrFM':_0x48d003(0xe7),'gmLZC':function(_0x58b1e0,_0xdf032e,_0x3f90ab){return _0x58b1e0(_0xdf032e,_0x3f90ab);},'nHWLh':function(_0x3dd79f,_0x2b06a1,_0x3cbded,_0x288018){return _0x3dd79f(_0x2b06a1,_0x3cbded,_0x288018);},'doUkG':_0x48d003(0xcd),'yFMzu':function(_0x5ad7e1,_0x8b20b4,_0x101116){return _0x5ad7e1(_0x8b20b4,_0x101116);},'bQeBw':function(_0x22276f,_0x419bad){return _0x22276f(_0x419bad);},'vHina':function(_0x40c848,_0x23a2ae){return _0x40c848===_0x23a2ae;},'oNXCA':function(_0x2d8c8f,_0x2e876f){return _0x2d8c8f===_0x2e876f;},'fqchB':function(_0x4da9c1,_0x2ad847){return _0x4da9c1(_0x2ad847);}},_0x5ac1dc=_0x2b05b5?.[_0x48d003(0xd9)],_0x4e1247=_0x5ac1dc?[_0x5ac1dc]:[_0x170526[_0x48d003(0x102)](getRangerDir),_0x170526[_0x48d003(0x102)](getRangerHomeDir)][_0x48d003(0xd7)]((_0x507729,_0x36703f,_0x19305c)=>_0x19305c['indexOf'](_0x507729)===_0x36703f),_0x43d5c9=_0x2b05b5?.['locations']??['ci',_0x48d003(0xcd),_0x170526[_0x48d003(0xca)]];for(const _0x1052ae of _0x4e1247){const _0x43f9a0=join(_0x1052ae,'local'),_0x49ad98=_0x170526[_0x48d003(0xfe)](join,_0x1052ae,'ci'),_0x51cf6a=[{'location':'ci','path':_0x170526[_0x48d003(0xcf)](join,_0x1052ae,'ci',_0x5d2b6a)},{'location':_0x170526['doUkG'],'path':_0x170526[_0x48d003(0xcf)](join,_0x1052ae,_0x48d003(0xcd),_0x5d2b6a)},{'location':_0x48d003(0xe7),'path':_0x170526['yFMzu'](join,_0x1052ae,_0x5d2b6a)}];for(const _0x38d7a7 of _0x51cf6a){if(_0x43d5c9[_0x48d003(0xb9)](_0x38d7a7['location'])&&_0x170526[_0x48d003(0xd5)](existsSync,_0x38d7a7[_0x48d003(0x104)])){if(_0x170526[_0x48d003(0xa2)](_0x38d7a7['location'],_0x170526['NBrFM'])&&(_0x38d7a7[_0x48d003(0x104)]===_0x43f9a0||_0x170526['oNXCA'](_0x38d7a7[_0x48d003(0x104)],_0x49ad98))&&!_0x170526[_0x48d003(0xde)](hasLegacyProfileFiles,_0x38d7a7['path']))continue;return{'path':_0x38d7a7['path'],'location':_0x38d7a7[_0x48d003(0xbe)]};}}}return null;}function hasLegacyProfileFiles(_0x5e13e2){const _0x4e0300=_0x5b85,_0x2d6db0={'UjWHS':function(_0x138146,_0x14cbb2){return _0x138146(_0x14cbb2);},'weGBc':function(_0x35cf3e,_0x12066e,_0x37f748){return _0x35cf3e(_0x12066e,_0x37f748);},'fOWIU':'auth.json','TJIjX':'auth.json.enc'};return _0x2d6db0[_0x4e0300(0xd2)](existsSync,_0x2d6db0['weGBc'](join,_0x5e13e2,_0x4e0300(0xee)))||existsSync(join(_0x5e13e2,_0x2d6db0['fOWIU']))||_0x2d6db0[_0x4e0300(0xd2)](existsSync,join(_0x5e13e2,_0x2d6db0['TJIjX']));}export function isEnvCi(_0x573a5f){const _0x4ddace=_0x5b85,_0x323f20={'wtxCo':function(_0x28ed70){return _0x28ed70();},'nVBFx':function(_0x217ae7,_0x50f7d4){return _0x217ae7!==_0x50f7d4;},'MRiyn':function(_0x8a13da,_0x2bb3e0,_0x3e1d19,_0x35e756){return _0x8a13da(_0x2bb3e0,_0x3e1d19,_0x35e756);}};if(existsSync(join(_0x323f20[_0x4ddace(0xd4)](getRangerDir),'ci',_0x573a5f)))return!![];const _0xb2cca4=getRangerHomeDir();if(_0x323f20['nVBFx'](_0xb2cca4,getRangerDir())&&existsSync(_0x323f20[_0x4ddace(0xf3)](join,_0xb2cca4,'ci',_0x573a5f)))return!![];return![];}export async function cleanupTempFiles(_0x3e7644){const _0x3e84f7=_0x5b85,_0x5bb1c6={'qrfsl':_0x3e84f7(0xff)},_0x11b4ba=[_0x3e7644['tempAuthPath'],_0x3e7644['configPath']][_0x3e84f7(0xd7)](Boolean);await Promise[_0x3e84f7(0xcc)](_0x11b4ba['map'](_0x3d8aff=>unlink(_0x3d8aff)['catch'](_0x1bbdbd=>{const _0x5d7cbe=_0x3e84f7;_0x1bbdbd['code']!==_0x5bb1c6['qrfsl']&&console['warn'](_0x5d7cbe(0xb2)+_0x3d8aff+':',_0x1bbdbd['message']);})));}export function getSettingsPath(_0x3127b3){const _0xa60108=_0x5b85,_0x2bd008={'XOZRY':function(_0x301531,_0x2c7666,_0x2deb4d){return _0x301531(_0x2c7666,_0x2deb4d);}};return _0x2bd008['XOZRY'](join,getEnvDir(_0x3127b3),_0xa60108(0xee));}export async function loadSettings(_0x462bc0){const _0x35469e=_0x5b85,_0x4c8f01={'eBsvH':function(_0x1aba08,_0x2f94db){return _0x1aba08(_0x2f94db);},'HadjV':function(_0xa50166,_0x37c507,_0x336cb3){return _0xa50166(_0x37c507,_0x336cb3);}},_0x20dfcb=_0x4c8f01[_0x35469e(0xd3)](getSettingsPath,_0x462bc0);if(!existsSync(_0x20dfcb))return{};try{const _0x1aeef3=await _0x4c8f01[_0x35469e(0xa9)](readFile,_0x20dfcb,'utf-8');return JSON[_0x35469e(0xe2)](_0x1aeef3);}catch{return{};}}export async function saveSettings(_0x3190ff,_0x112e26){const _0x4e52a8=_0x5b85,_0x279304={'TazEk':function(_0x181168,_0x5e5a27){return _0x181168(_0x5e5a27);},'sHFmC':function(_0x176ee8,_0xd3c94e){return _0x176ee8(_0xd3c94e);},'PzgYE':function(_0x1f9ee3,_0x3b5775,_0x51270f){return _0x1f9ee3(_0x3b5775,_0x51270f);}},_0x135a64=_0x279304[_0x4e52a8(0xe0)](getSettingsPath,_0x3190ff),_0x4d712d=_0x279304['sHFmC'](dirname,_0x135a64);!_0x279304[_0x4e52a8(0xe0)](existsSync,_0x4d712d)&&await mkdir(_0x4d712d,{'recursive':!![]}),await _0x279304[_0x4e52a8(0xd8)](writeFile,_0x135a64,JSON[_0x4e52a8(0xc0)](_0x112e26,null,0x2));}export function resolveEnvVars(_0x1652df){const _0x53824d=_0x5b85,_0x283042={'NxJYV':function(_0x418264,_0x2a3ca5){return _0x418264===_0x2a3ca5;}};if(typeof _0x1652df===_0x53824d(0xec))return _0x1652df[_0x53824d(0xda)](/\$\{(\w+)\}/g,(_0x1fddeb,_0xb13f2e)=>{const _0x342c6e=_0x53824d,_0x43b41a=process['env'][_0xb13f2e];if(_0x43b41a===undefined)throw new Error(_0x342c6e(0xb8)+_0xb13f2e+_0x342c6e(0xa5));return _0x43b41a;});if(Array['isArray'](_0x1652df))return _0x1652df[_0x53824d(0x100)](resolveEnvVars);if(_0x1652df&&_0x283042['NxJYV'](typeof _0x1652df,_0x53824d(0xe1)))return Object[_0x53824d(0xe4)](Object['entries'](_0x1652df)['map'](([_0x2249f9,_0x3a9398])=>[_0x2249f9,resolveEnvVars(_0x3a9398)]));return _0x1652df;}const isRecord=_0x40c0ac=>typeof _0x40c0ac===_0x5b1811(0xe1)&&_0x40c0ac!==null&&!Array[_0x5b1811(0xdd)](_0x40c0ac),asRecord=_0x2fe945=>isRecord(_0x2fe945)?_0x2fe945:undefined,mergeHeaders=(_0x61e654,_0x5e4b65)=>{const _0x2f07f5=_0x5b1811,_0x153403={'yGrIv':function(_0xf81df3,_0x5b69e8){return _0xf81df3??_0x5b69e8;}},_0x5631cd={..._0x153403['yGrIv'](_0x61e654,{}),..._0x153403[_0x2f07f5(0xa8)](_0x5e4b65,{})};return Object['keys'](_0x5631cd)['length']?_0x5631cd:undefined;},SAFE_MODE_ARGS=[_0x5b1811(0x9d)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content','--unsafely-treat-insecure-origin-as-secure=http://localhost',_0x5b1811(0xd0)];export function buildBrowserOptionsFromSettings(_0x50c783,_0x4c0016={}){const _0x1f787d=_0x5b1811,_0x2ceb4d={'fNgor':function(_0x3973ea,_0x199d95){return _0x3973ea===_0x199d95;},'QakIb':function(_0x5e49f9,_0x19dd6b){return _0x5e49f9(_0x19dd6b);},'VzPsr':_0x1f787d(0xec),'vyMJd':function(_0x4ee846,_0x59ccc6,_0x3f0cbe){return _0x4ee846(_0x59ccc6,_0x3f0cbe);}},_0xabee43=asRecord(_0x50c783['browser']),_0x39b23c={...asRecord(_0xabee43?.['launchOptions'])??{}};_0x2ceb4d[_0x1f787d(0xc6)](typeof _0x4c0016[_0x1f787d(0xef)],_0x1f787d(0xb3))&&(_0x39b23c[_0x1f787d(0xef)]=_0x4c0016['headless']);if(_0x50c783[_0x1f787d(0xd1)]){const _0x4ae669=_0x39b23c[_0x1f787d(0xc8)]??[],_0x591c9d=SAFE_MODE_ARGS[_0x1f787d(0xd7)](_0x560ce0=>!_0x4ae669['includes'](_0x560ce0));_0x39b23c['args']=[..._0x4ae669,..._0x591c9d];}if(_0x50c783[_0x1f787d(0xfa)]){const _0x3a5eca=_0x39b23c['args']??[],_0x4fdcf7=ALLOW_LOCALHOST_ARGS['filter'](_0x306fa0=>!_0x3a5eca[_0x1f787d(0xb9)](_0x306fa0));_0x39b23c['args']=[..._0x3a5eca,..._0x4fdcf7];}const _0xf98ae8={..._0x2ceb4d['QakIb'](asRecord,_0xabee43?.[_0x1f787d(0xa1)])??{}};_0xf98ae8['ignoreHTTPSErrors']=!![];typeof _0x50c783['userAgent']===_0x2ceb4d['VzPsr']&&(_0xf98ae8[_0x1f787d(0x103)]=_0x50c783[_0x1f787d(0x103)]);const _0x1fff6b=_0x2ceb4d['vyMJd'](mergeHeaders,asRecord(_0xf98ae8[_0x1f787d(0xfc)]),asRecord(_0x50c783[_0x1f787d(0xa3)]));return _0x1fff6b?_0xf98ae8[_0x1f787d(0xfc)]=_0x1fff6b:delete _0xf98ae8['extraHTTPHeaders'],_0x4c0016[_0x1f787d(0xaf)]&&(_0xf98ae8['storageState']=_0x4c0016['storageStatePath']),{'launchOptions':_0x39b23c,'contextOptions':_0xf98ae8};}async function resolveLocalAuthPath(_0xd26ab){const _0x3f45c5=_0x5b1811,_0x3b35ef={'mdBfy':_0x3f45c5(0xac),'ncrzP':'auth.json','coblY':function(_0x446c94,_0x2cbcca){return _0x446c94(_0x2cbcca);},'xQPzk':function(_0xdc0c37,_0x27d5d3){return _0xdc0c37(_0x27d5d3);},'PFFWI':function(_0x2491f3,_0x1af6c0){return _0x2491f3(_0x1af6c0);}},_0x20ee11=join(_0xd26ab,_0x3b35ef['mdBfy']),_0x3a0e48=join(_0xd26ab,_0x3b35ef['ncrzP']);if(_0x3b35ef[_0x3f45c5(0xb6)](existsSync,_0x20ee11))try{const _0x685709=await getToken();if(!_0x685709)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x36ae1a=await _0x3b35ef[_0x3f45c5(0xed)](readFile,_0x20ee11),_0x122ae5=decrypt(_0x36ae1a,_0x685709),_0x3473eb=join(tmpdir(),_0x3f45c5(0xc1)+Date[_0x3f45c5(0xbf)]()+'.json');return await writeFile(_0x3473eb,_0x122ae5),{'storageStatePath':_0x3473eb,'tempAuthPath':_0x3473eb};}catch(_0x435daa){const _0x116b55=_0x435daa instanceof Error?_0x435daa['message']:String(_0x435daa);throw new Error(_0x3f45c5(0x9e)+_0x116b55);}if(_0x3b35ef[_0x3f45c5(0xb1)](existsSync,_0x3a0e48))return{'storageStatePath':_0x3a0e48};return{};}export async function buildPlaywrightConfig(_0x2f20e5,_0x2208a6,_0xf37d6f,_0x451f8a,_0x486fee){const _0x44b095=_0x5b1811,_0x3f393b={'BOvoV':function(_0xcec985,_0x30f471,_0x544838,_0x44cd95,_0x1bec39,_0x3f8c4,_0x1dfd0d){return _0xcec985(_0x30f471,_0x544838,_0x44cd95,_0x1bec39,_0x3f8c4,_0x1dfd0d);},'FAXvb':function(_0x2b1f80,_0x290312){return _0x2b1f80(_0x290312);}};if(_0x486fee)return _0x3f393b[_0x44b095(0xf9)](buildPlaywrightConfigCore,_0x2f20e5,_0x486fee,_0x2208a6,_0xf37d6f,_0x451f8a,'stagehand');const {storageStatePath:_0x18e263,tempAuthPath:_0x4b7a64}=await _0x3f393b['FAXvb'](resolveLocalAuthPath,getEnvDir(_0x2208a6));try{const _0x150df8=await buildPlaywrightConfigCore(_0x2f20e5,_0x18e263,_0x2208a6,_0xf37d6f,_0x451f8a,_0x44b095(0xf5));return{..._0x150df8,'tempAuthPath':_0x4b7a64};}catch(_0x5d8e25){_0x4b7a64&&await _0x3f393b[_0x44b095(0xeb)](unlink,_0x4b7a64)['catch'](()=>{});throw _0x5d8e25;}}export async function buildPlaywrightConfigCore(_0x5a86c6,_0x1314bc,_0x383e77,_0x5ba1c8,_0x4d2204,_0x1e82ae='stagehand'){const _0x150a39=_0x5b1811,_0x2568fc={'UUDuM':'--disable-setuid-sandbox','Ffwov':function(_0x132f47){return _0x132f47();},'swMFH':function(_0x46024b,_0x917061){return _0x46024b(_0x917061);},'Bejxm':_0x150a39(0xad),'cyMBi':_0x150a39(0xbb),'OXxHp':_0x150a39(0xfb),'lfMGI':'pdf','BtjHh':'vision','yXwrM':function(_0x1ae106,_0x4aa112,_0xc4864e){return _0x1ae106(_0x4aa112,_0xc4864e);},'QLdEa':function(_0x1e3e42,_0xb50496){return _0x1e3e42===_0xb50496;},'rNVNh':'playwright-cli','zOuvv':'-cli'},_0x4d3341=_0x5ba1c8||_0x2568fc[_0x150a39(0xbc)](randomUUID),_0x8751ff=join(_0x2568fc[_0x150a39(0xbc)](getRangerDir),'sessions',_0x4d3341),_0x264648=_0x2568fc[_0x150a39(0xaa)](Boolean,_0x5a86c6[_0x150a39(0xbd)]),_0x25c21a=_0x264648?{'browserName':_0x2568fc[_0x150a39(0xba)],'cdpEndpoint':_0x5a86c6[_0x150a39(0xbd)]}:((()=>{const _0x1b0698=_0x150a39,{launchOptions:_0x4b3465,contextOptions:_0x5b1e03}=buildBrowserOptionsFromSettings(_0x5a86c6,{'headless':_0x4d2204?![]:_0x5a86c6['headless']??!![],'storageStatePath':_0x1314bc});if(process['getuid']?.()===0x0){const _0x155e28=['--no-sandbox',_0x2568fc['UUDuM']],_0x465f3b=_0x4b3465['args']??[],_0x5dcc50=_0x155e28[_0x1b0698(0xd7)](_0x2b4d66=>!_0x465f3b[_0x1b0698(0xb9)](_0x2b4d66));_0x4b3465[_0x1b0698(0xc8)]=[..._0x465f3b,..._0x5dcc50];}return{'isolated':!![],'browserName':'chromium','launchOptions':_0x4b3465,'contextOptions':{..._0x5b1e03,'permissions':['clipboard-read',_0x1b0698(0xf1)],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x12fdbb=_0x1e82ae==='playwright-cli'?{'browser':_0x25c21a,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x8751ff,'outputMode':_0x2568fc[_0x150a39(0xd6)],'codegen':_0x150a39(0xb5)}:{'name':_0x383e77,'browser':_0x25c21a,'capabilities':['core',_0x2568fc['OXxHp'],_0x150a39(0xa0),_0x2568fc[_0x150a39(0xc9)],_0x2568fc[_0x150a39(0xb7)]],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x8751ff};if(!_0x264648){const _0x52151d=_0x12fdbb[_0x150a39(0xe5)],_0x3e785a=_0x52151d[_0x150a39(0xa1)];if(_0x3e785a['userAgent']===undefined)delete _0x3e785a[_0x150a39(0x103)];if(_0x3e785a['storageState']===undefined)delete _0x3e785a['storageState'];}const _0x53a5c9=join(tmpdir(),'ranger-config');!_0x2568fc[_0x150a39(0xaa)](existsSync,_0x53a5c9)&&await _0x2568fc['yXwrM'](mkdir,_0x53a5c9,{'recursive':!![]});const _0x1a6d5b=_0x2568fc['QLdEa'](_0x1e82ae,_0x2568fc['rNVNh'])?_0x2568fc['zOuvv']:'',_0x4c8ec8=join(_0x53a5c9,_0x383e77+'-'+Date['now']()+_0x1a6d5b+_0x150a39(0xe8));return await writeFile(_0x4c8ec8,JSON['stringify'](_0x12fdbb,null,0x2)),{'configPath':_0x4c8ec8};}export async function buildPlaywrightCliConfig(_0x130460,_0x375735,_0x39f763,_0x526318,_0x2868c4){const _0x235e22={'XZuYK':function(_0x3f756d,_0x1a95e7){return _0x3f756d(_0x1a95e7);},'gliAD':function(_0x2cf545,_0x2ffabb,_0xf19aa,_0x510363,_0x4df87d,_0x1329f6,_0x4b345e){return _0x2cf545(_0x2ffabb,_0xf19aa,_0x510363,_0x4df87d,_0x1329f6,_0x4b345e);},'skUvA':function(_0x43f072,_0x51d22c){return _0x43f072(_0x51d22c);}};if(_0x2868c4)return buildPlaywrightConfigCore(_0x130460,_0x2868c4,_0x375735,_0x39f763,_0x526318,'playwright-cli');const {storageStatePath:_0x4f5fc4,tempAuthPath:_0x40cdef}=await _0x235e22['XZuYK'](resolveLocalAuthPath,getEnvDir(_0x375735));try{const _0x11366f=await _0x235e22['gliAD'](buildPlaywrightConfigCore,_0x130460,_0x4f5fc4,_0x375735,_0x39f763,_0x526318,'playwright-cli');return{..._0x11366f,'tempAuthPath':_0x40cdef};}catch(_0x4a098f){_0x40cdef&&await _0x235e22['skUvA'](unlink,_0x40cdef)['catch'](()=>{});throw _0x4a098f;}}export function getNestedValue(_0x3099d6,_0x1ac030){const _0x2221be=_0x5b1811,_0x30cd36={'KPjeE':function(_0x4bfdb8,_0x105f84){return _0x4bfdb8(_0x105f84);},'kzaKt':function(_0x147197,_0x5946b5){return _0x147197===_0x5946b5;},'zrydz':function(_0x273d86,_0x1573c0){return _0x273d86!==_0x1573c0;}},_0x1e6f3c=_0x30cd36['KPjeE'](parseKeyPath,_0x1ac030);let _0xe74650=_0x3099d6;for(const _0x3ea99a of _0x1e6f3c){if(_0xe74650===null||_0x30cd36['kzaKt'](_0xe74650,undefined)||_0x30cd36[_0x2221be(0xe6)](typeof _0xe74650,_0x2221be(0xe1)))return undefined;_0xe74650=_0xe74650[_0x3ea99a];}return _0xe74650;}function _0x5b1f(){const _0x22370b=['gmLZC','ENOENT','map','join','rZLwF','userAgent','path','\x22\x20to\x20legacy\x20path\x20','--disable-features=WebBluetooth','Failed\x20to\x20decrypt\x20auth\x20state:\x20','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','install','contextOptions','vHina','headers','length','\x20is\x20not\x20set','yaTdC','MNdHq','yGrIv','HadjV','swMFH','setupHeader','auth.json.enc','chromium','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','storageStatePath','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','PFFWI','Failed\x20to\x20clean\x20up\x20temp\x20file\x20','boolean','592ZhJfBU','none','coblY','BtjHh','Environment\x20variable\x20','includes','Bejxm','file','Ffwov','cdpEndpoint','location','now','stringify','ranger-auth-','649920fOfmIE','repeat','32375nSPSxh','endsWith','fNgor','373068eWufEP','args','lfMGI','NBrFM','entries','all','local','467298EZrQzO','nHWLh','--allow-insecure-localhost','safeMode','UjWHS','eBsvH','wtxCo','bQeBw','cyMBi','filter','PzgYE','rangerDir','replace','aqTiU','ZAqJG','isArray','fqchB','1467784RKhFlQ','TazEk','object','parse','yuwrC','fromEntries','browser','zrydz','legacy','.json','141242CZPGIV','678qGiEOS','FAXvb','string','xQPzk','settings.json','headless','5570HuExZz','clipboard-write','JjfZJ','MRiyn','XBpGl','stagehand','tXDhe','mwDbz','push','BOvoV','allowInsecureLocalhost','tabs','extraHTTPHeaders','forWrite'];_0x5b1f=function(){return _0x22370b;};return _0x5b1f();}export function setNestedValue(_0x1bda3f,_0xf271a1,_0x421b77){const _0x357e71=_0x5b1811,_0x40223a={'qkJTd':_0x357e71(0xe1),'eURtT':function(_0x599826,_0x3a3caa){return _0x599826-_0x3a3caa;}},_0x10c6e1=parseKeyPath(_0xf271a1);let _0x5b4fce=_0x1bda3f;for(let _0x50ce53=0x0;_0x50ce53<_0x10c6e1[_0x357e71(0xa4)]-0x1;_0x50ce53++){const _0x3ebe6c=_0x10c6e1[_0x50ce53];(!(_0x3ebe6c in _0x5b4fce)||typeof _0x5b4fce[_0x3ebe6c]!==_0x40223a['qkJTd'])&&(_0x5b4fce[_0x3ebe6c]={}),_0x5b4fce=_0x5b4fce[_0x3ebe6c];}_0x5b4fce[_0x10c6e1[_0x40223a['eURtT'](_0x10c6e1[_0x357e71(0xa4)],0x1)]]=_0x421b77;}export function deleteNestedValue(_0x72d5aa,_0xf34f84){const _0x55ca33=_0x5b1811,_0x2f171e={'vOXsb':function(_0x262ed5,_0x1f2b20){return _0x262ed5<_0x1f2b20;},'aqTiU':function(_0x1f44eb,_0x3d365b){return _0x1f44eb!==_0x3d365b;},'OKwIP':function(_0x289cd4,_0x1aec46){return _0x289cd4!==_0x1aec46;},'tXDhe':function(_0xcc480e,_0x37572f){return _0xcc480e in _0x37572f;}},_0x566979=parseKeyPath(_0xf34f84);let _0x30c04d=_0x72d5aa;for(let _0x3693b3=0x0;_0x2f171e['vOXsb'](_0x3693b3,_0x566979[_0x55ca33(0xa4)]-0x1);_0x3693b3++){if(_0x30c04d===null||_0x30c04d===undefined||_0x2f171e[_0x55ca33(0xdb)](typeof _0x30c04d,'object'))return![];_0x30c04d=_0x30c04d[_0x566979[_0x3693b3]];}if(_0x30c04d===null||_0x30c04d===undefined||_0x2f171e['OKwIP'](typeof _0x30c04d,'object'))return![];const _0x28389d=_0x566979[_0x566979[_0x55ca33(0xa4)]-0x1];if(_0x2f171e[_0x55ca33(0xf6)](_0x28389d,_0x30c04d))return delete _0x30c04d[_0x28389d],!![];return![];}function parseKeyPath(_0x9c4421){const _0x1efb33=_0x5b1811,_0x20aeb9={'yaTdC':function(_0x2cf9f1,_0x3fb9bb){return _0x2cf9f1===_0x3fb9bb;},'ZAqJG':_0x1efb33(0xa3),'yuwrC':'setupHeaders'},_0x366b9f=_0x9c4421['split']('.');return _0x20aeb9[_0x1efb33(0xa6)](_0x366b9f[0x0],'header')&&(_0x366b9f[0x0]=_0x20aeb9[_0x1efb33(0xdc)]),_0x366b9f[0x0]===_0x1efb33(0xab)&&(_0x366b9f[0x0]=_0x20aeb9[_0x1efb33(0xe3)]),_0x366b9f;}export function formatSettings(_0x255732,_0x57d276=0x0){const _0x39fc2b=_0x5b1811,_0x14962a={'SnGMz':function(_0x415a18,_0x551723){return _0x415a18===_0x551723;}},_0x1f865e=[],_0x3d1e03='\x20\x20'[_0x39fc2b(0xc3)](_0x57d276);for(const [_0x19c4df,_0xae3af8]of Object[_0x39fc2b(0xcb)](_0x255732)){if(_0x14962a['SnGMz'](_0xae3af8,undefined))continue;if(typeof _0xae3af8==='object'&&_0xae3af8!==null){_0x1f865e[_0x39fc2b(0xf8)](''+_0x3d1e03+_0x19c4df+':');for(const [_0x58adba,_0x1ec6a1]of Object['entries'](_0xae3af8)){_0x1f865e['push'](_0x3d1e03+'\x20\x20'+_0x58adba+':\x20'+_0x1ec6a1);}}else _0x1f865e[_0x39fc2b(0xf8)](''+_0x3d1e03+_0x19c4df+':\x20'+_0xae3af8);}return _0x1f865e[_0x39fc2b(0x101)]('\x0a');}
|
|
1
|
+
const _0x4a448e=_0x425d;(function(_0x3aa9e5,_0x7ef18b){const _0x4d2951=_0x425d,_0x43b2d1=_0x3aa9e5();while(!![]){try{const _0x37ea03=-parseInt(_0x4d2951(0xf4))/0x1+parseInt(_0x4d2951(0x9b))/0x2+-parseInt(_0x4d2951(0x98))/0x3+parseInt(_0x4d2951(0xb4))/0x4+-parseInt(_0x4d2951(0xee))/0x5+parseInt(_0x4d2951(0xa4))/0x6*(parseInt(_0x4d2951(0xba))/0x7)+parseInt(_0x4d2951(0xb6))/0x8;if(_0x37ea03===_0x7ef18b)break;else _0x43b2d1['push'](_0x43b2d1['shift']());}catch(_0x4cfa89){_0x43b2d1['push'](_0x43b2d1['shift']());}}}(_0x20bc,0xb265f));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{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';function _0x425d(_0x2607de,_0x446a10){_0x2607de=_0x2607de-0x98;const _0x20bcb4=_0x20bc();let _0x425da4=_0x20bcb4[_0x2607de];return _0x425da4;}import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x3e06fe,_0x3db585){const _0xfb2cd1=_0x425d,_0x218263={'Kdzca':function(_0x85ee59,_0x5d2d30,_0x381349,_0x3c4eb8){return _0x85ee59(_0x5d2d30,_0x381349,_0x3c4eb8);},'UYHos':function(_0x5112aa,_0x3fdf40,_0x1d325a,_0x4c1b11){return _0x5112aa(_0x3fdf40,_0x1d325a,_0x4c1b11);},'CHgzV':function(_0x2d23dc,_0x2be927,_0x2ebb37){return _0x2d23dc(_0x2be927,_0x2ebb37);},'LdXFN':function(_0x53b7f2,_0x212f11){return _0x53b7f2(_0x212f11);},'iwLBu':function(_0x399970,_0x123f5a){return _0x399970!==_0x123f5a;}},_0xa4e8f6=_0x218263[_0xfb2cd1(0xd8)](join,_0x3db585,'ci',_0x3e06fe),_0x4ee3d2=_0x218263['UYHos'](join,_0x3db585,'local',_0x3e06fe),_0x41cba5=_0x218263['CHgzV'](join,_0x3db585,_0x3e06fe),_0x3f50c4=join(_0x3db585,'local'),_0x44e29c=join(_0x3db585,'ci');if(existsSync(_0xa4e8f6))return _0xa4e8f6;if(existsSync(_0x4ee3d2))return _0x4ee3d2;if(_0x218263['LdXFN'](existsSync,_0x41cba5)&&(_0x218263['iwLBu'](_0x41cba5,_0x3f50c4)&&_0x218263['iwLBu'](_0x41cba5,_0x44e29c)?!![]:hasLegacyProfileFiles(_0x41cba5)))return _0x41cba5;return null;}export function getEnvDir(_0x47b35b,_0x13541a={}){const _0x46e01b=_0x425d,_0xa93ce2={'ytODf':function(_0x5667a9){return _0x5667a9();},'mnSHH':function(_0x16187e,_0x4cd437,_0x229337){return _0x16187e(_0x4cd437,_0x229337);},'mGwpp':function(_0x4389f7,_0x42c578){return _0x4389f7(_0x42c578);},'tkQal':function(_0x2ade46,_0x36f0ba){return _0x2ade46!==_0x36f0ba;},'qnwZg':function(_0x471065,_0x14b925,_0xb811ce,_0x5522f0){return _0x471065(_0x14b925,_0xb811ce,_0x5522f0);},'WldZC':'local','tZQDv':function(_0x3b12f3,_0x466fa2,_0x4cbe26){return _0x3b12f3(_0x466fa2,_0x4cbe26);}},_0x3df115=_0xa93ce2[_0x46e01b(0xbb)](getRangerDir),_0x1c687e=_0xa93ce2['mnSHH'](findEnvInRoot,_0x47b35b,_0x3df115);if(_0x1c687e){if(_0x13541a[_0x46e01b(0x9f)]&&_0xa93ce2['mGwpp'](isLegacyEnvPath,_0x1c687e))throw legacyWriteError(_0x47b35b,_0x1c687e);return _0x1c687e;}const _0x2c58f5=getRangerHomeDir();if(_0xa93ce2['tkQal'](_0x2c58f5,_0x3df115)){const _0x48b9d2=findEnvInRoot(_0x47b35b,_0x2c58f5);if(_0x48b9d2){if(_0x13541a['forWrite']&&isLegacyEnvPath(_0x48b9d2))throw legacyWriteError(_0x47b35b,_0x48b9d2);return _0x48b9d2;}}const _0x2a20a5=_0xa93ce2[_0x46e01b(0xaa)](join,_0x2c58f5,_0xa93ce2['WldZC'],_0x47b35b);if(_0x13541a[_0x46e01b(0x9f)])throw _0xa93ce2[_0x46e01b(0xcc)](legacyWriteError,_0x47b35b,_0x2a20a5);return _0x2a20a5;}function isLegacyEnvPath(_0x5c23d8){const _0x5adc18=_0x425d,_0x436349={'eJOwS':function(_0x5c02ba){return _0x5c02ba();},'tDTgz':function(_0x2ca857,_0x353c30){return _0x2ca857+_0x353c30;},'yvXte':function(_0x134d65,_0x191be7){return _0x134d65===_0x191be7;}},_0x752e79=_0x436349['eJOwS'](getRangerDir),_0x586e4b=getRangerHomeDir();for(const _0x4bc9ca of new Set([_0x752e79,_0x586e4b])){const _0x4344e6=_0x4bc9ca[_0x5adc18(0xf1)]('/')?_0x4bc9ca:_0x436349[_0x5adc18(0xb2)](_0x4bc9ca,'/');if(_0x436349[_0x5adc18(0xd3)](_0x5c23d8,_0x4bc9ca)||_0x5c23d8['startsWith'](_0x4344e6))return!![];}return![];}function legacyWriteError(_0x59a864,_0x29ceae){const _0x4d39ec=_0x425d,_0x3f9b5a={'PVcLB':function(_0x25e5d3,_0x3247bf){return _0x25e5d3+_0x3247bf;}};return new Error(_0x3f9b5a[_0x4d39ec(0xb9)](_0x4d39ec(0xd1)+_0x59a864+_0x4d39ec(0xe6)+_0x29ceae+'.\x0a'+'That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'+_0x4d39ec(0xab),_0x4d39ec(0xc2)));}export function findExistingEnv(_0xbf63f8,_0x37c494){const _0x2fe412=_0x425d,_0x3dc653={'LvbtL':function(_0x50ab4c){return _0x50ab4c();},'lESLW':'local','FSwDA':'legacy','EjJvW':function(_0x120bc5,_0x55de13,_0xe05b53){return _0x120bc5(_0x55de13,_0xe05b53);},'btYRg':function(_0x25e316,_0x34f93e,_0x14fc4e,_0x42bfdf){return _0x25e316(_0x34f93e,_0x14fc4e,_0x42bfdf);},'Pyasy':function(_0x372e74,_0x2f55f8){return _0x372e74===_0x2f55f8;}},_0x304de0=_0x37c494?.[_0x2fe412(0xa6)],_0x2a2c46=_0x304de0?[_0x304de0]:[getRangerDir(),_0x3dc653[_0x2fe412(0x103)](getRangerHomeDir)][_0x2fe412(0xb3)]((_0x4de851,_0x5b7d55,_0x55518e)=>_0x55518e[_0x2fe412(0xe8)](_0x4de851)===_0x5b7d55),_0x3fa66b=_0x37c494?.[_0x2fe412(0x105)]??['ci',_0x3dc653[_0x2fe412(0xe5)],_0x3dc653[_0x2fe412(0xcd)]];for(const _0x264de4 of _0x2a2c46){const _0x1ef121=_0x3dc653[_0x2fe412(0xc1)](join,_0x264de4,_0x2fe412(0xec)),_0x10e3c9=join(_0x264de4,'ci'),_0xec021b=[{'location':'ci','path':join(_0x264de4,'ci',_0xbf63f8)},{'location':_0x2fe412(0xec),'path':_0x3dc653[_0x2fe412(0xdb)](join,_0x264de4,_0x3dc653[_0x2fe412(0xe5)],_0xbf63f8)},{'location':_0x3dc653[_0x2fe412(0xcd)],'path':join(_0x264de4,_0xbf63f8)}];for(const _0x5a3c17 of _0xec021b){if(_0x3fa66b[_0x2fe412(0xfc)](_0x5a3c17[_0x2fe412(0xfb)])&&existsSync(_0x5a3c17['path'])){if(_0x5a3c17[_0x2fe412(0xfb)]===_0x3dc653['FSwDA']&&(_0x3dc653[_0x2fe412(0x104)](_0x5a3c17[_0x2fe412(0xb7)],_0x1ef121)||_0x5a3c17[_0x2fe412(0xb7)]===_0x10e3c9)&&!hasLegacyProfileFiles(_0x5a3c17['path']))continue;return{'path':_0x5a3c17['path'],'location':_0x5a3c17['location']};}}}return null;}function hasLegacyProfileFiles(_0x1738c0){const _0x3e163a=_0x425d,_0x7e8986={'azlMz':function(_0x548935,_0x4dde41,_0xc0bfae){return _0x548935(_0x4dde41,_0xc0bfae);},'qIXQn':'settings.json','HsdRL':'auth.json','VXsVk':function(_0x4ce9b2,_0x325ed9){return _0x4ce9b2(_0x325ed9);},'zMUgB':_0x3e163a(0xe3)};return existsSync(_0x7e8986[_0x3e163a(0x10e)](join,_0x1738c0,_0x7e8986[_0x3e163a(0xd4)]))||existsSync(_0x7e8986[_0x3e163a(0x10e)](join,_0x1738c0,_0x7e8986['HsdRL']))||_0x7e8986['VXsVk'](existsSync,_0x7e8986['azlMz'](join,_0x1738c0,_0x7e8986['zMUgB']));}export function isEnvCi(_0x3c6464){const _0x3739e6=_0x425d,_0xb0d6ec={'PvOPq':function(_0x308f8d,_0x150ccf){return _0x308f8d(_0x150ccf);},'QwSCI':function(_0x4fa12c,_0x14f1a2,_0x325143,_0x16cdb6){return _0x4fa12c(_0x14f1a2,_0x325143,_0x16cdb6);},'rBlsT':function(_0x11205c){return _0x11205c();},'gcrJR':function(_0x12bf51){return _0x12bf51();},'OwuOH':function(_0x453933,_0x39a4a0){return _0x453933!==_0x39a4a0;},'kByqU':function(_0x574a8d){return _0x574a8d();}};if(_0xb0d6ec['PvOPq'](existsSync,_0xb0d6ec['QwSCI'](join,_0xb0d6ec[_0x3739e6(0xe1)](getRangerDir),'ci',_0x3c6464)))return!![];const _0xe7d22b=_0xb0d6ec['gcrJR'](getRangerHomeDir);if(_0xb0d6ec[_0x3739e6(0x101)](_0xe7d22b,_0xb0d6ec['kByqU'](getRangerDir))&&_0xb0d6ec['PvOPq'](existsSync,join(_0xe7d22b,'ci',_0x3c6464)))return!![];return![];}export async function cleanupTempFiles(_0x4a3bcd){const _0x169311=_0x425d,_0x2c590e=[_0x4a3bcd['tempAuthPath'],_0x4a3bcd[_0x169311(0xc0)]]['filter'](Boolean);await Promise[_0x169311(0xd5)](_0x2c590e[_0x169311(0xfa)](_0x464152=>unlink(_0x464152)['catch'](_0x59e3d5=>{const _0x4b6e5c=_0x169311;_0x59e3d5[_0x4b6e5c(0xc5)]!=='ENOENT'&&console[_0x4b6e5c(0xa7)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x464152+':',_0x59e3d5['message']);})));}export function getSettingsPath(_0x17dcf0){const _0xd7a200=_0x425d,_0x3d8d62={'eUHmB':_0xd7a200(0xe0)};return join(getEnvDir(_0x17dcf0),_0x3d8d62[_0xd7a200(0xb5)]);}export async function loadSettings(_0x48d2dc){const _0x494ff8=_0x425d,_0x5485a8={'EvBZN':function(_0x619908,_0x2728b1){return _0x619908(_0x2728b1);},'EXhrW':function(_0x288453,_0x4d8eb1,_0x3ebf18){return _0x288453(_0x4d8eb1,_0x3ebf18);}},_0x106140=_0x5485a8['EvBZN'](getSettingsPath,_0x48d2dc);if(!existsSync(_0x106140))return{};try{const _0x3a9b18=await _0x5485a8['EXhrW'](readFile,_0x106140,'utf-8');return JSON[_0x494ff8(0xfe)](_0x3a9b18);}catch{return{};}}export async function saveSettings(_0x3c2d61,_0xca9bd1){const _0x5dcaf3=_0x425d,_0x1fc0c9={'IBEeF':function(_0x1d2c62,_0x190cb0){return _0x1d2c62(_0x190cb0);},'oxJUq':function(_0x368ac8,_0x46f236,_0xfe97f5){return _0x368ac8(_0x46f236,_0xfe97f5);}},_0x2fcc4a=getSettingsPath(_0x3c2d61),_0x3a663a=dirname(_0x2fcc4a);!_0x1fc0c9[_0x5dcaf3(0xcb)](existsSync,_0x3a663a)&&await _0x1fc0c9['oxJUq'](mkdir,_0x3a663a,{'recursive':!![]}),await _0x1fc0c9['oxJUq'](writeFile,_0x2fcc4a,JSON['stringify'](_0xca9bd1,null,0x2));}export function resolveEnvVars(_0x36630d){const _0x25ac62=_0x425d,_0x41002b={'ZoLBv':function(_0x2d0470,_0xebcd97){return _0x2d0470===_0xebcd97;},'CtgBf':function(_0x32caba,_0x31e76f){return _0x32caba===_0x31e76f;}};if(typeof _0x36630d===_0x25ac62(0x9a))return _0x36630d[_0x25ac62(0xe2)](/\$\{(\w+)\}/g,(_0x52ec50,_0x4416bf)=>{const _0x5ded63=_0x25ac62,_0x580414=process[_0x5ded63(0xff)][_0x4416bf];if(_0x41002b['ZoLBv'](_0x580414,undefined))throw new Error('Environment\x20variable\x20'+_0x4416bf+_0x5ded63(0x106));return _0x580414;});if(Array[_0x25ac62(0xa0)](_0x36630d))return _0x36630d['map'](resolveEnvVars);if(_0x36630d&&_0x41002b['CtgBf'](typeof _0x36630d,'object'))return Object[_0x25ac62(0xad)](Object['entries'](_0x36630d)['map'](([_0xd7d57c,_0x3c19ca])=>[_0xd7d57c,resolveEnvVars(_0x3c19ca)]));return _0x36630d;}function _0x20bc(){const _0x3a36df=['--no-sandbox','storageStatePath','length','cdpEndpoint','azlMz','dbfeA','2864538HUGFZf','playwright-cli','string','785866brsObP','keys','stagehand','--unsafely-treat-insecure-origin-as-secure=http://localhost','forWrite','isArray','Zxlvo','stringify','vision','377682ngJtZR','join','rangerDir','warn','userAgent','pdf','qnwZg','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','args','fromEntries','EbKhG','--disable-setuid-sandbox','headless','setupHeaders','tDTgz','filter','3992956XhCgTm','eUHmB','2543904XUzVsN','path','catch','PVcLB','91zKCZkO','ytODf','nova-user-data','OWRCi','push','boolean','configPath','EjJvW','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','tabs','Trhxq','code','FgLmP','ranger-auth-','storageState','dqCNx','object','IBEeF','tZQDv','FSwDA','--disable-features=WebBluetooth','LZhNN','PrKlC','Refusing\x20to\x20write\x20profile\x20\x22','file','yvXte','qIXQn','all','fnojX','wnaln','Kdzca','Jyprf','vfdHn','btYRg','.json','safeMode','browser','executablePath','settings.json','rBlsT','replace','auth.json.enc','Default','lESLW','\x22\x20to\x20legacy\x20path\x20','xlAju','indexOf','tnHre','nwXNp','contextOptions','local','chromium','603335odnnhk','SfPjz','ranger-config','endsWith','extraHTTPHeaders','sessions','721239itRXUm','--disable-web-security','now','entries','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','adnif','map','location','includes','allowInsecureLocalhost','parse','env','FoLZs','OwuOH','RBMNU','LvbtL','Pyasy','locations','\x20is\x20not\x20set','headers','core','AsErM'];_0x20bc=function(){return _0x3a36df;};return _0x20bc();}const isRecord=_0x4ef9dd=>typeof _0x4ef9dd===_0x4a448e(0xca)&&_0x4ef9dd!==null&&!Array['isArray'](_0x4ef9dd),asRecord=_0x285af2=>isRecord(_0x285af2)?_0x285af2:undefined,mergeHeaders=(_0x7b87a6,_0x4556d2)=>{const _0x2e38ef=_0x4a448e,_0x1d61dc={'Trhxq':function(_0x121799,_0x170aa2){return _0x121799??_0x170aa2;}},_0x171a58={..._0x1d61dc[_0x2e38ef(0xc4)](_0x7b87a6,{}),..._0x4556d2??{}};return Object[_0x2e38ef(0x9c)](_0x171a58)[_0x2e38ef(0x10c)]?_0x171a58:undefined;},SAFE_MODE_ARGS=[_0x4a448e(0xce)],ALLOW_LOCALHOST_ARGS=[_0x4a448e(0xf5),'--allow-running-insecure-content',_0x4a448e(0x9e),'--allow-insecure-localhost'];export function buildBrowserOptionsFromSettings(_0x55c4f5,_0x3717b8={}){const _0x5d8d61=_0x4a448e,_0x35b35c={'adnif':function(_0x1b98de,_0x4fc9fc){return _0x1b98de===_0x4fc9fc;},'BBCMa':_0x5d8d61(0x9a),'FgLmP':function(_0x5ab5b3,_0x30c9c7,_0x19a698){return _0x5ab5b3(_0x30c9c7,_0x19a698);},'BsTha':function(_0x47fc05,_0x31f754){return _0x47fc05(_0x31f754);}},_0x1c0f39=asRecord(_0x55c4f5[_0x5d8d61(0xde)]),_0x2e96a6={...asRecord(_0x1c0f39?.['launchOptions'])??{}};typeof _0x3717b8['headless']===_0x5d8d61(0xbf)&&(_0x2e96a6['headless']=_0x3717b8['headless']);if(_0x55c4f5[_0x5d8d61(0xdd)]){const _0xbdfada=_0x2e96a6['args']??[],_0x55eddd=SAFE_MODE_ARGS['filter'](_0x574c7c=>!_0xbdfada[_0x5d8d61(0xfc)](_0x574c7c));_0x2e96a6['args']=[..._0xbdfada,..._0x55eddd];}if(_0x55c4f5['allowInsecureLocalhost']){const _0x4e710e=_0x2e96a6['args']??[],_0x444cab=ALLOW_LOCALHOST_ARGS[_0x5d8d61(0xb3)](_0xda351=>!_0x4e710e['includes'](_0xda351));_0x2e96a6['args']=[..._0x4e710e,..._0x444cab];}const _0x43d443={...asRecord(_0x1c0f39?.[_0x5d8d61(0xeb)])??{}};_0x43d443['ignoreHTTPSErrors']=!![];_0x35b35c[_0x5d8d61(0xf9)](typeof _0x55c4f5['userAgent'],_0x35b35c['BBCMa'])&&(_0x43d443[_0x5d8d61(0xa8)]=_0x55c4f5[_0x5d8d61(0xa8)]);const _0x5bc1b2=_0x35b35c[_0x5d8d61(0xc6)](mergeHeaders,_0x35b35c['BsTha'](asRecord,_0x43d443[_0x5d8d61(0xf2)]),asRecord(_0x55c4f5[_0x5d8d61(0x107)]));return _0x5bc1b2?_0x43d443['extraHTTPHeaders']=_0x5bc1b2:delete _0x43d443[_0x5d8d61(0xf2)],_0x3717b8['storageStatePath']&&(_0x43d443[_0x5d8d61(0xc8)]=_0x3717b8[_0x5d8d61(0x10b)]),{'launchOptions':_0x2e96a6,'contextOptions':_0x43d443};}export async function resolveProfileStorageState(_0x5f1f34){const _0x2cdb47=_0x4a448e,_0x5ce5a2={'wnaln':function(_0x5cca71,_0x26f4ab){return _0x5cca71(_0x26f4ab);}};return resolveLocalAuthPath(_0x5ce5a2[_0x2cdb47(0xd7)](getEnvDir,_0x5f1f34));}async function resolveLocalAuthPath(_0x451508){const _0x422c4=_0x4a448e,_0x200c3a={'Jyprf':function(_0x17318f,_0x112c29,_0x7b66e3){return _0x17318f(_0x112c29,_0x7b66e3);},'LZhNN':function(_0x3b1308,_0x360ea8){return _0x3b1308(_0x360ea8);},'SfPjz':function(_0x13912d,_0x3939d0,_0x3a96ac){return _0x13912d(_0x3939d0,_0x3a96ac);},'KwHcD':function(_0x2ea782,_0x1960e2){return _0x2ea782(_0x1960e2);}},_0x15aff0=_0x200c3a[_0x422c4(0xd9)](join,_0x451508,_0x422c4(0xe3)),_0x98f081=join(_0x451508,'auth.json');if(_0x200c3a[_0x422c4(0xcf)](existsSync,_0x15aff0))try{const _0xc842cc=await getToken();if(!_0xc842cc)throw new Error(_0x422c4(0xf8));const _0x1c824d=await _0x200c3a[_0x422c4(0xcf)](readFile,_0x15aff0),_0x6c1f4d=decrypt(_0x1c824d,_0xc842cc),_0xe6e09=_0x200c3a['Jyprf'](join,tmpdir(),_0x422c4(0xc7)+Date[_0x422c4(0xf6)]()+'.json');return await _0x200c3a[_0x422c4(0xef)](writeFile,_0xe6e09,_0x6c1f4d),{'storageStatePath':_0xe6e09,'tempAuthPath':_0xe6e09};}catch(_0x59198e){const _0x11e713=_0x59198e instanceof Error?_0x59198e['message']:String(_0x59198e);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x11e713);}if(_0x200c3a['KwHcD'](existsSync,_0x98f081))return{'storageStatePath':_0x98f081};return{};}export async function buildPlaywrightConfig(_0x247992,_0x3ca451,_0x5a5a16,_0x2e40a0,_0x164beb){const _0x26eb04={'wWgOW':'stagehand','oIstU':function(_0x3cf927,_0x5ca1c7){return _0x3cf927(_0x5ca1c7);}};if(_0x164beb)return buildPlaywrightConfigCore(_0x247992,_0x164beb,_0x3ca451,_0x5a5a16,_0x2e40a0,_0x26eb04['wWgOW']);const {storageStatePath:_0x2056b8,tempAuthPath:_0xc2d4fa}=await resolveLocalAuthPath(getEnvDir(_0x3ca451));try{const _0x2d30d7=await buildPlaywrightConfigCore(_0x247992,_0x2056b8,_0x3ca451,_0x5a5a16,_0x2e40a0,_0x26eb04['wWgOW']);return{..._0x2d30d7,'tempAuthPath':_0xc2d4fa};}catch(_0x295457){_0xc2d4fa&&await _0x26eb04['oIstU'](unlink,_0xc2d4fa)['catch'](()=>{});throw _0x295457;}}export async function buildPlaywrightConfigCore(_0x2a6db5,_0x58efcc,_0x32ffd8,_0x2356d1,_0x6964b0,_0x448800=_0x4a448e(0x9d)){const _0x316da5=_0x4a448e,_0x32a697={'FoLZs':function(_0x41dbbd,_0x1b0788){return _0x41dbbd===_0x1b0788;},'PrKlC':'--no-sandbox','rqwyn':'--disable-setuid-sandbox','tnHre':'chromium','sdfvg':'clipboard-write','woMIW':function(_0xf8e470,_0x423012,_0x3a7639,_0x484fee){return _0xf8e470(_0x423012,_0x3a7639,_0x484fee);},'dbfeA':_0x316da5(0xf3),'TCCUs':function(_0xa765bd,_0x5e0ca4){return _0xa765bd(_0x5e0ca4);},'msuBv':_0x316da5(0xd2),'VbjHb':'install','fnojX':_0x316da5(0xa9),'lISaH':function(_0x25e6f1,_0x593416){return _0x25e6f1===_0x593416;},'xlAju':_0x316da5(0xf0),'AsErM':function(_0x3151f7,_0x50071b){return _0x3151f7===_0x50071b;},'xGiui':_0x316da5(0x99),'Zxlvo':'-cli','KysEl':function(_0x24a610,_0x1788c9,_0xec30d4){return _0x24a610(_0x1788c9,_0xec30d4);}},_0x3c5f00=_0x2356d1||randomUUID(),_0x30110c=_0x32a697['woMIW'](join,getRangerDir(),_0x32a697[_0x316da5(0x10f)],_0x3c5f00),_0x462a36=_0x32a697['TCCUs'](Boolean,_0x2a6db5[_0x316da5(0x10d)]),_0x303664=_0x462a36?{'browserName':_0x316da5(0xed),'cdpEndpoint':_0x2a6db5['cdpEndpoint']}:((()=>{const _0x4bfa5f=_0x316da5,{launchOptions:_0x216949,contextOptions:_0x528aa7}=buildBrowserOptionsFromSettings(_0x2a6db5,{'headless':_0x6964b0?![]:_0x2a6db5['headless']??!![],'storageStatePath':_0x58efcc});if(_0x32a697['FoLZs'](process['getuid']?.(),0x0)){const _0x169375=[_0x32a697[_0x4bfa5f(0xd0)],_0x32a697['rqwyn']],_0xd61ffc=_0x216949['args']??[],_0x2bfe78=_0x169375[_0x4bfa5f(0xb3)](_0x216ace=>!_0xd61ffc[_0x4bfa5f(0xfc)](_0x216ace));_0x216949[_0x4bfa5f(0xac)]=[..._0xd61ffc,..._0x2bfe78];}return{'isolated':!![],'browserName':_0x32a697[_0x4bfa5f(0xe9)],'launchOptions':_0x216949,'contextOptions':{..._0x528aa7,'permissions':['clipboard-read',_0x32a697['sdfvg']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0xe16bd6=_0x448800==='playwright-cli'?{'browser':_0x303664,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x30110c,'outputMode':_0x32a697['msuBv'],'codegen':'none'}:{'name':_0x32ffd8,'browser':_0x303664,'capabilities':[_0x316da5(0x108),_0x316da5(0xc3),_0x32a697['VbjHb'],_0x32a697[_0x316da5(0xd6)],_0x316da5(0xa3)],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x30110c};if(!_0x462a36){const _0x4623d8=_0xe16bd6['browser'],_0x7fee32=_0x4623d8['contextOptions'];if(_0x32a697[_0x316da5(0x100)](_0x7fee32[_0x316da5(0xa8)],undefined))delete _0x7fee32[_0x316da5(0xa8)];if(_0x32a697['lISaH'](_0x7fee32['storageState'],undefined))delete _0x7fee32['storageState'];}const _0xb630ed=join(tmpdir(),_0x32a697[_0x316da5(0xe7)]);!existsSync(_0xb630ed)&&await mkdir(_0xb630ed,{'recursive':!![]});const _0x5f3bdf=_0x32a697[_0x316da5(0x109)](_0x448800,_0x32a697['xGiui'])?_0x32a697[_0x316da5(0xa1)]:'',_0x554ba1=join(_0xb630ed,_0x32ffd8+'-'+Date['now']()+_0x5f3bdf+_0x316da5(0xdc));return await _0x32a697['KysEl'](writeFile,_0x554ba1,JSON[_0x316da5(0xa2)](_0xe16bd6,null,0x2)),{'configPath':_0x554ba1,'storageStatePath':_0x58efcc};}export async function buildPlaywrightCliConfig(_0x274725,_0x55f9df,_0x35f0ef,_0x44c726,_0xfe3350){const _0x59be53=_0x4a448e,_0x56ceaf={'bQlTr':function(_0x2f8a77,_0x3817b0,_0x2c72ea,_0x34f2c6,_0x521d44,_0xfa73aa,_0x48e092){return _0x2f8a77(_0x3817b0,_0x2c72ea,_0x34f2c6,_0x521d44,_0xfa73aa,_0x48e092);}};if(_0xfe3350)return _0x56ceaf['bQlTr'](buildPlaywrightConfigCore,_0x274725,_0xfe3350,_0x55f9df,_0x35f0ef,_0x44c726,'playwright-cli');const {storageStatePath:_0x18748d,tempAuthPath:_0xb98525}=await resolveLocalAuthPath(getEnvDir(_0x55f9df));try{const _0x3d2a29=await buildPlaywrightConfigCore(_0x274725,_0x18748d,_0x55f9df,_0x35f0ef,_0x44c726,_0x59be53(0x99));return{..._0x3d2a29,'tempAuthPath':_0xb98525};}catch(_0x5a285c){_0xb98525&&await unlink(_0xb98525)[_0x59be53(0xb8)](()=>{});throw _0x5a285c;}}export async function buildNovaActCliConfig(_0x18fdc3,_0x54c6c7,_0x3a4f42,_0x1eb391,_0x38b6d0){const _0x1ce20f=_0x4a448e,_0x25ecb7={'pgCFM':function(_0x5e78bd){return _0x5e78bd();},'wGHkC':_0x1ce20f(0xf3),'OWRCi':function(_0x128ac4,_0x25b469,_0x112149){return _0x128ac4(_0x25b469,_0x112149);},'dqCNx':function(_0x3b3ee4,_0x28f30c){return _0x3b3ee4===_0x28f30c;},'EbKhG':'string','ZDfET':function(_0x5f34c3,_0x444477){return _0x5f34c3(_0x444477);}},{storageStatePath:_0xb0f040,tempAuthPath:_0x1fd48d}=_0x38b6d0?{'storageStatePath':_0x38b6d0,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x54c6c7)),_0x5e35b7=_0x3a4f42||_0x25ecb7['pgCFM'](randomUUID),_0x505d9e=join(getRangerDir(),_0x25ecb7['wGHkC'],_0x5e35b7),_0x59904c=join(_0x505d9e,_0x1ce20f(0xbc)),_0x457a76=_0xb0f040?_0x25ecb7['OWRCi'](join,_0x59904c,_0x1ce20f(0xe4)):undefined,{launchOptions:_0x3afb06,contextOptions:_0xd044f3}=_0x25ecb7[_0x1ce20f(0xbd)](buildBrowserOptionsFromSettings,_0x18fdc3,{'headless':_0x1eb391?![]:_0x18fdc3['headless']??!![],'storageStatePath':_0xb0f040});if(_0x25ecb7[_0x1ce20f(0xc9)](process['getuid']?.(),0x0)){const _0x4aa8e3=[_0x1ce20f(0x10a),_0x1ce20f(0xaf)],_0x5d99a9=_0x3afb06['args']??[],_0x34aa5b=_0x4aa8e3['filter'](_0x2cbfe8=>!_0x5d99a9['includes'](_0x2cbfe8));_0x3afb06[_0x1ce20f(0xac)]=[..._0x5d99a9,..._0x34aa5b];}const _0x23615e=typeof _0x3afb06[_0x1ce20f(0xdf)]===_0x25ecb7[_0x1ce20f(0xae)]?_0x3afb06['executablePath']:_0xb0f040?chromium[_0x1ce20f(0xdf)]():undefined;return{'storageStatePath':_0xb0f040,'tempAuthPath':_0x1fd48d,'baseUrl':_0x18fdc3['baseUrl'],'headless':_0x25ecb7['ZDfET'](Boolean,_0x3afb06[_0x1ce20f(0xb0)]),'userDataDir':_0x59904c,'browserProfilePath':_0x457a76,'executablePath':_0x23615e,'launchArgs':Array[_0x1ce20f(0xa0)](_0x3afb06['args'])?_0x3afb06[_0x1ce20f(0xac)][_0x1ce20f(0xb3)](_0x1096aa=>typeof _0x1096aa===_0x1ce20f(0x9a)):[],'userAgent':typeof _0xd044f3[_0x1ce20f(0xa8)]===_0x25ecb7['EbKhG']?_0xd044f3['userAgent']:undefined,'extraHTTPHeaders':_0xd044f3[_0x1ce20f(0xf2)],'allowInsecureLocalhost':Boolean(_0x18fdc3[_0x1ce20f(0xfd)]),'safeMode':Boolean(_0x18fdc3[_0x1ce20f(0xdd)]),'cdpEndpoint':_0x18fdc3['cdpEndpoint'],'isCdpMode':Boolean(_0x18fdc3[_0x1ce20f(0x10d)])};}export function getNestedValue(_0x424e80,_0x599f3a){const _0x5bc0f1=_0x4a448e,_0x128bf8={'FZDls':function(_0x4f0894,_0x48f32a){return _0x4f0894===_0x48f32a;},'nwXNp':function(_0xf7f889,_0x4698c4){return _0xf7f889!==_0x4698c4;}},_0x218c13=parseKeyPath(_0x599f3a);let _0x8ea8c5=_0x424e80;for(const _0x1a12de of _0x218c13){if(_0x8ea8c5===null||_0x128bf8['FZDls'](_0x8ea8c5,undefined)||_0x128bf8[_0x5bc0f1(0xea)](typeof _0x8ea8c5,'object'))return undefined;_0x8ea8c5=_0x8ea8c5[_0x1a12de];}return _0x8ea8c5;}export function setNestedValue(_0x100830,_0x1c6911,_0xeb0fe9){const _0x4c702f=_0x4a448e,_0x4e9057={'eIxRc':function(_0x4d85d6,_0x17a6f7){return _0x4d85d6(_0x17a6f7);},'AsGmr':function(_0x147bcb,_0x1a553b){return _0x147bcb in _0x1a553b;},'uNDGl':function(_0x201a14,_0x1734d1){return _0x201a14!==_0x1734d1;}},_0x465852=_0x4e9057['eIxRc'](parseKeyPath,_0x1c6911);let _0xbf19d7=_0x100830;for(let _0xed35f4=0x0;_0xed35f4<_0x465852['length']-0x1;_0xed35f4++){const _0x3fdaef=_0x465852[_0xed35f4];(!_0x4e9057['AsGmr'](_0x3fdaef,_0xbf19d7)||_0x4e9057['uNDGl'](typeof _0xbf19d7[_0x3fdaef],_0x4c702f(0xca)))&&(_0xbf19d7[_0x3fdaef]={}),_0xbf19d7=_0xbf19d7[_0x3fdaef];}_0xbf19d7[_0x465852[_0x465852[_0x4c702f(0x10c)]-0x1]]=_0xeb0fe9;}export function deleteNestedValue(_0x58ce9c,_0x149302){const _0x50100b=_0x4a448e,_0xb3feec={'NSooS':function(_0x13878d,_0x5587b8){return _0x13878d(_0x5587b8);},'vfdHn':function(_0x5092df,_0x3b84ab){return _0x5092df===_0x3b84ab;},'exgZw':function(_0x2b7abb,_0x25b17a){return _0x2b7abb!==_0x25b17a;},'ZkCuB':'object','Kxiyb':function(_0x3717fd,_0x19a64f){return _0x3717fd in _0x19a64f;}},_0x59c21e=_0xb3feec['NSooS'](parseKeyPath,_0x149302);let _0x5a309a=_0x58ce9c;for(let _0x4f8ec7=0x0;_0x4f8ec7<_0x59c21e[_0x50100b(0x10c)]-0x1;_0x4f8ec7++){if(_0xb3feec[_0x50100b(0xda)](_0x5a309a,null)||_0x5a309a===undefined||_0xb3feec['exgZw'](typeof _0x5a309a,_0xb3feec['ZkCuB']))return![];_0x5a309a=_0x5a309a[_0x59c21e[_0x4f8ec7]];}if(_0xb3feec[_0x50100b(0xda)](_0x5a309a,null)||_0x5a309a===undefined||typeof _0x5a309a!=='object')return![];const _0x2706a7=_0x59c21e[_0x59c21e[_0x50100b(0x10c)]-0x1];if(_0xb3feec['Kxiyb'](_0x2706a7,_0x5a309a))return delete _0x5a309a[_0x2706a7],!![];return![];}function parseKeyPath(_0x43a615){const _0x57ac9c=_0x4a448e,_0x1fd566={'PoNLA':'header','RBMNU':'setupHeader'},_0x958155=_0x43a615['split']('.');return _0x958155[0x0]===_0x1fd566['PoNLA']&&(_0x958155[0x0]=_0x57ac9c(0x107)),_0x958155[0x0]===_0x1fd566[_0x57ac9c(0x102)]&&(_0x958155[0x0]=_0x57ac9c(0xb1)),_0x958155;}export function formatSettings(_0x33853d,_0x699b03=0x0){const _0x2c1f79=_0x4a448e,_0x30cda7=[],_0x3d548f='\x20\x20'['repeat'](_0x699b03);for(const [_0x3db910,_0x420074]of Object[_0x2c1f79(0xf7)](_0x33853d)){if(_0x420074===undefined)continue;if(typeof _0x420074===_0x2c1f79(0xca)&&_0x420074!==null){_0x30cda7[_0x2c1f79(0xbe)](''+_0x3d548f+_0x3db910+':');for(const [_0x34661d,_0x67fd19]of Object[_0x2c1f79(0xf7)](_0x420074)){_0x30cda7['push'](_0x3d548f+'\x20\x20'+_0x34661d+':\x20'+_0x67fd19);}}else _0x30cda7[_0x2c1f79(0xbe)](''+_0x3d548f+_0x3db910+':\x20'+_0x420074);}return _0x30cda7[_0x2c1f79(0xa5)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b8424,_0x38d848){const _0x30f146=_0x5689,_0x4bf494=_0x4b8424();while(!![]){try{const _0x16a8c4=parseInt(_0x30f146(0x1b8))/0x1+parseInt(_0x30f146(0x1ba))/0x2+-parseInt(_0x30f146(0x1c3))/0x3+-parseInt(_0x30f146(0x1bb))/0x4+-parseInt(_0x30f146(0x1c4))/0x5*(parseInt(_0x30f146(0x1bd))/0x6)+-parseInt(_0x30f146(0x1bf))/0x7*(parseInt(_0x30f146(0x1c2))/0x8)+parseInt(_0x30f146(0x1c0))/0x9*(parseInt(_0x30f146(0x1be))/0xa);if(_0x16a8c4===_0x38d848)break;else _0x4bf494['push'](_0x4bf494['shift']());}catch(_0x47018e){_0x4bf494['push'](_0x4bf494['shift']());}}}(_0x5ce0,0x3ac65));import{readFileSync}from'fs';function _0x5ce0(){const _0x32a245=['22992LsYaiw','90iOSLoR','42ZpdLGm','1007739VQGvsR','skills','463648cXPCAH','1429341TuetcE','215LtaaZH','164149kzIkMc','pzofj','145434iiHhCt','59620QbdYVS','EDYGs'];_0x5ce0=function(){return _0x32a245;};return _0x5ce0();}import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x2298b9){const _0x4694a7=_0x5689,_0x39115f={'nOntk':function(_0x504436,_0x513195,_0x4b53c5){return _0x504436(_0x513195,_0x4b53c5);},'pzofj':'utf-8'},_0x1c220d=join(__dirname,'..','..',_0x4694a7(0x1c1)),_0x5b38e2=join(_0x1c220d,_0x2298b9);try{return _0x39115f['nOntk'](readFileSync,_0x5b38e2,_0x39115f[_0x4694a7(0x1b9)]);}catch{return'';}}function _0x5689(_0x273ecc,_0x159870){_0x273ecc=_0x273ecc-0x1b8;const _0x5ce01e=_0x5ce0();let _0x5689bc=_0x5ce01e[_0x273ecc];return _0x5689bc;}export function getRangerSkillContent(){const _0x1079cc=_0x5689,_0x1d458c={'EDYGs':function(_0x8137d2,_0xde25dc){return _0x8137d2(_0xde25dc);}};return _0x1d458c[_0x1079cc(0x1bc)](readSkillContent,'ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0xa0f1(_0x45a2ab,_0x48dd12){_0x45a2ab=_0x45a2ab-0x1ed;const _0x3c925b=_0x3c92();let _0xa0f184=_0x3c925b[_0x45a2ab];return _0xa0f184;}const _0x42db83=_0xa0f1;(function(_0x2137bf,_0x12b18a){const _0x13c94f=_0xa0f1,_0x357404=_0x2137bf();while(!![]){try{const _0x57cc89=parseInt(_0x13c94f(0x1f8))/0x1+parseInt(_0x13c94f(0x207))/0x2+-parseInt(_0x13c94f(0x1f1))/0x3+-parseInt(_0x13c94f(0x1fd))/0x4*(parseInt(_0x13c94f(0x1fb))/0x5)+-parseInt(_0x13c94f(0x208))/0x6+parseInt(_0x13c94f(0x1ed))/0x7*(parseInt(_0x13c94f(0x206))/0x8)+-parseInt(_0x13c94f(0x1f5))/0x9;if(_0x57cc89===_0x12b18a)break;else _0x357404['push'](_0x357404['shift']());}catch(_0x244677){_0x357404['push'](_0x357404['shift']());}}}(_0x3c92,0xcbacb));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';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=[_0x42db83(0x203),_0x42db83(0x1f2),_0x42db83(0x200)];export async function installSkill(_0x3396ab,_0x2898ae={}){const _0x13591f=_0x42db83,_0x26102a={'zTNDl':'project','IjzYr':'claude','wYyNU':function(_0x378161,_0x5eb016){return _0x378161(_0x5eb016);},'LVXFh':function(_0x1241bd,_0x12c7fb,_0x599ca9){return _0x1241bd(_0x12c7fb,_0x599ca9);},'Rcgxi':function(_0x367b10,_0x5c7493,_0x446939){return _0x367b10(_0x5c7493,_0x446939);},'PCEIL':function(_0x386d99,_0x4952dc,_0x30c332){return _0x386d99(_0x4952dc,_0x30c332);},'zYqBD':'utf-8','vFjwr':'SKILL.md'},{level:level=_0x26102a[_0x13591f(0x20c)],cliVersion:_0x249462,platform:platform=_0x26102a['IjzYr']}=_0x2898ae,_0x3f0e00=getSourceSkillsDir(),_0x10816b=join(_0x3f0e00,_0x3396ab),_0xdd58ba=join(_0x3f0e00,_0x3396ab+_0x13591f(0x209)),_0x55b134=_0x26102a[_0x13591f(0x20b)](existsSync,_0x10816b)&&statSync(_0x10816b)[_0x13591f(0x1f7)]()&&existsSync(_0x26102a[_0x13591f(0x1ef)](join,_0x10816b,_0x13591f(0x201))),_0x4cde95=existsSync(_0xdd58ba);if(!_0x55b134&&!_0x4cde95)return console[_0x13591f(0x1f6)](_0x13591f(0x20a)+_0x3396ab),![];const _0x59faf1=platform===_0x13591f(0x1f0)?_0x26102a['wYyNU'](getOpencodeSkillsDir,level):getSkillsDir(level),_0x587fed=join(_0x59faf1,_0x3396ab);await _0x26102a[_0x13591f(0x1fa)](mkdir,_0x587fed,{'recursive':!![]});let _0x1d5567,_0x1e968e=[];if(_0x55b134){const _0x4a1284=await _0x26102a[_0x13591f(0x20b)](readdir,_0x10816b),_0x508d6d=_0x4a1284[_0x13591f(0x1ff)](_0x14d815=>_0x14d815[_0x13591f(0x1f4)]('.md'));for(const _0x54b0ec of _0x508d6d){const _0x3f0e7d=join(_0x10816b,_0x54b0ec),_0x3bafb2=_0x26102a['PCEIL'](join,_0x587fed,_0x54b0ec);await _0x26102a[_0x13591f(0x1ef)](copyFile,_0x3f0e7d,_0x3bafb2),_0x1e968e['push'](_0x54b0ec);}_0x1d5567=await readFile(_0x26102a['Rcgxi'](join,_0x10816b,'SKILL.md'),'utf-8');}else{_0x1d5567=await _0x26102a['Rcgxi'](readFile,_0xdd58ba,_0x26102a['zYqBD']);const _0x44fad8=join(_0x587fed,_0x26102a['vFjwr']);await writeFile(_0x44fad8,_0x1d5567,'utf-8'),_0x1e968e[_0x13591f(0x205)](_0x26102a['vFjwr']);}const {name:_0x520c3e}=_0x26102a['wYyNU'](parseFrontmatter,_0x1d5567);return console[_0x13591f(0x1fc)]('\x20\x20Installed\x20skill:\x20'+_0x520c3e),console['log']('\x20\x20Location:\x20'+_0x587fed),_0x1e968e['length']>0x1&&console[_0x13591f(0x1fc)]('\x20\x20Files:\x20'+_0x1e968e['join'](',\x20')),logLocalAgentInstallation(_0x3396ab,{'skillDisplayName':_0x520c3e,'installLevel':level},_0x249462)[_0x13591f(0x1ee)](()=>{}),!![];}function getSourceSkillsDir(){const _0x5a8ae2=_0x42db83,_0x31a97f={'bVsOb':function(_0x312d85,_0x4b6573,_0x5c3c37,_0x334c9e,_0x1a3d96){return _0x312d85(_0x4b6573,_0x5c3c37,_0x334c9e,_0x1a3d96);},'OhJZV':'skills','tsZpf':function(_0x50e1c3,_0x42ee4b){return _0x50e1c3(_0x42ee4b);}},_0x8844c0=[_0x31a97f['bVsOb'](join,__dirname,'..','..','skills'),join(__dirname,'..','..','..',_0x31a97f[_0x5a8ae2(0x202)])];for(const _0x131506 of _0x8844c0){if(_0x31a97f['tsZpf'](existsSync,_0x131506))return _0x131506;}return _0x8844c0[0x0];}function parseFrontmatter(_0x1fa78d){const _0x11da54=_0x42db83,_0x399b06=_0x1fa78d[_0x11da54(0x1f9)](/^---\n([\s\S]+?)\n---/);if(!_0x399b06)throw new Error(_0x11da54(0x1fe));const _0x5519f6=_0x399b06[0x1],_0x48ed1b=_0x5519f6['match'](/name:\s*(.+)/),_0x50d1e2=_0x5519f6[_0x11da54(0x1f9)](/description:\s*"?(.+?)"?\n/);return{'name':_0x48ed1b?.[0x1][_0x11da54(0x204)]()||'','description':_0x50d1e2?.[0x1][_0x11da54(0x204)]()||''};}function _0x3c92(){const _0x29a06a=['Rcgxi','5CeTRFa','log','6226124edBpsX','Invalid\x20skill\x20frontmatter','filter','feature-tracker','SKILL.md','OhJZV','e2e-test-recommender','trim','push','136XADzJV','2735374zGxzpP','1370550CADcsG','.md','\x20\x20Skill\x20not\x20found:\x20','wYyNU','zTNDl','181832FRYYnE','catch','LVXFh','opencode','929601nqOlRP','bug-bash','xwtqn','endsWith','2637558QrfhzE','warn','isDirectory','1412857sjwTUe','match'];_0x3c92=function(){return _0x29a06a;};return _0x3c92();}export async function removeSkill(_0xa3d780,_0x56a839){const _0x189c25=_0x42db83,_0x2f6193={'xwtqn':function(_0x2f0ed6,_0xd099f9,_0x186fc0){return _0x2f0ed6(_0xd099f9,_0x186fc0);},'wlTix':function(_0x2fed73,_0x272eeb){return _0x2fed73(_0x272eeb);}},_0x13356d=getSkillsDir(_0x56a839),_0x53a784=_0x2f6193[_0x189c25(0x1f3)](join,_0x13356d,_0xa3d780);if(!_0x2f6193['wlTix'](existsSync,_0x53a784))return![];try{return await rm(_0x53a784,{'recursive':!![]}),console[_0x189c25(0x1fc)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0xa3d780),!![];}catch{return console[_0x189c25(0x1f6)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0xa3d780),![];}}
|