@ranger-testing/ranger-cli 3.1.7-alpha.be2850d-64 → 3.1.7-alpha.d64f22a-65

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 (87) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/actors.js +1 -1
  38. package/build/commands/utils/agentEnv.js +1 -1
  39. package/build/commands/utils/browserSessionsApi.js +1 -1
  40. package/build/commands/utils/claudeConfig.js +1 -1
  41. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  42. package/build/commands/utils/claudePlugin.js +1 -1
  43. package/build/commands/utils/cloudProfile.js +1 -1
  44. package/build/commands/utils/cloudProfileSession.js +1 -1
  45. package/build/commands/utils/crypto.js +1 -1
  46. package/build/commands/utils/desirePathLog.js +1 -1
  47. package/build/commands/utils/deviceAuth.js +1 -1
  48. package/build/commands/utils/environment.js +1 -1
  49. package/build/commands/utils/featureApi.js +1 -1
  50. package/build/commands/utils/fixWebmDuration.js +1 -1
  51. package/build/commands/utils/gitTracked.js +1 -1
  52. package/build/commands/utils/keychain.js +1 -1
  53. package/build/commands/utils/legacyWarning.js +1 -1
  54. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  55. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  56. package/build/commands/utils/mcpImageBase64.js +1 -1
  57. package/build/commands/utils/model.js +1 -1
  58. package/build/commands/utils/novaActCli.js +1 -1
  59. package/build/commands/utils/opencodeConfig.js +1 -1
  60. package/build/commands/utils/organizationEnvApi.js +1 -1
  61. package/build/commands/utils/playwrightCli.js +1 -1
  62. package/build/commands/utils/profileMessages.js +1 -1
  63. package/build/commands/utils/profileSetupBanner.js +1 -1
  64. package/build/commands/utils/projectsConfig.js +1 -1
  65. package/build/commands/utils/rangerConfig.js +1 -1
  66. package/build/commands/utils/rangerRoot.js +1 -1
  67. package/build/commands/utils/rangerwrightCli.js +1 -1
  68. package/build/commands/utils/resolveProfileContext.js +1 -1
  69. package/build/commands/utils/resolveProfileUrl.js +1 -1
  70. package/build/commands/utils/retry.js +1 -1
  71. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  72. package/build/commands/utils/sessionCache.js +1 -1
  73. package/build/commands/utils/settings.js +1 -1
  74. package/build/commands/utils/skillContent.js +1 -1
  75. package/build/commands/utils/skills.js +1 -1
  76. package/build/commands/utils/stitchWebmFiles.js +1 -1
  77. package/build/commands/utils/telemetry.js +1 -1
  78. package/build/commands/utils/tokenRefresh.js +1 -1
  79. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  80. package/build/commands/utils/tunnelClient.js +1 -1
  81. package/build/commands/utils/userApi.js +1 -1
  82. package/build/commands/utils/version.js +1 -1
  83. package/build/commands/verifyFeature.js +1 -1
  84. package/build/commands/verifyFeatureCli.js +1 -1
  85. package/build/commands/verifyFeatureNovaCli.js +1 -1
  86. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  87. package/package.json +14 -5
