@ranger-testing/ranger-cli 2.4.4 → 2.4.5

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.
Files changed (72) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/agentEnv.js +1 -1
  35. package/build/commands/utils/browserSessionsApi.js +1 -1
  36. package/build/commands/utils/claudeConfig.js +1 -1
  37. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  38. package/build/commands/utils/claudePlugin.js +1 -1
  39. package/build/commands/utils/crypto.js +1 -1
  40. package/build/commands/utils/desirePathLog.js +1 -1
  41. package/build/commands/utils/deviceAuth.js +1 -1
  42. package/build/commands/utils/environment.js +1 -1
  43. package/build/commands/utils/featureApi.js +1 -1
  44. package/build/commands/utils/featureReportGenerator.js +1 -1
  45. package/build/commands/utils/fixWebmDuration.js +1 -1
  46. package/build/commands/utils/git.js +1 -1
  47. package/build/commands/utils/keychain.js +1 -1
  48. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  49. package/build/commands/utils/mcpImageBase64.js +1 -1
  50. package/build/commands/utils/model.js +1 -1
  51. package/build/commands/utils/opencodeConfig.js +1 -1
  52. package/build/commands/utils/playwrightCli.js +1 -1
  53. package/build/commands/utils/profileMessages.js +1 -1
  54. package/build/commands/utils/profileSetupBanner.js +1 -1
  55. package/build/commands/utils/rangerConfig.js +1 -1
  56. package/build/commands/utils/rangerRoot.js +1 -1
  57. package/build/commands/utils/reportGenerator.js +1 -1
  58. package/build/commands/utils/retry.js +1 -1
  59. package/build/commands/utils/sessionCache.js +1 -1
  60. package/build/commands/utils/settings.js +1 -1
  61. package/build/commands/utils/skillContent.js +1 -1
  62. package/build/commands/utils/skills.js +1 -1
  63. package/build/commands/utils/stitchWebmFiles.js +1 -1
  64. package/build/commands/utils/telemetry.js +1 -1
  65. package/build/commands/utils/tokenRefresh.js +1 -0
  66. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  67. package/build/commands/utils/userApi.js +1 -1
  68. package/build/commands/utils/version.js +1 -1
  69. package/build/commands/verifyFeature.js +1 -1
  70. package/build/commands/verifyFeatureCli.js +1 -1
  71. package/build/commands/verifyInBrowser.js +1 -1
  72. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x96dd10,_0x7819df){const _0x20191f=_0x54a6,_0x2056a7=_0x96dd10();while(!![]){try{const _0x124e89=parseInt(_0x20191f(0x12d))/0x1*(parseInt(_0x20191f(0x13f))/0x2)+parseInt(_0x20191f(0x12c))/0x3+-parseInt(_0x20191f(0x15a))/0x4+parseInt(_0x20191f(0x131))/0x5+parseInt(_0x20191f(0x11b))/0x6*(-parseInt(_0x20191f(0x146))/0x7)+-parseInt(_0x20191f(0x12e))/0x8*(parseInt(_0x20191f(0x13c))/0x9)+-parseInt(_0x20191f(0x12b))/0xa;if(_0x124e89===_0x7819df)break;else _0x2056a7['push'](_0x2056a7['shift']());}catch(_0xb12f0e){_0x2056a7['push'](_0x2056a7['shift']());}}}(_0x1acd,0x775dd));import{spawn}from'child_process';function _0x54a6(_0x1cb599,_0x5a56ca){_0x1cb599=_0x1cb599-0x118;const _0x1acd77=_0x1acd();let _0x54a6c3=_0x1acd77[_0x1cb599];return _0x54a6c3;}import{existsSync}from'fs';function _0x1acd(){const _0x33fa1e=['BjjpP','\x20ranger-managed\x20skill(s)...','win32','dqFlo','warn','30810owEYty','1346928OHkRlv','35858nlCTJL','8kGHsAo','qDlLF','update','3763170YyHqxr','utf-8','BNBqI','Pbaky','active-profile.txt','cGfgK','sloog','length','push','ROPtr','findIndex','6080805IaviOl','marketplace','ranger@trailhead','8npLZPj','qhpzp','kAHwE','@latest','zRRVQ','Claude\x20plugin\x20updated\x20(project\x20scope).','project','483NRCIwu','close','\x0aSuccessfully\x20updated\x20to\x20version\x20','\x0a✅\x20Update\x20complete!','plugin','qRarp','error','pipe','\x0aReinstalling\x20','opencode','splice','active-feature.txt','cpraf','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','log','SmlOo','Clnfg','join','\x0aCurrent\x20version:\x20','ooAKZ','624832cjbwjr','\x20skill\x20','version','trailhead','inherit','gncEW','ScNFi','trim','\x0aInstalling\x20','platform','\x0aCould\x20not\x20check\x20latest\x20version:\x20','--scope','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','zFzuV','1842mYOiRR','GLFto','kUmkD','QopTf','Update\x20failed:\x20','Update\x20failed.','yziUG','RCsfQ','claude','Nlqyk','user'];_0x1acd=function(){return _0x33fa1e;};return _0x1acd();}import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x41bc27=_0x54a6,_0x5b7ebc={'WAHCF':function(_0x2843e3,_0x3be8c6){return _0x2843e3(_0x3be8c6);},'QopTf':function(_0x5de420,_0x1e63cb){return _0x5de420===_0x1e63cb;},'biCHv':'npm','Clnfg':_0x41bc27(0x15e),'kAHwE':_0x41bc27(0x14c)};return new Promise(_0x57ea5a=>{const _0x1ab88d=_0x41bc27;console['log'](_0x1ab88d(0x162)+PACKAGE_NAME+'@latest...\x0a');const _0x3d9a16=spawn(_0x5b7ebc['biCHv'],['install','-g',PACKAGE_NAME+_0x1ab88d(0x142)],{'stdio':_0x5b7ebc[_0x1ab88d(0x156)],'shell':process[_0x1ab88d(0x163)]===_0x1ab88d(0x128)});_0x3d9a16['on']('close',_0x1e8230=>{const _0x1875cb=_0x1ab88d;_0x5b7ebc['WAHCF'](_0x57ea5a,_0x5b7ebc[_0x1875cb(0x11e)](_0x1e8230,0x0));}),_0x3d9a16['on'](_0x5b7ebc[_0x1ab88d(0x141)],()=>{_0x57ea5a(![]);});});}async function updateClaudeMarketplace(){const _0x12b581=_0x54a6,_0x5e22b4={'qRarp':function(_0x2b6024,_0x1e0a84){return _0x2b6024===_0x1e0a84;},'RCsfQ':function(_0x31bf54,_0x2b4aee){return _0x31bf54(_0x2b4aee);},'SblyB':'plugin','Kfhlt':_0x12b581(0x13d),'zRRVQ':_0x12b581(0x130),'ooAKZ':_0x12b581(0x14d),'qhpzp':_0x12b581(0x128)};return new Promise(_0x1692d4=>{const _0x41de6c=_0x12b581,_0x2c1462={'TEuds':function(_0x575546,_0x48a889){const _0x3bde03=_0x54a6;return _0x5e22b4[_0x3bde03(0x122)](_0x575546,_0x48a889);}},_0x99e604=spawn('claude',[_0x5e22b4['SblyB'],_0x5e22b4['Kfhlt'],_0x5e22b4[_0x41de6c(0x143)],_0x41de6c(0x15d)],{'stdio':_0x5e22b4[_0x41de6c(0x159)],'shell':process['platform']===_0x5e22b4[_0x41de6c(0x140)]});_0x99e604['on'](_0x41de6c(0x147),_0x13342d=>{const _0x4aa2c9=_0x41de6c;_0x1692d4(_0x5e22b4[_0x4aa2c9(0x14b)](_0x13342d,0x0));}),_0x99e604['on'](_0x41de6c(0x14c),()=>{_0x2c1462['TEuds'](_0x1692d4,![]);});});}async function updateClaudePlugin(_0x3a8008){const _0x217d97=_0x54a6,_0x4637e9={'UPTEV':function(_0x388077,_0x34b1f6){return _0x388077===_0x34b1f6;},'hNdTz':_0x217d97(0x13e),'sloog':function(_0x2f1cfd,_0x3390ef,_0x336f89,_0x2c2c15){return _0x2f1cfd(_0x3390ef,_0x336f89,_0x2c2c15);},'ScNFi':'win32'};return new Promise(_0x2498d2=>{const _0x215368=_0x217d97,_0x47208f={'ROPtr':function(_0x27a7cc,_0x1b85a4){return _0x4637e9['UPTEV'](_0x27a7cc,_0x1b85a4);},'BjjpP':function(_0x5cd96d,_0x2a95eb){return _0x5cd96d(_0x2a95eb);}},_0xa8dee5=[_0x215368(0x14a),_0x215368(0x130),_0x4637e9['hNdTz']];_0x3a8008&&_0xa8dee5['push'](_0x215368(0x118),_0x3a8008);const _0x12ddfe=_0x4637e9[_0x215368(0x137)](spawn,'claude',_0xa8dee5,{'stdio':'pipe','shell':process['platform']===_0x4637e9[_0x215368(0x160)]});_0x12ddfe['on'](_0x215368(0x147),_0x58257e=>{const _0x243468=_0x215368;_0x2498d2(_0x47208f[_0x243468(0x13a)](_0x58257e,0x0));}),_0x12ddfe['on']('error',()=>{const _0x511e77=_0x215368;_0x47208f[_0x511e77(0x126)](_0x2498d2,![]);});});}function isSkillInstalled(_0xa919a4,_0x8acc53,_0x545384){const _0x37e0e0=_0x54a6,_0x196a8c={'dqFlo':'opencode','GLFto':function(_0x32dd72,_0x2207f6){return _0x32dd72(_0x2207f6);}},_0x530174=_0x545384===_0x196a8c[_0x37e0e0(0x129)]?getOpencodeSkillsDir(_0x8acc53):_0x196a8c[_0x37e0e0(0x11c)](getSkillsDir,_0x8acc53),_0x27ab42=join(_0x530174,_0xa919a4);return existsSync(_0x27ab42);}async function reinstallSkills(_0xba6ba5){const _0x2d3646=_0x54a6,_0x14bc5b={'tEiVz':_0x2d3646(0x145),'cpraf':_0x2d3646(0x125),'feTIK':function(_0x202821,_0x5adabc,_0x2d0dab,_0x529196){return _0x202821(_0x5adabc,_0x2d0dab,_0x529196);},'yziUG':'claude','kUmkD':_0x2d3646(0x14f),'gncEW':function(_0x14029c,_0x29e2e9,_0x404b5b){return _0x14029c(_0x29e2e9,_0x404b5b);},'SmlOo':function(_0x10d5f1,_0x64997,_0x4b1ce3){return _0x10d5f1(_0x64997,_0x4b1ce3);}},_0x286edc=[_0x14bc5b['tEiVz'],_0x14bc5b[_0x2d3646(0x152)]],_0x271157=[];for(const _0x4f8d13 of _0x286edc){for(const _0x5c3b1c of RANGER_MANAGED_SKILLS){_0x14bc5b['feTIK'](isSkillInstalled,_0x5c3b1c,_0x4f8d13,_0x2d3646(0x123))&&_0x271157['push']({'skillName':_0x5c3b1c,'level':_0x4f8d13,'platform':_0x14bc5b[_0x2d3646(0x121)]}),isSkillInstalled(_0x5c3b1c,_0x4f8d13,'opencode')&&_0x271157[_0x2d3646(0x139)]({'skillName':_0x5c3b1c,'level':_0x4f8d13,'platform':_0x14bc5b[_0x2d3646(0x11d)]});}}for(const _0x11aff6 of _0x286edc){for(const _0x1f6fb6 of DEPRECATED_SKILLS){await _0x14bc5b[_0x2d3646(0x15f)](removeSkill,_0x1f6fb6,_0x11aff6);}}if(_0x271157[_0x2d3646(0x138)]===0x0){console[_0x2d3646(0x154)](_0x2d3646(0x153));return;}console[_0x2d3646(0x154)](_0x2d3646(0x14e)+_0x271157['length']+_0x2d3646(0x127));for(const {skillName:_0x5ca72b,level:_0x212ba0,platform:_0x956704}of _0x271157){try{await _0x14bc5b[_0x2d3646(0x155)](installSkill,_0x5ca72b,{'level':_0x212ba0,'cliVersion':_0xba6ba5,'platform':_0x956704});}catch(_0x1e2c56){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x956704+'\x20'+_0x212ba0+_0x2d3646(0x15b)+_0x5ca72b+':',_0x1e2c56);}}}async function ensureActiveProfileGitignored(){const _0x5dcc53=_0x54a6,_0x4b5d79={'Chmuc':function(_0x127aa9){return _0x127aa9();},'qDlLF':'.gitignore','AdjSV':function(_0x113246,_0x14a00b,_0x6ceb54){return _0x113246(_0x14a00b,_0x6ceb54);},'cGfgK':function(_0x4b6176,_0x16624b){return _0x4b6176===_0x16624b;},'xKBCU':_0x5dcc53(0x135),'gkeYV':function(_0xb066a4,_0x59e41e,_0x5d7859,_0x39923d){return _0xb066a4(_0x59e41e,_0x5d7859,_0x39923d);}},_0x4c8daa=join(_0x4b5d79['Chmuc'](getRangerDir),_0x4b5d79[_0x5dcc53(0x12f)]);if(!existsSync(_0x4c8daa))return![];let _0x216235='';try{_0x216235=await _0x4b5d79['AdjSV'](readFile,_0x4c8daa,'utf-8');}catch{return![];}const _0x26b278=_0x216235['split'](/\r?\n/);if(_0x26b278['some'](_0x362fa0=>_0x362fa0['trim']()===_0x5dcc53(0x135)))return![];let _0x73b64c=_0x26b278[_0x5dcc53(0x13b)](_0x572230=>_0x572230[_0x5dcc53(0x161)]()===_0x5dcc53(0x151));_0x4b5d79[_0x5dcc53(0x136)](_0x73b64c,-0x1)&&(_0x73b64c=_0x26b278[_0x5dcc53(0x138)]);_0x26b278[_0x5dcc53(0x150)](_0x73b64c,0x0,_0x4b5d79['xKBCU']);let _0x11415e=_0x26b278[_0x5dcc53(0x157)]('\x0a');!_0x11415e['endsWith']('\x0a')&&(_0x11415e+='\x0a');try{await _0x4b5d79['gkeYV'](writeFile,_0x4c8daa,_0x11415e,_0x5dcc53(0x132));}catch{return![];}return!![];}export async function update(){const _0x137538=_0x54a6,_0x4e8772={'BNBqI':'Checking\x20for\x20updates...','Nlqyk':function(_0x18fbdc,_0x1383ca){return _0x18fbdc===_0x1383ca;},'sJmrS':function(_0x5da6ca,_0x531924){return _0x5da6ca(_0x531924);},'FdCXb':function(_0x3bea55){return _0x3bea55();},'NioWW':function(_0x1ff0ff){return _0x1ff0ff();},'DdyaU':_0x137538(0x119),'Pbaky':function(_0x2c9869,_0x282262){return _0x2c9869(_0x282262);},'SAIor':'project','zFzuV':'✓\x20Migrated\x20active\x20profile\x20file','GbOMH':_0x137538(0x149)},_0x59e64e=getCurrentVersion();console['log'](_0x137538(0x158)+_0x59e64e),console[_0x137538(0x154)](_0x4e8772[_0x137538(0x133)]);const _0x15687b=getLatestVersion();let _0x3cecbd=_0x59e64e;if(!_0x15687b['version']){console[_0x137538(0x12a)](_0x137538(0x164)+_0x15687b[_0x137538(0x14c)]),console[_0x137538(0x154)]('Attempting\x20install\x20anyway...');const _0x1ff6ef=await runInstall();if(_0x1ff6ef)console['log']('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x3cecbd=getCurrentVersion();else throw new Error(_0x137538(0x11f)+_0x15687b[_0x137538(0x14c)]);}else{const _0x32f28c=_0x15687b[_0x137538(0x15c)];console[_0x137538(0x154)]('Latest\x20version:\x20\x20'+_0x32f28c);const _0x122c52=compareVersions(_0x59e64e,_0x32f28c);if(_0x4e8772[_0x137538(0x124)](_0x122c52,0x0))console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x122c52<0x0)console['log']('\x0aYour\x20version\x20('+_0x59e64e+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x32f28c+').');else{const _0x131c33=await runInstall();if(_0x131c33)console['log'](_0x137538(0x148)+_0x32f28c),_0x3cecbd=_0x32f28c;else throw new Error(_0x137538(0x120));}}}await reinstallSkills(_0x3cecbd);const _0x2c3b1f=await isMarketplaceAdded(_0x137538(0x15d)),_0x1deab6=await _0x4e8772['sJmrS'](isPluginInstalled,'ranger@trailhead');if(_0x2c3b1f){const _0x3534b4=await _0x4e8772['FdCXb'](updateClaudeMarketplace);_0x3534b4&&console[_0x137538(0x154)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0x1deab6){const _0x2654bc=await _0x4e8772['NioWW'](updateClaudePlugin);_0x2654bc&&console[_0x137538(0x154)](_0x4e8772['DdyaU']);const _0x4c3a74=await _0x4e8772[_0x137538(0x134)](updateClaudePlugin,_0x4e8772['SAIor']);_0x4c3a74&&console['log']((_0x2654bc?'':'\x0a')+_0x137538(0x144));}const _0x22e6c2=await migrateActiveProfileFile();_0x22e6c2&&console[_0x137538(0x154)](_0x4e8772[_0x137538(0x11a)]);const _0x176a44=await ensureActiveProfileGitignored();console['log'](_0x4e8772['GbOMH']);}
1
+ (function(_0x112c53,_0x1d963e){const _0xf89491=_0x49f4,_0x4f7df5=_0x112c53();while(!![]){try{const _0x385fe5=parseInt(_0xf89491(0x107))/0x1*(-parseInt(_0xf89491(0xec))/0x2)+parseInt(_0xf89491(0xf1))/0x3*(parseInt(_0xf89491(0x126))/0x4)+parseInt(_0xf89491(0x100))/0x5*(-parseInt(_0xf89491(0x106))/0x6)+parseInt(_0xf89491(0x11c))/0x7*(parseInt(_0xf89491(0xfe))/0x8)+parseInt(_0xf89491(0xea))/0x9*(parseInt(_0xf89491(0xee))/0xa)+-parseInt(_0xf89491(0x11f))/0xb*(parseInt(_0xf89491(0xff))/0xc)+parseInt(_0xf89491(0x115))/0xd;if(_0x385fe5===_0x1d963e)break;else _0x4f7df5['push'](_0x4f7df5['shift']());}catch(_0x3a818e){_0x4f7df5['push'](_0x4f7df5['shift']());}}}(_0x3f0b,0xf1340));function _0x3f0b(){const _0x68b23d=[')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','woYbp','1530692wqAZOE','ranger@trailhead','log','qiTUX','pipe','GPrZq','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','warn','iaXZx','207HkhLkB','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','120IlBtqf','plugin','374660jVNdFm','gccjE','@latest','9OJiJPX','Xrioh','IlIPA','\x0aCould\x20not\x20check\x20latest\x20version:\x20','project','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','split','marketplace','Update\x20failed.','luVay','\x20skill\x20','platform','SqNeM','6211768CFVBEI','12VuxRPt','138625XMLkxy','error','active-feature.txt','\x20ranger-managed\x20skill(s)...','hPkKm','Munti','36vTlTNr','27249CPfVgT','utf-8','length','gqoPi','zKffT','active-profile.txt','splice','SRmrS','DXUxA','close','isEci','update','RGFtu','\x0aCurrent\x20version:\x20','14106157eAfoUs','--scope','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','version','EVhwy','Attempting\x20install\x20anyway...','join','7MutoLn','KQAwF','claude','11902429jrPNTY','push','fESCY','YvrCp','\x20\x20Failed\x20to\x20reinstall\x20'];_0x3f0b=function(){return _0x68b23d;};return _0x3f0b();}import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0xda63cd={'isEci':function(_0xb89ee2,_0x30d0b1){return _0xb89ee2(_0x30d0b1);},'uucAd':function(_0x170beb,_0x1e730e){return _0x170beb===_0x1e730e;},'bKbfx':'npm','zKffT':function(_0xb9da46,_0x5bd84b){return _0xb9da46===_0x5bd84b;},'JvLfA':'win32'};return new Promise(_0x16c085=>{const _0x5e48ea=_0x49f4,_0x58640e={'qiTUX':function(_0x1e7ffb,_0x1ab2fe){return _0x1e7ffb(_0x1ab2fe);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x1d50f2=spawn(_0xda63cd['bKbfx'],['install','-g',PACKAGE_NAME+_0x5e48ea(0xf0)],{'stdio':'inherit','shell':_0xda63cd[_0x5e48ea(0x10b)](process[_0x5e48ea(0xfc)],_0xda63cd['JvLfA'])});_0x1d50f2['on']('close',_0x43e9c0=>{const _0x3490dd=_0x5e48ea;_0xda63cd[_0x3490dd(0x111)](_0x16c085,_0xda63cd['uucAd'](_0x43e9c0,0x0));}),_0x1d50f2['on'](_0x5e48ea(0x101),()=>{const _0x35cea6=_0x5e48ea;_0x58640e[_0x35cea6(0x129)](_0x16c085,![]);});});}async function updateClaudeMarketplace(){const _0x53778e=_0x49f4,_0x616a11={'iaXZx':function(_0x1e868f,_0x3609fd){return _0x1e868f(_0x3609fd);},'RfhaC':'trailhead','trhCl':function(_0x2a7bfc,_0x3dcaea){return _0x2a7bfc===_0x3dcaea;},'PDayQ':_0x53778e(0x110)};return new Promise(_0x57ce3a=>{const _0x2882eb=_0x53778e,_0x3396ac={'UGhNJ':function(_0x4a5384,_0x3f91e9){return _0x4a5384(_0x3f91e9);},'Munti':function(_0x7b5b6e,_0x428ef2){return _0x7b5b6e===_0x428ef2;}},_0x19a943=spawn('claude',[_0x2882eb(0xed),_0x2882eb(0xf8),_0x2882eb(0x112),_0x616a11['RfhaC']],{'stdio':'pipe','shell':_0x616a11['trhCl'](process['platform'],'win32')});_0x19a943['on'](_0x616a11['PDayQ'],_0x27941a=>{const _0x3edc05=_0x2882eb;_0x3396ac['UGhNJ'](_0x57ce3a,_0x3396ac[_0x3edc05(0x105)](_0x27941a,0x0));}),_0x19a943['on'](_0x2882eb(0x101),()=>{const _0x825bc9=_0x2882eb;_0x616a11[_0x825bc9(0xe9)](_0x57ce3a,![]);});});}async function updateClaudePlugin(_0x177958){const _0x3d83fb=_0x49f4,_0x2f8755={'juAic':_0x3d83fb(0xed),'rMWjt':_0x3d83fb(0x116),'Ushbr':function(_0x51e05a,_0x5acb5e,_0x55be8d,_0x19deb4){return _0x51e05a(_0x5acb5e,_0x55be8d,_0x19deb4);},'luVay':_0x3d83fb(0xe5),'ilere':_0x3d83fb(0x110)};return new Promise(_0x168760=>{const _0x2b4623=_0x3d83fb,_0x575c36={'wfRGV':function(_0x5beb50,_0x56998e){return _0x5beb50(_0x56998e);},'SRmrS':function(_0x3a660d,_0x211cde){return _0x3a660d===_0x211cde;}},_0x24fbe9=[_0x2f8755['juAic'],'update',_0x2b4623(0x127)];_0x177958&&_0x24fbe9['push'](_0x2f8755['rMWjt'],_0x177958);const _0x11f0b6=_0x2f8755['Ushbr'](spawn,_0x2b4623(0x11e),_0x24fbe9,{'stdio':_0x2f8755[_0x2b4623(0xfa)],'shell':process['platform']==='win32'});_0x11f0b6['on'](_0x2f8755['ilere'],_0x4034d6=>{const _0x5249e9=_0x2b4623;_0x575c36['wfRGV'](_0x168760,_0x575c36[_0x5249e9(0x10e)](_0x4034d6,0x0));}),_0x11f0b6['on']('error',()=>{_0x168760(![]);});});}function _0x49f4(_0x349a2a,_0x3a17f4){_0x349a2a=_0x349a2a-0xe5;const _0x3f0baa=_0x3f0b();let _0x49f4e8=_0x3f0baa[_0x349a2a];return _0x49f4e8;}function isSkillInstalled(_0x15be4f,_0x165d4e,_0x52e336){const _0x42fed8=_0x49f4,_0x2e894b={'SqNeM':function(_0x5bf92e,_0x142e68){return _0x5bf92e===_0x142e68;},'dFIWo':'opencode','FPjkl':function(_0x59a089,_0x20c824,_0x1ebd88){return _0x59a089(_0x20c824,_0x1ebd88);}},_0x316bb2=_0x2e894b[_0x42fed8(0xfd)](_0x52e336,_0x2e894b['dFIWo'])?getOpencodeSkillsDir(_0x165d4e):getSkillsDir(_0x165d4e),_0x3b933d=_0x2e894b['FPjkl'](join,_0x316bb2,_0x15be4f);return existsSync(_0x3b933d);}async function reinstallSkills(_0x5bdd30){const _0x33e1ba=_0x49f4,_0x395f0a={'gqoPi':_0x33e1ba(0xf5),'WrMOY':'user','qZZlN':function(_0x4be098,_0x1c92b4,_0x35b689,_0x38388d){return _0x4be098(_0x1c92b4,_0x35b689,_0x38388d);},'CVHPF':'opencode','gWvOz':function(_0x4d7247,_0x5d7012,_0x524ca3){return _0x4d7247(_0x5d7012,_0x524ca3);},'Xrioh':_0x33e1ba(0x117)},_0x480179=[_0x395f0a[_0x33e1ba(0x10a)],_0x395f0a['WrMOY']],_0x210473=[];for(const _0x41c583 of _0x480179){for(const _0x41a97a of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x41a97a,_0x41c583,'claude')&&_0x210473[_0x33e1ba(0x120)]({'skillName':_0x41a97a,'level':_0x41c583,'platform':'claude'}),_0x395f0a['qZZlN'](isSkillInstalled,_0x41a97a,_0x41c583,_0x395f0a['CVHPF'])&&_0x210473[_0x33e1ba(0x120)]({'skillName':_0x41a97a,'level':_0x41c583,'platform':_0x395f0a['CVHPF']});}}for(const _0x333de1 of _0x480179){for(const _0x2b683c of DEPRECATED_SKILLS){await _0x395f0a['gWvOz'](removeSkill,_0x2b683c,_0x333de1);}}if(_0x210473[_0x33e1ba(0x109)]===0x0){console[_0x33e1ba(0x128)](_0x395f0a[_0x33e1ba(0xf2)]);return;}console[_0x33e1ba(0x128)]('\x0aReinstalling\x20'+_0x210473[_0x33e1ba(0x109)]+_0x33e1ba(0x103));for(const {skillName:_0x2d430a,level:_0x3c4461,platform:_0xed6225}of _0x210473){try{await _0x395f0a['gWvOz'](installSkill,_0x2d430a,{'level':_0x3c4461,'cliVersion':_0x5bdd30,'platform':_0xed6225});}catch(_0x1dcf12){console[_0x33e1ba(0xe8)](_0x33e1ba(0x123)+_0xed6225+'\x20'+_0x3c4461+_0x33e1ba(0xfb)+_0x2d430a+':',_0x1dcf12);}}}async function ensureActiveProfileGitignored(){const _0x5f2b13=_0x49f4,_0x144208={'fESCY':function(_0xc98ca2,_0x148028,_0x2c1139){return _0xc98ca2(_0x148028,_0x2c1139);},'hPkKm':function(_0x386527){return _0x386527();},'GPrZq':function(_0x25897e,_0x5b1a0c){return _0x25897e===_0x5b1a0c;},'XRVUI':_0x5f2b13(0x10c)},_0x2a4e4c=_0x144208[_0x5f2b13(0x121)](join,_0x144208[_0x5f2b13(0x104)](getRangerDir),'.gitignore');if(!existsSync(_0x2a4e4c))return![];let _0x7501af='';try{_0x7501af=await readFile(_0x2a4e4c,_0x5f2b13(0x108));}catch{return![];}const _0x1cf62e=_0x7501af[_0x5f2b13(0xf7)](/\r?\n/);if(_0x1cf62e['some'](_0x3c654b=>_0x3c654b['trim']()===_0x5f2b13(0x10c)))return![];let _0x1a2416=_0x1cf62e['findIndex'](_0x4ef4ef=>_0x4ef4ef['trim']()===_0x5f2b13(0x102));_0x144208[_0x5f2b13(0xe6)](_0x1a2416,-0x1)&&(_0x1a2416=_0x1cf62e[_0x5f2b13(0x109)]);_0x1cf62e[_0x5f2b13(0x10d)](_0x1a2416,0x0,_0x144208['XRVUI']);let _0xf45621=_0x1cf62e[_0x5f2b13(0x11b)]('\x0a');!_0xf45621['endsWith']('\x0a')&&(_0xf45621+='\x0a');try{await writeFile(_0x2a4e4c,_0xf45621,_0x5f2b13(0x108));}catch{return![];}return!![];}export async function update(){const _0x339e5e=_0x49f4,_0x2812c6={'MVwMR':function(_0x22f164){return _0x22f164();},'KQAwF':function(_0x3830a5){return _0x3830a5();},'DXUxA':_0x339e5e(0x11a),'lQBDv':function(_0x3e0a4f){return _0x3e0a4f();},'EVhwy':function(_0x203c85,_0x274a8d,_0x4642d3){return _0x203c85(_0x274a8d,_0x4642d3);},'RGFtu':function(_0x2964a5,_0x28a210){return _0x2964a5<_0x28a210;},'pFEFj':function(_0x4f54e5,_0x3ac5f0){return _0x4f54e5(_0x3ac5f0);},'gccjE':function(_0x1de488){return _0x1de488();},'eFJaU':_0x339e5e(0xeb),'YvrCp':_0x339e5e(0xf5),'woYbp':function(_0x291589){return _0x291589();},'IlIPA':'\x0a✅\x20Update\x20complete!'},_0x2199f6=_0x2812c6['MVwMR'](getCurrentVersion);console['log'](_0x339e5e(0x114)+_0x2199f6),console['log']('Checking\x20for\x20updates...');const _0x5b9611=_0x2812c6[_0x339e5e(0x11d)](getLatestVersion);let _0x1d32b9=_0x2199f6;if(!_0x5b9611[_0x339e5e(0x118)]){console[_0x339e5e(0xe8)](_0x339e5e(0xf4)+_0x5b9611['error']),console[_0x339e5e(0x128)](_0x2812c6[_0x339e5e(0x10f)]);const _0x25b367=await runInstall();if(_0x25b367)console[_0x339e5e(0x128)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x1d32b9=_0x2812c6['lQBDv'](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x5b9611[_0x339e5e(0x101)]);}else{const _0xc49d30=_0x5b9611[_0x339e5e(0x118)];console['log']('Latest\x20version:\x20\x20'+_0xc49d30);const _0x2b3d8a=_0x2812c6[_0x339e5e(0x119)](compareVersions,_0x2199f6,_0xc49d30);if(_0x2b3d8a===0x0)console['log'](_0x339e5e(0xe7));else{if(_0x2812c6[_0x339e5e(0x113)](_0x2b3d8a,0x0))console[_0x339e5e(0x128)]('\x0aYour\x20version\x20('+_0x2199f6+_0x339e5e(0x124)+_0xc49d30+').');else{const _0xf6caa=await runInstall();if(_0xf6caa)console[_0x339e5e(0x128)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0xc49d30),_0x1d32b9=_0xc49d30;else throw new Error(_0x339e5e(0xf9));}}}await _0x2812c6['pFEFj'](reinstallSkills,_0x1d32b9);const _0x46a504=await isMarketplaceAdded('trailhead'),_0x1f46de=await isPluginInstalled('ranger@trailhead');if(_0x46a504){const _0x47fc24=await updateClaudeMarketplace();_0x47fc24&&console['log'](_0x339e5e(0xf6));}if(_0x1f46de){const _0x36df5f=await _0x2812c6[_0x339e5e(0xef)](updateClaudePlugin);_0x36df5f&&console[_0x339e5e(0x128)](_0x2812c6['eFJaU']);const _0x521e69=await updateClaudePlugin(_0x2812c6[_0x339e5e(0x122)]);_0x521e69&&console['log']((_0x36df5f?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x12be69=await _0x2812c6[_0x339e5e(0x125)](migrateActiveProfileFile);_0x12be69&&console['log']('✓\x20Migrated\x20active\x20profile\x20file');const _0x3aaaed=await ensureActiveProfileGitignored();console['log'](_0x2812c6[_0x339e5e(0xf3)]);}
@@ -1 +1 @@
1
- (function(_0x4c8cca,_0xb65037){const _0x51c742=_0x24cb,_0x50e7c1=_0x4c8cca();while(!![]){try{const _0x3cb0a6=parseInt(_0x51c742(0x149))/0x1+parseInt(_0x51c742(0x128))/0x2*(parseInt(_0x51c742(0x137))/0x3)+-parseInt(_0x51c742(0x13f))/0x4+parseInt(_0x51c742(0x12f))/0x5+-parseInt(_0x51c742(0x13a))/0x6*(-parseInt(_0x51c742(0x144))/0x7)+-parseInt(_0x51c742(0x152))/0x8*(parseInt(_0x51c742(0x133))/0x9)+-parseInt(_0x51c742(0x138))/0xa*(parseInt(_0x51c742(0x14d))/0xb);if(_0x3cb0a6===_0xb65037)break;else _0x50e7c1['push'](_0x50e7c1['shift']());}catch(_0x296aa4){_0x50e7c1['push'](_0x50e7c1['shift']());}}}(_0x1560,0x5fd7f));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';function _0x1560(){const _0x990d0=['newContext','close','384KGmhlD','contextOptions','extraHTTPHeaders','trackPhaseEnd','39838fynUQd','allowInsecureLocalhost','setupHeaders','error','baseUrl','config_write','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','1189975UlganP','settings.json','browser','stdout','34560IdfaOE','newPage','trackPhaseStart','CoDJt','36HfTlJJ','120mLhkNM','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','120mZTqsQ','Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','goto','log','storageState','441328nvzdEk','mxMPp','jmxLh','QyrUu','MphOc','75691qTLekn','eVUNw','Profile\x20\x22','catch','✓\x20Auth\x20state\x20saved\x20to:\x20','714868PGQvRC','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','safeMode','✓\x20Updated\x20config:\x20','660847hhjcWc','lHIJF','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a'];_0x1560=function(){return _0x990d0;};return _0x1560();}import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';function _0x24cb(_0x273bd2,_0x1784af){_0x273bd2=_0x273bd2-0x126;const _0x156083=_0x1560();let _0x24cb3f=_0x156083[_0x273bd2];return _0x24cb3f;}export async function updateEnv(_0x3ae2da,_0xc600a4,_0x13d81c){const _0x5f3dc0=_0x24cb,_0x4b96fe={'QyrUu':'close','dSGFW':function(_0xf2d111,_0x28a33b,_0x1ecc1a){return _0xf2d111(_0x28a33b,_0x1ecc1a);},'jyVWt':'.enc','CoDJt':'utf-8','TJcrE':function(_0x37c09f,_0x3cfd3b){return _0x37c09f(_0x3cfd3b);},'jmxLh':'\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','COjSj':function(_0x32f3f6,_0x4e9d29,_0x3dcde4){return _0x32f3f6(_0x4e9d29,_0x3dcde4);},'eVUNw':function(_0x5d3a24,_0xdbce00){return _0x5d3a24||_0xdbce00;},'PmJOS':'\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','mxMPp':'This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','NVUYl':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','MphOc':function(_0x3a5be2,_0x39ad15,_0x265ece){return _0x3a5be2(_0x39ad15,_0x265ece);},'lHIJF':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','ikPIq':'browser_auth','zMLCN':_0x5f3dc0(0x12d)},_0x2f90bf=getEnvDir(_0x3ae2da),_0x13e5a7=_0x4b96fe['dSGFW'](join,_0x2f90bf,_0x5f3dc0(0x130)),_0x4d78cf=join(_0x2f90bf,'auth.json'),_0x350777=_0x4d78cf+_0x4b96fe['jyVWt'],_0x1207d4=process['stdin']['isTTY']&&process[_0x5f3dc0(0x132)]['isTTY'];if(!_0x1207d4)throw new Error(_0x5f3dc0(0x13b));if(!existsSync(_0x2f90bf))throw new Error(_0x5f3dc0(0x146)+_0x3ae2da+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3ae2da);if(!existsSync(_0x13e5a7))throw new Error('Config\x20not\x20found\x20at\x20'+_0x13e5a7+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3ae2da);const _0x17c3af=await readFile(_0x13e5a7,_0x4b96fe[_0x5f3dc0(0x136)]),_0x22f82c=JSON['parse'](_0x17c3af),_0x4005c9=_0x4b96fe['TJcrE'](resolveEnvVars,_0x22f82c),_0x26c26b=typeof _0x4005c9['baseUrl']==='string'?_0x4005c9[_0x5f3dc0(0x12c)]:undefined,_0x5a9cb2=_0x4b96fe['TJcrE'](existsSync,_0x4d78cf),_0xd4f0f7=isEnvCi(_0x3ae2da);_0xc600a4?.['trackPhaseStart']('browser_auth'),console[_0x5f3dc0(0x13d)]('\x0a📋\x20Authentication\x20Update'),console[_0x5f3dc0(0x13d)](_0x5f3dc0(0x139)),console['log'](_0x4b96fe[_0x5f3dc0(0x141)]),console['log'](_0x5f3dc0(0x14f));const {launchOptions:_0x14cff2,contextOptions:_0x2cabee}=_0x4b96fe['COjSj'](buildBrowserOptionsFromSettings,_0x4005c9,{'headless':![],'storageStatePath':_0x5a9cb2?_0x4d78cf:undefined});_0x4005c9['setupHeaders']&&(_0x2cabee['extraHTTPHeaders']={..._0x2cabee[_0x5f3dc0(0x126)],..._0x4005c9[_0x5f3dc0(0x12a)]});const _0x4242ba=await chromium['launch'](_0x14cff2);let _0x24a5c4=null;try{_0x24a5c4=await _0x4242ba[_0x5f3dc0(0x150)](_0x2cabee),await addProfileSetupBanner(_0x24a5c4);const _0x2b2a47=await _0x24a5c4[_0x5f3dc0(0x134)]();await _0x2b2a47[_0x5f3dc0(0x13c)](_0x4b96fe[_0x5f3dc0(0x145)](_0x26c26b,'about:blank'));let _0x2923ab=![];await new Promise(_0x1a1643=>{const _0x164634=_0x5f3dc0;_0x2b2a47['on'](_0x4b96fe[_0x164634(0x142)],async()=>{const _0x19b8c5=_0x164634;try{console['log']('Saving\x20authentication\x20state...'),await _0x24a5c4?.[_0x19b8c5(0x13e)]({'path':_0x4d78cf}),_0x2923ab=!![];}catch{}_0x1a1643();});});if(!_0x2923ab){console['log'](_0x4b96fe['PmJOS']);!_0x4005c9[_0x5f3dc0(0x14b)]&&(console[_0x5f3dc0(0x13d)](_0x4b96fe[_0x5f3dc0(0x140)]),console[_0x5f3dc0(0x13d)]('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x3ae2da+'\x20safeMode\x20true\x0a'));throw new Error(_0x4b96fe['NVUYl']);}}finally{_0x24a5c4&&await _0x24a5c4[_0x5f3dc0(0x151)]()['catch'](()=>{}),await _0x4242ba[_0x5f3dc0(0x151)]()[_0x5f3dc0(0x147)](()=>{});}if(_0xd4f0f7){const _0x2da2d8=await _0x4b96fe[_0x5f3dc0(0x143)](readFile,_0x4d78cf,'utf-8'),_0x3ac93c=await getToken();if(!_0x3ac93c)console[_0x5f3dc0(0x12b)](_0x5f3dc0(0x14a)),console[_0x5f3dc0(0x13d)](_0x5f3dc0(0x148)+_0x4d78cf);else{const _0x308b7b=encrypt(_0x2da2d8,_0x3ac93c);await writeFile(_0x350777,_0x308b7b),await unlink(_0x4d78cf),console['log']('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x350777),console['log'](_0x4b96fe[_0x5f3dc0(0x14e)]),console[_0x5f3dc0(0x13d)](_0x5f3dc0(0x12e));}}else console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x4d78cf);_0xc600a4?.['trackPhaseEnd'](_0x4b96fe['ikPIq']),_0xc600a4?.[_0x5f3dc0(0x135)](_0x5f3dc0(0x12d)),_0x22f82c['browser']=_0x22f82c[_0x5f3dc0(0x131)]||{},_0x22f82c['browser'][_0x5f3dc0(0x153)]=_0x22f82c[_0x5f3dc0(0x131)]['contextOptions']||{},_0x22f82c[_0x5f3dc0(0x131)][_0x5f3dc0(0x153)]['storageState']=_0x4d78cf,_0x13d81c?.[_0x5f3dc0(0x129)]===!![]&&(_0x22f82c[_0x5f3dc0(0x129)]=!![]),await _0x4b96fe['COjSj'](writeFile,_0x13e5a7,JSON['stringify'](_0x22f82c,null,0x2)),console[_0x5f3dc0(0x13d)](_0x5f3dc0(0x14c)+_0x13e5a7),_0xc600a4?.[_0x5f3dc0(0x127)](_0x4b96fe['zMLCN']),console['log']('\x0a✅\x20Profile\x20\x22'+_0x3ae2da+'\x22\x20authentication\x20updated');}
1
+ (function(_0x11ab76,_0x207d87){const _0x4c9cbb=_0x2892,_0xe161fe=_0x11ab76();while(!![]){try{const _0xb12cab=parseInt(_0x4c9cbb(0x96))/0x1+-parseInt(_0x4c9cbb(0x91))/0x2+parseInt(_0x4c9cbb(0x7c))/0x3*(-parseInt(_0x4c9cbb(0x92))/0x4)+-parseInt(_0x4c9cbb(0xa1))/0x5+-parseInt(_0x4c9cbb(0xa2))/0x6*(parseInt(_0x4c9cbb(0x8a))/0x7)+-parseInt(_0x4c9cbb(0xa8))/0x8*(-parseInt(_0x4c9cbb(0x89))/0x9)+-parseInt(_0x4c9cbb(0x87))/0xa*(-parseInt(_0x4c9cbb(0x9b))/0xb);if(_0xb12cab===_0x207d87)break;else _0xe161fe['push'](_0xe161fe['shift']());}catch(_0x4ff485){_0xe161fe['push'](_0xe161fe['shift']());}}}(_0x378c,0xd1e34));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';function _0x2892(_0x2bce74,_0x2e9dd1){_0x2bce74=_0x2bce74-0x77;const _0x378c28=_0x378c();let _0x289294=_0x378c28[_0x2bce74];return _0x289294;}function _0x378c(){const _0x575944=['utf-8','\x20safeMode\x20true\x0a','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','21947330lOJGyA','trackPhaseEnd','963ckGmqZ','4109cwJUHZ','\x0a📋\x20Authentication\x20Update','close','iovyK','qKjZs','storageState','njQam','2744176JggbcP','4KDNadd','isTTY','mfvLS','auth.json','1386576RXnZhD','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','config_write','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','baseUrl','22rFQUae','stringify','trackPhaseStart','Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20','contextOptions','safeMode','7201715iKYujh','16974IEAQRS','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','xzhhd','✓\x20Updated\x20config:\x20','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','✓\x20Auth\x20state\x20saved\x20to:\x20','3208nYWHCJ','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','\x0a✅\x20Profile\x20\x22','parse','log','oxHZg','catch','extraHTTPHeaders','Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','goto','juctf','browser','1458585VpYcic','browser_auth','Saving\x20authentication\x20state...','XDyci','setupHeaders','stdin','allowInsecureLocalhost'];_0x378c=function(){return _0x575944;};return _0x378c();}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x4ed2cc,_0x53d467,_0x17c7fc){const _0x30bced=_0x2892,_0x44f9c7={'oxHZg':_0x30bced(0x7e),'mfvLS':function(_0x127e5b){return _0x127e5b();},'hgnQi':_0x30bced(0x8c),'juctf':function(_0x126db8,_0x58e3ad){return _0x126db8(_0x58e3ad);},'aLrXP':'settings.json','xzhhd':_0x30bced(0x78),'XDyci':'string','iovyK':'browser_auth','rywmw':_0x30bced(0x8b),'qKjZs':'\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','Dwdbj':'about:blank','jnIpx':_0x30bced(0x83),'eDfNu':_0x30bced(0x99),'trgHO':function(_0x48c636,_0x22e5a1,_0x2d72ae){return _0x48c636(_0x22e5a1,_0x2d72ae);},'nBiUT':function(_0x1adfb5,_0x35f5b0){return _0x1adfb5(_0x35f5b0);},'njQam':_0x30bced(0x98),'xzqWc':function(_0xbc5ace,_0x1b0d6,_0x2a87d8){return _0xbc5ace(_0x1b0d6,_0x2a87d8);}},_0x152c36=_0x44f9c7['juctf'](getEnvDir,_0x4ed2cc),_0x1f388c=join(_0x152c36,_0x44f9c7['aLrXP']),_0x41d003=join(_0x152c36,_0x30bced(0x95)),_0x1afa5e=_0x41d003+'.enc',_0x580c41=process[_0x30bced(0x81)]['isTTY']&&process['stdout'][_0x30bced(0x93)];if(!_0x580c41)throw new Error(_0x44f9c7[_0x30bced(0xa4)]);if(!existsSync(_0x152c36))throw new Error('Profile\x20\x22'+_0x4ed2cc+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4ed2cc);if(!_0x44f9c7['juctf'](existsSync,_0x1f388c))throw new Error('Config\x20not\x20found\x20at\x20'+_0x1f388c+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4ed2cc);const _0x366c00=await readFile(_0x1f388c,_0x30bced(0x83)),_0x3c784a=JSON[_0x30bced(0xab)](_0x366c00),_0x2ff1fd=resolveEnvVars(_0x3c784a),_0x440df8=typeof _0x2ff1fd['baseUrl']===_0x44f9c7[_0x30bced(0x7f)]?_0x2ff1fd[_0x30bced(0x9a)]:undefined,_0x57bcdf=_0x44f9c7[_0x30bced(0x7a)](existsSync,_0x41d003),_0x332cc6=isEnvCi(_0x4ed2cc);_0x53d467?.['trackPhaseStart'](_0x44f9c7[_0x30bced(0x8d)]),console['log'](_0x44f9c7['rywmw']),console['log'](_0x44f9c7[_0x30bced(0x8e)]),console[_0x30bced(0xac)](_0x30bced(0x97)),console[_0x30bced(0xac)]('\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a');const {launchOptions:_0x476f8b,contextOptions:_0x5f5cdc}=buildBrowserOptionsFromSettings(_0x2ff1fd,{'headless':![],'storageStatePath':_0x57bcdf?_0x41d003:undefined});_0x2ff1fd['setupHeaders']&&(_0x5f5cdc['extraHTTPHeaders']={..._0x5f5cdc[_0x30bced(0x77)],..._0x2ff1fd[_0x30bced(0x80)]});const _0x1df9e2=await chromium['launch'](_0x476f8b);let _0x20c801=null;try{_0x20c801=await _0x1df9e2['newContext'](_0x5f5cdc),await addProfileSetupBanner(_0x20c801);const _0x54040b=await _0x20c801['newPage']();await _0x54040b[_0x30bced(0x79)](_0x440df8||_0x44f9c7['Dwdbj']);let _0x34944a=![];await new Promise(_0x135e34=>{_0x54040b['on'](_0x44f9c7['hgnQi'],async()=>{const _0x39d957=_0x2892;try{console['log'](_0x44f9c7[_0x39d957(0xad)]),await _0x20c801?.[_0x39d957(0x8f)]({'path':_0x41d003}),_0x34944a=!![];}catch{}_0x44f9c7[_0x39d957(0x94)](_0x135e34);});});if(!_0x34944a){console[_0x30bced(0xac)](_0x30bced(0xa9));!_0x2ff1fd[_0x30bced(0xa0)]&&(console[_0x30bced(0xac)](_0x30bced(0x86)),console[_0x30bced(0xac)](_0x30bced(0x9e)+_0x4ed2cc+_0x30bced(0x84)));throw new Error(_0x30bced(0xa3));}}finally{_0x20c801&&await _0x20c801[_0x30bced(0x8c)]()['catch'](()=>{}),await _0x1df9e2[_0x30bced(0x8c)]()[_0x30bced(0xae)](()=>{});}if(_0x332cc6){const _0xd0315e=await readFile(_0x41d003,_0x44f9c7['jnIpx']),_0x3b4d12=await getToken();if(!_0x3b4d12)console['error'](_0x44f9c7['eDfNu']),console[_0x30bced(0xac)](_0x30bced(0xa7)+_0x41d003);else{const _0x153e3b=_0x44f9c7['trgHO'](encrypt,_0xd0315e,_0x3b4d12);await writeFile(_0x1afa5e,_0x153e3b),await _0x44f9c7['nBiUT'](unlink,_0x41d003),console['log'](_0x30bced(0xa6)+_0x1afa5e),console['log']('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console['log'](_0x30bced(0x85));}}else console[_0x30bced(0xac)](_0x30bced(0xa7)+_0x41d003);_0x53d467?.[_0x30bced(0x88)](_0x30bced(0x7d)),_0x53d467?.[_0x30bced(0x9d)](_0x44f9c7[_0x30bced(0x90)]),_0x3c784a['browser']=_0x3c784a[_0x30bced(0x7b)]||{},_0x3c784a['browser']['contextOptions']=_0x3c784a['browser'][_0x30bced(0x9f)]||{},_0x3c784a['browser']['contextOptions'][_0x30bced(0x8f)]=_0x41d003,_0x17c7fc?.[_0x30bced(0x82)]===!![]&&(_0x3c784a['allowInsecureLocalhost']=!![]),await _0x44f9c7['xzqWc'](writeFile,_0x1f388c,JSON[_0x30bced(0x9c)](_0x3c784a,null,0x2)),console[_0x30bced(0xac)](_0x30bced(0xa5)+_0x1f388c),_0x53d467?.[_0x30bced(0x88)](_0x44f9c7['njQam']),console['log'](_0x30bced(0xaa)+_0x4ed2cc+'\x22\x20authentication\x20updated');}
@@ -1 +1 @@
1
- (function(_0x660a7d,_0x4466c6){const _0x19a0f7=_0x3386,_0x55d018=_0x660a7d();while(!![]){try{const _0xd2a715=parseInt(_0x19a0f7(0x149))/0x1*(parseInt(_0x19a0f7(0x158))/0x2)+parseInt(_0x19a0f7(0x14c))/0x3*(parseInt(_0x19a0f7(0x157))/0x4)+parseInt(_0x19a0f7(0x155))/0x5*(parseInt(_0x19a0f7(0x15a))/0x6)+-parseInt(_0x19a0f7(0x14f))/0x7*(parseInt(_0x19a0f7(0x14a))/0x8)+-parseInt(_0x19a0f7(0x156))/0x9*(-parseInt(_0x19a0f7(0x14d))/0xa)+-parseInt(_0x19a0f7(0x152))/0xb*(parseInt(_0x19a0f7(0x154))/0xc)+parseInt(_0x19a0f7(0x151))/0xd*(-parseInt(_0x19a0f7(0x153))/0xe);if(_0xd2a715===_0x4466c6)break;else _0x55d018['push'](_0x55d018['shift']());}catch(_0x49d56e){_0x55d018['push'](_0x55d018['shift']());}}}(_0x250c,0x5823b));import{join}from'path';import{existsSync}from'fs';function _0x3386(_0x3afa49,_0xf2bf40){_0x3afa49=_0x3afa49-0x149;const _0x250c1e=_0x250c();let _0x33869a=_0x250c1e[_0x3afa49];return _0x33869a;}import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x154f3b){const _0x2cab1f=_0x3386,_0x1dbc61={'khBhE':function(_0x4f2f04,_0x3282aa,_0x2b3fb7){return _0x4f2f04(_0x3282aa,_0x2b3fb7);},'VceZb':_0x2cab1f(0x14e),'EMzan':function(_0x191216,_0x597a86){return _0x191216(_0x597a86);}},_0xec6d12=getEnvDir(_0x154f3b),_0x3500f6=_0x1dbc61['khBhE'](join,_0xec6d12,_0x1dbc61['VceZb']);if(!existsSync(_0xec6d12))throw new Error('Profile\x20\x22'+_0x154f3b+_0x2cab1f(0x159)+_0x154f3b);if(!_0x1dbc61['EMzan'](existsSync,_0x3500f6))throw new Error('Config\x20not\x20found\x20at\x20'+_0x3500f6+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x154f3b);await writeActiveProfileName(_0x154f3b),console[_0x2cab1f(0x14b)](_0x2cab1f(0x150)+_0x154f3b+'\x22');}function _0x250c(){const _0x23e2dc=['13GfwUxc','258577LajyAw','12600182iXgUVj','48EsRCAY','35GHVFxY','21807RYhwAK','228208QGCTGO','2qZPSQm','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','517578HGOXVT','148714EFdXxu','1192DxwttR','log','21Xtbrxa','1160NNwrAM','settings.json','3661BSdgVg','\x0a✓\x20Now\x20using\x20profile\x20\x22'];_0x250c=function(){return _0x23e2dc;};return _0x250c();}
1
+ (function(_0x47f743,_0x54ba1a){const _0xc44cac=_0x4f3e,_0x17afce=_0x47f743();while(!![]){try{const _0x3e16ca=-parseInt(_0xc44cac(0x13f))/0x1+-parseInt(_0xc44cac(0x141))/0x2*(-parseInt(_0xc44cac(0x13d))/0x3)+parseInt(_0xc44cac(0x13c))/0x4+parseInt(_0xc44cac(0x144))/0x5+parseInt(_0xc44cac(0x139))/0x6*(parseInt(_0xc44cac(0x143))/0x7)+parseInt(_0xc44cac(0x13e))/0x8*(-parseInt(_0xc44cac(0x138))/0x9)+-parseInt(_0xc44cac(0x140))/0xa*(parseInt(_0xc44cac(0x137))/0xb);if(_0x3e16ca===_0x54ba1a)break;else _0x17afce['push'](_0x17afce['shift']());}catch(_0xff7aa0){_0x17afce['push'](_0x17afce['shift']());}}}(_0x147c,0x53083));function _0x147c(){const _0xa3c70e=['Profile\x20\x22','350147AetGaj','1929800SKLGqx','2929916SNfAol','2394531TgFsLk','42ExdoSf','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','Kwdhp','1660464yDvqQV','3BrxaAp','8MavUib','616826QaFyTh','20OgLqLv','1208946gxSOCW'];_0x147c=function(){return _0xa3c70e;};return _0x147c();}function _0x4f3e(_0x511d1c,_0x42a018){_0x511d1c=_0x511d1c-0x137;const _0x147ce7=_0x147c();let _0x4f3ea6=_0x147ce7[_0x511d1c];return _0x4f3ea6;}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x53e47a){const _0xf404da=_0x4f3e,_0x2c708e={'mXdzK':function(_0x2dabc6,_0x5c3e57){return _0x2dabc6(_0x5c3e57);},'Kwdhp':function(_0x304a76,_0xd63253,_0x4027a5){return _0x304a76(_0xd63253,_0x4027a5);},'hradi':function(_0x1be279,_0x280124){return _0x1be279(_0x280124);}},_0x355d2a=_0x2c708e['mXdzK'](getEnvDir,_0x53e47a),_0x2b6f9e=_0x2c708e[_0xf404da(0x13b)](join,_0x355d2a,'settings.json');if(!existsSync(_0x355d2a))throw new Error(_0xf404da(0x142)+_0x53e47a+_0xf404da(0x13a)+_0x53e47a);if(!_0x2c708e['hradi'](existsSync,_0x2b6f9e))throw new Error('Config\x20not\x20found\x20at\x20'+_0x2b6f9e+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x53e47a);await writeActiveProfileName(_0x53e47a),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x53e47a+'\x22');}
@@ -1 +1 @@
1
- (function(_0x1c01fc,_0x2b68ef){const _0x1b6df6=_0x24d3,_0x17902d=_0x1c01fc();while(!![]){try{const _0x16886a=parseInt(_0x1b6df6(0xf2))/0x1*(-parseInt(_0x1b6df6(0xf0))/0x2)+-parseInt(_0x1b6df6(0xfa))/0x3*(-parseInt(_0x1b6df6(0xf7))/0x4)+parseInt(_0x1b6df6(0xee))/0x5+parseInt(_0x1b6df6(0xf6))/0x6*(parseInt(_0x1b6df6(0xf5))/0x7)+parseInt(_0x1b6df6(0xf3))/0x8+-parseInt(_0x1b6df6(0xf4))/0x9*(-parseInt(_0x1b6df6(0xf1))/0xa)+-parseInt(_0x1b6df6(0xf8))/0xb;if(_0x16886a===_0x2b68ef)break;else _0x17902d['push'](_0x17902d['shift']());}catch(_0x305801){_0x17902d['push'](_0x17902d['shift']());}}}(_0x38f5,0xa52ac));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0x2855e1=_0x24d3,_0x303291={'FHRYs':function(_0x583a1f,_0xfb9de5,_0x27d7e9){return _0x583a1f(_0xfb9de5,_0x27d7e9);},'wEpfU':function(_0x36377b){return _0x36377b();}};return _0x303291['FHRYs'](join,_0x303291[_0x2855e1(0xef)](getRangerDir),ACTIVE_PROFILE_FILE);}function _0x38f5(){const _0xfc0484=['30wpotpS','50yTgatu','9636728oGNiYh','1195182arXviy','4921567THHHKr','6rpOSTA','2611020zKdjZN','21678910pdaffP','ykKaK','6bIWhzF','Efrvl','nKjYk','utf-8','828790gqIzEu','wEpfU','45200FKyYGR'];_0x38f5=function(){return _0xfc0484;};return _0x38f5();}function getLegacyActiveEnvPath(){const _0x23bb49={'aqFFG':function(_0x17d044){return _0x17d044();}};return join(_0x23bb49['aqFFG'](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x4ecca7=_0x24d3,_0x58e360={'iqmsS':function(_0xe7732c){return _0xe7732c();},'zGHbT':function(_0x59f346,_0xbce02a){return _0x59f346(_0xbce02a);},'ykKaK':function(_0x1930bb,_0x3ceeb2,_0x18a20c){return _0x1930bb(_0x3ceeb2,_0x18a20c);},'Efrvl':function(_0x4c6a54){return _0x4c6a54();},'Bkxdp':function(_0x3f1957,_0x461e12){return _0x3f1957(_0x461e12);}},_0x9b3969=_0x58e360['iqmsS'](getLegacyActiveEnvPath);if(!_0x58e360['zGHbT'](existsSync,_0x9b3969))return null;let _0x70597=null;try{_0x70597=(await _0x58e360[_0x4ecca7(0xf9)](readFile,_0x9b3969,_0x4ecca7(0xfd)))['trim']()||null;}catch{_0x70597=null;}if(!_0x70597)return null;const _0x36f71d=_0x58e360[_0x4ecca7(0xfb)](getActiveProfilePath);try{await rename(_0x9b3969,_0x36f71d);}catch{try{const _0x1a5224=getRangerDir();await mkdir(_0x1a5224,{'recursive':!![]}),await writeFile(_0x36f71d,_0x70597,'utf-8'),await _0x58e360['Bkxdp'](unlink,_0x9b3969);}catch{}}return _0x70597;}export async function readActiveProfileName(){const _0x186049=_0x24d3,_0x204d51={'hKobu':function(_0x1ab121){return _0x1ab121();},'TKZBX':_0x186049(0xfd),'DopMO':function(_0x5f2031){return _0x5f2031();}},_0x3bf14e=_0x204d51['hKobu'](getActiveProfilePath);if(existsSync(_0x3bf14e))try{return(await readFile(_0x3bf14e,_0x204d51['TKZBX']))['trim']()||null;}catch{return null;}return await _0x204d51['DopMO'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x2a9753){const _0x121856=_0x24d3,_0x390ca1={'nKjYk':function(_0x412500,_0x487c4c){return _0x412500(_0x487c4c);}},_0x1be9a3=getRangerDir();await mkdir(_0x1be9a3,{'recursive':!![]});const _0x1d30b1=getActiveProfilePath();await writeFile(_0x1d30b1,_0x2a9753,'utf-8');const _0x5157d8=getLegacyActiveEnvPath();if(existsSync(_0x5157d8))try{await _0x390ca1[_0x121856(0xfc)](unlink,_0x5157d8);}catch{}}function _0x24d3(_0x3ea68a,_0x448da6){_0x3ea68a=_0x3ea68a-0xee;const _0x38f523=_0x38f5();let _0x24d3ab=_0x38f523[_0x3ea68a];return _0x24d3ab;}export async function migrateActiveProfileFile(){const _0x48fead=await migrateLegacyActiveEnv();return _0x48fead!==null;}
1
+ const _0x35ec01=_0x3704;function _0x1c6c(){const _0x23b324=['4836405CddhCx','734419ogZXOh','BfFdQ','Prjka','mITRA','wPsvK','36hCEQjY','jQGHF','2309091cpIYBr','trim','FikSp','active-env.txt','ljxEa','409778GGrUlG','1332512nqlwuN','1469376hpHXeW','utf-8','1600510SAfZMT','TdZZc','uFyiL'];_0x1c6c=function(){return _0x23b324;};return _0x1c6c();}(function(_0x322034,_0x3f9503){const _0x2e15c2=_0x3704,_0xf656c2=_0x322034();while(!![]){try{const _0xbefbd4=parseInt(_0x2e15c2(0x1e0))/0x1+parseInt(_0x2e15c2(0x1e4))/0x2+-parseInt(_0x2e15c2(0x1db))/0x3+-parseInt(_0x2e15c2(0x1e1))/0x4+parseInt(_0x2e15c2(0x1e7))/0x5+-parseInt(_0x2e15c2(0x1d9))/0x6*(parseInt(_0x2e15c2(0x1e8))/0x7)+parseInt(_0x2e15c2(0x1e2))/0x8;if(_0xbefbd4===_0x3f9503)break;else _0xf656c2['push'](_0xf656c2['shift']());}catch(_0x2a8908){_0xf656c2['push'](_0xf656c2['shift']());}}}(_0x1c6c,0x997b3));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0x35ec01(0x1de);function getActiveProfilePath(){return join(getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x2f0cd5=_0x35ec01,_0x326dd7={'jQGHF':function(_0x465068,_0x1c5dbc,_0x29c235){return _0x465068(_0x1c5dbc,_0x29c235);}};return _0x326dd7[_0x2f0cd5(0x1da)](join,getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x2f7b07=_0x35ec01,_0x11eff6={'Prjka':function(_0x54a6e7){return _0x54a6e7();},'wPsvK':function(_0x3ba205,_0x1bf5a7,_0x17bd19){return _0x3ba205(_0x1bf5a7,_0x17bd19);},'ljxEa':function(_0x4f808b,_0x4631b8,_0x274f15){return _0x4f808b(_0x4631b8,_0x274f15);},'BfFdQ':function(_0x53fe71,_0x4113f2,_0x4077ee,_0x3b1a91){return _0x53fe71(_0x4113f2,_0x4077ee,_0x3b1a91);},'qEAYt':'utf-8'},_0xb7a05c=getLegacyActiveEnvPath();if(!existsSync(_0xb7a05c))return null;let _0x183edc=null;try{_0x183edc=(await readFile(_0xb7a05c,'utf-8'))['trim']()||null;}catch{_0x183edc=null;}if(!_0x183edc)return null;const _0x4dfd39=_0x11eff6['Prjka'](getActiveProfilePath);try{await _0x11eff6[_0x2f7b07(0x1d8)](rename,_0xb7a05c,_0x4dfd39);}catch{try{const _0x4b6ec5=_0x11eff6[_0x2f7b07(0x1d6)](getRangerDir);await _0x11eff6[_0x2f7b07(0x1df)](mkdir,_0x4b6ec5,{'recursive':!![]}),await _0x11eff6[_0x2f7b07(0x1d5)](writeFile,_0x4dfd39,_0x183edc,_0x11eff6['qEAYt']),await unlink(_0xb7a05c);}catch{}}return _0x183edc;}function _0x3704(_0x576596,_0x315725){_0x576596=_0x576596-0x1d5;const _0x1c6c92=_0x1c6c();let _0x370455=_0x1c6c92[_0x576596];return _0x370455;}export async function readActiveProfileName(){const _0x5061ab=_0x35ec01,_0x1a5971={'uFyiL':function(_0x37ca24,_0x1254ec){return _0x37ca24(_0x1254ec);},'wOKki':function(_0x480cc8,_0x1a095d,_0x11f86b){return _0x480cc8(_0x1a095d,_0x11f86b);},'zILYU':function(_0x2e4705){return _0x2e4705();}},_0x2793a6=getActiveProfilePath();if(_0x1a5971[_0x5061ab(0x1e6)](existsSync,_0x2793a6))try{return(await _0x1a5971['wOKki'](readFile,_0x2793a6,_0x5061ab(0x1e3)))[_0x5061ab(0x1dc)]()||null;}catch{return null;}return await _0x1a5971['zILYU'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x346067){const _0x825835=_0x35ec01,_0x286172={'uRBfA':function(_0x1772f1){return _0x1772f1();},'FikSp':function(_0x47984e,_0x4bc0fd,_0x1819c6){return _0x47984e(_0x4bc0fd,_0x1819c6);},'mITRA':_0x825835(0x1e3),'TwoAh':function(_0x5a8bc5){return _0x5a8bc5();},'TdZZc':function(_0x3819b8,_0xb91f09){return _0x3819b8(_0xb91f09);}},_0x3cdba2=_0x286172['uRBfA'](getRangerDir);await _0x286172[_0x825835(0x1dd)](mkdir,_0x3cdba2,{'recursive':!![]});const _0x4d0e49=getActiveProfilePath();await writeFile(_0x4d0e49,_0x346067,_0x286172[_0x825835(0x1d7)]);const _0x1e4812=_0x286172['TwoAh'](getLegacyActiveEnvPath);if(_0x286172[_0x825835(0x1e5)](existsSync,_0x1e4812))try{await unlink(_0x1e4812);}catch{}}export async function migrateActiveProfileFile(){const _0x2a3499={'EzeyA':function(_0x53d750){return _0x53d750();}},_0x4b591e=await _0x2a3499['EzeyA'](migrateLegacyActiveEnv);return _0x4b591e!==null;}
@@ -1 +1 @@
1
- const _0x366361=_0x4bda;(function(_0x25fcd7,_0x32980f){const _0x4fa67d=_0x4bda,_0x4bfe70=_0x25fcd7();while(!![]){try{const _0x5d4783=-parseInt(_0x4fa67d(0x1d7))/0x1+-parseInt(_0x4fa67d(0x1d0))/0x2+-parseInt(_0x4fa67d(0x1d2))/0x3+-parseInt(_0x4fa67d(0x1e4))/0x4*(-parseInt(_0x4fa67d(0x1c8))/0x5)+-parseInt(_0x4fa67d(0x1db))/0x6+-parseInt(_0x4fa67d(0x1d4))/0x7+parseInt(_0x4fa67d(0x1c7))/0x8*(parseInt(_0x4fa67d(0x1e3))/0x9);if(_0x5d4783===_0x32980f)break;else _0x4bfe70['push'](_0x4bfe70['shift']());}catch(_0x10be52){_0x4bfe70['push'](_0x4bfe70['shift']());}}}(_0x51a0,0xa863c));function _0x51a0(){const _0x4b057a=['env','1212708qULHdY','TMPDIR','1838001yrSwkv','vCIKN','56777rbndpY','dJkAI','fndxW','353132eQWIKy','npm_config_registry','CHROME_BIN','/bin','1387698idepBe','PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','push','string','NPM_CONFIG_PREFIX','XDG_CACHE_HOME','qXnRb','21877065uQPQoX','21688rOmpNt','TMP','/usr/bin','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','filter','fKknK','LOCALAPPDATA','AWsin','PATH','XDG_CONFIG_HOME','win32','$PATH','8wrUTXF','65QDDkOt','fromEntries','USERPROFILE','NPM_CONFIG_CACHE','includes','npm_config_prefix','NiazP'];_0x51a0=function(){return _0x4b057a;};return _0x51a0();}import{delimiter}from'path';import{getAiProxyUrl}from'./environment.js';const AGENT_ENV_PASSTHROUGH_KEYS=[_0x366361(0x1ec),'HOME',_0x366361(0x1d1),_0x366361(0x1e5),'TEMP',_0x366361(0x1ca),'APPDATA',_0x366361(0x1ea),_0x366361(0x1e1),_0x366361(0x1c4),'PLAYWRIGHT_BROWSERS_PATH','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD',_0x366361(0x1d9),'CHROMIUM_BIN','npm_config_cache',_0x366361(0x1cb),'npm_config_userconfig','NPM_CONFIG_USERCONFIG',_0x366361(0x1cd),_0x366361(0x1e0),_0x366361(0x1d8),'NPM_CONFIG_REGISTRY'],UNEXPANDED_PATH_TOKEN_PATTERNS=['${PATH}',_0x366361(0x1c6),'%PATH%'];function _0x4bda(_0x3164a0,_0x2c08a0){_0x3164a0=_0x3164a0-0x1c4;const _0x51a0a0=_0x51a0();let _0x4bdaa2=_0x51a0a0[_0x3164a0];return _0x4bdaa2;}export function getAgentPathHealthWarning(_0x2fdf7a,_0x3f3cd3=process['platform']){const _0x3d55de=_0x366361,_0xd26ba8={'qXnRb':function(_0x3cbe10,_0x22ad77){return _0x3cbe10===_0x22ad77;},'NiazP':_0x3d55de(0x1dd),'vCIKN':'PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','YSVnv':_0x3d55de(0x1c5),'fKknK':_0x3d55de(0x1e6),'dJkAI':function(_0x26c12e,_0x2fd221){return _0x26c12e&&_0x2fd221;},'bgmIh':function(_0x11c292,_0xdd6987){return _0x11c292===_0xdd6987;},'fndxW':'Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.'},_0xf62198=[],_0x41d29f=(_0x2fdf7a||'')['split'](delimiter)['filter'](Boolean);_0xd26ba8[_0x3d55de(0x1e2)](_0x41d29f['length'],0x0)&&_0xf62198['push'](_0xd26ba8[_0x3d55de(0x1ce)]);UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x559cca=>(_0x2fdf7a||'')[_0x3d55de(0x1cc)](_0x559cca))&&_0xf62198['push'](_0xd26ba8[_0x3d55de(0x1d3)]);if(_0x3f3cd3!==_0xd26ba8['YSVnv']){const _0x38e714=_0x41d29f['includes'](_0xd26ba8[_0x3d55de(0x1e9)]),_0x2c67fd=_0x41d29f[_0x3d55de(0x1cc)](_0x3d55de(0x1da));_0xd26ba8[_0x3d55de(0x1d5)](!_0x38e714,!_0x2c67fd)&&_0xf62198[_0x3d55de(0x1de)](_0x3d55de(0x1dc));}if(_0xd26ba8['bgmIh'](_0xf62198['length'],0x0))return null;return{'summary':_0xd26ba8[_0x3d55de(0x1d6)],'issues':_0xf62198};}export function buildAgentEnv(_0xd9d247){const _0x292b94=_0x366361,_0x3ad6e5={'AWsin':function(_0x37b385){return _0x37b385();}};if(_0xd9d247['byokEnabled'])return Object[_0x292b94(0x1c9)](Object['entries'](process[_0x292b94(0x1cf)])[_0x292b94(0x1e8)](_0x5902cb=>typeof _0x5902cb[0x1]===_0x292b94(0x1df)));if(!_0xd9d247['sessionToken'])throw new Error(_0x292b94(0x1e7));const _0x564d47={'ANTHROPIC_API_KEY':_0xd9d247['sessionToken'],'ANTHROPIC_BASE_URL':_0x3ad6e5[_0x292b94(0x1eb)](getAiProxyUrl)};for(const _0x29109a of AGENT_ENV_PASSTHROUGH_KEYS){const _0x5af8dd=process[_0x292b94(0x1cf)][_0x29109a];_0x5af8dd&&(_0x564d47[_0x29109a]=_0x5af8dd);}return _0x564d47;}
1
+ function _0x1c22(){const _0xa63b92=['PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','byokEnabled','TMP','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','string','sessionToken','TMPDIR','18933761yCIIRf','LOCALAPPDATA','platform','1teYYAA','length','$PATH','filter','785962nyVbah','push','tGSSz','3759760SusfTi','npm_config_userconfig','NPM_CONFIG_CACHE','XbSrE','fromEntries','HOME','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','QrjlP','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','win32','split','JPNZW','/bin','497514nWMDqY','NPM_CONFIG_REGISTRY','14mNdreE','370lUMQSy','/usr/bin','3068828MsFXvw','GXOuG','55FMPmUP','2810760olhBMo','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','27432swhFxj'];_0x1c22=function(){return _0xa63b92;};return _0x1c22();}const _0xd149d9=_0x410d;function _0x410d(_0x5bf9ca,_0x15a04e){_0x5bf9ca=_0x5bf9ca-0x16a;const _0x1c22c2=_0x1c22();let _0x410db6=_0x1c22c2[_0x5bf9ca];return _0x410db6;}(function(_0x55ddb5,_0x1b8e7d){const _0x23ba03=_0x410d,_0x10696c=_0x55ddb5();while(!![]){try{const _0x1d2294=-parseInt(_0x23ba03(0x191))/0x1*(-parseInt(_0x23ba03(0x16c))/0x2)+parseInt(_0x23ba03(0x184))/0x3+-parseInt(_0x23ba03(0x181))/0x4+parseInt(_0x23ba03(0x183))/0x5*(-parseInt(_0x23ba03(0x17c))/0x6)+parseInt(_0x23ba03(0x17e))/0x7*(-parseInt(_0x23ba03(0x16f))/0x8)+-parseInt(_0x23ba03(0x186))/0x9*(-parseInt(_0x23ba03(0x17f))/0xa)+parseInt(_0x23ba03(0x18e))/0xb;if(_0x1d2294===_0x1b8e7d)break;else _0x10696c['push'](_0x10696c['shift']());}catch(_0x4d6b03){_0x10696c['push'](_0x10696c['shift']());}}}(_0x1c22,0x84fa0));import{delimiter}from'path';import{getAiProxyUrl}from'./environment.js';const AGENT_ENV_PASSTHROUGH_KEYS=['PATH',_0xd149d9(0x174),_0xd149d9(0x18d),_0xd149d9(0x189),'TEMP','USERPROFILE','APPDATA',_0xd149d9(0x18f),'XDG_CACHE_HOME','XDG_CONFIG_HOME','PLAYWRIGHT_BROWSERS_PATH',_0xd149d9(0x175),'CHROME_BIN','CHROMIUM_BIN','npm_config_cache',_0xd149d9(0x171),_0xd149d9(0x170),'NPM_CONFIG_USERCONFIG','npm_config_prefix','NPM_CONFIG_PREFIX','npm_config_registry',_0xd149d9(0x17d)],UNEXPANDED_PATH_TOKEN_PATTERNS=['${PATH}',_0xd149d9(0x16a),'%PATH%'];export function getAgentPathHealthWarning(_0x1c2e6f,_0x196645=process[_0xd149d9(0x190)]){const _0x1f7c29=_0xd149d9,_0x25d323={'upJQp':function(_0xc1f43b,_0x444f7f){return _0xc1f43b||_0x444f7f;},'XbSrE':function(_0x4babf0,_0x10d274){return _0x4babf0===_0x10d274;},'MILWF':_0x1f7c29(0x185),'cuzGl':_0x1f7c29(0x187),'gCMRJ':function(_0x228063,_0x4df1b0){return _0x228063!==_0x4df1b0;},'JPNZW':_0x1f7c29(0x17b),'JxviI':function(_0x56b49a,_0x591ae1){return _0x56b49a&&_0x591ae1;},'tGSSz':'PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','QrjlP':_0x1f7c29(0x177)},_0x682f48=[],_0xc5c871=_0x25d323['upJQp'](_0x1c2e6f,'')[_0x1f7c29(0x179)](delimiter)[_0x1f7c29(0x16b)](Boolean);_0x25d323['XbSrE'](_0xc5c871[_0x1f7c29(0x192)],0x0)&&_0x682f48['push'](_0x25d323['MILWF']);UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x2e639f=>(_0x1c2e6f||'')['includes'](_0x2e639f))&&_0x682f48[_0x1f7c29(0x16d)](_0x25d323['cuzGl']);if(_0x25d323['gCMRJ'](_0x196645,_0x1f7c29(0x178))){const _0xc8b825=_0xc5c871['includes'](_0x1f7c29(0x180)),_0x5577b0=_0xc5c871['includes'](_0x25d323[_0x1f7c29(0x17a)]);_0x25d323['JxviI'](!_0xc8b825,!_0x5577b0)&&_0x682f48[_0x1f7c29(0x16d)](_0x25d323[_0x1f7c29(0x16e)]);}if(_0x25d323[_0x1f7c29(0x172)](_0x682f48[_0x1f7c29(0x192)],0x0))return null;return{'summary':_0x25d323[_0x1f7c29(0x176)],'issues':_0x682f48};}export function buildAgentEnv(_0x295f03){const _0x231d04=_0xd149d9,_0x550d05={'GXOuG':_0x231d04(0x18a),'lwNjh':function(_0x4d7496){return _0x4d7496();}};if(_0x295f03[_0x231d04(0x188)])return Object[_0x231d04(0x173)](Object['entries'](process['env'])[_0x231d04(0x16b)](_0x1ec78a=>typeof _0x1ec78a[0x1]===_0x231d04(0x18b)));if(!_0x295f03[_0x231d04(0x18c)])throw new Error(_0x550d05[_0x231d04(0x182)]);const _0x5b3cbe={'ANTHROPIC_API_KEY':_0x295f03['sessionToken'],'ANTHROPIC_BASE_URL':_0x550d05['lwNjh'](getAiProxyUrl)};for(const _0x4b499e of AGENT_ENV_PASSTHROUGH_KEYS){const _0x7550df=process['env'][_0x4b499e];_0x7550df&&(_0x5b3cbe[_0x4b499e]=_0x7550df);}return _0x5b3cbe;}
@@ -1 +1 @@
1
- (function(_0x4a1edf,_0x4b5391){const _0x66e14d=_0x2e72,_0x341897=_0x4a1edf();while(!![]){try{const _0x3f48c3=-parseInt(_0x66e14d(0x163))/0x1*(parseInt(_0x66e14d(0x126))/0x2)+parseInt(_0x66e14d(0x141))/0x3*(parseInt(_0x66e14d(0x128))/0x4)+-parseInt(_0x66e14d(0xfb))/0x5*(-parseInt(_0x66e14d(0x111))/0x6)+parseInt(_0x66e14d(0x11c))/0x7+-parseInt(_0x66e14d(0x149))/0x8+parseInt(_0x66e14d(0x150))/0x9*(parseInt(_0x66e14d(0x120))/0xa)+-parseInt(_0x66e14d(0xf8))/0xb;if(_0x3f48c3===_0x4b5391)break;else _0x341897['push'](_0x341897['shift']());}catch(_0x5ad3be){_0x341897['push'](_0x341897['shift']());}}}(_0x3955,0xca82b));const _0x50021d=(function(){const _0x416f4f=_0x2e72,_0x266e83={'dgWYj':_0x416f4f(0x12f),'TZrnG':function(_0x24449f,_0x137032){return _0x24449f!==_0x137032;},'xXZPd':_0x416f4f(0x118),'zalTR':function(_0x3f5461,_0x1f6e24){return _0x3f5461===_0x1f6e24;},'aqdNI':'OYITf','EtHrE':_0x416f4f(0x14c)};let _0x19a4a4=!![];return function(_0x5c6d7d,_0x2137c2){const _0x514596=_0x416f4f,_0x44e9ee={'SzhQR':_0x266e83[_0x514596(0x119)],'zohPr':function(_0x2c0339,_0x27434b){const _0x48d844=_0x514596;return _0x266e83[_0x48d844(0x12a)](_0x2c0339,_0x27434b);},'UFycD':_0x514596(0x135),'fttit':_0x266e83['xXZPd'],'mjyvI':function(_0x4e7c96,_0x5917ff){return _0x266e83['zalTR'](_0x4e7c96,_0x5917ff);},'RaxJl':_0x266e83['aqdNI'],'rPpiW':_0x266e83[_0x514596(0x11e)]},_0x5ebc07=_0x19a4a4?function(){const _0x3681e7=_0x514596;if(_0x44e9ee[_0x3681e7(0x151)](_0x44e9ee[_0x3681e7(0x16f)],_0x44e9ee[_0x3681e7(0x147)])){if(_0x2137c2){if(_0x44e9ee['mjyvI'](_0x44e9ee['RaxJl'],_0x44e9ee[_0x3681e7(0x10d)])){if(_0x2e0e91){const _0x1e89b6=_0x10bf48[_0x3681e7(0x14a)](_0x1b950a,arguments);return _0x83d374=null,_0x1e89b6;}}else{const _0x5e3261=_0x2137c2[_0x3681e7(0x14a)](_0x5c6d7d,arguments);return _0x2137c2=null,_0x5e3261;}}}else throw new _0x293c8e(_0x44e9ee[_0x3681e7(0x139)]);}:function(){};return _0x19a4a4=![],_0x5ebc07;};}()),_0xfee99a=_0x50021d(this,function(){const _0x15d040=_0x2e72,_0x359044={'MnSzG':'(((.+)+)+)+$'};return _0xfee99a[_0x15d040(0x15f)]()[_0x15d040(0x13a)](_0x359044[_0x15d040(0x161)])[_0x15d040(0x15f)]()[_0x15d040(0x175)](_0xfee99a)[_0x15d040(0x13a)](_0x15d040(0x145));});_0xfee99a();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x3955(){const _0x3366e4=['AxzrsuS','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','y2HLy2TZDw0','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','Bfz3s0W','DLjnEeW','CLbWAvC','C2vZC2LVBLrVA2vU','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','DgfZAW','nMLur2zxvq','DuPntwm','zvvgv3K','C2v0DgLUz3m','tLPztu4','yxbWBgLJyxrPB24VANnVBG','qvPlrNC','tfbpzwG','zgDxwwO','y2HLy2TSAxn0sxrLBuLK','BKXTBeq','nJmXndK3m2zRwvPTqq','whP4t00','rxriCKu','wg54BeK','mtbrr21IA0K','DxbKyxrL','uefuq0G','qMrlww4','sKLWBe4','rfH4AhK','ndC2yLjrBfvT','r21tsMm','ota4B0LQqK5N','reHbwwm','vfPYBKC','yxbWBgLJyxrPB24VEMLW','EwzZAeO','v0TZEw8','u0f1rfK','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','r253yw8','vKL3ueO','yMfZzty0','CNbzD08','l3vWBg9Hzc11CMXZ','qvfLt3O','CM5jBwK','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','tNDezuC','u3POuvi','C2vHCMnO','uhrzwfu','t3jLqwK','sefoq1C','q2jlDLG','qMDXqMm','A3PJtgy','mtKZodLIDhv1wLq','rK1Ts1q','C0rTvfq','DxbKyxrLqNjVD3nLCLnLC3nPB24','kcGOlISPkYKRksSK','C2L6zq','zNr0Axq','Aw1Hz2uVCg5N','ntu2nJi0ohbkDhfrva','yxbWBhK','CNvMENi','uefguuW','l3n0zxbZlW','t096B1a','Bwv0ywrHDge','nJC4mte2n3zSzMjhwq','EM9Ouhi','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','tg5VEuC','rvDfrKC','z1DSBha','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','s0TpzvC','D0XUBMm','zuTesvy','BgvUz3rO','vML3DvK','u0HwD0y','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','DxjS','Dg9tDhjPBMC','zgLNzxn0','tw5tEKC','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','ntKXmNztBLfXvW','uxzwq00','sLfrr3C','DwLuBxe','y2PZsuy','senrD3C','vejjvfG','tKfvshG','u0HmuMi','ywTwA2q','A2PiveS','sNPQsNK','vuz5y0q','Cvryrwq','qMvHCMvYia','vKfzrMe','BfPny2i','AxvZtMS','y29UC3rYDwn0B3i','uK5hyvO','AhL6Eva','C3rYAw5NAwz5','D3HoCLG','zMvHDhvYzuLK','DKvxs2m','BeDRDw0','Bwq1','ywjUruC','uMrjy0q','ue9tva','zxbLrMK','DxzHCgS','zfbVvMO','l3n0zxbZ','CMveANe','ALLzufO','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','svf3tLm','mJqYodaXou52CwXcAq','Dg1wuwW','ANnVBG','mtuXnZmWvhvZCunk','twnhC2u','Dgv4Da','yxbWBgLJyxrPB24VANnVBMW','AKTgCNe','wgn2B1a','D0vQDeK','Dg5VBu8','r0vu','ufvu','y0ves1O'];_0x3955=function(){return _0x3366e4;};return _0x3955();}import{createHash}from'crypto';function _0x2e72(_0x123df1,_0x4e05e7){_0x123df1=_0x123df1-0xea;const _0x3b352d=_0x3955();let _0xfee99a=_0x3b352d[_0x123df1];if(_0x2e72['bTRPcn']===undefined){var _0x50021d=function(_0x2daaf0){const _0x2da5df='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x595565='',_0x1f9bd2='',_0x5a1161=_0x595565+_0x50021d;for(let _0x278a29=0x0,_0x42bf17,_0xc3114b,_0x4cb4ab=0x0;_0xc3114b=_0x2daaf0['charAt'](_0x4cb4ab++);~_0xc3114b&&(_0x42bf17=_0x278a29%0x4?_0x42bf17*0x40+_0xc3114b:_0xc3114b,_0x278a29++%0x4)?_0x595565+=_0x5a1161['charCodeAt'](_0x4cb4ab+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x42bf17>>(-0x2*_0x278a29&0x6)):_0x278a29:0x0){_0xc3114b=_0x2da5df['indexOf'](_0xc3114b);}for(let _0x4fffe8=0x0,_0x4c8579=_0x595565['length'];_0x4fffe8<_0x4c8579;_0x4fffe8++){_0x1f9bd2+='%'+('00'+_0x595565['charCodeAt'](_0x4fffe8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1f9bd2);};_0x2e72['NDnxdk']=_0x50021d,_0x2e72['aFCMdI']={},_0x2e72['bTRPcn']=!![];}const _0x395520=_0x3b352d[0x0],_0x2e7291=_0x123df1+_0x395520,_0x49e336=_0x2e72['aFCMdI'][_0x2e7291];if(!_0x49e336){const _0x4467f0=function(_0x2b282e){this['yGzCmL']=_0x2b282e,this['rsNShS']=[0x1,0x0,0x0],this['gdeqzv']=function(){return'newState';},this['mYtMdR']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['EaTsAi']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4467f0['prototype']['hXRInv']=function(){const _0x276dbd=new RegExp(this['mYtMdR']+this['EaTsAi']),_0x1c83e8=_0x276dbd['test'](this['gdeqzv']['toString']())?--this['rsNShS'][0x1]:--this['rsNShS'][0x0];return this['XJthCM'](_0x1c83e8);},_0x4467f0['prototype']['XJthCM']=function(_0x454744){if(!Boolean(~_0x454744))return _0x454744;return this['QwlGgF'](this['yGzCmL']);},_0x4467f0['prototype']['QwlGgF']=function(_0x39545d){for(let _0x34fad4=0x0,_0x530681=this['rsNShS']['length'];_0x34fad4<_0x530681;_0x34fad4++){this['rsNShS']['push'](Math['round'](Math['random']())),_0x530681=this['rsNShS']['length'];}return _0x39545d(this['rsNShS'][0x0]);},new _0x4467f0(_0x2e72)['hXRInv'](),_0xfee99a=_0x2e72['NDnxdk'](_0xfee99a),_0x2e72['aFCMdI'][_0x2e7291]=_0xfee99a;}else _0xfee99a=_0x49e336;return _0xfee99a;}import{withRetry}from'./retry.js';export async function createBrowserSession(_0x507bfb){const _0x35f9ea=_0x2e72,_0x1b4a2f={'PtYXU':_0x35f9ea(0x12f),'wxNrX':function(_0x322210){return _0x322210();},'HqCZF':function(_0x27fe30){return _0x27fe30();},'CbKvX':'application/json','JzjJy':_0x35f9ea(0x14b)},_0xc9a063=await _0x1b4a2f[_0x35f9ea(0x179)](getToken);if(!_0xc9a063)throw new Error(_0x1b4a2f['PtYXU']);const _0xdf0ff4=_0x1b4a2f['HqCZF'](getApiBaseUrl),_0x5a540e=await fetch(_0xdf0ff4+_0x35f9ea(0x137),{'method':'POST','headers':{'Authorization':_0x35f9ea(0x171)+_0xc9a063,'Content-Type':_0x1b4a2f[_0x35f9ea(0x13e)]},'body':JSON['stringify']({'environmentName':_0x507bfb?.['environmentName'],'settings':_0x507bfb?.[_0x35f9ea(0x114)],'task':_0x507bfb?.[_0x35f9ea(0x110)],'url':_0x507bfb?.[_0x35f9ea(0x15e)],'featureId':_0x507bfb?.[_0x35f9ea(0x17a)],'checklistItemId':_0x507bfb?.[_0x35f9ea(0x11a)]})});if(!_0x5a540e['ok']){if(_0x35f9ea(0x14b)===_0x1b4a2f[_0x35f9ea(0x16e)]){const _0x30afad=await _0x5a540e['text']();throw new Error(_0x35f9ea(0x108)+_0x30afad);}else throw new _0x59e6c4(_0x1b4a2f[_0x35f9ea(0x13b)]);}return _0x5a540e[_0x35f9ea(0xfa)]();}export async function updateBrowserSession(_0xa8fc7b,_0xef9fbd){const _0x4b3208=_0x2e72,_0x3040d7={'SAuDY':'md5','lGkum':function(_0xe5cc57){return _0xe5cc57();},'AZKFw':function(_0x39b195,_0x3085a1){return _0x39b195===_0x3085a1;},'SHLRb':_0x4b3208(0x11b),'zjGpZ':_0x4b3208(0x12f),'QvVCM':function(_0x1015df,_0x591d82,_0x22b34c){return _0x1015df(_0x591d82,_0x22b34c);},'eUFWy':_0x4b3208(0x116),'uiTmq':_0x4b3208(0x144)};return _0x3040d7[_0x4b3208(0x164)](withRetry,async()=>{const _0x20d035=_0x4b3208,_0x2b9a84=await _0x3040d7[_0x20d035(0xeb)](getToken);if(!_0x2b9a84){if(_0x3040d7[_0x20d035(0x117)](_0x3040d7[_0x20d035(0x16b)],_0x3040d7[_0x20d035(0x16b)]))throw new Error(_0x3040d7['zjGpZ']);else return _0x5a289a(_0x3040d7[_0x20d035(0x12e)])[_0x20d035(0x121)](_0x5908ed)[_0x20d035(0x160)](_0x20d035(0x132));}const _0x5a40d6=_0x3040d7[_0x20d035(0xeb)](getApiBaseUrl),_0x12a59d=await _0x3040d7[_0x20d035(0x164)](fetch,_0x5a40d6+_0x20d035(0x107)+_0xa8fc7b,{'method':_0x20d035(0x122),'headers':{'Authorization':'Bearer\x20'+_0x2b9a84,'Content-Type':_0x3040d7[_0x20d035(0x113)]},'body':JSON['stringify'](_0xef9fbd)});if(!_0x12a59d['ok']){const _0x3e0e82=await _0x12a59d[_0x20d035(0xfd)]();throw new Error(_0x20d035(0x152)+_0x3e0e82);}return _0x12a59d['json']();},{'label':_0x3040d7[_0x4b3208(0x166)]});}export async function getBrowserSession(_0x10459a){const _0x4db7f3=_0x2e72,_0x24028d={'Gnwao':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','BgqBc':function(_0x1bded4,_0x1c75d9){return _0x1bded4===_0x1c75d9;},'JIplN':_0x4db7f3(0x159),'qTXEd':_0x4db7f3(0xff),'OOzoP':function(_0x53470c,_0x8d4403,_0x153ab9){return _0x53470c(_0x8d4403,_0x153ab9);},'rpYwO':_0x4db7f3(0x103)},_0x1cbee2=await getToken();if(!_0x1cbee2){if(_0x24028d[_0x4db7f3(0x13f)](_0x24028d[_0x4db7f3(0x124)],_0x24028d[_0x4db7f3(0x170)]))throw new _0x373c7c(_0x24028d[_0x4db7f3(0x130)]);else throw new Error(_0x24028d[_0x4db7f3(0x130)]);}const _0x817c5c=getApiBaseUrl(),_0x1df657=await _0x24028d[_0x4db7f3(0x14e)](fetch,_0x817c5c+'/api/v1/mcp/browser-sessions/'+_0x10459a,{'method':_0x24028d[_0x4db7f3(0x133)],'headers':{'Authorization':_0x4db7f3(0x171)+_0x1cbee2}});if(!_0x1df657['ok']){const _0x16df6b=await _0x1df657[_0x4db7f3(0xfd)]();throw new Error(_0x4db7f3(0x10f)+_0x16df6b);}return _0x1df657[_0x4db7f3(0xfa)]();}export async function getUploadUrls(_0x5b77f2,_0x3fda3e,_0x599b9f,_0xc03431){const _0x21e84c=_0x2e72,_0x384b4d={'FMmKT':_0x21e84c(0x12b),'IQwNS':function(_0x13cb85){return _0x13cb85();},'gWllp':function(_0x282082,_0x4ce4dc){return _0x282082===_0x4ce4dc;},'XcvoP':_0x21e84c(0x169),'abnEG':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','dPoVj':function(_0xbc638b){return _0xbc638b();},'akVkd':function(_0x54d0f0,_0x4da9e8,_0x4874c6){return _0x54d0f0(_0x4da9e8,_0x4874c6);},'yfshJ':_0x21e84c(0xef),'RNGaZ':_0x21e84c(0x116),'kjHTK':function(_0x3ae8d9,_0x42c502){return _0x3ae8d9!==_0x42c502;},'pnssl':function(_0x72b4dd,_0x12e64f){return _0x72b4dd!==_0x12e64f;}},_0x220232=await _0x384b4d[_0x21e84c(0xf7)](getToken);if(!_0x220232){if(_0x384b4d[_0x21e84c(0x155)](_0x384b4d[_0x21e84c(0x100)],_0x384b4d['XcvoP']))throw new Error(_0x384b4d[_0x21e84c(0xed)]);else return _0x4a6868(_0x6ceb14,_0x387de4,_0x384b4d[_0x21e84c(0x142)]);}const _0x3630a4=_0x384b4d[_0x21e84c(0xf2)](getApiBaseUrl),_0x45fbc4=await _0x384b4d[_0x21e84c(0x16c)](fetch,_0x3630a4+_0x21e84c(0x107)+_0x5b77f2+_0x21e84c(0x134),{'method':_0x384b4d[_0x21e84c(0x12c)],'headers':{'Authorization':'Bearer\x20'+_0x220232,'Content-Type':_0x384b4d[_0x21e84c(0x176)]},'body':JSON[_0x21e84c(0x178)]({'filename':_0x3fda3e,'filetype':_0x599b9f,..._0x384b4d[_0x21e84c(0x16d)](_0xc03431?.[_0x21e84c(0x146)],undefined)&&{'size':_0xc03431['size']},..._0x384b4d[_0x21e84c(0x16d)](_0xc03431?.['checksum'],undefined)&&{'checksum':_0xc03431[_0x21e84c(0x109)]},..._0x384b4d['pnssl'](_0xc03431?.[_0x21e84c(0x14f)],undefined)&&{'metadata':_0xc03431[_0x21e84c(0x14f)]}})});if(!_0x45fbc4['ok']){const _0xc0ed76=await _0x45fbc4[_0x21e84c(0xfd)]();throw new Error(_0x21e84c(0x162)+_0xc0ed76);}return _0x45fbc4['json']();}export async function uploadFile(_0x4fe657,_0x55ebae,_0x29252f){const _0x166ebc=_0x2e72,_0x60bd92={'MUhSA':function(_0x2b2281,_0x4bbec7,_0x1ea463){return _0x2b2281(_0x4bbec7,_0x1ea463);},'VIwPJ':_0x166ebc(0x104)},_0x361e59=await _0x60bd92['MUhSA'](fetch,_0x4fe657,{'method':_0x60bd92[_0x166ebc(0x131)],'headers':{'Content-Type':_0x29252f,'Content-Length':_0x55ebae[_0x166ebc(0x15a)][_0x166ebc(0x15f)]()},'body':_0x55ebae});if(!_0x361e59['ok']){const _0x341164=await _0x361e59[_0x166ebc(0xfd)]();throw new Error(_0x166ebc(0x10a)+_0x341164);}}export async function uploadTrace(_0x1de5e4,_0x1658bb){const _0x5958fe=_0x2e72,_0x2c4ec7={'epeFi':function(_0x42cc1b,_0x2c63ab,_0x32e183,_0x38b91b){return _0x42cc1b(_0x2c63ab,_0x32e183,_0x38b91b);},'XnxlI':'application/zip'};return _0x2c4ec7[_0x5958fe(0xf0)](uploadFile,_0x1de5e4,_0x1658bb,_0x2c4ec7[_0x5958fe(0x11f)]);}export async function uploadConversation(_0x5374b7,_0x30a11b){const _0x148556=_0x2e72,_0x2e2fcf={'ElAFu':function(_0x3d68df,_0x5cf84d,_0xcef836,_0x10a489){return _0x3d68df(_0x5cf84d,_0xcef836,_0x10a489);},'vRMxL':_0x148556(0xfe)};return _0x2e2fcf['ElAFu'](uploadFile,_0x5374b7,_0x30a11b,_0x2e2fcf[_0x148556(0x10c)]);}export async function uploadScreenshot(_0x18b9c6,_0x6e5082){const _0x588660=_0x2e72,_0x72ae92={'NAUHx':function(_0x4c0c75,_0x45d76c,_0x54b2ec,_0x392fc5){return _0x4c0c75(_0x45d76c,_0x54b2ec,_0x392fc5);},'RdIcD':'image/png'};return _0x72ae92[_0x588660(0x16a)](uploadFile,_0x18b9c6,_0x6e5082,_0x72ae92[_0x588660(0xee)]);}export async function uploadVideo(_0x42ec65,_0x3afb01){const _0x5d5d93=_0x2e72,_0x570604={'kzcLf':function(_0x2d0176,_0x31d817,_0x4895ca,_0x54aa0a){return _0x2d0176(_0x31d817,_0x4895ca,_0x54aa0a);},'hyzyP':'video/webm'};return _0x570604[_0x5d5d93(0x140)](uploadFile,_0x42ec65,_0x3afb01,_0x570604[_0x5d5d93(0x177)]);}export function buildTraceViewerUrl(_0x4171a1){const _0x5aac65=_0x2e72,_0x3f5dca={'cEDKZ':function(_0x416e70,_0x251daa){return _0x416e70(_0x251daa);}},_0x5529cf=_0x3f5dca[_0x5aac65(0x105)](encodeURIComponent,_0x4171a1);return'https://trace.playwright.dev/?trace='+_0x5529cf;}export async function getProxySessionToken(){const _0x2b015a=_0x2e72,_0x23b318={'EWEFG':function(_0x3eef36,_0x4d5119,_0x1e8a80,_0x5dc19c){return _0x3eef36(_0x4d5119,_0x1e8a80,_0x5dc19c);},'rnImi':_0x2b015a(0xfe),'XzxOM':function(_0x1facf1){return _0x1facf1();},'ddpLD':_0x2b015a(0x12f),'ivQIK':function(_0xc422d4){return _0xc422d4();},'ViwuY':function(_0x490d2d,_0x39d70e,_0x216053){return _0x490d2d(_0x39d70e,_0x216053);},'RDJDS':'POST','JQQGw':_0x2b015a(0x153),'CuNTj':_0x2b015a(0x174)},_0x180146=await _0x23b318[_0x2b015a(0x11d)](getToken);if(!_0x180146)throw new Error(_0x23b318['ddpLD']);const _0x1a3783=_0x23b318[_0x2b015a(0x106)](getApiBaseUrl),_0x4c17ea=await _0x23b318[_0x2b015a(0x15b)](fetch,_0x1a3783+_0x2b015a(0x156),{'method':_0x23b318['RDJDS'],'headers':{'Authorization':_0x2b015a(0x171)+_0x180146}});if(!_0x4c17ea['ok']){if(_0x23b318[_0x2b015a(0x165)]===_0x23b318['CuNTj'])return _0x23b318[_0x2b015a(0x154)](_0x5e2e73,_0x5c4e6f,_0x219320,_0x23b318[_0x2b015a(0x136)]);else{const _0x5c61f1=await _0x4c17ea['text']();throw new Error(_0x2b015a(0xf6)+_0x5c61f1);}}const _0x1506da=await _0x4c17ea[_0x2b015a(0xfa)]();return _0x1506da[_0x2b015a(0x10e)];}export function computeChecksum(_0x4f2705){const _0x4393eb=_0x2e72,_0x2edb98={'tmVQl':function(_0x163bfd,_0x121f7c){return _0x163bfd(_0x121f7c);},'sDmTT':_0x4393eb(0xec),'DXxhy':_0x4393eb(0x132)};return _0x2edb98[_0x4393eb(0xf9)](createHash,_0x2edb98[_0x4393eb(0x143)])[_0x4393eb(0x121)](_0x4f2705)[_0x4393eb(0x160)](_0x2edb98[_0x4393eb(0x125)]);}export async function createVerificationStep(_0x542d0f,_0x495b92){const _0xd9eecb=_0x2e72,_0x39491c={'uvapk':_0xd9eecb(0x148),'lVwKL':function(_0x254797){return _0x254797();},'uJMMc':function(_0x320659,_0x338675){return _0x320659!==_0x338675;},'cjsIF':_0xd9eecb(0x168),'jYYPZ':'JMAoZ','wLnnc':function(_0x6831fa){return _0x6831fa();},'NZYMN':function(_0x57911c,_0x529703,_0x57694a){return _0x57911c(_0x529703,_0x57694a);},'wEjtI':_0xd9eecb(0x116)},_0x3f2bc6=await _0x39491c[_0xd9eecb(0x10b)](getToken);if(!_0x3f2bc6){if(_0x39491c[_0xd9eecb(0x112)](_0x39491c[_0xd9eecb(0x167)],_0x39491c[_0xd9eecb(0xf5)]))throw new Error(_0xd9eecb(0x12f));else return _0x1371cc(_0x42d8cb,_0x149437,_0x39491c[_0xd9eecb(0xf1)]);}const _0x16422e=_0x39491c[_0xd9eecb(0x158)](getApiBaseUrl),_0x44efe1=await _0x39491c[_0xd9eecb(0x115)](fetch,_0x16422e+_0xd9eecb(0x107)+_0x542d0f+'/steps',{'method':_0xd9eecb(0xef),'headers':{'Authorization':_0xd9eecb(0x171)+_0x3f2bc6,'Content-Type':_0x39491c[_0xd9eecb(0x101)]},'body':JSON[_0xd9eecb(0x178)](_0x495b92)});if(!_0x44efe1['ok']){const _0x41e0eb=await _0x44efe1[_0xd9eecb(0xfd)]();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x41e0eb);}return _0x44efe1[_0xd9eecb(0xfa)]();}export async function createStepAsset(_0x159e30,_0x10cea4,_0x117127){const _0x2a8075=_0x2e72,_0x211111={'bpMrS':_0x2a8075(0x12f),'tnomO':function(_0x3de40c){return _0x3de40c();},'GmSJc':function(_0x50ceac,_0x11b097,_0xc56ab4){return _0x50ceac(_0x11b097,_0xc56ab4);},'OreAi':_0x2a8075(0xef),'DHAYc':_0x2a8075(0x116)},_0x119c5c=await getToken();if(!_0x119c5c)throw new Error(_0x211111['bpMrS']);const _0x10914f=_0x211111[_0x2a8075(0x102)](getApiBaseUrl),_0x3f643f=await _0x211111[_0x2a8075(0x127)](fetch,_0x10914f+_0x2a8075(0x107)+_0x159e30+_0x2a8075(0x14d)+_0x10cea4+'/assets',{'method':_0x211111[_0x2a8075(0x13c)],'headers':{'Authorization':'Bearer\x20'+_0x119c5c,'Content-Type':_0x211111[_0x2a8075(0x129)]},'body':JSON[_0x2a8075(0x178)](_0x117127)});if(!_0x3f643f['ok']){const _0x2c9021=await _0x3f643f[_0x2a8075(0xfd)]();throw new Error('Failed\x20to\x20create\x20step\x20asset:\x20'+_0x2c9021);}return _0x3f643f[_0x2a8075(0xfa)]();}export async function updateVerificationStep(_0x567029,_0x10fb6d,_0xd35602){const _0x185c51=_0x2e72,_0x5a4a97={'KKOeW':_0x185c51(0x123),'SHVwF':_0x185c51(0x12f),'vEWKc':function(_0x495b65){return _0x495b65();},'reDjq':function(_0xd10be0,_0x57f623,_0x195ee2){return _0xd10be0(_0x57f623,_0x195ee2);},'McGse':_0x185c51(0x122),'HANCW':_0x185c51(0x116)},_0x355197=await getToken();if(!_0x355197){if(_0x5a4a97[_0x185c51(0x157)]!==_0x5a4a97[_0x185c51(0x157)]){const _0x521425=_0x2585c7['apply'](_0xee27ea,arguments);return _0x581755=null,_0x521425;}else throw new Error(_0x5a4a97[_0x185c51(0x15c)]);}const _0x7513db=_0x5a4a97[_0x185c51(0xea)](getApiBaseUrl),_0x23b829=await _0x5a4a97[_0x185c51(0xf4)](fetch,_0x7513db+_0x185c51(0x107)+_0x567029+_0x185c51(0x14d)+_0x10fb6d,{'method':_0x5a4a97[_0x185c51(0xfc)],'headers':{'Authorization':_0x185c51(0x171)+_0x355197,'Content-Type':_0x5a4a97[_0x185c51(0x13d)]},'body':JSON[_0x185c51(0x178)](_0xd35602)});if(!_0x23b829['ok']){const _0x5c22db=await _0x23b829[_0x185c51(0xfd)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0x5c22db);}}export async function getBrowserSessionSteps(_0x2ac90b){const _0x34f798=_0x2e72,_0x466da8={'NwDeG':function(_0x5bbc31){return _0x5bbc31();},'lZMcb':function(_0x50e78f,_0x17b3c9){return _0x50e78f!==_0x17b3c9;},'VAYFa':_0x34f798(0x12f),'WKsyo':_0x34f798(0x103)},_0x233bb2=await _0x466da8['NwDeG'](getToken);if(!_0x233bb2){if(_0x466da8[_0x34f798(0x173)]('gGYff','gGYff'))throw new _0x24b5bd('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');else throw new Error(_0x466da8[_0x34f798(0x172)]);}const _0x5bad37=_0x466da8[_0x34f798(0x138)](getApiBaseUrl),_0x156e6=await fetch(_0x5bad37+'/api/v1/mcp/browser-sessions/'+_0x2ac90b+_0x34f798(0xf3),{'method':_0x466da8[_0x34f798(0x12d)],'headers':{'Authorization':'Bearer\x20'+_0x233bb2}});if(!_0x156e6['ok']){const _0x111f6c=await _0x156e6[_0x34f798(0xfd)]();throw new Error(_0x34f798(0x15d)+_0x111f6c);}return _0x156e6[_0x34f798(0xfa)]();}
1
+ function _0x3eae(_0x17490e,_0x41a268){_0x17490e=_0x17490e-0x19b;const _0x223c13=_0x55c9();let _0x5b3423=_0x223c13[_0x17490e];if(_0x3eae['fTvpvJ']===undefined){var _0xcef5f9=function(_0x1b5df1){const _0x3dc493='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xd9d245='',_0x42a3c6='',_0x28f3f6=_0xd9d245+_0xcef5f9;for(let _0x39623c=0x0,_0x4dd9f1,_0x2ee4f7,_0x97cd4d=0x0;_0x2ee4f7=_0x1b5df1['charAt'](_0x97cd4d++);~_0x2ee4f7&&(_0x4dd9f1=_0x39623c%0x4?_0x4dd9f1*0x40+_0x2ee4f7:_0x2ee4f7,_0x39623c++%0x4)?_0xd9d245+=_0x28f3f6['charCodeAt'](_0x97cd4d+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x4dd9f1>>(-0x2*_0x39623c&0x6)):_0x39623c:0x0){_0x2ee4f7=_0x3dc493['indexOf'](_0x2ee4f7);}for(let _0x19ab5f=0x0,_0x49dbe9=_0xd9d245['length'];_0x19ab5f<_0x49dbe9;_0x19ab5f++){_0x42a3c6+='%'+('00'+_0xd9d245['charCodeAt'](_0x19ab5f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x42a3c6);};_0x3eae['RfSprE']=_0xcef5f9,_0x3eae['gdVopF']={},_0x3eae['fTvpvJ']=!![];}const _0x55c9da=_0x223c13[0x0],_0x3eae89=_0x17490e+_0x55c9da,_0x550a80=_0x3eae['gdVopF'][_0x3eae89];if(!_0x550a80){const _0x1990b6=function(_0x173b3a){this['FGnPGo']=_0x173b3a,this['AsMnWy']=[0x1,0x0,0x0],this['egfLIm']=function(){return'newState';},this['qJzgQv']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['OSAlbO']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x1990b6['prototype']['ZxlKHo']=function(){const _0x83bdae=new RegExp(this['qJzgQv']+this['OSAlbO']),_0x1453f7=_0x83bdae['test'](this['egfLIm']['toString']())?--this['AsMnWy'][0x1]:--this['AsMnWy'][0x0];return this['qZNVvz'](_0x1453f7);},_0x1990b6['prototype']['qZNVvz']=function(_0x325b5b){if(!Boolean(~_0x325b5b))return _0x325b5b;return this['OeqEIk'](this['FGnPGo']);},_0x1990b6['prototype']['OeqEIk']=function(_0x2d4cc1){for(let _0x4e3c25=0x0,_0x5ebdf5=this['AsMnWy']['length'];_0x4e3c25<_0x5ebdf5;_0x4e3c25++){this['AsMnWy']['push'](Math['round'](Math['random']())),_0x5ebdf5=this['AsMnWy']['length'];}return _0x2d4cc1(this['AsMnWy'][0x0]);},new _0x1990b6(_0x3eae)['ZxlKHo'](),_0x5b3423=_0x3eae['RfSprE'](_0x5b3423),_0x3eae['gdVopF'][_0x3eae89]=_0x5b3423;}else _0x5b3423=_0x550a80;return _0x5b3423;}(function(_0x3d36d7,_0x198437){const _0x57d2b0=_0x3eae,_0x3cc0c2=_0x3d36d7();while(!![]){try{const _0x3340ed=-parseInt(_0x57d2b0(0x1a4))/0x1+parseInt(_0x57d2b0(0x1d5))/0x2*(parseInt(_0x57d2b0(0x1dd))/0x3)+-parseInt(_0x57d2b0(0x1da))/0x4*(-parseInt(_0x57d2b0(0x19c))/0x5)+-parseInt(_0x57d2b0(0x1fe))/0x6*(-parseInt(_0x57d2b0(0x1e6))/0x7)+-parseInt(_0x57d2b0(0x1c6))/0x8+-parseInt(_0x57d2b0(0x1f4))/0x9*(-parseInt(_0x57d2b0(0x1fa))/0xa)+-parseInt(_0x57d2b0(0x1d2))/0xb;if(_0x3340ed===_0x198437)break;else _0x3cc0c2['push'](_0x3cc0c2['shift']());}catch(_0x186000){_0x3cc0c2['push'](_0x3cc0c2['shift']());}}}(_0x55c9,0x7b16e));const _0xcef5f9=(function(){const _0x3e19f8=_0x3eae,_0x3bfc29={'xrdhQ':_0x3e19f8(0x1e3),'ChWmi':_0x3e19f8(0x1d8)};let _0x309cc0=!![];return function(_0x5357fb,_0x1fc2b1){const _0x51e42e=_0x3e19f8,_0x12da6d={'DJLeY':_0x3bfc29[_0x51e42e(0x1ab)],'IBkFB':function(_0x182c1d,_0x229b68){return _0x182c1d===_0x229b68;},'ccBMR':_0x3bfc29['ChWmi']},_0x1653d8=_0x309cc0?function(){const _0x2f60c2=_0x51e42e;if(_0x1fc2b1){if(_0x12da6d[_0x2f60c2(0x1ba)](_0x12da6d[_0x2f60c2(0x1ce)],_0x12da6d[_0x2f60c2(0x1ce)])){const _0x173531=_0x1fc2b1['apply'](_0x5357fb,arguments);return _0x1fc2b1=null,_0x173531;}else throw new _0x426083(_0x12da6d[_0x2f60c2(0x1a9)]);}}:function(){};return _0x309cc0=![],_0x1653d8;};}()),_0x5b3423=_0xcef5f9(this,function(){const _0x335b2d=_0x3eae,_0x3e9432={'RXulU':_0x335b2d(0x1f1)};return _0x5b3423['toString']()[_0x335b2d(0x1a5)](_0x335b2d(0x1f1))[_0x335b2d(0x1ad)]()['constructor'](_0x5b3423)[_0x335b2d(0x1a5)](_0x3e9432['RXulU']);});_0x5b3423();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x21004f){const _0x392834=_0x3eae,_0x432b51={'fdVio':function(_0x400611){return _0x400611();},'BUhUb':function(_0x185b5a,_0x2f7f95,_0x54d5fc){return _0x185b5a(_0x2f7f95,_0x54d5fc);},'ByHaD':_0x392834(0x1be),'nFpSb':_0x392834(0x1d7)},_0x5ee66a=await _0x432b51[_0x392834(0x1f7)](getToken);if(!_0x5ee66a)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x474c03=_0x432b51[_0x392834(0x1f7)](getApiBaseUrl),_0x4e2d2a=await _0x432b51['BUhUb'](fetch,_0x474c03+'/api/v1/mcp/browser-sessions',{'method':_0x432b51[_0x392834(0x1db)],'headers':{'Authorization':_0x392834(0x1d4)+_0x5ee66a,'Content-Type':_0x432b51['nFpSb']},'body':JSON[_0x392834(0x1cf)]({'environmentName':_0x21004f?.[_0x392834(0x1c2)],'settings':_0x21004f?.['settings'],'task':_0x21004f?.[_0x392834(0x1f6)],'url':_0x21004f?.[_0x392834(0x1bc)],'featureId':_0x21004f?.[_0x392834(0x1b1)],'checklistItemId':_0x21004f?.[_0x392834(0x19b)]})});if(!_0x4e2d2a['ok']){const _0x4f8d82=await _0x4e2d2a['text']();throw new Error(_0x392834(0x1c7)+_0x4f8d82);}return _0x4e2d2a[_0x392834(0x1a8)]();}function _0x55c9(){const _0x10f503=['nda0nfjiCgnQyG','Bwq1','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','y2HLy2TSAxn0sxrLBuLK','mZuWmZK1u1f0CxLN','DMfPEwi','yMfZzty0','uefuq0G','txjyEg4','z3vLs0m','wvnKquy','BuLgvMi','mtyXmJi1qxDRD09N','C2vHCMnO','l3n0zxbZ','sK9lvKS','ANnVBG','rePmzvK','wfDsqLm','EhjKAfe','BgvUz3rO','Dg9tDhjPBMC','yxbWBgLJyxrPB24VEMLW','rxHyAwS','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','zMvHDhvYzuLK','zfbbDfi','DMLKzw8VD2vIBq','sNLXrLa','EwXSD3K','z09msNG','r0vu','B0DJy0i','wfPKweO','sujRrKi','zLnRr1q','DxjS','DNDdD0q','ue9tva','DxbKyxrL','u01os3y','ChHAuNC','zw52AxjVBM1LBNroyw1L','tLPizu0','yxbWBhK','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','ntCYmtyWv3HHuvHY','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','yxbWBgLJyxrPB24VANnVBMW','C2L6zq','AhHnCLq','uxPwuvu','sMvXwMC','u2vhyMq','y2nctvi','C3rYAw5NAwz5','Aw1Hz2uVCg5N','D1b6D2i','mJi2mZyXndfHuwHIB1K','AgnHveO','qMvHCMvYia','nda1mZeWsuDur0zn','venfCfG','yxbWBgLJyxrPB24VANnVBG','s2HXu20','rgfOtMm','ntjRvLLgthm','qNLiyuq','revPvKi','m1bfqM9LAG','Dgv4Da','Bwv0ywrHDge','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','l3vWBg9Hzc11CMXZ','zgLNzxn0','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','DvvczeS','wMjXsui','odq3mfrcvw1qta','yMDjuMS','l2fZC2v0CW','C2vZC2LVBLrVA2vU','y2HLy2TZDw0','rfPXsxi','Du5JB0e','u3zmBvG','C3fzD3K','vg9tuu8','AK1Lyxq','kcGOlISPkYKRksSK','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','mtHssw9hvK4','BNHgALC','DgfZAW','zMrwAw8','EfPfrhq','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','ndmYnZy0mgfmy2vMrW','vg5qz1q','r3D3Aw4','l3n0zxbZlW'];_0x55c9=function(){return _0x10f503;};return _0x55c9();}export async function updateBrowserSession(_0x2a57bc,_0x46335d){const _0x4f503e=_0x3eae,_0x417878={'uUBdK':function(_0x3bb692,_0x15bcb8){return _0x3bb692===_0x15bcb8;},'JyqFP':'nxFjW','QzVQU':function(_0x391d10){return _0x391d10();},'QQFQk':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','hxMrT':function(_0x47e49e){return _0x47e49e();},'cLZUX':function(_0x4f02bd,_0x2d3bd8,_0x306aee){return _0x4f02bd(_0x2d3bd8,_0x306aee);},'UCMkp':_0x4f503e(0x19f),'rPxNd':'application/json','ZbqIB':function(_0x4a8f20,_0x4b3174,_0x498799){return _0x4a8f20(_0x4b3174,_0x498799);},'CQvtT':'updateBrowserSession'};return _0x417878[_0x4f503e(0x1e5)](withRetry,async()=>{const _0x4cd767=_0x4f503e;if(_0x417878[_0x4cd767(0x1e4)](_0x417878[_0x4cd767(0x1b4)],_0x4cd767(0x1f5))){const _0x5057fc=await _0x417878[_0x4cd767(0x1cb)](getToken);if(!_0x5057fc)throw new Error(_0x417878['QQFQk']);const _0x8dc726=_0x417878[_0x4cd767(0x1ca)](getApiBaseUrl),_0x2aac51=await _0x417878['cLZUX'](fetch,_0x8dc726+_0x4cd767(0x200)+_0x2a57bc,{'method':_0x417878['UCMkp'],'headers':{'Authorization':_0x4cd767(0x1d4)+_0x5057fc,'Content-Type':_0x417878['rPxNd']},'body':JSON[_0x4cd767(0x1cf)](_0x46335d)});if(!_0x2aac51['ok']){const _0x14ec69=await _0x2aac51[_0x4cd767(0x1de)]();throw new Error(_0x4cd767(0x1f3)+_0x14ec69);}return _0x2aac51[_0x4cd767(0x1a8)]();}else throw new _0x16c1fd('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');},{'label':_0x417878['CQvtT']});}export async function getBrowserSession(_0x591bb6){const _0x33d687=_0x3eae,_0xb6db1a={'cWAkE':function(_0x28a9f2){return _0x28a9f2();},'jMeat':function(_0x4a48aa,_0x4719ba,_0x4cf6bf){return _0x4a48aa(_0x4719ba,_0x4cf6bf);}},_0x5cb501=await getToken();if(!_0x5cb501)throw new Error(_0x33d687(0x1e3));const _0x341143=_0xb6db1a['cWAkE'](getApiBaseUrl),_0x2eeb8e=await _0xb6db1a[_0x33d687(0x1f0)](fetch,_0x341143+_0x33d687(0x200)+_0x591bb6,{'method':_0x33d687(0x1b7),'headers':{'Authorization':_0x33d687(0x1d4)+_0x5cb501}});if(!_0x2eeb8e['ok']){const _0x58604f=await _0x2eeb8e['text']();throw new Error(_0x33d687(0x1e0)+_0x58604f);}return _0x2eeb8e[_0x33d687(0x1a8)]();}export async function getUploadUrls(_0xf1720d,_0x483875,_0x4cff10,_0x4cf1c1){const _0x1a7b66=_0x3eae,_0x40d505={'yrqMh':function(_0x127fe6){return _0x127fe6();},'fSkGT':_0x1a7b66(0x1e3),'SeGbd':function(_0x59254d){return _0x59254d();},'yllwy':function(_0x575a99,_0x231564,_0x5ab582){return _0x575a99(_0x231564,_0x5ab582);},'pDYRt':_0x1a7b66(0x1be),'uNcoA':'application/json','FFNsZ':function(_0x383530,_0xcc794e){return _0x383530!==_0xcc794e;}},_0x12e22c=await _0x40d505['yrqMh'](getToken);if(!_0x12e22c)throw new Error(_0x40d505[_0x1a7b66(0x1bb)]);const _0x337ef4=_0x40d505[_0x1a7b66(0x1cd)](getApiBaseUrl),_0x38283b=await _0x40d505[_0x1a7b66(0x1b5)](fetch,_0x337ef4+_0x1a7b66(0x200)+_0xf1720d+_0x1a7b66(0x1e1),{'method':_0x40d505['pDYRt'],'headers':{'Authorization':'Bearer\x20'+_0x12e22c,'Content-Type':_0x40d505[_0x1a7b66(0x1ec)]},'body':JSON[_0x1a7b66(0x1cf)]({'filename':_0x483875,'filetype':_0x4cff10,..._0x4cf1c1?.['size']!==undefined&&{'size':_0x4cf1c1[_0x1a7b66(0x1c9)]},..._0x4cf1c1?.[_0x1a7b66(0x1ea)]!==undefined&&{'checksum':_0x4cf1c1[_0x1a7b66(0x1ea)]},..._0x40d505['FFNsZ'](_0x4cf1c1?.[_0x1a7b66(0x1df)],undefined)&&{'metadata':_0x4cf1c1[_0x1a7b66(0x1df)]}})});if(!_0x38283b['ok']){const _0x1940cc=await _0x38283b[_0x1a7b66(0x1de)]();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x1940cc);}return _0x38283b[_0x1a7b66(0x1a8)]();}export async function uploadFile(_0x316209,_0xc53600,_0x412202){const _0x1875d7=_0x3eae,_0x2273bd={'AEknp':function(_0x188c0f,_0x1a6c80,_0x3547c3){return _0x188c0f(_0x1a6c80,_0x3547c3);},'wPzwb':'PUT'},_0x15c8cd=await _0x2273bd['AEknp'](fetch,_0x316209,{'method':_0x2273bd[_0x1875d7(0x1d1)],'headers':{'Content-Type':_0x412202,'Content-Length':_0xc53600[_0x1875d7(0x1ac)]['toString']()},'body':_0xc53600});if(!_0x15c8cd['ok']){const _0x355b79=await _0x15c8cd[_0x1875d7(0x1de)]();throw new Error(_0x1875d7(0x1b0)+_0x355b79);}}export async function uploadTrace(_0x516bcb,_0x4bff5e){const _0x248d6a=_0x3eae,_0x340c1d={'GGVkP':function(_0x3b8d95,_0x47b66b,_0x47ff38,_0x122f3b){return _0x3b8d95(_0x47b66b,_0x47ff38,_0x122f3b);},'hcaTJ':_0x248d6a(0x1ae)};return _0x340c1d['GGVkP'](uploadFile,_0x516bcb,_0x4bff5e,_0x340c1d[_0x248d6a(0x1d3)]);}export async function uploadConversation(_0x382e50,_0xeff53f){const _0x3529f8=_0x3eae,_0x4202cf={'Cgafh':_0x3529f8(0x1c8)};return uploadFile(_0x382e50,_0xeff53f,_0x4202cf['Cgafh']);}export async function uploadScreenshot(_0xb5f3d8,_0x59fe53){const _0x3ad51e=_0x3eae;return uploadFile(_0xb5f3d8,_0x59fe53,_0x3ad51e(0x1d0));}export async function uploadVideo(_0x4f0986,_0x358c07){const _0x2dafb9=_0x3eae,_0x35d125={'ToSQO':function(_0x5b3ecb,_0x31eadf,_0x4041fc,_0x4f8ebb){return _0x5b3ecb(_0x31eadf,_0x4041fc,_0x4f8ebb);}};return _0x35d125[_0x2dafb9(0x1ef)](uploadFile,_0x4f0986,_0x358c07,_0x2dafb9(0x1b3));}export function buildTraceViewerUrl(_0x24bc7f){const _0x87c880=_0x3eae,_0x45e94b={'DZqIr':function(_0x41f144,_0x769b97){return _0x41f144(_0x769b97);}},_0x5d032b=_0x45e94b[_0x87c880(0x1eb)](encodeURIComponent,_0x24bc7f);return'https://trace.playwright.dev/?trace='+_0x5d032b;}export async function getProxySessionToken(){const _0x4e37c4=_0x3eae,_0x354ff2={'GIGhe':function(_0x12c57e){return _0x12c57e();},'xZEDt':function(_0x2bc670,_0x5ca728,_0x16adda){return _0x2bc670(_0x5ca728,_0x16adda);},'UnqWa':_0x4e37c4(0x1be)},_0x1d4d1e=await getToken();if(!_0x1d4d1e)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x1e0b33=_0x354ff2['GIGhe'](getApiBaseUrl),_0x31fc41=await _0x354ff2[_0x4e37c4(0x1f8)](fetch,_0x1e0b33+'/api/v1/mcp/proxy-session',{'method':_0x354ff2['UnqWa'],'headers':{'Authorization':_0x4e37c4(0x1d4)+_0x1d4d1e}});if(!_0x31fc41['ok']){const _0x22251c=await _0x31fc41[_0x4e37c4(0x1de)]();throw new Error(_0x4e37c4(0x1f2)+_0x22251c);}const _0x58c471=await _0x31fc41[_0x4e37c4(0x1a8)]();return _0x58c471[_0x4e37c4(0x1e9)];}export function computeChecksum(_0x5c2d15){const _0x3610e4=_0x3eae,_0x4fc9cd={'bgIRk':function(_0x556227,_0x15445b){return _0x556227(_0x15445b);},'NHzSj':_0x3610e4(0x19e)};return _0x4fc9cd[_0x3610e4(0x1e7)](createHash,_0x3610e4(0x1ff))[_0x3610e4(0x1bf)](_0x5c2d15)[_0x3610e4(0x1e2)](_0x4fc9cd['NHzSj']);}export async function createVerificationStep(_0x2bd5b7,_0x4d3014){const _0x1644c4=_0x3eae,_0x31a651={'XuqSF':function(_0x2d07f1){return _0x2d07f1();},'TCEpX':function(_0x3ebc8b){return _0x3ebc8b();},'BlvIq':_0x1644c4(0x1be),'dPAtR':'application/json'},_0x4f3682=await _0x31a651['XuqSF'](getToken);if(!_0x4f3682)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x4aec55=_0x31a651[_0x1644c4(0x1d6)](getApiBaseUrl),_0x8ff03=await fetch(_0x4aec55+_0x1644c4(0x200)+_0x2bd5b7+_0x1644c4(0x1a6),{'method':_0x31a651['BlvIq'],'headers':{'Authorization':_0x1644c4(0x1d4)+_0x4f3682,'Content-Type':_0x31a651[_0x1644c4(0x1b2)]},'body':JSON['stringify'](_0x4d3014)});if(!_0x8ff03['ok']){const _0x401b6b=await _0x8ff03['text']();throw new Error(_0x1644c4(0x1c5)+_0x401b6b);}return _0x8ff03[_0x1644c4(0x1a8)]();}export async function createStepAsset(_0x2a7afc,_0x5aa0a6,_0x2952b2){const _0x302830=_0x3eae,_0x1f740f={'MrXxn':_0x302830(0x1e3),'Gwwin':_0x302830(0x19e),'JeqZg':function(_0x486382){return _0x486382();},'XWRBS':_0x302830(0x1d9),'Ksozp':_0x302830(0x1a7),'pxZRw':function(_0x45eb1e,_0x49054b,_0x156b1b){return _0x45eb1e(_0x49054b,_0x156b1b);},'jPUGN':_0x302830(0x1d7),'izBRc':function(_0x2fdb7f,_0x10316e){return _0x2fdb7f!==_0x10316e;},'TnPgT':_0x302830(0x1b9),'VHOBT':_0x302830(0x1ed)},_0x359aa1=await _0x1f740f[_0x302830(0x1cc)](getToken);if(!_0x359aa1){if(_0x1f740f[_0x302830(0x1aa)]!==_0x1f740f['Ksozp'])throw new Error(_0x1f740f[_0x302830(0x1a0)]);else throw new _0x205b76(_0x1f740f[_0x302830(0x1a0)]);}const _0x4e409a=_0x1f740f[_0x302830(0x1cc)](getApiBaseUrl),_0x3ece9c=await _0x1f740f[_0x302830(0x1c1)](fetch,_0x4e409a+'/api/v1/mcp/browser-sessions/'+_0x2a7afc+_0x302830(0x1fd)+_0x5aa0a6+_0x302830(0x1e8),{'method':_0x302830(0x1be),'headers':{'Authorization':'Bearer\x20'+_0x359aa1,'Content-Type':_0x1f740f['jPUGN']},'body':JSON[_0x302830(0x1cf)](_0x2952b2)});if(!_0x3ece9c['ok']){if(_0x1f740f['izBRc'](_0x1f740f[_0x302830(0x1fb)],_0x1f740f['VHOBT'])){const _0x947fda=await _0x3ece9c[_0x302830(0x1de)]();throw new Error(_0x302830(0x1f9)+_0x947fda);}else return _0x26d386('md5')[_0x302830(0x1bf)](_0x56706c)[_0x302830(0x1e2)](_0x1f740f[_0x302830(0x1fc)]);}return _0x3ece9c['json']();}export async function updateVerificationStep(_0x41c609,_0x5e28e9,_0x15dc03){const _0x2c1971=_0x3eae,_0x4c1ee3={'gOLJx':'GMzNQ','DEiVB':_0x2c1971(0x1e3),'gueKC':function(_0x226bbf){return _0x226bbf();},'otEQU':function(_0x3cc874,_0x17d758,_0x93d10e){return _0x3cc874(_0x17d758,_0x93d10e);},'sqYwy':_0x2c1971(0x1d7)},_0x43eac6=await getToken();if(!_0x43eac6){if(_0x4c1ee3[_0x2c1971(0x1b6)]===_0x4c1ee3[_0x2c1971(0x1b6)])throw new Error(_0x4c1ee3[_0x2c1971(0x1dc)]);else{if(_0x144ee3){const _0xe8f5da=_0x1cf8dd[_0x2c1971(0x1c4)](_0x23b2e5,arguments);return _0x355613=null,_0xe8f5da;}}}const _0x2f9bbe=_0x4c1ee3[_0x2c1971(0x1a1)](getApiBaseUrl),_0x33a832=await _0x4c1ee3['otEQU'](fetch,_0x2f9bbe+_0x2c1971(0x200)+_0x41c609+_0x2c1971(0x1fd)+_0x5e28e9,{'method':_0x2c1971(0x19f),'headers':{'Authorization':_0x2c1971(0x1d4)+_0x43eac6,'Content-Type':_0x4c1ee3[_0x2c1971(0x1ee)]},'body':JSON[_0x2c1971(0x1cf)](_0x15dc03)});if(!_0x33a832['ok']){const _0xb2bcab=await _0x33a832[_0x2c1971(0x1de)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0xb2bcab);}}export async function getBrowserSessionSteps(_0x346993){const _0x5713f0=_0x3eae,_0x546ed2={'vwCwD':_0x5713f0(0x1e3),'AkzHu':function(_0x2a8cae,_0x2cfea7,_0x1d9d6e,_0x3879c1){return _0x2a8cae(_0x2cfea7,_0x1d9d6e,_0x3879c1);},'YSdAF':_0x5713f0(0x1d0),'ExXik':_0x5713f0(0x19d),'NZHeM':function(_0x8e47e0,_0x466860,_0x4eabb3){return _0x8e47e0(_0x466860,_0x4eabb3);},'mIFVb':_0x5713f0(0x1b7),'SMNKv':function(_0x312120,_0x549967){return _0x312120!==_0x549967;},'oGccB':'VqOAy'},_0x502119=await getToken();if(!_0x502119){if(_0x546ed2[_0x5713f0(0x1af)]==='vaiyb')throw new Error(_0x546ed2[_0x5713f0(0x1bd)]);else throw new _0x50bace(_0x546ed2[_0x5713f0(0x1bd)]);}const _0x5ed15d=getApiBaseUrl(),_0x2b318f=await _0x546ed2[_0x5713f0(0x1c3)](fetch,_0x5ed15d+_0x5713f0(0x200)+_0x346993+_0x5713f0(0x1a6),{'method':_0x546ed2[_0x5713f0(0x1a3)],'headers':{'Authorization':_0x5713f0(0x1d4)+_0x502119}});if(!_0x2b318f['ok']){if(_0x546ed2[_0x5713f0(0x1c0)](_0x546ed2[_0x5713f0(0x1b8)],_0x546ed2[_0x5713f0(0x1b8)]))return _0x546ed2['AkzHu'](_0x3b8084,_0x54d637,_0x18a23c,_0x546ed2[_0x5713f0(0x1a2)]);else{const _0xb3cf7c=await _0x2b318f[_0x5713f0(0x1de)]();throw new Error('Failed\x20to\x20get\x20browser\x20session\x20steps:\x20'+_0xb3cf7c);}}return _0x2b318f[_0x5713f0(0x1a8)]();}
@@ -1 +1 @@
1
- (function(_0xb90ab9,_0x542e6b){const _0xae0d2a=_0x8e5a,_0x4fb3ee=_0xb90ab9();while(!![]){try{const _0x397e40=-parseInt(_0xae0d2a(0x19e))/0x1*(-parseInt(_0xae0d2a(0x18f))/0x2)+-parseInt(_0xae0d2a(0x199))/0x3*(-parseInt(_0xae0d2a(0x192))/0x4)+parseInt(_0xae0d2a(0x1a3))/0x5*(parseInt(_0xae0d2a(0x193))/0x6)+parseInt(_0xae0d2a(0x19b))/0x7+parseInt(_0xae0d2a(0x1a1))/0x8+parseInt(_0xae0d2a(0x1a0))/0x9*(parseInt(_0xae0d2a(0x190))/0xa)+-parseInt(_0xae0d2a(0x197))/0xb;if(_0x397e40===_0x542e6b)break;else _0x4fb3ee['push'](_0x4fb3ee['shift']());}catch(_0x38d75e){_0x4fb3ee['push'](_0x4fb3ee['shift']());}}}(_0x42ef,0x8e7cb));function _0x42ef(){const _0x3f2170=['7793928ozWDur','kpikw','30580UJkOok','SiuZc','WBYFK','47362YoataG','420uHvxor','stringify','203692XmPHIC','618WMBIaS','mizjw','WQpnh','cwd','33951170clKHGp','QUqXp','42dtevDn','cSjgo','1893493fXdgZZ','user','skills','21avreBe','settings.json','125397nnsrCA'];_0x42ef=function(){return _0x3f2170;};return _0x42ef();}import{homedir}from'os';import{join,dirname,parse}from'path';function _0x8e5a(_0x3aa927,_0x15d324){_0x3aa927=_0x3aa927-0x18d;const _0x42eff1=_0x42ef();let _0x8e5acb=_0x42eff1[_0x3aa927];return _0x8e5acb;}import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x5cd091=_0x8e5a,_0xd3110a={'mizjw':function(_0x44745e){return _0x44745e();},'TgvvK':'.claude'};return process['env']['CLAUDE_CONFIG_DIR']||join(_0xd3110a[_0x5cd091(0x194)](homedir),_0xd3110a['TgvvK']);}export function getUserSkillsDir(){const _0x1b006e=_0x8e5a;return join(getClaudeConfigDir(),_0x1b006e(0x19d));}export function getProjectRoot(){const _0x346cd7=_0x8e5a,_0x24dc50={'Hazfo':function(_0x1dd46b,_0x3f3d43){return _0x1dd46b!==_0x3f3d43;},'IDkGa':function(_0x3d421c,_0x2b4293){return _0x3d421c(_0x2b4293);},'SiuZc':function(_0x3b0c59,_0xa2c8,_0x4a1122){return _0x3b0c59(_0xa2c8,_0x4a1122);},'kpikw':'.git'};let _0x91a2a8=process['cwd']();const _0x58e380=parse(_0x91a2a8)['root'];while(_0x24dc50['Hazfo'](_0x91a2a8,_0x58e380)){if(_0x24dc50['IDkGa'](existsSync,_0x24dc50[_0x346cd7(0x18d)](join,_0x91a2a8,'.claude')))return _0x91a2a8;if(_0x24dc50['IDkGa'](existsSync,join(_0x91a2a8,_0x24dc50[_0x346cd7(0x1a2)])))return _0x91a2a8;_0x91a2a8=dirname(_0x91a2a8);}return process[_0x346cd7(0x196)]();}export function getProjectSkillsDir(){const _0xcbb638=_0x8e5a,_0x4805a5={'sYGhl':function(_0x5c1ece,_0x2382b9,_0x5b66a5,_0x3e463c){return _0x5c1ece(_0x2382b9,_0x5b66a5,_0x3e463c);},'WBYFK':function(_0x20a846){return _0x20a846();},'QUqXp':'.claude','vZlTx':_0xcbb638(0x19d)};return _0x4805a5['sYGhl'](join,_0x4805a5[_0xcbb638(0x18e)](getProjectRoot),_0x4805a5[_0xcbb638(0x198)],_0x4805a5['vZlTx']);}export function getSkillsDir(_0x48bba9){const _0xe7a992=_0x8e5a,_0x16466b={'zEUgx':function(_0x1d3439){return _0x1d3439();}};return _0x48bba9===_0xe7a992(0x19c)?getUserSkillsDir():_0x16466b['zEUgx'](getProjectSkillsDir);}export function getSettingsPath(){const _0x5f2f20=_0x8e5a,_0x68690c={'bfHmx':function(_0x1cfd12){return _0x1cfd12();}};return join(_0x68690c['bfHmx'](getClaudeConfigDir),_0x5f2f20(0x19f));}export async function loadClaudeSettings(){const _0x1d4775={'bGwFw':function(_0x59c422,_0x38e622){return _0x59c422(_0x38e622);},'MsqJw':function(_0x42d3c0,_0x4e58a3,_0x46395e){return _0x42d3c0(_0x4e58a3,_0x46395e);}},_0xb5e0f0=getSettingsPath();if(!_0x1d4775['bGwFw'](existsSync,_0xb5e0f0))return{};try{const _0x4976dd=await _0x1d4775['MsqJw'](readFile,_0xb5e0f0,'utf-8');return JSON['parse'](_0x4976dd);}catch{return{};}}export async function saveClaudeSettings(_0x327426){const _0x2af482=_0x8e5a,_0x7d291f={'qNdRn':function(_0x41d465){return _0x41d465();},'cSjgo':function(_0xb4383c){return _0xb4383c();},'SVmRI':function(_0x12c37a,_0x1ef332){return _0x12c37a(_0x1ef332);},'WQpnh':function(_0x239afd,_0x43f446,_0x3f9f04){return _0x239afd(_0x43f446,_0x3f9f04);},'lIjvP':function(_0x4ea9f4,_0x3e8503,_0x161203,_0x39412a){return _0x4ea9f4(_0x3e8503,_0x161203,_0x39412a);},'gMHhH':'utf-8'},_0x21c3fa=_0x7d291f['qNdRn'](getSettingsPath),_0xa816e7=_0x7d291f[_0x2af482(0x19a)](getClaudeConfigDir);!_0x7d291f['SVmRI'](existsSync,_0xa816e7)&&await _0x7d291f[_0x2af482(0x195)](mkdir,_0xa816e7,{'recursive':!![]}),await _0x7d291f['lIjvP'](writeFile,_0x21c3fa,JSON[_0x2af482(0x191)](_0x327426,null,0x2)+'\x0a',_0x7d291f['gMHhH']);}
1
+ (function(_0x224210,_0x406563){const _0x3f7b41=_0x49d0,_0x1fbb6d=_0x224210();while(!![]){try{const _0x39285d=parseInt(_0x3f7b41(0xa7))/0x1*(parseInt(_0x3f7b41(0xaa))/0x2)+-parseInt(_0x3f7b41(0xbc))/0x3*(parseInt(_0x3f7b41(0xc2))/0x4)+parseInt(_0x3f7b41(0xa8))/0x5*(-parseInt(_0x3f7b41(0xa6))/0x6)+parseInt(_0x3f7b41(0xb1))/0x7*(-parseInt(_0x3f7b41(0xc1))/0x8)+parseInt(_0x3f7b41(0xb8))/0x9*(-parseInt(_0x3f7b41(0xbe))/0xa)+-parseInt(_0x3f7b41(0xba))/0xb+parseInt(_0x3f7b41(0xc0))/0xc*(parseInt(_0x3f7b41(0xa4))/0xd);if(_0x39285d===_0x406563)break;else _0x1fbb6d['push'](_0x1fbb6d['shift']());}catch(_0x432764){_0x1fbb6d['push'](_0x1fbb6d['shift']());}}}(_0x2e10,0xb87b4));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x2eed05=_0x49d0,_0x3dcc8b={'rlmTu':function(_0x57aede,_0x67a32,_0x252b7d){return _0x57aede(_0x67a32,_0x252b7d);},'zeuRP':function(_0x1b1197){return _0x1b1197();},'TvFPi':_0x2eed05(0xb4)};return process[_0x2eed05(0xab)][_0x2eed05(0xb3)]||_0x3dcc8b[_0x2eed05(0xb5)](join,_0x3dcc8b[_0x2eed05(0xb0)](homedir),_0x3dcc8b['TvFPi']);}export function getUserSkillsDir(){const _0x592619=_0x49d0,_0x3fe171={'aQUJY':function(_0x504520,_0xbdb12f,_0x387dcb){return _0x504520(_0xbdb12f,_0x387dcb);},'dwBCM':function(_0x193ed0){return _0x193ed0();}};return _0x3fe171['aQUJY'](join,_0x3fe171[_0x592619(0xb6)](getClaudeConfigDir),_0x592619(0xb2));}export function getProjectRoot(){const _0x3f27e4=_0x49d0,_0x203c30={'ZQkMv':function(_0x254c7c,_0xecd524){return _0x254c7c(_0xecd524);},'RxYON':function(_0x1ef9ef,_0x282102){return _0x1ef9ef!==_0x282102;},'iXYnN':function(_0x59261a,_0x427e2f,_0x1e1c05){return _0x59261a(_0x427e2f,_0x1e1c05);},'KQEDM':_0x3f27e4(0xac)};let _0x5f1ec3=process[_0x3f27e4(0xa9)]();const _0x16b6bc=_0x203c30['ZQkMv'](parse,_0x5f1ec3)['root'];while(_0x203c30['RxYON'](_0x5f1ec3,_0x16b6bc)){if(_0x203c30[_0x3f27e4(0xae)](existsSync,join(_0x5f1ec3,_0x3f27e4(0xb4))))return _0x5f1ec3;if(existsSync(_0x203c30[_0x3f27e4(0xb7)](join,_0x5f1ec3,_0x203c30[_0x3f27e4(0xbf)])))return _0x5f1ec3;_0x5f1ec3=dirname(_0x5f1ec3);}return process['cwd']();}function _0x49d0(_0x59100e,_0x1c7d96){_0x59100e=_0x59100e-0xa4;const _0x2e10d4=_0x2e10();let _0x49d079=_0x2e10d4[_0x59100e];return _0x49d079;}export function getProjectSkillsDir(){const _0x194720=_0x49d0,_0xfa3280={'ofKQH':function(_0x43e876,_0x274255,_0x3d0cdc,_0x786faf){return _0x43e876(_0x274255,_0x3d0cdc,_0x786faf);},'ryXdg':function(_0x443d3d){return _0x443d3d();}};return _0xfa3280['ofKQH'](join,_0xfa3280[_0x194720(0xad)](getProjectRoot),'.claude',_0x194720(0xb2));}export function getSkillsDir(_0x3f9e82){const _0xf04de2=_0x49d0,_0x3d3bf7={'vDMyJ':function(_0x327c4d){return _0x327c4d();}};return _0x3f9e82===_0xf04de2(0xaf)?_0x3d3bf7['vDMyJ'](getUserSkillsDir):getProjectSkillsDir();}export function getSettingsPath(){const _0x492af8=_0x49d0,_0x293b8c={'vTmKt':function(_0x30f6b5){return _0x30f6b5();},'WyXBP':_0x492af8(0xbb)};return join(_0x293b8c['vTmKt'](getClaudeConfigDir),_0x293b8c[_0x492af8(0xa5)]);}export async function loadClaudeSettings(){const _0x50b38d=_0x49d0,_0xa550b5={'nuzbM':function(_0x57e68e){return _0x57e68e();},'aIAIG':function(_0x9d30ae,_0x28350d,_0x5286f7){return _0x9d30ae(_0x28350d,_0x5286f7);},'Wouvk':_0x50b38d(0xbd)},_0x56303d=_0xa550b5['nuzbM'](getSettingsPath);if(!existsSync(_0x56303d))return{};try{const _0x233bf4=await _0xa550b5['aIAIG'](readFile,_0x56303d,_0xa550b5['Wouvk']);return JSON['parse'](_0x233bf4);}catch{return{};}}function _0x2e10(){const _0x861c12=['dwBCM','iXYnN','9crfHME','stringify','4400583yAYOmZ','settings.json','42429IruiKK','utf-8','4093550RQHRMt','KQEDM','12aRGPXs','784xlPWER','72KuqnQP','14723527JKrSNe','WyXBP','162tQYNCg','2xAnZhY','10835swljWB','cwd','1109716zhsEYc','env','.git','ryXdg','ZQkMv','user','zeuRP','26012uHpdtO','skills','CLAUDE_CONFIG_DIR','.claude','rlmTu'];_0x2e10=function(){return _0x861c12;};return _0x2e10();}export async function saveClaudeSettings(_0x1d17ba){const _0x1bcf65=_0x49d0,_0x375eed={'AnrQJ':function(_0x458e39,_0x139a74,_0x45b8a5){return _0x458e39(_0x139a74,_0x45b8a5);},'oXkjA':function(_0x5e95c0,_0x597954,_0x26f371,_0x4b6228){return _0x5e95c0(_0x597954,_0x26f371,_0x4b6228);},'blqSa':_0x1bcf65(0xbd)},_0x10ac96=getSettingsPath(),_0x463a6e=getClaudeConfigDir();!existsSync(_0x463a6e)&&await _0x375eed['AnrQJ'](mkdir,_0x463a6e,{'recursive':!![]}),await _0x375eed['oXkjA'](writeFile,_0x10ac96,JSON[_0x1bcf65(0xb9)](_0x1d17ba,null,0x2)+'\x0a',_0x375eed['blqSa']);}
@@ -1 +1 @@
1
- (function(_0x36b826,_0x51e9d9){const _0x4e4082=_0x346e,_0x6e887e=_0x36b826();while(!![]){try{const _0xf0100b=-parseInt(_0x4e4082(0x70))/0x1*(parseInt(_0x4e4082(0x73))/0x2)+-parseInt(_0x4e4082(0x72))/0x3*(parseInt(_0x4e4082(0x75))/0x4)+parseInt(_0x4e4082(0x71))/0x5*(parseInt(_0x4e4082(0x6c))/0x6)+parseInt(_0x4e4082(0x6a))/0x7+parseInt(_0x4e4082(0x6e))/0x8+-parseInt(_0x4e4082(0x6b))/0x9*(-parseInt(_0x4e4082(0x74))/0xa)+parseInt(_0x4e4082(0x6f))/0xb;if(_0xf0100b===_0x51e9d9)break;else _0x6e887e['push'](_0x6e887e['shift']());}catch(_0x34548f){_0x6e887e['push'](_0x6e887e['shift']());}}}(_0x5196,0xcea86));import{isByokEnabled}from'./environment.js';function _0x346e(_0x15a114,_0x2c4973){_0x15a114=_0x15a114-0x6a;const _0x5196d4=_0x5196();let _0x346e66=_0x5196d4[_0x15a114];return _0x346e66;}const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};function _0x5196(){const _0xf2863c=['8ByrxJV','6017872qBqHzs','396IxOiMC','6ZaOmFA','ZTIQp','2476480npHOdZ','9192986hSgxrz','19753skdMYK','896915AFvpPL','1433622fcUDaZ','142weioEU','231890GDObjV'];_0x5196=function(){return _0xf2863c;};return _0x5196();}export function buildClaudeOverrideExtraArgs(){const _0x63c665=_0x346e,_0x57b3a2={'ZTIQp':function(_0x1518ec){return _0x1518ec();}};if(_0x57b3a2[_0x63c665(0x6d)](isByokEnabled))return{};return{'settings':JSON['stringify'](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}
1
+ (function(_0x3f4a0a,_0x338888){const _0x15e8ce=_0x32d4,_0x428210=_0x3f4a0a();while(!![]){try{const _0x4e4271=-parseInt(_0x15e8ce(0x12c))/0x1*(-parseInt(_0x15e8ce(0x128))/0x2)+-parseInt(_0x15e8ce(0x12b))/0x3*(-parseInt(_0x15e8ce(0x126))/0x4)+-parseInt(_0x15e8ce(0x125))/0x5*(parseInt(_0x15e8ce(0x12a))/0x6)+parseInt(_0x15e8ce(0x122))/0x7*(-parseInt(_0x15e8ce(0x124))/0x8)+parseInt(_0x15e8ce(0x11e))/0x9*(parseInt(_0x15e8ce(0x127))/0xa)+parseInt(_0x15e8ce(0x129))/0xb*(-parseInt(_0x15e8ce(0x121))/0xc)+parseInt(_0x15e8ce(0x123))/0xd*(parseInt(_0x15e8ce(0x11f))/0xe);if(_0x4e4271===_0x338888)break;else _0x428210['push'](_0x428210['shift']());}catch(_0x315b0a){_0x428210['push'](_0x428210['shift']());}}}(_0x19aa,0xc8136));import{isByokEnabled}from'./environment.js';const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};function _0x32d4(_0x40ae5c,_0x26e175){_0x40ae5c=_0x40ae5c-0x11e;const _0x19aae8=_0x19aa();let _0x32d4cf=_0x19aae8[_0x40ae5c];return _0x32d4cf;}export function buildClaudeOverrideExtraArgs(){const _0x14ebfa=_0x32d4;if(isByokEnabled())return{};return{'settings':JSON[_0x14ebfa(0x120)](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}function _0x19aa(){const _0x33221a=['342kMFMQy','190WVbxZV','324rkEVmA','10178hTCwOV','stringify','1474908efMhaW','154oUfbek','18551AlQguR','340440BCoyRy','5QFBvVU','21412ZMJASw','32000GYkczx','10748oasdyo','55AXniEX','2481996eqOWvy'];_0x19aa=function(){return _0x33221a;};return _0x19aa();}
@@ -1 +1 @@
1
- (function(_0x5dc2b7,_0x44f686){const _0x15ce12=_0x2bd2,_0x42303e=_0x5dc2b7();while(!![]){try{const _0x5dd67f=-parseInt(_0x15ce12(0xaf))/0x1*(-parseInt(_0x15ce12(0xaa))/0x2)+parseInt(_0x15ce12(0x9b))/0x3+parseInt(_0x15ce12(0xae))/0x4+parseInt(_0x15ce12(0xa1))/0x5*(parseInt(_0x15ce12(0x9c))/0x6)+-parseInt(_0x15ce12(0x97))/0x7+parseInt(_0x15ce12(0xa8))/0x8+-parseInt(_0x15ce12(0x90))/0x9*(parseInt(_0x15ce12(0xa2))/0xa);if(_0x5dd67f===_0x44f686)break;else _0x42303e['push'](_0x42303e['shift']());}catch(_0x3a10dd){_0x42303e['push'](_0x42303e['shift']());}}}(_0x1533,0xe2704));import{spawn}from'child_process';function _0x1533(){const _0x20015e=['1XiCkao','version','list','23751iEQRSl','pipe','message','inherit','claude','enabled','output','10490879DngTUE','plugin','marketplace','nNunk','3743673CHykkf','6oMDtpj','stdout','ufsNZ','TQzOr','data','8665690rGPhnM','8630viSWLp','success','GiWva','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','includes','QiIWH','6542488wrZwSR','match','381460mLxVWy','kwldB','captureOutput','jGxFK','2856304IrlSvf'];_0x1533=function(){return _0x20015e;};return _0x1533();}export function runClaudeCommand(_0x19d2ce,_0xf1b72e){const _0x5f02c3=_0x2bd2,_0x98f6e2={'CtZzg':function(_0x3c33df,_0x32a382){return _0x3c33df(_0x32a382);},'GiWva':_0x5f02c3(0x91),'sOvID':function(_0x2a15db,_0x19a6c4,_0x38ebcf,_0x5208c3){return _0x2a15db(_0x19a6c4,_0x38ebcf,_0x5208c3);},'ufsNZ':_0x5f02c3(0x94),'TQzOr':_0x5f02c3(0xa0),'lHrNA':'close','kwldB':'error'};return new Promise(_0x4dd2f1=>{const _0x92ae72=_0x5f02c3,_0x3d5a8b={'QiIWH':function(_0x15a301,_0xcce5a){return _0x15a301(_0xcce5a);}},_0xe90cea=_0xf1b72e?.[_0x92ae72(0xac)]?_0x98f6e2[_0x92ae72(0xa4)]:_0x92ae72(0x93),_0x7b4f07=_0x98f6e2['sOvID'](spawn,_0x98f6e2[_0x92ae72(0x9e)],_0x19d2ce,{'stdio':_0xe90cea});let _0x18a3b0='';_0xf1b72e?.[_0x92ae72(0xac)]&&_0x7b4f07['stdout']&&_0x7b4f07[_0x92ae72(0x9d)]['on'](_0x98f6e2[_0x92ae72(0x9f)],_0x15c32e=>{_0x18a3b0+=_0x15c32e['toString']();}),_0xf1b72e?.['captureOutput']&&_0x7b4f07['stderr']&&_0x7b4f07['stderr']['on'](_0x92ae72(0xa0),_0x3c4102=>{_0x18a3b0+=_0x3c4102['toString']();}),_0x7b4f07['on'](_0x98f6e2['lHrNA'],_0x50a197=>{const _0x413370=_0x92ae72;_0x50a197===0x0?_0x3d5a8b[_0x413370(0xa7)](_0x4dd2f1,{'success':!![],'output':_0x18a3b0}):_0x4dd2f1({'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x50a197,'output':_0x18a3b0});}),_0x7b4f07['on'](_0x98f6e2[_0x92ae72(0xab)],_0x35849e=>{const _0x22b341=_0x92ae72;_0x98f6e2['CtZzg'](_0x4dd2f1,{'success':![],'error':_0x35849e[_0x22b341(0x92)]});});});}export async function isMarketplaceAdded(_0x18ffc0){const _0xb3a83e=_0x2bd2,_0x35da99={'kIZRl':function(_0x227280,_0x3209db,_0x38c176){return _0x227280(_0x3209db,_0x38c176);}},_0x149826=await _0x35da99['kIZRl'](runClaudeCommand,[_0xb3a83e(0x98),_0xb3a83e(0x99),_0xb3a83e(0x8f)],{'captureOutput':!![]});if(!_0x149826['success']||!_0x149826[_0xb3a83e(0x96)])return![];return _0x149826[_0xb3a83e(0x96)]['includes'](_0x18ffc0);}export async function isPluginInstalled(_0x72fbf3){const _0x7f9a57=_0x2bd2,_0xb05261={'nNunk':function(_0x228055,_0x883c2d,_0x20cc29){return _0x228055(_0x883c2d,_0x20cc29);}},_0x8bcf79=await _0xb05261[_0x7f9a57(0x9a)](runClaudeCommand,['plugin','list'],{'captureOutput':!![]});if(!_0x8bcf79['success']||!_0x8bcf79['output'])return![];return _0x8bcf79[_0x7f9a57(0x96)][_0x7f9a57(0xa6)](_0x72fbf3);}function _0x2bd2(_0x2f7187,_0x359597){_0x2f7187=_0x2f7187-0x8e;const _0x1533eb=_0x1533();let _0x2bd2bc=_0x1533eb[_0x2f7187];return _0x2bd2bc;}export async function getPluginInfo(_0x4c51b7){const _0x48637c=_0x2bd2,_0x393e4e={'jGxFK':'plugin','hfRWA':'list'},_0x2ef6ea=await runClaudeCommand([_0x393e4e[_0x48637c(0xad)],_0x393e4e['hfRWA']],{'captureOutput':!![]});if(!_0x2ef6ea[_0x48637c(0xa3)]||!_0x2ef6ea[_0x48637c(0x96)])return null;if(!_0x2ef6ea[_0x48637c(0x96)]['includes'](_0x4c51b7))return null;const _0xb95f88={'name':_0x4c51b7},_0x2d826d=_0x2ef6ea['output'][_0x48637c(0xa9)](new RegExp(_0x4c51b7+_0x48637c(0xa5),'i'));_0x2d826d&&(_0xb95f88['scope']=_0x2d826d[0x1]['toLowerCase']());const _0x3a269f=_0x2ef6ea['output']['match'](new RegExp(_0x4c51b7+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x3a269f&&(_0xb95f88[_0x48637c(0x8e)]=_0x3a269f[0x1]);const _0x3a0450=_0x2ef6ea[_0x48637c(0x96)]['match'](new RegExp(_0x4c51b7+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0x3a0450&&(_0xb95f88[_0x48637c(0x95)]=_0x3a0450[0x1]['toLowerCase']()===_0x48637c(0x95)),_0xb95f88;}
1
+ (function(_0x54055f,_0xfdc8a2){const _0x13cee0=_0x177a,_0x1b461e=_0x54055f();while(!![]){try{const _0x5e2764=-parseInt(_0x13cee0(0xe4))/0x1+parseInt(_0x13cee0(0xd9))/0x2*(-parseInt(_0x13cee0(0xf8))/0x3)+-parseInt(_0x13cee0(0xe8))/0x4*(parseInt(_0x13cee0(0xf9))/0x5)+parseInt(_0x13cee0(0xf2))/0x6*(parseInt(_0x13cee0(0xe1))/0x7)+-parseInt(_0x13cee0(0xe0))/0x8*(-parseInt(_0x13cee0(0xda))/0x9)+parseInt(_0x13cee0(0xf3))/0xa+parseInt(_0x13cee0(0xe3))/0xb;if(_0x5e2764===_0xfdc8a2)break;else _0x1b461e['push'](_0x1b461e['shift']());}catch(_0xed283){_0x1b461e['push'](_0x1b461e['shift']());}}}(_0x409f,0x477ae));import{spawn}from'child_process';function _0x177a(_0x20bd26,_0x37428){_0x20bd26=_0x20bd26-0xd9;const _0x409fc2=_0x409f();let _0x177a73=_0x409fc2[_0x20bd26];return _0x177a73;}export function runClaudeCommand(_0x45aab5,_0xe331c0){const _0x25ad50={'Bbfvx':function(_0x149d6a,_0x542d1f){return _0x149d6a(_0x542d1f);},'RTZMz':'inherit','VOekS':function(_0x58328b,_0x4c66b3,_0x2eb6d7,_0x476963){return _0x58328b(_0x4c66b3,_0x2eb6d7,_0x476963);},'DelUU':'data','GHqhp':'close'};return new Promise(_0x31b596=>{const _0x3c5d32=_0x177a,_0x29f2e5={'sWSBt':function(_0x146191,_0xa75ee0){const _0x5c8f6d=_0x177a;return _0x25ad50[_0x5c8f6d(0xee)](_0x146191,_0xa75ee0);}},_0x406ce3=_0xe331c0?.[_0x3c5d32(0xf5)]?_0x3c5d32(0xe7):_0x25ad50[_0x3c5d32(0xe6)],_0x2134d0=_0x25ad50['VOekS'](spawn,'claude',_0x45aab5,{'stdio':_0x406ce3});let _0xd420b5='';_0xe331c0?.['captureOutput']&&_0x2134d0['stdout']&&_0x2134d0[_0x3c5d32(0xf0)]['on'](_0x25ad50['DelUU'],_0x39271b=>{_0xd420b5+=_0x39271b['toString']();}),_0xe331c0?.['captureOutput']&&_0x2134d0['stderr']&&_0x2134d0[_0x3c5d32(0xea)]['on'](_0x25ad50['DelUU'],_0x4c51a2=>{_0xd420b5+=_0x4c51a2['toString']();}),_0x2134d0['on'](_0x25ad50[_0x3c5d32(0xf7)],_0x524502=>{const _0x2a5905=_0x3c5d32;_0x524502===0x0?_0x29f2e5[_0x2a5905(0xe2)](_0x31b596,{'success':!![],'output':_0xd420b5}):_0x29f2e5[_0x2a5905(0xe2)](_0x31b596,{'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x524502,'output':_0xd420b5});}),_0x2134d0['on'](_0x3c5d32(0xfc),_0x56f8c5=>{const _0xe25b4=_0x3c5d32;_0x29f2e5['sWSBt'](_0x31b596,{'success':![],'error':_0x56f8c5[_0xe25b4(0xdb)]});});});}export async function isMarketplaceAdded(_0x3c1aad){const _0x569731=_0x177a,_0x3e1091={'bsUeF':_0x569731(0xf1),'PtSwh':_0x569731(0xdc)},_0x31917d=await runClaudeCommand([_0x3e1091[_0x569731(0xde)],'marketplace',_0x3e1091[_0x569731(0xec)]],{'captureOutput':!![]});if(!_0x31917d[_0x569731(0xf4)]||!_0x31917d['output'])return![];return _0x31917d['output'][_0x569731(0xed)](_0x3c1aad);}export async function isPluginInstalled(_0x49e5e8){const _0x169b1f=_0x177a,_0xb8498d={'Jlrsf':_0x169b1f(0xf1)},_0x132dd5=await runClaudeCommand([_0xb8498d[_0x169b1f(0xe5)],'list'],{'captureOutput':!![]});if(!_0x132dd5[_0x169b1f(0xf4)]||!_0x132dd5[_0x169b1f(0xfb)])return![];return _0x132dd5['output'][_0x169b1f(0xed)](_0x49e5e8);}export async function getPluginInfo(_0x59499d){const _0x2dbd60=_0x177a,_0x4cdb23={'PmsLs':function(_0x4eb0fa,_0x270bd1,_0xd693e){return _0x4eb0fa(_0x270bd1,_0xd693e);},'MclWR':_0x2dbd60(0xf1),'wmGJf':'list'},_0x4a09af=await _0x4cdb23['PmsLs'](runClaudeCommand,[_0x4cdb23[_0x2dbd60(0xdd)],_0x4cdb23['wmGJf']],{'captureOutput':!![]});if(!_0x4a09af[_0x2dbd60(0xf4)]||!_0x4a09af['output'])return null;if(!_0x4a09af[_0x2dbd60(0xfb)]['includes'](_0x59499d))return null;const _0x322951={'name':_0x59499d},_0x5dbe55=_0x4a09af['output'][_0x2dbd60(0xfa)](new RegExp(_0x59499d+_0x2dbd60(0xeb),'i'));_0x5dbe55&&(_0x322951[_0x2dbd60(0xf6)]=_0x5dbe55[0x1]['toLowerCase']());const _0x451d56=_0x4a09af[_0x2dbd60(0xfb)]['match'](new RegExp(_0x59499d+_0x2dbd60(0xef),'i'));_0x451d56&&(_0x322951[_0x2dbd60(0xe9)]=_0x451d56[0x1]);const _0x420d83=_0x4a09af['output'][_0x2dbd60(0xfa)](new RegExp(_0x59499d+_0x2dbd60(0xdf),'i'));return _0x420d83&&(_0x322951['enabled']=_0x420d83[0x1]['toLowerCase']()==='enabled'),_0x322951;}function _0x409f(){const _0x5a9e75=['captureOutput','scope','GHqhp','15MiJsRb','7085MIYdGo','match','output','error','63238SRIOgD','9EMQkzv','message','list','MclWR','bsUeF','[\x5cs\x5cS]*?(enabled|disabled)','230032lRpIfT','966VcKXBo','sWSBt','7922915vhsdXI','574056hlhLJP','Jlrsf','RTZMz','pipe','76TCBGSi','version','stderr','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','PtSwh','includes','Bbfvx','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','stdout','plugin','9684pajSZD','801050XlegYf','success'];_0x409f=function(){return _0x5a9e75;};return _0x409f();}
@@ -1 +1 @@
1
- const _0x441d4c=_0x2681;(function(_0x37b8e7,_0x23880c){const _0x3d2ad1=_0x2681,_0x1e8ded=_0x37b8e7();while(!![]){try{const _0x9f611f=parseInt(_0x3d2ad1(0x194))/0x1*(-parseInt(_0x3d2ad1(0x198))/0x2)+parseInt(_0x3d2ad1(0x18f))/0x3+parseInt(_0x3d2ad1(0x18e))/0x4+parseInt(_0x3d2ad1(0x19d))/0x5+parseInt(_0x3d2ad1(0x19c))/0x6+-parseInt(_0x3d2ad1(0x192))/0x7*(parseInt(_0x3d2ad1(0x18d))/0x8)+-parseInt(_0x3d2ad1(0x193))/0x9*(parseInt(_0x3d2ad1(0x18c))/0xa);if(_0x9f611f===_0x23880c)break;else _0x1e8ded['push'](_0x1e8ded['shift']());}catch(_0x381273){_0x1e8ded['push'](_0x1e8ded['shift']());}}}(_0x14c8,0x5e0ba));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';function _0x2681(_0x1c9f16,_0x1fc9e2){_0x1c9f16=_0x1c9f16-0x18a;const _0x14c87d=_0x14c8();let _0x2681c7=_0x14c87d[_0x1c9f16];return _0x2681c7;}const ALGORITHM=_0x441d4c(0x190),SALT=_0x441d4c(0x19e),KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;function _0x14c8(){const _0x4c3fc1=['sha256','QgCUG','2EztIum','concat','final','subarray','4340304DfHQTg','873960RkPzKQ','ranger-auth-encryption','uXIhF','getAuthTag','2888770rOBKrR','24qXOQjk','2617536Tohiak','1731429rPzyNK','aes-256-gcm','XJTuJ','684761iFPwee','27ZLXbFN','584393ebrYNZ','setAuthTag'];_0x14c8=function(){return _0x4c3fc1;};return _0x14c8();}export function deriveKey(_0xbf52d2){const _0x579046=_0x441d4c;return pbkdf2Sync(_0xbf52d2,SALT,0x186a0,KEY_LENGTH,_0x579046(0x196));}export function encrypt(_0x39f652,_0x1df023){const _0x3fbb7c=_0x441d4c,_0x28027b={'yhzpq':function(_0x2cb2cc,_0x1e4e63){return _0x2cb2cc(_0x1e4e63);},'QgCUG':function(_0x8ab8ae,_0x22cca4,_0x227862,_0x337408){return _0x8ab8ae(_0x22cca4,_0x227862,_0x337408);},'YWafI':'utf8'},_0x20c791=_0x28027b['yhzpq'](deriveKey,_0x1df023),_0x11ec4a=randomBytes(IV_LENGTH),_0x330883=_0x28027b[_0x3fbb7c(0x197)](createCipheriv,ALGORITHM,_0x20c791,_0x11ec4a),_0x3c398d=Buffer['concat']([_0x330883['update'](_0x39f652,_0x28027b['YWafI']),_0x330883['final']()]),_0x4adf78=_0x330883[_0x3fbb7c(0x18b)]();return Buffer[_0x3fbb7c(0x199)]([_0x11ec4a,_0x4adf78,_0x3c398d]);}export function decrypt(_0x35ccc9,_0x56a7c7){const _0x456393=_0x441d4c,_0x4d37d7={'fpOod':function(_0x2ca731,_0x328d42){return _0x2ca731(_0x328d42);},'uXIhF':function(_0x11e900,_0x4f7cb6){return _0x11e900+_0x4f7cb6;},'XJTuJ':function(_0x154f4a,_0x1bed98,_0x414502,_0x185372){return _0x154f4a(_0x1bed98,_0x414502,_0x185372);},'FawAe':function(_0x5182b9,_0x474723){return _0x5182b9+_0x474723;}},_0x46672d=_0x4d37d7['fpOod'](deriveKey,_0x56a7c7),_0x1651e8=_0x35ccc9['subarray'](0x0,IV_LENGTH),_0x32d78f=_0x35ccc9[_0x456393(0x19b)](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x3595c8=_0x35ccc9['subarray'](_0x4d37d7[_0x456393(0x18a)](IV_LENGTH,TAG_LENGTH)),_0x28642c=_0x4d37d7[_0x456393(0x191)](createDecipheriv,ALGORITHM,_0x46672d,_0x1651e8);return _0x28642c[_0x456393(0x195)](_0x32d78f),_0x4d37d7['FawAe'](_0x28642c['update'](_0x3595c8),_0x28642c[_0x456393(0x19a)]('utf8'));}
1
+ function _0x115a(_0x5ca5d2,_0x5d2993){_0x5ca5d2=_0x5ca5d2-0x89;const _0x2484b9=_0x2484();let _0x115abb=_0x2484b9[_0x5ca5d2];return _0x115abb;}function _0x2484(){const _0x272661=['57744cdGsqL','5PRHMdH','subarray','final','getAuthTag','1581876OjQPlt','240MHtMgF','36bZeYCw','ranger-auth-encryption','8rFmRlY','467814mqDGuS','update','setAuthTag','4836BdfwmD','598487PsUXLG','728HgSbYA','concat','sha256','1391880RIshbP','4448631eewfHU','aes-256-gcm'];_0x2484=function(){return _0x272661;};return _0x2484();}const _0x75f1bb=_0x115a;(function(_0x32dd7a,_0x2c731e){const _0x874cbd=_0x115a,_0x2c8b67=_0x32dd7a();while(!![]){try{const _0x5afdb5=parseInt(_0x874cbd(0x8e))/0x1+-parseInt(_0x874cbd(0x8f))/0x2*(parseInt(_0x874cbd(0x8d))/0x3)+-parseInt(_0x874cbd(0x9a))/0x4*(parseInt(_0x874cbd(0x96))/0x5)+-parseInt(_0x874cbd(0x8a))/0x6+parseInt(_0x874cbd(0x92))/0x7*(-parseInt(_0x874cbd(0x89))/0x8)+parseInt(_0x874cbd(0x95))/0x9*(-parseInt(_0x874cbd(0x9b))/0xa)+-parseInt(_0x874cbd(0x93))/0xb*(-parseInt(_0x874cbd(0x9c))/0xc);if(_0x5afdb5===_0x2c731e)break;else _0x2c8b67['push'](_0x2c8b67['shift']());}catch(_0x98d30e){_0x2c8b67['push'](_0x2c8b67['shift']());}}}(_0x2484,0x61580));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x75f1bb(0x94),SALT=_0x75f1bb(0x9d),KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x4990c9){const _0x5a5e5b=_0x75f1bb,_0x54c25d={'dIKFz':_0x5a5e5b(0x91)};return pbkdf2Sync(_0x4990c9,SALT,0x186a0,KEY_LENGTH,_0x54c25d['dIKFz']);}export function encrypt(_0x4dfa4a,_0x2d4ce3){const _0x14a4aa=_0x75f1bb,_0x12cc61={'qAAVL':function(_0x8d302c,_0x5235a3){return _0x8d302c(_0x5235a3);}},_0x521529=_0x12cc61['qAAVL'](deriveKey,_0x2d4ce3),_0x144583=randomBytes(IV_LENGTH),_0x3f43d1=createCipheriv(ALGORITHM,_0x521529,_0x144583),_0x1fb901=Buffer['concat']([_0x3f43d1[_0x14a4aa(0x8b)](_0x4dfa4a,'utf8'),_0x3f43d1['final']()]),_0x14a011=_0x3f43d1[_0x14a4aa(0x99)]();return Buffer[_0x14a4aa(0x90)]([_0x144583,_0x14a011,_0x1fb901]);}export function decrypt(_0xf84a89,_0x33737a){const _0x407454=_0x75f1bb,_0x438abf={'reFKA':function(_0x42acac,_0x29d664){return _0x42acac(_0x29d664);}},_0x55fe15=_0x438abf['reFKA'](deriveKey,_0x33737a),_0x544cfe=_0xf84a89['subarray'](0x0,IV_LENGTH),_0x9643ac=_0xf84a89['subarray'](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x4fe67e=_0xf84a89[_0x407454(0x97)](IV_LENGTH+TAG_LENGTH),_0x2842d3=createDecipheriv(ALGORITHM,_0x55fe15,_0x544cfe);return _0x2842d3[_0x407454(0x8c)](_0x9643ac),_0x2842d3['update'](_0x4fe67e)+_0x2842d3[_0x407454(0x98)]('utf8');}
@@ -1 +1 @@
1
- const _0x1cd890=_0x1e0c;(function(_0x730fbb,_0x1510de){const _0x37037f=_0x1e0c,_0xc8d788=_0x730fbb();while(!![]){try{const _0x5ef985=parseInt(_0x37037f(0x1f1))/0x1*(-parseInt(_0x37037f(0x1f6))/0x2)+-parseInt(_0x37037f(0x215))/0x3+-parseInt(_0x37037f(0x1fd))/0x4*(-parseInt(_0x37037f(0x1ff))/0x5)+-parseInt(_0x37037f(0x1f8))/0x6*(-parseInt(_0x37037f(0x205))/0x7)+parseInt(_0x37037f(0x217))/0x8+-parseInt(_0x37037f(0x20d))/0x9+parseInt(_0x37037f(0x203))/0xa*(parseInt(_0x37037f(0x1fa))/0xb);if(_0x5ef985===_0x1510de)break;else _0xc8d788['push'](_0xc8d788['shift']());}catch(_0x6fbaf5){_0xc8d788['push'](_0xc8d788['shift']());}}}(_0x43b9,0xc3eea));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';function _0x1e0c(_0x43dacb,_0x9f3c16){_0x43dacb=_0x43dacb-0x1f0;const _0x43b9a7=_0x43b9();let _0x1e0cd7=_0x43b9a7[_0x43dacb];return _0x1e0cd7;}const SENSITIVE_FLAGS=new Set(['--token','-t','--secret',_0x1cd890(0x222),'--apikey','--key',_0x1cd890(0x20c),'--pass','--auth','--authorization',_0x1cd890(0x211),_0x1cd890(0x202),'--credentials']),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x43f1ed){const _0x198306=_0x1cd890;return TOKEN_PATTERNS[_0x198306(0x1f2)](_0x5884c7=>_0x5884c7[_0x198306(0x1fe)](_0x43f1ed));}export function sanitizeArgs(_0x262d24){const _0xd54a8=_0x1cd890,_0x26488d={'ltRyb':function(_0x3e9c5c,_0x50e8b9){return _0x3e9c5c<_0x50e8b9;},'EcxzE':'[REDACTED]','uIAtC':function(_0x32b227,_0x3b28eb){return _0x32b227!==_0x3b28eb;},'UjRbX':function(_0x4bea92,_0x3283ae){return _0x4bea92(_0x3283ae);}},_0x1b9572=[];let _0x44009d=![];for(let _0x2449e6=0x0;_0x26488d[_0xd54a8(0x1f9)](_0x2449e6,_0x262d24[_0xd54a8(0x214)]);_0x2449e6++){const _0x2cd0cc=_0x262d24[_0x2449e6];if(_0x44009d){_0x1b9572['push'](_0x26488d['EcxzE']),_0x44009d=![];continue;}if(_0x2cd0cc[_0xd54a8(0x201)]('--')||_0x2cd0cc['startsWith']('-')){const _0x5558ab=_0x2cd0cc[_0xd54a8(0x1f3)]('=');if(_0x26488d[_0xd54a8(0x21d)](_0x5558ab,-0x1)){const _0x1ce500=_0x2cd0cc['slice'](0x0,_0x5558ab)['toLowerCase']();if(SENSITIVE_FLAGS['has'](_0x1ce500)){_0x1b9572[_0xd54a8(0x21c)](_0x2cd0cc[_0xd54a8(0x21e)](0x0,_0x5558ab)+_0xd54a8(0x21f));continue;}}else{const _0x711e9d=_0x2cd0cc[_0xd54a8(0x209)]();SENSITIVE_FLAGS[_0xd54a8(0x20f)](_0x711e9d)&&(_0x44009d=!![]);}_0x1b9572[_0xd54a8(0x21c)](_0x2cd0cc);}else _0x26488d['UjRbX'](looksLikeToken,_0x2cd0cc)?_0x1b9572['push']('[REDACTED]'):_0x1b9572[_0xd54a8(0x21c)](_0x2cd0cc);}return _0x1b9572[_0xd54a8(0x1f4)]('\x20');}function _0x43b9(){const _0x5adbdc=['1256772rPiGQm','test','5eHYurE','has_token','startsWith','--cookie','1206990KFDqYr','errorType','7JNfgbX','[desire-path]\x20Failed\x20to\x20send:\x20','catch','application/json','toLowerCase','GunGS','POST','--password','8085465IdHfaD','unknown_argument','has','yyawr','--header','sessionId','Missing\x20required\x20argument','length','2564811WrGJrQ','/api/v1/mcp/desire-path-logs','2424472GDcEoD','[desire-path]\x20Payload:\x20','stdout','oUbmi','includes','push','uIAtC','slice','=[REDACTED]','unknown_command','Authorization','--api-key','runtime_error','invalid_option_value','Unknown\x20command','BMdIo','21OQdJOp','some','indexOf','join','env','33164FXQVuc','XXjpC','4306458QJRYUV','ltRyb','143oQMHAJ','stringify','tPsdE'];_0x43b9=function(){return _0x5adbdc;};return _0x43b9();}export async function logDesirePath(_0x3d6289){const _0x585ae0=_0x1cd890,_0x4f55ed={'BMdIo':function(_0x576a27){return _0x576a27();},'ezTQc':function(_0x4a7fff){return _0x4a7fff();},'brZAP':'no_token','MlKEm':_0x585ae0(0x20b)};try{const _0x4ee9cb=await _0x4f55ed['BMdIo'](getToken)[_0x585ae0(0x207)](()=>null),_0xaf38ce=_0x4f55ed[_0x585ae0(0x1f0)](getApiBaseUrl),_0x4f2f01=_0x4f55ed['ezTQc'](getCurrentVersion),_0x343c93=_0x4ee9cb?_0x585ae0(0x200):_0x4f55ed['brZAP'],_0x277a62={..._0x3d6289['metadata'],'authStatus':_0x343c93,'isTty':process[_0x585ae0(0x219)]['isTTY']??![]},_0x3971d1={'Content-Type':_0x585ae0(0x208)};_0x4ee9cb&&(_0x3971d1[_0x585ae0(0x221)]='Bearer\x20'+_0x4ee9cb);const _0x46e309={'rawCommand':_0x3d6289['rawCommand'],'errorMessage':_0x3d6289['errorMessage'],'errorType':_0x3d6289[_0x585ae0(0x204)],'featureId':_0x3d6289['featureId'],'sessionId':_0x3d6289[_0x585ae0(0x212)],'metadata':_0x277a62,'cliVersion':_0x4f2f01};process[_0x585ae0(0x1f5)]['DEBUG']&&(console['error']('[desire-path]\x20Sending\x20log\x20to\x20'+_0xaf38ce+'/api/v1/mcp/desire-path-logs'),console['error'](_0x585ae0(0x218)+JSON['stringify'](_0x46e309,null,0x2))),await fetch(_0xaf38ce+_0x585ae0(0x216),{'method':_0x4f55ed['MlKEm'],'headers':_0x3971d1,'body':JSON[_0x585ae0(0x1fb)](_0x46e309)});}catch(_0x1ac61f){process['env']['DEBUG']&&console['error'](_0x585ae0(0x206)+_0x1ac61f);}}export function getErrorType(_0x5ecd9e,_0x3ffef8){const _0x57d7b1=_0x1cd890,_0x196818={'aVCtt':'unknown','oUbmi':_0x57d7b1(0x225),'miazI':'Unknown\x20argument','yyawr':'Not\x20enough\x20non-option\x20arguments','XXjpC':'missing_required_argument','tPsdE':'Invalid\x20values','SOewS':_0x57d7b1(0x224),'GunGS':'missing_option'};if(_0x3ffef8)return _0x57d7b1(0x223);if(!_0x5ecd9e)return _0x196818['aVCtt'];if(_0x5ecd9e['includes'](_0x196818[_0x57d7b1(0x21a)]))return _0x57d7b1(0x220);if(_0x5ecd9e['includes'](_0x196818['miazI']))return _0x57d7b1(0x20e);if(_0x5ecd9e[_0x57d7b1(0x21b)](_0x196818[_0x57d7b1(0x210)]))return _0x196818[_0x57d7b1(0x1f7)];if(_0x5ecd9e['includes'](_0x196818[_0x57d7b1(0x1fc)]))return _0x196818['SOewS'];if(_0x5ecd9e['includes'](_0x57d7b1(0x213)))return _0x196818[_0x57d7b1(0x20a)];return'syntax_error';}
1
+ const _0xfdae65=_0x2e00;(function(_0x208b29,_0x1d4822){const _0x2446a2=_0x2e00,_0x3a14b2=_0x208b29();while(!![]){try{const _0x958516=parseInt(_0x2446a2(0x20a))/0x1+parseInt(_0x2446a2(0x20c))/0x2+-parseInt(_0x2446a2(0x210))/0x3+parseInt(_0x2446a2(0x1f3))/0x4*(-parseInt(_0x2446a2(0x1fb))/0x5)+-parseInt(_0x2446a2(0x20b))/0x6*(-parseInt(_0x2446a2(0x1ec))/0x7)+parseInt(_0x2446a2(0x207))/0x8+-parseInt(_0x2446a2(0x20e))/0x9*(parseInt(_0x2446a2(0x1db))/0xa);if(_0x958516===_0x1d4822)break;else _0x3a14b2['push'](_0x3a14b2['shift']());}catch(_0x36ada7){_0x3a14b2['push'](_0x3a14b2['shift']());}}}(_0x33e9,0x4adbc));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t','--secret',_0xfdae65(0x209),'--apikey',_0xfdae65(0x1f2),'--password','--pass','--auth','--authorization',_0xfdae65(0x200),_0xfdae65(0x1ff),_0xfdae65(0x1fe)]),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function _0x33e9(){const _0x3078b3=['803126TlsMux','IhqvF','954918rUWdHT','Authorization','200988gPJuvG','errorType','10YuWDIy','[desire-path]\x20Failed\x20to\x20send:\x20','Unknown\x20argument','ByBiK','isTTY','some','Unknown\x20command','DEBUG','push','=[REDACTED]','[REDACTED]','[desire-path]\x20Sending\x20log\x20to\x20','unknown_argument','JCiIX','Nivkx','slice','runtime_error','35vOFIMi','missing_option','startsWith','ivBqR','indexOf','env','--key','4bZYoTk','POST','test','XDBwq','unknown','toLowerCase','includes','/api/v1/mcp/desire-path-logs','2392185FnlinS','IjPzE','LbzaV','--credentials','--cookie','--header','stringify','error','metadata','catch','Invalid\x20values','[desire-path]\x20Payload:\x20','353688wPDKJx','missing_required_argument','--api-key','280131xFuZRK','278700TVCrqL'];_0x33e9=function(){return _0x3078b3;};return _0x33e9();}function looksLikeToken(_0x48a6ab){const _0x3290e1=_0xfdae65;return TOKEN_PATTERNS[_0x3290e1(0x1e0)](_0x33f0a1=>_0x33f0a1[_0x3290e1(0x1f5)](_0x48a6ab));}export function sanitizeArgs(_0x22bb23){const _0x384121=_0xfdae65,_0x33a99b={'ByBiK':_0x384121(0x1e5),'hzEYk':function(_0x57ed51,_0x5a58be){return _0x57ed51!==_0x5a58be;}},_0x285180=[];let _0x8f0a68=![];for(let _0xf0572a=0x0;_0xf0572a<_0x22bb23['length'];_0xf0572a++){const _0x379f4b=_0x22bb23[_0xf0572a];if(_0x8f0a68){_0x285180['push'](_0x33a99b[_0x384121(0x1de)]),_0x8f0a68=![];continue;}if(_0x379f4b[_0x384121(0x1ee)]('--')||_0x379f4b['startsWith']('-')){const _0x5af56a=_0x379f4b[_0x384121(0x1f0)]('=');if(_0x33a99b['hzEYk'](_0x5af56a,-0x1)){const _0x273762=_0x379f4b['slice'](0x0,_0x5af56a)['toLowerCase']();if(SENSITIVE_FLAGS['has'](_0x273762)){_0x285180['push'](_0x379f4b[_0x384121(0x1ea)](0x0,_0x5af56a)+_0x384121(0x1e4));continue;}}else{const _0x49f6b2=_0x379f4b[_0x384121(0x1f8)]();SENSITIVE_FLAGS['has'](_0x49f6b2)&&(_0x8f0a68=!![]);}_0x285180[_0x384121(0x1e3)](_0x379f4b);}else looksLikeToken(_0x379f4b)?_0x285180['push'](_0x384121(0x1e5)):_0x285180[_0x384121(0x1e3)](_0x379f4b);}return _0x285180['join']('\x20');}export async function logDesirePath(_0x134025){const _0x5961ac=_0xfdae65,_0x3590db={'LbzaV':function(_0x415c8a){return _0x415c8a();},'EyyFZ':'has_token','ivBqR':'no_token','Zyvkf':'application/json','EPeCO':_0x5961ac(0x20f),'sXnVK':function(_0x1ead61,_0x4e0b4b,_0x27244b){return _0x1ead61(_0x4e0b4b,_0x27244b);},'JCiIX':_0x5961ac(0x1f4)};try{const _0x4132a9=await getToken()[_0x5961ac(0x204)](()=>null),_0x554c64=getApiBaseUrl(),_0x408011=_0x3590db[_0x5961ac(0x1fd)](getCurrentVersion),_0x29ab78=_0x4132a9?_0x3590db['EyyFZ']:_0x3590db[_0x5961ac(0x1ef)],_0x2af11c={..._0x134025[_0x5961ac(0x203)],'authStatus':_0x29ab78,'isTty':process['stdout'][_0x5961ac(0x1df)]??![]},_0x201426={'Content-Type':_0x3590db['Zyvkf']};_0x4132a9&&(_0x201426[_0x3590db['EPeCO']]='Bearer\x20'+_0x4132a9);const _0xabc1e2={'rawCommand':_0x134025['rawCommand'],'errorMessage':_0x134025['errorMessage'],'errorType':_0x134025[_0x5961ac(0x1da)],'featureId':_0x134025['featureId'],'sessionId':_0x134025['sessionId'],'metadata':_0x2af11c,'cliVersion':_0x408011};process[_0x5961ac(0x1f1)][_0x5961ac(0x1e2)]&&(console['error'](_0x5961ac(0x1e6)+_0x554c64+'/api/v1/mcp/desire-path-logs'),console['error'](_0x5961ac(0x206)+JSON[_0x5961ac(0x201)](_0xabc1e2,null,0x2))),await _0x3590db['sXnVK'](fetch,_0x554c64+_0x5961ac(0x1fa),{'method':_0x3590db[_0x5961ac(0x1e8)],'headers':_0x201426,'body':JSON['stringify'](_0xabc1e2)});}catch(_0x180c3a){process[_0x5961ac(0x1f1)][_0x5961ac(0x1e2)]&&console[_0x5961ac(0x202)](_0x5961ac(0x1dc)+_0x180c3a);}}function _0x2e00(_0x5c31fc,_0x29409f){_0x5c31fc=_0x5c31fc-0x1da;const _0x33e9ca=_0x33e9();let _0x2e0044=_0x33e9ca[_0x5c31fc];return _0x2e0044;}export function getErrorType(_0x2d9f41,_0x121498){const _0x27af64=_0xfdae65,_0x52429d={'IhqvF':_0x27af64(0x1eb),'Nivkx':_0x27af64(0x1f7),'IftdS':_0x27af64(0x1e1),'UCRbG':_0x27af64(0x208),'IjPzE':_0x27af64(0x205),'EejiZ':'invalid_option_value','XDBwq':'syntax_error'};if(_0x121498)return _0x52429d[_0x27af64(0x20d)];if(!_0x2d9f41)return _0x52429d[_0x27af64(0x1e9)];if(_0x2d9f41[_0x27af64(0x1f9)](_0x52429d['IftdS']))return'unknown_command';if(_0x2d9f41['includes'](_0x27af64(0x1dd)))return _0x27af64(0x1e7);if(_0x2d9f41['includes']('Not\x20enough\x20non-option\x20arguments'))return _0x52429d['UCRbG'];if(_0x2d9f41[_0x27af64(0x1f9)](_0x52429d[_0x27af64(0x1fc)]))return _0x52429d['EejiZ'];if(_0x2d9f41['includes']('Missing\x20required\x20argument'))return _0x27af64(0x1ed);return _0x52429d[_0x27af64(0x1f6)];}
@@ -1 +1 @@
1
- const _0x100281=_0x276c;(function(_0x34660e,_0x1c0adc){const _0x59a8a1=_0x276c,_0x1929ff=_0x34660e();while(!![]){try{const _0x48c1f0=-parseInt(_0x59a8a1(0xbe))/0x1*(parseInt(_0x59a8a1(0x95))/0x2)+-parseInt(_0x59a8a1(0x9a))/0x3+-parseInt(_0x59a8a1(0xab))/0x4+parseInt(_0x59a8a1(0xa6))/0x5+parseInt(_0x59a8a1(0xa2))/0x6*(-parseInt(_0x59a8a1(0xc4))/0x7)+-parseInt(_0x59a8a1(0x96))/0x8+-parseInt(_0x59a8a1(0xc1))/0x9*(-parseInt(_0x59a8a1(0x99))/0xa);if(_0x48c1f0===_0x1c0adc)break;else _0x1929ff['push'](_0x1929ff['shift']());}catch(_0x4dfa55){_0x1929ff['push'](_0x1929ff['shift']());}}}(_0x8b57,0x2a29c));import{exec}from'child_process';import _0x10f41b from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';function _0x8b57(){const _0x81430e=['CpAiT','UyIkT','HIGWJ','access_token','stringify','HsCbR','ycMHE','split','json','/api-keys','status','name','https://api.workos.com/user_management/authorize/device','ImvaL','startsWith','organizationId','text','DARIF','application/x-www-form-urlencoded','pLdbo','length','refresh_token','Using\x20organization:\x20','cHXvL','stdin','xdg-open','error_description','1796TbbNMV','1361672fifIPy','ALIQX','urn:ietf:params:oauth:grant-type:device_code','550aZbrWu','457122WKnFYY','/organization/me','list','dCytr','stdout','zQSNu','GET','LRCYv','6ghNkPK','CLI\x20Key','firstName','zmpyw','1002200prokkN','parse','base64url','BCSkw','UDnHN','486668ReQhBq','Select\x20an\x20organization:','Failed\x20to\x20fetch\x20memberships:\x20','POST','device_code','SJFGI','IrKaM','write','error','/organization/self-serve-signup','email','xFWeL','fGRBi','Setting\x20up\x20your\x20organization...','log','POsrp','Device\x20authorization\x20timed\x20out','isTTY','now','16xjZSak','slow_down','hwemq','109899EoeKhg','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','open','1685089dsMEJk','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'];_0x8b57=function(){return _0x81430e;};return _0x8b57();}const WORKOS_DEVICE_AUTH_URL=_0x100281(0x86),WORKOS_TOKEN_URL='https://api.workos.com/user_management/authenticate';export async function requestDeviceCode(_0xdf619f){const _0x2d7ba7=_0x100281,_0x39e7ac={'fGRBi':_0x2d7ba7(0xae),'bCqWe':_0x2d7ba7(0x8c)},_0x51bf15=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x39e7ac[_0x2d7ba7(0xb7)],'headers':{'Content-Type':_0x39e7ac['bCqWe']},'body':new URLSearchParams({'client_id':_0xdf619f})});if(!_0x51bf15['ok']){const _0x3c5231=await _0x51bf15[_0x2d7ba7(0x8a)]();throw new Error('Failed\x20to\x20request\x20device\x20code:\x20'+_0x51bf15['status']+'\x20'+_0x3c5231);}return _0x51bf15['json']();}export async function pollForTokens(_0x376da5,_0x31135a,_0x234dd0,_0x146783){const _0x52f3ff=_0x100281,_0x233298={'EcHQX':function(_0x2c88b3,_0x4c38ac){return _0x2c88b3*_0x4c38ac;},'SJFGI':'POST','jJbFo':_0x52f3ff(0x98),'NncES':'authorization_pending','Vjmji':function(_0x433dc5,_0x432d4e){return _0x433dc5===_0x432d4e;},'pLdbo':_0x52f3ff(0xbf),'BCSkw':_0x52f3ff(0xbb)},_0x567462=Date['now']()+_0x233298['EcHQX'](_0x146783,0x3e8);let _0x4f332c=_0x234dd0*0x3e8;while(Date[_0x52f3ff(0xbd)]()<_0x567462){await sleep(_0x4f332c);const _0x2e634b=await fetch(WORKOS_TOKEN_URL,{'method':_0x233298[_0x52f3ff(0xb0)],'headers':{'Content-Type':_0x52f3ff(0x8c)},'body':new URLSearchParams({'client_id':_0x376da5,'device_code':_0x31135a,'grant_type':_0x233298['jJbFo']})});if(_0x2e634b['ok'])return _0x2e634b['json']();const _0x47497e=await _0x2e634b[_0x52f3ff(0x82)]();if(_0x47497e[_0x52f3ff(0xb3)]===_0x233298['NncES'])continue;if(_0x233298['Vjmji'](_0x47497e[_0x52f3ff(0xb3)],_0x233298[_0x52f3ff(0x8d)])){_0x4f332c+=0x3e8;continue;}throw new Error(_0x47497e[_0x52f3ff(0x94)]||_0x47497e['error']||'Authentication\x20failed');}throw new Error(_0x233298[_0x52f3ff(0xa9)]);}async function fetchUserProfile(_0x2c341d){const _0x2a61f5=_0x100281,_0x5f4fef={'EbOuB':function(_0x3cb060,_0x1c4335,_0x29d395){return _0x3cb060(_0x1c4335,_0x29d395);},'XAVKt':'GET'},_0x1e861e=getApiBaseUrl();try{const _0x1c597b=await _0x5f4fef['EbOuB'](fetch,_0x1e861e+_0x2a61f5(0x9b),{'method':_0x5f4fef['XAVKt'],'headers':{'workos-token':_0x2c341d}});if(_0x1c597b['ok'])return _0x1c597b['json']();}catch{}return null;}function _0x276c(_0x2d1b79,_0x53dd0c){_0x2d1b79=_0x2d1b79-0x7f;const _0x8b579d=_0x8b57();let _0x276c41=_0x8b579d[_0x2d1b79];return _0x276c41;}function buildKeyName(_0x1619f0,_0x281752){const _0x21d1a0=_0x100281,_0x50f397=_0x281752['filter'](_0x326ed3=>_0x326ed3['name']===_0x1619f0||_0x326ed3['name'][_0x21d1a0(0x88)](_0x1619f0+'\x20('));if(_0x50f397[_0x21d1a0(0x8e)]===0x0)return _0x1619f0;return _0x1619f0+'\x20('+(_0x50f397['length']+0x1)+')';}export async function provisionApiKey(_0x1cb91d){const _0xe98c42=_0x100281,_0x488a71={'UyIkT':function(_0x4df824){return _0x4df824();},'DARIF':function(_0x3eec3b,_0x570fec,_0x390d74){return _0x3eec3b(_0x570fec,_0x390d74);},'zQSNu':_0xe98c42(0xae)},_0x73d36c=_0x488a71[_0xe98c42(0xc7)](getApiBaseUrl),_0x4fcfc1={'Content-Type':'application/json','workos-token':_0x1cb91d},_0x40076a=await fetchUserProfile(_0x1cb91d),_0x2e566c=_0x40076a?.[_0xe98c42(0xa4)]||_0x40076a?.[_0xe98c42(0xb5)]?.[_0xe98c42(0x81)]('@')[0x0],_0x39ec82=_0x2e566c?_0x2e566c+'\x27s\x20CLI\x20Key':_0xe98c42(0xa3);let _0x55b687=[];try{const _0x2ccb8b=await _0x488a71[_0xe98c42(0x8b)](fetch,_0x73d36c+'/api-keys',{'method':_0xe98c42(0xa0),'headers':_0x4fcfc1});if(_0x2ccb8b['ok']){const _0x700b85=await _0x2ccb8b['json']();_0x55b687=_0x700b85['apiKeys'];}}catch{}const _0xe26b55=buildKeyName(_0x39ec82,_0x55b687),_0x5a101f=await fetch(_0x73d36c+_0xe98c42(0x83),{'method':_0x488a71[_0xe98c42(0x9f)],'headers':_0x4fcfc1,'body':JSON[_0xe98c42(0xca)]({'name':_0xe26b55,'scope':'mcp:write'})});if(!_0x5a101f['ok']){const _0xa25423=await _0x5a101f['text']();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x5a101f[_0xe98c42(0x84)]+'\x20'+_0xa25423);}const _0x16bf1b=await _0x5a101f['json']();return _0x16bf1b['apiKey']['token'];}export function openBrowser(_0x510d33){const _0x4dddce=_0x100281,_0x4b4b72={'dCytr':function(_0x55f229,_0x287c92){return _0x55f229===_0x287c92;},'ycMHE':'darwin','cHXvL':'win32','hwemq':_0x4dddce(0x93)},_0x3db84f=process['platform'],_0x28bc99=_0x4b4b72[_0x4dddce(0x9d)](_0x3db84f,_0x4b4b72[_0x4dddce(0x80)])?_0x4dddce(0xc3):_0x3db84f===_0x4b4b72[_0x4dddce(0x91)]?'start':_0x4b4b72[_0x4dddce(0xc0)];exec(_0x28bc99+'\x20'+JSON[_0x4dddce(0xca)](_0x510d33));}function decodeJwtPayload(_0xae8ee5){const _0x255f6e=_0x100281,_0x3bec9e={'GogWR':function(_0x2f501d,_0xb0c702){return _0x2f501d!==_0xb0c702;},'geGjh':_0x255f6e(0xa8)},_0x408911=_0xae8ee5[_0x255f6e(0x81)]('.');if(_0x3bec9e['GogWR'](_0x408911['length'],0x3))throw new Error('Invalid\x20JWT\x20format');const _0x599487=Buffer['from'](_0x408911[0x1],_0x3bec9e['geGjh'])['toString']('utf-8');return JSON[_0x255f6e(0xa7)](_0x599487);}async function selfServeSignup(_0x5404a0){const _0x22e9f7=_0x100281,_0xb37331={'MgqIz':function(_0x21d41f,_0x1f5543,_0x2a1140){return _0x21d41f(_0x1f5543,_0x2a1140);},'gFEPI':'POST'},_0x2156da=getApiBaseUrl(),_0x51d181=await _0xb37331['MgqIz'](fetch,_0x2156da+_0x22e9f7(0xb4),{'method':_0xb37331['gFEPI'],'headers':{'Content-Type':'application/json','workos-token':_0x5404a0}});if(!_0x51d181['ok']){const _0x200160=await _0x51d181['text']();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x51d181['status']+'\x20'+_0x200160);}return _0x51d181['json']();}async function fetchMyMemberships(_0x27edc2){const _0x4d3c80=_0x100281,_0x164094={'UDnHN':function(_0x30a711){return _0x30a711();},'HMtgl':function(_0x422f06,_0x646cb,_0x5645e4){return _0x422f06(_0x646cb,_0x5645e4);},'ImvaL':'GET'},_0x5e4cdd=_0x164094[_0x4d3c80(0xaa)](getApiBaseUrl),_0x40c49f=await _0x164094['HMtgl'](fetch,_0x5e4cdd+'/organization/my-memberships',{'method':_0x164094[_0x4d3c80(0x87)],'headers':{'workos-token':_0x27edc2}});if(!_0x40c49f['ok']){const _0x3e14b5=await _0x40c49f[_0x4d3c80(0x8a)]();throw new Error(_0x4d3c80(0xad)+_0x40c49f['status']+'\x20'+_0x3e14b5);}const _0x2a719e=await _0x40c49f[_0x4d3c80(0x82)]();return _0x2a719e['memberships'];}async function refreshTokenWithOrg(_0x499363,_0x109624,_0x61cee7){const _0x5d7883=_0x100281,_0x27adff={'CpAiT':_0x5d7883(0xae),'POsrp':_0x5d7883(0x8c)},_0x1339ef=await fetch(WORKOS_TOKEN_URL,{'method':_0x27adff[_0x5d7883(0xc6)],'headers':{'Content-Type':_0x27adff[_0x5d7883(0xba)]},'body':new URLSearchParams({'client_id':_0x499363,'grant_type':'refresh_token','refresh_token':_0x109624,'organization_id':_0x61cee7})});if(!_0x1339ef['ok']){const _0x1a2a5c=await _0x1339ef['text']();throw new Error(_0x5d7883(0xc5)+_0x1339ef[_0x5d7883(0x84)]+'\x20'+_0x1a2a5c);}return _0x1339ef['json']();}export async function runDeviceAuthFlow(){const _0x558ca0=_0x100281,_0x5756bc={'LRCYv':function(_0x1fa934,_0x539391){return _0x1fa934(_0x539391);},'RybtB':'Waiting\x20for\x20authentication...','HsCbR':function(_0x155d36,_0x5a3573){return _0x155d36===_0x5a3573;},'xFWeL':_0x558ca0(0xb8),'LIjGY':_0x558ca0(0xc2),'IrKaM':'Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','zmpyw':_0x558ca0(0x9c),'TFMbZ':_0x558ca0(0xac),'ALIQX':'Provisioning\x20API\x20key...','HIGWJ':function(_0x45f065,_0x3d8358){return _0x45f065(_0x3d8358);}},_0xf99235=getCurrentEnvironment(),_0x136c46=ENVIRONMENT_CONFIGS[_0xf99235]['workosClientId'],_0x1d3fd4=await requestDeviceCode(_0x136c46);console['log']('\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...'),console['log']('\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a'),_0x5756bc[_0x558ca0(0xa1)](openBrowser,_0x1d3fd4['verification_uri_complete']),console[_0x558ca0(0xb9)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x1d3fd4['verification_uri_complete']),console['log']('Code:\x20'+_0x1d3fd4['user_code']+'\x0a'),process['stdout']['write'](_0x5756bc['RybtB']);let _0x516fc8=await pollForTokens(_0x136c46,_0x1d3fd4[_0x558ca0(0xaf)],_0x1d3fd4['interval'],_0x1d3fd4['expires_in']);console[_0x558ca0(0xb9)]('\x20✓');const _0x2223bd=_0x5756bc['LRCYv'](decodeJwtPayload,_0x516fc8['access_token']);if(!_0x2223bd['org_id']){const _0x37ed77=await fetchMyMemberships(_0x516fc8['access_token']);let _0x4948a9;if(_0x5756bc['HsCbR'](_0x37ed77['length'],0x0)){process[_0x558ca0(0x9e)][_0x558ca0(0xb2)](_0x5756bc[_0x558ca0(0xb6)]);const _0x7d0fc9=await selfServeSignup(_0x516fc8[_0x558ca0(0xc9)]);_0x4948a9=_0x7d0fc9['organizationId'],console['log']('\x20✓');}else{if(_0x5756bc[_0x558ca0(0x7f)](_0x37ed77['length'],0x1))_0x4948a9=_0x37ed77[0x0]['organizationId'],console['log'](_0x558ca0(0x90)+_0x37ed77[0x0]['name']);else{const _0x4afab0=process[_0x558ca0(0x92)]['isTTY']&&process['stdout'][_0x558ca0(0xbc)];if(!_0x4afab0)throw new Error(_0x5756bc['LIjGY']+_0x5756bc[_0x558ca0(0xb1)]);const {selected:_0x463d4a}=await _0x10f41b['prompt']([{'type':_0x5756bc[_0x558ca0(0xa5)],'name':'selected','message':_0x5756bc['TFMbZ'],'choices':_0x37ed77['map'](_0x25e8a0=>({'name':_0x25e8a0[_0x558ca0(0x85)],'value':_0x25e8a0[_0x558ca0(0x89)]}))}]);_0x4948a9=_0x463d4a;}}_0x516fc8=await refreshTokenWithOrg(_0x136c46,_0x516fc8['refresh_token'],_0x4948a9);}process['stdout']['write'](_0x5756bc[_0x558ca0(0x97)]);const _0x4e329c=await _0x5756bc['LRCYv'](provisionApiKey,_0x516fc8['access_token']);return console['log']('\x20✓'),await _0x5756bc[_0x558ca0(0xc8)](storeToken,_0x4e329c),_0x516fc8['refresh_token']&&await storeRefreshToken(_0x516fc8[_0x558ca0(0x8f)]),_0x4e329c;}function sleep(_0x1ce779){return new Promise(_0x18e50c=>setTimeout(_0x18e50c,_0x1ce779));}
1
+ const _0x3a20e4=_0x5bdc;(function(_0x5ec19f,_0x4978bc){const _0x4c051d=_0x5bdc,_0x4ec6fc=_0x5ec19f();while(!![]){try{const _0x43e686=-parseInt(_0x4c051d(0x188))/0x1+-parseInt(_0x4c051d(0x1b1))/0x2+parseInt(_0x4c051d(0x17d))/0x3*(-parseInt(_0x4c051d(0x193))/0x4)+parseInt(_0x4c051d(0x169))/0x5+parseInt(_0x4c051d(0x19d))/0x6*(-parseInt(_0x4c051d(0x174))/0x7)+-parseInt(_0x4c051d(0x19a))/0x8*(parseInt(_0x4c051d(0x16b))/0x9)+parseInt(_0x4c051d(0x196))/0xa;if(_0x43e686===_0x4978bc)break;else _0x4ec6fc['push'](_0x4ec6fc['shift']());}catch(_0x20a98c){_0x4ec6fc['push'](_0x4ec6fc['shift']());}}}(_0x32e8,0x50602));import{exec}from'child_process';import _0x1c5610 from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x3a20e4(0x171),WORKOS_TOKEN_URL=_0x3a20e4(0x1a3);function _0x32e8(){const _0x43e1ce=['OyDGi','interval','Provisioning\x20CLI\x20token...','https://api.workos.com/user_management/authorize/device','CUFIz','Flhec','91zRhrGw','bQYxC','OWAIW','wUHll','memberships','write','now','RbfnQ','SzmEi','201XIvQZW','organizationId','lKwFV','xdg-open','urn:ietf:params:oauth:grant-type:device_code','stdout','length','prompt','nUBhj','filter','RHbul','113164WKeunP','ETMSZ','oriih','Wkdwo','list','Setting\x20up\x20your\x20organization...','startsWith','QAdUT','from','/cli-auth/token','access_token','18356nHbsnt','base64url','email','14033370SKzShk','name','application/json','application/x-www-form-urlencoded','652760jMCsaI','slow_down','Select\x20an\x20organization:','82986IySKWt','error','POST','NpqGZ','Authentication\x20failed','zflOA','https://api.workos.com/user_management/authenticate','Using\x20organization:\x20','log','Failed\x20to\x20fetch\x20memberships:\x20','CLI\x20Key','device_code','status','/organization/my-memberships','ADntW','open','RWyEf','text','isTTY','toString','656934ZnMPvC','BtjCl','QpMcp','json','Failed\x20to\x20request\x20device\x20code:\x20','fdCJj','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','1313765PIAGqV','apiKey','45HvKKWp','/api-keys','apiKeys'];_0x32e8=function(){return _0x43e1ce;};return _0x32e8();}export async function requestDeviceCode(_0x5d5b3b){const _0x3a764d=_0x3a20e4,_0x469509=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x3a764d(0x19f),'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x5d5b3b})});if(!_0x469509['ok']){const _0x27b468=await _0x469509['text']();throw new Error(_0x3a764d(0x166)+_0x469509['status']+'\x20'+_0x27b468);}return _0x469509[_0x3a764d(0x1b4)]();}export async function pollForTokens(_0x4f3e18,_0xa99e55,_0xf6b7e2,_0x5482ba){const _0x25099c=_0x3a20e4,_0xb90672={'Wkdwo':function(_0x354450,_0x35844a){return _0x354450+_0x35844a;},'oriih':function(_0x595b7c,_0x486db4){return _0x595b7c*_0x486db4;},'Flhec':function(_0x3c57ed,_0x56f8c2){return _0x3c57ed(_0x56f8c2);},'wUHll':'POST','RHbul':function(_0x5f3f33,_0x372621){return _0x5f3f33===_0x372621;},'RrJVh':'authorization_pending','RbfnQ':'Device\x20authorization\x20timed\x20out'},_0x1ee78f=_0xb90672[_0x25099c(0x18b)](Date['now'](),_0x5482ba*0x3e8);let _0x359c19=_0xb90672[_0x25099c(0x18a)](_0xf6b7e2,0x3e8);while(Date[_0x25099c(0x17a)]()<_0x1ee78f){await _0xb90672[_0x25099c(0x173)](sleep,_0x359c19);const _0x65aafa=await fetch(WORKOS_TOKEN_URL,{'method':_0xb90672[_0x25099c(0x177)],'headers':{'Content-Type':_0x25099c(0x199)},'body':new URLSearchParams({'client_id':_0x4f3e18,'device_code':_0xa99e55,'grant_type':_0x25099c(0x181)})});if(_0x65aafa['ok'])return _0x65aafa['json']();const _0x19a1bd=await _0x65aafa[_0x25099c(0x1b4)]();if(_0xb90672[_0x25099c(0x187)](_0x19a1bd[_0x25099c(0x19e)],_0xb90672['RrJVh']))continue;if(_0xb90672['RHbul'](_0x19a1bd[_0x25099c(0x19e)],_0x25099c(0x19b))){_0x359c19+=0x3e8;continue;}throw new Error(_0x19a1bd['error_description']||_0x19a1bd['error']||_0x25099c(0x1a1));}throw new Error(_0xb90672[_0x25099c(0x17b)]);}async function fetchUserProfile(_0x256da8){const _0x1f438e=_0x3a20e4,_0x2ccd18={'SzmEi':function(_0x1e2a8e){return _0x1e2a8e();},'bGsOQ':'GET'},_0xdeac4f=_0x2ccd18[_0x1f438e(0x17c)](getApiBaseUrl);try{const _0x399856=await fetch(_0xdeac4f+'/organization/me',{'method':_0x2ccd18['bGsOQ'],'headers':{'workos-token':_0x256da8}});if(_0x399856['ok'])return _0x399856['json']();}catch{}return null;}function buildKeyName(_0x45c224,_0x2bcd47){const _0xa9132a=_0x3a20e4,_0x5ded0b={'QpMcp':function(_0x5bdd74,_0x44d527){return _0x5bdd74+_0x44d527;}},_0x5f2507=_0x2bcd47[_0xa9132a(0x186)](_0x1ad8e9=>_0x1ad8e9[_0xa9132a(0x197)]===_0x45c224||_0x1ad8e9['name'][_0xa9132a(0x18e)](_0x45c224+'\x20('));if(_0x5f2507['length']===0x0)return _0x45c224;return _0x45c224+'\x20('+_0x5ded0b[_0xa9132a(0x1b3)](_0x5f2507['length'],0x1)+')';}export async function provisionApiKey(_0x5acb53){const _0x54e056=_0x3a20e4,_0x206b56={'nUBhj':function(_0x2ed44e,_0xbf355d,_0x4640db){return _0x2ed44e(_0xbf355d,_0x4640db);},'EBKMP':'POST','JUYpP':'mcp:write'},_0xa16aef=getApiBaseUrl(),_0x3afdf7={'Content-Type':'application/json','workos-token':_0x5acb53},_0x4ee426=await fetchUserProfile(_0x5acb53),_0x5d3a96=_0x4ee426?.['firstName']||_0x4ee426?.[_0x54e056(0x195)]?.['split']('@')[0x0],_0x17737a=_0x5d3a96?_0x5d3a96+'\x27s\x20CLI\x20Key':_0x54e056(0x1a7);let _0x5333b8=[];try{const _0x242c5f=await _0x206b56[_0x54e056(0x185)](fetch,_0xa16aef+_0x54e056(0x16c),{'method':'GET','headers':_0x3afdf7});if(_0x242c5f['ok']){const _0x30fbf4=await _0x242c5f['json']();_0x5333b8=_0x30fbf4[_0x54e056(0x16d)];}}catch{}const _0x1463ce=_0x206b56[_0x54e056(0x185)](buildKeyName,_0x17737a,_0x5333b8),_0x55b507=await fetch(_0xa16aef+_0x54e056(0x16c),{'method':_0x206b56['EBKMP'],'headers':_0x3afdf7,'body':JSON['stringify']({'name':_0x1463ce,'scope':_0x206b56['JUYpP']})});if(!_0x55b507['ok']){const _0xcdb608=await _0x55b507['text']();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x55b507[_0x54e056(0x1a9)]+'\x20'+_0xcdb608);}const _0x4f7fd2=await _0x55b507['json']();return _0x4f7fd2[_0x54e056(0x16a)]['token'];}export function openBrowser(_0x5a47f7){const _0x54d6ed=_0x3a20e4,_0x1435aa={'ETMSZ':_0x54d6ed(0x1ac),'NFcgS':function(_0x39d933,_0x1021cc){return _0x39d933===_0x1021cc;},'lWgkD':'start'},_0x371cd9=process['platform'],_0x1770d4=_0x371cd9==='darwin'?_0x1435aa[_0x54d6ed(0x189)]:_0x1435aa['NFcgS'](_0x371cd9,'win32')?_0x1435aa['lWgkD']:_0x54d6ed(0x180);exec(_0x1770d4+'\x20'+JSON['stringify'](_0x5a47f7));}function decodeJwtPayload(_0x13f1b1){const _0x57b962=_0x3a20e4,_0x566f3b={'DryMD':function(_0x3b2714,_0x51c8c0){return _0x3b2714!==_0x51c8c0;},'OyDGi':_0x57b962(0x194),'EyNSh':'utf-8'},_0xe8fb95=_0x13f1b1['split']('.');if(_0x566f3b['DryMD'](_0xe8fb95[_0x57b962(0x183)],0x3))throw new Error('Invalid\x20JWT\x20format');const _0x3c59af=Buffer[_0x57b962(0x190)](_0xe8fb95[0x1],_0x566f3b[_0x57b962(0x16e)])[_0x57b962(0x1b0)](_0x566f3b['EyNSh']);return JSON['parse'](_0x3c59af);}function _0x5bdc(_0x3510b7,_0x2d9bd8){_0x3510b7=_0x3510b7-0x166;const _0x32e889=_0x32e8();let _0x5bdcb2=_0x32e889[_0x3510b7];return _0x5bdcb2;}async function selfServeSignup(_0x46b96c){const _0x222048=_0x3a20e4,_0xc25b42={'RWyEf':function(_0x583635){return _0x583635();},'EtLYv':function(_0x503e99,_0x1959e8,_0x2cbe2a){return _0x503e99(_0x1959e8,_0x2cbe2a);},'CUFIz':_0x222048(0x19f),'jiABK':_0x222048(0x198)},_0x150e63=_0xc25b42[_0x222048(0x1ad)](getApiBaseUrl),_0x55a7c0=await _0xc25b42['EtLYv'](fetch,_0x150e63+'/organization/self-serve-signup',{'method':_0xc25b42[_0x222048(0x172)],'headers':{'Content-Type':_0xc25b42['jiABK'],'workos-token':_0x46b96c}});if(!_0x55a7c0['ok']){const _0x1b7742=await _0x55a7c0['text']();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x55a7c0['status']+'\x20'+_0x1b7742);}return _0x55a7c0[_0x222048(0x1b4)]();}async function fetchMyMemberships(_0x5988ad){const _0x3e1c9d=_0x3a20e4,_0x4ff708={'ADntW':function(_0x56143f){return _0x56143f();}},_0x219ea8=_0x4ff708[_0x3e1c9d(0x1ab)](getApiBaseUrl),_0x45d4d0=await fetch(_0x219ea8+_0x3e1c9d(0x1aa),{'method':'GET','headers':{'workos-token':_0x5988ad}});if(!_0x45d4d0['ok']){const _0x12489e=await _0x45d4d0[_0x3e1c9d(0x1ae)]();throw new Error(_0x3e1c9d(0x1a6)+_0x45d4d0['status']+'\x20'+_0x12489e);}const _0x366778=await _0x45d4d0[_0x3e1c9d(0x1b4)]();return _0x366778[_0x3e1c9d(0x178)];}async function refreshTokenWithOrg(_0x1fb21f,_0x125f55,_0x3f9a29){const _0x28ea50=_0x3a20e4,_0x4ca6af={'zMYQh':function(_0x53ab5b,_0x37b7f1,_0x3a088e){return _0x53ab5b(_0x37b7f1,_0x3a088e);},'QAdUT':'application/x-www-form-urlencoded'},_0x554dd8=await _0x4ca6af['zMYQh'](fetch,WORKOS_TOKEN_URL,{'method':_0x28ea50(0x19f),'headers':{'Content-Type':_0x4ca6af[_0x28ea50(0x18f)]},'body':new URLSearchParams({'client_id':_0x1fb21f,'grant_type':'refresh_token','refresh_token':_0x125f55,'organization_id':_0x3f9a29})});if(!_0x554dd8['ok']){const _0x34edde=await _0x554dd8['text']();throw new Error(_0x28ea50(0x168)+_0x554dd8[_0x28ea50(0x1a9)]+'\x20'+_0x34edde);}return _0x554dd8['json']();}async function provisionCliToken(_0x4e8b21){const _0x264c6c=_0x3a20e4,_0x2b0f0d={'OWAIW':function(_0x2d7d33,_0x26ab33,_0x5eff4b){return _0x2d7d33(_0x26ab33,_0x5eff4b);}},_0x5ec490=getApiBaseUrl(),_0x52f6c2=await _0x2b0f0d[_0x264c6c(0x176)](fetch,_0x5ec490+_0x264c6c(0x191),{'method':'POST','headers':{'Content-Type':'application/json','workos-token':_0x4e8b21}});if(!_0x52f6c2['ok']){const _0x2afac2=await _0x52f6c2['text']();throw new Error('Failed\x20to\x20provision\x20CLI\x20token:\x20'+_0x52f6c2[_0x264c6c(0x1a9)]+'\x20'+_0x2afac2);}return _0x52f6c2[_0x264c6c(0x1b4)]();}export async function runDeviceAuthFlow(){const _0x38d3b9=_0x3a20e4,_0x4a5ce1={'bQYxC':function(_0x421d18,_0x4e7ed3){return _0x421d18(_0x4e7ed3);},'zflOA':'\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','SoLph':function(_0x3a3a5b,_0x28b2e8,_0x412888,_0x54bf46,_0xd069e){return _0x3a3a5b(_0x28b2e8,_0x412888,_0x54bf46,_0xd069e);},'mMAhl':_0x38d3b9(0x18d),'BtjCl':function(_0x466f8d,_0x589a94){return _0x466f8d===_0x589a94;},'lKwFV':function(_0x4c8f76,_0x7bd70a){return _0x4c8f76+_0x7bd70a;},'PNRcp':_0x38d3b9(0x18c),'NpqGZ':_0x38d3b9(0x19c),'bAAJG':_0x38d3b9(0x170),'fdCJj':function(_0x3ba1b5,_0x3b6178){return _0x3ba1b5(_0x3b6178);}},_0x2c63bc=getCurrentEnvironment(),_0xa8ca2d=ENVIRONMENT_CONFIGS[_0x2c63bc]['workosClientId'],_0x5af7db=await _0x4a5ce1[_0x38d3b9(0x175)](requestDeviceCode,_0xa8ca2d);console['log']('\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...'),console[_0x38d3b9(0x1a5)](_0x4a5ce1[_0x38d3b9(0x1a2)]),_0x4a5ce1['bQYxC'](openBrowser,_0x5af7db['verification_uri_complete']),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x5af7db['verification_uri_complete']),console['log']('Code:\x20'+_0x5af7db['user_code']+'\x0a'),process['stdout']['write']('Waiting\x20for\x20authentication...');let _0x93fa2f=await _0x4a5ce1['SoLph'](pollForTokens,_0xa8ca2d,_0x5af7db[_0x38d3b9(0x1a8)],_0x5af7db[_0x38d3b9(0x16f)],_0x5af7db['expires_in']);console['log']('\x20✓');const _0x186407=_0x4a5ce1['bQYxC'](decodeJwtPayload,_0x93fa2f['access_token']);if(!_0x186407['org_id']){const _0x52c4e0=await fetchMyMemberships(_0x93fa2f[_0x38d3b9(0x192)]);let _0x45b6c3;if(_0x52c4e0[_0x38d3b9(0x183)]===0x0){process[_0x38d3b9(0x182)][_0x38d3b9(0x179)](_0x4a5ce1['mMAhl']);const _0xc7fe88=await selfServeSignup(_0x93fa2f[_0x38d3b9(0x192)]);_0x45b6c3=_0xc7fe88[_0x38d3b9(0x17e)],console['log']('\x20✓');}else{if(_0x4a5ce1[_0x38d3b9(0x1b2)](_0x52c4e0[_0x38d3b9(0x183)],0x1))_0x45b6c3=_0x52c4e0[0x0]['organizationId'],console['log'](_0x38d3b9(0x1a4)+_0x52c4e0[0x0][_0x38d3b9(0x197)]);else{const _0x26bcf3=process['stdin']['isTTY']&&process['stdout'][_0x38d3b9(0x1af)];if(!_0x26bcf3)throw new Error(_0x4a5ce1[_0x38d3b9(0x17f)]('Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.'));const {selected:_0x42c743}=await _0x1c5610[_0x38d3b9(0x184)]([{'type':_0x4a5ce1['PNRcp'],'name':'selected','message':_0x4a5ce1[_0x38d3b9(0x1a0)],'choices':_0x52c4e0['map'](_0x217114=>({'name':_0x217114[_0x38d3b9(0x197)],'value':_0x217114['organizationId']}))}]);_0x45b6c3=_0x42c743;}}_0x93fa2f=await refreshTokenWithOrg(_0xa8ca2d,_0x93fa2f['refresh_token'],_0x45b6c3);}process['stdout'][_0x38d3b9(0x179)](_0x4a5ce1['bAAJG']);const _0x746bed=await _0x4a5ce1[_0x38d3b9(0x167)](provisionCliToken,_0x93fa2f['access_token']);return console['log']('\x20✓'),await storeToken(_0x746bed['token']),_0x93fa2f['refresh_token']&&await storeRefreshToken(_0x93fa2f['refresh_token']),_0x746bed['token'];}function sleep(_0x1883c1){return new Promise(_0x1038ed=>setTimeout(_0x1038ed,_0x1883c1));}