@ranger-testing/ranger-cli 2.5.4-alpha.f6504c0-8 โ†’ 2.5.4-alpha.f940f0d-18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +36 -14
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -0
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/opencodeConfig.js +1 -1
  58. package/build/commands/utils/playwrightCli.js +1 -1
  59. package/build/commands/utils/profileMessages.js +1 -1
  60. package/build/commands/utils/profileSetupBanner.js +1 -1
  61. package/build/commands/utils/projectsConfig.js +1 -1
  62. package/build/commands/utils/rangerConfig.js +1 -1
  63. package/build/commands/utils/rangerRoot.js +1 -1
  64. package/build/commands/utils/resolveProfileContext.js +1 -1
  65. package/build/commands/utils/resolveProfileUrl.js +1 -1
  66. package/build/commands/utils/retry.js +1 -1
  67. package/build/commands/utils/sessionCache.js +1 -1
  68. package/build/commands/utils/settings.js +1 -1
  69. package/build/commands/utils/skillContent.js +1 -1
  70. package/build/commands/utils/skills.js +1 -1
  71. package/build/commands/utils/stitchWebmFiles.js +1 -1
  72. package/build/commands/utils/telemetry.js +1 -1
  73. package/build/commands/utils/tokenRefresh.js +1 -1
  74. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  75. package/build/commands/utils/userApi.js +1 -1
  76. package/build/commands/utils/version.js +1 -1
  77. package/build/commands/verifyFeature.js +1 -1
  78. package/build/commands/verifyFeatureCli.js +1 -1
  79. package/build/skills/ranger/SKILL.md +24 -8
  80. package/build/skills/ranger/create.md +16 -3
  81. package/build/skills/ranger/verify.md +35 -10
  82. package/package.json +3 -2