@@ -1 +1 @@
1
- const _0x126944=_0x498d;(function(_0xcd30b7,_0x1e61a3){const _0x4d4b71=_0x498d,_0x5ad7b=_0xcd30b7();while(!![]){try{const _0x2cfee2=parseInt(_0x4d4b71(0x151))/0x1*(-parseInt(_0x4d4b71(0x1b1))/0x2)+-parseInt(_0x4d4b71(0x1c4))/0x3+parseInt(_0x4d4b71(0x164))/0x4*(-parseInt(_0x4d4b71(0x170))/0x5)+-parseInt(_0x4d4b71(0x179))/0x6*(-parseInt(_0x4d4b71(0x15c))/0x7)+parseInt(_0x4d4b71(0x167))/0x8*(parseInt(_0x4d4b71(0x19f))/0x9)+parseInt(_0x4d4b71(0x190))/0xa*(-parseInt(_0x4d4b71(0x188))/0xb)+parseInt(_0x4d4b71(0x13d))/0xc*(parseInt(_0x4d4b71(0x1a8))/0xd);if(_0x2cfee2===_0x1e61a3)break;else _0x5ad7b['push'](_0x5ad7b['shift']());}catch(_0x2c42ea){_0x5ad7b['push'](_0x5ad7b['shift']());}}}(_0x2ad1,0x3334f));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0xe21165 from'inquirer';function _0x2ad1(){const _0x31c50c=['TypeError','kMVTZ','65jwYAxf','afOuo','env_not_found','manual','\x20\x20Set\x20active\x20profile:\x20','agziy','profile.add.autoRouted','action','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','2HpFJra','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','fetch\x20failed','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','PLtFV','xRcsx','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','nzfQQ','Invalid\x20URL','error','OTiax','\x0a\x20\x20A\x20profile\x20named\x20\x22','HEAD','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','HTTP\x20','message','OEbNZ','env','286008xtBDgj','baseUrl','TzkTY','1371576QDwhcU','KybpP','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','.tmp-','url','HOKGr','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','KsSyp','wywwR','\x0a\x20\x20(domains:\x20','XZSje','RdMOr','`\x20again\x20without\x20--skip-auth.','VtpxL','trim','\x27\x20matching\x20','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','pzTSa','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','\x27\x20created.\x0a','384911VdjgCz','ywUma','skipAuth','RckKQ','tyJuI','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','test','NODE_TLS_REJECT_UNAUTHORIZED','kPTGi','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','flZSx','82999LpJeZb','user_declined','log','indexOf','no_match','setupHeaders','UGyMP','profile.add.autoRouteSkipped','8HbFdDH','yes','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','24ZoeMEn','UerOJ','setupHeader','startsWith','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','force','slice','ysUwX','DtPlV','365270TLBFTR','join','oNKGm','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','YbeBX','yQwFm','cXSlh','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','120RnlTEN','trackPhaseEnd','eQqgq','NQmKC','✓\x20Cloud\x20profile\x20\x27','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','prompt','PWCUI','egqGp','status','cdpEndpoint','keys','environments','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','3465033NUNbRe','length','MNEzk','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','bZtSo','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','origin','continue','10sZEclw','toQdf','exit','no_auth_config','Use\x20','\x0a\x20\x20Could\x20not\x20reach\x20','authEnv','capture','Sqsay','confirm','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20',')\x0a\x20\x20Save\x20\x27','dppnZ','tJpLt','GuDJV','1027413DiJZLH','http://localhost:3000','VyKUf','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','cwd','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20'];_0x2ad1=function(){return _0x31c50c;};return _0x2ad1();}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=_0x126944(0x1a2);function warnCloudProfileSharedInOrg(){if(!process['stdout']['isTTY'])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x112a1c){const _0x4cf492=_0x126944,_0x4a408f={'ZhdgM':function(_0x3b464b,_0x3d6137,_0x5050eb){return _0x3b464b(_0x3d6137,_0x5050eb);},'NQmKC':_0x4cf492(0x1be),'OTiax':_0x4cf492(0x1ab),'toQdf':function(_0x25a38c,_0x28ed89){return _0x25a38c<_0x28ed89;},'VyKUf':function(_0x520f6f,_0x85ee0d){return _0x520f6f(_0x85ee0d);},'wywwR':_0x4cf492(0x1ba),'KybpP':function(_0x4fbbe4,_0x2367d1){return _0x4fbbe4===_0x2367d1;}};try{const _0x3718fd=new AbortController(),_0x575057=_0x4a408f['ZhdgM'](setTimeout,()=>_0x3718fd['abort'](),0x1388),_0xf20c88={'method':_0x4a408f[_0x4cf492(0x17c)],'signal':_0x3718fd['signal'],'redirect':_0x4a408f[_0x4cf492(0x1bc)]};/^https:\/\/localhost(:\d+)?/i[_0x4cf492(0x157)](_0x112a1c)&&(process[_0x4cf492(0x1c3)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0xb8d321=await fetch(_0x112a1c,_0xf20c88);delete process[_0x4cf492(0x1c3)][_0x4cf492(0x158)],clearTimeout(_0x575057);if(_0x4a408f[_0x4cf492(0x191)](_0xb8d321['status'],0x190))return{'ok':!![]};return{'ok':![],'error':_0x4cf492(0x1c0)+_0xb8d321[_0x4cf492(0x182)]};}catch(_0x1e21e5){delete process[_0x4cf492(0x1c3)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x492935=_0x1e21e5,_0x327f91=_0x492935['message']||_0x4a408f[_0x4cf492(0x1a1)](String,_0x1e21e5),_0x413ab3=_0x327f91['includes'](_0x4a408f[_0x4cf492(0x145)])||_0x4a408f[_0x4cf492(0x13e)](_0x492935['name'],_0x4cf492(0x1a6))||_0x327f91['includes'](_0x4cf492(0x1b3));return{'ok':![],'error':_0x327f91,'isProtocolError':_0x413ab3};}}async function sweepOrphanLocalProfile(_0x2624be,_0x45f721,_0x2b10b4){const _0x15a917=_0x126944,_0x3b71bb={'RdMOr':function(_0x33506b,_0x5da304,_0x2642b5){return _0x33506b(_0x5da304,_0x2642b5);},'KTtrZ':function(_0x5dfc8f,_0x23efb2){return _0x5dfc8f(_0x23efb2);},'tJpLt':function(_0x5ee40c,_0x2cdb91){return _0x5ee40c(_0x2cdb91);},'Xcaxq':function(_0x1020a1,_0x4049fb,_0x5596d0){return _0x1020a1(_0x4049fb,_0x5596d0);}},_0x232fd3=_0x3b71bb['RdMOr'](join,_0x45f721,'local'),_0x29a69a=join(_0x232fd3,_0x2624be);existsSync(_0x29a69a)&&(_0x2b10b4&&await isPathGitTracked(_0x29a69a)?console[_0x15a917(0x15e)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x29a69a+_0x15a917(0x187)):(await rm(_0x29a69a,{'recursive':!![],'force':!![]}),console[_0x15a917(0x15e)](_0x15a917(0x1b2)+_0x29a69a)));if(_0x3b71bb['KTtrZ'](existsSync,_0x232fd3)){let _0x4d480b=[];try{_0x4d480b=await _0x3b71bb[_0x15a917(0x19d)](readdir,_0x232fd3);}catch{return;}const _0xf07e2d=_0x15a917(0x140)+_0x2624be+'-';for(const _0x328fda of _0x4d480b){if(!_0x328fda[_0x15a917(0x16a)](_0xf07e2d))continue;const _0x3766b8=_0x3b71bb['Xcaxq'](join,_0x232fd3,_0x328fda);await _0x3b71bb[_0x15a917(0x148)](rm,_0x3766b8,{'recursive':!![],'force':!![]}),console[_0x15a917(0x15e)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3766b8);}}}async function sweepOrphansBestEffort(_0x1897e2){const _0x148ae6=_0x126944,_0x4bc9d1={'PWCUI':function(_0x1d94b2,_0x166baa,_0x77a32,_0x46ce5b){return _0x1d94b2(_0x166baa,_0x77a32,_0x46ce5b);},'MNEzk':function(_0x5dd321){return _0x5dd321();},'UerOJ':function(_0x396d2f,_0x13c76e,_0x410484,_0x603613){return _0x396d2f(_0x13c76e,_0x410484,_0x603613);}};try{await _0x4bc9d1[_0x148ae6(0x180)](sweepOrphanLocalProfile,_0x1897e2,_0x4bc9d1['MNEzk'](getRangerHomeDir),![]);const _0xc1ac0a=getRangerDir();_0xc1ac0a!==_0x4bc9d1[_0x148ae6(0x18a)](getRangerHomeDir)&&await _0x4bc9d1[_0x148ae6(0x168)](sweepOrphanLocalProfile,_0x1897e2,_0xc1ac0a,!![]);}catch(_0x106b69){console[_0x148ae6(0x15e)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x106b69 instanceof Error?_0x106b69['message']:String(_0x106b69))+').');}}async function markActive(_0x29286a){const _0x23210d=_0x126944,_0x4c33ae={'mcYaq':function(_0x402471,_0x4e926a){return _0x402471(_0x4e926a);}};try{await _0x4c33ae['mcYaq'](writeActiveProfileName,_0x29286a),console[_0x23210d(0x15e)](_0x23210d(0x1ac)+_0x29286a);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x7db0ee,_0x327238,_0x327a1f,_0x1f54b5,_0x190be4){const _0x41c8b3=_0x126944,_0x31be7d={'EgHsW':function(_0x2208f3,_0x5bf40a){return _0x2208f3===_0x5bf40a;},'bZtSo':function(_0x1bcc8e){return _0x1bcc8e();},'nzfQQ':function(_0x1f2a3c,_0xf3f3a3){return _0x1f2a3c instanceof _0xf3f3a3;},'XgWyR':function(_0x356f88,_0x2db120){return _0x356f88===_0x2db120;},'kPTGi':function(_0x1c2420,_0x170a9f,_0x34802f,_0x2ac69f,_0xde18bc){return _0x1c2420(_0x170a9f,_0x34802f,_0x2ac69f,_0xde18bc);},'JcqZj':_0x41c8b3(0x193),'VtpxL':function(_0x161ce8,_0x2f8994){return _0x161ce8+_0x2f8994;},'RhtWD':function(_0x14c667,_0x1fb24c){return _0x14c667+_0x1fb24c;},'egqGp':_0x41c8b3(0x166),'GuDJV':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','UGyMP':_0x41c8b3(0x1aa),'KsSyp':_0x41c8b3(0x160),'hGegC':function(_0x1eba44,_0x231605,_0x394c75,_0x37e649){return _0x1eba44(_0x231605,_0x394c75,_0x37e649);},'IXLMi':function(_0xb374c2){return _0xb374c2();},'BUCmQ':function(_0x52f642,_0x6a2f85){return _0x52f642+_0x6a2f85;}};let _0x24b915;try{_0x24b915=await _0x31be7d[_0x41c8b3(0x18c)](fetchAuthConfig);}catch(_0x22a2a0){return _0x190be4?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'no_auth_config','profileName':_0x7db0ee}),console[_0x41c8b3(0x1bb)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x31be7d[_0x41c8b3(0x1b9)](_0x22a2a0,Error)?_0x22a2a0[_0x41c8b3(0x1c1)]:String(_0x22a2a0))),![];}if((!_0x24b915||!_0x24b915['environments']||_0x31be7d['XgWyR'](Object[_0x41c8b3(0x184)](_0x24b915[_0x41c8b3(0x185)])['length'],0x0))&&!_0x327a1f[_0x41c8b3(0x196)]){if(_0x1f54b5)return await _0x31be7d[_0x41c8b3(0x159)](captureEnvLessProfile,_0x7db0ee,_0x327238,_0x327a1f,_0x190be4);return _0x190be4?.['trackPhaseEnd'](_0x41c8b3(0x163),{'reason':_0x31be7d['JcqZj'],'profileName':_0x7db0ee}),console['error'](_0x31be7d[_0x41c8b3(0x14a)](_0x31be7d['VtpxL'](_0x31be7d['RhtWD']('\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')+_0x31be7d[_0x41c8b3(0x181)],'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x7db0ee+'\x20--url\x20'+_0x327238+'\x20--skip-auth\x0a')+'\x0a',_0x31be7d[_0x41c8b3(0x19e)])+_0x41c8b3(0x174)),![];}let _0x5c94bf;if(_0x327a1f['authEnv']){if(!_0x24b915?.['environments']?.[_0x327a1f[_0x41c8b3(0x196)]]){const _0x31772e=Object['keys'](_0x24b915?.['environments']??{});return _0x190be4?.['trackPhaseEnd'](_0x41c8b3(0x163),{'reason':_0x31be7d[_0x41c8b3(0x162)],'profileName':_0x7db0ee}),console[_0x41c8b3(0x1bb)](_0x31be7d['VtpxL']('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x327a1f['authEnv']+'\x22\x20not\x20found.',_0x31772e[_0x41c8b3(0x189)]?'\x20Configured\x20envs:\x20'+_0x31772e[_0x41c8b3(0x171)](',\x20')+'.':_0x41c8b3(0x173))),![];}_0x5c94bf=_0x327a1f[_0x41c8b3(0x196)];}else _0x5c94bf=matchAuthEnvironment(_0x327238,_0x24b915);if(!_0x5c94bf)return _0x190be4?.[_0x41c8b3(0x17a)]('profile.add.autoRouteSkipped',{'reason':_0x31be7d[_0x41c8b3(0x144)],'profileName':_0x7db0ee}),console[_0x41c8b3(0x1bb)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x327238+_0x41c8b3(0x1a5)+Object['keys'](_0x24b915?.[_0x41c8b3(0x185)]??{})['join'](',\x20')+'.'),![];const _0x9a60f8=_0x24b915?.['environments']?.[_0x5c94bf],_0x5f204a=_0x9a60f8?.['domains']??[];if(_0x1f54b5&&!_0x327a1f[_0x41c8b3(0x165)]){const {saveToCloud:_0x5593f6}=await _0xe21165[_0x41c8b3(0x17f)]([{'type':_0x41c8b3(0x199),'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x5c94bf+_0x41c8b3(0x14c)+_0x327238+_0x41c8b3(0x146)+_0x5f204a[_0x41c8b3(0x171)](',\x20')+_0x41c8b3(0x19b)+_0x7db0ee+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x5593f6)return _0x190be4?.[_0x41c8b3(0x17a)](_0x41c8b3(0x163),{'reason':_0x41c8b3(0x15d),'profileName':_0x7db0ee}),console[_0x41c8b3(0x1bb)](_0x41c8b3(0x18b)),![];}const _0x273273=_0x5f204a['some'](_0x1ea56e=>{const _0x5caca7=_0x41c8b3;try{return _0x31be7d['EgHsW'](new URL(_0x1ea56e)[_0x5caca7(0x18e)],new URL(_0x327238)['origin']);}catch{return![];}}),_0x3ddc86={};!_0x273273&&(_0x3ddc86[_0x41c8b3(0x1c5)]=_0x327238);try{await _0x31be7d['hGegC'](createCloudProfile,_0x7db0ee,_0x5c94bf,{'settings':_0x3ddc86}),_0x31be7d['IXLMi'](warnCloudProfileSharedInOrg);}catch(_0x54566b){if(_0x54566b instanceof ApiError&&_0x54566b[_0x41c8b3(0x182)]===0x199){console['error'](_0x31be7d['BUCmQ'](_0x41c8b3(0x1bd)+_0x7db0ee+_0x41c8b3(0x178),_0x41c8b3(0x1a3)+_0x7db0ee));throw _0x54566b;}throw _0x54566b;}return console['log']('✓\x20Profile\x20\x27'+_0x7db0ee+_0x41c8b3(0x150)+(_0x41c8b3(0x15a)+_0x7db0ee)),await sweepOrphansBestEffort(_0x7db0ee),_0x190be4?.[_0x41c8b3(0x17a)]('profile.add.autoRouted',{'envKey':_0x5c94bf,'profileName':_0x7db0ee}),!![];}function _0x498d(_0x56462b,_0x2aef2d){_0x56462b=_0x56462b-0x13c;const _0x2ad1d5=_0x2ad1();let _0x498d5c=_0x2ad1d5[_0x56462b];return _0x498d5c;}async function createUnconfiguredCloudProfile(_0x35e1b2,_0x339bda){const _0x10819d=_0x126944,_0x3575f1={'oEejV':function(_0x533714){return _0x533714();},'xRcsx':function(_0x632443,_0xa48266){return _0x632443 instanceof _0xa48266;},'OuGFC':function(_0x51691c,_0x5a1339){return _0x51691c===_0x5a1339;},'afOuo':function(_0x4383d4,_0xdd795d){return _0x4383d4+_0xdd795d;}};try{await createCloudProfile(_0x35e1b2,undefined,{'settings':_0x339bda}),_0x3575f1['oEejV'](warnCloudProfileSharedInOrg);}catch(_0x5948b1){_0x3575f1[_0x10819d(0x1b6)](_0x5948b1,ApiError)&&_0x3575f1['OuGFC'](_0x5948b1['status'],0x199)&&console['error'](_0x3575f1[_0x10819d(0x1a9)](_0x10819d(0x1bd)+_0x35e1b2+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x35e1b2));throw _0x5948b1;}}async function captureEnvLessProfile(_0x7ad8b2,_0x52874c,_0x2c3ce,_0x23c954){const _0x3fdfe9=_0x126944,_0x1a3000={'QNHyU':_0x3fdfe9(0x197),'yQwFm':'profile.add.autoRouteSkipped','DtPlV':function(_0x2ea923,_0x27687d){return _0x2ea923+_0x27687d;},'agziy':function(_0x52a569,_0x583430){return _0x52a569===_0x583430;},'XGgEh':function(_0x17cd6e,_0x6ce1e5){return _0x17cd6e>_0x6ce1e5;},'mMbWC':function(_0x329014,_0x31037f,_0x51daaf,_0x5bd402){return _0x329014(_0x31037f,_0x51daaf,_0x5bd402);},'OEbNZ':function(_0x9f3ba,_0x1a2c25){return _0x9f3ba instanceof _0x1a2c25;},'tLUJT':function(_0x3ad6eb,_0x4df909,_0x592ae2){return _0x3ad6eb(_0x4df909,_0x592ae2);},'ztkXz':function(_0x5b0345,_0x511f4b){return _0x5b0345(_0x511f4b);}};if(!_0x2c3ce['yes']){const {capture:_0x368d05}=await _0xe21165[_0x3fdfe9(0x17f)]([{'type':_0x3fdfe9(0x199),'name':_0x1a3000['QNHyU'],'message':_0x3fdfe9(0x16b),'default':!![]}]);if(!_0x368d05)return _0x23c954?.['trackPhaseEnd'](_0x1a3000[_0x3fdfe9(0x176)],{'reason':'user_declined','profileName':_0x7ad8b2}),console['error'](_0x1a3000[_0x3fdfe9(0x16f)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a',_0x3fdfe9(0x143))),![];}const _0x22e6c2={};if(_0x2c3ce['setupHeader'])for(const _0x5ef5f7 of _0x2c3ce[_0x3fdfe9(0x169)]){const _0x1d943f=_0x5ef5f7['indexOf'](':');if(_0x1a3000[_0x3fdfe9(0x1ad)](_0x1d943f,-0x1))continue;_0x22e6c2[_0x5ef5f7[_0x3fdfe9(0x16d)](0x0,_0x1d943f)['trim']()]=_0x5ef5f7[_0x3fdfe9(0x16d)](_0x1d943f+0x1)['trim']();}const _0x445a48={'baseUrl':_0x52874c};_0x1a3000['XGgEh'](Object[_0x3fdfe9(0x184)](_0x22e6c2)['length'],0x0)&&(_0x445a48[_0x3fdfe9(0x161)]=_0x22e6c2);let _0x47027f;try{_0x47027f=await _0x1a3000['mMbWC'](createCloudProfile,_0x7ad8b2,undefined,{'settings':_0x445a48}),warnCloudProfileSharedInOrg();}catch(_0x50dcf8){_0x1a3000[_0x3fdfe9(0x1c2)](_0x50dcf8,ApiError)&&_0x50dcf8[_0x3fdfe9(0x182)]===0x199&&console['error'](_0x1a3000['DtPlV']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x7ad8b2+_0x3fdfe9(0x178),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x7ad8b2));throw _0x50dcf8;}return await _0x1a3000['tLUJT'](manualBrowserLogin,_0x47027f,{'key':'','domains':[_0x52874c],'setupHeaders':Object['keys'](_0x22e6c2)[_0x3fdfe9(0x189)]>0x0?_0x22e6c2:undefined}),console['log']('\x0a✓\x20Profile\x20\x27'+_0x7ad8b2+_0x3fdfe9(0x1b8)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x7ad8b2)),await _0x1a3000['ztkXz'](sweepOrphansBestEffort,_0x7ad8b2),_0x23c954?.[_0x3fdfe9(0x17a)](_0x3fdfe9(0x1ae),{'envKey':null,'profileName':_0x7ad8b2}),!![];}export async function addEnv(_0x165c38,_0x520212={},_0x2c28d9){const _0x552c44=_0x126944,_0x4ff41d={'ysUwX':function(_0x526801,_0xe10694){return _0x526801+_0xe10694;},'Sqsay':function(_0x32ce61,_0x555bdc){return _0x32ce61+_0x555bdc;},'SDKJZ':function(_0x2df2b9,_0x20c468){return _0x2df2b9+_0x20c468;},'kMVTZ':_0x552c44(0x1bf),'robFj':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','HOKGr':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','MmfLk':_0x552c44(0x14f),'JtpTS':function(_0x225708,_0x599fb8){return _0x225708(_0x599fb8);},'cXSlh':function(_0x20dae3,_0x42bb29){return _0x20dae3>_0x42bb29;},'tykoj':function(_0x46c5d0,_0x166c65,_0x2e76c7){return _0x46c5d0(_0x166c65,_0x2e76c7);},'YbeBX':function(_0x109cc8,_0x3b9040,_0x2acc60,_0x19996c,_0x370bb7){return _0x109cc8(_0x3b9040,_0x2acc60,_0x19996c,_0x370bb7);},'GMHRm':_0x552c44(0x183),'JfeYj':function(_0x4c4730,_0x5c81f8){return _0x4c4730(_0x5c81f8);},'PRnwv':function(_0x469c42,_0x1e72a3){return _0x469c42>_0x1e72a3;},'pzTSa':function(_0x52925d,_0x25a481){return _0x52925d+_0x25a481;},'RckKQ':function(_0x4b82ed,_0x1227e5){return _0x4b82ed(_0x1227e5);},'flZSx':'\x0a🌐\x20Profile\x20Setup\x0a','XZSje':_0x552c44(0x156),'XRZUf':'baseUrl','edpKV':_0x552c44(0x18d),'oNKGm':_0x552c44(0x1a0),'FxeKj':'list','TzkTY':'What\x20would\x20you\x20like\x20to\x20do?','PLtFV':_0x552c44(0x18f),'dppnZ':function(_0x5c41e0,_0x3e6876){return _0x5c41e0===_0x3e6876;},'eQqgq':function(_0x1de72c,_0x5a9c96,_0x10b241,_0x2423f6,_0x4fbad5,_0x2aa5ed){return _0x1de72c(_0x5a9c96,_0x10b241,_0x2423f6,_0x4fbad5,_0x2aa5ed);},'tyJuI':function(_0x4eaa32,_0xc34d52){return _0x4eaa32 instanceof _0xc34d52;},'ywUma':function(_0x48981a,_0x3cafac){return _0x48981a(_0x3cafac);}};_0x520212['ci']&&(console['error'](_0x4ff41d[_0x552c44(0x16e)](_0x4ff41d[_0x552c44(0x16e)](_0x4ff41d['ysUwX'](_0x4ff41d[_0x552c44(0x198)](_0x4ff41d['SDKJZ'](_0x4ff41d[_0x552c44(0x1a7)],_0x552c44(0x1b4))+'\x0a','To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x4ff41d['robFj'])+'\x0a',_0x552c44(0x1b0)),_0x552c44(0x186))),process[_0x552c44(0x192)](0x1));const _0x483fb7={};if(_0x520212['setupHeader'])for(const _0x99cce7 of _0x520212[_0x552c44(0x169)]){const _0x28f39e=_0x99cce7[_0x552c44(0x15f)](':');if(_0x28f39e===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x99cce7+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x214763=_0x99cce7[_0x552c44(0x16d)](0x0,_0x28f39e)['trim'](),_0x40b50b=_0x99cce7['slice'](_0x28f39e+0x1)[_0x552c44(0x14b)]();_0x483fb7[_0x214763]=_0x40b50b;}if(_0x520212[_0x552c44(0x183)]!==undefined&&_0x520212[_0x552c44(0x183)]['trim']()==='')throw new Error(_0x4ff41d[_0x552c44(0x142)]);if(_0x520212['cdpEndpoint']&&_0x520212[_0x552c44(0x141)])throw new Error(_0x4ff41d['MmfLk']);if(_0x520212[_0x552c44(0x196)]&&_0x520212[_0x552c44(0x153)])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x520212[_0x552c44(0x196)]&&_0x520212[_0x552c44(0x183)])throw new Error('--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.');const _0x692db7=_0x4ff41d['JtpTS'](Boolean,_0x520212['cdpEndpoint']),_0x426bdb=isInteractive();if(!_0x426bdb&&!_0x520212[_0x552c44(0x141)]&&!_0x692db7&&!_0x520212[_0x552c44(0x153)])throw new Error(_0x552c44(0x13f));if(_0x692db7){const _0x55b0de=_0x520212[_0x552c44(0x183)];console[_0x552c44(0x15e)]('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console['log'](_0x552c44(0x19a)+_0x55b0de);const _0x4e9b5d={'cdpEndpoint':_0x55b0de,'isElectron':!![]};_0x4ff41d[_0x552c44(0x177)](Object[_0x552c44(0x184)](_0x483fb7)[_0x552c44(0x189)],0x0)&&(_0x4e9b5d['setupHeaders']=_0x483fb7);await _0x4ff41d['tykoj'](createUnconfiguredCloudProfile,_0x165c38,_0x4e9b5d);try{_0x4ff41d[_0x552c44(0x175)](setProfileOverride,process['cwd'](),_0x165c38,_0x4ff41d['GMHRm'],_0x55b0de),setProfileOverride(process[_0x552c44(0x1a4)](),_0x165c38,'isElectron',!![]);}catch(_0x3f804b){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x3f804b instanceof Error?_0x3f804b[_0x552c44(0x1c1)]:_0x4ff41d['JfeYj'](String,_0x3f804b)));}console['log'](_0x552c44(0x17d)+_0x165c38+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x165c38),await markActive(_0x165c38);return;}if(_0x520212[_0x552c44(0x153)]){const _0x39667b={};_0x520212['url']&&(_0x39667b[_0x552c44(0x1c5)]=_0x520212['url']);_0x4ff41d['PRnwv'](Object[_0x552c44(0x184)](_0x483fb7)['length'],0x0)&&(_0x39667b[_0x552c44(0x161)]=_0x483fb7);await _0x4ff41d['tykoj'](createUnconfiguredCloudProfile,_0x165c38,_0x39667b),console['log'](_0x4ff41d[_0x552c44(0x14e)]('✓\x20Profile\x20\x27'+_0x165c38+'\x27\x20created\x20(no\x20session).\x0a',_0x552c44(0x17e)+_0x165c38+_0x552c44(0x149))),await sweepOrphansBestEffort(_0x165c38),await markActive(_0x165c38);return;}if(_0x520212[_0x552c44(0x141)]){const _0xbb6a8d=_0x520212['url'],_0x248bd9=await _0x4ff41d[_0x552c44(0x154)](checkUrlReachability,_0xbb6a8d);if(!_0x248bd9['ok']&&!_0x520212[_0x552c44(0x16c)])throw new Error('Could\x20not\x20reach\x20'+_0xbb6a8d+':\x20'+_0x248bd9[_0x552c44(0x1bb)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x248bd9['ok']&&_0x520212['force']&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0xbb6a8d+':\x20'+_0x248bd9[_0x552c44(0x1bb)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x4ff41d[_0x552c44(0x15b)]),console[_0x552c44(0x15e)](_0x4ff41d[_0x552c44(0x147)]),console['log']('\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a');let _0x18a1ca='',_0x524d82=![];while(!![]){const _0x50eb1d=await _0xe21165['prompt']([{'type':'input','name':_0x4ff41d['XRZUf'],'message':_0x524d82?_0x4ff41d['edpKV']:_0x552c44(0x1b7),'default':_0x18a1ca||_0x4ff41d[_0x552c44(0x172)]}]);_0x18a1ca=_0x50eb1d['baseUrl'];const _0x313a7c=await _0x4ff41d['JfeYj'](checkUrlReachability,_0x18a1ca);if(_0x313a7c['ok'])break;const _0x473974=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x18a1ca),_0x2c7dde=_0x313a7c['isProtocolError']&&!_0x473974,_0x2bffcf=_0x2c7dde?'http://'+_0x18a1ca:null;_0x524d82=!![],console['log'](_0x552c44(0x195)+_0x18a1ca+':\x20'+_0x313a7c[_0x552c44(0x1bb)]);_0x2bffcf&&console[_0x552c44(0x15e)]('\x20\x20Did\x20you\x20mean\x20'+_0x2bffcf+'?');const {action:_0x39bae3}=await _0xe21165['prompt']([{'type':_0x4ff41d['FxeKj'],'name':_0x552c44(0x1af),'message':_0x4ff41d[_0x552c44(0x13c)],'choices':[..._0x2bffcf?[{'name':_0x552c44(0x194)+_0x2bffcf,'value':'use_suggestion'}]:[],{'name':'Enter\x20a\x20different\x20URL','value':'retry'},{'name':'Continue\x20anyway','value':_0x4ff41d[_0x552c44(0x1b5)]}]}]);if(_0x4ff41d[_0x552c44(0x19c)](_0x39bae3,'use_suggestion')&&_0x2bffcf){_0x18a1ca=_0x2bffcf;const _0x3941dc=await _0x4ff41d[_0x552c44(0x154)](checkUrlReachability,_0x18a1ca);if(_0x3941dc['ok'])break;console[_0x552c44(0x15e)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x18a1ca+':\x20'+_0x3941dc['error']);}else{if(_0x39bae3==='continue')break;}}_0x520212={..._0x520212,'url':_0x18a1ca};}let _0x55948f=![];try{_0x55948f=await _0x4ff41d[_0x552c44(0x17b)](tryAutoRouteCloudProfile,_0x165c38,_0x520212['url'],_0x520212,_0x426bdb,_0x2c28d9);}catch(_0x1a2d4b){console[_0x552c44(0x1bb)](_0x552c44(0x14d)+_0x165c38+'\x22:\x20'+(_0x4ff41d[_0x552c44(0x155)](_0x1a2d4b,Error)?_0x1a2d4b[_0x552c44(0x1c1)]:_0x4ff41d[_0x552c44(0x152)](String,_0x1a2d4b))),process[_0x552c44(0x192)](0x1);}!_0x55948f&&process['exit'](0x1),await _0x4ff41d['JfeYj'](markActive,_0x165c38);}
1
+ const _0x42e066=_0x5716;(function(_0x52b88f,_0x1933b1){const _0x456755=_0x5716,_0xd9adba=_0x52b88f();while(!![]){try{const _0x14dd10=parseInt(_0x456755(0x150))/0x1+parseInt(_0x456755(0x14e))/0x2*(parseInt(_0x456755(0x17e))/0x3)+parseInt(_0x456755(0x1c8))/0x4*(parseInt(_0x456755(0x1c6))/0x5)+-parseInt(_0x456755(0x196))/0x6+-parseInt(_0x456755(0x174))/0x7*(parseInt(_0x456755(0x163))/0x8)+-parseInt(_0x456755(0x19d))/0x9*(parseInt(_0x456755(0x185))/0xa)+-parseInt(_0x456755(0x164))/0xb;if(_0x14dd10===_0x1933b1)break;else _0xd9adba['push'](_0xd9adba['shift']());}catch(_0x5c3b33){_0xd9adba['push'](_0xd9adba['shift']());}}}(_0x1eec,0xde682));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x297584 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x1eec(){const _0x1dcb74=['--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','CkSsn','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','no_match','\x20\x20Did\x20you\x20mean\x20','JOcAQ','cwd','znQUH','OSncK','MIrKS','tpjzY','skipAuth','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','3683256etnOFC','7509249VnIfcT','message','profile.add.autoRouted','JpPDf','signal','NODE_TLS_REJECT_UNAUTHORIZED','confirm','TypeError','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','UVHXq','✓\x20Cloud\x20profile\x20\x27','no_auth_config','startsWith','input','EKUwH','Invalid\x20--setup-header\x20format:\x20\x22','7WDkOuP','profile.add.autoRouteSkipped','iSZPp','env','RYJEB','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','LQPno','isProtocolError','use_suggestion','5394369PkYCbf','✓\x20Profile\x20\x27','\x27\x20created.\x0a','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','fetch\x20failed','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','70fmYndq','force','capture',')\x0a\x20\x20Save\x20\x27','\x27\x20created\x20(CDP).','\x22:\x20','setupHeader','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','Continue\x20anyway','status','mhIRU','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','keys','Fausp','Omomv','dcRUp','isTTY','2822922PPEkgq','MUYKG','retry','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','log','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','url','626859oqTQlN','\x0a🌐\x20Profile\x20Setup\x0a','warn','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','ErGvv','Use\x20','HTTP\x20','OeyHG','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','cwFaj','XTrUz','includes','slice','action','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','\x0a\x20\x20(domains:\x20','RKpih','stdout','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','qvtbd','\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','EfsZS','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','join','trackPhaseEnd','egKNg','indexOf','local','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','YofuH','cdpEndpoint','exit','DpFUl','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','length','UzvHh','environments','MBphl','origin','240085cxfvpC','yes','56odlpqp','PUucg','\x0a\x20\x20A\x20profile\x20named\x20\x22','trim','Zlmsj','nhowA','.tmp-','AZINJ','ZMbof','error','\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','prompt','authEnv','domains','env_not_found','MbNMl','2vtbmFZ','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','541727KSJjlI','yVlTg','Found\x20auth\x20environment\x20\x27','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','WgvJF'];_0x1eec=function(){return _0x1dcb74;};return _0x1eec();}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=_0x42e066(0x1ab);function warnCloudProfileSharedInOrg(){const _0x15bca7=_0x42e066;if(!process[_0x15bca7(0x1ae)][_0x15bca7(0x195)])return;console[_0x15bca7(0x19f)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x2b581f){const _0x3d573c=_0x42e066,_0x3742aa={'jNUDv':'manual','IzOYy':function(_0xbb070b,_0x3e29a6){return _0xbb070b<_0x3e29a6;},'YEeLs':function(_0x3d2da5,_0x25fc9d){return _0x3d2da5(_0x25fc9d);},'NfpwI':'Invalid\x20URL','IAoGJ':function(_0xa434b2,_0xa18ce4){return _0xa434b2===_0xa18ce4;},'ZMbof':_0x3d573c(0x16b),'uYLKn':_0x3d573c(0x183)};try{const _0x4b1367=new AbortController(),_0x4cef18=setTimeout(()=>_0x4b1367['abort'](),0x1388),_0x1acfe9={'method':'HEAD','signal':_0x4b1367[_0x3d573c(0x168)],'redirect':_0x3742aa['jNUDv']};/^https:\/\/localhost(:\d+)?/i['test'](_0x2b581f)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x41c475=await fetch(_0x2b581f,_0x1acfe9);delete process[_0x3d573c(0x177)][_0x3d573c(0x169)],clearTimeout(_0x4cef18);if(_0x3742aa['IzOYy'](_0x41c475['status'],0x190))return{'ok':!![]};return{'ok':![],'error':_0x3d573c(0x1a3)+_0x41c475[_0x3d573c(0x18e)]};}catch(_0x15c29b){delete process[_0x3d573c(0x177)][_0x3d573c(0x169)];const _0x5400bb=_0x15c29b,_0x41e255=_0x5400bb[_0x3d573c(0x165)]||_0x3742aa['YEeLs'](String,_0x15c29b),_0x41da3c=_0x41e255[_0x3d573c(0x1a8)](_0x3742aa['NfpwI'])||_0x3742aa['IAoGJ'](_0x5400bb['name'],_0x3742aa[_0x3d573c(0x1d0)])||_0x41e255[_0x3d573c(0x1a8)](_0x3742aa['uYLKn']);return{'ok':![],'error':_0x41e255,'isProtocolError':_0x41da3c};}}async function sweepOrphanLocalProfile(_0x2d932c,_0x18ed39,_0x471b06){const _0x1aa2d6=_0x42e066,_0x2e5db7={'SgRxe':function(_0x478145,_0x1089a0){return _0x478145(_0x1089a0);},'RYJEB':function(_0x5675f2,_0x1e9033,_0x56750a){return _0x5675f2(_0x1e9033,_0x56750a);}},_0x43f202=join(_0x18ed39,_0x1aa2d6(0x1b9)),_0x5e0de3=join(_0x43f202,_0x2d932c);_0x2e5db7['SgRxe'](existsSync,_0x5e0de3)&&(_0x471b06&&await isPathGitTracked(_0x5e0de3)?console['log'](_0x1aa2d6(0x1b1)+_0x5e0de3+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await rm(_0x5e0de3,{'recursive':!![],'force':!![]}),console[_0x1aa2d6(0x19a)](_0x1aa2d6(0x153)+_0x5e0de3)));if(existsSync(_0x43f202)){let _0x54c0a9=[];try{_0x54c0a9=await readdir(_0x43f202);}catch{return;}const _0x59e226=_0x1aa2d6(0x1ce)+_0x2d932c+'-';for(const _0x159860 of _0x54c0a9){if(!_0x159860[_0x1aa2d6(0x170)](_0x59e226))continue;const _0x1b5998=join(_0x43f202,_0x159860);await _0x2e5db7[_0x1aa2d6(0x178)](rm,_0x1b5998,{'recursive':!![],'force':!![]}),console[_0x1aa2d6(0x19a)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x1b5998);}}}async function sweepOrphansBestEffort(_0x2676cb){const _0x11d36d=_0x42e066,_0x4c06cf={'xMiKx':function(_0x1eb739){return _0x1eb739();},'dcRUp':function(_0x8c050a){return _0x8c050a();},'PUucg':function(_0x5b4314,_0x59776c,_0x29d5a9,_0x422dc9){return _0x5b4314(_0x59776c,_0x29d5a9,_0x422dc9);},'ErGvv':function(_0x53b031,_0x3eac3d){return _0x53b031(_0x3eac3d);}};try{await sweepOrphanLocalProfile(_0x2676cb,getRangerHomeDir(),![]);const _0x12cdc1=_0x4c06cf['xMiKx'](getRangerDir);_0x12cdc1!==_0x4c06cf[_0x11d36d(0x194)](getRangerHomeDir)&&await _0x4c06cf[_0x11d36d(0x1c9)](sweepOrphanLocalProfile,_0x2676cb,_0x12cdc1,!![]);}catch(_0x189131){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x189131 instanceof Error?_0x189131['message']:_0x4c06cf[_0x11d36d(0x1a1)](String,_0x189131))+').');}}async function markActive(_0x3168e9){const _0x351140=_0x42e066,_0x4d74b4={'UzvHh':function(_0x35549d,_0x20854e){return _0x35549d(_0x20854e);},'UVHXq':'Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.'};try{await _0x4d74b4[_0x351140(0x1c2)](writeActiveProfileName,_0x3168e9),console[_0x351140(0x19a)]('\x20\x20Set\x20active\x20profile:\x20'+_0x3168e9);}catch{console[_0x351140(0x19a)](_0x4d74b4[_0x351140(0x16d)]);}}async function tryAutoRouteCloudProfile(_0x1a48d7,_0x4f543f,_0xf31b46,_0x4bb2bc,_0x3250d3){const _0x1a7640=_0x42e066,_0x11f134={'JOcAQ':function(_0x10716a,_0x4be902){return _0x10716a===_0x4be902;},'YofuH':function(_0x172fc3,_0x1e84cd){return _0x172fc3 instanceof _0x1e84cd;},'oboLj':function(_0x476b0f,_0x3c0015,_0x41fff9,_0x125c1d,_0x4d03af){return _0x476b0f(_0x3c0015,_0x41fff9,_0x125c1d,_0x4d03af);},'MbNMl':function(_0x846f42,_0x5cae90){return _0x846f42+_0x5cae90;},'JpPDf':function(_0x53cd8d,_0x2fd461){return _0x53cd8d+_0x2fd461;},'AZINJ':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','WaLah':'profile.add.autoRouteSkipped','LUsoR':_0x1a7640(0x1d6),'LQPno':function(_0x24e7b8,_0x371a9c){return _0x24e7b8+_0x371a9c;},'GmhlY':function(_0x30c83c,_0x3b454,_0x552416){return _0x30c83c(_0x3b454,_0x552416);},'MIrKS':'confirm','tCHXq':function(_0x5ad93a,_0x165018,_0xb95163,_0x498828){return _0x5ad93a(_0x165018,_0xb95163,_0x498828);},'CkSsn':function(_0x355ea5,_0x3a5a41){return _0x355ea5===_0x3a5a41;},'EKUwH':_0x1a7640(0x166)};let _0x540f8f;try{_0x540f8f=await fetchAuthConfig();}catch(_0x17c0d1){return _0x3250d3?.['trackPhaseEnd'](_0x1a7640(0x175),{'reason':_0x1a7640(0x16f),'profileName':_0x1a48d7}),console['error'](_0x1a7640(0x1c0)+(_0x11f134['YofuH'](_0x17c0d1,Error)?_0x17c0d1['message']:String(_0x17c0d1))),![];}if((!_0x540f8f||!_0x540f8f[_0x1a7640(0x1c3)]||_0x11f134[_0x1a7640(0x15b)](Object['keys'](_0x540f8f['environments'])[_0x1a7640(0x1c1)],0x0))&&!_0xf31b46[_0x1a7640(0x1d4)]){if(_0x4bb2bc)return await _0x11f134['oboLj'](captureEnvLessProfile,_0x1a48d7,_0x4f543f,_0xf31b46,_0x3250d3);return _0x3250d3?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x1a7640(0x16f),'profileName':_0x1a48d7}),console[_0x1a7640(0x1d1)](_0x11f134[_0x1a7640(0x1d7)](_0x11f134[_0x1a7640(0x167)](_0x11f134['JpPDf'](_0x11f134[_0x1a7640(0x167)](_0x11f134['MbNMl'](_0x1a7640(0x1d2),'\x0a')+_0x1a7640(0x1a5),_0x1a7640(0x1af)+_0x1a48d7+'\x20--url\x20'+_0x4f543f+'\x20--skip-auth\x0a'),'\x0a'),_0x1a7640(0x179)),_0x11f134[_0x1a7640(0x1cf)])),![];}let _0x17193d;if(_0xf31b46[_0x1a7640(0x1d4)]){if(!_0x540f8f?.[_0x1a7640(0x1c3)]?.[_0xf31b46[_0x1a7640(0x1d4)]]){const _0x1919aa=Object[_0x1a7640(0x191)](_0x540f8f?.['environments']??{});return _0x3250d3?.[_0x1a7640(0x1b6)](_0x11f134['WaLah'],{'reason':_0x11f134['LUsoR'],'profileName':_0x1a48d7}),console[_0x1a7640(0x1d1)](_0x11f134[_0x1a7640(0x17b)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0xf31b46[_0x1a7640(0x1d4)]+'\x22\x20not\x20found.',_0x1919aa['length']?'\x20Configured\x20envs:\x20'+_0x1919aa[_0x1a7640(0x1b5)](',\x20')+'.':_0x1a7640(0x18c))),![];}_0x17193d=_0xf31b46[_0x1a7640(0x1d4)];}else _0x17193d=_0x11f134['GmhlY'](matchAuthEnvironment,_0x4f543f,_0x540f8f);if(!_0x17193d)return _0x3250d3?.[_0x1a7640(0x1b6)](_0x11f134['WaLah'],{'reason':_0x1a7640(0x159),'profileName':_0x1a48d7}),console[_0x1a7640(0x1d1)](_0x1a7640(0x162)+_0x4f543f+_0x1a7640(0x1b4)+Object['keys'](_0x540f8f?.[_0x1a7640(0x1c3)]??{})['join'](',\x20')+'.'),![];const _0x18e042=_0x540f8f?.[_0x1a7640(0x1c3)]?.[_0x17193d],_0x2e56e2=_0x18e042?.[_0x1a7640(0x1d5)]??[];if(_0x4bb2bc&&!_0xf31b46[_0x1a7640(0x1c7)]){const {saveToCloud:_0x3d0e5c}=await _0x297584['prompt']([{'type':_0x11f134[_0x1a7640(0x15f)],'name':'saveToCloud','message':_0x1a7640(0x152)+_0x17193d+'\x27\x20matching\x20'+_0x4f543f+_0x1a7640(0x1ac)+_0x2e56e2[_0x1a7640(0x1b5)](',\x20')+_0x1a7640(0x188)+_0x1a48d7+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x3d0e5c)return _0x3250d3?.[_0x1a7640(0x1b6)]('profile.add.autoRouteSkipped',{'reason':'user_declined','profileName':_0x1a48d7}),console[_0x1a7640(0x1d1)](_0x1a7640(0x14f)),![];}const _0xa9c422=_0x2e56e2['some'](_0x2553f8=>{const _0x5ea22d=_0x1a7640;try{return _0x11f134[_0x5ea22d(0x15b)](new URL(_0x2553f8)['origin'],new URL(_0x4f543f)[_0x5ea22d(0x1c5)]);}catch{return![];}}),_0x253122={};!_0xa9c422&&(_0x253122['baseUrl']=_0x4f543f);try{await _0x11f134['tCHXq'](createCloudProfile,_0x1a48d7,_0x17193d,{'settings':_0x253122}),warnCloudProfileSharedInOrg();}catch(_0xcf95f8){if(_0x11f134[_0x1a7640(0x1bb)](_0xcf95f8,ApiError)&&_0x11f134[_0x1a7640(0x156)](_0xcf95f8['status'],0x199)){console[_0x1a7640(0x1d1)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x1a48d7+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x1a7640(0x158)+_0x1a48d7));throw _0xcf95f8;}throw _0xcf95f8;}return console['log']('✓\x20Profile\x20\x27'+_0x1a48d7+_0x1a7640(0x180)+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x1a48d7)),await sweepOrphansBestEffort(_0x1a48d7),_0x3250d3?.['trackPhaseEnd'](_0x11f134[_0x1a7640(0x172)],{'envKey':_0x17193d,'profileName':_0x1a48d7}),!![];}async function createUnconfiguredCloudProfile(_0x2e8045,_0x2fde3f){const _0x4ad3f9=_0x42e066,_0x536fec={'IjTma':function(_0x32ab5c,_0x316b4c,_0x499035,_0x202fb2){return _0x32ab5c(_0x316b4c,_0x499035,_0x202fb2);},'dHdcq':function(_0x944b4f){return _0x944b4f();},'mkEhH':function(_0x46aa65,_0x434e6b){return _0x46aa65===_0x434e6b;}};try{await _0x536fec['IjTma'](createCloudProfile,_0x2e8045,undefined,{'settings':_0x2fde3f}),_0x536fec['dHdcq'](warnCloudProfileSharedInOrg);}catch(_0x207744){_0x207744 instanceof ApiError&&_0x536fec['mkEhH'](_0x207744[_0x4ad3f9(0x18e)],0x199)&&console['error'](_0x4ad3f9(0x1ca)+_0x2e8045+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x2e8045));throw _0x207744;}}function _0x5716(_0x312316,_0x22dfac){_0x312316=_0x312316-0x14e;const _0x1eec18=_0x1eec();let _0x57163f=_0x1eec18[_0x312316];return _0x57163f;}async function captureEnvLessProfile(_0xc5c363,_0x55b47a,_0x471a77,_0x3a46bd){const _0xb9fba2=_0x42e066,_0x682417={'CQpNP':_0xb9fba2(0x187),'tpjzY':function(_0xdda84b,_0x15d344){return _0xdda84b>_0x15d344;},'wJlgB':function(_0x255035,_0x454a35,_0x546097,_0x361771){return _0x255035(_0x454a35,_0x546097,_0x361771);},'iSZPp':function(_0xed209,_0x3b2a33){return _0xed209===_0x3b2a33;},'yVlTg':function(_0x485120,_0x1bba15){return _0x485120+_0x1bba15;},'hBGsS':function(_0x2a586d,_0xf71496){return _0x2a586d(_0xf71496);},'mhIRU':_0xb9fba2(0x166)};if(!_0x471a77[_0xb9fba2(0x1c7)]){const {capture:_0x10fbc6}=await _0x297584[_0xb9fba2(0x1d3)]([{'type':_0xb9fba2(0x16a),'name':_0x682417['CQpNP'],'message':_0xb9fba2(0x157),'default':!![]}]);if(!_0x10fbc6)return _0x3a46bd?.[_0xb9fba2(0x1b6)](_0xb9fba2(0x175),{'reason':'user_declined','profileName':_0xc5c363}),console[_0xb9fba2(0x1d1)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x75388e={};if(_0x471a77[_0xb9fba2(0x18b)])for(const _0x1a4b30 of _0x471a77['setupHeader']){const _0x45f297=_0x1a4b30[_0xb9fba2(0x1b8)](':');if(_0x45f297===-0x1)continue;_0x75388e[_0x1a4b30[_0xb9fba2(0x1a9)](0x0,_0x45f297)['trim']()]=_0x1a4b30['slice'](_0x45f297+0x1)['trim']();}const _0x243a7d={'baseUrl':_0x55b47a};_0x682417[_0xb9fba2(0x160)](Object[_0xb9fba2(0x191)](_0x75388e)[_0xb9fba2(0x1c1)],0x0)&&(_0x243a7d['setupHeaders']=_0x75388e);let _0x2f109c;try{_0x2f109c=await _0x682417['wJlgB'](createCloudProfile,_0xc5c363,undefined,{'settings':_0x243a7d}),warnCloudProfileSharedInOrg();}catch(_0x5c27ea){_0x5c27ea instanceof ApiError&&_0x682417[_0xb9fba2(0x176)](_0x5c27ea[_0xb9fba2(0x18e)],0x199)&&console['error'](_0x682417[_0xb9fba2(0x151)](_0xb9fba2(0x1ca)+_0xc5c363+_0xb9fba2(0x199),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0xc5c363));throw _0x5c27ea;}return await manualBrowserLogin(_0x2f109c,{'key':'','domains':[_0x55b47a],'setupHeaders':_0x682417[_0xb9fba2(0x160)](Object['keys'](_0x75388e)['length'],0x0)?_0x75388e:undefined}),console['log']('\x0a✓\x20Profile\x20\x27'+_0xc5c363+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0xc5c363)),await _0x682417['hBGsS'](sweepOrphansBestEffort,_0xc5c363),_0x3a46bd?.[_0xb9fba2(0x1b6)](_0x682417[_0xb9fba2(0x18f)],{'envKey':null,'profileName':_0xc5c363}),!![];}export async function addEnv(_0x38509d,_0x5c1ca8={},_0x3fa4c1){const _0xe8a4d7=_0x42e066,_0x2cd417={'zgugU':function(_0x4156bb,_0x4e7f46){return _0x4156bb+_0x4e7f46;},'Omomv':_0xe8a4d7(0x1a0),'WgvJF':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','OSncK':_0xe8a4d7(0x17a),'MUYKG':function(_0xe63d5a,_0x1e22f7){return _0xe63d5a===_0x1e22f7;},'IdxUp':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','Zlmsj':_0xe8a4d7(0x155),'ROHpQ':function(_0x387496){return _0x387496();},'egKNg':_0xe8a4d7(0x1ba),'Fausp':function(_0x373b39,_0x3b6682){return _0x373b39>_0x3b6682;},'vwKXp':_0xe8a4d7(0x1bc),'qvtbd':function(_0x5a125a,_0x465060,_0x4cfb93,_0x4d1373,_0x2a2378){return _0x5a125a(_0x465060,_0x4cfb93,_0x4d1373,_0x2a2378);},'cwFaj':'isElectron','AdgnF':function(_0x3ddd81,_0x246f42){return _0x3ddd81 instanceof _0x246f42;},'MBphl':function(_0x350db2,_0x244211){return _0x350db2(_0x244211);},'RKpih':function(_0x22c4db,_0x2516fd){return _0x22c4db>_0x2516fd;},'XTrUz':function(_0x122cdb,_0x26b4b4,_0x3cf803){return _0x122cdb(_0x26b4b4,_0x3cf803);},'kWZuR':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','lhQVB':_0xe8a4d7(0x171),'nhowA':_0xe8a4d7(0x16c),'oGotK':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','znQUH':'http://localhost:3000','OeyHG':function(_0x36d09d,_0x4c8f37){return _0x36d09d(_0x4c8f37);},'XiYSl':'list','EfsZS':_0xe8a4d7(0x198),'DpFUl':'continue','OMptI':function(_0x556720,_0x4e8acc,_0x16d8af,_0x2416d7,_0x45fccf,_0x4a24e0){return _0x556720(_0x4e8acc,_0x16d8af,_0x2416d7,_0x45fccf,_0x4a24e0);}};_0x5c1ca8['ci']&&(console['error'](_0x2cd417['zgugU'](_0xe8a4d7(0x181)+_0x2cd417[_0xe8a4d7(0x193)]+'\x0a'+_0xe8a4d7(0x19b)+_0x2cd417[_0xe8a4d7(0x154)]+'\x0a'+_0x2cd417[_0xe8a4d7(0x15e)],'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1));const _0x42c611={};if(_0x5c1ca8['setupHeader'])for(const _0x3c6892 of _0x5c1ca8['setupHeader']){const _0x5e6c9d=_0x3c6892['indexOf'](':');if(_0x5e6c9d===-0x1)throw new Error(_0xe8a4d7(0x173)+_0x3c6892+_0xe8a4d7(0x1bf));const _0x4f225b=_0x3c6892['slice'](0x0,_0x5e6c9d)[_0xe8a4d7(0x1cb)](),_0x11fa9c=_0x3c6892['slice'](_0x5e6c9d+0x1)['trim']();_0x42c611[_0x4f225b]=_0x11fa9c;}if(_0x5c1ca8['cdpEndpoint']!==undefined&&_0x2cd417[_0xe8a4d7(0x197)](_0x5c1ca8[_0xe8a4d7(0x1bc)][_0xe8a4d7(0x1cb)](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x5c1ca8['cdpEndpoint']&&_0x5c1ca8['url'])throw new Error(_0x2cd417['IdxUp']);if(_0x5c1ca8['authEnv']&&_0x5c1ca8[_0xe8a4d7(0x161)])throw new Error('--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.');if(_0x5c1ca8[_0xe8a4d7(0x1d4)]&&_0x5c1ca8[_0xe8a4d7(0x1bc)])throw new Error(_0x2cd417[_0xe8a4d7(0x1cc)]);const _0x4c0aba=Boolean(_0x5c1ca8['cdpEndpoint']),_0x25e2ae=_0x2cd417['ROHpQ'](isInteractive);if(!_0x25e2ae&&!_0x5c1ca8[_0xe8a4d7(0x19c)]&&!_0x4c0aba&&!_0x5c1ca8['skipAuth'])throw new Error(_0x2cd417[_0xe8a4d7(0x1b7)]);if(_0x4c0aba){const _0x4d6cb0=_0x5c1ca8['cdpEndpoint'];console['log'](_0xe8a4d7(0x184)),console['log'](_0xe8a4d7(0x190)+_0x4d6cb0);const _0x39d453={'cdpEndpoint':_0x4d6cb0,'isElectron':!![]};_0x2cd417[_0xe8a4d7(0x192)](Object[_0xe8a4d7(0x191)](_0x42c611)['length'],0x0)&&(_0x39d453['setupHeaders']=_0x42c611);await createUnconfiguredCloudProfile(_0x38509d,_0x39d453);try{setProfileOverride(process[_0xe8a4d7(0x15c)](),_0x38509d,_0x2cd417['vwKXp'],_0x4d6cb0),_0x2cd417[_0xe8a4d7(0x1b0)](setProfileOverride,process[_0xe8a4d7(0x15c)](),_0x38509d,_0x2cd417[_0xe8a4d7(0x1a6)],!![]);}catch(_0x2aa0f2){console[_0xe8a4d7(0x1d1)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x2cd417['AdgnF'](_0x2aa0f2,Error)?_0x2aa0f2[_0xe8a4d7(0x165)]:_0x2cd417[_0xe8a4d7(0x1c4)](String,_0x2aa0f2)));}console[_0xe8a4d7(0x19a)](_0xe8a4d7(0x16e)+_0x38509d+_0xe8a4d7(0x189)),await sweepOrphansBestEffort(_0x38509d),await _0x2cd417['MBphl'](markActive,_0x38509d);return;}if(_0x5c1ca8['skipAuth']){const _0x24a181={};_0x5c1ca8['url']&&(_0x24a181['baseUrl']=_0x5c1ca8['url']);_0x2cd417[_0xe8a4d7(0x1ad)](Object[_0xe8a4d7(0x191)](_0x42c611)['length'],0x0)&&(_0x24a181['setupHeaders']=_0x42c611);await _0x2cd417[_0xe8a4d7(0x1a7)](createUnconfiguredCloudProfile,_0x38509d,_0x24a181),console[_0xe8a4d7(0x19a)](_0xe8a4d7(0x17f)+_0x38509d+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x38509d+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x38509d),await markActive(_0x38509d);return;}if(_0x5c1ca8[_0xe8a4d7(0x19c)]){const _0x2e616f=_0x5c1ca8[_0xe8a4d7(0x19c)],_0x419808=await checkUrlReachability(_0x2e616f);if(!_0x419808['ok']&&!_0x5c1ca8['force'])throw new Error('Could\x20not\x20reach\x20'+_0x2e616f+':\x20'+_0x419808['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x419808['ok']&&_0x5c1ca8[_0xe8a4d7(0x186)]&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x2e616f+':\x20'+_0x419808['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0xe8a4d7(0x19a)](_0xe8a4d7(0x19e)),console['log']('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console[_0xe8a4d7(0x19a)](_0x2cd417['kWZuR']);let _0x418608='',_0x2cfe85=![];while(!![]){const _0x11b64e=await _0x297584[_0xe8a4d7(0x1d3)]([{'type':_0x2cd417['lhQVB'],'name':'baseUrl','message':_0x2cfe85?_0x2cd417[_0xe8a4d7(0x1cd)]:_0x2cd417['oGotK'],'default':_0x418608||_0x2cd417[_0xe8a4d7(0x15d)]}]);_0x418608=_0x11b64e['baseUrl'];const _0x3d3a6e=await _0x2cd417['OeyHG'](checkUrlReachability,_0x418608);if(_0x3d3a6e['ok'])break;const _0x6edf0e=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x418608),_0x5b5739=_0x3d3a6e[_0xe8a4d7(0x17c)]&&!_0x6edf0e,_0x567d6f=_0x5b5739?'http://'+_0x418608:null;_0x2cfe85=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x418608+':\x20'+_0x3d3a6e['error']);_0x567d6f&&console[_0xe8a4d7(0x19a)](_0xe8a4d7(0x15a)+_0x567d6f+'?');const {action:_0x1cb345}=await _0x297584['prompt']([{'type':_0x2cd417['XiYSl'],'name':_0xe8a4d7(0x1aa),'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x567d6f?[{'name':_0xe8a4d7(0x1a2)+_0x567d6f,'value':_0xe8a4d7(0x17d)}]:[],{'name':'Enter\x20a\x20different\x20URL','value':_0x2cd417[_0xe8a4d7(0x1b3)]},{'name':_0xe8a4d7(0x18d),'value':_0x2cd417['DpFUl']}]}]);if(_0x2cd417['MUYKG'](_0x1cb345,'use_suggestion')&&_0x567d6f){_0x418608=_0x567d6f;const _0x33c6e6=await checkUrlReachability(_0x418608);if(_0x33c6e6['ok'])break;console[_0xe8a4d7(0x19a)](_0xe8a4d7(0x1b2)+_0x418608+':\x20'+_0x33c6e6['error']);}else{if(_0x1cb345===_0x2cd417[_0xe8a4d7(0x1be)])break;}}_0x5c1ca8={..._0x5c1ca8,'url':_0x418608};}let _0x218685=![];try{_0x218685=await _0x2cd417['OMptI'](tryAutoRouteCloudProfile,_0x38509d,_0x5c1ca8[_0xe8a4d7(0x19c)],_0x5c1ca8,_0x25e2ae,_0x3fa4c1);}catch(_0x2cd1b8){console['error'](_0xe8a4d7(0x182)+_0x38509d+_0xe8a4d7(0x18a)+(_0x2cd1b8 instanceof Error?_0x2cd1b8['message']:_0x2cd417['OeyHG'](String,_0x2cd1b8))),process[_0xe8a4d7(0x1bd)](0x1);}!_0x218685&&process[_0xe8a4d7(0x1bd)](0x1),await _0x2cd417[_0xe8a4d7(0x1a4)](markActive,_0x38509d);}
@@ -1 +1 @@
1
- (function(_0xfb937b,_0x887c2a){var _0x2f9da0=_0x4136,_0x4461dc=_0xfb937b();while(!![]){try{var _0x4b4d85=-parseInt(_0x2f9da0(0x121))/0x1+-parseInt(_0x2f9da0(0x129))/0x2*(-parseInt(_0x2f9da0(0x124))/0x3)+-parseInt(_0x2f9da0(0x133))/0x4*(-parseInt(_0x2f9da0(0x131))/0x5)+-parseInt(_0x2f9da0(0x12a))/0x6+parseInt(_0x2f9da0(0x126))/0x7+parseInt(_0x2f9da0(0x12f))/0x8*(-parseInt(_0x2f9da0(0x125))/0x9)+parseInt(_0x2f9da0(0x123))/0xa;if(_0x4b4d85===_0x887c2a)break;else _0x4461dc['push'](_0x4461dc['shift']());}catch(_0xf1099a){_0x4461dc['push'](_0x4461dc['shift']());}}}(_0x47e1,0x7d523));export async function authEncrypt(_0x1a82dd){var _0x4168d1=_0x4136,_0x48fd43={'ArKfk':function(_0x1f143e,_0x3c4bd2){return _0x1f143e+_0x3c4bd2;},'TGuuo':function(_0x59570f,_0x4916a9){return _0x59570f+_0x4916a9;},'ExKwA':_0x4168d1(0x12d),'YDxFa':_0x4168d1(0x132)};console['error'](_0x48fd43[_0x4168d1(0x128)](_0x48fd43[_0x4168d1(0x128)](_0x48fd43['ArKfk'](_0x48fd43[_0x4168d1(0x12b)](_0x48fd43['ExKwA']+_0x48fd43[_0x4168d1(0x127)]+'\x0a',_0x4168d1(0x12c)),_0x4168d1(0x12e)),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x4168d1(0x122)),process[_0x4168d1(0x130)](0x1);}function _0x4136(_0x309b6b,_0x5b8a3e){_0x309b6b=_0x309b6b-0x121;var _0x47e11f=_0x47e1();var _0x41365a=_0x47e11f[_0x309b6b];return _0x41365a;}function _0x47e1(){var _0x41faaf=['3017217avCMUm','YDxFa','ArKfk','120imDnmN','3336648ZXeYtS','TGuuo','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','8JAqDht','exit','275830ZrPsMT','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','36soYIpZ','214076gYDsYT','\x20\x20https://docs.ranger.net/main/concepts/profiles','9356190LAyHLx','10746jpjkLg','7151085rezaez'];_0x47e1=function(){return _0x41faaf;};return _0x47e1();}
1
+ (function(_0x159436,_0x4844be){var _0x5924ed=_0x21b6,_0x268896=_0x159436();while(!![]){try{var _0x551b44=-parseInt(_0x5924ed(0x19a))/0x1*(-parseInt(_0x5924ed(0x1a2))/0x2)+parseInt(_0x5924ed(0x1a7))/0x3+-parseInt(_0x5924ed(0x19f))/0x4*(-parseInt(_0x5924ed(0x19b))/0x5)+parseInt(_0x5924ed(0x1a0))/0x6+parseInt(_0x5924ed(0x19c))/0x7+-parseInt(_0x5924ed(0x1a3))/0x8+-parseInt(_0x5924ed(0x199))/0x9;if(_0x551b44===_0x4844be)break;else _0x268896['push'](_0x268896['shift']());}catch(_0x44cd2f){_0x268896['push'](_0x268896['shift']());}}}(_0x579f,0xe4ca8));function _0x21b6(_0x8f8073,_0x48c97e){_0x8f8073=_0x8f8073-0x199;var _0x579f21=_0x579f();var _0x21b6e4=_0x579f21[_0x8f8073];return _0x21b6e4;}export async function authEncrypt(_0x45a86a){var _0x42a0aa=_0x21b6,_0xfb9b30={'bBvyI':function(_0x534f5d,_0x2cc94b){return _0x534f5d+_0x2cc94b;},'muszT':function(_0xbba975,_0x5c18e6){return _0xbba975+_0x5c18e6;},'cihxm':function(_0x139022,_0x4232a9){return _0x139022+_0x4232a9;},'RKJvh':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','bJFXG':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'};console[_0x42a0aa(0x1a4)](_0xfb9b30[_0x42a0aa(0x19d)](_0xfb9b30['bBvyI'](_0xfb9b30[_0x42a0aa(0x19e)](_0xfb9b30[_0x42a0aa(0x1a1)](_0xfb9b30['RKJvh']+_0x42a0aa(0x1a6),'\x0a'),'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+_0xfb9b30['bJFXG'],'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x42a0aa(0x1a5)),process['exit'](0x1);}function _0x579f(){var _0x50f855=['error','\x20\x20https://docs.ranger.net/main/concepts/profiles','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','2925735rCIFSU','24594858QSUCAT','427MlPOHJ','5jvYcAm','5072774rTWgSC','bBvyI','muszT','6723108VFzkhy','9284040znVZYn','cihxm','1282HAxOVj','12254888vAJSug'];_0x579f=function(){return _0x50f855;};return _0x579f();}
@@ -1 +1 @@
1
- const _0x2e7629=_0x72d5;(function(_0x1f8fa9,_0x2681a5){const _0x3b53ec=_0x72d5,_0x3a7c3c=_0x1f8fa9();while(!![]){try{const _0x198dc2=parseInt(_0x3b53ec(0x136))/0x1*(-parseInt(_0x3b53ec(0x124))/0x2)+-parseInt(_0x3b53ec(0x129))/0x3+-parseInt(_0x3b53ec(0x125))/0x4+-parseInt(_0x3b53ec(0x127))/0x5*(-parseInt(_0x3b53ec(0x150))/0x6)+parseInt(_0x3b53ec(0x126))/0x7*(parseInt(_0x3b53ec(0x15b))/0x8)+-parseInt(_0x3b53ec(0x134))/0x9*(parseInt(_0x3b53ec(0x143))/0xa)+parseInt(_0x3b53ec(0x142))/0xb;if(_0x198dc2===_0x2681a5)break;else _0x3a7c3c['push'](_0x3a7c3c['shift']());}catch(_0x5032b2){_0x3a7c3c['push'](_0x3a7c3c['shift']());}}}(_0x59c3,0x44fa8));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 _0x72d5(_0x39c443,_0x2e3d93){_0x39c443=_0x39c443-0x123;const _0x59c3cd=_0x59c3();let _0x72d525=_0x59c3cd[_0x39c443];return _0x72d525;}import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger','feature-tracker',_0x2e7629(0x152),_0x2e7629(0x15c)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0xec7d79){const _0x569570=_0x2e7629,_0x3f3034=_0xec7d79[_0x569570(0x145)](/\/\*[\s\S]*?\*\//g,''),_0x52aad6=_0x3f3034['replace'](/^\s*\/\/.*$/gm,''),_0x842cf8=_0x52aad6[_0x569570(0x145)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x842cf8);}async function removeOpencodePluginConfig(_0x2efb18){const _0x1c47a8=_0x2e7629,_0x11c3ce={'FyjTa':function(_0x198316,_0x491d06){return _0x198316(_0x491d06);},'onsXG':function(_0x155ce2,_0x5bf207){return _0x155ce2===_0x5bf207;},'BosrB':function(_0x5b59ca,_0x5e98bc,_0x4e8209){return _0x5b59ca(_0x5e98bc,_0x4e8209);},'Byive':function(_0x106908,_0x45e902){return _0x106908+_0x45e902;}};if(!existsSync(_0x2efb18))return![];let _0x309d4c;try{const _0x246752=await readFile(_0x2efb18,'utf-8');_0x309d4c=_0x11c3ce['FyjTa'](parseJsonc,_0x246752);}catch{return![];}const _0x11d465=Array['isArray'](_0x309d4c[_0x1c47a8(0x14e)])?_0x309d4c['plugin']:[];if(_0x11c3ce['onsXG'](_0x11d465['length'],0x0))return![];const _0x4a3b30=_0x11d465[_0x1c47a8(0x159)](_0x368d11=>{if(typeof _0x368d11!=='string')return!![];return _0x368d11!==opencodePluginName;});if(_0x4a3b30[_0x1c47a8(0x132)]===_0x11d465['length'])return![];return _0x4a3b30[_0x1c47a8(0x132)]===0x0?delete _0x309d4c[_0x1c47a8(0x14e)]:_0x309d4c['plugin']=_0x4a3b30,await _0x11c3ce['BosrB'](writeFile,_0x2efb18,_0x11c3ce[_0x1c47a8(0x12d)](JSON['stringify'](_0x309d4c,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x38b3c4){const _0x7508b9=_0x2e7629,_0x2390e2={'kkpgN':function(_0x39f654,_0x2be44b){return _0x39f654(_0x2be44b);},'bhEsc':'uninstall','ZUiLr':_0x7508b9(0x13b),'kQmLL':_0x7508b9(0x133),'Hixyb':function(_0x36a71a,_0xf05841,_0x1a5f67,_0x90d994){return _0x36a71a(_0xf05841,_0x1a5f67,_0x90d994);},'VyQVi':'ignore','HVSgK':function(_0x354854,_0x3b564e){return _0x354854===_0x3b564e;},'VGoHt':_0x7508b9(0x144),'LmQER':_0x7508b9(0x13e),'JotDa':'error'};return new Promise(_0x3bf4b1=>{const _0x1df53e=_0x7508b9,_0x283e13=['plugin',_0x2390e2['bhEsc'],_0x2390e2['ZUiLr']];_0x38b3c4&&_0x283e13['push'](_0x2390e2[_0x1df53e(0x14d)],_0x38b3c4);const _0x3d50ca=_0x2390e2['Hixyb'](spawn,_0x1df53e(0x15a),_0x283e13,{'stdio':[_0x2390e2['VyQVi'],'ignore',_0x2390e2['VyQVi']],'cwd':_0x38b3c4?getProjectRoot():undefined,'shell':_0x2390e2[_0x1df53e(0x151)](process['platform'],_0x2390e2[_0x1df53e(0x147)])});_0x3d50ca['on'](_0x2390e2[_0x1df53e(0x15d)],_0x2b6a61=>{_0x3bf4b1(_0x2b6a61===0x0);}),_0x3d50ca['on'](_0x2390e2[_0x1df53e(0x12e)],()=>{const _0xe56da3=_0x1df53e;_0x2390e2[_0xe56da3(0x156)](_0x3bf4b1,![]);});});}function _0x59c3(){const _0xa429db=['dMCXl','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','Byive','JotDa','vOMHy','Glejb','eHllA','length','--scope','12879bLZOFM','project','17PWQZsI','✓\x20Removed\x20user\x20skill:\x20','ahnFT','chlFb','user','ranger@trailhead','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','eSZHG','close','pJpac','xtzgz','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','8918415nQqnBB','3720TqWjKw','win32','replace','uwkuW','VGoHt','YBsgJ','ZyMmm','ufDhL','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','ignore','kQmLL','plugin','ZZUEP','432PluWGq','HVSgK','bug-bash','rVTZa','\x0a✅\x20Cleanup\x20complete!\x0a','PrOqy','kkpgN','LEryu','LmbSq','filter','claude','24aFgZgP','e2e-test-recommender','LmQER','✓\x20Removed\x20stored\x20credentials','ALEhD','remove','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','✓\x20Removed\x20.ranger/\x20directory','46674ZzVoex','598796AJvtcB','496118fOWDOx','27925ysiatv','OlyQl','192633UjhqXt','log'];_0x59c3=function(){return _0xa429db;};return _0x59c3();}async function removeMarketplace(){const _0x48fb48=_0x2e7629,_0x56aa45={'YBsgJ':function(_0x4394ce,_0x4c5a3f){return _0x4394ce(_0x4c5a3f);},'ZKKxm':'marketplace','WnMVb':_0x48fb48(0x160),'ZyMmm':'trailhead','eHllA':_0x48fb48(0x14c),'SxOAK':function(_0x2dca40,_0x370013){return _0x2dca40===_0x370013;},'ufDhL':'close'};return new Promise(_0x21dcf8=>{const _0x37ed04=_0x48fb48,_0x2f788e={'LEryu':function(_0x4e7919,_0x1f1ff8){const _0x91c93f=_0x72d5;return _0x56aa45[_0x91c93f(0x148)](_0x4e7919,_0x1f1ff8);},'FMyYx':function(_0x29b880,_0x32a020){return _0x29b880===_0x32a020;}},_0x405b2a=spawn('claude',[_0x37ed04(0x14e),_0x56aa45['ZKKxm'],_0x56aa45['WnMVb'],_0x56aa45[_0x37ed04(0x149)]],{'stdio':[_0x37ed04(0x14c),_0x56aa45[_0x37ed04(0x131)],_0x37ed04(0x14c)],'shell':_0x56aa45['SxOAK'](process['platform'],'win32')});_0x405b2a['on'](_0x56aa45[_0x37ed04(0x14a)],_0x460c85=>{_0x2f788e['LEryu'](_0x21dcf8,_0x2f788e['FMyYx'](_0x460c85,0x0));}),_0x405b2a['on']('error',()=>{const _0x24e414=_0x37ed04;_0x2f788e[_0x24e414(0x157)](_0x21dcf8,![]);});});}export async function clean(){const _0x50e9df=_0x2e7629,_0x2bee4d={'CkYyC':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','NRnvJ':function(_0x5dab87){return _0x5dab87();},'eSZHG':_0x50e9df(0x15e),'uwkuW':function(_0x1fade7){return _0x1fade7();},'jAwoZ':function(_0x4e62b5){return _0x4e62b5();},'vOMHy':function(_0x4945d0,_0x3f1ccb,_0x2af3fa){return _0x4945d0(_0x3f1ccb,_0x2af3fa);},'Glejb':function(_0x382dc9,_0xc82870,_0x45d8e6){return _0x382dc9(_0xc82870,_0x45d8e6);},'rVTZa':function(_0x5ea8cf,_0x1a0178){return _0x5ea8cf(_0x1a0178);},'pJpac':_0x50e9df(0x135),'xLCaM':function(_0x44510a,_0x281d3b,_0x3d0cb3){return _0x44510a(_0x281d3b,_0x3d0cb3);},'LmbSq':function(_0x21dfe6,_0x2f4b70){return _0x21dfe6(_0x2f4b70);},'GupXa':_0x50e9df(0x13a),'jCWKE':function(_0x585201,_0x20bd4d,_0x4e551e){return _0x585201(_0x20bd4d,_0x4e551e);},'ZZUEP':function(_0x3290e0,_0x2a9502){return _0x3290e0(_0x2a9502);},'ahnFT':function(_0x13fec3,_0x3f5029,_0x4dcec1){return _0x13fec3(_0x3f5029,_0x4dcec1);},'dMCXl':function(_0x3f23c6,_0x6a75b7,_0x33b120){return _0x3f23c6(_0x6a75b7,_0x33b120);},'OlyQl':'opencode.json','hdObt':_0x50e9df(0x12c),'xtzgz':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','chlFb':_0x50e9df(0x161),'ALEhD':function(_0x3ae6c2){return _0x3ae6c2();},'PrOqy':_0x50e9df(0x154)};console['log'](_0x2bee4d['CkYyC']);let _0x299630=![];try{await _0x2bee4d['NRnvJ'](deleteAllCredentials),console['log'](_0x2bee4d[_0x50e9df(0x13d)]),_0x299630=!![];}catch{}const _0x4dbecc=_0x2bee4d[_0x50e9df(0x146)](getCacheFile);existsSync(_0x4dbecc)&&(await rm(_0x4dbecc),_0x299630=!![]);const _0x212d3f=_0x2bee4d['uwkuW'](getRangerDir);existsSync(_0x212d3f)&&(await rm(_0x212d3f,{'recursive':!![]}),console[_0x50e9df(0x12a)](_0x50e9df(0x123)),_0x299630=!![]);const _0x42b4ec=_0x2bee4d['jAwoZ'](getProjectSkillsDir);for(const _0x98e12a of skillsToRemove){const _0x626ac9=_0x2bee4d[_0x50e9df(0x12f)](join,_0x42b4ec,_0x98e12a);existsSync(_0x626ac9)&&(await _0x2bee4d[_0x50e9df(0x130)](rm,_0x626ac9,{'recursive':!![]}),console[_0x50e9df(0x12a)]('✓\x20Removed\x20project\x20skill:\x20'+_0x98e12a),_0x299630=!![]);}const _0x1b2619=getUserSkillsDir();for(const _0x3eda69 of skillsToRemove){const _0x3ba172=join(_0x1b2619,_0x3eda69);_0x2bee4d[_0x50e9df(0x153)](existsSync,_0x3ba172)&&(await _0x2bee4d[_0x50e9df(0x130)](rm,_0x3ba172,{'recursive':!![]}),console[_0x50e9df(0x12a)](_0x50e9df(0x137)+_0x3eda69),_0x299630=!![]);}const _0x1f5186=getOpencodeSkillsDir(_0x2bee4d[_0x50e9df(0x13f)]);for(const _0x2f1e0a of skillsToRemove){const _0x30eaf0=_0x2bee4d['xLCaM'](join,_0x1f5186,_0x2f1e0a);existsSync(_0x30eaf0)&&(await _0x2bee4d[_0x50e9df(0x12f)](rm,_0x30eaf0,{'recursive':!![]}),console[_0x50e9df(0x12a)](_0x50e9df(0x14b)+_0x2f1e0a),_0x299630=!![]);}const _0x130719=_0x2bee4d[_0x50e9df(0x158)](getOpencodeSkillsDir,_0x2bee4d['GupXa']);for(const _0x35bb70 of skillsToRemove){const _0x207aa5=_0x2bee4d['jCWKE'](join,_0x130719,_0x35bb70);_0x2bee4d[_0x50e9df(0x14f)](existsSync,_0x207aa5)&&(await _0x2bee4d[_0x50e9df(0x138)](rm,_0x207aa5,{'recursive':!![]}),console['log'](_0x50e9df(0x13c)+_0x35bb70),_0x299630=!![]);}const _0x15f376=_0x2bee4d[_0x50e9df(0x12b)](join,getOpencodeConfigDir(_0x2bee4d['pJpac']),_0x2bee4d[_0x50e9df(0x128)]);await removeOpencodePluginConfig(_0x15f376)&&(console[_0x50e9df(0x12a)](_0x50e9df(0x141)),_0x299630=!![]);const _0x2843bd=join(getOpencodeConfigDir(_0x50e9df(0x13a)),_0x2bee4d[_0x50e9df(0x128)]);await removeOpencodePluginConfig(_0x2843bd)&&(console[_0x50e9df(0x12a)](_0x2bee4d['hdObt']),_0x299630=!![]);const _0x53b84b=await uninstallClaudePlugin();_0x53b84b&&(console[_0x50e9df(0x12a)](_0x2bee4d[_0x50e9df(0x140)]),_0x299630=!![]);const _0x185e93=await _0x2bee4d[_0x50e9df(0x153)](uninstallClaudePlugin,'project');_0x185e93&&(console['log'](_0x2bee4d[_0x50e9df(0x139)]),_0x299630=!![]);const _0x3de851=await _0x2bee4d[_0x50e9df(0x15f)](removeMarketplace);_0x3de851&&(console[_0x50e9df(0x12a)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x299630=!![]),_0x299630?console['log'](_0x2bee4d[_0x50e9df(0x155)]):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x280a34=_0x2b62;(function(_0x592281,_0x2cf61b){const _0x28d8b=_0x2b62,_0x10ea78=_0x592281();while(!![]){try{const _0x3510af=parseInt(_0x28d8b(0xe3))/0x1+parseInt(_0x28d8b(0xd4))/0x2*(-parseInt(_0x28d8b(0xbd))/0x3)+parseInt(_0x28d8b(0xca))/0x4+-parseInt(_0x28d8b(0xac))/0x5*(-parseInt(_0x28d8b(0xc6))/0x6)+parseInt(_0x28d8b(0xe2))/0x7*(-parseInt(_0x28d8b(0xd1))/0x8)+-parseInt(_0x28d8b(0xc8))/0x9+parseInt(_0x28d8b(0xcc))/0xa;if(_0x3510af===_0x2cf61b)break;else _0x10ea78['push'](_0x10ea78['shift']());}catch(_0x224768){_0x10ea78['push'](_0x10ea78['shift']());}}}(_0x167b,0x4fb89));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 _0x2b62(_0x334c92,_0x444591){_0x334c92=_0x334c92-0xa8;const _0x167b28=_0x167b();let _0x2b62be=_0x167b28[_0x334c92];return _0x2b62be;}import{getRangerDir}from'./utils/rangerRoot.js';function _0x167b(){const _0x3103a8=['opencode.json','QyNuh','user','uninstall','zSvEr','feature-tracker','oEhfM','filter','78qDMvBM','ignore','4882401QKgqGV','DeTSm','402328jkNQCz','MnnSa','4994610NEfmlu','ranger@trailhead','platform','length','Nothing\x20to\x20clean\x20up.\x0a','1336hGTmDj','trailhead','string','1078BfxCst','krLgd','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','RJCNn','PNrSp','--scope','gPHRK','PnCTN','akkuu','jrrqH','WslVI','plugin','close','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','13139ZmkyGK','60786QYZHft','ebwIP','zisbp','project','error','205405xNkrJE','utf-8','claude','qENQu','UJXxl','fsABA','e2e-test-recommender','pYaAX','wsnnq','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','win32','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','✓\x20Removed\x20stored\x20credentials','log','ranger','zkWkZ','UYeua','69EzFkdy'];_0x167b=function(){return _0x3103a8;};return _0x167b();}import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x280a34(0xba),_0x280a34(0xc3),'bug-bash',_0x280a34(0xb2)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x2e4349){const _0x4d1898=_0x2e4349['replace'](/\/\*[\s\S]*?\*\//g,''),_0x2d4eff=_0x4d1898['replace'](/^\s*\/\/.*$/gm,''),_0xcb623e=_0x2d4eff['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0xcb623e);}async function removeOpencodePluginConfig(_0x5c5910){const _0x54c0ab=_0x280a34,_0x4b204f={'RJCNn':function(_0x120d5e,_0x3a2b09){return _0x120d5e!==_0x3a2b09;},'PNrSp':_0x54c0ab(0xd3),'xmImM':function(_0x3c9dd5,_0x119fb4,_0x807a50){return _0x3c9dd5(_0x119fb4,_0x807a50);},'UJXxl':_0x54c0ab(0xad),'OjcIX':function(_0x46447d,_0x111bb0){return _0x46447d(_0x111bb0);},'gPHRK':function(_0x158e38,_0x1c5d5a){return _0x158e38===_0x1c5d5a;},'FqhmC':function(_0x202531,_0x3ddff3){return _0x202531+_0x3ddff3;}};if(!existsSync(_0x5c5910))return![];let _0x222852;try{const _0x11f35c=await _0x4b204f['xmImM'](readFile,_0x5c5910,_0x4b204f[_0x54c0ab(0xb0)]);_0x222852=_0x4b204f['OjcIX'](parseJsonc,_0x11f35c);}catch{return![];}const _0x518012=Array['isArray'](_0x222852[_0x54c0ab(0xdf)])?_0x222852['plugin']:[];if(_0x518012[_0x54c0ab(0xcf)]===0x0)return![];const _0x3f1b36=_0x518012[_0x54c0ab(0xc5)](_0x4a882f=>{const _0x4cd152=_0x54c0ab;if(_0x4b204f[_0x4cd152(0xd7)](typeof _0x4a882f,_0x4b204f[_0x4cd152(0xd8)]))return!![];return _0x4b204f['RJCNn'](_0x4a882f,opencodePluginName);});if(_0x3f1b36['length']===_0x518012['length'])return![];return _0x4b204f[_0x54c0ab(0xda)](_0x3f1b36[_0x54c0ab(0xcf)],0x0)?delete _0x222852['plugin']:_0x222852['plugin']=_0x3f1b36,await writeFile(_0x5c5910,_0x4b204f['FqhmC'](JSON['stringify'](_0x222852,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x28fe9f){const _0xf2f6bd=_0x280a34,_0x22ba96={'zkWkZ':_0xf2f6bd(0xcd),'ebwIP':_0xf2f6bd(0xd9),'PnCTN':function(_0x31237b,_0x2b5988,_0x25928e,_0x4d9fa7){return _0x31237b(_0x2b5988,_0x25928e,_0x4d9fa7);},'IVvrh':'ignore','MnnSa':function(_0xc8358){return _0xc8358();},'COhPd':_0xf2f6bd(0xe0),'WslVI':_0xf2f6bd(0xab)};return new Promise(_0x2d4578=>{const _0x4d9f32=_0xf2f6bd,_0xb2c87a={'akkuu':function(_0x431b1c,_0x27a1f2){return _0x431b1c(_0x27a1f2);}},_0x2f65a1=['plugin',_0x4d9f32(0xc1),_0x22ba96[_0x4d9f32(0xbb)]];_0x28fe9f&&_0x2f65a1['push'](_0x22ba96[_0x4d9f32(0xa8)],_0x28fe9f);const _0x1b4f30=_0x22ba96[_0x4d9f32(0xdb)](spawn,'claude',_0x2f65a1,{'stdio':[_0x22ba96['IVvrh'],_0x4d9f32(0xc7),'ignore'],'cwd':_0x28fe9f?_0x22ba96[_0x4d9f32(0xcb)](getProjectRoot):undefined,'shell':process['platform']===_0x4d9f32(0xb6)});_0x1b4f30['on'](_0x22ba96['COhPd'],_0x2d53a5=>{const _0x1f5186=_0x4d9f32;_0xb2c87a[_0x1f5186(0xdc)](_0x2d4578,_0x2d53a5===0x0);}),_0x1b4f30['on'](_0x22ba96[_0x4d9f32(0xde)],()=>{_0x2d4578(![]);});});}async function removeMarketplace(){const _0x462b7d=_0x280a34,_0x48c41f={'uEwwG':function(_0x3abed6,_0x56e364){return _0x3abed6===_0x56e364;},'Nniqf':function(_0x528cb8,_0x57ca5c){return _0x528cb8(_0x57ca5c);},'zSvEr':function(_0x369fef,_0x171ace,_0x197cf6,_0x3bb6a2){return _0x369fef(_0x171ace,_0x197cf6,_0x3bb6a2);},'Foebx':_0x462b7d(0xae),'VlfIx':'remove','wsnnq':'ignore','ZwaBW':_0x462b7d(0xb6)};return new Promise(_0x53c0af=>{const _0x2baaef=_0x462b7d,_0x1d1745={'TYCYT':function(_0x55647a,_0xb332be){return _0x48c41f['uEwwG'](_0x55647a,_0xb332be);},'dDMeV':function(_0x7f5cf,_0x3ba6c9){return _0x48c41f['Nniqf'](_0x7f5cf,_0x3ba6c9);}},_0x1d1664=_0x48c41f[_0x2baaef(0xc2)](spawn,_0x48c41f['Foebx'],['plugin','marketplace',_0x48c41f['VlfIx'],_0x2baaef(0xd2)],{'stdio':[_0x48c41f['wsnnq'],_0x2baaef(0xc7),_0x48c41f[_0x2baaef(0xb4)]],'shell':process[_0x2baaef(0xce)]===_0x48c41f['ZwaBW']});_0x1d1664['on'](_0x2baaef(0xe0),_0x50e5e0=>{_0x53c0af(_0x1d1745['TYCYT'](_0x50e5e0,0x0));}),_0x1d1664['on'](_0x2baaef(0xab),()=>{_0x1d1745['dDMeV'](_0x53c0af,![]);});});}export async function clean(){const _0x50ef2d=_0x280a34,_0x35d9f4={'krLgd':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','QyNuh':function(_0x47d5f3){return _0x47d5f3();},'pYaAX':function(_0x55efe5,_0x50aa58){return _0x55efe5(_0x50aa58);},'zisbp':function(_0x2789a6,_0x47eedd,_0x147a84){return _0x2789a6(_0x47eedd,_0x147a84);},'UYeua':function(_0x55e270){return _0x55e270();},'RsMKi':_0x50ef2d(0xaa),'DeTSm':function(_0x4ab314,_0x233373,_0x527865){return _0x4ab314(_0x233373,_0x527865);},'IaKjD':function(_0x17014f,_0x5a448f){return _0x17014f(_0x5a448f);},'fsABA':function(_0x3eb013,_0x4552fa,_0x456a22){return _0x3eb013(_0x4552fa,_0x456a22);},'jrrqH':_0x50ef2d(0xc0),'TDokw':function(_0x4a555c,_0x279cb2){return _0x4a555c(_0x279cb2);},'oGzuK':function(_0x4b35ce,_0x17aa9c,_0x40d428){return _0x4b35ce(_0x17aa9c,_0x40d428);},'LCKCP':function(_0x5de62e,_0x3500e8){return _0x5de62e(_0x3500e8);},'qENQu':function(_0x68731b,_0x54bce3,_0xdc409b){return _0x68731b(_0x54bce3,_0xdc409b);},'qfuIp':_0x50ef2d(0xbe),'huvDj':function(_0x338827,_0x55d08a){return _0x338827(_0x55d08a);},'tFPwS':function(_0x417721){return _0x417721();},'GfDeO':function(_0x1e72fa){return _0x1e72fa();},'oEhfM':'✓\x20Removed\x20trailhead\x20marketplace'};console[_0x50ef2d(0xb9)](_0x35d9f4[_0x50ef2d(0xd5)]);let _0x558f14=![];try{await deleteAllCredentials(),console['log'](_0x50ef2d(0xb8)),_0x558f14=!![];}catch{}const _0x2289b4=_0x35d9f4[_0x50ef2d(0xbf)](getCacheFile);existsSync(_0x2289b4)&&(await rm(_0x2289b4),_0x558f14=!![]);const _0x295477=_0x35d9f4[_0x50ef2d(0xbf)](getRangerDir);_0x35d9f4['pYaAX'](existsSync,_0x295477)&&(await _0x35d9f4[_0x50ef2d(0xa9)](rm,_0x295477,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x558f14=!![]);const _0x5042e2=_0x35d9f4[_0x50ef2d(0xbc)](getProjectSkillsDir);for(const _0x170e28 of skillsToRemove){const _0x2391ef=join(_0x5042e2,_0x170e28);_0x35d9f4['pYaAX'](existsSync,_0x2391ef)&&(await _0x35d9f4[_0x50ef2d(0xa9)](rm,_0x2391ef,{'recursive':!![]}),console[_0x50ef2d(0xb9)]('✓\x20Removed\x20project\x20skill:\x20'+_0x170e28),_0x558f14=!![]);}const _0x4acf2b=getUserSkillsDir();for(const _0x32c085 of skillsToRemove){const _0xf08a14=join(_0x4acf2b,_0x32c085);existsSync(_0xf08a14)&&(await _0x35d9f4[_0x50ef2d(0xa9)](rm,_0xf08a14,{'recursive':!![]}),console[_0x50ef2d(0xb9)]('✓\x20Removed\x20user\x20skill:\x20'+_0x32c085),_0x558f14=!![]);}const _0x17429b=_0x35d9f4[_0x50ef2d(0xb3)](getOpencodeSkillsDir,_0x35d9f4['RsMKi']);for(const _0x127a2d of skillsToRemove){const _0x5e17f0=_0x35d9f4[_0x50ef2d(0xc9)](join,_0x17429b,_0x127a2d);_0x35d9f4['IaKjD'](existsSync,_0x5e17f0)&&(await _0x35d9f4[_0x50ef2d(0xb1)](rm,_0x5e17f0,{'recursive':!![]}),console[_0x50ef2d(0xb9)](_0x50ef2d(0xe1)+_0x127a2d),_0x558f14=!![]);}const _0x2d9bd3=getOpencodeSkillsDir(_0x35d9f4[_0x50ef2d(0xdd)]);for(const _0x3f06c3 of skillsToRemove){const _0x33bff6=_0x35d9f4['zisbp'](join,_0x2d9bd3,_0x3f06c3);_0x35d9f4['TDokw'](existsSync,_0x33bff6)&&(await rm(_0x33bff6,{'recursive':!![]}),console[_0x50ef2d(0xb9)](_0x50ef2d(0xb5)+_0x3f06c3),_0x558f14=!![]);}const _0x1543c7=_0x35d9f4['oGzuK'](join,getOpencodeConfigDir(_0x50ef2d(0xaa)),_0x50ef2d(0xbe));await _0x35d9f4['LCKCP'](removeOpencodePluginConfig,_0x1543c7)&&(console[_0x50ef2d(0xb9)]('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x558f14=!![]);const _0x2611e6=_0x35d9f4[_0x50ef2d(0xaf)](join,_0x35d9f4['LCKCP'](getOpencodeConfigDir,_0x35d9f4['jrrqH']),_0x35d9f4['qfuIp']);await _0x35d9f4['huvDj'](removeOpencodePluginConfig,_0x2611e6)&&(console[_0x50ef2d(0xb9)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x558f14=!![]);const _0x27ca3c=await _0x35d9f4['tFPwS'](uninstallClaudePlugin);_0x27ca3c&&(console['log'](_0x50ef2d(0xd6)),_0x558f14=!![]);const _0xd25c6d=await uninstallClaudePlugin(_0x50ef2d(0xaa));_0xd25c6d&&(console[_0x50ef2d(0xb9)](_0x50ef2d(0xb7)),_0x558f14=!![]);const _0x4d66ab=await _0x35d9f4['GfDeO'](removeMarketplace);_0x4d66ab&&(console['log'](_0x35d9f4[_0x50ef2d(0xc4)]),_0x558f14=!![]),_0x558f14?console[_0x50ef2d(0xb9)]('\x0a✅\x20Cleanup\x20complete!\x0a'):console['log'](_0x50ef2d(0xd0));}
@@ -1 +1 @@
1
- const _0x1a80b5=_0x29ed;(function(_0x15a35f,_0x4bd1b6){const _0x4f888b=_0x29ed,_0x558338=_0x15a35f();while(!![]){try{const _0x371142=-parseInt(_0x4f888b(0x14e))/0x1+parseInt(_0x4f888b(0x145))/0x2*(-parseInt(_0x4f888b(0x14c))/0x3)+-parseInt(_0x4f888b(0x149))/0x4*(parseInt(_0x4f888b(0x15f))/0x5)+-parseInt(_0x4f888b(0x166))/0x6*(-parseInt(_0x4f888b(0x16d))/0x7)+-parseInt(_0x4f888b(0x16b))/0x8*(-parseInt(_0x4f888b(0x174))/0x9)+parseInt(_0x4f888b(0x147))/0xa+-parseInt(_0x4f888b(0x169))/0xb*(-parseInt(_0x4f888b(0x175))/0xc);if(_0x371142===_0x4bd1b6)break;else _0x558338['push'](_0x558338['shift']());}catch(_0x332f3a){_0x558338['push'](_0x558338['shift']());}}}(_0x23a3,0xcda8b));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';function _0x23a3(){const _0x175771=['\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','NaWST','XmfqT','114154XBfTiF','sOaaH','10577580fYkfsc','length','18988LFLRNY','\x20\x20Note:\x20\x22','No\x20configuration\x20set\x20for\x20\x22','39cUlDDu','HgUUi','1126594INKsxs','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','uCKyV','rtetH','true','\x20=\x20','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','Key\x20\x22','zNbUO','XEcJR','dmWHr','cloud','startsWith','stringify','nRgPQ','Profile\x20\x22','(not\x20set)','395bTFsYb','WImyz','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','keys','object','\x20for\x20\x22','allowInsecureLocalhost','258882HjyGEG','kind','Removed\x20','4466wFUOVK','WGbgU','8WQQgcx','\x22\x20not\x20found','196ukNauL','test','ZrXrD','log','cnchP','PiJtx','includes','5459013GqAHhF','6312hNJGso','undefined','alsoExistsElsewhere','uQBjL','DCOnG','RIpvH'];_0x23a3=function(){return _0x175771;};return _0x23a3();}import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless',_0x1a80b5(0x165),'forceLogin'];function parseLocalValue(_0x17bc0c,_0x284be3){const _0x1030fb=_0x1a80b5,_0x564b42={'RIpvH':_0x1030fb(0x152),'NDSkA':function(_0x1ba550,_0x27c9b5){return _0x1ba550===_0x27c9b5;},'YXjkN':'false'};if(BOOLEAN_KEYS[_0x1030fb(0x173)](_0x17bc0c)){if(_0x284be3===_0x564b42[_0x1030fb(0x141)])return!![];if(_0x564b42['NDSkA'](_0x284be3,_0x564b42['YXjkN']))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x17bc0c+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x284be3;}function parseOverrideValue(_0x123d48){const _0x366cab=_0x1a80b5,_0xc85c8e={'sOZEt':function(_0x339c94,_0x58f01a){return _0x339c94===_0x58f01a;},'cnchP':'true','AKfNs':'null','NaWST':function(_0xd1cc25,_0xe43ceb){return _0xd1cc25===_0xe43ceb;},'ZrXrD':function(_0x16e7f5,_0x507c1b){return _0x16e7f5(_0x507c1b);}};if(_0xc85c8e['sOZEt'](_0x123d48,_0xc85c8e[_0x366cab(0x171)]))return!![];if(_0xc85c8e['sOZEt'](_0x123d48,'false'))return![];if(_0x123d48===_0xc85c8e['AKfNs'])return null;if(_0xc85c8e[_0x366cab(0x143)](_0x123d48,_0x366cab(0x176)))return undefined;if(/^-?\d+$/['test'](_0x123d48)){const _0x3afadb=Number(_0x123d48);if(Number['isSafeInteger'](_0x3afadb))return _0x3afadb;}if(/^-?\d+\.\d+$/[_0x366cab(0x16e)](_0x123d48)){const _0x16eb22=_0xc85c8e[_0x366cab(0x16f)](Number,_0x123d48);if(!Number['isNaN'](_0x16eb22))return _0x16eb22;}const _0x13af62=_0x123d48['trim']();if(_0x13af62[_0x366cab(0x15a)]('{')&&_0x13af62['endsWith']('}')||_0x13af62['startsWith']('[')&&_0x13af62['endsWith'](']'))try{return JSON['parse'](_0x13af62);}catch{}return _0x123d48;}async function resolveProfileTarget(_0x2f695e){const _0x52cf61=_0x1a80b5,_0x5628e8={'ZJumx':function(_0x42981d,_0x45ab52){return _0x42981d(_0x45ab52);},'WGbgU':function(_0x155ed0,_0x240e4e){return _0x155ed0(_0x240e4e);},'nRgPQ':'local'},_0x3e2526=_0x5628e8['ZJumx'](existsSync,_0x5628e8[_0x52cf61(0x16a)](getEnvDir,_0x2f695e));let _0xda73aa=![];try{const _0x4dcd83=await fetchCloudProfile(_0x2f695e);_0xda73aa=Boolean(_0x4dcd83);}catch{}if(_0xda73aa)return{'kind':_0x52cf61(0x159),'alsoExistsElsewhere':_0x3e2526};if(_0x3e2526)return{'kind':_0x5628e8[_0x52cf61(0x15c)],'alsoExistsElsewhere':![]};throw new Error(_0x52cf61(0x15d)+_0x2f695e+_0x52cf61(0x161)+_0x2f695e);}function printDualExistsHint(_0x265ee2){const _0x16dd65=_0x1a80b5;console[_0x16dd65(0x170)](_0x16dd65(0x14a)+_0x265ee2+_0x16dd65(0x154));}function _0x29ed(_0x383607,_0x5eb460){_0x383607=_0x383607-0x141;const _0x23a356=_0x23a3();let _0x29ed5a=_0x23a356[_0x383607];return _0x29ed5a;}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x51c81d){const _0x46cee1={'Kvbiz':function(_0x7b031e,_0x408610){return _0x7b031e(_0x408610);}},_0x2e2740=await _0x46cee1['Kvbiz'](fetchCloudProfile,_0x51c81d),_0x398aeb=readProfileOverrides(getProjectPath(),_0x51c81d);return mergeCloudProfileSettings(_0x2e2740?.['settings']??{},_0x398aeb??undefined);}export async function configSet(_0x1ba713,_0x260bef,_0x112220){const _0x5aeeb0=_0x1a80b5,_0x1b8a1c={'PiJtx':'cloud','KTqYb':function(_0x10cd55,_0x1483cd,_0x35c0ae,_0x22e62c,_0x2ed0e6){return _0x10cd55(_0x1483cd,_0x35c0ae,_0x22e62c,_0x2ed0e6);},'uQBjL':function(_0x44decf){return _0x44decf();}},_0xdd647f=await resolveProfileTarget(_0x1ba713);if(_0xdd647f['kind']===_0x1b8a1c[_0x5aeeb0(0x172)]){if(_0xdd647f[_0x5aeeb0(0x177)])printDualExistsHint(_0x1ba713);const _0x575eef=parseOverrideValue(_0x112220);setProfileOverride(getProjectPath(),_0x1ba713,_0x260bef,_0x575eef),console['log']('Set\x20'+_0x260bef+_0x5aeeb0(0x153)+JSON[_0x5aeeb0(0x15b)](_0x575eef)+'\x20for\x20\x22'+_0x1ba713+'\x22');return;}const _0x230809=parseLocalValue(_0x260bef,_0x112220);_0x1b8a1c['KTqYb'](setProfileOverride,_0x1b8a1c[_0x5aeeb0(0x178)](getProjectPath),_0x1ba713,_0x260bef,_0x230809),console['log']('Set\x20'+_0x260bef+_0x5aeeb0(0x153)+_0x230809+_0x5aeeb0(0x164)+_0x1ba713+'\x22');}export async function configGet(_0x12eaef,_0x2b22b9){const _0x3d35c6=_0x1a80b5,_0x3ecc8b={'HgUUi':function(_0x910962,_0x4768f9){return _0x910962===_0x4768f9;},'XmfqT':function(_0x3dcaae,_0x30d8d3){return _0x3dcaae(_0x30d8d3);},'sOaaH':function(_0x4382a9,_0xc2058,_0x33bf2d){return _0x4382a9(_0xc2058,_0x33bf2d);},'dmWHr':function(_0x35a4cc,_0x327b3c){return _0x35a4cc===_0x327b3c;}},_0x339b84=await resolveProfileTarget(_0x12eaef);if(_0x3ecc8b[_0x3d35c6(0x14d)](_0x339b84['kind'],'cloud')){const _0x3129a7=await _0x3ecc8b[_0x3d35c6(0x144)](loadEffectiveCloudSettings,_0x12eaef),_0x4b6ab9=getNestedValue(_0x3129a7,_0x2b22b9);if(_0x4b6ab9===undefined)console['log'](_0x3d35c6(0x15e));else typeof _0x4b6ab9===_0x3d35c6(0x163)?console['log'](JSON['stringify'](_0x4b6ab9,null,0x2)):console[_0x3d35c6(0x170)](_0x4b6ab9);return;}const _0x270965=await _0x3ecc8b[_0x3d35c6(0x144)](loadSettings,_0x12eaef),_0x1e62b2=_0x3ecc8b[_0x3d35c6(0x146)](getNestedValue,_0x270965,_0x2b22b9);if(_0x3ecc8b['HgUUi'](_0x1e62b2,undefined))console[_0x3d35c6(0x170)](_0x3d35c6(0x15e));else _0x3ecc8b[_0x3d35c6(0x158)](typeof _0x1e62b2,'object')?console['log'](JSON['stringify'](_0x1e62b2,null,0x2)):console[_0x3d35c6(0x170)](_0x1e62b2);}export async function configList(_0x530bb1){const _0x4d2756=_0x1a80b5,_0x41f8e9={'TcNnJ':function(_0x4f3b37,_0x152b28){return _0x4f3b37===_0x152b28;},'qzCLg':_0x4d2756(0x159),'WImyz':function(_0x347d09,_0x8c6e9c){return _0x347d09(_0x8c6e9c);},'DCOnG':function(_0x1c887f,_0x47bf4c){return _0x1c887f(_0x47bf4c);},'NCTdA':function(_0x5f2772,_0x3259dc){return _0x5f2772(_0x3259dc);}},_0x38cc7a=await resolveProfileTarget(_0x530bb1);if(_0x41f8e9['TcNnJ'](_0x38cc7a[_0x4d2756(0x167)],_0x41f8e9['qzCLg'])){const _0x3194a0=await loadEffectiveCloudSettings(_0x530bb1);if(!_0x3194a0||Object[_0x4d2756(0x162)](_0x3194a0)[_0x4d2756(0x148)]===0x0){console[_0x4d2756(0x170)]('No\x20configuration\x20set\x20for\x20\x22'+_0x530bb1+'\x22');return;}console['log'](JSON[_0x4d2756(0x15b)](_0x3194a0,null,0x2));return;}const _0x34cb08=_0x41f8e9[_0x4d2756(0x160)](getSettingsPath,_0x530bb1);if(!_0x41f8e9[_0x4d2756(0x179)](existsSync,_0x34cb08)){console['log'](_0x4d2756(0x14b)+_0x530bb1+'\x22');return;}const _0x51fb9b=await _0x41f8e9['NCTdA'](loadSettings,_0x530bb1),_0x26fc1c=_0x41f8e9['DCOnG'](formatSettings,_0x51fb9b);!_0x26fc1c?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x530bb1+'\x22'):console[_0x4d2756(0x170)](_0x26fc1c);}export async function configUnset(_0x59edbd,_0x1a2d2f){const _0x57a503=_0x1a80b5,_0x574e5a={'IpQEt':function(_0x2cd205,_0x4ac3eb){return _0x2cd205(_0x4ac3eb);},'iIjco':function(_0x1bb46c,_0x476351){return _0x1bb46c===_0x476351;},'XEcJR':_0x57a503(0x159),'uCKyV':function(_0x3c6efd,_0x56b137){return _0x3c6efd(_0x56b137);},'FOPqn':function(_0x4e0e38,_0x2d6b81,_0x403182,_0x4d9137){return _0x4e0e38(_0x2d6b81,_0x403182,_0x4d9137);},'rtetH':function(_0x10ce9b){return _0x10ce9b();}},_0x563466=await _0x574e5a['IpQEt'](resolveProfileTarget,_0x59edbd);if(_0x574e5a['iIjco'](_0x563466['kind'],_0x574e5a[_0x57a503(0x157)])){if(_0x563466[_0x57a503(0x177)])_0x574e5a[_0x57a503(0x150)](printDualExistsHint,_0x59edbd);const _0x5b1a61=_0x574e5a['FOPqn'](unsetProfileOverride,_0x574e5a[_0x57a503(0x151)](getProjectPath),_0x59edbd,_0x1a2d2f);_0x5b1a61?console['log'](_0x57a503(0x168)+_0x1a2d2f+'\x20for\x20\x22'+_0x59edbd+'\x22'):console['log'](_0x57a503(0x155)+_0x1a2d2f+_0x57a503(0x16c));return;}const _0x5b8cc7=unsetProfileOverride(getProjectPath(),_0x59edbd,_0x1a2d2f);if(_0x5b8cc7){console['log'](_0x57a503(0x168)+_0x1a2d2f);return;}const _0x3bb738=await loadSettings(_0x59edbd),_0x780f00=deleteNestedValue(_0x3bb738,_0x1a2d2f);_0x780f00?console[_0x57a503(0x170)]('Key\x20\x22'+_0x1a2d2f+_0x57a503(0x142)+_0x59edbd+_0x57a503(0x14f)):console['log'](_0x57a503(0x155)+_0x1a2d2f+_0x57a503(0x16c));}export async function configReset(_0x64a77b){const _0x2dfef4=_0x1a80b5,_0x33e8d6={'zNbUO':function(_0x26ac6e,_0x32fe99){return _0x26ac6e===_0x32fe99;},'aqtGF':function(_0xe47267){return _0xe47267();}},_0x47fd81=await resolveProfileTarget(_0x64a77b);if(_0x33e8d6[_0x2dfef4(0x156)](_0x47fd81[_0x2dfef4(0x167)],'cloud')){resetProfileOverrides(_0x33e8d6['aqtGF'](getProjectPath),_0x64a77b),console[_0x2dfef4(0x170)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x64a77b+'\x22');return;}console['log']('\x22'+_0x64a77b+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x64a77b+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ const _0x4b8c80=_0x3f77;(function(_0x50f967,_0x54f679){const _0x158739=_0x3f77,_0x1f1cb9=_0x50f967();while(!![]){try{const _0x261d24=-parseInt(_0x158739(0x1d4))/0x1*(-parseInt(_0x158739(0x1cd))/0x2)+-parseInt(_0x158739(0x1df))/0x3*(-parseInt(_0x158739(0x1d2))/0x4)+parseInt(_0x158739(0x1e4))/0x5+-parseInt(_0x158739(0x1e3))/0x6+parseInt(_0x158739(0x1e9))/0x7+-parseInt(_0x158739(0x1bd))/0x8+parseInt(_0x158739(0x1e1))/0x9;if(_0x261d24===_0x54f679)break;else _0x1f1cb9['push'](_0x1f1cb9['shift']());}catch(_0x2987fe){_0x1f1cb9['push'](_0x1f1cb9['shift']());}}}(_0x25c9,0xb3974));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',_0x4b8c80(0x1c6),'forceLogin'];function _0x3f77(_0x3a4511,_0xc4bd5d){_0x3a4511=_0x3a4511-0x1b8;const _0x25c94e=_0x25c9();let _0x3f7730=_0x25c94e[_0x3a4511];return _0x3f7730;}function parseLocalValue(_0x1a75fd,_0x438027){const _0x9cbab3=_0x4b8c80,_0x3bbd23={'EOLcy':function(_0x24cd0f,_0x14c723){return _0x24cd0f===_0x14c723;}};if(BOOLEAN_KEYS[_0x9cbab3(0x1d7)](_0x1a75fd)){if(_0x3bbd23[_0x9cbab3(0x1cc)](_0x438027,_0x9cbab3(0x1d1)))return!![];if(_0x438027==='false')return![];throw new Error(_0x9cbab3(0x1ea)+_0x1a75fd+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x438027;}function parseOverrideValue(_0x366c0c){const _0x2bf47f=_0x4b8c80,_0x57e748={'fLrfI':function(_0x75b0b4,_0x5f4975){return _0x75b0b4===_0x5f4975;},'glYnF':function(_0x43846c,_0x1d9960){return _0x43846c===_0x1d9960;}};if(_0x57e748['fLrfI'](_0x366c0c,_0x2bf47f(0x1d1)))return!![];if(_0x57e748[_0x2bf47f(0x1cb)](_0x366c0c,_0x2bf47f(0x1d6)))return![];if(_0x57e748[_0x2bf47f(0x1c1)](_0x366c0c,_0x2bf47f(0x1c9)))return null;if(_0x366c0c===_0x2bf47f(0x1de))return undefined;if(/^-?\d+$/[_0x2bf47f(0x1be)](_0x366c0c)){const _0x17b5e0=Number(_0x366c0c);if(Number['isSafeInteger'](_0x17b5e0))return _0x17b5e0;}if(/^-?\d+\.\d+$/[_0x2bf47f(0x1be)](_0x366c0c)){const _0x2da6ac=Number(_0x366c0c);if(!Number['isNaN'](_0x2da6ac))return _0x2da6ac;}const _0x54f528=_0x366c0c['trim']();if(_0x54f528[_0x2bf47f(0x1d0)]('{')&&_0x54f528['endsWith']('}')||_0x54f528['startsWith']('[')&&_0x54f528[_0x2bf47f(0x1bc)](']'))try{return JSON[_0x2bf47f(0x1e0)](_0x54f528);}catch{}return _0x366c0c;}async function resolveProfileTarget(_0x590de7){const _0x573708=_0x4b8c80,_0x16a40c={'sPkJK':function(_0x56fc00,_0x2276f1){return _0x56fc00(_0x2276f1);},'RGqcc':function(_0x44fa42,_0x261546){return _0x44fa42(_0x261546);},'RBVAO':_0x573708(0x1c7)},_0x1acfa9=existsSync(_0x16a40c[_0x573708(0x1d9)](getEnvDir,_0x590de7));let _0x505922=![];try{const _0x1e05fc=await _0x16a40c[_0x573708(0x1d9)](fetchCloudProfile,_0x590de7);_0x505922=_0x16a40c[_0x573708(0x1e5)](Boolean,_0x1e05fc);}catch{}if(_0x505922)return{'kind':'cloud','alsoExistsElsewhere':_0x1acfa9};if(_0x1acfa9)return{'kind':_0x16a40c['RBVAO'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x590de7+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x590de7);}function printDualExistsHint(_0xaab313){const _0x7b860e=_0x4b8c80;console['log'](_0x7b860e(0x1da)+_0xaab313+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x2a8a91=_0x4b8c80;return process[_0x2a8a91(0x1dc)]();}async function loadEffectiveCloudSettings(_0x459a00){const _0x143e90=_0x4b8c80,_0x50acff={'cIqZn':function(_0x1339cd,_0x34a618){return _0x1339cd(_0x34a618);},'ncslA':function(_0x38150f,_0x1dc70b,_0x2fe406){return _0x38150f(_0x1dc70b,_0x2fe406);},'DQzhw':function(_0xf2d621,_0x1b1d06){return _0xf2d621??_0x1b1d06;}},_0x41da4b=await _0x50acff['cIqZn'](fetchCloudProfile,_0x459a00),_0x2f94fe=readProfileOverrides(getProjectPath(),_0x459a00);return _0x50acff[_0x143e90(0x1c5)](mergeCloudProfileSettings,_0x41da4b?.[_0x143e90(0x1c8)]??{},_0x50acff['DQzhw'](_0x2f94fe,undefined));}export async function configSet(_0x355aff,_0x330593,_0x2cddb9){const _0x2f053c=_0x4b8c80,_0x183b8a={'TwSHA':function(_0x53906b,_0x3a18fb){return _0x53906b(_0x3a18fb);},'Nrerh':function(_0x24fb7f,_0x361169){return _0x24fb7f===_0x361169;},'cBYSg':function(_0x4d2dc3,_0x44126c){return _0x4d2dc3(_0x44126c);},'DsOLZ':function(_0x360e86){return _0x360e86();}},_0x26d236=await _0x183b8a[_0x2f053c(0x1d3)](resolveProfileTarget,_0x355aff);if(_0x183b8a[_0x2f053c(0x1e2)](_0x26d236['kind'],_0x2f053c(0x1ec))){if(_0x26d236['alsoExistsElsewhere'])printDualExistsHint(_0x355aff);const _0xd5bf14=_0x183b8a[_0x2f053c(0x1d8)](parseOverrideValue,_0x2cddb9);setProfileOverride(_0x183b8a['DsOLZ'](getProjectPath),_0x355aff,_0x330593,_0xd5bf14),console['log']('Set\x20'+_0x330593+_0x2f053c(0x1bb)+JSON[_0x2f053c(0x1b9)](_0xd5bf14)+_0x2f053c(0x1c2)+_0x355aff+'\x22');return;}const _0x1bd4cf=parseLocalValue(_0x330593,_0x2cddb9);setProfileOverride(getProjectPath(),_0x355aff,_0x330593,_0x1bd4cf),console[_0x2f053c(0x1ed)](_0x2f053c(0x1ce)+_0x330593+_0x2f053c(0x1bb)+_0x1bd4cf+_0x2f053c(0x1c2)+_0x355aff+'\x22');}export async function configGet(_0x490dc3,_0x5aadc9){const _0x36a0ea=_0x4b8c80,_0x1603ce={'GcywK':function(_0x58674d,_0x1337d3){return _0x58674d(_0x1337d3);},'dPLyc':function(_0x56abe4,_0x205f1b){return _0x56abe4===_0x205f1b;},'UgKYC':_0x36a0ea(0x1bf),'vjktK':function(_0x10170b,_0x3fa7d7){return _0x10170b(_0x3fa7d7);},'GulXb':function(_0x22b4f0,_0x3b2ed1){return _0x22b4f0===_0x3b2ed1;}},_0x59c4f4=await _0x1603ce['GcywK'](resolveProfileTarget,_0x490dc3);if(_0x59c4f4['kind']==='cloud'){const _0x2e6a87=await _0x1603ce['GcywK'](loadEffectiveCloudSettings,_0x490dc3),_0x457be6=getNestedValue(_0x2e6a87,_0x5aadc9);if(_0x1603ce['dPLyc'](_0x457be6,undefined))console[_0x36a0ea(0x1ed)]('(not\x20set)');else typeof _0x457be6===_0x1603ce['UgKYC']?console[_0x36a0ea(0x1ed)](JSON[_0x36a0ea(0x1b9)](_0x457be6,null,0x2)):console['log'](_0x457be6);return;}const _0x4a7f4e=await _0x1603ce['vjktK'](loadSettings,_0x490dc3),_0x31a3c4=getNestedValue(_0x4a7f4e,_0x5aadc9);if(_0x31a3c4===undefined)console['log'](_0x36a0ea(0x1eb));else _0x1603ce['GulXb'](typeof _0x31a3c4,_0x1603ce[_0x36a0ea(0x1ee)])?console['log'](JSON['stringify'](_0x31a3c4,null,0x2)):console[_0x36a0ea(0x1ed)](_0x31a3c4);}function _0x25c9(){const _0x3a5482=['fLrfI','\x20for\x20\x22','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','Removed\x20','ncslA','allowInsecureLocalhost','local','settings','null','\x22\x20not\x20found','glYnF','EOLcy','2DGoebK','Set\x20','MLvRl','startsWith','true','2916868rSgyjj','TwSHA','659819wvVcIx','iBorL','false','includes','cBYSg','sPkJK','\x20\x20Note:\x20\x22','GcbXj','cwd','No\x20configuration\x20set\x20for\x20\x22','undefined','3WQZSWB','parse','11283831MENnTl','Nrerh','7834134XRDbbp','3415370pSpUhQ','RGqcc','kind','aebCf','length','808598wrZYAW','Invalid\x20value\x20for\x20','(not\x20set)','cloud','log','UgKYC','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','stringify','lrbyr','\x20=\x20','endsWith','11200720YAItbA','test','object','Cleared\x20local\x20overrides\x20for\x20\x22'];_0x25c9=function(){return _0x3a5482;};return _0x25c9();}export async function configList(_0x511392){const _0x4626c0=_0x4b8c80,_0x456fdd={'lrbyr':_0x4626c0(0x1ec),'hnWlk':function(_0x1e60f3,_0x28a998){return _0x1e60f3(_0x28a998);}},_0x10fd6b=await resolveProfileTarget(_0x511392);if(_0x10fd6b['kind']===_0x456fdd[_0x4626c0(0x1ba)]){const _0x250786=await _0x456fdd['hnWlk'](loadEffectiveCloudSettings,_0x511392);if(!_0x250786||Object['keys'](_0x250786)[_0x4626c0(0x1e8)]===0x0){console[_0x4626c0(0x1ed)]('No\x20configuration\x20set\x20for\x20\x22'+_0x511392+'\x22');return;}console[_0x4626c0(0x1ed)](JSON[_0x4626c0(0x1b9)](_0x250786,null,0x2));return;}const _0xd5cae9=getSettingsPath(_0x511392);if(!existsSync(_0xd5cae9)){console['log'](_0x4626c0(0x1dd)+_0x511392+'\x22');return;}const _0x33cb92=await loadSettings(_0x511392),_0x52616d=formatSettings(_0x33cb92);!_0x52616d?console[_0x4626c0(0x1ed)]('No\x20configuration\x20set\x20for\x20\x22'+_0x511392+'\x22'):console['log'](_0x52616d);}export async function configUnset(_0x3f8854,_0x22776f){const _0x397491=_0x4b8c80,_0x31b3ff={'iBorL':'cloud','CAqar':function(_0x42165c,_0x12c20f){return _0x42165c(_0x12c20f);},'mMjyj':function(_0x54ec7c,_0x16519d,_0x967f3f,_0x4561ed){return _0x54ec7c(_0x16519d,_0x967f3f,_0x4561ed);},'GcbXj':function(_0x24c0d2){return _0x24c0d2();},'AtkOo':function(_0x546b44,_0x4153fb,_0x19b345){return _0x546b44(_0x4153fb,_0x19b345);}},_0x2a64dd=await resolveProfileTarget(_0x3f8854);if(_0x2a64dd[_0x397491(0x1e6)]===_0x31b3ff[_0x397491(0x1d5)]){if(_0x2a64dd['alsoExistsElsewhere'])_0x31b3ff['CAqar'](printDualExistsHint,_0x3f8854);const _0x297bf5=_0x31b3ff['mMjyj'](unsetProfileOverride,_0x31b3ff[_0x397491(0x1db)](getProjectPath),_0x3f8854,_0x22776f);_0x297bf5?console[_0x397491(0x1ed)](_0x397491(0x1c4)+_0x22776f+'\x20for\x20\x22'+_0x3f8854+'\x22'):console['log']('Key\x20\x22'+_0x22776f+_0x397491(0x1ca));return;}const _0x4274b5=unsetProfileOverride(_0x31b3ff[_0x397491(0x1db)](getProjectPath),_0x3f8854,_0x22776f);if(_0x4274b5){console[_0x397491(0x1ed)]('Removed\x20'+_0x22776f);return;}const _0x259a11=await loadSettings(_0x3f8854),_0x25e56f=_0x31b3ff['AtkOo'](deleteNestedValue,_0x259a11,_0x22776f);_0x25e56f?console[_0x397491(0x1ed)]('Key\x20\x22'+_0x22776f+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x3f8854+_0x397491(0x1b8)):console[_0x397491(0x1ed)]('Key\x20\x22'+_0x22776f+_0x397491(0x1ca));}export async function configReset(_0x11664b){const _0x444a0b=_0x4b8c80,_0x1bbe10={'aebCf':function(_0x8904b0,_0x185321){return _0x8904b0===_0x185321;},'MLvRl':'cloud','WxHuD':function(_0x21288b,_0x3bf804,_0x20cf11){return _0x21288b(_0x3bf804,_0x20cf11);}},_0x3183f7=await resolveProfileTarget(_0x11664b);if(_0x1bbe10[_0x444a0b(0x1e7)](_0x3183f7['kind'],_0x1bbe10[_0x444a0b(0x1cf)])){_0x1bbe10['WxHuD'](resetProfileOverrides,getProjectPath(),_0x11664b),console[_0x444a0b(0x1ed)](_0x444a0b(0x1c0)+_0x11664b+'\x22');return;}console['log']('\x22'+_0x11664b+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x11664b+_0x444a0b(0x1c3));}
@@ -1 +1 @@
1
- (function(_0x508b17,_0x347e20){const _0x51a477=_0x3b95,_0x24d35c=_0x508b17();while(!![]){try{const _0x3546d7=-parseInt(_0x51a477(0x157))/0x1*(-parseInt(_0x51a477(0x165))/0x2)+-parseInt(_0x51a477(0x15c))/0x3*(-parseInt(_0x51a477(0x159))/0x4)+parseInt(_0x51a477(0x164))/0x5+parseInt(_0x51a477(0x15f))/0x6+-parseInt(_0x51a477(0x155))/0x7+-parseInt(_0x51a477(0x15b))/0x8+-parseInt(_0x51a477(0x163))/0x9;if(_0x3546d7===_0x347e20)break;else _0x24d35c['push'](_0x24d35c['shift']());}catch(_0x478f38){_0x24d35c['push'](_0x24d35c['shift']());}}}(_0x5d72,0x4a996));function _0x3b95(_0x49e7df,_0x210af7){_0x49e7df=_0x49e7df-0x154;const _0x5d72c3=_0x5d72();let _0x3b95d2=_0x5d72c3[_0x49e7df];return _0x3b95d2;}import _0x122f1e from'inquirer';function _0x5d72(){const _0x1b14e2=['SXAGW','7297245BXfOVD','1307440kCnkzE','4NePdhX','yes','MQUwL','\x22\x20to\x20confirm\x20deletion:','log','729743EyITcC','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','213013IYXWuq','prompt','12dfGYhn','\x22\x20for\x20everyone\x20in\x20your\x20organization.','2183896WfDpzj','441930zYfjrL','cwd','FhdTl','2184930oHTByh','\x22\x20not\x20found.','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.'];_0x5d72=function(){return _0x1b14e2;};return _0x5d72();}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x3e1f7d,_0x34dbf4={}){const _0x4d34d6=_0x3b95,_0x330212={'SXAGW':'input','YmxGC':_0x4d34d6(0x161),'FhdTl':function(_0x3d4a7e,_0x2b64df){return _0x3d4a7e(_0x2b64df);},'MQUwL':function(_0x261d4c,_0x98b481,_0x122bc9){return _0x261d4c(_0x98b481,_0x122bc9);}},_0x33ccd2=await fetchCloudProfile(_0x3e1f7d);if(!_0x33ccd2)throw new Error('Cloud\x20profile\x20\x22'+_0x3e1f7d+_0x4d34d6(0x160));if(!_0x34dbf4[_0x4d34d6(0x166)]&&!isInteractive())throw new Error(_0x4d34d6(0x156));console[_0x4d34d6(0x154)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x3e1f7d+_0x4d34d6(0x15a));if(!_0x34dbf4[_0x4d34d6(0x166)]){const {confirmation:_0x2f18f6}=await _0x122f1e[_0x4d34d6(0x158)]([{'type':_0x330212[_0x4d34d6(0x162)],'name':'confirmation','message':'Type\x20\x22'+_0x3e1f7d+_0x4d34d6(0x168)}]);if(_0x2f18f6!==_0x3e1f7d)throw new Error(_0x330212['YmxGC']);}await _0x330212[_0x4d34d6(0x15e)](deleteCloudProfile,_0x3e1f7d),resetProfileOverrides(process[_0x4d34d6(0x15d)](),_0x3e1f7d),_0x330212[_0x4d34d6(0x167)](clearLastProfile,process[_0x4d34d6(0x15d)](),_0x3e1f7d),console[_0x4d34d6(0x154)]('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x3e1f7d+'\x22.');}
1
+ (function(_0x1be0f4,_0x3e46b2){const _0xebaeb3=_0x59a2,_0xde4994=_0x1be0f4();while(!![]){try{const _0x5e440b=-parseInt(_0xebaeb3(0xcc))/0x1+-parseInt(_0xebaeb3(0xc8))/0x2+-parseInt(_0xebaeb3(0xd3))/0x3*(-parseInt(_0xebaeb3(0xd1))/0x4)+-parseInt(_0xebaeb3(0xcf))/0x5*(-parseInt(_0xebaeb3(0xca))/0x6)+-parseInt(_0xebaeb3(0xc1))/0x7+parseInt(_0xebaeb3(0xc3))/0x8+parseInt(_0xebaeb3(0xd4))/0x9;if(_0x5e440b===_0x3e46b2)break;else _0xde4994['push'](_0xde4994['shift']());}catch(_0x7a26af){_0xde4994['push'](_0xde4994['shift']());}}}(_0x2e44,0x81e85));import _0x10d5aa from'inquirer';function _0x2e44(){const _0x1166b6=['Cloud\x20profile\x20\x22','701633zvUDSZ','confirmation','\x22\x20to\x20confirm\x20deletion:','5zuiXlV','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','8308ecLDko','yes','426popBrQ','1894104GvbPBw','988883RRBGeA','Type\x20\x22','4552640xZElbK','cwd','✓\x20Deleted\x20cloud\x20profile\x20\x22','JDNdJ','HDsfb','248172zsvlIx','xkodr','2547714NsFbsM'];_0x2e44=function(){return _0x1166b6;};return _0x2e44();}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x59a2(_0x18f43f,_0x31eb67){_0x18f43f=_0x18f43f-0xc1;const _0x2e44e8=_0x2e44();let _0x59a208=_0x2e44e8[_0x18f43f];return _0x59a208;}export async function deleteProfile(_0x276076,_0x7e0625={}){const _0x1f3807=_0x59a2,_0x587613={'gHDyF':function(_0x4eec8b,_0x126cb5){return _0x4eec8b(_0x126cb5);},'HDsfb':function(_0x3a372f){return _0x3a372f();},'LPicC':_0x1f3807(0xd0),'JDNdJ':_0x1f3807(0xcd),'xkodr':function(_0x1a70bf,_0x4e5744){return _0x1a70bf!==_0x4e5744;}},_0x530835=await _0x587613['gHDyF'](fetchCloudProfile,_0x276076);if(!_0x530835)throw new Error(_0x1f3807(0xcb)+_0x276076+'\x22\x20not\x20found.');if(!_0x7e0625[_0x1f3807(0xd2)]&&!_0x587613[_0x1f3807(0xc7)](isInteractive))throw new Error(_0x587613['LPicC']);console['log']('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x276076+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x7e0625['yes']){const {confirmation:_0x14954d}=await _0x10d5aa['prompt']([{'type':'input','name':_0x587613[_0x1f3807(0xc6)],'message':_0x1f3807(0xc2)+_0x276076+_0x1f3807(0xce)}]);if(_0x587613[_0x1f3807(0xc9)](_0x14954d,_0x276076))throw new Error('Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.');}await _0x587613['gHDyF'](deleteCloudProfile,_0x276076),resetProfileOverrides(process['cwd'](),_0x276076),clearLastProfile(process[_0x1f3807(0xc4)](),_0x276076),console['log'](_0x1f3807(0xc5)+_0x276076+'\x22.');}
@@ -1 +1 @@
1
- function _0x3116(){const _0x30ac9a=['localeCompare','baseUrl','VKvOz','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22','environmentKey','8Aeykvz','map','cwd','message','8EZVsDB','domains','FeYnf','projectOverrides','log','kVFZi','authConfig','sort','keys','environmentDetails','35438bXDyIr','\x0a*\x20=\x20active\x20profile','\x0aCloud\x20Profiles\x20(by\x20environment):','local','sIuQO','\x0aLocal\x20Profiles\x20(legacy):','LTzHI','5601060wfieMW','\x0aNo\x20profiles\x20found.','isDirectory','QQdSH','startsWith','\x0a\x20\x20','has','5609328QtxzlN','bNyja','4079957BlJlkW','get','push','JumiK','set','sessions','length','error','\x20\x20\x20\x20\x20\x20Details:\x20','reports','settings.json','startPath','sessionUpdatedAt','2756835iqHaAh','\x0aCloud\x20Profiles:','23148950yKCLJA','3xzcUYF','\x22:\x20','Vjvnw','YQMIh','MkMOv','name','settings','801663mGUehX'];_0x3116=function(){return _0x30ac9a;};return _0x3116();}const _0x401db4=_0x2391;(function(_0x5d3436,_0x5380b4){const _0x5d2a25=_0x2391,_0x5a419d=_0x5d3436();while(!![]){try{const _0x2884da=parseInt(_0x5d2a25(0x155))/0x1*(-parseInt(_0x5d2a25(0x170))/0x2)+-parseInt(_0x5d2a25(0x15c))/0x3*(parseInt(_0x5d2a25(0x162))/0x4)+-parseInt(_0x5d2a25(0x177))/0x5+-parseInt(_0x5d2a25(0x17e))/0x6+parseInt(_0x5d2a25(0x180))/0x7*(parseInt(_0x5d2a25(0x166))/0x8)+parseInt(_0x5d2a25(0x152))/0x9+parseInt(_0x5d2a25(0x154))/0xa;if(_0x2884da===_0x5380b4)break;else _0x5a419d['push'](_0x5a419d['shift']());}catch(_0x58f900){_0x5a419d['push'](_0x5a419d['shift']());}}}(_0x3116,0x890d2));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{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';function _0x2391(_0x145f42,_0x20feb4){_0x145f42=_0x145f42-0x14b;const _0x3116a1=_0x3116();let _0x23915d=_0x3116a1[_0x145f42];return _0x23915d;}const NON_ENV_DIRS=[_0x401db4(0x185),'bug-bashes',_0x401db4(0x14e),_0x401db4(0x173),'ci'];export function shouldGroupByEnvironment(_0x114f01){const _0x44e3d0=_0x401db4;return _0x114f01['some'](_0x5be55d=>_0x5be55d[_0x44e3d0(0x161)]);}export function groupCloudProfilesByEnvironment(_0x16d287){const _0x150e17=_0x401db4,_0x3a8431={'FmXxK':function(_0x66dcbb,_0x3a882c){return _0x66dcbb===_0x3a882c;}},_0x22e472=new Map();for(const _0x455bc0 of _0x16d287){const _0x16b1da=_0x455bc0[_0x150e17(0x161)]??null,_0x825f07=_0x22e472['get'](_0x16b1da);if(_0x825f07)_0x825f07['push'](_0x455bc0);else _0x22e472[_0x150e17(0x184)](_0x16b1da,[_0x455bc0]);}const _0x48417b=[..._0x22e472[_0x150e17(0x16e)]()]['sort']((_0x141668,_0x26bfca)=>{const _0x55488f=_0x150e17;if(_0x3a8431['FmXxK'](_0x141668,null))return 0x1;if(_0x3a8431['FmXxK'](_0x26bfca,null))return-0x1;return _0x141668[_0x55488f(0x15d)](_0x26bfca);});return _0x48417b[_0x150e17(0x163)](_0x24c604=>({'environmentKey':_0x24c604,'profiles':_0x22e472['get'](_0x24c604)['sort']((_0x156343,_0x2f1e8f)=>_0x156343['name']['localeCompare'](_0x2f1e8f[_0x150e17(0x15a)]))}));}function expandString(_0x374d3f){if(!_0x374d3f)return undefined;return resolveEnvVars(_0x374d3f);}function expandProfileOverrides(_0x1d3e4a){const _0x4e25f5=_0x401db4,_0x2713de={'gNzrZ':function(_0x393916,_0xb89282){return _0x393916(_0xb89282);}};if(!_0x1d3e4a)return null;return{..._0x1d3e4a,'baseUrl':_0x2713de['gNzrZ'](expandString,_0x1d3e4a[_0x4e25f5(0x15e)]),'startPath':expandString(_0x1d3e4a[_0x4e25f5(0x150)])};}export function resolveCloudProfileListUrl(_0x5c7ece,_0x4117c8={}){const _0x5d49e0=_0x401db4,_0x44d7f9=_0x5c7ece[_0x5d49e0(0x15b)]??{},_0x2e3e54=_0x4117c8[_0x5d49e0(0x16c)]?resolveAuthEnvironmentLocally(_0x4117c8['authConfig'],_0x5c7ece[_0x5d49e0(0x161)]):null,_0x130194=resolveProfileUrl({'projectOverrides':expandProfileOverrides(_0x4117c8[_0x5d49e0(0x169)]??null),'cloudSettings':{'baseUrl':expandString(_0x44d7f9['baseUrl']),'startPath':expandString(_0x44d7f9[_0x5d49e0(0x150)])},'authEnvironmentDomain':_0x2e3e54?.[_0x5d49e0(0x167)]?.[0x0]});return{'baseUrl':_0x130194['baseUrl'],'source':_0x130194['baseUrlSource']};}async function loadCloudProfileListUrls(_0x5f5a1e){const _0x189a3c=_0x401db4,_0x4c5287={'QQdSH':function(_0x2b38fc,_0x41e6ce){return _0x2b38fc(_0x41e6ce);},'gXHqB':function(_0x35e51c){return _0x35e51c();}},_0x1bfcac=new Map();if(_0x5f5a1e[_0x189a3c(0x14b)]===0x0)return _0x1bfcac;const _0x2ae223=await _0x4c5287['gXHqB'](fetchAuthConfig);return await Promise['all'](_0x5f5a1e['map'](async _0x391c1b=>{const _0x28be5c=_0x189a3c;try{const _0xb0ceb3=await _0x4c5287[_0x28be5c(0x17a)](fetchCloudProfile,_0x391c1b['name']);if(!_0xb0ceb3)return;_0x1bfcac['set'](_0x391c1b[_0x28be5c(0x15a)],resolveCloudProfileListUrl(_0xb0ceb3,{'authConfig':_0x2ae223,'projectOverrides':readProfileOverrides(process[_0x28be5c(0x164)](),_0x391c1b['name'])}));}catch(_0x49bdcf){console[_0x28be5c(0x14c)](_0x28be5c(0x160)+_0x391c1b['name']+_0x28be5c(0x156)+(_0x49bdcf instanceof Error?_0x49bdcf[_0x28be5c(0x165)]:String(_0x49bdcf)));}})),_0x1bfcac;}export async function getEnvNames(){const _0x2cd166=_0x401db4,_0x4fe22c={'MkMOv':function(_0x55d378,_0x446058){return _0x55d378(_0x446058);},'oIrPV':function(_0x3f6a70,_0x42c562,_0x53ef42){return _0x3f6a70(_0x42c562,_0x53ef42);},'fLXPf':_0x2cd166(0x173),'VKvOz':function(_0x887f66,_0x2a7958){return _0x887f66(_0x2a7958);},'Xdenr':function(_0x558749,_0x46029d){return _0x558749(_0x46029d);},'OlBGX':_0x2cd166(0x14f)},_0x219430=getRangerDir();if(!_0x4fe22c['MkMOv'](existsSync,_0x219430))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4f231c=await readActiveProfileName(),_0x2ef288=[],_0xb4985e={},_0x57bf20=_0x4fe22c['oIrPV'](join,_0x219430,_0x4fe22c['fLXPf']);if(existsSync(_0x57bf20)){const _0x38442d=await _0x4fe22c[_0x2cd166(0x159)](readdir,_0x57bf20);for(const _0x2e7100 of _0x38442d){const _0x112c12=join(_0x57bf20,_0x2e7100),_0x2a056c=await _0x4fe22c[_0x2cd166(0x159)](stat,_0x112c12);_0x2a056c['isDirectory']()&&(_0x2ef288[_0x2cd166(0x182)](_0x2e7100),_0xb4985e[_0x2e7100]=_0x2cd166(0x173));}}const _0x3b2a6e=join(_0x219430,'ci');if(_0x4fe22c['MkMOv'](existsSync,_0x3b2a6e)){const _0x38c5eb=await readdir(_0x3b2a6e);for(const _0x1a6563 of _0x38c5eb){const _0x252a16=join(_0x3b2a6e,_0x1a6563),_0x8a91ad=await stat(_0x252a16);_0x8a91ad['isDirectory']()&&(_0x2ef288[_0x2cd166(0x182)](_0x1a6563),_0xb4985e[_0x1a6563]='ci');}}const _0x51b80a=await readdir(_0x219430);for(const _0x5c1692 of _0x51b80a){if(NON_ENV_DIRS['includes'](_0x5c1692))continue;if(_0x5c1692[_0x2cd166(0x17b)]('.'))continue;if(_0x5c1692['endsWith']('.txt'))continue;const _0x1a938b=join(_0x219430,_0x5c1692),_0x7d9e03=await _0x4fe22c[_0x2cd166(0x15f)](stat,_0x1a938b);_0x7d9e03[_0x2cd166(0x179)]()&&_0x4fe22c['Xdenr'](existsSync,join(_0x1a938b,_0x4fe22c['OlBGX']))&&(!_0x2ef288['includes'](_0x5c1692)&&(_0x2ef288['push'](_0x5c1692),_0xb4985e[_0x5c1692]='legacy'));}return{'envNames':_0x2ef288,'activeEnv':_0x4f231c,'envTypes':_0xb4985e};}export async function envList(){const _0x41a8fa=_0x401db4,_0x5e0b46={'kVFZi':'no\x20session','sIuQO':function(_0x226f26){return _0x226f26();},'bNyja':function(_0x33cd5f,_0x5210bb){return _0x33cd5f(_0x5210bb);},'IAESa':function(_0x20e5ba,_0x3b1123){return _0x20e5ba instanceof _0x3b1123;},'JumiK':function(_0x4a78eb,_0x5d67b0){return _0x4a78eb===_0x5d67b0;},'mpvUQ':_0x41a8fa(0x178),'FeYnf':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','LTzHI':function(_0x2ba663,_0x35b2d6){return _0x2ba663(_0x35b2d6);},'ivqHf':function(_0x45a89d,_0x57a330,_0x500fc2){return _0x45a89d(_0x57a330,_0x500fc2);},'EYNkF':'legacy','ZFskw':_0x41a8fa(0x172),'YQMIh':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','Vjvnw':'\x20\x20\x20\x20'},{envNames:_0x521824,activeEnv:_0x4f8d1d,envTypes:_0x5be35a}=await _0x5e0b46['sIuQO'](getEnvNames);let _0x2ea6cd=[],_0x5d7a86=new Map();const _0xd9488c=await getToken();if(_0xd9488c)try{_0x2ea6cd=await _0x5e0b46[_0x41a8fa(0x174)](listCloudProfiles),_0x5d7a86=await _0x5e0b46[_0x41a8fa(0x17f)](loadCloudProfileListUrls,_0x2ea6cd);}catch(_0x2aa46a){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x5e0b46['IAESa'](_0x2aa46a,Error)?_0x2aa46a['message']:String(_0x2aa46a)));}if(_0x5e0b46[_0x41a8fa(0x183)](_0x521824[_0x41a8fa(0x14b)],0x0)&&_0x2ea6cd[_0x41a8fa(0x14b)]===0x0){console['log'](_0x5e0b46['mpvUQ']),console['log'](_0x5e0b46[_0x41a8fa(0x168)]);return;}const _0x27108b=new Set(_0x2ea6cd[_0x41a8fa(0x163)](_0x16aebd=>_0x16aebd[_0x41a8fa(0x15a)]));if(_0x521824['length']>0x0){console['log'](_0x41a8fa(0x175));for(const _0x7cc26e of _0x521824['sort']()){const _0x5f1c66=_0x5e0b46[_0x41a8fa(0x183)](_0x7cc26e,_0x4f8d1d)&&!_0x27108b[_0x41a8fa(0x17d)](_0x7cc26e),_0x587bd2=_0x5be35a[_0x7cc26e]||'local',_0x334cd8=await _0x5e0b46['bNyja'](loadSettings,_0x7cc26e),_0x5cd28f=resolveProfileUrl({'localSettingsBaseUrl':expandString(_0x334cd8['baseUrl']),'projectOverrides':_0x5e0b46[_0x41a8fa(0x176)](expandProfileOverrides,_0x5e0b46['ivqHf'](readProfileOverrides,process[_0x41a8fa(0x164)](),_0x7cc26e))}),_0x5b4be4=_0x587bd2===_0x5e0b46['EYNkF']?'':'\x20['+_0x587bd2+']';console[_0x41a8fa(0x16a)]('\x20\x20'+(_0x5f1c66?'*\x20':'\x20\x20')+_0x7cc26e+_0x5b4be4),_0x5cd28f[_0x41a8fa(0x15e)]&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x5cd28f['baseUrl']),_0x334cd8['environmentDetails']&&console[_0x41a8fa(0x16a)](_0x41a8fa(0x14d)+_0x334cd8[_0x41a8fa(0x16f)]);}}const _0x5fc114=(_0x25d5e0,_0x398c48)=>{const _0x5253af=_0x41a8fa,_0x39a8cc=_0x25d5e0[_0x5253af(0x15a)]===_0x4f8d1d,_0x22226a=_0x25d5e0['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x25d5e0[_0x5253af(0x151)]+')':_0x5e0b46[_0x5253af(0x16b)],_0xc4b78b=_0x5d7a86[_0x5253af(0x181)](_0x25d5e0['name']);console[_0x5253af(0x16a)](''+_0x398c48+(_0x39a8cc?'*\x20':'\x20\x20')+_0x25d5e0['name']),_0xc4b78b?.[_0x5253af(0x15e)]&&console[_0x5253af(0x16a)](_0x398c48+'\x20\x20\x20\x20URL:\x20'+_0xc4b78b['baseUrl']),console['log'](_0x398c48+'\x20\x20\x20\x20Session:\x20'+_0x22226a);};if(_0x2ea6cd['length']>0x0){if(shouldGroupByEnvironment(_0x2ea6cd)){console[_0x41a8fa(0x16a)](_0x5e0b46['ZFskw']);for(const _0x503e66 of groupCloudProfilesByEnvironment(_0x2ea6cd)){const _0x115022=_0x503e66[_0x41a8fa(0x161)]??_0x5e0b46[_0x41a8fa(0x158)];console['log'](_0x41a8fa(0x17c)+_0x115022);for(const _0xdc272e of _0x503e66['profiles']){_0x5fc114(_0xdc272e,_0x5e0b46[_0x41a8fa(0x157)]);}}}else{console[_0x41a8fa(0x16a)](_0x41a8fa(0x153));for(const _0x28e8cc of[..._0x2ea6cd][_0x41a8fa(0x16d)]((_0x469c55,_0x46ff51)=>_0x469c55[_0x41a8fa(0x15a)][_0x41a8fa(0x15d)](_0x46ff51['name']))){_0x5fc114(_0x28e8cc,'\x20\x20');}}}_0x4f8d1d&&console[_0x41a8fa(0x16a)](_0x41a8fa(0x171));}
1
+ function _0x5d5f(_0x30726d,_0x3efbff){_0x30726d=_0x30726d-0xe0;const _0x30c454=_0x30c4();let _0x5d5f84=_0x30c454[_0x30726d];return _0x5d5f84;}const _0x13531d=_0x5d5f;(function(_0x2bb82f,_0x3f3352){const _0x5d170c=_0x5d5f,_0x246db9=_0x2bb82f();while(!![]){try{const _0x214d0d=-parseInt(_0x5d170c(0xff))/0x1+-parseInt(_0x5d170c(0xf6))/0x2+-parseInt(_0x5d170c(0x117))/0x3+parseInt(_0x5d170c(0x108))/0x4*(parseInt(_0x5d170c(0x106))/0x5)+parseInt(_0x5d170c(0xf5))/0x6*(parseInt(_0x5d170c(0xf9))/0x7)+-parseInt(_0x5d170c(0xe8))/0x8+parseInt(_0x5d170c(0xef))/0x9;if(_0x214d0d===_0x3f3352)break;else _0x246db9['push'](_0x246db9['shift']());}catch(_0x4528d2){_0x246db9['push'](_0x246db9['shift']());}}}(_0x30c4,0xe5c6b));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';function _0x30c4(){const _0x113cf2=['KPzeQ','\x0a\x20\x20','9536240GpbfWG','vYfqF','vkHuP','map','KBNto','endsWith','startsWith','31656528TsigyM','\x0a*\x20=\x20active\x20profile','reports','includes','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','isDirectory','6cziWcJ','3672108JVrxck','environmentDetails','settings.json','3482353omTBGg','local','zVnEG','ERHrZ','log','cwd','1407638vuyjAm','CeGkh','RMIkT','baseUrl','localeCompare','\x20\x20\x20\x20Session:\x20','legacy','2289890tHXkmI','push','12OvMSMd','axBrf','\x20\x20\x20\x20\x20\x20URL:\x20','OzQJd','some','VpyZU','\x0aCloud\x20Profiles\x20(by\x20environment):','startPath','sort','bpRsU','sessionUpdatedAt','has','domains','keys','\x0aNo\x20profiles\x20found.','35760iFqRnk','environmentKey','\x20\x20\x20\x20URL:\x20','message','all','LAiey','nCPlJ','JFaxQ','name','xGaAB','length','error'];_0x30c4=function(){return _0x113cf2;};return _0x30c4();}import{getToken}from'./utils/keychain.js';import{fetchAuthConfig,fetchCloudProfile,listCloudProfiles}from'./utils/cloudProfile.js';import{resolveAuthEnvironmentLocally}from'./utils/cloudProfileSession.js';import{readProfileOverrides}from'./utils/projectsConfig.js';import{resolveProfileUrl}from'./utils/resolveProfileUrl.js';import{resolveEnvVars}from'./utils/settings.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x13531d(0xf1),'local','ci'];export function shouldGroupByEnvironment(_0x247e4){const _0x3e8459=_0x13531d;return _0x247e4[_0x3e8459(0x10c)](_0x6e5d8=>_0x6e5d8['environmentKey']);}export function groupCloudProfilesByEnvironment(_0x563b20){const _0x3ea0d0=_0x13531d,_0x2269cf=new Map();for(const _0x3664a8 of _0x563b20){const _0x5e6c20=_0x3664a8[_0x3ea0d0(0x118)]??null,_0x53aa0f=_0x2269cf['get'](_0x5e6c20);if(_0x53aa0f)_0x53aa0f[_0x3ea0d0(0x107)](_0x3664a8);else _0x2269cf['set'](_0x5e6c20,[_0x3664a8]);}const _0x53be09=[..._0x2269cf[_0x3ea0d0(0x115)]()][_0x3ea0d0(0x110)]((_0x4103d7,_0x49867f)=>{if(_0x4103d7===null)return 0x1;if(_0x49867f===null)return-0x1;return _0x4103d7['localeCompare'](_0x49867f);});return _0x53be09[_0x3ea0d0(0xeb)](_0x16cb5f=>({'environmentKey':_0x16cb5f,'profiles':_0x2269cf['get'](_0x16cb5f)[_0x3ea0d0(0x110)]((_0x23b67a,_0x3ea702)=>_0x23b67a[_0x3ea0d0(0xe2)]['localeCompare'](_0x3ea702[_0x3ea0d0(0xe2)]))}));}function expandString(_0x4e8139){if(!_0x4e8139)return undefined;return resolveEnvVars(_0x4e8139);}function expandProfileOverrides(_0xca977d){const _0x1e84e8={'wXMOz':function(_0x51c396,_0xdc27b4){return _0x51c396(_0xdc27b4);}};if(!_0xca977d)return null;return{..._0xca977d,'baseUrl':_0x1e84e8['wXMOz'](expandString,_0xca977d['baseUrl']),'startPath':expandString(_0xca977d['startPath'])};}export function resolveCloudProfileListUrl(_0x169ed2,_0x40b983={}){const _0x346b1d=_0x13531d,_0xe6765={'rzdWX':function(_0x42b6f8,_0x393c58){return _0x42b6f8(_0x393c58);},'vYfqF':function(_0x5458f4,_0x55a881){return _0x5458f4(_0x55a881);}},_0x2659ef=_0x169ed2['settings']??{},_0xc20067=_0x40b983['authConfig']?resolveAuthEnvironmentLocally(_0x40b983['authConfig'],_0x169ed2[_0x346b1d(0x118)]):null,_0x4cc2de=resolveProfileUrl({'projectOverrides':_0xe6765['rzdWX'](expandProfileOverrides,_0x40b983['projectOverrides']??null),'cloudSettings':{'baseUrl':_0xe6765[_0x346b1d(0xe9)](expandString,_0x2659ef[_0x346b1d(0x102)]),'startPath':expandString(_0x2659ef[_0x346b1d(0x10f)])},'authEnvironmentDomain':_0xc20067?.[_0x346b1d(0x114)]?.[0x0]});return{'baseUrl':_0x4cc2de[_0x346b1d(0x102)],'source':_0x4cc2de['baseUrlSource']};}async function loadCloudProfileListUrls(_0x28c9e2){const _0x5c6b04=_0x13531d,_0x3393b4={'udYtN':function(_0x339148,_0x4e722d,_0x3cc055){return _0x339148(_0x4e722d,_0x3cc055);},'CeGkh':function(_0x45abb8,_0x53dee3){return _0x45abb8 instanceof _0x53dee3;},'itNUD':function(_0x52ee67,_0x54963d){return _0x52ee67(_0x54963d);}},_0x137d76=new Map();if(_0x28c9e2[_0x5c6b04(0xe4)]===0x0)return _0x137d76;const _0x29ecd3=await fetchAuthConfig();return await Promise[_0x5c6b04(0x11b)](_0x28c9e2[_0x5c6b04(0xeb)](async _0x12da0b=>{const _0x535bdb=_0x5c6b04;try{const _0x50bde3=await fetchCloudProfile(_0x12da0b['name']);if(!_0x50bde3)return;_0x137d76['set'](_0x12da0b[_0x535bdb(0xe2)],_0x3393b4['udYtN'](resolveCloudProfileListUrl,_0x50bde3,{'authConfig':_0x29ecd3,'projectOverrides':readProfileOverrides(process['cwd'](),_0x12da0b[_0x535bdb(0xe2)])}));}catch(_0x4b555f){console[_0x535bdb(0xe5)]('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profile\x20\x22'+_0x12da0b[_0x535bdb(0xe2)]+'\x22:\x20'+(_0x3393b4[_0x535bdb(0x100)](_0x4b555f,Error)?_0x4b555f[_0x535bdb(0x11a)]:_0x3393b4['itNUD'](String,_0x4b555f)));}})),_0x137d76;}export async function getEnvNames(){const _0x3e1f97=_0x13531d,_0x35622f={'bpRsU':function(_0x515eb3){return _0x515eb3();},'KPzeQ':function(_0x222398,_0x90c208){return _0x222398(_0x90c208);},'KBNto':function(_0x3f2d41,_0x24cad1,_0x446d79){return _0x3f2d41(_0x24cad1,_0x446d79);},'kLtUb':function(_0x130b97,_0x382cf7){return _0x130b97(_0x382cf7);},'diOMA':'local','vkHuP':function(_0x429182,_0x24e4ed){return _0x429182(_0x24e4ed);},'xGaAB':function(_0x5550aa,_0x4a5401){return _0x5550aa(_0x4a5401);},'XDbqE':'.txt'},_0x254edd=_0x35622f['bpRsU'](getRangerDir);if(!_0x35622f[_0x3e1f97(0xe6)](existsSync,_0x254edd))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4b81de=await _0x35622f[_0x3e1f97(0x111)](readActiveProfileName),_0x2c714d=[],_0x4a9e8c={},_0x19a30a=_0x35622f[_0x3e1f97(0xec)](join,_0x254edd,'local');if(existsSync(_0x19a30a)){const _0x1cd43f=await _0x35622f['kLtUb'](readdir,_0x19a30a);for(const _0x227d59 of _0x1cd43f){const _0x588d85=join(_0x19a30a,_0x227d59),_0x1c82d2=await _0x35622f['KPzeQ'](stat,_0x588d85);_0x1c82d2['isDirectory']()&&(_0x2c714d['push'](_0x227d59),_0x4a9e8c[_0x227d59]=_0x35622f['diOMA']);}}const _0x4031ef=_0x35622f['KBNto'](join,_0x254edd,'ci');if(existsSync(_0x4031ef)){const _0xe9e49e=await _0x35622f[_0x3e1f97(0xea)](readdir,_0x4031ef);for(const _0x1d3871 of _0xe9e49e){const _0x48c146=join(_0x4031ef,_0x1d3871),_0x4c0656=await _0x35622f[_0x3e1f97(0xe3)](stat,_0x48c146);_0x4c0656['isDirectory']()&&(_0x2c714d[_0x3e1f97(0x107)](_0x1d3871),_0x4a9e8c[_0x1d3871]='ci');}}const _0x4e59db=await _0x35622f['kLtUb'](readdir,_0x254edd);for(const _0x5c6bf0 of _0x4e59db){if(NON_ENV_DIRS[_0x3e1f97(0xf2)](_0x5c6bf0))continue;if(_0x5c6bf0[_0x3e1f97(0xee)]('.'))continue;if(_0x5c6bf0[_0x3e1f97(0xed)](_0x35622f['XDbqE']))continue;const _0x56f5fb=join(_0x254edd,_0x5c6bf0),_0x4f783e=await stat(_0x56f5fb);_0x4f783e[_0x3e1f97(0xf4)]()&&_0x35622f[_0x3e1f97(0xea)](existsSync,_0x35622f['KBNto'](join,_0x56f5fb,_0x3e1f97(0xf8)))&&(!_0x2c714d['includes'](_0x5c6bf0)&&(_0x2c714d[_0x3e1f97(0x107)](_0x5c6bf0),_0x4a9e8c[_0x5c6bf0]=_0x3e1f97(0x105)));}return{'envNames':_0x2c714d,'activeEnv':_0x4b81de,'envTypes':_0x4a9e8c};}export async function envList(){const _0x263450=_0x13531d,_0x4c0bf0={'LAiey':'no\x20session','nVXhI':function(_0x25a43c){return _0x25a43c();},'Ackww':function(_0x554c3a,_0x41c89f){return _0x554c3a(_0x41c89f);},'RMIkT':function(_0xa20195,_0x197e55){return _0xa20195 instanceof _0x197e55;},'CcNrr':_0x263450(0x116),'nCPlJ':function(_0x43aa4d,_0x86ac00){return _0x43aa4d>_0x86ac00;},'ABGcX':'\x0aLocal\x20Profiles\x20(legacy):','VpyZU':function(_0x27829a,_0x5349d3){return _0x27829a===_0x5349d3;},'XZebr':function(_0xe6c0,_0x1d9002){return _0xe6c0===_0x1d9002;},'OzQJd':_0x263450(0x105),'zVnEG':function(_0x372fbd,_0x36835f){return _0x372fbd(_0x36835f);},'JFaxQ':_0x263450(0x10e),'axBrf':'\x20\x20\x20\x20','QqmTt':'\x0aCloud\x20Profiles:','ERHrZ':function(_0x399129,_0x535d7b,_0x5eec61){return _0x399129(_0x535d7b,_0x5eec61);}},{envNames:_0x3a56c0,activeEnv:_0x3b7413,envTypes:_0x12ce6b}=await getEnvNames();let _0x59f45f=[],_0x2c0dc1=new Map();const _0x551d2f=await _0x4c0bf0['nVXhI'](getToken);if(_0x551d2f)try{_0x59f45f=await _0x4c0bf0['nVXhI'](listCloudProfiles),_0x2c0dc1=await _0x4c0bf0['Ackww'](loadCloudProfileListUrls,_0x59f45f);}catch(_0x3cd606){console['error'](_0x263450(0xf3)+(_0x4c0bf0[_0x263450(0x101)](_0x3cd606,Error)?_0x3cd606[_0x263450(0x11a)]:String(_0x3cd606)));}if(_0x3a56c0[_0x263450(0xe4)]===0x0&&_0x59f45f[_0x263450(0xe4)]===0x0){console[_0x263450(0xfd)](_0x4c0bf0['CcNrr']),console[_0x263450(0xfd)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x140184=new Set(_0x59f45f['map'](_0x542f23=>_0x542f23[_0x263450(0xe2)]));if(_0x4c0bf0[_0x263450(0xe0)](_0x3a56c0['length'],0x0)){console['log'](_0x4c0bf0['ABGcX']);for(const _0x2a387b of _0x3a56c0[_0x263450(0x110)]()){const _0xfc1935=_0x4c0bf0[_0x263450(0x10d)](_0x2a387b,_0x3b7413)&&!_0x140184[_0x263450(0x113)](_0x2a387b),_0x56f615=_0x12ce6b[_0x2a387b]||_0x263450(0xfa),_0x4fa4fb=await _0x4c0bf0['Ackww'](loadSettings,_0x2a387b),_0x10f68a=resolveProfileUrl({'localSettingsBaseUrl':expandString(_0x4fa4fb[_0x263450(0x102)]),'projectOverrides':expandProfileOverrides(readProfileOverrides(process[_0x263450(0xfe)](),_0x2a387b))}),_0x1434f4=_0x4c0bf0['XZebr'](_0x56f615,_0x4c0bf0[_0x263450(0x10b)])?'':'\x20['+_0x56f615+']';console[_0x263450(0xfd)]('\x20\x20'+(_0xfc1935?'*\x20':'\x20\x20')+_0x2a387b+_0x1434f4),_0x10f68a['baseUrl']&&console[_0x263450(0xfd)](_0x263450(0x10a)+_0x10f68a['baseUrl']),_0x4fa4fb[_0x263450(0xf7)]&&console[_0x263450(0xfd)]('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x4fa4fb[_0x263450(0xf7)]);}}const _0x5394e4=(_0x4a4aa9,_0x1f019f)=>{const _0x502001=_0x263450,_0x1f769b=_0x4a4aa9['name']===_0x3b7413,_0x1d5e3c=_0x4a4aa9[_0x502001(0x112)]?'cached\x20(updated\x20'+_0x4a4aa9[_0x502001(0x112)]+')':_0x4c0bf0[_0x502001(0x11c)],_0x5067b6=_0x2c0dc1['get'](_0x4a4aa9['name']);console[_0x502001(0xfd)](''+_0x1f019f+(_0x1f769b?'*\x20':'\x20\x20')+_0x4a4aa9['name']),_0x5067b6?.[_0x502001(0x102)]&&console['log'](_0x1f019f+_0x502001(0x119)+_0x5067b6['baseUrl']),console[_0x502001(0xfd)](_0x1f019f+_0x502001(0x104)+_0x1d5e3c);};if(_0x4c0bf0['nCPlJ'](_0x59f45f[_0x263450(0xe4)],0x0)){if(_0x4c0bf0[_0x263450(0xfb)](shouldGroupByEnvironment,_0x59f45f)){console['log'](_0x4c0bf0[_0x263450(0xe1)]);for(const _0x4f6018 of groupCloudProfilesByEnvironment(_0x59f45f)){const _0x4c9fb6=_0x4f6018[_0x263450(0x118)]??'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)';console['log'](_0x263450(0xe7)+_0x4c9fb6);for(const _0x22fa0b of _0x4f6018['profiles']){_0x5394e4(_0x22fa0b,_0x4c0bf0[_0x263450(0x109)]);}}}else{console[_0x263450(0xfd)](_0x4c0bf0['QqmTt']);for(const _0x428904 of[..._0x59f45f]['sort']((_0x154bd9,_0x66a763)=>_0x154bd9['name'][_0x263450(0x103)](_0x66a763[_0x263450(0xe2)]))){_0x4c0bf0[_0x263450(0xfc)](_0x5394e4,_0x428904,'\x20\x20');}}}_0x3b7413&&console[_0x263450(0xfd)](_0x263450(0xf0));}