@ranger-testing/ranger-cli 3.1.6-alpha.aca5f9c-53 → 3.1.6

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 (86) 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/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0xe4ce29,_0x3d7cf3){const _0xa3da43=_0x2836,_0x475f0a=_0xe4ce29();while(!![]){try{const _0x144c88=parseInt(_0xa3da43(0x1c3))/0x1*(parseInt(_0xa3da43(0x212))/0x2)+parseInt(_0xa3da43(0x1e9))/0x3+parseInt(_0xa3da43(0x1fe))/0x4+parseInt(_0xa3da43(0x1d6))/0x5+parseInt(_0xa3da43(0x22a))/0x6*(-parseInt(_0xa3da43(0x21f))/0x7)+-parseInt(_0xa3da43(0x1bb))/0x8+-parseInt(_0xa3da43(0x235))/0x9;if(_0x144c88===_0x3d7cf3)break;else _0x475f0a['push'](_0x475f0a['shift']());}catch(_0x12359d){_0x475f0a['push'](_0x475f0a['shift']());}}}(_0x1a7b,0xf1c22));import{readdir,rm}from'fs/promises';function _0x2836(_0x35f9fc,_0x5a6160){_0x35f9fc=_0x35f9fc-0x1ac;const _0x1a7bc2=_0x1a7b();let _0x2836ea=_0x1a7bc2[_0x35f9fc];return _0x2836ea;}import{join}from'path';import{existsSync}from'fs';import _0x2b71a3 from'inquirer';function _0x1a7b(){const _0x4413df=['AFaIS','list','retry','TrHlR','log','DlRZh','yTxyZ','HEAD','name','6054388VVbbXu','xqbUp','profile.add.autoRouted','input','DeVfr','\x20\x20Did\x20you\x20mean\x20','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','prompt','trackPhaseEnd','\x0a✓\x20Profile\x20\x27','ERkpX','error','✓\x20Profile\x20\x27','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','lajQo','some','Found\x20auth\x20environment\x20\x27','isTTY','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','YIxyV','50822SArXNS','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','profile.add.autoRouteSkipped','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','url','TypeError','SSGEk','cdpEndpoint','startsWith','http://','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','pwfCf','42fBGeXF','ZmMvG','test','\x20--url\x20','QTdrF','JFivS','khMGp','\x0a\x20\x20Auth\x20environment\x20\x22','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','TzoMP','exit','911622GQikwB','ixoPh','VJYlH','RAnEi','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','yes','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','Use\x20','XRmUP','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x20Configured\x20envs:\x20','14320134njbmsn','XSNhz','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','baseUrl','\x27\x20to\x20the\x20cloud?','\x27\x20matching\x20','isElectron','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','message','\x22:\x20','boTnm','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','\x27\x20created\x20(no\x20session).\x0a','egKqa','no_auth_config','\x20--skip-auth\x0a','skipAuth','indexOf','\x27\x20created.\x0a','7055544MDwAJd','status','beREe','hUeCB','trim','BKmsG','xDRBN','zTsai','69WQZgGY','\x0a🌐\x20Profile\x20Setup\x0a','stdout','kEilj','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','DZarU','isProtocolError','✓\x20Cloud\x20profile\x20\x27','KWEAc','gDhkw','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','cwd','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','no_match','\x20\x20Set\x20active\x20profile:\x20','2917980urbejO','Continue\x20anyway','--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','keys','env_not_found','Ryljw','setupHeader','length','authEnv','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','environments','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x20\x20https://docs.ranger.net/main/concepts/profiles','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','fetch\x20failed','YAZOo','rbjYD','1573143qIkxBo','--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','includes','saveToCloud','setupHeaders','EZePF','origin','action','force','What\x20would\x20you\x20like\x20to\x20do?','join','http://localhost:3000'];_0x1a7b=function(){return _0x4413df;};return _0x1a7b();}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 _0x299297=_0x2836;if(!process[_0x299297(0x1c5)][_0x299297(0x20f)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x529afd){const _0x12a9a1=_0x2836,_0x5585ef={'tQwDO':function(_0xd0565c,_0x41a45d){return _0xd0565c<_0x41a45d;},'TrHlR':function(_0x441b57,_0xcfbb12){return _0x441b57===_0xcfbb12;},'KWEAc':_0x12a9a1(0x218),'qgxmu':_0x12a9a1(0x1e6)};try{const _0xe5a2c8=new AbortController(),_0x59bfa5=setTimeout(()=>_0xe5a2c8['abort'](),0x1388),_0x5592bc={'method':_0x12a9a1(0x1fc),'signal':_0xe5a2c8['signal'],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i['test'](_0x529afd)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x3b918a=await fetch(_0x529afd,_0x5592bc);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x59bfa5);if(_0x5585ef['tQwDO'](_0x3b918a[_0x12a9a1(0x1bc)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x3b918a[_0x12a9a1(0x1bc)]};}catch(_0x198b15){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x4e8a04=_0x198b15,_0xabd8b4=_0x4e8a04['message']||String(_0x198b15),_0x1d0e36=_0xabd8b4['includes']('Invalid\x20URL')||_0x5585ef[_0x12a9a1(0x1f8)](_0x4e8a04[_0x12a9a1(0x1fd)],_0x5585ef[_0x12a9a1(0x1cd)])||_0xabd8b4[_0x12a9a1(0x1eb)](_0x5585ef['qgxmu']);return{'ok':![],'error':_0xabd8b4,'isProtocolError':_0x1d0e36};}}async function sweepOrphanLocalProfile(_0x17939c,_0x1c4f04,_0x34d8ae){const _0x13bad1=_0x2836,_0x288f01={'AYehI':function(_0xf57b5a,_0x53f042){return _0xf57b5a(_0x53f042);},'boTnm':function(_0x985d73,_0x3c4d8a,_0x1ed60f){return _0x985d73(_0x3c4d8a,_0x1ed60f);}},_0x9fcfd0=join(_0x1c4f04,'local'),_0x311a1d=join(_0x9fcfd0,_0x17939c);existsSync(_0x311a1d)&&(_0x34d8ae&&await isPathGitTracked(_0x311a1d)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x311a1d+_0x13bad1(0x21d)):(await rm(_0x311a1d,{'recursive':!![],'force':!![]}),console[_0x13bad1(0x1f9)](_0x13bad1(0x1e3)+_0x311a1d)));if(existsSync(_0x9fcfd0)){let _0x7eea84=[];try{_0x7eea84=await _0x288f01['AYehI'](readdir,_0x9fcfd0);}catch{return;}const _0xe059c0='.tmp-'+_0x17939c+'-';for(const _0x454ad9 of _0x7eea84){if(!_0x454ad9[_0x13bad1(0x21b)](_0xe059c0))continue;const _0x82f2e0=join(_0x9fcfd0,_0x454ad9);await _0x288f01[_0x13bad1(0x1b2)](rm,_0x82f2e0,{'recursive':!![],'force':!![]}),console['log'](_0x13bad1(0x1e3)+_0x82f2e0);}}}async function sweepOrphansBestEffort(_0x45bf32){const _0x36ee55=_0x2836,_0xa8178={'DVtKr':function(_0x3c8c29,_0x4c4a4e,_0x526e86,_0x407195){return _0x3c8c29(_0x4c4a4e,_0x526e86,_0x407195);},'UBRke':function(_0x3fa05f){return _0x3fa05f();},'GlMqZ':function(_0x2f64f0){return _0x2f64f0();},'JFivS':function(_0x3e962d,_0x498bf8,_0x1faaeb,_0x31ced9){return _0x3e962d(_0x498bf8,_0x1faaeb,_0x31ced9);},'kEilj':function(_0x502815,_0x1a0d8a){return _0x502815 instanceof _0x1a0d8a;}};try{await _0xa8178['DVtKr'](sweepOrphanLocalProfile,_0x45bf32,_0xa8178['UBRke'](getRangerHomeDir),![]);const _0x25c294=_0xa8178['GlMqZ'](getRangerDir);_0x25c294!==getRangerHomeDir()&&await _0xa8178[_0x36ee55(0x224)](sweepOrphanLocalProfile,_0x45bf32,_0x25c294,!![]);}catch(_0x36d6ef){console[_0x36ee55(0x1f9)](_0x36ee55(0x230)+(_0xa8178[_0x36ee55(0x1c6)](_0x36d6ef,Error)?_0x36d6ef[_0x36ee55(0x1b0)]:String(_0x36d6ef))+').');}}async function markActive(_0xf73eed){const _0x37c922=_0x2836;try{await writeActiveProfileName(_0xf73eed),console[_0x37c922(0x1f9)](_0x37c922(0x1d5)+_0xf73eed);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0xd3209e,_0x55afb4,_0x317fba,_0x5365c3,_0x405dd7){const _0x153200=_0x2836,_0x29344f={'bxrFR':function(_0x12b55c,_0x3f9679){return _0x12b55c instanceof _0x3f9679;},'gDhkw':function(_0x425aad,_0x1ec39c){return _0x425aad===_0x1ec39c;},'nUOqi':_0x153200(0x215),'PSRIU':_0x153200(0x1b6),'DZarU':function(_0x30f99,_0x508235){return _0x30f99+_0x508235;},'YAZOo':_0x153200(0x204),'ZmMvG':_0x153200(0x1da),'ixoPh':_0x153200(0x1d4),'egKqa':'confirm','pwfCf':_0x153200(0x227),'RtslG':function(_0x4825fc,_0x2d232c,_0x2efe85,_0x5daf0e){return _0x4825fc(_0x2d232c,_0x2efe85,_0x5daf0e);},'owyDT':_0x153200(0x200)};let _0x20ce71;try{_0x20ce71=await fetchAuthConfig();}catch(_0x58a94c){return _0x405dd7?.[_0x153200(0x206)](_0x153200(0x215),{'reason':_0x153200(0x1b6),'profileName':_0xd3209e}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x29344f['bxrFR'](_0x58a94c,Error)?_0x58a94c['message']:String(_0x58a94c))),![];}if((!_0x20ce71||!_0x20ce71['environments']||_0x29344f[_0x153200(0x1ce)](Object['keys'](_0x20ce71[_0x153200(0x1e1)])[_0x153200(0x1dd)],0x0))&&!_0x317fba[_0x153200(0x1de)]){if(_0x5365c3)return await captureEnvLessProfile(_0xd3209e,_0x55afb4,_0x317fba,_0x405dd7);return _0x405dd7?.['trackPhaseEnd'](_0x29344f['nUOqi'],{'reason':_0x29344f['PSRIU'],'profileName':_0xd3209e}),console['error'](_0x29344f[_0x153200(0x1ca)](_0x29344f['DZarU'](_0x29344f[_0x153200(0x1ca)](_0x29344f[_0x153200(0x1ca)]('\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'+(_0x153200(0x216)+_0xd3209e+_0x153200(0x222)+_0x55afb4+_0x153200(0x1b7)),'\x0a'),_0x29344f[_0x153200(0x1e7)]),_0x153200(0x210))),![];}let _0x5d79a4;if(_0x317fba[_0x153200(0x1de)]){if(!_0x20ce71?.['environments']?.[_0x317fba['authEnv']]){const _0x59d5ef=Object['keys'](_0x20ce71?.[_0x153200(0x1e1)]??{});return _0x405dd7?.[_0x153200(0x206)](_0x29344f['nUOqi'],{'reason':_0x29344f[_0x153200(0x220)],'profileName':_0xd3209e}),console[_0x153200(0x209)](_0x153200(0x226)+_0x317fba[_0x153200(0x1de)]+'\x22\x20not\x20found.'+(_0x59d5ef['length']?_0x153200(0x234)+_0x59d5ef[_0x153200(0x1f3)](',\x20')+'.':_0x153200(0x1ae))),![];}_0x5d79a4=_0x317fba['authEnv'];}else _0x5d79a4=matchAuthEnvironment(_0x55afb4,_0x20ce71);if(!_0x5d79a4)return _0x405dd7?.['trackPhaseEnd'](_0x29344f['nUOqi'],{'reason':_0x29344f[_0x153200(0x22b)],'profileName':_0xd3209e}),console['error'](_0x153200(0x1e2)+_0x55afb4+_0x153200(0x1b3)+Object[_0x153200(0x1d9)](_0x20ce71?.[_0x153200(0x1e1)]??{})['join'](',\x20')+'.'),![];const _0x286eba=_0x20ce71?.[_0x153200(0x1e1)]?.[_0x5d79a4],_0x1d56ca=_0x286eba?.['domains']??[];if(_0x5365c3&&!_0x317fba[_0x153200(0x22f)]){const {saveToCloud:_0x42de8b}=await _0x2b71a3[_0x153200(0x205)]([{'type':_0x29344f[_0x153200(0x1b5)],'name':_0x153200(0x1ec),'message':_0x153200(0x20e)+_0x5d79a4+_0x153200(0x1ac)+_0x55afb4+'\x0a\x20\x20(domains:\x20'+_0x1d56ca['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0xd3209e+_0x153200(0x239),'default':!![]}]);if(!_0x42de8b)return _0x405dd7?.['trackPhaseEnd'](_0x153200(0x215),{'reason':'user_declined','profileName':_0xd3209e}),console['error'](_0x29344f[_0x153200(0x21e)]),![];}const _0x30cea3=_0x1d56ca[_0x153200(0x20d)](_0x1ded45=>{const _0x586f32=_0x153200;try{return new URL(_0x1ded45)[_0x586f32(0x1ef)]===new URL(_0x55afb4)['origin'];}catch{return![];}}),_0x491d50={};!_0x30cea3&&(_0x491d50[_0x153200(0x238)]=_0x55afb4);try{await _0x29344f['RtslG'](createCloudProfile,_0xd3209e,_0x5d79a4,{'settings':_0x491d50}),warnCloudProfileSharedInOrg();}catch(_0x31ec3e){if(_0x31ec3e instanceof ApiError&&_0x31ec3e[_0x153200(0x1bc)]===0x199){console[_0x153200(0x209)](_0x29344f['DZarU']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0xd3209e+_0x153200(0x20b),_0x153200(0x1af)+_0xd3209e));throw _0x31ec3e;}throw _0x31ec3e;}return console[_0x153200(0x1f9)](_0x29344f[_0x153200(0x1ca)]('✓\x20Profile\x20\x27'+_0xd3209e+_0x153200(0x1ba),_0x153200(0x237)+_0xd3209e)),await sweepOrphansBestEffort(_0xd3209e),_0x405dd7?.['trackPhaseEnd'](_0x29344f['owyDT'],{'envKey':_0x5d79a4,'profileName':_0xd3209e}),!![];}async function createUnconfiguredCloudProfile(_0x368974,_0xb6a6c1){const _0x18b54a=_0x2836,_0x46f4c7={'qmNxE':function(_0x2480d5,_0x136566){return _0x2480d5 instanceof _0x136566;},'HYwCU':function(_0x25058e,_0x92fd3e){return _0x25058e===_0x92fd3e;},'rbjYD':function(_0x286ce5,_0x2d5112){return _0x286ce5+_0x2d5112;}};try{await createCloudProfile(_0x368974,undefined,{'settings':_0xb6a6c1}),warnCloudProfileSharedInOrg();}catch(_0x978fa){_0x46f4c7['qmNxE'](_0x978fa,ApiError)&&_0x46f4c7['HYwCU'](_0x978fa[_0x18b54a(0x1bc)],0x199)&&console['error'](_0x46f4c7[_0x18b54a(0x1e8)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x368974+_0x18b54a(0x20b),_0x18b54a(0x1af)+_0x368974));throw _0x978fa;}}async function captureEnvLessProfile(_0x270470,_0x40f13a,_0x51ce11,_0x103469){const _0x209869=_0x2836,_0x5b44cd={'KyBhX':'confirm','mGoou':'capture','XRmUP':'user_declined','XSNhz':function(_0x885a17,_0x207f68){return _0x885a17+_0x207f68;},'VUcXA':function(_0x5e8f9a,_0x58544b){return _0x5e8f9a>_0x58544b;},'DlRZh':function(_0x28c002,_0x47342a,_0x4ae56f){return _0x28c002(_0x47342a,_0x4ae56f);},'iUSJQ':function(_0x58c237,_0x179595){return _0x58c237>_0x179595;},'YIxyV':function(_0x454241,_0x2b3360){return _0x454241(_0x2b3360);}};if(!_0x51ce11[_0x209869(0x22f)]){const {capture:_0x101764}=await _0x2b71a3['prompt']([{'type':_0x5b44cd['KyBhX'],'name':_0x5b44cd['mGoou'],'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x101764)return _0x103469?.[_0x209869(0x206)](_0x209869(0x215),{'reason':_0x5b44cd[_0x209869(0x232)],'profileName':_0x270470}),console[_0x209869(0x209)](_0x5b44cd[_0x209869(0x236)](_0x209869(0x1cf),_0x209869(0x22e))),![];}const _0xd19664={};if(_0x51ce11['setupHeader'])for(const _0x8a2089 of _0x51ce11['setupHeader']){const _0x298e3c=_0x8a2089[_0x209869(0x1b9)](':');if(_0x298e3c===-0x1)continue;_0xd19664[_0x8a2089['slice'](0x0,_0x298e3c)['trim']()]=_0x8a2089['slice'](_0x298e3c+0x1)[_0x209869(0x1bf)]();}const _0x491abf={'baseUrl':_0x40f13a};_0x5b44cd['VUcXA'](Object[_0x209869(0x1d9)](_0xd19664)[_0x209869(0x1dd)],0x0)&&(_0x491abf[_0x209869(0x1ed)]=_0xd19664);let _0x20d192;try{_0x20d192=await createCloudProfile(_0x270470,undefined,{'settings':_0x491abf}),warnCloudProfileSharedInOrg();}catch(_0x10a886){_0x10a886 instanceof ApiError&&_0x10a886[_0x209869(0x1bc)]===0x199&&console['error'](_0x5b44cd[_0x209869(0x236)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x270470+_0x209869(0x20b),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x270470));throw _0x10a886;}return await _0x5b44cd[_0x209869(0x1fa)](manualBrowserLogin,_0x20d192,{'key':'','domains':[_0x40f13a],'setupHeaders':_0x5b44cd['iUSJQ'](Object[_0x209869(0x1d9)](_0xd19664)['length'],0x0)?_0xd19664:undefined}),console['log'](_0x209869(0x207)+_0x270470+_0x209869(0x213)+(_0x209869(0x237)+_0x270470)),await _0x5b44cd[_0x209869(0x211)](sweepOrphansBestEffort,_0x270470),_0x103469?.['trackPhaseEnd']('profile.add.autoRouted',{'envKey':null,'profileName':_0x270470}),!![];}export async function addEnv(_0x3783a6,_0x556e73={},_0x3c7251){const _0x4b8bf5=_0x2836,_0x24b971={'lajQo':function(_0xe26bbb,_0x4326b3){return _0xe26bbb+_0x4326b3;},'EZePF':function(_0x469158,_0x452501){return _0x469158+_0x452501;},'KgcgA':function(_0x3c59c1,_0x204c52){return _0x3c59c1+_0x204c52;},'RAnEi':_0x4b8bf5(0x1c9),'cyhvG':_0x4b8bf5(0x1e4),'TzoMP':function(_0x575170,_0x165614){return _0x575170===_0x165614;},'TEAMD':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','beREe':_0x4b8bf5(0x1ea),'MsFIY':function(_0x348b61){return _0x348b61();},'VJYlH':_0x4b8bf5(0x1e5),'Ryljw':function(_0xebb997,_0x294895,_0x307a17,_0x26a95b,_0x32dbe3){return _0xebb997(_0x294895,_0x307a17,_0x26a95b,_0x32dbe3);},'yfpLs':_0x4b8bf5(0x21a),'AFaIS':_0x4b8bf5(0x1ad),'SSGEk':function(_0x29c1e8,_0x56697c){return _0x29c1e8 instanceof _0x56697c;},'QTdrF':function(_0x191f7f,_0xaea797){return _0x191f7f(_0xaea797);},'KXpYW':function(_0x210667,_0x33a49d){return _0x210667>_0x33a49d;},'yTxyZ':function(_0x4d8d55,_0x5c39d5,_0x20292a){return _0x4d8d55(_0x5c39d5,_0x20292a);},'DeVfr':function(_0x3e308f,_0x4965d2){return _0x3e308f+_0x4965d2;},'BKmsG':_0x4b8bf5(0x1c4),'ppwMI':_0x4b8bf5(0x1c8),'mRnvQ':_0x4b8bf5(0x201),'xqbUp':_0x4b8bf5(0x214),'khMGp':_0x4b8bf5(0x1f6),'ryQBB':_0x4b8bf5(0x1f2),'hUeCB':_0x4b8bf5(0x1d7),'zTsai':'continue','xDRBN':'use_suggestion','IpngU':function(_0x5a0f40,_0x32b606,_0x2df96b,_0x53abbf,_0x567e5b,_0x5965f8){return _0x5a0f40(_0x32b606,_0x2df96b,_0x53abbf,_0x567e5b,_0x5965f8);},'ERkpX':function(_0x41910d,_0x151860){return _0x41910d(_0x151860);}};_0x556e73['ci']&&(console['error'](_0x24b971[_0x4b8bf5(0x20c)](_0x24b971[_0x4b8bf5(0x20c)](_0x24b971[_0x4b8bf5(0x1ee)](_0x24b971['KgcgA'](_0x24b971[_0x4b8bf5(0x1ee)]('The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a'+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','\x0a'),'To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x24b971[_0x4b8bf5(0x22d)]),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x24b971['cyhvG'])),process[_0x4b8bf5(0x229)](0x1));const _0x1d908b={};if(_0x556e73[_0x4b8bf5(0x1dc)])for(const _0x223f83 of _0x556e73['setupHeader']){const _0x4d5d89=_0x223f83['indexOf'](':');if(_0x4d5d89===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x223f83+_0x4b8bf5(0x1d3));const _0x51b33a=_0x223f83['slice'](0x0,_0x4d5d89)['trim'](),_0x1ba71b=_0x223f83['slice'](_0x4d5d89+0x1)[_0x4b8bf5(0x1bf)]();_0x1d908b[_0x51b33a]=_0x1ba71b;}if(_0x556e73[_0x4b8bf5(0x21a)]!==undefined&&_0x24b971[_0x4b8bf5(0x228)](_0x556e73[_0x4b8bf5(0x21a)][_0x4b8bf5(0x1bf)](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x556e73['cdpEndpoint']&&_0x556e73['url'])throw new Error(_0x24b971['TEAMD']);if(_0x556e73[_0x4b8bf5(0x1de)]&&_0x556e73['skipAuth'])throw new Error(_0x24b971[_0x4b8bf5(0x1bd)]);if(_0x556e73['authEnv']&&_0x556e73[_0x4b8bf5(0x21a)])throw new Error(_0x4b8bf5(0x1d8));const _0x46347d=Boolean(_0x556e73[_0x4b8bf5(0x21a)]),_0x307f93=_0x24b971['MsFIY'](isInteractive);if(!_0x307f93&&!_0x556e73[_0x4b8bf5(0x217)]&&!_0x46347d&&!_0x556e73[_0x4b8bf5(0x1b8)])throw new Error(_0x24b971[_0x4b8bf5(0x22c)]);if(_0x46347d){const _0x1a6bfa=_0x556e73[_0x4b8bf5(0x21a)];console[_0x4b8bf5(0x1f9)](_0x4b8bf5(0x1df)),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1a6bfa);const _0x3cda6e={'cdpEndpoint':_0x1a6bfa,'isElectron':!![]};Object[_0x4b8bf5(0x1d9)](_0x1d908b)['length']>0x0&&(_0x3cda6e[_0x4b8bf5(0x1ed)]=_0x1d908b);await createUnconfiguredCloudProfile(_0x3783a6,_0x3cda6e);try{_0x24b971[_0x4b8bf5(0x1db)](setProfileOverride,process['cwd'](),_0x3783a6,_0x24b971['yfpLs'],_0x1a6bfa),setProfileOverride(process[_0x4b8bf5(0x1d1)](),_0x3783a6,_0x24b971[_0x4b8bf5(0x1f5)],!![]);}catch(_0x422ecc){console[_0x4b8bf5(0x209)](_0x4b8bf5(0x1c7)+(_0x24b971[_0x4b8bf5(0x219)](_0x422ecc,Error)?_0x422ecc[_0x4b8bf5(0x1b0)]:String(_0x422ecc)));}console['log'](_0x4b8bf5(0x1cc)+_0x3783a6+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x3783a6),await _0x24b971['QTdrF'](markActive,_0x3783a6);return;}if(_0x556e73['skipAuth']){const _0x490f01={};_0x556e73[_0x4b8bf5(0x217)]&&(_0x490f01['baseUrl']=_0x556e73[_0x4b8bf5(0x217)]);_0x24b971['KXpYW'](Object[_0x4b8bf5(0x1d9)](_0x1d908b)['length'],0x0)&&(_0x490f01['setupHeaders']=_0x1d908b);await _0x24b971[_0x4b8bf5(0x1fb)](createUnconfiguredCloudProfile,_0x3783a6,_0x490f01),console[_0x4b8bf5(0x1f9)](_0x24b971[_0x4b8bf5(0x202)](_0x4b8bf5(0x20a)+_0x3783a6+_0x4b8bf5(0x1b4),_0x4b8bf5(0x233)+_0x3783a6+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x3783a6),await _0x24b971['QTdrF'](markActive,_0x3783a6);return;}if(_0x556e73['url']){const _0x841424=_0x556e73[_0x4b8bf5(0x217)],_0x3caff3=await _0x24b971['QTdrF'](checkUrlReachability,_0x841424);if(!_0x3caff3['ok']&&!_0x556e73[_0x4b8bf5(0x1f1)])throw new Error('Could\x20not\x20reach\x20'+_0x841424+':\x20'+_0x3caff3['error']+_0x4b8bf5(0x1d2));!_0x3caff3['ok']&&_0x556e73[_0x4b8bf5(0x1f1)]&&console[_0x4b8bf5(0x1f9)]('⚠\x20Could\x20not\x20reach\x20'+_0x841424+':\x20'+_0x3caff3[_0x4b8bf5(0x209)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x24b971[_0x4b8bf5(0x1c0)]),console[_0x4b8bf5(0x1f9)](_0x24b971['ppwMI']),console['log'](_0x4b8bf5(0x1e0));let _0xe55f16='',_0x5fd7a7=![];while(!![]){const _0x164608=await _0x2b71a3[_0x4b8bf5(0x205)]([{'type':_0x24b971['mRnvQ'],'name':'baseUrl','message':_0x5fd7a7?_0x24b971[_0x4b8bf5(0x1ff)]:_0x4b8bf5(0x1d0),'default':_0xe55f16||_0x4b8bf5(0x1f4)}]);_0xe55f16=_0x164608[_0x4b8bf5(0x238)];const _0x2e85c7=await checkUrlReachability(_0xe55f16);if(_0x2e85c7['ok'])break;const _0x1c3162=/^[a-zA-Z][\w+.-]*:\/\//[_0x4b8bf5(0x221)](_0xe55f16),_0x261ff9=_0x2e85c7[_0x4b8bf5(0x1cb)]&&!_0x1c3162,_0x567573=_0x261ff9?_0x4b8bf5(0x21c)+_0xe55f16:null;_0x5fd7a7=!![],console[_0x4b8bf5(0x1f9)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0xe55f16+':\x20'+_0x2e85c7[_0x4b8bf5(0x209)]);_0x567573&&console['log'](_0x4b8bf5(0x203)+_0x567573+'?');const {action:_0x589e10}=await _0x2b71a3['prompt']([{'type':_0x24b971[_0x4b8bf5(0x225)],'name':_0x4b8bf5(0x1f0),'message':_0x24b971['ryQBB'],'choices':[..._0x567573?[{'name':_0x4b8bf5(0x231)+_0x567573,'value':'use_suggestion'}]:[],{'name':'Enter\x20a\x20different\x20URL','value':_0x4b8bf5(0x1f7)},{'name':_0x24b971[_0x4b8bf5(0x1be)],'value':_0x24b971[_0x4b8bf5(0x1c2)]}]}]);if(_0x589e10===_0x24b971[_0x4b8bf5(0x1c1)]&&_0x567573){_0xe55f16=_0x567573;const _0x476e7b=await _0x24b971[_0x4b8bf5(0x223)](checkUrlReachability,_0xe55f16);if(_0x476e7b['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0xe55f16+':\x20'+_0x476e7b[_0x4b8bf5(0x209)]);}else{if(_0x24b971['TzoMP'](_0x589e10,_0x24b971['zTsai']))break;}}_0x556e73={..._0x556e73,'url':_0xe55f16};}let _0x1bb654=![];try{_0x1bb654=await _0x24b971['IpngU'](tryAutoRouteCloudProfile,_0x3783a6,_0x556e73[_0x4b8bf5(0x217)],_0x556e73,_0x307f93,_0x3c7251);}catch(_0x5b7569){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x3783a6+_0x4b8bf5(0x1b1)+(_0x5b7569 instanceof Error?_0x5b7569['message']:String(_0x5b7569))),process['exit'](0x1);}!_0x1bb654&&process[_0x4b8bf5(0x229)](0x1),await _0x24b971[_0x4b8bf5(0x208)](markActive,_0x3783a6);}
1
+ const _0x474c19=_0x4d76;(function(_0x15eeba,_0x39e8e3){const _0x581c65=_0x4d76,_0x36b6c9=_0x15eeba();while(!![]){try{const _0x5094ad=-parseInt(_0x581c65(0x17f))/0x1+-parseInt(_0x581c65(0x16d))/0x2+-parseInt(_0x581c65(0x154))/0x3*(-parseInt(_0x581c65(0x16f))/0x4)+-parseInt(_0x581c65(0x17c))/0x5+-parseInt(_0x581c65(0x18f))/0x6+-parseInt(_0x581c65(0x19d))/0x7+parseInt(_0x581c65(0x179))/0x8;if(_0x5094ad===_0x39e8e3)break;else _0x36b6c9['push'](_0x36b6c9['shift']());}catch(_0x5bc076){_0x36b6c9['push'](_0x36b6c9['shift']());}}}(_0x4137,0x508d9));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x36dc62 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';function _0x4d76(_0x331261,_0x2ef2df){_0x331261=_0x331261-0x13d;const _0x41372a=_0x4137();let _0x4d769d=_0x41372a[_0x331261];return _0x4d769d;}function _0x4137(){const _0xf8ccbc=['\x0a\x20\x20A\x20profile\x20named\x20\x22','NODE_TLS_REJECT_UNAUTHORIZED','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','baseUrl','keys','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','log','cwd','url','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','\x27\x20matching\x20','HBwNX','GgmCj','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','\x27\x20created\x20(CDP).','QQQHI','biaBV','✓\x20Profile\x20\x27','force','includes','profile.add.autoRouted','HcsVZ','XIAgW','join','RGQxA','\x20--skip-auth\x0a','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x0a\x20\x20Could\x20not\x20reach\x20','wkrOv','ELCfD','user_declined','\x20--url\x20','jJNeb','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','env','WytvO','Could\x20not\x20reach\x20','zzAcb','tSTAa','\x20(continuing\x20with\x20--force)','pXZxr','list','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','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','HSQWa','signal','cdpEndpoint','environments','profile.add.autoRouteSkipped','VGmFn','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','origin','PsIHe','XeVyy','skipAuth','local','9vbkMWX','SzxKE','xrCNZ','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','trim','QRBUW','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','setupHeaders','Use\x20','\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','continue','WXEvf','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','setupHeader','zuTrn','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','ptTAz','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','use_suggestion','message','test','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','SZwDH','716810JzpMoH','oxOZY','866044DUtVer','\x0a\x20\x20(domains:\x20','error','AMjUT','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','slice','QSQrx','\x27\x20created.\x0a','wLqFw','HTTP\x20','6650472hLgOOF','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','cFuSA','975615UWNwEI','xtwTM','http://','413871hTAVAq','JlJmv','prompt','authEnv','isElectron','odoBi','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','EOzlx','QdxgK','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','capture','warn','qSkTr','⚠\x20Could\x20not\x20reach\x20','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','fetch\x20failed','682284yMPCwP','selJY','Enter\x20a\x20different\x20URL','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','ISbbV','yes','length','isTTY','peeUf','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','OlfCR','trackPhaseEnd','pqXFX','stdout','488488WhvNHs','exit'];_0x4137=function(){return _0xf8ccbc;};return _0x4137();}import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x474c19(0x16b);function warnCloudProfileSharedInOrg(){const _0x262b3d=_0x474c19;if(!process[_0x262b3d(0x19c)][_0x262b3d(0x196)])return;console[_0x262b3d(0x18a)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x110c7b){const _0x1f4d53=_0x474c19,_0x145a5b={'ARbok':'HEAD','JFrWM':'manual','AMjUT':function(_0x45931c,_0xd7cfe5){return _0x45931c(_0xd7cfe5);},'UWRWT':function(_0x3152d0,_0x4c4397){return _0x3152d0===_0x4c4397;},'QQQHI':'TypeError','wqSmV':_0x1f4d53(0x18e)};try{const _0x4694f5=new AbortController(),_0x38de49=setTimeout(()=>_0x4694f5['abort'](),0x1388),_0x1b322f={'method':_0x145a5b['ARbok'],'signal':_0x4694f5[_0x1f4d53(0x149)],'redirect':_0x145a5b['JFrWM']};/^https:\/\/localhost(:\d+)?/i[_0x1f4d53(0x16a)](_0x110c7b)&&(process[_0x1f4d53(0x13e)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x2e2c97=await fetch(_0x110c7b,_0x1b322f);delete process[_0x1f4d53(0x13e)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x145a5b[_0x1f4d53(0x172)](clearTimeout,_0x38de49);if(_0x2e2c97['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x1f4d53(0x178)+_0x2e2c97['status']};}catch(_0x2ff3f9){delete process[_0x1f4d53(0x13e)][_0x1f4d53(0x1a0)];const _0x4ef4eb=_0x2ff3f9,_0x3d747d=_0x4ef4eb['message']||String(_0x2ff3f9),_0x85df37=_0x3d747d[_0x1f4d53(0x1b2)]('Invalid\x20URL')||_0x145a5b['UWRWT'](_0x4ef4eb['name'],_0x145a5b[_0x1f4d53(0x1ae)])||_0x3d747d['includes'](_0x145a5b['wqSmV']);return{'ok':![],'error':_0x3d747d,'isProtocolError':_0x85df37};}}async function sweepOrphanLocalProfile(_0x39da34,_0x122016,_0x220c52){const _0x1d544a=_0x474c19,_0x133b63={'jztHC':function(_0x5ab2af,_0x36e1e7,_0x41bdeb){return _0x5ab2af(_0x36e1e7,_0x41bdeb);},'WytvO':function(_0x168bfe,_0x1d9eaf){return _0x168bfe(_0x1d9eaf);},'SZwDH':function(_0x113944,_0x3f50ba,_0x855aec){return _0x113944(_0x3f50ba,_0x855aec);}},_0x1c8e82=join(_0x122016,_0x1d544a(0x153)),_0xf9c730=_0x133b63['jztHC'](join,_0x1c8e82,_0x39da34);_0x133b63['WytvO'](existsSync,_0xf9c730)&&(_0x220c52&&await _0x133b63[_0x1d544a(0x13f)](isPathGitTracked,_0xf9c730)?console[_0x1d544a(0x1a5)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xf9c730+_0x1d544a(0x1bb)):(await rm(_0xf9c730,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0xf9c730)));if(existsSync(_0x1c8e82)){let _0x245b44=[];try{_0x245b44=await _0x133b63[_0x1d544a(0x13f)](readdir,_0x1c8e82);}catch{return;}const _0x2e55cb='.tmp-'+_0x39da34+'-';for(const _0x10ddfe of _0x245b44){if(!_0x10ddfe['startsWith'](_0x2e55cb))continue;const _0x564dde=_0x133b63[_0x1d544a(0x16c)](join,_0x1c8e82,_0x10ddfe);await rm(_0x564dde,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x564dde);}}}async function sweepOrphansBestEffort(_0x54a463){const _0xd0d54b=_0x474c19,_0x20193c={'selJY':function(_0x545f2c,_0x5313cb,_0x49666f,_0x2083b7){return _0x545f2c(_0x5313cb,_0x49666f,_0x2083b7);},'OEXfi':function(_0x48c730){return _0x48c730();},'SWsel':function(_0x4de933){return _0x4de933();},'DYPFQ':function(_0x5f3d00,_0x35e673){return _0x5f3d00 instanceof _0x35e673;}};try{await _0x20193c['selJY'](sweepOrphanLocalProfile,_0x54a463,_0x20193c['OEXfi'](getRangerHomeDir),![]);const _0x148bd1=getRangerDir();_0x148bd1!==_0x20193c['SWsel'](getRangerHomeDir)&&await _0x20193c[_0xd0d54b(0x190)](sweepOrphanLocalProfile,_0x54a463,_0x148bd1,!![]);}catch(_0x2e7725){console[_0xd0d54b(0x1a5)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x20193c['DYPFQ'](_0x2e7725,Error)?_0x2e7725['message']:String(_0x2e7725))+').');}}async function markActive(_0x1215c5){const _0x3ed437=_0x474c19;try{await writeActiveProfileName(_0x1215c5),console[_0x3ed437(0x1a5)]('\x20\x20Set\x20active\x20profile:\x20'+_0x1215c5);}catch{console['log'](_0x3ed437(0x14e));}}async function tryAutoRouteCloudProfile(_0x24a6f6,_0x34a764,_0x49d5f6,_0xf3109f,_0x1c12f0){const _0x430d03=_0x474c19,_0xdcaa83={'zCWjj':function(_0xa88b68,_0xc02a29){return _0xa88b68===_0xc02a29;},'zuTrn':function(_0x16f86f){return _0x16f86f();},'biaBV':_0x430d03(0x14c),'TTFVr':'no_auth_config','RGQxA':function(_0x16dfd1,_0x4c4455){return _0x16dfd1 instanceof _0x4c4455;},'pqXFX':function(_0x3fc1f0,_0x229ea2,_0x4d1618,_0x110f0d,_0x538ea7){return _0x3fc1f0(_0x229ea2,_0x4d1618,_0x110f0d,_0x538ea7);},'XTRdB':function(_0x1431da,_0x35e665){return _0x1431da+_0x35e665;},'jJNeb':function(_0x4b3f36,_0x37e141){return _0x4b3f36+_0x37e141;},'HHaiR':function(_0x505d38,_0x1cc5b7){return _0x505d38+_0x1cc5b7;},'xrCNZ':function(_0x2d48a9,_0x4698d5){return _0x2d48a9+_0x4698d5;},'EkgmZ':_0x430d03(0x15d),'mADfB':_0x430d03(0x185),'bxDuj':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','bGZwu':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','pwoGs':'env_not_found','QdxgK':function(_0x1799b6,_0x13d59c){return _0x1799b6+_0x13d59c;},'mcvcg':function(_0x5ad7aa){return _0x5ad7aa();},'Qzyfn':function(_0x461006,_0x5b0b59){return _0x461006+_0x5b0b59;},'ISbbV':function(_0x2bf513,_0x114a0a){return _0x2bf513(_0x114a0a);}};let _0x3150f8;try{_0x3150f8=await _0xdcaa83[_0x430d03(0x163)](fetchAuthConfig);}catch(_0x429d16){return _0x1c12f0?.['trackPhaseEnd'](_0xdcaa83[_0x430d03(0x1af)],{'reason':_0xdcaa83['TTFVr'],'profileName':_0x24a6f6}),console['error'](_0x430d03(0x161)+(_0xdcaa83['RGQxA'](_0x429d16,Error)?_0x429d16[_0x430d03(0x169)]:String(_0x429d16))),![];}if((!_0x3150f8||!_0x3150f8['environments']||Object[_0x430d03(0x1a3)](_0x3150f8[_0x430d03(0x14b)])['length']===0x0)&&!_0x49d5f6[_0x430d03(0x182)]){if(_0xf3109f)return await _0xdcaa83[_0x430d03(0x19b)](captureEnvLessProfile,_0x24a6f6,_0x34a764,_0x49d5f6,_0x1c12f0);return _0x1c12f0?.['trackPhaseEnd'](_0x430d03(0x14c),{'reason':'no_auth_config','profileName':_0x24a6f6}),console[_0x430d03(0x171)](_0xdcaa83['XTRdB'](_0xdcaa83['XTRdB'](_0xdcaa83[_0x430d03(0x1c1)](_0xdcaa83['HHaiR'](_0xdcaa83[_0x430d03(0x156)](_0xdcaa83['EkgmZ'],'\x0a'),_0xdcaa83['mADfB']),_0x430d03(0x146)+_0x24a6f6+_0x430d03(0x1c0)+_0x34a764+_0x430d03(0x1b8))+'\x0a',_0xdcaa83['bxDuj']),_0xdcaa83['bGZwu'])),![];}let _0x4047b5;if(_0x49d5f6['authEnv']){if(!_0x3150f8?.[_0x430d03(0x14b)]?.[_0x49d5f6['authEnv']]){const _0x469476=Object['keys'](_0x3150f8?.['environments']??{});return _0x1c12f0?.[_0x430d03(0x19a)]('profile.add.autoRouteSkipped',{'reason':_0xdcaa83['pwoGs'],'profileName':_0x24a6f6}),console['error'](_0xdcaa83[_0x430d03(0x187)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x49d5f6['authEnv']+'\x22\x20not\x20found.',_0x469476['length']?'\x20Configured\x20envs:\x20'+_0x469476[_0x430d03(0x1b6)](',\x20')+'.':_0x430d03(0x1a1))),![];}_0x4047b5=_0x49d5f6['authEnv'];}else _0x4047b5=matchAuthEnvironment(_0x34a764,_0x3150f8);if(!_0x4047b5)return _0x1c12f0?.[_0x430d03(0x19a)](_0xdcaa83['biaBV'],{'reason':'no_match','profileName':_0x24a6f6}),console[_0x430d03(0x171)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x34a764+_0x430d03(0x188)+Object[_0x430d03(0x1a3)](_0x3150f8?.['environments']??{})['join'](',\x20')+'.'),![];const _0x508f3c=_0x3150f8?.['environments']?.[_0x4047b5],_0x4cf8ed=_0x508f3c?.['domains']??[];if(_0xf3109f&&!_0x49d5f6[_0x430d03(0x194)]){const {saveToCloud:_0x37eaac}=await _0x36dc62[_0x430d03(0x181)]([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x4047b5+_0x430d03(0x1a9)+_0x34a764+_0x430d03(0x170)+_0x4cf8ed[_0x430d03(0x1b6)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x24a6f6+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x37eaac)return _0x1c12f0?.['trackPhaseEnd'](_0xdcaa83['biaBV'],{'reason':_0x430d03(0x1bf),'profileName':_0x24a6f6}),console[_0x430d03(0x171)](_0x430d03(0x1b9)),![];}const _0x2a2962=_0x4cf8ed['some'](_0x434b28=>{const _0x446790=_0x430d03;try{return _0xdcaa83['zCWjj'](new URL(_0x434b28)[_0x446790(0x14f)],new URL(_0x34a764)['origin']);}catch{return![];}}),_0x2efd52={};!_0x2a2962&&(_0x2efd52['baseUrl']=_0x34a764);try{await createCloudProfile(_0x24a6f6,_0x4047b5,{'settings':_0x2efd52}),_0xdcaa83['mcvcg'](warnCloudProfileSharedInOrg);}catch(_0x23bba4){if(_0xdcaa83[_0x430d03(0x1b7)](_0x23bba4,ApiError)&&_0xdcaa83['zCWjj'](_0x23bba4['status'],0x199)){console['error'](_0xdcaa83['Qzyfn'](_0x430d03(0x19f)+_0x24a6f6+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x430d03(0x1ac)+_0x24a6f6));throw _0x23bba4;}throw _0x23bba4;}return console[_0x430d03(0x1a5)]('✓\x20Profile\x20\x27'+_0x24a6f6+_0x430d03(0x176)+(_0x430d03(0x17a)+_0x24a6f6)),await _0xdcaa83[_0x430d03(0x193)](sweepOrphansBestEffort,_0x24a6f6),_0x1c12f0?.[_0x430d03(0x19a)](_0x430d03(0x1b3),{'envKey':_0x4047b5,'profileName':_0x24a6f6}),!![];}async function createUnconfiguredCloudProfile(_0x7bf3a7,_0x55a66a){const _0x42d810=_0x474c19,_0x323af7={'qSkTr':function(_0x1d8539,_0x405c83,_0x123b62,_0x8ddd79){return _0x1d8539(_0x405c83,_0x123b62,_0x8ddd79);},'ddJHx':function(_0x4d78f3){return _0x4d78f3();}};try{await _0x323af7[_0x42d810(0x18b)](createCloudProfile,_0x7bf3a7,undefined,{'settings':_0x55a66a}),_0x323af7['ddJHx'](warnCloudProfileSharedInOrg);}catch(_0x56b594){_0x56b594 instanceof ApiError&&_0x56b594['status']===0x199&&console[_0x42d810(0x171)](_0x42d810(0x19f)+_0x7bf3a7+_0x42d810(0x1a4)+(_0x42d810(0x1ac)+_0x7bf3a7));throw _0x56b594;}}async function captureEnvLessProfile(_0x10a8ad,_0x2a42fb,_0x16d983,_0x5c1b64){const _0x1f5a47=_0x474c19,_0x452f96={'HFBiR':'confirm','XeVyy':_0x1f5a47(0x189),'tSTAa':'profile.add.autoRouteSkipped','OlfCR':function(_0x1cdab0,_0x10d92c){return _0x1cdab0+_0x10d92c;},'wkrOv':function(_0x36756b,_0x1cd1a3){return _0x36756b===_0x1cd1a3;},'EOzlx':function(_0x115f30,_0x2942fd){return _0x115f30>_0x2942fd;},'QRBUW':function(_0x556322){return _0x556322();},'YOfab':function(_0x485032,_0x238b38){return _0x485032 instanceof _0x238b38;},'QSQrx':function(_0x5756d2,_0x1b6dfd){return _0x5756d2===_0x1b6dfd;},'fNVCm':function(_0x532384,_0x3e2353){return _0x532384+_0x3e2353;},'GgmCj':function(_0x2b3226,_0x1f01ff){return _0x2b3226(_0x1f01ff);},'RAhRV':'profile.add.autoRouted'};if(!_0x16d983['yes']){const {capture:_0x41e066}=await _0x36dc62[_0x1f5a47(0x181)]([{'type':_0x452f96['HFBiR'],'name':_0x452f96[_0x1f5a47(0x151)],'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x41e066)return _0x5c1b64?.[_0x1f5a47(0x19a)](_0x452f96[_0x1f5a47(0x142)],{'reason':_0x1f5a47(0x1bf),'profileName':_0x10a8ad}),console['error'](_0x452f96[_0x1f5a47(0x199)](_0x1f5a47(0x167),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x1d8a28={};if(_0x16d983[_0x1f5a47(0x162)])for(const _0x17b18b of _0x16d983[_0x1f5a47(0x162)]){const _0x5928ef=_0x17b18b['indexOf'](':');if(_0x452f96[_0x1f5a47(0x1bd)](_0x5928ef,-0x1))continue;_0x1d8a28[_0x17b18b[_0x1f5a47(0x174)](0x0,_0x5928ef)[_0x1f5a47(0x158)]()]=_0x17b18b[_0x1f5a47(0x174)](_0x5928ef+0x1)[_0x1f5a47(0x158)]();}const _0x68b739={'baseUrl':_0x2a42fb};_0x452f96[_0x1f5a47(0x186)](Object[_0x1f5a47(0x1a3)](_0x1d8a28)['length'],0x0)&&(_0x68b739['setupHeaders']=_0x1d8a28);let _0x23863c;try{_0x23863c=await createCloudProfile(_0x10a8ad,undefined,{'settings':_0x68b739}),_0x452f96[_0x1f5a47(0x159)](warnCloudProfileSharedInOrg);}catch(_0x1dddfb){_0x452f96['YOfab'](_0x1dddfb,ApiError)&&_0x452f96[_0x1f5a47(0x175)](_0x1dddfb['status'],0x199)&&console['error'](_0x452f96[_0x1f5a47(0x199)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x10a8ad+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x10a8ad));throw _0x1dddfb;}return await manualBrowserLogin(_0x23863c,{'key':'','domains':[_0x2a42fb],'setupHeaders':_0x452f96['EOzlx'](Object['keys'](_0x1d8a28)[_0x1f5a47(0x195)],0x0)?_0x1d8a28:undefined}),console[_0x1f5a47(0x1a5)](_0x452f96['fNVCm']('\x0a✓\x20Profile\x20\x27'+_0x10a8ad+_0x1f5a47(0x18d),_0x1f5a47(0x17a)+_0x10a8ad)),await _0x452f96[_0x1f5a47(0x1ab)](sweepOrphansBestEffort,_0x10a8ad),_0x5c1b64?.[_0x1f5a47(0x19a)](_0x452f96['RAhRV'],{'envKey':null,'profileName':_0x10a8ad}),!![];}export async function addEnv(_0x486160,_0x10da3c={},_0x29f5bd){const _0x40145c=_0x474c19,_0x500ea3={'pXZxr':function(_0x1a93d9,_0x25f323){return _0x1a93d9+_0x25f323;},'wLqFw':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','HBwNX':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ptTAz':function(_0x12b310,_0x579f28){return _0x12b310+_0x579f28;},'lebwA':function(_0x1ec60a,_0x3397a4){return _0x1ec60a===_0x3397a4;},'NuIuc':_0x40145c(0x157),'oBMce':'--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','RcZWD':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','PsIHe':function(_0x4a2e1a,_0x12cbd7){return _0x4a2e1a(_0x12cbd7);},'cFuSA':_0x40145c(0x160),'IKxFy':function(_0x4bfafe,_0x3d2f2a){return _0x4bfafe>_0x3d2f2a;},'xtwTM':function(_0x5c24b0,_0x5d2f34,_0x51a194){return _0x5c24b0(_0x5d2f34,_0x51a194);},'jyimO':function(_0x4906f7,_0x5ba6a0,_0x3358d8,_0x5f5601,_0x2379a2){return _0x4906f7(_0x5ba6a0,_0x3358d8,_0x5f5601,_0x2379a2);},'qVLLg':'cdpEndpoint','HcsVZ':_0x40145c(0x183),'GfYao':function(_0x41cb68,_0x295cbf){return _0x41cb68 instanceof _0x295cbf;},'oxOZY':function(_0x205259,_0x3f1af7){return _0x205259(_0x3f1af7);},'HSQWa':function(_0x5ef7fe,_0x4bbc06){return _0x5ef7fe(_0x4bbc06);},'peeUf':function(_0xe16b84,_0x42a496){return _0xe16b84>_0x42a496;},'odoBi':function(_0x5469b1,_0x37d447){return _0x5469b1+_0x37d447;},'KLsTa':_0x40145c(0x1a8),'XIAgW':_0x40145c(0x1a2),'SzxKE':function(_0x7ff141,_0x38b5d0){return _0x7ff141||_0x38b5d0;},'zzAcb':'http://localhost:3000','WXEvf':'action','PVGxr':'What\x20would\x20you\x20like\x20to\x20do?','VGmFn':'Continue\x20anyway','JlJmv':_0x40145c(0x168),'ELCfD':function(_0x2830c5,_0xfe6833){return _0x2830c5===_0xfe6833;},'BdDDK':function(_0x58c56e,_0x2339e9){return _0x58c56e instanceof _0x2339e9;}};_0x10da3c['ci']&&(console[_0x40145c(0x171)](_0x500ea3['pXZxr'](_0x500ea3[_0x40145c(0x144)](_0x500ea3['pXZxr'](_0x500ea3['pXZxr'](_0x500ea3[_0x40145c(0x177)]+_0x40145c(0x15a)+'\x0a','To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x500ea3[_0x40145c(0x1aa)]),'\x0a'),_0x40145c(0x13d))+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x40145c(0x19e)](0x1));const _0x42b1d8={};if(_0x10da3c[_0x40145c(0x162)])for(const _0x49f23c of _0x10da3c[_0x40145c(0x162)]){const _0x56674c=_0x49f23c['indexOf'](':');if(_0x56674c===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x49f23c+_0x40145c(0x198));const _0x2c43ab=_0x49f23c[_0x40145c(0x174)](0x0,_0x56674c)[_0x40145c(0x158)](),_0x367c9a=_0x49f23c[_0x40145c(0x174)](_0x500ea3[_0x40145c(0x166)](_0x56674c,0x1))[_0x40145c(0x158)]();_0x42b1d8[_0x2c43ab]=_0x367c9a;}if(_0x10da3c['cdpEndpoint']!==undefined&&_0x500ea3['lebwA'](_0x10da3c[_0x40145c(0x14a)][_0x40145c(0x158)](),''))throw new Error(_0x40145c(0x173));if(_0x10da3c[_0x40145c(0x14a)]&&_0x10da3c['url'])throw new Error(_0x500ea3['NuIuc']);if(_0x10da3c[_0x40145c(0x182)]&&_0x10da3c['skipAuth'])throw new Error(_0x500ea3['oBMce']);if(_0x10da3c['authEnv']&&_0x10da3c[_0x40145c(0x14a)])throw new Error(_0x500ea3['RcZWD']);const _0x515e3a=_0x500ea3[_0x40145c(0x150)](Boolean,_0x10da3c[_0x40145c(0x14a)]),_0x324881=isInteractive();if(!_0x324881&&!_0x10da3c[_0x40145c(0x1a7)]&&!_0x515e3a&&!_0x10da3c[_0x40145c(0x152)])throw new Error(_0x40145c(0x147));if(_0x515e3a){const _0x208617=_0x10da3c['cdpEndpoint'];console[_0x40145c(0x1a5)](_0x500ea3[_0x40145c(0x17b)]),console[_0x40145c(0x1a5)](_0x40145c(0x1ba)+_0x208617);const _0x13aa5d={'cdpEndpoint':_0x208617,'isElectron':!![]};_0x500ea3['IKxFy'](Object['keys'](_0x42b1d8)[_0x40145c(0x195)],0x0)&&(_0x13aa5d[_0x40145c(0x15b)]=_0x42b1d8);await _0x500ea3[_0x40145c(0x17d)](createUnconfiguredCloudProfile,_0x486160,_0x13aa5d);try{_0x500ea3['jyimO'](setProfileOverride,process[_0x40145c(0x1a6)](),_0x486160,_0x500ea3['qVLLg'],_0x208617),_0x500ea3['jyimO'](setProfileOverride,process['cwd'](),_0x486160,_0x500ea3[_0x40145c(0x1b4)],!![]);}catch(_0x1c184b){console[_0x40145c(0x171)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x500ea3['GfYao'](_0x1c184b,Error)?_0x1c184b[_0x40145c(0x169)]:_0x500ea3[_0x40145c(0x16e)](String,_0x1c184b)));}console[_0x40145c(0x1a5)]('✓\x20Cloud\x20profile\x20\x27'+_0x486160+_0x40145c(0x1ad)),await sweepOrphansBestEffort(_0x486160),await _0x500ea3['HSQWa'](markActive,_0x486160);return;}if(_0x10da3c['skipAuth']){const _0x15a5f3={};_0x10da3c[_0x40145c(0x1a7)]&&(_0x15a5f3['baseUrl']=_0x10da3c[_0x40145c(0x1a7)]);_0x500ea3[_0x40145c(0x197)](Object[_0x40145c(0x1a3)](_0x42b1d8)[_0x40145c(0x195)],0x0)&&(_0x15a5f3[_0x40145c(0x15b)]=_0x42b1d8);await createUnconfiguredCloudProfile(_0x486160,_0x15a5f3),console['log'](_0x500ea3[_0x40145c(0x184)](_0x40145c(0x1b0)+_0x486160+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x486160+'`\x20again\x20without\x20--skip-auth.')),await _0x500ea3[_0x40145c(0x148)](sweepOrphansBestEffort,_0x486160),await markActive(_0x486160);return;}if(_0x10da3c[_0x40145c(0x1a7)]){const _0x51c3d8=_0x10da3c['url'],_0x8687e3=await checkUrlReachability(_0x51c3d8);if(!_0x8687e3['ok']&&!_0x10da3c['force'])throw new Error(_0x40145c(0x140)+_0x51c3d8+':\x20'+_0x8687e3[_0x40145c(0x171)]+_0x40145c(0x165));!_0x8687e3['ok']&&_0x10da3c[_0x40145c(0x1b1)]&&console['log'](_0x40145c(0x18c)+_0x51c3d8+':\x20'+_0x8687e3[_0x40145c(0x171)]+_0x40145c(0x143));}else{console[_0x40145c(0x1a5)]('\x0a🌐\x20Profile\x20Setup\x0a'),console['log']('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console['log'](_0x500ea3['KLsTa']);let _0x5c6189='',_0x36bc63=![];while(!![]){const _0x448a6=await _0x36dc62['prompt']([{'type':'input','name':_0x500ea3[_0x40145c(0x1b5)],'message':_0x36bc63?_0x40145c(0x164):'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x500ea3[_0x40145c(0x155)](_0x5c6189,_0x500ea3[_0x40145c(0x141)])}]);_0x5c6189=_0x448a6[_0x40145c(0x1a2)];const _0x439199=await checkUrlReachability(_0x5c6189);if(_0x439199['ok'])break;const _0x9b42f9=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5c6189),_0x58b069=_0x439199['isProtocolError']&&!_0x9b42f9,_0x1f623d=_0x58b069?_0x40145c(0x17e)+_0x5c6189:null;_0x36bc63=!![],console[_0x40145c(0x1a5)](_0x40145c(0x1bc)+_0x5c6189+':\x20'+_0x439199['error']);_0x1f623d&&console[_0x40145c(0x1a5)]('\x20\x20Did\x20you\x20mean\x20'+_0x1f623d+'?');const {action:_0x241f09}=await _0x36dc62[_0x40145c(0x181)]([{'type':_0x40145c(0x145),'name':_0x500ea3[_0x40145c(0x15f)],'message':_0x500ea3['PVGxr'],'choices':[..._0x1f623d?[{'name':_0x40145c(0x15c)+_0x1f623d,'value':_0x40145c(0x168)}]:[],{'name':_0x40145c(0x191),'value':'retry'},{'name':_0x500ea3[_0x40145c(0x14d)],'value':_0x40145c(0x15e)}]}]);if(_0x241f09===_0x500ea3[_0x40145c(0x180)]&&_0x1f623d){_0x5c6189=_0x1f623d;const _0xb8325=await checkUrlReachability(_0x5c6189);if(_0xb8325['ok'])break;console['log'](_0x40145c(0x192)+_0x5c6189+':\x20'+_0xb8325[_0x40145c(0x171)]);}else{if(_0x500ea3[_0x40145c(0x1be)](_0x241f09,'continue'))break;}}_0x10da3c={..._0x10da3c,'url':_0x5c6189};}let _0x5352c5=![];try{_0x5352c5=await tryAutoRouteCloudProfile(_0x486160,_0x10da3c['url'],_0x10da3c,_0x324881,_0x29f5bd);}catch(_0x565025){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x486160+'\x22:\x20'+(_0x500ea3['BdDDK'](_0x565025,Error)?_0x565025['message']:String(_0x565025))),process[_0x40145c(0x19e)](0x1);}!_0x5352c5&&process['exit'](0x1),await markActive(_0x486160);}
@@ -1 +1 @@
1
- function _0x386b(){var _0x5ee645=['5110260DBHeuA','8745219zNXLDU','493788xEbdxd','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','EzvIg','13294CKvlGK','exit','318UsZTBg','40QZNNxx','418732upHyBg','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','zsBcy','\x20\x20https://docs.ranger.net/main/concepts/profiles','989244VUpUkI','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','5186237EeYAMW','8BavNrV','CSkRm','qBxuj'];_0x386b=function(){return _0x5ee645;};return _0x386b();}function _0x8cb0(_0x4e7c1d,_0x588548){_0x4e7c1d=_0x4e7c1d-0xc8;var _0x386b18=_0x386b();var _0x8cb01e=_0x386b18[_0x4e7c1d];return _0x8cb01e;}(function(_0x596e2f,_0x4d90bc){var _0x11589c=_0x8cb0,_0x16d8d6=_0x596e2f();while(!![]){try{var _0xc1ed2f=parseInt(_0x11589c(0xd8))/0x1+-parseInt(_0x11589c(0xd4))/0x2*(-parseInt(_0x11589c(0xd6))/0x3)+-parseInt(_0x11589c(0xd1))/0x4*(parseInt(_0x11589c(0xd7))/0x5)+parseInt(_0x11589c(0xc9))/0x6+-parseInt(_0x11589c(0xcb))/0x7*(-parseInt(_0x11589c(0xcc))/0x8)+-parseInt(_0x11589c(0xd0))/0x9+parseInt(_0x11589c(0xcf))/0xa;if(_0xc1ed2f===_0x4d90bc)break;else _0x16d8d6['push'](_0x16d8d6['shift']());}catch(_0x1784e6){_0x16d8d6['push'](_0x16d8d6['shift']());}}}(_0x386b,0x8dce6));export async function authEncrypt(_0x436b7f){var _0x132da8=_0x8cb0,_0x8d7e63={'CSkRm':function(_0x3e01cc,_0x5c685c){return _0x3e01cc+_0x5c685c;},'qBxuj':function(_0x248c2c,_0x3ad4b4){return _0x248c2c+_0x3ad4b4;},'EzvIg':_0x132da8(0xd2),'BfHin':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','zsBcy':_0x132da8(0xc8)};console['error'](_0x8d7e63[_0x132da8(0xcd)](_0x8d7e63[_0x132da8(0xcd)](_0x8d7e63['qBxuj'](_0x8d7e63[_0x132da8(0xce)](_0x8d7e63[_0x132da8(0xce)](_0x132da8(0xca)+_0x132da8(0xd9),'\x0a')+'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a',_0x8d7e63[_0x132da8(0xd3)]),'\x0a'),_0x8d7e63['BfHin']),_0x8d7e63[_0x132da8(0xda)])),process[_0x132da8(0xd5)](0x1);}
1
+ (function(_0x4d0866,_0x3f22a9){var _0xdd6530=_0x3310,_0x7e0c2d=_0x4d0866();while(!![]){try{var _0x43348d=parseInt(_0xdd6530(0xba))/0x1*(-parseInt(_0xdd6530(0xc5))/0x2)+parseInt(_0xdd6530(0xbf))/0x3*(parseInt(_0xdd6530(0xc4))/0x4)+parseInt(_0xdd6530(0xc1))/0x5+-parseInt(_0xdd6530(0xbd))/0x6*(parseInt(_0xdd6530(0xb9))/0x7)+-parseInt(_0xdd6530(0xc2))/0x8+parseInt(_0xdd6530(0xbe))/0x9+-parseInt(_0xdd6530(0xbb))/0xa;if(_0x43348d===_0x3f22a9)break;else _0x7e0c2d['push'](_0x7e0c2d['shift']());}catch(_0x1637f9){_0x7e0c2d['push'](_0x7e0c2d['shift']());}}}(_0x132a,0x6c3d8));function _0x3310(_0x42780f,_0x452b8f){_0x42780f=_0x42780f-0xb8;var _0x132a80=_0x132a();var _0x33101f=_0x132a80[_0x42780f];return _0x33101f;}export async function authEncrypt(_0x47250d){var _0xe085f0=_0x3310,_0x778edc={'lbLFR':function(_0x1aa58e,_0x452279){return _0x1aa58e+_0x452279;},'BQDam':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','ZJzMd':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'};console['error'](_0x778edc[_0xe085f0(0xc0)](_0x778edc[_0xe085f0(0xc0)](_0x778edc[_0xe085f0(0xc0)](_0x778edc['lbLFR']('ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a'+_0x778edc['BQDam']+'\x0a',_0x778edc[_0xe085f0(0xc3)]),_0xe085f0(0xbc))+'\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),_0xe085f0(0xb8))),process[_0xe085f0(0xc6)](0x1);}function _0x132a(){var _0x3e2285=['241507NKILDf','13abvEDZ','8047890ORuzBI','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','84FxpCxo','7504740YuvrxT','3rvMJsW','lbLFR','1326900JarBEu','135960oskQWo','ZJzMd','2793812YxmoXh','7622XBUtfo','exit','\x20\x20https://docs.ranger.net/main/concepts/profiles'];_0x132a=function(){return _0x3e2285;};return _0x132a();}
@@ -1 +1 @@
1
- const _0x1ca61e=_0x2880;(function(_0x570da4,_0x20ce8d){const _0x30fc59=_0x2880,_0x586888=_0x570da4();while(!![]){try{const _0x333134=parseInt(_0x30fc59(0xbd))/0x1*(parseInt(_0x30fc59(0xe0))/0x2)+parseInt(_0x30fc59(0xc0))/0x3*(-parseInt(_0x30fc59(0xd1))/0x4)+parseInt(_0x30fc59(0xeb))/0x5*(-parseInt(_0x30fc59(0xc2))/0x6)+parseInt(_0x30fc59(0xcc))/0x7+-parseInt(_0x30fc59(0xc8))/0x8+parseInt(_0x30fc59(0xb9))/0x9+parseInt(_0x30fc59(0xc4))/0xa;if(_0x333134===_0x20ce8d)break;else _0x586888['push'](_0x586888['shift']());}catch(_0x3ee311){_0x586888['push'](_0x586888['shift']());}}}(_0x24d8,0x3dd33));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x2880(_0x55102f,_0x158dd3){_0x55102f=_0x55102f-0xb2;const _0x24d866=_0x24d8();let _0x2880fb=_0x24d866[_0x55102f];return _0x2880fb;}function _0x24d8(){const _0x4ba79c=['fJTrP','YmNvs','KihPK','848208ytIocR','jPWSv','lDxKg','\x0a✅\x20Cleanup\x20complete!\x0a','38003Cpftej','LWEby','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','trailhead','push','4SdlZyc','plugin','DuGLP','--scope','close','XUSZT','TKLgh','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','StYzs','log','fncPT','UziTI','SvcYE','parse','cCkQk','115042yqxrrM','yPNnS','@ranger-testing/opencode-plugin','YAcOe','IAQfQ','user','claude','sHXwZ','feature-tracker','TOjtW','platform','10TRuzMd','ignore','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','e2e-test-recommender','CAHZE','stringify','OgxSH','replace','864099tFjJYm','AWBdw','uninstall','length','1tJgEOK','filter','OCQDl','1387329UgYfkh','project','880662AiAUCm','Hbpch','9562970XYtrEd'];_0x24d8=function(){return _0x4ba79c;};return _0x24d8();}import{spawn}from'child_process';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=['ranger',_0x1ca61e(0xe8),'bug-bash',_0x1ca61e(0xb4)],opencodePluginName=_0x1ca61e(0xe2);function parseJsonc(_0x3deff6){const _0x2c16e4=_0x1ca61e,_0x27cfd1=_0x3deff6['replace'](/\/\*[\s\S]*?\*\//g,''),_0x117f4e=_0x27cfd1[_0x2c16e4(0xb8)](/^\s*\/\/.*$/gm,''),_0x96777e=_0x117f4e['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x2c16e4(0xde)](_0x96777e);}async function removeOpencodePluginConfig(_0x73bc1f){const _0x69efa8=_0x1ca61e,_0x2cadaa={'fJTrP':'string','GieIY':function(_0x56cc5c,_0x2e7a9c){return _0x56cc5c!==_0x2e7a9c;},'yPNnS':function(_0x2d1b99,_0x1d928c){return _0x2d1b99(_0x1d928c);},'fncPT':'utf-8','ACIgx':function(_0x55c258,_0x5bbb05){return _0x55c258(_0x5bbb05);},'yzLwG':function(_0x475550,_0x3f0da1){return _0x475550===_0x3f0da1;},'lvqWO':function(_0x500fd7,_0x25733d){return _0x500fd7===_0x25733d;},'DuGLP':function(_0x31b013,_0x259697){return _0x31b013===_0x259697;},'OgxSH':function(_0xa1d224,_0x377ea9){return _0xa1d224+_0x377ea9;}};if(!_0x2cadaa[_0x69efa8(0xe1)](existsSync,_0x73bc1f))return![];let _0xf44527;try{const _0x49be5c=await readFile(_0x73bc1f,_0x2cadaa[_0x69efa8(0xdb)]);_0xf44527=_0x2cadaa['ACIgx'](parseJsonc,_0x49be5c);}catch{return![];}const _0x2a85ab=Array['isArray'](_0xf44527[_0x69efa8(0xd2)])?_0xf44527['plugin']:[];if(_0x2cadaa['yzLwG'](_0x2a85ab['length'],0x0))return![];const _0x487f61=_0x2a85ab[_0x69efa8(0xbe)](_0x1d4660=>{const _0x237f63=_0x69efa8;if(typeof _0x1d4660!==_0x2cadaa[_0x237f63(0xc5)])return!![];return _0x2cadaa['GieIY'](_0x1d4660,opencodePluginName);});if(_0x2cadaa['lvqWO'](_0x487f61['length'],_0x2a85ab[_0x69efa8(0xbc)]))return![];return _0x2cadaa[_0x69efa8(0xd3)](_0x487f61[_0x69efa8(0xbc)],0x0)?delete _0xf44527['plugin']:_0xf44527['plugin']=_0x487f61,await writeFile(_0x73bc1f,_0x2cadaa[_0x69efa8(0xb7)](JSON[_0x69efa8(0xb6)](_0xf44527,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3a3f99){const _0x312a23=_0x1ca61e,_0x17b221={'OCQDl':function(_0x3da2b4,_0x4254f2){return _0x3da2b4===_0x4254f2;},'StYzs':function(_0x12b41c,_0x3a2cdd){return _0x12b41c(_0x3a2cdd);},'huKkn':_0x312a23(0xbb),'QAYyi':'ranger@trailhead','Watlu':function(_0x31127b){return _0x31127b();},'NHFcT':'win32','SvcYE':_0x312a23(0xd5),'MlvLV':'error'};return new Promise(_0x20d97f=>{const _0x25860a=_0x312a23,_0xd20f47={'mqfjX':function(_0xd86227,_0x4ad886){const _0xac0c35=_0x2880;return _0x17b221[_0xac0c35(0xbf)](_0xd86227,_0x4ad886);},'CAHZE':function(_0x4206c7,_0x8447ab){const _0x55dbe0=_0x2880;return _0x17b221[_0x55dbe0(0xd9)](_0x4206c7,_0x8447ab);}},_0x45c84f=['plugin',_0x17b221['huKkn'],_0x17b221['QAYyi']];_0x3a3f99&&_0x45c84f[_0x25860a(0xd0)](_0x25860a(0xd4),_0x3a3f99);const _0x596da2=spawn(_0x25860a(0xe6),_0x45c84f,{'stdio':['ignore','ignore','ignore'],'cwd':_0x3a3f99?_0x17b221['Watlu'](getProjectRoot):undefined,'shell':process[_0x25860a(0xea)]===_0x17b221['NHFcT']});_0x596da2['on'](_0x17b221[_0x25860a(0xdd)],_0x27cd2e=>{_0x20d97f(_0xd20f47['mqfjX'](_0x27cd2e,0x0));}),_0x596da2['on'](_0x17b221['MlvLV'],()=>{const _0x2e2e79=_0x25860a;_0xd20f47[_0x2e2e79(0xb5)](_0x20d97f,![]);});});}async function removeMarketplace(){const _0x15bea4=_0x1ca61e,_0x17079d={'AWBdw':_0x15bea4(0xe6),'YAcOe':'marketplace','JlGmP':'remove','UziTI':_0x15bea4(0xb2),'YmNvs':'win32'};return new Promise(_0x480d5d=>{const _0x3b4994=_0x15bea4,_0x4a44a2=spawn(_0x17079d[_0x3b4994(0xba)],['plugin',_0x17079d[_0x3b4994(0xe3)],_0x17079d['JlGmP'],_0x3b4994(0xcf)],{'stdio':[_0x17079d['UziTI'],_0x17079d['UziTI'],_0x17079d[_0x3b4994(0xdc)]],'shell':process['platform']===_0x17079d[_0x3b4994(0xc6)]});_0x4a44a2['on']('close',_0x1af020=>{_0x480d5d(_0x1af020===0x0);}),_0x4a44a2['on']('error',()=>{_0x480d5d(![]);});});}export async function clean(){const _0x155224=_0x1ca61e,_0x49880d={'vkVML':_0x155224(0xce),'cCkQk':'✓\x20Removed\x20stored\x20credentials','jPWSv':function(_0x13fe8d){return _0x13fe8d();},'hgBjs':function(_0x4f6f1a,_0x6492b8){return _0x4f6f1a(_0x6492b8);},'OGKeI':function(_0x3918b2,_0x52d05d,_0x26dc7b){return _0x3918b2(_0x52d05d,_0x26dc7b);},'XUSZT':function(_0x219675,_0xe70210,_0x5f0fa2){return _0x219675(_0xe70210,_0x5f0fa2);},'kYUoP':function(_0x3e138d,_0x1ac38a){return _0x3e138d(_0x1ac38a);},'wPEvI':function(_0x17c562,_0x6e5478,_0x4d9e8a){return _0x17c562(_0x6e5478,_0x4d9e8a);},'LWEby':'user','OKdkS':function(_0x524dd1,_0x5a5ef0,_0x1958fe){return _0x524dd1(_0x5a5ef0,_0x1958fe);},'TKLgh':function(_0x453a4d,_0xa2ca00,_0x32f40b){return _0x453a4d(_0xa2ca00,_0x32f40b);},'sHXwZ':function(_0x194936,_0x12040b){return _0x194936(_0x12040b);},'KihPK':'project','IAQfQ':'opencode.json','lDxKg':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','TOjtW':function(_0x16a205,_0x5648d7){return _0x16a205(_0x5648d7);},'Hbpch':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'};console['log'](_0x49880d['vkVML']);let _0x180f65=![];try{await deleteAllCredentials(),console[_0x155224(0xda)](_0x49880d[_0x155224(0xdf)]),_0x180f65=!![];}catch{}const _0x51376b=_0x49880d[_0x155224(0xc9)](getCacheFile);existsSync(_0x51376b)&&(await _0x49880d['hgBjs'](rm,_0x51376b),_0x180f65=!![]);const _0x2e6c4a=_0x49880d['jPWSv'](getRangerDir);existsSync(_0x2e6c4a)&&(await _0x49880d['OGKeI'](rm,_0x2e6c4a,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x180f65=!![]);const _0x1bcc22=getProjectSkillsDir();for(const _0x152caf of skillsToRemove){const _0x107e64=join(_0x1bcc22,_0x152caf);existsSync(_0x107e64)&&(await rm(_0x107e64,{'recursive':!![]}),console[_0x155224(0xda)]('✓\x20Removed\x20project\x20skill:\x20'+_0x152caf),_0x180f65=!![]);}const _0x28e706=getUserSkillsDir();for(const _0x274cfb of skillsToRemove){const _0x394655=join(_0x28e706,_0x274cfb);existsSync(_0x394655)&&(await _0x49880d[_0x155224(0xd6)](rm,_0x394655,{'recursive':!![]}),console[_0x155224(0xda)]('✓\x20Removed\x20user\x20skill:\x20'+_0x274cfb),_0x180f65=!![]);}const _0x443ce4=_0x49880d['kYUoP'](getOpencodeSkillsDir,'project');for(const _0x2ede15 of skillsToRemove){const _0x57d776=join(_0x443ce4,_0x2ede15);existsSync(_0x57d776)&&(await _0x49880d['wPEvI'](rm,_0x57d776,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x2ede15),_0x180f65=!![]);}const _0xf1a09f=getOpencodeSkillsDir(_0x49880d[_0x155224(0xcd)]);for(const _0x4b1ece of skillsToRemove){const _0x3a2bbc=join(_0xf1a09f,_0x4b1ece);existsSync(_0x3a2bbc)&&(await _0x49880d['OKdkS'](rm,_0x3a2bbc,{'recursive':!![]}),console['log'](_0x155224(0xb3)+_0x4b1ece),_0x180f65=!![]);}const _0x2b90ce=_0x49880d[_0x155224(0xd7)](join,_0x49880d[_0x155224(0xe7)](getOpencodeConfigDir,_0x49880d[_0x155224(0xc7)]),_0x49880d[_0x155224(0xe4)]);await removeOpencodePluginConfig(_0x2b90ce)&&(console['log'](_0x49880d[_0x155224(0xca)]),_0x180f65=!![]);const _0x4998c5=join(_0x49880d[_0x155224(0xe9)](getOpencodeConfigDir,_0x155224(0xe5)),_0x49880d['IAQfQ']);await _0x49880d[_0x155224(0xe7)](removeOpencodePluginConfig,_0x4998c5)&&(console[_0x155224(0xda)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x180f65=!![]);const _0x166228=await uninstallClaudePlugin();_0x166228&&(console[_0x155224(0xda)](_0x49880d[_0x155224(0xc3)]),_0x180f65=!![]);const _0x177345=await _0x49880d['hgBjs'](uninstallClaudePlugin,_0x155224(0xc1));_0x177345&&(console['log'](_0x155224(0xd8)),_0x180f65=!![]);const _0x271907=await removeMarketplace();_0x271907&&(console[_0x155224(0xda)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x180f65=!![]),_0x180f65?console['log'](_0x155224(0xcb)):console[_0x155224(0xda)]('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x5d2372=_0x4161;(function(_0x3754d7,_0x1e49e8){const _0x36f09f=_0x4161,_0x3b7c8f=_0x3754d7();while(!![]){try{const _0x115fa5=parseInt(_0x36f09f(0x10b))/0x1*(-parseInt(_0x36f09f(0x11a))/0x2)+parseInt(_0x36f09f(0x117))/0x3+-parseInt(_0x36f09f(0x137))/0x4+parseInt(_0x36f09f(0x10d))/0x5+-parseInt(_0x36f09f(0x11d))/0x6*(parseInt(_0x36f09f(0x11b))/0x7)+parseInt(_0x36f09f(0x127))/0x8*(-parseInt(_0x36f09f(0x115))/0x9)+-parseInt(_0x36f09f(0x126))/0xa*(-parseInt(_0x36f09f(0x112))/0xb);if(_0x115fa5===_0x1e49e8)break;else _0x3b7c8f['push'](_0x3b7c8f['shift']());}catch(_0x3e569b){_0x3b7c8f['push'](_0x3b7c8f['shift']());}}}(_0x12bc,0x91a9d));function _0x4161(_0x284119,_0x2332c9){_0x284119=_0x284119-0x104;const _0x12bc73=_0x12bc();let _0x4161c1=_0x12bc73[_0x284119];return _0x4161c1;}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';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x12bc(){const _0x991d0f=['project','2315165AEJIeb','utf-8','fBphD','bug-bash','isArray','31911ndRGEA','ifnLF','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','1953OfAsTa','ignore','2372265eplwrS','error','replace','52976JEstjG','7408737lnwbZi','fFKTI','6umzabW','jJvPO','OLUJl','--scope','DlGot','close','Zdolj','opiPp','platform','4030xnYBur','15184yauTQj','VqYuu','plugin','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','DBaBk','opencode.json','MUepC','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','InfSL','ranger@trailhead','MMkfO','length','PcGWZ','LETuV','46612DRnYXY','feature-tracker','✓\x20Removed\x20project\x20skill:\x20','e2e-test-recommender','aWUsg','mJSyE','stringify','sCMqF','glLAs','yTOCR','bGHCE','log','EySGE','✓\x20Removed\x20.ranger/\x20directory','\x0a✅\x20Cleanup\x20complete!\x0a','sHMBr','fdGGt','13cRMNzC'];_0x12bc=function(){return _0x991d0f;};return _0x12bc();}import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x5d2372(0x138),_0x5d2372(0x110),_0x5d2372(0x13a)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x1e4d0b){const _0x4eb74d=_0x5d2372,_0xefd507=_0x1e4d0b['replace'](/\/\*[\s\S]*?\*\//g,''),_0x9cf462=_0xefd507[_0x4eb74d(0x119)](/^\s*\/\/.*$/gm,''),_0x37e6b9=_0x9cf462['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x37e6b9);}async function removeOpencodePluginConfig(_0x5c1531){const _0x5943b3=_0x5d2372,_0xa1bf1f={'CWQvr':'string','sHMBr':function(_0x34fe7a,_0x338357,_0x2785dd){return _0x34fe7a(_0x338357,_0x2785dd);},'xGjro':function(_0x3166ce,_0x13a288){return _0x3166ce(_0x13a288);},'sCMqF':function(_0x1f680e,_0x15d326){return _0x1f680e===_0x15d326;},'mJSyE':function(_0x2bc812,_0x1bd34c){return _0x2bc812===_0x1bd34c;}};if(!existsSync(_0x5c1531))return![];let _0x33f611;try{const _0x44522f=await _0xa1bf1f[_0x5943b3(0x109)](readFile,_0x5c1531,_0x5943b3(0x10e));_0x33f611=_0xa1bf1f['xGjro'](parseJsonc,_0x44522f);}catch{return![];}const _0x161f4a=Array[_0x5943b3(0x111)](_0x33f611[_0x5943b3(0x129)])?_0x33f611['plugin']:[];if(_0xa1bf1f[_0x5943b3(0x13e)](_0x161f4a[_0x5943b3(0x134)],0x0))return![];const _0x277c9b=_0x161f4a['filter'](_0x212241=>{if(typeof _0x212241!==_0xa1bf1f['CWQvr'])return!![];return _0x212241!==opencodePluginName;});if(_0xa1bf1f[_0x5943b3(0x13c)](_0x277c9b[_0x5943b3(0x134)],_0x161f4a[_0x5943b3(0x134)]))return![];return _0x277c9b[_0x5943b3(0x134)]===0x0?delete _0x33f611[_0x5943b3(0x129)]:_0x33f611[_0x5943b3(0x129)]=_0x277c9b,await _0xa1bf1f[_0x5943b3(0x109)](writeFile,_0x5c1531,JSON[_0x5943b3(0x13d)](_0x33f611,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0xd8fa18){const _0x1d4b63=_0x5d2372,_0x55899a={'EySGE':_0x1d4b63(0x129),'DbQTi':'uninstall','uQgYn':function(_0x2c3a50,_0x421a83,_0xc5cf12,_0x5196a0){return _0x2c3a50(_0x421a83,_0xc5cf12,_0x5196a0);},'fFKTI':'claude','UWQMV':function(_0x5f38f9){return _0x5f38f9();},'Zdolj':function(_0xd83f38,_0x489da0){return _0xd83f38===_0x489da0;},'MMkfO':_0x1d4b63(0x122)};return new Promise(_0x31749c=>{const _0xe3c757=_0x1d4b63,_0x5324aa={'LETuV':function(_0x3463c0,_0x47a19c){return _0x3463c0===_0x47a19c;}},_0x2334dc=[_0x55899a[_0xe3c757(0x106)],_0x55899a['DbQTi'],_0xe3c757(0x132)];_0xd8fa18&&_0x2334dc['push'](_0xe3c757(0x120),_0xd8fa18);const _0x36f3bc=_0x55899a['uQgYn'](spawn,_0x55899a[_0xe3c757(0x11c)],_0x2334dc,{'stdio':['ignore',_0xe3c757(0x116),'ignore'],'cwd':_0xd8fa18?_0x55899a['UWQMV'](getProjectRoot):undefined,'shell':_0x55899a[_0xe3c757(0x123)](process[_0xe3c757(0x125)],'win32')});_0x36f3bc['on'](_0x55899a[_0xe3c757(0x133)],_0x43538d=>{const _0x509087=_0xe3c757;_0x31749c(_0x5324aa[_0x509087(0x136)](_0x43538d,0x0));}),_0x36f3bc['on']('error',()=>{_0x31749c(![]);});});}async function removeMarketplace(){const _0x3e5391=_0x5d2372,_0x3b0d71={'InfSL':function(_0x4e1e40,_0x567049){return _0x4e1e40===_0x567049;},'yTOCR':function(_0x490b58,_0xbeaa57,_0x1778f2,_0x2256bb){return _0x490b58(_0xbeaa57,_0x1778f2,_0x2256bb);},'OLUJl':'claude','EwLVi':'plugin','glLAs':'marketplace','KOhSf':'trailhead','PcGWZ':_0x3e5391(0x116),'mzArr':'win32'};return new Promise(_0x3f96ab=>{const _0x9ee895=_0x3e5391,_0x58ddc5=_0x3b0d71[_0x9ee895(0x140)](spawn,_0x3b0d71[_0x9ee895(0x11f)],[_0x3b0d71['EwLVi'],_0x3b0d71[_0x9ee895(0x13f)],'remove',_0x3b0d71['KOhSf']],{'stdio':[_0x3b0d71['PcGWZ'],_0x3b0d71[_0x9ee895(0x135)],'ignore'],'shell':process[_0x9ee895(0x125)]===_0x3b0d71['mzArr']});_0x58ddc5['on'](_0x9ee895(0x122),_0x5de54a=>{const _0x4ee43c=_0x9ee895;_0x3f96ab(_0x3b0d71[_0x4ee43c(0x131)](_0x5de54a,0x0));}),_0x58ddc5['on'](_0x9ee895(0x118),()=>{_0x3f96ab(![]);});});}export async function clean(){const _0xde93ae=_0x5d2372,_0x586c0b={'bGHCE':function(_0x39b19e){return _0x39b19e();},'VqYuu':'✓\x20Removed\x20stored\x20credentials','NiuRC':function(_0x36a7c8,_0x2f5d6e){return _0x36a7c8(_0x2f5d6e);},'aWUsg':function(_0x350a68,_0x1cbfbf,_0x10d80b){return _0x350a68(_0x1cbfbf,_0x10d80b);},'fdGGt':function(_0x580ab9){return _0x580ab9();},'HjpQT':function(_0x33d016,_0x5b5ed2){return _0x33d016(_0x5b5ed2);},'opiPp':function(_0x413d5c,_0xf23a84,_0x545736){return _0x413d5c(_0xf23a84,_0x545736);},'DlGot':function(_0x6fcf73,_0x52357e){return _0x6fcf73(_0x52357e);},'fBphD':_0xde93ae(0x10c),'fdPhq':function(_0xdc4aa5,_0x1cca35){return _0xdc4aa5(_0x1cca35);},'jJvPO':_0xde93ae(0x12b),'ifnLF':_0xde93ae(0x12d),'YEbub':function(_0x2371e5){return _0x2371e5();},'dqyjp':function(_0x43b38c){return _0x43b38c();},'MUepC':'✓\x20Removed\x20trailhead\x20marketplace','DBaBk':'Nothing\x20to\x20clean\x20up.\x0a'};console[_0xde93ae(0x105)](_0xde93ae(0x12f));let _0x7c4ec4=![];try{await _0x586c0b[_0xde93ae(0x104)](deleteAllCredentials),console['log'](_0x586c0b[_0xde93ae(0x128)]),_0x7c4ec4=!![];}catch{}const _0x3829df=_0x586c0b[_0xde93ae(0x104)](getCacheFile);existsSync(_0x3829df)&&(await rm(_0x3829df),_0x7c4ec4=!![]);const _0xd32b48=_0x586c0b['bGHCE'](getRangerDir);existsSync(_0xd32b48)&&(await rm(_0xd32b48,{'recursive':!![]}),console[_0xde93ae(0x105)](_0xde93ae(0x107)),_0x7c4ec4=!![]);const _0x37e404=_0x586c0b['bGHCE'](getProjectSkillsDir);for(const _0x3f008f of skillsToRemove){const _0x337b80=join(_0x37e404,_0x3f008f);_0x586c0b['NiuRC'](existsSync,_0x337b80)&&(await _0x586c0b['aWUsg'](rm,_0x337b80,{'recursive':!![]}),console['log'](_0xde93ae(0x139)+_0x3f008f),_0x7c4ec4=!![]);}const _0x9e10f2=_0x586c0b[_0xde93ae(0x10a)](getUserSkillsDir);for(const _0x5b76e4 of skillsToRemove){const _0x134115=join(_0x9e10f2,_0x5b76e4);existsSync(_0x134115)&&(await _0x586c0b[_0xde93ae(0x13b)](rm,_0x134115,{'recursive':!![]}),console[_0xde93ae(0x105)]('✓\x20Removed\x20user\x20skill:\x20'+_0x5b76e4),_0x7c4ec4=!![]);}const _0x1b6a85=getOpencodeSkillsDir('project');for(const _0x1a54d8 of skillsToRemove){const _0x8c745a=join(_0x1b6a85,_0x1a54d8);existsSync(_0x8c745a)&&(await _0x586c0b['aWUsg'](rm,_0x8c745a,{'recursive':!![]}),console['log'](_0xde93ae(0x12a)+_0x1a54d8),_0x7c4ec4=!![]);}const _0xce08dd=_0x586c0b['HjpQT'](getOpencodeSkillsDir,'user');for(const _0x330c18 of skillsToRemove){const _0x4eb125=_0x586c0b[_0xde93ae(0x124)](join,_0xce08dd,_0x330c18);_0x586c0b[_0xde93ae(0x121)](existsSync,_0x4eb125)&&(await _0x586c0b['aWUsg'](rm,_0x4eb125,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x330c18),_0x7c4ec4=!![]);}const _0x507756=join(getOpencodeConfigDir(_0x586c0b[_0xde93ae(0x10f)]),_0xde93ae(0x12d));await _0x586c0b['fdPhq'](removeOpencodePluginConfig,_0x507756)&&(console[_0xde93ae(0x105)](_0x586c0b[_0xde93ae(0x11e)]),_0x7c4ec4=!![]);const _0x3a679c=join(getOpencodeConfigDir('user'),_0x586c0b[_0xde93ae(0x113)]);await _0x586c0b['DlGot'](removeOpencodePluginConfig,_0x3a679c)&&(console['log'](_0xde93ae(0x114)),_0x7c4ec4=!![]);const _0x2cc49d=await _0x586c0b['YEbub'](uninstallClaudePlugin);_0x2cc49d&&(console[_0xde93ae(0x105)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x7c4ec4=!![]);const _0x22f603=await uninstallClaudePlugin(_0x586c0b['fBphD']);_0x22f603&&(console['log'](_0xde93ae(0x130)),_0x7c4ec4=!![]);const _0x516ff9=await _0x586c0b['dqyjp'](removeMarketplace);_0x516ff9&&(console['log'](_0x586c0b[_0xde93ae(0x12e)]),_0x7c4ec4=!![]),_0x7c4ec4?console['log'](_0xde93ae(0x108)):console['log'](_0x586c0b[_0xde93ae(0x12c)]);}
@@ -1 +1 @@
1
- const _0x576a7e=_0x444d;(function(_0x52d19e,_0x2e0fd2){const _0x5c396c=_0x444d,_0x4b7cad=_0x52d19e();while(!![]){try{const _0x944ba4=-parseInt(_0x5c396c(0x1f3))/0x1*(-parseInt(_0x5c396c(0x208))/0x2)+parseInt(_0x5c396c(0x1f1))/0x3+parseInt(_0x5c396c(0x1fc))/0x4+-parseInt(_0x5c396c(0x20b))/0x5+-parseInt(_0x5c396c(0x20e))/0x6*(parseInt(_0x5c396c(0x1f7))/0x7)+parseInt(_0x5c396c(0x217))/0x8+parseInt(_0x5c396c(0x213))/0x9*(-parseInt(_0x5c396c(0x1ee))/0xa);if(_0x944ba4===_0x2e0fd2)break;else _0x4b7cad['push'](_0x4b7cad['shift']());}catch(_0xb3e289){_0x4b7cad['push'](_0x4b7cad['shift']());}}}(_0x2f6a,0xaf8b5));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=[_0x576a7e(0x200),_0x576a7e(0x209),_0x576a7e(0x1ff)];function parseLocalValue(_0x2bc58a,_0x2cc529){const _0x1cbb7b=_0x576a7e,_0x5be45a={'tFmNb':function(_0xf9d30f,_0x315eea){return _0xf9d30f===_0x315eea;},'FJTqo':'false'};if(BOOLEAN_KEYS[_0x1cbb7b(0x1ef)](_0x2bc58a)){if(_0x2cc529==='true')return!![];if(_0x5be45a[_0x1cbb7b(0x210)](_0x2cc529,_0x5be45a['FJTqo']))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x2bc58a+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x2cc529;}function parseOverrideValue(_0x11dc7f){const _0x1c25e6=_0x576a7e,_0x435818={'NwLgO':function(_0x43661f,_0x5a8b40){return _0x43661f===_0x5a8b40;},'APhKd':_0x1c25e6(0x215),'OpxIL':'undefined','BrZHO':function(_0x264d77,_0x2884ca){return _0x264d77(_0x2884ca);}};if(_0x435818[_0x1c25e6(0x1fe)](_0x11dc7f,_0x435818['APhKd']))return!![];if(_0x11dc7f===_0x1c25e6(0x216))return![];if(_0x11dc7f===_0x1c25e6(0x204))return null;if(_0x435818[_0x1c25e6(0x1fe)](_0x11dc7f,_0x435818[_0x1c25e6(0x211)]))return undefined;if(/^-?\d+$/['test'](_0x11dc7f)){const _0xf2411b=_0x435818[_0x1c25e6(0x1f8)](Number,_0x11dc7f);if(Number['isSafeInteger'](_0xf2411b))return _0xf2411b;}if(/^-?\d+\.\d+$/['test'](_0x11dc7f)){const _0x46ef15=_0x435818['BrZHO'](Number,_0x11dc7f);if(!Number['isNaN'](_0x46ef15))return _0x46ef15;}const _0xaf7eb3=_0x11dc7f[_0x1c25e6(0x21d)]();if(_0xaf7eb3[_0x1c25e6(0x1fd)]('{')&&_0xaf7eb3['endsWith']('}')||_0xaf7eb3['startsWith']('[')&&_0xaf7eb3['endsWith'](']'))try{return JSON['parse'](_0xaf7eb3);}catch{}return _0x11dc7f;}async function resolveProfileTarget(_0x1fce55){const _0x899b32=_0x576a7e,_0x111085={'WHEmn':function(_0x3343cb,_0x5a79f9){return _0x3343cb(_0x5a79f9);},'onQNs':function(_0xd457d0,_0x4c0b1b){return _0xd457d0(_0x4c0b1b);},'YMRdZ':'local'},_0xd5c76e=existsSync(_0x111085['WHEmn'](getEnvDir,_0x1fce55));let _0x2afba2=![];try{const _0x54b784=await _0x111085['onQNs'](fetchCloudProfile,_0x1fce55);_0x2afba2=Boolean(_0x54b784);}catch{}if(_0x2afba2)return{'kind':'cloud','alsoExistsElsewhere':_0xd5c76e};if(_0xd5c76e)return{'kind':_0x111085[_0x899b32(0x1f5)],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x1fce55+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x1fce55);}function _0x444d(_0x5aa33b,_0x418bd9){_0x5aa33b=_0x5aa33b-0x1ee;const _0x2f6a0e=_0x2f6a();let _0x444d48=_0x2f6a0e[_0x5aa33b];return _0x444d48;}function printDualExistsHint(_0x1e7f92){const _0x11be7a=_0x576a7e;console['log'](_0x11be7a(0x207)+_0x1e7f92+_0x11be7a(0x21e));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x2376d7){const _0x39304b={'WlZtk':function(_0x37a189,_0x14bb39){return _0x37a189(_0x14bb39);}},_0x1fe291=await _0x39304b['WlZtk'](fetchCloudProfile,_0x2376d7),_0x2eae20=readProfileOverrides(getProjectPath(),_0x2376d7);return mergeCloudProfileSettings(_0x1fe291?.['settings']??{},_0x2eae20??undefined);}function _0x2f6a(){const _0x151f44=['BrZHO','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','length','kind','3825776JXIrkG','startsWith','NwLgO','forceLogin','headless','Key\x20\x22','object','(not\x20set)','null','No\x20configuration\x20set\x20for\x20\x22','piVAo','\x20\x20Note:\x20\x22','2zjuUAE','allowInsecureLocalhost','KjflE','6902080lDOcJN','rsHsU','Removed\x20','18wcAnqV','Dffiy','tFmNb','OpxIL','cloud','3132306HlEnTy','yUXBp','true','false','3190984RVHrWw','\x20for\x20\x22','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','WYOue','psmOp','Set\x20','trim','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','20ikumvj','includes','log','3860340vFWwon','\x20=\x20','419201neXVox','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','YMRdZ','stringify','620165AbvFTA'];_0x2f6a=function(){return _0x151f44;};return _0x2f6a();}export async function configSet(_0x309910,_0x3b9d00,_0x5c3b0f){const _0x56f87b=_0x576a7e,_0x3b844c={'HAGDr':function(_0x4444f2,_0x423791){return _0x4444f2(_0x423791);},'rsHsU':function(_0x277adf,_0x4626c6){return _0x277adf===_0x4626c6;},'CRUIu':_0x56f87b(0x212),'faojP':function(_0x1e2898,_0x5bab33,_0x340bea,_0xfc88f9,_0x4a8bee){return _0x1e2898(_0x5bab33,_0x340bea,_0xfc88f9,_0x4a8bee);},'YRPuL':function(_0x4dd68e,_0x394ef9,_0x417eca){return _0x4dd68e(_0x394ef9,_0x417eca);},'piVAo':function(_0xf4e50d){return _0xf4e50d();}},_0x4114b5=await _0x3b844c['HAGDr'](resolveProfileTarget,_0x309910);if(_0x3b844c[_0x56f87b(0x20c)](_0x4114b5['kind'],_0x3b844c['CRUIu'])){if(_0x4114b5['alsoExistsElsewhere'])printDualExistsHint(_0x309910);const _0x2cc762=parseOverrideValue(_0x5c3b0f);_0x3b844c['faojP'](setProfileOverride,getProjectPath(),_0x309910,_0x3b9d00,_0x2cc762),console['log'](_0x56f87b(0x21c)+_0x3b9d00+_0x56f87b(0x1f2)+JSON[_0x56f87b(0x1f6)](_0x2cc762)+_0x56f87b(0x218)+_0x309910+'\x22');return;}const _0xe96074=_0x3b844c['YRPuL'](parseLocalValue,_0x3b9d00,_0x5c3b0f);setProfileOverride(_0x3b844c[_0x56f87b(0x206)](getProjectPath),_0x309910,_0x3b9d00,_0xe96074),console['log'](_0x56f87b(0x21c)+_0x3b9d00+'\x20=\x20'+_0xe96074+_0x56f87b(0x218)+_0x309910+'\x22');}export async function configGet(_0x3aa5c1,_0x4273a0){const _0x178c66=_0x576a7e,_0xccd180={'WYOue':function(_0x26d79f,_0x3d8c95){return _0x26d79f(_0x3d8c95);},'gAyaq':function(_0x2215d2,_0x105fa2){return _0x2215d2===_0x105fa2;},'htIRz':'cloud','yUXBp':function(_0x697c58,_0x14d82e,_0x528099){return _0x697c58(_0x14d82e,_0x528099);}},_0x2e35c5=await _0xccd180['WYOue'](resolveProfileTarget,_0x3aa5c1);if(_0xccd180['gAyaq'](_0x2e35c5[_0x178c66(0x1fb)],_0xccd180['htIRz'])){const _0x142971=await _0xccd180[_0x178c66(0x21a)](loadEffectiveCloudSettings,_0x3aa5c1),_0x48342c=_0xccd180[_0x178c66(0x214)](getNestedValue,_0x142971,_0x4273a0);if(_0x48342c===undefined)console[_0x178c66(0x1f0)]('(not\x20set)');else typeof _0x48342c==='object'?console['log'](JSON['stringify'](_0x48342c,null,0x2)):console['log'](_0x48342c);return;}const _0xc40574=await loadSettings(_0x3aa5c1),_0x2084fc=getNestedValue(_0xc40574,_0x4273a0);if(_0x2084fc===undefined)console[_0x178c66(0x1f0)](_0x178c66(0x203));else typeof _0x2084fc===_0x178c66(0x202)?console['log'](JSON[_0x178c66(0x1f6)](_0x2084fc,null,0x2)):console['log'](_0x2084fc);}export async function configList(_0x114c0e){const _0x19aebc=_0x576a7e,_0x5e5e40={'psmOp':function(_0xe29cea,_0x399b2a){return _0xe29cea===_0x399b2a;},'hYRGa':function(_0x3e9cc1,_0x24e659){return _0x3e9cc1(_0x24e659);},'KjflE':function(_0x82741f,_0x261229){return _0x82741f===_0x261229;}},_0x1a600f=await resolveProfileTarget(_0x114c0e);if(_0x5e5e40[_0x19aebc(0x21b)](_0x1a600f[_0x19aebc(0x1fb)],'cloud')){const _0x2ce7d9=await _0x5e5e40['hYRGa'](loadEffectiveCloudSettings,_0x114c0e);if(!_0x2ce7d9||_0x5e5e40[_0x19aebc(0x20a)](Object['keys'](_0x2ce7d9)[_0x19aebc(0x1fa)],0x0)){console[_0x19aebc(0x1f0)]('No\x20configuration\x20set\x20for\x20\x22'+_0x114c0e+'\x22');return;}console['log'](JSON['stringify'](_0x2ce7d9,null,0x2));return;}const _0x63a802=getSettingsPath(_0x114c0e);if(!existsSync(_0x63a802)){console['log'](_0x19aebc(0x205)+_0x114c0e+'\x22');return;}const _0x2f65bf=await loadSettings(_0x114c0e),_0x4794fc=_0x5e5e40['hYRGa'](formatSettings,_0x2f65bf);!_0x4794fc?console['log'](_0x19aebc(0x205)+_0x114c0e+'\x22'):console[_0x19aebc(0x1f0)](_0x4794fc);}export async function configUnset(_0x47a13b,_0x51a1dd){const _0x346346=_0x576a7e,_0x3c9cf5={'Dffiy':function(_0x771758,_0x29b4b9){return _0x771758(_0x29b4b9);},'zXMuZ':function(_0x2e0dc6,_0x41e65e){return _0x2e0dc6===_0x41e65e;}},_0x2b6589=await _0x3c9cf5['Dffiy'](resolveProfileTarget,_0x47a13b);if(_0x3c9cf5['zXMuZ'](_0x2b6589['kind'],_0x346346(0x212))){if(_0x2b6589['alsoExistsElsewhere'])_0x3c9cf5['Dffiy'](printDualExistsHint,_0x47a13b);const _0x211df2=unsetProfileOverride(getProjectPath(),_0x47a13b,_0x51a1dd);_0x211df2?console[_0x346346(0x1f0)]('Removed\x20'+_0x51a1dd+_0x346346(0x218)+_0x47a13b+'\x22'):console[_0x346346(0x1f0)](_0x346346(0x201)+_0x51a1dd+'\x22\x20not\x20found');return;}const _0x1718c8=unsetProfileOverride(getProjectPath(),_0x47a13b,_0x51a1dd);if(_0x1718c8){console[_0x346346(0x1f0)](_0x346346(0x20d)+_0x51a1dd);return;}const _0x261da9=await _0x3c9cf5[_0x346346(0x20f)](loadSettings,_0x47a13b),_0x38f405=deleteNestedValue(_0x261da9,_0x51a1dd);_0x38f405?console['log']('Key\x20\x22'+_0x51a1dd+_0x346346(0x1f4)+_0x47a13b+_0x346346(0x219)):console[_0x346346(0x1f0)]('Key\x20\x22'+_0x51a1dd+'\x22\x20not\x20found');}export async function configReset(_0x2b3519){const _0x469edf=_0x576a7e,_0x304a1f={'grnyI':function(_0x3db1e1,_0x1071e3){return _0x3db1e1===_0x1071e3;},'pmMjn':function(_0x4c31fd){return _0x4c31fd();}},_0x6993dc=await resolveProfileTarget(_0x2b3519);if(_0x304a1f['grnyI'](_0x6993dc[_0x469edf(0x1fb)],'cloud')){resetProfileOverrides(_0x304a1f['pmMjn'](getProjectPath),_0x2b3519),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x2b3519+'\x22');return;}console[_0x469edf(0x1f0)]('\x22'+_0x2b3519+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x2b3519+_0x469edf(0x1f9));}
1
+ (function(_0x51bae9,_0x486c26){const _0x380e27=_0x93b1,_0x143ce5=_0x51bae9();while(!![]){try{const _0x1af882=parseInt(_0x380e27(0xb2))/0x1*(parseInt(_0x380e27(0x90))/0x2)+parseInt(_0x380e27(0xb7))/0x3*(-parseInt(_0x380e27(0x9e))/0x4)+-parseInt(_0x380e27(0xa2))/0x5*(-parseInt(_0x380e27(0x96))/0x6)+parseInt(_0x380e27(0xa5))/0x7+parseInt(_0x380e27(0xb0))/0x8*(-parseInt(_0x380e27(0x9c))/0x9)+parseInt(_0x380e27(0x8c))/0xa+-parseInt(_0x380e27(0xa6))/0xb;if(_0x1af882===_0x486c26)break;else _0x143ce5['push'](_0x143ce5['shift']());}catch(_0x10e46c){_0x143ce5['push'](_0x143ce5['shift']());}}}(_0x15ae,0x7784c));function _0x15ae(){const _0x2d5b6c=['false','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','UvrJF','2805470MiAsQM','log','slnhh','umXDR','1376558SXrFhv','Key\x20\x22','settings','trim','true','vDBcm','12vDESSE','cloud','startsWith','lwYlx','(not\x20set)','\x22\x20not\x20found','5163381woTWgI','\x20for\x20\x22','44syylGt','\x20=\x20','kind','LPdrs','224535TjXkeR','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','giKfd','5435507xuxDTA','469997oaMUCz','isSafeInteger','endsWith','includes','fJdGO','Invalid\x20value\x20for\x20','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','Profile\x20\x22','object','No\x20configuration\x20set\x20for\x20\x22','8WILUnI','gWLWa','1VOoHYR','OQjfN','test','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','yIXlZ','198861yIzvKo','alsoExistsElsewhere','udYxa','jcTYj','cwd','stringify','DXzka','Set\x20','lGilD'];_0x15ae=function(){return _0x2d5b6c;};return _0x15ae();}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=['headless','allowInsecureLocalhost','forceLogin'];function parseLocalValue(_0x555455,_0x28d824){const _0x5d25dd=_0x93b1,_0x22fd53={'LPdrs':function(_0x59d6e1,_0x46f014){return _0x59d6e1===_0x46f014;},'slnhh':_0x5d25dd(0x89)};if(BOOLEAN_KEYS[_0x5d25dd(0xa9)](_0x555455)){if(_0x22fd53['LPdrs'](_0x28d824,_0x5d25dd(0x94)))return!![];if(_0x22fd53[_0x5d25dd(0xa1)](_0x28d824,_0x22fd53[_0x5d25dd(0x8e)]))return![];throw new Error(_0x5d25dd(0xab)+_0x555455+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x28d824;}function _0x93b1(_0x5cbb2d,_0x555ffd){_0x5cbb2d=_0x5cbb2d-0x87;const _0x15ae09=_0x15ae();let _0x93b12b=_0x15ae09[_0x5cbb2d];return _0x93b12b;}function parseOverrideValue(_0x18b4e0){const _0x1a1ff8=_0x93b1,_0x1a9d29={'ODhvh':function(_0x3af97f,_0x448203){return _0x3af97f===_0x448203;},'ubLHd':_0x1a1ff8(0x89)};if(_0x1a9d29['ODhvh'](_0x18b4e0,_0x1a1ff8(0x94)))return!![];if(_0x18b4e0===_0x1a9d29['ubLHd'])return![];if(_0x18b4e0==='null')return null;if(_0x18b4e0==='undefined')return undefined;if(/^-?\d+$/[_0x1a1ff8(0xb4)](_0x18b4e0)){const _0x494e51=Number(_0x18b4e0);if(Number[_0x1a1ff8(0xa7)](_0x494e51))return _0x494e51;}if(/^-?\d+\.\d+$/['test'](_0x18b4e0)){const _0x319b5d=Number(_0x18b4e0);if(!Number['isNaN'](_0x319b5d))return _0x319b5d;}const _0x169a9c=_0x18b4e0[_0x1a1ff8(0x93)]();if(_0x169a9c['startsWith']('{')&&_0x169a9c[_0x1a1ff8(0xa8)]('}')||_0x169a9c[_0x1a1ff8(0x98)]('[')&&_0x169a9c[_0x1a1ff8(0xa8)](']'))try{return JSON['parse'](_0x169a9c);}catch{}return _0x18b4e0;}async function resolveProfileTarget(_0x2f8976){const _0x8c85cf=_0x93b1,_0x33b3b5={'QDqNG':function(_0x35e5a7,_0x2373f5){return _0x35e5a7(_0x2373f5);},'yqWmY':function(_0x4798dd,_0x1c110e){return _0x4798dd(_0x1c110e);},'SiFMO':function(_0x10eaf3,_0xba8807){return _0x10eaf3(_0xba8807);},'TjcSw':'cloud','DtJyt':'local'},_0x55aa2c=_0x33b3b5['QDqNG'](existsSync,_0x33b3b5['yqWmY'](getEnvDir,_0x2f8976));let _0xe59a7b=![];try{const _0x116fe3=await fetchCloudProfile(_0x2f8976);_0xe59a7b=_0x33b3b5['SiFMO'](Boolean,_0x116fe3);}catch{}if(_0xe59a7b)return{'kind':_0x33b3b5['TjcSw'],'alsoExistsElsewhere':_0x55aa2c};if(_0x55aa2c)return{'kind':_0x33b3b5['DtJyt'],'alsoExistsElsewhere':![]};throw new Error(_0x8c85cf(0xad)+_0x2f8976+_0x8c85cf(0xb5)+_0x2f8976);}function printDualExistsHint(_0x5350d8){const _0x5539cf=_0x93b1;console['log']('\x20\x20Note:\x20\x22'+_0x5350d8+_0x5539cf(0x8a));}function getProjectPath(){const _0x2c774b=_0x93b1;return process[_0x2c774b(0xbb)]();}async function loadEffectiveCloudSettings(_0x5c9bbb){const _0x5c90c3=_0x93b1,_0x410215={'pMSOI':function(_0x3fa9e7,_0x2f21a6,_0x5abbd3){return _0x3fa9e7(_0x2f21a6,_0x5abbd3);},'udYxa':function(_0x10e59b,_0x326d49){return _0x10e59b??_0x326d49;}},_0x32e031=await fetchCloudProfile(_0x5c9bbb),_0x30fe1c=readProfileOverrides(getProjectPath(),_0x5c9bbb);return _0x410215['pMSOI'](mergeCloudProfileSettings,_0x32e031?.[_0x5c90c3(0x92)]??{},_0x410215[_0x5c90c3(0xb9)](_0x30fe1c,undefined));}export async function configSet(_0x3ad62e,_0xb6167,_0x199ab1){const _0x1e60cc=_0x93b1,_0x933004={'DXzka':function(_0x560b19,_0x1a98d7){return _0x560b19(_0x1a98d7);},'uFOdN':function(_0x7b2ec,_0x4e69dc){return _0x7b2ec===_0x4e69dc;},'FICXa':_0x1e60cc(0x97),'SQaPW':function(_0x39653e){return _0x39653e();},'OQjfN':function(_0x4ef0f5,_0x277b11,_0x595ee4){return _0x4ef0f5(_0x277b11,_0x595ee4);},'jcTYj':function(_0x492923){return _0x492923();}},_0x3d6d03=await _0x933004[_0x1e60cc(0xbd)](resolveProfileTarget,_0x3ad62e);if(_0x933004['uFOdN'](_0x3d6d03[_0x1e60cc(0xa0)],_0x933004['FICXa'])){if(_0x3d6d03['alsoExistsElsewhere'])printDualExistsHint(_0x3ad62e);const _0x58de86=_0x933004[_0x1e60cc(0xbd)](parseOverrideValue,_0x199ab1);setProfileOverride(_0x933004['SQaPW'](getProjectPath),_0x3ad62e,_0xb6167,_0x58de86),console['log']('Set\x20'+_0xb6167+_0x1e60cc(0x9f)+JSON[_0x1e60cc(0xbc)](_0x58de86)+'\x20for\x20\x22'+_0x3ad62e+'\x22');return;}const _0x56303f=_0x933004[_0x1e60cc(0xb3)](parseLocalValue,_0xb6167,_0x199ab1);setProfileOverride(_0x933004[_0x1e60cc(0xba)](getProjectPath),_0x3ad62e,_0xb6167,_0x56303f),console[_0x1e60cc(0x8d)](_0x1e60cc(0x87)+_0xb6167+_0x1e60cc(0x9f)+_0x56303f+_0x1e60cc(0x9d)+_0x3ad62e+'\x22');}export async function configGet(_0x35c2da,_0x1484b2){const _0x1674ec=_0x93b1,_0x58a94e={'vDBcm':function(_0xf3ab13,_0x2a0702){return _0xf3ab13===_0x2a0702;},'gWLWa':_0x1674ec(0xae),'lwYlx':function(_0x53e043,_0x5a1af4,_0x306f31){return _0x53e043(_0x5a1af4,_0x306f31);},'umXDR':function(_0x688c54,_0x203cff){return _0x688c54===_0x203cff;}},_0x40b42b=await resolveProfileTarget(_0x35c2da);if(_0x40b42b[_0x1674ec(0xa0)]===_0x1674ec(0x97)){const _0x37168a=await loadEffectiveCloudSettings(_0x35c2da),_0x5dd1db=getNestedValue(_0x37168a,_0x1484b2);if(_0x58a94e[_0x1674ec(0x95)](_0x5dd1db,undefined))console[_0x1674ec(0x8d)](_0x1674ec(0x9a));else _0x58a94e['vDBcm'](typeof _0x5dd1db,_0x58a94e[_0x1674ec(0xb1)])?console[_0x1674ec(0x8d)](JSON[_0x1674ec(0xbc)](_0x5dd1db,null,0x2)):console['log'](_0x5dd1db);return;}const _0xf59fc=await loadSettings(_0x35c2da),_0xc3ecbc=_0x58a94e[_0x1674ec(0x99)](getNestedValue,_0xf59fc,_0x1484b2);if(_0x58a94e[_0x1674ec(0x8f)](_0xc3ecbc,undefined))console['log']('(not\x20set)');else typeof _0xc3ecbc===_0x58a94e[_0x1674ec(0xb1)]?console[_0x1674ec(0x8d)](JSON[_0x1674ec(0xbc)](_0xc3ecbc,null,0x2)):console['log'](_0xc3ecbc);}export async function configList(_0x2c9efc){const _0xd5a7b7=_0x93b1,_0x3debd1={'UvrJF':function(_0x4ba381,_0xae19c7){return _0x4ba381(_0xae19c7);},'giKfd':function(_0x190e86,_0x71598b){return _0x190e86===_0x71598b;},'JScVs':function(_0x2e5a97,_0x177436){return _0x2e5a97(_0x177436);}},_0xc058c3=await _0x3debd1[_0xd5a7b7(0x8b)](resolveProfileTarget,_0x2c9efc);if(_0x3debd1[_0xd5a7b7(0xa4)](_0xc058c3['kind'],'cloud')){const _0x13a0cf=await loadEffectiveCloudSettings(_0x2c9efc);if(!_0x13a0cf||_0x3debd1['giKfd'](Object['keys'](_0x13a0cf)['length'],0x0)){console[_0xd5a7b7(0x8d)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2c9efc+'\x22');return;}console[_0xd5a7b7(0x8d)](JSON[_0xd5a7b7(0xbc)](_0x13a0cf,null,0x2));return;}const _0xa60dfd=_0x3debd1['JScVs'](getSettingsPath,_0x2c9efc);if(!_0x3debd1['UvrJF'](existsSync,_0xa60dfd)){console[_0xd5a7b7(0x8d)](_0xd5a7b7(0xaf)+_0x2c9efc+'\x22');return;}const _0x40d250=await loadSettings(_0x2c9efc),_0x1616e8=_0x3debd1['UvrJF'](formatSettings,_0x40d250);!_0x1616e8?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x2c9efc+'\x22'):console['log'](_0x1616e8);}export async function configUnset(_0x5d42fa,_0x1605bb){const _0x59b175=_0x93b1,_0x29f39b={'fJdGO':function(_0x12da66,_0x48e19f){return _0x12da66(_0x48e19f);},'yIXlZ':function(_0x2747dd,_0x382e4d,_0x45e1bf,_0x55b6e4){return _0x2747dd(_0x382e4d,_0x45e1bf,_0x55b6e4);},'ggEDy':function(_0x26c829){return _0x26c829();},'AHCNv':function(_0x4693ec){return _0x4693ec();}},_0x30b9f4=await resolveProfileTarget(_0x5d42fa);if(_0x30b9f4['kind']==='cloud'){if(_0x30b9f4[_0x59b175(0xb8)])_0x29f39b[_0x59b175(0xaa)](printDualExistsHint,_0x5d42fa);const _0x35578a=_0x29f39b['yIXlZ'](unsetProfileOverride,_0x29f39b['ggEDy'](getProjectPath),_0x5d42fa,_0x1605bb);_0x35578a?console['log']('Removed\x20'+_0x1605bb+'\x20for\x20\x22'+_0x5d42fa+'\x22'):console['log'](_0x59b175(0x91)+_0x1605bb+_0x59b175(0x9b));return;}const _0x23e4c3=_0x29f39b[_0x59b175(0xb6)](unsetProfileOverride,_0x29f39b['AHCNv'](getProjectPath),_0x5d42fa,_0x1605bb);if(_0x23e4c3){console['log']('Removed\x20'+_0x1605bb);return;}const _0x15697f=await loadSettings(_0x5d42fa),_0x337b62=deleteNestedValue(_0x15697f,_0x1605bb);_0x337b62?console['log']('Key\x20\x22'+_0x1605bb+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x5d42fa+_0x59b175(0xa3)):console[_0x59b175(0x8d)]('Key\x20\x22'+_0x1605bb+_0x59b175(0x9b));}export async function configReset(_0xa32f18){const _0x2f8202=_0x93b1,_0x5b8188={'zBSAY':_0x2f8202(0x97),'lGilD':function(_0x244c8c){return _0x244c8c();}},_0x1fc9e2=await resolveProfileTarget(_0xa32f18);if(_0x1fc9e2['kind']===_0x5b8188['zBSAY']){resetProfileOverrides(_0x5b8188[_0x2f8202(0x88)](getProjectPath),_0xa32f18),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0xa32f18+'\x22');return;}console['log']('\x22'+_0xa32f18+_0x2f8202(0xac)+_0xa32f18+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- (function(_0xd856b9,_0x134a3c){const _0x4fe3a4=_0x2794,_0xa4c366=_0xd856b9();while(!![]){try{const _0x43b581=-parseInt(_0x4fe3a4(0x14a))/0x1*(parseInt(_0x4fe3a4(0x154))/0x2)+parseInt(_0x4fe3a4(0x153))/0x3+-parseInt(_0x4fe3a4(0x15a))/0x4*(-parseInt(_0x4fe3a4(0x15b))/0x5)+parseInt(_0x4fe3a4(0x14b))/0x6+-parseInt(_0x4fe3a4(0x14d))/0x7+-parseInt(_0x4fe3a4(0x152))/0x8*(-parseInt(_0x4fe3a4(0x14e))/0x9)+-parseInt(_0x4fe3a4(0x151))/0xa;if(_0x43b581===_0x134a3c)break;else _0xa4c366['push'](_0xa4c366['shift']());}catch(_0x248345){_0xa4c366['push'](_0xa4c366['shift']());}}}(_0x4ef2,0xa66ff));function _0x4ef2(){const _0xa64608=['cwd','959668AQeWQt','20STJdEJ','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','427vmVHXK','5402694rRmfqB','Cloud\x20profile\x20\x22','2979802GcEbpN','9ruBhqn','RUSYF','\x22\x20for\x20everyone\x20in\x20your\x20organization.','12859390SUAkip','5054344JrskaL','1637355EzKWVw','3018xBOjqZ','CIDvW','jYKEs','prompt','✓\x20Deleted\x20cloud\x20profile\x20\x22'];_0x4ef2=function(){return _0xa64608;};return _0x4ef2();}import _0x2f0b3c from'inquirer';function _0x2794(_0x3e9c0c,_0x56b659){_0x3e9c0c=_0x3e9c0c-0x14a;const _0x4ef252=_0x4ef2();let _0x2794dd=_0x4ef252[_0x3e9c0c];return _0x2794dd;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x29e73a,_0x551500={}){const _0x306ce5=_0x2794,_0x5f3bdd={'CIDvW':function(_0x2926f1,_0xd727c3){return _0x2926f1(_0xd727c3);},'RUSYF':function(_0x4fe050){return _0x4fe050();},'jrrFb':function(_0x553734,_0xe219ff){return _0x553734!==_0xe219ff;},'oLFds':'Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','jYKEs':function(_0x27f7a4,_0x20ebdc,_0x194646){return _0x27f7a4(_0x20ebdc,_0x194646);}},_0x31aedd=await _0x5f3bdd[_0x306ce5(0x155)](fetchCloudProfile,_0x29e73a);if(!_0x31aedd)throw new Error(_0x306ce5(0x14c)+_0x29e73a+'\x22\x20not\x20found.');if(!_0x551500['yes']&&!_0x5f3bdd[_0x306ce5(0x14f)](isInteractive))throw new Error(_0x306ce5(0x15c));console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x29e73a+_0x306ce5(0x150));if(!_0x551500['yes']){const {confirmation:_0x432622}=await _0x2f0b3c[_0x306ce5(0x157)]([{'type':'input','name':'confirmation','message':'Type\x20\x22'+_0x29e73a+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x5f3bdd['jrrFb'](_0x432622,_0x29e73a))throw new Error(_0x5f3bdd['oLFds']);}await deleteCloudProfile(_0x29e73a),_0x5f3bdd[_0x306ce5(0x156)](resetProfileOverrides,process[_0x306ce5(0x159)](),_0x29e73a),_0x5f3bdd[_0x306ce5(0x156)](clearLastProfile,process['cwd'](),_0x29e73a),console['log'](_0x306ce5(0x158)+_0x29e73a+'\x22.');}
1
+ (function(_0x107546,_0x220a55){const _0x3dfcc1=_0x58f5,_0x1c3da9=_0x107546();while(!![]){try{const _0x1e8f8f=-parseInt(_0x3dfcc1(0x1b8))/0x1*(-parseInt(_0x3dfcc1(0x1b7))/0x2)+-parseInt(_0x3dfcc1(0x1b6))/0x3+-parseInt(_0x3dfcc1(0x1bf))/0x4*(parseInt(_0x3dfcc1(0x1b0))/0x5)+-parseInt(_0x3dfcc1(0x1ba))/0x6*(parseInt(_0x3dfcc1(0x1b1))/0x7)+parseInt(_0x3dfcc1(0x1b3))/0x8+-parseInt(_0x3dfcc1(0x1c1))/0x9*(-parseInt(_0x3dfcc1(0x1b9))/0xa)+parseInt(_0x3dfcc1(0x1b4))/0xb*(parseInt(_0x3dfcc1(0x1c5))/0xc);if(_0x1e8f8f===_0x220a55)break;else _0x1c3da9['push'](_0x1c3da9['shift']());}catch(_0x1339e5){_0x1c3da9['push'](_0x1c3da9['shift']());}}}(_0x373c,0x65bb1));function _0x58f5(_0x56eb59,_0x41f8f7){_0x56eb59=_0x56eb59-0x1af;const _0x373c59=_0x373c();let _0x58f579=_0x373c59[_0x56eb59];return _0x58f579;}function _0x373c(){const _0x8c5677=['✓\x20Deleted\x20cloud\x20profile\x20\x22','\x22\x20for\x20everyone\x20in\x20your\x20organization.','input','prompt','13996rvhccO','\x22\x20to\x20confirm\x20deletion:','855VdgmMk','bxIIC','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','12iStMhr','cwd','1090OKvGHV','3604202JsxfrZ','ogrxQ','1045600WJFlSO','14301936vEUcdZ','confirmation','1067424qMTrFD','48gBtOEi','4306gGYQKz','54310Vdzaqi','6EhLFRF'];_0x373c=function(){return _0x8c5677;};return _0x373c();}import _0x300061 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x53e380,_0xb6af93={}){const _0x4d1e64=_0x58f5,_0x3b211f={'bxIIC':_0x4d1e64(0x1bd),'ogrxQ':function(_0xb8b517,_0x31d625,_0x1f1547){return _0xb8b517(_0x31d625,_0x1f1547);}},_0x47e189=await fetchCloudProfile(_0x53e380);if(!_0x47e189)throw new Error('Cloud\x20profile\x20\x22'+_0x53e380+'\x22\x20not\x20found.');if(!_0xb6af93['yes']&&!isInteractive())throw new Error('Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.');console['log'](_0x4d1e64(0x1c4)+_0x53e380+_0x4d1e64(0x1bc));if(!_0xb6af93['yes']){const {confirmation:_0x3d1c5d}=await _0x300061[_0x4d1e64(0x1be)]([{'type':_0x3b211f[_0x4d1e64(0x1c2)],'name':_0x4d1e64(0x1b5),'message':'Type\x20\x22'+_0x53e380+_0x4d1e64(0x1c0)}]);if(_0x3d1c5d!==_0x53e380)throw new Error(_0x4d1e64(0x1c3));}await deleteCloudProfile(_0x53e380),resetProfileOverrides(process[_0x4d1e64(0x1af)](),_0x53e380),_0x3b211f[_0x4d1e64(0x1b2)](clearLastProfile,process[_0x4d1e64(0x1af)](),_0x53e380),console['log'](_0x4d1e64(0x1bb)+_0x53e380+'\x22.');}
@@ -1 +1 @@
1
- const _0x3ca113=_0x21b7;(function(_0x5adefb,_0x464b40){const _0x968cc7=_0x21b7,_0x62a4cd=_0x5adefb();while(!![]){try{const _0x5f01ec=-parseInt(_0x968cc7(0x156))/0x1*(parseInt(_0x968cc7(0x157))/0x2)+-parseInt(_0x968cc7(0x14a))/0x3*(-parseInt(_0x968cc7(0x15a))/0x4)+parseInt(_0x968cc7(0x168))/0x5+parseInt(_0x968cc7(0x170))/0x6*(parseInt(_0x968cc7(0x14f))/0x7)+-parseInt(_0x968cc7(0x175))/0x8*(parseInt(_0x968cc7(0x174))/0x9)+-parseInt(_0x968cc7(0x14b))/0xa*(parseInt(_0x968cc7(0x177))/0xb)+parseInt(_0x968cc7(0x14c))/0xc*(parseInt(_0x968cc7(0x15b))/0xd);if(_0x5f01ec===_0x464b40)break;else _0x62a4cd['push'](_0x62a4cd['shift']());}catch(_0x4539fb){_0x62a4cd['push'](_0x62a4cd['shift']());}}}(_0x356e,0x3e951));import{readdir,stat}from'fs/promises';import{join}from'path';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{listCloudProfiles}from'./utils/cloudProfile.js';function _0x21b7(_0x5da836,_0x5e1eb9){_0x5da836=_0x5da836-0x14a;const _0x356ec7=_0x356e();let _0x21b7a2=_0x356ec7[_0x5da836];return _0x21b7a2;}const NON_ENV_DIRS=['sessions','bug-bashes',_0x3ca113(0x15d),_0x3ca113(0x14e),'ci'];export function shouldGroupByEnvironment(_0x4b9631){const _0x5a8d28=_0x3ca113;return _0x4b9631[_0x5a8d28(0x15e)](_0x5791b4=>_0x5791b4['environmentKey']);}export function groupCloudProfilesByEnvironment(_0xc26da9){const _0x38ce66=_0x3ca113,_0x2e0fb4={'BpqQf':function(_0x5a4a53,_0x77ea79){return _0x5a4a53===_0x77ea79;}},_0x5e5122=new Map();for(const _0x1f1bbe of _0xc26da9){const _0x418601=_0x1f1bbe['environmentKey']??null,_0x3da45e=_0x5e5122[_0x38ce66(0x17c)](_0x418601);if(_0x3da45e)_0x3da45e[_0x38ce66(0x154)](_0x1f1bbe);else _0x5e5122[_0x38ce66(0x163)](_0x418601,[_0x1f1bbe]);}const _0x39412d=[..._0x5e5122['keys']()]['sort']((_0x5c7890,_0x143ab9)=>{const _0x3bd147=_0x38ce66;if(_0x2e0fb4[_0x3bd147(0x17d)](_0x5c7890,null))return 0x1;if(_0x143ab9===null)return-0x1;return _0x5c7890[_0x3bd147(0x161)](_0x143ab9);});return _0x39412d[_0x38ce66(0x178)](_0x416b5c=>({'environmentKey':_0x416b5c,'profiles':_0x5e5122['get'](_0x416b5c)['sort']((_0x56e245,_0x3d930e)=>_0x56e245['name'][_0x38ce66(0x161)](_0x3d930e[_0x38ce66(0x158)]))}));}export async function getEnvNames(){const _0x57d82d=_0x3ca113,_0x3eff40={'syhDv':function(_0x330f89,_0x4f44f6){return _0x330f89(_0x4f44f6);},'REubT':_0x57d82d(0x14e),'kfrHi':function(_0x63b7eb,_0x3a063d){return _0x63b7eb(_0x3a063d);},'dkGWM':function(_0x20d893,_0x37e76f,_0x4995c4){return _0x20d893(_0x37e76f,_0x4995c4);},'qEYuk':_0x57d82d(0x159)},_0x42af62=getRangerDir();if(!_0x3eff40[_0x57d82d(0x16a)](existsSync,_0x42af62))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3bc10e=await readActiveProfileName(),_0x1049ac=[],_0x216cfc={},_0xed4260=join(_0x42af62,_0x3eff40[_0x57d82d(0x16c)]);if(_0x3eff40['kfrHi'](existsSync,_0xed4260)){const _0x4a9cc0=await readdir(_0xed4260);for(const _0x11db27 of _0x4a9cc0){const _0x5b0ba2=join(_0xed4260,_0x11db27),_0x123a95=await stat(_0x5b0ba2);_0x123a95[_0x57d82d(0x15c)]()&&(_0x1049ac[_0x57d82d(0x154)](_0x11db27),_0x216cfc[_0x11db27]=_0x3eff40[_0x57d82d(0x16c)]);}}const _0x1f66ac=join(_0x42af62,'ci');if(_0x3eff40[_0x57d82d(0x16a)](existsSync,_0x1f66ac)){const _0x4f0c95=await readdir(_0x1f66ac);for(const _0xa9fa48 of _0x4f0c95){const _0x4c507b=_0x3eff40['dkGWM'](join,_0x1f66ac,_0xa9fa48),_0x579893=await _0x3eff40['syhDv'](stat,_0x4c507b);_0x579893[_0x57d82d(0x15c)]()&&(_0x1049ac[_0x57d82d(0x154)](_0xa9fa48),_0x216cfc[_0xa9fa48]='ci');}}const _0x3f5de0=await readdir(_0x42af62);for(const _0x276067 of _0x3f5de0){if(NON_ENV_DIRS['includes'](_0x276067))continue;if(_0x276067[_0x57d82d(0x16f)]('.'))continue;if(_0x276067[_0x57d82d(0x17e)]('.txt'))continue;const _0x4dc4a5=join(_0x42af62,_0x276067),_0x43f9af=await stat(_0x4dc4a5);_0x43f9af[_0x57d82d(0x15c)]()&&existsSync(join(_0x4dc4a5,_0x57d82d(0x176)))&&(!_0x1049ac[_0x57d82d(0x153)](_0x276067)&&(_0x1049ac['push'](_0x276067),_0x216cfc[_0x276067]=_0x3eff40[_0x57d82d(0x155)]));}return{'envNames':_0x1049ac,'activeEnv':_0x3bc10e,'envTypes':_0x216cfc};}function _0x356e(){const _0x29e970=['get','BpqQf','endsWith','3rSvjUR','50XDbxKO','110076XURZhQ','sort','local','1665342dpbyai','profiles','\x0a*\x20=\x20active\x20profile','LeGOO','includes','push','qEYuk','357ONrZQq','2378GxEiYu','name','legacy','190612qzzyct','494AHJCMA','isDirectory','reports','some','\x20\x20\x20\x20Session:\x20','length','localeCompare','log','set','\x20\x20\x20\x20','environmentDetails','\x0aCloud\x20Profiles:','AcsdH','1844280KzOmKN','PWUkC','syhDv','\x20\x20\x20\x20\x20\x20URL:\x20','REubT','error','\x0aNo\x20profiles\x20found.','startsWith','6FrhSHI','TBPJv','LqfMt','NEIJe','5364CtirYZ','952rMbuil','settings.json','552761ZmaWKi','map','cached\x20(updated\x20','baseUrl','has'];_0x356e=function(){return _0x29e970;};return _0x356e();}export async function envList(){const _0x521d5e=_0x3ca113,_0xf17600={'NEIJe':function(_0xdf76e8,_0x4c7854){return _0xdf76e8===_0x4c7854;},'TBPJv':'no\x20session','kdEwu':function(_0x4bf186){return _0x4bf186();},'loNIy':function(_0x220661){return _0x220661();},'AcsdH':function(_0x45cc4e,_0x288753){return _0x45cc4e instanceof _0x288753;},'PWUkC':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','LeGOO':'\x0aLocal\x20Profiles\x20(legacy):','fHriV':'legacy','LqfMt':'\x0aCloud\x20Profiles\x20(by\x20environment):','EOygO':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','dpNLE':_0x521d5e(0x166),'HMvRF':function(_0x37e06f,_0x5abc80,_0x41cab6){return _0x37e06f(_0x5abc80,_0x41cab6);}},{envNames:_0x1fd3a2,activeEnv:_0x452e75,envTypes:_0x52a3eb}=await _0xf17600['kdEwu'](getEnvNames);let _0x36ecbb=[];const _0x1da7fb=await getToken();if(_0x1da7fb)try{_0x36ecbb=await _0xf17600['loNIy'](listCloudProfiles);}catch(_0xb6247f){console[_0x521d5e(0x16d)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0xf17600[_0x521d5e(0x167)](_0xb6247f,Error)?_0xb6247f['message']:String(_0xb6247f)));}if(_0x1fd3a2[_0x521d5e(0x160)]===0x0&&_0xf17600[_0x521d5e(0x173)](_0x36ecbb['length'],0x0)){console[_0x521d5e(0x162)](_0x521d5e(0x16e)),console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x169)]);return;}const _0x2d3e9d=new Set(_0x36ecbb['map'](_0x161f90=>_0x161f90['name']));if(_0x1fd3a2[_0x521d5e(0x160)]>0x0){console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x152)]);for(const _0x5e62ec of _0x1fd3a2['sort']()){const _0x9c2aa1=_0x5e62ec===_0x452e75&&!_0x2d3e9d[_0x521d5e(0x17b)](_0x5e62ec),_0x2c80aa=_0x52a3eb[_0x5e62ec]||'local',_0x55dad2=await loadSettings(_0x5e62ec),_0x1f742b=_0x2c80aa===_0xf17600['fHriV']?'':'\x20['+_0x2c80aa+']';console['log']('\x20\x20'+(_0x9c2aa1?'*\x20':'\x20\x20')+_0x5e62ec+_0x1f742b),_0x55dad2['baseUrl']&&console['log'](_0x521d5e(0x16b)+_0x55dad2[_0x521d5e(0x17a)]),_0x55dad2['environmentDetails']&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x55dad2[_0x521d5e(0x165)]);}}const _0x564cc7=(_0x162b05,_0x460fa9)=>{const _0x4d2e27=_0x521d5e,_0x317806=_0xf17600[_0x4d2e27(0x173)](_0x162b05[_0x4d2e27(0x158)],_0x452e75),_0x42c7b5=_0x162b05['sessionUpdatedAt']?_0x4d2e27(0x179)+_0x162b05['sessionUpdatedAt']+')':_0xf17600[_0x4d2e27(0x171)];console['log'](''+_0x460fa9+(_0x317806?'*\x20':'\x20\x20')+_0x162b05[_0x4d2e27(0x158)]),console[_0x4d2e27(0x162)](_0x460fa9+_0x4d2e27(0x15f)+_0x42c7b5);};if(_0x36ecbb['length']>0x0){if(shouldGroupByEnvironment(_0x36ecbb)){console[_0x521d5e(0x162)](_0xf17600[_0x521d5e(0x172)]);for(const _0x1e1d58 of groupCloudProfilesByEnvironment(_0x36ecbb)){const _0xbececc=_0x1e1d58['environmentKey']??_0xf17600['EOygO'];console['log']('\x0a\x20\x20'+_0xbececc);for(const _0x388e97 of _0x1e1d58[_0x521d5e(0x150)]){_0x564cc7(_0x388e97,_0x521d5e(0x164));}}}else{console[_0x521d5e(0x162)](_0xf17600['dpNLE']);for(const _0x193f39 of[..._0x36ecbb][_0x521d5e(0x14d)]((_0x4af2b0,_0x26b819)=>_0x4af2b0[_0x521d5e(0x158)]['localeCompare'](_0x26b819['name']))){_0xf17600['HMvRF'](_0x564cc7,_0x193f39,'\x20\x20');}}}_0x452e75&&console[_0x521d5e(0x162)](_0x521d5e(0x151));}
1
+ function _0x2ddc(_0x5368e1,_0x2cb108){_0x5368e1=_0x5368e1-0x7a;const _0x1ff73c=_0x1ff7();let _0x2ddc54=_0x1ff73c[_0x5368e1];return _0x2ddc54;}(function(_0x5c9586,_0x5120ac){const _0x251dbf=_0x2ddc,_0x58f4f3=_0x5c9586();while(!![]){try{const _0x128fb8=-parseInt(_0x251dbf(0x8c))/0x1*(parseInt(_0x251dbf(0x8d))/0x2)+parseInt(_0x251dbf(0xa1))/0x3*(-parseInt(_0x251dbf(0x89))/0x4)+-parseInt(_0x251dbf(0x8b))/0x5+-parseInt(_0x251dbf(0x9c))/0x6+parseInt(_0x251dbf(0x7b))/0x7+-parseInt(_0x251dbf(0x82))/0x8*(-parseInt(_0x251dbf(0x98))/0x9)+-parseInt(_0x251dbf(0x93))/0xa*(-parseInt(_0x251dbf(0x9f))/0xb);if(_0x128fb8===_0x5120ac)break;else _0x58f4f3['push'](_0x58f4f3['shift']());}catch(_0xa81dd1){_0x58f4f3['push'](_0x58f4f3['shift']());}}}(_0x1ff7,0xb4364));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';function _0x1ff7(){const _0x34f9d7=['profiles','60RdCTKY','baseUrl','4729580lMPFqY','934608gAvxmD','2BwCiec','isDirectory','sort','\x20\x20\x20\x20','bHFde','log','34939310TFcUZB','HDTkF','environmentDetails','\x0a*\x20=\x20active\x20profile','startsWith','17631sJTCyP','includes','Klkuf','\x0a\x20\x20','3347166IHMTNq','keys','IKoJm','11apjGou','hhHhd','231393kxGcck','\x0aCloud\x20Profiles\x20(by\x20environment):','myxlN','jNdWU','length','push','name','\x0aNo\x20profiles\x20found.','szxhk','1447670TTVrEC','NBDDY','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','\x20\x20\x20\x20\x20\x20Details:\x20','kitKT','nbukp','environmentKey','2584XbDjtT','jGZlB','lPFeM','no\x20session','\x20\x20\x20\x20\x20\x20URL:\x20','cached\x20(updated\x20'];_0x1ff7=function(){return _0x34f9d7;};return _0x1ff7();}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','reports','local','ci'];export function shouldGroupByEnvironment(_0x485b6f){const _0x7b88f7=_0x2ddc;return _0x485b6f['some'](_0x527332=>_0x527332[_0x7b88f7(0x81)]);}export function groupCloudProfilesByEnvironment(_0x5bac20){const _0x41931b=_0x2ddc,_0x27cff8=new Map();for(const _0x2de41a of _0x5bac20){const _0x100d32=_0x2de41a[_0x41931b(0x81)]??null,_0x5afa19=_0x27cff8['get'](_0x100d32);if(_0x5afa19)_0x5afa19[_0x41931b(0xa6)](_0x2de41a);else _0x27cff8['set'](_0x100d32,[_0x2de41a]);}const _0x2f14b4=[..._0x27cff8[_0x41931b(0x9d)]()]['sort']((_0x358513,_0x1be5d7)=>{if(_0x358513===null)return 0x1;if(_0x1be5d7===null)return-0x1;return _0x358513['localeCompare'](_0x1be5d7);});return _0x2f14b4['map'](_0x258b66=>({'environmentKey':_0x258b66,'profiles':_0x27cff8['get'](_0x258b66)['sort']((_0x33351e,_0x25a7b4)=>_0x33351e[_0x41931b(0xa7)]['localeCompare'](_0x25a7b4['name']))}));}export async function getEnvNames(){const _0x53c74e=_0x2ddc,_0x1ae0a7={'jNdWU':function(_0x2f02cd,_0x32d318){return _0x2f02cd(_0x32d318);},'xFKoG':function(_0x5450a9){return _0x5450a9();},'oeNTZ':function(_0x3ded54,_0x188d0c,_0x94e058){return _0x3ded54(_0x188d0c,_0x94e058);},'kitKT':'local','szxhk':function(_0x5afba2,_0x3f9113){return _0x5afba2(_0x3f9113);},'azicd':function(_0x390b4a,_0x32c0ae,_0x214089){return _0x390b4a(_0x32c0ae,_0x214089);},'hhHhd':function(_0x2321ed,_0x4c1871){return _0x2321ed(_0x4c1871);},'NBDDY':'.txt','cJfLV':function(_0x27a40f,_0x39414e){return _0x27a40f(_0x39414e);},'jGZlB':'settings.json','myxlN':'legacy'},_0x5e149b=getRangerDir();if(!_0x1ae0a7[_0x53c74e(0xa4)](existsSync,_0x5e149b))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x44237f=await _0x1ae0a7['xFKoG'](readActiveProfileName),_0x8fa66c=[],_0x2c26ab={},_0x58eb87=_0x1ae0a7['oeNTZ'](join,_0x5e149b,_0x1ae0a7[_0x53c74e(0x7f)]);if(_0x1ae0a7[_0x53c74e(0x7a)](existsSync,_0x58eb87)){const _0x4360f6=await readdir(_0x58eb87);for(const _0x1db65a of _0x4360f6){const _0x247a9d=join(_0x58eb87,_0x1db65a),_0x285ab7=await _0x1ae0a7[_0x53c74e(0xa4)](stat,_0x247a9d);_0x285ab7['isDirectory']()&&(_0x8fa66c[_0x53c74e(0xa6)](_0x1db65a),_0x2c26ab[_0x1db65a]=_0x1ae0a7['kitKT']);}}const _0x115034=_0x1ae0a7['azicd'](join,_0x5e149b,'ci');if(existsSync(_0x115034)){const _0x4dba0b=await _0x1ae0a7[_0x53c74e(0xa0)](readdir,_0x115034);for(const _0x4b6460 of _0x4dba0b){const _0xb53b9f=join(_0x115034,_0x4b6460),_0x2feab6=await stat(_0xb53b9f);_0x2feab6[_0x53c74e(0x8e)]()&&(_0x8fa66c[_0x53c74e(0xa6)](_0x4b6460),_0x2c26ab[_0x4b6460]='ci');}}const _0x1f9f71=await readdir(_0x5e149b);for(const _0x2bdbd7 of _0x1f9f71){if(NON_ENV_DIRS[_0x53c74e(0x99)](_0x2bdbd7))continue;if(_0x2bdbd7[_0x53c74e(0x97)]('.'))continue;if(_0x2bdbd7['endsWith'](_0x1ae0a7[_0x53c74e(0x7c)]))continue;const _0x5dd0de=join(_0x5e149b,_0x2bdbd7),_0xb2979b=await stat(_0x5dd0de);_0xb2979b[_0x53c74e(0x8e)]()&&_0x1ae0a7['cJfLV'](existsSync,join(_0x5dd0de,_0x1ae0a7[_0x53c74e(0x83)]))&&(!_0x8fa66c[_0x53c74e(0x99)](_0x2bdbd7)&&(_0x8fa66c[_0x53c74e(0xa6)](_0x2bdbd7),_0x2c26ab[_0x2bdbd7]=_0x1ae0a7[_0x53c74e(0xa3)]));}return{'envNames':_0x8fa66c,'activeEnv':_0x44237f,'envTypes':_0x2c26ab};}export async function envList(){const _0xbadbb2=_0x2ddc,_0x11c395={'yNtAj':function(_0x14c150,_0x455a45){return _0x14c150===_0x455a45;},'hYYVi':_0xbadbb2(0x85),'ipzFd':function(_0x197f5d,_0x4b0765){return _0x197f5d instanceof _0x4b0765;},'lPFeM':function(_0x31434c,_0x364e06){return _0x31434c(_0x364e06);},'dZnlJ':function(_0x1009d0,_0x1be052){return _0x1009d0===_0x1be052;},'CDYsw':_0xbadbb2(0xa8),'lrIwx':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','iUStG':'\x0aLocal\x20Profiles\x20(legacy):','IKoJm':'local','bHFde':function(_0x25c347,_0x32bcba){return _0x25c347>_0x32bcba;},'HDTkF':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','nbukp':function(_0x54a045,_0x32ee11,_0x53815a){return _0x54a045(_0x32ee11,_0x53815a);},'RFhpE':'\x0aCloud\x20Profiles:','Klkuf':function(_0x4323ff,_0x3866a9,_0x54002f){return _0x4323ff(_0x3866a9,_0x54002f);}},{envNames:_0x4e93bb,activeEnv:_0x5151f5,envTypes:_0x357f72}=await getEnvNames();let _0x6be061=[];const _0x5161ce=await getToken();if(_0x5161ce)try{_0x6be061=await listCloudProfiles();}catch(_0x4bdf8e){console['error'](_0xbadbb2(0x7d)+(_0x11c395['ipzFd'](_0x4bdf8e,Error)?_0x4bdf8e['message']:_0x11c395[_0xbadbb2(0x84)](String,_0x4bdf8e)));}if(_0x11c395['yNtAj'](_0x4e93bb['length'],0x0)&&_0x11c395['dZnlJ'](_0x6be061[_0xbadbb2(0xa5)],0x0)){console['log'](_0x11c395['CDYsw']),console['log'](_0x11c395['lrIwx']);return;}const _0x38c53e=new Set(_0x6be061['map'](_0x3cc644=>_0x3cc644['name']));if(_0x4e93bb[_0xbadbb2(0xa5)]>0x0){console[_0xbadbb2(0x92)](_0x11c395['iUStG']);for(const _0x51bf93 of _0x4e93bb[_0xbadbb2(0x8f)]()){const _0x3b25e3=_0x11c395['dZnlJ'](_0x51bf93,_0x5151f5)&&!_0x38c53e['has'](_0x51bf93),_0x342602=_0x357f72[_0x51bf93]||_0x11c395[_0xbadbb2(0x9e)],_0x1a2d26=await loadSettings(_0x51bf93),_0x59efae=_0x342602==='legacy'?'':'\x20['+_0x342602+']';console[_0xbadbb2(0x92)]('\x20\x20'+(_0x3b25e3?'*\x20':'\x20\x20')+_0x51bf93+_0x59efae),_0x1a2d26[_0xbadbb2(0x8a)]&&console['log'](_0xbadbb2(0x86)+_0x1a2d26[_0xbadbb2(0x8a)]),_0x1a2d26['environmentDetails']&&console[_0xbadbb2(0x92)](_0xbadbb2(0x7e)+_0x1a2d26[_0xbadbb2(0x95)]);}}const _0x5bb50f=(_0x4ad674,_0x1eb1cd)=>{const _0x4f4381=_0xbadbb2,_0x2c1e44=_0x11c395['yNtAj'](_0x4ad674['name'],_0x5151f5),_0x32ab35=_0x4ad674['sessionUpdatedAt']?_0x4f4381(0x87)+_0x4ad674['sessionUpdatedAt']+')':_0x11c395['hYYVi'];console['log'](''+_0x1eb1cd+(_0x2c1e44?'*\x20':'\x20\x20')+_0x4ad674[_0x4f4381(0xa7)]),console['log'](_0x1eb1cd+'\x20\x20\x20\x20Session:\x20'+_0x32ab35);};if(_0x11c395[_0xbadbb2(0x91)](_0x6be061['length'],0x0)){if(shouldGroupByEnvironment(_0x6be061)){console['log'](_0xbadbb2(0xa2));for(const _0xd9286a of groupCloudProfilesByEnvironment(_0x6be061)){const _0x36abb6=_0xd9286a['environmentKey']??_0x11c395[_0xbadbb2(0x94)];console[_0xbadbb2(0x92)](_0xbadbb2(0x9b)+_0x36abb6);for(const _0x46bdd8 of _0xd9286a[_0xbadbb2(0x88)]){_0x11c395[_0xbadbb2(0x80)](_0x5bb50f,_0x46bdd8,_0xbadbb2(0x90));}}}else{console[_0xbadbb2(0x92)](_0x11c395['RFhpE']);for(const _0xec0b88 of[..._0x6be061][_0xbadbb2(0x8f)]((_0x49615f,_0x2f3bb1)=>_0x49615f['name']['localeCompare'](_0x2f3bb1[_0xbadbb2(0xa7)]))){_0x11c395[_0xbadbb2(0x9a)](_0x5bb50f,_0xec0b88,'\x20\x20');}}}_0x5151f5&&console[_0xbadbb2(0x92)](_0xbadbb2(0x96));}