@ranger-testing/ranger-cli 3.1.7-alpha.387730d-58 → 3.1.7-alpha.44736ee-66

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 (88) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.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/actors.js +1 -0
  38. package/build/commands/utils/agentEnv.js +1 -1
  39. package/build/commands/utils/browserSessionsApi.js +1 -1
  40. package/build/commands/utils/claudeConfig.js +1 -1
  41. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  42. package/build/commands/utils/claudePlugin.js +1 -1
  43. package/build/commands/utils/cloudProfile.js +1 -1
  44. package/build/commands/utils/cloudProfileSession.js +1 -1
  45. package/build/commands/utils/crypto.js +1 -1
  46. package/build/commands/utils/desirePathLog.js +1 -1
  47. package/build/commands/utils/deviceAuth.js +1 -1
  48. package/build/commands/utils/environment.js +1 -1
  49. package/build/commands/utils/featureApi.js +1 -1
  50. package/build/commands/utils/fixWebmDuration.js +1 -1
  51. package/build/commands/utils/gitTracked.js +1 -1
  52. package/build/commands/utils/keychain.js +1 -1
  53. package/build/commands/utils/legacyWarning.js +1 -1
  54. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  55. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  56. package/build/commands/utils/mcpImageBase64.js +1 -1
  57. package/build/commands/utils/model.js +1 -1
  58. package/build/commands/utils/novaActCli.js +1 -1
  59. package/build/commands/utils/opencodeConfig.js +1 -1
  60. package/build/commands/utils/organizationEnvApi.js +1 -1
  61. package/build/commands/utils/playwrightCli.js +1 -1
  62. package/build/commands/utils/profileMessages.js +1 -1
  63. package/build/commands/utils/profileSetupBanner.js +1 -1
  64. package/build/commands/utils/projectsConfig.js +1 -1
  65. package/build/commands/utils/rangerConfig.js +1 -1
  66. package/build/commands/utils/rangerRoot.js +1 -1
  67. package/build/commands/utils/rangerwrightCli.js +1 -1
  68. package/build/commands/utils/resolveProfileContext.js +1 -1
  69. package/build/commands/utils/resolveProfileUrl.js +1 -1
  70. package/build/commands/utils/retry.js +1 -1
  71. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  72. package/build/commands/utils/sessionCache.js +1 -1
  73. package/build/commands/utils/settings.js +1 -1
  74. package/build/commands/utils/skillContent.js +1 -1
  75. package/build/commands/utils/skills.js +1 -1
  76. package/build/commands/utils/stitchWebmFiles.js +1 -1
  77. package/build/commands/utils/telemetry.js +1 -1
  78. package/build/commands/utils/tokenRefresh.js +1 -1
  79. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  80. package/build/commands/utils/tunnelClient.js +1 -1
  81. package/build/commands/utils/userApi.js +1 -1
  82. package/build/commands/utils/version.js +1 -1
  83. package/build/commands/verifyFeature.js +1 -1
  84. package/build/commands/verifyFeatureCli.js +1 -1
  85. package/build/commands/verifyFeatureNovaCli.js +1 -1
  86. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  87. package/build/skills/ranger/SKILL.md +8 -0
  88. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x14643b,_0x228c7a){const _0x5ef594=_0x1369,_0x29a00f=_0x14643b();while(!![]){try{const _0x412489=parseInt(_0x5ef594(0x1ac))/0x1*(parseInt(_0x5ef594(0x1af))/0x2)+parseInt(_0x5ef594(0x1c5))/0x3*(-parseInt(_0x5ef594(0x18d))/0x4)+-parseInt(_0x5ef594(0x143))/0x5*(parseInt(_0x5ef594(0x157))/0x6)+parseInt(_0x5ef594(0x14b))/0x7*(-parseInt(_0x5ef594(0x152))/0x8)+-parseInt(_0x5ef594(0x178))/0x9+-parseInt(_0x5ef594(0x1aa))/0xa+-parseInt(_0x5ef594(0x15d))/0xb*(-parseInt(_0x5ef594(0x184))/0xc);if(_0x412489===_0x228c7a)break;else _0x29a00f['push'](_0x29a00f['shift']());}catch(_0x3caf5b){_0x29a00f['push'](_0x29a00f['shift']());}}}(_0xc63d,0xc81ab));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x1369(_0x413ec0,_0x29a2f2){_0x413ec0=_0x413ec0-0x13e;const _0xc63d2c=_0xc63d();let _0x1369d1=_0xc63d2c[_0x413ec0];return _0x1369d1;}import{existsSync}from'fs';import _0x22def1 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x2d6cab=_0x1369;if(!process['stdout'][_0x2d6cab(0x18f)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x553f8f){const _0x3a37e7=_0x1369,_0x50c724={'cmIBp':function(_0x21dc9f,_0x312d89,_0x2ea1b4){return _0x21dc9f(_0x312d89,_0x2ea1b4);},'jORaR':'HEAD','nKife':'manual','orlIj':function(_0x381772,_0x56d73b){return _0x381772(_0x56d73b);},'vTJwe':'Invalid\x20URL','iCJLd':'fetch\x20failed'};try{const _0x5245a5=new AbortController(),_0x15acea=_0x50c724[_0x3a37e7(0x191)](setTimeout,()=>_0x5245a5['abort'](),0x1388),_0x1b1bb1={'method':_0x50c724[_0x3a37e7(0x156)],'signal':_0x5245a5[_0x3a37e7(0x188)],'redirect':_0x50c724['nKife']};/^https:\/\/localhost(:\d+)?/i[_0x3a37e7(0x1c1)](_0x553f8f)&&(process[_0x3a37e7(0x16b)][_0x3a37e7(0x189)]='0');const _0x74013d=await _0x50c724[_0x3a37e7(0x191)](fetch,_0x553f8f,_0x1b1bb1);delete process[_0x3a37e7(0x16b)][_0x3a37e7(0x189)],_0x50c724['orlIj'](clearTimeout,_0x15acea);if(_0x74013d['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x3a37e7(0x1c0)+_0x74013d['status']};}catch(_0x13c565){delete process[_0x3a37e7(0x16b)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x41c336=_0x13c565,_0x5c3b70=_0x41c336['message']||String(_0x13c565),_0x58bba0=_0x5c3b70[_0x3a37e7(0x172)](_0x50c724[_0x3a37e7(0x19e)])||_0x41c336['name']==='TypeError'||_0x5c3b70[_0x3a37e7(0x172)](_0x50c724['iCJLd']);return{'ok':![],'error':_0x5c3b70,'isProtocolError':_0x58bba0};}}async function sweepOrphanLocalProfile(_0x1804fa,_0x1c5b6e,_0x3b150b){const _0x28dc03=_0x1369,_0x26411c={'PKMVf':'local','GjmHX':function(_0x261bb0,_0x2ab406){return _0x261bb0(_0x2ab406);},'JmRXZ':function(_0x4c9fee,_0xa54324){return _0x4c9fee(_0xa54324);},'Fzzlh':function(_0x4aaf2d,_0x277b3f,_0x2d4e18){return _0x4aaf2d(_0x277b3f,_0x2d4e18);}},_0x234cbd=join(_0x1c5b6e,_0x26411c[_0x28dc03(0x150)]),_0x3277a9=join(_0x234cbd,_0x1804fa);_0x26411c['GjmHX'](existsSync,_0x3277a9)&&(_0x3b150b&&await _0x26411c['GjmHX'](isPathGitTracked,_0x3277a9)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x3277a9+_0x28dc03(0x1c2)):(await rm(_0x3277a9,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3277a9)));if(_0x26411c['JmRXZ'](existsSync,_0x234cbd)){let _0x5c708d=[];try{_0x5c708d=await _0x26411c[_0x28dc03(0x170)](readdir,_0x234cbd);}catch{return;}const _0x3d89c5=_0x28dc03(0x17c)+_0x1804fa+'-';for(const _0x59561b of _0x5c708d){if(!_0x59561b[_0x28dc03(0x168)](_0x3d89c5))continue;const _0x2ec99c=_0x26411c['Fzzlh'](join,_0x234cbd,_0x59561b);await _0x26411c['Fzzlh'](rm,_0x2ec99c,{'recursive':!![],'force':!![]}),console['log'](_0x28dc03(0x1b7)+_0x2ec99c);}}}async function sweepOrphansBestEffort(_0x368f11){const _0x1575e3=_0x1369,_0x2fea7c={'UQyuR':function(_0x1dee2a,_0xd1aaaa,_0x44c8c1,_0x27c783){return _0x1dee2a(_0xd1aaaa,_0x44c8c1,_0x27c783);},'ycKcD':function(_0x2b8b87){return _0x2b8b87();},'FLiqu':function(_0x44d29b,_0x2629b5){return _0x44d29b!==_0x2629b5;},'EAtks':function(_0x302b67){return _0x302b67();},'inrMJ':function(_0x54808a,_0x3bd444,_0x541079,_0x3ac57c){return _0x54808a(_0x3bd444,_0x541079,_0x3ac57c);}};try{await _0x2fea7c[_0x1575e3(0x197)](sweepOrphanLocalProfile,_0x368f11,_0x2fea7c['ycKcD'](getRangerHomeDir),![]);const _0x21fdc7=_0x2fea7c[_0x1575e3(0x161)](getRangerDir);_0x2fea7c['FLiqu'](_0x21fdc7,_0x2fea7c[_0x1575e3(0x1b8)](getRangerHomeDir))&&await _0x2fea7c[_0x1575e3(0x1a5)](sweepOrphanLocalProfile,_0x368f11,_0x21fdc7,!![]);}catch(_0xc5bb0e){console[_0x1575e3(0x141)](_0x1575e3(0x190)+(_0xc5bb0e instanceof Error?_0xc5bb0e[_0x1575e3(0x14d)]:String(_0xc5bb0e))+').');}}async function markActive(_0x4a3e5c){const _0x28023a=_0x1369,_0xdbc597={'LHDzI':_0x28023a(0x185)};try{await writeActiveProfileName(_0x4a3e5c),console['log'](_0x28023a(0x163)+_0x4a3e5c);}catch{console[_0x28023a(0x141)](_0xdbc597[_0x28023a(0x162)]);}}async function tryAutoRouteCloudProfile(_0x21b518,_0x1fad8e,_0x113c04,_0x2f2058,_0x2b5643){const _0x4616ea=_0x1369,_0x5978c5={'OAZbv':_0x4616ea(0x196),'zugCZ':function(_0x1b6893,_0x268928){return _0x1b6893===_0x268928;},'iROaz':function(_0x4b797f,_0x2ab331,_0x3b74d3,_0x4318e8,_0x40693d){return _0x4b797f(_0x2ab331,_0x3b74d3,_0x4318e8,_0x40693d);},'KAJxU':function(_0x5d87e4,_0x3f1f56){return _0x5d87e4+_0x3f1f56;},'PbbJI':function(_0x26c7a9,_0x273d02){return _0x26c7a9+_0x273d02;},'mKjgh':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','uvQFJ':'profile.add.autoRouteSkipped','gwBym':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','bFePv':function(_0x16b533,_0x135cfa,_0x3cfcb8){return _0x16b533(_0x135cfa,_0x3cfcb8);},'mstri':_0x4616ea(0x19b),'dICQA':_0x4616ea(0x154),'nAZhc':'user_declined','krHaL':function(_0x1124f3,_0x5aef38,_0xf06306,_0x32510e){return _0x1124f3(_0x5aef38,_0xf06306,_0x32510e);},'svAjk':function(_0x2df9da){return _0x2df9da();},'dJSxB':function(_0x5dc321,_0x40a44f){return _0x5dc321 instanceof _0x40a44f;},'dzwii':function(_0x4cd3fb,_0xc99edc){return _0x4cd3fb===_0xc99edc;},'wywxv':_0x4616ea(0x1a9)};let _0x38f8d8;try{_0x38f8d8=await fetchAuthConfig();}catch(_0x4c6553){return _0x2b5643?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x5978c5[_0x4616ea(0x179)],'profileName':_0x21b518}),console[_0x4616ea(0x1c7)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x4c6553 instanceof Error?_0x4c6553[_0x4616ea(0x14d)]:String(_0x4c6553))),![];}if((!_0x38f8d8||!_0x38f8d8['environments']||_0x5978c5[_0x4616ea(0x140)](Object[_0x4616ea(0x1b6)](_0x38f8d8['environments'])[_0x4616ea(0x175)],0x0))&&!_0x113c04['authEnv']){if(_0x2f2058)return await _0x5978c5['iROaz'](captureEnvLessProfile,_0x21b518,_0x1fad8e,_0x113c04,_0x2b5643);return _0x2b5643?.[_0x4616ea(0x176)]('profile.add.autoRouteSkipped',{'reason':_0x5978c5['OAZbv'],'profileName':_0x21b518}),console['error'](_0x5978c5[_0x4616ea(0x167)](_0x5978c5[_0x4616ea(0x164)]('\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a'+'\x0a'+'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x21b518+'\x20--url\x20'+_0x1fad8e+'\x20--skip-auth\x0a')+'\x0a','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a'),_0x5978c5['mKjgh'])),![];}let _0x219c32;if(_0x113c04[_0x4616ea(0x1bf)]){if(!_0x38f8d8?.[_0x4616ea(0x1ca)]?.[_0x113c04[_0x4616ea(0x1bf)]]){const _0x48792b=Object['keys'](_0x38f8d8?.['environments']??{});return _0x2b5643?.['trackPhaseEnd'](_0x5978c5[_0x4616ea(0x1ae)],{'reason':_0x4616ea(0x15a),'profileName':_0x21b518}),console[_0x4616ea(0x1c7)](_0x4616ea(0x182)+_0x113c04['authEnv']+'\x22\x20not\x20found.'+(_0x48792b[_0x4616ea(0x175)]?_0x4616ea(0x1a1)+_0x48792b[_0x4616ea(0x18c)](',\x20')+'.':_0x5978c5['gwBym'])),![];}_0x219c32=_0x113c04['authEnv'];}else _0x219c32=_0x5978c5[_0x4616ea(0x160)](matchAuthEnvironment,_0x1fad8e,_0x38f8d8);if(!_0x219c32)return _0x2b5643?.['trackPhaseEnd'](_0x5978c5[_0x4616ea(0x1ae)],{'reason':_0x5978c5[_0x4616ea(0x1a3)],'profileName':_0x21b518}),console[_0x4616ea(0x1c7)](_0x4616ea(0x148)+_0x1fad8e+'.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20'+Object[_0x4616ea(0x1b6)](_0x38f8d8?.[_0x4616ea(0x1ca)]??{})['join'](',\x20')+'.'),![];const _0x5cb05f=_0x38f8d8?.['environments']?.[_0x219c32],_0x49e2a3=_0x5cb05f?.['domains']??[];if(_0x2f2058&&!_0x113c04['yes']){const {saveToCloud:_0x1e9771}=await _0x22def1['prompt']([{'type':_0x5978c5[_0x4616ea(0x18b)],'name':'saveToCloud','message':_0x4616ea(0x15c)+_0x219c32+'\x27\x20matching\x20'+_0x1fad8e+_0x4616ea(0x18e)+_0x49e2a3[_0x4616ea(0x18c)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x21b518+_0x4616ea(0x171),'default':!![]}]);if(!_0x1e9771)return _0x2b5643?.[_0x4616ea(0x176)]('profile.add.autoRouteSkipped',{'reason':_0x5978c5[_0x4616ea(0x180)],'profileName':_0x21b518}),console['error'](_0x4616ea(0x14a)),![];}const _0x59d713=_0x49e2a3['some'](_0x25417c=>{const _0x5d49a9=_0x4616ea;try{return new URL(_0x25417c)[_0x5d49a9(0x195)]===new URL(_0x1fad8e)[_0x5d49a9(0x195)];}catch{return![];}}),_0x523986={};!_0x59d713&&(_0x523986[_0x4616ea(0x13e)]=_0x1fad8e);try{await _0x5978c5[_0x4616ea(0x16d)](createCloudProfile,_0x21b518,_0x219c32,{'settings':_0x523986}),_0x5978c5[_0x4616ea(0x1a2)](warnCloudProfileSharedInOrg);}catch(_0x5c0655){if(_0x5978c5['dJSxB'](_0x5c0655,ApiError)&&_0x5978c5[_0x4616ea(0x14f)](_0x5c0655['status'],0x199)){console[_0x4616ea(0x1c7)](_0x4616ea(0x173)+_0x21b518+_0x4616ea(0x1b2)+(_0x4616ea(0x1c3)+_0x21b518));throw _0x5c0655;}throw _0x5c0655;}return console['log'](_0x5978c5['KAJxU'](_0x4616ea(0x183)+_0x21b518+_0x4616ea(0x165),_0x4616ea(0x17d)+_0x21b518)),await sweepOrphansBestEffort(_0x21b518),_0x2b5643?.[_0x4616ea(0x176)](_0x5978c5[_0x4616ea(0x16e)],{'envKey':_0x219c32,'profileName':_0x21b518}),!![];}function _0xc63d(){const _0x1f25f3=['82HzmOSI','Use\x20','\x0a✓\x20Profile\x20\x27','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','bsEhE','force','url','keys','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','EAtks','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','\x20\x20Did\x20you\x20mean\x20','Invalid\x20--setup-header\x20format:\x20\x22','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','DiZEJ','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','authEnv','HTTP\x20','test','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','cwd','952116FBLcXq','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','error','zaxTP','skipAuth','environments','baseUrl','XkdMM','zugCZ','log','\x0a🌐\x20Profile\x20Setup\x0a','1311005NMEsxX','Could\x20not\x20reach\x20','OIpMB','fMgzq','status','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','KsYVy','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','21qcKVfN','qmmeS','message','prompt','dzwii','PKMVf','HJOVj','3261592GMxohK','indexOf','confirm','\x27\x20created\x20(CDP).','jORaR','6DQVkft','input','pVGys','env_not_found','setupHeaders','Found\x20auth\x20environment\x20\x27','39444955oXwHyU','Continue\x20anyway','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','bFePv','ycKcD','LHDzI','\x20\x20Set\x20active\x20profile:\x20','PbbJI','\x27\x20created.\x0a','slice','KAJxU','startsWith','HYwOy','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','env','`\x20again\x20without\x20--skip-auth.','krHaL','wywxv','ojrGW','JmRXZ','\x27\x20to\x20the\x20cloud?','includes','\x0a\x20\x20A\x20profile\x20named\x20\x22','isElectron','length','trackPhaseEnd','cdpEndpoint','9117648CFWXEm','OAZbv','fFCPD','VRSkb','.tmp-','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','yes','http://localhost:3000','nAZhc','kSfxq','\x0a\x20\x20Auth\x20environment\x20\x22','✓\x20Profile\x20\x27','12vNhMIx','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','retry','vmOLL','signal','NODE_TLS_REJECT_UNAUTHORIZED','\x0a\x20\x20Could\x20not\x20reach\x20','dICQA','join','8rwpZnZ','\x0a\x20\x20(domains:\x20','isTTY','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','cmIBp','use_suggestion','continue','mPiCA','origin','no_auth_config','UQyuR','vZEpV','Cfdya','profile.add.autoRouteSkipped','no_match','trim','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','vTJwe','\x27\x20created\x20(no\x20session).\x0a','FFZeC','\x20Configured\x20envs:\x20','svAjk','mstri','rAzfS','inrMJ','Enter\x20a\x20different\x20URL','exit','Uzlmd','profile.add.autoRouted','4701380VJlUsj','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','20414ZrOjdw','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','uvQFJ'];_0xc63d=function(){return _0x1f25f3;};return _0xc63d();}async function createUnconfiguredCloudProfile(_0x4114b2,_0x453bea){const _0x4c79ec=_0x1369,_0x2c6aa0={'zaxTP':function(_0x2674a1){return _0x2674a1();},'MnINL':function(_0x1b967d,_0x3f26cb){return _0x1b967d===_0x3f26cb;}};try{await createCloudProfile(_0x4114b2,undefined,{'settings':_0x453bea}),_0x2c6aa0[_0x4c79ec(0x1c8)](warnCloudProfileSharedInOrg);}catch(_0x20dec6){_0x20dec6 instanceof ApiError&&_0x2c6aa0['MnINL'](_0x20dec6[_0x4c79ec(0x147)],0x199)&&console['error'](_0x4c79ec(0x173)+_0x4114b2+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x4c79ec(0x1c3)+_0x4114b2));throw _0x20dec6;}}async function captureEnvLessProfile(_0x12cd77,_0x14e4f5,_0x3fc6ac,_0xcdf1c9){const _0x4a2597=_0x1369,_0x493c4b={'YDmnn':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','WRdYG':_0x4a2597(0x19a),'OlRVv':'user_declined','vTOst':function(_0x55d039,_0x21652b){return _0x55d039===_0x21652b;},'bsEhE':function(_0x33a11c,_0x5efca9){return _0x33a11c>_0x5efca9;},'sMoGn':function(_0x23c7ff){return _0x23c7ff();},'FFZeC':function(_0x133ca2,_0x507979){return _0x133ca2+_0x507979;},'XkdMM':function(_0x498bf8,_0x4fce0f,_0x30ea82){return _0x498bf8(_0x4fce0f,_0x30ea82);},'pVGys':function(_0x1c4e6a,_0x1b6170){return _0x1c4e6a>_0x1b6170;},'gOirK':function(_0x3de6ef,_0x39bad6){return _0x3de6ef(_0x39bad6);}};if(!_0x3fc6ac[_0x4a2597(0x17e)]){const {capture:_0x1b1a02}=await _0x22def1[_0x4a2597(0x14e)]([{'type':'confirm','name':'capture','message':_0x493c4b['YDmnn'],'default':!![]}]);if(!_0x1b1a02)return _0xcdf1c9?.['trackPhaseEnd'](_0x493c4b['WRdYG'],{'reason':_0x493c4b['OlRVv'],'profileName':_0x12cd77}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x4a2597(0x16a)),![];}const _0x406831={};if(_0x3fc6ac['setupHeader'])for(const _0x4ebefe of _0x3fc6ac['setupHeader']){const _0x456998=_0x4ebefe[_0x4a2597(0x153)](':');if(_0x493c4b['vTOst'](_0x456998,-0x1))continue;_0x406831[_0x4ebefe['slice'](0x0,_0x456998)['trim']()]=_0x4ebefe[_0x4a2597(0x166)](_0x456998+0x1)[_0x4a2597(0x19c)]();}const _0x221f99={'baseUrl':_0x14e4f5};_0x493c4b[_0x4a2597(0x1b3)](Object['keys'](_0x406831)['length'],0x0)&&(_0x221f99[_0x4a2597(0x15b)]=_0x406831);let _0x22e5d9;try{_0x22e5d9=await createCloudProfile(_0x12cd77,undefined,{'settings':_0x221f99}),_0x493c4b['sMoGn'](warnCloudProfileSharedInOrg);}catch(_0xbb1498){_0xbb1498 instanceof ApiError&&_0xbb1498[_0x4a2597(0x147)]===0x199&&console['error'](_0x493c4b[_0x4a2597(0x1a0)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x12cd77+_0x4a2597(0x1b2),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x12cd77));throw _0xbb1498;}return await _0x493c4b[_0x4a2597(0x13f)](manualBrowserLogin,_0x22e5d9,{'key':'','domains':[_0x14e4f5],'setupHeaders':_0x493c4b[_0x4a2597(0x159)](Object[_0x4a2597(0x1b6)](_0x406831)[_0x4a2597(0x175)],0x0)?_0x406831:undefined}),console['log'](_0x493c4b['FFZeC'](_0x4a2597(0x1b1)+_0x12cd77+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x4a2597(0x17d)+_0x12cd77)),await _0x493c4b['gOirK'](sweepOrphansBestEffort,_0x12cd77),_0xcdf1c9?.[_0x4a2597(0x176)](_0x4a2597(0x1a9),{'envKey':null,'profileName':_0x12cd77}),!![];}export async function addEnv(_0x2cdbff,_0x699d06={},_0x40d5b8){const _0x3d237b=_0x1369,_0x882d66={'PNAaQ':function(_0x484e2e,_0x5534d9){return _0x484e2e+_0x5534d9;},'GYvZH':function(_0x2eedc9,_0x69be94){return _0x2eedc9+_0x69be94;},'Cfdya':function(_0x57f50a,_0x4ba546){return _0x57f50a+_0x4ba546;},'mPiCA':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','ojrGW':_0x3d237b(0x1b9),'rIWeC':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','Uzlmd':_0x3d237b(0x1bc),'qnCWq':function(_0x8e46f0,_0x56f89c){return _0x8e46f0!==_0x56f89c;},'JsGmy':function(_0x1955f5,_0x298a78){return _0x1955f5===_0x298a78;},'QEeTr':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','HYwOy':'--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','DDeiD':_0x3d237b(0x1ab),'KsYVy':function(_0x351874,_0x51057f){return _0x351874>_0x51057f;},'OIpMB':function(_0x3ff901,_0x2392e0,_0x47e725,_0x39efd7,_0x15ef76){return _0x3ff901(_0x2392e0,_0x47e725,_0x39efd7,_0x15ef76);},'HJOVj':function(_0x1b8d81,_0x2d7fec){return _0x1b8d81 instanceof _0x2d7fec;},'vmOLL':function(_0xa0f4d5,_0x2b882b){return _0xa0f4d5(_0x2b882b);},'mZwEQ':function(_0x4af5eb,_0x3872dd){return _0x4af5eb(_0x3872dd);},'DiZEJ':function(_0x370a38,_0x3a89a5){return _0x370a38(_0x3a89a5);},'nTXTf':function(_0x69ff5,_0x4a9827){return _0x69ff5+_0x4a9827;},'kSfxq':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','KfEqC':'baseUrl','qmmeS':_0x3d237b(0x1be),'eGMnt':_0x3d237b(0x17f),'VRSkb':'list','fMgzq':'action','eqTYW':_0x3d237b(0x1a6),'vZEpV':_0x3d237b(0x15e),'PqoMd':'continue','fFCPD':function(_0x5f1309,_0x1939c0,_0x2f56d7,_0x11ddc1,_0x14a614,_0x24213f){return _0x5f1309(_0x1939c0,_0x2f56d7,_0x11ddc1,_0x14a614,_0x24213f);},'rAzfS':function(_0x211a30,_0x25e9b8){return _0x211a30(_0x25e9b8);}};_0x699d06['ci']&&(console[_0x3d237b(0x1c7)](_0x882d66['PNAaQ'](_0x882d66['GYvZH'](_0x882d66[_0x3d237b(0x199)](_0x882d66[_0x3d237b(0x194)],'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'),'\x0a')+_0x882d66[_0x3d237b(0x16f)]+_0x882d66['rIWeC'],'\x0a')+_0x882d66[_0x3d237b(0x1a8)]+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1));const _0x576118={};if(_0x699d06['setupHeader'])for(const _0x42ee89 of _0x699d06['setupHeader']){const _0x5d3dca=_0x42ee89[_0x3d237b(0x153)](':');if(_0x5d3dca===-0x1)throw new Error(_0x3d237b(0x1bb)+_0x42ee89+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x164069=_0x42ee89['slice'](0x0,_0x5d3dca)[_0x3d237b(0x19c)](),_0x7dcf48=_0x42ee89['slice'](_0x882d66[_0x3d237b(0x199)](_0x5d3dca,0x1))['trim']();_0x576118[_0x164069]=_0x7dcf48;}if(_0x882d66['qnCWq'](_0x699d06['cdpEndpoint'],undefined)&&_0x882d66['JsGmy'](_0x699d06[_0x3d237b(0x177)]['trim'](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x699d06['cdpEndpoint']&&_0x699d06[_0x3d237b(0x1b5)])throw new Error(_0x882d66['QEeTr']);if(_0x699d06['authEnv']&&_0x699d06['skipAuth'])throw new Error(_0x882d66[_0x3d237b(0x169)]);if(_0x699d06['authEnv']&&_0x699d06[_0x3d237b(0x177)])throw new Error('--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.');const _0x202d58=Boolean(_0x699d06[_0x3d237b(0x177)]),_0x239503=isInteractive();if(!_0x239503&&!_0x699d06['url']&&!_0x202d58&&!_0x699d06[_0x3d237b(0x1c9)])throw new Error(_0x3d237b(0x19d));if(_0x202d58){const _0x1908e7=_0x699d06['cdpEndpoint'];console['log'](_0x882d66['DDeiD']),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1908e7);const _0x14234d={'cdpEndpoint':_0x1908e7,'isElectron':!![]};_0x882d66[_0x3d237b(0x149)](Object['keys'](_0x576118)[_0x3d237b(0x175)],0x0)&&(_0x14234d['setupHeaders']=_0x576118);await createUnconfiguredCloudProfile(_0x2cdbff,_0x14234d);try{setProfileOverride(process['cwd'](),_0x2cdbff,_0x3d237b(0x177),_0x1908e7),_0x882d66[_0x3d237b(0x145)](setProfileOverride,process[_0x3d237b(0x1c4)](),_0x2cdbff,_0x3d237b(0x174),!![]);}catch(_0xb2b7d8){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x882d66['HJOVj'](_0xb2b7d8,Error)?_0xb2b7d8[_0x3d237b(0x14d)]:_0x882d66[_0x3d237b(0x187)](String,_0xb2b7d8)));}console[_0x3d237b(0x141)]('✓\x20Cloud\x20profile\x20\x27'+_0x2cdbff+_0x3d237b(0x155)),await _0x882d66['mZwEQ'](sweepOrphansBestEffort,_0x2cdbff),await _0x882d66['DiZEJ'](markActive,_0x2cdbff);return;}if(_0x699d06['skipAuth']){const _0x41e37e={};_0x699d06['url']&&(_0x41e37e[_0x3d237b(0x13e)]=_0x699d06[_0x3d237b(0x1b5)]);Object[_0x3d237b(0x1b6)](_0x576118)[_0x3d237b(0x175)]>0x0&&(_0x41e37e[_0x3d237b(0x15b)]=_0x576118);await createUnconfiguredCloudProfile(_0x2cdbff,_0x41e37e),console[_0x3d237b(0x141)](_0x882d66['nTXTf'](_0x3d237b(0x183)+_0x2cdbff+_0x3d237b(0x19f),_0x3d237b(0x15f)+_0x2cdbff+_0x3d237b(0x16c))),await _0x882d66['DiZEJ'](sweepOrphansBestEffort,_0x2cdbff),await markActive(_0x2cdbff);return;}if(_0x699d06['url']){const _0x4828d3=_0x699d06['url'],_0x1d5516=await checkUrlReachability(_0x4828d3);if(!_0x1d5516['ok']&&!_0x699d06[_0x3d237b(0x1b4)])throw new Error(_0x3d237b(0x144)+_0x4828d3+':\x20'+_0x1d5516[_0x3d237b(0x1c7)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x1d5516['ok']&&_0x699d06[_0x3d237b(0x1b4)]&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x4828d3+':\x20'+_0x1d5516[_0x3d237b(0x1c7)]+'\x20(continuing\x20with\x20--force)');}else{console[_0x3d237b(0x141)](_0x3d237b(0x142)),console[_0x3d237b(0x141)](_0x3d237b(0x1c6)),console[_0x3d237b(0x141)](_0x882d66[_0x3d237b(0x181)]);let _0x5e4db7='',_0x1d5ad2=![];while(!![]){const _0x4d301b=await _0x22def1['prompt']([{'type':_0x3d237b(0x158),'name':_0x882d66['KfEqC'],'message':_0x1d5ad2?_0x882d66[_0x3d237b(0x14c)]:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x5e4db7||_0x882d66['eGMnt']}]);_0x5e4db7=_0x4d301b['baseUrl'];const _0x450afd=await checkUrlReachability(_0x5e4db7);if(_0x450afd['ok'])break;const _0x7c143e=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5e4db7),_0x24b84a=_0x450afd['isProtocolError']&&!_0x7c143e,_0x2eec93=_0x24b84a?'http://'+_0x5e4db7:null;_0x1d5ad2=!![],console[_0x3d237b(0x141)](_0x3d237b(0x18a)+_0x5e4db7+':\x20'+_0x450afd['error']);_0x2eec93&&console[_0x3d237b(0x141)](_0x3d237b(0x1ba)+_0x2eec93+'?');const {action:_0x5cd492}=await _0x22def1['prompt']([{'type':_0x882d66[_0x3d237b(0x17b)],'name':_0x882d66[_0x3d237b(0x146)],'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x2eec93?[{'name':_0x3d237b(0x1b0)+_0x2eec93,'value':'use_suggestion'}]:[],{'name':_0x882d66['eqTYW'],'value':_0x3d237b(0x186)},{'name':_0x882d66[_0x3d237b(0x198)],'value':_0x882d66['PqoMd']}]}]);if(_0x5cd492===_0x3d237b(0x192)&&_0x2eec93){_0x5e4db7=_0x2eec93;const _0x3bd979=await checkUrlReachability(_0x5e4db7);if(_0x3bd979['ok'])break;console[_0x3d237b(0x141)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x5e4db7+':\x20'+_0x3bd979[_0x3d237b(0x1c7)]);}else{if(_0x5cd492===_0x3d237b(0x193))break;}}_0x699d06={..._0x699d06,'url':_0x5e4db7};}let _0x395c3b=![];try{_0x395c3b=await _0x882d66[_0x3d237b(0x17a)](tryAutoRouteCloudProfile,_0x2cdbff,_0x699d06[_0x3d237b(0x1b5)],_0x699d06,_0x239503,_0x40d5b8);}catch(_0x2d723f){console[_0x3d237b(0x1c7)](_0x3d237b(0x1ad)+_0x2cdbff+'\x22:\x20'+(_0x882d66[_0x3d237b(0x151)](_0x2d723f,Error)?_0x2d723f['message']:_0x882d66[_0x3d237b(0x1bd)](String,_0x2d723f))),process['exit'](0x1);}!_0x395c3b&&process[_0x3d237b(0x1a7)](0x1),await _0x882d66[_0x3d237b(0x1a4)](markActive,_0x2cdbff);}
1
+ const _0x9d6b93=_0x2c9c;(function(_0x2f4502,_0xe842d3){const _0x2aa97d=_0x2c9c,_0x51508f=_0x2f4502();while(!![]){try{const _0x5d00e2=parseInt(_0x2aa97d(0x1c3))/0x1+parseInt(_0x2aa97d(0x1e9))/0x2+-parseInt(_0x2aa97d(0x1b3))/0x3+parseInt(_0x2aa97d(0x1f4))/0x4+-parseInt(_0x2aa97d(0x1c6))/0x5*(parseInt(_0x2aa97d(0x1e8))/0x6)+-parseInt(_0x2aa97d(0x1a8))/0x7*(parseInt(_0x2aa97d(0x17c))/0x8)+parseInt(_0x2aa97d(0x1c8))/0x9*(-parseInt(_0x2aa97d(0x1ec))/0xa);if(_0x5d00e2===_0xe842d3)break;else _0x51508f['push'](_0x51508f['shift']());}catch(_0x25f34c){_0x51508f['push'](_0x51508f['shift']());}}}(_0x347b,0x473d0));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x263a27 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';function _0x2c9c(_0x572074,_0x2858c5){_0x572074=_0x572074-0x172;const _0x347b9d=_0x347b();let _0x2c9cf9=_0x347b9d[_0x572074];return _0x2c9cf9;}import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x9d6b93(0x17e);function warnCloudProfileSharedInOrg(){const _0xe71514=_0x9d6b93;if(!process['stdout'][_0xe71514(0x1bd)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x24fca9){const _0x2c2aab=_0x9d6b93,_0x2192f1={'zdsJy':function(_0x4d7b66,_0x21d118,_0x53a16f){return _0x4d7b66(_0x21d118,_0x53a16f);},'QtJHZ':_0x2c2aab(0x183),'JAASS':function(_0x2a50b1,_0x4a553e){return _0x2a50b1(_0x4a553e);},'qjTTV':function(_0x53ebd6,_0x44f613){return _0x53ebd6<_0x44f613;},'Aifxx':function(_0x54b18d,_0x506c13){return _0x54b18d(_0x506c13);},'xgQrL':_0x2c2aab(0x188)};try{const _0x342729=new AbortController(),_0x1d4b5a=_0x2192f1['zdsJy'](setTimeout,()=>_0x342729[_0x2c2aab(0x1a2)](),0x1388),_0x52b7c0={'method':'HEAD','signal':_0x342729[_0x2c2aab(0x1a0)],'redirect':_0x2192f1['QtJHZ']};/^https:\/\/localhost(:\d+)?/i['test'](_0x24fca9)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x19dcfa=await _0x2192f1[_0x2c2aab(0x19d)](fetch,_0x24fca9,_0x52b7c0);delete process['env'][_0x2c2aab(0x178)],_0x2192f1[_0x2c2aab(0x1e5)](clearTimeout,_0x1d4b5a);if(_0x2192f1['qjTTV'](_0x19dcfa[_0x2c2aab(0x196)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x19dcfa[_0x2c2aab(0x196)]};}catch(_0x2e01d8){delete process['env'][_0x2c2aab(0x178)];const _0x14c6b6=_0x2e01d8,_0x1f9564=_0x14c6b6['message']||_0x2192f1['Aifxx'](String,_0x2e01d8),_0x31c264=_0x1f9564[_0x2c2aab(0x1e2)](_0x2192f1[_0x2c2aab(0x1c9)])||_0x14c6b6[_0x2c2aab(0x17f)]===_0x2c2aab(0x194)||_0x1f9564['includes']('fetch\x20failed');return{'ok':![],'error':_0x1f9564,'isProtocolError':_0x31c264};}}async function sweepOrphanLocalProfile(_0x554324,_0x4288f1,_0x3ca604){const _0x5d77da=_0x9d6b93,_0x213826={'mUfeC':_0x5d77da(0x1d9),'kJJaA':function(_0x29ca43,_0x3a402d,_0xda39bf){return _0x29ca43(_0x3a402d,_0xda39bf);},'XpRpf':function(_0x48c048,_0x5cc280){return _0x48c048(_0x5cc280);}},_0x24b9e2=join(_0x4288f1,_0x213826[_0x5d77da(0x1c1)]),_0x434550=_0x213826[_0x5d77da(0x199)](join,_0x24b9e2,_0x554324);existsSync(_0x434550)&&(_0x3ca604&&await isPathGitTracked(_0x434550)?console[_0x5d77da(0x1e0)](_0x5d77da(0x197)+_0x434550+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x434550,{'recursive':!![],'force':!![]}),console['log'](_0x5d77da(0x1ae)+_0x434550)));if(existsSync(_0x24b9e2)){let _0x350a2e=[];try{_0x350a2e=await _0x213826['XpRpf'](readdir,_0x24b9e2);}catch{return;}const _0x46c46a=_0x5d77da(0x1d8)+_0x554324+'-';for(const _0x19ef3e of _0x350a2e){if(!_0x19ef3e[_0x5d77da(0x1c7)](_0x46c46a))continue;const _0x34e287=join(_0x24b9e2,_0x19ef3e);await _0x213826['kJJaA'](rm,_0x34e287,{'recursive':!![],'force':!![]}),console[_0x5d77da(0x1e0)](_0x5d77da(0x1ae)+_0x34e287);}}}async function sweepOrphansBestEffort(_0x53c9cf){const _0x12a5d0=_0x9d6b93,_0x402aab={'ssSWa':function(_0x30c9de,_0x22c440,_0x208674,_0x37a919){return _0x30c9de(_0x22c440,_0x208674,_0x37a919);},'rOFpP':function(_0x1bd594){return _0x1bd594();},'XpOXM':function(_0x135598,_0x1f0aa6,_0x3fa77f,_0x4294a5){return _0x135598(_0x1f0aa6,_0x3fa77f,_0x4294a5);},'JzvJr':function(_0x45e303,_0x5b3c45){return _0x45e303(_0x5b3c45);}};try{await _0x402aab['ssSWa'](sweepOrphanLocalProfile,_0x53c9cf,getRangerHomeDir(),![]);const _0x294140=getRangerDir();_0x294140!==_0x402aab['rOFpP'](getRangerHomeDir)&&await _0x402aab['XpOXM'](sweepOrphanLocalProfile,_0x53c9cf,_0x294140,!![]);}catch(_0x46801b){console[_0x12a5d0(0x1e0)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x46801b instanceof Error?_0x46801b['message']:_0x402aab[_0x12a5d0(0x18e)](String,_0x46801b))+').');}}async function markActive(_0x24084e){const _0x1d6fb3=_0x9d6b93,_0x57d148={'SjFqX':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await writeActiveProfileName(_0x24084e),console[_0x1d6fb3(0x1e0)](_0x1d6fb3(0x1c5)+_0x24084e);}catch{console['log'](_0x57d148[_0x1d6fb3(0x1d5)]);}}async function tryAutoRouteCloudProfile(_0x2f1a05,_0x1e2892,_0x3bdd32,_0x72b90,_0x1aeebd){const _0x19944a=_0x9d6b93,_0x159986={'tnLwF':function(_0xd6eca4,_0x6cfea0){return _0xd6eca4===_0x6cfea0;},'NhjZq':'profile.add.autoRouteSkipped','ZLXss':function(_0x8628c5,_0x15d6cf){return _0x8628c5 instanceof _0x15d6cf;},'UWafQ':function(_0x48daef,_0x4e09ed){return _0x48daef(_0x4e09ed);},'QkRjb':function(_0x1f99c4,_0x36330d){return _0x1f99c4+_0x36330d;},'ZmQEn':function(_0x9a0f7b,_0x3d8e14){return _0x9a0f7b+_0x3d8e14;},'KZDxx':function(_0x2eebf8,_0x3f2c85){return _0x2eebf8+_0x3f2c85;},'ObzZh':_0x19944a(0x1cb),'HBPNn':_0x19944a(0x1f0),'YGWIr':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','MUjOE':function(_0x573684,_0x27331d){return _0x573684+_0x27331d;},'jsMkm':_0x19944a(0x1a4),'geOQk':function(_0x39ccef,_0x39ac8f,_0x51b918){return _0x39ccef(_0x39ac8f,_0x51b918);},'tzgOP':'confirm','mBdZn':'user_declined','CWQrJ':function(_0x5aff82,_0xab8337,_0x5385cc,_0x3b3426){return _0x5aff82(_0xab8337,_0x5385cc,_0x3b3426);},'gHSaR':function(_0x3804e8,_0x3ad5cf){return _0x3804e8+_0x3ad5cf;},'wAtgd':'profile.add.autoRouted'};let _0x122f98;try{_0x122f98=await fetchAuthConfig();}catch(_0x382898){return _0x1aeebd?.['trackPhaseEnd'](_0x159986[_0x19944a(0x1ef)],{'reason':_0x19944a(0x1bb),'profileName':_0x2f1a05}),console['error'](_0x19944a(0x184)+(_0x159986['ZLXss'](_0x382898,Error)?_0x382898[_0x19944a(0x1ad)]:_0x159986[_0x19944a(0x181)](String,_0x382898))),![];}if((!_0x122f98||!_0x122f98['environments']||Object[_0x19944a(0x182)](_0x122f98[_0x19944a(0x1da)])[_0x19944a(0x1eb)]===0x0)&&!_0x3bdd32[_0x19944a(0x18c)]){if(_0x72b90)return await captureEnvLessProfile(_0x2f1a05,_0x1e2892,_0x3bdd32,_0x1aeebd);return _0x1aeebd?.['trackPhaseEnd'](_0x159986['NhjZq'],{'reason':_0x19944a(0x1bb),'profileName':_0x2f1a05}),console[_0x19944a(0x19c)](_0x159986[_0x19944a(0x186)](_0x159986[_0x19944a(0x1cc)](_0x159986[_0x19944a(0x1bf)](_0x159986[_0x19944a(0x1bf)](_0x19944a(0x177),'\x0a')+_0x159986['ObzZh'],_0x19944a(0x1e3)+_0x2f1a05+'\x20--url\x20'+_0x1e2892+'\x20--skip-auth\x0a'),'\x0a')+_0x159986['HBPNn'],_0x159986['YGWIr'])),![];}let _0x44f290;if(_0x3bdd32[_0x19944a(0x18c)]){if(!_0x122f98?.[_0x19944a(0x1da)]?.[_0x3bdd32['authEnv']]){const _0x1ef70b=Object[_0x19944a(0x182)](_0x122f98?.[_0x19944a(0x1da)]??{});return _0x1aeebd?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x19944a(0x179),'profileName':_0x2f1a05}),console['error'](_0x159986[_0x19944a(0x1a1)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x3bdd32['authEnv']+'\x22\x20not\x20found.',_0x1ef70b[_0x19944a(0x1eb)]?'\x20Configured\x20envs:\x20'+_0x1ef70b['join'](',\x20')+'.':_0x159986[_0x19944a(0x18a)])),![];}_0x44f290=_0x3bdd32['authEnv'];}else _0x44f290=_0x159986[_0x19944a(0x173)](matchAuthEnvironment,_0x1e2892,_0x122f98);if(!_0x44f290)return _0x1aeebd?.[_0x19944a(0x1f3)](_0x19944a(0x1bc),{'reason':_0x19944a(0x19f),'profileName':_0x2f1a05}),console[_0x19944a(0x19c)](_0x19944a(0x1a5)+_0x1e2892+_0x19944a(0x1a3)+Object['keys'](_0x122f98?.[_0x19944a(0x1da)]??{})[_0x19944a(0x1d2)](',\x20')+'.'),![];const _0xc186=_0x122f98?.[_0x19944a(0x1da)]?.[_0x44f290],_0x52465c=_0xc186?.['domains']??[];if(_0x72b90&&!_0x3bdd32['yes']){const {saveToCloud:_0xc7293c}=await _0x263a27['prompt']([{'type':_0x159986[_0x19944a(0x1d0)],'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x44f290+'\x27\x20matching\x20'+_0x1e2892+_0x19944a(0x1b8)+_0x52465c[_0x19944a(0x1d2)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x2f1a05+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0xc7293c)return _0x1aeebd?.['trackPhaseEnd'](_0x19944a(0x1bc),{'reason':_0x159986[_0x19944a(0x1de)],'profileName':_0x2f1a05}),console[_0x19944a(0x19c)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x1c86df=_0x52465c[_0x19944a(0x1af)](_0x7a2c52=>{const _0x281e9e=_0x19944a;try{return _0x159986['tnLwF'](new URL(_0x7a2c52)[_0x281e9e(0x1be)],new URL(_0x1e2892)[_0x281e9e(0x1be)]);}catch{return![];}}),_0x122980={};!_0x1c86df&&(_0x122980[_0x19944a(0x1e1)]=_0x1e2892);try{await _0x159986['CWQrJ'](createCloudProfile,_0x2f1a05,_0x44f290,{'settings':_0x122980}),warnCloudProfileSharedInOrg();}catch(_0x4f0050){if(_0x4f0050 instanceof ApiError&&_0x4f0050['status']===0x199){console['error'](_0x159986[_0x19944a(0x1c0)](_0x19944a(0x195)+_0x2f1a05+_0x19944a(0x17b),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x2f1a05));throw _0x4f0050;}throw _0x4f0050;}return console[_0x19944a(0x1e0)](_0x159986[_0x19944a(0x1c0)](_0x19944a(0x17a)+_0x2f1a05+_0x19944a(0x1e6),'\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x2f1a05)),await _0x159986[_0x19944a(0x181)](sweepOrphansBestEffort,_0x2f1a05),_0x1aeebd?.['trackPhaseEnd'](_0x159986[_0x19944a(0x1e4)],{'envKey':_0x44f290,'profileName':_0x2f1a05}),!![];}async function createUnconfiguredCloudProfile(_0x31cadf,_0xd3bc1c){const _0x585b45=_0x9d6b93,_0x37de01={'KtbnE':function(_0x35fc80){return _0x35fc80();}};try{await createCloudProfile(_0x31cadf,undefined,{'settings':_0xd3bc1c}),_0x37de01[_0x585b45(0x189)](warnCloudProfileSharedInOrg);}catch(_0x5c02a2){_0x5c02a2 instanceof ApiError&&_0x5c02a2['status']===0x199&&console['error'](_0x585b45(0x195)+_0x31cadf+_0x585b45(0x17b)+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x31cadf));throw _0x5c02a2;}}function _0x347b(){const _0x353d6e=['ChxKX','102XHAEMw','1000948LvMFfV','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','length','214530prgAMM','yhhhy','trim','NhjZq','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','\x22:\x20','\x20\x20https://docs.ranger.net/main/concepts/profiles','trackPhaseEnd','1605952rVyCZY','slice','geOQk','CudFu','bHMoc','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','NODE_TLS_REJECT_UNAUTHORIZED','env_not_found','✓\x20Profile\x20\x27','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','3912FRHtqh','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','name','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','UWafQ','keys','manual','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','DECOb','QkRjb','prompt','Invalid\x20URL','KtbnE','jsMkm','profile.add.autoRouted','authEnv','QdQeU','JzvJr','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','skipAuth','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a✓\x20Profile\x20\x27','user_declined','TypeError','\x0a\x20\x20A\x20profile\x20named\x20\x22','status','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','continue','kJJaA','`\x20again\x20without\x20--skip-auth.','aTmlu','error','zdsJy','\x27\x20created\x20(CDP).','no_match','signal','MUjOE','abort','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','test','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','1834NdzwCo','⚠\x20Could\x20not\x20reach\x20','iXfIg','http://localhost:3000','xCwTV','message','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','some','\x0a\x20\x20Could\x20not\x20reach\x20','isElectron','confirm','66513ppHtwh','Enter\x20a\x20different\x20URL','exit','use_suggestion','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','\x0a\x20\x20(domains:\x20','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','cdpEndpoint','no_auth_config','profile.add.autoRouteSkipped','isTTY','origin','KZDxx','gHSaR','mUfeC','url','330326tQTETK','setupHeaders','\x20\x20Set\x20active\x20profile:\x20','99910oRtcxN','startsWith','189qXfzlX','xgQrL','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','ZmQEn','TphOx','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','list','tzgOP','indexOf','join','force','EkzDc','SjFqX','OWnFe','cwd','.tmp-','local','environments','\x20(continuing\x20with\x20--force)','Use\x20','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','mBdZn','retry','log','baseUrl','includes','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','wAtgd','JAASS','\x27\x20created.\x0a'];_0x347b=function(){return _0x353d6e;};return _0x347b();}async function captureEnvLessProfile(_0x2825a9,_0x5ae6f4,_0x4d3d2f,_0x231fe8){const _0x8a556b=_0x9d6b93,_0x46ee44={'yhhhy':_0x8a556b(0x1b2),'wWmdq':'capture','DProH':_0x8a556b(0x193),'CudFu':function(_0x2de972,_0x214c8a,_0x520d32,_0x4e91bc){return _0x2de972(_0x214c8a,_0x520d32,_0x4e91bc);},'hoFvL':function(_0x257995,_0x264c8d){return _0x257995+_0x264c8d;},'stfBz':function(_0x18c5e4,_0x6dc174){return _0x18c5e4(_0x6dc174);}};if(!_0x4d3d2f['yes']){const {capture:_0x250dcb}=await _0x263a27[_0x8a556b(0x187)]([{'type':_0x46ee44[_0x8a556b(0x1ed)],'name':_0x46ee44['wWmdq'],'message':_0x8a556b(0x176),'default':!![]}]);if(!_0x250dcb)return _0x231fe8?.[_0x8a556b(0x1f3)](_0x8a556b(0x1bc),{'reason':_0x46ee44['DProH'],'profileName':_0x2825a9}),console[_0x8a556b(0x19c)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x8a556b(0x1ce)),![];}const _0x3eca42={};if(_0x4d3d2f['setupHeader'])for(const _0x33a90b of _0x4d3d2f['setupHeader']){const _0x5ca78d=_0x33a90b[_0x8a556b(0x1d1)](':');if(_0x5ca78d===-0x1)continue;_0x3eca42[_0x33a90b[_0x8a556b(0x172)](0x0,_0x5ca78d)['trim']()]=_0x33a90b['slice'](_0x5ca78d+0x1)['trim']();}const _0x45d36c={'baseUrl':_0x5ae6f4};Object['keys'](_0x3eca42)['length']>0x0&&(_0x45d36c['setupHeaders']=_0x3eca42);let _0xb0ce0b;try{_0xb0ce0b=await _0x46ee44[_0x8a556b(0x174)](createCloudProfile,_0x2825a9,undefined,{'settings':_0x45d36c}),warnCloudProfileSharedInOrg();}catch(_0x561e14){_0x561e14 instanceof ApiError&&_0x561e14['status']===0x199&&console['error'](_0x46ee44['hoFvL']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x2825a9+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x8a556b(0x1a7)+_0x2825a9));throw _0x561e14;}return await manualBrowserLogin(_0xb0ce0b,{'key':'','domains':[_0x5ae6f4],'setupHeaders':Object['keys'](_0x3eca42)['length']>0x0?_0x3eca42:undefined}),console['log'](_0x8a556b(0x192)+_0x2825a9+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+(_0x8a556b(0x18f)+_0x2825a9)),await _0x46ee44['stfBz'](sweepOrphansBestEffort,_0x2825a9),_0x231fe8?.['trackPhaseEnd'](_0x8a556b(0x18b),{'envKey':null,'profileName':_0x2825a9}),!![];}export async function addEnv(_0x59437c,_0x328526={},_0xb2158a){const _0xa5588d=_0x9d6b93,_0x53e9ac={'XVcNf':function(_0x4c5869,_0x3d4663){return _0x4c5869+_0x3d4663;},'TphOx':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','usgme':function(_0x489ee9,_0x186220){return _0x489ee9+_0x186220;},'yKuHd':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','iXfIg':_0xa5588d(0x180),'YwcbV':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','OWnFe':function(_0x12da4d){return _0x12da4d();},'xNeIA':_0xa5588d(0x1dd),'rWwKM':function(_0x1eccb1,_0x5e8458,_0x269f7f,_0x1307cd,_0x20e396){return _0x1eccb1(_0x5e8458,_0x269f7f,_0x1307cd,_0x20e396);},'QdQeU':function(_0x4db201,_0x2bf383){return _0x4db201(_0x2bf383);},'DECOb':function(_0x2acedf,_0x5f155e){return _0x2acedf(_0x5f155e);},'wrbAy':'\x0a🌐\x20Profile\x20Setup\x0a','TsQia':_0xa5588d(0x17d),'EkzDc':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','XLjYS':'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','qtfEZ':function(_0x1c21c5,_0x7bd688){return _0x1c21c5||_0x7bd688;},'aTmlu':_0xa5588d(0x1cf),'ChxKX':_0xa5588d(0x1df),'bHMoc':_0xa5588d(0x198),'qcIke':_0xa5588d(0x1b6),'xCwTV':function(_0x2c4866,_0x33786b){return _0x2c4866===_0x33786b;},'geGDP':function(_0x3bb7e6,_0x18b530){return _0x3bb7e6 instanceof _0x18b530;}};_0x328526['ci']&&(console['error'](_0x53e9ac['XVcNf'](_0x53e9ac[_0xa5588d(0x1cd)]+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x0a')+'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'+_0xa5588d(0x191)+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+_0xa5588d(0x1f2)),process[_0xa5588d(0x1b5)](0x1));const _0x19d7fa={};if(_0x328526['setupHeader'])for(const _0x4f3ee4 of _0x328526['setupHeader']){const _0x44e682=_0x4f3ee4[_0xa5588d(0x1d1)](':');if(_0x44e682===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x4f3ee4+_0xa5588d(0x1b9));const _0x3843ce=_0x4f3ee4[_0xa5588d(0x172)](0x0,_0x44e682)['trim'](),_0x417dac=_0x4f3ee4[_0xa5588d(0x172)](_0x53e9ac['usgme'](_0x44e682,0x1))['trim']();_0x19d7fa[_0x3843ce]=_0x417dac;}if(_0x328526['cdpEndpoint']!==undefined&&_0x328526['cdpEndpoint'][_0xa5588d(0x1ee)]()==='')throw new Error(_0x53e9ac['yKuHd']);if(_0x328526['cdpEndpoint']&&_0x328526['url'])throw new Error(_0x53e9ac[_0xa5588d(0x1aa)]);if(_0x328526['authEnv']&&_0x328526['skipAuth'])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x328526[_0xa5588d(0x18c)]&&_0x328526[_0xa5588d(0x1ba)])throw new Error(_0x53e9ac['YwcbV']);const _0x198fbb=Boolean(_0x328526['cdpEndpoint']),_0x143af7=_0x53e9ac[_0xa5588d(0x1d6)](isInteractive);if(!_0x143af7&&!_0x328526[_0xa5588d(0x1c2)]&&!_0x198fbb&&!_0x328526[_0xa5588d(0x190)])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x198fbb){const _0x19d521=_0x328526['cdpEndpoint'];console['log'](_0x53e9ac['xNeIA']),console[_0xa5588d(0x1e0)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x19d521);const _0x2cf802={'cdpEndpoint':_0x19d521,'isElectron':!![]};Object[_0xa5588d(0x182)](_0x19d7fa)[_0xa5588d(0x1eb)]>0x0&&(_0x2cf802[_0xa5588d(0x1c4)]=_0x19d7fa);await createUnconfiguredCloudProfile(_0x59437c,_0x2cf802);try{setProfileOverride(process[_0xa5588d(0x1d7)](),_0x59437c,'cdpEndpoint',_0x19d521),_0x53e9ac['rWwKM'](setProfileOverride,process[_0xa5588d(0x1d7)](),_0x59437c,_0xa5588d(0x1b1),!![]);}catch(_0x7fe738){console[_0xa5588d(0x19c)](_0xa5588d(0x1b7)+(_0x7fe738 instanceof Error?_0x7fe738['message']:_0x53e9ac[_0xa5588d(0x18d)](String,_0x7fe738)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x59437c+_0xa5588d(0x19e)),await _0x53e9ac[_0xa5588d(0x185)](sweepOrphansBestEffort,_0x59437c),await _0x53e9ac[_0xa5588d(0x18d)](markActive,_0x59437c);return;}if(_0x328526[_0xa5588d(0x190)]){const _0x589b55={};_0x328526[_0xa5588d(0x1c2)]&&(_0x589b55['baseUrl']=_0x328526[_0xa5588d(0x1c2)]);Object[_0xa5588d(0x182)](_0x19d7fa)['length']>0x0&&(_0x589b55[_0xa5588d(0x1c4)]=_0x19d7fa);await createUnconfiguredCloudProfile(_0x59437c,_0x589b55),console['log']('✓\x20Profile\x20\x27'+_0x59437c+'\x27\x20created\x20(no\x20session).\x0a'+(_0xa5588d(0x1ea)+_0x59437c+_0xa5588d(0x19a))),await sweepOrphansBestEffort(_0x59437c),await markActive(_0x59437c);return;}if(_0x328526[_0xa5588d(0x1c2)]){const _0x20d25f=_0x328526[_0xa5588d(0x1c2)],_0x241841=await checkUrlReachability(_0x20d25f);if(!_0x241841['ok']&&!_0x328526['force'])throw new Error('Could\x20not\x20reach\x20'+_0x20d25f+':\x20'+_0x241841[_0xa5588d(0x19c)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x241841['ok']&&_0x328526[_0xa5588d(0x1d3)]&&console[_0xa5588d(0x1e0)](_0xa5588d(0x1a9)+_0x20d25f+':\x20'+_0x241841['error']+_0xa5588d(0x1db));}else{console['log'](_0x53e9ac['wrbAy']),console['log'](_0x53e9ac['TsQia']),console['log'](_0x53e9ac[_0xa5588d(0x1d4)]);let _0x382f99='',_0x1c40b2=![];while(!![]){const _0x5b50ee=await _0x263a27[_0xa5588d(0x187)]([{'type':'input','name':'baseUrl','message':_0x1c40b2?_0x53e9ac['XLjYS']:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x53e9ac['qtfEZ'](_0x382f99,_0xa5588d(0x1ab))}]);_0x382f99=_0x5b50ee[_0xa5588d(0x1e1)];const _0x3e5089=await checkUrlReachability(_0x382f99);if(_0x3e5089['ok'])break;const _0x726107=/^[a-zA-Z][\w+.-]*:\/\//[_0xa5588d(0x1a6)](_0x382f99),_0x3e926a=_0x3e5089['isProtocolError']&&!_0x726107,_0x2dd5a2=_0x3e926a?'http://'+_0x382f99:null;_0x1c40b2=!![],console['log'](_0xa5588d(0x1b0)+_0x382f99+':\x20'+_0x3e5089['error']);_0x2dd5a2&&console[_0xa5588d(0x1e0)]('\x20\x20Did\x20you\x20mean\x20'+_0x2dd5a2+'?');const {action:_0x1a4792}=await _0x263a27['prompt']([{'type':_0x53e9ac[_0xa5588d(0x19b)],'name':'action','message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x2dd5a2?[{'name':_0xa5588d(0x1dc)+_0x2dd5a2,'value':'use_suggestion'}]:[],{'name':_0xa5588d(0x1b4),'value':_0x53e9ac[_0xa5588d(0x1e7)]},{'name':'Continue\x20anyway','value':_0x53e9ac[_0xa5588d(0x175)]}]}]);if(_0x1a4792===_0x53e9ac['qcIke']&&_0x2dd5a2){_0x382f99=_0x2dd5a2;const _0xc94d55=await _0x53e9ac[_0xa5588d(0x185)](checkUrlReachability,_0x382f99);if(_0xc94d55['ok'])break;console['log'](_0xa5588d(0x1ca)+_0x382f99+':\x20'+_0xc94d55[_0xa5588d(0x19c)]);}else{if(_0x53e9ac[_0xa5588d(0x1ac)](_0x1a4792,_0x53e9ac['bHMoc']))break;}}_0x328526={..._0x328526,'url':_0x382f99};}let _0x4d1355=![];try{_0x4d1355=await tryAutoRouteCloudProfile(_0x59437c,_0x328526['url'],_0x328526,_0x143af7,_0xb2158a);}catch(_0x1f0226){console[_0xa5588d(0x19c)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x59437c+_0xa5588d(0x1f1)+(_0x53e9ac['geGDP'](_0x1f0226,Error)?_0x1f0226[_0xa5588d(0x1ad)]:String(_0x1f0226))),process['exit'](0x1);}!_0x4d1355&&process[_0xa5588d(0x1b5)](0x1),await _0x53e9ac[_0xa5588d(0x18d)](markActive,_0x59437c);}
@@ -1 +1 @@
1
- (function(_0x5bf2a6,_0x31aeaf){var _0x260e81=_0x5980,_0x9b7697=_0x5bf2a6();while(!![]){try{var _0x32b928=-parseInt(_0x260e81(0x105))/0x1+parseInt(_0x260e81(0xf9))/0x2+-parseInt(_0x260e81(0xfe))/0x3*(-parseInt(_0x260e81(0x104))/0x4)+-parseInt(_0x260e81(0x101))/0x5+parseInt(_0x260e81(0xff))/0x6+-parseInt(_0x260e81(0x100))/0x7+-parseInt(_0x260e81(0x108))/0x8*(parseInt(_0x260e81(0x102))/0x9);if(_0x32b928===_0x31aeaf)break;else _0x9b7697['push'](_0x9b7697['shift']());}catch(_0x54e11a){_0x9b7697['push'](_0x9b7697['shift']());}}}(_0x292c,0xdec10));export async function authEncrypt(_0x3872c4){var _0x131a4d=_0x5980,_0x573eae={'UQoEd':function(_0x8ee856,_0x6c35d8){return _0x8ee856+_0x6c35d8;},'bzoic':function(_0x5488c1,_0x3e6802){return _0x5488c1+_0x3e6802;},'xrWCO':_0x131a4d(0x106),'HUFzk':_0x131a4d(0xfc),'gqORB':_0x131a4d(0x103),'nNPSt':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x131a4d(0x109)](_0x573eae['UQoEd'](_0x573eae[_0x131a4d(0xfd)](_0x573eae[_0x131a4d(0xfd)](_0x573eae[_0x131a4d(0xfd)](_0x573eae['bzoic'](_0x573eae['xrWCO'],_0x573eae[_0x131a4d(0xfa)]),'\x0a')+_0x573eae['gqORB'],_0x131a4d(0xfb)),'\x0a')+_0x573eae['nNPSt'],_0x131a4d(0x107))),process['exit'](0x1);}function _0x5980(_0x58ec38,_0x2c7051){_0x58ec38=_0x58ec38-0xf9;var _0x292c50=_0x292c();var _0x598032=_0x292c50[_0x58ec38];return _0x598032;}function _0x292c(){var _0x26b368=['error','1701162KCcpSw','HUFzk','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','UQoEd','741291yQfmLJ','9785760DYjoHi','3998491mxMpZd','5797105NTrxSD','2799CkJqYq','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','24kpCSci','99170HjjXMb','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles','31432lMGltZ'];_0x292c=function(){return _0x26b368;};return _0x292c();}
1
+ function _0x5019(_0x422424,_0x333399){_0x422424=_0x422424-0x1be;var _0x2b1c61=_0x2b1c();var _0x5019cb=_0x2b1c61[_0x422424];return _0x5019cb;}(function(_0x452289,_0x2ee1e8){var _0x1f929e=_0x5019,_0x308c36=_0x452289();while(!![]){try{var _0x40cccb=parseInt(_0x1f929e(0x1cb))/0x1+-parseInt(_0x1f929e(0x1c3))/0x2*(parseInt(_0x1f929e(0x1ca))/0x3)+parseInt(_0x1f929e(0x1c6))/0x4*(parseInt(_0x1f929e(0x1cd))/0x5)+parseInt(_0x1f929e(0x1cc))/0x6*(-parseInt(_0x1f929e(0x1c5))/0x7)+-parseInt(_0x1f929e(0x1d0))/0x8+-parseInt(_0x1f929e(0x1c7))/0x9*(-parseInt(_0x1f929e(0x1c8))/0xa)+-parseInt(_0x1f929e(0x1ce))/0xb*(-parseInt(_0x1f929e(0x1c4))/0xc);if(_0x40cccb===_0x2ee1e8)break;else _0x308c36['push'](_0x308c36['shift']());}catch(_0x587feb){_0x308c36['push'](_0x308c36['shift']());}}}(_0x2b1c,0x8d69f));export async function authEncrypt(_0x5a8375){var _0x465aa7=_0x5019,_0x3ba0f2={'FgFkO':function(_0x1291a9,_0x336a60){return _0x1291a9+_0x336a60;},'VXpKC':_0x465aa7(0x1c9),'EHzSK':_0x465aa7(0x1cf),'yNffX':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','JpIFY':_0x465aa7(0x1be),'yOnPt':_0x465aa7(0x1c1)};console['error'](_0x3ba0f2[_0x465aa7(0x1bf)](_0x3ba0f2[_0x465aa7(0x1c2)]+_0x3ba0f2[_0x465aa7(0x1d2)]+'\x0a'+_0x3ba0f2[_0x465aa7(0x1c0)]+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a'+_0x3ba0f2['JpIFY'],_0x3ba0f2['yOnPt'])),process[_0x465aa7(0x1d1)](0x1);}function _0x2b1c(){var _0x345929=['exit','EHzSK','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','FgFkO','yNffX','\x20\x20https://docs.ranger.net/main/concepts/profiles','VXpKC','36238hAkmsv','2476896nASntL','7jHJdgE','4156amAHkg','4091643dzyqZT','10jzHtvc','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','21SCYWxM','605139lUnnCe','6720258uFmCeR','305gFfTFl','44JowdHh','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','981360mdmMDM'];_0x2b1c=function(){return _0x345929;};return _0x2b1c();}
@@ -1 +1 @@
1
- const _0xf40487=_0x2bbb;(function(_0x405910,_0x36a6bd){const _0xb462f5=_0x2bbb,_0x1264ae=_0x405910();while(!![]){try{const _0x409db1=parseInt(_0xb462f5(0x1a5))/0x1*(parseInt(_0xb462f5(0x1af))/0x2)+-parseInt(_0xb462f5(0x1b9))/0x3*(parseInt(_0xb462f5(0x194))/0x4)+parseInt(_0xb462f5(0x19f))/0x5*(-parseInt(_0xb462f5(0x187))/0x6)+-parseInt(_0xb462f5(0x19d))/0x7*(parseInt(_0xb462f5(0x1a6))/0x8)+parseInt(_0xb462f5(0x1ac))/0x9+parseInt(_0xb462f5(0x18a))/0xa*(-parseInt(_0xb462f5(0x1b4))/0xb)+parseInt(_0xb462f5(0x19c))/0xc;if(_0x409db1===_0x36a6bd)break;else _0x1264ae['push'](_0x1264ae['shift']());}catch(_0x2a1ae8){_0x1264ae['push'](_0x1264ae['shift']());}}}(_0x4d7d,0xa1d34));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';function _0x2bbb(_0x41487d,_0xbedc61){_0x41487d=_0x41487d-0x17f;const _0x4d7da6=_0x4d7d();let _0x2bbb91=_0x4d7da6[_0x41487d];return _0x2bbb91;}function _0x4d7d(){const _0x155e34=['27329784tpDsgy','2275IeahLF','opencode.json','5oqKVWp','Nothing\x20to\x20clean\x20up.\x0a','kCKff','log','stringify','UaTWm','2477nmJayG','6968VGfFXr','hrpXg','jZcwH','FAiaS','bXmWY','Rvpyp','6931593UtHtxH','vLhqa','bug-bash','582kOIghT','filter','xEzQw','WGQqh','XtuiR','224147apPwIr','✓\x20Removed\x20stored\x20credentials','win32','buGWW','platform','276fVivAX','close','\x0a✅\x20Cleanup\x20complete!\x0a','GNisP','KMqwM','@ranger-testing/opencode-plugin','PKdVz','error','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','6240228fyVRps','✓\x20Removed\x20project\x20skill:\x20','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','290WBNEly','trailhead','project','jmgVT','Jozft','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','parse','utf-8','ikOni','plugin','51808uYjIXQ','length','ignore','ranger','ZUYgn','eYKAL','claude','replace'];_0x4d7d=function(){return _0x155e34;};return _0x4d7d();}import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0xf40487(0x197),'feature-tracker',_0xf40487(0x1ae),'e2e-test-recommender'],opencodePluginName=_0xf40487(0x183);function parseJsonc(_0x1c215d){const _0x4de69a=_0xf40487,_0x55794f=_0x1c215d[_0x4de69a(0x19b)](/\/\*[\s\S]*?\*\//g,''),_0xba656e=_0x55794f['replace'](/^\s*\/\/.*$/gm,''),_0xb89338=_0xba656e['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x4de69a(0x190)](_0xb89338);}async function removeOpencodePluginConfig(_0x3fcf98){const _0x5d43db=_0xf40487,_0x51ddaf={'jZcwH':'string','ePqor':function(_0x43a2a6,_0x29d409){return _0x43a2a6!==_0x29d409;},'mdNMi':function(_0x1b84f0,_0x2dbcc0){return _0x1b84f0(_0x2dbcc0);},'Rvpyp':function(_0x4218bb,_0x424657,_0x525296){return _0x4218bb(_0x424657,_0x525296);},'kCKff':function(_0x4cfc70,_0xebd0b4){return _0x4cfc70===_0xebd0b4;},'SjHFx':function(_0x24d54a,_0x3b3109){return _0x24d54a+_0x3b3109;}};if(!_0x51ddaf['mdNMi'](existsSync,_0x3fcf98))return![];let _0x1fff4d;try{const _0x3b664b=await _0x51ddaf[_0x5d43db(0x1ab)](readFile,_0x3fcf98,_0x5d43db(0x191));_0x1fff4d=parseJsonc(_0x3b664b);}catch{return![];}const _0x2c4227=Array['isArray'](_0x1fff4d[_0x5d43db(0x193)])?_0x1fff4d['plugin']:[];if(_0x2c4227[_0x5d43db(0x195)]===0x0)return![];const _0x2e75ab=_0x2c4227[_0x5d43db(0x1b0)](_0x52c43e=>{const _0x2010bf=_0x5d43db;if(typeof _0x52c43e!==_0x51ddaf[_0x2010bf(0x1a8)])return!![];return _0x51ddaf['ePqor'](_0x52c43e,opencodePluginName);});if(_0x51ddaf['kCKff'](_0x2e75ab['length'],_0x2c4227[_0x5d43db(0x195)]))return![];return _0x51ddaf[_0x5d43db(0x1a1)](_0x2e75ab['length'],0x0)?delete _0x1fff4d['plugin']:_0x1fff4d[_0x5d43db(0x193)]=_0x2e75ab,await writeFile(_0x3fcf98,_0x51ddaf['SjHFx'](JSON[_0x5d43db(0x1a3)](_0x1fff4d,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x50a91a){const _0x15d421=_0xf40487,_0x1f2bdf={'GNisP':function(_0x46c707,_0x4f8201){return _0x46c707===_0x4f8201;},'PKdVz':'uninstall','ikOni':'ranger@trailhead','vLhqa':'--scope','buGWW':_0x15d421(0x196),'hOrkc':function(_0x279d05){return _0x279d05();},'Bhtwx':_0x15d421(0x17f),'RUOLp':_0x15d421(0x185)};return new Promise(_0x3fe021=>{const _0x35557d=_0x15d421,_0x344206=[_0x35557d(0x193),_0x1f2bdf[_0x35557d(0x184)],_0x1f2bdf[_0x35557d(0x192)]];_0x50a91a&&_0x344206['push'](_0x1f2bdf[_0x35557d(0x1ad)],_0x50a91a);const _0x58a0c1=spawn('claude',_0x344206,{'stdio':['ignore',_0x1f2bdf[_0x35557d(0x1b7)],_0x1f2bdf['buGWW']],'cwd':_0x50a91a?_0x1f2bdf['hOrkc'](getProjectRoot):undefined,'shell':process[_0x35557d(0x1b8)]==='win32'});_0x58a0c1['on'](_0x1f2bdf['Bhtwx'],_0x220e19=>{const _0x2d6642=_0x35557d;_0x3fe021(_0x1f2bdf[_0x2d6642(0x181)](_0x220e19,0x0));}),_0x58a0c1['on'](_0x1f2bdf['RUOLp'],()=>{_0x3fe021(![]);});});}async function removeMarketplace(){const _0x3d9ebf=_0xf40487,_0x5ddf73={'tCqjd':function(_0x3a351c,_0x1fa13c){return _0x3a351c===_0x1fa13c;},'ZUYgn':function(_0x28145b,_0x2908ea,_0x1b8eb9,_0x6501c9){return _0x28145b(_0x2908ea,_0x1b8eb9,_0x6501c9);},'KMqwM':_0x3d9ebf(0x19a),'bXmWY':_0x3d9ebf(0x193),'WGQqh':'ignore','FAiaS':_0x3d9ebf(0x1b6)};return new Promise(_0x16622f=>{const _0x4be36f=_0x3d9ebf,_0x203f74={'UaTWm':function(_0x4ab1e6,_0x58fe96){return _0x5ddf73['tCqjd'](_0x4ab1e6,_0x58fe96);}},_0x1de706=_0x5ddf73[_0x4be36f(0x198)](spawn,_0x5ddf73[_0x4be36f(0x182)],[_0x5ddf73[_0x4be36f(0x1aa)],'marketplace','remove',_0x4be36f(0x18b)],{'stdio':[_0x5ddf73[_0x4be36f(0x1b2)],_0x5ddf73[_0x4be36f(0x1b2)],_0x5ddf73[_0x4be36f(0x1b2)]],'shell':process['platform']===_0x5ddf73[_0x4be36f(0x1a9)]});_0x1de706['on'](_0x4be36f(0x17f),_0x7442a5=>{const _0x1b2151=_0x4be36f;_0x16622f(_0x203f74[_0x1b2151(0x1a4)](_0x7442a5,0x0));}),_0x1de706['on']('error',()=>{_0x16622f(![]);});});}export async function clean(){const _0x2e3420=_0xf40487,_0xc50681={'kMjju':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','PYNnW':function(_0x26bc27,_0x25842c){return _0x26bc27(_0x25842c);},'hrpXg':function(_0x377f60,_0x58467f,_0x512b02){return _0x377f60(_0x58467f,_0x512b02);},'HYPEL':function(_0x333936,_0x4650d1,_0x505863){return _0x333936(_0x4650d1,_0x505863);},'eYKAL':function(_0x587fc9,_0x17edc7,_0x4cae2c){return _0x587fc9(_0x17edc7,_0x4cae2c);},'xEzQw':function(_0x408742){return _0x408742();},'GwJrq':function(_0x48bd1f,_0x15d9e3,_0x191fbc){return _0x48bd1f(_0x15d9e3,_0x191fbc);},'CnlPK':function(_0xf7a0b1,_0x3fcd28,_0x573303){return _0xf7a0b1(_0x3fcd28,_0x573303);},'CmKqU':function(_0x26a6b1,_0x31b98e){return _0x26a6b1(_0x31b98e);},'NLsdw':function(_0x432fc2,_0x4f1755,_0x339c83){return _0x432fc2(_0x4f1755,_0x339c83);},'DNDDK':function(_0x1379c7,_0x534f38){return _0x1379c7(_0x534f38);},'Jozft':function(_0x5dbc91,_0x5369b2){return _0x5dbc91(_0x5369b2);},'jmgVT':_0x2e3420(0x19e),'FweuL':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','VCRvG':function(_0x3f9b55,_0x174e68){return _0x3f9b55(_0x174e68);},'hEgRq':_0x2e3420(0x18c),'XtuiR':_0x2e3420(0x189)};console[_0x2e3420(0x1a2)](_0xc50681['kMjju']);let _0x14314e=![];try{await deleteAllCredentials(),console['log'](_0x2e3420(0x1b5)),_0x14314e=!![];}catch{}const _0x51e904=getCacheFile();existsSync(_0x51e904)&&(await rm(_0x51e904),_0x14314e=!![]);const _0x5d40ee=getRangerDir();_0xc50681['PYNnW'](existsSync,_0x5d40ee)&&(await _0xc50681[_0x2e3420(0x1a7)](rm,_0x5d40ee,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x14314e=!![]);const _0x397f7f=getProjectSkillsDir();for(const _0x551c1f of skillsToRemove){const _0x38b0a4=_0xc50681['HYPEL'](join,_0x397f7f,_0x551c1f);_0xc50681['PYNnW'](existsSync,_0x38b0a4)&&(await _0xc50681[_0x2e3420(0x199)](rm,_0x38b0a4,{'recursive':!![]}),console[_0x2e3420(0x1a2)](_0x2e3420(0x188)+_0x551c1f),_0x14314e=!![]);}const _0x356c78=_0xc50681['xEzQw'](getUserSkillsDir);for(const _0x152661 of skillsToRemove){const _0x366b4e=_0xc50681['GwJrq'](join,_0x356c78,_0x152661);_0xc50681['PYNnW'](existsSync,_0x366b4e)&&(await _0xc50681['CnlPK'](rm,_0x366b4e,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x152661),_0x14314e=!![]);}const _0x1fad6a=getOpencodeSkillsDir('project');for(const _0x8153e of skillsToRemove){const _0x291f66=join(_0x1fad6a,_0x8153e);_0xc50681['CmKqU'](existsSync,_0x291f66)&&(await _0xc50681['NLsdw'](rm,_0x291f66,{'recursive':!![]}),console['log'](_0x2e3420(0x18f)+_0x8153e),_0x14314e=!![]);}const _0x5ba9a8=_0xc50681['DNDDK'](getOpencodeSkillsDir,'user');for(const _0xfcb453 of skillsToRemove){const _0xe225fd=_0xc50681['NLsdw'](join,_0x5ba9a8,_0xfcb453);existsSync(_0xe225fd)&&(await rm(_0xe225fd,{'recursive':!![]}),console[_0x2e3420(0x1a2)](_0x2e3420(0x186)+_0xfcb453),_0x14314e=!![]);}const _0x11f1bc=_0xc50681['HYPEL'](join,_0xc50681[_0x2e3420(0x18e)](getOpencodeConfigDir,_0x2e3420(0x18c)),_0xc50681['jmgVT']);await removeOpencodePluginConfig(_0x11f1bc)&&(console['log'](_0xc50681['FweuL']),_0x14314e=!![]);const _0x37c8fa=join(getOpencodeConfigDir('user'),_0xc50681[_0x2e3420(0x18d)]);await _0xc50681['VCRvG'](removeOpencodePluginConfig,_0x37c8fa)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x14314e=!![]);const _0x2aa1f6=await _0xc50681['xEzQw'](uninstallClaudePlugin);_0x2aa1f6&&(console[_0x2e3420(0x1a2)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x14314e=!![]);const _0x786987=await uninstallClaudePlugin(_0xc50681['hEgRq']);_0x786987&&(console['log'](_0xc50681[_0x2e3420(0x1b3)]),_0x14314e=!![]);const _0x4ba3b0=await _0xc50681[_0x2e3420(0x1b1)](removeMarketplace);_0x4ba3b0&&(console[_0x2e3420(0x1a2)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x14314e=!![]),_0x14314e?console['log'](_0x2e3420(0x180)):console['log'](_0x2e3420(0x1a0));}
1
+ const _0x531a33=_0x400a;(function(_0x5749dc,_0x4a702a){const _0x2abaca=_0x400a,_0x302ede=_0x5749dc();while(!![]){try{const _0x41426e=-parseInt(_0x2abaca(0xd8))/0x1+parseInt(_0x2abaca(0xd9))/0x2*(parseInt(_0x2abaca(0xb4))/0x3)+parseInt(_0x2abaca(0xb2))/0x4*(-parseInt(_0x2abaca(0xad))/0x5)+-parseInt(_0x2abaca(0xaf))/0x6*(parseInt(_0x2abaca(0xaa))/0x7)+-parseInt(_0x2abaca(0xa4))/0x8*(parseInt(_0x2abaca(0xbe))/0x9)+parseInt(_0x2abaca(0xc9))/0xa+-parseInt(_0x2abaca(0xd7))/0xb*(-parseInt(_0x2abaca(0xca))/0xc);if(_0x41426e===_0x4a702a)break;else _0x302ede['push'](_0x302ede['shift']());}catch(_0x30a22b){_0x302ede['push'](_0x302ede['shift']());}}}(_0x5e6c,0x5d653));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';function _0x400a(_0x5eb1ed,_0x1b85be){_0x5eb1ed=_0x5eb1ed-0x9f;const _0x5e6cf5=_0x5e6c();let _0x400aa1=_0x5e6cf5[_0x5eb1ed];return _0x400aa1;}import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger','feature-tracker',_0x531a33(0xa5),_0x531a33(0xcb)],opencodePluginName=_0x531a33(0xce);function parseJsonc(_0x31134a){const _0x4f3b10=_0x531a33,_0x187877=_0x31134a[_0x4f3b10(0xc5)](/\/\*[\s\S]*?\*\//g,''),_0x2790ed=_0x187877[_0x4f3b10(0xc5)](/^\s*\/\/.*$/gm,''),_0x3205e2=_0x2790ed['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x4f3b10(0xd5)](_0x3205e2);}async function removeOpencodePluginConfig(_0x1a8b47){const _0x2332b6=_0x531a33,_0x10243c={'mKboU':_0x2332b6(0xbb),'LpbcQ':function(_0x13fde1,_0xc225fa){return _0x13fde1!==_0xc225fa;},'UnClZ':function(_0x3a3f89,_0x43a5ee,_0x18e437){return _0x3a3f89(_0x43a5ee,_0x18e437);},'oGqLL':_0x2332b6(0xb3),'UwuTw':function(_0x109c33,_0x5a3096){return _0x109c33(_0x5a3096);},'Hpfur':function(_0x484ad8,_0x3f42d5){return _0x484ad8===_0x3f42d5;},'rJrlY':function(_0x42fa14,_0x23dc73){return _0x42fa14+_0x23dc73;}};if(!existsSync(_0x1a8b47))return![];let _0x23fde0;try{const _0x283368=await _0x10243c[_0x2332b6(0xd3)](readFile,_0x1a8b47,_0x10243c[_0x2332b6(0xa1)]);_0x23fde0=_0x10243c[_0x2332b6(0xa0)](parseJsonc,_0x283368);}catch{return![];}const _0x4936cc=Array[_0x2332b6(0xac)](_0x23fde0['plugin'])?_0x23fde0[_0x2332b6(0xab)]:[];if(_0x10243c['Hpfur'](_0x4936cc['length'],0x0))return![];const _0x1a87dd=_0x4936cc['filter'](_0x439f8a=>{const _0x238dd4=_0x2332b6;if(typeof _0x439f8a!==_0x10243c[_0x238dd4(0xb8)])return!![];return _0x10243c[_0x238dd4(0xc6)](_0x439f8a,opencodePluginName);});if(_0x10243c[_0x2332b6(0xd2)](_0x1a87dd[_0x2332b6(0xe2)],_0x4936cc[_0x2332b6(0xe2)]))return![];return _0x1a87dd[_0x2332b6(0xe2)]===0x0?delete _0x23fde0[_0x2332b6(0xab)]:_0x23fde0[_0x2332b6(0xab)]=_0x1a87dd,await writeFile(_0x1a8b47,_0x10243c[_0x2332b6(0xa9)](JSON['stringify'](_0x23fde0,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x15c85d){const _0x46f9ff={'Qxvay':function(_0x155bd8,_0x2fc86b){return _0x155bd8(_0x2fc86b);},'NNRRr':function(_0x339332,_0x34b6f2){return _0x339332===_0x34b6f2;},'fdgnI':'ignore','eIQpZ':function(_0x4a75f8,_0x5c9ae1){return _0x4a75f8===_0x5c9ae1;}};return new Promise(_0x1d8138=>{const _0x1eb1c4=_0x400a,_0x39f89d={'ZLDji':function(_0x33db03,_0x22b781){const _0x3d1da7=_0x400a;return _0x46f9ff[_0x3d1da7(0xbf)](_0x33db03,_0x22b781);}},_0x3fcfd1=['plugin',_0x1eb1c4(0xc0),_0x1eb1c4(0xd1)];_0x15c85d&&_0x3fcfd1[_0x1eb1c4(0xb6)](_0x1eb1c4(0xbc),_0x15c85d);const _0x2a60fc=spawn(_0x1eb1c4(0xae),_0x3fcfd1,{'stdio':['ignore',_0x46f9ff['fdgnI'],_0x1eb1c4(0xb1)],'cwd':_0x15c85d?getProjectRoot():undefined,'shell':_0x46f9ff[_0x1eb1c4(0xba)](process[_0x1eb1c4(0xd0)],'win32')});_0x2a60fc['on'](_0x1eb1c4(0xb5),_0x10cf6e=>{const _0x127f1f=_0x1eb1c4;_0x1d8138(_0x39f89d[_0x127f1f(0xc2)](_0x10cf6e,0x0));}),_0x2a60fc['on'](_0x1eb1c4(0xcc),()=>{const _0x3bb5e0=_0x1eb1c4;_0x46f9ff[_0x3bb5e0(0xa7)](_0x1d8138,![]);});});}async function removeMarketplace(){const _0x187d9a=_0x531a33,_0xfe6da={'QpLMA':function(_0x3e5509,_0xb704c6){return _0x3e5509(_0xb704c6);},'mHzLR':function(_0x2ed30e,_0x3d639f,_0x19cb27,_0x30a1e2){return _0x2ed30e(_0x3d639f,_0x19cb27,_0x30a1e2);},'LsImv':_0x187d9a(0xdb),'OnyBO':_0x187d9a(0xb7),'mqOjl':'ignore','NkrmN':_0x187d9a(0xb5),'JdHjo':_0x187d9a(0xcc)};return new Promise(_0x295c8f=>{const _0x15ab78=_0x187d9a,_0x37de03={'uUoJR':function(_0x88b086,_0x215fc1){return _0xfe6da['QpLMA'](_0x88b086,_0x215fc1);}},_0xa67c03=_0xfe6da['mHzLR'](spawn,_0x15ab78(0xae),[_0x15ab78(0xab),_0xfe6da[_0x15ab78(0xc8)],_0x15ab78(0xdf),_0xfe6da['OnyBO']],{'stdio':['ignore','ignore',_0xfe6da['mqOjl']],'shell':process['platform']==='win32'});_0xa67c03['on'](_0xfe6da['NkrmN'],_0x1b7abd=>{_0x295c8f(_0x1b7abd===0x0);}),_0xa67c03['on'](_0xfe6da[_0x15ab78(0xdd)],()=>{const _0x5875fd=_0x15ab78;_0x37de03[_0x5875fd(0xbd)](_0x295c8f,![]);});});}export async function clean(){const _0x377335=_0x531a33,_0xad0358={'CrdkL':_0x377335(0xe0),'QAGUN':function(_0x21ee28){return _0x21ee28();},'gGwtU':function(_0x5809d9,_0x4ba91e){return _0x5809d9(_0x4ba91e);},'GmOSw':function(_0x5d787d,_0x36eefa,_0xaf81ff){return _0x5d787d(_0x36eefa,_0xaf81ff);},'kugQj':function(_0x9061e,_0x6ad9e8){return _0x9061e(_0x6ad9e8);},'iFZpu':function(_0x599c99,_0x1dad08){return _0x599c99(_0x1dad08);},'BrDcV':_0x377335(0xc3),'zvAxO':_0x377335(0xb9),'kYwdj':function(_0x24a22b,_0x293bc4,_0x1fc7b5){return _0x24a22b(_0x293bc4,_0x1fc7b5);},'KGheB':_0x377335(0x9f),'SmaPG':_0x377335(0xa3),'tKqmR':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','FQwhO':function(_0x2d729a,_0x5eb56d){return _0x2d729a(_0x5eb56d);},'ANPwy':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','HtWaE':_0x377335(0xe1)};console[_0x377335(0xcf)](_0x377335(0xcd));let _0x499098=![];try{await deleteAllCredentials(),console[_0x377335(0xcf)](_0xad0358['CrdkL']),_0x499098=!![];}catch{}const _0x4da613=_0xad0358[_0x377335(0xd4)](getCacheFile);_0xad0358['gGwtU'](existsSync,_0x4da613)&&(await rm(_0x4da613),_0x499098=!![]);const _0x399194=getRangerDir();existsSync(_0x399194)&&(await rm(_0x399194,{'recursive':!![]}),console[_0x377335(0xcf)]('✓\x20Removed\x20.ranger/\x20directory'),_0x499098=!![]);const _0xc3980c=getProjectSkillsDir();for(const _0x2f1977 of skillsToRemove){const _0x56c5ae=join(_0xc3980c,_0x2f1977);existsSync(_0x56c5ae)&&(await rm(_0x56c5ae,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x2f1977),_0x499098=!![]);}const _0x1f8717=getUserSkillsDir();for(const _0x147b5a of skillsToRemove){const _0x5590a1=_0xad0358[_0x377335(0xd6)](join,_0x1f8717,_0x147b5a);_0xad0358[_0x377335(0xc7)](existsSync,_0x5590a1)&&(await _0xad0358[_0x377335(0xd6)](rm,_0x5590a1,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x147b5a),_0x499098=!![]);}const _0x5765e9=_0xad0358['iFZpu'](getOpencodeSkillsDir,_0xad0358[_0x377335(0xa6)]);for(const _0x31330f of skillsToRemove){const _0x4e7a6a=join(_0x5765e9,_0x31330f);_0xad0358['iFZpu'](existsSync,_0x4e7a6a)&&(await _0xad0358[_0x377335(0xd6)](rm,_0x4e7a6a,{'recursive':!![]}),console['log'](_0x377335(0xb0)+_0x31330f),_0x499098=!![]);}const _0x4a2217=_0xad0358['kugQj'](getOpencodeSkillsDir,_0xad0358[_0x377335(0xa2)]);for(const _0x4c0e26 of skillsToRemove){const _0x50e87f=join(_0x4a2217,_0x4c0e26);existsSync(_0x50e87f)&&(await rm(_0x50e87f,{'recursive':!![]}),console[_0x377335(0xcf)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x4c0e26),_0x499098=!![]);}const _0x3d8b09=_0xad0358['kYwdj'](join,getOpencodeConfigDir(_0xad0358['BrDcV']),'opencode.json');await removeOpencodePluginConfig(_0x3d8b09)&&(console[_0x377335(0xcf)](_0xad0358[_0x377335(0xdc)]),_0x499098=!![]);const _0x7177fb=join(getOpencodeConfigDir('user'),_0xad0358[_0x377335(0xa8)]);await removeOpencodePluginConfig(_0x7177fb)&&(console['log'](_0x377335(0xde)),_0x499098=!![]);const _0x30ed34=await uninstallClaudePlugin();_0x30ed34&&(console['log'](_0xad0358['tKqmR']),_0x499098=!![]);const _0x3af3d8=await _0xad0358['FQwhO'](uninstallClaudePlugin,'project');_0x3af3d8&&(console['log'](_0xad0358[_0x377335(0xc1)]),_0x499098=!![]);const _0x1d7b40=await removeMarketplace();_0x1d7b40&&(console[_0x377335(0xcf)](_0xad0358['HtWaE']),_0x499098=!![]),_0x499098?console['log'](_0x377335(0xc4)):console[_0x377335(0xcf)](_0x377335(0xda));}function _0x5e6c(){const _0x4abf5c=['✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','remove','✓\x20Removed\x20stored\x20credentials','✓\x20Removed\x20trailhead\x20marketplace','length','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','UwuTw','oGqLL','zvAxO','opencode.json','803416ygdzjH','bug-bash','BrDcV','Qxvay','SmaPG','rJrlY','2196887HJQNwR','plugin','isArray','3595hZsBaZ','claude','6rkcDCC','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','ignore','944BpDQXr','utf-8','6iTUixQ','close','push','trailhead','mKboU','user','eIQpZ','string','--scope','uUoJR','9xsLlcl','NNRRr','uninstall','ANPwy','ZLDji','project','\x0a✅\x20Cleanup\x20complete!\x0a','replace','LpbcQ','kugQj','LsImv','2229430mGbEzT','24DbihwV','e2e-test-recommender','error','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','@ranger-testing/opencode-plugin','log','platform','ranger@trailhead','Hpfur','UnClZ','QAGUN','parse','GmOSw','1846603SrAWgf','1776GXecrz','409586WMijFR','Nothing\x20to\x20clean\x20up.\x0a','marketplace','KGheB','JdHjo'];_0x5e6c=function(){return _0x4abf5c;};return _0x5e6c();}
@@ -1 +1 @@
1
- const _0x5fcee1=_0xca7e;(function(_0x3055d8,_0x381c1c){const _0x39cf41=_0xca7e,_0x442a7c=_0x3055d8();while(!![]){try{const _0x1dcd73=parseInt(_0x39cf41(0x142))/0x1+-parseInt(_0x39cf41(0x14c))/0x2+parseInt(_0x39cf41(0x12b))/0x3+parseInt(_0x39cf41(0x131))/0x4*(-parseInt(_0x39cf41(0x147))/0x5)+parseInt(_0x39cf41(0x13d))/0x6*(-parseInt(_0x39cf41(0x141))/0x7)+parseInt(_0x39cf41(0x148))/0x8+parseInt(_0x39cf41(0x134))/0x9*(parseInt(_0x39cf41(0x124))/0xa);if(_0x1dcd73===_0x381c1c)break;else _0x442a7c['push'](_0x442a7c['shift']());}catch(_0x4ef7ec){_0x442a7c['push'](_0x442a7c['shift']());}}}(_0x2dc3,0x8d217));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x5fcee1(0x143),_0x5fcee1(0x132),_0x5fcee1(0x139)];function parseLocalValue(_0x22cba1,_0x1584df){const _0x55852e=_0x5fcee1,_0x216300={'tEKOA':function(_0x41f070,_0x1eaaf6){return _0x41f070===_0x1eaaf6;},'bhjMe':function(_0x11f957,_0x15d5d6){return _0x11f957===_0x15d5d6;}};if(BOOLEAN_KEYS[_0x55852e(0x12e)](_0x22cba1)){if(_0x216300['tEKOA'](_0x1584df,'true'))return!![];if(_0x216300['bhjMe'](_0x1584df,'false'))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x22cba1+_0x55852e(0x144));}return _0x1584df;}function parseOverrideValue(_0x93b37d){const _0xf15f6a=_0x5fcee1,_0xbd06f4={'aCjtz':function(_0x4fc3b8,_0x20974a){return _0x4fc3b8===_0x20974a;},'KvFuf':'false','WIQJd':function(_0x3fe19b,_0x406d98){return _0x3fe19b===_0x406d98;},'WEOZC':'null','SoFoT':_0xf15f6a(0x11d)};if(_0xbd06f4[_0xf15f6a(0x130)](_0x93b37d,_0xf15f6a(0x11e)))return!![];if(_0x93b37d===_0xbd06f4[_0xf15f6a(0x12f)])return![];if(_0xbd06f4[_0xf15f6a(0x152)](_0x93b37d,_0xbd06f4['WEOZC']))return null;if(_0x93b37d===_0xbd06f4['SoFoT'])return undefined;if(/^-?\d+$/['test'](_0x93b37d)){const _0x1bae3b=Number(_0x93b37d);if(Number[_0xf15f6a(0x12a)](_0x1bae3b))return _0x1bae3b;}if(/^-?\d+\.\d+$/[_0xf15f6a(0x140)](_0x93b37d)){const _0x49e6d3=Number(_0x93b37d);if(!Number[_0xf15f6a(0x11b)](_0x49e6d3))return _0x49e6d3;}const _0x2f46a7=_0x93b37d['trim']();if(_0x2f46a7['startsWith']('{')&&_0x2f46a7[_0xf15f6a(0x13f)]('}')||_0x2f46a7[_0xf15f6a(0x13c)]('[')&&_0x2f46a7['endsWith'](']'))try{return JSON[_0xf15f6a(0x150)](_0x2f46a7);}catch{}return _0x93b37d;}function _0xca7e(_0x2a148b,_0xbc564e){_0x2a148b=_0x2a148b-0x11a;const _0x2dc37d=_0x2dc3();let _0xca7ef2=_0x2dc37d[_0x2a148b];return _0xca7ef2;}async function resolveProfileTarget(_0x45de5e){const _0xff697a=_0x5fcee1,_0xf1728a={'tIPnQ':function(_0xa1c96c,_0xc98273){return _0xa1c96c(_0xc98273);},'PdebS':_0xff697a(0x121)},_0x3b5e9f=existsSync(getEnvDir(_0x45de5e));let _0x47c3ab=![];try{const _0x537bed=await fetchCloudProfile(_0x45de5e);_0x47c3ab=_0xf1728a[_0xff697a(0x126)](Boolean,_0x537bed);}catch{}if(_0x47c3ab)return{'kind':_0xff697a(0x138),'alsoExistsElsewhere':_0x3b5e9f};if(_0x3b5e9f)return{'kind':_0xf1728a['PdebS'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x45de5e+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x45de5e);}function printDualExistsHint(_0x56b8ad){const _0x1862b9=_0x5fcee1;console['log'](_0x1862b9(0x145)+_0x56b8ad+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x4defd8){const _0x244d17=_0x5fcee1,_0x5cc003={'XGnJs':function(_0x11b005,_0x25b760,_0x1548d7){return _0x11b005(_0x25b760,_0x1548d7);},'VMxnM':function(_0x3eb3b8){return _0x3eb3b8();}},_0x24879a=await fetchCloudProfile(_0x4defd8),_0x2a979a=_0x5cc003[_0x244d17(0x12d)](readProfileOverrides,_0x5cc003[_0x244d17(0x153)](getProjectPath),_0x4defd8);return mergeCloudProfileSettings(_0x24879a?.['settings']??{},_0x2a979a??undefined);}export async function configSet(_0x7f8149,_0x581153,_0x3a16f2){const _0x520342=_0x5fcee1,_0x4f095c={'dxebs':function(_0xb0ef48,_0x83512){return _0xb0ef48===_0x83512;},'GypmG':_0x520342(0x138),'GsfuA':function(_0x4b19ca,_0xfdc5db){return _0x4b19ca(_0xfdc5db);},'yNHKu':function(_0x298092,_0x266ccd,_0x3226c1){return _0x298092(_0x266ccd,_0x3226c1);},'ZQteE':function(_0x15e494){return _0x15e494();}},_0x203f8e=await resolveProfileTarget(_0x7f8149);if(_0x4f095c[_0x520342(0x14f)](_0x203f8e[_0x520342(0x137)],_0x4f095c[_0x520342(0x128)])){if(_0x203f8e[_0x520342(0x13e)])_0x4f095c[_0x520342(0x125)](printDualExistsHint,_0x7f8149);const _0x3968a0=parseOverrideValue(_0x3a16f2);setProfileOverride(getProjectPath(),_0x7f8149,_0x581153,_0x3968a0),console['log']('Set\x20'+_0x581153+_0x520342(0x13b)+JSON['stringify'](_0x3968a0)+'\x20for\x20\x22'+_0x7f8149+'\x22');return;}const _0x20e5b7=_0x4f095c['yNHKu'](parseLocalValue,_0x581153,_0x3a16f2);setProfileOverride(_0x4f095c['ZQteE'](getProjectPath),_0x7f8149,_0x581153,_0x20e5b7),console[_0x520342(0x120)](_0x520342(0x151)+_0x581153+_0x520342(0x13b)+_0x20e5b7+_0x520342(0x127)+_0x7f8149+'\x22');}export async function configGet(_0x5f268a,_0x1af1b3){const _0x1bf25c=_0x5fcee1,_0x6e3e={'ndXir':function(_0x50c356,_0xbc8a16){return _0x50c356===_0xbc8a16;},'rwWcR':'cloud','zNmaO':function(_0x11b6ce,_0x5e1dc7){return _0x11b6ce===_0x5e1dc7;},'PxFDK':_0x1bf25c(0x149),'KwYoz':function(_0x1abf7c,_0x4174db){return _0x1abf7c===_0x4174db;}},_0x2ec4c9=await resolveProfileTarget(_0x5f268a);if(_0x6e3e['ndXir'](_0x2ec4c9[_0x1bf25c(0x137)],_0x6e3e[_0x1bf25c(0x135)])){const _0x316218=await loadEffectiveCloudSettings(_0x5f268a),_0x1504ed=getNestedValue(_0x316218,_0x1af1b3);if(_0x1504ed===undefined)console[_0x1bf25c(0x120)]('(not\x20set)');else _0x6e3e[_0x1bf25c(0x154)](typeof _0x1504ed,_0x6e3e[_0x1bf25c(0x146)])?console[_0x1bf25c(0x120)](JSON[_0x1bf25c(0x129)](_0x1504ed,null,0x2)):console['log'](_0x1504ed);return;}const _0x442118=await loadSettings(_0x5f268a),_0x2ed332=getNestedValue(_0x442118,_0x1af1b3);if(_0x2ed332===undefined)console['log']('(not\x20set)');else _0x6e3e['KwYoz'](typeof _0x2ed332,_0x1bf25c(0x149))?console[_0x1bf25c(0x120)](JSON[_0x1bf25c(0x129)](_0x2ed332,null,0x2)):console['log'](_0x2ed332);}export async function configList(_0x40d435){const _0x40c4ce=_0x5fcee1,_0x2d6607={'niAUn':function(_0x4c0577,_0x380966){return _0x4c0577(_0x380966);},'HHMTi':function(_0x57d5a3,_0x433850){return _0x57d5a3(_0x433850);},'ySCnA':function(_0x7e89b9,_0x1bd65d){return _0x7e89b9===_0x1bd65d;},'SurGK':function(_0x432f4f,_0x4f8f25){return _0x432f4f(_0x4f8f25);}},_0x340b4e=await _0x2d6607[_0x40c4ce(0x123)](resolveProfileTarget,_0x40d435);if(_0x340b4e[_0x40c4ce(0x137)]===_0x40c4ce(0x138)){const _0x3b2f5a=await _0x2d6607[_0x40c4ce(0x13a)](loadEffectiveCloudSettings,_0x40d435);if(!_0x3b2f5a||_0x2d6607['ySCnA'](Object['keys'](_0x3b2f5a)[_0x40c4ce(0x11c)],0x0)){console[_0x40c4ce(0x120)](_0x40c4ce(0x14d)+_0x40d435+'\x22');return;}console[_0x40c4ce(0x120)](JSON['stringify'](_0x3b2f5a,null,0x2));return;}const _0xd33134=_0x2d6607['SurGK'](getSettingsPath,_0x40d435);if(!existsSync(_0xd33134)){console[_0x40c4ce(0x120)](_0x40c4ce(0x14d)+_0x40d435+'\x22');return;}const _0x1ad88d=await loadSettings(_0x40d435),_0x88934c=formatSettings(_0x1ad88d);!_0x88934c?console['log'](_0x40c4ce(0x14d)+_0x40d435+'\x22'):console[_0x40c4ce(0x120)](_0x88934c);}export async function configUnset(_0x19cb05,_0x4a330e){const _0x5b87e1=_0x5fcee1,_0x21eb61={'ggEEg':function(_0x1067f7,_0xb6da65){return _0x1067f7(_0xb6da65);},'xFpwd':function(_0x198701){return _0x198701();},'rwYZI':function(_0x3181af){return _0x3181af();},'OcdYF':function(_0x526d6f,_0x3a55e5){return _0x526d6f(_0x3a55e5);},'VIYiw':function(_0x173a23,_0x1a0d4e,_0x30d28){return _0x173a23(_0x1a0d4e,_0x30d28);}},_0x22284c=await _0x21eb61[_0x5b87e1(0x122)](resolveProfileTarget,_0x19cb05);if(_0x22284c['kind']===_0x5b87e1(0x138)){if(_0x22284c['alsoExistsElsewhere'])printDualExistsHint(_0x19cb05);const _0x3241f8=unsetProfileOverride(_0x21eb61['xFpwd'](getProjectPath),_0x19cb05,_0x4a330e);_0x3241f8?console[_0x5b87e1(0x120)](_0x5b87e1(0x14e)+_0x4a330e+'\x20for\x20\x22'+_0x19cb05+'\x22'):console['log'](_0x5b87e1(0x136)+_0x4a330e+_0x5b87e1(0x11f));return;}const _0x442825=unsetProfileOverride(_0x21eb61[_0x5b87e1(0x14b)](getProjectPath),_0x19cb05,_0x4a330e);if(_0x442825){console['log'](_0x5b87e1(0x14e)+_0x4a330e);return;}const _0x1740d7=await _0x21eb61[_0x5b87e1(0x11a)](loadSettings,_0x19cb05),_0x224388=_0x21eb61['VIYiw'](deleteNestedValue,_0x1740d7,_0x4a330e);_0x224388?console[_0x5b87e1(0x120)]('Key\x20\x22'+_0x4a330e+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x19cb05+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x5b87e1(0x120)]('Key\x20\x22'+_0x4a330e+_0x5b87e1(0x11f));}export async function configReset(_0x1d7c2c){const _0x2bf5be=_0x5fcee1,_0x320a1b=await resolveProfileTarget(_0x1d7c2c);if(_0x320a1b['kind']===_0x2bf5be(0x138)){resetProfileOverrides(getProjectPath(),_0x1d7c2c),console[_0x2bf5be(0x120)](_0x2bf5be(0x14a)+_0x1d7c2c+'\x22');return;}console[_0x2bf5be(0x120)]('\x22'+_0x1d7c2c+_0x2bf5be(0x133)+_0x1d7c2c+_0x2bf5be(0x12c));}function _0x2dc3(){const _0x40c6b8=['undefined','true','\x22\x20not\x20found','log','local','ggEEg','niAUn','565660EbwXaY','GsfuA','tIPnQ','\x20for\x20\x22','GypmG','stringify','isSafeInteger','685767yMlfpE','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','XGnJs','includes','KvFuf','aCjtz','4NYpWRu','allowInsecureLocalhost','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','234IwoUCA','rwWcR','Key\x20\x22','kind','cloud','forceLogin','HHMTi','\x20=\x20','startsWith','407598XlnpWQ','alsoExistsElsewhere','endsWith','test','119jTbulX','757145wlDLrD','headless',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20\x20Note:\x20\x22','PxFDK','3375510lSNNWE','2884608UeeNvo','object','Cleared\x20local\x20overrides\x20for\x20\x22','rwYZI','817984HZBDkj','No\x20configuration\x20set\x20for\x20\x22','Removed\x20','dxebs','parse','Set\x20','WIQJd','VMxnM','zNmaO','OcdYF','isNaN','length'];_0x2dc3=function(){return _0x40c6b8;};return _0x2dc3();}
1
+ (function(_0x180df3,_0xc6f491){const _0x1383a5=_0x4f09,_0x365ee9=_0x180df3();while(!![]){try{const _0x11f917=parseInt(_0x1383a5(0xd8))/0x1*(-parseInt(_0x1383a5(0xd3))/0x2)+-parseInt(_0x1383a5(0xc8))/0x3*(parseInt(_0x1383a5(0xe4))/0x4)+-parseInt(_0x1383a5(0xc0))/0x5+-parseInt(_0x1383a5(0xc3))/0x6*(parseInt(_0x1383a5(0xd4))/0x7)+-parseInt(_0x1383a5(0xbb))/0x8+-parseInt(_0x1383a5(0xc1))/0x9*(parseInt(_0x1383a5(0xdc))/0xa)+parseInt(_0x1383a5(0xb5))/0xb;if(_0x11f917===_0xc6f491)break;else _0x365ee9['push'](_0x365ee9['shift']());}catch(_0x217dc8){_0x365ee9['push'](_0x365ee9['shift']());}}}(_0x4d0a,0xcf28d));import{existsSync}from'fs';function _0x4d0a(){const _0x5cffd5=['55624965lJrCtH','aNbuW','Invalid\x20value\x20for\x20','includes',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','parse','5196808xCbQab','mqDge','kind','QSjSB','thCqK','4594930AGeFZr','99etBTiv','log','96oqJkei','cloud','stringify','olEPw','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','42654tzIMRU','DDPls','NFNrZ','Cleared\x20local\x20overrides\x20for\x20\x22','rHAwb','(not\x20set)','true','false','keys','object','FYoXq','6WGowlV','21994YQwXAg','isSafeInteger','ojwIP','null','364794yzBXYm','Key\x20\x22','JBokV','Qajzo','1346210SPJXMc','isNaN','Ukmhw','Set\x20','settings','\x22\x20not\x20found','No\x20configuration\x20set\x20for\x20\x22','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','4LWNzWm','dwKDr','alsoExistsElsewhere','endsWith','\x20\x20Note:\x20\x22'];_0x4d0a=function(){return _0x5cffd5;};return _0x4d0a();}import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost','forceLogin'];function parseLocalValue(_0x26668c,_0x1c5686){const _0x49e3a8=_0x4f09;if(BOOLEAN_KEYS[_0x49e3a8(0xb8)](_0x26668c)){if(_0x1c5686==='true')return!![];if(_0x1c5686===_0x49e3a8(0xcf))return![];throw new Error(_0x49e3a8(0xb7)+_0x26668c+_0x49e3a8(0xb9));}return _0x1c5686;}function parseOverrideValue(_0x4efff5){const _0x57b26d=_0x4f09,_0x4fce3d={'aNbuW':function(_0x5ba377,_0x5f093b){return _0x5ba377===_0x5f093b;},'YtefA':_0x57b26d(0xce),'uEwQt':'false','thCqK':_0x57b26d(0xd7)};if(_0x4fce3d[_0x57b26d(0xb6)](_0x4efff5,_0x4fce3d['YtefA']))return!![];if(_0x4efff5===_0x4fce3d['uEwQt'])return![];if(_0x4efff5===_0x4fce3d[_0x57b26d(0xbf)])return null;if(_0x4fce3d[_0x57b26d(0xb6)](_0x4efff5,'undefined'))return undefined;if(/^-?\d+$/['test'](_0x4efff5)){const _0x4a9db0=Number(_0x4efff5);if(Number[_0x57b26d(0xd5)](_0x4a9db0))return _0x4a9db0;}if(/^-?\d+\.\d+$/['test'](_0x4efff5)){const _0x45b296=Number(_0x4efff5);if(!Number[_0x57b26d(0xdd)](_0x45b296))return _0x45b296;}const _0x5220a2=_0x4efff5['trim']();if(_0x5220a2['startsWith']('{')&&_0x5220a2[_0x57b26d(0xb3)]('}')||_0x5220a2['startsWith']('[')&&_0x5220a2['endsWith'](']'))try{return JSON[_0x57b26d(0xba)](_0x5220a2);}catch{}return _0x4efff5;}async function resolveProfileTarget(_0xc4fddd){const _0x25dcdf=_0x4f09,_0x17ac4a={'QSjSB':function(_0x35e4b2,_0xe38ee9){return _0x35e4b2(_0xe38ee9);},'SruJH':function(_0x23228b,_0x197221){return _0x23228b(_0x197221);},'Qajzo':'cloud','JBokV':'local'},_0x3cdbab=existsSync(getEnvDir(_0xc4fddd));let _0x1c49cf=![];try{const _0x26e312=await _0x17ac4a[_0x25dcdf(0xbe)](fetchCloudProfile,_0xc4fddd);_0x1c49cf=_0x17ac4a['SruJH'](Boolean,_0x26e312);}catch{}if(_0x1c49cf)return{'kind':_0x17ac4a[_0x25dcdf(0xdb)],'alsoExistsElsewhere':_0x3cdbab};if(_0x3cdbab)return{'kind':_0x17ac4a[_0x25dcdf(0xda)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0xc4fddd+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0xc4fddd);}function printDualExistsHint(_0x1ad18c){const _0x27cee2=_0x4f09;console[_0x27cee2(0xc2)](_0x27cee2(0xb4)+_0x1ad18c+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x115179){const _0x42d9b5=_0x4f09,_0xd0f6be={'edXEj':function(_0x517f1a,_0x5e2f2e){return _0x517f1a(_0x5e2f2e);},'TRBqU':function(_0xe42dcf,_0x203c3f,_0x43e848){return _0xe42dcf(_0x203c3f,_0x43e848);},'rHAwb':function(_0x1f2cee){return _0x1f2cee();},'Ukmhw':function(_0x57be0e,_0x2914c3){return _0x57be0e??_0x2914c3;}},_0x5b4b3e=await _0xd0f6be['edXEj'](fetchCloudProfile,_0x115179),_0x45ecc6=_0xd0f6be['TRBqU'](readProfileOverrides,_0xd0f6be[_0x42d9b5(0xcc)](getProjectPath),_0x115179);return mergeCloudProfileSettings(_0x5b4b3e?.[_0x42d9b5(0xe0)]??{},_0xd0f6be[_0x42d9b5(0xde)](_0x45ecc6,undefined));}function _0x4f09(_0x39c7f0,_0x1fec0c){_0x39c7f0=_0x39c7f0-0xb1;const _0x4d0a8d=_0x4d0a();let _0x4f0932=_0x4d0a8d[_0x39c7f0];return _0x4f0932;}export async function configSet(_0x5b9459,_0x1a576a,_0x48f40d){const _0x23800f=_0x4f09,_0x4a42b5={'dSNRl':function(_0x5cb61b,_0x3244d1){return _0x5cb61b(_0x3244d1);},'dwKDr':function(_0x385803,_0x4ff19a){return _0x385803(_0x4ff19a);},'euNpB':function(_0x2921b6,_0x590771,_0x5bdf33,_0x326359,_0x31157c){return _0x2921b6(_0x590771,_0x5bdf33,_0x326359,_0x31157c);},'NFNrZ':function(_0xe8c4d5){return _0xe8c4d5();}},_0x3d09cd=await resolveProfileTarget(_0x5b9459);if(_0x3d09cd[_0x23800f(0xbd)]===_0x23800f(0xc4)){if(_0x3d09cd[_0x23800f(0xb2)])_0x4a42b5['dSNRl'](printDualExistsHint,_0x5b9459);const _0x4ed985=_0x4a42b5[_0x23800f(0xb1)](parseOverrideValue,_0x48f40d);_0x4a42b5['euNpB'](setProfileOverride,_0x4a42b5['NFNrZ'](getProjectPath),_0x5b9459,_0x1a576a,_0x4ed985),console[_0x23800f(0xc2)](_0x23800f(0xdf)+_0x1a576a+'\x20=\x20'+JSON['stringify'](_0x4ed985)+'\x20for\x20\x22'+_0x5b9459+'\x22');return;}const _0x208055=parseLocalValue(_0x1a576a,_0x48f40d);setProfileOverride(_0x4a42b5[_0x23800f(0xca)](getProjectPath),_0x5b9459,_0x1a576a,_0x208055),console['log']('Set\x20'+_0x1a576a+'\x20=\x20'+_0x208055+'\x20for\x20\x22'+_0x5b9459+'\x22');}export async function configGet(_0x8656aa,_0x36ee2b){const _0x3c2207=_0x4f09,_0x3ceb02={'xZsRZ':function(_0x4ef756,_0x536cc7){return _0x4ef756===_0x536cc7;},'FYoXq':_0x3c2207(0xc4),'uTLos':function(_0x5d9d59,_0x5155a9,_0x27120b){return _0x5d9d59(_0x5155a9,_0x27120b);},'iFkYQ':function(_0x59d0a6,_0x5c9964){return _0x59d0a6===_0x5c9964;},'gsdSv':_0x3c2207(0xd1),'SPPiL':function(_0x3e3aa8,_0x36809e){return _0x3e3aa8===_0x36809e;},'olEPw':function(_0x37dec1,_0x5ef4ff){return _0x37dec1===_0x5ef4ff;}},_0x1d4a0c=await resolveProfileTarget(_0x8656aa);if(_0x3ceb02['xZsRZ'](_0x1d4a0c['kind'],_0x3ceb02[_0x3c2207(0xd2)])){const _0xd40240=await loadEffectiveCloudSettings(_0x8656aa),_0x251518=_0x3ceb02['uTLos'](getNestedValue,_0xd40240,_0x36ee2b);if(_0x251518===undefined)console[_0x3c2207(0xc2)](_0x3c2207(0xcd));else _0x3ceb02['iFkYQ'](typeof _0x251518,_0x3ceb02['gsdSv'])?console['log'](JSON['stringify'](_0x251518,null,0x2)):console[_0x3c2207(0xc2)](_0x251518);return;}const _0x55d684=await loadSettings(_0x8656aa),_0x5191a5=getNestedValue(_0x55d684,_0x36ee2b);if(_0x3ceb02['SPPiL'](_0x5191a5,undefined))console['log']('(not\x20set)');else _0x3ceb02[_0x3c2207(0xc6)](typeof _0x5191a5,'object')?console['log'](JSON[_0x3c2207(0xc5)](_0x5191a5,null,0x2)):console[_0x3c2207(0xc2)](_0x5191a5);}export async function configList(_0x4b9db7){const _0x2da2b9=_0x4f09,_0xa3ae5a={'ojwIP':function(_0x383996,_0x30702c){return _0x383996===_0x30702c;},'zckea':function(_0x1635fc,_0x23ad3c){return _0x1635fc(_0x23ad3c);}},_0x50c5c3=await resolveProfileTarget(_0x4b9db7);if(_0xa3ae5a[_0x2da2b9(0xd6)](_0x50c5c3['kind'],'cloud')){const _0x1b0359=await loadEffectiveCloudSettings(_0x4b9db7);if(!_0x1b0359||Object[_0x2da2b9(0xd0)](_0x1b0359)['length']===0x0){console[_0x2da2b9(0xc2)](_0x2da2b9(0xe2)+_0x4b9db7+'\x22');return;}console['log'](JSON[_0x2da2b9(0xc5)](_0x1b0359,null,0x2));return;}const _0x2ce5ea=getSettingsPath(_0x4b9db7);if(!existsSync(_0x2ce5ea)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x4b9db7+'\x22');return;}const _0x327615=await loadSettings(_0x4b9db7),_0x15e438=_0xa3ae5a['zckea'](formatSettings,_0x327615);!_0x15e438?console[_0x2da2b9(0xc2)]('No\x20configuration\x20set\x20for\x20\x22'+_0x4b9db7+'\x22'):console['log'](_0x15e438);}export async function configUnset(_0x1592a2,_0x597b96){const _0x3e7ea6=_0x4f09,_0x5f337f={'ZLbXN':_0x3e7ea6(0xc4),'DDPls':function(_0x40be25,_0x2447e4){return _0x40be25(_0x2447e4);},'mqDge':function(_0x551187,_0x55a60f,_0x3bea40,_0x31d89d){return _0x551187(_0x55a60f,_0x3bea40,_0x31d89d);}},_0x2ceaf3=await resolveProfileTarget(_0x1592a2);if(_0x2ceaf3[_0x3e7ea6(0xbd)]===_0x5f337f['ZLbXN']){if(_0x2ceaf3[_0x3e7ea6(0xb2)])_0x5f337f[_0x3e7ea6(0xc9)](printDualExistsHint,_0x1592a2);const _0x474c89=_0x5f337f[_0x3e7ea6(0xbc)](unsetProfileOverride,getProjectPath(),_0x1592a2,_0x597b96);_0x474c89?console['log']('Removed\x20'+_0x597b96+'\x20for\x20\x22'+_0x1592a2+'\x22'):console['log'](_0x3e7ea6(0xd9)+_0x597b96+'\x22\x20not\x20found');return;}const _0x582d09=unsetProfileOverride(getProjectPath(),_0x1592a2,_0x597b96);if(_0x582d09){console['log']('Removed\x20'+_0x597b96);return;}const _0x170661=await loadSettings(_0x1592a2),_0x46b256=deleteNestedValue(_0x170661,_0x597b96);_0x46b256?console['log']('Key\x20\x22'+_0x597b96+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x1592a2+_0x3e7ea6(0xc7)):console[_0x3e7ea6(0xc2)](_0x3e7ea6(0xd9)+_0x597b96+_0x3e7ea6(0xe1));}export async function configReset(_0x33238f){const _0x57fe4c=_0x4f09,_0x1997d8={'zfpDL':function(_0x1ef1de,_0x5f02bf,_0x38cdf0){return _0x1ef1de(_0x5f02bf,_0x38cdf0);},'IYngB':function(_0xa9d00f){return _0xa9d00f();}},_0x23837b=await resolveProfileTarget(_0x33238f);if(_0x23837b['kind']===_0x57fe4c(0xc4)){_0x1997d8['zfpDL'](resetProfileOverrides,_0x1997d8['IYngB'](getProjectPath),_0x33238f),console[_0x57fe4c(0xc2)](_0x57fe4c(0xcb)+_0x33238f+'\x22');return;}console['log']('\x22'+_0x33238f+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x33238f+_0x57fe4c(0xe3));}
@@ -1 +1 @@
1
- (function(_0x1dcf8a,_0x3b5a56){const _0x3c6827=_0x4525,_0x56e907=_0x1dcf8a();while(!![]){try{const _0x3c8cf0=-parseInt(_0x3c6827(0x1ac))/0x1+parseInt(_0x3c6827(0x19d))/0x2*(parseInt(_0x3c6827(0x19c))/0x3)+parseInt(_0x3c6827(0x1ab))/0x4+-parseInt(_0x3c6827(0x19a))/0x5+-parseInt(_0x3c6827(0x1a8))/0x6*(-parseInt(_0x3c6827(0x1a6))/0x7)+-parseInt(_0x3c6827(0x19f))/0x8*(-parseInt(_0x3c6827(0x1a9))/0x9)+parseInt(_0x3c6827(0x1a1))/0xa;if(_0x3c8cf0===_0x3b5a56)break;else _0x56e907['push'](_0x56e907['shift']());}catch(_0x2b0cc3){_0x56e907['push'](_0x56e907['shift']());}}}(_0x5f03,0x56309));function _0x5f03(){const _0x9f849c=['rzFMx','2720485yHWLvM','\x22\x20to\x20confirm\x20deletion:','36swSVXK','188URghEz','MUQtY','8IzoLRl','input','8465380qNzZXM','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','confirmation','Type\x20\x22','✓\x20Deleted\x20cloud\x20profile\x20\x22','1696499bJcQVX','cwd','6ZOKVEz','1654281aEovwX','log','241516GOOEbO','437081AGjvKv','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.'];_0x5f03=function(){return _0x9f849c;};return _0x5f03();}import _0x8fa8c7 from'inquirer';function _0x4525(_0x45c996,_0x222f2b){_0x45c996=_0x45c996-0x199;const _0x5f03d7=_0x5f03();let _0x4525ad=_0x5f03d7[_0x45c996];return _0x4525ad;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x509747,_0x1919aa={}){const _0x2819f6=_0x4525,_0x4b3e3a={'cFyZV':function(_0x52c6d2,_0xb60fd1){return _0x52c6d2(_0xb60fd1);},'MUQtY':_0x2819f6(0x1ad),'EvSmh':_0x2819f6(0x1a0),'PETJs':_0x2819f6(0x1a3),'qcoVw':function(_0x301749,_0x2e11e6){return _0x301749!==_0x2e11e6;},'DlkXL':function(_0xbaad53,_0x1729b3){return _0xbaad53(_0x1729b3);},'rzFMx':function(_0x3a5b63,_0x2523b4,_0x17b133){return _0x3a5b63(_0x2523b4,_0x17b133);}},_0x2fd623=await _0x4b3e3a['cFyZV'](fetchCloudProfile,_0x509747);if(!_0x2fd623)throw new Error('Cloud\x20profile\x20\x22'+_0x509747+'\x22\x20not\x20found.');if(!_0x1919aa['yes']&&!isInteractive())throw new Error(_0x4b3e3a[_0x2819f6(0x19e)]);console[_0x2819f6(0x1aa)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x509747+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x1919aa['yes']){const {confirmation:_0x158799}=await _0x8fa8c7['prompt']([{'type':_0x4b3e3a['EvSmh'],'name':_0x4b3e3a['PETJs'],'message':_0x2819f6(0x1a4)+_0x509747+_0x2819f6(0x19b)}]);if(_0x4b3e3a['qcoVw'](_0x158799,_0x509747))throw new Error(_0x2819f6(0x1a2));}await _0x4b3e3a['DlkXL'](deleteCloudProfile,_0x509747),_0x4b3e3a[_0x2819f6(0x199)](resetProfileOverrides,process[_0x2819f6(0x1a7)](),_0x509747),clearLastProfile(process['cwd'](),_0x509747),console[_0x2819f6(0x1aa)](_0x2819f6(0x1a5)+_0x509747+'\x22.');}
1
+ function _0x2ad3(){const _0x480c58=['1197240xGdYLo','76VQHBEs','log','yes','prompt','583065RNAPVS','Type\x20\x22','4kvardQ','\x22\x20not\x20found.','5kyweCF','gvlqj','70ljRgRJ','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','228591iwoxXR','Cloud\x20profile\x20\x22','21701dDBrzj','626936kHAmnc','18eaUaKT','✓\x20Deleted\x20cloud\x20profile\x20\x22','446802gxoFbN','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','CfJix','29259lEjlig'];_0x2ad3=function(){return _0x480c58;};return _0x2ad3();}(function(_0x14e385,_0x50048a){const _0xdf5997=_0x90f9,_0x1ef786=_0x14e385();while(!![]){try{const _0x521b52=parseInt(_0xdf5997(0x15e))/0x1*(parseInt(_0xdf5997(0x16d))/0x2)+-parseInt(_0xdf5997(0x165))/0x3*(parseInt(_0xdf5997(0x167))/0x4)+-parseInt(_0xdf5997(0x158))/0x5*(parseInt(_0xdf5997(0x162))/0x6)+-parseInt(_0xdf5997(0x16b))/0x7+-parseInt(_0xdf5997(0x15f))/0x8*(-parseInt(_0xdf5997(0x160))/0x9)+-parseInt(_0xdf5997(0x15a))/0xa*(-parseInt(_0xdf5997(0x15c))/0xb)+parseInt(_0xdf5997(0x166))/0xc;if(_0x521b52===_0x50048a)break;else _0x1ef786['push'](_0x1ef786['shift']());}catch(_0x192780){_0x1ef786['push'](_0x1ef786['shift']());}}}(_0x2ad3,0x18fa0));import _0x505ccc from'inquirer';function _0x90f9(_0x204272,_0x35ee1a){_0x204272=_0x204272-0x158;const _0x2ad399=_0x2ad3();let _0x90f907=_0x2ad399[_0x204272];return _0x90f907;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x15a74f,_0x1ae124={}){const _0x110a96=_0x90f9,_0x1ab8c7={'fZjce':function(_0x2ff006,_0x3f7fc5){return _0x2ff006(_0x3f7fc5);},'kSyyj':function(_0x9f66d1){return _0x9f66d1();},'gvlqj':'Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','lWxMX':'confirmation','CfJix':function(_0x1014af,_0x407047,_0xda0afd){return _0x1014af(_0x407047,_0xda0afd);}},_0x4285fc=await _0x1ab8c7['fZjce'](fetchCloudProfile,_0x15a74f);if(!_0x4285fc)throw new Error(_0x110a96(0x15d)+_0x15a74f+_0x110a96(0x16e));if(!_0x1ae124['yes']&&!_0x1ab8c7['kSyyj'](isInteractive))throw new Error(_0x1ab8c7[_0x110a96(0x159)]);console[_0x110a96(0x168)](_0x110a96(0x15b)+_0x15a74f+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x1ae124[_0x110a96(0x169)]){const {confirmation:_0x46d24c}=await _0x505ccc[_0x110a96(0x16a)]([{'type':'input','name':_0x1ab8c7['lWxMX'],'message':_0x110a96(0x16c)+_0x15a74f+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x46d24c!==_0x15a74f)throw new Error(_0x110a96(0x163));}await deleteCloudProfile(_0x15a74f),resetProfileOverrides(process['cwd'](),_0x15a74f),_0x1ab8c7[_0x110a96(0x164)](clearLastProfile,process['cwd'](),_0x15a74f),console[_0x110a96(0x168)](_0x110a96(0x161)+_0x15a74f+'\x22.');}
@@ -1 +1 @@
1
- const _0x572e6a=_0x1d01;(function(_0x176097,_0x862f2a){const _0x4f43c7=_0x1d01,_0x5e2e30=_0x176097();while(!![]){try{const _0x6f530e=-parseInt(_0x4f43c7(0x20e))/0x1+parseInt(_0x4f43c7(0x1fb))/0x2*(-parseInt(_0x4f43c7(0x1f6))/0x3)+-parseInt(_0x4f43c7(0x205))/0x4*(parseInt(_0x4f43c7(0x21f))/0x5)+-parseInt(_0x4f43c7(0x211))/0x6+-parseInt(_0x4f43c7(0x1f7))/0x7*(parseInt(_0x4f43c7(0x1f1))/0x8)+parseInt(_0x4f43c7(0x21e))/0x9+parseInt(_0x4f43c7(0x220))/0xa;if(_0x6f530e===_0x862f2a)break;else _0x5e2e30['push'](_0x5e2e30['shift']());}catch(_0x2131b5){_0x5e2e30['push'](_0x5e2e30['shift']());}}}(_0xc0ab,0x68089));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0xc0ab(){const _0x48211d=['244806uEmvCj','70343zbDDEu','includes','legacy','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','14tjtFgD','jCUDV','message','wLyUP','sessionUpdatedAt','local','.txt','isDirectory','endsWith','okszY','4gQeMhh','\x0aCloud\x20Profiles\x20(by\x20environment):','AgrFF','reports','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','\x20\x20\x20\x20\x20\x20Details:\x20','ydTJO','push','\x20\x20\x20\x20\x20\x20URL:\x20','707466IIgsbx','SXVdl','BOfWA','1945404yKKhIR','posmk','log','localeCompare','name','VmDuR','\x0a\x20\x20','jkGIV','\x0aCloud\x20Profiles:','\x0a*\x20=\x20active\x20profile','yukeH','\x0aLocal\x20Profiles\x20(legacy):','dvlmv','5384403BqerwK','2674255PUExbF','23173340klXDsT','get','cached\x20(updated\x20','some','Maduo','environmentKey','length','bnLgC','\x20\x20\x20\x20','280gmHxEA','ecHzK','sort','WGOKa','baseUrl'];_0xc0ab=function(){return _0x48211d;};return _0xc0ab();}import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x572e6a(0x208),'local','ci'];function _0x1d01(_0x1ea063,_0x47b499){_0x1ea063=_0x1ea063-0x1f1;const _0xc0ab4c=_0xc0ab();let _0x1d011a=_0xc0ab4c[_0x1ea063];return _0x1d011a;}export function shouldGroupByEnvironment(_0x1424f4){const _0x1f6362=_0x572e6a;return _0x1424f4[_0x1f6362(0x223)](_0xd111cc=>_0xd111cc[_0x1f6362(0x225)]);}export function groupCloudProfilesByEnvironment(_0x3ff274){const _0x1f84eb=_0x572e6a,_0x3b473b={'yukeH':function(_0x5068ac,_0x151d7f){return _0x5068ac===_0x151d7f;}},_0x2e7772=new Map();for(const _0x2b52ac of _0x3ff274){const _0x3789dc=_0x2b52ac[_0x1f84eb(0x225)]??null,_0x5ae02d=_0x2e7772[_0x1f84eb(0x221)](_0x3789dc);if(_0x5ae02d)_0x5ae02d[_0x1f84eb(0x20c)](_0x2b52ac);else _0x2e7772['set'](_0x3789dc,[_0x2b52ac]);}const _0x324e1a=[..._0x2e7772['keys']()]['sort']((_0x24cb11,_0x50924a)=>{const _0x2f4218=_0x1f84eb;if(_0x3b473b['yukeH'](_0x24cb11,null))return 0x1;if(_0x3b473b[_0x2f4218(0x21b)](_0x50924a,null))return-0x1;return _0x24cb11[_0x2f4218(0x214)](_0x50924a);});return _0x324e1a['map'](_0x53b2d9=>({'environmentKey':_0x53b2d9,'profiles':_0x2e7772['get'](_0x53b2d9)['sort']((_0x241724,_0x10d303)=>_0x241724[_0x1f84eb(0x215)][_0x1f84eb(0x214)](_0x10d303['name']))}));}export async function getEnvNames(){const _0x599bca=_0x572e6a,_0x403529={'okszY':function(_0x23ae06){return _0x23ae06();},'jCUDV':function(_0x5291fd,_0x2872c0){return _0x5291fd(_0x2872c0);},'wLyUP':function(_0x21aa2c){return _0x21aa2c();},'dvlmv':function(_0x528205,_0x2eb545,_0x38a6f3){return _0x528205(_0x2eb545,_0x38a6f3);},'AgrFF':_0x599bca(0x200),'ecHzK':function(_0x4a0dbb,_0x2dcde9,_0x592a13){return _0x4a0dbb(_0x2dcde9,_0x592a13);},'hCoEv':_0x599bca(0x201),'ydTJO':function(_0x1c219f,_0x439d4e){return _0x1c219f(_0x439d4e);},'BOfWA':function(_0x3b9241,_0x11ffa3){return _0x3b9241(_0x11ffa3);},'VvsYB':'legacy'},_0x383d9d=_0x403529[_0x599bca(0x204)](getRangerDir);if(!_0x403529[_0x599bca(0x1fc)](existsSync,_0x383d9d))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x592021=await _0x403529[_0x599bca(0x1fe)](readActiveProfileName),_0x5646f5=[],_0x2fff86={},_0x4d8f1f=_0x403529[_0x599bca(0x21d)](join,_0x383d9d,_0x403529[_0x599bca(0x207)]);if(_0x403529['jCUDV'](existsSync,_0x4d8f1f)){const _0x2458da=await readdir(_0x4d8f1f);for(const _0x4ca5c3 of _0x2458da){const _0x420082=_0x403529[_0x599bca(0x1f2)](join,_0x4d8f1f,_0x4ca5c3),_0x501184=await _0x403529['jCUDV'](stat,_0x420082);_0x501184[_0x599bca(0x202)]()&&(_0x5646f5[_0x599bca(0x20c)](_0x4ca5c3),_0x2fff86[_0x4ca5c3]=_0x403529['AgrFF']);}}const _0x4c6686=_0x403529['dvlmv'](join,_0x383d9d,'ci');if(_0x403529[_0x599bca(0x1fc)](existsSync,_0x4c6686)){const _0x23dd8e=await readdir(_0x4c6686);for(const _0x38f111 of _0x23dd8e){const _0xfe8de2=join(_0x4c6686,_0x38f111),_0xcaaea7=await stat(_0xfe8de2);_0xcaaea7[_0x599bca(0x202)]()&&(_0x5646f5[_0x599bca(0x20c)](_0x38f111),_0x2fff86[_0x38f111]='ci');}}const _0x4ebb3f=await readdir(_0x383d9d);for(const _0x4936bc of _0x4ebb3f){if(NON_ENV_DIRS['includes'](_0x4936bc))continue;if(_0x4936bc['startsWith']('.'))continue;if(_0x4936bc[_0x599bca(0x203)](_0x403529['hCoEv']))continue;const _0x46410b=join(_0x383d9d,_0x4936bc),_0x3d65cb=await _0x403529[_0x599bca(0x20b)](stat,_0x46410b);_0x3d65cb[_0x599bca(0x202)]()&&_0x403529[_0x599bca(0x210)](existsSync,join(_0x46410b,'settings.json'))&&(!_0x5646f5[_0x599bca(0x1f8)](_0x4936bc)&&(_0x5646f5[_0x599bca(0x20c)](_0x4936bc),_0x2fff86[_0x4936bc]=_0x403529['VvsYB']));}return{'envNames':_0x5646f5,'activeEnv':_0x592021,'envTypes':_0x2fff86};}export async function envList(){const _0x2ce25d=_0x572e6a,_0x390c29={'SXVdl':function(_0x3902fc,_0x4851cf){return _0x3902fc===_0x4851cf;},'VclcH':'no\x20session','auzUz':function(_0x3b2179){return _0x3b2179();},'DxMJz':function(_0x2f75e2,_0x2db2ae){return _0x2f75e2 instanceof _0x2db2ae;},'VmDuR':function(_0x9f639,_0x49a972){return _0x9f639===_0x49a972;},'YbVpf':'\x0aNo\x20profiles\x20found.','TxbPx':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','WGOKa':_0x2ce25d(0x21c),'jKmhT':function(_0x81abf3,_0x170e20){return _0x81abf3(_0x170e20);},'jkGIV':_0x2ce25d(0x1f9),'Maduo':_0x2ce25d(0x206),'bnLgC':_0x2ce25d(0x1fa),'NYomo':function(_0xf903e9,_0x577706,_0x4fff5b){return _0xf903e9(_0x577706,_0x4fff5b);},'posmk':_0x2ce25d(0x228)},{envNames:_0x3e593c,activeEnv:_0x12e882,envTypes:_0x194ee0}=await getEnvNames();let _0x60c531=[];const _0x3fbaef=await getToken();if(_0x3fbaef)try{_0x60c531=await _0x390c29['auzUz'](listCloudProfiles);}catch(_0x302f76){console['error'](_0x2ce25d(0x209)+(_0x390c29['DxMJz'](_0x302f76,Error)?_0x302f76[_0x2ce25d(0x1fd)]:String(_0x302f76)));}if(_0x390c29[_0x2ce25d(0x20f)](_0x3e593c['length'],0x0)&&_0x390c29[_0x2ce25d(0x216)](_0x60c531[_0x2ce25d(0x226)],0x0)){console['log'](_0x390c29['YbVpf']),console['log'](_0x390c29['TxbPx']);return;}const _0xeef063=new Set(_0x60c531['map'](_0x88e2d2=>_0x88e2d2[_0x2ce25d(0x215)]));if(_0x3e593c[_0x2ce25d(0x226)]>0x0){console['log'](_0x390c29[_0x2ce25d(0x1f4)]);for(const _0x1a0ee4 of _0x3e593c[_0x2ce25d(0x1f3)]()){const _0xece607=_0x390c29['SXVdl'](_0x1a0ee4,_0x12e882)&&!_0xeef063['has'](_0x1a0ee4),_0x5db79d=_0x194ee0[_0x1a0ee4]||'local',_0x4fa939=await _0x390c29['jKmhT'](loadSettings,_0x1a0ee4),_0x305543=_0x5db79d===_0x390c29[_0x2ce25d(0x218)]?'':'\x20['+_0x5db79d+']';console[_0x2ce25d(0x213)]('\x20\x20'+(_0xece607?'*\x20':'\x20\x20')+_0x1a0ee4+_0x305543),_0x4fa939['baseUrl']&&console['log'](_0x2ce25d(0x20d)+_0x4fa939[_0x2ce25d(0x1f5)]),_0x4fa939['environmentDetails']&&console[_0x2ce25d(0x213)](_0x2ce25d(0x20a)+_0x4fa939['environmentDetails']);}}const _0x51a362=(_0x1b8b72,_0x4dad70)=>{const _0x463c6c=_0x2ce25d,_0x4f11e6=_0x390c29[_0x463c6c(0x20f)](_0x1b8b72['name'],_0x12e882),_0x376f0b=_0x1b8b72[_0x463c6c(0x1ff)]?_0x463c6c(0x222)+_0x1b8b72[_0x463c6c(0x1ff)]+')':_0x390c29['VclcH'];console[_0x463c6c(0x213)](''+_0x4dad70+(_0x4f11e6?'*\x20':'\x20\x20')+_0x1b8b72[_0x463c6c(0x215)]),console[_0x463c6c(0x213)](_0x4dad70+'\x20\x20\x20\x20Session:\x20'+_0x376f0b);};if(_0x60c531[_0x2ce25d(0x226)]>0x0){if(shouldGroupByEnvironment(_0x60c531)){console['log'](_0x390c29[_0x2ce25d(0x224)]);for(const _0x16d5fa of groupCloudProfilesByEnvironment(_0x60c531)){const _0x11e417=_0x16d5fa[_0x2ce25d(0x225)]??_0x390c29[_0x2ce25d(0x227)];console[_0x2ce25d(0x213)](_0x2ce25d(0x217)+_0x11e417);for(const _0x59b32d of _0x16d5fa['profiles']){_0x390c29['NYomo'](_0x51a362,_0x59b32d,_0x390c29[_0x2ce25d(0x212)]);}}}else{console['log'](_0x2ce25d(0x219));for(const _0x3fc78d of[..._0x60c531][_0x2ce25d(0x1f3)]((_0x13f56c,_0x568813)=>_0x13f56c[_0x2ce25d(0x215)][_0x2ce25d(0x214)](_0x568813['name']))){_0x51a362(_0x3fc78d,'\x20\x20');}}}_0x12e882&&console[_0x2ce25d(0x213)](_0x2ce25d(0x21a));}
1
+ const _0x23973e=_0x449b;(function(_0x2893aa,_0x4da8c3){const _0x186457=_0x449b,_0x490349=_0x2893aa();while(!![]){try{const _0x2a641d=-parseInt(_0x186457(0x217))/0x1+parseInt(_0x186457(0x1fc))/0x2*(-parseInt(_0x186457(0x214))/0x3)+parseInt(_0x186457(0x218))/0x4*(-parseInt(_0x186457(0x222))/0x5)+-parseInt(_0x186457(0x203))/0x6+parseInt(_0x186457(0x21f))/0x7*(-parseInt(_0x186457(0x220))/0x8)+parseInt(_0x186457(0x21d))/0x9*(-parseInt(_0x186457(0x20c))/0xa)+parseInt(_0x186457(0x226))/0xb*(parseInt(_0x186457(0x20b))/0xc);if(_0x2a641d===_0x4da8c3)break;else _0x490349['push'](_0x490349['shift']());}catch(_0x54f647){_0x490349['push'](_0x490349['shift']());}}}(_0x546f,0x2316b));import{readdir,stat}from'fs/promises';import{join}from'path';function _0x449b(_0x32074b,_0x441979){_0x32074b=_0x32074b-0x1ec;const _0x546f7b=_0x546f();let _0x449be2=_0x546f7b[_0x32074b];return _0x449be2;}import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';function _0x546f(){const _0x394d7c=['\x0a\x20\x20','.txt','nAWJi','\x0aCloud\x20Profiles:','set','130166vUbfET','map','sort','oNWvM','baseUrl','sessionUpdatedAt','startsWith','174642qFTpZc','environmentKey','Run:\x20ranger\x20profile\x20add\x20<profile-name>','settings.json','\x20\x20\x20\x20\x20\x20Details:\x20','bug-bashes','xmtNO','has','12cXkZPb','10KtFnKy','NSiuj','\x20\x20\x20\x20\x20\x20URL:\x20','CTwPY','TdzMU','keys','\x0aLocal\x20Profiles\x20(legacy):','error','9rsARaQ','localeCompare','Ggybq','54103ZiMzbd','4180rBzaiF','log','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','message','lJqIk','1774863ERLanh','knEcR','7dpEucp','307744ncqThG','local','60EPRDOI','push','\x0aCloud\x20Profiles\x20(by\x20environment):','profiles','7374367xrExeJ','includes','CYDoZ','startPath','settings','\x0aNo\x20profiles\x20found.','length','eaMPD','mVllL','UPQjY','name','reports','legacy','\x20\x20\x20\x20Session:\x20','authConfig'];_0x546f=function(){return _0x394d7c;};return _0x546f();}const NON_ENV_DIRS=['sessions',_0x23973e(0x208),_0x23973e(0x1f3),'local','ci'];export function shouldGroupByEnvironment(_0x38387d){const _0x218918=_0x23973e;return _0x38387d['some'](_0x50d13e=>_0x50d13e[_0x218918(0x204)]);}export function groupCloudProfilesByEnvironment(_0x2333e0){const _0x37d7fb=_0x23973e,_0x5e7871={'DyDyG':function(_0x535829,_0x579763){return _0x535829===_0x579763;}},_0xa9ca08=new Map();for(const _0x34dfb3 of _0x2333e0){const _0x5b814c=_0x34dfb3[_0x37d7fb(0x204)]??null,_0x5883e4=_0xa9ca08['get'](_0x5b814c);if(_0x5883e4)_0x5883e4[_0x37d7fb(0x223)](_0x34dfb3);else _0xa9ca08['set'](_0x5b814c,[_0x34dfb3]);}const _0x9b2869=[..._0xa9ca08[_0x37d7fb(0x211)]()]['sort']((_0x4daee2,_0x4561d8)=>{const _0x17b484=_0x37d7fb;if(_0x5e7871['DyDyG'](_0x4daee2,null))return 0x1;if(_0x4561d8===null)return-0x1;return _0x4daee2[_0x17b484(0x215)](_0x4561d8);});return _0x9b2869[_0x37d7fb(0x1fd)](_0x2a0497=>({'environmentKey':_0x2a0497,'profiles':_0xa9ca08['get'](_0x2a0497)['sort']((_0x354662,_0x5a6911)=>_0x354662['name']['localeCompare'](_0x5a6911[_0x37d7fb(0x1f2)]))}));}function expandString(_0xddcd6f){const _0x4cb7f6=_0x23973e,_0x18d488={'eaMPD':function(_0x42ee60,_0x209528){return _0x42ee60(_0x209528);}};if(!_0xddcd6f)return undefined;return _0x18d488[_0x4cb7f6(0x1ef)](resolveEnvVars,_0xddcd6f);}function expandProfileOverrides(_0xd93fd9){const _0x362450=_0x23973e;if(!_0xd93fd9)return null;return{..._0xd93fd9,'baseUrl':expandString(_0xd93fd9[_0x362450(0x200)]),'startPath':expandString(_0xd93fd9[_0x362450(0x229)])};}export function resolveCloudProfileListUrl(_0x35974e,_0x447559={}){const _0x541b58=_0x23973e,_0x2fca01={'icUsB':function(_0x37705c,_0x42ffb7,_0x3271eb){return _0x37705c(_0x42ffb7,_0x3271eb);},'ZjIqj':function(_0x43f7ca,_0x4d74e1){return _0x43f7ca(_0x4d74e1);},'gOFce':function(_0x29727b,_0xba1f1d){return _0x29727b(_0xba1f1d);},'sPtLQ':function(_0x1ef1d9,_0x12528f){return _0x1ef1d9(_0x12528f);}},_0x11885e=_0x35974e[_0x541b58(0x1ec)]??{},_0x4a6c26=_0x447559['authConfig']?_0x2fca01['icUsB'](resolveAuthEnvironmentLocally,_0x447559[_0x541b58(0x1f6)],_0x35974e['environmentKey']):null,_0x2b67d3=_0x2fca01['ZjIqj'](resolveProfileUrl,{'projectOverrides':_0x2fca01['gOFce'](expandProfileOverrides,_0x447559['projectOverrides']??null),'cloudSettings':{'baseUrl':_0x2fca01['gOFce'](expandString,_0x11885e[_0x541b58(0x200)]),'startPath':_0x2fca01['sPtLQ'](expandString,_0x11885e[_0x541b58(0x229)])},'authEnvironmentDomain':_0x4a6c26?.['domains']?.[0x0]});return{'baseUrl':_0x2b67d3['baseUrl'],'source':_0x2b67d3['baseUrlSource']};}async function loadCloudProfileListUrls(_0x4bec2b){const _0x38363a=_0x23973e,_0x4405cb={'HulgO':function(_0x136731,_0x3d7588,_0x1b0028){return _0x136731(_0x3d7588,_0x1b0028);},'TdzMU':function(_0x5f1799,_0x32ea37){return _0x5f1799(_0x32ea37);},'fxUmz':function(_0x87a89b,_0xfee180){return _0x87a89b===_0xfee180;},'CTwPY':function(_0x360279){return _0x360279();}},_0x55214e=new Map();if(_0x4405cb['fxUmz'](_0x4bec2b['length'],0x0))return _0x55214e;const _0x528551=await _0x4405cb[_0x38363a(0x20f)](fetchAuthConfig);return await Promise['all'](_0x4bec2b[_0x38363a(0x1fd)](async _0x2a8f7c=>{const _0x314cb3=_0x38363a;try{const _0x3bd8a3=await fetchCloudProfile(_0x2a8f7c['name']);if(!_0x3bd8a3)return;_0x55214e[_0x314cb3(0x1fb)](_0x2a8f7c['name'],_0x4405cb['HulgO'](resolveCloudProfileListUrl,_0x3bd8a3,{'authConfig':_0x528551,'projectOverrides':readProfileOverrides(process['cwd'](),_0x2a8f7c[_0x314cb3(0x1f2)])}));}catch(_0x2c0ca9){console[_0x314cb3(0x213)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22'+_0x2a8f7c['name']+'\x22:\x20'+(_0x2c0ca9 instanceof Error?_0x2c0ca9[_0x314cb3(0x21b)]:_0x4405cb[_0x314cb3(0x210)](String,_0x2c0ca9)));}})),_0x55214e;}export async function getEnvNames(){const _0x503768=_0x23973e,_0x2896e6={'KPqSl':function(_0x54601f,_0xd81e72,_0x1c2be8){return _0x54601f(_0xd81e72,_0x1c2be8);},'UPQjY':function(_0x51c0b3,_0x1db345){return _0x51c0b3(_0x1db345);},'nAWJi':function(_0x4b03ae,_0x182fa5,_0x587a42){return _0x4b03ae(_0x182fa5,_0x587a42);},'xmtNO':_0x503768(0x206),'Ggybq':_0x503768(0x1f4)},_0x47fd56=getRangerDir();if(!existsSync(_0x47fd56))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x59db3f=await readActiveProfileName(),_0x5ba9d6=[],_0x39306e={},_0x1b46cb=_0x2896e6['KPqSl'](join,_0x47fd56,'local');if(_0x2896e6[_0x503768(0x1f1)](existsSync,_0x1b46cb)){const _0xb88b7f=await readdir(_0x1b46cb);for(const _0x1b4a62 of _0xb88b7f){const _0x417b47=_0x2896e6['nAWJi'](join,_0x1b46cb,_0x1b4a62),_0x2fa15b=await stat(_0x417b47);_0x2fa15b['isDirectory']()&&(_0x5ba9d6[_0x503768(0x223)](_0x1b4a62),_0x39306e[_0x1b4a62]='local');}}const _0x38da4c=join(_0x47fd56,'ci');if(existsSync(_0x38da4c)){const _0x55ebef=await readdir(_0x38da4c);for(const _0x3f6952 of _0x55ebef){const _0x4b847b=_0x2896e6[_0x503768(0x1f9)](join,_0x38da4c,_0x3f6952),_0x3f677e=await _0x2896e6['UPQjY'](stat,_0x4b847b);_0x3f677e['isDirectory']()&&(_0x5ba9d6['push'](_0x3f6952),_0x39306e[_0x3f6952]='ci');}}const _0x4917ce=await _0x2896e6['UPQjY'](readdir,_0x47fd56);for(const _0x3c3d81 of _0x4917ce){if(NON_ENV_DIRS[_0x503768(0x227)](_0x3c3d81))continue;if(_0x3c3d81[_0x503768(0x202)]('.'))continue;if(_0x3c3d81['endsWith'](_0x503768(0x1f8)))continue;const _0x4b2fd5=_0x2896e6['KPqSl'](join,_0x47fd56,_0x3c3d81),_0x2a2870=await stat(_0x4b2fd5);_0x2a2870['isDirectory']()&&existsSync(join(_0x4b2fd5,_0x2896e6[_0x503768(0x209)]))&&(!_0x5ba9d6[_0x503768(0x227)](_0x3c3d81)&&(_0x5ba9d6['push'](_0x3c3d81),_0x39306e[_0x3c3d81]=_0x2896e6[_0x503768(0x216)]));}return{'envNames':_0x5ba9d6,'activeEnv':_0x59db3f,'envTypes':_0x39306e};}export async function envList(){const _0x24adab=_0x23973e,_0x2ce95e={'oNWvM':'no\x20session','CYDoZ':function(_0xb190a8,_0x3dd497){return _0xb190a8 instanceof _0x3dd497;},'uWoqp':function(_0x163ca1,_0x1140c6){return _0x163ca1(_0x1140c6);},'LHwXO':function(_0x1652a5,_0x37b6e9){return _0x1652a5===_0x37b6e9;},'kDaOx':_0x24adab(0x1ed),'ByaKf':_0x24adab(0x205),'YAdEo':function(_0x1f932b,_0x7ba0fc){return _0x1f932b>_0x7ba0fc;},'NSiuj':function(_0x36c18f,_0x3987c0){return _0x36c18f(_0x3987c0);},'mVllL':function(_0x6d415d,_0x28e3b3){return _0x6d415d(_0x28e3b3);},'knEcR':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','lJqIk':'\x20\x20\x20\x20','jTkbh':_0x24adab(0x1fa)},{envNames:_0x52196e,activeEnv:_0xb61531,envTypes:_0x4ecc5b}=await getEnvNames();let _0x420181=[],_0x5693d0=new Map();const _0xae3cba=await getToken();if(_0xae3cba)try{_0x420181=await listCloudProfiles(),_0x5693d0=await loadCloudProfileListUrls(_0x420181);}catch(_0x848810){console['error'](_0x24adab(0x21a)+(_0x2ce95e[_0x24adab(0x228)](_0x848810,Error)?_0x848810[_0x24adab(0x21b)]:_0x2ce95e['uWoqp'](String,_0x848810)));}if(_0x52196e['length']===0x0&&_0x2ce95e['LHwXO'](_0x420181[_0x24adab(0x1ee)],0x0)){console['log'](_0x2ce95e['kDaOx']),console['log'](_0x2ce95e['ByaKf']);return;}const _0x324d1b=new Set(_0x420181['map'](_0x1692b6=>_0x1692b6['name']));if(_0x2ce95e['YAdEo'](_0x52196e[_0x24adab(0x1ee)],0x0)){console[_0x24adab(0x219)](_0x24adab(0x212));for(const _0x58e134 of _0x52196e['sort']()){const _0x255481=_0x58e134===_0xb61531&&!_0x324d1b[_0x24adab(0x20a)](_0x58e134),_0x3c34ee=_0x4ecc5b[_0x58e134]||_0x24adab(0x221),_0x1caddc=await _0x2ce95e[_0x24adab(0x20d)](loadSettings,_0x58e134),_0x1c8a50=resolveProfileUrl({'localSettingsBaseUrl':expandString(_0x1caddc['baseUrl']),'projectOverrides':_0x2ce95e[_0x24adab(0x20d)](expandProfileOverrides,readProfileOverrides(process['cwd'](),_0x58e134))}),_0x28dfe6=_0x3c34ee===_0x24adab(0x1f4)?'':'\x20['+_0x3c34ee+']';console['log']('\x20\x20'+(_0x255481?'*\x20':'\x20\x20')+_0x58e134+_0x28dfe6),_0x1c8a50['baseUrl']&&console['log'](_0x24adab(0x20e)+_0x1c8a50['baseUrl']),_0x1caddc['environmentDetails']&&console['log'](_0x24adab(0x207)+_0x1caddc['environmentDetails']);}}const _0x1604f6=(_0x3e111a,_0x381caa)=>{const _0x178d3f=_0x24adab,_0x243bb8=_0x3e111a['name']===_0xb61531,_0x4f622e=_0x3e111a[_0x178d3f(0x201)]?'cached\x20(updated\x20'+_0x3e111a['sessionUpdatedAt']+')':_0x2ce95e[_0x178d3f(0x1ff)],_0x172983=_0x5693d0['get'](_0x3e111a['name']);console[_0x178d3f(0x219)](''+_0x381caa+(_0x243bb8?'*\x20':'\x20\x20')+_0x3e111a['name']),_0x172983?.['baseUrl']&&console[_0x178d3f(0x219)](_0x381caa+'\x20\x20\x20\x20URL:\x20'+_0x172983['baseUrl']),console['log'](_0x381caa+_0x178d3f(0x1f5)+_0x4f622e);};if(_0x420181[_0x24adab(0x1ee)]>0x0){if(_0x2ce95e[_0x24adab(0x1f0)](shouldGroupByEnvironment,_0x420181)){console['log'](_0x24adab(0x224));for(const _0xcbef06 of _0x2ce95e[_0x24adab(0x1f0)](groupCloudProfilesByEnvironment,_0x420181)){const _0x156c49=_0xcbef06['environmentKey']??_0x2ce95e[_0x24adab(0x21e)];console[_0x24adab(0x219)](_0x24adab(0x1f7)+_0x156c49);for(const _0x1c1695 of _0xcbef06[_0x24adab(0x225)]){_0x1604f6(_0x1c1695,_0x2ce95e[_0x24adab(0x21c)]);}}}else{console[_0x24adab(0x219)](_0x2ce95e['jTkbh']);for(const _0x3ddbcd of[..._0x420181][_0x24adab(0x1fe)]((_0x38e0a9,_0x5cdb16)=>_0x38e0a9[_0x24adab(0x1f2)][_0x24adab(0x215)](_0x5cdb16['name']))){_0x1604f6(_0x3ddbcd,'\x20\x20');}}}_0xb61531&&console['log']('\x0a*\x20=\x20active\x20profile');}