@@ -1 +1 @@
1
- (function(_0x59e691,_0xe3d7e8){const _0x364837=_0xd6f0,_0x2c1014=_0x59e691();while(!![]){try{const _0xda118a=parseInt(_0x364837(0x20c))/0x1+-parseInt(_0x364837(0x1c4))/0x2*(-parseInt(_0x364837(0x22d))/0x3)+-parseInt(_0x364837(0x204))/0x4+parseInt(_0x364837(0x201))/0x5+-parseInt(_0x364837(0x1ca))/0x6+parseInt(_0x364837(0x1ce))/0x7+-parseInt(_0x364837(0x1c2))/0x8;if(_0xda118a===_0xe3d7e8)break;else _0x2c1014['push'](_0x2c1014['shift']());}catch(_0x18598b){_0x2c1014['push'](_0x2c1014['shift']());}}}(_0x5c4f,0x53288));import{mkdir,writeFile,readFile,readdir,unlink,rm,mkdtemp,rename}from'fs/promises';function _0xd6f0(_0x980b02,_0x3d6627){_0x980b02=_0x980b02-0x1a2;const _0x5c4f50=_0x5c4f();let _0xd6f02d=_0x5c4f50[_0x980b02];return _0xd6f02d;}import{join}from'path';import{existsSync}from'fs';import _0x3b0782 from'inquirer';import{chromium}from'playwright';function _0x5c4f(){const _0x11945c=['hKBKV','โœ“\x20Cloud\x20profile\x20\x27','gMvHS','XPaqc','Saving\x20authentication\x20state...','http://','confirm','env','\x0a\x20\x20(domains:\x20','isTTY','irqCp','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','hKVsR','Could\x20not\x20reach\x20','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','scope','profile.add.autoRouteSkipped','setupHeader','newPage','Delete\x20existing\x20and\x20create\x20new\x20in\x20','off','input','finally','launch','pnDNl','3359220hqKEWl','isElectron','\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.','731068yarpeq','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','Use\x20','FMHaz','Profile\x20\x22','\x20\x20ranger\x20profile\x20add\x20','iRfTD','stdout','26502puVVSL','\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)','prompt','includes','โœ“\x20Created\x20settings:\x20','stdin','\x0a\x20\x20Profile\x20\x22','startsWith','Enter\x20a\x20different\x20URL','url_setup','waeEc','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','test','indexOf','\x27.\x0a','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','assign','AsdwQ','Invalid\x20URL','local','NODE_TLS_REJECT_UNAUTHORIZED','keys','SIGINT','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','hWwCg','pHLIC','catch','\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a','\x22\x20already\x20exists.\x20Overwrite?','push','SuvpM','10176hqnWJJ','DOZUQ','retry','BQqTA','allowInsecureLocalhost','url','baseUrl','uqUGq','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','exit','setupHeaders','utf-8','โš \x20Could\x20not\x20reach\x20','environments','\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','eNBTp','settings.json','manual','โœ“\x20Auth\x20state\x20saved\x20to:\x20','browser_auth','\x0a๐Ÿ”Œ\x20CDP\x20Profile\x20Setup\x0a','--ci\x20and\x20--cdp-endpoint\x20cannot\x20be\x20used\x20together.\x20Electron/CDP\x20profiles\x20only\x20work\x20with\x20a\x20locally\x20running\x20app\x20and\x20are\x20not\x20supported\x20in\x20CI.','location','log','isProtocolError','NwdlP','nDoml','config_write','close','SZGZi','list','\x20\x20Set\x20active\x20profile:\x20','Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.','\x20โ€”\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','--allow-insecure-localhost','UgrGQ','Continue\x20anyway','newContext','.backup-','.tmp-','trackPhaseEnd','no_match','origin','eTaeH','7496320zUgRze','signal','248sphtFN','error','gGWqx','overwrite','hFCmm','โœ“\x20Encrypted\x20auth\x20saved\x20to:\x20','1355292UMwkmd','cdpEndpoint','QGwYB','continue','3971457bxKtMJ','\x0a๐ŸŒ\x20Profile\x20Setup\x0a','GGIOZ','Aborted.',')\x0a\x20\x20Save\x20\x27','kdlAB','status','Invalid\x20--setup-header\x20format:\x20\x22','\x20(continuing\x20with\x20--force)','\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','path','xZOBC','xDmpY','safeMode','ETeeJ','No\x20auth\x20env\x20matches\x20this\x20URL.\x20Creating\x20local\x20profile.','skipAuth','extraHTTPHeaders','HEAD','BFKLn','xAAkd','QBGro','\x20\x20Did\x20you\x20mean\x20','http://localhost:3000'];_0x5c4f=function(){return _0x11945c;};return _0x5c4f();}import{findExistingEnv,loadSettings}from'./utils/settings.js';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';import{fetchAuthConfig,createCloudProfile,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';async function checkUrlReachability(_0x5f4934){const _0x232b79=_0xd6f0,_0xc0c328={'qoiWP':function(_0xdb6990,_0x408607,_0x53834b){return _0xdb6990(_0x408607,_0x53834b);},'uPdpm':_0x232b79(0x1e1),'ETeeJ':function(_0x394475,_0x1a7099){return _0x394475<_0x1a7099;}};try{const _0x4f1ab9=new AbortController(),_0x3a2a17=_0xc0c328['qoiWP'](setTimeout,()=>_0x4f1ab9['abort'](),0x1388),_0x2f8ec6={'method':_0xc0c328['uPdpm'],'signal':_0x4f1ab9[_0x232b79(0x1c3)],'redirect':_0x232b79(0x1a6)};/^https:\/\/localhost(:\d+)?/i[_0x232b79(0x218)](_0x5f4934)&&(process[_0x232b79(0x1ee)][_0x232b79(0x220)]='0');const _0x1e085e=await fetch(_0x5f4934,_0x2f8ec6);delete process[_0x232b79(0x1ee)][_0x232b79(0x220)],clearTimeout(_0x3a2a17);if(_0xc0c328[_0x232b79(0x1dd)](_0x1e085e['status'],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x1e085e['status']};}catch(_0x57f793){delete process[_0x232b79(0x1ee)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x175614=_0x57f793,_0x16de5f=_0x175614['message']||String(_0x57f793),_0x5d73a0=_0x16de5f[_0x232b79(0x20f)](_0x232b79(0x21e))||_0x175614['name']==='TypeError'||_0x16de5f['includes']('fetch\x20failed');return{'ok':![],'error':_0x16de5f,'isProtocolError':_0x5d73a0};}}async function sweepOrphanLocalProfile(_0x4b78a5,_0x3881c3,_0x4c7e57){const _0x4f0391=_0xd6f0,_0x4f7462={'xAAkd':_0x4f0391(0x21f),'eNBTp':function(_0x15f141,_0x48f397,_0x2cee02){return _0x15f141(_0x48f397,_0x2cee02);},'gztUx':function(_0x54ecba,_0x34887e){return _0x54ecba(_0x34887e);}},_0x7b2d09=join(_0x3881c3,_0x4f7462[_0x4f0391(0x1e3)]),_0x115928=_0x4f7462[_0x4f0391(0x1a4)](join,_0x7b2d09,_0x4b78a5);existsSync(_0x115928)&&(_0x4c7e57&&await isPathGitTracked(_0x115928)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x115928+_0x4f0391(0x1b6)):(await rm(_0x115928,{'recursive':!![],'force':!![]}),console['log'](_0x4f0391(0x21b)+_0x115928)));if(existsSync(_0x7b2d09)){let _0x567d83=[];try{_0x567d83=await _0x4f7462['gztUx'](readdir,_0x7b2d09);}catch{return;}const _0x20b78c='.tmp-'+_0x4b78a5+'-';for(const _0x34e1d1 of _0x567d83){if(!_0x34e1d1[_0x4f0391(0x213)](_0x20b78c))continue;const _0x14f027=join(_0x7b2d09,_0x34e1d1);await rm(_0x14f027,{'recursive':!![],'force':!![]}),console[_0x4f0391(0x1ac)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x14f027);}}}async function tryAutoRouteCloudProfile(_0x2272e7,_0xb4502f,_0x1c4f3f,_0x3d79cf,_0x5cf572){const _0x5eb23e=_0xd6f0,_0x43bdbd={'eTaeH':function(_0x4f83f8,_0x16c80e){return _0x4f83f8===_0x16c80e;},'hWwCg':'no_auth_config','yFkpF':_0x5eb23e(0x1f8),'NwdlP':_0x5eb23e(0x1de),'eHKKe':'user_declined','nDoml':function(_0xd60ea6,_0x12dc95){return _0xd60ea6 instanceof _0x12dc95;},'QyhJr':function(_0x35cf4b,_0x41acf6){return _0x35cf4b+_0x41acf6;},'HJfKi':function(_0x6ef665,_0x2123d9){return _0x6ef665!==_0x2123d9;},'DOZUQ':function(_0x3b56b5,_0x15877f){return _0x3b56b5 instanceof _0x15877f;},'gGWqx':function(_0x42df08,_0x12422c){return _0x42df08(_0x12422c);},'dwaNT':'profile.add.autoRouted'};let _0x51190b;try{_0x51190b=await fetchAuthConfig();}catch{return _0x5cf572?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x43bdbd['hWwCg'],'profileName':_0x2272e7}),![];}if(!_0x51190b||!_0x51190b['environments']||_0x43bdbd['eTaeH'](Object['keys'](_0x51190b[_0x5eb23e(0x23a)])['length'],0x0))return _0x5cf572?.['trackPhaseEnd'](_0x43bdbd['yFkpF'],{'reason':_0x43bdbd[_0x5eb23e(0x226)],'profileName':_0x2272e7}),![];const _0x1081ea=matchAuthEnvironment(_0xb4502f,_0x51190b);if(!_0x1081ea)return console['log'](_0x43bdbd[_0x5eb23e(0x1ae)]),_0x5cf572?.[_0x5eb23e(0x1be)](_0x43bdbd['yFkpF'],{'reason':_0x5eb23e(0x1bf),'profileName':_0x2272e7}),![];const _0x2aa1bc=_0x51190b[_0x5eb23e(0x23a)][_0x1081ea],_0x13c4fc=_0x2aa1bc?.['domains']??[];if(_0x3d79cf&&!_0x1c4f3f['yes']){const {saveToCloud:_0x5a9190}=await _0x3b0782['prompt']([{'type':_0x5eb23e(0x1ed),'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x1081ea+'\x27\x20matching\x20'+_0xb4502f+_0x5eb23e(0x1ef)+_0x13c4fc['join'](',\x20')+_0x5eb23e(0x1d2)+_0x2272e7+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x5a9190)return _0x5cf572?.[_0x5eb23e(0x1be)](_0x5eb23e(0x1f8),{'reason':_0x43bdbd['eHKKe'],'profileName':_0x2272e7}),![];}const _0x2e0e87=_0x13c4fc['some'](_0x56364a=>{const _0xc312d5=_0x5eb23e;try{return _0x43bdbd[_0xc312d5(0x1c1)](new URL(_0x56364a)[_0xc312d5(0x1c0)],new URL(_0xb4502f)['origin']);}catch{return![];}}),_0x3f971e={};!_0x2e0e87&&(_0x3f971e[_0x5eb23e(0x233)]=_0xb4502f);try{await createCloudProfile(_0x2272e7,_0x1081ea,{'settings':_0x3f971e});}catch(_0x59c584){if(_0x59c584 instanceof ApiError&&_0x59c584[_0x5eb23e(0x1d4)]===0x199){console[_0x5eb23e(0x1c5)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x2272e7+_0x5eb23e(0x1f2));throw _0x59c584;}return console['log']('\x20\x20Could\x20not\x20reach\x20Ranger\x20API\x20to\x20create\x20a\x20cloud\x20profile\x20('+(_0x43bdbd[_0x5eb23e(0x1af)](_0x59c584,Error)?_0x59c584['message']:String(_0x59c584))+').\x20Falling\x20back\x20to\x20local\x20profile.'),_0x5cf572?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x43bdbd[_0x5eb23e(0x226)],'profileName':_0x2272e7}),![];}console[_0x5eb23e(0x1ac)](_0x43bdbd['QyhJr'](_0x5eb23e(0x1e8)+_0x2272e7+'\x27\x20created,\x20linked\x20to\x20env\x20\x27'+_0x1081ea+_0x5eb23e(0x21a),'\x20\x20Next:\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--profile\x20'+_0x2272e7));try{await sweepOrphanLocalProfile(_0x2272e7,getRangerHomeDir(),![]);const _0x6ea6c2=getRangerDir();_0x43bdbd['HJfKi'](_0x6ea6c2,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x2272e7,_0x6ea6c2,!![]);}catch(_0x7ec22f){console[_0x5eb23e(0x1ac)](_0x5eb23e(0x1a3)+(_0x43bdbd[_0x5eb23e(0x22e)](_0x7ec22f,Error)?_0x7ec22f['message']:_0x43bdbd[_0x5eb23e(0x1c6)](String,_0x7ec22f))+').');}return _0x5cf572?.['trackPhaseEnd'](_0x43bdbd['dwaNT'],{'envKey':_0x1081ea,'profileName':_0x2272e7}),!![];}export async function addEnv(_0x187388,_0x208f50={},_0x28e09d){const _0x471413=_0xd6f0,_0x5c387d={'xDmpY':_0x471413(0x1eb),'iRfTD':function(_0x39e716){return _0x39e716();},'AAfmW':function(_0x4e90c7){return _0x4e90c7();},'SZGZi':function(_0x3e59b1,_0x98b28e,_0x5c9c7f,_0x445cec){return _0x3e59b1(_0x98b28e,_0x5c9c7f,_0x445cec);},'rJfWT':function(_0x2020fe,_0x29446a){return _0x2020fe+_0x29446a;},'hFCmm':function(_0x8d5ac5,_0x580bb5){return _0x8d5ac5(_0x580bb5);},'UgrGQ':'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','GGIOZ':function(_0x1b5a4a,_0xea7408,_0x23fd32,_0x14025e,_0x246e37,_0x339ff5){return _0x1b5a4a(_0xea7408,_0x23fd32,_0x14025e,_0x246e37,_0x339ff5);},'QBGro':function(_0x2ba03a,_0x4ecc3c,_0x3a2d3c){return _0x2ba03a(_0x4ecc3c,_0x3a2d3c);},'waeEc':function(_0x17b018,_0x570a7f){return _0x17b018===_0x570a7f;},'gMvHS':'legacy','VPQbJ':'root\x20(.ranger/)','LCQkm':_0x471413(0x1ed),'BIYPM':'shouldReplace','pHLIC':_0x471413(0x215),'pIFVd':_0x471413(0x1a9),'AsdwQ':_0x471413(0x229),'dxNnJ':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','VpqmK':_0x471413(0x235),'LjWNi':_0x471413(0x1d8),'nAhSi':'What\x20would\x20you\x20like\x20to\x20do?','KAFSR':'use_suggestion','BiblD':_0x471413(0x1ba),'kdlAB':_0x471413(0x1cd),'irqCp':function(_0xd7192c,_0x452b39,_0x572dd4){return _0xd7192c(_0x452b39,_0x572dd4);},'TxgJs':function(_0xb150f6,_0x45b90c){return _0xb150f6(_0x45b90c);},'NeMSH':_0x471413(0x1a8),'QGwYB':'\x0a๐Ÿ“‹\x20Authentication\x20Setup','jHEQp':_0x471413(0x203),'MgMKH':'\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.','hrQLh':'\x0a\x20\x20\x20โš \x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.','XPaqc':_0x471413(0x1d7),'ElVGc':'--disable-features=WebBluetooth','SpNLQ':function(_0x155b12,_0x2e9338){return _0x155b12>_0x2e9338;},'FMHaz':function(_0x21bc65,_0x5a16f6){return _0x21bc65||_0x5a16f6;},'SuvpM':'about:blank','selAA':'This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','BFKLn':'You\x20can\x20try\x20again\x20with\x20one\x20of:','uqUGq':_0x471413(0x1f5),'BQqTA':_0x471413(0x238),'xZOBC':function(_0xb10138){return _0xb10138();},'EdFWq':'.enc','hKVsR':_0x471413(0x1b7),'bVMcR':'\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','hKBKV':function(_0x4f101c,_0x1bf630,_0x5d8d58){return _0x4f101c(_0x1bf630,_0x5d8d58);},'nRsml':function(_0xc40d62,_0x27ad20,_0x4cb2b0){return _0xc40d62(_0x27ad20,_0x4cb2b0);},'pnDNl':function(_0x2b1ace,_0x140cad,_0x5b3a4b){return _0x2b1ace(_0x140cad,_0x5b3a4b);},'xcHiH':_0x471413(0x205),'baIsW':'config_write'},_0x3c6b75=_0x208f50['ci']??![],_0x3a9957=_0x3c6b75?'ci':'local',_0x32fa74=_0x208f50[_0x471413(0x1f7)]==='user'?_0x5c387d['AAfmW'](getRangerHomeDir):getRangerDir(),_0x2c7c67=_0x5c387d[_0x471413(0x1b2)](join,_0x32fa74,_0x3a9957,_0x187388),_0x45e815={};if(_0x208f50[_0x471413(0x1f9)])for(const _0x471606 of _0x208f50[_0x471413(0x1f9)]){const _0x37a090=_0x471606[_0x471413(0x219)](':');if(_0x37a090===-0x1)throw new Error(_0x471413(0x1d5)+_0x471606+_0x471413(0x1f6));const _0x287a1a=_0x471606['slice'](0x0,_0x37a090)['trim'](),_0x5e00c4=_0x471606['slice'](_0x5c387d['rJfWT'](_0x37a090,0x1))['trim']();_0x45e815[_0x287a1a]=_0x5e00c4;}const _0xd7aa78=join(_0x32fa74,_0x3a9957);if(_0x208f50['cdpEndpoint']!==undefined&&_0x208f50['cdpEndpoint']['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x208f50[_0x471413(0x1cb)]&&_0x208f50[_0x471413(0x232)])throw new Error(_0x471413(0x225));if(_0x208f50['cdpEndpoint']&&_0x208f50['ci'])throw new Error(_0x471413(0x1aa));const _0x30759a=_0x5c387d['hFCmm'](Boolean,_0x208f50['cdpEndpoint']),_0x3a4480=!_0x208f50['skipAuth']&&!_0x30759a,_0x266438=process[_0x471413(0x211)][_0x471413(0x1f0)]&&process[_0x471413(0x20b)][_0x471413(0x1f0)];if(!_0x266438&&!_0x208f50[_0x471413(0x232)]&&!_0x30759a)throw new Error(_0x5c387d[_0x471413(0x1b9)]);if(!_0x3c6b75&&!_0x208f50[_0x471413(0x1df)]&&!_0x30759a&&_0x208f50['url']){const _0x5c5c01=await _0x5c387d[_0x471413(0x1d0)](tryAutoRouteCloudProfile,_0x187388,_0x208f50['url'],_0x208f50,_0x266438,_0x28e09d);if(_0x5c5c01)return;}const _0x10d7cc=_0x5c387d[_0x471413(0x1e4)](findExistingEnv,_0x187388,{'rangerDir':_0x32fa74});let _0x4f3d27=null;if(_0x10d7cc){if(!_0x266438)_0x4f3d27=_0x10d7cc;else{if(_0x5c387d['waeEc'](_0x10d7cc[_0x471413(0x1ab)],_0x3a9957)){const {overwrite:_0x2a9ca3}=await _0x3b0782[_0x471413(0x20e)]([{'type':'confirm','name':_0x471413(0x1c7),'message':_0x471413(0x208)+_0x187388+_0x471413(0x22a),'default':![]}]);if(!_0x2a9ca3){console['log']('Aborted.');return;}_0x4f3d27=_0x10d7cc;}else{const _0x58a09d=_0x5c387d[_0x471413(0x216)](_0x10d7cc['location'],_0x5c387d[_0x471413(0x1e9)])?_0x5c387d['VPQbJ']:_0x10d7cc['location'];console[_0x471413(0x1c5)]('\x0aโš ๏ธ\x20\x20Profile\x20\x22'+_0x187388+'\x22\x20already\x20exists\x20in\x20'+_0x58a09d+':\x20'+_0x10d7cc['path']),console[_0x471413(0x1c5)]('\x20\x20\x20Creating\x20it\x20in\x20'+_0x3a9957+'\x20would\x20shadow\x20the\x20existing\x20profile.');const {shouldReplace:_0x23772e}=await _0x3b0782[_0x471413(0x20e)]([{'type':_0x5c387d['LCQkm'],'name':_0x5c387d['BIYPM'],'message':_0x471413(0x1fb)+_0x3a9957+'?','default':![]}]);if(!_0x23772e){console['log'](_0x471413(0x1d1));return;}_0x4f3d27=_0x10d7cc;}}}_0x28e09d?.['trackPhaseStart'](_0x5c387d[_0x471413(0x227)]);let _0x42ae1c='';if(_0x30759a)console[_0x471413(0x1ac)](_0x5c387d['pIFVd']),console[_0x471413(0x1ac)](_0x471413(0x224)+_0x208f50[_0x471413(0x1cb)]),console[_0x471413(0x1ac)](_0x5c387d[_0x471413(0x21d)]);else{if(_0x208f50['url']){_0x42ae1c=_0x208f50['url'];const _0x8605dc=await _0x5c387d[_0x471413(0x1c8)](checkUrlReachability,_0x42ae1c);if(!_0x8605dc['ok']&&!_0x208f50['force'])throw new Error(_0x471413(0x1f4)+_0x42ae1c+':\x20'+_0x8605dc[_0x471413(0x1c5)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x8605dc['ok']&&_0x208f50['force']&&console[_0x471413(0x1ac)](_0x471413(0x239)+_0x42ae1c+':\x20'+_0x8605dc[_0x471413(0x1c5)]+_0x471413(0x1d6));}else{console[_0x471413(0x1ac)](_0x471413(0x1cf)),console[_0x471413(0x1ac)](_0x5c387d['dxNnJ']),console[_0x471413(0x1ac)]('\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a');let _0x2ec2c8=![];while(!![]){const _0x30f57b=await _0x3b0782[_0x471413(0x20e)]([{'type':_0x471413(0x1fd),'name':_0x471413(0x233),'message':_0x2ec2c8?_0x5c387d['VpqmK']:_0x5c387d['LjWNi'],'default':_0x42ae1c||_0x471413(0x1e6)}]);_0x42ae1c=_0x30f57b['baseUrl'];const _0x42282e=await checkUrlReachability(_0x42ae1c);if(_0x42282e['ok'])break;const _0x11aa69=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x42ae1c),_0x1d96d6=_0x42282e[_0x471413(0x1ad)]&&!_0x11aa69,_0xabba14=_0x1d96d6?_0x471413(0x1ec)+_0x42ae1c:null;_0x2ec2c8=!![],console[_0x471413(0x1ac)]('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x42ae1c+':\x20'+_0x42282e['error']);_0xabba14&&console['log'](_0x471413(0x1e5)+_0xabba14+'?');const {action:_0x492589}=await _0x3b0782[_0x471413(0x20e)]([{'type':_0x471413(0x1b3),'name':'action','message':_0x5c387d['nAhSi'],'choices':[..._0xabba14?[{'name':_0x471413(0x206)+_0xabba14,'value':_0x5c387d['KAFSR']}]:[],{'name':_0x471413(0x214),'value':_0x471413(0x22f)},{'name':_0x5c387d['BiblD'],'value':_0x5c387d['kdlAB']}]}]);if(_0x492589===_0x5c387d['KAFSR']&&_0xabba14){_0x42ae1c=_0xabba14;const _0x33755e=await checkUrlReachability(_0x42ae1c);if(_0x33755e['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x42ae1c+':\x20'+_0x33755e[_0x471413(0x1c5)]);}else{if(_0x5c387d[_0x471413(0x216)](_0x492589,_0x5c387d[_0x471413(0x1d3)]))break;}}}}_0x28e09d?.['trackPhaseEnd']('url_setup');const _0x53ca4d={};if(_0x4f3d27){const _0x4ca2d2=await loadSettings(_0x187388);Object[_0x471413(0x21c)](_0x53ca4d,_0x4ca2d2[_0x471413(0x237)]);}Object[_0x471413(0x21c)](_0x53ca4d,_0x45e815),await _0x5c387d[_0x471413(0x1f1)](mkdir,_0xd7aa78,{'recursive':!![]});try{const _0x3b6118=await readdir(_0xd7aa78),_0x8fa956=_0x471413(0x1bd)+_0x187388+'-';for(const _0x1bd529 of _0x3b6118){_0x1bd529[_0x471413(0x213)](_0x8fa956)&&await rm(join(_0xd7aa78,_0x1bd529),{'recursive':!![],'force':!![]});}}catch{}const _0x288af8=await _0x5c387d['hFCmm'](mkdtemp,join(_0xd7aa78,'.tmp-'+_0x187388+'-')),_0x777cbc=_0x5c387d['QBGro'](join,_0x288af8,'auth.json'),_0xd99475=()=>{const _0x47075e=_0x471413;rm(_0x288af8,{'recursive':!![],'force':!![]})['catch'](()=>{})[_0x47075e(0x1fe)](()=>{const _0x1da0cb=_0x47075e;process[_0x1da0cb(0x236)](0x82);});};process['once'](_0x471413(0x222),_0xd99475);const _0x1cbcba=_0x5c387d['TxgJs'](Boolean,_0x42ae1c)&&/^https:\/\/localhost(:\d+)?/i[_0x471413(0x218)](_0x42ae1c);try{if(_0x3a4480){_0x28e09d?.['trackPhaseStart'](_0x5c387d['NeMSH']),console['log'](_0x5c387d[_0x471413(0x1cc)]),console[_0x471413(0x1ac)](_0x5c387d['jHEQp']),console['log'](_0x5c387d['MgMKH']);!_0x266438?(console[_0x471413(0x1ac)](_0x5c387d['hrQLh']),console['log'](_0x5c387d[_0x471413(0x1ea)])):console[_0x471413(0x1ac)]('');await new Promise(_0x4f40cc=>setTimeout(_0x4f40cc,0xbb8));const _0x3dd4e4=[];_0x208f50[_0x471413(0x1dc)]&&_0x3dd4e4[_0x471413(0x22b)](_0x5c387d['ElVGc']);const _0x5ed959=_0x208f50[_0x471413(0x231)]||_0x1cbcba;_0x5ed959&&_0x3dd4e4[_0x471413(0x22b)](_0x471413(0x1b8));const _0x160348=await chromium[_0x471413(0x1ff)]({'headless':![],..._0x3dd4e4['length']>0x0?{'args':_0x3dd4e4}:{}});try{const _0x5f3e98=_0x5c387d['SpNLQ'](Object[_0x471413(0x221)](_0x53ca4d)['length'],0x0),_0x4b497e={'ignoreHTTPSErrors':!![]};_0x5f3e98&&(_0x4b497e[_0x471413(0x1e0)]=_0x53ca4d);const _0x53dc48=await _0x160348[_0x471413(0x1bb)](_0x4b497e);await addProfileSetupBanner(_0x53dc48);const _0x43a8b1=await _0x53dc48[_0x471413(0x1fa)]();await _0x43a8b1['goto'](_0x5c387d[_0x471413(0x207)](_0x42ae1c,_0x5c387d[_0x471413(0x22c)]));let _0x5c0b73=![];await new Promise(_0x196085=>{const _0x275e64=_0x471413;_0x43a8b1['on'](_0x275e64(0x1b1),async()=>{const _0x4f0224=_0x275e64;try{console[_0x4f0224(0x1ac)](_0x5c387d[_0x4f0224(0x1db)]),await _0x53dc48['storageState']({'path':_0x777cbc}),_0x5c0b73=!![];}catch{}_0x5c387d[_0x4f0224(0x20a)](_0x196085);});});if(!_0x5c0b73){console[_0x471413(0x1ac)](_0x471413(0x223));!_0x208f50[_0x471413(0x1dc)]&&(console[_0x471413(0x1ac)](_0x5c387d['selAA']),console['log'](_0x5c387d[_0x471413(0x1e2)]),console['log'](_0x471413(0x209)+_0x187388+_0x471413(0x20d)),console['log']('\x20\x20ranger\x20profile\x20add\x20'+_0x187388+_0x471413(0x1a2)));throw new Error(_0x5c387d[_0x471413(0x234)]);}}finally{await _0x160348['close']()[_0x471413(0x228)](()=>{});}if(_0x3c6b75){const _0x3134f4=await readFile(_0x777cbc,_0x5c387d[_0x471413(0x230)]),_0x107eef=await _0x5c387d[_0x471413(0x1da)](getToken);if(!_0x107eef){console[_0x471413(0x1c5)](_0x471413(0x217)),await unlink(_0x777cbc)['catch'](()=>{});throw new Error(_0x471413(0x1b5));}else{const _0x470a92=_0x5c387d[_0x471413(0x1f1)](encrypt,_0x3134f4,_0x107eef);await writeFile(_0x777cbc+_0x5c387d['EdFWq'],_0x470a92),await unlink(_0x777cbc),console[_0x471413(0x1ac)](_0x471413(0x1c9)+_0x777cbc+'.enc'),console['log'](_0x5c387d[_0x471413(0x1f3)]),console[_0x471413(0x1ac)](_0x5c387d['bVMcR']);}}else console[_0x471413(0x1ac)](_0x471413(0x1a7)+_0x777cbc);_0x28e09d?.['trackPhaseEnd'](_0x471413(0x1a8));}_0x28e09d?.['trackPhaseStart'](_0x471413(0x1b0));const _0x158aba={};_0x42ae1c&&(_0x158aba[_0x471413(0x233)]=_0x42ae1c);_0x208f50[_0x471413(0x1cb)]&&(_0x158aba[_0x471413(0x1cb)]=_0x208f50['cdpEndpoint'],_0x158aba[_0x471413(0x202)]=!![]);(_0x208f50[_0x471413(0x231)]||_0x1cbcba)&&(_0x158aba[_0x471413(0x231)]=!![]);_0x208f50['safeMode']&&(_0x158aba['safeMode']=!![]);Object['keys'](_0x53ca4d)['length']>0x0&&(_0x158aba[_0x471413(0x237)]=_0x53ca4d);await _0x5c387d[_0x471413(0x1f1)](writeFile,_0x5c387d[_0x471413(0x1f1)](join,_0x288af8,'settings.json'),JSON['stringify'](_0x158aba,null,0x2)),console['log'](_0x471413(0x210)+_0x5c387d['hKBKV'](join,_0x2c7c67,_0x471413(0x1a5)));if(_0x4f3d27?.['location']===_0x3a9957){const _0x29c349=_0x4f3d27['path']+_0x471413(0x1bc)+Date['now']();await _0x5c387d['nRsml'](rename,_0x4f3d27[_0x471413(0x1d9)],_0x29c349);try{await rename(_0x288af8,_0x2c7c67);}catch(_0xbe447){await _0x5c387d[_0x471413(0x200)](rename,_0x29c349,_0x4f3d27[_0x471413(0x1d9)]);throw _0xbe447;}try{await rm(_0x29c349,{'recursive':!![]});}catch{console['log']('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20'+_0x29c349);}}else{await _0x5c387d[_0x471413(0x1e7)](rename,_0x288af8,_0x2c7c67);if(_0x4f3d27)try{await rm(_0x4f3d27['path'],{'recursive':!![]}),console['log']('Removed\x20existing\x20profile\x20at\x20'+_0x4f3d27['path']);}catch{console[_0x471413(0x1ac)]('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20'+_0x4f3d27['path']);}}try{await writeActiveProfileName(_0x187388),console[_0x471413(0x1ac)](_0x471413(0x1b4)+_0x187388);}catch{console['log'](_0x5c387d['xcHiH']);}_0x28e09d?.['trackPhaseEnd'](_0x5c387d['baIsW']),console['log'](_0x471413(0x212)+_0x187388+'\x22\x20configured');}catch(_0x21c14f){await rm(_0x288af8,{'recursive':!![],'force':!![]});throw _0x21c14f;}finally{process[_0x471413(0x1fc)](_0x471413(0x222),_0xd99475);}}
1
+ (function(_0x13adca,_0x37ac9d){const _0x2b5611=_0x5f5a,_0x5b080f=_0x13adca();while(!![]){try{const _0x5ab86e=-parseInt(_0x2b5611(0x1d4))/0x1*(parseInt(_0x2b5611(0x237))/0x2)+parseInt(_0x2b5611(0x213))/0x3*(-parseInt(_0x2b5611(0x1de))/0x4)+-parseInt(_0x2b5611(0x23a))/0x5+parseInt(_0x2b5611(0x20f))/0x6*(-parseInt(_0x2b5611(0x238))/0x7)+-parseInt(_0x2b5611(0x24d))/0x8+parseInt(_0x2b5611(0x1fe))/0x9*(-parseInt(_0x2b5611(0x234))/0xa)+-parseInt(_0x2b5611(0x1ea))/0xb*(-parseInt(_0x2b5611(0x253))/0xc);if(_0x5ab86e===_0x37ac9d)break;else _0x5b080f['push'](_0x5b080f['shift']());}catch(_0x1a1e87){_0x5b080f['push'](_0x5b080f['shift']());}}}(_0x44d0,0x9382d));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x5135e8 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{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';function _0x44d0(){const _0x12aa59=['--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','isElectron','indexOf','9auTshp','no_match','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','EJdmK','RikVU','status','โœ“\x20Cloud\x20profile\x20\x27','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','DknrS','bzemE','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','Found\x20auth\x20environment\x20\x27','input','\x0a\x20\x20Still\x20could\x20not\x20reach\x20',')\x0a\x20\x20Save\x20\x27','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','HEAD','6VhHyrK','\x0a๐ŸŒ\x20Profile\x20Setup\x0a','environments','saveToCloud','3WoxjEP','\x27\x20to\x20the\x20cloud?','length','HTTP\x20','The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','paTTw','join','error','setupHeader','url','profile.add.autoRouteSkipped','some','isProtocolError','exit','eAZZj','keys','yjHSB','Lvhsi','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20โ€”\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','\x0a\x20\x20Could\x20not\x20reach\x20','xwKuc','name','user_declined','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','\x20โ€”\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','tOwyT','\x27\x20created\x20(no\x20session).\x0a','\x0aโœ“\x20Profile\x20\x27','VNLmg','rQscs','5388400eolmKy','setupHeaders','\x20\x20https://docs.ranger.net/main/concepts/profiles','9884rsvpmW','565635sHlxSC','env','5468195nMzefB','pSzVh','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','fetch\x20failed','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','โœ“\x20Profile\x20\x27','manual','vDPRq','profile.add.autoRouted','\x20\x20Did\x20you\x20mean\x20','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','includes','\x22:\x20','\x27\x20created\x20(CDP).','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','Enter\x20a\x20different\x20URL','trim','DAxrP','Could\x20not\x20reach\x20','7884368vtRVin','bVbYn','\x20\x20Set\x20active\x20profile:\x20','boTlU','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','tnBgZ','43620XONsSA','kdTqz','stdout','KQoUf','capture','jrhVr','Use\x20','origin','165tPekkz','log','isTTY','DsZBe','zmBxF','aZlAb','http://localhost:3000','NODE_TLS_REJECT_UNAUTHORIZED','cdpEndpoint','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','3096980OKfTyZ','no_auth_config','\x0a๐Ÿ”Œ\x20CDP\x20Profile\x20Setup\x0a','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x20--url\x20','prompt','action','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20','sLPxs','slice','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','LaNMo','14806Bkedjj','PBRUf','voPiL','baseUrl','FnkHn','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','xUDIe','domains','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','RMAab','OAqKb','trackPhaseEnd','retry','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','message','`\x20again\x20without\x20--skip-auth.','confirm'];_0x44d0=function(){return _0x12aa59;};return _0x44d0();}import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x443ee1){const _0xb96b2d=_0x5f5a,_0x3af391={'nHlZX':_0xb96b2d(0x20e),'DAxrP':function(_0x59ae39,_0x49897c){return _0x59ae39(_0x49897c);},'VNLmg':function(_0x38b6c5,_0xa7cd89){return _0x38b6c5===_0xa7cd89;},'IQiNU':'TypeError','Etsge':_0xb96b2d(0x23d)};try{const _0x471c64=new AbortController(),_0x7e12c2=setTimeout(()=>_0x471c64['abort'](),0x1388),_0x4f7504={'method':_0x3af391['nHlZX'],'signal':_0x471c64['signal'],'redirect':_0xb96b2d(0x240)};/^https:\/\/localhost(:\d+)?/i['test'](_0x443ee1)&&(process[_0xb96b2d(0x239)]['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x4c45a3=await fetch(_0x443ee1,_0x4f7504);delete process[_0xb96b2d(0x239)][_0xb96b2d(0x1db)],_0x3af391[_0xb96b2d(0x24b)](clearTimeout,_0x7e12c2);if(_0x4c45a3[_0xb96b2d(0x203)]<0x190)return{'ok':!![]};return{'ok':![],'error':_0xb96b2d(0x216)+_0x4c45a3['status']};}catch(_0x596413){delete process[_0xb96b2d(0x239)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x1eb16d=_0x596413,_0x3782ed=_0x1eb16d[_0xb96b2d(0x1f8)]||String(_0x596413),_0x3b212d=_0x3782ed[_0xb96b2d(0x245)]('Invalid\x20URL')||_0x3af391[_0xb96b2d(0x232)](_0x1eb16d[_0xb96b2d(0x22a)],_0x3af391['IQiNU'])||_0x3782ed[_0xb96b2d(0x245)](_0x3af391['Etsge']);return{'ok':![],'error':_0x3782ed,'isProtocolError':_0x3b212d};}}function _0x5f5a(_0x1687b4,_0x2d484e){_0x1687b4=_0x1687b4-0x1d4;const _0x44d069=_0x44d0();let _0x5f5a7f=_0x44d069[_0x1687b4];return _0x5f5a7f;}async function sweepOrphanLocalProfile(_0x5254fe,_0x5b1ac9,_0x477184){const _0x19ce3c=_0x5f5a,_0x4bb5f2={'kdTqz':function(_0x48ceb2,_0x2cf6cc,_0x473421){return _0x48ceb2(_0x2cf6cc,_0x473421);},'xUDIe':function(_0x1d3bf1,_0x2ac1c0){return _0x1d3bf1(_0x2ac1c0);},'tnBgZ':function(_0x4d518e,_0x49ad80,_0x1bdc2e){return _0x4d518e(_0x49ad80,_0x1bdc2e);}},_0x142b7c=_0x4bb5f2['kdTqz'](join,_0x5b1ac9,'local'),_0x407941=_0x4bb5f2[_0x19ce3c(0x254)](join,_0x142b7c,_0x5254fe);existsSync(_0x407941)&&(_0x477184&&await isPathGitTracked(_0x407941)?console[_0x19ce3c(0x1d5)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x407941+_0x19ce3c(0x22d)):(await _0x4bb5f2['kdTqz'](rm,_0x407941,{'recursive':!![],'force':!![]}),console['log'](_0x19ce3c(0x22e)+_0x407941)));if(existsSync(_0x142b7c)){let _0x1d2fde=[];try{_0x1d2fde=await _0x4bb5f2[_0x19ce3c(0x1f0)](readdir,_0x142b7c);}catch{return;}const _0x3622b2='.tmp-'+_0x5254fe+'-';for(const _0x1c7d9a of _0x1d2fde){if(!_0x1c7d9a['startsWith'](_0x3622b2))continue;const _0x11eb30=_0x4bb5f2['kdTqz'](join,_0x142b7c,_0x1c7d9a);await _0x4bb5f2[_0x19ce3c(0x252)](rm,_0x11eb30,{'recursive':!![],'force':!![]}),console[_0x19ce3c(0x1d5)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x11eb30);}}}async function sweepOrphansBestEffort(_0x5417fe){const _0x50c853=_0x5f5a,_0x52774e={'PBRUf':function(_0x5d79cb,_0x12b06b,_0x7746a2,_0x4ce0f1){return _0x5d79cb(_0x12b06b,_0x7746a2,_0x4ce0f1);},'PXIvU':function(_0x3f5c10){return _0x3f5c10();},'AhwQg':function(_0x5198d9,_0x51fb59){return _0x5198d9(_0x51fb59);}};try{await _0x52774e[_0x50c853(0x1eb)](sweepOrphanLocalProfile,_0x5417fe,getRangerHomeDir(),![]);const _0x1ca387=getRangerDir();_0x1ca387!==_0x52774e['PXIvU'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x5417fe,_0x1ca387,!![]);}catch(_0x4da04b){console['log'](_0x50c853(0x200)+(_0x4da04b instanceof Error?_0x4da04b['message']:_0x52774e['AhwQg'](String,_0x4da04b))+').');}}async function markActive(_0x3d8e06){const _0x3970b9=_0x5f5a,_0x5cd458={'zmBxF':function(_0x379b34,_0x1a33f4){return _0x379b34(_0x1a33f4);}};try{await _0x5cd458[_0x3970b9(0x1d8)](writeActiveProfileName,_0x3d8e06),console[_0x3970b9(0x1d5)](_0x3970b9(0x24f)+_0x3d8e06);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}}async function tryAutoRouteCloudProfile(_0x9c8e15,_0x59e282,_0xf62c2b,_0x3b8fc8,_0x16fac5){const _0x3ec470=_0x5f5a,_0x265ce3={'FnkHn':function(_0x189e13,_0x3f6980){return _0x189e13===_0x3f6980;},'EJdmK':function(_0xb3cb5a,_0x29fa08){return _0xb3cb5a instanceof _0x29fa08;},'WNnvA':function(_0x1f09e6,_0x43c633){return _0x1f09e6(_0x43c633);},'DsZBe':'profile.add.autoRouteSkipped','xwKuc':_0x3ec470(0x1df),'bVbYn':function(_0x698d7e,_0xd56a6a){return _0x698d7e+_0xd56a6a;},'aZlAb':function(_0x4ce4df,_0x12ebbe){return _0x4ce4df+_0x12ebbe;},'OSjAo':_0x3ec470(0x251),'yjHSB':function(_0x97ec50,_0x434ad5,_0x4d6df6){return _0x97ec50(_0x434ad5,_0x4d6df6);},'QIWmj':_0x3ec470(0x1ff),'BKKAi':_0x3ec470(0x212),'UZIeS':_0x3ec470(0x22b),'RMAab':_0x3ec470(0x1e1),'rGDlo':function(_0x816e4a,_0x363fa3,_0x483144,_0x23688c){return _0x816e4a(_0x363fa3,_0x483144,_0x23688c);},'KQoUf':function(_0x46b0cd,_0xbf8cca){return _0x46b0cd===_0xbf8cca;},'qkrQh':function(_0x46d599,_0x42680f){return _0x46d599+_0x42680f;},'bzemE':_0x3ec470(0x242)};let _0x3d0a78;try{_0x3d0a78=await fetchAuthConfig();}catch(_0x128e6f){return _0x16fac5?.['trackPhaseEnd'](_0x3ec470(0x21e),{'reason':'no_auth_config','profileName':_0x9c8e15}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x265ce3[_0x3ec470(0x201)](_0x128e6f,Error)?_0x128e6f['message']:_0x265ce3['WNnvA'](String,_0x128e6f))),![];}if(!_0x3d0a78||!_0x3d0a78['environments']||_0x265ce3['FnkHn'](Object[_0x3ec470(0x223)](_0x3d0a78['environments'])[_0x3ec470(0x215)],0x0)){if(_0x3b8fc8)return await captureEnvLessProfile(_0x9c8e15,_0x59e282,_0xf62c2b,_0x16fac5);return _0x16fac5?.[_0x3ec470(0x1f5)](_0x265ce3['DsZBe'],{'reason':_0x265ce3[_0x3ec470(0x229)],'profileName':_0x9c8e15}),console['error'](_0x265ce3['bVbYn'](_0x265ce3[_0x3ec470(0x1d9)](_0x265ce3[_0x3ec470(0x24e)](_0x265ce3[_0x3ec470(0x1d9)](_0x3ec470(0x227),'\x0a'),_0x265ce3['OSjAo']),_0x3ec470(0x1e5)+_0x9c8e15+_0x3ec470(0x1e2)+_0x59e282+'\x20--skip-auth\x0a')+'\x0a',_0x3ec470(0x1e8))+'\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login'),![];}const _0x3c8237=_0x265ce3[_0x3ec470(0x224)](matchAuthEnvironment,_0x59e282,_0x3d0a78);if(!_0x3c8237)return _0x16fac5?.[_0x3ec470(0x1f5)]('profile.add.autoRouteSkipped',{'reason':_0x265ce3['QIWmj'],'profileName':_0x9c8e15}),console[_0x3ec470(0x21b)](_0x3ec470(0x208)+_0x59e282+'.\x20Configured\x20envs:\x20'+Object[_0x3ec470(0x223)](_0x3d0a78[_0x3ec470(0x211)])[_0x3ec470(0x21a)](',\x20')+'.'),![];const _0x2ffb13=_0x3d0a78['environments'][_0x3c8237],_0x96d5b4=_0x2ffb13?.[_0x3ec470(0x1f1)]??[];if(_0x3b8fc8&&!_0xf62c2b['yes']){const {saveToCloud:_0x5c757c}=await _0x5135e8['prompt']([{'type':'confirm','name':_0x265ce3['BKKAi'],'message':_0x3ec470(0x209)+_0x3c8237+'\x27\x20matching\x20'+_0x59e282+'\x0a\x20\x20(domains:\x20'+_0x96d5b4['join'](',\x20')+_0x3ec470(0x20c)+_0x9c8e15+_0x3ec470(0x214),'default':!![]}]);if(!_0x5c757c)return _0x16fac5?.['trackPhaseEnd'](_0x265ce3[_0x3ec470(0x1d7)],{'reason':_0x265ce3['UZIeS'],'profileName':_0x9c8e15}),console[_0x3ec470(0x21b)](_0x265ce3[_0x3ec470(0x1f3)]),![];}const _0x173e31=_0x96d5b4[_0x3ec470(0x21f)](_0x29c878=>{const _0x3fe97e=_0x3ec470;try{return _0x265ce3[_0x3fe97e(0x1ee)](new URL(_0x29c878)['origin'],new URL(_0x59e282)[_0x3fe97e(0x25a)]);}catch{return![];}}),_0x382f4e={};!_0x173e31&&(_0x382f4e[_0x3ec470(0x1ed)]=_0x59e282);try{await _0x265ce3['rGDlo'](createCloudProfile,_0x9c8e15,_0x3c8237,{'settings':_0x382f4e});}catch(_0x1a548e){if(_0x265ce3[_0x3ec470(0x201)](_0x1a548e,ApiError)&&_0x265ce3[_0x3ec470(0x256)](_0x1a548e['status'],0x199)){console['error']('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x9c8e15+_0x3ec470(0x218));throw _0x1a548e;}throw _0x1a548e;}return console['log'](_0x265ce3['qkrQh'](_0x3ec470(0x23f)+_0x9c8e15+'\x27\x20created.\x0a',_0x3ec470(0x1dd)+_0x9c8e15)),await _0x265ce3['WNnvA'](sweepOrphansBestEffort,_0x9c8e15),_0x16fac5?.['trackPhaseEnd'](_0x265ce3[_0x3ec470(0x207)],{'envKey':_0x3c8237,'profileName':_0x9c8e15}),!![];}async function createUnconfiguredCloudProfile(_0x3ef0d4,_0x6f4b73){const _0x26ab3b=_0x5f5a,_0x3843c4={'jrhVr':function(_0x375e8c,_0x31a8c8,_0x159265,_0x24468f){return _0x375e8c(_0x31a8c8,_0x159265,_0x24468f);},'PaAGF':function(_0x63e63a,_0x540d7a){return _0x63e63a instanceof _0x540d7a;}};try{await _0x3843c4[_0x26ab3b(0x258)](createCloudProfile,_0x3ef0d4,undefined,{'settings':_0x6f4b73});}catch(_0x25eab1){_0x3843c4['PaAGF'](_0x25eab1,ApiError)&&_0x25eab1['status']===0x199&&console['error'](_0x26ab3b(0x1ef)+_0x3ef0d4+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x25eab1;}}async function captureEnvLessProfile(_0x63c91c,_0x21bb33,_0x1bf779,_0x129c3f){const _0x8ada72=_0x5f5a,_0x32a046={'Lvhsi':_0x8ada72(0x226),'JQxKm':_0x8ada72(0x21e),'pSzVh':'user_declined','sLPxs':function(_0x4820f3,_0x571557){return _0x4820f3===_0x571557;},'OAqKb':function(_0x3a4b8f,_0x12ecc8){return _0x3a4b8f+_0x12ecc8;},'LaNMo':function(_0xdadfad,_0x41c102){return _0xdadfad>_0x41c102;},'eAZZj':function(_0x3ac5d5,_0x2a2cdb,_0x2aade4,_0x391b53){return _0x3ac5d5(_0x2a2cdb,_0x2aade4,_0x391b53);},'vDPRq':function(_0x1df93f,_0x4c1e51,_0x14e55a){return _0x1df93f(_0x4c1e51,_0x14e55a);},'voPiL':function(_0xe7158,_0x3e5824){return _0xe7158(_0x3e5824);}};if(!_0x1bf779['yes']){const {capture:_0x1861cf}=await _0x5135e8['prompt']([{'type':_0x8ada72(0x1fa),'name':_0x8ada72(0x257),'message':_0x32a046[_0x8ada72(0x225)],'default':!![]}]);if(!_0x1861cf)return _0x129c3f?.['trackPhaseEnd'](_0x32a046['JQxKm'],{'reason':_0x32a046[_0x8ada72(0x23b)],'profileName':_0x63c91c}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x3b53b0={};if(_0x1bf779['setupHeader'])for(const _0x17bcd7 of _0x1bf779[_0x8ada72(0x21c)]){const _0x1e3e9f=_0x17bcd7['indexOf'](':');if(_0x32a046['sLPxs'](_0x1e3e9f,-0x1))continue;_0x3b53b0[_0x17bcd7[_0x8ada72(0x1e7)](0x0,_0x1e3e9f)[_0x8ada72(0x24a)]()]=_0x17bcd7['slice'](_0x32a046[_0x8ada72(0x1f4)](_0x1e3e9f,0x1))[_0x8ada72(0x24a)]();}const _0x186573={'baseUrl':_0x21bb33};_0x32a046[_0x8ada72(0x1e9)](Object['keys'](_0x3b53b0)[_0x8ada72(0x215)],0x0)&&(_0x186573[_0x8ada72(0x235)]=_0x3b53b0);let _0x2c428f;try{_0x2c428f=await _0x32a046[_0x8ada72(0x222)](createCloudProfile,_0x63c91c,undefined,{'settings':_0x186573});}catch(_0x26352a){_0x26352a instanceof ApiError&&_0x32a046[_0x8ada72(0x1e6)](_0x26352a['status'],0x199)&&console[_0x8ada72(0x21b)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x63c91c+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x26352a;}return await _0x32a046[_0x8ada72(0x241)](manualBrowserLogin,_0x2c428f,{'key':'','domains':[_0x21bb33],'setupHeaders':_0x32a046['LaNMo'](Object['keys'](_0x3b53b0)['length'],0x0)?_0x3b53b0:undefined}),console['log'](_0x8ada72(0x231)+_0x63c91c+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x63c91c)),await _0x32a046[_0x8ada72(0x1ec)](sweepOrphansBestEffort,_0x63c91c),_0x129c3f?.[_0x8ada72(0x1f5)]('profile.add.autoRouted',{'envKey':null,'profileName':_0x63c91c}),!![];}export async function addEnv(_0x4af174,_0x2d44b4={},_0x3521ae){const _0x34aa44=_0x5f5a,_0x42d15f={'rQscs':function(_0x327242,_0xced69c){return _0x327242+_0xced69c;},'HXsys':_0x34aa44(0x217),'boTlU':_0x34aa44(0x22c),'ZRhZg':_0x34aa44(0x23c),'iokqB':_0x34aa44(0x236),'paTTw':function(_0x437097,_0x328ee2){return _0x437097===_0x328ee2;},'DknrS':function(_0x3528e0,_0x4ecc2e){return _0x3528e0(_0x4ecc2e);},'CDSeD':'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','NUMft':_0x34aa44(0x1e0),'fHGdE':function(_0x3f6f9e,_0x55f9a4){return _0x3f6f9e>_0x55f9a4;},'NXrCy':function(_0x1e64d4,_0x39f53d){return _0x1e64d4||_0x39f53d;},'fkOgB':_0x34aa44(0x1e4),'RikVU':'What\x20would\x20you\x20like\x20to\x20do?','aIvXq':_0x34aa44(0x1f6),'KUody':'continue','tOwyT':function(_0x186c23,_0x1e0f83){return _0x186c23===_0x1e0f83;},'yQDCY':function(_0x3cc4b1,_0x4b0d6b){return _0x3cc4b1===_0x4b0d6b;},'pwBFB':function(_0xb9c449,_0x360ed0){return _0xb9c449 instanceof _0x360ed0;}};_0x2d44b4['ci']&&(console[_0x34aa44(0x21b)](_0x42d15f[_0x34aa44(0x233)](_0x42d15f[_0x34aa44(0x233)](_0x42d15f[_0x34aa44(0x233)](_0x42d15f['HXsys']+'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a'+'\x0a'+_0x42d15f[_0x34aa44(0x250)],_0x42d15f['ZRhZg']),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x42d15f['iokqB']),process['exit'](0x1));const _0x146065={};if(_0x2d44b4[_0x34aa44(0x21c)])for(const _0x2c109e of _0x2d44b4[_0x34aa44(0x21c)]){const _0x3de3f9=_0x2c109e[_0x34aa44(0x1fd)](':');if(_0x3de3f9===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x2c109e+_0x34aa44(0x205));const _0x681897=_0x2c109e[_0x34aa44(0x1e7)](0x0,_0x3de3f9)[_0x34aa44(0x24a)](),_0xcb0ed6=_0x2c109e['slice'](_0x3de3f9+0x1)[_0x34aa44(0x24a)]();_0x146065[_0x681897]=_0xcb0ed6;}if(_0x2d44b4[_0x34aa44(0x1dc)]!==undefined&&_0x42d15f[_0x34aa44(0x219)](_0x2d44b4[_0x34aa44(0x1dc)][_0x34aa44(0x24a)](),''))throw new Error(_0x34aa44(0x1fb));if(_0x2d44b4['cdpEndpoint']&&_0x2d44b4[_0x34aa44(0x21d)])throw new Error(_0x34aa44(0x1f7));const _0x5873fd=_0x42d15f['DknrS'](Boolean,_0x2d44b4['cdpEndpoint']),_0x4a79a4=process['stdin'][_0x34aa44(0x1d6)]&&process[_0x34aa44(0x255)][_0x34aa44(0x1d6)];if(!_0x4a79a4&&!_0x2d44b4[_0x34aa44(0x21d)]&&!_0x5873fd&&!_0x2d44b4['skipAuth'])throw new Error(_0x42d15f['CDSeD']);if(_0x5873fd){const _0x37b470=_0x2d44b4[_0x34aa44(0x1dc)];console['log'](_0x42d15f['NUMft']),console[_0x34aa44(0x1d5)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x37b470);const _0xe55dc2={'cdpEndpoint':_0x37b470,'isElectron':!![]};Object[_0x34aa44(0x223)](_0x146065)['length']>0x0&&(_0xe55dc2['setupHeaders']=_0x146065);await createUnconfiguredCloudProfile(_0x4af174,_0xe55dc2);try{setProfileOverride(process['cwd'](),_0x4af174,_0x34aa44(0x1dc),_0x37b470),setProfileOverride(process['cwd'](),_0x4af174,_0x34aa44(0x1fc),!![]);}catch(_0x46989c){console[_0x34aa44(0x21b)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x46989c instanceof Error?_0x46989c['message']:_0x42d15f[_0x34aa44(0x206)](String,_0x46989c)));}console[_0x34aa44(0x1d5)](_0x34aa44(0x204)+_0x4af174+_0x34aa44(0x247)),await _0x42d15f[_0x34aa44(0x206)](sweepOrphansBestEffort,_0x4af174),await markActive(_0x4af174);return;}if(_0x2d44b4['skipAuth']){const _0x12589d={};_0x2d44b4[_0x34aa44(0x21d)]&&(_0x12589d[_0x34aa44(0x1ed)]=_0x2d44b4[_0x34aa44(0x21d)]);_0x42d15f['fHGdE'](Object['keys'](_0x146065)['length'],0x0)&&(_0x12589d['setupHeaders']=_0x146065);await createUnconfiguredCloudProfile(_0x4af174,_0x12589d),console[_0x34aa44(0x1d5)](_0x34aa44(0x23f)+_0x4af174+_0x34aa44(0x230)+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x4af174+_0x34aa44(0x1f9))),await sweepOrphansBestEffort(_0x4af174),await markActive(_0x4af174);return;}if(_0x2d44b4[_0x34aa44(0x21d)]){const _0x73279=_0x2d44b4[_0x34aa44(0x21d)],_0x276a4a=await checkUrlReachability(_0x73279);if(!_0x276a4a['ok']&&!_0x2d44b4['force'])throw new Error(_0x34aa44(0x24c)+_0x73279+':\x20'+_0x276a4a['error']+_0x34aa44(0x248));!_0x276a4a['ok']&&_0x2d44b4['force']&&console[_0x34aa44(0x1d5)]('โš \x20Could\x20not\x20reach\x20'+_0x73279+':\x20'+_0x276a4a[_0x34aa44(0x21b)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x34aa44(0x210)),console[_0x34aa44(0x1d5)](_0x34aa44(0x23e)),console['log'](_0x34aa44(0x1f2));let _0x20f1e5='',_0x2ef3ef=![];while(!![]){const _0x5c3eab=await _0x5135e8[_0x34aa44(0x1e3)]([{'type':_0x34aa44(0x20a),'name':_0x34aa44(0x1ed),'message':_0x2ef3ef?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x34aa44(0x244),'default':_0x42d15f['NXrCy'](_0x20f1e5,_0x34aa44(0x1da))}]);_0x20f1e5=_0x5c3eab[_0x34aa44(0x1ed)];const _0x31045d=await _0x42d15f['DknrS'](checkUrlReachability,_0x20f1e5);if(_0x31045d['ok'])break;const _0x6b0f39=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x20f1e5),_0x405381=_0x31045d[_0x34aa44(0x220)]&&!_0x6b0f39,_0x385cd7=_0x405381?'http://'+_0x20f1e5:null;_0x2ef3ef=!![],console[_0x34aa44(0x1d5)](_0x34aa44(0x228)+_0x20f1e5+':\x20'+_0x31045d['error']);_0x385cd7&&console[_0x34aa44(0x1d5)](_0x34aa44(0x243)+_0x385cd7+'?');const {action:_0x106b04}=await _0x5135e8[_0x34aa44(0x1e3)]([{'type':'list','name':_0x42d15f['fkOgB'],'message':_0x42d15f[_0x34aa44(0x202)],'choices':[..._0x385cd7?[{'name':_0x34aa44(0x259)+_0x385cd7,'value':'use_suggestion'}]:[],{'name':_0x34aa44(0x249),'value':_0x42d15f['aIvXq']},{'name':'Continue\x20anyway','value':_0x42d15f['KUody']}]}]);if(_0x42d15f[_0x34aa44(0x22f)](_0x106b04,'use_suggestion')&&_0x385cd7){_0x20f1e5=_0x385cd7;const _0x4043bd=await _0x42d15f[_0x34aa44(0x206)](checkUrlReachability,_0x20f1e5);if(_0x4043bd['ok'])break;console[_0x34aa44(0x1d5)](_0x34aa44(0x20b)+_0x20f1e5+':\x20'+_0x4043bd['error']);}else{if(_0x42d15f['yQDCY'](_0x106b04,'continue'))break;}}_0x2d44b4={..._0x2d44b4,'url':_0x20f1e5};}let _0x43c8d4=![];try{_0x43c8d4=await tryAutoRouteCloudProfile(_0x4af174,_0x2d44b4['url'],_0x2d44b4,_0x4a79a4,_0x3521ae);}catch(_0x49452a){console['error'](_0x34aa44(0x20d)+_0x4af174+_0x34aa44(0x246)+(_0x42d15f['pwBFB'](_0x49452a,Error)?_0x49452a[_0x34aa44(0x1f8)]:_0x42d15f[_0x34aa44(0x206)](String,_0x49452a))),process[_0x34aa44(0x221)](0x1);}!_0x43c8d4&&process['exit'](0x1),await markActive(_0x4af174);}
@@ -1 +1 @@
1
- (function(_0x443c05,_0x2bd29f){const _0x8dbad8=_0x4c54,_0x5219c8=_0x443c05();while(!![]){try{const _0x498856=-parseInt(_0x8dbad8(0x1f5))/0x1+-parseInt(_0x8dbad8(0x1f4))/0x2*(-parseInt(_0x8dbad8(0x1fd))/0x3)+parseInt(_0x8dbad8(0x204))/0x4*(-parseInt(_0x8dbad8(0x1fa))/0x5)+-parseInt(_0x8dbad8(0x1fc))/0x6+-parseInt(_0x8dbad8(0x205))/0x7*(parseInt(_0x8dbad8(0x202))/0x8)+-parseInt(_0x8dbad8(0x206))/0x9*(parseInt(_0x8dbad8(0x1ff))/0xa)+parseInt(_0x8dbad8(0x1f2))/0xb;if(_0x498856===_0x2bd29f)break;else _0x5219c8['push'](_0x5219c8['shift']());}catch(_0xa188b1){_0x5219c8['push'](_0x5219c8['shift']());}}}(_0xb74b,0xe3b8d));import{readFile,writeFile}from'fs/promises';function _0x4c54(_0x8f01ff,_0x32b949){_0x8f01ff=_0x8f01ff-0x1f2;const _0xb74bd9=_0xb74b();let _0x4c54e3=_0xb74bd9[_0x8f01ff];return _0x4c54e3;}function _0xb74b(){const _0x244e48=['.enc','log','dliYe','\x0aโœ“\x20Encrypted\x20auth\x20saved\x20to:\x20','4497865QJCrDy','nWvKz','5100030wbXZTc','213bBRfbx','\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.','39410jAGdRc','No\x20auth.json\x20found\x20at\x20','auth.json','4958952kVkGjm','OdjSG','4fjmcdW','7Hgsxji','738HNuwCI','\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','xMOUf','41475577dVKzbE','utf-8','22298obteJk','936728TPraVT'];_0xb74b=function(){return _0x244e48;};return _0xb74b();}import{join}from'path';import{existsSync}from'fs';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir}from'./utils/settings.js';export async function authEncrypt(_0x4443dc){const _0x386304=_0x4c54,_0x52ec52={'OdjSG':function(_0x1ae796,_0x382993){return _0x1ae796(_0x382993);},'kFXcK':_0x386304(0x201),'dliYe':function(_0x4d898b,_0x18071d){return _0x4d898b+_0x18071d;},'xMOUf':_0x386304(0x1f3),'nWvKz':function(_0x48db81,_0x533e06,_0x4564b7){return _0x48db81(_0x533e06,_0x4564b7);},'lIGUB':_0x386304(0x208)},_0x64a281=_0x52ec52[_0x386304(0x203)](getEnvDir,_0x4443dc),_0x5b8d5a=join(_0x64a281,_0x52ec52['kFXcK']),_0x3a7ec4=_0x52ec52[_0x386304(0x1f8)](_0x5b8d5a,_0x386304(0x1f6));if(!existsSync(_0x64a281))throw new Error('Profile\x20\x22'+_0x4443dc+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4443dc);if(!_0x52ec52['OdjSG'](existsSync,_0x5b8d5a))throw new Error(_0x386304(0x200)+_0x5b8d5a+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update');const _0x4a5d98=await getToken();if(!_0x4a5d98)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x10c035=await readFile(_0x5b8d5a,_0x52ec52[_0x386304(0x209)]),_0x32e91a=_0x52ec52[_0x386304(0x1fb)](encrypt,_0x10c035,_0x4a5d98);await writeFile(_0x3a7ec4,_0x32e91a),console[_0x386304(0x1f7)](_0x386304(0x1f9)+_0x3a7ec4),console[_0x386304(0x1f7)](_0x52ec52['lIGUB']),console[_0x386304(0x1f7)]('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'),_0x52ec52[_0x386304(0x203)](existsSync,_0x3a7ec4)&&(console[_0x386304(0x1f7)](_0x386304(0x207)),console[_0x386304(0x1f7)](_0x386304(0x1fe)));}
1
+ (function(_0x41c173,_0xca6219){var _0x2b428d=_0x4a9e,_0x10b672=_0x41c173();while(!![]){try{var _0x3472f9=parseInt(_0x2b428d(0x188))/0x1+-parseInt(_0x2b428d(0x194))/0x2*(parseInt(_0x2b428d(0x18c))/0x3)+-parseInt(_0x2b428d(0x193))/0x4+-parseInt(_0x2b428d(0x189))/0x5*(-parseInt(_0x2b428d(0x192))/0x6)+parseInt(_0x2b428d(0x195))/0x7+parseInt(_0x2b428d(0x18b))/0x8+-parseInt(_0x2b428d(0x18a))/0x9*(-parseInt(_0x2b428d(0x190))/0xa);if(_0x3472f9===_0xca6219)break;else _0x10b672['push'](_0x10b672['shift']());}catch(_0x542572){_0x10b672['push'](_0x10b672['shift']());}}}(_0x2a48,0x68ea8));function _0x4a9e(_0x3e1734,_0x4b80aa){_0x3e1734=_0x3e1734-0x188;var _0x2a487e=_0x2a48();var _0x4a9eaf=_0x2a487e[_0x3e1734];return _0x4a9eaf;}function _0x2a48(){var _0x954cf1=['error','57066MHGHfV','3231360yaxsRS','8FmitBn','1014307uTcXHD','gfHgI','588447OgxUcT','145fnEXRW','52524yTrBgG','934760UqncCi','52014KWANNz','\x20\x20https://docs.ranger.net/main/concepts/profiles','exit','cxVDv','310QdDvhP'];_0x2a48=function(){return _0x954cf1;};return _0x2a48();}export async function authEncrypt(_0x56c350){var _0x2b7bb0=_0x4a9e,_0x4f5c2a={'cxVDv':function(_0x48f799,_0x1a2274){return _0x48f799+_0x1a2274;},'gfHgI':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','VqjVq':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','FUxvG':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ezAGB':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','VKhVq':_0x2b7bb0(0x18d)};console[_0x2b7bb0(0x191)](_0x4f5c2a[_0x2b7bb0(0x18f)](_0x4f5c2a['cxVDv'](_0x4f5c2a[_0x2b7bb0(0x196)]+_0x4f5c2a['VqjVq'],'\x0a')+_0x4f5c2a['FUxvG']+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'+'\x0a',_0x4f5c2a['ezAGB'])+_0x4f5c2a['VKhVq']),process[_0x2b7bb0(0x18e)](0x1);}
@@ -1 +1 @@
1
- const _0x29b917=_0x4109;(function(_0x151fae,_0x1099ef){const _0x517398=_0x4109,_0x25ec16=_0x151fae();while(!![]){try{const _0x166b3b=parseInt(_0x517398(0x9d))/0x1+parseInt(_0x517398(0x95))/0x2*(-parseInt(_0x517398(0x84))/0x3)+-parseInt(_0x517398(0xb5))/0x4+parseInt(_0x517398(0xb7))/0x5+parseInt(_0x517398(0x88))/0x6+-parseInt(_0x517398(0xb9))/0x7+parseInt(_0x517398(0x9f))/0x8;if(_0x166b3b===_0x1099ef)break;else _0x25ec16['push'](_0x25ec16['shift']());}catch(_0x29441f){_0x25ec16['push'](_0x25ec16['shift']());}}}(_0x25cd,0xe98be));import{rm,readFile,writeFile}from'fs/promises';function _0x4109(_0x49106b,_0xacbc1b){_0x49106b=_0x49106b-0x80;const _0x25cd27=_0x25cd();let _0x41097e=_0x25cd27[_0x49106b];return _0x41097e;}import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{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';function _0x25cd(){const _0x1675b5=['โœ“\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','8446085OucOwp','hQiEn','5645822PLOngx','filter','zEIYM','โœ“\x20Removed\x20trailhead\x20marketplace','log','ScQsO','pipe','โœ“\x20Removed\x20project\x20skill:\x20','341745JsLmrt','stringify','UpfnD','XLTSQ','4489272egzOEt','vaQfN','DBYDZ','plugin','marketplace','SwRNL','error','push','win32','platform','DARiq','user','xENpY','18zscyjV','string','vkxdB','LmVVo','โœ“\x20Removed\x20stored\x20credentials','project','WJIka','length','396770nritOl','isArray','5819776UwSBiM','EkVdJ','Ihatv','parse','uninstall','โœ“\x20Removed\x20OpenCode\x20project\x20skill:\x20','fQblx','nIaNA','ZwdPB','โœ“\x20Removed\x20.ranger/\x20directory','Sgqei','jOmJs','nGaun','WVfAH','โœ“\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','claude','eHYHL','โœ“\x20Removed\x20OpenCode\x20user\x20skill:\x20','VCrnp','@ranger-testing/opencode-plugin','zcnwY','e2e-test-recommender','3093136iPllqj'];_0x25cd=function(){return _0x1675b5;};return _0x25cd();}const skillsToRemove=['ranger','feature-tracker','bug-bash',_0x29b917(0xb4)],opencodePluginName=_0x29b917(0xb2);function parseJsonc(_0x3abe06){const _0x22fd39=_0x29b917,_0x1867b7=_0x3abe06['replace'](/\/\*[\s\S]*?\*\//g,''),_0x8625d8=_0x1867b7['replace'](/^\s*\/\/.*$/gm,''),_0x1a27d8=_0x8625d8['replace'](/,\s*([}\]])/g,'$1');return JSON[_0x22fd39(0xa2)](_0x1a27d8);}async function removeOpencodePluginConfig(_0x247787){const _0xf9750a=_0x29b917,_0x5ed65f={'LmVVo':function(_0x5212f7,_0x3b8ce1){return _0x5212f7!==_0x3b8ce1;},'eHYHL':function(_0x49e32e,_0x279002){return _0x49e32e!==_0x279002;},'vxuGj':function(_0x1911e8,_0x9d29f7,_0x5f1d35){return _0x1911e8(_0x9d29f7,_0x5f1d35);},'egxam':'utf-8','XLTSQ':function(_0x27efb6,_0x737765){return _0x27efb6===_0x737765;}};if(!existsSync(_0x247787))return![];let _0x1548fc;try{const _0x5e144c=await _0x5ed65f['vxuGj'](readFile,_0x247787,_0x5ed65f['egxam']);_0x1548fc=parseJsonc(_0x5e144c);}catch{return![];}const _0x48b53f=Array[_0xf9750a(0x9e)](_0x1548fc[_0xf9750a(0x8b)])?_0x1548fc[_0xf9750a(0x8b)]:[];if(_0x5ed65f['XLTSQ'](_0x48b53f['length'],0x0))return![];const _0x3c81f4=_0x48b53f[_0xf9750a(0xba)](_0x299117=>{const _0x2781a9=_0xf9750a;if(_0x5ed65f[_0x2781a9(0x98)](typeof _0x299117,_0x2781a9(0x96)))return!![];return _0x5ed65f[_0x2781a9(0xaf)](_0x299117,opencodePluginName);});if(_0x5ed65f['XLTSQ'](_0x3c81f4['length'],_0x48b53f['length']))return![];return _0x5ed65f[_0xf9750a(0x87)](_0x3c81f4[_0xf9750a(0x9c)],0x0)?delete _0x1548fc['plugin']:_0x1548fc[_0xf9750a(0x8b)]=_0x3c81f4,await writeFile(_0x247787,JSON[_0xf9750a(0x85)](_0x1548fc,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x24c8cb){const _0x3a4514=_0x29b917,_0x1b95f4={'ScQsO':'plugin','DARiq':'--scope','vkxdB':'claude','WJIka':'pipe','ZwdPB':function(_0x1fc858,_0x302893){return _0x1fc858===_0x302893;},'fbyQP':_0x3a4514(0x90)};return new Promise(_0x147bb7=>{const _0x560d63=_0x3a4514,_0x23650e={'Sgqei':function(_0x26833a,_0x2f586f){return _0x26833a===_0x2f586f;}},_0x225121=[_0x1b95f4[_0x560d63(0x81)],_0x560d63(0xa3),'ranger@trailhead'];_0x24c8cb&&_0x225121[_0x560d63(0x8f)](_0x1b95f4[_0x560d63(0x92)],_0x24c8cb);const _0x2b5886=spawn(_0x1b95f4[_0x560d63(0x97)],_0x225121,{'stdio':_0x1b95f4[_0x560d63(0x9b)],'shell':_0x1b95f4[_0x560d63(0xa7)](process['platform'],_0x1b95f4['fbyQP'])});_0x2b5886['on']('close',_0x2fab4f=>{const _0x45b13f=_0x560d63;_0x147bb7(_0x23650e[_0x45b13f(0xa9)](_0x2fab4f,0x0));}),_0x2b5886['on'](_0x560d63(0x8e),()=>{_0x147bb7(![]);});});}async function removeMarketplace(){const _0x3522b9=_0x29b917,_0x2d8354={'jPdJT':function(_0x394768,_0x540901){return _0x394768(_0x540901);},'xENpY':function(_0x2cabd1,_0x23cdcf,_0x49d26f,_0x3e198d){return _0x2cabd1(_0x23cdcf,_0x49d26f,_0x3e198d);},'EkVdJ':_0x3522b9(0x8b),'IqzwO':'remove','fZYoB':_0x3522b9(0x90)};return new Promise(_0x549d9e=>{const _0xed36ca=_0x3522b9,_0x268889={'jOmJs':function(_0x456045,_0x500132){return _0x2d8354['jPdJT'](_0x456045,_0x500132);}},_0x3eb3f8=_0x2d8354[_0xed36ca(0x94)](spawn,_0xed36ca(0xae),[_0x2d8354[_0xed36ca(0xa0)],_0xed36ca(0x8c),_0x2d8354['IqzwO'],'trailhead'],{'stdio':_0xed36ca(0x82),'shell':process[_0xed36ca(0x91)]===_0x2d8354['fZYoB']});_0x3eb3f8['on']('close',_0x2a0540=>{_0x549d9e(_0x2a0540===0x0);}),_0x3eb3f8['on']('error',()=>{const _0x45749f=_0xed36ca;_0x268889[_0x45749f(0xaa)](_0x549d9e,![]);});});}export async function clean(){const _0x31ca2b=_0x29b917,_0x9a7c09={'vaQfN':function(_0x1014a4){return _0x1014a4();},'Ihatv':function(_0x11fb26){return _0x11fb26();},'fQblx':function(_0x3cb99f,_0x461d64){return _0x3cb99f(_0x461d64);},'SwRNL':function(_0xffbdb7,_0x41e390,_0xa39e95){return _0xffbdb7(_0x41e390,_0xa39e95);},'VCrnp':_0x31ca2b(0xa8),'hQiEn':function(_0x2e6570){return _0x2e6570();},'UpfnD':function(_0x5b3492,_0x1ae7cf){return _0x5b3492(_0x1ae7cf);},'nGaun':function(_0x50b2a9,_0x308602){return _0x50b2a9(_0x308602);},'yYmbw':function(_0x36f25a,_0x2d1d87){return _0x36f25a(_0x2d1d87);},'xFyJO':_0x31ca2b(0x93),'zEIYM':function(_0x3b9089,_0x2efae7,_0x403102){return _0x3b9089(_0x2efae7,_0x403102);},'zcnwY':'opencode.json','nIaNA':_0x31ca2b(0xb6),'tifea':'โœ“\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','fDVkj':_0x31ca2b(0xad),'XnXLw':function(_0x256e63,_0xb319b3){return _0x256e63(_0xb319b3);},'WVfAH':'project','DBYDZ':'โœ“\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','DrFXz':function(_0x66e298){return _0x66e298();},'ZPJsF':'\x0aโœ…\x20Cleanup\x20complete!\x0a'};console['log']('\x0a๐Ÿงน\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a');let _0x5c3e58=![];try{await _0x9a7c09[_0x31ca2b(0x89)](deleteAllCredentials),console[_0x31ca2b(0x80)](_0x31ca2b(0x99)),_0x5c3e58=!![];}catch{}const _0xc54dd4=_0x9a7c09[_0x31ca2b(0xa1)](getCacheFile);_0x9a7c09['fQblx'](existsSync,_0xc54dd4)&&(await rm(_0xc54dd4),_0x5c3e58=!![]);const _0x42dd65=getRangerDir();_0x9a7c09[_0x31ca2b(0xa5)](existsSync,_0x42dd65)&&(await _0x9a7c09[_0x31ca2b(0x8d)](rm,_0x42dd65,{'recursive':!![]}),console[_0x31ca2b(0x80)](_0x9a7c09[_0x31ca2b(0xb1)]),_0x5c3e58=!![]);const _0x49e17b=_0x9a7c09[_0x31ca2b(0xb8)](getProjectSkillsDir);for(const _0x599028 of skillsToRemove){const _0x2d45c4=join(_0x49e17b,_0x599028);existsSync(_0x2d45c4)&&(await rm(_0x2d45c4,{'recursive':!![]}),console[_0x31ca2b(0x80)](_0x31ca2b(0x83)+_0x599028),_0x5c3e58=!![]);}const _0x24b6dc=getUserSkillsDir();for(const _0x5adc43 of skillsToRemove){const _0x55faeb=_0x9a7c09[_0x31ca2b(0x8d)](join,_0x24b6dc,_0x5adc43);_0x9a7c09[_0x31ca2b(0x86)](existsSync,_0x55faeb)&&(await _0x9a7c09[_0x31ca2b(0x8d)](rm,_0x55faeb,{'recursive':!![]}),console[_0x31ca2b(0x80)]('โœ“\x20Removed\x20user\x20skill:\x20'+_0x5adc43),_0x5c3e58=!![]);}const _0xe8a32e=_0x9a7c09['nGaun'](getOpencodeSkillsDir,'project');for(const _0x233931 of skillsToRemove){const _0x51e243=join(_0xe8a32e,_0x233931);_0x9a7c09['yYmbw'](existsSync,_0x51e243)&&(await _0x9a7c09['SwRNL'](rm,_0x51e243,{'recursive':!![]}),console['log'](_0x31ca2b(0xa4)+_0x233931),_0x5c3e58=!![]);}const _0x492510=getOpencodeSkillsDir(_0x9a7c09['xFyJO']);for(const _0xbdfdd6 of skillsToRemove){const _0x10bb40=_0x9a7c09[_0x31ca2b(0xbb)](join,_0x492510,_0xbdfdd6);_0x9a7c09[_0x31ca2b(0xab)](existsSync,_0x10bb40)&&(await rm(_0x10bb40,{'recursive':!![]}),console[_0x31ca2b(0x80)](_0x31ca2b(0xb0)+_0xbdfdd6),_0x5c3e58=!![]);}const _0x452550=join(getOpencodeConfigDir(_0x31ca2b(0x9a)),_0x9a7c09[_0x31ca2b(0xb3)]);await removeOpencodePluginConfig(_0x452550)&&(console[_0x31ca2b(0x80)](_0x9a7c09[_0x31ca2b(0xa6)]),_0x5c3e58=!![]);const _0x4411e3=_0x9a7c09[_0x31ca2b(0xbb)](join,getOpencodeConfigDir('user'),_0x9a7c09['zcnwY']);await _0x9a7c09['fQblx'](removeOpencodePluginConfig,_0x4411e3)&&(console[_0x31ca2b(0x80)](_0x9a7c09['tifea']),_0x5c3e58=!![]);const _0x376055=await uninstallClaudePlugin();_0x376055&&(console['log'](_0x9a7c09['fDVkj']),_0x5c3e58=!![]);const _0x4cd3f0=await _0x9a7c09['XnXLw'](uninstallClaudePlugin,_0x9a7c09[_0x31ca2b(0xac)]);_0x4cd3f0&&(console['log'](_0x9a7c09[_0x31ca2b(0x8a)]),_0x5c3e58=!![]);const _0x4d2bc4=await _0x9a7c09['DrFXz'](removeMarketplace);_0x4d2bc4&&(console['log'](_0x31ca2b(0xbc)),_0x5c3e58=!![]),_0x5c3e58?console[_0x31ca2b(0x80)](_0x9a7c09['ZPJsF']):console[_0x31ca2b(0x80)]('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ function _0xc3d5(){const _0x3effd6=['win32','14GbFaqu','opencode.json','length','aVnNi','OZCCx','replace','JOacq','bug-bash','project','EVNNT','platform','claude','495393vMBVdV','KORtf','โœ“\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','remove','filter','1948869msyYhr','4111345taFCbJ','@ranger-testing/opencode-plugin','HkpyQ','error','oEtSe','EFOAK','WVblG','RCWQj','โœ“\x20Removed\x20trailhead\x20marketplace','feature-tracker','โœ“\x20Removed\x20.ranger/\x20directory','vFRhl','168747qtHDaW','\x0aโœ…\x20Cleanup\x20complete!\x0a','push','6724896BqOtDa','UusYt','RfZUS','Nothing\x20to\x20clean\x20up.\x0a','log','FNMnk','plugin','2684085wPfkxB','6PSvNrs','yQDcR','YNPSp','user','tAGHh','Ndbkc','e2e-test-recommender','fageb','wJLWn','55680iaaSUK','neUqD','ignore','parse','KxeSh','4AXNFkA','nCaHa','uninstall','close','string','22MbrtPl','8JksWwT'];_0xc3d5=function(){return _0x3effd6;};return _0xc3d5();}const _0x46877b=_0x2973;(function(_0x105f54,_0x38aee9){const _0x4e3c9a=_0x2973,_0x461941=_0x105f54();while(!![]){try{const _0x2afdd3=-parseInt(_0x4e3c9a(0x191))/0x1*(-parseInt(_0x4e3c9a(0x173))/0x2)+-parseInt(_0x4e3c9a(0x17f))/0x3*(parseInt(_0x4e3c9a(0x1aa))/0x4)+-parseInt(_0x4e3c9a(0x19b))/0x5*(-parseInt(_0x4e3c9a(0x19c))/0x6)+-parseInt(_0x4e3c9a(0x185))/0x7+-parseInt(_0x4e3c9a(0x171))/0x8*(-parseInt(_0x4e3c9a(0x184))/0x9)+parseInt(_0x4e3c9a(0x1a5))/0xa*(parseInt(_0x4e3c9a(0x170))/0xb)+-parseInt(_0x4e3c9a(0x194))/0xc;if(_0x2afdd3===_0x38aee9)break;else _0x461941['push'](_0x461941['shift']());}catch(_0xf2792a){_0x461941['push'](_0x461941['shift']());}}}(_0xc3d5,0x9a811));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';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';function _0x2973(_0x1a707b,_0x460746){_0x1a707b=_0x1a707b-0x16d;const _0xc3d5cc=_0xc3d5();let _0x297324=_0xc3d5cc[_0x1a707b];return _0x297324;}import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x46877b(0x18e),_0x46877b(0x17a),_0x46877b(0x1a2)],opencodePluginName=_0x46877b(0x186);function parseJsonc(_0x5cc79b){const _0x155d5e=_0x46877b,_0x287420=_0x5cc79b[_0x155d5e(0x178)](/\/\*[\s\S]*?\*\//g,''),_0x3ae769=_0x287420[_0x155d5e(0x178)](/^\s*\/\/.*$/gm,''),_0xc3b209=_0x3ae769[_0x155d5e(0x178)](/,\s*([}\]])/g,'$1');return JSON[_0x155d5e(0x1a8)](_0xc3b209);}async function removeOpencodePluginConfig(_0x250b36){const _0x336164=_0x46877b,_0x524d66={'vFRhl':_0x336164(0x16f),'UusYt':'utf-8','nCaHa':function(_0x5b2b11,_0x3f7d4e){return _0x5b2b11(_0x3f7d4e);},'LIrnm':function(_0x42ea29,_0x4f1018){return _0x42ea29===_0x4f1018;},'RfZUS':function(_0x1f53c4,_0x1095b4){return _0x1f53c4+_0x1095b4;}};if(!existsSync(_0x250b36))return![];let _0x168bfc;try{const _0x4d55d7=await readFile(_0x250b36,_0x524d66[_0x336164(0x195)]);_0x168bfc=_0x524d66[_0x336164(0x1ab)](parseJsonc,_0x4d55d7);}catch{return![];}const _0x4730ce=Array['isArray'](_0x168bfc[_0x336164(0x19a)])?_0x168bfc[_0x336164(0x19a)]:[];if(_0x524d66['LIrnm'](_0x4730ce[_0x336164(0x175)],0x0))return![];const _0x5a8dbe=_0x4730ce[_0x336164(0x183)](_0x1acb49=>{const _0x226638=_0x336164;if(typeof _0x1acb49!==_0x524d66[_0x226638(0x190)])return!![];return _0x1acb49!==opencodePluginName;});if(_0x5a8dbe[_0x336164(0x175)]===_0x4730ce['length'])return![];return _0x5a8dbe[_0x336164(0x175)]===0x0?delete _0x168bfc[_0x336164(0x19a)]:_0x168bfc['plugin']=_0x5a8dbe,await writeFile(_0x250b36,_0x524d66[_0x336164(0x196)](JSON['stringify'](_0x168bfc,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x3324cb){const _0x24f6bd=_0x46877b,_0x4c7b01={'tAGHh':'--scope','CVYiR':_0x24f6bd(0x17e),'wJLWn':_0x24f6bd(0x1a7),'mFcKO':_0x24f6bd(0x172)};return new Promise(_0x436166=>{const _0x236fbb=_0x24f6bd,_0x46bc38={'neUqD':function(_0x29e5fb,_0x4b63e9){return _0x29e5fb(_0x4b63e9);},'axZsR':function(_0x2fafff,_0x5c8060){return _0x2fafff===_0x5c8060;}},_0x4ba8b2=['plugin',_0x236fbb(0x16d),'ranger@trailhead'];_0x3324cb&&_0x4ba8b2[_0x236fbb(0x193)](_0x4c7b01[_0x236fbb(0x1a0)],_0x3324cb);const _0x33a332=spawn(_0x4c7b01['CVYiR'],_0x4ba8b2,{'stdio':[_0x4c7b01['wJLWn'],_0x4c7b01[_0x236fbb(0x1a4)],_0x4c7b01['wJLWn']],'cwd':_0x3324cb?getProjectRoot():undefined,'shell':process[_0x236fbb(0x17d)]===_0x4c7b01['mFcKO']});_0x33a332['on'](_0x236fbb(0x16e),_0x33e1d7=>{const _0x1b43ce=_0x236fbb;_0x46bc38[_0x1b43ce(0x1a6)](_0x436166,_0x46bc38['axZsR'](_0x33e1d7,0x0));}),_0x33a332['on'](_0x236fbb(0x188),()=>{_0x436166(![]);});});}async function removeMarketplace(){const _0x499c3e={'YNPSp':function(_0x2ed498,_0x3bbb0a){return _0x2ed498(_0x3bbb0a);},'iAbyF':function(_0x2d8be4,_0xa7b1d5,_0x11099d,_0x4d8c56){return _0x2d8be4(_0xa7b1d5,_0x11099d,_0x4d8c56);},'KORtf':'marketplace','oEtSe':'ignore','RRtzO':function(_0x469f53,_0x1c854e){return _0x469f53===_0x1c854e;},'xMHFT':'win32','fRvVp':'close'};return new Promise(_0x4539ca=>{const _0x422e6a=_0x2973,_0x22f47a=_0x499c3e['iAbyF'](spawn,_0x422e6a(0x17e),['plugin',_0x499c3e[_0x422e6a(0x180)],_0x422e6a(0x182),'trailhead'],{'stdio':[_0x499c3e[_0x422e6a(0x189)],_0x422e6a(0x1a7),_0x499c3e[_0x422e6a(0x189)]],'shell':_0x499c3e['RRtzO'](process[_0x422e6a(0x17d)],_0x499c3e['xMHFT'])});_0x22f47a['on'](_0x499c3e['fRvVp'],_0x2408c5=>{_0x4539ca(_0x2408c5===0x0);}),_0x22f47a['on']('error',()=>{const _0x526c26=_0x422e6a;_0x499c3e[_0x526c26(0x19e)](_0x4539ca,![]);});});}export async function clean(){const _0x515bd0=_0x46877b,_0x465e3a={'cdsQQ':'\x0a๐Ÿงน\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','WVblG':function(_0x17b318){return _0x17b318();},'iheKJ':function(_0x23d256,_0x28c650){return _0x23d256(_0x28c650);},'OZCCx':_0x515bd0(0x18f),'WaskG':function(_0xf0d61){return _0xf0d61();},'Ndbkc':function(_0x2a9486,_0x106d88,_0x1e80d4){return _0x2a9486(_0x106d88,_0x1e80d4);},'yQDcR':function(_0x3ce6c6,_0x35af04){return _0x3ce6c6(_0x35af04);},'QbTBj':function(_0x166e54){return _0x166e54();},'EFOAK':function(_0x34c8b8,_0x253b22,_0x45b01d){return _0x34c8b8(_0x253b22,_0x45b01d);},'fageb':_0x515bd0(0x19f),'FNMnk':'project','yGdPo':_0x515bd0(0x174),'KxeSh':function(_0x260c9d,_0x9d32e1){return _0x260c9d(_0x9d32e1);},'JOacq':function(_0x3ec20f,_0x45863c){return _0x3ec20f(_0x45863c);},'aVnNi':function(_0xa76650,_0x215508){return _0xa76650(_0x215508);},'EVNNT':'โœ“\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','RCWQj':'โœ“\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','HkpyQ':'โœ“\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','eAhsF':_0x515bd0(0x18d)};console['log'](_0x465e3a['cdsQQ']);let _0xb05b95=![];try{await _0x465e3a[_0x515bd0(0x18b)](deleteAllCredentials),console['log']('โœ“\x20Removed\x20stored\x20credentials'),_0xb05b95=!![];}catch{}const _0x1a905f=getCacheFile();existsSync(_0x1a905f)&&(await rm(_0x1a905f),_0xb05b95=!![]);const _0x42e0a4=_0x465e3a[_0x515bd0(0x18b)](getRangerDir);_0x465e3a['iheKJ'](existsSync,_0x42e0a4)&&(await rm(_0x42e0a4,{'recursive':!![]}),console[_0x515bd0(0x198)](_0x465e3a[_0x515bd0(0x177)]),_0xb05b95=!![]);const _0x6eaa82=_0x465e3a['WaskG'](getProjectSkillsDir);for(const _0x190d49 of skillsToRemove){const _0x157197=_0x465e3a[_0x515bd0(0x1a1)](join,_0x6eaa82,_0x190d49);_0x465e3a[_0x515bd0(0x19d)](existsSync,_0x157197)&&(await _0x465e3a['Ndbkc'](rm,_0x157197,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20project\x20skill:\x20'+_0x190d49),_0xb05b95=!![]);}const _0x25c08b=_0x465e3a['QbTBj'](getUserSkillsDir);for(const _0x5b3229 of skillsToRemove){const _0x4637e6=_0x465e3a['EFOAK'](join,_0x25c08b,_0x5b3229);existsSync(_0x4637e6)&&(await rm(_0x4637e6,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20user\x20skill:\x20'+_0x5b3229),_0xb05b95=!![]);}const _0x11aeb2=getOpencodeSkillsDir(_0x515bd0(0x17b));for(const _0x5c3def of skillsToRemove){const _0x2862fa=join(_0x11aeb2,_0x5c3def);existsSync(_0x2862fa)&&(await _0x465e3a[_0x515bd0(0x18a)](rm,_0x2862fa,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5c3def),_0xb05b95=!![]);}const _0x454e6f=getOpencodeSkillsDir(_0x465e3a['fageb']);for(const _0x54263d of skillsToRemove){const _0x1a4177=_0x465e3a[_0x515bd0(0x18a)](join,_0x454e6f,_0x54263d);existsSync(_0x1a4177)&&(await _0x465e3a['Ndbkc'](rm,_0x1a4177,{'recursive':!![]}),console['log']('โœ“\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x54263d),_0xb05b95=!![]);}const _0x2de9ce=join(_0x465e3a[_0x515bd0(0x19d)](getOpencodeConfigDir,_0x465e3a['FNMnk']),_0x465e3a['yGdPo']);await _0x465e3a[_0x515bd0(0x1a9)](removeOpencodePluginConfig,_0x2de9ce)&&(console[_0x515bd0(0x198)](_0x515bd0(0x181)),_0xb05b95=!![]);const _0x3b3a89=join(_0x465e3a[_0x515bd0(0x179)](getOpencodeConfigDir,_0x465e3a[_0x515bd0(0x1a3)]),_0x515bd0(0x174));await _0x465e3a[_0x515bd0(0x176)](removeOpencodePluginConfig,_0x3b3a89)&&(console[_0x515bd0(0x198)](_0x465e3a[_0x515bd0(0x17c)]),_0xb05b95=!![]);const _0x2f4fc1=await uninstallClaudePlugin();_0x2f4fc1&&(console['log'](_0x465e3a[_0x515bd0(0x18c)]),_0xb05b95=!![]);const _0x599d6c=await uninstallClaudePlugin(_0x465e3a[_0x515bd0(0x199)]);_0x599d6c&&(console[_0x515bd0(0x198)](_0x465e3a[_0x515bd0(0x187)]),_0xb05b95=!![]);const _0x4965e8=await removeMarketplace();_0x4965e8&&(console[_0x515bd0(0x198)](_0x465e3a['eAhsF']),_0xb05b95=!![]),_0xb05b95?console['log'](_0x515bd0(0x192)):console['log'](_0x515bd0(0x197));}
@@ -1 +1 @@
1
- function _0x46ed(_0x5a02d1,_0x3c6b42){_0x5a02d1=_0x5a02d1-0xf3;const _0x16e1a6=_0x16e1();let _0x46ed3b=_0x16e1a6[_0x5a02d1];return _0x46ed3b;}const _0xfe1c9=_0x46ed;(function(_0x31787e,_0x8ef39b){const _0x48254f=_0x46ed,_0x2aa9af=_0x31787e();while(!![]){try{const _0x5dcc2e=-parseInt(_0x48254f(0x11c))/0x1+-parseInt(_0x48254f(0x11f))/0x2*(-parseInt(_0x48254f(0x10e))/0x3)+-parseInt(_0x48254f(0x11d))/0x4+-parseInt(_0x48254f(0xfa))/0x5*(-parseInt(_0x48254f(0x123))/0x6)+parseInt(_0x48254f(0x112))/0x7+parseInt(_0x48254f(0x109))/0x8*(-parseInt(_0x48254f(0x108))/0x9)+-parseInt(_0x48254f(0x104))/0xa*(parseInt(_0x48254f(0x124))/0xb);if(_0x5dcc2e===_0x8ef39b)break;else _0x2aa9af['push'](_0x2aa9af['shift']());}catch(_0x3c5e88){_0x2aa9af['push'](_0x2aa9af['shift']());}}}(_0x16e1,0x83541));import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,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',_0xfe1c9(0x117)];function parseLocalValue(_0x5733e6,_0xf2111d){const _0x71dc4b=_0xfe1c9,_0x96d022={'UMWkU':function(_0x248c5b,_0x2a255a){return _0x248c5b===_0x2a255a;},'gdVqb':'true'};if(BOOLEAN_KEYS[_0x71dc4b(0x11b)](_0x5733e6)){if(_0x96d022['UMWkU'](_0xf2111d,_0x96d022['gdVqb']))return!![];if(_0xf2111d==='false')return![];throw new Error(_0x71dc4b(0xf3)+_0x5733e6+_0x71dc4b(0xff));}return _0xf2111d;}function parseOverrideValue(_0x22e7de){const _0x50d216=_0xfe1c9,_0x1bdf3b={'bYWoR':'true','rBgCw':function(_0x16c689,_0x3af897){return _0x16c689===_0x3af897;},'XRrQu':function(_0x1dcff4,_0x3c6c79){return _0x1dcff4(_0x3c6c79);}};if(_0x22e7de===_0x1bdf3b[_0x50d216(0x107)])return!![];if(_0x1bdf3b[_0x50d216(0x10f)](_0x22e7de,'false'))return![];if(_0x22e7de==='null')return null;if(_0x22e7de===_0x50d216(0x105))return undefined;if(/^-?\d+$/[_0x50d216(0x115)](_0x22e7de)){const _0x409463=Number(_0x22e7de);if(Number['isSafeInteger'](_0x409463))return _0x409463;}if(/^-?\d+\.\d+$/['test'](_0x22e7de)){const _0x43420d=_0x1bdf3b['XRrQu'](Number,_0x22e7de);if(!Number['isNaN'](_0x43420d))return _0x43420d;}const _0x4c910b=_0x22e7de['trim']();if(_0x4c910b['startsWith']('{')&&_0x4c910b['endsWith']('}')||_0x4c910b['startsWith']('[')&&_0x4c910b['endsWith'](']'))try{return JSON[_0x50d216(0xf7)](_0x4c910b);}catch{}return _0x22e7de;}async function resolveProfileTarget(_0x3ba8a1){const _0x146468=_0xfe1c9,_0x123eee={'RPXUT':function(_0x26130c,_0x56537e){return _0x26130c(_0x56537e);},'RUcSD':function(_0x5a3950,_0x5543e9){return _0x5a3950(_0x5543e9);},'QklNB':'cloud'},_0x25a777=_0x123eee['RPXUT'](existsSync,_0x123eee['RUcSD'](getEnvDir,_0x3ba8a1));let _0x1579f8=![];try{const _0x5a5869=await _0x123eee['RUcSD'](fetchCloudProfile,_0x3ba8a1);_0x1579f8=_0x123eee['RPXUT'](Boolean,_0x5a5869);}catch{}if(_0x1579f8)return{'kind':_0x123eee['QklNB'],'alsoExistsElsewhere':_0x25a777};if(_0x25a777)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error(_0x146468(0x118)+_0x3ba8a1+_0x146468(0xfb)+_0x3ba8a1);}function printDualExistsHint(_0x954e73){const _0x3e2677=_0xfe1c9;console[_0x3e2677(0x10a)](_0x3e2677(0x120)+_0x954e73+_0x3e2677(0x10b));}function _0x16e1(){const _0xc1d792=['(not\x20set)','tCsfS','stringify','parse','YzTOe','cJVQq','27860xNIkfO','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','No\x20configuration\x20set\x20for\x20\x22','BvSaQ','bhvPh',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20=\x20','eBVeQ','settings','qIvPB','40rZlYhJ','undefined','Cleared\x20local\x20overrides\x20for\x20\x22','bYWoR','194490VIIHXZ','88tWiJbw','log','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','\x20for\x20\x22','116553dTFNus','rBgCw','TzGqV','alsoExistsElsewhere','3955798SaRmQI','length','\x22\x20not\x20found','test','Set\x20','allowInsecureLocalhost','Profile\x20\x22','kind','object','includes','649042LWoPZf','659000uJCiKU','npLbf','14hHNwJJ','\x20\x20Note:\x20\x22','PhxKJ','cloud','1098cCgaWs','735141CYLVel','Invalid\x20value\x20for\x20'];_0x16e1=function(){return _0xc1d792;};return _0x16e1();}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x57ae02){const _0x196a2a=_0xfe1c9,_0x8a34fb={'bhvPh':function(_0x15fc30,_0x383df9,_0x380694){return _0x15fc30(_0x383df9,_0x380694);},'iDnqd':function(_0x9a8e61){return _0x9a8e61();},'BvSaQ':function(_0x5b274e,_0xec4423,_0x12dd05){return _0x5b274e(_0xec4423,_0x12dd05);},'npLbf':function(_0x1db2f8,_0x1cd440){return _0x1db2f8??_0x1cd440;}},_0xb586f7=await fetchCloudProfile(_0x57ae02),_0x19ef04=_0x8a34fb[_0x196a2a(0xfe)](readProfileOverrides,_0x8a34fb['iDnqd'](getProjectPath),_0x57ae02);return _0x8a34fb[_0x196a2a(0xfd)](mergeCloudProfileSettings,_0xb586f7?.[_0x196a2a(0x102)]??{},_0x8a34fb[_0x196a2a(0x11e)](_0x19ef04,undefined));}export async function configSet(_0x342b4e,_0x3f6739,_0x676217){const _0x3e0dbb=_0xfe1c9,_0x128678={'eBVeQ':'cloud','TzGqV':function(_0x58b2b2,_0x1ed52d){return _0x58b2b2(_0x1ed52d);},'cJVQq':function(_0x3ce307){return _0x3ce307();},'Nvhou':function(_0x95b50b,_0xabe834,_0x50825b,_0x22e6f8){return _0x95b50b(_0xabe834,_0x50825b,_0x22e6f8);},'rAlBl':function(_0x3f8705,_0x34aebe,_0x3da41b){return _0x3f8705(_0x34aebe,_0x3da41b);}},_0xba5330=await resolveProfileTarget(_0x342b4e);if(_0xba5330[_0x3e0dbb(0x119)]===_0x128678[_0x3e0dbb(0x101)]){if(_0xba5330[_0x3e0dbb(0x111)])printDualExistsHint(_0x342b4e);const _0x204f13=_0x128678['TzGqV'](parseOverrideValue,_0x676217);setProfileOverride(_0x128678[_0x3e0dbb(0xf9)](getProjectPath),_0x342b4e,_0x3f6739,_0x204f13),console[_0x3e0dbb(0x10a)]('Set\x20'+_0x3f6739+'\x20=\x20'+JSON[_0x3e0dbb(0xf6)](_0x204f13)+_0x3e0dbb(0x10d)+_0x342b4e+'\x22');return;}const _0x5aa18b=await _0x128678[_0x3e0dbb(0x110)](loadSettings,_0x342b4e),_0x125d99=parseLocalValue(_0x3f6739,_0x676217);_0x128678['Nvhou'](setNestedValue,_0x5aa18b,_0x3f6739,_0x125d99),await _0x128678['rAlBl'](saveSettings,_0x342b4e,_0x5aa18b),console[_0x3e0dbb(0x10a)](_0x3e0dbb(0x116)+_0x3f6739+_0x3e0dbb(0x100)+_0x125d99+'\x20for\x20\x22'+_0x342b4e+'\x22');}export async function configGet(_0x21c9b3,_0x519ce3){const _0x26e125=_0xfe1c9,_0x45be54={'SZLrr':function(_0x5b3d5f,_0x354f20){return _0x5b3d5f===_0x354f20;},'QGStj':_0x26e125(0x11a)},_0x3b75de=await resolveProfileTarget(_0x21c9b3);if(_0x45be54['SZLrr'](_0x3b75de['kind'],'cloud')){const _0x30ea4e=await loadEffectiveCloudSettings(_0x21c9b3),_0x4c1d07=getNestedValue(_0x30ea4e,_0x519ce3);if(_0x45be54['SZLrr'](_0x4c1d07,undefined))console['log'](_0x26e125(0xf4));else typeof _0x4c1d07===_0x45be54['QGStj']?console[_0x26e125(0x10a)](JSON[_0x26e125(0xf6)](_0x4c1d07,null,0x2)):console[_0x26e125(0x10a)](_0x4c1d07);return;}const _0x55c646=await loadSettings(_0x21c9b3),_0x14b661=getNestedValue(_0x55c646,_0x519ce3);if(_0x45be54['SZLrr'](_0x14b661,undefined))console[_0x26e125(0x10a)]('(not\x20set)');else typeof _0x14b661==='object'?console[_0x26e125(0x10a)](JSON[_0x26e125(0xf6)](_0x14b661,null,0x2)):console[_0x26e125(0x10a)](_0x14b661);}export async function configList(_0x583e2d){const _0x32c243=_0xfe1c9,_0x4262df={'bFrCi':function(_0x318eb5,_0x266350){return _0x318eb5(_0x266350);},'olgZX':function(_0x2bb195,_0x5c3453){return _0x2bb195(_0x5c3453);},'KKAMA':function(_0xa035ce,_0x1ecddb){return _0xa035ce===_0x1ecddb;},'wqQil':function(_0x25b8f7,_0x5057dc){return _0x25b8f7(_0x5057dc);}},_0x3cda34=await _0x4262df['bFrCi'](resolveProfileTarget,_0x583e2d);if(_0x3cda34['kind']===_0x32c243(0x122)){const _0x582eaf=await _0x4262df['olgZX'](loadEffectiveCloudSettings,_0x583e2d);if(!_0x582eaf||_0x4262df['KKAMA'](Object['keys'](_0x582eaf)[_0x32c243(0x113)],0x0)){console[_0x32c243(0x10a)]('No\x20configuration\x20set\x20for\x20\x22'+_0x583e2d+'\x22');return;}console[_0x32c243(0x10a)](JSON['stringify'](_0x582eaf,null,0x2));return;}const _0x4200e0=getSettingsPath(_0x583e2d);if(!existsSync(_0x4200e0)){console[_0x32c243(0x10a)](_0x32c243(0xfc)+_0x583e2d+'\x22');return;}const _0x278ca7=await loadSettings(_0x583e2d),_0xf79d5=_0x4262df['wqQil'](formatSettings,_0x278ca7);!_0xf79d5?console['log'](_0x32c243(0xfc)+_0x583e2d+'\x22'):console[_0x32c243(0x10a)](_0xf79d5);}export async function configUnset(_0x29c173,_0x3d40fd){const _0x5bc41f=_0xfe1c9,_0x5ee9e7={'YzTOe':function(_0x248ead,_0x2d9a21){return _0x248ead(_0x2d9a21);},'qIvPB':function(_0x3ca3d2,_0x132e13){return _0x3ca3d2(_0x132e13);}},_0x3e36e7=await resolveProfileTarget(_0x29c173);if(_0x3e36e7[_0x5bc41f(0x119)]==='cloud'){if(_0x3e36e7[_0x5bc41f(0x111)])_0x5ee9e7[_0x5bc41f(0xf8)](printDualExistsHint,_0x29c173);const _0x2b7a0c=unsetProfileOverride(getProjectPath(),_0x29c173,_0x3d40fd);_0x2b7a0c?console[_0x5bc41f(0x10a)]('Removed\x20'+_0x3d40fd+_0x5bc41f(0x10d)+_0x29c173+'\x22'):console['log']('Key\x20\x22'+_0x3d40fd+_0x5bc41f(0x114));return;}const _0x38d000=await _0x5ee9e7[_0x5bc41f(0x103)](loadSettings,_0x29c173),_0xcffe1c=deleteNestedValue(_0x38d000,_0x3d40fd);_0xcffe1c?(await saveSettings(_0x29c173,_0x38d000),console[_0x5bc41f(0x10a)]('Removed\x20'+_0x3d40fd)):console['log']('Key\x20\x22'+_0x3d40fd+'\x22\x20not\x20found');}export async function configReset(_0x2ad5cf){const _0x46e2ef=_0xfe1c9,_0x4100af={'tCsfS':function(_0x1c9a44,_0xe214be){return _0x1c9a44(_0xe214be);},'PhxKJ':function(_0x47226e,_0x242c07){return _0x47226e===_0x242c07;},'IIGlV':'cloud'},_0x2a9edf=await _0x4100af[_0x46e2ef(0xf5)](resolveProfileTarget,_0x2ad5cf);if(_0x4100af[_0x46e2ef(0x121)](_0x2a9edf['kind'],_0x4100af['IIGlV'])){resetProfileOverrides(getProjectPath(),_0x2ad5cf),console['log'](_0x46e2ef(0x106)+_0x2ad5cf+'\x22');return;}console['log']('\x22'+_0x2ad5cf+_0x46e2ef(0x10c)+_0x2ad5cf+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
1
+ function _0x4486(){const _0x5b3e80=['\x20<key>\x22\x20to\x20remove\x20individual\x20values.','\x20=\x20','FZpzh','Invalid\x20value\x20for\x20','cloud','bKgKy','local','klHDB','(not\x20set)','GmpbJ','1466648TwYlOZ','ePSpF','USXtN','Cleared\x20local\x20overrides\x20for\x20\x22','kGAbn','naTPO','xdsmt','alsoExistsElsewhere','wAOqr','6331810kETQQg','\x22\x20not\x20found','\x20for\x20\x22','8414kfPLhr','iDzov','iCrov','9456hderGy','log','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','Key\x20\x22','5ZkHSkP','7254wMPeYW','CPhoE','kind','1756660ikhHrH','mFkuJ','8886QXuHGa','eyhQd','FJsRf','4520871ANTNMg','headless','false','ejeaf','dbUoj','XRpXR','NdVbY','stringify','wiPSL','Removed\x20','cwd','3993100uHBVvT',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','PJcxY','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','isSafeInteger','undefined','No\x20configuration\x20set\x20for\x20\x22','settings','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','RjFex','\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.','startsWith'];_0x4486=function(){return _0x5b3e80;};return _0x4486();}function _0x278b(_0x3a12cf,_0x1b75fd){_0x3a12cf=_0x3a12cf-0x19f;const _0x448683=_0x4486();let _0x278b5e=_0x448683[_0x3a12cf];return _0x278b5e;}const _0x1dac44=_0x278b;(function(_0x2fffd5,_0x10a33d){const _0x28ca0d=_0x278b,_0x155d39=_0x2fffd5();while(!![]){try{const _0x4e1c12=-parseInt(_0x28ca0d(0x1a2))/0x1+parseInt(_0x28ca0d(0x1c8))/0x2+parseInt(_0x28ca0d(0x1a7))/0x3+parseInt(_0x28ca0d(0x1b2))/0x4*(-parseInt(_0x28ca0d(0x1db))/0x5)+parseInt(_0x28ca0d(0x1a4))/0x6*(parseInt(_0x28ca0d(0x1d4))/0x7)+-parseInt(_0x28ca0d(0x1d7))/0x8*(parseInt(_0x28ca0d(0x19f))/0x9)+parseInt(_0x28ca0d(0x1d1))/0xa;if(_0x4e1c12===_0x10a33d)break;else _0x155d39['push'](_0x155d39['shift']());}catch(_0x3c0fff){_0x155d39['push'](_0x155d39['shift']());}}}(_0x4486,0xe6f4d));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=[_0x1dac44(0x1a8),'allowInsecureLocalhost'];function parseLocalValue(_0x2b5b9f,_0x2500f2){const _0x212a9c=_0x1dac44,_0x44d244={'USXtN':function(_0x4f38f7,_0x2d117b){return _0x4f38f7===_0x2d117b;},'nOWMj':'true','AUZGp':function(_0x364729,_0x3db737){return _0x364729===_0x3db737;},'RjFex':'false'};if(BOOLEAN_KEYS['includes'](_0x2b5b9f)){if(_0x44d244[_0x212a9c(0x1ca)](_0x2500f2,_0x44d244['nOWMj']))return!![];if(_0x44d244['AUZGp'](_0x2500f2,_0x44d244[_0x212a9c(0x1bb)]))return![];throw new Error(_0x212a9c(0x1c1)+_0x2b5b9f+_0x212a9c(0x1b3));}return _0x2500f2;}function parseOverrideValue(_0x3e218f){const _0x55ede8=_0x1dac44,_0x4dc21b={'hgxvJ':'null','wiPSL':function(_0x4174e8,_0x1f9903){return _0x4174e8(_0x1f9903);}};if(_0x3e218f==='true')return!![];if(_0x3e218f===_0x55ede8(0x1a9))return![];if(_0x3e218f===_0x4dc21b['hgxvJ'])return null;if(_0x3e218f===_0x55ede8(0x1b7))return undefined;if(/^-?\d+$/['test'](_0x3e218f)){const _0x5823f8=Number(_0x3e218f);if(Number[_0x55ede8(0x1b6)](_0x5823f8))return _0x5823f8;}if(/^-?\d+\.\d+$/['test'](_0x3e218f)){const _0x4a1f84=_0x4dc21b[_0x55ede8(0x1af)](Number,_0x3e218f);if(!Number['isNaN'](_0x4a1f84))return _0x4a1f84;}const _0x4c0a14=_0x3e218f['trim']();if(_0x4c0a14['startsWith']('{')&&_0x4c0a14['endsWith']('}')||_0x4c0a14[_0x55ede8(0x1bd)]('[')&&_0x4c0a14['endsWith'](']'))try{return JSON['parse'](_0x4c0a14);}catch{}return _0x3e218f;}async function resolveProfileTarget(_0x5c93b8){const _0x4f6825=_0x1dac44,_0x5a2621={'kGAbn':function(_0xb9eeb3,_0x42d7d3){return _0xb9eeb3(_0x42d7d3);},'mFkuJ':function(_0x46725f,_0x586be4){return _0x46725f(_0x586be4);},'mgsim':_0x4f6825(0x1c2)},_0x58c8be=_0x5a2621[_0x4f6825(0x1cc)](existsSync,getEnvDir(_0x5c93b8));let _0xdc2ba0=![];try{const _0x581c55=await _0x5a2621[_0x4f6825(0x1a3)](fetchCloudProfile,_0x5c93b8);_0xdc2ba0=_0x5a2621[_0x4f6825(0x1a3)](Boolean,_0x581c55);}catch{}if(_0xdc2ba0)return{'kind':_0x5a2621['mgsim'],'alsoExistsElsewhere':_0x58c8be};if(_0x58c8be)return{'kind':_0x4f6825(0x1c4),'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x5c93b8+_0x4f6825(0x1ba)+_0x5c93b8);}function printDualExistsHint(_0x5edac3){const _0x6ac1f8=_0x1dac44;console['log']('\x20\x20Note:\x20\x22'+_0x5edac3+_0x6ac1f8(0x1b5));}function getProjectPath(){const _0x5d1e22=_0x1dac44;return process[_0x5d1e22(0x1b1)]();}async function loadEffectiveCloudSettings(_0x55363c){const _0x3bbac9=_0x1dac44,_0x53a284={'eyhQd':function(_0x1c4931,_0x192870){return _0x1c4931(_0x192870);},'QsxRq':function(_0x227147,_0x24c87a,_0x2d002d){return _0x227147(_0x24c87a,_0x2d002d);},'naTPO':function(_0x2af335){return _0x2af335();},'xdsmt':function(_0x3d123c,_0x5d2454){return _0x3d123c??_0x5d2454;}},_0x2de1b4=await _0x53a284[_0x3bbac9(0x1a5)](fetchCloudProfile,_0x55363c),_0x4978d9=_0x53a284['QsxRq'](readProfileOverrides,_0x53a284[_0x3bbac9(0x1cd)](getProjectPath),_0x55363c);return mergeCloudProfileSettings(_0x2de1b4?.[_0x3bbac9(0x1b9)]??{},_0x53a284[_0x3bbac9(0x1ce)](_0x4978d9,undefined));}export async function configSet(_0x10041c,_0x853c10,_0x4b9a3c){const _0x1c2ec6=_0x1dac44,_0x29de32={'CPhoE':function(_0x922a04,_0x104947){return _0x922a04===_0x104947;},'FZpzh':function(_0x5932ab){return _0x5932ab();}},_0x39257d=await resolveProfileTarget(_0x10041c);if(_0x29de32[_0x1c2ec6(0x1a0)](_0x39257d['kind'],_0x1c2ec6(0x1c2))){if(_0x39257d[_0x1c2ec6(0x1cf)])printDualExistsHint(_0x10041c);const _0x3be7cb=parseOverrideValue(_0x4b9a3c);setProfileOverride(getProjectPath(),_0x10041c,_0x853c10,_0x3be7cb),console[_0x1c2ec6(0x1d8)]('Set\x20'+_0x853c10+'\x20=\x20'+JSON['stringify'](_0x3be7cb)+_0x1c2ec6(0x1d3)+_0x10041c+'\x22');return;}const _0x472985=parseLocalValue(_0x853c10,_0x4b9a3c);setProfileOverride(_0x29de32[_0x1c2ec6(0x1c0)](getProjectPath),_0x10041c,_0x853c10,_0x472985),console['log']('Set\x20'+_0x853c10+_0x1c2ec6(0x1bf)+_0x472985+_0x1c2ec6(0x1d3)+_0x10041c+'\x22');}export async function configGet(_0x277ad1,_0x14b9a6){const _0x374a71=_0x1dac44,_0x465f0c={'vTfGF':function(_0x45d3cd,_0xbe631c){return _0x45d3cd(_0xbe631c);},'iCrov':'cloud','gMNDZ':function(_0x121cce,_0x35ab99){return _0x121cce===_0x35ab99;},'ejeaf':'object','PJcxY':function(_0x2870b3,_0x590619,_0x8871d4){return _0x2870b3(_0x590619,_0x8871d4);}},_0x49ef91=await _0x465f0c['vTfGF'](resolveProfileTarget,_0x277ad1);if(_0x49ef91['kind']===_0x465f0c[_0x374a71(0x1d6)]){const _0x2446b0=await loadEffectiveCloudSettings(_0x277ad1),_0x106458=getNestedValue(_0x2446b0,_0x14b9a6);if(_0x106458===undefined)console['log'](_0x374a71(0x1c6));else _0x465f0c['gMNDZ'](typeof _0x106458,_0x465f0c[_0x374a71(0x1aa)])?console['log'](JSON[_0x374a71(0x1ae)](_0x106458,null,0x2)):console['log'](_0x106458);return;}const _0x1081b5=await _0x465f0c['vTfGF'](loadSettings,_0x277ad1),_0x134148=_0x465f0c[_0x374a71(0x1b4)](getNestedValue,_0x1081b5,_0x14b9a6);if(_0x134148===undefined)console[_0x374a71(0x1d8)](_0x374a71(0x1c6));else typeof _0x134148===_0x465f0c['ejeaf']?console[_0x374a71(0x1d8)](JSON['stringify'](_0x134148,null,0x2)):console[_0x374a71(0x1d8)](_0x134148);}export async function configList(_0x207e72){const _0x5dac80=_0x1dac44,_0x48d90b={'FJsRf':function(_0x1b93d8,_0x26e3eb){return _0x1b93d8===_0x26e3eb;},'dbUoj':function(_0x33bfe2,_0x46edc0){return _0x33bfe2(_0x46edc0);},'XRpXR':function(_0x4bb8aa,_0x476d2e){return _0x4bb8aa(_0x476d2e);}},_0x45bca4=await resolveProfileTarget(_0x207e72);if(_0x48d90b[_0x5dac80(0x1a6)](_0x45bca4[_0x5dac80(0x1a1)],'cloud')){const _0x5513de=await _0x48d90b[_0x5dac80(0x1ab)](loadEffectiveCloudSettings,_0x207e72);if(!_0x5513de||_0x48d90b['FJsRf'](Object['keys'](_0x5513de)['length'],0x0)){console[_0x5dac80(0x1d8)]('No\x20configuration\x20set\x20for\x20\x22'+_0x207e72+'\x22');return;}console[_0x5dac80(0x1d8)](JSON['stringify'](_0x5513de,null,0x2));return;}const _0x30e471=getSettingsPath(_0x207e72);if(!_0x48d90b[_0x5dac80(0x1ac)](existsSync,_0x30e471)){console['log'](_0x5dac80(0x1b8)+_0x207e72+'\x22');return;}const _0x546779=await loadSettings(_0x207e72),_0x4cfe81=formatSettings(_0x546779);!_0x4cfe81?console[_0x5dac80(0x1d8)]('No\x20configuration\x20set\x20for\x20\x22'+_0x207e72+'\x22'):console[_0x5dac80(0x1d8)](_0x4cfe81);}export async function configUnset(_0x273832,_0x1241dc){const _0x13f7ea=_0x1dac44,_0x56cd65={'klHDB':function(_0x4a4f29,_0x5cf343){return _0x4a4f29===_0x5cf343;},'psXBX':_0x13f7ea(0x1c2),'iDzov':function(_0x145d7f){return _0x145d7f();},'bKgKy':function(_0x440d6f,_0x2ebc1b){return _0x440d6f(_0x2ebc1b);},'GmpbJ':function(_0x2dd608,_0x333d2c,_0x27e358){return _0x2dd608(_0x333d2c,_0x27e358);}},_0x4d9642=await resolveProfileTarget(_0x273832);if(_0x56cd65[_0x13f7ea(0x1c5)](_0x4d9642[_0x13f7ea(0x1a1)],_0x56cd65['psXBX'])){if(_0x4d9642['alsoExistsElsewhere'])printDualExistsHint(_0x273832);const _0x38cef4=unsetProfileOverride(getProjectPath(),_0x273832,_0x1241dc);_0x38cef4?console[_0x13f7ea(0x1d8)]('Removed\x20'+_0x1241dc+_0x13f7ea(0x1d3)+_0x273832+'\x22'):console['log']('Key\x20\x22'+_0x1241dc+'\x22\x20not\x20found');return;}const _0x23f825=unsetProfileOverride(_0x56cd65[_0x13f7ea(0x1d5)](getProjectPath),_0x273832,_0x1241dc);if(_0x23f825){console['log'](_0x13f7ea(0x1b0)+_0x1241dc);return;}const _0x290a33=await _0x56cd65[_0x13f7ea(0x1c3)](loadSettings,_0x273832),_0x53b09d=_0x56cd65[_0x13f7ea(0x1c7)](deleteNestedValue,_0x290a33,_0x1241dc);_0x53b09d?console['log'](_0x13f7ea(0x1da)+_0x1241dc+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x273832+_0x13f7ea(0x1bc)):console[_0x13f7ea(0x1d8)](_0x13f7ea(0x1da)+_0x1241dc+_0x13f7ea(0x1d2));}export async function configReset(_0x1c3310){const _0x347ccb=_0x1dac44,_0x152bdd={'ePSpF':function(_0x1e34e9,_0x24c1f0){return _0x1e34e9(_0x24c1f0);},'NdVbY':function(_0x4fbcb3,_0x24d048){return _0x4fbcb3===_0x24d048;},'wAOqr':function(_0x440c9e){return _0x440c9e();}},_0x52db9d=await _0x152bdd[_0x347ccb(0x1c9)](resolveProfileTarget,_0x1c3310);if(_0x152bdd[_0x347ccb(0x1ad)](_0x52db9d[_0x347ccb(0x1a1)],'cloud')){resetProfileOverrides(_0x152bdd[_0x347ccb(0x1d0)](getProjectPath),_0x1c3310),console['log'](_0x347ccb(0x1cb)+_0x1c3310+'\x22');return;}console['log']('\x22'+_0x1c3310+_0x347ccb(0x1d9)+_0x1c3310+_0x347ccb(0x1be));}
@@ -1 +1 @@
1
- const _0xd10e3d=_0x4534;(function(_0x5e406b,_0x2d2379){const _0x2d028e=_0x4534,_0x4c7c3e=_0x5e406b();while(!![]){try{const _0x34070e=-parseInt(_0x2d028e(0x19e))/0x1*(parseInt(_0x2d028e(0x1a2))/0x2)+-parseInt(_0x2d028e(0x1a6))/0x3+-parseInt(_0x2d028e(0x1b0))/0x4*(parseInt(_0x2d028e(0x1ac))/0x5)+parseInt(_0x2d028e(0x1a1))/0x6+parseInt(_0x2d028e(0x1a8))/0x7*(parseInt(_0x2d028e(0x1ae))/0x8)+parseInt(_0x2d028e(0x1a4))/0x9*(parseInt(_0x2d028e(0x1a5))/0xa)+parseInt(_0x2d028e(0x1c1))/0xb;if(_0x34070e===_0x2d2379)break;else _0x4c7c3e['push'](_0x4c7c3e['shift']());}catch(_0x11afd7){_0x4c7c3e['push'](_0x4c7c3e['shift']());}}}(_0x1fab,0x5893a));import{readdir,stat}from'fs/promises';function _0x4534(_0x9e75a8,_0x3535f3){_0x9e75a8=_0x9e75a8-0x19b;const _0x1fab0d=_0x1fab();let _0x4534a0=_0x1fab0d[_0x9e75a8];return _0x4534a0;}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';function _0x1fab(){const _0x318167=['CDWGS','.txt','settings.json','sessions','localeCompare','has','\x20\x20\x20\x20\x20\x20Session:\x20','\x20\x20\x20\x20\x20\x20Details:\x20','IDTOy','sessionUpdatedAt','name','13051863CVLofG','QFmos','environmentDetails','push','29fjlrQk','length','CPHCt','1122876QnkQwb','33414jYoPgF','\x0a*\x20=\x20active\x20profile','9RvbNvp','3974330SVzdkC','1349418BVWtxi','local','216517OlOiaI','sort','includes','map','5chxmrB','quoRg','24IqYzQv','isDirectory','2267144sjzGur','\x20[cloud]','startsWith','environmentKey','endsWith','log'];_0x1fab=function(){return _0x318167;};return _0x1fab();}import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0xd10e3d(0x1b9),'bug-bashes','reports',_0xd10e3d(0x1a7),'ci'];export async function getEnvNames(){const _0x22b085=_0xd10e3d,_0x20af88={'uMKwa':function(_0x5d86d4){return _0x5d86d4();},'pLsgl':function(_0x5e00f7,_0x59f16a,_0x29c31e){return _0x5e00f7(_0x59f16a,_0x29c31e);},'mipRM':function(_0x43244b,_0x2e4cca){return _0x43244b(_0x2e4cca);},'quoRg':function(_0x43ce41,_0x867ab5){return _0x43ce41(_0x867ab5);},'IDTOy':function(_0x28b033,_0x52e75a){return _0x28b033(_0x52e75a);},'zCcZb':function(_0x501f03,_0x4a99f0){return _0x501f03(_0x4a99f0);},'CPHCt':function(_0x5af94f,_0x918d13){return _0x5af94f(_0x918d13);},'CDWGS':function(_0x2f52d1,_0x4aca93){return _0x2f52d1(_0x4aca93);},'mGHwH':'legacy'},_0x4549b9=_0x20af88['uMKwa'](getRangerDir);if(!existsSync(_0x4549b9))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x17041a=await readActiveProfileName(),_0x40abdc=[],_0x3d0964={},_0x21f42b=_0x20af88['pLsgl'](join,_0x4549b9,'local');if(_0x20af88['mipRM'](existsSync,_0x21f42b)){const _0x4e3f84=await _0x20af88['quoRg'](readdir,_0x21f42b);for(const _0x1400b2 of _0x4e3f84){const _0xf0ad5e=join(_0x21f42b,_0x1400b2),_0x56c9c3=await _0x20af88[_0x22b085(0x1ad)](stat,_0xf0ad5e);_0x56c9c3[_0x22b085(0x1af)]()&&(_0x40abdc[_0x22b085(0x19d)](_0x1400b2),_0x3d0964[_0x1400b2]=_0x22b085(0x1a7));}}const _0x500b4c=join(_0x4549b9,'ci');if(_0x20af88['IDTOy'](existsSync,_0x500b4c)){const _0x28663d=await _0x20af88['IDTOy'](readdir,_0x500b4c);for(const _0x497495 of _0x28663d){const _0x376831=_0x20af88['pLsgl'](join,_0x500b4c,_0x497495),_0x402db0=await _0x20af88['zCcZb'](stat,_0x376831);_0x402db0[_0x22b085(0x1af)]()&&(_0x40abdc['push'](_0x497495),_0x3d0964[_0x497495]='ci');}}const _0x361234=await _0x20af88[_0x22b085(0x1a0)](readdir,_0x4549b9);for(const _0xc72163 of _0x361234){if(NON_ENV_DIRS[_0x22b085(0x1aa)](_0xc72163))continue;if(_0xc72163[_0x22b085(0x1b2)]('.'))continue;if(_0xc72163[_0x22b085(0x1b4)](_0x22b085(0x1b7)))continue;const _0x218abc=_0x20af88['pLsgl'](join,_0x4549b9,_0xc72163),_0x5362da=await _0x20af88[_0x22b085(0x1be)](stat,_0x218abc);_0x5362da[_0x22b085(0x1af)]()&&_0x20af88[_0x22b085(0x1b6)](existsSync,_0x20af88['pLsgl'](join,_0x218abc,_0x22b085(0x1b8)))&&(!_0x40abdc['includes'](_0xc72163)&&(_0x40abdc[_0x22b085(0x19d)](_0xc72163),_0x3d0964[_0xc72163]=_0x20af88['mGHwH']));}return{'envNames':_0x40abdc,'activeEnv':_0x17041a,'envTypes':_0x3d0964};}export async function envList(){const _0x14cdbf=_0xd10e3d,_0x3e4cb8={'kgqYK':function(_0x40d1bf,_0x416027){return _0x40d1bf===_0x416027;},'fOZRk':'\x0aNo\x20profiles\x20found.','GrEmC':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','UMbME':'\x0aLocal\x20Profiles:','dNBLa':function(_0x4ee1e7,_0x12709a){return _0x4ee1e7>_0x12709a;},'QFmos':'\x0aCloud\x20Profiles:','ZSMCn':'no\x20session'},{envNames:_0x47ad71,activeEnv:_0x56d66b,envTypes:_0x39c349}=await getEnvNames();let _0x654b8e=[];try{_0x654b8e=await listCloudProfiles();}catch{}if(_0x3e4cb8['kgqYK'](_0x47ad71[_0x14cdbf(0x19f)],0x0)&&_0x654b8e[_0x14cdbf(0x19f)]===0x0){console['log'](_0x3e4cb8['fOZRk']),console['log'](_0x3e4cb8['GrEmC']);return;}const _0x14b988=new Set(_0x654b8e[_0x14cdbf(0x1ab)](_0x452ed7=>_0x452ed7['name']));if(_0x47ad71[_0x14cdbf(0x19f)]>0x0){console[_0x14cdbf(0x1b5)](_0x3e4cb8['UMbME']);for(const _0x11f6d4 of _0x47ad71['sort']()){const _0x4543e8=_0x11f6d4===_0x56d66b&&!_0x14b988[_0x14cdbf(0x1bb)](_0x11f6d4),_0x28ef23=_0x39c349[_0x11f6d4]||'local',_0x253fb9=await loadSettings(_0x11f6d4),_0x2956fb=_0x28ef23==='legacy'?'':'\x20['+_0x28ef23+']';console[_0x14cdbf(0x1b5)]('\x20\x20'+(_0x4543e8?'*\x20':'\x20\x20')+_0x11f6d4+_0x2956fb),_0x253fb9['baseUrl']&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x253fb9['baseUrl']),_0x253fb9[_0x14cdbf(0x19c)]&&console[_0x14cdbf(0x1b5)](_0x14cdbf(0x1bd)+_0x253fb9['environmentDetails']);}}if(_0x3e4cb8['dNBLa'](_0x654b8e['length'],0x0)){console['log'](_0x3e4cb8[_0x14cdbf(0x19b)]);for(const _0x46e8c6 of _0x654b8e[_0x14cdbf(0x1a9)]((_0x20c521,_0x9eebf8)=>_0x20c521[_0x14cdbf(0x1c0)][_0x14cdbf(0x1ba)](_0x9eebf8[_0x14cdbf(0x1c0)]))){const _0x1d7c88=_0x3e4cb8['kgqYK'](_0x46e8c6[_0x14cdbf(0x1c0)],_0x56d66b),_0x5f9166=_0x46e8c6['environmentKey']?'\x20('+_0x46e8c6[_0x14cdbf(0x1b3)]+')':'',_0x5a7642=_0x46e8c6['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x46e8c6[_0x14cdbf(0x1bf)]+')':_0x3e4cb8['ZSMCn'];console['log']('\x20\x20'+(_0x1d7c88?'*\x20':'\x20\x20')+_0x46e8c6[_0x14cdbf(0x1c0)]+_0x14cdbf(0x1b1)+_0x5f9166),console['log'](_0x14cdbf(0x1bc)+_0x5a7642);}}_0x56d66b&&console[_0x14cdbf(0x1b5)](_0x14cdbf(0x1a3));}
1
+ const _0x24ca8d=_0x4be0;(function(_0x4131d3,_0x2054f7){const _0xf66305=_0x4be0,_0x405c57=_0x4131d3();while(!![]){try{const _0x42a352=parseInt(_0xf66305(0x1ae))/0x1+-parseInt(_0xf66305(0x1a8))/0x2*(-parseInt(_0xf66305(0x19b))/0x3)+-parseInt(_0xf66305(0x19a))/0x4+-parseInt(_0xf66305(0x197))/0x5+-parseInt(_0xf66305(0x18f))/0x6*(parseInt(_0xf66305(0x19c))/0x7)+parseInt(_0xf66305(0x184))/0x8*(parseInt(_0xf66305(0x18c))/0x9)+-parseInt(_0xf66305(0x193))/0xa*(parseInt(_0xf66305(0x19f))/0xb);if(_0x42a352===_0x2054f7)break;else _0x405c57['push'](_0x405c57['shift']());}catch(_0x52ed48){_0x405c57['push'](_0x405c57['shift']());}}}(_0x433c,0xbc644));import{readdir,stat}from'fs/promises';function _0x4be0(_0x558f31,_0x12fa5a){_0x558f31=_0x558f31-0x184;const _0x433c5f=_0x433c();let _0x4be003=_0x433c5f[_0x558f31];return _0x4be003;}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';function _0x433c(){const _0x26e657=['1377iGKoXD','MApLD','has','1268214tSWbgB','\x20\x20\x20\x20\x20\x20Session:\x20','IWyjG','sessions','667210BbEDSN','qsAZL','name','sort','539325UdBmKO','log','\x20[cloud]','4847796VYVMTi','7053hOudRj','7qELMRx','endsWith','JqkOX','44AXavhV','\x20\x20\x20\x20\x20\x20Details:\x20','sessionUpdatedAt','bug-bashes','\x20\x20\x20\x20\x20\x20URL:\x20','zQjAG','local','legacy','environmentKey','210LqPgmM','length','RYNTK','map','startsWith','\x0aNo\x20profiles\x20found.','817650NYANIu','78704ASACvZ','mkFGI','isDirectory','aqRXE','\x0aCloud\x20Profiles:','environmentDetails','includes','AmpuE'];_0x433c=function(){return _0x26e657;};return _0x433c();}import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x24ca8d(0x192),_0x24ca8d(0x1a2),'reports','local','ci'];export async function getEnvNames(){const _0x4d0fe7=_0x24ca8d,_0x458e06={'MApLD':_0x4d0fe7(0x1a5),'aqRXE':function(_0x5b9d95,_0x2873c6,_0x625925){return _0x5b9d95(_0x2873c6,_0x625925);},'RYNTK':function(_0x77120b,_0x443e5a){return _0x77120b(_0x443e5a);},'JqkOX':function(_0x3638e7,_0x43e7fd,_0x16d713){return _0x3638e7(_0x43e7fd,_0x16d713);},'AmpuE':'settings.json'},_0x271088=getRangerDir();if(!existsSync(_0x271088))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x1bd481=await readActiveProfileName(),_0x53911f=[],_0x36344a={},_0x3c9707=join(_0x271088,_0x458e06[_0x4d0fe7(0x18d)]);if(existsSync(_0x3c9707)){const _0x500929=await readdir(_0x3c9707);for(const _0x45ae67 of _0x500929){const _0x50c2be=_0x458e06['aqRXE'](join,_0x3c9707,_0x45ae67),_0x608227=await stat(_0x50c2be);_0x608227[_0x4d0fe7(0x186)]()&&(_0x53911f['push'](_0x45ae67),_0x36344a[_0x45ae67]=_0x4d0fe7(0x1a5));}}const _0x3ae227=_0x458e06['aqRXE'](join,_0x271088,'ci');if(existsSync(_0x3ae227)){const _0x342005=await _0x458e06[_0x4d0fe7(0x1aa)](readdir,_0x3ae227);for(const _0xffc43e of _0x342005){const _0x6e4a29=_0x458e06['JqkOX'](join,_0x3ae227,_0xffc43e),_0x1142a7=await _0x458e06[_0x4d0fe7(0x1aa)](stat,_0x6e4a29);_0x1142a7[_0x4d0fe7(0x186)]()&&(_0x53911f['push'](_0xffc43e),_0x36344a[_0xffc43e]='ci');}}const _0xa8ac67=await _0x458e06[_0x4d0fe7(0x1aa)](readdir,_0x271088);for(const _0x1672db of _0xa8ac67){if(NON_ENV_DIRS[_0x4d0fe7(0x18a)](_0x1672db))continue;if(_0x1672db[_0x4d0fe7(0x1ac)]('.'))continue;if(_0x1672db[_0x4d0fe7(0x19d)]('.txt'))continue;const _0x493160=_0x458e06[_0x4d0fe7(0x187)](join,_0x271088,_0x1672db),_0x3c0658=await _0x458e06[_0x4d0fe7(0x1aa)](stat,_0x493160);_0x3c0658[_0x4d0fe7(0x186)]()&&existsSync(_0x458e06[_0x4d0fe7(0x19e)](join,_0x493160,_0x458e06[_0x4d0fe7(0x18b)]))&&(!_0x53911f['includes'](_0x1672db)&&(_0x53911f['push'](_0x1672db),_0x36344a[_0x1672db]=_0x4d0fe7(0x1a6)));}return{'envNames':_0x53911f,'activeEnv':_0x1bd481,'envTypes':_0x36344a};}export async function envList(){const _0x491602=_0x24ca8d,_0x35dfcd={'mkFGI':function(_0x3578e7){return _0x3578e7();},'qsAZL':function(_0x3f7e5d,_0x419dde){return _0x3f7e5d>_0x419dde;},'zQjAG':'\x0aLocal\x20Profiles:','RqEuy':_0x491602(0x1a5),'IWyjG':function(_0x307b3b,_0x13a6f0){return _0x307b3b(_0x13a6f0);},'anhMu':function(_0x2576e5,_0x1b939a){return _0x2576e5===_0x1b939a;},'nksfP':_0x491602(0x1a6),'umLEP':function(_0x5df176,_0x59c329){return _0x5df176>_0x59c329;},'nfqwt':'no\x20session'},{envNames:_0x4082c1,activeEnv:_0x416bf7,envTypes:_0x475adf}=await _0x35dfcd[_0x491602(0x185)](getEnvNames);let _0x45226e=[];try{_0x45226e=await _0x35dfcd[_0x491602(0x185)](listCloudProfiles);}catch{}if(_0x4082c1[_0x491602(0x1a9)]===0x0&&_0x45226e['length']===0x0){console['log'](_0x491602(0x1ad)),console[_0x491602(0x198)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x4ab769=new Set(_0x45226e[_0x491602(0x1ab)](_0xc4fa97=>_0xc4fa97['name']));if(_0x35dfcd[_0x491602(0x194)](_0x4082c1['length'],0x0)){console[_0x491602(0x198)](_0x35dfcd[_0x491602(0x1a4)]);for(const _0x57bf66 of _0x4082c1[_0x491602(0x196)]()){const _0x125fab=_0x57bf66===_0x416bf7&&!_0x4ab769[_0x491602(0x18e)](_0x57bf66),_0x2eaf33=_0x475adf[_0x57bf66]||_0x35dfcd['RqEuy'],_0x545d80=await _0x35dfcd[_0x491602(0x191)](loadSettings,_0x57bf66),_0xfd5a8d=_0x35dfcd['anhMu'](_0x2eaf33,_0x35dfcd['nksfP'])?'':'\x20['+_0x2eaf33+']';console['log']('\x20\x20'+(_0x125fab?'*\x20':'\x20\x20')+_0x57bf66+_0xfd5a8d),_0x545d80['baseUrl']&&console[_0x491602(0x198)](_0x491602(0x1a3)+_0x545d80['baseUrl']),_0x545d80[_0x491602(0x189)]&&console['log'](_0x491602(0x1a0)+_0x545d80['environmentDetails']);}}if(_0x35dfcd['umLEP'](_0x45226e[_0x491602(0x1a9)],0x0)){console['log'](_0x491602(0x188));for(const _0x53adad of _0x45226e[_0x491602(0x196)]((_0x297e4e,_0x3d614d)=>_0x297e4e[_0x491602(0x195)]['localeCompare'](_0x3d614d['name']))){const _0x4452cc=_0x53adad[_0x491602(0x195)]===_0x416bf7,_0x22336a=_0x53adad[_0x491602(0x1a7)]?'\x20('+_0x53adad['environmentKey']+')':'',_0x152af8=_0x53adad[_0x491602(0x1a1)]?'cached\x20(updated\x20'+_0x53adad[_0x491602(0x1a1)]+')':_0x35dfcd['nfqwt'];console[_0x491602(0x198)]('\x20\x20'+(_0x4452cc?'*\x20':'\x20\x20')+_0x53adad['name']+_0x491602(0x199)+_0x22336a),console[_0x491602(0x198)](_0x491602(0x190)+_0x152af8);}}_0x416bf7&&console['log']('\x0a*\x20=\x20active\x20profile');}