@ranger-testing/ranger-cli 2.5.4-alpha.0e8b82c-9 → 2.5.4-alpha.152f635-21

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 (82) hide show
  1. package/README.md +36 -14
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -0
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/opencodeConfig.js +1 -1
  58. package/build/commands/utils/playwrightCli.js +1 -1
  59. package/build/commands/utils/profileMessages.js +1 -1
  60. package/build/commands/utils/profileSetupBanner.js +1 -1
  61. package/build/commands/utils/projectsConfig.js +1 -1
  62. package/build/commands/utils/rangerConfig.js +1 -1
  63. package/build/commands/utils/rangerRoot.js +1 -1
  64. package/build/commands/utils/resolveProfileContext.js +1 -1
  65. package/build/commands/utils/resolveProfileUrl.js +1 -1
  66. package/build/commands/utils/retry.js +1 -1
  67. package/build/commands/utils/sessionCache.js +1 -1
  68. package/build/commands/utils/settings.js +1 -1
  69. package/build/commands/utils/skillContent.js +1 -1
  70. package/build/commands/utils/skills.js +1 -1
  71. package/build/commands/utils/stitchWebmFiles.js +1 -1
  72. package/build/commands/utils/telemetry.js +1 -1
  73. package/build/commands/utils/tokenRefresh.js +1 -1
  74. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  75. package/build/commands/utils/userApi.js +1 -1
  76. package/build/commands/utils/version.js +1 -1
  77. package/build/commands/verifyFeature.js +1 -1
  78. package/build/commands/verifyFeatureCli.js +1 -1
  79. package/build/skills/ranger/SKILL.md +24 -8
  80. package/build/skills/ranger/create.md +16 -3
  81. package/build/skills/ranger/verify.md +35 -10
  82. package/package.json +3 -2
