@ranger-testing/ranger-cli 3.1.6 → 3.1.7-alpha.387730d-58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +2 -5
@@ -1 +1 @@
1
- const _0x474c19=_0x4d76;(function(_0x15eeba,_0x39e8e3){const _0x581c65=_0x4d76,_0x36b6c9=_0x15eeba();while(!![]){try{const _0x5094ad=-parseInt(_0x581c65(0x17f))/0x1+-parseInt(_0x581c65(0x16d))/0x2+-parseInt(_0x581c65(0x154))/0x3*(-parseInt(_0x581c65(0x16f))/0x4)+-parseInt(_0x581c65(0x17c))/0x5+-parseInt(_0x581c65(0x18f))/0x6+-parseInt(_0x581c65(0x19d))/0x7+parseInt(_0x581c65(0x179))/0x8;if(_0x5094ad===_0x39e8e3)break;else _0x36b6c9['push'](_0x36b6c9['shift']());}catch(_0x5bc076){_0x36b6c9['push'](_0x36b6c9['shift']());}}}(_0x4137,0x508d9));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x36dc62 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';function _0x4d76(_0x331261,_0x2ef2df){_0x331261=_0x331261-0x13d;const _0x41372a=_0x4137();let _0x4d769d=_0x41372a[_0x331261];return _0x4d769d;}function _0x4137(){const _0xf8ccbc=['\x0a\x20\x20A\x20profile\x20named\x20\x22','NODE_TLS_REJECT_UNAUTHORIZED','\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','baseUrl','keys','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','log','cwd','url','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','\x27\x20matching\x20','HBwNX','GgmCj','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','\x27\x20created\x20(CDP).','QQQHI','biaBV','✓\x20Profile\x20\x27','force','includes','profile.add.autoRouted','HcsVZ','XIAgW','join','RGQxA','\x20--skip-auth\x0a','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x0a\x20\x20Could\x20not\x20reach\x20','wkrOv','ELCfD','user_declined','\x20--url\x20','jJNeb','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','env','WytvO','Could\x20not\x20reach\x20','zzAcb','tSTAa','\x20(continuing\x20with\x20--force)','pXZxr','list','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','HSQWa','signal','cdpEndpoint','environments','profile.add.autoRouteSkipped','VGmFn','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','origin','PsIHe','XeVyy','skipAuth','local','9vbkMWX','SzxKE','xrCNZ','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','trim','QRBUW','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','setupHeaders','Use\x20','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','continue','WXEvf','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','setupHeader','zuTrn','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','ptTAz','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','use_suggestion','message','test','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','SZwDH','716810JzpMoH','oxOZY','866044DUtVer','\x0a\x20\x20(domains:\x20','error','AMjUT','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','slice','QSQrx','\x27\x20created.\x0a','wLqFw','HTTP\x20','6650472hLgOOF','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','cFuSA','975615UWNwEI','xtwTM','http://','413871hTAVAq','JlJmv','prompt','authEnv','isElectron','odoBi','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','EOzlx','QdxgK','.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20','capture','warn','qSkTr','⚠\x20Could\x20not\x20reach\x20','\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','fetch\x20failed','682284yMPCwP','selJY','Enter\x20a\x20different\x20URL','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','ISbbV','yes','length','isTTY','peeUf','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','OlfCR','trackPhaseEnd','pqXFX','stdout','488488WhvNHs','exit'];_0x4137=function(){return _0xf8ccbc;};return _0x4137();}import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x474c19(0x16b);function warnCloudProfileSharedInOrg(){const _0x262b3d=_0x474c19;if(!process[_0x262b3d(0x19c)][_0x262b3d(0x196)])return;console[_0x262b3d(0x18a)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x110c7b){const _0x1f4d53=_0x474c19,_0x145a5b={'ARbok':'HEAD','JFrWM':'manual','AMjUT':function(_0x45931c,_0xd7cfe5){return _0x45931c(_0xd7cfe5);},'UWRWT':function(_0x3152d0,_0x4c4397){return _0x3152d0===_0x4c4397;},'QQQHI':'TypeError','wqSmV':_0x1f4d53(0x18e)};try{const _0x4694f5=new AbortController(),_0x38de49=setTimeout(()=>_0x4694f5['abort'](),0x1388),_0x1b322f={'method':_0x145a5b['ARbok'],'signal':_0x4694f5[_0x1f4d53(0x149)],'redirect':_0x145a5b['JFrWM']};/^https:\/\/localhost(:\d+)?/i[_0x1f4d53(0x16a)](_0x110c7b)&&(process[_0x1f4d53(0x13e)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x2e2c97=await fetch(_0x110c7b,_0x1b322f);delete process[_0x1f4d53(0x13e)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x145a5b[_0x1f4d53(0x172)](clearTimeout,_0x38de49);if(_0x2e2c97['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x1f4d53(0x178)+_0x2e2c97['status']};}catch(_0x2ff3f9){delete process[_0x1f4d53(0x13e)][_0x1f4d53(0x1a0)];const _0x4ef4eb=_0x2ff3f9,_0x3d747d=_0x4ef4eb['message']||String(_0x2ff3f9),_0x85df37=_0x3d747d[_0x1f4d53(0x1b2)]('Invalid\x20URL')||_0x145a5b['UWRWT'](_0x4ef4eb['name'],_0x145a5b[_0x1f4d53(0x1ae)])||_0x3d747d['includes'](_0x145a5b['wqSmV']);return{'ok':![],'error':_0x3d747d,'isProtocolError':_0x85df37};}}async function sweepOrphanLocalProfile(_0x39da34,_0x122016,_0x220c52){const _0x1d544a=_0x474c19,_0x133b63={'jztHC':function(_0x5ab2af,_0x36e1e7,_0x41bdeb){return _0x5ab2af(_0x36e1e7,_0x41bdeb);},'WytvO':function(_0x168bfe,_0x1d9eaf){return _0x168bfe(_0x1d9eaf);},'SZwDH':function(_0x113944,_0x3f50ba,_0x855aec){return _0x113944(_0x3f50ba,_0x855aec);}},_0x1c8e82=join(_0x122016,_0x1d544a(0x153)),_0xf9c730=_0x133b63['jztHC'](join,_0x1c8e82,_0x39da34);_0x133b63['WytvO'](existsSync,_0xf9c730)&&(_0x220c52&&await _0x133b63[_0x1d544a(0x13f)](isPathGitTracked,_0xf9c730)?console[_0x1d544a(0x1a5)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xf9c730+_0x1d544a(0x1bb)):(await rm(_0xf9c730,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0xf9c730)));if(existsSync(_0x1c8e82)){let _0x245b44=[];try{_0x245b44=await _0x133b63[_0x1d544a(0x13f)](readdir,_0x1c8e82);}catch{return;}const _0x2e55cb='.tmp-'+_0x39da34+'-';for(const _0x10ddfe of _0x245b44){if(!_0x10ddfe['startsWith'](_0x2e55cb))continue;const _0x564dde=_0x133b63[_0x1d544a(0x16c)](join,_0x1c8e82,_0x10ddfe);await rm(_0x564dde,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x564dde);}}}async function sweepOrphansBestEffort(_0x54a463){const _0xd0d54b=_0x474c19,_0x20193c={'selJY':function(_0x545f2c,_0x5313cb,_0x49666f,_0x2083b7){return _0x545f2c(_0x5313cb,_0x49666f,_0x2083b7);},'OEXfi':function(_0x48c730){return _0x48c730();},'SWsel':function(_0x4de933){return _0x4de933();},'DYPFQ':function(_0x5f3d00,_0x35e673){return _0x5f3d00 instanceof _0x35e673;}};try{await _0x20193c['selJY'](sweepOrphanLocalProfile,_0x54a463,_0x20193c['OEXfi'](getRangerHomeDir),![]);const _0x148bd1=getRangerDir();_0x148bd1!==_0x20193c['SWsel'](getRangerHomeDir)&&await _0x20193c[_0xd0d54b(0x190)](sweepOrphanLocalProfile,_0x54a463,_0x148bd1,!![]);}catch(_0x2e7725){console[_0xd0d54b(0x1a5)]('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x20193c['DYPFQ'](_0x2e7725,Error)?_0x2e7725['message']:String(_0x2e7725))+').');}}async function markActive(_0x1215c5){const _0x3ed437=_0x474c19;try{await writeActiveProfileName(_0x1215c5),console[_0x3ed437(0x1a5)]('\x20\x20Set\x20active\x20profile:\x20'+_0x1215c5);}catch{console['log'](_0x3ed437(0x14e));}}async function tryAutoRouteCloudProfile(_0x24a6f6,_0x34a764,_0x49d5f6,_0xf3109f,_0x1c12f0){const _0x430d03=_0x474c19,_0xdcaa83={'zCWjj':function(_0xa88b68,_0xc02a29){return _0xa88b68===_0xc02a29;},'zuTrn':function(_0x16f86f){return _0x16f86f();},'biaBV':_0x430d03(0x14c),'TTFVr':'no_auth_config','RGQxA':function(_0x16dfd1,_0x4c4455){return _0x16dfd1 instanceof _0x4c4455;},'pqXFX':function(_0x3fc1f0,_0x229ea2,_0x4d1618,_0x110f0d,_0x538ea7){return _0x3fc1f0(_0x229ea2,_0x4d1618,_0x110f0d,_0x538ea7);},'XTRdB':function(_0x1431da,_0x35e665){return _0x1431da+_0x35e665;},'jJNeb':function(_0x4b3f36,_0x37e141){return _0x4b3f36+_0x37e141;},'HHaiR':function(_0x505d38,_0x1cc5b7){return _0x505d38+_0x1cc5b7;},'xrCNZ':function(_0x2d48a9,_0x4698d5){return _0x2d48a9+_0x4698d5;},'EkgmZ':_0x430d03(0x15d),'mADfB':_0x430d03(0x185),'bxDuj':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','bGZwu':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','pwoGs':'env_not_found','QdxgK':function(_0x1799b6,_0x13d59c){return _0x1799b6+_0x13d59c;},'mcvcg':function(_0x5ad7aa){return _0x5ad7aa();},'Qzyfn':function(_0x461006,_0x5b0b59){return _0x461006+_0x5b0b59;},'ISbbV':function(_0x2bf513,_0x114a0a){return _0x2bf513(_0x114a0a);}};let _0x3150f8;try{_0x3150f8=await _0xdcaa83[_0x430d03(0x163)](fetchAuthConfig);}catch(_0x429d16){return _0x1c12f0?.['trackPhaseEnd'](_0xdcaa83[_0x430d03(0x1af)],{'reason':_0xdcaa83['TTFVr'],'profileName':_0x24a6f6}),console['error'](_0x430d03(0x161)+(_0xdcaa83['RGQxA'](_0x429d16,Error)?_0x429d16[_0x430d03(0x169)]:String(_0x429d16))),![];}if((!_0x3150f8||!_0x3150f8['environments']||Object[_0x430d03(0x1a3)](_0x3150f8[_0x430d03(0x14b)])['length']===0x0)&&!_0x49d5f6[_0x430d03(0x182)]){if(_0xf3109f)return await _0xdcaa83[_0x430d03(0x19b)](captureEnvLessProfile,_0x24a6f6,_0x34a764,_0x49d5f6,_0x1c12f0);return _0x1c12f0?.['trackPhaseEnd'](_0x430d03(0x14c),{'reason':'no_auth_config','profileName':_0x24a6f6}),console[_0x430d03(0x171)](_0xdcaa83['XTRdB'](_0xdcaa83['XTRdB'](_0xdcaa83[_0x430d03(0x1c1)](_0xdcaa83['HHaiR'](_0xdcaa83[_0x430d03(0x156)](_0xdcaa83['EkgmZ'],'\x0a'),_0xdcaa83['mADfB']),_0x430d03(0x146)+_0x24a6f6+_0x430d03(0x1c0)+_0x34a764+_0x430d03(0x1b8))+'\x0a',_0xdcaa83['bxDuj']),_0xdcaa83['bGZwu'])),![];}let _0x4047b5;if(_0x49d5f6['authEnv']){if(!_0x3150f8?.[_0x430d03(0x14b)]?.[_0x49d5f6['authEnv']]){const _0x469476=Object['keys'](_0x3150f8?.['environments']??{});return _0x1c12f0?.[_0x430d03(0x19a)]('profile.add.autoRouteSkipped',{'reason':_0xdcaa83['pwoGs'],'profileName':_0x24a6f6}),console['error'](_0xdcaa83[_0x430d03(0x187)]('\x0a\x20\x20Auth\x20environment\x20\x22'+_0x49d5f6['authEnv']+'\x22\x20not\x20found.',_0x469476['length']?'\x20Configured\x20envs:\x20'+_0x469476[_0x430d03(0x1b6)](',\x20')+'.':_0x430d03(0x1a1))),![];}_0x4047b5=_0x49d5f6['authEnv'];}else _0x4047b5=matchAuthEnvironment(_0x34a764,_0x3150f8);if(!_0x4047b5)return _0x1c12f0?.[_0x430d03(0x19a)](_0xdcaa83['biaBV'],{'reason':'no_match','profileName':_0x24a6f6}),console[_0x430d03(0x171)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x34a764+_0x430d03(0x188)+Object[_0x430d03(0x1a3)](_0x3150f8?.['environments']??{})['join'](',\x20')+'.'),![];const _0x508f3c=_0x3150f8?.['environments']?.[_0x4047b5],_0x4cf8ed=_0x508f3c?.['domains']??[];if(_0xf3109f&&!_0x49d5f6[_0x430d03(0x194)]){const {saveToCloud:_0x37eaac}=await _0x36dc62[_0x430d03(0x181)]([{'type':'confirm','name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x4047b5+_0x430d03(0x1a9)+_0x34a764+_0x430d03(0x170)+_0x4cf8ed[_0x430d03(0x1b6)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x24a6f6+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x37eaac)return _0x1c12f0?.['trackPhaseEnd'](_0xdcaa83['biaBV'],{'reason':_0x430d03(0x1bf),'profileName':_0x24a6f6}),console[_0x430d03(0x171)](_0x430d03(0x1b9)),![];}const _0x2a2962=_0x4cf8ed['some'](_0x434b28=>{const _0x446790=_0x430d03;try{return _0xdcaa83['zCWjj'](new URL(_0x434b28)[_0x446790(0x14f)],new URL(_0x34a764)['origin']);}catch{return![];}}),_0x2efd52={};!_0x2a2962&&(_0x2efd52['baseUrl']=_0x34a764);try{await createCloudProfile(_0x24a6f6,_0x4047b5,{'settings':_0x2efd52}),_0xdcaa83['mcvcg'](warnCloudProfileSharedInOrg);}catch(_0x23bba4){if(_0xdcaa83[_0x430d03(0x1b7)](_0x23bba4,ApiError)&&_0xdcaa83['zCWjj'](_0x23bba4['status'],0x199)){console['error'](_0xdcaa83['Qzyfn'](_0x430d03(0x19f)+_0x24a6f6+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a',_0x430d03(0x1ac)+_0x24a6f6));throw _0x23bba4;}throw _0x23bba4;}return console[_0x430d03(0x1a5)]('✓\x20Profile\x20\x27'+_0x24a6f6+_0x430d03(0x176)+(_0x430d03(0x17a)+_0x24a6f6)),await _0xdcaa83[_0x430d03(0x193)](sweepOrphansBestEffort,_0x24a6f6),_0x1c12f0?.[_0x430d03(0x19a)](_0x430d03(0x1b3),{'envKey':_0x4047b5,'profileName':_0x24a6f6}),!![];}async function createUnconfiguredCloudProfile(_0x7bf3a7,_0x55a66a){const _0x42d810=_0x474c19,_0x323af7={'qSkTr':function(_0x1d8539,_0x405c83,_0x123b62,_0x8ddd79){return _0x1d8539(_0x405c83,_0x123b62,_0x8ddd79);},'ddJHx':function(_0x4d78f3){return _0x4d78f3();}};try{await _0x323af7[_0x42d810(0x18b)](createCloudProfile,_0x7bf3a7,undefined,{'settings':_0x55a66a}),_0x323af7['ddJHx'](warnCloudProfileSharedInOrg);}catch(_0x56b594){_0x56b594 instanceof ApiError&&_0x56b594['status']===0x199&&console[_0x42d810(0x171)](_0x42d810(0x19f)+_0x7bf3a7+_0x42d810(0x1a4)+(_0x42d810(0x1ac)+_0x7bf3a7));throw _0x56b594;}}async function captureEnvLessProfile(_0x10a8ad,_0x2a42fb,_0x16d983,_0x5c1b64){const _0x1f5a47=_0x474c19,_0x452f96={'HFBiR':'confirm','XeVyy':_0x1f5a47(0x189),'tSTAa':'profile.add.autoRouteSkipped','OlfCR':function(_0x1cdab0,_0x10d92c){return _0x1cdab0+_0x10d92c;},'wkrOv':function(_0x36756b,_0x1cd1a3){return _0x36756b===_0x1cd1a3;},'EOzlx':function(_0x115f30,_0x2942fd){return _0x115f30>_0x2942fd;},'QRBUW':function(_0x556322){return _0x556322();},'YOfab':function(_0x485032,_0x238b38){return _0x485032 instanceof _0x238b38;},'QSQrx':function(_0x5756d2,_0x1b6dfd){return _0x5756d2===_0x1b6dfd;},'fNVCm':function(_0x532384,_0x3e2353){return _0x532384+_0x3e2353;},'GgmCj':function(_0x2b3226,_0x1f01ff){return _0x2b3226(_0x1f01ff);},'RAhRV':'profile.add.autoRouted'};if(!_0x16d983['yes']){const {capture:_0x41e066}=await _0x36dc62[_0x1f5a47(0x181)]([{'type':_0x452f96['HFBiR'],'name':_0x452f96[_0x1f5a47(0x151)],'message':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','default':!![]}]);if(!_0x41e066)return _0x5c1b64?.[_0x1f5a47(0x19a)](_0x452f96[_0x1f5a47(0x142)],{'reason':_0x1f5a47(0x1bf),'profileName':_0x10a8ad}),console['error'](_0x452f96[_0x1f5a47(0x199)](_0x1f5a47(0x167),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x1d8a28={};if(_0x16d983[_0x1f5a47(0x162)])for(const _0x17b18b of _0x16d983[_0x1f5a47(0x162)]){const _0x5928ef=_0x17b18b['indexOf'](':');if(_0x452f96[_0x1f5a47(0x1bd)](_0x5928ef,-0x1))continue;_0x1d8a28[_0x17b18b[_0x1f5a47(0x174)](0x0,_0x5928ef)[_0x1f5a47(0x158)]()]=_0x17b18b[_0x1f5a47(0x174)](_0x5928ef+0x1)[_0x1f5a47(0x158)]();}const _0x68b739={'baseUrl':_0x2a42fb};_0x452f96[_0x1f5a47(0x186)](Object[_0x1f5a47(0x1a3)](_0x1d8a28)['length'],0x0)&&(_0x68b739['setupHeaders']=_0x1d8a28);let _0x23863c;try{_0x23863c=await createCloudProfile(_0x10a8ad,undefined,{'settings':_0x68b739}),_0x452f96[_0x1f5a47(0x159)](warnCloudProfileSharedInOrg);}catch(_0x1dddfb){_0x452f96['YOfab'](_0x1dddfb,ApiError)&&_0x452f96[_0x1f5a47(0x175)](_0x1dddfb['status'],0x199)&&console['error'](_0x452f96[_0x1f5a47(0x199)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x10a8ad+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x10a8ad));throw _0x1dddfb;}return await manualBrowserLogin(_0x23863c,{'key':'','domains':[_0x2a42fb],'setupHeaders':_0x452f96['EOzlx'](Object['keys'](_0x1d8a28)[_0x1f5a47(0x195)],0x0)?_0x1d8a28:undefined}),console[_0x1f5a47(0x1a5)](_0x452f96['fNVCm']('\x0a✓\x20Profile\x20\x27'+_0x10a8ad+_0x1f5a47(0x18d),_0x1f5a47(0x17a)+_0x10a8ad)),await _0x452f96[_0x1f5a47(0x1ab)](sweepOrphansBestEffort,_0x10a8ad),_0x5c1b64?.[_0x1f5a47(0x19a)](_0x452f96['RAhRV'],{'envKey':null,'profileName':_0x10a8ad}),!![];}export async function addEnv(_0x486160,_0x10da3c={},_0x29f5bd){const _0x40145c=_0x474c19,_0x500ea3={'pXZxr':function(_0x1a93d9,_0x25f323){return _0x1a93d9+_0x25f323;},'wLqFw':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','HBwNX':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ptTAz':function(_0x12b310,_0x579f28){return _0x12b310+_0x579f28;},'lebwA':function(_0x1ec60a,_0x3397a4){return _0x1ec60a===_0x3397a4;},'NuIuc':_0x40145c(0x157),'oBMce':'--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','RcZWD':'--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.','PsIHe':function(_0x4a2e1a,_0x12cbd7){return _0x4a2e1a(_0x12cbd7);},'cFuSA':_0x40145c(0x160),'IKxFy':function(_0x4bfafe,_0x3d2f2a){return _0x4bfafe>_0x3d2f2a;},'xtwTM':function(_0x5c24b0,_0x5d2f34,_0x51a194){return _0x5c24b0(_0x5d2f34,_0x51a194);},'jyimO':function(_0x4906f7,_0x5ba6a0,_0x3358d8,_0x5f5601,_0x2379a2){return _0x4906f7(_0x5ba6a0,_0x3358d8,_0x5f5601,_0x2379a2);},'qVLLg':'cdpEndpoint','HcsVZ':_0x40145c(0x183),'GfYao':function(_0x41cb68,_0x295cbf){return _0x41cb68 instanceof _0x295cbf;},'oxOZY':function(_0x205259,_0x3f1af7){return _0x205259(_0x3f1af7);},'HSQWa':function(_0x5ef7fe,_0x4bbc06){return _0x5ef7fe(_0x4bbc06);},'peeUf':function(_0xe16b84,_0x42a496){return _0xe16b84>_0x42a496;},'odoBi':function(_0x5469b1,_0x37d447){return _0x5469b1+_0x37d447;},'KLsTa':_0x40145c(0x1a8),'XIAgW':_0x40145c(0x1a2),'SzxKE':function(_0x7ff141,_0x38b5d0){return _0x7ff141||_0x38b5d0;},'zzAcb':'http://localhost:3000','WXEvf':'action','PVGxr':'What\x20would\x20you\x20like\x20to\x20do?','VGmFn':'Continue\x20anyway','JlJmv':_0x40145c(0x168),'ELCfD':function(_0x2830c5,_0xfe6833){return _0x2830c5===_0xfe6833;},'BdDDK':function(_0x58c56e,_0x2339e9){return _0x58c56e instanceof _0x2339e9;}};_0x10da3c['ci']&&(console[_0x40145c(0x171)](_0x500ea3['pXZxr'](_0x500ea3[_0x40145c(0x144)](_0x500ea3['pXZxr'](_0x500ea3['pXZxr'](_0x500ea3[_0x40145c(0x177)]+_0x40145c(0x15a)+'\x0a','To\x20set\x20up\x20a\x20profile,\x20run:\x0a'),_0x500ea3[_0x40145c(0x1aa)]),'\x0a'),_0x40145c(0x13d))+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process[_0x40145c(0x19e)](0x1));const _0x42b1d8={};if(_0x10da3c[_0x40145c(0x162)])for(const _0x49f23c of _0x10da3c[_0x40145c(0x162)]){const _0x56674c=_0x49f23c['indexOf'](':');if(_0x56674c===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x49f23c+_0x40145c(0x198));const _0x2c43ab=_0x49f23c[_0x40145c(0x174)](0x0,_0x56674c)[_0x40145c(0x158)](),_0x367c9a=_0x49f23c[_0x40145c(0x174)](_0x500ea3[_0x40145c(0x166)](_0x56674c,0x1))[_0x40145c(0x158)]();_0x42b1d8[_0x2c43ab]=_0x367c9a;}if(_0x10da3c['cdpEndpoint']!==undefined&&_0x500ea3['lebwA'](_0x10da3c[_0x40145c(0x14a)][_0x40145c(0x158)](),''))throw new Error(_0x40145c(0x173));if(_0x10da3c[_0x40145c(0x14a)]&&_0x10da3c['url'])throw new Error(_0x500ea3['NuIuc']);if(_0x10da3c[_0x40145c(0x182)]&&_0x10da3c['skipAuth'])throw new Error(_0x500ea3['oBMce']);if(_0x10da3c['authEnv']&&_0x10da3c[_0x40145c(0x14a)])throw new Error(_0x500ea3['RcZWD']);const _0x515e3a=_0x500ea3[_0x40145c(0x150)](Boolean,_0x10da3c[_0x40145c(0x14a)]),_0x324881=isInteractive();if(!_0x324881&&!_0x10da3c[_0x40145c(0x1a7)]&&!_0x515e3a&&!_0x10da3c[_0x40145c(0x152)])throw new Error(_0x40145c(0x147));if(_0x515e3a){const _0x208617=_0x10da3c['cdpEndpoint'];console[_0x40145c(0x1a5)](_0x500ea3[_0x40145c(0x17b)]),console[_0x40145c(0x1a5)](_0x40145c(0x1ba)+_0x208617);const _0x13aa5d={'cdpEndpoint':_0x208617,'isElectron':!![]};_0x500ea3['IKxFy'](Object['keys'](_0x42b1d8)[_0x40145c(0x195)],0x0)&&(_0x13aa5d[_0x40145c(0x15b)]=_0x42b1d8);await _0x500ea3[_0x40145c(0x17d)](createUnconfiguredCloudProfile,_0x486160,_0x13aa5d);try{_0x500ea3['jyimO'](setProfileOverride,process[_0x40145c(0x1a6)](),_0x486160,_0x500ea3['qVLLg'],_0x208617),_0x500ea3['jyimO'](setProfileOverride,process['cwd'](),_0x486160,_0x500ea3[_0x40145c(0x1b4)],!![]);}catch(_0x1c184b){console[_0x40145c(0x171)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x500ea3['GfYao'](_0x1c184b,Error)?_0x1c184b[_0x40145c(0x169)]:_0x500ea3[_0x40145c(0x16e)](String,_0x1c184b)));}console[_0x40145c(0x1a5)]('✓\x20Cloud\x20profile\x20\x27'+_0x486160+_0x40145c(0x1ad)),await sweepOrphansBestEffort(_0x486160),await _0x500ea3['HSQWa'](markActive,_0x486160);return;}if(_0x10da3c['skipAuth']){const _0x15a5f3={};_0x10da3c[_0x40145c(0x1a7)]&&(_0x15a5f3['baseUrl']=_0x10da3c[_0x40145c(0x1a7)]);_0x500ea3[_0x40145c(0x197)](Object[_0x40145c(0x1a3)](_0x42b1d8)[_0x40145c(0x195)],0x0)&&(_0x15a5f3[_0x40145c(0x15b)]=_0x42b1d8);await createUnconfiguredCloudProfile(_0x486160,_0x15a5f3),console['log'](_0x500ea3[_0x40145c(0x184)](_0x40145c(0x1b0)+_0x486160+'\x27\x20created\x20(no\x20session).\x0a','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x486160+'`\x20again\x20without\x20--skip-auth.')),await _0x500ea3[_0x40145c(0x148)](sweepOrphansBestEffort,_0x486160),await markActive(_0x486160);return;}if(_0x10da3c[_0x40145c(0x1a7)]){const _0x51c3d8=_0x10da3c['url'],_0x8687e3=await checkUrlReachability(_0x51c3d8);if(!_0x8687e3['ok']&&!_0x10da3c['force'])throw new Error(_0x40145c(0x140)+_0x51c3d8+':\x20'+_0x8687e3[_0x40145c(0x171)]+_0x40145c(0x165));!_0x8687e3['ok']&&_0x10da3c[_0x40145c(0x1b1)]&&console['log'](_0x40145c(0x18c)+_0x51c3d8+':\x20'+_0x8687e3[_0x40145c(0x171)]+_0x40145c(0x143));}else{console[_0x40145c(0x1a5)]('\x0a🌐\x20Profile\x20Setup\x0a'),console['log']('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console['log'](_0x500ea3['KLsTa']);let _0x5c6189='',_0x36bc63=![];while(!![]){const _0x448a6=await _0x36dc62['prompt']([{'type':'input','name':_0x500ea3[_0x40145c(0x1b5)],'message':_0x36bc63?_0x40145c(0x164):'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x500ea3[_0x40145c(0x155)](_0x5c6189,_0x500ea3[_0x40145c(0x141)])}]);_0x5c6189=_0x448a6[_0x40145c(0x1a2)];const _0x439199=await checkUrlReachability(_0x5c6189);if(_0x439199['ok'])break;const _0x9b42f9=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5c6189),_0x58b069=_0x439199['isProtocolError']&&!_0x9b42f9,_0x1f623d=_0x58b069?_0x40145c(0x17e)+_0x5c6189:null;_0x36bc63=!![],console[_0x40145c(0x1a5)](_0x40145c(0x1bc)+_0x5c6189+':\x20'+_0x439199['error']);_0x1f623d&&console[_0x40145c(0x1a5)]('\x20\x20Did\x20you\x20mean\x20'+_0x1f623d+'?');const {action:_0x241f09}=await _0x36dc62[_0x40145c(0x181)]([{'type':_0x40145c(0x145),'name':_0x500ea3[_0x40145c(0x15f)],'message':_0x500ea3['PVGxr'],'choices':[..._0x1f623d?[{'name':_0x40145c(0x15c)+_0x1f623d,'value':_0x40145c(0x168)}]:[],{'name':_0x40145c(0x191),'value':'retry'},{'name':_0x500ea3[_0x40145c(0x14d)],'value':_0x40145c(0x15e)}]}]);if(_0x241f09===_0x500ea3[_0x40145c(0x180)]&&_0x1f623d){_0x5c6189=_0x1f623d;const _0xb8325=await checkUrlReachability(_0x5c6189);if(_0xb8325['ok'])break;console['log'](_0x40145c(0x192)+_0x5c6189+':\x20'+_0xb8325[_0x40145c(0x171)]);}else{if(_0x500ea3[_0x40145c(0x1be)](_0x241f09,'continue'))break;}}_0x10da3c={..._0x10da3c,'url':_0x5c6189};}let _0x5352c5=![];try{_0x5352c5=await tryAutoRouteCloudProfile(_0x486160,_0x10da3c['url'],_0x10da3c,_0x324881,_0x29f5bd);}catch(_0x565025){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x486160+'\x22:\x20'+(_0x500ea3['BdDDK'](_0x565025,Error)?_0x565025['message']:String(_0x565025))),process[_0x40145c(0x19e)](0x1);}!_0x5352c5&&process['exit'](0x1),await markActive(_0x486160);}
1
+ (function(_0x14643b,_0x228c7a){const _0x5ef594=_0x1369,_0x29a00f=_0x14643b();while(!![]){try{const _0x412489=parseInt(_0x5ef594(0x1ac))/0x1*(parseInt(_0x5ef594(0x1af))/0x2)+parseInt(_0x5ef594(0x1c5))/0x3*(-parseInt(_0x5ef594(0x18d))/0x4)+-parseInt(_0x5ef594(0x143))/0x5*(parseInt(_0x5ef594(0x157))/0x6)+parseInt(_0x5ef594(0x14b))/0x7*(-parseInt(_0x5ef594(0x152))/0x8)+-parseInt(_0x5ef594(0x178))/0x9+-parseInt(_0x5ef594(0x1aa))/0xa+-parseInt(_0x5ef594(0x15d))/0xb*(-parseInt(_0x5ef594(0x184))/0xc);if(_0x412489===_0x228c7a)break;else _0x29a00f['push'](_0x29a00f['shift']());}catch(_0x3caf5b){_0x29a00f['push'](_0x29a00f['shift']());}}}(_0xc63d,0xc81ab));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x1369(_0x413ec0,_0x29a2f2){_0x413ec0=_0x413ec0-0x13e;const _0xc63d2c=_0xc63d();let _0x1369d1=_0xc63d2c[_0x413ec0];return _0x1369d1;}import{existsSync}from'fs';import _0x22def1 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING='This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization';function warnCloudProfileSharedInOrg(){const _0x2d6cab=_0x1369;if(!process['stdout'][_0x2d6cab(0x18f)])return;console['warn'](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x553f8f){const _0x3a37e7=_0x1369,_0x50c724={'cmIBp':function(_0x21dc9f,_0x312d89,_0x2ea1b4){return _0x21dc9f(_0x312d89,_0x2ea1b4);},'jORaR':'HEAD','nKife':'manual','orlIj':function(_0x381772,_0x56d73b){return _0x381772(_0x56d73b);},'vTJwe':'Invalid\x20URL','iCJLd':'fetch\x20failed'};try{const _0x5245a5=new AbortController(),_0x15acea=_0x50c724[_0x3a37e7(0x191)](setTimeout,()=>_0x5245a5['abort'](),0x1388),_0x1b1bb1={'method':_0x50c724[_0x3a37e7(0x156)],'signal':_0x5245a5[_0x3a37e7(0x188)],'redirect':_0x50c724['nKife']};/^https:\/\/localhost(:\d+)?/i[_0x3a37e7(0x1c1)](_0x553f8f)&&(process[_0x3a37e7(0x16b)][_0x3a37e7(0x189)]='0');const _0x74013d=await _0x50c724[_0x3a37e7(0x191)](fetch,_0x553f8f,_0x1b1bb1);delete process[_0x3a37e7(0x16b)][_0x3a37e7(0x189)],_0x50c724['orlIj'](clearTimeout,_0x15acea);if(_0x74013d['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x3a37e7(0x1c0)+_0x74013d['status']};}catch(_0x13c565){delete process[_0x3a37e7(0x16b)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x41c336=_0x13c565,_0x5c3b70=_0x41c336['message']||String(_0x13c565),_0x58bba0=_0x5c3b70[_0x3a37e7(0x172)](_0x50c724[_0x3a37e7(0x19e)])||_0x41c336['name']==='TypeError'||_0x5c3b70[_0x3a37e7(0x172)](_0x50c724['iCJLd']);return{'ok':![],'error':_0x5c3b70,'isProtocolError':_0x58bba0};}}async function sweepOrphanLocalProfile(_0x1804fa,_0x1c5b6e,_0x3b150b){const _0x28dc03=_0x1369,_0x26411c={'PKMVf':'local','GjmHX':function(_0x261bb0,_0x2ab406){return _0x261bb0(_0x2ab406);},'JmRXZ':function(_0x4c9fee,_0xa54324){return _0x4c9fee(_0xa54324);},'Fzzlh':function(_0x4aaf2d,_0x277b3f,_0x2d4e18){return _0x4aaf2d(_0x277b3f,_0x2d4e18);}},_0x234cbd=join(_0x1c5b6e,_0x26411c[_0x28dc03(0x150)]),_0x3277a9=join(_0x234cbd,_0x1804fa);_0x26411c['GjmHX'](existsSync,_0x3277a9)&&(_0x3b150b&&await _0x26411c['GjmHX'](isPathGitTracked,_0x3277a9)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x3277a9+_0x28dc03(0x1c2)):(await rm(_0x3277a9,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x3277a9)));if(_0x26411c['JmRXZ'](existsSync,_0x234cbd)){let _0x5c708d=[];try{_0x5c708d=await _0x26411c[_0x28dc03(0x170)](readdir,_0x234cbd);}catch{return;}const _0x3d89c5=_0x28dc03(0x17c)+_0x1804fa+'-';for(const _0x59561b of _0x5c708d){if(!_0x59561b[_0x28dc03(0x168)](_0x3d89c5))continue;const _0x2ec99c=_0x26411c['Fzzlh'](join,_0x234cbd,_0x59561b);await _0x26411c['Fzzlh'](rm,_0x2ec99c,{'recursive':!![],'force':!![]}),console['log'](_0x28dc03(0x1b7)+_0x2ec99c);}}}async function sweepOrphansBestEffort(_0x368f11){const _0x1575e3=_0x1369,_0x2fea7c={'UQyuR':function(_0x1dee2a,_0xd1aaaa,_0x44c8c1,_0x27c783){return _0x1dee2a(_0xd1aaaa,_0x44c8c1,_0x27c783);},'ycKcD':function(_0x2b8b87){return _0x2b8b87();},'FLiqu':function(_0x44d29b,_0x2629b5){return _0x44d29b!==_0x2629b5;},'EAtks':function(_0x302b67){return _0x302b67();},'inrMJ':function(_0x54808a,_0x3bd444,_0x541079,_0x3ac57c){return _0x54808a(_0x3bd444,_0x541079,_0x3ac57c);}};try{await _0x2fea7c[_0x1575e3(0x197)](sweepOrphanLocalProfile,_0x368f11,_0x2fea7c['ycKcD'](getRangerHomeDir),![]);const _0x21fdc7=_0x2fea7c[_0x1575e3(0x161)](getRangerDir);_0x2fea7c['FLiqu'](_0x21fdc7,_0x2fea7c[_0x1575e3(0x1b8)](getRangerHomeDir))&&await _0x2fea7c[_0x1575e3(0x1a5)](sweepOrphanLocalProfile,_0x368f11,_0x21fdc7,!![]);}catch(_0xc5bb0e){console[_0x1575e3(0x141)](_0x1575e3(0x190)+(_0xc5bb0e instanceof Error?_0xc5bb0e[_0x1575e3(0x14d)]:String(_0xc5bb0e))+').');}}async function markActive(_0x4a3e5c){const _0x28023a=_0x1369,_0xdbc597={'LHDzI':_0x28023a(0x185)};try{await writeActiveProfileName(_0x4a3e5c),console['log'](_0x28023a(0x163)+_0x4a3e5c);}catch{console[_0x28023a(0x141)](_0xdbc597[_0x28023a(0x162)]);}}async function tryAutoRouteCloudProfile(_0x21b518,_0x1fad8e,_0x113c04,_0x2f2058,_0x2b5643){const _0x4616ea=_0x1369,_0x5978c5={'OAZbv':_0x4616ea(0x196),'zugCZ':function(_0x1b6893,_0x268928){return _0x1b6893===_0x268928;},'iROaz':function(_0x4b797f,_0x2ab331,_0x3b74d3,_0x4318e8,_0x40693d){return _0x4b797f(_0x2ab331,_0x3b74d3,_0x4318e8,_0x40693d);},'KAJxU':function(_0x5d87e4,_0x3f1f56){return _0x5d87e4+_0x3f1f56;},'PbbJI':function(_0x26c7a9,_0x273d02){return _0x26c7a9+_0x273d02;},'mKjgh':'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','uvQFJ':'profile.add.autoRouteSkipped','gwBym':'\x20Your\x20org\x20has\x20no\x20auth\x20environments\x20configured.','bFePv':function(_0x16b533,_0x135cfa,_0x3cfcb8){return _0x16b533(_0x135cfa,_0x3cfcb8);},'mstri':_0x4616ea(0x19b),'dICQA':_0x4616ea(0x154),'nAZhc':'user_declined','krHaL':function(_0x1124f3,_0x5aef38,_0xf06306,_0x32510e){return _0x1124f3(_0x5aef38,_0xf06306,_0x32510e);},'svAjk':function(_0x2df9da){return _0x2df9da();},'dJSxB':function(_0x5dc321,_0x40a44f){return _0x5dc321 instanceof _0x40a44f;},'dzwii':function(_0x4cd3fb,_0xc99edc){return _0x4cd3fb===_0xc99edc;},'wywxv':_0x4616ea(0x1a9)};let _0x38f8d8;try{_0x38f8d8=await fetchAuthConfig();}catch(_0x4c6553){return _0x2b5643?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x5978c5[_0x4616ea(0x179)],'profileName':_0x21b518}),console[_0x4616ea(0x1c7)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x4c6553 instanceof Error?_0x4c6553[_0x4616ea(0x14d)]:String(_0x4c6553))),![];}if((!_0x38f8d8||!_0x38f8d8['environments']||_0x5978c5[_0x4616ea(0x140)](Object[_0x4616ea(0x1b6)](_0x38f8d8['environments'])[_0x4616ea(0x175)],0x0))&&!_0x113c04['authEnv']){if(_0x2f2058)return await _0x5978c5['iROaz'](captureEnvLessProfile,_0x21b518,_0x1fad8e,_0x113c04,_0x2b5643);return _0x2b5643?.[_0x4616ea(0x176)]('profile.add.autoRouteSkipped',{'reason':_0x5978c5['OAZbv'],'profileName':_0x21b518}),console['error'](_0x5978c5[_0x4616ea(0x167)](_0x5978c5[_0x4616ea(0x164)]('\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a'+'\x0a'+'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x21b518+'\x20--url\x20'+_0x1fad8e+'\x20--skip-auth\x0a')+'\x0a','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a'),_0x5978c5['mKjgh'])),![];}let _0x219c32;if(_0x113c04[_0x4616ea(0x1bf)]){if(!_0x38f8d8?.[_0x4616ea(0x1ca)]?.[_0x113c04[_0x4616ea(0x1bf)]]){const _0x48792b=Object['keys'](_0x38f8d8?.['environments']??{});return _0x2b5643?.['trackPhaseEnd'](_0x5978c5[_0x4616ea(0x1ae)],{'reason':_0x4616ea(0x15a),'profileName':_0x21b518}),console[_0x4616ea(0x1c7)](_0x4616ea(0x182)+_0x113c04['authEnv']+'\x22\x20not\x20found.'+(_0x48792b[_0x4616ea(0x175)]?_0x4616ea(0x1a1)+_0x48792b[_0x4616ea(0x18c)](',\x20')+'.':_0x5978c5['gwBym'])),![];}_0x219c32=_0x113c04['authEnv'];}else _0x219c32=_0x5978c5[_0x4616ea(0x160)](matchAuthEnvironment,_0x1fad8e,_0x38f8d8);if(!_0x219c32)return _0x2b5643?.['trackPhaseEnd'](_0x5978c5[_0x4616ea(0x1ae)],{'reason':_0x5978c5[_0x4616ea(0x1a3)],'profileName':_0x21b518}),console[_0x4616ea(0x1c7)](_0x4616ea(0x148)+_0x1fad8e+'.\x20Pass\x20--env\x20<key>\x20to\x20pick\x20one,\x20or\x20use\x20--skip-auth.\x20Configured\x20envs:\x20'+Object[_0x4616ea(0x1b6)](_0x38f8d8?.[_0x4616ea(0x1ca)]??{})['join'](',\x20')+'.'),![];const _0x5cb05f=_0x38f8d8?.['environments']?.[_0x219c32],_0x49e2a3=_0x5cb05f?.['domains']??[];if(_0x2f2058&&!_0x113c04['yes']){const {saveToCloud:_0x1e9771}=await _0x22def1['prompt']([{'type':_0x5978c5[_0x4616ea(0x18b)],'name':'saveToCloud','message':_0x4616ea(0x15c)+_0x219c32+'\x27\x20matching\x20'+_0x1fad8e+_0x4616ea(0x18e)+_0x49e2a3[_0x4616ea(0x18c)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x21b518+_0x4616ea(0x171),'default':!![]}]);if(!_0x1e9771)return _0x2b5643?.[_0x4616ea(0x176)]('profile.add.autoRouteSkipped',{'reason':_0x5978c5[_0x4616ea(0x180)],'profileName':_0x21b518}),console['error'](_0x4616ea(0x14a)),![];}const _0x59d713=_0x49e2a3['some'](_0x25417c=>{const _0x5d49a9=_0x4616ea;try{return new URL(_0x25417c)[_0x5d49a9(0x195)]===new URL(_0x1fad8e)[_0x5d49a9(0x195)];}catch{return![];}}),_0x523986={};!_0x59d713&&(_0x523986[_0x4616ea(0x13e)]=_0x1fad8e);try{await _0x5978c5[_0x4616ea(0x16d)](createCloudProfile,_0x21b518,_0x219c32,{'settings':_0x523986}),_0x5978c5[_0x4616ea(0x1a2)](warnCloudProfileSharedInOrg);}catch(_0x5c0655){if(_0x5978c5['dJSxB'](_0x5c0655,ApiError)&&_0x5978c5[_0x4616ea(0x14f)](_0x5c0655['status'],0x199)){console[_0x4616ea(0x1c7)](_0x4616ea(0x173)+_0x21b518+_0x4616ea(0x1b2)+(_0x4616ea(0x1c3)+_0x21b518));throw _0x5c0655;}throw _0x5c0655;}return console['log'](_0x5978c5['KAJxU'](_0x4616ea(0x183)+_0x21b518+_0x4616ea(0x165),_0x4616ea(0x17d)+_0x21b518)),await sweepOrphansBestEffort(_0x21b518),_0x2b5643?.[_0x4616ea(0x176)](_0x5978c5[_0x4616ea(0x16e)],{'envKey':_0x219c32,'profileName':_0x21b518}),!![];}function _0xc63d(){const _0x1f25f3=['82HzmOSI','Use\x20','\x0a✓\x20Profile\x20\x27','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','bsEhE','force','url','keys','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','EAtks','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','\x20\x20Did\x20you\x20mean\x20','Invalid\x20--setup-header\x20format:\x20\x22','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','DiZEJ','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','authEnv','HTTP\x20','test','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','cwd','952116FBLcXq','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','error','zaxTP','skipAuth','environments','baseUrl','XkdMM','zugCZ','log','\x0a🌐\x20Profile\x20Setup\x0a','1311005NMEsxX','Could\x20not\x20reach\x20','OIpMB','fMgzq','status','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','KsYVy','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','21qcKVfN','qmmeS','message','prompt','dzwii','PKMVf','HJOVj','3261592GMxohK','indexOf','confirm','\x27\x20created\x20(CDP).','jORaR','6DQVkft','input','pVGys','env_not_found','setupHeaders','Found\x20auth\x20environment\x20\x27','39444955oXwHyU','Continue\x20anyway','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','bFePv','ycKcD','LHDzI','\x20\x20Set\x20active\x20profile:\x20','PbbJI','\x27\x20created.\x0a','slice','KAJxU','startsWith','HYwOy','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','env','`\x20again\x20without\x20--skip-auth.','krHaL','wywxv','ojrGW','JmRXZ','\x27\x20to\x20the\x20cloud?','includes','\x0a\x20\x20A\x20profile\x20named\x20\x22','isElectron','length','trackPhaseEnd','cdpEndpoint','9117648CFWXEm','OAZbv','fFCPD','VRSkb','.tmp-','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','yes','http://localhost:3000','nAZhc','kSfxq','\x0a\x20\x20Auth\x20environment\x20\x22','✓\x20Profile\x20\x27','12vNhMIx','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','retry','vmOLL','signal','NODE_TLS_REJECT_UNAUTHORIZED','\x0a\x20\x20Could\x20not\x20reach\x20','dICQA','join','8rwpZnZ','\x0a\x20\x20(domains:\x20','isTTY','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','cmIBp','use_suggestion','continue','mPiCA','origin','no_auth_config','UQyuR','vZEpV','Cfdya','profile.add.autoRouteSkipped','no_match','trim','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','vTJwe','\x27\x20created\x20(no\x20session).\x0a','FFZeC','\x20Configured\x20envs:\x20','svAjk','mstri','rAzfS','inrMJ','Enter\x20a\x20different\x20URL','exit','Uzlmd','profile.add.autoRouted','4701380VJlUsj','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','20414ZrOjdw','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','uvQFJ'];_0xc63d=function(){return _0x1f25f3;};return _0xc63d();}async function createUnconfiguredCloudProfile(_0x4114b2,_0x453bea){const _0x4c79ec=_0x1369,_0x2c6aa0={'zaxTP':function(_0x2674a1){return _0x2674a1();},'MnINL':function(_0x1b967d,_0x3f26cb){return _0x1b967d===_0x3f26cb;}};try{await createCloudProfile(_0x4114b2,undefined,{'settings':_0x453bea}),_0x2c6aa0[_0x4c79ec(0x1c8)](warnCloudProfileSharedInOrg);}catch(_0x20dec6){_0x20dec6 instanceof ApiError&&_0x2c6aa0['MnINL'](_0x20dec6[_0x4c79ec(0x147)],0x199)&&console['error'](_0x4c79ec(0x173)+_0x4114b2+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+(_0x4c79ec(0x1c3)+_0x4114b2));throw _0x20dec6;}}async function captureEnvLessProfile(_0x12cd77,_0x14e4f5,_0x3fc6ac,_0xcdf1c9){const _0x4a2597=_0x1369,_0x493c4b={'YDmnn':'Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','WRdYG':_0x4a2597(0x19a),'OlRVv':'user_declined','vTOst':function(_0x55d039,_0x21652b){return _0x55d039===_0x21652b;},'bsEhE':function(_0x33a11c,_0x5efca9){return _0x33a11c>_0x5efca9;},'sMoGn':function(_0x23c7ff){return _0x23c7ff();},'FFZeC':function(_0x133ca2,_0x507979){return _0x133ca2+_0x507979;},'XkdMM':function(_0x498bf8,_0x4fce0f,_0x30ea82){return _0x498bf8(_0x4fce0f,_0x30ea82);},'pVGys':function(_0x1c4e6a,_0x1b6170){return _0x1c4e6a>_0x1b6170;},'gOirK':function(_0x3de6ef,_0x39bad6){return _0x3de6ef(_0x39bad6);}};if(!_0x3fc6ac[_0x4a2597(0x17e)]){const {capture:_0x1b1a02}=await _0x22def1[_0x4a2597(0x14e)]([{'type':'confirm','name':'capture','message':_0x493c4b['YDmnn'],'default':!![]}]);if(!_0x1b1a02)return _0xcdf1c9?.['trackPhaseEnd'](_0x493c4b['WRdYG'],{'reason':_0x493c4b['OlRVv'],'profileName':_0x12cd77}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+_0x4a2597(0x16a)),![];}const _0x406831={};if(_0x3fc6ac['setupHeader'])for(const _0x4ebefe of _0x3fc6ac['setupHeader']){const _0x456998=_0x4ebefe[_0x4a2597(0x153)](':');if(_0x493c4b['vTOst'](_0x456998,-0x1))continue;_0x406831[_0x4ebefe['slice'](0x0,_0x456998)['trim']()]=_0x4ebefe[_0x4a2597(0x166)](_0x456998+0x1)[_0x4a2597(0x19c)]();}const _0x221f99={'baseUrl':_0x14e4f5};_0x493c4b[_0x4a2597(0x1b3)](Object['keys'](_0x406831)['length'],0x0)&&(_0x221f99[_0x4a2597(0x15b)]=_0x406831);let _0x22e5d9;try{_0x22e5d9=await createCloudProfile(_0x12cd77,undefined,{'settings':_0x221f99}),_0x493c4b['sMoGn'](warnCloudProfileSharedInOrg);}catch(_0xbb1498){_0xbb1498 instanceof ApiError&&_0xbb1498[_0x4a2597(0x147)]===0x199&&console['error'](_0x493c4b[_0x4a2597(0x1a0)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x12cd77+_0x4a2597(0x1b2),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x12cd77));throw _0xbb1498;}return await _0x493c4b[_0x4a2597(0x13f)](manualBrowserLogin,_0x22e5d9,{'key':'','domains':[_0x14e4f5],'setupHeaders':_0x493c4b[_0x4a2597(0x159)](Object[_0x4a2597(0x1b6)](_0x406831)[_0x4a2597(0x175)],0x0)?_0x406831:undefined}),console['log'](_0x493c4b['FFZeC'](_0x4a2597(0x1b1)+_0x12cd77+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x4a2597(0x17d)+_0x12cd77)),await _0x493c4b['gOirK'](sweepOrphansBestEffort,_0x12cd77),_0xcdf1c9?.[_0x4a2597(0x176)](_0x4a2597(0x1a9),{'envKey':null,'profileName':_0x12cd77}),!![];}export async function addEnv(_0x2cdbff,_0x699d06={},_0x40d5b8){const _0x3d237b=_0x1369,_0x882d66={'PNAaQ':function(_0x484e2e,_0x5534d9){return _0x484e2e+_0x5534d9;},'GYvZH':function(_0x2eedc9,_0x69be94){return _0x2eedc9+_0x69be94;},'Cfdya':function(_0x57f50a,_0x4ba546){return _0x57f50a+_0x4ba546;},'mPiCA':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','ojrGW':_0x3d237b(0x1b9),'rIWeC':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','Uzlmd':_0x3d237b(0x1bc),'qnCWq':function(_0x8e46f0,_0x56f89c){return _0x8e46f0!==_0x56f89c;},'JsGmy':function(_0x1955f5,_0x298a78){return _0x1955f5===_0x298a78;},'QEeTr':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','HYwOy':'--skip-auth\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20--skip-auth\x20makes\x20an\x20env-less\x20profile,\x20--env\x20binds\x20one\x20to\x20an\x20auth\x20environment.','DDeiD':_0x3d237b(0x1ab),'KsYVy':function(_0x351874,_0x51057f){return _0x351874>_0x51057f;},'OIpMB':function(_0x3ff901,_0x2392e0,_0x47e725,_0x39efd7,_0x15ef76){return _0x3ff901(_0x2392e0,_0x47e725,_0x39efd7,_0x15ef76);},'HJOVj':function(_0x1b8d81,_0x2d7fec){return _0x1b8d81 instanceof _0x2d7fec;},'vmOLL':function(_0xa0f4d5,_0x2b882b){return _0xa0f4d5(_0x2b882b);},'mZwEQ':function(_0x4af5eb,_0x3872dd){return _0x4af5eb(_0x3872dd);},'DiZEJ':function(_0x370a38,_0x3a89a5){return _0x370a38(_0x3a89a5);},'nTXTf':function(_0x69ff5,_0x4a9827){return _0x69ff5+_0x4a9827;},'kSfxq':'\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','KfEqC':'baseUrl','qmmeS':_0x3d237b(0x1be),'eGMnt':_0x3d237b(0x17f),'VRSkb':'list','fMgzq':'action','eqTYW':_0x3d237b(0x1a6),'vZEpV':_0x3d237b(0x15e),'PqoMd':'continue','fFCPD':function(_0x5f1309,_0x1939c0,_0x2f56d7,_0x11ddc1,_0x14a614,_0x24213f){return _0x5f1309(_0x1939c0,_0x2f56d7,_0x11ddc1,_0x14a614,_0x24213f);},'rAzfS':function(_0x211a30,_0x25e9b8){return _0x211a30(_0x25e9b8);}};_0x699d06['ci']&&(console[_0x3d237b(0x1c7)](_0x882d66['PNAaQ'](_0x882d66['GYvZH'](_0x882d66[_0x3d237b(0x199)](_0x882d66[_0x3d237b(0x194)],'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'),'\x0a')+_0x882d66[_0x3d237b(0x16f)]+_0x882d66['rIWeC'],'\x0a')+_0x882d66[_0x3d237b(0x1a8)]+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1));const _0x576118={};if(_0x699d06['setupHeader'])for(const _0x42ee89 of _0x699d06['setupHeader']){const _0x5d3dca=_0x42ee89[_0x3d237b(0x153)](':');if(_0x5d3dca===-0x1)throw new Error(_0x3d237b(0x1bb)+_0x42ee89+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x164069=_0x42ee89['slice'](0x0,_0x5d3dca)[_0x3d237b(0x19c)](),_0x7dcf48=_0x42ee89['slice'](_0x882d66[_0x3d237b(0x199)](_0x5d3dca,0x1))['trim']();_0x576118[_0x164069]=_0x7dcf48;}if(_0x882d66['qnCWq'](_0x699d06['cdpEndpoint'],undefined)&&_0x882d66['JsGmy'](_0x699d06[_0x3d237b(0x177)]['trim'](),''))throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x699d06['cdpEndpoint']&&_0x699d06[_0x3d237b(0x1b5)])throw new Error(_0x882d66['QEeTr']);if(_0x699d06['authEnv']&&_0x699d06['skipAuth'])throw new Error(_0x882d66[_0x3d237b(0x169)]);if(_0x699d06['authEnv']&&_0x699d06[_0x3d237b(0x177)])throw new Error('--cdp-endpoint\x20and\x20--env\x20are\x20mutually\x20exclusive:\x20a\x20CDP\x20profile\x20connects\x20to\x20an\x20existing\x20browser\x20and\x20has\x20no\x20auth\x20environment.');const _0x202d58=Boolean(_0x699d06[_0x3d237b(0x177)]),_0x239503=isInteractive();if(!_0x239503&&!_0x699d06['url']&&!_0x202d58&&!_0x699d06[_0x3d237b(0x1c9)])throw new Error(_0x3d237b(0x19d));if(_0x202d58){const _0x1908e7=_0x699d06['cdpEndpoint'];console['log'](_0x882d66['DDeiD']),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1908e7);const _0x14234d={'cdpEndpoint':_0x1908e7,'isElectron':!![]};_0x882d66[_0x3d237b(0x149)](Object['keys'](_0x576118)[_0x3d237b(0x175)],0x0)&&(_0x14234d['setupHeaders']=_0x576118);await createUnconfiguredCloudProfile(_0x2cdbff,_0x14234d);try{setProfileOverride(process['cwd'](),_0x2cdbff,_0x3d237b(0x177),_0x1908e7),_0x882d66[_0x3d237b(0x145)](setProfileOverride,process[_0x3d237b(0x1c4)](),_0x2cdbff,_0x3d237b(0x174),!![]);}catch(_0xb2b7d8){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x882d66['HJOVj'](_0xb2b7d8,Error)?_0xb2b7d8[_0x3d237b(0x14d)]:_0x882d66[_0x3d237b(0x187)](String,_0xb2b7d8)));}console[_0x3d237b(0x141)]('✓\x20Cloud\x20profile\x20\x27'+_0x2cdbff+_0x3d237b(0x155)),await _0x882d66['mZwEQ'](sweepOrphansBestEffort,_0x2cdbff),await _0x882d66['DiZEJ'](markActive,_0x2cdbff);return;}if(_0x699d06['skipAuth']){const _0x41e37e={};_0x699d06['url']&&(_0x41e37e[_0x3d237b(0x13e)]=_0x699d06[_0x3d237b(0x1b5)]);Object[_0x3d237b(0x1b6)](_0x576118)[_0x3d237b(0x175)]>0x0&&(_0x41e37e[_0x3d237b(0x15b)]=_0x576118);await createUnconfiguredCloudProfile(_0x2cdbff,_0x41e37e),console[_0x3d237b(0x141)](_0x882d66['nTXTf'](_0x3d237b(0x183)+_0x2cdbff+_0x3d237b(0x19f),_0x3d237b(0x15f)+_0x2cdbff+_0x3d237b(0x16c))),await _0x882d66['DiZEJ'](sweepOrphansBestEffort,_0x2cdbff),await markActive(_0x2cdbff);return;}if(_0x699d06['url']){const _0x4828d3=_0x699d06['url'],_0x1d5516=await checkUrlReachability(_0x4828d3);if(!_0x1d5516['ok']&&!_0x699d06[_0x3d237b(0x1b4)])throw new Error(_0x3d237b(0x144)+_0x4828d3+':\x20'+_0x1d5516[_0x3d237b(0x1c7)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x1d5516['ok']&&_0x699d06[_0x3d237b(0x1b4)]&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x4828d3+':\x20'+_0x1d5516[_0x3d237b(0x1c7)]+'\x20(continuing\x20with\x20--force)');}else{console[_0x3d237b(0x141)](_0x3d237b(0x142)),console[_0x3d237b(0x141)](_0x3d237b(0x1c6)),console[_0x3d237b(0x141)](_0x882d66[_0x3d237b(0x181)]);let _0x5e4db7='',_0x1d5ad2=![];while(!![]){const _0x4d301b=await _0x22def1['prompt']([{'type':_0x3d237b(0x158),'name':_0x882d66['KfEqC'],'message':_0x1d5ad2?_0x882d66[_0x3d237b(0x14c)]:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x5e4db7||_0x882d66['eGMnt']}]);_0x5e4db7=_0x4d301b['baseUrl'];const _0x450afd=await checkUrlReachability(_0x5e4db7);if(_0x450afd['ok'])break;const _0x7c143e=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x5e4db7),_0x24b84a=_0x450afd['isProtocolError']&&!_0x7c143e,_0x2eec93=_0x24b84a?'http://'+_0x5e4db7:null;_0x1d5ad2=!![],console[_0x3d237b(0x141)](_0x3d237b(0x18a)+_0x5e4db7+':\x20'+_0x450afd['error']);_0x2eec93&&console[_0x3d237b(0x141)](_0x3d237b(0x1ba)+_0x2eec93+'?');const {action:_0x5cd492}=await _0x22def1['prompt']([{'type':_0x882d66[_0x3d237b(0x17b)],'name':_0x882d66[_0x3d237b(0x146)],'message':'What\x20would\x20you\x20like\x20to\x20do?','choices':[..._0x2eec93?[{'name':_0x3d237b(0x1b0)+_0x2eec93,'value':'use_suggestion'}]:[],{'name':_0x882d66['eqTYW'],'value':_0x3d237b(0x186)},{'name':_0x882d66[_0x3d237b(0x198)],'value':_0x882d66['PqoMd']}]}]);if(_0x5cd492===_0x3d237b(0x192)&&_0x2eec93){_0x5e4db7=_0x2eec93;const _0x3bd979=await checkUrlReachability(_0x5e4db7);if(_0x3bd979['ok'])break;console[_0x3d237b(0x141)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x5e4db7+':\x20'+_0x3bd979[_0x3d237b(0x1c7)]);}else{if(_0x5cd492===_0x3d237b(0x193))break;}}_0x699d06={..._0x699d06,'url':_0x5e4db7};}let _0x395c3b=![];try{_0x395c3b=await _0x882d66[_0x3d237b(0x17a)](tryAutoRouteCloudProfile,_0x2cdbff,_0x699d06[_0x3d237b(0x1b5)],_0x699d06,_0x239503,_0x40d5b8);}catch(_0x2d723f){console[_0x3d237b(0x1c7)](_0x3d237b(0x1ad)+_0x2cdbff+'\x22:\x20'+(_0x882d66[_0x3d237b(0x151)](_0x2d723f,Error)?_0x2d723f['message']:_0x882d66[_0x3d237b(0x1bd)](String,_0x2d723f))),process['exit'](0x1);}!_0x395c3b&&process[_0x3d237b(0x1a7)](0x1),await _0x882d66[_0x3d237b(0x1a4)](markActive,_0x2cdbff);}
@@ -1 +1 @@
1
- (function(_0x4d0866,_0x3f22a9){var _0xdd6530=_0x3310,_0x7e0c2d=_0x4d0866();while(!![]){try{var _0x43348d=parseInt(_0xdd6530(0xba))/0x1*(-parseInt(_0xdd6530(0xc5))/0x2)+parseInt(_0xdd6530(0xbf))/0x3*(parseInt(_0xdd6530(0xc4))/0x4)+parseInt(_0xdd6530(0xc1))/0x5+-parseInt(_0xdd6530(0xbd))/0x6*(parseInt(_0xdd6530(0xb9))/0x7)+-parseInt(_0xdd6530(0xc2))/0x8+parseInt(_0xdd6530(0xbe))/0x9+-parseInt(_0xdd6530(0xbb))/0xa;if(_0x43348d===_0x3f22a9)break;else _0x7e0c2d['push'](_0x7e0c2d['shift']());}catch(_0x1637f9){_0x7e0c2d['push'](_0x7e0c2d['shift']());}}}(_0x132a,0x6c3d8));function _0x3310(_0x42780f,_0x452b8f){_0x42780f=_0x42780f-0xb8;var _0x132a80=_0x132a();var _0x33101f=_0x132a80[_0x42780f];return _0x33101f;}export async function authEncrypt(_0x47250d){var _0xe085f0=_0x3310,_0x778edc={'lbLFR':function(_0x1aa58e,_0x452279){return _0x1aa58e+_0x452279;},'BQDam':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','ZJzMd':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'};console['error'](_0x778edc[_0xe085f0(0xc0)](_0x778edc[_0xe085f0(0xc0)](_0x778edc[_0xe085f0(0xc0)](_0x778edc['lbLFR']('ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a'+_0x778edc['BQDam']+'\x0a',_0x778edc[_0xe085f0(0xc3)]),_0xe085f0(0xbc))+'\x0a','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),_0xe085f0(0xb8))),process[_0xe085f0(0xc6)](0x1);}function _0x132a(){var _0x3e2285=['241507NKILDf','13abvEDZ','8047890ORuzBI','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','84FxpCxo','7504740YuvrxT','3rvMJsW','lbLFR','1326900JarBEu','135960oskQWo','ZJzMd','2793812YxmoXh','7622XBUtfo','exit','\x20\x20https://docs.ranger.net/main/concepts/profiles'];_0x132a=function(){return _0x3e2285;};return _0x132a();}
1
+ (function(_0x5bf2a6,_0x31aeaf){var _0x260e81=_0x5980,_0x9b7697=_0x5bf2a6();while(!![]){try{var _0x32b928=-parseInt(_0x260e81(0x105))/0x1+parseInt(_0x260e81(0xf9))/0x2+-parseInt(_0x260e81(0xfe))/0x3*(-parseInt(_0x260e81(0x104))/0x4)+-parseInt(_0x260e81(0x101))/0x5+parseInt(_0x260e81(0xff))/0x6+-parseInt(_0x260e81(0x100))/0x7+-parseInt(_0x260e81(0x108))/0x8*(parseInt(_0x260e81(0x102))/0x9);if(_0x32b928===_0x31aeaf)break;else _0x9b7697['push'](_0x9b7697['shift']());}catch(_0x54e11a){_0x9b7697['push'](_0x9b7697['shift']());}}}(_0x292c,0xdec10));export async function authEncrypt(_0x3872c4){var _0x131a4d=_0x5980,_0x573eae={'UQoEd':function(_0x8ee856,_0x6c35d8){return _0x8ee856+_0x6c35d8;},'bzoic':function(_0x5488c1,_0x3e6802){return _0x5488c1+_0x3e6802;},'xrWCO':_0x131a4d(0x106),'HUFzk':_0x131a4d(0xfc),'gqORB':_0x131a4d(0x103),'nNPSt':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0x131a4d(0x109)](_0x573eae['UQoEd'](_0x573eae[_0x131a4d(0xfd)](_0x573eae[_0x131a4d(0xfd)](_0x573eae[_0x131a4d(0xfd)](_0x573eae['bzoic'](_0x573eae['xrWCO'],_0x573eae[_0x131a4d(0xfa)]),'\x0a')+_0x573eae['gqORB'],_0x131a4d(0xfb)),'\x0a')+_0x573eae['nNPSt'],_0x131a4d(0x107))),process['exit'](0x1);}function _0x5980(_0x58ec38,_0x2c7051){_0x58ec38=_0x58ec38-0xf9;var _0x292c50=_0x292c();var _0x598032=_0x292c50[_0x58ec38];return _0x598032;}function _0x292c(){var _0x26b368=['error','1701162KCcpSw','HUFzk','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','UQoEd','741291yQfmLJ','9785760DYjoHi','3998491mxMpZd','5797105NTrxSD','2799CkJqYq','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','24kpCSci','99170HjjXMb','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles','31432lMGltZ'];_0x292c=function(){return _0x26b368;};return _0x292c();}
@@ -1 +1 @@
1
- const _0x5d2372=_0x4161;(function(_0x3754d7,_0x1e49e8){const _0x36f09f=_0x4161,_0x3b7c8f=_0x3754d7();while(!![]){try{const _0x115fa5=parseInt(_0x36f09f(0x10b))/0x1*(-parseInt(_0x36f09f(0x11a))/0x2)+parseInt(_0x36f09f(0x117))/0x3+-parseInt(_0x36f09f(0x137))/0x4+parseInt(_0x36f09f(0x10d))/0x5+-parseInt(_0x36f09f(0x11d))/0x6*(parseInt(_0x36f09f(0x11b))/0x7)+parseInt(_0x36f09f(0x127))/0x8*(-parseInt(_0x36f09f(0x115))/0x9)+-parseInt(_0x36f09f(0x126))/0xa*(-parseInt(_0x36f09f(0x112))/0xb);if(_0x115fa5===_0x1e49e8)break;else _0x3b7c8f['push'](_0x3b7c8f['shift']());}catch(_0x3e569b){_0x3b7c8f['push'](_0x3b7c8f['shift']());}}}(_0x12bc,0x91a9d));function _0x4161(_0x284119,_0x2332c9){_0x284119=_0x284119-0x104;const _0x12bc73=_0x12bc();let _0x4161c1=_0x12bc73[_0x284119];return _0x4161c1;}import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x12bc(){const _0x991d0f=['project','2315165AEJIeb','utf-8','fBphD','bug-bash','isArray','31911ndRGEA','ifnLF','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','1953OfAsTa','ignore','2372265eplwrS','error','replace','52976JEstjG','7408737lnwbZi','fFKTI','6umzabW','jJvPO','OLUJl','--scope','DlGot','close','Zdolj','opiPp','platform','4030xnYBur','15184yauTQj','VqYuu','plugin','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','DBaBk','opencode.json','MUepC','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','InfSL','ranger@trailhead','MMkfO','length','PcGWZ','LETuV','46612DRnYXY','feature-tracker','✓\x20Removed\x20project\x20skill:\x20','e2e-test-recommender','aWUsg','mJSyE','stringify','sCMqF','glLAs','yTOCR','bGHCE','log','EySGE','✓\x20Removed\x20.ranger/\x20directory','\x0a✅\x20Cleanup\x20complete!\x0a','sHMBr','fdGGt','13cRMNzC'];_0x12bc=function(){return _0x991d0f;};return _0x12bc();}import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x5d2372(0x138),_0x5d2372(0x110),_0x5d2372(0x13a)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x1e4d0b){const _0x4eb74d=_0x5d2372,_0xefd507=_0x1e4d0b['replace'](/\/\*[\s\S]*?\*\//g,''),_0x9cf462=_0xefd507[_0x4eb74d(0x119)](/^\s*\/\/.*$/gm,''),_0x37e6b9=_0x9cf462['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x37e6b9);}async function removeOpencodePluginConfig(_0x5c1531){const _0x5943b3=_0x5d2372,_0xa1bf1f={'CWQvr':'string','sHMBr':function(_0x34fe7a,_0x338357,_0x2785dd){return _0x34fe7a(_0x338357,_0x2785dd);},'xGjro':function(_0x3166ce,_0x13a288){return _0x3166ce(_0x13a288);},'sCMqF':function(_0x1f680e,_0x15d326){return _0x1f680e===_0x15d326;},'mJSyE':function(_0x2bc812,_0x1bd34c){return _0x2bc812===_0x1bd34c;}};if(!existsSync(_0x5c1531))return![];let _0x33f611;try{const _0x44522f=await _0xa1bf1f[_0x5943b3(0x109)](readFile,_0x5c1531,_0x5943b3(0x10e));_0x33f611=_0xa1bf1f['xGjro'](parseJsonc,_0x44522f);}catch{return![];}const _0x161f4a=Array[_0x5943b3(0x111)](_0x33f611[_0x5943b3(0x129)])?_0x33f611['plugin']:[];if(_0xa1bf1f[_0x5943b3(0x13e)](_0x161f4a[_0x5943b3(0x134)],0x0))return![];const _0x277c9b=_0x161f4a['filter'](_0x212241=>{if(typeof _0x212241!==_0xa1bf1f['CWQvr'])return!![];return _0x212241!==opencodePluginName;});if(_0xa1bf1f[_0x5943b3(0x13c)](_0x277c9b[_0x5943b3(0x134)],_0x161f4a[_0x5943b3(0x134)]))return![];return _0x277c9b[_0x5943b3(0x134)]===0x0?delete _0x33f611[_0x5943b3(0x129)]:_0x33f611[_0x5943b3(0x129)]=_0x277c9b,await _0xa1bf1f[_0x5943b3(0x109)](writeFile,_0x5c1531,JSON[_0x5943b3(0x13d)](_0x33f611,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0xd8fa18){const _0x1d4b63=_0x5d2372,_0x55899a={'EySGE':_0x1d4b63(0x129),'DbQTi':'uninstall','uQgYn':function(_0x2c3a50,_0x421a83,_0xc5cf12,_0x5196a0){return _0x2c3a50(_0x421a83,_0xc5cf12,_0x5196a0);},'fFKTI':'claude','UWQMV':function(_0x5f38f9){return _0x5f38f9();},'Zdolj':function(_0xd83f38,_0x489da0){return _0xd83f38===_0x489da0;},'MMkfO':_0x1d4b63(0x122)};return new Promise(_0x31749c=>{const _0xe3c757=_0x1d4b63,_0x5324aa={'LETuV':function(_0x3463c0,_0x47a19c){return _0x3463c0===_0x47a19c;}},_0x2334dc=[_0x55899a[_0xe3c757(0x106)],_0x55899a['DbQTi'],_0xe3c757(0x132)];_0xd8fa18&&_0x2334dc['push'](_0xe3c757(0x120),_0xd8fa18);const _0x36f3bc=_0x55899a['uQgYn'](spawn,_0x55899a[_0xe3c757(0x11c)],_0x2334dc,{'stdio':['ignore',_0xe3c757(0x116),'ignore'],'cwd':_0xd8fa18?_0x55899a['UWQMV'](getProjectRoot):undefined,'shell':_0x55899a[_0xe3c757(0x123)](process[_0xe3c757(0x125)],'win32')});_0x36f3bc['on'](_0x55899a[_0xe3c757(0x133)],_0x43538d=>{const _0x509087=_0xe3c757;_0x31749c(_0x5324aa[_0x509087(0x136)](_0x43538d,0x0));}),_0x36f3bc['on']('error',()=>{_0x31749c(![]);});});}async function removeMarketplace(){const _0x3e5391=_0x5d2372,_0x3b0d71={'InfSL':function(_0x4e1e40,_0x567049){return _0x4e1e40===_0x567049;},'yTOCR':function(_0x490b58,_0xbeaa57,_0x1778f2,_0x2256bb){return _0x490b58(_0xbeaa57,_0x1778f2,_0x2256bb);},'OLUJl':'claude','EwLVi':'plugin','glLAs':'marketplace','KOhSf':'trailhead','PcGWZ':_0x3e5391(0x116),'mzArr':'win32'};return new Promise(_0x3f96ab=>{const _0x9ee895=_0x3e5391,_0x58ddc5=_0x3b0d71[_0x9ee895(0x140)](spawn,_0x3b0d71[_0x9ee895(0x11f)],[_0x3b0d71['EwLVi'],_0x3b0d71[_0x9ee895(0x13f)],'remove',_0x3b0d71['KOhSf']],{'stdio':[_0x3b0d71['PcGWZ'],_0x3b0d71[_0x9ee895(0x135)],'ignore'],'shell':process[_0x9ee895(0x125)]===_0x3b0d71['mzArr']});_0x58ddc5['on'](_0x9ee895(0x122),_0x5de54a=>{const _0x4ee43c=_0x9ee895;_0x3f96ab(_0x3b0d71[_0x4ee43c(0x131)](_0x5de54a,0x0));}),_0x58ddc5['on'](_0x9ee895(0x118),()=>{_0x3f96ab(![]);});});}export async function clean(){const _0xde93ae=_0x5d2372,_0x586c0b={'bGHCE':function(_0x39b19e){return _0x39b19e();},'VqYuu':'✓\x20Removed\x20stored\x20credentials','NiuRC':function(_0x36a7c8,_0x2f5d6e){return _0x36a7c8(_0x2f5d6e);},'aWUsg':function(_0x350a68,_0x1cbfbf,_0x10d80b){return _0x350a68(_0x1cbfbf,_0x10d80b);},'fdGGt':function(_0x580ab9){return _0x580ab9();},'HjpQT':function(_0x33d016,_0x5b5ed2){return _0x33d016(_0x5b5ed2);},'opiPp':function(_0x413d5c,_0xf23a84,_0x545736){return _0x413d5c(_0xf23a84,_0x545736);},'DlGot':function(_0x6fcf73,_0x52357e){return _0x6fcf73(_0x52357e);},'fBphD':_0xde93ae(0x10c),'fdPhq':function(_0xdc4aa5,_0x1cca35){return _0xdc4aa5(_0x1cca35);},'jJvPO':_0xde93ae(0x12b),'ifnLF':_0xde93ae(0x12d),'YEbub':function(_0x2371e5){return _0x2371e5();},'dqyjp':function(_0x43b38c){return _0x43b38c();},'MUepC':'✓\x20Removed\x20trailhead\x20marketplace','DBaBk':'Nothing\x20to\x20clean\x20up.\x0a'};console[_0xde93ae(0x105)](_0xde93ae(0x12f));let _0x7c4ec4=![];try{await _0x586c0b[_0xde93ae(0x104)](deleteAllCredentials),console['log'](_0x586c0b[_0xde93ae(0x128)]),_0x7c4ec4=!![];}catch{}const _0x3829df=_0x586c0b[_0xde93ae(0x104)](getCacheFile);existsSync(_0x3829df)&&(await rm(_0x3829df),_0x7c4ec4=!![]);const _0xd32b48=_0x586c0b['bGHCE'](getRangerDir);existsSync(_0xd32b48)&&(await rm(_0xd32b48,{'recursive':!![]}),console[_0xde93ae(0x105)](_0xde93ae(0x107)),_0x7c4ec4=!![]);const _0x37e404=_0x586c0b['bGHCE'](getProjectSkillsDir);for(const _0x3f008f of skillsToRemove){const _0x337b80=join(_0x37e404,_0x3f008f);_0x586c0b['NiuRC'](existsSync,_0x337b80)&&(await _0x586c0b['aWUsg'](rm,_0x337b80,{'recursive':!![]}),console['log'](_0xde93ae(0x139)+_0x3f008f),_0x7c4ec4=!![]);}const _0x9e10f2=_0x586c0b[_0xde93ae(0x10a)](getUserSkillsDir);for(const _0x5b76e4 of skillsToRemove){const _0x134115=join(_0x9e10f2,_0x5b76e4);existsSync(_0x134115)&&(await _0x586c0b[_0xde93ae(0x13b)](rm,_0x134115,{'recursive':!![]}),console[_0xde93ae(0x105)]('✓\x20Removed\x20user\x20skill:\x20'+_0x5b76e4),_0x7c4ec4=!![]);}const _0x1b6a85=getOpencodeSkillsDir('project');for(const _0x1a54d8 of skillsToRemove){const _0x8c745a=join(_0x1b6a85,_0x1a54d8);existsSync(_0x8c745a)&&(await _0x586c0b['aWUsg'](rm,_0x8c745a,{'recursive':!![]}),console['log'](_0xde93ae(0x12a)+_0x1a54d8),_0x7c4ec4=!![]);}const _0xce08dd=_0x586c0b['HjpQT'](getOpencodeSkillsDir,'user');for(const _0x330c18 of skillsToRemove){const _0x4eb125=_0x586c0b[_0xde93ae(0x124)](join,_0xce08dd,_0x330c18);_0x586c0b[_0xde93ae(0x121)](existsSync,_0x4eb125)&&(await _0x586c0b['aWUsg'](rm,_0x4eb125,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x330c18),_0x7c4ec4=!![]);}const _0x507756=join(getOpencodeConfigDir(_0x586c0b[_0xde93ae(0x10f)]),_0xde93ae(0x12d));await _0x586c0b['fdPhq'](removeOpencodePluginConfig,_0x507756)&&(console[_0xde93ae(0x105)](_0x586c0b[_0xde93ae(0x11e)]),_0x7c4ec4=!![]);const _0x3a679c=join(getOpencodeConfigDir('user'),_0x586c0b[_0xde93ae(0x113)]);await _0x586c0b['DlGot'](removeOpencodePluginConfig,_0x3a679c)&&(console['log'](_0xde93ae(0x114)),_0x7c4ec4=!![]);const _0x2cc49d=await _0x586c0b['YEbub'](uninstallClaudePlugin);_0x2cc49d&&(console[_0xde93ae(0x105)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x7c4ec4=!![]);const _0x22f603=await uninstallClaudePlugin(_0x586c0b['fBphD']);_0x22f603&&(console['log'](_0xde93ae(0x130)),_0x7c4ec4=!![]);const _0x516ff9=await _0x586c0b['dqyjp'](removeMarketplace);_0x516ff9&&(console['log'](_0x586c0b[_0xde93ae(0x12e)]),_0x7c4ec4=!![]),_0x7c4ec4?console['log'](_0xde93ae(0x108)):console['log'](_0x586c0b[_0xde93ae(0x12c)]);}
1
+ const _0xf40487=_0x2bbb;(function(_0x405910,_0x36a6bd){const _0xb462f5=_0x2bbb,_0x1264ae=_0x405910();while(!![]){try{const _0x409db1=parseInt(_0xb462f5(0x1a5))/0x1*(parseInt(_0xb462f5(0x1af))/0x2)+-parseInt(_0xb462f5(0x1b9))/0x3*(parseInt(_0xb462f5(0x194))/0x4)+parseInt(_0xb462f5(0x19f))/0x5*(-parseInt(_0xb462f5(0x187))/0x6)+-parseInt(_0xb462f5(0x19d))/0x7*(parseInt(_0xb462f5(0x1a6))/0x8)+parseInt(_0xb462f5(0x1ac))/0x9+parseInt(_0xb462f5(0x18a))/0xa*(-parseInt(_0xb462f5(0x1b4))/0xb)+parseInt(_0xb462f5(0x19c))/0xc;if(_0x409db1===_0x36a6bd)break;else _0x1264ae['push'](_0x1264ae['shift']());}catch(_0x2a1ae8){_0x1264ae['push'](_0x1264ae['shift']());}}}(_0x4d7d,0xa1d34));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';function _0x2bbb(_0x41487d,_0xbedc61){_0x41487d=_0x41487d-0x17f;const _0x4d7da6=_0x4d7d();let _0x2bbb91=_0x4d7da6[_0x41487d];return _0x2bbb91;}function _0x4d7d(){const _0x155e34=['27329784tpDsgy','2275IeahLF','opencode.json','5oqKVWp','Nothing\x20to\x20clean\x20up.\x0a','kCKff','log','stringify','UaTWm','2477nmJayG','6968VGfFXr','hrpXg','jZcwH','FAiaS','bXmWY','Rvpyp','6931593UtHtxH','vLhqa','bug-bash','582kOIghT','filter','xEzQw','WGQqh','XtuiR','224147apPwIr','✓\x20Removed\x20stored\x20credentials','win32','buGWW','platform','276fVivAX','close','\x0a✅\x20Cleanup\x20complete!\x0a','GNisP','KMqwM','@ranger-testing/opencode-plugin','PKdVz','error','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','6240228fyVRps','✓\x20Removed\x20project\x20skill:\x20','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','290WBNEly','trailhead','project','jmgVT','Jozft','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','parse','utf-8','ikOni','plugin','51808uYjIXQ','length','ignore','ranger','ZUYgn','eYKAL','claude','replace'];_0x4d7d=function(){return _0x155e34;};return _0x4d7d();}import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0xf40487(0x197),'feature-tracker',_0xf40487(0x1ae),'e2e-test-recommender'],opencodePluginName=_0xf40487(0x183);function parseJsonc(_0x1c215d){const _0x4de69a=_0xf40487,_0x55794f=_0x1c215d[_0x4de69a(0x19b)](/\/\*[\s\S]*?\*\//g,''),_0xba656e=_0x55794f['replace'](/^\s*\/\/.*$/gm,''),_0xb89338=_0xba656e['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x4de69a(0x190)](_0xb89338);}async function removeOpencodePluginConfig(_0x3fcf98){const _0x5d43db=_0xf40487,_0x51ddaf={'jZcwH':'string','ePqor':function(_0x43a2a6,_0x29d409){return _0x43a2a6!==_0x29d409;},'mdNMi':function(_0x1b84f0,_0x2dbcc0){return _0x1b84f0(_0x2dbcc0);},'Rvpyp':function(_0x4218bb,_0x424657,_0x525296){return _0x4218bb(_0x424657,_0x525296);},'kCKff':function(_0x4cfc70,_0xebd0b4){return _0x4cfc70===_0xebd0b4;},'SjHFx':function(_0x24d54a,_0x3b3109){return _0x24d54a+_0x3b3109;}};if(!_0x51ddaf['mdNMi'](existsSync,_0x3fcf98))return![];let _0x1fff4d;try{const _0x3b664b=await _0x51ddaf[_0x5d43db(0x1ab)](readFile,_0x3fcf98,_0x5d43db(0x191));_0x1fff4d=parseJsonc(_0x3b664b);}catch{return![];}const _0x2c4227=Array['isArray'](_0x1fff4d[_0x5d43db(0x193)])?_0x1fff4d['plugin']:[];if(_0x2c4227[_0x5d43db(0x195)]===0x0)return![];const _0x2e75ab=_0x2c4227[_0x5d43db(0x1b0)](_0x52c43e=>{const _0x2010bf=_0x5d43db;if(typeof _0x52c43e!==_0x51ddaf[_0x2010bf(0x1a8)])return!![];return _0x51ddaf['ePqor'](_0x52c43e,opencodePluginName);});if(_0x51ddaf['kCKff'](_0x2e75ab['length'],_0x2c4227[_0x5d43db(0x195)]))return![];return _0x51ddaf[_0x5d43db(0x1a1)](_0x2e75ab['length'],0x0)?delete _0x1fff4d['plugin']:_0x1fff4d[_0x5d43db(0x193)]=_0x2e75ab,await writeFile(_0x3fcf98,_0x51ddaf['SjHFx'](JSON[_0x5d43db(0x1a3)](_0x1fff4d,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x50a91a){const _0x15d421=_0xf40487,_0x1f2bdf={'GNisP':function(_0x46c707,_0x4f8201){return _0x46c707===_0x4f8201;},'PKdVz':'uninstall','ikOni':'ranger@trailhead','vLhqa':'--scope','buGWW':_0x15d421(0x196),'hOrkc':function(_0x279d05){return _0x279d05();},'Bhtwx':_0x15d421(0x17f),'RUOLp':_0x15d421(0x185)};return new Promise(_0x3fe021=>{const _0x35557d=_0x15d421,_0x344206=[_0x35557d(0x193),_0x1f2bdf[_0x35557d(0x184)],_0x1f2bdf[_0x35557d(0x192)]];_0x50a91a&&_0x344206['push'](_0x1f2bdf[_0x35557d(0x1ad)],_0x50a91a);const _0x58a0c1=spawn('claude',_0x344206,{'stdio':['ignore',_0x1f2bdf[_0x35557d(0x1b7)],_0x1f2bdf['buGWW']],'cwd':_0x50a91a?_0x1f2bdf['hOrkc'](getProjectRoot):undefined,'shell':process[_0x35557d(0x1b8)]==='win32'});_0x58a0c1['on'](_0x1f2bdf['Bhtwx'],_0x220e19=>{const _0x2d6642=_0x35557d;_0x3fe021(_0x1f2bdf[_0x2d6642(0x181)](_0x220e19,0x0));}),_0x58a0c1['on'](_0x1f2bdf['RUOLp'],()=>{_0x3fe021(![]);});});}async function removeMarketplace(){const _0x3d9ebf=_0xf40487,_0x5ddf73={'tCqjd':function(_0x3a351c,_0x1fa13c){return _0x3a351c===_0x1fa13c;},'ZUYgn':function(_0x28145b,_0x2908ea,_0x1b8eb9,_0x6501c9){return _0x28145b(_0x2908ea,_0x1b8eb9,_0x6501c9);},'KMqwM':_0x3d9ebf(0x19a),'bXmWY':_0x3d9ebf(0x193),'WGQqh':'ignore','FAiaS':_0x3d9ebf(0x1b6)};return new Promise(_0x16622f=>{const _0x4be36f=_0x3d9ebf,_0x203f74={'UaTWm':function(_0x4ab1e6,_0x58fe96){return _0x5ddf73['tCqjd'](_0x4ab1e6,_0x58fe96);}},_0x1de706=_0x5ddf73[_0x4be36f(0x198)](spawn,_0x5ddf73[_0x4be36f(0x182)],[_0x5ddf73[_0x4be36f(0x1aa)],'marketplace','remove',_0x4be36f(0x18b)],{'stdio':[_0x5ddf73[_0x4be36f(0x1b2)],_0x5ddf73[_0x4be36f(0x1b2)],_0x5ddf73[_0x4be36f(0x1b2)]],'shell':process['platform']===_0x5ddf73[_0x4be36f(0x1a9)]});_0x1de706['on'](_0x4be36f(0x17f),_0x7442a5=>{const _0x1b2151=_0x4be36f;_0x16622f(_0x203f74[_0x1b2151(0x1a4)](_0x7442a5,0x0));}),_0x1de706['on']('error',()=>{_0x16622f(![]);});});}export async function clean(){const _0x2e3420=_0xf40487,_0xc50681={'kMjju':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','PYNnW':function(_0x26bc27,_0x25842c){return _0x26bc27(_0x25842c);},'hrpXg':function(_0x377f60,_0x58467f,_0x512b02){return _0x377f60(_0x58467f,_0x512b02);},'HYPEL':function(_0x333936,_0x4650d1,_0x505863){return _0x333936(_0x4650d1,_0x505863);},'eYKAL':function(_0x587fc9,_0x17edc7,_0x4cae2c){return _0x587fc9(_0x17edc7,_0x4cae2c);},'xEzQw':function(_0x408742){return _0x408742();},'GwJrq':function(_0x48bd1f,_0x15d9e3,_0x191fbc){return _0x48bd1f(_0x15d9e3,_0x191fbc);},'CnlPK':function(_0xf7a0b1,_0x3fcd28,_0x573303){return _0xf7a0b1(_0x3fcd28,_0x573303);},'CmKqU':function(_0x26a6b1,_0x31b98e){return _0x26a6b1(_0x31b98e);},'NLsdw':function(_0x432fc2,_0x4f1755,_0x339c83){return _0x432fc2(_0x4f1755,_0x339c83);},'DNDDK':function(_0x1379c7,_0x534f38){return _0x1379c7(_0x534f38);},'Jozft':function(_0x5dbc91,_0x5369b2){return _0x5dbc91(_0x5369b2);},'jmgVT':_0x2e3420(0x19e),'FweuL':'✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','VCRvG':function(_0x3f9b55,_0x174e68){return _0x3f9b55(_0x174e68);},'hEgRq':_0x2e3420(0x18c),'XtuiR':_0x2e3420(0x189)};console[_0x2e3420(0x1a2)](_0xc50681['kMjju']);let _0x14314e=![];try{await deleteAllCredentials(),console['log'](_0x2e3420(0x1b5)),_0x14314e=!![];}catch{}const _0x51e904=getCacheFile();existsSync(_0x51e904)&&(await rm(_0x51e904),_0x14314e=!![]);const _0x5d40ee=getRangerDir();_0xc50681['PYNnW'](existsSync,_0x5d40ee)&&(await _0xc50681[_0x2e3420(0x1a7)](rm,_0x5d40ee,{'recursive':!![]}),console['log']('✓\x20Removed\x20.ranger/\x20directory'),_0x14314e=!![]);const _0x397f7f=getProjectSkillsDir();for(const _0x551c1f of skillsToRemove){const _0x38b0a4=_0xc50681['HYPEL'](join,_0x397f7f,_0x551c1f);_0xc50681['PYNnW'](existsSync,_0x38b0a4)&&(await _0xc50681[_0x2e3420(0x199)](rm,_0x38b0a4,{'recursive':!![]}),console[_0x2e3420(0x1a2)](_0x2e3420(0x188)+_0x551c1f),_0x14314e=!![]);}const _0x356c78=_0xc50681['xEzQw'](getUserSkillsDir);for(const _0x152661 of skillsToRemove){const _0x366b4e=_0xc50681['GwJrq'](join,_0x356c78,_0x152661);_0xc50681['PYNnW'](existsSync,_0x366b4e)&&(await _0xc50681['CnlPK'](rm,_0x366b4e,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x152661),_0x14314e=!![]);}const _0x1fad6a=getOpencodeSkillsDir('project');for(const _0x8153e of skillsToRemove){const _0x291f66=join(_0x1fad6a,_0x8153e);_0xc50681['CmKqU'](existsSync,_0x291f66)&&(await _0xc50681['NLsdw'](rm,_0x291f66,{'recursive':!![]}),console['log'](_0x2e3420(0x18f)+_0x8153e),_0x14314e=!![]);}const _0x5ba9a8=_0xc50681['DNDDK'](getOpencodeSkillsDir,'user');for(const _0xfcb453 of skillsToRemove){const _0xe225fd=_0xc50681['NLsdw'](join,_0x5ba9a8,_0xfcb453);existsSync(_0xe225fd)&&(await rm(_0xe225fd,{'recursive':!![]}),console[_0x2e3420(0x1a2)](_0x2e3420(0x186)+_0xfcb453),_0x14314e=!![]);}const _0x11f1bc=_0xc50681['HYPEL'](join,_0xc50681[_0x2e3420(0x18e)](getOpencodeConfigDir,_0x2e3420(0x18c)),_0xc50681['jmgVT']);await removeOpencodePluginConfig(_0x11f1bc)&&(console['log'](_0xc50681['FweuL']),_0x14314e=!![]);const _0x37c8fa=join(getOpencodeConfigDir('user'),_0xc50681[_0x2e3420(0x18d)]);await _0xc50681['VCRvG'](removeOpencodePluginConfig,_0x37c8fa)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x14314e=!![]);const _0x2aa1f6=await _0xc50681['xEzQw'](uninstallClaudePlugin);_0x2aa1f6&&(console[_0x2e3420(0x1a2)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x14314e=!![]);const _0x786987=await uninstallClaudePlugin(_0xc50681['hEgRq']);_0x786987&&(console['log'](_0xc50681[_0x2e3420(0x1b3)]),_0x14314e=!![]);const _0x4ba3b0=await _0xc50681[_0x2e3420(0x1b1)](removeMarketplace);_0x4ba3b0&&(console[_0x2e3420(0x1a2)]('✓\x20Removed\x20trailhead\x20marketplace'),_0x14314e=!![]),_0x14314e?console['log'](_0x2e3420(0x180)):console['log'](_0x2e3420(0x1a0));}
@@ -1 +1 @@
1
- (function(_0x51bae9,_0x486c26){const _0x380e27=_0x93b1,_0x143ce5=_0x51bae9();while(!![]){try{const _0x1af882=parseInt(_0x380e27(0xb2))/0x1*(parseInt(_0x380e27(0x90))/0x2)+parseInt(_0x380e27(0xb7))/0x3*(-parseInt(_0x380e27(0x9e))/0x4)+-parseInt(_0x380e27(0xa2))/0x5*(-parseInt(_0x380e27(0x96))/0x6)+parseInt(_0x380e27(0xa5))/0x7+parseInt(_0x380e27(0xb0))/0x8*(-parseInt(_0x380e27(0x9c))/0x9)+parseInt(_0x380e27(0x8c))/0xa+-parseInt(_0x380e27(0xa6))/0xb;if(_0x1af882===_0x486c26)break;else _0x143ce5['push'](_0x143ce5['shift']());}catch(_0x10e46c){_0x143ce5['push'](_0x143ce5['shift']());}}}(_0x15ae,0x7784c));function _0x15ae(){const _0x2d5b6c=['false','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','UvrJF','2805470MiAsQM','log','slnhh','umXDR','1376558SXrFhv','Key\x20\x22','settings','trim','true','vDBcm','12vDESSE','cloud','startsWith','lwYlx','(not\x20set)','\x22\x20not\x20found','5163381woTWgI','\x20for\x20\x22','44syylGt','\x20=\x20','kind','LPdrs','224535TjXkeR','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','giKfd','5435507xuxDTA','469997oaMUCz','isSafeInteger','endsWith','includes','fJdGO','Invalid\x20value\x20for\x20','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','Profile\x20\x22','object','No\x20configuration\x20set\x20for\x20\x22','8WILUnI','gWLWa','1VOoHYR','OQjfN','test','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','yIXlZ','198861yIzvKo','alsoExistsElsewhere','udYxa','jcTYj','cwd','stringify','DXzka','Set\x20','lGilD'];_0x15ae=function(){return _0x2d5b6c;};return _0x15ae();}import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost','forceLogin'];function parseLocalValue(_0x555455,_0x28d824){const _0x5d25dd=_0x93b1,_0x22fd53={'LPdrs':function(_0x59d6e1,_0x46f014){return _0x59d6e1===_0x46f014;},'slnhh':_0x5d25dd(0x89)};if(BOOLEAN_KEYS[_0x5d25dd(0xa9)](_0x555455)){if(_0x22fd53['LPdrs'](_0x28d824,_0x5d25dd(0x94)))return!![];if(_0x22fd53[_0x5d25dd(0xa1)](_0x28d824,_0x22fd53[_0x5d25dd(0x8e)]))return![];throw new Error(_0x5d25dd(0xab)+_0x555455+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x28d824;}function _0x93b1(_0x5cbb2d,_0x555ffd){_0x5cbb2d=_0x5cbb2d-0x87;const _0x15ae09=_0x15ae();let _0x93b12b=_0x15ae09[_0x5cbb2d];return _0x93b12b;}function parseOverrideValue(_0x18b4e0){const _0x1a1ff8=_0x93b1,_0x1a9d29={'ODhvh':function(_0x3af97f,_0x448203){return _0x3af97f===_0x448203;},'ubLHd':_0x1a1ff8(0x89)};if(_0x1a9d29['ODhvh'](_0x18b4e0,_0x1a1ff8(0x94)))return!![];if(_0x18b4e0===_0x1a9d29['ubLHd'])return![];if(_0x18b4e0==='null')return null;if(_0x18b4e0==='undefined')return undefined;if(/^-?\d+$/[_0x1a1ff8(0xb4)](_0x18b4e0)){const _0x494e51=Number(_0x18b4e0);if(Number[_0x1a1ff8(0xa7)](_0x494e51))return _0x494e51;}if(/^-?\d+\.\d+$/['test'](_0x18b4e0)){const _0x319b5d=Number(_0x18b4e0);if(!Number['isNaN'](_0x319b5d))return _0x319b5d;}const _0x169a9c=_0x18b4e0[_0x1a1ff8(0x93)]();if(_0x169a9c['startsWith']('{')&&_0x169a9c[_0x1a1ff8(0xa8)]('}')||_0x169a9c[_0x1a1ff8(0x98)]('[')&&_0x169a9c[_0x1a1ff8(0xa8)](']'))try{return JSON['parse'](_0x169a9c);}catch{}return _0x18b4e0;}async function resolveProfileTarget(_0x2f8976){const _0x8c85cf=_0x93b1,_0x33b3b5={'QDqNG':function(_0x35e5a7,_0x2373f5){return _0x35e5a7(_0x2373f5);},'yqWmY':function(_0x4798dd,_0x1c110e){return _0x4798dd(_0x1c110e);},'SiFMO':function(_0x10eaf3,_0xba8807){return _0x10eaf3(_0xba8807);},'TjcSw':'cloud','DtJyt':'local'},_0x55aa2c=_0x33b3b5['QDqNG'](existsSync,_0x33b3b5['yqWmY'](getEnvDir,_0x2f8976));let _0xe59a7b=![];try{const _0x116fe3=await fetchCloudProfile(_0x2f8976);_0xe59a7b=_0x33b3b5['SiFMO'](Boolean,_0x116fe3);}catch{}if(_0xe59a7b)return{'kind':_0x33b3b5['TjcSw'],'alsoExistsElsewhere':_0x55aa2c};if(_0x55aa2c)return{'kind':_0x33b3b5['DtJyt'],'alsoExistsElsewhere':![]};throw new Error(_0x8c85cf(0xad)+_0x2f8976+_0x8c85cf(0xb5)+_0x2f8976);}function printDualExistsHint(_0x5350d8){const _0x5539cf=_0x93b1;console['log']('\x20\x20Note:\x20\x22'+_0x5350d8+_0x5539cf(0x8a));}function getProjectPath(){const _0x2c774b=_0x93b1;return process[_0x2c774b(0xbb)]();}async function loadEffectiveCloudSettings(_0x5c9bbb){const _0x5c90c3=_0x93b1,_0x410215={'pMSOI':function(_0x3fa9e7,_0x2f21a6,_0x5abbd3){return _0x3fa9e7(_0x2f21a6,_0x5abbd3);},'udYxa':function(_0x10e59b,_0x326d49){return _0x10e59b??_0x326d49;}},_0x32e031=await fetchCloudProfile(_0x5c9bbb),_0x30fe1c=readProfileOverrides(getProjectPath(),_0x5c9bbb);return _0x410215['pMSOI'](mergeCloudProfileSettings,_0x32e031?.[_0x5c90c3(0x92)]??{},_0x410215[_0x5c90c3(0xb9)](_0x30fe1c,undefined));}export async function configSet(_0x3ad62e,_0xb6167,_0x199ab1){const _0x1e60cc=_0x93b1,_0x933004={'DXzka':function(_0x560b19,_0x1a98d7){return _0x560b19(_0x1a98d7);},'uFOdN':function(_0x7b2ec,_0x4e69dc){return _0x7b2ec===_0x4e69dc;},'FICXa':_0x1e60cc(0x97),'SQaPW':function(_0x39653e){return _0x39653e();},'OQjfN':function(_0x4ef0f5,_0x277b11,_0x595ee4){return _0x4ef0f5(_0x277b11,_0x595ee4);},'jcTYj':function(_0x492923){return _0x492923();}},_0x3d6d03=await _0x933004[_0x1e60cc(0xbd)](resolveProfileTarget,_0x3ad62e);if(_0x933004['uFOdN'](_0x3d6d03[_0x1e60cc(0xa0)],_0x933004['FICXa'])){if(_0x3d6d03['alsoExistsElsewhere'])printDualExistsHint(_0x3ad62e);const _0x58de86=_0x933004[_0x1e60cc(0xbd)](parseOverrideValue,_0x199ab1);setProfileOverride(_0x933004['SQaPW'](getProjectPath),_0x3ad62e,_0xb6167,_0x58de86),console['log']('Set\x20'+_0xb6167+_0x1e60cc(0x9f)+JSON[_0x1e60cc(0xbc)](_0x58de86)+'\x20for\x20\x22'+_0x3ad62e+'\x22');return;}const _0x56303f=_0x933004[_0x1e60cc(0xb3)](parseLocalValue,_0xb6167,_0x199ab1);setProfileOverride(_0x933004[_0x1e60cc(0xba)](getProjectPath),_0x3ad62e,_0xb6167,_0x56303f),console[_0x1e60cc(0x8d)](_0x1e60cc(0x87)+_0xb6167+_0x1e60cc(0x9f)+_0x56303f+_0x1e60cc(0x9d)+_0x3ad62e+'\x22');}export async function configGet(_0x35c2da,_0x1484b2){const _0x1674ec=_0x93b1,_0x58a94e={'vDBcm':function(_0xf3ab13,_0x2a0702){return _0xf3ab13===_0x2a0702;},'gWLWa':_0x1674ec(0xae),'lwYlx':function(_0x53e043,_0x5a1af4,_0x306f31){return _0x53e043(_0x5a1af4,_0x306f31);},'umXDR':function(_0x688c54,_0x203cff){return _0x688c54===_0x203cff;}},_0x40b42b=await resolveProfileTarget(_0x35c2da);if(_0x40b42b[_0x1674ec(0xa0)]===_0x1674ec(0x97)){const _0x37168a=await loadEffectiveCloudSettings(_0x35c2da),_0x5dd1db=getNestedValue(_0x37168a,_0x1484b2);if(_0x58a94e[_0x1674ec(0x95)](_0x5dd1db,undefined))console[_0x1674ec(0x8d)](_0x1674ec(0x9a));else _0x58a94e['vDBcm'](typeof _0x5dd1db,_0x58a94e[_0x1674ec(0xb1)])?console[_0x1674ec(0x8d)](JSON[_0x1674ec(0xbc)](_0x5dd1db,null,0x2)):console['log'](_0x5dd1db);return;}const _0xf59fc=await loadSettings(_0x35c2da),_0xc3ecbc=_0x58a94e[_0x1674ec(0x99)](getNestedValue,_0xf59fc,_0x1484b2);if(_0x58a94e[_0x1674ec(0x8f)](_0xc3ecbc,undefined))console['log']('(not\x20set)');else typeof _0xc3ecbc===_0x58a94e[_0x1674ec(0xb1)]?console[_0x1674ec(0x8d)](JSON[_0x1674ec(0xbc)](_0xc3ecbc,null,0x2)):console['log'](_0xc3ecbc);}export async function configList(_0x2c9efc){const _0xd5a7b7=_0x93b1,_0x3debd1={'UvrJF':function(_0x4ba381,_0xae19c7){return _0x4ba381(_0xae19c7);},'giKfd':function(_0x190e86,_0x71598b){return _0x190e86===_0x71598b;},'JScVs':function(_0x2e5a97,_0x177436){return _0x2e5a97(_0x177436);}},_0xc058c3=await _0x3debd1[_0xd5a7b7(0x8b)](resolveProfileTarget,_0x2c9efc);if(_0x3debd1[_0xd5a7b7(0xa4)](_0xc058c3['kind'],'cloud')){const _0x13a0cf=await loadEffectiveCloudSettings(_0x2c9efc);if(!_0x13a0cf||_0x3debd1['giKfd'](Object['keys'](_0x13a0cf)['length'],0x0)){console[_0xd5a7b7(0x8d)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2c9efc+'\x22');return;}console[_0xd5a7b7(0x8d)](JSON[_0xd5a7b7(0xbc)](_0x13a0cf,null,0x2));return;}const _0xa60dfd=_0x3debd1['JScVs'](getSettingsPath,_0x2c9efc);if(!_0x3debd1['UvrJF'](existsSync,_0xa60dfd)){console[_0xd5a7b7(0x8d)](_0xd5a7b7(0xaf)+_0x2c9efc+'\x22');return;}const _0x40d250=await loadSettings(_0x2c9efc),_0x1616e8=_0x3debd1['UvrJF'](formatSettings,_0x40d250);!_0x1616e8?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x2c9efc+'\x22'):console['log'](_0x1616e8);}export async function configUnset(_0x5d42fa,_0x1605bb){const _0x59b175=_0x93b1,_0x29f39b={'fJdGO':function(_0x12da66,_0x48e19f){return _0x12da66(_0x48e19f);},'yIXlZ':function(_0x2747dd,_0x382e4d,_0x45e1bf,_0x55b6e4){return _0x2747dd(_0x382e4d,_0x45e1bf,_0x55b6e4);},'ggEDy':function(_0x26c829){return _0x26c829();},'AHCNv':function(_0x4693ec){return _0x4693ec();}},_0x30b9f4=await resolveProfileTarget(_0x5d42fa);if(_0x30b9f4['kind']==='cloud'){if(_0x30b9f4[_0x59b175(0xb8)])_0x29f39b[_0x59b175(0xaa)](printDualExistsHint,_0x5d42fa);const _0x35578a=_0x29f39b['yIXlZ'](unsetProfileOverride,_0x29f39b['ggEDy'](getProjectPath),_0x5d42fa,_0x1605bb);_0x35578a?console['log']('Removed\x20'+_0x1605bb+'\x20for\x20\x22'+_0x5d42fa+'\x22'):console['log'](_0x59b175(0x91)+_0x1605bb+_0x59b175(0x9b));return;}const _0x23e4c3=_0x29f39b[_0x59b175(0xb6)](unsetProfileOverride,_0x29f39b['AHCNv'](getProjectPath),_0x5d42fa,_0x1605bb);if(_0x23e4c3){console['log']('Removed\x20'+_0x1605bb);return;}const _0x15697f=await loadSettings(_0x5d42fa),_0x337b62=deleteNestedValue(_0x15697f,_0x1605bb);_0x337b62?console['log']('Key\x20\x22'+_0x1605bb+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x5d42fa+_0x59b175(0xa3)):console[_0x59b175(0x8d)]('Key\x20\x22'+_0x1605bb+_0x59b175(0x9b));}export async function configReset(_0xa32f18){const _0x2f8202=_0x93b1,_0x5b8188={'zBSAY':_0x2f8202(0x97),'lGilD':function(_0x244c8c){return _0x244c8c();}},_0x1fc9e2=await resolveProfileTarget(_0xa32f18);if(_0x1fc9e2['kind']===_0x5b8188['zBSAY']){resetProfileOverrides(_0x5b8188[_0x2f8202(0x88)](getProjectPath),_0xa32f18),console['log']('Cleared\x20local\x20overrides\x20for\x20\x22'+_0xa32f18+'\x22');return;}console['log']('\x22'+_0xa32f18+_0x2f8202(0xac)+_0xa32f18+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ const _0x5fcee1=_0xca7e;(function(_0x3055d8,_0x381c1c){const _0x39cf41=_0xca7e,_0x442a7c=_0x3055d8();while(!![]){try{const _0x1dcd73=parseInt(_0x39cf41(0x142))/0x1+-parseInt(_0x39cf41(0x14c))/0x2+parseInt(_0x39cf41(0x12b))/0x3+parseInt(_0x39cf41(0x131))/0x4*(-parseInt(_0x39cf41(0x147))/0x5)+parseInt(_0x39cf41(0x13d))/0x6*(-parseInt(_0x39cf41(0x141))/0x7)+parseInt(_0x39cf41(0x148))/0x8+parseInt(_0x39cf41(0x134))/0x9*(parseInt(_0x39cf41(0x124))/0xa);if(_0x1dcd73===_0x381c1c)break;else _0x442a7c['push'](_0x442a7c['shift']());}catch(_0x4ef7ec){_0x442a7c['push'](_0x442a7c['shift']());}}}(_0x2dc3,0x8d217));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x5fcee1(0x143),_0x5fcee1(0x132),_0x5fcee1(0x139)];function parseLocalValue(_0x22cba1,_0x1584df){const _0x55852e=_0x5fcee1,_0x216300={'tEKOA':function(_0x41f070,_0x1eaaf6){return _0x41f070===_0x1eaaf6;},'bhjMe':function(_0x11f957,_0x15d5d6){return _0x11f957===_0x15d5d6;}};if(BOOLEAN_KEYS[_0x55852e(0x12e)](_0x22cba1)){if(_0x216300['tEKOA'](_0x1584df,'true'))return!![];if(_0x216300['bhjMe'](_0x1584df,'false'))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x22cba1+_0x55852e(0x144));}return _0x1584df;}function parseOverrideValue(_0x93b37d){const _0xf15f6a=_0x5fcee1,_0xbd06f4={'aCjtz':function(_0x4fc3b8,_0x20974a){return _0x4fc3b8===_0x20974a;},'KvFuf':'false','WIQJd':function(_0x3fe19b,_0x406d98){return _0x3fe19b===_0x406d98;},'WEOZC':'null','SoFoT':_0xf15f6a(0x11d)};if(_0xbd06f4[_0xf15f6a(0x130)](_0x93b37d,_0xf15f6a(0x11e)))return!![];if(_0x93b37d===_0xbd06f4[_0xf15f6a(0x12f)])return![];if(_0xbd06f4[_0xf15f6a(0x152)](_0x93b37d,_0xbd06f4['WEOZC']))return null;if(_0x93b37d===_0xbd06f4['SoFoT'])return undefined;if(/^-?\d+$/['test'](_0x93b37d)){const _0x1bae3b=Number(_0x93b37d);if(Number[_0xf15f6a(0x12a)](_0x1bae3b))return _0x1bae3b;}if(/^-?\d+\.\d+$/[_0xf15f6a(0x140)](_0x93b37d)){const _0x49e6d3=Number(_0x93b37d);if(!Number[_0xf15f6a(0x11b)](_0x49e6d3))return _0x49e6d3;}const _0x2f46a7=_0x93b37d['trim']();if(_0x2f46a7['startsWith']('{')&&_0x2f46a7[_0xf15f6a(0x13f)]('}')||_0x2f46a7[_0xf15f6a(0x13c)]('[')&&_0x2f46a7['endsWith'](']'))try{return JSON[_0xf15f6a(0x150)](_0x2f46a7);}catch{}return _0x93b37d;}function _0xca7e(_0x2a148b,_0xbc564e){_0x2a148b=_0x2a148b-0x11a;const _0x2dc37d=_0x2dc3();let _0xca7ef2=_0x2dc37d[_0x2a148b];return _0xca7ef2;}async function resolveProfileTarget(_0x45de5e){const _0xff697a=_0x5fcee1,_0xf1728a={'tIPnQ':function(_0xa1c96c,_0xc98273){return _0xa1c96c(_0xc98273);},'PdebS':_0xff697a(0x121)},_0x3b5e9f=existsSync(getEnvDir(_0x45de5e));let _0x47c3ab=![];try{const _0x537bed=await fetchCloudProfile(_0x45de5e);_0x47c3ab=_0xf1728a[_0xff697a(0x126)](Boolean,_0x537bed);}catch{}if(_0x47c3ab)return{'kind':_0xff697a(0x138),'alsoExistsElsewhere':_0x3b5e9f};if(_0x3b5e9f)return{'kind':_0xf1728a['PdebS'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x45de5e+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x45de5e);}function printDualExistsHint(_0x56b8ad){const _0x1862b9=_0x5fcee1;console['log'](_0x1862b9(0x145)+_0x56b8ad+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x4defd8){const _0x244d17=_0x5fcee1,_0x5cc003={'XGnJs':function(_0x11b005,_0x25b760,_0x1548d7){return _0x11b005(_0x25b760,_0x1548d7);},'VMxnM':function(_0x3eb3b8){return _0x3eb3b8();}},_0x24879a=await fetchCloudProfile(_0x4defd8),_0x2a979a=_0x5cc003[_0x244d17(0x12d)](readProfileOverrides,_0x5cc003[_0x244d17(0x153)](getProjectPath),_0x4defd8);return mergeCloudProfileSettings(_0x24879a?.['settings']??{},_0x2a979a??undefined);}export async function configSet(_0x7f8149,_0x581153,_0x3a16f2){const _0x520342=_0x5fcee1,_0x4f095c={'dxebs':function(_0xb0ef48,_0x83512){return _0xb0ef48===_0x83512;},'GypmG':_0x520342(0x138),'GsfuA':function(_0x4b19ca,_0xfdc5db){return _0x4b19ca(_0xfdc5db);},'yNHKu':function(_0x298092,_0x266ccd,_0x3226c1){return _0x298092(_0x266ccd,_0x3226c1);},'ZQteE':function(_0x15e494){return _0x15e494();}},_0x203f8e=await resolveProfileTarget(_0x7f8149);if(_0x4f095c[_0x520342(0x14f)](_0x203f8e[_0x520342(0x137)],_0x4f095c[_0x520342(0x128)])){if(_0x203f8e[_0x520342(0x13e)])_0x4f095c[_0x520342(0x125)](printDualExistsHint,_0x7f8149);const _0x3968a0=parseOverrideValue(_0x3a16f2);setProfileOverride(getProjectPath(),_0x7f8149,_0x581153,_0x3968a0),console['log']('Set\x20'+_0x581153+_0x520342(0x13b)+JSON['stringify'](_0x3968a0)+'\x20for\x20\x22'+_0x7f8149+'\x22');return;}const _0x20e5b7=_0x4f095c['yNHKu'](parseLocalValue,_0x581153,_0x3a16f2);setProfileOverride(_0x4f095c['ZQteE'](getProjectPath),_0x7f8149,_0x581153,_0x20e5b7),console[_0x520342(0x120)](_0x520342(0x151)+_0x581153+_0x520342(0x13b)+_0x20e5b7+_0x520342(0x127)+_0x7f8149+'\x22');}export async function configGet(_0x5f268a,_0x1af1b3){const _0x1bf25c=_0x5fcee1,_0x6e3e={'ndXir':function(_0x50c356,_0xbc8a16){return _0x50c356===_0xbc8a16;},'rwWcR':'cloud','zNmaO':function(_0x11b6ce,_0x5e1dc7){return _0x11b6ce===_0x5e1dc7;},'PxFDK':_0x1bf25c(0x149),'KwYoz':function(_0x1abf7c,_0x4174db){return _0x1abf7c===_0x4174db;}},_0x2ec4c9=await resolveProfileTarget(_0x5f268a);if(_0x6e3e['ndXir'](_0x2ec4c9[_0x1bf25c(0x137)],_0x6e3e[_0x1bf25c(0x135)])){const _0x316218=await loadEffectiveCloudSettings(_0x5f268a),_0x1504ed=getNestedValue(_0x316218,_0x1af1b3);if(_0x1504ed===undefined)console[_0x1bf25c(0x120)]('(not\x20set)');else _0x6e3e[_0x1bf25c(0x154)](typeof _0x1504ed,_0x6e3e[_0x1bf25c(0x146)])?console[_0x1bf25c(0x120)](JSON[_0x1bf25c(0x129)](_0x1504ed,null,0x2)):console['log'](_0x1504ed);return;}const _0x442118=await loadSettings(_0x5f268a),_0x2ed332=getNestedValue(_0x442118,_0x1af1b3);if(_0x2ed332===undefined)console['log']('(not\x20set)');else _0x6e3e['KwYoz'](typeof _0x2ed332,_0x1bf25c(0x149))?console[_0x1bf25c(0x120)](JSON[_0x1bf25c(0x129)](_0x2ed332,null,0x2)):console['log'](_0x2ed332);}export async function configList(_0x40d435){const _0x40c4ce=_0x5fcee1,_0x2d6607={'niAUn':function(_0x4c0577,_0x380966){return _0x4c0577(_0x380966);},'HHMTi':function(_0x57d5a3,_0x433850){return _0x57d5a3(_0x433850);},'ySCnA':function(_0x7e89b9,_0x1bd65d){return _0x7e89b9===_0x1bd65d;},'SurGK':function(_0x432f4f,_0x4f8f25){return _0x432f4f(_0x4f8f25);}},_0x340b4e=await _0x2d6607[_0x40c4ce(0x123)](resolveProfileTarget,_0x40d435);if(_0x340b4e[_0x40c4ce(0x137)]===_0x40c4ce(0x138)){const _0x3b2f5a=await _0x2d6607[_0x40c4ce(0x13a)](loadEffectiveCloudSettings,_0x40d435);if(!_0x3b2f5a||_0x2d6607['ySCnA'](Object['keys'](_0x3b2f5a)[_0x40c4ce(0x11c)],0x0)){console[_0x40c4ce(0x120)](_0x40c4ce(0x14d)+_0x40d435+'\x22');return;}console[_0x40c4ce(0x120)](JSON['stringify'](_0x3b2f5a,null,0x2));return;}const _0xd33134=_0x2d6607['SurGK'](getSettingsPath,_0x40d435);if(!existsSync(_0xd33134)){console[_0x40c4ce(0x120)](_0x40c4ce(0x14d)+_0x40d435+'\x22');return;}const _0x1ad88d=await loadSettings(_0x40d435),_0x88934c=formatSettings(_0x1ad88d);!_0x88934c?console['log'](_0x40c4ce(0x14d)+_0x40d435+'\x22'):console[_0x40c4ce(0x120)](_0x88934c);}export async function configUnset(_0x19cb05,_0x4a330e){const _0x5b87e1=_0x5fcee1,_0x21eb61={'ggEEg':function(_0x1067f7,_0xb6da65){return _0x1067f7(_0xb6da65);},'xFpwd':function(_0x198701){return _0x198701();},'rwYZI':function(_0x3181af){return _0x3181af();},'OcdYF':function(_0x526d6f,_0x3a55e5){return _0x526d6f(_0x3a55e5);},'VIYiw':function(_0x173a23,_0x1a0d4e,_0x30d28){return _0x173a23(_0x1a0d4e,_0x30d28);}},_0x22284c=await _0x21eb61[_0x5b87e1(0x122)](resolveProfileTarget,_0x19cb05);if(_0x22284c['kind']===_0x5b87e1(0x138)){if(_0x22284c['alsoExistsElsewhere'])printDualExistsHint(_0x19cb05);const _0x3241f8=unsetProfileOverride(_0x21eb61['xFpwd'](getProjectPath),_0x19cb05,_0x4a330e);_0x3241f8?console[_0x5b87e1(0x120)](_0x5b87e1(0x14e)+_0x4a330e+'\x20for\x20\x22'+_0x19cb05+'\x22'):console['log'](_0x5b87e1(0x136)+_0x4a330e+_0x5b87e1(0x11f));return;}const _0x442825=unsetProfileOverride(_0x21eb61[_0x5b87e1(0x14b)](getProjectPath),_0x19cb05,_0x4a330e);if(_0x442825){console['log'](_0x5b87e1(0x14e)+_0x4a330e);return;}const _0x1740d7=await _0x21eb61[_0x5b87e1(0x11a)](loadSettings,_0x19cb05),_0x224388=_0x21eb61['VIYiw'](deleteNestedValue,_0x1740d7,_0x4a330e);_0x224388?console[_0x5b87e1(0x120)]('Key\x20\x22'+_0x4a330e+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x19cb05+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x5b87e1(0x120)]('Key\x20\x22'+_0x4a330e+_0x5b87e1(0x11f));}export async function configReset(_0x1d7c2c){const _0x2bf5be=_0x5fcee1,_0x320a1b=await resolveProfileTarget(_0x1d7c2c);if(_0x320a1b['kind']===_0x2bf5be(0x138)){resetProfileOverrides(getProjectPath(),_0x1d7c2c),console[_0x2bf5be(0x120)](_0x2bf5be(0x14a)+_0x1d7c2c+'\x22');return;}console[_0x2bf5be(0x120)]('\x22'+_0x1d7c2c+_0x2bf5be(0x133)+_0x1d7c2c+_0x2bf5be(0x12c));}function _0x2dc3(){const _0x40c6b8=['undefined','true','\x22\x20not\x20found','log','local','ggEEg','niAUn','565660EbwXaY','GsfuA','tIPnQ','\x20for\x20\x22','GypmG','stringify','isSafeInteger','685767yMlfpE','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','XGnJs','includes','KvFuf','aCjtz','4NYpWRu','allowInsecureLocalhost','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','234IwoUCA','rwWcR','Key\x20\x22','kind','cloud','forceLogin','HHMTi','\x20=\x20','startsWith','407598XlnpWQ','alsoExistsElsewhere','endsWith','test','119jTbulX','757145wlDLrD','headless',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20\x20Note:\x20\x22','PxFDK','3375510lSNNWE','2884608UeeNvo','object','Cleared\x20local\x20overrides\x20for\x20\x22','rwYZI','817984HZBDkj','No\x20configuration\x20set\x20for\x20\x22','Removed\x20','dxebs','parse','Set\x20','WIQJd','VMxnM','zNmaO','OcdYF','isNaN','length'];_0x2dc3=function(){return _0x40c6b8;};return _0x2dc3();}
@@ -1 +1 @@
1
- (function(_0x107546,_0x220a55){const _0x3dfcc1=_0x58f5,_0x1c3da9=_0x107546();while(!![]){try{const _0x1e8f8f=-parseInt(_0x3dfcc1(0x1b8))/0x1*(-parseInt(_0x3dfcc1(0x1b7))/0x2)+-parseInt(_0x3dfcc1(0x1b6))/0x3+-parseInt(_0x3dfcc1(0x1bf))/0x4*(parseInt(_0x3dfcc1(0x1b0))/0x5)+-parseInt(_0x3dfcc1(0x1ba))/0x6*(parseInt(_0x3dfcc1(0x1b1))/0x7)+parseInt(_0x3dfcc1(0x1b3))/0x8+-parseInt(_0x3dfcc1(0x1c1))/0x9*(-parseInt(_0x3dfcc1(0x1b9))/0xa)+parseInt(_0x3dfcc1(0x1b4))/0xb*(parseInt(_0x3dfcc1(0x1c5))/0xc);if(_0x1e8f8f===_0x220a55)break;else _0x1c3da9['push'](_0x1c3da9['shift']());}catch(_0x1339e5){_0x1c3da9['push'](_0x1c3da9['shift']());}}}(_0x373c,0x65bb1));function _0x58f5(_0x56eb59,_0x41f8f7){_0x56eb59=_0x56eb59-0x1af;const _0x373c59=_0x373c();let _0x58f579=_0x373c59[_0x56eb59];return _0x58f579;}function _0x373c(){const _0x8c5677=['✓\x20Deleted\x20cloud\x20profile\x20\x22','\x22\x20for\x20everyone\x20in\x20your\x20organization.','input','prompt','13996rvhccO','\x22\x20to\x20confirm\x20deletion:','855VdgmMk','bxIIC','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','12iStMhr','cwd','1090OKvGHV','3604202JsxfrZ','ogrxQ','1045600WJFlSO','14301936vEUcdZ','confirmation','1067424qMTrFD','48gBtOEi','4306gGYQKz','54310Vdzaqi','6EhLFRF'];_0x373c=function(){return _0x8c5677;};return _0x373c();}import _0x300061 from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x53e380,_0xb6af93={}){const _0x4d1e64=_0x58f5,_0x3b211f={'bxIIC':_0x4d1e64(0x1bd),'ogrxQ':function(_0xb8b517,_0x31d625,_0x1f1547){return _0xb8b517(_0x31d625,_0x1f1547);}},_0x47e189=await fetchCloudProfile(_0x53e380);if(!_0x47e189)throw new Error('Cloud\x20profile\x20\x22'+_0x53e380+'\x22\x20not\x20found.');if(!_0xb6af93['yes']&&!isInteractive())throw new Error('Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.');console['log'](_0x4d1e64(0x1c4)+_0x53e380+_0x4d1e64(0x1bc));if(!_0xb6af93['yes']){const {confirmation:_0x3d1c5d}=await _0x300061[_0x4d1e64(0x1be)]([{'type':_0x3b211f[_0x4d1e64(0x1c2)],'name':_0x4d1e64(0x1b5),'message':'Type\x20\x22'+_0x53e380+_0x4d1e64(0x1c0)}]);if(_0x3d1c5d!==_0x53e380)throw new Error(_0x4d1e64(0x1c3));}await deleteCloudProfile(_0x53e380),resetProfileOverrides(process[_0x4d1e64(0x1af)](),_0x53e380),_0x3b211f[_0x4d1e64(0x1b2)](clearLastProfile,process[_0x4d1e64(0x1af)](),_0x53e380),console['log'](_0x4d1e64(0x1bb)+_0x53e380+'\x22.');}
1
+ (function(_0x1dcf8a,_0x3b5a56){const _0x3c6827=_0x4525,_0x56e907=_0x1dcf8a();while(!![]){try{const _0x3c8cf0=-parseInt(_0x3c6827(0x1ac))/0x1+parseInt(_0x3c6827(0x19d))/0x2*(parseInt(_0x3c6827(0x19c))/0x3)+parseInt(_0x3c6827(0x1ab))/0x4+-parseInt(_0x3c6827(0x19a))/0x5+-parseInt(_0x3c6827(0x1a8))/0x6*(-parseInt(_0x3c6827(0x1a6))/0x7)+-parseInt(_0x3c6827(0x19f))/0x8*(-parseInt(_0x3c6827(0x1a9))/0x9)+parseInt(_0x3c6827(0x1a1))/0xa;if(_0x3c8cf0===_0x3b5a56)break;else _0x56e907['push'](_0x56e907['shift']());}catch(_0x2b0cc3){_0x56e907['push'](_0x56e907['shift']());}}}(_0x5f03,0x56309));function _0x5f03(){const _0x9f849c=['rzFMx','2720485yHWLvM','\x22\x20to\x20confirm\x20deletion:','36swSVXK','188URghEz','MUQtY','8IzoLRl','input','8465380qNzZXM','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','confirmation','Type\x20\x22','✓\x20Deleted\x20cloud\x20profile\x20\x22','1696499bJcQVX','cwd','6ZOKVEz','1654281aEovwX','log','241516GOOEbO','437081AGjvKv','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.'];_0x5f03=function(){return _0x9f849c;};return _0x5f03();}import _0x8fa8c7 from'inquirer';function _0x4525(_0x45c996,_0x222f2b){_0x45c996=_0x45c996-0x199;const _0x5f03d7=_0x5f03();let _0x4525ad=_0x5f03d7[_0x45c996];return _0x4525ad;}import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';export async function deleteProfile(_0x509747,_0x1919aa={}){const _0x2819f6=_0x4525,_0x4b3e3a={'cFyZV':function(_0x52c6d2,_0xb60fd1){return _0x52c6d2(_0xb60fd1);},'MUQtY':_0x2819f6(0x1ad),'EvSmh':_0x2819f6(0x1a0),'PETJs':_0x2819f6(0x1a3),'qcoVw':function(_0x301749,_0x2e11e6){return _0x301749!==_0x2e11e6;},'DlkXL':function(_0xbaad53,_0x1729b3){return _0xbaad53(_0x1729b3);},'rzFMx':function(_0x3a5b63,_0x2523b4,_0x17b133){return _0x3a5b63(_0x2523b4,_0x17b133);}},_0x2fd623=await _0x4b3e3a['cFyZV'](fetchCloudProfile,_0x509747);if(!_0x2fd623)throw new Error('Cloud\x20profile\x20\x22'+_0x509747+'\x22\x20not\x20found.');if(!_0x1919aa['yes']&&!isInteractive())throw new Error(_0x4b3e3a[_0x2819f6(0x19e)]);console[_0x2819f6(0x1aa)]('\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22'+_0x509747+'\x22\x20for\x20everyone\x20in\x20your\x20organization.');if(!_0x1919aa['yes']){const {confirmation:_0x158799}=await _0x8fa8c7['prompt']([{'type':_0x4b3e3a['EvSmh'],'name':_0x4b3e3a['PETJs'],'message':_0x2819f6(0x1a4)+_0x509747+_0x2819f6(0x19b)}]);if(_0x4b3e3a['qcoVw'](_0x158799,_0x509747))throw new Error(_0x2819f6(0x1a2));}await _0x4b3e3a['DlkXL'](deleteCloudProfile,_0x509747),_0x4b3e3a[_0x2819f6(0x199)](resetProfileOverrides,process[_0x2819f6(0x1a7)](),_0x509747),clearLastProfile(process['cwd'](),_0x509747),console[_0x2819f6(0x1aa)](_0x2819f6(0x1a5)+_0x509747+'\x22.');}
@@ -1 +1 @@
1
- function _0x2ddc(_0x5368e1,_0x2cb108){_0x5368e1=_0x5368e1-0x7a;const _0x1ff73c=_0x1ff7();let _0x2ddc54=_0x1ff73c[_0x5368e1];return _0x2ddc54;}(function(_0x5c9586,_0x5120ac){const _0x251dbf=_0x2ddc,_0x58f4f3=_0x5c9586();while(!![]){try{const _0x128fb8=-parseInt(_0x251dbf(0x8c))/0x1*(parseInt(_0x251dbf(0x8d))/0x2)+parseInt(_0x251dbf(0xa1))/0x3*(-parseInt(_0x251dbf(0x89))/0x4)+-parseInt(_0x251dbf(0x8b))/0x5+-parseInt(_0x251dbf(0x9c))/0x6+parseInt(_0x251dbf(0x7b))/0x7+-parseInt(_0x251dbf(0x82))/0x8*(-parseInt(_0x251dbf(0x98))/0x9)+-parseInt(_0x251dbf(0x93))/0xa*(-parseInt(_0x251dbf(0x9f))/0xb);if(_0x128fb8===_0x5120ac)break;else _0x58f4f3['push'](_0x58f4f3['shift']());}catch(_0xa81dd1){_0x58f4f3['push'](_0x58f4f3['shift']());}}}(_0x1ff7,0xb4364));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';function _0x1ff7(){const _0x34f9d7=['profiles','60RdCTKY','baseUrl','4729580lMPFqY','934608gAvxmD','2BwCiec','isDirectory','sort','\x20\x20\x20\x20','bHFde','log','34939310TFcUZB','HDTkF','environmentDetails','\x0a*\x20=\x20active\x20profile','startsWith','17631sJTCyP','includes','Klkuf','\x0a\x20\x20','3347166IHMTNq','keys','IKoJm','11apjGou','hhHhd','231393kxGcck','\x0aCloud\x20Profiles\x20(by\x20environment):','myxlN','jNdWU','length','push','name','\x0aNo\x20profiles\x20found.','szxhk','1447670TTVrEC','NBDDY','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','\x20\x20\x20\x20\x20\x20Details:\x20','kitKT','nbukp','environmentKey','2584XbDjtT','jGZlB','lPFeM','no\x20session','\x20\x20\x20\x20\x20\x20URL:\x20','cached\x20(updated\x20'];_0x1ff7=function(){return _0x34f9d7;};return _0x1ff7();}import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes','reports','local','ci'];export function shouldGroupByEnvironment(_0x485b6f){const _0x7b88f7=_0x2ddc;return _0x485b6f['some'](_0x527332=>_0x527332[_0x7b88f7(0x81)]);}export function groupCloudProfilesByEnvironment(_0x5bac20){const _0x41931b=_0x2ddc,_0x27cff8=new Map();for(const _0x2de41a of _0x5bac20){const _0x100d32=_0x2de41a[_0x41931b(0x81)]??null,_0x5afa19=_0x27cff8['get'](_0x100d32);if(_0x5afa19)_0x5afa19[_0x41931b(0xa6)](_0x2de41a);else _0x27cff8['set'](_0x100d32,[_0x2de41a]);}const _0x2f14b4=[..._0x27cff8[_0x41931b(0x9d)]()]['sort']((_0x358513,_0x1be5d7)=>{if(_0x358513===null)return 0x1;if(_0x1be5d7===null)return-0x1;return _0x358513['localeCompare'](_0x1be5d7);});return _0x2f14b4['map'](_0x258b66=>({'environmentKey':_0x258b66,'profiles':_0x27cff8['get'](_0x258b66)['sort']((_0x33351e,_0x25a7b4)=>_0x33351e[_0x41931b(0xa7)]['localeCompare'](_0x25a7b4['name']))}));}export async function getEnvNames(){const _0x53c74e=_0x2ddc,_0x1ae0a7={'jNdWU':function(_0x2f02cd,_0x32d318){return _0x2f02cd(_0x32d318);},'xFKoG':function(_0x5450a9){return _0x5450a9();},'oeNTZ':function(_0x3ded54,_0x188d0c,_0x94e058){return _0x3ded54(_0x188d0c,_0x94e058);},'kitKT':'local','szxhk':function(_0x5afba2,_0x3f9113){return _0x5afba2(_0x3f9113);},'azicd':function(_0x390b4a,_0x32c0ae,_0x214089){return _0x390b4a(_0x32c0ae,_0x214089);},'hhHhd':function(_0x2321ed,_0x4c1871){return _0x2321ed(_0x4c1871);},'NBDDY':'.txt','cJfLV':function(_0x27a40f,_0x39414e){return _0x27a40f(_0x39414e);},'jGZlB':'settings.json','myxlN':'legacy'},_0x5e149b=getRangerDir();if(!_0x1ae0a7[_0x53c74e(0xa4)](existsSync,_0x5e149b))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x44237f=await _0x1ae0a7['xFKoG'](readActiveProfileName),_0x8fa66c=[],_0x2c26ab={},_0x58eb87=_0x1ae0a7['oeNTZ'](join,_0x5e149b,_0x1ae0a7[_0x53c74e(0x7f)]);if(_0x1ae0a7[_0x53c74e(0x7a)](existsSync,_0x58eb87)){const _0x4360f6=await readdir(_0x58eb87);for(const _0x1db65a of _0x4360f6){const _0x247a9d=join(_0x58eb87,_0x1db65a),_0x285ab7=await _0x1ae0a7[_0x53c74e(0xa4)](stat,_0x247a9d);_0x285ab7['isDirectory']()&&(_0x8fa66c[_0x53c74e(0xa6)](_0x1db65a),_0x2c26ab[_0x1db65a]=_0x1ae0a7['kitKT']);}}const _0x115034=_0x1ae0a7['azicd'](join,_0x5e149b,'ci');if(existsSync(_0x115034)){const _0x4dba0b=await _0x1ae0a7[_0x53c74e(0xa0)](readdir,_0x115034);for(const _0x4b6460 of _0x4dba0b){const _0xb53b9f=join(_0x115034,_0x4b6460),_0x2feab6=await stat(_0xb53b9f);_0x2feab6[_0x53c74e(0x8e)]()&&(_0x8fa66c[_0x53c74e(0xa6)](_0x4b6460),_0x2c26ab[_0x4b6460]='ci');}}const _0x1f9f71=await readdir(_0x5e149b);for(const _0x2bdbd7 of _0x1f9f71){if(NON_ENV_DIRS[_0x53c74e(0x99)](_0x2bdbd7))continue;if(_0x2bdbd7[_0x53c74e(0x97)]('.'))continue;if(_0x2bdbd7['endsWith'](_0x1ae0a7[_0x53c74e(0x7c)]))continue;const _0x5dd0de=join(_0x5e149b,_0x2bdbd7),_0xb2979b=await stat(_0x5dd0de);_0xb2979b[_0x53c74e(0x8e)]()&&_0x1ae0a7['cJfLV'](existsSync,join(_0x5dd0de,_0x1ae0a7[_0x53c74e(0x83)]))&&(!_0x8fa66c[_0x53c74e(0x99)](_0x2bdbd7)&&(_0x8fa66c[_0x53c74e(0xa6)](_0x2bdbd7),_0x2c26ab[_0x2bdbd7]=_0x1ae0a7[_0x53c74e(0xa3)]));}return{'envNames':_0x8fa66c,'activeEnv':_0x44237f,'envTypes':_0x2c26ab};}export async function envList(){const _0xbadbb2=_0x2ddc,_0x11c395={'yNtAj':function(_0x14c150,_0x455a45){return _0x14c150===_0x455a45;},'hYYVi':_0xbadbb2(0x85),'ipzFd':function(_0x197f5d,_0x4b0765){return _0x197f5d instanceof _0x4b0765;},'lPFeM':function(_0x31434c,_0x364e06){return _0x31434c(_0x364e06);},'dZnlJ':function(_0x1009d0,_0x1be052){return _0x1009d0===_0x1be052;},'CDYsw':_0xbadbb2(0xa8),'lrIwx':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','iUStG':'\x0aLocal\x20Profiles\x20(legacy):','IKoJm':'local','bHFde':function(_0x25c347,_0x32bcba){return _0x25c347>_0x32bcba;},'HDTkF':'(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','nbukp':function(_0x54a045,_0x32ee11,_0x53815a){return _0x54a045(_0x32ee11,_0x53815a);},'RFhpE':'\x0aCloud\x20Profiles:','Klkuf':function(_0x4323ff,_0x3866a9,_0x54002f){return _0x4323ff(_0x3866a9,_0x54002f);}},{envNames:_0x4e93bb,activeEnv:_0x5151f5,envTypes:_0x357f72}=await getEnvNames();let _0x6be061=[];const _0x5161ce=await getToken();if(_0x5161ce)try{_0x6be061=await listCloudProfiles();}catch(_0x4bdf8e){console['error'](_0xbadbb2(0x7d)+(_0x11c395['ipzFd'](_0x4bdf8e,Error)?_0x4bdf8e['message']:_0x11c395[_0xbadbb2(0x84)](String,_0x4bdf8e)));}if(_0x11c395['yNtAj'](_0x4e93bb['length'],0x0)&&_0x11c395['dZnlJ'](_0x6be061[_0xbadbb2(0xa5)],0x0)){console['log'](_0x11c395['CDYsw']),console['log'](_0x11c395['lrIwx']);return;}const _0x38c53e=new Set(_0x6be061['map'](_0x3cc644=>_0x3cc644['name']));if(_0x4e93bb[_0xbadbb2(0xa5)]>0x0){console[_0xbadbb2(0x92)](_0x11c395['iUStG']);for(const _0x51bf93 of _0x4e93bb[_0xbadbb2(0x8f)]()){const _0x3b25e3=_0x11c395['dZnlJ'](_0x51bf93,_0x5151f5)&&!_0x38c53e['has'](_0x51bf93),_0x342602=_0x357f72[_0x51bf93]||_0x11c395[_0xbadbb2(0x9e)],_0x1a2d26=await loadSettings(_0x51bf93),_0x59efae=_0x342602==='legacy'?'':'\x20['+_0x342602+']';console[_0xbadbb2(0x92)]('\x20\x20'+(_0x3b25e3?'*\x20':'\x20\x20')+_0x51bf93+_0x59efae),_0x1a2d26[_0xbadbb2(0x8a)]&&console['log'](_0xbadbb2(0x86)+_0x1a2d26[_0xbadbb2(0x8a)]),_0x1a2d26['environmentDetails']&&console[_0xbadbb2(0x92)](_0xbadbb2(0x7e)+_0x1a2d26[_0xbadbb2(0x95)]);}}const _0x5bb50f=(_0x4ad674,_0x1eb1cd)=>{const _0x4f4381=_0xbadbb2,_0x2c1e44=_0x11c395['yNtAj'](_0x4ad674['name'],_0x5151f5),_0x32ab35=_0x4ad674['sessionUpdatedAt']?_0x4f4381(0x87)+_0x4ad674['sessionUpdatedAt']+')':_0x11c395['hYYVi'];console['log'](''+_0x1eb1cd+(_0x2c1e44?'*\x20':'\x20\x20')+_0x4ad674[_0x4f4381(0xa7)]),console['log'](_0x1eb1cd+'\x20\x20\x20\x20Session:\x20'+_0x32ab35);};if(_0x11c395[_0xbadbb2(0x91)](_0x6be061['length'],0x0)){if(shouldGroupByEnvironment(_0x6be061)){console['log'](_0xbadbb2(0xa2));for(const _0xd9286a of groupCloudProfilesByEnvironment(_0x6be061)){const _0x36abb6=_0xd9286a['environmentKey']??_0x11c395[_0xbadbb2(0x94)];console[_0xbadbb2(0x92)](_0xbadbb2(0x9b)+_0x36abb6);for(const _0x46bdd8 of _0xd9286a[_0xbadbb2(0x88)]){_0x11c395[_0xbadbb2(0x80)](_0x5bb50f,_0x46bdd8,_0xbadbb2(0x90));}}}else{console[_0xbadbb2(0x92)](_0x11c395['RFhpE']);for(const _0xec0b88 of[..._0x6be061][_0xbadbb2(0x8f)]((_0x49615f,_0x2f3bb1)=>_0x49615f['name']['localeCompare'](_0x2f3bb1[_0xbadbb2(0xa7)]))){_0x11c395[_0xbadbb2(0x9a)](_0x5bb50f,_0xec0b88,'\x20\x20');}}}_0x5151f5&&console[_0xbadbb2(0x92)](_0xbadbb2(0x96));}
1
+ const _0x572e6a=_0x1d01;(function(_0x176097,_0x862f2a){const _0x4f43c7=_0x1d01,_0x5e2e30=_0x176097();while(!![]){try{const _0x6f530e=-parseInt(_0x4f43c7(0x20e))/0x1+parseInt(_0x4f43c7(0x1fb))/0x2*(-parseInt(_0x4f43c7(0x1f6))/0x3)+-parseInt(_0x4f43c7(0x205))/0x4*(parseInt(_0x4f43c7(0x21f))/0x5)+-parseInt(_0x4f43c7(0x211))/0x6+-parseInt(_0x4f43c7(0x1f7))/0x7*(parseInt(_0x4f43c7(0x1f1))/0x8)+parseInt(_0x4f43c7(0x21e))/0x9+parseInt(_0x4f43c7(0x220))/0xa;if(_0x6f530e===_0x862f2a)break;else _0x5e2e30['push'](_0x5e2e30['shift']());}catch(_0x2131b5){_0x5e2e30['push'](_0x5e2e30['shift']());}}}(_0xc0ab,0x68089));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0xc0ab(){const _0x48211d=['244806uEmvCj','70343zbDDEu','includes','legacy','(no\x20environment\x20—\x20manual\x20or\x20no\x20auth)','14tjtFgD','jCUDV','message','wLyUP','sessionUpdatedAt','local','.txt','isDirectory','endsWith','okszY','4gQeMhh','\x0aCloud\x20Profiles\x20(by\x20environment):','AgrFF','reports','\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20','\x20\x20\x20\x20\x20\x20Details:\x20','ydTJO','push','\x20\x20\x20\x20\x20\x20URL:\x20','707466IIgsbx','SXVdl','BOfWA','1945404yKKhIR','posmk','log','localeCompare','name','VmDuR','\x0a\x20\x20','jkGIV','\x0aCloud\x20Profiles:','\x0a*\x20=\x20active\x20profile','yukeH','\x0aLocal\x20Profiles\x20(legacy):','dvlmv','5384403BqerwK','2674255PUExbF','23173340klXDsT','get','cached\x20(updated\x20','some','Maduo','environmentKey','length','bnLgC','\x20\x20\x20\x20','280gmHxEA','ecHzK','sort','WGOKa','baseUrl'];_0xc0ab=function(){return _0x48211d;};return _0xc0ab();}import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions','bug-bashes',_0x572e6a(0x208),'local','ci'];function _0x1d01(_0x1ea063,_0x47b499){_0x1ea063=_0x1ea063-0x1f1;const _0xc0ab4c=_0xc0ab();let _0x1d011a=_0xc0ab4c[_0x1ea063];return _0x1d011a;}export function shouldGroupByEnvironment(_0x1424f4){const _0x1f6362=_0x572e6a;return _0x1424f4[_0x1f6362(0x223)](_0xd111cc=>_0xd111cc[_0x1f6362(0x225)]);}export function groupCloudProfilesByEnvironment(_0x3ff274){const _0x1f84eb=_0x572e6a,_0x3b473b={'yukeH':function(_0x5068ac,_0x151d7f){return _0x5068ac===_0x151d7f;}},_0x2e7772=new Map();for(const _0x2b52ac of _0x3ff274){const _0x3789dc=_0x2b52ac[_0x1f84eb(0x225)]??null,_0x5ae02d=_0x2e7772[_0x1f84eb(0x221)](_0x3789dc);if(_0x5ae02d)_0x5ae02d[_0x1f84eb(0x20c)](_0x2b52ac);else _0x2e7772['set'](_0x3789dc,[_0x2b52ac]);}const _0x324e1a=[..._0x2e7772['keys']()]['sort']((_0x24cb11,_0x50924a)=>{const _0x2f4218=_0x1f84eb;if(_0x3b473b['yukeH'](_0x24cb11,null))return 0x1;if(_0x3b473b[_0x2f4218(0x21b)](_0x50924a,null))return-0x1;return _0x24cb11[_0x2f4218(0x214)](_0x50924a);});return _0x324e1a['map'](_0x53b2d9=>({'environmentKey':_0x53b2d9,'profiles':_0x2e7772['get'](_0x53b2d9)['sort']((_0x241724,_0x10d303)=>_0x241724[_0x1f84eb(0x215)][_0x1f84eb(0x214)](_0x10d303['name']))}));}export async function getEnvNames(){const _0x599bca=_0x572e6a,_0x403529={'okszY':function(_0x23ae06){return _0x23ae06();},'jCUDV':function(_0x5291fd,_0x2872c0){return _0x5291fd(_0x2872c0);},'wLyUP':function(_0x21aa2c){return _0x21aa2c();},'dvlmv':function(_0x528205,_0x2eb545,_0x38a6f3){return _0x528205(_0x2eb545,_0x38a6f3);},'AgrFF':_0x599bca(0x200),'ecHzK':function(_0x4a0dbb,_0x2dcde9,_0x592a13){return _0x4a0dbb(_0x2dcde9,_0x592a13);},'hCoEv':_0x599bca(0x201),'ydTJO':function(_0x1c219f,_0x439d4e){return _0x1c219f(_0x439d4e);},'BOfWA':function(_0x3b9241,_0x11ffa3){return _0x3b9241(_0x11ffa3);},'VvsYB':'legacy'},_0x383d9d=_0x403529[_0x599bca(0x204)](getRangerDir);if(!_0x403529[_0x599bca(0x1fc)](existsSync,_0x383d9d))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x592021=await _0x403529[_0x599bca(0x1fe)](readActiveProfileName),_0x5646f5=[],_0x2fff86={},_0x4d8f1f=_0x403529[_0x599bca(0x21d)](join,_0x383d9d,_0x403529[_0x599bca(0x207)]);if(_0x403529['jCUDV'](existsSync,_0x4d8f1f)){const _0x2458da=await readdir(_0x4d8f1f);for(const _0x4ca5c3 of _0x2458da){const _0x420082=_0x403529[_0x599bca(0x1f2)](join,_0x4d8f1f,_0x4ca5c3),_0x501184=await _0x403529['jCUDV'](stat,_0x420082);_0x501184[_0x599bca(0x202)]()&&(_0x5646f5[_0x599bca(0x20c)](_0x4ca5c3),_0x2fff86[_0x4ca5c3]=_0x403529['AgrFF']);}}const _0x4c6686=_0x403529['dvlmv'](join,_0x383d9d,'ci');if(_0x403529[_0x599bca(0x1fc)](existsSync,_0x4c6686)){const _0x23dd8e=await readdir(_0x4c6686);for(const _0x38f111 of _0x23dd8e){const _0xfe8de2=join(_0x4c6686,_0x38f111),_0xcaaea7=await stat(_0xfe8de2);_0xcaaea7[_0x599bca(0x202)]()&&(_0x5646f5[_0x599bca(0x20c)](_0x38f111),_0x2fff86[_0x38f111]='ci');}}const _0x4ebb3f=await readdir(_0x383d9d);for(const _0x4936bc of _0x4ebb3f){if(NON_ENV_DIRS['includes'](_0x4936bc))continue;if(_0x4936bc['startsWith']('.'))continue;if(_0x4936bc[_0x599bca(0x203)](_0x403529['hCoEv']))continue;const _0x46410b=join(_0x383d9d,_0x4936bc),_0x3d65cb=await _0x403529[_0x599bca(0x20b)](stat,_0x46410b);_0x3d65cb[_0x599bca(0x202)]()&&_0x403529[_0x599bca(0x210)](existsSync,join(_0x46410b,'settings.json'))&&(!_0x5646f5[_0x599bca(0x1f8)](_0x4936bc)&&(_0x5646f5[_0x599bca(0x20c)](_0x4936bc),_0x2fff86[_0x4936bc]=_0x403529['VvsYB']));}return{'envNames':_0x5646f5,'activeEnv':_0x592021,'envTypes':_0x2fff86};}export async function envList(){const _0x2ce25d=_0x572e6a,_0x390c29={'SXVdl':function(_0x3902fc,_0x4851cf){return _0x3902fc===_0x4851cf;},'VclcH':'no\x20session','auzUz':function(_0x3b2179){return _0x3b2179();},'DxMJz':function(_0x2f75e2,_0x2db2ae){return _0x2f75e2 instanceof _0x2db2ae;},'VmDuR':function(_0x9f639,_0x49a972){return _0x9f639===_0x49a972;},'YbVpf':'\x0aNo\x20profiles\x20found.','TxbPx':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','WGOKa':_0x2ce25d(0x21c),'jKmhT':function(_0x81abf3,_0x170e20){return _0x81abf3(_0x170e20);},'jkGIV':_0x2ce25d(0x1f9),'Maduo':_0x2ce25d(0x206),'bnLgC':_0x2ce25d(0x1fa),'NYomo':function(_0xf903e9,_0x577706,_0x4fff5b){return _0xf903e9(_0x577706,_0x4fff5b);},'posmk':_0x2ce25d(0x228)},{envNames:_0x3e593c,activeEnv:_0x12e882,envTypes:_0x194ee0}=await getEnvNames();let _0x60c531=[];const _0x3fbaef=await getToken();if(_0x3fbaef)try{_0x60c531=await _0x390c29['auzUz'](listCloudProfiles);}catch(_0x302f76){console['error'](_0x2ce25d(0x209)+(_0x390c29['DxMJz'](_0x302f76,Error)?_0x302f76[_0x2ce25d(0x1fd)]:String(_0x302f76)));}if(_0x390c29[_0x2ce25d(0x20f)](_0x3e593c['length'],0x0)&&_0x390c29[_0x2ce25d(0x216)](_0x60c531[_0x2ce25d(0x226)],0x0)){console['log'](_0x390c29['YbVpf']),console['log'](_0x390c29['TxbPx']);return;}const _0xeef063=new Set(_0x60c531['map'](_0x88e2d2=>_0x88e2d2[_0x2ce25d(0x215)]));if(_0x3e593c[_0x2ce25d(0x226)]>0x0){console['log'](_0x390c29[_0x2ce25d(0x1f4)]);for(const _0x1a0ee4 of _0x3e593c[_0x2ce25d(0x1f3)]()){const _0xece607=_0x390c29['SXVdl'](_0x1a0ee4,_0x12e882)&&!_0xeef063['has'](_0x1a0ee4),_0x5db79d=_0x194ee0[_0x1a0ee4]||'local',_0x4fa939=await _0x390c29['jKmhT'](loadSettings,_0x1a0ee4),_0x305543=_0x5db79d===_0x390c29[_0x2ce25d(0x218)]?'':'\x20['+_0x5db79d+']';console[_0x2ce25d(0x213)]('\x20\x20'+(_0xece607?'*\x20':'\x20\x20')+_0x1a0ee4+_0x305543),_0x4fa939['baseUrl']&&console['log'](_0x2ce25d(0x20d)+_0x4fa939[_0x2ce25d(0x1f5)]),_0x4fa939['environmentDetails']&&console[_0x2ce25d(0x213)](_0x2ce25d(0x20a)+_0x4fa939['environmentDetails']);}}const _0x51a362=(_0x1b8b72,_0x4dad70)=>{const _0x463c6c=_0x2ce25d,_0x4f11e6=_0x390c29[_0x463c6c(0x20f)](_0x1b8b72['name'],_0x12e882),_0x376f0b=_0x1b8b72[_0x463c6c(0x1ff)]?_0x463c6c(0x222)+_0x1b8b72[_0x463c6c(0x1ff)]+')':_0x390c29['VclcH'];console[_0x463c6c(0x213)](''+_0x4dad70+(_0x4f11e6?'*\x20':'\x20\x20')+_0x1b8b72[_0x463c6c(0x215)]),console[_0x463c6c(0x213)](_0x4dad70+'\x20\x20\x20\x20Session:\x20'+_0x376f0b);};if(_0x60c531[_0x2ce25d(0x226)]>0x0){if(shouldGroupByEnvironment(_0x60c531)){console['log'](_0x390c29[_0x2ce25d(0x224)]);for(const _0x16d5fa of groupCloudProfilesByEnvironment(_0x60c531)){const _0x11e417=_0x16d5fa[_0x2ce25d(0x225)]??_0x390c29[_0x2ce25d(0x227)];console[_0x2ce25d(0x213)](_0x2ce25d(0x217)+_0x11e417);for(const _0x59b32d of _0x16d5fa['profiles']){_0x390c29['NYomo'](_0x51a362,_0x59b32d,_0x390c29[_0x2ce25d(0x212)]);}}}else{console['log'](_0x2ce25d(0x219));for(const _0x3fc78d of[..._0x60c531][_0x2ce25d(0x1f3)]((_0x13f56c,_0x568813)=>_0x13f56c[_0x2ce25d(0x215)][_0x2ce25d(0x214)](_0x568813['name']))){_0x51a362(_0x3fc78d,'\x20\x20');}}}_0x12e882&&console[_0x2ce25d(0x213)](_0x2ce25d(0x21a));}