@@ -1 +1 @@
1
- const _0x5038aa=_0x19c3;(function(_0x3e7c9c,_0xdd4693){const _0x395e77=_0x19c3,_0x17d5d0=_0x3e7c9c();while(!![]){try{const _0x4d90fc=parseInt(_0x395e77(0x1c5))/0x1*(-parseInt(_0x395e77(0x1d1))/0x2)+parseInt(_0x395e77(0x1af))/0x3+-parseInt(_0x395e77(0x1b0))/0x4+-parseInt(_0x395e77(0x1d0))/0x5*(parseInt(_0x395e77(0x1cd))/0x6)+-parseInt(_0x395e77(0x1a0))/0x7+parseInt(_0x395e77(0x1be))/0x8+-parseInt(_0x395e77(0x1ba))/0x9*(-parseInt(_0x395e77(0x19d))/0xa);if(_0x4d90fc===_0xdd4693)break;else _0x17d5d0['push'](_0x17d5d0['shift']());}catch(_0x1707cc){_0x17d5d0['push'](_0x17d5d0['shift']());}}}(_0x2bb2,0x7118a));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';function _0x19c3(_0x3559b1,_0x560069){_0x3559b1=_0x3559b1-0x18c;const _0x2bb294=_0x2bb2();let _0x19c372=_0x2bb294[_0x3559b1];return _0x19c372;}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';function _0x2bb2(){const _0x23478c=['user','\x20channel.','jKEwS','\x0aSuccessfully\x20installed\x20latest\x20version.','log','heOft','findIndex','unref','\x20ranger-managed\x20skill(s)...','408920WGeWCf','version','plugin','6132098uekTVf','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','trailhead','uElIX','jIZtl','some','error','...','QOGki','install','\x0aSuccessfully\x20installed\x20','trim','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','kGPAI','scope','1589328fGRyBe','2035240lOOzUP','ClkTm','hBshs','SoyMq','Latest\x20version:\x20\x20','length','vLoxH','inherit','latest','EtcUq','261OUUGiZ','\x0aInstalling\x20','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','split','3830168yPaEyK','Update\x20failed\x20for\x20@','RInlP','\x0aCurrent\x20version:\x20','QbyZi','kpXqb','BHhOV','157152PtKmcL','utf-8','warn','✓\x20Migrated\x20active\x20profile\x20file','project','AtvbD','\x0aReinstalling\x20','\x20skill\x20','11310BsyoKu','FtfDK','mzltB','85DfQWMa','4bosmiq','fuSCi','txyyQ','jwvuK','awhGD','xtOGK','nlamg','mCDXj','fvvHe','push','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','claude','win32','feOGm','AnDOT','\x0a✅\x20Update\x20complete!','ranger@trailhead','cjMLz','SwCWy','ggkgA','Update\x20failed:\x20'];_0x2bb2=function(){return _0x23478c;};return _0x2bb2();}import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x3531dd,_0x525b05,_0x21818b){const _0x2b4213={'ClkTm':function(_0x801fda,_0x2be4ee){return _0x801fda(_0x2be4ee);},'OBWue':function(_0x1d0be9,_0x27b0e4){return _0x1d0be9===_0x27b0e4;},'nlamg':function(_0x418729,_0x25b3f2){return _0x418729(_0x25b3f2);},'zPGKz':'ignore','mzltB':function(_0x33dd84,_0x50da5e,_0x48c4cf){return _0x33dd84(_0x50da5e,_0x48c4cf);}};return new Promise(_0x932824=>{const _0x29551e=_0x19c3,_0x5a409d={'SoyMq':function(_0x537d24,_0x3ba086){const _0x30e313=_0x19c3;return _0x2b4213[_0x30e313(0x1b1)](_0x537d24,_0x3ba086);},'jIZtl':function(_0x20f3fa,_0x468412){const _0xd969b4=_0x19c3;return _0x2b4213[_0xd969b4(0x1d7)](_0x20f3fa,_0x468412);}};let _0x28684d=![],_0x347ba6;const _0x5821c2=_0x528eec=>{const _0x1899c6=_0x19c3;if(_0x28684d)return;_0x28684d=!![],_0x347ba6&&clearTimeout(_0x347ba6),_0x2b4213[_0x1899c6(0x1b1)](_0x932824,_0x528eec);},_0x579ec9=spawn(_0x3531dd,_0x525b05,{'stdio':[_0x2b4213['zPGKz'],_0x21818b?.['stdio']??'inherit',_0x21818b?.['stdio']??'inherit'],'shell':process['platform']===_0x29551e(0x1dd)});_0x347ba6=_0x21818b?.['timeoutMs']?_0x2b4213[_0x29551e(0x1cf)](setTimeout,()=>{const _0x26f929=_0x29551e;_0x579ec9['kill'](),_0x579ec9[_0x26f929(0x19b)](),_0x5a409d[_0x26f929(0x1b3)](_0x5821c2,![]);},_0x21818b['timeoutMs']):undefined,_0x579ec9['on']('close',_0x563b8a=>{_0x5821c2(_0x2b4213['OBWue'](_0x563b8a,0x0));}),_0x579ec9['on'](_0x29551e(0x1a6),()=>{const _0x357f58=_0x29551e;_0x5a409d[_0x357f58(0x1a4)](_0x5821c2,![]);});});}export function resolveDistTag(_0x5f4eb5){const _0xfc7739=_0x19c3,_0x5d97f2={'jwvuK':'alpha','ggkgA':'beta'};if(/-alpha\./i['test'](_0x5f4eb5))return _0x5d97f2[_0xfc7739(0x1d4)];if(/-beta\./i['test'](_0x5f4eb5))return _0x5d97f2[_0xfc7739(0x192)];if(/-rc\./i['test'](_0x5f4eb5))return'rc';return _0xfc7739(0x1b8);}async function runInstall(_0x352ffa=_0x5038aa(0x1b8)){const _0x4c8364=_0x5038aa,_0x2e1b9a={'EHRMB':function(_0x53143b,_0xa7d7eb){return _0x53143b(_0xa7d7eb);},'kGPAI':function(_0x59cc97,_0x2fb9a6){return _0x59cc97===_0x2fb9a6;},'xazme':function(_0x50da5d,_0x1bcc7a,_0x33378c,_0x5a6a39){return _0x50da5d(_0x1bcc7a,_0x33378c,_0x5a6a39);},'jNfby':_0x4c8364(0x1a9),'hBshs':'ignore'};return new Promise(_0x2aa82=>{const _0x4101b5=_0x4c8364,_0xde6116={'SwCWy':function(_0x50810d,_0x1eeb08){const _0x1b0392=_0x19c3;return _0x2e1b9a[_0x1b0392(0x1ad)](_0x50810d,_0x1eeb08);}};console[_0x4101b5(0x198)](_0x4101b5(0x1bb)+PACKAGE_NAME+'@'+_0x352ffa+'...\x0a');const _0x1cd5d7=_0x2e1b9a['xazme'](spawn,'npm',[_0x2e1b9a['jNfby'],'-g',PACKAGE_NAME+'@'+_0x352ffa],{'stdio':[_0x2e1b9a[_0x4101b5(0x1b2)],_0x4101b5(0x1b7),'inherit'],'shell':_0x2e1b9a[_0x4101b5(0x1ad)](process['platform'],'win32')});_0x1cd5d7['on']('close',_0x588475=>{const _0x1d32f8=_0x4101b5;_0x2aa82(_0xde6116[_0x1d32f8(0x191)](_0x588475,0x0));}),_0x1cd5d7['on'](_0x4101b5(0x1a6),()=>{_0x2e1b9a['EHRMB'](_0x2aa82,![]);});});}async function updateClaudeMarketplace(){const _0x3fe90e=_0x5038aa,_0x5a553f={'EtcUq':function(_0x2729d7,_0x9a6961,_0x526635,_0x402c45){return _0x2729d7(_0x9a6961,_0x526635,_0x402c45);},'FtfDK':'marketplace','HDBWJ':'update','fFZjV':_0x3fe90e(0x1a2)},_0x5b729e=await _0x5a553f[_0x3fe90e(0x1b9)](runCommand,'claude',[_0x3fe90e(0x19f),_0x5a553f[_0x3fe90e(0x1ce)],_0x5a553f['HDBWJ'],_0x5a553f['fFZjV']],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x5b729e)throw new Error(_0x3fe90e(0x1db));}async function updateClaudePlugin(_0x3b6a68){const _0x1213f7=_0x5038aa,_0x422aa0={'fvvHe':_0x1213f7(0x19f),'IgCoE':'update','oFNtz':function(_0x154922,_0x4a94a7,_0x37f434,_0x597e07){return _0x154922(_0x4a94a7,_0x37f434,_0x597e07);},'QOGki':'claude','VXIaE':function(_0x4ab779,_0xb50ca8){return _0x4ab779??_0xb50ca8;}},_0xa43b03=[_0x422aa0[_0x1213f7(0x1d9)],_0x422aa0['IgCoE'],_0x1213f7(0x18f)];_0x3b6a68&&_0xa43b03[_0x1213f7(0x1da)]('--scope',_0x3b6a68);const _0x255782=await _0x422aa0['oFNtz'](runCommand,_0x422aa0[_0x1213f7(0x1a8)],_0xa43b03,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x255782){const _0x3e8ea3=_0x422aa0['VXIaE'](_0x3b6a68,'user');throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x3e8ea3+_0x1213f7(0x1ac));}}function isSkillInstalled(_0x56da9f,_0x14f076,_0x474577){const _0x10306c=_0x5038aa,_0x511af5={'BHhOV':function(_0x5e3a85,_0x22ae54){return _0x5e3a85===_0x22ae54;},'zkARw':function(_0xa6f3f3,_0x5f1105){return _0xa6f3f3(_0x5f1105);}},_0x203d30=_0x511af5[_0x10306c(0x1c4)](_0x474577,'opencode')?getOpencodeSkillsDir(_0x14f076):_0x511af5['zkARw'](getSkillsDir,_0x14f076),_0x4375e4=join(_0x203d30,_0x56da9f);return _0x511af5['zkARw'](existsSync,_0x4375e4);}async function reinstallSkills(_0x59ebb5){const _0x417985=_0x5038aa,_0x30b31a={'eUWCj':_0x417985(0x194),'mCDXj':'claude','awhGD':function(_0x1fd4fd,_0x2f079c,_0x3b2838,_0x154b65){return _0x1fd4fd(_0x2f079c,_0x3b2838,_0x154b65);},'AtvbD':'opencode','jKEwS':function(_0x5da7ec,_0x3523b8,_0x41d7db){return _0x5da7ec(_0x3523b8,_0x41d7db);},'vcPwf':_0x417985(0x1a1)},_0x279c43=['project',_0x30b31a['eUWCj']],_0x40d380=[];for(const _0x53c036 of _0x279c43){for(const _0x4c05d0 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x4c05d0,_0x53c036,_0x30b31a[_0x417985(0x1d8)])&&_0x40d380['push']({'skillName':_0x4c05d0,'level':_0x53c036,'platform':_0x417985(0x1dc)}),_0x30b31a[_0x417985(0x1d5)](isSkillInstalled,_0x4c05d0,_0x53c036,_0x30b31a[_0x417985(0x1ca)])&&_0x40d380[_0x417985(0x1da)]({'skillName':_0x4c05d0,'level':_0x53c036,'platform':'opencode'});}}for(const _0x1f521c of _0x279c43){for(const _0x735b8b of DEPRECATED_SKILLS){await _0x30b31a[_0x417985(0x196)](removeSkill,_0x735b8b,_0x1f521c);}}if(_0x40d380['length']===0x0){console['log'](_0x30b31a['vcPwf']);return;}console[_0x417985(0x198)](_0x417985(0x1cb)+_0x40d380[_0x417985(0x1b5)]+_0x417985(0x19c));for(const {skillName:_0xdcd131,level:_0xdc744d,platform:_0x5468bc}of _0x40d380){try{await installSkill(_0xdcd131,{'level':_0xdc744d,'cliVersion':_0x59ebb5,'platform':_0x5468bc});}catch(_0x2d822c){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x5468bc+'\x20'+_0xdc744d+_0x417985(0x1cc)+_0xdcd131+':',_0x2d822c);}}}async function ensureActiveProfileGitignored(){const _0x399aec=_0x5038aa,_0x420b21={'fuSCi':function(_0x236400,_0x1e4d33,_0x93ed66){return _0x236400(_0x1e4d33,_0x93ed66);},'AnDOT':function(_0x305962,_0x20f18a,_0x5c892b){return _0x305962(_0x20f18a,_0x5c892b);},'WCVcp':'utf-8','wACnM':'active-profile.txt'},_0xddf89d=_0x420b21[_0x399aec(0x1d2)](join,getRangerDir(),'.gitignore');if(!existsSync(_0xddf89d))return![];let _0x3b891b='';try{_0x3b891b=await _0x420b21[_0x399aec(0x18d)](readFile,_0xddf89d,_0x420b21['WCVcp']);}catch{return![];}const _0x16e7f2=_0x3b891b[_0x399aec(0x1bd)](/\r?\n/);if(_0x16e7f2[_0x399aec(0x1a5)](_0x20238c=>_0x20238c['trim']()==='active-profile.txt'))return![];let _0x8e9bda=_0x16e7f2[_0x399aec(0x19a)](_0x3b5d61=>_0x3b5d61[_0x399aec(0x1ab)]()==='active-feature.txt');_0x8e9bda===-0x1&&(_0x8e9bda=_0x16e7f2[_0x399aec(0x1b5)]);_0x16e7f2['splice'](_0x8e9bda,0x0,_0x420b21['wACnM']);let _0x4ac94e=_0x16e7f2['join']('\x0a');!_0x4ac94e['endsWith']('\x0a')&&(_0x4ac94e+='\x0a');try{await writeFile(_0xddf89d,_0x4ac94e,_0x399aec(0x1c6));}catch{return![];}return!![];}export async function update(){const _0x557157=_0x5038aa,_0x5be633={'heOft':function(_0x3ba415){return _0x3ba415();},'uElIX':function(_0x3996ae,_0x361ea6){return _0x3996ae(_0x361ea6);},'QbyZi':_0x557157(0x1b8),'GiEfL':function(_0x4a5b51,_0x5e7cc5){return _0x4a5b51(_0x5e7cc5);},'EImrV':function(_0x5b0050,_0x42c88b){return _0x5b0050(_0x42c88b);},'ZEXPI':_0x557157(0x1c8),'xtOGK':'Checking\x20for\x20updates...','txyyQ':_0x557157(0x197),'RInlP':function(_0x565514,_0x3f9c46,_0x30bc30){return _0x565514(_0x3f9c46,_0x30bc30);},'vLoxH':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','gCxmI':function(_0x39bc35,_0x18d193){return _0x39bc35<_0x18d193;},'TCtIs':'ranger@trailhead','LUAUl':function(_0x18a229){return _0x18a229();},'cjMLz':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','kpXqb':function(_0x340bef,_0x21a744){return _0x340bef===_0x21a744;},'IYDqH':_0x557157(0x1c9),'feOGm':function(_0x2d8e10){return _0x2d8e10();},'TkmTa':_0x557157(0x18e)},_0x20f80c=_0x5be633['heOft'](getCurrentVersion);console[_0x557157(0x198)](_0x557157(0x1c1)+_0x20f80c);const _0x362f7b=_0x5be633[_0x557157(0x1a3)](resolveDistTag,_0x20f80c);if(_0x362f7b!==_0x5be633[_0x557157(0x1c2)]){console[_0x557157(0x198)]('Prerelease\x20channel\x20detected\x20(@'+_0x362f7b+').\x20Staying\x20on\x20'+_0x362f7b+'\x20—\x20reinstalling\x20@'+_0x362f7b+_0x557157(0x1a7));const _0x150958=await _0x5be633['GiEfL'](runInstall,_0x362f7b);if(!_0x150958)throw new Error(_0x557157(0x1bf)+_0x362f7b+_0x557157(0x195));const _0x100464=_0x5be633['heOft'](getCurrentVersion);console['log'](_0x557157(0x1aa)+PACKAGE_NAME+'@'+_0x362f7b+'.'),await _0x5be633['EImrV'](reinstallSkills,_0x100464);const _0x37732a=await migrateActiveProfileFile();_0x37732a&&console[_0x557157(0x198)](_0x5be633['ZEXPI']);await ensureActiveProfileGitignored(),console['log'](_0x557157(0x18e));return;}console[_0x557157(0x198)](_0x5be633[_0x557157(0x1d6)]);const _0x28b849=_0x5be633[_0x557157(0x199)](getLatestVersion);let _0x596b87=_0x20f80c;if(!_0x28b849[_0x557157(0x19e)]){console[_0x557157(0x1c7)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x28b849['error']),console['log']('Attempting\x20install\x20anyway...');const _0x179644=await _0x5be633[_0x557157(0x199)](runInstall);if(_0x179644)console['log'](_0x5be633[_0x557157(0x1d3)]),_0x596b87=_0x5be633[_0x557157(0x199)](getCurrentVersion);else throw new Error(_0x557157(0x193)+_0x28b849['error']);}else{const _0x468619=_0x28b849[_0x557157(0x19e)];console[_0x557157(0x198)](_0x557157(0x1b4)+_0x468619);const _0x1a3101=_0x5be633[_0x557157(0x1c0)](compareVersions,_0x20f80c,_0x468619);if(_0x1a3101===0x0)console['log'](_0x5be633[_0x557157(0x1b6)]);else{if(_0x5be633['gCxmI'](_0x1a3101,0x0))console['log']('\x0aYour\x20version\x20('+_0x20f80c+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x468619+').');else{const _0x5dba96=await runInstall();if(_0x5dba96)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x468619),_0x596b87=_0x468619;else throw new Error('Update\x20failed.');}}}await reinstallSkills(_0x596b87);const _0x413bc2=await _0x5be633['EImrV'](isMarketplaceAdded,_0x557157(0x1a2)),_0x398d31=await isPluginInstalled(_0x5be633['TCtIs']);_0x413bc2&&(await _0x5be633['LUAUl'](updateClaudeMarketplace),console['log'](_0x5be633[_0x557157(0x190)]));if(_0x398d31){const _0x2d3d03=await getPluginInfo('ranger@trailhead');_0x5be633[_0x557157(0x1c3)](_0x2d3d03?.[_0x557157(0x1ae)],_0x5be633['IYDqH'])?(await updateClaudePlugin(_0x557157(0x1c9)),console[_0x557157(0x198)]('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).')):(await _0x5be633['LUAUl'](updateClaudePlugin),console[_0x557157(0x198)](_0x557157(0x1bc)));}const _0x4f7d91=await migrateActiveProfileFile();_0x4f7d91&&console['log'](_0x5be633['ZEXPI']);const _0xd884ed=await _0x5be633[_0x557157(0x18c)](ensureActiveProfileGitignored);console['log'](_0x5be633['TkmTa']);}
1
+ (function(_0x2baf7e,_0x7ccc76){const _0x31512c=_0x5907,_0x39c712=_0x2baf7e();while(!![]){try{const _0x47a62d=parseInt(_0x31512c(0x99))/0x1*(parseInt(_0x31512c(0x9e))/0x2)+parseInt(_0x31512c(0x80))/0x3+parseInt(_0x31512c(0x82))/0x4*(-parseInt(_0x31512c(0x6c))/0x5)+parseInt(_0x31512c(0xbc))/0x6+-parseInt(_0x31512c(0x85))/0x7*(parseInt(_0x31512c(0x75))/0x8)+-parseInt(_0x31512c(0x89))/0x9*(-parseInt(_0x31512c(0xa6))/0xa)+-parseInt(_0x31512c(0xbb))/0xb;if(_0x47a62d===_0x7ccc76)break;else _0x39c712['push'](_0x39c712['shift']());}catch(_0xe0f89){_0x39c712['push'](_0x39c712['shift']());}}}(_0x1807,0xbdaad));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{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x1ea59d,_0x9da585,_0x178a36){const _0x1c8d56=_0x5907,_0x2cb9ad={'jyUkI':function(_0x5694d0,_0x45ca9f){return _0x5694d0(_0x45ca9f);},'CQnPm':_0x1c8d56(0xb7),'afFHH':'error'};return new Promise(_0x39909b=>{const _0x1f3bfd=_0x1c8d56,_0x3d5c71={'cvEfm':function(_0x5a38cc,_0x2ddf92){return _0x2cb9ad['jyUkI'](_0x5a38cc,_0x2ddf92);}};let _0x2a597f=![],_0x4842cb;const _0x5f6072=_0x388ca7=>{const _0x4a9415=_0x5907;if(_0x2a597f)return;_0x2a597f=!![],_0x4842cb&&clearTimeout(_0x4842cb),_0x2cb9ad[_0x4a9415(0x79)](_0x39909b,_0x388ca7);},_0x44d060=spawn(_0x1ea59d,_0x9da585,{'stdio':[_0x1f3bfd(0x93),_0x178a36?.['stdio']??_0x2cb9ad[_0x1f3bfd(0x90)],_0x178a36?.['stdio']??_0x2cb9ad['CQnPm']],'cwd':_0x178a36?.[_0x1f3bfd(0xbf)],'shell':process['platform']==='win32'});_0x4842cb=_0x178a36?.[_0x1f3bfd(0xb6)]?setTimeout(()=>{const _0x4d6968=_0x1f3bfd;_0x44d060['kill'](),_0x44d060[_0x4d6968(0x70)](),_0x5f6072(![]);},_0x178a36[_0x1f3bfd(0xb6)]):undefined,_0x44d060['on']('close',_0x3f58c2=>{const _0x2b0d3e=_0x1f3bfd;_0x3d5c71[_0x2b0d3e(0x7e)](_0x5f6072,_0x3f58c2===0x0);}),_0x44d060['on'](_0x2cb9ad[_0x1f3bfd(0x91)],()=>{const _0x1261cf=_0x1f3bfd;_0x3d5c71[_0x1261cf(0x7e)](_0x5f6072,![]);});});}export function resolveDistTag(_0x6c8986){const _0x130537=_0x5907,_0x4ebe4d={'BnzmI':_0x130537(0x9f),'xXWhq':_0x130537(0x67)};if(/-alpha\./i[_0x130537(0xa1)](_0x6c8986))return _0x130537(0x69);if(/-beta\./i['test'](_0x6c8986))return _0x4ebe4d[_0x130537(0x7a)];if(/-rc\./i[_0x130537(0xa1)](_0x6c8986))return'rc';return _0x4ebe4d[_0x130537(0xb1)];}async function runInstall(_0x4fb7d3='latest'){const _0x23897f=_0x5907,_0x500796={'OppKH':function(_0x47efa7,_0x24dfc3){return _0x47efa7(_0x24dfc3);},'zYeFI':function(_0xe37801,_0x3ceef7){return _0xe37801===_0x3ceef7;},'CdESB':function(_0x48a904,_0x2f04bf,_0x33b29b,_0x39555a){return _0x48a904(_0x2f04bf,_0x33b29b,_0x39555a);},'cyTYa':'install','wJeyG':_0x23897f(0xb7),'pPAzf':function(_0x5e3c32,_0x361e89){return _0x5e3c32===_0x361e89;},'yequa':_0x23897f(0xbd),'ITElc':_0x23897f(0xb8)};return new Promise(_0x484392=>{const _0x17685c=_0x23897f,_0xf223b6={'AuAys':function(_0x319877,_0x25496f){return _0x319877(_0x25496f);}};console[_0x17685c(0x9a)](_0x17685c(0x71)+PACKAGE_NAME+'@'+_0x4fb7d3+_0x17685c(0xa5));const _0x102213=_0x500796['CdESB'](spawn,_0x17685c(0xb4),[_0x500796['cyTYa'],'-g',PACKAGE_NAME+'@'+_0x4fb7d3],{'stdio':['ignore',_0x500796['wJeyG'],_0x500796[_0x17685c(0xaf)]],'shell':_0x500796['pPAzf'](process[_0x17685c(0x96)],_0x500796[_0x17685c(0x95)])});_0x102213['on']('close',_0x162f55=>{const _0x3f82c4=_0x17685c;_0x500796[_0x3f82c4(0xaa)](_0x484392,_0x500796['zYeFI'](_0x162f55,0x0));}),_0x102213['on'](_0x500796['ITElc'],()=>{const _0x5c5e0a=_0x17685c;_0xf223b6[_0x5c5e0a(0x81)](_0x484392,![]);});});}async function updateClaudeMarketplace(){const _0x4239e7=_0x5907,_0x24fdc1={'HbgAF':function(_0xd43e87,_0x3faecb,_0x23d199,_0x4696ae){return _0xd43e87(_0x3faecb,_0x23d199,_0x4696ae);},'pypVd':_0x4239e7(0x98),'adqFf':'marketplace','dKMfJ':'update','gPWoL':'trailhead','MISus':_0x4239e7(0xc0)},_0x111698=await _0x24fdc1[_0x4239e7(0xb9)](runCommand,_0x24fdc1['pypVd'],['plugin',_0x24fdc1[_0x4239e7(0x92)],_0x24fdc1['dKMfJ'],_0x24fdc1[_0x4239e7(0xa7)]],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x111698)throw new Error(_0x24fdc1[_0x4239e7(0xad)]);}async function updateClaudePlugin(_0x35a34a='user'){const _0x3f246f=_0x5907,_0x2f4238={'TEsoc':_0x3f246f(0x65),'VRHsb':_0x3f246f(0x7c),'DvNgW':_0x3f246f(0xba),'DoPJz':_0x3f246f(0x7d),'saaNz':function(_0x7c3424,_0x39e6f5){return _0x7c3424===_0x39e6f5;},'jGiKb':'local'},_0x3f754c=[_0x2f4238['TEsoc'],'update','ranger@trailhead'];_0x35a34a!==_0x2f4238['VRHsb']&&_0x3f754c['push'](_0x2f4238[_0x3f246f(0x9d)],_0x35a34a);const _0x556ba3=await runCommand(_0x3f246f(0x98),_0x3f754c,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x35a34a===_0x2f4238[_0x3f246f(0xa2)]||_0x2f4238['saaNz'](_0x35a34a,_0x2f4238['jGiKb'])?getProjectRoot():undefined});if(!_0x556ba3)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x35a34a+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}function isSkillInstalled(_0x2d7ce6,_0x42b5b9,_0x1d1173){const _0x4b4ef7=_0x5907,_0x49e8ab={'WduYd':function(_0x2142a4,_0x3721cf){return _0x2142a4(_0x3721cf);},'rLaqk':function(_0x4a18d5,_0x4e3db1){return _0x4a18d5(_0x4e3db1);}},_0xebfc94=_0x1d1173==='opencode'?getOpencodeSkillsDir(_0x42b5b9):_0x49e8ab['WduYd'](getSkillsDir,_0x42b5b9),_0x5527fd=join(_0xebfc94,_0x2d7ce6);return _0x49e8ab[_0x4b4ef7(0x72)](existsSync,_0x5527fd);}function _0x1807(){const _0x178611=['Update\x20failed\x20for\x20@','timeoutMs','inherit','error','HbgAF','--scope','17008684tHWayY','6857976zVlIwR','win32','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','cwd','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','plugin','Iydmi','latest','findIndex','alpha','ofsRf','\x0aYour\x20version\x20(','178270wEzKDo','Update\x20failed.','active-profile.txt','qyMcQ','unref','\x0aInstalling\x20','rLaqk','OHVfB','OpFMb','8xfAnDO','trim','\x0aReinstalling\x20','sOMhN','jyUkI','BnzmI','active-feature.txt','user','project','cvEfm','DLYtZ','4215735GrGGYC','AuAys','44VVvHNw','ezuPA','split','6735785XMhDHW','\x0aSuccessfully\x20updated\x20to\x20version\x20','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','zZivP','473211JfMNqx','\x20channel.','\x20skill\x20','qghmZ','zvrZw','YBkWN','jCvIq','CQnPm','afFHH','adqFf','ignore','gZnEk','yequa','platform','\x0aCould\x20not\x20check\x20latest\x20version:\x20','claude','40483KclnNw','log','Update\x20failed:\x20','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','DvNgW','48idEntt','beta','gdzRX','test','DoPJz','IwEVv','vckXG','...\x0a','30uZphyF','gPWoL','Yvcjj','sYskB','OppKH','warn',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','MISus','yDpNB','wJeyG','\x0aSuccessfully\x20installed\x20latest\x20version.','xXWhq','Attempting\x20install\x20anyway...','Prerelease\x20channel\x20detected\x20(@','npm'];_0x1807=function(){return _0x178611;};return _0x1807();}async function reinstallSkills(_0x1e3a85){const _0xa8b06f=_0x5907,_0x3a53d6={'vckXG':_0xa8b06f(0x7d),'DLYtZ':_0xa8b06f(0x7c),'qyMcQ':'claude','sYskB':'opencode','miihQ':_0xa8b06f(0xbe)},_0x35d32c=[_0x3a53d6[_0xa8b06f(0xa4)],_0x3a53d6[_0xa8b06f(0x7f)]],_0x5ced87=[];for(const _0x1f6dec of _0x35d32c){for(const _0x3fbc37 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x3fbc37,_0x1f6dec,_0x3a53d6[_0xa8b06f(0x6f)])&&_0x5ced87['push']({'skillName':_0x3fbc37,'level':_0x1f6dec,'platform':_0xa8b06f(0x98)}),isSkillInstalled(_0x3fbc37,_0x1f6dec,'opencode')&&_0x5ced87['push']({'skillName':_0x3fbc37,'level':_0x1f6dec,'platform':_0x3a53d6[_0xa8b06f(0xa9)]});}}for(const _0x11ecff of _0x35d32c){for(const _0x3e2c4f of DEPRECATED_SKILLS){await removeSkill(_0x3e2c4f,_0x11ecff);}}if(_0x5ced87['length']===0x0){console['log'](_0x3a53d6['miihQ']);return;}console[_0xa8b06f(0x9a)](_0xa8b06f(0x77)+_0x5ced87['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x49ea43,level:_0x26502d,platform:_0x29ab45}of _0x5ced87){try{await installSkill(_0x49ea43,{'level':_0x26502d,'cliVersion':_0x1e3a85,'platform':_0x29ab45});}catch(_0x4cb18b){console[_0xa8b06f(0xab)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x29ab45+'\x20'+_0x26502d+_0xa8b06f(0x8b)+_0x49ea43+':',_0x4cb18b);}}}async function ensureActiveProfileGitignored(){const _0x527c2a=_0x5907,_0x3de361={'tFVtr':function(_0x25ae8e){return _0x25ae8e();},'zvrZw':'.gitignore','ofsRf':function(_0x53347a,_0x3eb720){return _0x53347a(_0x3eb720);},'RKSiz':function(_0x405059,_0x17c621,_0xe4b5c0){return _0x405059(_0x17c621,_0xe4b5c0);},'gZnEk':'utf-8','nToMo':function(_0xe2dbbf,_0x27b449){return _0xe2dbbf===_0x27b449;},'OpFMb':'active-profile.txt'},_0x25319e=join(_0x3de361['tFVtr'](getRangerDir),_0x3de361[_0x527c2a(0x8d)]);if(!_0x3de361[_0x527c2a(0x6a)](existsSync,_0x25319e))return![];let _0x2d2085='';try{_0x2d2085=await _0x3de361['RKSiz'](readFile,_0x25319e,_0x3de361[_0x527c2a(0x94)]);}catch{return![];}const _0x16304a=_0x2d2085[_0x527c2a(0x84)](/\r?\n/);if(_0x16304a['some'](_0x4da785=>_0x4da785['trim']()===_0x527c2a(0x6e)))return![];let _0x4995d6=_0x16304a[_0x527c2a(0x68)](_0x7ea45a=>_0x7ea45a[_0x527c2a(0x76)]()===_0x527c2a(0x7b));_0x3de361['nToMo'](_0x4995d6,-0x1)&&(_0x4995d6=_0x16304a['length']);_0x16304a['splice'](_0x4995d6,0x0,_0x3de361[_0x527c2a(0x74)]);let _0x2b49ab=_0x16304a['join']('\x0a');!_0x2b49ab['endsWith']('\x0a')&&(_0x2b49ab+='\x0a');try{await writeFile(_0x25319e,_0x2b49ab,_0x3de361[_0x527c2a(0x94)]);}catch{return![];}return!![];}function _0x5907(_0x4c9ff2,_0x4c6cec){_0x4c9ff2=_0x4c9ff2-0x65;const _0x180723=_0x1807();let _0x5907f0=_0x180723[_0x4c9ff2];return _0x5907f0;}export async function update(){const _0x4d4429=_0x5907,_0x2c4d33={'ezuPA':function(_0x2f16b4){return _0x2f16b4();},'bAxkS':function(_0xbac0c8,_0x2540bd){return _0xbac0c8(_0x2540bd);},'Yvcjj':function(_0x2eb952,_0x5b649d){return _0x2eb952!==_0x5b649d;},'yMjGu':'latest','zZivP':function(_0x2fdc26,_0x1b31d2){return _0x2fdc26(_0x1b31d2);},'mmYRi':'\x0a✅\x20Update\x20complete!','qghmZ':'Checking\x20for\x20updates...','gdzRX':function(_0x5b62dd){return _0x5b62dd();},'Iydmi':_0x4d4429(0xb2),'gMJvt':function(_0x554113,_0x3656f3,_0x284218){return _0x554113(_0x3656f3,_0x284218);},'yIQlH':function(_0x30bbb2,_0x40124b){return _0x30bbb2===_0x40124b;},'sOMhN':_0x4d4429(0x6d),'zjkFn':function(_0x2e7721,_0x2eca66){return _0x2e7721(_0x2eca66);},'yDpNB':_0x4d4429(0x87),'IwEVv':function(_0x542876,_0x82f637){return _0x542876(_0x82f637);},'jCvIq':_0x4d4429(0x7c),'XAnNE':function(_0x1d3e9f,_0x37e1eb){return _0x1d3e9f===_0x37e1eb;},'YBkWN':'project','OHVfB':'local','nHWOJ':_0x4d4429(0x9c)},_0x1dc579=_0x2c4d33['ezuPA'](getCurrentVersion);console[_0x4d4429(0x9a)]('\x0aCurrent\x20version:\x20'+_0x1dc579);const _0x5cdf8c=_0x2c4d33['bAxkS'](resolveDistTag,_0x1dc579);if(_0x2c4d33[_0x4d4429(0xa8)](_0x5cdf8c,_0x2c4d33['yMjGu'])){console['log'](_0x4d4429(0xb3)+_0x5cdf8c+').\x20Staying\x20on\x20'+_0x5cdf8c+'\x20—\x20reinstalling\x20@'+_0x5cdf8c+'...');const _0xaada8f=await runInstall(_0x5cdf8c);if(!_0xaada8f)throw new Error(_0x4d4429(0xb5)+_0x5cdf8c+_0x4d4429(0x8a));const _0x147ab9=getCurrentVersion();console[_0x4d4429(0x9a)]('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x5cdf8c+'.'),await _0x2c4d33[_0x4d4429(0x88)](reinstallSkills,_0x147ab9),await ensureActiveProfileGitignored(),console[_0x4d4429(0x9a)](_0x2c4d33['mmYRi']);return;}console[_0x4d4429(0x9a)](_0x2c4d33[_0x4d4429(0x8c)]);const _0x5f0b22=_0x2c4d33[_0x4d4429(0xa0)](getLatestVersion);let _0x443f3d=_0x1dc579;if(!_0x5f0b22['version']){console[_0x4d4429(0xab)](_0x4d4429(0x97)+_0x5f0b22[_0x4d4429(0xb8)]),console[_0x4d4429(0x9a)](_0x2c4d33[_0x4d4429(0x66)]);const _0xf35c2d=await runInstall();if(_0xf35c2d)console['log'](_0x4d4429(0xb0)),_0x443f3d=_0x2c4d33[_0x4d4429(0x83)](getCurrentVersion);else throw new Error(_0x4d4429(0x9b)+_0x5f0b22[_0x4d4429(0xb8)]);}else{const _0x19886d=_0x5f0b22['version'];console[_0x4d4429(0x9a)]('Latest\x20version:\x20\x20'+_0x19886d);const _0x318c09=_0x2c4d33['gMJvt'](compareVersions,_0x1dc579,_0x19886d);if(_0x2c4d33['yIQlH'](_0x318c09,0x0))console[_0x4d4429(0x9a)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x318c09<0x0)console['log'](_0x4d4429(0x6b)+_0x1dc579+_0x4d4429(0xac)+_0x19886d+').');else{const _0x268ec7=await runInstall();if(_0x268ec7)console[_0x4d4429(0x9a)](_0x4d4429(0x86)+_0x19886d),_0x443f3d=_0x19886d;else throw new Error(_0x2c4d33[_0x4d4429(0x78)]);}}}await _0x2c4d33['zjkFn'](reinstallSkills,_0x443f3d);const _0x1a15d0=await _0x2c4d33['zjkFn'](isMarketplaceAdded,'trailhead'),_0x3357ad=await _0x2c4d33['zZivP'](isPluginInstalled,'ranger@trailhead');_0x1a15d0&&(await _0x2c4d33['ezuPA'](updateClaudeMarketplace),console['log'](_0x2c4d33[_0x4d4429(0xae)]));if(_0x3357ad){const _0xddf485=await _0x2c4d33[_0x4d4429(0xa3)](getPluginInfo,'ranger@trailhead'),_0x162192=_0xddf485?.['scope']??_0x2c4d33[_0x4d4429(0x8f)];await _0x2c4d33['zjkFn'](updateClaudePlugin,_0x162192);if(_0x2c4d33['XAnNE'](_0x162192,_0x2c4d33[_0x4d4429(0x8e)]))console['log']('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).');else _0x162192===_0x2c4d33[_0x4d4429(0x73)]?console['log']('\x0aClaude\x20plugin\x20updated\x20(local\x20scope).'):console[_0x4d4429(0x9a)](_0x2c4d33['nHWOJ']);}const _0x2587cb=await _0x2c4d33['ezuPA'](ensureActiveProfileGitignored);console[_0x4d4429(0x9a)](_0x2c4d33['mmYRi']);}
@@ -1 +1 @@
1
- (function(_0x38617e,_0x4de5db){const _0x2342f9=_0x4cd6,_0x1dafa7=_0x38617e();while(!![]){try{const _0x88d320=parseInt(_0x2342f9(0x14e))/0x1+-parseInt(_0x2342f9(0x15e))/0x2*(parseInt(_0x2342f9(0x13e))/0x3)+parseInt(_0x2342f9(0x15a))/0x4*(parseInt(_0x2342f9(0x158))/0x5)+-parseInt(_0x2342f9(0x154))/0x6*(-parseInt(_0x2342f9(0x14d))/0x7)+parseInt(_0x2342f9(0x12d))/0x8*(-parseInt(_0x2342f9(0x15c))/0x9)+parseInt(_0x2342f9(0x144))/0xa*(-parseInt(_0x2342f9(0x13c))/0xb)+parseInt(_0x2342f9(0x137))/0xc*(-parseInt(_0x2342f9(0x13a))/0xd);if(_0x88d320===_0x4de5db)break;else _0x1dafa7['push'](_0x1dafa7['shift']());}catch(_0x4992ba){_0x1dafa7['push'](_0x1dafa7['shift']());}}}(_0x2863,0xd6091));function _0x2863(){const _0x110e5b=['auth.json','browser_auth','317884qnHRPL','1503571ecTiZO','browser','log','DiqIb','safeMode','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','132WZFBvt','\x22\x20authentication\x20updated','parse','trackPhaseStart','45JOsUno','storageState','533076Jitesy','\x0a📋\x20Authentication\x20Update','513vfwNce','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','743770MdqqTS','catch','CrqKh','lOQEE','extraHTTPHeaders','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','baseUrl','isTTY','179152noahPD','stdout','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','RBsIB','Config\x20not\x20found\x20at\x20','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','✓\x20Updated\x20config:\x20','zfgQY','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','12696oDuQth','WxFPu','about:blank','1144wdewsQ','HnNoK','33ibCZyz','Saving\x20authentication\x20state...','6UucNrw','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','mLlet','GoaAC','tsbWS','YBYmd','2373450mNasWw','setupHeaders','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','contextOptions','DAVxN','IzFMJ','EWpgM'];_0x2863=function(){return _0x110e5b;};return _0x2863();}function _0x4cd6(_0x123e9c,_0x40ee0a){_0x123e9c=_0x123e9c-0x129;const _0x286363=_0x2863();let _0x4cd6b9=_0x286363[_0x123e9c];return _0x4cd6b9;}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';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x3f4d11,_0x383b32,_0x18c9a0){const _0x580fd1=_0x4cd6,_0x1d22fa={'zfgQY':function(_0x321d70){return _0x321d70();},'bPqNB':'close','meoAK':'settings.json','HnNoK':function(_0x2ef6ef,_0x188cbd,_0x44650d){return _0x2ef6ef(_0x188cbd,_0x44650d);},'sWrIj':_0x580fd1(0x14b),'CrqKh':function(_0x520cdf,_0x3b96e3){return _0x520cdf+_0x3b96e3;},'KEEsA':function(_0x29e02f,_0x32de75){return _0x29e02f(_0x32de75);},'lOQEE':function(_0xb84b16,_0x3a5852){return _0xb84b16===_0x3a5852;},'YBYmd':function(_0x1d40e9,_0x24d932){return _0x1d40e9(_0x24d932);},'WxFPu':_0x580fd1(0x14c),'MHGqh':_0x580fd1(0x15b),'IzFMJ':_0x580fd1(0x13f),'IGMUQ':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','CbOEj':function(_0x514000,_0x10dc21){return _0x514000||_0x10dc21;},'DAVxN':_0x580fd1(0x139),'RBsIB':_0x580fd1(0x12a),'tsbWS':_0x580fd1(0x133),'GoaAC':function(_0x5d2a73,_0x432de3,_0xa9ebce){return _0x5d2a73(_0x432de3,_0xa9ebce);},'lbLUL':'utf-8','oqeFk':_0x580fd1(0x15d),'EWpgM':function(_0x6c271b,_0x4b8ee0,_0x2e1382){return _0x6c271b(_0x4b8ee0,_0x2e1382);},'VFfzz':'\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','mLlet':'config_write','DiqIb':function(_0x30ed7f,_0x3fde2d,_0x9f49bc){return _0x30ed7f(_0x3fde2d,_0x9f49bc);}},_0xf6188d=getEnvDir(_0x3f4d11),_0x5ea617=join(_0xf6188d,_0x1d22fa['meoAK']),_0x170723=_0x1d22fa[_0x580fd1(0x13b)](join,_0xf6188d,_0x1d22fa['sWrIj']),_0x79325e=_0x1d22fa[_0x580fd1(0x160)](_0x170723,'.enc'),_0x6ac555=process['stdin'][_0x580fd1(0x12c)]&&process[_0x580fd1(0x12e)][_0x580fd1(0x12c)];if(!_0x6ac555)throw new Error(_0x580fd1(0x12f));if(!existsSync(_0xf6188d))throw new Error('Profile\x20\x22'+_0x3f4d11+_0x580fd1(0x136)+_0x3f4d11);if(!_0x1d22fa['KEEsA'](existsSync,_0x5ea617))throw new Error(_0x580fd1(0x131)+_0x5ea617+_0x580fd1(0x132)+_0x3f4d11);const _0x2d73ab=await _0x1d22fa['HnNoK'](readFile,_0x5ea617,'utf-8'),_0x8b1b2f=JSON[_0x580fd1(0x156)](_0x2d73ab),_0x461957=resolveEnvVars(_0x8b1b2f),_0x1834bf=_0x1d22fa['lOQEE'](typeof _0x461957[_0x580fd1(0x12b)],'string')?_0x461957['baseUrl']:undefined,_0x29d1d2=existsSync(_0x170723),_0xf95774=_0x1d22fa[_0x580fd1(0x143)](isEnvCi,_0x3f4d11);_0x383b32?.['trackPhaseStart'](_0x1d22fa[_0x580fd1(0x138)]),console['log'](_0x1d22fa['MHGqh']),console[_0x580fd1(0x150)](_0x1d22fa[_0x580fd1(0x149)]),console['log'](_0x580fd1(0x146)),console['log'](_0x1d22fa['IGMUQ']);const {launchOptions:_0x3ddcb1,contextOptions:_0x3e21f1}=buildBrowserOptionsFromSettings(_0x461957,{'headless':![],'storageStatePath':_0x29d1d2?_0x170723:undefined});_0x461957[_0x580fd1(0x145)]&&(_0x3e21f1['extraHTTPHeaders']={..._0x3e21f1[_0x580fd1(0x129)],..._0x461957['setupHeaders']});const _0x32a484=await chromium['launch'](_0x3ddcb1);let _0x3a3dcf=null;try{_0x3a3dcf=await _0x32a484['newContext'](_0x3e21f1),await _0x1d22fa['KEEsA'](addProfileSetupBanner,_0x3a3dcf);const _0x7fa169=await _0x3a3dcf['newPage']();await _0x7fa169['goto'](_0x1d22fa['CbOEj'](_0x1834bf,_0x1d22fa[_0x580fd1(0x148)]));let _0x5ed30b=![];await new Promise(_0x4a7f9c=>{_0x7fa169['on'](_0x1d22fa['bPqNB'],async()=>{const _0x998eaa=_0x4cd6;try{console['log'](_0x998eaa(0x13d)),await _0x3a3dcf?.['storageState']({'path':_0x170723}),_0x5ed30b=!![];}catch{}_0x1d22fa[_0x998eaa(0x135)](_0x4a7f9c);});});if(!_0x5ed30b){console[_0x580fd1(0x150)](_0x580fd1(0x153));!_0x461957[_0x580fd1(0x152)]&&(console[_0x580fd1(0x150)](_0x1d22fa[_0x580fd1(0x130)]),console['log']('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x3f4d11+'\x20safeMode\x20true\x0a'));throw new Error(_0x1d22fa[_0x580fd1(0x142)]);}}finally{_0x3a3dcf&&await _0x3a3dcf['close']()['catch'](()=>{}),await _0x32a484['close']()[_0x580fd1(0x15f)](()=>{});}if(_0xf95774){const _0x227019=await _0x1d22fa[_0x580fd1(0x141)](readFile,_0x170723,_0x1d22fa['lbLUL']),_0xf59f34=await _0x1d22fa['zfgQY'](getToken);if(!_0xf59f34)console['error'](_0x1d22fa['oqeFk']),console[_0x580fd1(0x150)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x170723);else{const _0x29c9f5=_0x1d22fa[_0x580fd1(0x14a)](encrypt,_0x227019,_0xf59f34);await writeFile(_0x79325e,_0x29c9f5),await unlink(_0x170723),console['log']('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x79325e),console['log']('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console[_0x580fd1(0x150)](_0x1d22fa['VFfzz']);}}else console[_0x580fd1(0x150)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x170723);_0x383b32?.['trackPhaseEnd'](_0x1d22fa[_0x580fd1(0x138)]),_0x383b32?.[_0x580fd1(0x157)](_0x1d22fa[_0x580fd1(0x140)]),_0x8b1b2f[_0x580fd1(0x14f)]=_0x8b1b2f['browser']||{},_0x8b1b2f['browser'][_0x580fd1(0x147)]=_0x8b1b2f['browser']['contextOptions']||{},_0x8b1b2f['browser'][_0x580fd1(0x147)][_0x580fd1(0x159)]=_0x170723,_0x1d22fa[_0x580fd1(0x161)](_0x18c9a0?.['allowInsecureLocalhost'],!![])&&(_0x8b1b2f['allowInsecureLocalhost']=!![]),await _0x1d22fa[_0x580fd1(0x151)](writeFile,_0x5ea617,JSON['stringify'](_0x8b1b2f,null,0x2)),console['log'](_0x580fd1(0x134)+_0x5ea617),_0x383b32?.['trackPhaseEnd']('config_write'),console[_0x580fd1(0x150)]('\x0a✅\x20Profile\x20\x22'+_0x3f4d11+_0x580fd1(0x155));}
1
+ (function(_0x4ae3a1,_0x4853b3){const _0x335bbf=_0x45d4,_0x8e7989=_0x4ae3a1();while(!![]){try{const _0x25fe49=-parseInt(_0x335bbf(0x1f1))/0x1*(parseInt(_0x335bbf(0x1fd))/0x2)+-parseInt(_0x335bbf(0x1ff))/0x3+-parseInt(_0x335bbf(0x1fc))/0x4*(-parseInt(_0x335bbf(0x20b))/0x5)+parseInt(_0x335bbf(0x20d))/0x6+-parseInt(_0x335bbf(0x201))/0x7*(-parseInt(_0x335bbf(0x1ee))/0x8)+-parseInt(_0x335bbf(0x202))/0x9*(-parseInt(_0x335bbf(0x206))/0xa)+parseInt(_0x335bbf(0x209))/0xb*(-parseInt(_0x335bbf(0x203))/0xc);if(_0x25fe49===_0x4853b3)break;else _0x8e7989['push'](_0x8e7989['shift']());}catch(_0x4e0ad7){_0x8e7989['push'](_0x8e7989['shift']());}}}(_0xa292,0x9d908));import{fetchAuthConfig,fetchCloudProfile,manualBrowserLogin,serverSideLogin}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';function _0x45d4(_0x2a5a52,_0x2033ab){_0x2a5a52=_0x2a5a52-0x1ea;const _0xa29247=_0xa292();let _0x45d4f5=_0xa29247[_0x2a5a52];return _0x45d4f5;}import{getEnvNames}from'./env.js';export async function updateEnv(_0x2e1768,_0x17d56b,_0x5acb90){const _0x5aacda=_0x45d4,_0x3ff9b1={'wXNNS':function(_0x2b3a91,_0x4e1709){return _0x2b3a91(_0x4e1709);},'NNBnS':function(_0x1818c5,_0x7109e1){return _0x1818c5===_0x7109e1;},'vQZXA':'local','pghDY':function(_0x1ea478,_0x225244){return _0x1ea478+_0x225244;},'vEwOl':function(_0x43d993){return _0x43d993();},'AgPfv':function(_0x26d1a2,_0x1f786c,_0x5ebad5){return _0x26d1a2(_0x1f786c,_0x5ebad5);},'zAclL':'success','KJVWl':'not_configured','UZjza':_0x5aacda(0x1fb),'BBKAg':_0x5aacda(0x205)},_0x10d44c=await _0x3ff9b1['wXNNS'](fetchCloudProfile,_0x2e1768);if(!_0x10d44c){const {envTypes:_0xd37389}=await getEnvNames(),_0x6875a=_0xd37389[_0x2e1768];(_0x6875a==='legacy'||_0x3ff9b1['NNBnS'](_0x6875a,_0x3ff9b1[_0x5aacda(0x20a)])||_0x6875a==='ci')&&(console['error'](_0x5aacda(0x1f5)+_0x2e1768+'\x22\x20is\x20a\x20legacy\x20on-disk\x20profile\x20and\x20can\x20no\x20longer\x20be\x20refreshed\x20in\x20place.\x0a'+_0x5aacda(0x20c)+'\x0a'+('\x20\x20ranger\x20profile\x20add\x20'+_0x2e1768+'\x0a')),process[_0x5aacda(0x1f8)](0x1));}!_0x10d44c&&(console[_0x5aacda(0x1ef)](_0x3ff9b1['pghDY'](_0x5aacda(0x1f3)+_0x2e1768+'\x22\x20found.\x0a'+'Create\x20it\x20with:\x0a','\x0a')+('\x20\x20ranger\x20profile\x20add\x20'+_0x2e1768+'\x0a')),process['exit'](0x1));const _0x28554f=await _0x3ff9b1[_0x5aacda(0x208)](fetchAuthConfig)[_0x5aacda(0x1eb)](()=>null),_0x1a4849=_0x10d44c['environmentKey']&&_0x28554f?resolveAuthEnvironmentLocally(_0x28554f,_0x10d44c['environmentKey']):null;if(_0x10d44c[_0x5aacda(0x1f6)]&&_0x1a4849){console[_0x5aacda(0x1fe)]('Refreshing\x20session\x20for\x20\x22'+_0x2e1768+_0x5aacda(0x200));try{const _0x4a76a9=await _0x3ff9b1['AgPfv'](serverSideLogin,_0x2e1768,{'force':!![]});if(_0x4a76a9['status']===_0x3ff9b1['zAclL']){console['log'](_0x5aacda(0x1f0)+_0x2e1768+'\x22.');return;}_0x4a76a9[_0x5aacda(0x1fa)]===_0x3ff9b1['KJVWl']?console[_0x5aacda(0x1fe)]('\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20headed\x20browser...'):(_0x4a76a9[_0x5aacda(0x1f4)]&&(console['log'](_0x3ff9b1[_0x5aacda(0x1ec)]),console[_0x5aacda(0x1fe)](_0x4a76a9[_0x5aacda(0x1f4)])),console[_0x5aacda(0x1fe)](_0x5aacda(0x205)));}catch(_0x130aa7){console['log']('\x20\x20Server-side\x20login\x20error:\x20'+(_0x130aa7 instanceof Error?_0x130aa7['message']:String(_0x130aa7))),console['log'](_0x3ff9b1['BBKAg']);}}const _0x477510=_0x10d44c[_0x5aacda(0x1f2)]??{},_0x21eb8b=_0x477510['setupHeaders'],_0x5e0c5a=_0x477510['baseUrl'],_0x75d68e=_0x1a4849?{..._0x1a4849,'setupHeaders':_0x21eb8b??_0x1a4849[_0x5aacda(0x1f9)]}:_0x5e0c5a?{'key':_0x10d44c[_0x5aacda(0x1f6)]??'','domains':[_0x5e0c5a],'setupHeaders':_0x21eb8b}:null;!_0x75d68e&&(console[_0x5aacda(0x1ef)](_0x3ff9b1['pghDY'](_0x5aacda(0x1f5)+_0x2e1768+'\x22\x20has\x20no\x20environment_key\x20and\x20no\x20baseUrl\x20set\x20—\x20there\x27s\x20nothing\x20to\x20refresh\x20against.\x0a'+'Re-create\x20it\x20with:\x0a'+'\x0a','\x20\x20ranger\x20profile\x20add\x20'+_0x2e1768+'\x0a')),process[_0x5aacda(0x1f8)](0x1)),(!process[_0x5aacda(0x207)][_0x5aacda(0x1ea)]||!process['stdout']['isTTY'])&&(console[_0x5aacda(0x1ef)](_0x5aacda(0x1ed)+_0x2e1768+'\x22\x20non-interactively\x20—\x20this\x20profile\x20needs\x20a\x20headed\x20browser\x20to\x20capture\x20a\x20session.\x0a'+(_0x5aacda(0x204)+_0x2e1768+'`\x20from\x20a\x20local\x20terminal,\x20or\x20set\x20up\x20automated\x20login\x20for\x20your\x20team\x20(contact\x20eng@ranger.net).')),process[_0x5aacda(0x1f8)](0x1)),console['log']('Capturing\x20a\x20fresh\x20session\x20for\x20\x22'+_0x2e1768+'\x22\x20via\x20headed\x20browser...'),await _0x3ff9b1[_0x5aacda(0x1f7)](manualBrowserLogin,_0x10d44c,_0x75d68e),console['log'](_0x5aacda(0x1f0)+_0x2e1768+'\x22.');}function _0xa292(){const _0x2e4ade=['33GfXMUa','vQZXA','10UtmZIb','Migrate\x20it\x20to\x20a\x20cloud\x20profile\x20by\x20running:\x0a','4586964xBtzHW','isTTY','catch','UZjza','Can\x27t\x20refresh\x20\x22','66704fbwteT','error','✓\x20Session\x20refreshed\x20for\x20\x22','1427pVaVzu','settings','No\x20profile\x20named\x20\x22','test_output','Profile\x20\x22','environmentKey','AgPfv','exit','setupHeaders','status','\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:','703132TTlgQr','914zcsdaw','log','3020445vYgPau','\x22\x20via\x20server-side\x20login...','931cgtgiv','1463787lWtroi','333276HuNBiH','Run\x20`ranger\x20profile\x20update\x20','\x20\x20Falling\x20back\x20to\x20headed\x20browser...','10bwDpPB','stdin','vEwOl'];_0xa292=function(){return _0x2e4ade;};return _0xa292();}
@@ -1 +1 @@
1
- (function(_0x2166c2,_0x19c6fb){const _0x1ec136=_0x3660,_0x5aad10=_0x2166c2();while(!![]){try{const _0x147564=parseInt(_0x1ec136(0x75))/0x1*(parseInt(_0x1ec136(0x73))/0x2)+-parseInt(_0x1ec136(0x6d))/0x3+parseInt(_0x1ec136(0x71))/0x4+-parseInt(_0x1ec136(0x70))/0x5*(-parseInt(_0x1ec136(0x78))/0x6)+-parseInt(_0x1ec136(0x72))/0x7*(parseInt(_0x1ec136(0x74))/0x8)+-parseInt(_0x1ec136(0x6f))/0x9*(-parseInt(_0x1ec136(0x76))/0xa)+-parseInt(_0x1ec136(0x7c))/0xb;if(_0x147564===_0x19c6fb)break;else _0x5aad10['push'](_0x5aad10['shift']());}catch(_0x52b6d7){_0x5aad10['push'](_0x5aad10['shift']());}}}(_0x49c0,0x1e139));import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';function _0x3660(_0x52da70,_0x988f3e){_0x52da70=_0x52da70-0x69;const _0x49c023=_0x49c0();let _0x366089=_0x49c023[_0x52da70];return _0x366089;}export async function useEnv(_0x1ed383){const _0x1657ae=_0x3660,_0x393c81={'QeLLt':function(_0x506a07,_0x108bf5){return _0x506a07(_0x108bf5);},'mvszV':function(_0x41a3f7,_0x40ef0e,_0x1a708d){return _0x41a3f7(_0x40ef0e,_0x1a708d);},'hHoDh':'settings.json','xiRAd':function(_0x788dde,_0x4d764c){return _0x788dde instanceof _0x4d764c;},'FPYaO':function(_0x388785,_0x5ca50e){return _0x388785===_0x5ca50e;},'HIvhg':function(_0x3ad991,_0x21d589){return _0x3ad991+_0x21d589;}},_0x519742=_0x393c81[_0x1657ae(0x7b)](getEnvDir,_0x1ed383),_0x2aa2f1=_0x393c81[_0x1657ae(0x6b)](join,_0x519742,_0x393c81['hHoDh']),_0x59ee8c=_0x393c81['QeLLt'](existsSync,_0x519742)&&existsSync(_0x2aa2f1);if(_0x59ee8c){await _0x393c81['QeLLt'](writeActiveProfileName,_0x1ed383),console[_0x1657ae(0x77)](_0x1657ae(0x7a)+_0x1ed383+'\x22');return;}let _0x3e1e0f=null,_0x418a57=![];try{_0x3e1e0f=await fetchCloudProfile(_0x1ed383);if(!_0x3e1e0f)_0x418a57=!![];}catch(_0x4887f5){_0x393c81[_0x1657ae(0x6e)](_0x4887f5,ApiError)&&_0x393c81['FPYaO'](_0x4887f5[_0x1657ae(0x6c)],0x194)&&(_0x418a57=!![]);}if(_0x418a57)throw new Error(_0x393c81['HIvhg'](_0x393c81[_0x1657ae(0x79)]('Profile\x20\x22'+_0x1ed383+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20',_0x1657ae(0x6a)),_0x1657ae(0x69)+_0x1ed383+'`\x20to\x20create\x20one.'));await writeActiveProfileName(_0x1ed383),console[_0x1657ae(0x77)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x1ed383+'\x22');}function _0x49c0(){const _0x55402c=['log','377250imVnRk','HIvhg','\x0a✓\x20Now\x20using\x20profile\x20\x22','QeLLt','3772494ySElTr','`ranger\x20profile\x20add\x20','Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','mvszV','status','497262AHGYpq','xiRAd','9nBZxEg','10HKjbxr','786516xhHwrR','14273XjVTZB','454358INGeUn','176Dadtsh','1qDESPc','1272010SbDCvm'];_0x49c0=function(){return _0x55402c;};return _0x49c0();}
1
+ (function(_0x521fe0,_0xe82591){const _0x44aa8d=_0x4582,_0x513941=_0x521fe0();while(!![]){try{const _0x5e0d58=parseInt(_0x44aa8d(0x1ec))/0x1*(parseInt(_0x44aa8d(0x1f1))/0x2)+-parseInt(_0x44aa8d(0x1ee))/0x3+parseInt(_0x44aa8d(0x1f0))/0x4+parseInt(_0x44aa8d(0x1f9))/0x5*(parseInt(_0x44aa8d(0x1fb))/0x6)+parseInt(_0x44aa8d(0x1eb))/0x7+parseInt(_0x44aa8d(0x1f7))/0x8*(-parseInt(_0x44aa8d(0x1f3))/0x9)+parseInt(_0x44aa8d(0x1f6))/0xa*(-parseInt(_0x44aa8d(0x1f4))/0xb);if(_0x5e0d58===_0xe82591)break;else _0x513941['push'](_0x513941['shift']());}catch(_0x40c700){_0x513941['push'](_0x513941['shift']());}}}(_0x5d31,0x3fefe));function _0x4582(_0x5c210b,_0x3a560c){_0x5c210b=_0x5c210b-0x1eb;const _0x5d31b5=_0x5d31();let _0x4582d6=_0x5d31b5[_0x5c210b];return _0x4582d6;}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x5d31(){const _0x2a70a2=['2456370EfXedj','41AQOKSl','settings.json','154464gweWZY','Pdnbw','860304yXcOqU','16636xEUdpE','aCCWo','157293UuKcLy','66skwnqb','log','1316350yLsjVv','104ZTrLwi','\x0a✓\x20Now\x20using\x20profile\x20\x22','1165ohBIjm','`ranger\x20profile\x20add\x20','10902nhUjqH'];_0x5d31=function(){return _0x2a70a2;};return _0x5d31();}import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x2dc41e){const _0x48d79f=_0x4582,_0x668514={'jliqR':function(_0x306163,_0xf743ed){return _0x306163(_0xf743ed);},'SBjWu':function(_0x68f6a6,_0x324d7c,_0x4f087d){return _0x68f6a6(_0x324d7c,_0x4f087d);},'aCCWo':function(_0xdc6bc5,_0x4c368c){return _0xdc6bc5(_0x4c368c);},'Pdnbw':function(_0x1ded4b,_0x364b92){return _0x1ded4b===_0x364b92;},'rvVNY':function(_0x345feb,_0x1f30b2){return _0x345feb+_0x1f30b2;}},_0x24e810=_0x668514['jliqR'](getEnvDir,_0x2dc41e),_0x474705=_0x668514['SBjWu'](join,_0x24e810,_0x48d79f(0x1ed)),_0x33fab1=existsSync(_0x24e810)&&_0x668514[_0x48d79f(0x1f2)](existsSync,_0x474705);if(_0x33fab1){await writeActiveProfileName(_0x2dc41e),console[_0x48d79f(0x1f5)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x2dc41e+'\x22');return;}let _0x3f6850=null,_0x206221=![];try{_0x3f6850=await _0x668514['jliqR'](fetchCloudProfile,_0x2dc41e);if(!_0x3f6850)_0x206221=!![];}catch(_0x5bae0e){_0x5bae0e instanceof ApiError&&_0x668514[_0x48d79f(0x1ef)](_0x5bae0e['status'],0x194)&&(_0x206221=!![]);}if(_0x206221)throw new Error(_0x668514['rvVNY']('Profile\x20\x22'+_0x2dc41e+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20','Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20')+(_0x48d79f(0x1fa)+_0x2dc41e+'`\x20to\x20create\x20one.'));await writeActiveProfileName(_0x2dc41e),console['log'](_0x48d79f(0x1f8)+_0x2dc41e+'\x22');}
@@ -1 +1 @@
1
- const _0xc879f5=_0x5a78;(function(_0x4d15ed,_0x402829){const _0x51e8e0=_0x5a78,_0x135375=_0x4d15ed();while(!![]){try{const _0x2dc159=parseInt(_0x51e8e0(0x127))/0x1*(-parseInt(_0x51e8e0(0x122))/0x2)+-parseInt(_0x51e8e0(0x12d))/0x3*(parseInt(_0x51e8e0(0x121))/0x4)+parseInt(_0x51e8e0(0x125))/0x5*(-parseInt(_0x51e8e0(0x11f))/0x6)+-parseInt(_0x51e8e0(0x11e))/0x7*(parseInt(_0x51e8e0(0x130))/0x8)+-parseInt(_0x51e8e0(0x12c))/0x9+parseInt(_0x51e8e0(0x120))/0xa+-parseInt(_0x51e8e0(0x126))/0xb*(-parseInt(_0x51e8e0(0x12f))/0xc);if(_0x2dc159===_0x402829)break;else _0x135375['push'](_0x135375['shift']());}catch(_0x343301){_0x135375['push'](_0x135375['shift']());}}}(_0x5381,0xa3b92));import{existsSync}from'fs';function _0x5381(){const _0x325d82=['PWIlB','bwosB','DEicO','3832704nxfRTm','45YwRXtj','svqtX','4188aHaHHX','8RBPDCw','RATYQ','active-env.txt','oQwJH','aKMOI','VnePN','1849673IpAdUn','11202zPDzlt','11211510iogZxC','346132SwLHbq','2ZjVmxE','utf-8','hAdkZ','2950liwfbT','113564vqAOXd','963997kTGkmD','rENpc'];_0x5381=function(){return _0x325d82;};return _0x5381();}import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0xc879f5(0x11a);function _0x5a78(_0x546cf1,_0x4381f0){_0x546cf1=_0x546cf1-0x119;const _0x5381fb=_0x5381();let _0x5a785=_0x5381fb[_0x546cf1];return _0x5a785;}function getActiveProfilePath(){const _0x3625a2=_0xc879f5,_0x37f310={'ZgYvL':function(_0x55098b){return _0x55098b();},'svqtX':function(_0x29f8fc,_0x3c4589,_0x446d5e){return _0x29f8fc(_0x3c4589,_0x446d5e);}},_0x81490d=join(_0x37f310['ZgYvL'](getRangerDir),ACTIVE_PROFILE_FILE);if(existsSync(_0x81490d))return _0x81490d;return _0x37f310[_0x3625a2(0x12e)](join,_0x37f310['ZgYvL'](getRangerHomeDir),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x3697fe=_0xc879f5,_0xd004fc={'wqhxX':function(_0x29f421){return _0x29f421();},'VnePN':function(_0x43b3c4,_0x331483,_0x470e3d){return _0x43b3c4(_0x331483,_0x470e3d);}},_0x44323b=join(_0xd004fc['wqhxX'](getRangerDir),LEGACY_ACTIVE_ENV_FILE);if(existsSync(_0x44323b))return _0x44323b;return _0xd004fc[_0x3697fe(0x11d)](join,getRangerHomeDir(),LEGACY_ACTIVE_ENV_FILE);}function getActiveProfileWritePath(){const _0x1d9a49=_0xc879f5,_0x217b39={'AhPXZ':function(_0x40c29a,_0x4502b2){return _0x40c29a(_0x4502b2);},'bwosB':function(_0x3fd25e,_0x4b1e4c,_0x3e9748){return _0x3fd25e(_0x4b1e4c,_0x3e9748);}},_0x240200=getRangerDir();if(_0x217b39['AhPXZ'](existsSync,_0x240200))return{'path':join(_0x240200,ACTIVE_PROFILE_FILE),'dir':_0x240200,'isUserScope':![]};const _0x6d39f2=getRangerHomeDir();return{'path':_0x217b39[_0x1d9a49(0x12a)](join,_0x6d39f2,ACTIVE_PROFILE_FILE),'dir':_0x6d39f2,'isUserScope':!![]};}async function migrateLegacyActiveEnv(){const _0x262d49=_0xc879f5,_0x22616b={'rENpc':function(_0x4ca59d,_0x20dc03){return _0x4ca59d(_0x20dc03);},'hAdkZ':_0x262d49(0x123),'PWIlB':function(_0x117598,_0x5003a5){return _0x117598===_0x5003a5;},'RATYQ':function(_0x54de1f,_0x4d7aa4,_0x51aa3b,_0x56821e){return _0x54de1f(_0x4d7aa4,_0x51aa3b,_0x56821e);},'IXrTt':function(_0x1085a9){return _0x1085a9();},'fbhCb':function(_0x1c87fc,_0x4d7183,_0x28388b){return _0x1c87fc(_0x4d7183,_0x28388b);},'LZpaC':function(_0x32e99c,_0x2a35e1){return _0x32e99c(_0x2a35e1);}},_0x16091a=getLegacyActiveEnvPath();if(!_0x22616b[_0x262d49(0x128)](existsSync,_0x16091a))return null;let _0x5a7484=null;try{_0x5a7484=(await readFile(_0x16091a,_0x22616b[_0x262d49(0x124)]))['trim']()||null;}catch{_0x5a7484=null;}if(!_0x5a7484)return null;const _0x368879=getRangerHomeDir(),_0x1ea425=_0x22616b[_0x262d49(0x129)](_0x16091a,join(_0x368879,LEGACY_ACTIVE_ENV_FILE));if(_0x1ea425){const _0x30856a=join(_0x368879,ACTIVE_PROFILE_FILE);try{await mkdir(_0x368879,{'recursive':!![]}),await _0x22616b[_0x262d49(0x119)](writeFile,_0x30856a,_0x5a7484,_0x22616b['hAdkZ']),await _0x22616b['rENpc'](unlink,_0x16091a);}catch{}return _0x5a7484;}const {path:_0x338eab,dir:_0x4f3c61}=_0x22616b['IXrTt'](getActiveProfileWritePath);try{await rename(_0x16091a,_0x338eab);}catch{try{await _0x22616b['fbhCb'](mkdir,_0x4f3c61,{'recursive':!![]}),await _0x22616b[_0x262d49(0x119)](writeFile,_0x338eab,_0x5a7484,'utf-8'),await _0x22616b['LZpaC'](unlink,_0x16091a);}catch{}}return _0x5a7484;}export async function readActiveProfileName(){const _0x3b7fb8=_0xc879f5,_0x569047={'DEicO':function(_0x4217de){return _0x4217de();}},_0x199392=_0x569047[_0x3b7fb8(0x12b)](getActiveProfilePath);if(existsSync(_0x199392))try{return(await readFile(_0x199392,_0x3b7fb8(0x123)))['trim']()||null;}catch{return null;}return await migrateLegacyActiveEnv();}export async function writeActiveProfileName(_0x5792e7){const _0x4c9c3f=_0xc879f5,_0x547bda={'aKMOI':function(_0xdac3e3){return _0xdac3e3();},'oQwJH':_0x4c9c3f(0x123),'JLgtG':function(_0x33f428,_0x3f2f42){return _0x33f428(_0x3f2f42);}},{path:_0x111333,dir:_0x3c797c}=_0x547bda[_0x4c9c3f(0x11c)](getActiveProfileWritePath);await mkdir(_0x3c797c,{'recursive':!![]}),await writeFile(_0x111333,_0x5792e7,_0x547bda[_0x4c9c3f(0x11b)]);const _0x154934=getLegacyActiveEnvPath();if(_0x547bda['JLgtG'](existsSync,_0x154934))try{await unlink(_0x154934);}catch{}}export async function migrateActiveProfileFile(){const _0x249665=await migrateLegacyActiveEnv();return _0x249665!==null;}
1
+ (function(_0x114d7c,_0x120366){const _0x34b741=_0x1c14,_0x499cf7=_0x114d7c();while(!![]){try{const _0x1fd94c=parseInt(_0x34b741(0x187))/0x1+-parseInt(_0x34b741(0x18d))/0x2*(parseInt(_0x34b741(0x193))/0x3)+parseInt(_0x34b741(0x194))/0x4+parseInt(_0x34b741(0x197))/0x5*(parseInt(_0x34b741(0x18e))/0x6)+parseInt(_0x34b741(0x18f))/0x7*(-parseInt(_0x34b741(0x189))/0x8)+parseInt(_0x34b741(0x191))/0x9*(-parseInt(_0x34b741(0x18b))/0xa)+-parseInt(_0x34b741(0x18a))/0xb;if(_0x1fd94c===_0x120366)break;else _0x499cf7['push'](_0x499cf7['shift']());}catch(_0x1f3c53){_0x499cf7['push'](_0x499cf7['shift']());}}}(_0x4516,0x8f1ac));import{existsSync}from'fs';import{readFile}from'fs/promises';function _0x1c14(_0x1f2a72,_0x35c541){_0x1f2a72=_0x1f2a72-0x187;const _0x4516a0=_0x4516();let _0x1c144c=_0x4516a0[_0x1f2a72];return _0x1c144c;}import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';const LEGACY_ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE='active-env.txt';function readLegacyActiveProfileFile(){const _0x2d3a7b=_0x1c14,_0x11fdfb={'qmPRY':function(_0x4d4d5f,_0x2d3ca3,_0x130dfc){return _0x4d4d5f(_0x2d3ca3,_0x130dfc);},'VrQGC':function(_0x4c7e27){return _0x4c7e27();},'hxZvC':function(_0xee0ac7){return _0xee0ac7();},'QkUMC':function(_0x504ea5,_0x59cd29,_0xe9955b){return _0x504ea5(_0x59cd29,_0xe9955b);},'bSnuu':function(_0xe20432){return _0xe20432();},'ZFTmL':function(_0x2d2f98,_0x17d5fa){return _0x2d2f98(_0x17d5fa);}},_0x2e16ab=[_0x11fdfb['qmPRY'](join,_0x11fdfb[_0x2d3a7b(0x192)](getRangerDir),LEGACY_ACTIVE_PROFILE_FILE),join(getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),_0x11fdfb[_0x2d3a7b(0x190)](join,_0x11fdfb['hxZvC'](getRangerDir),LEGACY_ACTIVE_ENV_FILE),_0x11fdfb['QkUMC'](join,_0x11fdfb[_0x2d3a7b(0x195)](getRangerHomeDir),LEGACY_ACTIVE_ENV_FILE)];for(const _0x184b4d of _0x2e16ab){if(_0x11fdfb['ZFTmL'](existsSync,_0x184b4d))return _0x184b4d;}return null;}export async function readActiveProfileName(){const _0x400e51=_0x1c14,_0x58a489={'KCizx':function(_0x363a78,_0x42312e){return _0x363a78(_0x42312e);},'xqxRe':function(_0xa5f868,_0x456f4a,_0x32d22e){return _0xa5f868(_0x456f4a,_0x32d22e);},'DiLoY':'utf-8'},_0xa82614=_0x58a489[_0x400e51(0x188)](readLastProfile,process[_0x400e51(0x196)]());if(_0xa82614)return _0xa82614;const _0x359bf5=readLegacyActiveProfileFile();if(!_0x359bf5)return null;try{return(await _0x58a489[_0x400e51(0x18c)](readFile,_0x359bf5,_0x58a489['DiLoY']))['trim']()||null;}catch{return null;}}export async function writeActiveProfileName(_0x168752){const _0xa96aca=_0x1c14,_0x3f05dc={'csndk':function(_0x35bd5e,_0x57b052,_0x207ffe){return _0x35bd5e(_0x57b052,_0x207ffe);}};_0x3f05dc['csndk'](writeLastProfile,process[_0xa96aca(0x196)](),_0x168752);}function _0x4516(){const _0x2c292c=['2313267TIUgGD','74590hXDMyg','xqxRe','1586ikMfrb','6894TeAilH','1995jaZyUD','qmPRY','405iIKFZs','VrQGC','645KLiVUS','3410172whTIXP','bSnuu','cwd','95EjsOie','774789bBnPdb','KCizx','9728yMUyZu'];_0x4516=function(){return _0x2c292c;};return _0x4516();}
@@ -1 +1 @@
1
- function _0x3ef5(){const _0x3970f3=['NPM_CONFIG_USERCONFIG','bUQPy','env','trim','push','map','/bin','TMPDIR','CHROME_BIN','filter','7540504qoVQLb','fromEntries','entries','CKjeU','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','has','sessionToken','nepxJ','includes','add','ZckSW','ANTHROPIC_CUSTOM_HEADERS','6902294AQVYyY','660HusKwl','9440955zlgBOR','1VQdXid','47046ilenSi','npm_config_registry','974325DwrFpg','TMP','bBrCU','TEMP','/usr/bin','JJaVK','1877052SvXnwT','$PATH','npm_config_userconfig','BOyhR','RANGER_DISABLE_MCP','${PATH}','slice','XDG_CACHE_HOME','hFizH','DEBUG','metadata','1332158zKCaiN','toLowerCase','NODE_ENV','some','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','OEZku','LOCALAPPDATA','30MmkNBK','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','%PATH%'];_0x3ef5=function(){return _0x3970f3;};return _0x3ef5();}const _0x18febf=_0x471b;(function(_0x5db5d7,_0x5b4b9a){const _0x563c6d=_0x471b,_0xc9b3d1=_0x5db5d7();while(!![]){try{const _0x24f961=-parseInt(_0x563c6d(0xc2))/0x1*(parseInt(_0x563c6d(0xd6))/0x2)+-parseInt(_0x563c6d(0xc5))/0x3+-parseInt(_0x563c6d(0xcb))/0x4+parseInt(_0x563c6d(0xc0))/0x5*(-parseInt(_0x563c6d(0xc3))/0x6)+parseInt(_0x563c6d(0xbf))/0x7+-parseInt(_0x563c6d(0xea))/0x8+parseInt(_0x563c6d(0xc1))/0x9*(parseInt(_0x563c6d(0xdd))/0xa);if(_0x24f961===_0x5b4b9a)break;else _0xc9b3d1['push'](_0xc9b3d1['shift']());}catch(_0x17df61){_0xc9b3d1['push'](_0xc9b3d1['shift']());}}}(_0x3ef5,0xa9c27));import{delimiter,join}from'path';import{tmpdir}from'os';function _0x471b(_0x11de42,_0x2d75a4){_0x11de42=_0x11de42-0xbe;const _0x3ef576=_0x3ef5();let _0x471b7e=_0x3ef576[_0x11de42];return _0x471b7e;}import{mkdirSync}from'fs';import{getAiProxyUrl}from'./environment.js';const AI_PROXY_METADATA_HEADERS_ENV_VAR=_0x18febf(0xbe),AGENT_ENV_PASSTHROUGH_KEYS=['PATH','HOME',_0x18febf(0xe7),_0x18febf(0xc6),'TEMP','USERPROFILE','APPDATA',_0x18febf(0xdc),_0x18febf(0xd2),'XDG_CONFIG_HOME','PLAYWRIGHT_BROWSERS_PATH',_0x18febf(0xde),_0x18febf(0xe8),'CHROMIUM_BIN','npm_config_cache','NPM_CONFIG_CACHE',_0x18febf(0xcd),_0x18febf(0xe0),'npm_config_prefix','NPM_CONFIG_PREFIX',_0x18febf(0xc4),'NPM_CONFIG_REGISTRY',_0x18febf(0xd4),_0x18febf(0xd8),'RANGER_TEST_SKIP_BROWSER_WAIT',_0x18febf(0xcf),AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x18febf(0xd0),_0x18febf(0xcc),_0x18febf(0xdf)];function parseCustomHeaders(_0x3dd711){const _0x28db94=_0x18febf,_0x111995={'CKjeU':function(_0xf5c2ec,_0x12ec48){return _0xf5c2ec+_0x12ec48;}};if(!_0x3dd711)return[];return _0x3dd711['split'](/\r?\n/)[_0x28db94(0xe5)](_0x1dbdb9=>_0x1dbdb9['trim']())[_0x28db94(0xe9)](Boolean)['map'](_0x456ed8=>{const _0x508903=_0x28db94,_0x3ac5f1=_0x456ed8['indexOf'](':');if(_0x3ac5f1===-0x1)return null;const _0x4c5c81=_0x456ed8[_0x508903(0xd1)](0x0,_0x3ac5f1)[_0x508903(0xe3)](),_0x581459=_0x456ed8[_0x508903(0xd1)](_0x111995[_0x508903(0xed)](_0x3ac5f1,0x1))[_0x508903(0xe3)]();if(!_0x4c5c81)return null;return[_0x4c5c81,_0x581459];})[_0x28db94(0xe9)](_0x46539f=>_0x46539f!==null);}export function getAgentPathHealthWarning(_0x54ca4c,_0x34ef52=process['platform']){const _0x2eb9ad=_0x18febf,_0x2848d0={'fAOPv':function(_0x23f0b3,_0x4d7934){return _0x23f0b3===_0x4d7934;},'NWBSo':'win32','hFizH':_0x2eb9ad(0xe6),'OEZku':function(_0x5ee8da,_0xf73065){return _0x5ee8da&&_0xf73065;},'JJaVK':function(_0x5dfe19,_0x52aa45){return _0x5dfe19===_0x52aa45;},'KmCKq':_0x2eb9ad(0xee)},_0x52757c=[],_0x4268ef=(_0x54ca4c||'')['split'](delimiter)[_0x2eb9ad(0xe9)](Boolean);_0x2848d0['fAOPv'](_0x4268ef['length'],0x0)&&_0x52757c[_0x2eb9ad(0xe4)]('PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.');UNEXPANDED_PATH_TOKEN_PATTERNS[_0x2eb9ad(0xd9)](_0x427536=>(_0x54ca4c||'')['includes'](_0x427536))&&_0x52757c['push'](_0x2eb9ad(0xda));if(_0x34ef52!==_0x2848d0['NWBSo']){const _0x45216f=_0x4268ef[_0x2eb9ad(0xf2)](_0x2eb9ad(0xc9)),_0x2d035b=_0x4268ef['includes'](_0x2848d0[_0x2eb9ad(0xd3)]);_0x2848d0[_0x2eb9ad(0xdb)](!_0x45216f,!_0x2d035b)&&_0x52757c[_0x2eb9ad(0xe4)]('PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.');}if(_0x2848d0[_0x2eb9ad(0xca)](_0x52757c['length'],0x0))return null;return{'summary':_0x2848d0['KmCKq'],'issues':_0x52757c};}export function buildAgentEnv(_0x500ce3){const _0x4a67a0=_0x18febf,_0xe9b34f={'bBrCU':'Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','nepxJ':'true','bUQPy':_0x4a67a0(0xe7),'ZckSW':'TMP','aClXy':_0x4a67a0(0xc8),'vRPnR':function(_0x4f2a30,_0x32c94d,_0x131756){return _0x4f2a30(_0x32c94d,_0x131756);},'ZTNQt':function(_0x4ff453){return _0x4ff453();},'BOyhR':function(_0xb5f228,_0x48de37){return _0xb5f228===_0x48de37;}};if(_0x500ce3['byokEnabled'])return Object[_0x4a67a0(0xeb)](Object[_0x4a67a0(0xec)](process['env'])[_0x4a67a0(0xe9)](_0x5ac2b9=>typeof _0x5ac2b9[0x1]==='string'));if(!_0x500ce3[_0x4a67a0(0xf0)])throw new Error(_0xe9b34f[_0x4a67a0(0xc7)]);const _0x586b22={'ANTHROPIC_API_KEY':_0x500ce3['sessionToken'],'ANTHROPIC_BASE_URL':getAiProxyUrl(),'DISABLE_TELEMETRY':_0xe9b34f[_0x4a67a0(0xf1)]};for(const _0x5875af of AGENT_ENV_PASSTHROUGH_KEYS){const _0x3bc68d=process[_0x4a67a0(0xe2)][_0x5875af];_0x3bc68d&&![_0xe9b34f[_0x4a67a0(0xe1)],_0xe9b34f['ZckSW'],_0xe9b34f['aClXy']]['includes'](_0x5875af)&&(_0x586b22[_0x5875af]=_0x3bc68d);}const _0x2bf46e=_0xe9b34f['vRPnR'](join,_0xe9b34f['ZTNQt'](tmpdir),'ranger-claude-tmp');try{mkdirSync(_0x2bf46e,{'recursive':!![]});}catch{}_0x586b22['TMPDIR']=_0x2bf46e,_0x586b22[_0xe9b34f[_0x4a67a0(0xf4)]]=_0x2bf46e,_0x586b22['TEMP']=_0x2bf46e;const _0x4acc7d=parseCustomHeaders(process['env'][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x127b4b=new Map(_0x4acc7d),_0x4c43f7=new Set(_0x4acc7d[_0x4a67a0(0xe5)](([_0x5d84da])=>_0x5d84da[_0x4a67a0(0xd7)]()));if(_0x500ce3['metadata'])for(const [_0x2f8b49,_0x465e8d]of Object['entries'](_0x500ce3[_0x4a67a0(0xd5)])){if(_0x465e8d==null||_0xe9b34f[_0x4a67a0(0xce)](_0x465e8d,''))continue;const _0x5e74c3='x-ranger-'+_0x2f8b49;!_0x4c43f7[_0x4a67a0(0xef)](_0x5e74c3[_0x4a67a0(0xd7)]())&&(_0x127b4b['set'](_0x5e74c3,_0x465e8d),_0x4c43f7[_0x4a67a0(0xf3)](_0x5e74c3['toLowerCase']()));}const _0x39c4c4=Array['from'](_0x127b4b['entries']())[_0x4a67a0(0xe5)](([_0x387073,_0x588fe8])=>_0x387073+':\x20'+_0x588fe8)['join']('\x0a');return _0x39c4c4&&(_0x586b22[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x39c4c4),_0x586b22;}
1
+ const _0x54cb98=_0x45a6;(function(_0x15bf08,_0xc07f0){const _0x40ee37=_0x45a6,_0x582b4a=_0x15bf08();while(!![]){try{const _0xa29813=-parseInt(_0x40ee37(0x18d))/0x1*(-parseInt(_0x40ee37(0x1a3))/0x2)+parseInt(_0x40ee37(0x181))/0x3+-parseInt(_0x40ee37(0x18a))/0x4+-parseInt(_0x40ee37(0x19f))/0x5*(parseInt(_0x40ee37(0x187))/0x6)+parseInt(_0x40ee37(0x19a))/0x7*(-parseInt(_0x40ee37(0x183))/0x8)+parseInt(_0x40ee37(0x195))/0x9+parseInt(_0x40ee37(0x19c))/0xa*(parseInt(_0x40ee37(0x18f))/0xb);if(_0xa29813===_0xc07f0)break;else _0x582b4a['push'](_0x582b4a['shift']());}catch(_0x1db454){_0x582b4a['push'](_0x582b4a['shift']());}}}(_0x3b7a,0xd5810));import{delimiter,join}from'path';import{tmpdir}from'os';import{mkdirSync}from'fs';function _0x3b7a(){const _0x2476fc=['fromEntries','1840hSqpwr','push','qXMDG','1666735AoOxff','sessionToken','true','PwXxf','298ZtuYKS','entries','includes','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','split','NODE_ENV','TEMP','PATH','metadata','env','slice','map','CKxBZ','NPM_CONFIG_PREFIX','XDG_CACHE_HOME','2928174KJhamY','Sgdxn','4030592PFqKoI','TMP','PLAYWRIGHT_BROWSERS_PATH','toLowerCase','18ghnuKj','filter','LOCALAPPDATA','5094312EMIWqh','add','TMPDIR','5345juNvNU','RANGER_DISABLE_MCP','30415URoshB','x-ranger-','NPM_CONFIG_USERCONFIG','from','length','npm_config_registry','12336588HhHrNS','trim','NPM_CONFIG_CACHE','ranger-claude-tmp','win32','7ySkiJj'];_0x3b7a=function(){return _0x2476fc;};return _0x3b7a();}function _0x45a6(_0x42ffcb,_0x45e91b){_0x42ffcb=_0x42ffcb-0x173;const _0x3b7a1c=_0x3b7a();let _0x45a66c=_0x3b7a1c[_0x42ffcb];return _0x45a66c;}import{getAiProxyUrl}from'./environment.js';const AI_PROXY_METADATA_HEADERS_ENV_VAR='ANTHROPIC_CUSTOM_HEADERS',AGENT_ENV_PASSTHROUGH_KEYS=[_0x54cb98(0x179),'HOME',_0x54cb98(0x18c),_0x54cb98(0x184),'TEMP','USERPROFILE','APPDATA',_0x54cb98(0x189),_0x54cb98(0x180),'XDG_CONFIG_HOME',_0x54cb98(0x185),'PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','CHROME_BIN','CHROMIUM_BIN','npm_config_cache',_0x54cb98(0x197),'npm_config_userconfig',_0x54cb98(0x191),'npm_config_prefix',_0x54cb98(0x17f),_0x54cb98(0x194),'NPM_CONFIG_REGISTRY','DEBUG',_0x54cb98(0x177),'RANGER_TEST_SKIP_BROWSER_WAIT',_0x54cb98(0x18e),AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=['${PATH}','$PATH','%PATH%'];function parseCustomHeaders(_0x286176){const _0x315445=_0x54cb98,_0x25939f={'Sgdxn':function(_0x3b0965,_0x3ec912){return _0x3b0965===_0x3ec912;},'ajSym':function(_0x5a097d,_0x533056){return _0x5a097d+_0x533056;}};if(!_0x286176)return[];return _0x286176['split'](/\r?\n/)['map'](_0x301a6d=>_0x301a6d[_0x315445(0x196)]())['filter'](Boolean)[_0x315445(0x17d)](_0xa96edf=>{const _0x53b51a=_0x315445,_0x453cd2=_0xa96edf['indexOf'](':');if(_0x25939f[_0x53b51a(0x182)](_0x453cd2,-0x1))return null;const _0x19a292=_0xa96edf[_0x53b51a(0x17c)](0x0,_0x453cd2)['trim'](),_0x3039c6=_0xa96edf['slice'](_0x25939f['ajSym'](_0x453cd2,0x1))[_0x53b51a(0x196)]();if(!_0x19a292)return null;return[_0x19a292,_0x3039c6];})[_0x315445(0x188)](_0x2ae96a=>_0x2ae96a!==null);}export function getAgentPathHealthWarning(_0x2f548d,_0x17445a=process['platform']){const _0x27e922=_0x54cb98,_0x587ee0={'PwXxf':function(_0x2ee784,_0x448bb1){return _0x2ee784||_0x448bb1;},'DQzbI':_0x27e922(0x175),'rWLlA':function(_0x534a97,_0x175fa0){return _0x534a97!==_0x175fa0;},'OroRx':'Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.'},_0x2c6550=[],_0x32aa90=_0x587ee0[_0x27e922(0x1a2)](_0x2f548d,'')[_0x27e922(0x176)](delimiter)[_0x27e922(0x188)](Boolean);_0x32aa90[_0x27e922(0x193)]===0x0&&_0x2c6550['push'](_0x587ee0['DQzbI']);UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0xb28d5a=>(_0x2f548d||'')['includes'](_0xb28d5a))&&_0x2c6550[_0x27e922(0x19d)]('PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.');if(_0x587ee0['rWLlA'](_0x17445a,_0x27e922(0x199))){const _0x5da68e=_0x32aa90['includes']('/usr/bin'),_0x37cb78=_0x32aa90[_0x27e922(0x174)]('/bin');!_0x5da68e&&!_0x37cb78&&_0x2c6550['push']('PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.');}if(_0x2c6550['length']===0x0)return null;return{'summary':_0x587ee0['OroRx'],'issues':_0x2c6550};}export function buildAgentEnv(_0x2b6d6){const _0x20f46b=_0x54cb98,_0x496d7b={'qXMDG':function(_0x58cac0){return _0x58cac0();},'khCsR':'TMP','LQRXh':function(_0x2bc77a,_0x4ea5e2,_0x24a34f){return _0x2bc77a(_0x4ea5e2,_0x24a34f);},'tontr':function(_0x5de6d4){return _0x5de6d4();},'CKxBZ':_0x20f46b(0x198),'PCZyo':'TEMP'};if(_0x2b6d6['byokEnabled'])return Object[_0x20f46b(0x19b)](Object['entries'](process[_0x20f46b(0x17b)])[_0x20f46b(0x188)](_0x2c5cae=>typeof _0x2c5cae[0x1]==='string'));if(!_0x2b6d6['sessionToken'])throw new Error('Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false');const _0x202d75={'ANTHROPIC_API_KEY':_0x2b6d6[_0x20f46b(0x1a0)],'ANTHROPIC_BASE_URL':_0x496d7b[_0x20f46b(0x19e)](getAiProxyUrl),'DISABLE_TELEMETRY':_0x20f46b(0x1a1)};for(const _0x149651 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x3b1147=process[_0x20f46b(0x17b)][_0x149651];_0x3b1147&&![_0x20f46b(0x18c),_0x496d7b['khCsR'],_0x20f46b(0x178)][_0x20f46b(0x174)](_0x149651)&&(_0x202d75[_0x149651]=_0x3b1147);}const _0x24a289=_0x496d7b['LQRXh'](join,_0x496d7b['tontr'](tmpdir),_0x496d7b[_0x20f46b(0x17e)]);try{mkdirSync(_0x24a289,{'recursive':!![]});}catch{}_0x202d75['TMPDIR']=_0x24a289,_0x202d75[_0x20f46b(0x184)]=_0x24a289,_0x202d75[_0x496d7b['PCZyo']]=_0x24a289;const _0x464e0a=parseCustomHeaders(process['env'][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x6f6a80=new Map(_0x464e0a),_0xea2625=new Set(_0x464e0a['map'](([_0x5e5bbe])=>_0x5e5bbe[_0x20f46b(0x186)]()));if(_0x2b6d6[_0x20f46b(0x17a)])for(const [_0x4fb0a0,_0x39ed8a]of Object[_0x20f46b(0x173)](_0x2b6d6[_0x20f46b(0x17a)])){if(_0x39ed8a==null||_0x39ed8a==='')continue;const _0x3372e6=_0x20f46b(0x190)+_0x4fb0a0;!_0xea2625['has'](_0x3372e6[_0x20f46b(0x186)]())&&(_0x6f6a80['set'](_0x3372e6,_0x39ed8a),_0xea2625[_0x20f46b(0x18b)](_0x3372e6[_0x20f46b(0x186)]()));}const _0x2ee298=Array[_0x20f46b(0x192)](_0x6f6a80[_0x20f46b(0x173)]())['map'](([_0x43333b,_0x1f548a])=>_0x43333b+':\x20'+_0x1f548a)['join']('\x0a');return _0x2ee298&&(_0x202d75[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x2ee298),_0x202d75;}
@@ -1 +1 @@
1
- function _0x2c15(){const _0x3fca7a=['thrus1C','C2vHCMnO','yxbWBgLJyxrPB24VEMLW','l3vWBg9Hzc11CMXZ','uhP2CMK','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','yxbWBgLJyxrPB24VANnVBG','qxD3wfu','tej5y04','DgfZAW','z0X4ALK','Awj6Ehe','tMzqD2e','C3DfB0W','ufvu','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','EhLUC3O','vgvOvM4','s1fTAMm','werSC3K','DK5oC2i','yxfltge','yxbWBhK','D3jKBgi','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','ndK3nZCWEKTvqxLg','BurYEuC','uMznB2W','qMvHCMvYia','z0DYthK','vxbqshe','yxbWBgLJyxrPB24VANnVBMW','BgvUz3rO','r3jTywq','DffivKi','Awvot08','qwrQDLu','zw52AxjVBM1LBNroyw1L','zeDqtgy','nevUrMLHsa','y29UC3rYDwn0B3i','zgD6vMW','mty0nePHD2jvuW','nda3ugnNCg5Z','EfHtB0q','vK5kyLy','l3n0zxbZ','nZC0rKPru1nl','q1vgr0m','C3rYAw5NAwz5','Dgv4Da','Bwq1','svHwvwS','mJC1mJeXmhHdBuffvG','DMLKzw8VD2vIBq','ndqWnZa3ogvUswH1zW','EwDqAvu','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','ENPjzhu','DxjS','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','nte0mtz5tw9Ur0C','r0vu','DvbtEwy','EwDNt3a','zMvHDhvYzuLK','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','vK5JqM0','ue9tva','CMr6uvK','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','tuPwDK4','u1bgEw4','Bwv0ywrHDge','C1rjD28','nteYmtu4mgLrD0TdDW','l3n0zxbZlW','kcGOlISPkYKRksSK','mJq3oteXndHuEvfdsNa','u3nlCxm','vuz3vuq','rKLcCfe','rK5PBK4','sLPzrwm','wgztwwC','Duz5swm','EKPbuwi','u3rju2K','tMDTwfi','zwfTEMe','BMPxBe4','uefuq0G','uKP1Awq','CLrABuu','wK1Pyxi','s0z1CwK','t1LoDxi','zgLNzxn0','D0n6DNy','C2v0DgLUz3m','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','DLbwBKu','y0PWq0C','Dg9tDhjPBMC','muTIAMvKra','v0Houfu','DxbKyxrLqNjVD3nLCLnLC3nPB24','yMfZzty0','vKfADKK','y2HLy2TZDw0','wKLezLm','l2fZC2v0CW','C2L6zq','vNfct1q','r3PYveO','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','EMDVvxi','Cw5LA0e','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','CKncBuK','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','uxbtzgS','AM1YyLi','Bhr6z1u','DxbKyxrL','ndi4ntrmsKPQEvO','ANnVBG','y0zsrMW','CMnprK0','DMX1wM4'];_0x2c15=function(){return _0x3fca7a;};return _0x2c15();}(function(_0x357b28,_0x38715){const _0x5c3c45=_0x292e,_0x1768e5=_0x357b28();while(!![]){try{const _0x5406f6=-parseInt(_0x5c3c45(0x193))/0x1*(parseInt(_0x5c3c45(0x160))/0x2)+-parseInt(_0x5c3c45(0x162))/0x3+parseInt(_0x5c3c45(0x152))/0x4*(parseInt(_0x5c3c45(0x176))/0x5)+parseInt(_0x5c3c45(0x155))/0x6*(-parseInt(_0x5c3c45(0x126))/0x7)+-parseInt(_0x5c3c45(0x168))/0x8*(-parseInt(_0x5c3c45(0x15a))/0x9)+-parseInt(_0x5c3c45(0x144))/0xa*(-parseInt(_0x5c3c45(0x156))/0xb)+parseInt(_0x5c3c45(0x179))/0xc;if(_0x5406f6===_0x38715)break;else _0x1768e5['push'](_0x1768e5['shift']());}catch(_0x152329){_0x1768e5['push'](_0x1768e5['shift']());}}}(_0x2c15,0xeae9f));const _0x3e4caa=(function(){const _0x40d217=_0x292e,_0x3000b0={'JHDRq':function(_0xcc58f6,_0x175ea2){return _0xcc58f6===_0x175ea2;},'WHNPU':_0x40d217(0x175),'MNwow':_0x40d217(0x171),'TehVn':function(_0x2399e9,_0x1ed7c0){return _0x2399e9===_0x1ed7c0;},'dGPLf':_0x40d217(0x19d),'yggOp':_0x40d217(0x13f)};let _0x577c45=!![];return function(_0x231c7e,_0x4deaf2){const _0x36e6fd=_0x40d217,_0x5964dd={'AwwXU':_0x3000b0['MNwow']};if(_0x3000b0[_0x36e6fd(0x13c)](_0x3000b0[_0x36e6fd(0x151)],_0x3000b0[_0x36e6fd(0x16b)]))throw new _0x2d565e(_0x5964dd[_0x36e6fd(0x132)]);else{const _0x4c02f5=_0x577c45?function(){const _0x52491b=_0x36e6fd;if(_0x4deaf2){if(_0x3000b0['JHDRq'](_0x3000b0[_0x52491b(0x194)],_0x3000b0[_0x52491b(0x194)])){const _0x32b0a5=_0x4deaf2['apply'](_0x231c7e,arguments);return _0x4deaf2=null,_0x32b0a5;}else throw new _0x57d6b5(_0x5964dd[_0x52491b(0x132)]);}}:function(){};return _0x577c45=![],_0x4c02f5;}};}()),_0x58f12d=_0x3e4caa(this,function(){const _0x40b008=_0x292e,_0x369a9d={'swEoL':_0x40b008(0x178)};return _0x58f12d[_0x40b008(0x192)]()['search'](_0x369a9d[_0x40b008(0x138)])[_0x40b008(0x192)]()[_0x40b008(0x153)](_0x58f12d)[_0x40b008(0x12c)](_0x369a9d[_0x40b008(0x138)]);});_0x58f12d();function _0x292e(_0x1c55a1,_0x2d33ae){_0x1c55a1=_0x1c55a1-0x11e;const _0x4faf1a=_0x2c15();let _0x58f12d=_0x4faf1a[_0x1c55a1];if(_0x292e['opCNZM']===undefined){var _0x3e4caa=function(_0x3715e4){const _0x438155='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3bae7a='',_0x4d2cec='',_0x2dccf0=_0x3bae7a+_0x3e4caa;for(let _0xd6fd60=0x0,_0x517ccb,_0x317501,_0x932143=0x0;_0x317501=_0x3715e4['charAt'](_0x932143++);~_0x317501&&(_0x517ccb=_0xd6fd60%0x4?_0x517ccb*0x40+_0x317501:_0x317501,_0xd6fd60++%0x4)?_0x3bae7a+=_0x2dccf0['charCodeAt'](_0x932143+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x517ccb>>(-0x2*_0xd6fd60&0x6)):_0xd6fd60:0x0){_0x317501=_0x438155['indexOf'](_0x317501);}for(let _0x4f7cec=0x0,_0x59b0be=_0x3bae7a['length'];_0x4f7cec<_0x59b0be;_0x4f7cec++){_0x4d2cec+='%'+('00'+_0x3bae7a['charCodeAt'](_0x4f7cec)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4d2cec);};_0x292e['QlNEQO']=_0x3e4caa,_0x292e['DXOKsv']={},_0x292e['opCNZM']=!![];}const _0x2c15e1=_0x4faf1a[0x0],_0x292e79=_0x1c55a1+_0x2c15e1,_0x35d675=_0x292e['DXOKsv'][_0x292e79];if(!_0x35d675){const _0x41325b=function(_0x13ba77){this['UVMtzi']=_0x13ba77,this['HHvAca']=[0x1,0x0,0x0],this['aJfZdX']=function(){return'newState';},this['kOcvCd']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['PYnZAI']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x41325b['prototype']['BGRGdj']=function(){const _0x46619c=new RegExp(this['kOcvCd']+this['PYnZAI']),_0x2ea225=_0x46619c['test'](this['aJfZdX']['toString']())?--this['HHvAca'][0x1]:--this['HHvAca'][0x0];return this['ZLNxyi'](_0x2ea225);},_0x41325b['prototype']['ZLNxyi']=function(_0x323c0a){if(!Boolean(~_0x323c0a))return _0x323c0a;return this['trMKjk'](this['UVMtzi']);},_0x41325b['prototype']['trMKjk']=function(_0x5af770){for(let _0x4c9788=0x0,_0x3fdc65=this['HHvAca']['length'];_0x4c9788<_0x3fdc65;_0x4c9788++){this['HHvAca']['push'](Math['round'](Math['random']())),_0x3fdc65=this['HHvAca']['length'];}return _0x5af770(this['HHvAca'][0x0]);},new _0x41325b(_0x292e)['BGRGdj'](),_0x58f12d=_0x292e['QlNEQO'](_0x58f12d),_0x292e['DXOKsv'][_0x292e79]=_0x58f12d;}else _0x58f12d=_0x35d675;return _0x58f12d;}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x1279e0){const _0x4646b6=_0x292e,_0xf583fb={'ZIJvf':function(_0x1f25da,_0xb04f27,_0x1ffdef,_0x1c23fd){return _0x1f25da(_0xb04f27,_0x1ffdef,_0x1c23fd);},'AGcoP':_0x4646b6(0x161),'ieNOO':function(_0x196c1d){return _0x196c1d();},'XfSYg':_0x4646b6(0x171),'ygPiU':function(_0x2f232b,_0x184b5c,_0x9fbdb3){return _0x2f232b(_0x184b5c,_0x9fbdb3);},'IhQzV':_0x4646b6(0x131),'xynsz':function(_0x448416,_0x3ee6ea){return _0x448416===_0x3ee6ea;},'ZIDfS':_0x4646b6(0x148)},_0x1d0aa4=await _0xf583fb[_0x4646b6(0x14e)](getToken);if(!_0x1d0aa4)throw new Error(_0xf583fb[_0x4646b6(0x17f)]);const _0x57e3fe=_0xf583fb['ieNOO'](getApiBaseUrl),_0x3677bb=await _0xf583fb[_0x4646b6(0x163)](fetch,_0x57e3fe+'/api/v1/mcp/browser-sessions',{'method':_0x4646b6(0x16f),'headers':{'Authorization':_0x4646b6(0x147)+_0x1d0aa4,'Content-Type':_0xf583fb['IhQzV']},'body':JSON[_0x4646b6(0x15c)]({'environmentName':_0x1279e0?.[_0x4646b6(0x150)],'settings':_0x1279e0?.[_0x4646b6(0x18e)],'task':_0x1279e0?.[_0x4646b6(0x134)],'url':_0x1279e0?.[_0x4646b6(0x166)],'featureId':_0x1279e0?.[_0x4646b6(0x16c)],'checklistItemId':_0x1279e0?.['checklistItemId']})});if(!_0x3677bb['ok']){if(_0xf583fb[_0x4646b6(0x13b)](_0xf583fb[_0x4646b6(0x199)],_0x4646b6(0x145)))return _0xf583fb['ZIJvf'](_0x19759f,_0x110e44,_0x51aa4c,_0xf583fb['AGcoP']);else{const _0x2f49e1=await _0x3677bb[_0x4646b6(0x15d)]();throw new Error(_0x4646b6(0x130)+_0x2f49e1);}}return _0x3677bb['json']();}export async function updateBrowserSession(_0x3a3a84,_0x13b267){const _0x5b6195=_0x292e,_0x3e88eb={'rTZmE':function(_0x1e765d,_0x3fcaad,_0x16ef8f,_0x18539d){return _0x1e765d(_0x3fcaad,_0x16ef8f,_0x18539d);},'njWlN':_0x5b6195(0x14a),'uFyIc':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','akgoQ':function(_0x57f57c){return _0x57f57c();},'ftrha':'application/json','CUFGC':function(_0x1410a8,_0x47878c){return _0x1410a8!==_0x47878c;},'qnekA':_0x5b6195(0x19f),'RJuid':_0x5b6195(0x120),'SPFyn':_0x5b6195(0x195)};return withRetry(async()=>{const _0x3337a1=_0x5b6195,_0x1431ab=await getToken();if(!_0x1431ab)throw new Error(_0x3e88eb[_0x3337a1(0x180)]);const _0x56cc51=_0x3e88eb['akgoQ'](getApiBaseUrl),_0x337cef=await fetch(_0x56cc51+_0x3337a1(0x18f)+_0x3a3a84,{'method':_0x3337a1(0x186),'headers':{'Authorization':'Bearer\x20'+_0x1431ab,'Content-Type':_0x3e88eb['ftrha']},'body':JSON[_0x3337a1(0x15c)](_0x13b267)});if(!_0x337cef['ok']){if(_0x3e88eb[_0x3337a1(0x15b)](_0x3e88eb[_0x3337a1(0x11e)],_0x3e88eb[_0x3337a1(0x187)])){const _0x2c17ea=await _0x337cef[_0x3337a1(0x15d)]();throw new Error(_0x3337a1(0x11f)+_0x2c17ea);}else return _0x3e88eb[_0x3337a1(0x188)](_0x15d67d,_0x2d43b9,_0x323665,_0x3e88eb[_0x3337a1(0x185)]);}return _0x337cef[_0x3337a1(0x127)]();},{'label':_0x3e88eb[_0x5b6195(0x173)]});}export async function getBrowserSession(_0x231e54){const _0x2b80b7=_0x292e,_0x43ec3b={'wrdlb':_0x2b80b7(0x171),'zJAQb':function(_0x580a75){return _0x580a75();},'vluZn':function(_0x5ce240,_0x1eda9d,_0x346ec7){return _0x5ce240(_0x1eda9d,_0x346ec7);},'LtTKW':function(_0x27aa67,_0x298653){return _0x27aa67===_0x298653;},'uPSyf':_0x2b80b7(0x172),'StISi':_0x2b80b7(0x16e)},_0x1c4888=await _0x43ec3b[_0x2b80b7(0x181)](getToken);if(!_0x1c4888)throw new Error(_0x43ec3b[_0x2b80b7(0x142)]);const _0x2f935e=getApiBaseUrl(),_0x3e022d=await _0x43ec3b[_0x2b80b7(0x12a)](fetch,_0x2f935e+_0x2b80b7(0x18f)+_0x231e54,{'method':'GET','headers':{'Authorization':_0x2b80b7(0x147)+_0x1c4888}});if(!_0x3e022d['ok']){if(_0x43ec3b[_0x2b80b7(0x12b)](_0x43ec3b[_0x2b80b7(0x16a)],_0x43ec3b[_0x2b80b7(0x182)]))throw new _0x1000e0(_0x43ec3b[_0x2b80b7(0x142)]);else{const _0x2bd986=await _0x3e022d[_0x2b80b7(0x15d)]();throw new Error(_0x2b80b7(0x13a)+_0x2bd986);}}return _0x3e022d['json']();}export async function getUploadUrls(_0x1e8d9a,_0x32941a,_0x2a3921,_0x500d4f){const _0x5151d0=_0x292e,_0x4bbb5e={'Pzvri':function(_0x29e16f){return _0x29e16f();},'RfMol':_0x5151d0(0x171),'UFwUD':function(_0x4364b8,_0x1ddfb3){return _0x4364b8!==_0x1ddfb3;},'kxUoA':function(_0x1e043f,_0x172a07){return _0x1e043f===_0x172a07;},'GHUWO':_0x5151d0(0x170)},_0x342a7e=await _0x4bbb5e[_0x5151d0(0x12f)](getToken);if(!_0x342a7e)throw new Error(_0x4bbb5e[_0x5151d0(0x146)]);const _0x45915c=_0x4bbb5e[_0x5151d0(0x12f)](getApiBaseUrl),_0x277444=await fetch(_0x45915c+_0x5151d0(0x18f)+_0x1e8d9a+_0x5151d0(0x12e),{'method':_0x5151d0(0x16f),'headers':{'Authorization':_0x5151d0(0x147)+_0x342a7e,'Content-Type':_0x5151d0(0x131)},'body':JSON[_0x5151d0(0x15c)]({'filename':_0x32941a,'filetype':_0x2a3921,..._0x500d4f?.['size']!==undefined&&{'size':_0x500d4f[_0x5151d0(0x19b)]},..._0x4bbb5e[_0x5151d0(0x17b)](_0x500d4f?.[_0x5151d0(0x198)],undefined)&&{'checksum':_0x500d4f['checksum']},..._0x4bbb5e['UFwUD'](_0x500d4f?.['metadata'],undefined)&&{'metadata':_0x500d4f[_0x5151d0(0x174)]}})});if(!_0x277444['ok']){if(_0x4bbb5e['kxUoA'](_0x5151d0(0x170),_0x4bbb5e['GHUWO'])){const _0x1c082e=await _0x277444['text']();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x1c082e);}else{if(_0x4f109e){const _0x3506b0=_0x45cd0c[_0x5151d0(0x141)](_0x5738fb,arguments);return _0x7070f4=null,_0x3506b0;}}}return _0x277444[_0x5151d0(0x127)]();}export async function uploadFile(_0x2e0d2d,_0x338eb2,_0x3848ab){const _0x13aa06=_0x292e,_0x5d269d={'cFRFl':function(_0x2f7103,_0x525870,_0x38ffc1){return _0x2f7103(_0x525870,_0x38ffc1);}},_0xb24dd7=await _0x5d269d[_0x13aa06(0x128)](fetch,_0x2e0d2d,{'method':_0x13aa06(0x139),'headers':{'Content-Type':_0x3848ab,'Content-Length':_0x338eb2[_0x13aa06(0x14b)][_0x13aa06(0x192)]()},'body':_0x338eb2});if(!_0xb24dd7['ok']){const _0x513e9a=await _0xb24dd7[_0x13aa06(0x15d)]();throw new Error(_0x13aa06(0x19e)+_0x513e9a);}}export async function uploadTrace(_0x247db6,_0x180a84){const _0x50698c=_0x292e,_0x18a719={'xVFIh':function(_0x163c75,_0x36eaea,_0x4927fb,_0x26c642){return _0x163c75(_0x36eaea,_0x4927fb,_0x26c642);},'KFuqi':_0x50698c(0x12d)};return _0x18a719['xVFIh'](uploadFile,_0x247db6,_0x180a84,_0x18a719[_0x50698c(0x18a)]);}export async function uploadConversation(_0x54e3d7,_0x42e004){const _0x2d4df1=_0x292e,_0x1396ba={'XDlsy':function(_0x2ae80d,_0x11bb6d,_0x11cec4,_0x403391){return _0x2ae80d(_0x11bb6d,_0x11cec4,_0x403391);},'VNJbV':'application/jsonl'};return _0x1396ba[_0x2d4df1(0x13e)](uploadFile,_0x54e3d7,_0x42e004,_0x1396ba[_0x2d4df1(0x158)]);}export async function uploadScreenshot(_0x197e37,_0x420d7d){const _0x31a947=_0x292e,_0x3a9481={'NfPwa':function(_0xf82748,_0x442bac,_0x5e01a3,_0x2d0cec){return _0xf82748(_0x442bac,_0x5e01a3,_0x2d0cec);},'cJpCG':'image/png'};return _0x3a9481[_0x31a947(0x137)](uploadFile,_0x197e37,_0x420d7d,_0x3a9481[_0x31a947(0x191)]);}export async function uploadVideo(_0x4fd3e3,_0x1e6f33){const _0x4a7b21=_0x292e,_0x35d490={'dgzVl':function(_0x1f8cae,_0x15744f,_0x2c6c0a,_0x5d8b63){return _0x1f8cae(_0x15744f,_0x2c6c0a,_0x5d8b63);},'vPVnE':_0x4a7b21(0x161)};return _0x35d490[_0x4a7b21(0x154)](uploadFile,_0x4fd3e3,_0x1e6f33,_0x35d490[_0x4a7b21(0x190)]);}export function buildTraceViewerUrl(_0x5005be){const _0x59695c=_0x292e,_0x26d94d={'wCzvv':function(_0x102348,_0x29d266){return _0x102348(_0x29d266);}},_0x2d64c9=_0x26d94d[_0x59695c(0x18d)](encodeURIComponent,_0x5005be);return _0x59695c(0x143)+_0x2d64c9;}export async function getProxySessionToken(){const _0x2a2e8b=_0x292e,_0x36a87a={'ibzxq':_0x2a2e8b(0x171),'VqBOT':function(_0x35e1c9){return _0x35e1c9();},'eamza':function(_0x189e49,_0x3d3686,_0x2e6483){return _0x189e49(_0x3d3686,_0x2e6483);},'NVJhQ':'POST','xXSoD':_0x2a2e8b(0x123)},_0x3dd21e=await _0x36a87a[_0x2a2e8b(0x19c)](getToken);if(!_0x3dd21e)throw new Error(_0x2a2e8b(0x171));const _0x46fe48=_0x36a87a['VqBOT'](getApiBaseUrl),_0x27cf1b=await _0x36a87a[_0x2a2e8b(0x184)](fetch,_0x46fe48+_0x2a2e8b(0x167),{'method':_0x36a87a['NVJhQ'],'headers':{'Authorization':_0x2a2e8b(0x147)+_0x3dd21e}});if(!_0x27cf1b['ok']){if('owmHM'===_0x36a87a[_0x2a2e8b(0x157)])throw new _0x3ac3df(_0x36a87a[_0x2a2e8b(0x136)]);else{const _0x5367de=await _0x27cf1b[_0x2a2e8b(0x15d)]();throw new Error(_0x2a2e8b(0x121)+_0x5367de);}}const _0x82bc6b=await _0x27cf1b['json']();return _0x82bc6b['sessionToken'];}export function computeChecksum(_0x4f71e5){const _0x51490b=_0x292e,_0x2e88f0={'SsKqs':function(_0xa771fa,_0x49359b){return _0xa771fa(_0x49359b);},'vlchD':_0x51490b(0x15e)};return _0x2e88f0[_0x51490b(0x17a)](createHash,_0x2e88f0['vlchD'])[_0x51490b(0x125)](_0x4f71e5)[_0x51490b(0x18c)](_0x51490b(0x196));}export async function createVerificationStep(_0x4a2675,_0x1cd474){const _0x3de13e=_0x292e,_0x27609e={'zzIdu':_0x3de13e(0x171),'VAZvI':function(_0x5f42e2){return _0x5f42e2();},'QpSdk':_0x3de13e(0x131),'JZYEc':_0x3de13e(0x124),'Grmad':_0x3de13e(0x149)},_0x1f5091=await _0x27609e[_0x3de13e(0x197)](getToken);if(!_0x1f5091)throw new Error(_0x27609e[_0x3de13e(0x165)]);const _0x289364=_0x27609e['VAZvI'](getApiBaseUrl),_0x5ba501=await fetch(_0x289364+'/api/v1/mcp/browser-sessions/'+_0x4a2675+_0x3de13e(0x159),{'method':_0x3de13e(0x16f),'headers':{'Authorization':_0x3de13e(0x147)+_0x1f5091,'Content-Type':_0x27609e[_0x3de13e(0x122)]},'body':JSON['stringify'](_0x1cd474)});if(!_0x5ba501['ok']){if(_0x27609e[_0x3de13e(0x17e)]===_0x27609e[_0x3de13e(0x14c)])throw new _0x2b5ee7(_0x27609e[_0x3de13e(0x165)]);else{const _0x2f4495=await _0x5ba501['text']();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x2f4495);}}return _0x5ba501[_0x3de13e(0x127)]();}export async function createStepAsset(_0x14b2b9,_0x162f08,_0xf1194e){const _0x57ed7f=_0x292e,_0x7d625f={'LBycN':function(_0x4be528){return _0x4be528();},'ZMiar':function(_0x38307b,_0x374060,_0x2f6643){return _0x38307b(_0x374060,_0x2f6643);},'gLxjY':'POST','IXVUk':_0x57ed7f(0x131)},_0x37063c=await getToken();if(!_0x37063c)throw new Error(_0x57ed7f(0x171));const _0x2cff25=_0x7d625f[_0x57ed7f(0x133)](getApiBaseUrl),_0x3ab5fe=await _0x7d625f[_0x57ed7f(0x189)](fetch,_0x2cff25+_0x57ed7f(0x18f)+_0x14b2b9+'/steps/'+_0x162f08+_0x57ed7f(0x19a),{'method':_0x7d625f[_0x57ed7f(0x135)],'headers':{'Authorization':'Bearer\x20'+_0x37063c,'Content-Type':_0x7d625f[_0x57ed7f(0x15f)]},'body':JSON[_0x57ed7f(0x15c)](_0xf1194e)});if(!_0x3ab5fe['ok']){const _0x5d0092=await _0x3ab5fe[_0x57ed7f(0x15d)]();throw new Error(_0x57ed7f(0x16d)+_0x5d0092);}return _0x3ab5fe[_0x57ed7f(0x127)]();}export async function updateVerificationStep(_0xbe3c88,_0x198c10,_0x4fe8dc){const _0x442d04=_0x292e,_0x5498e6={'KQmjc':function(_0x58e151,_0x3feb62,_0x91624a,_0x3775aa){return _0x58e151(_0x3feb62,_0x91624a,_0x3775aa);},'rcOFM':function(_0x38b0d8){return _0x38b0d8();},'NgmXR':function(_0x2c3e12,_0x5c8f95,_0x13c08e){return _0x2c3e12(_0x5c8f95,_0x13c08e);},'tQHVB':_0x442d04(0x186),'AdjvU':_0x442d04(0x17d),'iRoVv':_0x442d04(0x140)},_0x165652=await _0x5498e6[_0x442d04(0x129)](getToken);if(!_0x165652)throw new Error(_0x442d04(0x171));const _0x925c5a=_0x5498e6[_0x442d04(0x129)](getApiBaseUrl),_0xb3b3c5=await _0x5498e6[_0x442d04(0x183)](fetch,_0x925c5a+_0x442d04(0x18f)+_0xbe3c88+_0x442d04(0x177)+_0x198c10,{'method':_0x5498e6[_0x442d04(0x14d)],'headers':{'Authorization':'Bearer\x20'+_0x165652,'Content-Type':'application/json'},'body':JSON[_0x442d04(0x15c)](_0x4fe8dc)});if(!_0xb3b3c5['ok']){if(_0x5498e6[_0x442d04(0x14f)]!==_0x5498e6['iRoVv']){const _0xff5e73=await _0xb3b3c5[_0x442d04(0x15d)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0xff5e73);}else return _0x5498e6[_0x442d04(0x13d)](_0x332336,_0x1c5a03,_0x33d2c6,_0x442d04(0x12d));}}export async function getBrowserSessionSteps(_0x438fb7){const _0x599173=_0x292e,_0x4c64c3={'FIBpQ':function(_0x216394){return _0x216394();},'OYNur':_0x599173(0x171),'wEAeo':function(_0x4ca4be,_0xd97f0e,_0x3eb325){return _0x4ca4be(_0xd97f0e,_0x3eb325);}},_0x3127e3=await _0x4c64c3[_0x599173(0x17c)](getToken);if(!_0x3127e3)throw new Error(_0x4c64c3[_0x599173(0x18b)]);const _0x116774=_0x4c64c3[_0x599173(0x17c)](getApiBaseUrl),_0xe871fa=await _0x4c64c3['wEAeo'](fetch,_0x116774+_0x599173(0x18f)+_0x438fb7+_0x599173(0x159),{'method':_0x599173(0x169),'headers':{'Authorization':_0x599173(0x147)+_0x3127e3}});if(!_0xe871fa['ok']){const _0x49ae93=await _0xe871fa[_0x599173(0x15d)]();throw new Error(_0x599173(0x164)+_0x49ae93);}return _0xe871fa[_0x599173(0x127)]();}
1
+ (function(_0x5e9416,_0x224a96){const _0x5dcf43=_0x4654,_0x5dde6f=_0x5e9416();while(!![]){try{const _0x700c83=parseInt(_0x5dcf43(0xba))/0x1+-parseInt(_0x5dcf43(0xfe))/0x2+-parseInt(_0x5dcf43(0x137))/0x3*(parseInt(_0x5dcf43(0xcb))/0x4)+parseInt(_0x5dcf43(0xb8))/0x5+parseInt(_0x5dcf43(0x11d))/0x6+-parseInt(_0x5dcf43(0xe3))/0x7*(-parseInt(_0x5dcf43(0xd7))/0x8)+-parseInt(_0x5dcf43(0x117))/0x9;if(_0x700c83===_0x224a96)break;else _0x5dde6f['push'](_0x5dde6f['shift']());}catch(_0x5d03da){_0x5dde6f['push'](_0x5dde6f['shift']());}}}(_0x48bf,0xd9840));const _0xe9d0f9=(function(){const _0x222cf5=_0x4654,_0x36de84={'yudBi':function(_0x4deb28,_0x373e1d){return _0x4deb28!==_0x373e1d;},'DvnWQ':_0x222cf5(0x12a),'NrbIy':_0x222cf5(0xd2),'kcjje':'ilpBv','JrHTr':_0x222cf5(0xf2)};let _0x3851ea=!![];return function(_0x260e76,_0x54266b){const _0x2b3a5e=_0x222cf5;if(_0x36de84[_0x2b3a5e(0xd4)](_0x36de84[_0x2b3a5e(0x10f)],_0x36de84[_0x2b3a5e(0xc7)])){const _0x22e61f=_0x3851ea?function(){const _0x320d76=_0x2b3a5e;if(_0x54266b){if(_0x36de84['yudBi'](_0x36de84[_0x320d76(0xc6)],_0x36de84[_0x320d76(0xb6)])){const _0x21ea3d=_0x54266b[_0x320d76(0xe7)](_0x260e76,arguments);return _0x54266b=null,_0x21ea3d;}else throw new _0x18aabe(_0x320d76(0x119));}}:function(){};return _0x3851ea=![],_0x22e61f;}else{const _0x4a2d8c=_0x30c6ac['apply'](_0x5cb6aa,arguments);return _0x457950=null,_0x4a2d8c;}};}()),_0x16c6df=_0xe9d0f9(this,function(){const _0x24b94c=_0x4654,_0x4612bd={'NNoVC':_0x24b94c(0x104)};return _0x16c6df[_0x24b94c(0x118)]()[_0x24b94c(0xfa)](_0x4612bd[_0x24b94c(0xe2)])[_0x24b94c(0x118)]()[_0x24b94c(0x12c)](_0x16c6df)[_0x24b94c(0xfa)](_0x4612bd[_0x24b94c(0xe2)]);});_0x16c6df();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x33bbe3){const _0x558008=_0x4654,_0x5ad82d={'TzPta':function(_0x546491){return _0x546491();},'Zcuvn':_0x558008(0x119),'KQaFS':_0x558008(0x12f),'WtnyR':_0x558008(0xbe)},_0x32cff4=await _0x5ad82d[_0x558008(0x115)](getToken);if(!_0x32cff4)throw new Error(_0x5ad82d['Zcuvn']);const _0x2aca15=getApiBaseUrl(),_0x4c4e04=await fetch(_0x2aca15+_0x558008(0x130),{'method':_0x5ad82d[_0x558008(0x136)],'headers':{'Authorization':_0x558008(0x111)+_0x32cff4,'Content-Type':_0x5ad82d[_0x558008(0x107)]},'body':JSON['stringify']({'environmentName':_0x33bbe3?.[_0x558008(0xc5)],'settings':_0x33bbe3?.[_0x558008(0xee)],'task':_0x33bbe3?.['task'],'url':_0x33bbe3?.[_0x558008(0xfb)],'featureId':_0x33bbe3?.['featureId'],'checklistItemId':_0x33bbe3?.[_0x558008(0x112)]})});if(!_0x4c4e04['ok']){const _0x82d87f=await _0x4c4e04[_0x558008(0xc9)]();throw new Error(_0x558008(0xff)+_0x82d87f);}return _0x4c4e04[_0x558008(0x139)]();}export async function updateBrowserSession(_0x3f5022,_0x3d3c02){const _0xb841f9=_0x4654,_0x14a442={'WoxtH':function(_0x5221e6,_0x49f27c,_0x58b03b,_0x5c19a8){return _0x5221e6(_0x49f27c,_0x58b03b,_0x5c19a8);},'mqQpV':_0xb841f9(0x120),'YvNRJ':'IBWBb','NxqFd':function(_0x3be898){return _0x3be898();},'FyCRH':_0xb841f9(0x119),'qHiRE':function(_0x343819,_0x30f6cf,_0x368f4d){return _0x343819(_0x30f6cf,_0x368f4d);},'qZNtp':_0xb841f9(0xe4),'nZHOj':function(_0x48f036,_0x25f2cd){return _0x48f036!==_0x25f2cd;},'KSJDt':_0xb841f9(0xd6),'gjuPQ':'MZVJB'};return _0x14a442[_0xb841f9(0xbb)](withRetry,async()=>{const _0x1f24c2=_0xb841f9,_0x39227b={'tpbmS':function(_0x4beb8e,_0x261c09,_0x56ffcc,_0x3cd354){return _0x14a442['WoxtH'](_0x4beb8e,_0x261c09,_0x56ffcc,_0x3cd354);},'vZIFj':_0x14a442[_0x1f24c2(0xfd)],'Ngryn':function(_0x191b5e,_0x1808d8,_0x478469,_0x591c1a){const _0x430bb3=_0x1f24c2;return _0x14a442[_0x430bb3(0xc1)](_0x191b5e,_0x1808d8,_0x478469,_0x591c1a);}};if(_0x14a442[_0x1f24c2(0xdb)]===_0x14a442['YvNRJ']){const _0xc4a355=await _0x14a442[_0x1f24c2(0xc2)](getToken);if(!_0xc4a355)throw new Error(_0x14a442[_0x1f24c2(0xcf)]);const _0x3b2e54=_0x14a442['NxqFd'](getApiBaseUrl),_0x579efd=await _0x14a442[_0x1f24c2(0xbb)](fetch,_0x3b2e54+_0x1f24c2(0xdc)+_0x3f5022,{'method':_0x14a442[_0x1f24c2(0x135)],'headers':{'Authorization':_0x1f24c2(0x111)+_0xc4a355,'Content-Type':_0x1f24c2(0xbe)},'body':JSON['stringify'](_0x3d3c02)});if(!_0x579efd['ok']){if(_0x14a442['nZHOj'](_0x14a442['KSJDt'],_0x14a442[_0x1f24c2(0x106)])){const _0x2ce518=await _0x579efd['text']();throw new Error(_0x1f24c2(0xdd)+_0x2ce518);}else return _0x39227b[_0x1f24c2(0x11c)](_0x34d190,_0x9805b1,_0x2f2afc,_0x39227b['vZIFj']);}return _0x579efd[_0x1f24c2(0x139)]();}else return _0x39227b['Ngryn'](_0x193024,_0x17f032,_0x4e0f64,'application/jsonl');},{'label':_0xb841f9(0xb5)});}export async function getBrowserSession(_0x239a98){const _0x7e9cfd=_0x4654,_0x1dca49={'sKRUo':function(_0x4d4eda,_0x35ed89){return _0x4d4eda!==_0x35ed89;},'XvZhX':_0x7e9cfd(0xe6),'XXofj':_0x7e9cfd(0x119),'SUcvD':function(_0xf722cb){return _0xf722cb();},'VJcaM':function(_0x37001e,_0x573bb2,_0x1df626){return _0x37001e(_0x573bb2,_0x1df626);},'MELGO':_0x7e9cfd(0x105)},_0x2969db=await getToken();if(!_0x2969db){if(_0x1dca49[_0x7e9cfd(0xcc)](_0x1dca49['XvZhX'],_0x1dca49['XvZhX'])){if(_0x5bf230){const _0x42842f=_0x35e9d0[_0x7e9cfd(0xe7)](_0x528a5b,arguments);return _0x2b9c35=null,_0x42842f;}}else throw new Error(_0x1dca49[_0x7e9cfd(0xda)]);}const _0x492bf2=_0x1dca49['SUcvD'](getApiBaseUrl),_0x369793=await _0x1dca49[_0x7e9cfd(0xb3)](fetch,_0x492bf2+_0x7e9cfd(0xdc)+_0x239a98,{'method':_0x1dca49[_0x7e9cfd(0xf3)],'headers':{'Authorization':_0x7e9cfd(0x111)+_0x2969db}});if(!_0x369793['ok']){const _0x29b4e7=await _0x369793[_0x7e9cfd(0xc9)]();throw new Error(_0x7e9cfd(0xdf)+_0x29b4e7);}return _0x369793[_0x7e9cfd(0x139)]();}export async function getUploadUrls(_0x30f6ec,_0x37ca9a,_0x5b203a,_0x2133ef){const _0x2c0b6b=_0x4654,_0x4c56c7={'SLhPd':function(_0x5b4e0f){return _0x5b4e0f();},'lPepZ':_0x2c0b6b(0x119),'YnIoF':function(_0xa0fed2){return _0xa0fed2();},'osZII':_0x2c0b6b(0x12f),'jhJaS':_0x2c0b6b(0xbe),'SQkXE':function(_0x31b202,_0x2c64fc){return _0x31b202!==_0x2c64fc;}},_0x28ada5=await _0x4c56c7[_0x2c0b6b(0xf8)](getToken);if(!_0x28ada5)throw new Error(_0x4c56c7[_0x2c0b6b(0x122)]);const _0x6525d2=_0x4c56c7[_0x2c0b6b(0xfc)](getApiBaseUrl),_0x5e4488=await fetch(_0x6525d2+_0x2c0b6b(0xdc)+_0x30f6ec+_0x2c0b6b(0xc3),{'method':_0x4c56c7[_0x2c0b6b(0xf5)],'headers':{'Authorization':'Bearer\x20'+_0x28ada5,'Content-Type':_0x4c56c7['jhJaS']},'body':JSON[_0x2c0b6b(0xf4)]({'filename':_0x37ca9a,'filetype':_0x5b203a,..._0x4c56c7[_0x2c0b6b(0x10e)](_0x2133ef?.[_0x2c0b6b(0xe5)],undefined)&&{'size':_0x2133ef[_0x2c0b6b(0xe5)]},..._0x2133ef?.[_0x2c0b6b(0xb4)]!==undefined&&{'checksum':_0x2133ef[_0x2c0b6b(0xb4)]},..._0x2133ef?.[_0x2c0b6b(0x12b)]!==undefined&&{'metadata':_0x2133ef['metadata']}})});if(!_0x5e4488['ok']){const _0xc29f7d=await _0x5e4488[_0x2c0b6b(0xc9)]();throw new Error(_0x2c0b6b(0x124)+_0xc29f7d);}return _0x5e4488['json']();}export async function uploadFile(_0x1b4a8c,_0x3086bd,_0x58378d){const _0x34c7b7=_0x4654,_0x5b7fe9={'KPOCe':_0x34c7b7(0x119),'vAcuR':function(_0x5463f1,_0x44d159,_0x3f1887){return _0x5463f1(_0x44d159,_0x3f1887);},'KFfhU':_0x34c7b7(0xbc),'HOvJI':_0x34c7b7(0xf6)},_0x2fbc22=await _0x5b7fe9[_0x34c7b7(0x10b)](fetch,_0x1b4a8c,{'method':_0x5b7fe9['KFfhU'],'headers':{'Content-Type':_0x58378d,'Content-Length':_0x3086bd['length'][_0x34c7b7(0x118)]()},'body':_0x3086bd});if(!_0x2fbc22['ok']){if(_0x5b7fe9[_0x34c7b7(0x138)]!==_0x5b7fe9[_0x34c7b7(0x138)])throw new _0x2b493a(_0x5b7fe9['KPOCe']);else{const _0x563bc2=await _0x2fbc22['text']();throw new Error(_0x34c7b7(0x123)+_0x563bc2);}}}export async function uploadTrace(_0x328230,_0x3ed5eb){const _0x36695=_0x4654,_0x45df5e={'vPVXP':function(_0x38e04a,_0x32f2b9,_0x12aaf9,_0xbc4c02){return _0x38e04a(_0x32f2b9,_0x12aaf9,_0xbc4c02);},'CYHma':'application/zip'};return _0x45df5e['vPVXP'](uploadFile,_0x328230,_0x3ed5eb,_0x45df5e[_0x36695(0xef)]);}export async function uploadConversation(_0x207f67,_0x59d0b3){const _0x4f176d=_0x4654,_0x173f66={'GFARf':function(_0x7b64f4,_0x271ea1,_0x344ae2,_0x295482){return _0x7b64f4(_0x271ea1,_0x344ae2,_0x295482);},'nDfuR':_0x4f176d(0xd5)};return _0x173f66[_0x4f176d(0x110)](uploadFile,_0x207f67,_0x59d0b3,_0x173f66['nDfuR']);}export async function uploadScreenshot(_0x31e79d,_0x425bc6){const _0x5201e6=_0x4654,_0x3d8ecb={'pQkoI':function(_0x48f3be,_0x4294d3,_0x3a865a,_0x546ddc){return _0x48f3be(_0x4294d3,_0x3a865a,_0x546ddc);},'bGCNy':'image/png'};return _0x3d8ecb['pQkoI'](uploadFile,_0x31e79d,_0x425bc6,_0x3d8ecb[_0x5201e6(0xca)]);}export async function uploadVideo(_0x59096d,_0x542670){const _0x564f1f=_0x4654,_0x24b99b={'GHSHJ':function(_0x4bfe93,_0x2ec4e0,_0x386ce9,_0x2c9b7d){return _0x4bfe93(_0x2ec4e0,_0x386ce9,_0x2c9b7d);}};return _0x24b99b['GHSHJ'](uploadFile,_0x59096d,_0x542670,_0x564f1f(0x127));}export function buildTraceViewerUrl(_0x11a03a){const _0x2e086a=_0x4654,_0x3e70d1=encodeURIComponent(_0x11a03a);return _0x2e086a(0xe1)+_0x3e70d1;}export async function getProxySessionToken(){const _0x277b1e=_0x4654,_0x5eee2d={'ImnoT':'(((.+)+)+)+$','KPmBW':function(_0x639a48){return _0x639a48();},'RbbfZ':function(_0x1fddc1,_0x5030fe){return _0x1fddc1===_0x5030fe;},'JtPQY':_0x277b1e(0xf1),'ubuZK':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','VLoHk':_0x277b1e(0x12f),'acpkv':function(_0x28f508,_0x146b82){return _0x28f508===_0x146b82;},'SlGGB':_0x277b1e(0x11e)},_0x356f80=await _0x5eee2d[_0x277b1e(0xe8)](getToken);if(!_0x356f80){if(_0x5eee2d[_0x277b1e(0x132)](_0x277b1e(0xc8),_0x5eee2d[_0x277b1e(0xb9)])){const _0x3337c2=_0x150377(_0x5d7a7a);return _0x277b1e(0xe1)+_0x3337c2;}else throw new Error(_0x5eee2d[_0x277b1e(0xde)]);}const _0x1fa9b9=_0x5eee2d[_0x277b1e(0xe8)](getApiBaseUrl),_0xeaa8d2=await fetch(_0x1fa9b9+_0x277b1e(0x113),{'method':_0x5eee2d['VLoHk'],'headers':{'Authorization':_0x277b1e(0x111)+_0x356f80}});if(!_0xeaa8d2['ok']){if(_0x5eee2d[_0x277b1e(0x101)](_0x5eee2d[_0x277b1e(0x116)],'GJgDW'))return _0x25d972['toString']()[_0x277b1e(0xfa)](PIQUWq[_0x277b1e(0x134)])[_0x277b1e(0x118)]()['constructor'](_0x575f94)[_0x277b1e(0xfa)](_0x277b1e(0x104));else{const _0x2d5cb1=await _0xeaa8d2[_0x277b1e(0xc9)]();throw new Error(_0x277b1e(0xe9)+_0x2d5cb1);}}const _0x36bfc9=await _0xeaa8d2['json']();return _0x36bfc9[_0x277b1e(0x10a)];}function _0x4654(_0x235499,_0x1e5a1c){_0x235499=_0x235499-0xb3;const _0x55a525=_0x48bf();let _0x16c6df=_0x55a525[_0x235499];if(_0x4654['eleDAp']===undefined){var _0xe9d0f9=function(_0x48a3d5){const _0x454aeb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x53ecd4='',_0x2a5c69='',_0x4ffb11=_0x53ecd4+_0xe9d0f9;for(let _0x2078b2=0x0,_0x45c47f,_0x4aded4,_0x55e2d4=0x0;_0x4aded4=_0x48a3d5['charAt'](_0x55e2d4++);~_0x4aded4&&(_0x45c47f=_0x2078b2%0x4?_0x45c47f*0x40+_0x4aded4:_0x4aded4,_0x2078b2++%0x4)?_0x53ecd4+=_0x4ffb11['charCodeAt'](_0x55e2d4+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x45c47f>>(-0x2*_0x2078b2&0x6)):_0x2078b2:0x0){_0x4aded4=_0x454aeb['indexOf'](_0x4aded4);}for(let _0x1c90a2=0x0,_0x16d02c=_0x53ecd4['length'];_0x1c90a2<_0x16d02c;_0x1c90a2++){_0x2a5c69+='%'+('00'+_0x53ecd4['charCodeAt'](_0x1c90a2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2a5c69);};_0x4654['NavNZQ']=_0xe9d0f9,_0x4654['kOZKxX']={},_0x4654['eleDAp']=!![];}const _0x48bf84=_0x55a525[0x0],_0x465436=_0x235499+_0x48bf84,_0x52c779=_0x4654['kOZKxX'][_0x465436];if(!_0x52c779){const _0xbb515c=function(_0x30f3ba){this['KNxOcJ']=_0x30f3ba,this['PWkyjw']=[0x1,0x0,0x0],this['QpNoiC']=function(){return'newState';},this['UrtwUA']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['Otxtir']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xbb515c['prototype']['KLfqgo']=function(){const _0x13c785=new RegExp(this['UrtwUA']+this['Otxtir']),_0x451313=_0x13c785['test'](this['QpNoiC']['toString']())?--this['PWkyjw'][0x1]:--this['PWkyjw'][0x0];return this['PhqMCF'](_0x451313);},_0xbb515c['prototype']['PhqMCF']=function(_0x57ccc5){if(!Boolean(~_0x57ccc5))return _0x57ccc5;return this['BMtTzg'](this['KNxOcJ']);},_0xbb515c['prototype']['BMtTzg']=function(_0x24d2e7){for(let _0x193013=0x0,_0x4fbbfe=this['PWkyjw']['length'];_0x193013<_0x4fbbfe;_0x193013++){this['PWkyjw']['push'](Math['round'](Math['random']())),_0x4fbbfe=this['PWkyjw']['length'];}return _0x24d2e7(this['PWkyjw'][0x0]);},new _0xbb515c(_0x4654)['KLfqgo'](),_0x16c6df=_0x4654['NavNZQ'](_0x16c6df),_0x4654['kOZKxX'][_0x465436]=_0x16c6df;}else _0x16c6df=_0x52c779;return _0x16c6df;}export function computeChecksum(_0x2ea695){const _0x1acff4=_0x4654,_0x49862d={'xQtOg':function(_0xb868d6,_0x5df2b5){return _0xb868d6(_0x5df2b5);},'xwZmr':_0x1acff4(0x108),'jbxYQ':'base64'};return _0x49862d[_0x1acff4(0xbd)](createHash,_0x49862d[_0x1acff4(0xe0)])['update'](_0x2ea695)['digest'](_0x49862d['jbxYQ']);}export async function createVerificationStep(_0x488d14,_0x5c1f2c){const _0x30ee68=_0x4654,_0x52d960={'bJqnL':_0x30ee68(0x119),'jhWbM':function(_0x3e4436,_0xb9b39f){return _0x3e4436!==_0xb9b39f;},'lSUMy':_0x30ee68(0xc0),'vELCI':function(_0xebfcb){return _0xebfcb();},'aFhTg':function(_0x44bb73,_0x235944,_0x47264d){return _0x44bb73(_0x235944,_0x47264d);},'DXHIZ':_0x30ee68(0x12f),'fkhTA':_0x30ee68(0xbe),'ehGeU':function(_0x3dde91,_0x1abe54){return _0x3dde91!==_0x1abe54;},'JkFZJ':_0x30ee68(0xd3)},_0x4afcad=await getToken();if(!_0x4afcad){if(_0x52d960[_0x30ee68(0x129)](_0x52d960[_0x30ee68(0xd0)],_0x52d960['lSUMy']))throw new _0x1b6020(_0x52d960[_0x30ee68(0x125)]);else throw new Error(_0x52d960[_0x30ee68(0x125)]);}const _0x115f17=_0x52d960[_0x30ee68(0xf9)](getApiBaseUrl),_0x36352=await _0x52d960[_0x30ee68(0xeb)](fetch,_0x115f17+_0x30ee68(0xdc)+_0x488d14+_0x30ee68(0x131),{'method':_0x52d960[_0x30ee68(0x121)],'headers':{'Authorization':_0x30ee68(0x111)+_0x4afcad,'Content-Type':_0x52d960['fkhTA']},'body':JSON['stringify'](_0x5c1f2c)});if(!_0x36352['ok']){if(_0x52d960[_0x30ee68(0xcd)](_0x52d960['JkFZJ'],_0x30ee68(0xf7))){const _0x4f4680=await _0x36352[_0x30ee68(0xc9)]();throw new Error(_0x30ee68(0xd9)+_0x4f4680);}else throw new _0x58de56(_0x52d960[_0x30ee68(0x125)]);}return _0x36352[_0x30ee68(0x139)]();}export async function createStepAsset(_0x2bf614,_0x1e62c5,_0x1c5c0c){const _0x376d1b=_0x4654,_0x2b356b={'otUDJ':function(_0x45f7ab,_0x704604){return _0x45f7ab(_0x704604);},'veJSP':_0x376d1b(0xea),'qASFc':function(_0x2b2064){return _0x2b2064();},'hSxRT':function(_0x5445a1){return _0x5445a1();},'gyObo':function(_0x1c5e28,_0x18c880,_0x12838d){return _0x1c5e28(_0x18c880,_0x12838d);},'vHAXd':function(_0x5498df,_0x3ea7ea){return _0x5498df===_0x3ea7ea;},'kpBpX':_0x376d1b(0x10d),'EFapc':'wIktZ'},_0x278800=await _0x2b356b[_0x376d1b(0x102)](getToken);if(!_0x278800)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x53e5cb=_0x2b356b[_0x376d1b(0xbf)](getApiBaseUrl),_0x476d05=await _0x2b356b['gyObo'](fetch,_0x53e5cb+_0x376d1b(0xdc)+_0x2bf614+_0x376d1b(0x103)+_0x1e62c5+_0x376d1b(0x109),{'method':_0x376d1b(0x12f),'headers':{'Authorization':_0x376d1b(0x111)+_0x278800,'Content-Type':_0x376d1b(0xbe)},'body':JSON[_0x376d1b(0xf4)](_0x1c5c0c)});if(!_0x476d05['ok']){if(_0x2b356b[_0x376d1b(0xf0)](_0x2b356b[_0x376d1b(0x11a)],_0x2b356b[_0x376d1b(0x12d)]))return _0x2b356b[_0x376d1b(0xd8)](_0x33dd65,_0x376d1b(0x108))[_0x376d1b(0x11b)](_0x533a84)[_0x376d1b(0x12e)](_0x2b356b[_0x376d1b(0x128)]);else{const _0x178d20=await _0x476d05['text']();throw new Error(_0x376d1b(0xed)+_0x178d20);}}return _0x476d05['json']();}export async function updateVerificationStep(_0x184731,_0x1d1ebd,_0x5e84db){const _0x17fef8=_0x4654,_0x49a452={'sjoGK':_0x17fef8(0x119),'VPhhl':function(_0x5e5184){return _0x5e5184();},'ZEWPf':function(_0x3d6832,_0x76d1fb){return _0x3d6832===_0x76d1fb;},'WUcoR':_0x17fef8(0x13a),'SDOMr':function(_0x9e58a2,_0x2b9ece,_0x3c1889){return _0x9e58a2(_0x2b9ece,_0x3c1889);},'ZQuOl':_0x17fef8(0xbe)},_0x1ea44b=await _0x49a452['VPhhl'](getToken);if(!_0x1ea44b){if(_0x49a452[_0x17fef8(0xc4)](_0x49a452[_0x17fef8(0xec)],'DevtW'))throw new Error(_0x49a452[_0x17fef8(0xd1)]);else throw new _0x530dbb(_0x49a452[_0x17fef8(0xd1)]);}const _0x40d6b5=_0x49a452[_0x17fef8(0xce)](getApiBaseUrl),_0x37ebb2=await _0x49a452['SDOMr'](fetch,_0x40d6b5+_0x17fef8(0xdc)+_0x184731+_0x17fef8(0x103)+_0x1d1ebd,{'method':_0x17fef8(0xe4),'headers':{'Authorization':_0x17fef8(0x111)+_0x1ea44b,'Content-Type':_0x49a452[_0x17fef8(0xb7)]},'body':JSON[_0x17fef8(0xf4)](_0x5e84db)});if(!_0x37ebb2['ok']){const _0x1e4607=await _0x37ebb2['text']();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0x1e4607);}}function _0x48bf(){const _0x153660=['C2v0DgLUz3m','q1LiBwe','DKHbwgq','B0P3ELm','y1PeAKW','tuvmr08','C3rYAw5NAwz5','B3nAsuK','ue9UBuW','turxzMe','u0XOugq','DKvmq0K','C2vHCMnO','DxjS','ww5jB0y','BxfrCfy','mtm4nZKXmeDmy0ndtG','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','swzmz0K','ywnWA3y','CuftrMm','l3n0zxbZlW','kcGOlISPkYKRksSK','r0vu','z2P1ufe','v3rUEvi','Bwq1','l2fZC2v0CW','C2vZC2LVBLrVA2vU','DKfJDvi','svbWvMy','wg9rDuW','u1fRweu','A2nQAMu','r0zbuMy','qMvHCMvYia','y2HLy2TSAxn0sxrLBuLK','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','vhPqDge','u2Xhr0i','mtG4mJG0ntbTugDAEfa','Dg9tDhjPBMC','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','A3bcCfG','DxbKyxrL','DhbIBvm','nZC2otKZngHdrKLqvq','CK1bue0','txbwuuS','yxbWBgLJyxrPB24VEMLW','rfHisvO','BfbLCfO','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','yKPXBKW','qK1luK4','DMLKzw8VD2vIBq','DMvku1a','AMHxyK0','y2rxwvu','Bwv0ywrHDge','y29UC3rYDwn0B3i','ruzHCgm','zgLNzxn0','ue9tva','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','l3n0zxbZ','uMjIzLO','BNHwqLe','sw1UB1q','CvPoDha','s1fHrLm','nMzmufLUtW','se92sKK','ANnVBG','rgv2DfC','vKPJyu0','y2HLy2TZDw0','DxbKyxrLqNjVD3nLCLnLC3nPB24','tNjIsxK','wLf1t2W','nJu1nJm3mg5UDurpBG','sNrquvK','nJy5mtK1tvP2B0X5','CuHPuKu','ufvu','Eff0t2C','yxbWBgLJyxrPB24VANnVBG','Afn4uLq','shPqseu','v294DeG','tNHXrMq','l3vWBg9Hzc11CMXZ','wKvxugy','zw52AxjVBM1LBNroyw1L','rhzUv1e','sNjivhi','vw1yve0','Dgv4Da','yKDdtNK','mtiZmZuZmLjzqwn3AG','C0Tsvw8','zwHhzvu','vLbOAgW','rNLduKG','BfnvtxK','C2PVr0S','C21XALG','CKnHu0G','ExvKqMK','yxbWBgLJyxrPB24VANnVBMW','Cw5jyxu','ode0nJa1nMHquuP6wG','B3rvreO','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','wfHVzMO','wxzouKO','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','Dwj1wKS','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','EhDABxi','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','tK5VvKm','n1LQz2Lktq','uefuq0G','C2L6zq','z3DhD24','yxbWBhK','s1bTqLC','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','yMfZzty0','yuzOvgC','v1vJB1i','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa'];_0x48bf=function(){return _0x153660;};return _0x48bf();}export async function getBrowserSessionSteps(_0x307e45){const _0x25ed4f=_0x4654,_0x3a77b1={'MpVQK':function(_0x401c0a,_0x803c91,_0x3ba25d,_0x3ee942){return _0x401c0a(_0x803c91,_0x3ba25d,_0x3ee942);},'gTKfY':function(_0x4fc097){return _0x4fc097();},'CpKFS':_0x25ed4f(0x119),'pZjEB':function(_0x3defca,_0x3bde04,_0x67a35){return _0x3defca(_0x3bde04,_0x67a35);},'IPpVf':function(_0x339906,_0x31bc67){return _0x339906===_0x31bc67;},'IfLgI':_0x25ed4f(0x133),'jpbyq':_0x25ed4f(0x126)},_0x2e91de=await _0x3a77b1['gTKfY'](getToken);if(!_0x2e91de)throw new Error(_0x3a77b1['CpKFS']);const _0x360c31=getApiBaseUrl(),_0x387776=await _0x3a77b1['pZjEB'](fetch,_0x360c31+_0x25ed4f(0xdc)+_0x307e45+_0x25ed4f(0x131),{'method':_0x25ed4f(0x105),'headers':{'Authorization':_0x25ed4f(0x111)+_0x2e91de}});if(!_0x387776['ok']){if(_0x3a77b1[_0x25ed4f(0x10c)](_0x3a77b1[_0x25ed4f(0x100)],_0x3a77b1['jpbyq']))return _0x3a77b1[_0x25ed4f(0x11f)](_0x475035,_0x2902d7,_0x56f84c,_0x25ed4f(0x127));else{const _0x393473=await _0x387776[_0x25ed4f(0xc9)]();throw new Error(_0x25ed4f(0x114)+_0x393473);}}return _0x387776[_0x25ed4f(0x139)]();}
@@ -1 +1 @@
1
- (function(_0x3718a9,_0x1a1273){const _0x37eac1=_0x2628,_0x540b5b=_0x3718a9();while(!![]){try{const _0x1e4128=parseInt(_0x37eac1(0xa5))/0x1*(parseInt(_0x37eac1(0xa4))/0x2)+parseInt(_0x37eac1(0xae))/0x3+parseInt(_0x37eac1(0xbb))/0x4+parseInt(_0x37eac1(0xb2))/0x5*(parseInt(_0x37eac1(0xb9))/0x6)+parseInt(_0x37eac1(0xaa))/0x7+parseInt(_0x37eac1(0xa3))/0x8*(-parseInt(_0x37eac1(0xb6))/0x9)+-parseInt(_0x37eac1(0xba))/0xa;if(_0x1e4128===_0x1a1273)break;else _0x540b5b['push'](_0x540b5b['shift']());}catch(_0x10d321){_0x540b5b['push'](_0x540b5b['shift']());}}}(_0x9f34,0xc1ab1));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';function _0x2628(_0xc8d73a,_0x27818c){_0xc8d73a=_0xc8d73a-0xa3;const _0x9f34a0=_0x9f34();let _0x2628c3=_0x9f34a0[_0xc8d73a];return _0x2628c3;}import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0xeec13d={'WZMCK':'.claude'};return process['env']['CLAUDE_CONFIG_DIR']||join(homedir(),_0xeec13d['WZMCK']);}export function getUserSkillsDir(){const _0x112f95=_0x2628,_0x18994e={'sfPBv':function(_0x102a00,_0x5d906,_0x197e69){return _0x102a00(_0x5d906,_0x197e69);}};return _0x18994e[_0x112f95(0xb7)](join,getClaudeConfigDir(),_0x112f95(0xb8));}function _0x9f34(){const _0x1996bd=['stringify','3885216UFhsuF','2962IdpjhS','319Vpooxj','dZcHA','.claude','eJFAb','settings.json','5956881vRkESP','root','.git','parse','3559374nSFlyy','asZbQ','cwd','RBsrO','1205MQcepi','XQKGM','UYxDs','utf-8','9fvfmwc','sfPBv','skills','5838jnancr','24967190GznWoe','4125052selHLV'];_0x9f34=function(){return _0x1996bd;};return _0x9f34();}export function getProjectRoot(){const _0x22b5c3=_0x2628,_0x389169={'RBsrO':function(_0x2cebbf,_0x4d56e3){return _0x2cebbf(_0x4d56e3);},'asZbQ':'.claude'};let _0x351e52=process[_0x22b5c3(0xb0)]();const _0x18d8b6=_0x389169[_0x22b5c3(0xb1)](parse,_0x351e52)[_0x22b5c3(0xab)];while(_0x351e52!==_0x18d8b6){if(existsSync(join(_0x351e52,_0x389169[_0x22b5c3(0xaf)])))return _0x351e52;if(existsSync(join(_0x351e52,_0x22b5c3(0xac))))return _0x351e52;_0x351e52=_0x389169[_0x22b5c3(0xb1)](dirname,_0x351e52);}return process[_0x22b5c3(0xb0)]();}export function getProjectSkillsDir(){const _0x42b33a=_0x2628,_0x4ac236={'gbiOY':function(_0x4d1a12,_0x13cb14,_0x3c8c69,_0x4ff455){return _0x4d1a12(_0x13cb14,_0x3c8c69,_0x4ff455);},'ZFWaJ':_0x42b33a(0xa7),'VpBdD':_0x42b33a(0xb8)};return _0x4ac236['gbiOY'](join,getProjectRoot(),_0x4ac236['ZFWaJ'],_0x4ac236['VpBdD']);}export function getSkillsDir(_0x428b7e){const _0x2d0143=_0x2628,_0x51b1b4={'XQKGM':function(_0x3759b1){return _0x3759b1();}};return _0x428b7e==='user'?getUserSkillsDir():_0x51b1b4[_0x2d0143(0xb3)](getProjectSkillsDir);}export function getSettingsPath(){const _0x4b4533=_0x2628,_0x5f426b={'UYxDs':function(_0x17a324,_0x539299,_0x4a6cfd){return _0x17a324(_0x539299,_0x4a6cfd);}};return _0x5f426b[_0x4b4533(0xb4)](join,getClaudeConfigDir(),_0x4b4533(0xa9));}export async function loadClaudeSettings(){const _0x3d9d95=_0x2628,_0xca0e90={'dZcHA':function(_0x16e8b6,_0xb81109,_0x2f4ec1){return _0x16e8b6(_0xb81109,_0x2f4ec1);}},_0x2999c7=getSettingsPath();if(!existsSync(_0x2999c7))return{};try{const _0x3ac4bb=await _0xca0e90[_0x3d9d95(0xa6)](readFile,_0x2999c7,_0x3d9d95(0xb5));return JSON[_0x3d9d95(0xad)](_0x3ac4bb);}catch{return{};}}export async function saveClaudeSettings(_0x9363dc){const _0x4f1729=_0x2628,_0x575ae5={'stLIx':function(_0x42f5cb,_0x3895b0){return _0x42f5cb(_0x3895b0);},'eJFAb':_0x4f1729(0xb5)},_0x526358=getSettingsPath(),_0x46a64d=getClaudeConfigDir();!_0x575ae5['stLIx'](existsSync,_0x46a64d)&&await mkdir(_0x46a64d,{'recursive':!![]}),await writeFile(_0x526358,JSON[_0x4f1729(0xbc)](_0x9363dc,null,0x2)+'\x0a',_0x575ae5[_0x4f1729(0xa8)]);}
1
+ function _0x1e67(){const _0x111ac8=['BeWwn','vmKNE','62380kooTwU','lifiS','259eVMJlo','root','722968IxsGHL','510477qoruJe','86377EXkQLC','54TzmqQz','158350QtVdeY','562299fgHMQa','.claude','env','settings.json','42054lsATqz','gSVUZ','user','uooMx','2VXLYDb','4MGFtjX'];_0x1e67=function(){return _0x111ac8;};return _0x1e67();}(function(_0x411997,_0x3f1141){const _0x169ee5=_0x310d,_0x40db62=_0x411997();while(!![]){try{const _0x440285=parseInt(_0x169ee5(0xae))/0x1+parseInt(_0x169ee5(0xb9))/0x2*(parseInt(_0x169ee5(0xb1))/0x3)+parseInt(_0x169ee5(0xba))/0x4*(parseInt(_0x169ee5(0xb0))/0x5)+parseInt(_0x169ee5(0xb5))/0x6*(-parseInt(_0x169ee5(0xbf))/0x7)+parseInt(_0x169ee5(0xac))/0x8+-parseInt(_0x169ee5(0xaf))/0x9*(parseInt(_0x169ee5(0xbd))/0xa)+parseInt(_0x169ee5(0xad))/0xb;if(_0x440285===_0x3f1141)break;else _0x40db62['push'](_0x40db62['shift']());}catch(_0x22e9bd){_0x40db62['push'](_0x40db62['shift']());}}}(_0x1e67,0x23859));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';function _0x310d(_0x451fd4,_0x38c591){_0x451fd4=_0x451fd4-0xab;const _0x1e67de=_0x1e67();let _0x310d79=_0x1e67de[_0x451fd4];return _0x310d79;}export function getClaudeConfigDir(){const _0x3b0efb=_0x310d,_0xdfe9b0={'IoCos':function(_0x380423,_0x10a0cb,_0x3ab953){return _0x380423(_0x10a0cb,_0x3ab953);},'ZrxLG':function(_0x14e0ad){return _0x14e0ad();}};return process[_0x3b0efb(0xb3)]['CLAUDE_CONFIG_DIR']||_0xdfe9b0['IoCos'](join,_0xdfe9b0['ZrxLG'](homedir),'.claude');}export function getUserSkillsDir(){const _0x42c773=_0x310d,_0x1b2d45={'JdmgG':function(_0x5dcf3f,_0x7704da,_0x3b3046){return _0x5dcf3f(_0x7704da,_0x3b3046);},'vmKNE':'skills'};return _0x1b2d45['JdmgG'](join,getClaudeConfigDir(),_0x1b2d45[_0x42c773(0xbc)]);}export function getProjectRoot(){const _0x2a37f4=_0x310d,_0x11b9f7={'lifiS':function(_0x1f03cc,_0x5bc08a){return _0x1f03cc!==_0x5bc08a;},'afvvT':function(_0xf61464,_0x3ad0b9,_0xab4fab){return _0xf61464(_0x3ad0b9,_0xab4fab);},'ZmZJh':function(_0x1e5026,_0x15f89e){return _0x1e5026(_0x15f89e);}};let _0x3663e4=process['cwd']();const _0x3a4bcf=parse(_0x3663e4)[_0x2a37f4(0xab)];while(_0x11b9f7[_0x2a37f4(0xbe)](_0x3663e4,_0x3a4bcf)){if(existsSync(join(_0x3663e4,_0x2a37f4(0xb2))))return _0x3663e4;if(existsSync(_0x11b9f7['afvvT'](join,_0x3663e4,'.git')))return _0x3663e4;_0x3663e4=_0x11b9f7['ZmZJh'](dirname,_0x3663e4);}return process['cwd']();}export function getProjectSkillsDir(){const _0x1d54a3=_0x310d,_0x5a935e={'rdVlM':function(_0x531eae){return _0x531eae();}};return join(_0x5a935e['rdVlM'](getProjectRoot),_0x1d54a3(0xb2),'skills');}export function getSkillsDir(_0x3c15a2){const _0x10532f=_0x310d,_0xbd6574={'EtMZG':_0x10532f(0xb7)};return _0x3c15a2===_0xbd6574['EtMZG']?getUserSkillsDir():getProjectSkillsDir();}export function getSettingsPath(){const _0x563317=_0x310d,_0x1e00cb={'cAuyx':_0x563317(0xb4)};return join(getClaudeConfigDir(),_0x1e00cb['cAuyx']);}export async function loadClaudeSettings(){const _0x5ba799=_0x310d,_0x30c301={'gSVUZ':function(_0x716118,_0x152bb7){return _0x716118(_0x152bb7);}},_0x30f241=getSettingsPath();if(!_0x30c301[_0x5ba799(0xb6)](existsSync,_0x30f241))return{};try{const _0x2cd5d0=await readFile(_0x30f241,'utf-8');return JSON['parse'](_0x2cd5d0);}catch{return{};}}export async function saveClaudeSettings(_0x2c9db8){const _0x19bbf1=_0x310d,_0x441d96={'BeWwn':function(_0x3337b4){return _0x3337b4();},'PSzVx':function(_0xc927c0,_0xb25067,_0x5ad763){return _0xc927c0(_0xb25067,_0x5ad763);},'uooMx':function(_0x44d33f,_0x29c857){return _0x44d33f+_0x29c857;}},_0xc34cf5=_0x441d96[_0x19bbf1(0xbb)](getSettingsPath),_0x5f3a02=_0x441d96[_0x19bbf1(0xbb)](getClaudeConfigDir);!existsSync(_0x5f3a02)&&await _0x441d96['PSzVx'](mkdir,_0x5f3a02,{'recursive':!![]}),await writeFile(_0xc34cf5,_0x441d96[_0x19bbf1(0xb8)](JSON['stringify'](_0x2c9db8,null,0x2),'\x0a'),'utf-8');}
@@ -1 +1 @@
1
- function _0x4006(){const _0x53ad0a=['10227ixLDIH','180YzlpcA','696beMARX','1281248liLTpG','611088PIBjyB','18wzNpQZ','1750ygAJbx','42031QXNVST','715624rwdZYB','stringify','1195975nhSGOL','163UoHLoU'];_0x4006=function(){return _0x53ad0a;};return _0x4006();}(function(_0x42aada,_0x3adabc){const _0x25bc3f=_0x27c6,_0x402578=_0x42aada();while(!![]){try{const _0x4bd0fc=parseInt(_0x25bc3f(0x9e))/0x1*(parseInt(_0x25bc3f(0xa5))/0x2)+parseInt(_0x25bc3f(0xa3))/0x3+parseInt(_0x25bc3f(0x9b))/0x4+-parseInt(_0x25bc3f(0x9d))/0x5+-parseInt(_0x25bc3f(0xa1))/0x6*(-parseInt(_0x25bc3f(0x9f))/0x7)+parseInt(_0x25bc3f(0xa2))/0x8*(-parseInt(_0x25bc3f(0xa4))/0x9)+parseInt(_0x25bc3f(0xa0))/0xa*(parseInt(_0x25bc3f(0xa6))/0xb);if(_0x4bd0fc===_0x3adabc)break;else _0x402578['push'](_0x402578['shift']());}catch(_0x519cfb){_0x402578['push'](_0x402578['shift']());}}}(_0x4006,0x31cc6));import{isByokEnabled}from'./environment.js';const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};function _0x27c6(_0x502bae,_0x308a60){_0x502bae=_0x502bae-0x9b;const _0x400619=_0x4006();let _0x27c649=_0x400619[_0x502bae];return _0x27c649;}export function buildClaudeOverrideExtraArgs(){const _0xf0c0f4=_0x27c6;if(isByokEnabled())return{};return{'settings':JSON[_0xf0c0f4(0x9c)](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}
1
+ (function(_0x9be606,_0x16877c){const _0x205fdb=_0xadf3,_0x133107=_0x9be606();while(!![]){try{const _0x580e56=-parseInt(_0x205fdb(0x11c))/0x1*(parseInt(_0x205fdb(0x123))/0x2)+parseInt(_0x205fdb(0x125))/0x3*(-parseInt(_0x205fdb(0x11b))/0x4)+-parseInt(_0x205fdb(0x124))/0x5+-parseInt(_0x205fdb(0x120))/0x6*(-parseInt(_0x205fdb(0x11f))/0x7)+parseInt(_0x205fdb(0x121))/0x8+-parseInt(_0x205fdb(0x11d))/0x9*(-parseInt(_0x205fdb(0x11e))/0xa)+parseInt(_0x205fdb(0x122))/0xb;if(_0x580e56===_0x16877c)break;else _0x133107['push'](_0x133107['shift']());}catch(_0x260329){_0x133107['push'](_0x133107['shift']());}}}(_0x49ea,0xa44c9));function _0xadf3(_0x81f745,_0x4f59ae){_0x81f745=_0x81f745-0x11b;const _0x49ea0a=_0x49ea();let _0xadf362=_0x49ea0a[_0x81f745];return _0xadf362;}import{isByokEnabled}from'./environment.js';const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};export function buildClaudeOverrideExtraArgs(){if(isByokEnabled())return{};return{'settings':JSON['stringify'](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}function _0x49ea(){const _0x14b8ea=['266570DDnFYo','752322srzoyB','4YfrYrB','1714KzFQxF','291105LeCkCB','20zcXtxV','147jEOBhd','76614pwntBT','4022392clqkQi','7928261TrADni','676Lehhpp'];_0x49ea=function(){return _0x14b8ea;};return _0x49ea();}
@@ -1 +1 @@
1
- function _0x373d(){const _0x2f5751=['inherit','151108zeGMsG','output','tSrsn','close','665192fvuTFw','data','stderr','4590430rwOffO','includes','error','plugin','2070UteLaW','982eeioZn','UwHss','toString','33EsyDzr','1410okgtgF','captureOutput','24KPQTve','tQnsr','ZZqtC','lTdiH','VfIRy','ignore','382vdxchj','21skQCyF','list','4830Abhfhm','682552aAuRct','10899YQADFx','stdout','AgXNY','message','match'];_0x373d=function(){return _0x2f5751;};return _0x373d();}(function(_0x3243d7,_0x1bf408){const _0x306466=_0x2263,_0x1f52fb=_0x3243d7();while(!![]){try{const _0x4525e1=-parseInt(_0x306466(0x1db))/0x1*(-parseInt(_0x306466(0x1c4))/0x2)+-parseInt(_0x306466(0x1de))/0x3*(-parseInt(_0x306466(0x1cf))/0x4)+parseInt(_0x306466(0x1c7))/0x5*(-parseInt(_0x306466(0x1df))/0x6)+parseInt(_0x306466(0x1c5))/0x7*(parseInt(_0x306466(0x1c8))/0x8)+parseInt(_0x306466(0x1c9))/0x9*(parseInt(_0x306466(0x1da))/0xa)+parseInt(_0x306466(0x1d3))/0xb+parseInt(_0x306466(0x1e1))/0xc*(-parseInt(_0x306466(0x1d6))/0xd);if(_0x4525e1===_0x1bf408)break;else _0x1f52fb['push'](_0x1f52fb['shift']());}catch(_0x27e410){_0x1f52fb['push'](_0x1f52fb['shift']());}}}(_0x373d,0x39db9));import{spawn}from'child_process';function _0x2263(_0x3e1082,_0x2cebb3){_0x3e1082=_0x3e1082-0x1c3;const _0x373da6=_0x373d();let _0x226385=_0x373da6[_0x3e1082];return _0x226385;}export function runClaudeCommand(_0x517d52,_0x3734c9){const _0xf1a832=_0x2263,_0x30c266={'VfIRy':_0xf1a832(0x1c3),'lTdiH':'pipe','tsVOJ':_0xf1a832(0x1ce),'UwHss':'claude','tSrsn':_0xf1a832(0x1d4),'EvzzR':_0xf1a832(0x1d2)};return new Promise(_0x3031a7=>{const _0x26bad3=_0xf1a832,_0x4c4802={'AgXNY':function(_0x1d0859,_0x5be6f9){return _0x1d0859(_0x5be6f9);}},_0x12a068=_0x3734c9?.[_0x26bad3(0x1e0)]?[_0x30c266[_0x26bad3(0x1e5)],'pipe',_0x30c266[_0x26bad3(0x1e4)]]:[_0x30c266[_0x26bad3(0x1e5)],'inherit',_0x30c266['tsVOJ']],_0x4bf73f=spawn(_0x30c266[_0x26bad3(0x1dc)],_0x517d52,{'stdio':_0x12a068});let _0x4c9113='';_0x3734c9?.[_0x26bad3(0x1e0)]&&_0x4bf73f['stdout']&&_0x4bf73f[_0x26bad3(0x1ca)]['on'](_0x30c266[_0x26bad3(0x1d1)],_0x3e059e=>{const _0x74ac86=_0x26bad3;_0x4c9113+=_0x3e059e[_0x74ac86(0x1dd)]();}),_0x3734c9?.['captureOutput']&&_0x4bf73f['stderr']&&_0x4bf73f[_0x26bad3(0x1d5)]['on'](_0x30c266['tSrsn'],_0x35ea93=>{_0x4c9113+=_0x35ea93['toString']();}),_0x4bf73f['on'](_0x30c266['EvzzR'],_0x28d2c4=>{const _0x350788=_0x26bad3;_0x28d2c4===0x0?_0x4c4802[_0x350788(0x1cb)](_0x3031a7,{'success':!![],'output':_0x4c9113}):_0x3031a7({'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x28d2c4,'output':_0x4c9113});}),_0x4bf73f['on'](_0x26bad3(0x1d8),_0x15c5f1=>{const _0x20f244=_0x26bad3;_0x3031a7({'success':![],'error':_0x15c5f1[_0x20f244(0x1cc)]});});});}export async function isMarketplaceAdded(_0x5d19f0){const _0x468855=_0x2263,_0x1dcf9e=await runClaudeCommand(['plugin','marketplace','list'],{'captureOutput':!![]});if(!_0x1dcf9e['success']||!_0x1dcf9e[_0x468855(0x1d0)])return![];return _0x1dcf9e['output']['includes'](_0x5d19f0);}export async function isPluginInstalled(_0x584bdf){const _0x7cfbae=_0x2263,_0x278611={'tQnsr':function(_0x3488f6,_0x19e160,_0x176a87){return _0x3488f6(_0x19e160,_0x176a87);}},_0x44017a=await _0x278611[_0x7cfbae(0x1e2)](runClaudeCommand,['plugin','list'],{'captureOutput':!![]});if(!_0x44017a['success']||!_0x44017a[_0x7cfbae(0x1d0)])return![];return _0x44017a['output']['includes'](_0x584bdf);}export async function getPluginInfo(_0x52bbb5){const _0x3ce218=_0x2263,_0x4cbc26={'CckWn':_0x3ce218(0x1c6),'ZZqtC':function(_0x19b6ed,_0x5be537){return _0x19b6ed===_0x5be537;},'DCLly':'enabled'},_0x2d7e5b=await runClaudeCommand([_0x3ce218(0x1d9),_0x4cbc26['CckWn']],{'captureOutput':!![]});if(!_0x2d7e5b['success']||!_0x2d7e5b[_0x3ce218(0x1d0)])return null;if(!_0x2d7e5b['output'][_0x3ce218(0x1d7)](_0x52bbb5))return null;const _0x33028f={'name':_0x52bbb5},_0x4ceb35=_0x2d7e5b['output'][_0x3ce218(0x1cd)](new RegExp(_0x52bbb5+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x4ceb35&&(_0x33028f['scope']=_0x4ceb35[0x1]['toLowerCase']());const _0x2f4e53=_0x2d7e5b[_0x3ce218(0x1d0)][_0x3ce218(0x1cd)](new RegExp(_0x52bbb5+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x2f4e53&&(_0x33028f['version']=_0x2f4e53[0x1]);const _0x1cc902=_0x2d7e5b[_0x3ce218(0x1d0)][_0x3ce218(0x1cd)](new RegExp(_0x52bbb5+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0x1cc902&&(_0x33028f['enabled']=_0x4cbc26[_0x3ce218(0x1e3)](_0x1cc902[0x1]['toLowerCase'](),_0x4cbc26['DCLly'])),_0x33028f;}
1
+ function _0x51c2(){const _0x187584=['9823220Xagyeq','Upgln','AsvIU','plugin','includes','jEcOK','mZYDO','length','toString','nhALz','version','sort','sWxeb','eXqfH','4599993VLqGTe','5462005HciIki','DbNop','ZlhSy','12vNzelU','installed_plugins.json','success','10VNSnFF','filter','145048nqBGlP','data','cwd','user','2352721VKgGiB','234jiVaJR','scope','StOHj','zfDzU','output','toLowerCase','ignore','sLSIp','projectPath','NZNNq','729216ZTxntg','4WinTcU','kVKNR','match','iGKch','captureOutput','[\x5cs\x5cS]*?(enabled|disabled)','116119aMJJzG','enabled','inherit','16HciQSQ','stdout','pipe'];_0x51c2=function(){return _0x187584;};return _0x51c2();}(function(_0x18629f,_0x429948){const _0x58e98d=_0x3f81,_0xafc1e=_0x18629f();while(!![]){try{const _0x1c5c1f=-parseInt(_0x58e98d(0x180))/0x1*(-parseInt(_0x58e98d(0x183))/0x2)+-parseInt(_0x58e98d(0x194))/0x3+-parseInt(_0x58e98d(0x17a))/0x4*(-parseInt(_0x58e98d(0x195))/0x5)+parseInt(_0x58e98d(0x198))/0x6*(parseInt(_0x58e98d(0x1a1))/0x7)+-parseInt(_0x58e98d(0x19d))/0x8*(-parseInt(_0x58e98d(0x1a2))/0x9)+parseInt(_0x58e98d(0x19b))/0xa*(-parseInt(_0x58e98d(0x186))/0xb)+parseInt(_0x58e98d(0x179))/0xc;if(_0x1c5c1f===_0x429948)break;else _0xafc1e['push'](_0xafc1e['shift']());}catch(_0x36509c){_0xafc1e['push'](_0xafc1e['shift']());}}}(_0x51c2,0xc3296));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile}from'fs/promises';import{join,resolve}from'path';import{getClaudeConfigDir,getProjectRoot}from'./claudeConfig.js';export function runClaudeCommand(_0x25d84d,_0x24f5df){const _0x32ea2a=_0x3f81,_0x20b194={'NZNNq':function(_0x386e91,_0xb35398){return _0x386e91(_0xb35398);},'eXqfH':function(_0x170b40,_0x24b6b4){return _0x170b40===_0x24b6b4;},'kBXKl':function(_0x9b4ea7,_0x56b5c2){return _0x9b4ea7(_0x56b5c2);},'jEcOK':_0x32ea2a(0x185),'AYBli':'claude','sWxeb':_0x32ea2a(0x19e),'iGKch':'close','wAulr':'error'};return new Promise(_0x272227=>{const _0x428e0e=_0x32ea2a,_0x27e364={'zfDzU':function(_0x38ed9e,_0x4b6599){const _0x2c06ea=_0x3f81;return _0x20b194[_0x2c06ea(0x193)](_0x38ed9e,_0x4b6599);},'pyVXM':function(_0x2f7312,_0x54e65a){return _0x20b194['kBXKl'](_0x2f7312,_0x54e65a);}},_0x58fb31=_0x24f5df?.[_0x428e0e(0x17e)]?['ignore',_0x20b194[_0x428e0e(0x18b)],'pipe']:[_0x428e0e(0x175),_0x428e0e(0x182),_0x428e0e(0x182)],_0x361bac=spawn(_0x20b194['AYBli'],_0x25d84d,{'stdio':_0x58fb31,'cwd':_0x24f5df?.[_0x428e0e(0x19f)]});let _0x38fd91='';_0x24f5df?.['captureOutput']&&_0x361bac[_0x428e0e(0x184)]&&_0x361bac['stdout']['on'](_0x20b194[_0x428e0e(0x192)],_0x481bd7=>{const _0x13020e=_0x428e0e;_0x38fd91+=_0x481bd7[_0x13020e(0x18e)]();}),_0x24f5df?.['captureOutput']&&_0x361bac['stderr']&&_0x361bac['stderr']['on'](_0x428e0e(0x19e),_0x38c476=>{_0x38fd91+=_0x38c476['toString']();}),_0x361bac['on'](_0x20b194[_0x428e0e(0x17d)],_0x3f0833=>{const _0x403f73=_0x428e0e;_0x27e364[_0x403f73(0x1a5)](_0x3f0833,0x0)?_0x27e364['pyVXM'](_0x272227,{'success':!![],'output':_0x38fd91}):_0x272227({'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x3f0833,'output':_0x38fd91});}),_0x361bac['on'](_0x20b194['wAulr'],_0x281f46=>{const _0x823d98=_0x428e0e;_0x20b194[_0x823d98(0x178)](_0x272227,{'success':![],'error':_0x281f46['message']});});});}export async function isMarketplaceAdded(_0x325a6a){const _0x3033e0=_0x3f81,_0xbbeb4d={'JhDnX':'plugin','sLSIp':'marketplace','eQMxh':'list'},_0x46c910=await runClaudeCommand([_0xbbeb4d['JhDnX'],_0xbbeb4d[_0x3033e0(0x176)],_0xbbeb4d['eQMxh']],{'captureOutput':!![]});if(!_0x46c910[_0x3033e0(0x19a)]||!_0x46c910['output'])return![];return _0x46c910['output'][_0x3033e0(0x18a)](_0x325a6a);}export async function isPluginInstalled(_0x5ab281){const _0x5a8b5d=_0x3f81,_0x667482={'Upgln':_0x5a8b5d(0x189),'GfhXl':'list'},_0x522518=await getInstalledPluginInfoFromRegistry(_0x5ab281);if(_0x522518[_0x5a8b5d(0x18d)]>0x0)return!![];const _0x650057=await runClaudeCommand([_0x667482[_0x5a8b5d(0x187)],_0x667482['GfhXl']],{'captureOutput':!![]});if(!_0x650057[_0x5a8b5d(0x19a)]||!_0x650057[_0x5a8b5d(0x173)])return![];return _0x650057[_0x5a8b5d(0x173)]['includes'](_0x5ab281);}function getInstalledPluginsPath(){const _0x755365=_0x3f81,_0x2f5fb5={'EHuec':function(_0x2b57e1){return _0x2b57e1();},'kVKNR':'plugins','MsaVv':_0x755365(0x199)};return join(_0x2f5fb5['EHuec'](getClaudeConfigDir),_0x2f5fb5[_0x755365(0x17b)],_0x2f5fb5['MsaVv']);}function _0x3f81(_0x292b76,_0x1bc6a0){_0x292b76=_0x292b76-0x173;const _0x51c2c5=_0x51c2();let _0x3f8113=_0x51c2c5[_0x292b76];return _0x3f8113;}function sortPluginInfo(_0x934567,_0x53d2c1){const _0x12c956=_0x3f81,_0x4718af={'nhALz':function(_0xff07c4,_0x33a97f){return _0xff07c4-_0x33a97f;},'mZYDO':'user'},_0x5c9608={'project':0x0,'local':0x1,'user':0x2};return _0x4718af[_0x12c956(0x18f)](_0x5c9608[_0x934567[_0x12c956(0x1a3)]??_0x12c956(0x1a0)],_0x5c9608[_0x53d2c1['scope']??_0x4718af[_0x12c956(0x18c)]]);}export function parseInstalledPluginInfo(_0xd0319b,_0x5115b9,_0x1d4e2f){const _0x2ae308=_0x3f81,_0x1c51df={'jlozT':'local','StOHj':function(_0x4a1c42,_0xfc992c){return _0x4a1c42===_0xfc992c;},'bDOSm':function(_0x50a842,_0x274634){return _0x50a842(_0x274634);}},_0x51933d=JSON['parse'](_0xd0319b),_0x2696a9=_0x1c51df['bDOSm'](resolve,_0x1d4e2f),_0xb65feb=_0x51933d['plugins']?.[_0x5115b9]??[];return _0xb65feb[_0x2ae308(0x19c)](_0x5e7fff=>{const _0x45a6a0=_0x2ae308;if(_0x5e7fff['scope']!=='project'&&_0x5e7fff[_0x45a6a0(0x1a3)]!==_0x1c51df['jlozT'])return!![];if(!_0x5e7fff[_0x45a6a0(0x177)])return!![];return _0x1c51df[_0x45a6a0(0x1a4)](resolve(_0x5e7fff[_0x45a6a0(0x177)]),_0x2696a9);})['map'](_0x1c2384=>({'name':_0x5115b9,'scope':_0x1c2384['scope'],'version':_0x1c2384[_0x2ae308(0x190)]}))[_0x2ae308(0x191)](sortPluginInfo);}async function getInstalledPluginInfoFromRegistry(_0xb9775c){const _0x5a63ec=_0x3f81,_0x230eb7={'OVfus':function(_0x399398,_0x5385d9,_0x4f9f53){return _0x399398(_0x5385d9,_0x4f9f53);},'DbNop':'utf-8','IOMGI':function(_0x641311){return _0x641311();}},_0x15f14d=getInstalledPluginsPath();if(!existsSync(_0x15f14d))return[];try{const _0x3da57f=await _0x230eb7['OVfus'](readFile,_0x15f14d,_0x230eb7[_0x5a63ec(0x196)]);return parseInstalledPluginInfo(_0x3da57f,_0xb9775c,_0x230eb7['IOMGI'](getProjectRoot));}catch{return[];}}export async function getPluginInfo(_0x20fa0b){const _0x145005=_0x3f81,_0x747f6={'mNVHe':function(_0x28f743,_0x41d47c){return _0x28f743(_0x41d47c);},'ZlhSy':function(_0x44a027,_0x529bb3,_0xaca1b0){return _0x44a027(_0x529bb3,_0xaca1b0);},'vhoEr':'plugin','FxCeH':'list','GiUGt':function(_0x41538b,_0x128b29){return _0x41538b===_0x128b29;},'AsvIU':_0x145005(0x181)},_0x3d9304=await _0x747f6['mNVHe'](getInstalledPluginInfoFromRegistry,_0x20fa0b);if(_0x3d9304['length']>0x0)return _0x3d9304[0x0];const _0x22ae78=await _0x747f6[_0x145005(0x197)](runClaudeCommand,[_0x747f6['vhoEr'],_0x747f6['FxCeH']],{'captureOutput':!![]});if(!_0x22ae78[_0x145005(0x19a)]||!_0x22ae78['output'])return null;if(!_0x22ae78[_0x145005(0x173)]['includes'](_0x20fa0b))return null;const _0x2853c7={'name':_0x20fa0b},_0x9da770=_0x22ae78['output'][_0x145005(0x17c)](new RegExp(_0x20fa0b+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x9da770&&(_0x2853c7['scope']=_0x9da770[0x1][_0x145005(0x174)]());const _0x17c29c=_0x22ae78[_0x145005(0x173)]['match'](new RegExp(_0x20fa0b+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x17c29c&&(_0x2853c7['version']=_0x17c29c[0x1]);const _0x2606dc=_0x22ae78['output']['match'](new RegExp(_0x20fa0b+_0x145005(0x17f),'i'));return _0x2606dc&&(_0x2853c7[_0x145005(0x181)]=_0x747f6['GiUGt'](_0x2606dc[0x1]['toLowerCase'](),_0x747f6[_0x145005(0x188)])),_0x2853c7;}