@ranger-testing/ranger-cli 3.0.1-alpha.aab0a1c-26 → 3.0.1-alpha.f6aba6c-32

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 (84) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -0
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -0
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/sessionCache.js +1 -1
  71. package/build/commands/utils/settings.js +1 -1
  72. package/build/commands/utils/skillContent.js +1 -1
  73. package/build/commands/utils/skills.js +1 -1
  74. package/build/commands/utils/stitchWebmFiles.js +1 -1
  75. package/build/commands/utils/telemetry.js +1 -1
  76. package/build/commands/utils/tokenRefresh.js +1 -1
  77. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  78. package/build/commands/utils/userApi.js +1 -1
  79. package/build/commands/utils/version.js +1 -1
  80. package/build/commands/verifyFeature.js +1 -1
  81. package/build/commands/verifyFeatureCli.js +1 -1
  82. package/build/commands/verifyFeatureNovaCli.js +1 -1
  83. package/build/commands/verifyFeatureRangerwrightCli.js +1 -0
  84. package/package.json +3 -2
@@ -1 +1 @@
1
- function _0x35c2(_0xbf9b3b,_0x1705f6){_0xbf9b3b=_0xbf9b3b-0x1cf;const _0x2527fd=_0x2527();let _0x35c22a=_0x2527fd[_0xbf9b3b];return _0x35c22a;}(function(_0x5b4770,_0x318645){const _0x1c7dcc=_0x35c2,_0x2ca36d=_0x5b4770();while(!![]){try{const _0x56fd50=-parseInt(_0x1c7dcc(0x1d1))/0x1+parseInt(_0x1c7dcc(0x1d3))/0x2*(parseInt(_0x1c7dcc(0x1d9))/0x3)+-parseInt(_0x1c7dcc(0x1d0))/0x4+-parseInt(_0x1c7dcc(0x1d4))/0x5+parseInt(_0x1c7dcc(0x1dd))/0x6*(parseInt(_0x1c7dcc(0x1de))/0x7)+parseInt(_0x1c7dcc(0x1d5))/0x8*(-parseInt(_0x1c7dcc(0x1d8))/0x9)+-parseInt(_0x1c7dcc(0x1df))/0xa*(-parseInt(_0x1c7dcc(0x1d2))/0xb);if(_0x56fd50===_0x318645)break;else _0x2ca36d['push'](_0x2ca36d['shift']());}catch(_0x61720c){_0x2ca36d['push'](_0x2ca36d['shift']());}}}(_0x2527,0xde6c4));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x2527(){const _0x568a38=['6016328VdljZE','log','Login\x20failed:\x20','9IPPBNM','155667aKHxLk','Re-authenticating\x20via\x20MCP\x20bootstrap...','ffjZd','\x0a✅\x20Logged\x20in\x20to\x20','30KMYnxP','2300186ZrGHBW','8570GgYVMs','organizationName','success','6705480YEFgzn','935206qclgLT','35563DgRfak','16Gsxehq','2770610fnGwZG'];_0x2527=function(){return _0x568a38;};return _0x2527();}export async function login(){const _0x37c8af=_0x35c2,_0x4c32e5={'ffjZd':_0x37c8af(0x1da),'melut':function(_0x45b256){return _0x45b256();},'jYopU':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','bXJfK':'\x0a✅\x20API\x20key\x20stored\x20successfully'},_0x166909=await getMcpAuthOrigin();if(_0x166909){console[_0x37c8af(0x1d6)](_0x4c32e5[_0x37c8af(0x1db)]),await mcpBootstrap();return;}if(!_0x4c32e5['melut'](isInteractive))throw new Error(_0x4c32e5['jYopU']);try{const _0x2b64d0=await _0x4c32e5['melut'](runDeviceAuthFlow),_0x4fb8ed=await getCurrentUser(_0x2b64d0);_0x4fb8ed[_0x37c8af(0x1cf)]?console['log'](_0x37c8af(0x1dc)+_0x4fb8ed['user'][_0x37c8af(0x1e0)]):console['log'](_0x4c32e5['bXJfK']);}catch(_0x306620){throw new Error(_0x37c8af(0x1d7)+(_0x306620 instanceof Error?_0x306620['message']:_0x306620));}}
1
+ (function(_0x2a0ba2,_0x529f92){const _0x21c2d8=_0x4326,_0x13304e=_0x2a0ba2();while(!![]){try{const _0x3abc3a=-parseInt(_0x21c2d8(0xec))/0x1*(parseInt(_0x21c2d8(0xf2))/0x2)+-parseInt(_0x21c2d8(0xf6))/0x3*(-parseInt(_0x21c2d8(0xe8))/0x4)+parseInt(_0x21c2d8(0xef))/0x5*(parseInt(_0x21c2d8(0xea))/0x6)+-parseInt(_0x21c2d8(0xf5))/0x7+parseInt(_0x21c2d8(0xe7))/0x8*(parseInt(_0x21c2d8(0xe9))/0x9)+-parseInt(_0x21c2d8(0xf4))/0xa*(parseInt(_0x21c2d8(0xe6))/0xb)+-parseInt(_0x21c2d8(0xf0))/0xc;if(_0x3abc3a===_0x529f92)break;else _0x13304e['push'](_0x13304e['shift']());}catch(_0x270a7a){_0x13304e['push'](_0x13304e['shift']());}}}(_0xdad1,0x5b3be));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x4326(_0x306595,_0x4652b0){_0x306595=_0x306595-0xe5;const _0xdad11f=_0xdad1();let _0x4326e1=_0xdad11f[_0x306595];return _0x4326e1;}import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0xdad1(){const _0x246249=['2082198BdvyXi','mYPJK','\x0a✅\x20Logged\x20in\x20to\x20','tLZCL','1767821vTnHPy','16QflqeR','4gYPGvk','3024783plDzmM','6RsqdpV','\x0a✅\x20API\x20key\x20stored\x20successfully','676743lkUTFo','MSzAT','Re-authenticating\x20via\x20MCP\x20bootstrap...','3316405mGllbp','9681420GctUVZ','oErtP','2vurkgV','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','10RTvTtj','81116ESKyzg'];_0xdad1=function(){return _0x246249;};return _0xdad1();}export async function login(){const _0xd49a00=_0x4326,_0x96b2d5={'MSzAT':_0xd49a00(0xee),'oErtP':function(_0x30ce90){return _0x30ce90();},'mYPJK':_0xd49a00(0xf3),'tLZCL':_0xd49a00(0xeb),'riuRb':function(_0x1f6d99,_0x1741ed){return _0x1f6d99 instanceof _0x1741ed;}},_0x2a3d58=await getMcpAuthOrigin();if(_0x2a3d58){console['log'](_0x96b2d5[_0xd49a00(0xed)]),await _0x96b2d5[_0xd49a00(0xf1)](mcpBootstrap);return;}if(!_0x96b2d5['oErtP'](isInteractive))throw new Error(_0x96b2d5[_0xd49a00(0xf7)]);try{const _0x74fcad=await runDeviceAuthFlow(),_0xa991d=await getCurrentUser(_0x74fcad);_0xa991d['success']?console['log'](_0xd49a00(0xf8)+_0xa991d['user']['organizationName']):console['log'](_0x96b2d5[_0xd49a00(0xe5)]);}catch(_0x1f7d45){throw new Error('Login\x20failed:\x20'+(_0x96b2d5['riuRb'](_0x1f7d45,Error)?_0x1f7d45['message']:_0x1f7d45));}}
@@ -1 +1 @@
1
- const _0x419226=_0x5ecb;(function(_0x539b40,_0x40f1f0){const _0x5bd845=_0x5ecb,_0xda3602=_0x539b40();while(!![]){try{const _0x47f1d2=parseInt(_0x5bd845(0x148))/0x1+parseInt(_0x5bd845(0x10f))/0x2*(-parseInt(_0x5bd845(0x146))/0x3)+-parseInt(_0x5bd845(0x11a))/0x4*(-parseInt(_0x5bd845(0xbb))/0x5)+parseInt(_0x5bd845(0x10a))/0x6+-parseInt(_0x5bd845(0x133))/0x7+parseInt(_0x5bd845(0x150))/0x8*(parseInt(_0x5bd845(0x111))/0x9)+-parseInt(_0x5bd845(0x10e))/0xa*(-parseInt(_0x5bd845(0xe4))/0xb);if(_0x47f1d2===_0x40f1f0)break;else _0xda3602['push'](_0xda3602['shift']());}catch(_0x179560){_0xda3602['push'](_0xda3602['shift']());}}}(_0x1596,0xb2940));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),'.ranger',_0x419226(0x12d)),AUTH_ORIGIN_PATH=join(homedir(),_0x419226(0xd3),_0x419226(0x102));export async function getMcpAuthOrigin(){const _0xfc1d31=_0x419226;try{const _0x316c5e=(await readFile(AUTH_ORIGIN_PATH,'utf-8'))[_0xfc1d31(0x127)]();return _0x316c5e||null;}catch{return null;}}export async function mcpBootstrap(){const _0x2ecbc4=_0x419226,_0x407733={'kxCvF':function(_0x48dc62,_0x8eae1d){return _0x48dc62(_0x8eae1d);},'pgVry':_0x2ecbc4(0xc7),'sBIus':function(_0x20a8a4,_0x12d6ef){return _0x20a8a4(_0x12d6ef);}},_0x514931=getMcpAuthUrl();currentOrigin=_0x514931;const _0x22cc9b=process['stdout'][_0x2ecbc4(0xd4)]??![];console['log']('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x514931+'\x0a');const _0x4b4ba8=await _0x407733['kxCvF'](tryUnauthenticated,_0x514931);let _0x3b5ab8=null;if(_0x4b4ba8===_0x2ecbc4(0x131))_0x3b5ab8='';else{_0x3b5ab8=await loadCachedToken();if(!_0x3b5ab8){if(!_0x22cc9b)throw new Error(_0x407733[_0x2ecbc4(0xd8)]+'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.');_0x3b5ab8=await _0x407733['sBIus'](oauthFlow,_0x514931);}}await callGetCliToken(_0x514931,_0x3b5ab8);}async function tryUnauthenticated(_0x3aa773){const _0x35b0b3=_0x419226,_0x4decd6={'DWifG':_0x35b0b3(0x106),'yhajD':'application/json','xDElL':_0x35b0b3(0xea),'qBDwj':_0x35b0b3(0xdb),'WOOvI':_0x35b0b3(0x114),'aBmbF':'ranger-cli','cWsWN':_0x35b0b3(0xfd),'JRHIz':_0x35b0b3(0x131)},_0x78b92e=await fetch(_0x3aa773,{'method':_0x4decd6[_0x35b0b3(0x147)],'headers':{'Content-Type':_0x4decd6['yhajD'],'Accept':_0x4decd6[_0x35b0b3(0xe0)]},'body':JSON[_0x35b0b3(0x101)]({'jsonrpc':_0x4decd6['qBDwj'],'id':0x1,'method':_0x4decd6[_0x35b0b3(0xc4)],'params':{'protocolVersion':'2025-03-26','capabilities':{},'clientInfo':{'name':_0x4decd6['aBmbF'],'version':_0x4decd6['cWsWN']}}})});if(_0x78b92e['ok'])return await _0x78b92e[_0x35b0b3(0xeb)](),_0x4decd6['JRHIz'];if(_0x78b92e['status']===0x191)return await _0x78b92e[_0x35b0b3(0xeb)](),'needs-oauth';const _0x5b3cef=await _0x78b92e[_0x35b0b3(0xeb)]();throw new Error(_0x35b0b3(0x112)+_0x78b92e[_0x35b0b3(0x140)]+':\x20'+_0x5b3cef);}function _0x1596(){const _0x256285=['utf-8','split','eCYtL','token','.ranger','isTTY','<html><body><h2>Authentication\x20failed</h2><p>','none','nnFcz','pgVry','now','HTTP\x20','2.0','replace','client_secret','client_id','sqUJO','xDElL','HMNOM','Ranger\x20CLI','write','33mWFwfi','platform','expiresAt','searchParams','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','FwlZs','application/json,\x20text/event-stream','text','type','rKJod','MCP\x20initialize\x20failed:\x20','SWnjR','application/x-www-form-urlencoded','WPTQE','bDhMH','open','sBEnw','\x0aUnexpected\x20response\x20structure:','content','content-type','then','oYoHR','<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','opnzg','match','1.0.0','string','access_token','code','stringify','auth-origin.txt','OaGlp','tools/call','Discovering\x20authorization\x20server...','POST','xVirB','\x0aOpening\x20browser\x20for\x20authentication...','VkXzp','2726790ntRnmk','Initializing\x20MCP\x20session...','MptHM','kSaLs','1956330hNyzzc','2vRfjkd','bGgVQ','522BOwHrA','MCP\x20server\x20returned\x20HTTP\x20','qIVYK','initialize','accessToken','OAuth\x20error:\x20','slice','clientId','<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','884616LypmUt','text/html','parse','url','CNSgQ','VJkLk','/callback','KBFLI','refresh_token','start','igxsf','writeHead','Requesting\x20CLI\x20token...','trim','omGyz','XHjfD','Tqcwi','RugcX','\x20done','mcp-oauth-tokens.json','origin','expires_in','resource','proxied','toString','9695476YwNsMc','data:','sha256','JqLQm','http://localhost:','application/json','S256','set','get_cli_token\x20failed:\x20','AFARq','NrZcL','stdout','error','status','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','Authorization','PzooR','result','nbnYC','3398757SHExuZ','DWifG','626825uwplFN','127.0.0.1','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','code_challenge','Token\x20exchange\x20failed:\x20','clientSecret','qeXgN','digest','157096YRdvJV','WzPUy','OhDzR','sOqsm','10wcFndr','log','qLuMP','dfhYS','error_description','kTuoS','bUXgw','sfrqr','get','WOOvI','end','authorization_servers','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','state','code_challenge_method','mVGst','length','text/event-stream','\x0aToken\x20written\x20to\x20','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found'];_0x1596=function(){return _0x256285;};return _0x1596();}class OAuthTimeoutError extends Error{constructor(_0x43fcb3){const _0x1b6a1d=_0x419226,_0x36b176={'MptHM':'OAuthTimeoutError'};super(_0x43fcb3),this['name']=_0x36b176[_0x1b6a1d(0x10c)];}}async function oauthFlow(_0xa17684){const _0x2e4fd8={'meCNz':function(_0xdc3606){return _0xdc3606();},'rbYbD':function(_0x1c0b67){return _0x1c0b67();}};try{return await oauthFlowAttempt(_0xa17684);}catch(_0x2385a0){if(_0x2385a0 instanceof OAuthTimeoutError&&await _0x2e4fd8['meCNz'](loadCachedClient))return console['log']('\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a'),await _0x2e4fd8['rbYbD'](clearCachedClient),await oauthFlowAttempt(_0xa17684);throw _0x2385a0;}}async function oauthFlowAttempt(_0x2cbbc){const _0x13d536=_0x419226,_0x428edd={'VkXzp':function(_0x18a0a5,_0xcf4e5e){return _0x18a0a5(_0xcf4e5e);},'RugcX':'Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','igxsf':'POST','bGgVQ':_0x13d536(0x138),'MnbHZ':_0x13d536(0xe2),'faXzD':_0x13d536(0xd6),'WPTQE':_0x13d536(0xce),'AFARq':'base64url','oPNdp':'client_id','oYoHR':'redirect_uri','kTuoS':_0x13d536(0xc9),'gTBhS':_0x13d536(0x130),'rvgOz':function(_0x145916,_0x466bc0){return _0x145916(_0x466bc0);},'Tqcwi':'Exchanging\x20authorization\x20code...','GPIeC':'authorization_code','WzPUy':function(_0x4ba49b,_0x3768cb,_0x5a5b65){return _0x4ba49b(_0x3768cb,_0x5a5b65);},'XIdTG':_0x13d536(0xf0),'sfrqr':function(_0x127d7f,_0x2e4f79,_0x3ba3ac,_0x16ce71){return _0x127d7f(_0x2e4f79,_0x3ba3ac,_0x16ce71);}},_0x487511=_0x2cbbc[_0x13d536(0xdc)](/\/mcp$/,'');process[_0x13d536(0x13e)]['write'](_0x13d536(0x105));const _0x35eaf1=await _0x428edd['VkXzp'](fetch,_0x487511+'/.well-known/oauth-protected-resource');if(!_0x35eaf1['ok'])throw new Error(_0x428edd[_0x13d536(0x12b)]);const _0x2010c5=await _0x35eaf1['json'](),_0x29a08c=_0x2010c5[_0x13d536(0xc6)]?.[0x0];if(!_0x29a08c)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console['log']('\x20'+_0x29a08c);const _0x502b13=await _0x428edd[_0x13d536(0x109)](fetchAuthServerMetadata,_0x29a08c);let _0x249c92,_0x489945;const _0x3b5236=await loadCachedClient();if(_0x3b5236)_0x249c92=_0x3b5236[_0x13d536(0x118)],_0x489945=_0x3b5236[_0x13d536(0x14d)];else{if(_0x502b13['registration_endpoint']){process[_0x13d536(0x13e)]['write']('Registering\x20OAuth\x20client...');const _0x5c3c83=await fetch(_0x502b13['registration_endpoint'],{'method':_0x428edd[_0x13d536(0x124)],'headers':{'Content-Type':_0x428edd[_0x13d536(0x110)]},'body':JSON['stringify']({'client_name':_0x428edd['MnbHZ'],'redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x13d536(0x120)],'grant_types':['authorization_code',_0x13d536(0x122)],'response_types':[_0x13d536(0x100)],'token_endpoint_auth_method':_0x428edd['faXzD']})});if(!_0x5c3c83['ok']){const _0x4516d4=await _0x5c3c83['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x4516d4);}const _0x1d8e9b=await _0x5c3c83['json']();_0x249c92=_0x1d8e9b[_0x13d536(0xde)],_0x489945=_0x1d8e9b['client_secret'],await saveCachedClient(_0x249c92,_0x489945),console[_0x13d536(0xbc)](_0x13d536(0x12c));}else throw new Error(_0x428edd[_0x13d536(0xf1)]);}const _0x1eedb1=randomBytes(0x20)['toString'](_0x428edd[_0x13d536(0x13c)]),_0x4fa6b4=createHash(_0x13d536(0x135))['update'](_0x1eedb1)[_0x13d536(0x14f)]('base64url'),_0x416285=randomBytes(0x10)[_0x13d536(0x132)]('hex'),_0x19af95=new URL(_0x502b13['authorization_endpoint']);_0x19af95[_0x13d536(0xe7)]['set']('response_type',_0x13d536(0x100)),_0x19af95[_0x13d536(0xe7)]['set'](_0x428edd['oPNdp'],_0x249c92),_0x19af95['searchParams']['set'](_0x428edd[_0x13d536(0xf9)],'http://localhost:'+CALLBACK_PORT+_0x13d536(0x120)),_0x19af95[_0x13d536(0xe7)]['set'](_0x13d536(0x14b),_0x4fa6b4),_0x19af95[_0x13d536(0xe7)][_0x13d536(0x13a)](_0x428edd[_0x13d536(0xc0)],_0x13d536(0x139)),_0x19af95[_0x13d536(0xe7)]['set'](_0x13d536(0xc8),_0x416285);_0x2010c5['resource']&&_0x19af95['searchParams']['set'](_0x428edd['gTBhS'],_0x2010c5['resource']);console[_0x13d536(0xbc)](_0x13d536(0x108)),console['log'](_0x13d536(0xe8)+_0x19af95[_0x13d536(0x132)]()+'\x0a'),await _0x428edd['rvgOz'](openBrowser,_0x19af95['toString']());const _0x453349=await _0x428edd[_0x13d536(0x109)](waitForCallback,_0x416285);process[_0x13d536(0x13e)][_0x13d536(0xe3)](_0x428edd[_0x13d536(0x12a)]);const _0x11a78d=new URLSearchParams({'grant_type':_0x428edd['GPIeC'],'code':_0x453349,'redirect_uri':_0x13d536(0x137)+CALLBACK_PORT+'/callback','client_id':_0x249c92,'code_verifier':_0x1eedb1});_0x489945&&_0x11a78d[_0x13d536(0x13a)](_0x13d536(0xdd),_0x489945);_0x2010c5[_0x13d536(0x130)]&&_0x11a78d['set'](_0x13d536(0x130),_0x2010c5[_0x13d536(0x130)]);const _0x5bf7f2=await _0x428edd[_0x13d536(0xb8)](fetch,_0x502b13['token_endpoint'],{'method':_0x428edd['igxsf'],'headers':{'Content-Type':_0x428edd['XIdTG']},'body':_0x11a78d});if(!_0x5bf7f2['ok']){const _0x4a5a55=await _0x5bf7f2['text']();throw new Error(_0x13d536(0x14c)+_0x4a5a55);}const _0x109a1f=await _0x5bf7f2['json']();return console[_0x13d536(0xbc)](_0x13d536(0x12c)),await _0x428edd[_0x13d536(0xc2)](saveCachedToken,_0x109a1f[_0x13d536(0xff)],_0x109a1f['refresh_token'],_0x109a1f[_0x13d536(0x12f)]),_0x109a1f['access_token'];}async function callGetCliToken(_0x2df49e,_0x31c25d){const _0x109e60=_0x419226,_0x4c6fbb={'OaGlp':function(_0x3c1635,_0x425ed2){return _0x3c1635(_0x425ed2);},'FwlZs':_0x109e60(0x138),'zUTrv':_0x109e60(0x10b),'nbnYC':_0x109e60(0xdb),'xLkDp':'2025-03-26','SWnjR':'\x20done','Yraec':function(_0x3d45ef,_0x430ce3,_0x31c380){return _0x3d45ef(_0x430ce3,_0x31c380);},'CNSgQ':_0x109e60(0x106),'pCXFN':'notifications/initialized','xwVxv':_0x109e60(0x126),'omGyz':_0x109e60(0x104),'pfOhz':'get_cli_token','NrZcL':_0x109e60(0x14a),'sYBuV':'.ranger','sOqsm':function(_0x16edff,_0x41fd13,_0x1c11f8){return _0x16edff(_0x41fd13,_0x1c11f8);},'mVGst':function(_0x105ed2,_0x3d8082,_0x589c1d,_0x5964a4){return _0x105ed2(_0x3d8082,_0x589c1d,_0x5964a4);}},_0x135900={'Content-Type':_0x4c6fbb[_0x109e60(0xe9)],'Accept':'application/json,\x20text/event-stream'};_0x31c25d&&(_0x135900[_0x109e60(0x142)]='Bearer\x20'+_0x31c25d);const _0x28be52=async _0x528d71=>{const _0x737dab=_0x109e60,_0x52bfb4=await fetch(_0x2df49e,{'method':_0x737dab(0x106),'headers':_0x135900,'body':JSON[_0x737dab(0x101)](_0x528d71)});if(!_0x52bfb4['ok']){const _0x7ff4cf=await _0x52bfb4[_0x737dab(0xeb)]();throw new Error(_0x737dab(0xda)+_0x52bfb4[_0x737dab(0x140)]+':\x20'+_0x7ff4cf);}return _0x4c6fbb['OaGlp'](parseResponse,_0x52bfb4);};process['stdout']['write'](_0x4c6fbb['zUTrv']);const _0x2701e8=await _0x4c6fbb[_0x109e60(0x103)](_0x28be52,{'jsonrpc':_0x4c6fbb['nbnYC'],'id':0x1,'method':_0x109e60(0x114),'params':{'protocolVersion':_0x4c6fbb['xLkDp'],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x109e60(0xfd)}}});if(_0x2701e8['error'])throw new Error(_0x109e60(0xee)+(_0x2701e8[_0x109e60(0x13f)]['message']??JSON['stringify'](_0x2701e8[_0x109e60(0x13f)])));console[_0x109e60(0xbc)](_0x4c6fbb[_0x109e60(0xef)]),await _0x4c6fbb['Yraec'](fetch,_0x2df49e,{'method':_0x4c6fbb[_0x109e60(0x11e)],'headers':_0x135900,'body':JSON['stringify']({'jsonrpc':_0x4c6fbb[_0x109e60(0x145)],'method':_0x4c6fbb['pCXFN']})})[_0x109e60(0xf8)](_0x10db3a=>_0x10db3a[_0x109e60(0xeb)]()),process[_0x109e60(0x13e)]['write'](_0x4c6fbb['xwVxv']);const _0x34213a=await _0x28be52({'jsonrpc':_0x4c6fbb[_0x109e60(0x145)],'id':0x2,'method':_0x4c6fbb[_0x109e60(0x128)],'params':{'name':_0x4c6fbb['pfOhz'],'arguments':{}}});if(_0x34213a[_0x109e60(0x13f)])throw new Error(_0x109e60(0x13b)+(_0x34213a['error']['message']??JSON['stringify'](_0x34213a[_0x109e60(0x13f)])));console[_0x109e60(0xbc)](_0x4c6fbb['SWnjR']);const _0x25c418=_0x4c6fbb['OaGlp'](extractToken,_0x34213a[_0x109e60(0x144)]);if(!_0x25c418){console[_0x109e60(0x13f)](_0x109e60(0xf5)),console['error'](JSON['stringify'](_0x34213a[_0x109e60(0x144)],null,0x2));throw new Error(_0x4c6fbb[_0x109e60(0x13d)]);}const _0x3f67c2=join(homedir(),_0x4c6fbb['sYBuV']),_0x387fa5=_0x4c6fbb[_0x109e60(0xba)](join,_0x3f67c2,'refresh.txt');await _0x4c6fbb['Yraec'](mkdir,_0x3f67c2,{'recursive':!![]}),await _0x4c6fbb[_0x109e60(0xca)](writeFile,_0x387fa5,_0x25c418,{'mode':0x180}),await _0x4c6fbb['mVGst'](writeFile,join(_0x3f67c2,_0x109e60(0x102)),_0x2df49e,{'mode':0x180}),console['log'](_0x109e60(0xcd)+_0x387fa5),console[_0x109e60(0xbc)]('Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a');}async function fetchAuthServerMetadata(_0x1225d5){const _0x3a86f5=_0x419226,_0x3ad2d1={'PzooR':function(_0x3afdad,_0x2ef28a){return _0x3afdad(_0x2ef28a);}},_0x156c64=_0x1225d5+'/.well-known/oauth-authorization-server',_0x27cfb2=await _0x3ad2d1[_0x3a86f5(0x143)](fetch,_0x156c64);if(!_0x27cfb2['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x156c64+':\x20'+_0x27cfb2[_0x3a86f5(0x140)]);return _0x27cfb2['json']();}function waitForCallback(_0x26d86b){const _0x5b4ba3=_0x419226,_0x439ba1={'sqUJO':function(_0x10ce80,_0x564f55){return _0x10ce80(_0x564f55);},'TFHvZ':'code','qIVYK':'state','rKJod':_0x5b4ba3(0x13f),'JqLQm':function(_0xb10b55){return _0xb10b55();},'XHjfD':function(_0x26831c,_0x3ef3e2){return _0x26831c!==_0x3ef3e2;},'xVirB':'text/html','OhDzR':_0x5b4ba3(0x119),'kSaLs':_0x5b4ba3(0xfa),'eCYtL':function(_0x3e256f,_0x186202){return _0x3e256f(_0x186202);},'krrfi':_0x5b4ba3(0x149)};return new Promise((_0x1ba979,_0xdc7bfd)=>{const _0x3fa886=()=>{_0x56cf4f['closeAllConnections'](),_0x56cf4f['close']();},_0x2adab1=setTimeout(()=>{_0x3fa886(),_0x439ba1['sqUJO'](_0xdc7bfd,new OAuthTimeoutError('OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'));},0x1d4c0),_0x56cf4f=_0x439ba1['eCYtL'](createServer,(_0x499843,_0x52977d)=>{const _0x1c2f3f=_0x5ecb,_0x4fb961=new URL(_0x499843[_0x1c2f3f(0x11d)]??'/',_0x1c2f3f(0x137)+CALLBACK_PORT);if(_0x4fb961['pathname']!==_0x1c2f3f(0x120)){_0x52977d['writeHead'](0x194),_0x52977d['end']('Not\x20found');return;}const _0x1bbb97=_0x4fb961[_0x1c2f3f(0xe7)][_0x1c2f3f(0xc3)](_0x439ba1['TFHvZ']),_0x2132c9=_0x4fb961['searchParams'][_0x1c2f3f(0xc3)](_0x439ba1[_0x1c2f3f(0x113)]),_0xad35c6=_0x4fb961['searchParams']['get'](_0x439ba1[_0x1c2f3f(0xed)]);if(_0xad35c6){const _0x34ffc9=_0x4fb961['searchParams'][_0x1c2f3f(0xc3)](_0x1c2f3f(0xbf))??_0xad35c6;_0x52977d[_0x1c2f3f(0x125)](0xc8,{'Content-Type':_0x1c2f3f(0x11b)}),_0x52977d['end'](_0x1c2f3f(0xd5)+_0x34ffc9+_0x1c2f3f(0x141)),clearTimeout(_0x2adab1),_0x439ba1['JqLQm'](_0x3fa886),_0xdc7bfd(new Error(_0x1c2f3f(0x116)+_0x34ffc9));return;}if(!_0x1bbb97||_0x439ba1[_0x1c2f3f(0x129)](_0x2132c9,_0x26d86b)){_0x52977d[_0x1c2f3f(0x125)](0x190,{'Content-Type':_0x439ba1[_0x1c2f3f(0x107)]}),_0x52977d['end'](_0x439ba1[_0x1c2f3f(0xb9)]);return;}_0x52977d['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x52977d[_0x1c2f3f(0xc5)](_0x439ba1[_0x1c2f3f(0x10d)]),_0x439ba1[_0x1c2f3f(0xd1)](clearTimeout,_0x2adab1),_0x439ba1[_0x1c2f3f(0x136)](_0x3fa886),_0x439ba1[_0x1c2f3f(0xdf)](_0x1ba979,_0x1bbb97);});_0x56cf4f['listen'](CALLBACK_PORT,_0x439ba1['krrfi']);});}async function openBrowser(_0x317f9f){const _0x47a63d=_0x419226,_0x404ffb={'xmtDZ':function(_0x3e5f04,_0x207b87){return _0x3e5f04===_0x207b87;},'HMNOM':_0x47a63d(0xf3),'VJkLk':function(_0x298099,_0x122a1d){return _0x298099===_0x122a1d;},'iWAgF':'win32','pQeUA':function(_0x26b849,_0x24427d){return _0x26b849(_0x24427d);}},_0x27ac39=_0x404ffb['xmtDZ'](process['platform'],'darwin')?_0x404ffb[_0x47a63d(0xe1)]:_0x404ffb[_0x47a63d(0x11f)](process[_0x47a63d(0xe5)],_0x404ffb['iWAgF'])?_0x47a63d(0x123):'xdg-open';_0x404ffb['pQeUA'](exec,_0x27ac39+'\x20\x22'+_0x317f9f+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x219d92=_0x419226;try{const _0x4bef85=JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x219d92(0xcf)));if(_0x4bef85['origin']&&_0x4bef85['origin']!==currentOrigin)return null;if(_0x4bef85[_0x219d92(0xe6)]&&Date['now']()>_0x4bef85['expiresAt'])return null;return _0x4bef85['accessToken']??null;}catch{return null;}}function _0x5ecb(_0x5eb244,_0x4dce5b){_0x5eb244=_0x5eb244-0xb8;const _0x1596e0=_0x1596();let _0x5ecb89=_0x1596e0[_0x5eb244];return _0x5ecb89;}async function saveCachedToken(_0x5b9ec8,_0x145c9a,_0x405de1){const _0x19a184=_0x419226,_0x56f443={'VkoKB':function(_0x39afff){return _0x39afff();},'JqxZw':function(_0x2e83d1,_0x475b59){return _0x2e83d1+_0x475b59;},'opnzg':function(_0x48e363,_0x4bb431,_0x4df4ca){return _0x48e363(_0x4bb431,_0x4df4ca);},'bUXgw':function(_0x5b63ca,_0x47be41,_0x71f73b){return _0x5b63ca(_0x47be41,_0x71f73b);}},_0x39c1cc=await _0x56f443['VkoKB'](loadCachedData),_0x34385a={..._0x39c1cc,'origin':currentOrigin,'accessToken':_0x5b9ec8,'refreshToken':_0x145c9a??_0x39c1cc?.['refreshToken'],'expiresAt':_0x405de1?_0x56f443['JqxZw'](Date[_0x19a184(0xd9)](),_0x405de1*0x3e8):undefined};await _0x56f443[_0x19a184(0xfb)](mkdir,_0x56f443[_0x19a184(0xc1)](join,homedir(),'.ranger'),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x34385a),{'mode':0x180});}async function loadCachedClient(){const _0x3bd032=_0x419226,_0x402e22={'zDLbf':function(_0x3b2928,_0x19bda8){return _0x3b2928!==_0x19bda8;}},_0x3591f0=await loadCachedData();if(_0x3591f0?.[_0x3bd032(0x12e)]&&_0x402e22['zDLbf'](_0x3591f0[_0x3bd032(0x12e)],currentOrigin))return null;return _0x3591f0?.[_0x3bd032(0x118)]?{'clientId':_0x3591f0[_0x3bd032(0x118)],'clientSecret':_0x3591f0['clientSecret']}:null;}async function clearCachedClient(){const _0x5ea2da=_0x419226,_0xd5d20={'KBFLI':function(_0x5acfa1){return _0x5acfa1();},'sBEnw':function(_0x1a1fd1,_0x3af8dd,_0xc307df,_0x5697e0){return _0x1a1fd1(_0x3af8dd,_0xc307df,_0x5697e0);}},_0x81871d=await _0xd5d20[_0x5ea2da(0x121)](loadCachedData);if(!_0x81871d)return;const {clientId:_0xf76226,clientSecret:_0x553b03,..._0x37bc81}=_0x81871d;await _0xd5d20[_0x5ea2da(0xf4)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x37bc81),{'mode':0x180});}async function saveCachedClient(_0x37a205,_0x14f156){const _0x95087a=_0x419226,_0x297667={'nnFcz':function(_0x4ea97f,_0x7fb692,_0x2adbd1){return _0x4ea97f(_0x7fb692,_0x2adbd1);},'APIvl':function(_0x4563be,_0x456778,_0x2e7466,_0xa65035){return _0x4563be(_0x456778,_0x2e7466,_0xa65035);}},_0x2ab262=await loadCachedData(),_0x3f0048={..._0x2ab262,'origin':currentOrigin,'accessToken':_0x2ab262?.[_0x95087a(0x115)]??'','clientId':_0x37a205,'clientSecret':_0x14f156};await _0x297667[_0x95087a(0xd7)](mkdir,_0x297667['nnFcz'](join,homedir(),_0x95087a(0xd3)),{'recursive':!![]}),await _0x297667['APIvl'](writeFile,TOKEN_CACHE_PATH,JSON[_0x95087a(0x101)](_0x3f0048),{'mode':0x180});}async function loadCachedData(){const _0x200f66=_0x419226,_0x5129b4={'bDhMH':function(_0x12d437,_0x19c88e,_0x216c65){return _0x12d437(_0x19c88e,_0x216c65);}};try{return JSON[_0x200f66(0x11c)](await _0x5129b4[_0x200f66(0xf2)](readFile,TOKEN_CACHE_PATH,'utf-8'));}catch{return null;}}async function parseResponse(_0x3cc469){const _0x2da24d=_0x419226,_0x599d50={'qLuMP':_0x2da24d(0xf7),'JVDgT':'data:','LKySh':function(_0x4566e2,_0x3346c1){return _0x4566e2!==_0x3346c1;},'dfhYS':'No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream'},_0x4e1b02=_0x3cc469['headers'][_0x2da24d(0xc3)](_0x599d50[_0x2da24d(0xbd)])??'';if(_0x4e1b02['includes'](_0x2da24d(0xcc))){const _0x46cf0c=await _0x3cc469['text']();for(const _0x3601b7 of _0x46cf0c[_0x2da24d(0xd0)]('\x0a')){const _0xb65e1a=_0x3601b7[_0x2da24d(0x127)]();if(_0xb65e1a['startsWith'](_0x2da24d(0x134))){const _0x490dee=_0xb65e1a[_0x2da24d(0x117)](_0x599d50['JVDgT'][_0x2da24d(0xcb)])[_0x2da24d(0x127)]();if(!_0x490dee)continue;try{const _0x23d50a=JSON[_0x2da24d(0x11c)](_0x490dee);if(_0x599d50['LKySh'](_0x23d50a['id'],undefined)||_0x23d50a[_0x2da24d(0x13f)])return _0x23d50a;}catch{}}}throw new Error(_0x599d50[_0x2da24d(0xbe)]);}return _0x3cc469['json']();}function extractToken(_0x1dac99){const _0x2001f6=_0x419226,_0x48fa4c={'qeXgN':'Unknown\x20error','LVrwS':function(_0x3f95a9,_0x59060c){return _0x3f95a9===_0x59060c;},'IiEZQ':_0x2001f6(0xfe)};if(!_0x1dac99)return null;const _0x4ea8db=_0x1dac99['structuredContent'];if(_0x4ea8db?.['token']&&typeof _0x4ea8db[_0x2001f6(0xd2)]==='string')return _0x4ea8db['token'];if(_0x1dac99['isError']){const _0x5ee303=_0x1dac99[_0x2001f6(0xf6)];throw new Error('Server\x20returned\x20error:\x20'+(_0x5ee303?.[0x0]?.[_0x2001f6(0xeb)]??_0x48fa4c[_0x2001f6(0x14e)]));}const _0x24b598=_0x1dac99['content'];if(_0x24b598)for(const _0x4b8bd8 of _0x24b598){if(_0x48fa4c['LVrwS'](_0x4b8bd8[_0x2001f6(0xec)],_0x2001f6(0xeb))&&_0x4b8bd8['text']){try{const _0x1ac476=JSON['parse'](_0x4b8bd8['text']);if(typeof _0x1ac476?.[_0x2001f6(0xd2)]===_0x48fa4c['IiEZQ'])return _0x1ac476['token'];}catch{}const _0x107277=_0x4b8bd8['text'][_0x2001f6(0xfc)](/(rngr_[A-Za-z0-9_-]+)/);if(_0x107277)return _0x107277[0x1];}}return null;}
1
+ const _0x4a88ee=_0x21a5;(function(_0x3f0e99,_0xa1710d){const _0x4fbde9=_0x21a5,_0x3ab1b7=_0x3f0e99();while(!![]){try{const _0x216381=-parseInt(_0x4fbde9(0x1c9))/0x1*(-parseInt(_0x4fbde9(0x19d))/0x2)+parseInt(_0x4fbde9(0x19c))/0x3*(parseInt(_0x4fbde9(0x1e3))/0x4)+-parseInt(_0x4fbde9(0x21c))/0x5*(parseInt(_0x4fbde9(0x222))/0x6)+parseInt(_0x4fbde9(0x1de))/0x7*(parseInt(_0x4fbde9(0x209))/0x8)+-parseInt(_0x4fbde9(0x214))/0x9+-parseInt(_0x4fbde9(0x1c0))/0xa+-parseInt(_0x4fbde9(0x1df))/0xb*(parseInt(_0x4fbde9(0x1d4))/0xc);if(_0x216381===_0xa1710d)break;else _0x3ab1b7['push'](_0x3ab1b7['shift']());}catch(_0x2704de){_0x3ab1b7['push'](_0x3ab1b7['shift']());}}}(_0x6b29,0x43e34));import{mkdir,writeFile,readFile}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createServer}from'http';import{randomBytes,createHash}from'crypto';import{exec}from'child_process';import{getMcpAuthUrl}from'./utils/environment.js';const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),'.ranger','mcp-oauth-tokens.json'),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x4a88ee(0x200));export async function getMcpAuthOrigin(){const _0x285a20=_0x4a88ee,_0x5d1726={'WHCbq':_0x285a20(0x1a9)};try{const _0x3a75d6=(await readFile(AUTH_ORIGIN_PATH,_0x5d1726[_0x285a20(0x20f)]))['trim']();return _0x3a75d6||null;}catch{return null;}}export async function mcpBootstrap(){const _0x40394c=_0x4a88ee,_0x5b3e4b={'LaEQs':function(_0x18e52e){return _0x18e52e();},'ysCNE':function(_0x4cb788,_0x563d63){return _0x4cb788===_0x563d63;},'QMNJg':'proxied','QkWjD':function(_0x5ae7e8,_0x30ef17,_0x3e70b0){return _0x5ae7e8(_0x30ef17,_0x3e70b0);}},_0x562a41=_0x5b3e4b['LaEQs'](getMcpAuthUrl);currentOrigin=_0x562a41;const _0x1e964f=process['stdout'][_0x40394c(0x1e1)]??![];console[_0x40394c(0x203)](_0x40394c(0x1f6)+_0x562a41+'\x0a');const _0x5d40b0=await tryUnauthenticated(_0x562a41);let _0x87c441=null;if(_0x5b3e4b[_0x40394c(0x1a0)](_0x5d40b0,_0x5b3e4b[_0x40394c(0x219)]))_0x87c441='';else{_0x87c441=await loadCachedToken();if(!_0x87c441){if(!_0x1e964f)throw new Error(_0x40394c(0x1ae)+_0x40394c(0x1ef));_0x87c441=await oauthFlow(_0x562a41);}}await _0x5b3e4b['QkWjD'](callGetCliToken,_0x562a41,_0x87c441);}async function tryUnauthenticated(_0x1d13b3){const _0x4c9b5d=_0x4a88ee,_0x2344c9={'QJWAN':'application/json','wSjaP':'application/json,\x20text/event-stream','SzIbO':_0x4c9b5d(0x1c7),'QuTkx':_0x4c9b5d(0x1c3),'HeohI':function(_0x1df242,_0x1a905e){return _0x1df242===_0x1a905e;}},_0x58df0a=await fetch(_0x1d13b3,{'method':'POST','headers':{'Content-Type':_0x2344c9['QJWAN'],'Accept':_0x2344c9[_0x4c9b5d(0x1c8)]},'body':JSON['stringify']({'jsonrpc':_0x2344c9[_0x4c9b5d(0x21a)],'id':0x1,'method':'initialize','params':{'protocolVersion':_0x2344c9[_0x4c9b5d(0x1b1)],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x4c9b5d(0x212)}}})});if(_0x58df0a['ok'])return await _0x58df0a['text'](),'proxied';if(_0x2344c9[_0x4c9b5d(0x21e)](_0x58df0a['status'],0x191))return await _0x58df0a[_0x4c9b5d(0x1f2)](),'needs-oauth';const _0xfe82fb=await _0x58df0a[_0x4c9b5d(0x1f2)]();throw new Error(_0x4c9b5d(0x1ec)+_0x58df0a[_0x4c9b5d(0x1b7)]+':\x20'+_0xfe82fb);}class OAuthTimeoutError extends Error{constructor(_0x15888e){super(_0x15888e),this['name']='OAuthTimeoutError';}}function _0x21a5(_0x5886fb,_0x8cac93){_0x5886fb=_0x5886fb-0x191;const _0x6b29bd=_0x6b29();let _0x21a5dd=_0x6b29bd[_0x5886fb];return _0x21a5dd;}function _0x6b29(){const _0x468a28=['WHCbq','listen','headers','1.0.0','Initializing\x20MCP\x20session...','3761469fXZLXo','result','code_challenge','YneAx','text/event-stream','QMNJg','SzIbO','Jnvqm','280565ThqJLY','update','HeohI','<html><body><h2>Authentication\x20failed</h2><p>','/callback','registration_endpoint','18BfoSDU','LVgzG','platform','PIcnf','refresh_token','trim','Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','expires_in','stringify','MCP\x20initialize\x20failed:\x20','1641051vtTsaH','2UYgNkG','Unknown\x20error','\x20done','ysCNE','QoIWn','expiresAt','access_token','RbGdw','token_endpoint','accessToken','yEqoU','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','utf-8','application/json','hex','base64url','toString','MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a','content','data:','QuTkx','type','OAuth\x20error:\x20','Could\x20not\x20extract\x20token\x20from\x20MCP\x20response','TZAjR','stdout','status','jzhxD','get_cli_token\x20failed:\x20','clientId','length','Token\x20exchange\x20failed:\x20','writeHead','MTRnZ','svgOs','2426740QxExRI','error','string','2025-03-26','duJAJ','KJssv','MqPQT','2.0','wSjaP','380227VHLZGY','startsWith','pathname','isError','searchParams','haSKD','Authorization','ZBfrK','http://localhost:','127.0.0.1','OyOaT','12xKUJjq','Registering\x20OAuth\x20client...','resource','now','set','error_description','tTFlm','Tixij','Client\x20registration\x20failed:\x20','FzVVI','49TLKSGL','99286xhHDJl','token','isTTY','origin','4dfIwuw','KxOBd','write','get','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','message','GrLtp','slice','ecURx','MCP\x20server\x20returned\x20HTTP\x20','code','client_secret','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','url','xKxKL','text','Exchanging\x20authorization\x20code...','clientSecret','bWLMc','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','OykVe','json','XEnnI','S256','end','parse','Not\x20found','start','tools/call','auth-origin.txt','.ranger','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','log','content-type','get_cli_token','HTTP\x20','POST','replace','215776mBFPNh','response_type','nYgRL','client_id','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','iJHUm'];_0x6b29=function(){return _0x468a28;};return _0x6b29();}async function oauthFlow(_0x151195){const _0x3c9294=_0x4a88ee,_0x1a7552={'RbGdw':function(_0x2a1647,_0x238404){return _0x2a1647(_0x238404);},'MTRnZ':function(_0x19e1ab){return _0x19e1ab();},'KxOBd':function(_0x4855ad,_0xea4e7a){return _0x4855ad(_0xea4e7a);}};try{return await _0x1a7552[_0x3c9294(0x1a4)](oauthFlowAttempt,_0x151195);}catch(_0x9206da){if(_0x9206da instanceof OAuthTimeoutError&&await _0x1a7552[_0x3c9294(0x1be)](loadCachedClient))return console[_0x3c9294(0x203)](_0x3c9294(0x198)),await clearCachedClient(),await _0x1a7552[_0x3c9294(0x1e4)](oauthFlowAttempt,_0x151195);throw _0x9206da;}}async function oauthFlowAttempt(_0x32ffd8){const _0x31295e=_0x4a88ee,_0x4822d1={'MqPQT':function(_0x453dd0,_0x1b989b){return _0x453dd0(_0x1b989b);},'vEtiI':function(_0x4e1ef9){return _0x4e1ef9();},'XEnnI':'authorization_code','Jqubg':'none','bWLMc':_0x31295e(0x196),'ecURx':'sha256','TZAjR':_0x31295e(0x1ab),'LVgzG':_0x31295e(0x20a),'nYgRL':_0x31295e(0x1fa),'HraCO':_0x31295e(0x1d6),'EELMx':function(_0x217025,_0x457459){return _0x217025(_0x457459);},'QYTps':'POST','FmZRy':'application/x-www-form-urlencoded','Tixij':function(_0x57ae03,_0x58ab5c,_0x157dcd,_0x5a3d5d){return _0x57ae03(_0x58ab5c,_0x157dcd,_0x5a3d5d);}},_0x33e7e9=_0x32ffd8[_0x31295e(0x208)](/\/mcp$/,'');process[_0x31295e(0x1b6)]['write']('Discovering\x20authorization\x20server...');const _0x2191a4=await fetch(_0x33e7e9+'/.well-known/oauth-protected-resource');if(!_0x2191a4['ok'])throw new Error('Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server');const _0x338fb1=await _0x2191a4[_0x31295e(0x1f8)](),_0x41f495=_0x338fb1['authorization_servers']?.[0x0];if(!_0x41f495)throw new Error(_0x31295e(0x197));console[_0x31295e(0x203)]('\x20'+_0x41f495);const _0x2303ff=await _0x4822d1[_0x31295e(0x1c6)](fetchAuthServerMetadata,_0x41f495);let _0x256cc7,_0x1a3086;const _0x54551f=await _0x4822d1['vEtiI'](loadCachedClient);if(_0x54551f)_0x256cc7=_0x54551f[_0x31295e(0x1ba)],_0x1a3086=_0x54551f[_0x31295e(0x1f4)];else{if(_0x2303ff[_0x31295e(0x221)]){process['stdout']['write'](_0x31295e(0x1d5));const _0x39395d=await fetch(_0x2303ff['registration_endpoint'],{'method':_0x31295e(0x207),'headers':{'Content-Type':_0x31295e(0x1aa)},'body':JSON[_0x31295e(0x19a)]({'client_name':'Ranger\x20CLI','redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x31295e(0x220)],'grant_types':[_0x4822d1['XEnnI'],_0x31295e(0x194)],'response_types':['code'],'token_endpoint_auth_method':_0x4822d1['Jqubg']})});if(!_0x39395d['ok']){const _0x205408=await _0x39395d[_0x31295e(0x1f2)]();throw new Error(_0x31295e(0x1dc)+_0x205408);}const _0xd37d26=await _0x39395d[_0x31295e(0x1f8)]();_0x256cc7=_0xd37d26[_0x31295e(0x20c)],_0x1a3086=_0xd37d26[_0x31295e(0x1ee)],await saveCachedClient(_0x256cc7,_0x1a3086),console['log']('\x20done');}else throw new Error(_0x4822d1[_0x31295e(0x1f5)]);}const _0x37437a=_0x4822d1['MqPQT'](randomBytes,0x20)['toString'](_0x31295e(0x1ac)),_0x224c1a=createHash(_0x4822d1[_0x31295e(0x1eb)])[_0x31295e(0x21d)](_0x37437a)['digest'](_0x31295e(0x1ac)),_0x3c38b8=randomBytes(0x10)['toString'](_0x4822d1[_0x31295e(0x1b5)]),_0x1432bc=new URL(_0x2303ff['authorization_endpoint']);_0x1432bc[_0x31295e(0x1cd)][_0x31295e(0x1d8)](_0x4822d1[_0x31295e(0x191)],_0x31295e(0x1ed)),_0x1432bc['searchParams']['set'](_0x31295e(0x20c),_0x256cc7),_0x1432bc[_0x31295e(0x1cd)]['set']('redirect_uri',_0x31295e(0x1d1)+CALLBACK_PORT+_0x31295e(0x220)),_0x1432bc[_0x31295e(0x1cd)]['set'](_0x31295e(0x216),_0x224c1a),_0x1432bc[_0x31295e(0x1cd)]['set']('code_challenge_method',_0x4822d1[_0x31295e(0x20b)]),_0x1432bc[_0x31295e(0x1cd)][_0x31295e(0x1d8)]('state',_0x3c38b8);_0x338fb1['resource']&&_0x1432bc['searchParams']['set'](_0x4822d1['HraCO'],_0x338fb1[_0x31295e(0x1d6)]);console['log']('\x0aOpening\x20browser\x20for\x20authentication...'),console[_0x31295e(0x203)](_0x31295e(0x1a8)+_0x1432bc['toString']()+'\x0a'),await _0x4822d1['EELMx'](openBrowser,_0x1432bc[_0x31295e(0x1ad)]());const _0x177375=await _0x4822d1['EELMx'](waitForCallback,_0x3c38b8);process['stdout']['write'](_0x31295e(0x1f3));const _0x2d07a9=new URLSearchParams({'grant_type':_0x4822d1[_0x31295e(0x1f9)],'code':_0x177375,'redirect_uri':_0x31295e(0x1d1)+CALLBACK_PORT+'/callback','client_id':_0x256cc7,'code_verifier':_0x37437a});_0x1a3086&&_0x2d07a9['set'](_0x31295e(0x1ee),_0x1a3086);_0x338fb1['resource']&&_0x2d07a9['set']('resource',_0x338fb1['resource']);const _0x2b295f=await fetch(_0x2303ff[_0x31295e(0x1a5)],{'method':_0x4822d1['QYTps'],'headers':{'Content-Type':_0x4822d1['FmZRy']},'body':_0x2d07a9});if(!_0x2b295f['ok']){const _0x4c5f9a=await _0x2b295f['text']();throw new Error(_0x31295e(0x1bc)+_0x4c5f9a);}const _0x2c8124=await _0x2b295f['json']();return console['log'](_0x31295e(0x19f)),await _0x4822d1[_0x31295e(0x1db)](saveCachedToken,_0x2c8124[_0x31295e(0x1a3)],_0x2c8124[_0x31295e(0x194)],_0x2c8124[_0x31295e(0x199)]),_0x2c8124['access_token'];}async function callGetCliToken(_0x1ba37c,_0x268e00){const _0x576bdb=_0x4a88ee,_0x5980bf={'GrLtp':function(_0x2e690a,_0x143530){return _0x2e690a(_0x143530);},'YneAx':'ranger-cli','vsFih':_0x576bdb(0x212),'dIvJZ':'POST','yEqoU':'2.0','rWsom':'Requesting\x20CLI\x20token...','svgOs':_0x576bdb(0x1ff),'sUwaA':_0x576bdb(0x205),'iJHUm':_0x576bdb(0x19f),'PIcnf':function(_0x504eb8,_0x423646,_0xe920d4){return _0x504eb8(_0x423646,_0xe920d4);},'FzVVI':function(_0x58fa2e,_0x4594e7,_0x238920){return _0x58fa2e(_0x4594e7,_0x238920);},'KJssv':_0x576bdb(0x20d)},_0xa455d6={'Content-Type':'application/json','Accept':'application/json,\x20text/event-stream'};_0x268e00&&(_0xa455d6[_0x576bdb(0x1cf)]='Bearer\x20'+_0x268e00);const _0x47ef79=async _0x5ee0b2=>{const _0xf91859=_0x576bdb,_0x36bfcc=await fetch(_0x1ba37c,{'method':_0xf91859(0x207),'headers':_0xa455d6,'body':JSON[_0xf91859(0x19a)](_0x5ee0b2)});if(!_0x36bfcc['ok']){const _0x26799f=await _0x36bfcc[_0xf91859(0x1f2)]();throw new Error(_0xf91859(0x206)+_0x36bfcc[_0xf91859(0x1b7)]+':\x20'+_0x26799f);}return parseResponse(_0x36bfcc);};process['stdout'][_0x576bdb(0x1e5)](_0x576bdb(0x213));const _0x18d5d9=await _0x5980bf[_0x576bdb(0x1e9)](_0x47ef79,{'jsonrpc':'2.0','id':0x1,'method':'initialize','params':{'protocolVersion':_0x576bdb(0x1c3),'capabilities':{},'clientInfo':{'name':_0x5980bf[_0x576bdb(0x217)],'version':_0x5980bf['vsFih']}}});if(_0x18d5d9[_0x576bdb(0x1c1)])throw new Error(_0x576bdb(0x19b)+(_0x18d5d9[_0x576bdb(0x1c1)]['message']??JSON['stringify'](_0x18d5d9['error'])));console['log'](_0x576bdb(0x19f)),await fetch(_0x1ba37c,{'method':_0x5980bf['dIvJZ'],'headers':_0xa455d6,'body':JSON['stringify']({'jsonrpc':_0x5980bf[_0x576bdb(0x1a7)],'method':'notifications/initialized'})})['then'](_0x537493=>_0x537493[_0x576bdb(0x1f2)]()),process[_0x576bdb(0x1b6)][_0x576bdb(0x1e5)](_0x5980bf['rWsom']);const _0x388a5a=await _0x47ef79({'jsonrpc':'2.0','id':0x2,'method':_0x5980bf[_0x576bdb(0x1bf)],'params':{'name':_0x5980bf['sUwaA'],'arguments':{}}});if(_0x388a5a[_0x576bdb(0x1c1)])throw new Error(_0x576bdb(0x1b9)+(_0x388a5a[_0x576bdb(0x1c1)][_0x576bdb(0x1e8)]??JSON[_0x576bdb(0x19a)](_0x388a5a[_0x576bdb(0x1c1)])));console['log'](_0x5980bf[_0x576bdb(0x20e)]);const _0x1966dd=extractToken(_0x388a5a[_0x576bdb(0x215)]);if(!_0x1966dd){console['error']('\x0aUnexpected\x20response\x20structure:'),console[_0x576bdb(0x1c1)](JSON['stringify'](_0x388a5a['result'],null,0x2));throw new Error(_0x576bdb(0x1b4));}const _0x590fa5=_0x5980bf[_0x576bdb(0x193)](join,homedir(),_0x576bdb(0x201)),_0x39ee57=_0x5980bf[_0x576bdb(0x193)](join,_0x590fa5,'refresh.txt');await mkdir(_0x590fa5,{'recursive':!![]}),await writeFile(_0x39ee57,_0x1966dd,{'mode':0x180}),await writeFile(_0x5980bf[_0x576bdb(0x1dd)](join,_0x590fa5,_0x576bdb(0x200)),_0x1ba37c,{'mode':0x180}),console[_0x576bdb(0x203)]('\x0aToken\x20written\x20to\x20'+_0x39ee57),console['log'](_0x5980bf[_0x576bdb(0x1c5)]);}async function fetchAuthServerMetadata(_0x581bd1){const _0x2f895f=_0x4a88ee,_0x4cf5f6={'HizIP':function(_0x733f7f,_0x39af99){return _0x733f7f(_0x39af99);}},_0x5ca7be=_0x581bd1+'/.well-known/oauth-authorization-server',_0x57c537=await _0x4cf5f6['HizIP'](fetch,_0x5ca7be);if(!_0x57c537['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x5ca7be+':\x20'+_0x57c537[_0x2f895f(0x1b7)]);return _0x57c537['json']();}function waitForCallback(_0x160e19){const _0x243f58=_0x4a88ee,_0xdc4a43={'LPXLv':function(_0x142a57,_0x5bbbdc){return _0x142a57(_0x5bbbdc);},'haSKD':_0x243f58(0x1e7),'hVcTR':_0x243f58(0x1fd),'mpmdO':'text/html'};return new Promise((_0x2c3c9d,_0xe410b0)=>{const _0x4ab29f=_0x243f58,_0x551312={'CMnYb':function(_0x156736,_0x49dabd){return _0xdc4a43['LPXLv'](_0x156736,_0x49dabd);},'tTFlm':_0xdc4a43[_0x4ab29f(0x1ce)],'MFdum':_0x4ab29f(0x220),'hsvzN':_0xdc4a43['hVcTR'],'TRXAV':_0x4ab29f(0x1d9),'piQCE':_0xdc4a43['mpmdO']},_0x30f808=()=>{_0x1fe6b3['closeAllConnections'](),_0x1fe6b3['close']();},_0x2f6782=setTimeout(()=>{const _0xe83ddd=_0x4ab29f;_0x30f808(),_0x551312['CMnYb'](_0xe410b0,new OAuthTimeoutError(_0x551312[_0xe83ddd(0x1da)]));},0x1d4c0),_0x1fe6b3=createServer((_0x422434,_0x4651ae)=>{const _0x587053=_0x4ab29f,_0x1ae2ec=new URL(_0x422434[_0x587053(0x1f0)]??'/','http://localhost:'+CALLBACK_PORT);if(_0x1ae2ec[_0x587053(0x1cb)]!==_0x551312['MFdum']){_0x4651ae['writeHead'](0x194),_0x4651ae['end'](_0x551312['hsvzN']);return;}const _0x4a697a=_0x1ae2ec['searchParams']['get']('code'),_0x151b18=_0x1ae2ec[_0x587053(0x1cd)]['get']('state'),_0x42cd87=_0x1ae2ec[_0x587053(0x1cd)][_0x587053(0x1e6)]('error');if(_0x42cd87){const _0x5ef7ba=_0x1ae2ec['searchParams'][_0x587053(0x1e6)](_0x551312['TRXAV'])??_0x42cd87;_0x4651ae[_0x587053(0x1bd)](0xc8,{'Content-Type':'text/html'}),_0x4651ae[_0x587053(0x1fb)](_0x587053(0x21f)+_0x5ef7ba+'</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>'),clearTimeout(_0x2f6782),_0x30f808(),_0xe410b0(new Error(_0x587053(0x1b3)+_0x5ef7ba));return;}if(!_0x4a697a||_0x151b18!==_0x160e19){_0x4651ae[_0x587053(0x1bd)](0x190,{'Content-Type':_0x551312['piQCE']}),_0x4651ae[_0x587053(0x1fb)]('<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>');return;}_0x4651ae['writeHead'](0xc8,{'Content-Type':_0x551312['piQCE']}),_0x4651ae['end']('<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'),_0x551312['CMnYb'](clearTimeout,_0x2f6782),_0x30f808(),_0x2c3c9d(_0x4a697a);});_0x1fe6b3[_0x4ab29f(0x210)](CALLBACK_PORT,_0x4ab29f(0x1d2));});}async function openBrowser(_0x800528){const _0x2bbc4a=_0x4a88ee,_0x4d7fa5={'OZnkb':function(_0x261fe1,_0x27e09a){return _0x261fe1===_0x27e09a;},'LNiSP':'open','jzhxD':_0x2bbc4a(0x1fe),'NZBAH':function(_0x838866,_0x383cc1){return _0x838866(_0x383cc1);}},_0x22afbd=_0x4d7fa5['OZnkb'](process[_0x2bbc4a(0x192)],'darwin')?_0x4d7fa5['LNiSP']:process['platform']==='win32'?_0x4d7fa5[_0x2bbc4a(0x1b8)]:'xdg-open';_0x4d7fa5['NZBAH'](exec,_0x22afbd+'\x20\x22'+_0x800528+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x211f18=_0x4a88ee,_0x5d117f={'QSsEq':_0x211f18(0x1a9)};try{const _0x2dabc7=JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x5d117f['QSsEq']));if(_0x2dabc7['origin']&&_0x2dabc7['origin']!==currentOrigin)return null;if(_0x2dabc7['expiresAt']&&Date['now']()>_0x2dabc7[_0x211f18(0x1a2)])return null;return _0x2dabc7['accessToken']??null;}catch{return null;}}async function saveCachedToken(_0x38febb,_0x391c6f,_0x2f5ff0){const _0x237487=_0x4a88ee,_0x2012a8={'QoIWn':function(_0x28358c,_0x22f1bc){return _0x28358c+_0x22f1bc;},'xKxKL':function(_0x429d00,_0x292c5b,_0x408b19){return _0x429d00(_0x292c5b,_0x408b19);},'QQAeq':function(_0x53016d){return _0x53016d();},'TMKTU':function(_0x21b4ea,_0x325965,_0x45f85b,_0x16ac67){return _0x21b4ea(_0x325965,_0x45f85b,_0x16ac67);}},_0x67a170=await loadCachedData(),_0x1bf0b2={..._0x67a170,'origin':currentOrigin,'accessToken':_0x38febb,'refreshToken':_0x391c6f??_0x67a170?.['refreshToken'],'expiresAt':_0x2f5ff0?_0x2012a8[_0x237487(0x1a1)](Date[_0x237487(0x1d7)](),_0x2f5ff0*0x3e8):undefined};await mkdir(_0x2012a8[_0x237487(0x1f1)](join,_0x2012a8['QQAeq'](homedir),'.ranger'),{'recursive':!![]}),await _0x2012a8['TMKTU'](writeFile,TOKEN_CACHE_PATH,JSON[_0x237487(0x19a)](_0x1bf0b2),{'mode':0x180});}async function loadCachedClient(){const _0x59a4d4=_0x4a88ee,_0x5d2bd8={'ZBfrK':function(_0x11eb1d,_0x5de9c2){return _0x11eb1d!==_0x5de9c2;}},_0x4c9a57=await loadCachedData();if(_0x4c9a57?.[_0x59a4d4(0x1e2)]&&_0x5d2bd8[_0x59a4d4(0x1d0)](_0x4c9a57[_0x59a4d4(0x1e2)],currentOrigin))return null;return _0x4c9a57?.['clientId']?{'clientId':_0x4c9a57[_0x59a4d4(0x1ba)],'clientSecret':_0x4c9a57[_0x59a4d4(0x1f4)]}:null;}async function clearCachedClient(){const _0x56e926=_0x4a88ee,_0x377da6={'OyOaT':function(_0x34295b,_0x20c608,_0x4cd267,_0x50740b){return _0x34295b(_0x20c608,_0x4cd267,_0x50740b);}},_0x4fdede=await loadCachedData();if(!_0x4fdede)return;const {clientId:_0x344eee,clientSecret:_0x10b811,..._0x53fd8f}=_0x4fdede;await _0x377da6[_0x56e926(0x1d3)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x53fd8f),{'mode':0x180});}async function saveCachedClient(_0x2cbaea,_0x42a192){const _0x5e52d5=_0x4a88ee,_0x41fd9b={'duJAJ':function(_0x5adec4,_0x32f05e,_0x5b3192){return _0x5adec4(_0x32f05e,_0x5b3192);},'nSDWq':function(_0xc0e5e7){return _0xc0e5e7();}},_0x4f7ee9=await loadCachedData(),_0x143b8d={..._0x4f7ee9,'origin':currentOrigin,'accessToken':_0x4f7ee9?.[_0x5e52d5(0x1a6)]??'','clientId':_0x2cbaea,'clientSecret':_0x42a192};await mkdir(_0x41fd9b[_0x5e52d5(0x1c4)](join,_0x41fd9b['nSDWq'](homedir),_0x5e52d5(0x201)),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x143b8d),{'mode':0x180});}async function loadCachedData(){const _0x2bd3a2=_0x4a88ee;try{return JSON['parse'](await readFile(TOKEN_CACHE_PATH,_0x2bd3a2(0x1a9)));}catch{return null;}}async function parseResponse(_0x47c2a3){const _0x58fe8a=_0x4a88ee,_0x404e8b={'UbcxN':_0x58fe8a(0x202)},_0x88680a=_0x47c2a3[_0x58fe8a(0x211)][_0x58fe8a(0x1e6)](_0x58fe8a(0x204))??'';if(_0x88680a['includes'](_0x58fe8a(0x218))){const _0x320f06=await _0x47c2a3['text']();for(const _0x1491cd of _0x320f06['split']('\x0a')){const _0x3fe98e=_0x1491cd['trim']();if(_0x3fe98e[_0x58fe8a(0x1ca)]('data:')){const _0x3c490a=_0x3fe98e[_0x58fe8a(0x1ea)](_0x58fe8a(0x1b0)[_0x58fe8a(0x1bb)])[_0x58fe8a(0x195)]();if(!_0x3c490a)continue;try{const _0x19497a=JSON[_0x58fe8a(0x1fc)](_0x3c490a);if(_0x19497a['id']!==undefined||_0x19497a['error'])return _0x19497a;}catch{}}}throw new Error(_0x404e8b['UbcxN']);}return _0x47c2a3['json']();}function extractToken(_0x42d1cb){const _0x47fa7b=_0x4a88ee,_0x4dd83c={'XslIo':_0x47fa7b(0x19e),'OykVe':'text','YKpzk':function(_0x290509,_0x2e9d3b){return _0x290509===_0x2e9d3b;},'Jnvqm':_0x47fa7b(0x1c2)};if(!_0x42d1cb)return null;const _0x2997eb=_0x42d1cb['structuredContent'];if(_0x2997eb?.['token']&&typeof _0x2997eb['token']==='string')return _0x2997eb['token'];if(_0x42d1cb[_0x47fa7b(0x1cc)]){const _0x3b6526=_0x42d1cb['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0x3b6526?.[0x0]?.[_0x47fa7b(0x1f2)]??_0x4dd83c['XslIo']));}const _0x45005a=_0x42d1cb[_0x47fa7b(0x1af)];if(_0x45005a)for(const _0x4077a0 of _0x45005a){if(_0x4077a0[_0x47fa7b(0x1b2)]===_0x4dd83c[_0x47fa7b(0x1f7)]&&_0x4077a0['text']){try{const _0x5e0bb1=JSON[_0x47fa7b(0x1fc)](_0x4077a0['text']);if(_0x4dd83c['YKpzk'](typeof _0x5e0bb1?.[_0x47fa7b(0x1e0)],_0x4dd83c[_0x47fa7b(0x21b)]))return _0x5e0bb1[_0x47fa7b(0x1e0)];}catch{}const _0x18c478=_0x4077a0[_0x47fa7b(0x1f2)]['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x18c478)return _0x18c478[0x1];}}return null;}
@@ -1 +1 @@
1
- function _0x4c72(){var _0x2d0d89=['error','1617936LNhLoh','4061900rgdnXf','2208783FItmyU','exit','3390630mlKare','2aAimpf','FoqKs','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','FDhgR','668617amcqDr','12781071XshYOP','4359570OmobyT','rZgGm','7wdUzzw','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','GpAIG'];_0x4c72=function(){return _0x2d0d89;};return _0x4c72();}function _0x3517(_0x129d19,_0x46fbf8){_0x129d19=_0x129d19-0x79;var _0x4c7242=_0x4c72();var _0x35173a=_0x4c7242[_0x129d19];return _0x35173a;}(function(_0x264a8e,_0x34181e){var _0x27f0c5=_0x3517,_0x306e2e=_0x264a8e();while(!![]){try{var _0x30510a=-parseInt(_0x27f0c5(0x84))/0x1*(-parseInt(_0x27f0c5(0x80))/0x2)+parseInt(_0x27f0c5(0x7d))/0x3+-parseInt(_0x27f0c5(0x7c))/0x4+-parseInt(_0x27f0c5(0x86))/0x5+-parseInt(_0x27f0c5(0x7f))/0x6+-parseInt(_0x27f0c5(0x88))/0x7*(-parseInt(_0x27f0c5(0x7b))/0x8)+parseInt(_0x27f0c5(0x85))/0x9;if(_0x30510a===_0x34181e)break;else _0x306e2e['push'](_0x306e2e['shift']());}catch(_0x27cd6b){_0x306e2e['push'](_0x306e2e['shift']());}}}(_0x4c72,0x8c519));export async function migrateProfile(_0xbbda99,_0x544984){var _0x565de4=_0x3517,_0x1324cc={'FoqKs':function(_0x201a14,_0x5a26eb){return _0x201a14+_0x5a26eb;},'rZgGm':function(_0x3b916e,_0x188155){return _0x3b916e+_0x188155;},'cVsIK':function(_0x2c0dff,_0x41ffb0){return _0x2c0dff+_0x41ffb0;},'GpAIG':function(_0x1c577a,_0x493347){return _0x1c577a+_0x493347;},'QJjre':function(_0x573445,_0x3d74ec){return _0x573445+_0x3d74ec;},'FDhgR':'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','nMCUH':'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'};console[_0x565de4(0x7a)](_0x1324cc[_0x565de4(0x81)](_0x1324cc[_0x565de4(0x87)](_0x1324cc['cVsIK'](_0x1324cc[_0x565de4(0x79)](_0x1324cc['rZgGm'](_0x1324cc['QJjre']('ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','\x0a'),_0x565de4(0x89)),_0x565de4(0x82)),'\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'+_0x1324cc[_0x565de4(0x83)],'\x0a'),_0x1324cc['nMCUH'])+'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.'),process[_0x565de4(0x7e)](0x1);}
1
+ (function(_0xbfed86,_0x4af2de){var _0x371ab3=_0xd4cb,_0x573228=_0xbfed86();while(!![]){try{var _0x1bf669=parseInt(_0x371ab3(0x12e))/0x1+-parseInt(_0x371ab3(0x132))/0x2+parseInt(_0x371ab3(0x134))/0x3*(parseInt(_0x371ab3(0x13a))/0x4)+parseInt(_0x371ab3(0x136))/0x5*(parseInt(_0x371ab3(0x135))/0x6)+parseInt(_0x371ab3(0x138))/0x7*(-parseInt(_0x371ab3(0x137))/0x8)+-parseInt(_0x371ab3(0x12f))/0x9+parseInt(_0x371ab3(0x13d))/0xa;if(_0x1bf669===_0x4af2de)break;else _0x573228['push'](_0x573228['shift']());}catch(_0x514b31){_0x573228['push'](_0x573228['shift']());}}}(_0x553a,0xc0630));function _0xd4cb(_0xd3abfd,_0x4472ab){_0xd3abfd=_0xd3abfd-0x12e;var _0x553a80=_0x553a();var _0xd4cbb3=_0x553a80[_0xd3abfd];return _0xd4cbb3;}function _0x553a(){var _0x33bd0a=['177369tesQQO','3594RZlbBc','5845godLZN','153704crsFRM','175cpLamS','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','4ypSuXl','\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','13508950EnLIGJ','xgnVU','error','662882ATXZPo','11443653SnkFvG','hNCqW','exit','466546KFOhcH','rSKRP'];_0x553a=function(){return _0x33bd0a;};return _0x553a();}export async function migrateProfile(_0x25be8a,_0x5a050d){var _0x5c357b=_0xd4cb,_0x204308={'gHfpX':function(_0x1a74ab,_0x1ea7d8){return _0x1a74ab+_0x1ea7d8;},'rSKRP':function(_0x14ec7c,_0x1e2f95){return _0x14ec7c+_0x1e2f95;},'hNCqW':function(_0x1fc92b,_0x1c159e){return _0x1fc92b+_0x1c159e;},'zWwlm':function(_0x5f3ec7,_0x26817f){return _0x5f3ec7+_0x26817f;},'SKXwN':'ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','xgnVU':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','OeKPW':_0x5c357b(0x13b)};console[_0x5c357b(0x13f)](_0x204308['gHfpX'](_0x204308[_0x5c357b(0x133)](_0x204308['rSKRP'](_0x204308[_0x5c357b(0x130)](_0x204308['zWwlm'](_0x204308['SKXwN']+'\x0a',_0x5c357b(0x13c)),_0x204308[_0x5c357b(0x13e)])+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x204308['OeKPW'])+'\x0a','Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'),_0x5c357b(0x139))),process[_0x5c357b(0x131)](0x1);}
@@ -1 +1 @@
1
- (function(_0x23d56b,_0x56b725){const _0x1216ce=_0x2d31,_0x222e9f=_0x23d56b();while(!![]){try{const _0x3ab72d=-parseInt(_0x1216ce(0x8d))/0x1*(-parseInt(_0x1216ce(0x9c))/0x2)+-parseInt(_0x1216ce(0xaa))/0x3+-parseInt(_0x1216ce(0x92))/0x4+parseInt(_0x1216ce(0x95))/0x5+-parseInt(_0x1216ce(0x9b))/0x6+-parseInt(_0x1216ce(0x8c))/0x7*(-parseInt(_0x1216ce(0x88))/0x8)+parseInt(_0x1216ce(0x9d))/0x9;if(_0x3ab72d===_0x56b725)break;else _0x222e9f['push'](_0x222e9f['shift']());}catch(_0x3cc7de){_0x222e9f['push'](_0x222e9f['shift']());}}}(_0x2241,0x7244b));import{join}from'path';import{existsSync}from'fs';import _0x57368e from'inquirer';import{skillup}from'../skillup.js';function _0x2d31(_0x599ed8,_0x5d23ba){_0x599ed8=_0x599ed8-0x7f;const _0x224121=_0x2241();let _0x2d31e0=_0x224121[_0x599ed8];return _0x2d31e0;}import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x2241(){const _0x969b94=['project','XdtoV','FbpPR','390480qRlBgH','26212fhDhYc','7930008eyAJBL','XEkBp','confirm','❌\x20Failed\x20to\x20add\x20marketplace:','VPcYz','ranger','ranger@trailhead','install','mpymr','TVinj','QIIDF','\x0aYou\x20can\x20install\x20manually\x20with:','mwZmk','1291332vzpmMp','PshJV','bPTIB','fZpza','plugin','Would\x20you\x20like\x20to\x20install\x20skills?','enable','kyXrM','LUeoP','xhJBc','list','user','SNBeS','.claude','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','push','ranger-testing/trailhead','FHigG','4885288fjmuoW','already\x20enabled','tiDPp','error','7IOIIBX','4zEESyl','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','prompt','marketplace','output','3286860FhnBpR','log','xlxdi','1205425FXeKNj','success','zcXcy'];_0x2241=function(){return _0x969b94;};return _0x2241();}export async function ensureClaudePlugin(_0x5466d1){const _0x158436=_0x2d31,_0x3c76fa={'bwDYf':function(_0x17f695,_0x40bc27){return _0x17f695(_0x40bc27);},'TVinj':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','tiDPp':function(_0x912bdd){return _0x912bdd();},'FbpPR':'.claude','mpymr':_0x158436(0x98),'XEkBp':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','fZpza':'pluginScope','xlxdi':'User\x20(available\x20in\x20all\x20your\x20projects)','FHigG':_0x158436(0x81),'bPTIB':function(_0x22a513,_0x4264be){return _0x22a513(_0x4264be);},'XdtoV':'trailhead','mwZmk':'plugin','zcXcy':'add','kyXrM':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','QIIDF':'ranger@trailhead','VqHgJ':function(_0x3aa4c6){return _0x3aa4c6();},'FkrKe':function(_0x5b735d,_0xfc6379){return _0x5b735d===_0xfc6379;},'iWdpg':'--scope','WDmyD':_0x158436(0x89)},_0x5940e=await _0x3c76fa['bwDYf'](isPluginInstalled,_0x158436(0xa3));if(_0x5940e)return console[_0x158436(0x93)](_0x3c76fa[_0x158436(0xa6)]),![];const _0x276fe5=existsSync(join(_0x3c76fa[_0x158436(0x8a)](getProjectRoot),_0x3c76fa[_0x158436(0x9a)]));let _0x1138d9;if(_0x5466d1)_0x1138d9=_0x5466d1;else{if(_0x276fe5)_0x1138d9=_0x3c76fa[_0x158436(0xa5)];else{console['log'](_0x3c76fa[_0x158436(0x9e)]);const _0x4e4d20=await _0x57368e[_0x158436(0x8f)]([{'type':_0x158436(0x80),'name':_0x3c76fa[_0x158436(0xad)],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x3c76fa[_0x158436(0x94)],'value':_0x158436(0x81)},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':_0x3c76fa[_0x158436(0x87)]}]);_0x1138d9=_0x4e4d20['pluginScope'];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x1138d9+'\x20level)...\x0a');const _0x43fe24=await _0x3c76fa[_0x158436(0xac)](isMarketplaceAdded,_0x3c76fa[_0x158436(0x99)]);let _0x28a2b3=_0x43fe24;if(_0x43fe24)console[_0x158436(0x93)]('✓\x20Marketplace\x20already\x20added');else{const _0x56cece=await runClaudeCommand([_0x3c76fa[_0x158436(0xa9)],_0x158436(0x90),_0x3c76fa[_0x158436(0x97)],_0x158436(0x86)]);!_0x56cece['success']?(console[_0x158436(0x8b)](_0x158436(0xa0),_0x56cece['error']),console[_0x158436(0x93)](_0x158436(0xa8)),console[_0x158436(0x93)](_0x3c76fa[_0x158436(0xb1)]),console[_0x158436(0x93)](_0x158436(0x84)+_0x1138d9)):_0x28a2b3=!![];}if(_0x28a2b3){const _0x3743ae=await runClaudeCommand([_0x3c76fa['mwZmk'],_0x158436(0xa4),_0x3c76fa[_0x158436(0xa7)],'--scope',_0x1138d9],{'cwd':_0x1138d9===_0x3c76fa['mpymr']?_0x3c76fa['VqHgJ'](getProjectRoot):undefined});if(!_0x3743ae[_0x158436(0x96)])console[_0x158436(0x8b)]('❌\x20Failed\x20to\x20install\x20plugin:',_0x3743ae[_0x158436(0x8b)]),console['log'](_0x158436(0xa8)),console['log'](_0x158436(0x84)+_0x1138d9);else{console[_0x158436(0x93)](_0x158436(0x8e));const _0x17a798=[_0x158436(0xae),_0x158436(0xb0),'ranger@trailhead'];_0x3c76fa['FkrKe'](_0x1138d9,_0x3c76fa[_0x158436(0xa5)])&&_0x17a798[_0x158436(0x85)](_0x3c76fa['iWdpg'],'project');const _0x35dc6a=await runClaudeCommand(_0x17a798,{'captureOutput':!![],'cwd':_0x1138d9===_0x3c76fa[_0x158436(0xa5)]?getProjectRoot():undefined}),_0x1eb8ef=_0x35dc6a[_0x158436(0x91)]?.['includes'](_0x3c76fa['WDmyD']);!_0x35dc6a[_0x158436(0x96)]&&!_0x1eb8ef?console[_0x158436(0x8b)]('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x35dc6a['error']):console['log']('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}export async function ensureClaudeSkills(_0xba14f){const _0x424ef2=_0x2d31,_0x370886={'LUeoP':function(_0x456f15,_0x5bcb34){return _0x456f15(_0x5bcb34);},'SNBeS':function(_0x2b4d57,_0x286a2d){return _0x2b4d57(_0x286a2d);},'vVbIa':'user','Wfmwl':_0x424ef2(0xa2),'vruxa':'SKILL.md','ykMXs':function(_0xa5d222,_0x582756,_0x14b84c,_0x532153){return _0xa5d222(_0x582756,_0x14b84c,_0x532153);},'DgFdW':function(_0x2e1196,_0x31f985){return _0x2e1196(_0x31f985);},'xhJBc':'project','PshJV':function(_0x11f1fa,_0x572382){return _0x11f1fa||_0x572382;},'LRmes':function(_0x45bb0c,_0x4284da,_0x18b043){return _0x45bb0c(_0x4284da,_0x18b043);},'UpqpW':function(_0x379b90){return _0x379b90();},'WBmfu':_0x424ef2(0x83),'mzJNe':'wantsSkillup','VPcYz':function(_0x56db1d,_0x10c9e9){return _0x56db1d(_0x10c9e9);}},_0x42091d=_0x370886[_0x424ef2(0xb2)](existsSync,join(_0x370886['SNBeS'](getSkillsDir,_0x370886['vVbIa']),_0x370886['Wfmwl'],_0x370886['vruxa'])),_0x598e00=existsSync(_0x370886['ykMXs'](join,_0x370886['DgFdW'](getSkillsDir,_0x370886['xhJBc']),_0x370886['Wfmwl'],_0x370886['vruxa']));if(_0x370886[_0x424ef2(0xab)](_0x42091d,_0x598e00))return console[_0x424ef2(0x93)]('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x3c985e=existsSync(_0x370886['LRmes'](join,_0x370886['UpqpW'](getProjectRoot),_0x370886['WBmfu']));let _0x5402f7=!![];if(_0xba14f)await skillup({'autoInstall':_0xba14f,'suppressUsage':!![]});else{if(_0x3c985e)await _0x370886[_0x424ef2(0x82)](skillup,{'autoInstall':_0x370886[_0x424ef2(0x7f)],'suppressUsage':!![]});else{const _0x21fcad=await _0x57368e['prompt']([{'type':_0x424ef2(0x9f),'name':_0x370886['mzJNe'],'message':_0x424ef2(0xaf),'default':!![]}]);_0x5402f7=_0x21fcad['wantsSkillup'],_0x5402f7&&await _0x370886[_0x424ef2(0xa1)](skillup,{'suppressUsage':!![]});}}return _0x5402f7;}
1
+ (function(_0x378346,_0x58d679){const _0x66d046=_0x5308,_0x3671c1=_0x378346();while(!![]){try{const _0x400570=-parseInt(_0x66d046(0x10d))/0x1+parseInt(_0x66d046(0x10a))/0x2+parseInt(_0x66d046(0x12e))/0x3+-parseInt(_0x66d046(0x10e))/0x4+parseInt(_0x66d046(0x101))/0x5*(-parseInt(_0x66d046(0x129))/0x6)+parseInt(_0x66d046(0x12d))/0x7+parseInt(_0x66d046(0x106))/0x8;if(_0x400570===_0x58d679)break;else _0x3671c1['push'](_0x3671c1['shift']());}catch(_0x492a07){_0x3671c1['push'](_0x3671c1['shift']());}}}(_0x1dab,0x93ed0));import{join}from'path';import{existsSync}from'fs';import _0x3a64fc from'inquirer';function _0x1dab(){const _0x4c02c1=['marketplace','SKILL.md','ranger-testing/trailhead','pcvTV','ykPLf','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','BGPyG','ranger@trailhead','enable','fBTAQ','❌\x20Failed\x20to\x20install\x20plugin:','--scope','already\x20enabled','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','zIXIF','plugin','trailhead','⚠\x20Failed\x20to\x20enable\x20plugin:','Would\x20you\x20like\x20to\x20install\x20skills?','5413242fBwHTJ','\x0aYou\x20can\x20install\x20manually\x20with:','Where\x20should\x20the\x20plugin\x20be\x20installed?','error','6720147OasUvF','1016268dKwstQ','wantsSkillup','bKUEq','5PnQPAR','UdvJr','push','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','SrOfx','2298344qkgMPG','Project\x20(shared\x20with\x20team\x20via\x20git)','✓\x20Ranger\x20skills\x20already\x20installed','list','1593522UlYudW','prompt','project','538686SFneHd','1344136eymQfi','includes','user','log','BpuFI','add','.claude','aNYHK'];_0x1dab=function(){return _0x4c02c1;};return _0x1dab();}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x5308(_0x1e36a0,_0x511b58){_0x1e36a0=_0x1e36a0-0x101;const _0x1dab6a=_0x1dab();let _0x5308ee=_0x1dab6a[_0x1e36a0];return _0x5308ee;}export async function ensureClaudePlugin(_0x10392b){const _0x362ab9=_0x5308,_0x577fbf={'YKZrY':function(_0x54bc96,_0x3ff756){return _0x54bc96(_0x3ff756);},'HLtFI':function(_0x546c85,_0x345a57,_0x524760){return _0x546c85(_0x345a57,_0x524760);},'mnqfH':_0x362ab9(0x114),'QnVBz':_0x362ab9(0x11b),'iJArB':'pluginScope','hHSqd':_0x362ab9(0x12b),'SrOfx':_0x362ab9(0x110),'BpuFI':_0x362ab9(0x107),'zIXIF':_0x362ab9(0x10c),'bKUEq':'✓\x20Marketplace\x20already\x20added','UdvJr':function(_0x1aad02,_0xf3b0ed){return _0x1aad02(_0xf3b0ed);},'JvLKS':_0x362ab9(0x118),'nuKAB':'❌\x20Failed\x20to\x20add\x20marketplace:','pPVyO':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','rotUj':_0x362ab9(0x11d),'ykPLf':function(_0x3aa04e,_0x19d790){return _0x3aa04e===_0x19d790;},'Anljn':function(_0x2491a0){return _0x2491a0();},'IHkBj':_0x362ab9(0x12a),'TCwqn':'--scope','ODOrv':function(_0x136a21,_0x5c1478,_0x523cac){return _0x136a21(_0x5c1478,_0x523cac);},'ySZjb':_0x362ab9(0x127),'LHFgg':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x4eb8dc=await isPluginInstalled('ranger@trailhead');if(_0x4eb8dc)return console[_0x362ab9(0x111)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x3bd478=_0x577fbf['YKZrY'](existsSync,_0x577fbf['HLtFI'](join,getProjectRoot(),_0x577fbf['mnqfH']));let _0x53d9ac;if(_0x10392b)_0x53d9ac=_0x10392b;else{if(_0x3bd478)_0x53d9ac=_0x362ab9(0x10c);else{console['log'](_0x577fbf['QnVBz']);const _0x5e9d49=await _0x3a64fc[_0x362ab9(0x10b)]([{'type':_0x362ab9(0x109),'name':_0x577fbf['iJArB'],'message':_0x577fbf['hHSqd'],'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x577fbf[_0x362ab9(0x105)]},{'name':_0x577fbf[_0x362ab9(0x112)],'value':_0x577fbf[_0x362ab9(0x124)]}],'default':_0x577fbf[_0x362ab9(0x105)]}]);_0x53d9ac=_0x5e9d49['pluginScope'];}}console['log'](_0x362ab9(0x123)+_0x53d9ac+'\x20level)...\x0a');const _0x5c009b=await _0x577fbf['YKZrY'](isMarketplaceAdded,_0x362ab9(0x126));let _0x1bf305=_0x5c009b;if(_0x5c009b)console['log'](_0x577fbf[_0x362ab9(0x130)]);else{const _0x11ed64=await _0x577fbf[_0x362ab9(0x102)](runClaudeCommand,['plugin',_0x362ab9(0x116),_0x362ab9(0x113),_0x577fbf['JvLKS']]);!_0x11ed64['success']?(console[_0x362ab9(0x12c)](_0x577fbf['nuKAB'],_0x11ed64['error']),console['log']('\x0aYou\x20can\x20install\x20manually\x20with:'),console[_0x362ab9(0x111)](_0x577fbf['pPVyO']),console[_0x362ab9(0x111)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x53d9ac)):_0x1bf305=!![];}if(_0x1bf305){const _0xdc2dea=await runClaudeCommand([_0x362ab9(0x125),'install',_0x577fbf['rotUj'],_0x362ab9(0x121),_0x53d9ac],{'cwd':_0x577fbf['ykPLf'](_0x53d9ac,_0x577fbf['zIXIF'])?_0x577fbf['Anljn'](getProjectRoot):undefined});if(!_0xdc2dea['success'])console['error'](_0x362ab9(0x120),_0xdc2dea[_0x362ab9(0x12c)]),console['log'](_0x577fbf['IHkBj']),console['log'](_0x362ab9(0x104)+_0x53d9ac);else{console[_0x362ab9(0x111)]('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x5f5758=[_0x362ab9(0x125),_0x362ab9(0x11e),_0x362ab9(0x11d)];_0x53d9ac===_0x577fbf[_0x362ab9(0x124)]&&_0x5f5758[_0x362ab9(0x103)](_0x577fbf['TCwqn'],_0x577fbf[_0x362ab9(0x124)]);const _0x19faa3=await _0x577fbf['ODOrv'](runClaudeCommand,_0x5f5758,{'captureOutput':!![],'cwd':_0x577fbf[_0x362ab9(0x11a)](_0x53d9ac,_0x577fbf[_0x362ab9(0x124)])?_0x577fbf['Anljn'](getProjectRoot):undefined}),_0x115d87=_0x19faa3['output']?.[_0x362ab9(0x10f)](_0x362ab9(0x122));!_0x19faa3['success']&&!_0x115d87?console[_0x362ab9(0x12c)](_0x577fbf['ySZjb'],_0x19faa3[_0x362ab9(0x12c)]):console[_0x362ab9(0x111)](_0x577fbf['LHFgg']);}}return!![];}export async function ensureClaudeSkills(_0x23e275){const _0x31f4eb=_0x5308,_0xe13b5c={'pcvTV':function(_0x439aad,_0x22f243,_0x19cc7b,_0x80b285){return _0x439aad(_0x22f243,_0x19cc7b,_0x80b285);},'aNYHK':'ranger','VsGdz':function(_0x335dd8,_0x53a150){return _0x335dd8(_0x53a150);},'fBTAQ':'project','BGPyG':function(_0x6de4a1,_0x4377b1){return _0x6de4a1(_0x4377b1);},'CSunw':function(_0x3f4602){return _0x3f4602();},'yHPsw':function(_0x3e3c89,_0x4a890e){return _0x3e3c89(_0x4a890e);},'CMHUg':'confirm','tZfyA':'wantsSkillup'},_0x57d6a8=existsSync(_0xe13b5c[_0x31f4eb(0x119)](join,getSkillsDir('user'),_0xe13b5c['aNYHK'],_0x31f4eb(0x117))),_0x166fcf=existsSync(join(_0xe13b5c['VsGdz'](getSkillsDir,_0xe13b5c[_0x31f4eb(0x11f)]),_0xe13b5c[_0x31f4eb(0x115)],'SKILL.md'));if(_0x57d6a8||_0x166fcf)return console[_0x31f4eb(0x111)](_0x31f4eb(0x108)),![];const _0x30ad0e=_0xe13b5c[_0x31f4eb(0x11c)](existsSync,join(_0xe13b5c['CSunw'](getProjectRoot),_0x31f4eb(0x114)));let _0x77f0ce=!![];if(_0x23e275)await _0xe13b5c['yHPsw'](skillup,{'autoInstall':_0x23e275,'suppressUsage':!![]});else{if(_0x30ad0e)await skillup({'autoInstall':_0xe13b5c['fBTAQ'],'suppressUsage':!![]});else{const _0x2e9282=await _0x3a64fc[_0x31f4eb(0x10b)]([{'type':_0xe13b5c['CMHUg'],'name':_0xe13b5c['tZfyA'],'message':_0x31f4eb(0x128),'default':!![]}]);_0x77f0ce=_0x2e9282[_0x31f4eb(0x12f)],_0x77f0ce&&await _0xe13b5c[_0x31f4eb(0x11c)](skillup,{'suppressUsage':!![]});}}return _0x77f0ce;}
@@ -1 +1 @@
1
- (function(_0x5c5908,_0xc9f181){const _0x6fd4ae=_0x5967,_0x34efb4=_0x5c5908();while(!![]){try{const _0x35bfc6=-parseInt(_0x6fd4ae(0x1b2))/0x1+-parseInt(_0x6fd4ae(0x1ad))/0x2*(-parseInt(_0x6fd4ae(0x1a9))/0x3)+-parseInt(_0x6fd4ae(0x1b9))/0x4+parseInt(_0x6fd4ae(0x1ab))/0x5+-parseInt(_0x6fd4ae(0x1b3))/0x6+parseInt(_0x6fd4ae(0x1a3))/0x7+parseInt(_0x6fd4ae(0x1b6))/0x8;if(_0x35bfc6===_0xc9f181)break;else _0x34efb4['push'](_0x34efb4['shift']());}catch(_0x330a8b){_0x34efb4['push'](_0x34efb4['shift']());}}}(_0x3b89,0x8748a));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x3b89(){const _0x8d46ef=['3523200pKczMJ','nuvpo','Failed\x20to\x20read\x20opencode.json','8025608KqQmLI','stringify','@ranger-testing/opencode-plugin','2172664ahsNbS','plugin','syEKh','FSzZZ','jKtie','Where\x20should\x20the\x20plugin\x20be\x20installed?','isArray','$schema','2068409jXWBAK','https://opencode.ai/config.json','log','pluginScope','uWVoE','GuNwY','291552SlrhDJ','rNvwg','3145285xlnfnX','includes','12aELcOA','list','User\x20(available\x20in\x20all\x20your\x20projects)','VBSqD','VobYO','826361lEcMFr'];_0x3b89=function(){return _0x8d46ef;};return _0x3b89();}import _0x2f09e7 from'inquirer';function _0x5967(_0x4387cb,_0x27203b){_0x4387cb=_0x4387cb-0x1a3;const _0x3b8904=_0x3b89();let _0x59676a=_0x3b8904[_0x4387cb];return _0x59676a;}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5023e7){const _0x9910f0=_0x5967,_0x1b4780={'rNvwg':function(_0x3d361b,_0x2afb80,_0x990acf){return _0x3d361b(_0x2afb80,_0x990acf);},'uWVoE':'opencode.json','VBSqD':_0x9910f0(0x1ae),'nuvpo':_0x9910f0(0x1af),'jeitW':'user','qTkdL':_0x9910f0(0x1a4),'FSzZZ':function(_0x5f56ff,_0xc93b38){return _0x5f56ff(_0xc93b38);},'PIlEW':'utf-8','jKtie':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','syEKh':_0x9910f0(0x1b5),'VobYO':function(_0x566fc6,_0x466861){return _0x566fc6(_0x466861);},'GuNwY':function(_0x51abe5,_0x2276f3){return _0x51abe5+_0x2276f3;}},_0x1a1196=existsSync(_0x1b4780['rNvwg'](join,getOpencodeConfigDir('project'),_0x1b4780[_0x9910f0(0x1a7)]));let _0x22ba7e;if(_0x5023e7)_0x22ba7e=_0x5023e7;else{if(_0x1a1196)_0x22ba7e='project';else{console['log']('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x3a793c=await _0x2f09e7['prompt']([{'type':_0x1b4780[_0x9910f0(0x1b0)],'name':_0x9910f0(0x1a6),'message':_0x9910f0(0x1be),'choices':[{'name':_0x1b4780[_0x9910f0(0x1b4)],'value':_0x1b4780['jeitW']},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':_0x1b4780['jeitW']}]);_0x22ba7e=_0x3a793c['pluginScope'];}}const _0x46b6c3=_0x1b4780['rNvwg'](join,getOpencodeConfigDir(_0x22ba7e),_0x1b4780['uWVoE']),_0x2debcd=_0x9910f0(0x1b8),_0x48a840=_0x1b4780['qTkdL'];let _0xffc50f={};if(_0x1b4780[_0x9910f0(0x1bc)](existsSync,_0x46b6c3))try{const _0x55d2be=await _0x1b4780['rNvwg'](readFile,_0x46b6c3,_0x1b4780['PIlEW']);_0xffc50f=JSON['parse'](_0x55d2be);}catch(_0xb7fd18){return console['error'](_0x1b4780[_0x9910f0(0x1bd)]),{'configured':![],'scope':_0x22ba7e,'error':_0x1b4780[_0x9910f0(0x1bb)],'details':_0xb7fd18};}const _0x579de1=Array[_0x9910f0(0x1bf)](_0xffc50f[_0x9910f0(0x1ba)])?_0xffc50f[_0x9910f0(0x1ba)]:[];if(_0x579de1[_0x9910f0(0x1ac)](_0x2debcd))return console[_0x9910f0(0x1a5)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x22ba7e};return _0xffc50f[_0x9910f0(0x1c0)]=_0xffc50f[_0x9910f0(0x1c0)]||_0x48a840,_0xffc50f['plugin']=[..._0x579de1,_0x2debcd],await mkdir(_0x1b4780[_0x9910f0(0x1b1)](getOpencodeConfigDir,_0x22ba7e),{'recursive':!![]}),await _0x1b4780[_0x9910f0(0x1aa)](writeFile,_0x46b6c3,_0x1b4780[_0x9910f0(0x1a8)](JSON[_0x9910f0(0x1b7)](_0xffc50f,null,0x2),'\x0a')),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x22ba7e};}
1
+ (function(_0x23006c,_0x176e5b){const _0x1ea49e=_0x176a,_0x5900f4=_0x23006c();while(!![]){try{const _0x34c6a1=-parseInt(_0x1ea49e(0x1d0))/0x1+parseInt(_0x1ea49e(0x1b4))/0x2+parseInt(_0x1ea49e(0x1cc))/0x3+parseInt(_0x1ea49e(0x1d4))/0x4*(parseInt(_0x1ea49e(0x1be))/0x5)+parseInt(_0x1ea49e(0x1b7))/0x6*(-parseInt(_0x1ea49e(0x1c2))/0x7)+-parseInt(_0x1ea49e(0x1c0))/0x8*(parseInt(_0x1ea49e(0x1bb))/0x9)+parseInt(_0x1ea49e(0x1bd))/0xa*(parseInt(_0x1ea49e(0x1c5))/0xb);if(_0x34c6a1===_0x176e5b)break;else _0x5900f4['push'](_0x5900f4['shift']());}catch(_0x258b1c){_0x5900f4['push'](_0x5900f4['shift']());}}}(_0x40c2,0x7b5d8));import{join}from'path';import{existsSync}from'fs';function _0x176a(_0x36a5d6,_0x4a8056){_0x36a5d6=_0x36a5d6-0x1b2;const _0x40c28f=_0x40c2();let _0x176a18=_0x40c28f[_0x36a5d6];return _0x176a18;}function _0x40c2(){const _0x49ad27=['aypTU','yDVAg','khjPD','error','list','stringify','2281095eNGoQM','xlXcq','plugin','OfQNl','917770GsPsoA','✓\x20OpenCode\x20plugin\x20configured','project','pluginScope','20668AGtEWk','Where\x20should\x20the\x20plugin\x20be\x20installed?','$schema','UYoiP','1489224hVrRYm','@ranger-testing/opencode-plugin','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','102QQYNag','prompt','ppKIo','\x0a📦\x20OpenCode\x20Plugin\x0a','149571qeuQHV','lIYcv','2650QfQoyx','515svWiwb','User\x20(available\x20in\x20all\x20your\x20projects)','32VsDCrc','https://opencode.ai/config.json','407393HrEAhU','parse','SvEOl','18337dkUdeT'];_0x40c2=function(){return _0x49ad27;};return _0x40c2();}import{mkdir,readFile,writeFile}from'fs/promises';import _0x5dc82c from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5748f7){const _0x1a7253=_0x176a,_0x4155b8={'aypTU':function(_0x36dcbc,_0x580292){return _0x36dcbc(_0x580292);},'ppKIo':function(_0x3ea4f9,_0x2a48d1){return _0x3ea4f9(_0x2a48d1);},'SvEOl':'opencode.json','UYoiP':_0x1a7253(0x1d5),'qfiOu':_0x1a7253(0x1bf),'yDVAg':'user','khjPD':'Project\x20(shared\x20with\x20team\x20via\x20git)','sTojF':'project','cFPgD':_0x1a7253(0x1b5),'xTncQ':function(_0x2291e3,_0x3f7c57){return _0x2291e3(_0x3f7c57);},'OfQNl':function(_0x33eb6c,_0x346cda,_0x28c082){return _0x33eb6c(_0x346cda,_0x28c082);},'ATldi':'utf-8','lIYcv':'Failed\x20to\x20read\x20opencode.json','xlXcq':'✓\x20OpenCode\x20plugin\x20already\x20configured','RCMRT':function(_0xca42a5,_0x319dfa){return _0xca42a5+_0x319dfa;},'Lwlom':_0x1a7253(0x1d1)},_0x1cddf4=_0x4155b8[_0x1a7253(0x1c6)](existsSync,join(_0x4155b8[_0x1a7253(0x1b9)](getOpencodeConfigDir,_0x1a7253(0x1d2)),_0x4155b8[_0x1a7253(0x1c4)]));let _0x2b3c7e;if(_0x5748f7)_0x2b3c7e=_0x5748f7;else{if(_0x1cddf4)_0x2b3c7e='project';else{console['log'](_0x1a7253(0x1ba));const _0x2e846b=await _0x5dc82c[_0x1a7253(0x1b8)]([{'type':_0x1a7253(0x1ca),'name':_0x1a7253(0x1d3),'message':_0x4155b8[_0x1a7253(0x1b3)],'choices':[{'name':_0x4155b8['qfiOu'],'value':_0x4155b8[_0x1a7253(0x1c7)]},{'name':_0x4155b8[_0x1a7253(0x1c8)],'value':_0x4155b8['sTojF']}],'default':_0x4155b8[_0x1a7253(0x1c7)]}]);_0x2b3c7e=_0x2e846b['pluginScope'];}}const _0x4a52a0=join(getOpencodeConfigDir(_0x2b3c7e),'opencode.json'),_0x526647=_0x4155b8['cFPgD'],_0x30bac1=_0x1a7253(0x1c1);let _0x489a6c={};if(_0x4155b8['xTncQ'](existsSync,_0x4a52a0))try{const _0x646686=await _0x4155b8[_0x1a7253(0x1cf)](readFile,_0x4a52a0,_0x4155b8['ATldi']);_0x489a6c=JSON[_0x1a7253(0x1c3)](_0x646686);}catch(_0x949d1a){return console[_0x1a7253(0x1c9)](_0x1a7253(0x1b6)),{'configured':![],'scope':_0x2b3c7e,'error':_0x4155b8[_0x1a7253(0x1bc)],'details':_0x949d1a};}const _0xd0190=Array['isArray'](_0x489a6c[_0x1a7253(0x1ce)])?_0x489a6c[_0x1a7253(0x1ce)]:[];if(_0xd0190['includes'](_0x526647))return console['log'](_0x4155b8[_0x1a7253(0x1cd)]),{'configured':![],'scope':_0x2b3c7e};return _0x489a6c[_0x1a7253(0x1b2)]=_0x489a6c[_0x1a7253(0x1b2)]||_0x30bac1,_0x489a6c[_0x1a7253(0x1ce)]=[..._0xd0190,_0x526647],await mkdir(getOpencodeConfigDir(_0x2b3c7e),{'recursive':!![]}),await _0x4155b8['OfQNl'](writeFile,_0x4a52a0,_0x4155b8['RCMRT'](JSON[_0x1a7253(0x1cb)](_0x489a6c,null,0x2),'\x0a')),console['log'](_0x4155b8['Lwlom']),{'configured':!![],'scope':_0x2b3c7e};}
@@ -1 +1 @@
1
- function _0x5a1a(_0x32c1dc,_0x3c02db){_0x32c1dc=_0x32c1dc-0x1c9;var _0x5c6bbd=_0x5c6b();var _0x5a1a25=_0x5c6bbd[_0x32c1dc];return _0x5a1a25;}(function(_0x40ab8c,_0x364fef){var _0x9933e=_0x5a1a,_0x4c2c9f=_0x40ab8c();while(!![]){try{var _0x2cd9c7=parseInt(_0x9933e(0x1cb))/0x1+parseInt(_0x9933e(0x1ce))/0x2*(parseInt(_0x9933e(0x1d2))/0x3)+-parseInt(_0x9933e(0x1d4))/0x4*(parseInt(_0x9933e(0x1d7))/0x5)+parseInt(_0x9933e(0x1ca))/0x6+-parseInt(_0x9933e(0x1cc))/0x7+parseInt(_0x9933e(0x1d1))/0x8*(-parseInt(_0x9933e(0x1c9))/0x9)+parseInt(_0x9933e(0x1d6))/0xa;if(_0x2cd9c7===_0x364fef)break;else _0x4c2c9f['push'](_0x4c2c9f['shift']());}catch(_0x978269){_0x4c2c9f['push'](_0x4c2c9f['shift']());}}}(_0x5c6b,0xe0770));export async function setupCi(_0x2bb866,_0x4b190a,_0xb566f5){var _0xeb3887=_0x5a1a,_0x4514e6={'NABEa':function(_0xe679e,_0x568235){return _0xe679e+_0x568235;},'dQVjt':function(_0x36e512,_0x514fd7){return _0x36e512+_0x514fd7;},'HFmfa':_0xeb3887(0x1cf),'XohFR':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0xeb3887(0x1d3)](_0x4514e6[_0xeb3887(0x1d5)](_0x4514e6['dQVjt'](_0x4514e6['dQVjt'](_0x4514e6['dQVjt'](_0xeb3887(0x1d0)+'\x0a'+_0x4514e6['HFmfa'],'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),'\x0a'),_0x4514e6[_0xeb3887(0x1cd)]),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1);}function _0x5c6b(){var _0x302ff6=['901375WGSpRF','7857304hjcpxl','XohFR','4ThlKfJ','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','8ytqjic','1473837LqaOQF','error','9236qlYTqs','NABEa','5200910NXgVLf','2005XrjKTF','2937429hFsxUr','5340876ImkyvU'];_0x5c6b=function(){return _0x302ff6;};return _0x5c6b();}
1
+ (function(_0x50a89a,_0x1a7e6d){var _0x2e7fbe=_0x2f71,_0x44192a=_0x50a89a();while(!![]){try{var _0x5bbadc=parseInt(_0x2e7fbe(0x1c6))/0x1+-parseInt(_0x2e7fbe(0x1c7))/0x2+-parseInt(_0x2e7fbe(0x1b9))/0x3*(-parseInt(_0x2e7fbe(0x1bd))/0x4)+-parseInt(_0x2e7fbe(0x1c5))/0x5*(parseInt(_0x2e7fbe(0x1c1))/0x6)+parseInt(_0x2e7fbe(0x1c3))/0x7*(-parseInt(_0x2e7fbe(0x1bb))/0x8)+-parseInt(_0x2e7fbe(0x1be))/0x9*(-parseInt(_0x2e7fbe(0x1ca))/0xa)+parseInt(_0x2e7fbe(0x1c4))/0xb*(-parseInt(_0x2e7fbe(0x1bf))/0xc);if(_0x5bbadc===_0x1a7e6d)break;else _0x44192a['push'](_0x44192a['shift']());}catch(_0x54b823){_0x44192a['push'](_0x44192a['shift']());}}}(_0x4ad5,0x266c4));function _0x2f71(_0x1cbf22,_0x4a500a){_0x1cbf22=_0x1cbf22-0x1b9;var _0x4ad520=_0x4ad5();var _0x2f71c8=_0x4ad520[_0x1cbf22];return _0x2f71c8;}export async function setupCi(_0x20d253,_0x3a44b9,_0x47cea4){var _0xfcf6b1=_0x2f71,_0x40a1ed={'qXyfx':function(_0x1c608a,_0x91055d){return _0x1c608a+_0x91055d;},'AMjES':function(_0x79e322,_0x8dc813){return _0x79e322+_0x8dc813;},'lyauI':function(_0x25907e,_0x59a7b8){return _0x25907e+_0x59a7b8;},'DxiCL':function(_0x2602f5,_0x51e142){return _0x2602f5+_0x51e142;},'cBFfB':_0xfcf6b1(0x1c0),'MJhff':'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','qpQFH':_0xfcf6b1(0x1c2),'akwdj':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'};console[_0xfcf6b1(0x1c8)](_0x40a1ed[_0xfcf6b1(0x1ba)](_0x40a1ed['qXyfx'](_0x40a1ed[_0xfcf6b1(0x1bc)](_0x40a1ed[_0xfcf6b1(0x1c9)](_0x40a1ed['AMjES'](_0x40a1ed['DxiCL'](_0x40a1ed['cBFfB'],'\x0a'),_0x40a1ed['MJhff']),_0x40a1ed['qpQFH']),'\x0a'),_0x40a1ed['akwdj']),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process['exit'](0x1);}function _0x4ad5(){var _0x2610c3=['9522pzOMrz','qXyfx','464pwjqiR','AMjES','272xyLNKb','1377cftEtM','12iHCTMp','ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','606KHWrkT','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','12348rbasMS','1936814OAnnHF','11210mmOJyl','277770iNNqqJ','205326MoHtsx','error','lyauI','17730ccsmjM'];_0x4ad5=function(){return _0x2610c3;};return _0x4ad5();}
@@ -1 +1 @@
1
- (function(_0x5254c8,_0x7b1eda){const _0x15a220=_0x4f32,_0x987136=_0x5254c8();while(!![]){try{const _0x11112f=parseInt(_0x15a220(0x173))/0x1+parseInt(_0x15a220(0x191))/0x2+parseInt(_0x15a220(0x192))/0x3+parseInt(_0x15a220(0x198))/0x4*(-parseInt(_0x15a220(0x18c))/0x5)+parseInt(_0x15a220(0x178))/0x6*(-parseInt(_0x15a220(0x17f))/0x7)+parseInt(_0x15a220(0x179))/0x8*(-parseInt(_0x15a220(0x174))/0x9)+-parseInt(_0x15a220(0x18a))/0xa;if(_0x11112f===_0x7b1eda)break;else _0x987136['push'](_0x987136['shift']());}catch(_0x3a7581){_0x987136['push'](_0x987136['shift']());}}}(_0x1daf,0x47200));import{basename}from'path';import _0x15b700 from'inquirer';function _0x4f32(_0x196f05,_0x1bfe9f){_0x196f05=_0x196f05-0x16c;const _0x1dafe0=_0x1daf();let _0x4f32df=_0x1dafe0[_0x196f05];return _0x4f32df;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x3df439={}){const _0x53b0d8=_0x4f32,_0x32711b={'CaOop':_0x53b0d8(0x18e),'kmfKL':'To\x20get\x20started:','TZZUo':_0x53b0d8(0x187),'MdHZK':function(_0x5133c4,_0x50ff41){return _0x5133c4===_0x50ff41;},'tiBzk':_0x53b0d8(0x193),'PDSyy':'✓\x20Found\x20API\x20token','FLzQH':function(_0x541a30){return _0x541a30();},'czqXE':function(_0x23064a,_0x477563){return _0x23064a(_0x477563);},'ptNvg':function(_0x4eba6f,_0x323aa8){return _0x4eba6f===_0x323aa8;},'TvdUI':_0x53b0d8(0x176),'udvUc':function(_0x1fd7c6){return _0x1fd7c6();},'pcbHs':_0x53b0d8(0x16c),'uDQls':_0x53b0d8(0x18b),'lQYsh':_0x53b0d8(0x180),'xMxRS':function(_0x48452a,_0x3d8a8e){return _0x48452a instanceof _0x3d8a8e;},'ckfjz':_0x53b0d8(0x17a),'wiKvo':function(_0x2023d5,_0x500923){return _0x2023d5>_0x500923;},'EZmMn':_0x53b0d8(0x184)};console[_0x53b0d8(0x175)](_0x53b0d8(0x186));const _0x46a157=_0x3df439['platform']??_0x53b0d8(0x185),_0x5084cd=await getToken();if(!_0x5084cd){console['log'](_0x32711b['CaOop']),console['log'](_0x32711b[_0x53b0d8(0x17e)]),console[_0x53b0d8(0x175)]('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli'),console['log'](_0x53b0d8(0x16f)+(_0x46a157===_0x32711b[_0x53b0d8(0x17d)]?_0x53b0d8(0x193):'')+'\x20<your-api-token>'),console[_0x53b0d8(0x175)](_0x53b0d8(0x197)+(_0x32711b['MdHZK'](_0x46a157,'opencode')?_0x32711b[_0x53b0d8(0x195)]:'')+'\x0a');return;}console[_0x53b0d8(0x175)](_0x32711b[_0x53b0d8(0x190)]);const _0x42eb49=_0x32711b['FLzQH'](getProjectRoot),_0x46d0ec=_0x32711b[_0x53b0d8(0x16e)](basename,_0x42eb49),_0x277e3a=_0x32711b[_0x53b0d8(0x182)](_0x46a157,'opencode')?getOpencodeConfigDir(_0x32711b['TvdUI'])+'/skills/':_0x32711b[_0x53b0d8(0x181)](getClaudeConfigDir)+'/skills/',_0x45a9ca=_0x32711b[_0x53b0d8(0x182)](_0x46a157,_0x32711b[_0x53b0d8(0x17d)])?_0x42eb49+_0x53b0d8(0x172):_0x42eb49+_0x53b0d8(0x188),_0x54afb8=process[_0x53b0d8(0x170)]['isTTY']&&process['stdout']['isTTY'];let _0x533a8d;if(_0x3df439['autoInstall'])_0x533a8d=_0x3df439['autoInstall'];else{if(_0x54afb8){const _0x5e68ce=await _0x15b700[_0x53b0d8(0x16d)]([{'type':'list','name':_0x32711b['pcbHs'],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0x277e3a+')','value':_0x32711b[_0x53b0d8(0x17b)]},{'name':_0x53b0d8(0x196)+_0x45a9ca+')','value':_0x32711b['uDQls']}]}]);_0x533a8d=_0x5e68ce['installLevel'];}else _0x533a8d=_0x32711b['uDQls'],console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x45a9ca+')');}let _0x5dba65=0x0;const _0x246c61=getCurrentVersion();console['log'](_0x32711b['lQYsh']);try{const _0x505028=await installSkill(_0x53b0d8(0x189),{'cliVersion':_0x246c61,'level':_0x533a8d,'platform':_0x46a157});_0x505028&&_0x5dba65++;}catch(_0x14c0a3){console[_0x53b0d8(0x171)]('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x32711b[_0x53b0d8(0x18d)](_0x14c0a3,Error)?_0x14c0a3['message']:_0x14c0a3);}if(_0x5dba65>0x0){const _0x4ae1d6=_0x533a8d===_0x53b0d8(0x176)?_0x32711b['ckfjz']:_0x53b0d8(0x183);console[_0x53b0d8(0x175)](_0x53b0d8(0x194)+_0x5dba65+'\x20'+_0x4ae1d6+'\x20skill'+(_0x32711b['wiKvo'](_0x5dba65,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x3df439['suppressUsage']&&(console['log'](_0x53b0d8(0x177)),_0x46a157===_0x53b0d8(0x187)?console['log'](_0x32711b['EZmMn']):console['log'](_0x53b0d8(0x18f)));}else console[_0x53b0d8(0x175)](_0x53b0d8(0x17c));}function _0x1daf(){const _0x3eacb7=['ptNvg','project-level','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','claude','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','opencode','/.claude/skills/','ranger','1308710zjAjTp','project','1260eJwnOn','xMxRS','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','PDSyy','1097478LMLywM','167595phFPRg','\x20--opencode','\x0a✅\x20Installed\x20','tiBzk','This\x20project\x20only\x20(','\x20\x203.\x20Run:\x20ranger\x20skillup','2224kSMYNE','installLevel','prompt','czqXE','\x20\x202.\x20Run:\x20ranger\x20setup','stdin','warn','/.opencode/skills/','245095UGJnNn','120735KfdUhG','log','user','To\x20use:','12354YVFALY','40DagScH','user-level','TvdUI','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','TZZUo','kmfKL','749tSvGSf','\x0a📦\x20Installing\x20skills...\x0a','udvUc'];_0x1daf=function(){return _0x3eacb7;};return _0x1daf();}
1
+ (function(_0x27a1d6,_0x2fb82e){const _0x3f3c4e=_0x2d4f,_0x2760dc=_0x27a1d6();while(!![]){try{const _0x5e7381=parseInt(_0x3f3c4e(0xff))/0x1*(-parseInt(_0x3f3c4e(0xd7))/0x2)+parseInt(_0x3f3c4e(0xf0))/0x3+parseInt(_0x3f3c4e(0xd2))/0x4*(-parseInt(_0x3f3c4e(0xdd))/0x5)+parseInt(_0x3f3c4e(0xda))/0x6*(-parseInt(_0x3f3c4e(0xf2))/0x7)+parseInt(_0x3f3c4e(0xe9))/0x8*(parseInt(_0x3f3c4e(0xd4))/0x9)+-parseInt(_0x3f3c4e(0xef))/0xa*(parseInt(_0x3f3c4e(0xed))/0xb)+-parseInt(_0x3f3c4e(0xfc))/0xc*(-parseInt(_0x3f3c4e(0xd5))/0xd);if(_0x5e7381===_0x2fb82e)break;else _0x2760dc['push'](_0x2760dc['shift']());}catch(_0x21da46){_0x2760dc['push'](_0x2760dc['shift']());}}}(_0x702f,0xb4098));import{basename}from'path';import _0x2d1c81 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x2d4f(_0x250d8f,_0x13048c){_0x250d8f=_0x250d8f-0xd2;const _0x702f8c=_0x702f();let _0x2d4f5b=_0x702f8c[_0x250d8f];return _0x2d4f5b;}function _0x702f(){const _0x8a2198=['\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','mESjt','Where\x20should\x20skills\x20be\x20installed?','48965088VerIdE','PPalM','IrHUC','11534YQddRe','\x20skill','✓\x20Found\x20API\x20token','SAtzb','1866776DNhNEw','message','327141vimZGM','13iWKjxT','log','140COgtUo','\x20--opencode','project-level','1398dYzTWU','\x0a📦\x20Installing\x20skills...\x0a','zQgDR','5KilPRa','/skills/','\x20<your-api-token>','All\x20projects\x20(','VzXDr','project','KSIQB','imIzs','/.opencode/skills/','sZApP','HjgZU','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','8ibfxdO','installLevel','autoInstall','ExKPt','22GsjQul','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','6145220LRvaoN','1092108swaKyv','To\x20use:','37261IGcETq','isTTY','prompt','user-level','claude','user','\x20\x203.\x20Run:\x20ranger\x20skillup'];_0x702f=function(){return _0x8a2198;};return _0x702f();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x547eb5={}){const _0x53f47d=_0x2d4f,_0x118563={'KSIQB':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','IrHUC':_0x53f47d(0xf6),'YPpTb':'2|5|3|1|4|0','ExKPt':function(_0x652ba7,_0x39d2b1){return _0x652ba7===_0x39d2b1;},'PPalM':'opencode','HjgZU':'To\x20get\x20started:','VzXDr':_0x53f47d(0x101),'mESjt':function(_0x4e128d,_0x51c834){return _0x4e128d(_0x51c834);},'imIzs':function(_0x153add,_0x264e1b){return _0x153add===_0x264e1b;},'SAtzb':function(_0x3d3b11){return _0x3d3b11();},'JMttJ':_0x53f47d(0xf7),'sZApP':_0x53f47d(0xf1),'ZfBge':_0x53f47d(0xe8),'zQgDR':'\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','beXkO':_0x53f47d(0xf9)};console[_0x53f47d(0xd6)](_0x118563[_0x53f47d(0xe3)]);const _0x3cc7b6=_0x547eb5['platform']??_0x118563[_0x53f47d(0xfe)],_0x5180bf=await getToken();if(!_0x5180bf){const _0x141086=_0x118563['YPpTb']['split']('|');let _0x136e2f=0x0;while(!![]){switch(_0x141086[_0x136e2f++]){case'0':return;case'1':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x118563[_0x53f47d(0xec)](_0x3cc7b6,_0x118563[_0x53f47d(0xfd)])?_0x53f47d(0xd8):'')+_0x53f47d(0xdf));continue;case'2':console['log']('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a');continue;case'3':console[_0x53f47d(0xd6)]('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli');continue;case'4':console['log'](_0x53f47d(0xf8)+(_0x3cc7b6==='opencode'?_0x53f47d(0xd8):'')+'\x0a');continue;case'5':console[_0x53f47d(0xd6)](_0x118563[_0x53f47d(0xe7)]);continue;}break;}}console['log'](_0x118563[_0x53f47d(0xe1)]);const _0x4afada=getProjectRoot(),_0x5430c6=_0x118563[_0x53f47d(0xfa)](basename,_0x4afada),_0x2a3078=_0x118563[_0x53f47d(0xe4)](_0x3cc7b6,_0x118563['PPalM'])?getOpencodeConfigDir(_0x53f47d(0xf7))+'/skills/':_0x118563[_0x53f47d(0x102)](getClaudeConfigDir)+_0x53f47d(0xde),_0x368f21=_0x3cc7b6===_0x118563[_0x53f47d(0xfd)]?_0x4afada+_0x53f47d(0xe5):_0x4afada+'/.claude/skills/',_0x37f08c=process['stdin']['isTTY']&&process['stdout'][_0x53f47d(0xf3)];let _0xe5ad6c;if(_0x547eb5[_0x53f47d(0xeb)])_0xe5ad6c=_0x547eb5['autoInstall'];else{if(_0x37f08c){const _0x4778b8=await _0x2d1c81[_0x53f47d(0xf4)]([{'type':'list','name':_0x53f47d(0xea),'message':_0x53f47d(0xfb),'choices':[{'name':_0x53f47d(0xe0)+_0x2a3078+')','value':_0x118563['JMttJ']},{'name':'This\x20project\x20only\x20('+_0x368f21+')','value':_0x53f47d(0xe2)}]}]);_0xe5ad6c=_0x4778b8[_0x53f47d(0xea)];}else _0xe5ad6c=_0x53f47d(0xe2),console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x368f21+')');}let _0x39282e=0x0;const _0x38c2ba=getCurrentVersion();console[_0x53f47d(0xd6)](_0x53f47d(0xdb));try{const _0x1975ee=await installSkill('ranger',{'cliVersion':_0x38c2ba,'level':_0xe5ad6c,'platform':_0x3cc7b6});_0x1975ee&&_0x39282e++;}catch(_0x385119){console['warn'](_0x53f47d(0xee),_0x385119 instanceof Error?_0x385119[_0x53f47d(0xd3)]:_0x385119);}if(_0x39282e>0x0){const _0x300246=_0xe5ad6c===_0x118563['JMttJ']?_0x53f47d(0xf5):_0x53f47d(0xd9);console[_0x53f47d(0xd6)]('\x0a✅\x20Installed\x20'+_0x39282e+'\x20'+_0x300246+_0x53f47d(0x100)+(_0x39282e>0x1?'s':'')+'\x20successfully!\x0a'),!_0x547eb5['suppressUsage']&&(console[_0x53f47d(0xd6)](_0x118563[_0x53f47d(0xe6)]),_0x3cc7b6===_0x118563['PPalM']?console['log'](_0x118563['ZfBge']):console[_0x53f47d(0xd6)](_0x118563[_0x53f47d(0xdc)]));}else console[_0x53f47d(0xd6)](_0x118563['beXkO']);}
@@ -1 +1 @@
1
- const _0xe9931d=_0x5adf;(function(_0x115024,_0x1a2f10){const _0x2f2f8a=_0x5adf,_0x410b6d=_0x115024();while(!![]){try{const _0x2878ff=parseInt(_0x2f2f8a(0x1c8))/0x1*(-parseInt(_0x2f2f8a(0x19e))/0x2)+parseInt(_0x2f2f8a(0x194))/0x3*(parseInt(_0x2f2f8a(0x16b))/0x4)+-parseInt(_0x2f2f8a(0x172))/0x5+-parseInt(_0x2f2f8a(0x173))/0x6+parseInt(_0x2f2f8a(0x17b))/0x7*(parseInt(_0x2f2f8a(0x178))/0x8)+parseInt(_0x2f2f8a(0x1c9))/0x9+parseInt(_0x2f2f8a(0x197))/0xa*(parseInt(_0x2f2f8a(0x1a3))/0xb);if(_0x2878ff===_0x1a2f10)break;else _0x410b6d['push'](_0x410b6d['shift']());}catch(_0x67abc6){_0x410b6d['push'](_0x410b6d['shift']());}}}(_0xaae9,0x6e663));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x4ca0b8 from'inquirer';function _0x5adf(_0x27ca92,_0x33171c){_0x27ca92=_0x27ca92-0x169;const _0xaae9f8=_0xaae9();let _0x5adfac=_0xaae9f8[_0x27ca92];return _0x5adfac;}import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';function _0xaae9(){const _0x429c40=['TPjbV','\x20install\x20chromium','✓\x20Local\x20profile\x20already\x20exists','url','1ryHYhN','6363045hiCniy','UefQH','local','success','4JIYrpZ','auth','iwuCq','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','1.58.2','iUcHz','\x0a⚠\x20Skipping\x20Chromium\x20installation.','1370845kSBUGD','4671222NnABOe','inherit','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','PaGaV','557616GzBWkp','provided_token','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','21sPXmdK','force','playwright@','eLnQn','prompt','status','trackPhaseStart','\x0a❌\x20Profile\x20setup\x20failed:','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','--with-deps','Sspbk','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','The\x20required\x20version\x20(','\x1b[0m','GITHUB_ENV','TIHmt','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','organizationName','skipAuth','error','chromium','Authentication\x20failed:\x20','brAgC','ready','GEFvd','734259OKWKBI','JCUYQ','trackPhaseEnd','15910dcFQNg','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','.gitignore','rELvb','lkpMi','allowInsecureLocalhost','skipChromium','231524VJbtOI','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','TdQLF','XxRqY','3179ppfDma','taRcT','KulIr','withDeps','scope','user','platform','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','message','You\x20can\x20install\x20it\x20manually\x20by\x20running:','log','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','fdlBN','\x20now?','\x20and\x20prompt\x20the\x20coding','Validating\x20API\x20token...','✓\x20Authenticated\x20to\x20','xyKPe','FpzdQ','install','GEWeA','plugin','ignore','PQRNj','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','ranger','szcQm','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','\x1b[1m','\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','version','profile'];_0xaae9=function(){return _0x429c40;};return _0xaae9();}import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0xe9931d(0x16f);const bold=_0x5b3bf3=>_0xe9931d(0x1bf)+_0x5b3bf3+_0xe9931d(0x188);export function getPlaywrightVersion(){const _0x3d0136=_0xe9931d;try{const _0x13c5bc=require['resolve']('playwright/package.json'),_0x2142e7=require(_0x13c5bc);return _0x2142e7[_0x3d0136(0x1c2)];}catch{return null;}}export function installChromiumBinary(_0x8e02b9,_0x14d6ce=![]){const _0x41e31d=_0xe9931d,_0x39c8ce={'desaT':_0x41e31d(0x1b6),'tChFM':_0x41e31d(0x184),'xMxvW':function(_0x1425d3,_0x3b6e52,_0x51230f,_0x7f1331){return _0x1425d3(_0x3b6e52,_0x51230f,_0x7f1331);},'GEFvd':'npx','iUcHz':_0x41e31d(0x1b9),'aMBMH':function(_0x1336f3,_0x343cd5){return _0x1336f3===_0x343cd5;},'lkpMi':_0x41e31d(0x18e)};return new Promise((_0x49e726,_0x592b69)=>{const _0xe891a4=_0x41e31d,_0x37608e=[_0xe891a4(0x17d)+_0x8e02b9,_0x39c8ce['desaT'],..._0x14d6ce?[_0x39c8ce['tChFM']]:[],'chromium'],_0xd27c4d=_0x39c8ce['xMxvW'](spawn,_0x39c8ce[_0xe891a4(0x193)],_0x37608e,{'stdio':[_0x39c8ce[_0xe891a4(0x170)],'inherit',_0xe891a4(0x174)],'shell':_0x39c8ce['aMBMH'](process[_0xe891a4(0x1a9)],'win32')});_0xd27c4d['on']('close',_0xf99c8c=>{_0xf99c8c===0x0?_0x49e726():_0x592b69(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0xf99c8c));}),_0xd27c4d['on'](_0x39c8ce[_0xe891a4(0x19b)],_0x58ac38=>{_0x592b69(_0x58ac38);});});}export async function authenticate(_0x34ac96){const _0x16644f=_0xe9931d,_0x193e3f={'ZNtYr':function(_0x213cf1){return _0x213cf1();},'RybGi':'existing_token','UfcAf':function(_0x213594,_0x33f69d){return _0x213594 instanceof _0x33f69d;},'awhlC':_0x16644f(0x1b2),'fZLNE':function(_0x4caf66,_0x17312e){return _0x4caf66(_0x17312e);},'zXvFC':'✓\x20Exported\x20credentials\x20for\x20CI','PaGaV':'✓\x20Stored\x20credentials\x20locally'};if(!_0x34ac96){const _0x52ab47=await _0x193e3f['ZNtYr'](getToken);if(_0x52ab47){const _0x3e4eaa=await getCurrentUser(_0x52ab47);if(_0x3e4eaa['success'])return console[_0x16644f(0x1ad)]('✓\x20Already\x20authenticated\x20to\x20'+_0x3e4eaa['user']['organizationName']),{'token':_0x52ab47,'method':_0x193e3f['RybGi']};}try{_0x34ac96=await runDeviceAuthFlow();}catch(_0x489c78){throw new Error(_0x16644f(0x190)+(_0x193e3f['UfcAf'](_0x489c78,Error)?_0x489c78[_0x16644f(0x1ab)]:_0x489c78));}const _0x1c5180=await getCurrentUser(_0x34ac96);if(!_0x1c5180[_0x16644f(0x16a)])throw new Error(_0x16644f(0x19f)+_0x1c5180['error']);return console[_0x16644f(0x1ad)]('✓\x20Authenticated\x20to\x20'+_0x1c5180['user'][_0x16644f(0x18c)]),{'token':_0x34ac96,'method':'device_auth'};}console['log'](_0x193e3f['awhlC']);const _0x4f6aa6=await getCurrentUser(_0x34ac96);if(!_0x4f6aa6[_0x16644f(0x16a)]){if(_0x4f6aa6[_0x16644f(0x180)])throw new Error(_0x16644f(0x190)+_0x4f6aa6['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x16644f(0x1be)+_0x4f6aa6[_0x16644f(0x18e)]+_0x16644f(0x1a0));}return console[_0x16644f(0x1ad)](_0x16644f(0x1b3)+_0x4f6aa6[_0x16644f(0x1a8)][_0x16644f(0x18c)]),await _0x193e3f['fZLNE'](storeToken,_0x34ac96),console[_0x16644f(0x1ad)](process['env'][_0x16644f(0x189)]?_0x193e3f['zXvFC']:_0x193e3f[_0x16644f(0x177)]),{'token':_0x34ac96,'method':_0x16644f(0x179)};}export async function ensureRangerDir(_0x1200dd){const _0x5aa2f2=_0xe9931d,_0x34e63f={'EcVxW':'✓\x20Created\x20~/.ranger/\x20directory'};void _0x1200dd;const _0x402a94=getRangerHomeDir();return!existsSync(_0x402a94)?(await mkdir(_0x402a94,{'recursive':!![]}),console[_0x5aa2f2(0x1ad)](_0x34e63f['EcVxW']),{'path':_0x402a94,'installed':!![]}):(console['log']('✓\x20~/.ranger/\x20directory\x20already\x20exists'),{'path':_0x402a94,'installed':![]});}export async function ensureChromium(_0x54860b=![]){const _0x529ea0=_0xe9931d,_0x37c39e={'jqNLx':function(_0x37eb37,_0xae1ef7){return _0x37eb37??_0xae1ef7;},'pHQex':'confirm','bnNPJ':'install','gdKDJ':'\x20(fallback\x20version)','Sspbk':_0x529ea0(0x198),'MsKFQ':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','xMrSv':function(_0x2bc99f,_0x17f89){return _0x2bc99f instanceof _0x17f89;}};let _0x5cb9f9=![];try{const _0x3d3a8b=chromium['executablePath']();_0x5cb9f9=existsSync(_0x3d3a8b);}catch{_0x5cb9f9=![];}if(_0x5cb9f9)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x59d9bd=getPlaywrightVersion(),_0x5e5021=_0x37c39e['jqNLx'](_0x59d9bd,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0xbabbc9=!_0x59d9bd,_0x3f4ca9=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0x383a73=!![];if(_0x3f4ca9){const {install:_0x4678cf}=await _0x4ca0b8[_0x529ea0(0x17f)]([{'type':_0x37c39e['pHQex'],'name':_0x37c39e['bnNPJ'],'message':_0xbabbc9?_0x529ea0(0x1ae)+_0x5e5021+_0x529ea0(0x1b0):_0x529ea0(0x187)+_0x5e5021+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x383a73=_0x4678cf;}else console[_0x529ea0(0x1ad)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x5e5021+(_0xbabbc9?_0x37c39e['gdKDJ']:'')+'...');if(_0x383a73){console[_0x529ea0(0x1ad)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x5e5021,_0x54860b),console[_0x529ea0(0x1ad)](_0x37c39e[_0x529ea0(0x185)]);}catch(_0x1ba8a6){console['error'](_0x37c39e['MsKFQ'],_0x37c39e['xMrSv'](_0x1ba8a6,Error)?_0x1ba8a6[_0x529ea0(0x1ab)]:_0x1ba8a6),console[_0x529ea0(0x1ad)](_0x529ea0(0x1ac)),console['log']('\x20\x20npx\x20playwright@'+_0x5e5021+_0x529ea0(0x1c5));}}else console['log'](_0x529ea0(0x171)),console[_0x529ea0(0x1ad)](_0x529ea0(0x186)),console['log']('\x20\x20npx\x20playwright@'+_0x5e5021+_0x529ea0(0x1c5));return!![];}export async function writeRangerGitignore(_0x3f1111){const _0x48cfae=_0xe9931d,_0x8b9d57={'PQRNj':'✓\x20Created\x20.ranger/.gitignore'},_0x34df31=join(_0x3f1111,_0x48cfae(0x199)),_0x4090b5=_0x48cfae(0x1c0);await writeFile(_0x34df31,_0x4090b5),console[_0x48cfae(0x1ad)](_0x8b9d57[_0x48cfae(0x1ba)]);}export async function ensureLocalEnv(_0x43e13a,_0x5d735c){const _0x5015f2=_0xe9931d,_0x4f6163={'KulIr':function(_0x573915){return _0x573915();},'XxRqY':function(_0x2326a9,_0x357349){return _0x2326a9!==_0x357349;},'TIHmt':'user','opUTL':function(_0x43329f,_0x3daf81){return _0x43329f===_0x3daf81;},'rbOXI':function(_0x43d5c3,_0x263224,_0x2d5354,_0x5e7d13){return _0x43d5c3(_0x263224,_0x2d5354,_0x5e7d13);},'wuZOy':_0x5015f2(0x169)};if(!_0x4f6163[_0x5015f2(0x1a5)](findGitRoot)&&_0x4f6163[_0x5015f2(0x1a2)](_0x43e13a?.['scope'],_0x4f6163[_0x5015f2(0x18a)]))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x42bbd1=_0x4f6163['opUTL'](_0x43e13a?.[_0x5015f2(0x1a7)],_0x5015f2(0x1a8))?getRangerHomeDir():undefined;if(findExistingEnv('local',{'locations':['local'],'rangerDir':_0x42bbd1}))return console['log'](_0x5015f2(0x1c6)),{'ready':!![],'skipped':![]};try{return await _0x4f6163['rbOXI'](addEnv,_0x4f6163['wuZOy'],{'url':_0x43e13a?.[_0x5015f2(0x1c7)],'force':_0x43e13a?.[_0x5015f2(0x17c)],'allowInsecureLocalhost':_0x43e13a?.[_0x5015f2(0x19c)],'scope':_0x43e13a?.[_0x5015f2(0x1a7)]},_0x5d735c),{'ready':!![],'skipped':![]};}catch(_0x3adeae){return console['error'](_0x5015f2(0x182),_0x3adeae instanceof Error?_0x3adeae['message']:_0x3adeae),{'ready':![],'skipped':![]};}}export async function start(_0x4677aa,_0x229652,_0x31dfe3){const _0x7a9910=_0xe9931d,_0x49f58e={'taRcT':function(_0x2fcdca,_0x5109ec){return _0x2fcdca+_0x5109ec;},'GEWeA':function(_0x218a14,_0x4e11b8){return _0x218a14(_0x4e11b8);},'JCUYQ':_0x7a9910(0x1a8),'Lhxcf':function(_0x294a12){return _0x294a12();},'iwuCq':'✓\x20Skipping\x20authentication\x20(--skip-auth)','xyKPe':'skipped','fdlBN':'auth','SuYVO':_0x7a9910(0x1aa),'eLnQn':'chromium','TPjbV':_0x7a9910(0x183),'TdQLF':'plugin','FpzdQ':'skills','brAgC':function(_0x3797c3,_0x2b5d99,_0x4af167){return _0x3797c3(_0x2b5d99,_0x4af167);},'iXHXI':function(_0x12b9bf){return _0x12b9bf();},'rELvb':_0x7a9910(0x17a),'szcQm':function(_0x80609a,_0x7007b1){return _0x80609a+_0x7007b1;},'IvWfq':function(_0x188b40,_0x5499c5){return _0x188b40+_0x5499c5;},'UefQH':function(_0x575b82,_0x3f4642){return _0x575b82(_0x3f4642);},'UODzf':function(_0x3eb838,_0x37ff4b){return _0x3eb838+_0x37ff4b;}};console[_0x7a9910(0x1ad)]('\x0a🚀\x20Ranger\x20Setup\x0a');_0x229652?.[_0x7a9910(0x1a7)]!==undefined&&_0x229652['scope']!=='user'&&(console['error'](_0x49f58e[_0x7a9910(0x1a4)]('ranger\x20setup\x20--scope='+_0x49f58e['GEWeA'](String,_0x229652['scope'])+'\x20is\x20no\x20longer\x20supported.\x20'+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20',_0x7a9910(0x1c1))),process['exit'](0x1));_0x229652={..._0x229652,'scope':_0x49f58e[_0x7a9910(0x195)]};const _0xadd1d4=!_0x49f58e['GEWeA'](existsSync,_0x49f58e['Lhxcf'](getRangerHomeDir));await _0x49f58e['GEWeA'](ensureRangerDir,_0x49f58e[_0x7a9910(0x195)]);if(_0x229652?.['skipAuth'])console[_0x7a9910(0x1ad)](_0x49f58e[_0x7a9910(0x16d)]),_0x31dfe3?.['trackPhaseEnd'](_0x7a9910(0x16c),{'isFirstRun':_0xadd1d4,'method':_0x49f58e[_0x7a9910(0x1b4)]});else{_0x31dfe3?.['trackPhaseStart'](_0x49f58e[_0x7a9910(0x1af)]);const _0x11caa7=await authenticate(_0x4677aa);_0x31dfe3?.['trackPhaseEnd'](_0x7a9910(0x16c),{'isFirstRun':_0xadd1d4,'method':_0x11caa7['method']});}_0x31dfe3?.['trackPhaseStart'](_0x7a9910(0x18f));_0x229652?.[_0x7a9910(0x19d)]?console[_0x7a9910(0x1ad)](_0x49f58e['SuYVO']):await _0x49f58e[_0x7a9910(0x1b7)](ensureChromium,_0x229652?.[_0x7a9910(0x1a6)]);_0x31dfe3?.[_0x7a9910(0x196)](_0x49f58e[_0x7a9910(0x17e)],{'isFirstRun':_0xadd1d4,'skipped':!!_0x229652?.[_0x7a9910(0x19d)]}),console[_0x7a9910(0x1ad)](_0x49f58e[_0x7a9910(0x1c4)]);const _0x14b8ed=_0x229652?.[_0x7a9910(0x1a7)],_0x493358=_0x229652?.['opencode']??![];let _0x3dc8f6=null;_0x493358?(_0x31dfe3?.[_0x7a9910(0x181)]('plugin'),_0x3dc8f6=await _0x49f58e['GEWeA'](ensureOpencodePluginConfig,_0x14b8ed),_0x31dfe3?.['trackPhaseEnd'](_0x49f58e['TdQLF'],{'isFirstRun':_0xadd1d4,'opencode':!![]})):(_0x31dfe3?.['trackPhaseStart'](_0x7a9910(0x1b8)),await ensureClaudePlugin(_0x14b8ed),_0x31dfe3?.['trackPhaseEnd'](_0x49f58e[_0x7a9910(0x1a1)],{'isFirstRun':_0xadd1d4}));if(_0x493358&&_0x3dc8f6){_0x31dfe3?.[_0x7a9910(0x181)](_0x49f58e['FpzdQ']);try{await _0x49f58e[_0x7a9910(0x191)](installSkill,_0x7a9910(0x1bc),{'level':_0x3dc8f6['scope'],'cliVersion':_0x49f58e['iXHXI'](getCurrentVersion),'platform':'opencode'}),_0x31dfe3?.['trackPhaseEnd'](_0x49f58e['FpzdQ'],{'isFirstRun':_0xadd1d4,'opencode':!![]});}catch(_0xd96454){console['warn'](_0x49f58e[_0x7a9910(0x19a)],_0xd96454 instanceof Error?_0xd96454[_0x7a9910(0x1ab)]:_0xd96454),_0x31dfe3?.['trackPhaseEnd'](_0x49f58e['FpzdQ'],{'isFirstRun':_0xadd1d4,'opencode':!![],'failed':!![]});}}else _0x31dfe3?.[_0x7a9910(0x181)](_0x49f58e[_0x7a9910(0x1b5)]),await _0x49f58e[_0x7a9910(0x1b7)](ensureClaudeSkills,_0x14b8ed),_0x31dfe3?.['trackPhaseEnd']('skills',{'isFirstRun':_0xadd1d4});if(_0x229652?.[_0x7a9910(0x18d)])console[_0x7a9910(0x1ad)]('\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a');else{if(_0x229652?.[_0x7a9910(0x1c7)]){_0x31dfe3?.[_0x7a9910(0x181)](_0x7a9910(0x1c3));const _0x52103f=await ensureLocalEnv({'url':_0x229652['url'],'force':_0x229652?.[_0x7a9910(0x17c)],'allowInsecureLocalhost':_0x229652?.[_0x7a9910(0x19c)],'scope':'user'},_0x31dfe3);_0x31dfe3?.[_0x7a9910(0x196)]('profile',{'isFirstRun':_0xadd1d4,'profileReady':_0x52103f[_0x7a9910(0x192)],'userSkipped':_0x52103f['skipped']});}else console[_0x7a9910(0x1ad)](_0x49f58e[_0x7a9910(0x1bd)](_0x49f58e['IvWfq']('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:'+('\x0a\x20\x20'+_0x49f58e[_0x7a9910(0x1ca)](bold,'ranger\x20profile\x20add\x20<name>'))+_0x7a9910(0x16e),'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:'),_0x7a9910(0x1bb)));}if(_0x493358)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x7a9910(0x1ad)]('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x7a9910(0x1ad)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0x7a9910(0x1ad)](_0x7a9910(0x18b));else{const _0x2083dd=bold('/ranger:enable');console[_0x7a9910(0x1ad)](_0x49f58e['UODzf']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x2083dd+_0x7a9910(0x1b1)+_0x7a9910(0x175)+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser',_0x7a9910(0x176)));}}
1
+ const _0x5e1827=_0x13e1;(function(_0x2c1f38,_0xeb1e82){const _0x37191c=_0x13e1,_0x27ee03=_0x2c1f38();while(!![]){try{const _0x45d2a4=parseInt(_0x37191c(0x1b2))/0x1+-parseInt(_0x37191c(0x196))/0x2+-parseInt(_0x37191c(0x1c6))/0x3+parseInt(_0x37191c(0x1c5))/0x4*(-parseInt(_0x37191c(0x1bf))/0x5)+-parseInt(_0x37191c(0x1d7))/0x6*(-parseInt(_0x37191c(0x194))/0x7)+parseInt(_0x37191c(0x186))/0x8*(-parseInt(_0x37191c(0x1cc))/0x9)+parseInt(_0x37191c(0x17d))/0xa;if(_0x45d2a4===_0xeb1e82)break;else _0x27ee03['push'](_0x27ee03['shift']());}catch(_0x3919be){_0x27ee03['push'](_0x27ee03['shift']());}}}(_0x332a,0xc8bd6));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x332a(){const _0x1c7d13=['You\x20can\x20install\x20it\x20manually\x20by\x20running:','profile','ZUwfJ','EVpTI','788DjMyCR','231495HGXUBi','VuBeY','ejBeX','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','hWrgb','ouoDp','9aOXsCx','.gitignore','pAkMV','RYAcp','wVrRx','GITHUB_ENV','Jfdcz','chromium','ready','✓\x20Exported\x20credentials\x20for\x20CI','TOVmq','6YgNiHS','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.','\x0a❌\x20Profile\x20setup\x20failed:','\x0a⚠\x20Skipping\x20Chromium\x20installation.','skills','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','Validating\x20API\x20token...','existing_token','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','The\x20required\x20version\x20(','✓\x20Created\x20~/.ranger/\x20directory','13003880kSBqTQ','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a','\x20install\x20chromium','ymzfR','wRJdl','auth','RZaDz','scope','9328128oxciGV','trackPhaseStart','xHFvC','inherit','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','playwright/package.json','user','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','log','withDeps','win32','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','qunAp','\x0a\x20\x20','8090614UHacXt','trackPhaseEnd','1349810eNuFAx','\x1b[0m','1.58.2','YpYyO','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','\x20\x20npx\x20playwright@','success','utVhW','\x20(fallback\x20version)','dmToO','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','close','✓\x20Authenticated\x20to\x20','skipAuth','resolve','zyLuz','jWmdb','playwright@','ranger\x20profile\x20add\x20<name>','install','auguP','✓\x20Created\x20.ranger/.gitignore','\x1b[1m','version','isTTY','confirm','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','PiLHA','766185ZqBWMR','error','vkkQw','message','device_auth','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','...','JILxd','stdin','skipChromium','✓\x20Playwright\x20Chromium\x20browser\x20found','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','12235AzTjRH','Authentication\x20failed:\x20'];_0x332a=function(){return _0x1c7d13;};return _0x332a();}import{createRequire}from'module';import{spawn}from'child_process';import _0x1d9bd1 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x5e1827(0x198);const bold=_0x562d25=>_0x5e1827(0x1ac)+_0x562d25+_0x5e1827(0x197);export function getPlaywrightVersion(){const _0x50ed3c=_0x5e1827,_0x22c15c={'xHKmT':_0x50ed3c(0x18b)};try{const _0x5aa938=require[_0x50ed3c(0x1a4)](_0x22c15c['xHKmT']),_0x7efab9=require(_0x5aa938);return _0x7efab9[_0x50ed3c(0x1ad)];}catch{return null;}}export function installChromiumBinary(_0x3eb99a,_0x17da00=![]){const _0x56e8d1=_0x5e1827,_0x3547a2={'jWmdb':_0x56e8d1(0x1a9),'IzgWi':'--with-deps','drTbu':function(_0x3c9ff6,_0x4995d7,_0x2f6760,_0x5de9d6){return _0x3c9ff6(_0x4995d7,_0x2f6760,_0x5de9d6);},'NRkgu':'npx','wCYOy':function(_0x550e75,_0x1ccede){return _0x550e75===_0x1ccede;},'hWrgb':_0x56e8d1(0x1a1)};return new Promise((_0x5dae75,_0x37eef7)=>{const _0x29ed4c=_0x56e8d1,_0x4ec41f={'CsrJO':function(_0x5a52d7,_0x9663a4){return _0x5a52d7(_0x9663a4);}},_0x424649=[_0x29ed4c(0x1a7)+_0x3eb99a,_0x3547a2[_0x29ed4c(0x1a6)],..._0x17da00?[_0x3547a2['IzgWi']]:[],'chromium'],_0x2ddad8=_0x3547a2['drTbu'](spawn,_0x3547a2['NRkgu'],_0x424649,{'stdio':['ignore',_0x29ed4c(0x189),'inherit'],'shell':_0x3547a2['wCYOy'](process['platform'],_0x29ed4c(0x190))});_0x2ddad8['on'](_0x3547a2[_0x29ed4c(0x1ca)],_0x26b276=>{_0x26b276===0x0?_0x5dae75():_0x4ec41f['CsrJO'](_0x37eef7,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x26b276));}),_0x2ddad8['on'](_0x29ed4c(0x1b3),_0x1cc7e4=>{_0x37eef7(_0x1cc7e4);});});}export async function authenticate(_0x1079ae){const _0x2c3bc1=_0x5e1827,_0x504605={'YzwCA':function(_0x25b9de){return _0x25b9de();},'ylWoM':function(_0x5bacfc,_0x478677){return _0x5bacfc(_0x478677);},'pAkMV':_0x2c3bc1(0x1df),'xHFvC':function(_0x34e9dd,_0x1781c2){return _0x34e9dd instanceof _0x1781c2;},'qunAp':_0x2c3bc1(0x1b6),'QVPAM':_0x2c3bc1(0x1de),'ouoDp':'provided_token'};if(!_0x1079ae){const _0x99a313=await _0x504605['YzwCA'](getToken);if(_0x99a313){const _0x5133a9=await _0x504605['ylWoM'](getCurrentUser,_0x99a313);if(_0x5133a9['success'])return console[_0x2c3bc1(0x18e)]('✓\x20Already\x20authenticated\x20to\x20'+_0x5133a9[_0x2c3bc1(0x18c)]['organizationName']),{'token':_0x99a313,'method':_0x504605[_0x2c3bc1(0x1ce)]};}try{_0x1079ae=await runDeviceAuthFlow();}catch(_0x5366d7){throw new Error(_0x2c3bc1(0x1c0)+(_0x504605[_0x2c3bc1(0x188)](_0x5366d7,Error)?_0x5366d7['message']:_0x5366d7));}const _0x3b666a=await getCurrentUser(_0x1079ae);if(!_0x3b666a['success'])throw new Error(_0x2c3bc1(0x1dd)+_0x3b666a['error']);return console[_0x2c3bc1(0x18e)](_0x2c3bc1(0x1a2)+_0x3b666a[_0x2c3bc1(0x18c)]['organizationName']),{'token':_0x1079ae,'method':_0x504605[_0x2c3bc1(0x192)]};}console['log'](_0x504605['QVPAM']);const _0xf23581=await getCurrentUser(_0x1079ae);if(!_0xf23581[_0x2c3bc1(0x19c)]){if(_0xf23581['status'])throw new Error('Authentication\x20failed:\x20'+_0xf23581[_0x2c3bc1(0x1b3)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0xf23581[_0x2c3bc1(0x1b3)]+_0x2c3bc1(0x1d8));}return console['log'](_0x2c3bc1(0x1a2)+_0xf23581[_0x2c3bc1(0x18c)]['organizationName']),await storeToken(_0x1079ae),console['log'](process['env'][_0x2c3bc1(0x1d1)]?_0x2c3bc1(0x1d5):'✓\x20Stored\x20credentials\x20locally'),{'token':_0x1079ae,'method':_0x504605[_0x2c3bc1(0x1cb)]};}export async function ensureRangerDir(_0x4fa0e4){const _0x2de463=_0x5e1827,_0x42e879={'zyLuz':function(_0x16095b){return _0x16095b();},'vkkQw':function(_0x53a7c3,_0x1ba96a){return _0x53a7c3(_0x1ba96a);},'VuBeY':function(_0x55fd46,_0x319149,_0x400f60){return _0x55fd46(_0x319149,_0x400f60);},'dmToO':_0x2de463(0x1e2)};void _0x4fa0e4;const _0x2cdb43=_0x42e879[_0x2de463(0x1a5)](getRangerHomeDir);return!_0x42e879[_0x2de463(0x1b4)](existsSync,_0x2cdb43)?(await _0x42e879[_0x2de463(0x1c7)](mkdir,_0x2cdb43,{'recursive':!![]}),console['log'](_0x42e879[_0x2de463(0x19f)]),{'path':_0x2cdb43,'installed':!![]}):(console[_0x2de463(0x18e)]('✓\x20~/.ranger/\x20directory\x20already\x20exists'),{'path':_0x2cdb43,'installed':![]});}export async function ensureChromium(_0x38a2d2=![]){const _0x228c93=_0x5e1827,_0x2e4337={'xUMDN':function(_0x1325fe){return _0x1325fe();},'tTnqA':_0x228c93(0x1af),'JILxd':_0x228c93(0x19e),'RYAcp':function(_0x2e6f0f,_0x426a4f,_0x2b7d96){return _0x2e6f0f(_0x426a4f,_0x2b7d96);},'PMfYX':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','ZUwfJ':_0x228c93(0x1c1),'jchDT':_0x228c93(0x1be)};let _0x17c64b=![];try{const _0x4b5738=chromium['executablePath']();_0x17c64b=existsSync(_0x4b5738);}catch{_0x17c64b=![];}if(_0x17c64b)return console[_0x228c93(0x18e)](_0x228c93(0x1bc)),![];const _0x2fa5ff=_0x2e4337['xUMDN'](getPlaywrightVersion),_0x25b39a=_0x2fa5ff??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x312719=!_0x2fa5ff,_0x15d386=process[_0x228c93(0x1ba)][_0x228c93(0x1ae)]&&process['stdout'][_0x228c93(0x1ae)];let _0x26a79f=!![];if(_0x15d386){const {install:_0x208d76}=await _0x1d9bd1['prompt']([{'type':_0x2e4337['tTnqA'],'name':_0x228c93(0x1a9),'message':_0x312719?_0x228c93(0x19a)+_0x25b39a+'\x20now?':_0x228c93(0x1e1)+_0x25b39a+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x26a79f=_0x208d76;}else console['log'](_0x228c93(0x1e0)+_0x25b39a+(_0x312719?_0x2e4337[_0x228c93(0x1b9)]:'')+_0x228c93(0x1b8));if(_0x26a79f){console[_0x228c93(0x18e)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x2e4337[_0x228c93(0x1cf)](installChromiumBinary,_0x25b39a,_0x38a2d2),console[_0x228c93(0x18e)](_0x2e4337['PMfYX']);}catch(_0x40232e){console['error'](_0x228c93(0x1bd),_0x40232e instanceof Error?_0x40232e[_0x228c93(0x1b5)]:_0x40232e),console['log'](_0x2e4337[_0x228c93(0x1c3)]),console[_0x228c93(0x18e)]('\x20\x20npx\x20playwright@'+_0x25b39a+_0x228c93(0x180));}}else console[_0x228c93(0x18e)](_0x228c93(0x1db)),console[_0x228c93(0x18e)](_0x2e4337['jchDT']),console['log'](_0x228c93(0x19b)+_0x25b39a+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x3de165){const _0x368c16=_0x5e1827,_0x374bba=join(_0x3de165,_0x368c16(0x1cd)),_0x28f031=_0x368c16(0x17f);await writeFile(_0x374bba,_0x28f031),console['log'](_0x368c16(0x1ab));}export async function ensureLocalEnv(_0x2a6057,_0x5406ed){const _0x446522=_0x5e1827,_0xd5e76c={'wRJdl':function(_0x2fe3d5,_0x1bf273){return _0x2fe3d5!==_0x1bf273;},'nLmBw':'user','HBdSm':'local','wVrRx':function(_0x5b4f25,_0x3f892c,_0x56f244,_0x3c1abe){return _0x5b4f25(_0x3f892c,_0x56f244,_0x3c1abe);},'IxyWd':_0x446522(0x1da)};if(!findGitRoot()&&_0xd5e76c[_0x446522(0x182)](_0x2a6057?.[_0x446522(0x185)],_0x446522(0x18c)))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x215761=_0x2a6057?.['scope']===_0xd5e76c['nLmBw']?getRangerHomeDir():undefined;if(findExistingEnv('local',{'locations':[_0xd5e76c['HBdSm']],'rangerDir':_0x215761}))return console[_0x446522(0x18e)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};try{return await _0xd5e76c[_0x446522(0x1d0)](addEnv,_0xd5e76c['HBdSm'],{'url':_0x2a6057?.['url'],'force':_0x2a6057?.['force'],'allowInsecureLocalhost':_0x2a6057?.['allowInsecureLocalhost'],'scope':_0x2a6057?.['scope']},_0x5406ed),{'ready':!![],'skipped':![]};}catch(_0x5c0dcc){return console['error'](_0xd5e76c['IxyWd'],_0x5c0dcc instanceof Error?_0x5c0dcc['message']:_0x5c0dcc),{'ready':![],'skipped':![]};}}function _0x13e1(_0x2dacd1,_0x5e7d12){_0x2dacd1=_0x2dacd1-0x17d;const _0x332a26=_0x332a();let _0x13e171=_0x332a26[_0x2dacd1];return _0x13e171;}export async function start(_0x4f9230,_0x3f5c93,_0x1cf077){const _0x314fc6=_0x5e1827,_0x121ece={'AMTzL':function(_0x25e4ec,_0x50c3c0){return _0x25e4ec!==_0x50c3c0;},'xXrmf':function(_0x3eea34,_0x4f50c3){return _0x3eea34!==_0x4f50c3;},'TOVmq':_0x314fc6(0x18c),'ymzfR':function(_0x4fc171,_0x534326){return _0x4fc171(_0x534326);},'auguP':'✓\x20Skipping\x20authentication\x20(--skip-auth)','EVpTI':_0x314fc6(0x183),'fFxwb':_0x314fc6(0x18d),'mOsnW':function(_0x4320c9,_0x38e827){return _0x4320c9(_0x38e827);},'Jfdcz':_0x314fc6(0x1d3),'utVhW':'plugin','TiSDy':function(_0x23429f,_0xfce83d){return _0x23429f&&_0xfce83d;},'oxzEw':'ranger','ejBeX':'opencode','jpBZY':function(_0x43d186,_0x4e3a85){return _0x43d186(_0x4e3a85);},'isdVs':_0x314fc6(0x1dc),'YpYyO':_0x314fc6(0x1b0),'SbQlW':function(_0x14a0e6,_0x10c4f2){return _0x14a0e6+_0x10c4f2;},'PiLHA':function(_0x1d4668,_0x4bf6c7){return _0x1d4668+_0x4bf6c7;},'RZaDz':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','PmyrC':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'};console['log']('\x0a🚀\x20Ranger\x20Setup\x0a');_0x121ece['AMTzL'](_0x3f5c93?.['scope'],undefined)&&_0x121ece['xXrmf'](_0x3f5c93[_0x314fc6(0x185)],_0x121ece[_0x314fc6(0x1d6)])&&(console[_0x314fc6(0x1b3)]('ranger\x20setup\x20--scope='+_0x121ece['ymzfR'](String,_0x3f5c93['scope'])+'\x20is\x20no\x20longer\x20supported.\x20'+'Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20'+_0x314fc6(0x1d9)),process['exit'](0x1));_0x3f5c93={..._0x3f5c93,'scope':_0x121ece[_0x314fc6(0x1d6)]};const _0x57311e=!existsSync(getRangerHomeDir());await _0x121ece['ymzfR'](ensureRangerDir,_0x121ece['TOVmq']);if(_0x3f5c93?.[_0x314fc6(0x1a3)])console[_0x314fc6(0x18e)](_0x121ece[_0x314fc6(0x1aa)]),_0x1cf077?.['trackPhaseEnd'](_0x121ece['EVpTI'],{'isFirstRun':_0x57311e,'method':'skipped'});else{_0x1cf077?.['trackPhaseStart'](_0x314fc6(0x183));const _0x3ef3a8=await _0x121ece[_0x314fc6(0x181)](authenticate,_0x4f9230);_0x1cf077?.[_0x314fc6(0x195)](_0x121ece[_0x314fc6(0x1c4)],{'isFirstRun':_0x57311e,'method':_0x3ef3a8['method']});}_0x1cf077?.['trackPhaseStart'](_0x314fc6(0x1d3));_0x3f5c93?.[_0x314fc6(0x1bb)]?console[_0x314fc6(0x18e)](_0x121ece['fFxwb']):await _0x121ece['mOsnW'](ensureChromium,_0x3f5c93?.[_0x314fc6(0x18f)]);_0x1cf077?.['trackPhaseEnd'](_0x121ece[_0x314fc6(0x1d2)],{'isFirstRun':_0x57311e,'skipped':!!_0x3f5c93?.['skipChromium']}),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x1fc8b7=_0x3f5c93?.['scope'],_0x585979=_0x3f5c93?.['opencode']??![];let _0x58bd63=null;_0x585979?(_0x1cf077?.[_0x314fc6(0x187)](_0x121ece[_0x314fc6(0x19d)]),_0x58bd63=await ensureOpencodePluginConfig(_0x1fc8b7),_0x1cf077?.[_0x314fc6(0x195)](_0x121ece['utVhW'],{'isFirstRun':_0x57311e,'opencode':!![]})):(_0x1cf077?.[_0x314fc6(0x187)](_0x121ece[_0x314fc6(0x19d)]),await ensureClaudePlugin(_0x1fc8b7),_0x1cf077?.[_0x314fc6(0x195)](_0x121ece['utVhW'],{'isFirstRun':_0x57311e}));if(_0x121ece['TiSDy'](_0x585979,_0x58bd63)){_0x1cf077?.[_0x314fc6(0x187)]('skills');try{await installSkill(_0x121ece['oxzEw'],{'level':_0x58bd63[_0x314fc6(0x185)],'cliVersion':getCurrentVersion(),'platform':_0x121ece[_0x314fc6(0x1c8)]}),_0x1cf077?.[_0x314fc6(0x195)](_0x314fc6(0x1dc),{'isFirstRun':_0x57311e,'opencode':!![]});}catch(_0x41246c){console['warn'](_0x314fc6(0x18a),_0x41246c instanceof Error?_0x41246c[_0x314fc6(0x1b5)]:_0x41246c),_0x1cf077?.[_0x314fc6(0x195)](_0x314fc6(0x1dc),{'isFirstRun':_0x57311e,'opencode':!![],'failed':!![]});}}else _0x1cf077?.['trackPhaseStart'](_0x314fc6(0x1dc)),await _0x121ece['jpBZY'](ensureClaudeSkills,_0x1fc8b7),_0x1cf077?.[_0x314fc6(0x195)](_0x121ece['isdVs'],{'isFirstRun':_0x57311e});if(_0x3f5c93?.['skipAuth'])console['log'](_0x121ece[_0x314fc6(0x199)]);else{if(_0x3f5c93?.['url']){_0x1cf077?.[_0x314fc6(0x187)](_0x314fc6(0x1c2));const _0x5f4295=await ensureLocalEnv({'url':_0x3f5c93['url'],'force':_0x3f5c93?.['force'],'allowInsecureLocalhost':_0x3f5c93?.['allowInsecureLocalhost'],'scope':'user'},_0x1cf077);_0x1cf077?.[_0x314fc6(0x195)](_0x314fc6(0x1c2),{'isFirstRun':_0x57311e,'profileReady':_0x5f4295[_0x314fc6(0x1d4)],'userSkipped':_0x5f4295['skipped']});}else console['log'](_0x121ece['SbQlW'](_0x121ece[_0x314fc6(0x1b1)]('\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:',_0x314fc6(0x193)+bold(_0x314fc6(0x1a8)))+_0x314fc6(0x1a0)+_0x314fc6(0x17e),_0x314fc6(0x1c9)));}if(_0x585979)console[_0x314fc6(0x18e)](_0x121ece[_0x314fc6(0x184)]),console[_0x314fc6(0x18e)](_0x314fc6(0x191)),console['log'](_0x121ece['PmyrC']),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x3f1258=_0x121ece[_0x314fc6(0x181)](bold,'/ranger:enable');console[_0x314fc6(0x18e)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x3f1258+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'+_0x314fc6(0x1b7)+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
@@ -1 +1 @@
1
- const _0x3dbb79=_0x2935;(function(_0x368026,_0x467622){const _0x259429=_0x2935,_0x3858e1=_0x368026();while(!![]){try{const _0xc29d98=-parseInt(_0x259429(0x21a))/0x1+parseInt(_0x259429(0x237))/0x2+-parseInt(_0x259429(0x236))/0x3*(parseInt(_0x259429(0x211))/0x4)+parseInt(_0x259429(0x20f))/0x5*(parseInt(_0x259429(0x1dd))/0x6)+-parseInt(_0x259429(0x1fb))/0x7+-parseInt(_0x259429(0x223))/0x8*(parseInt(_0x259429(0x22f))/0x9)+parseInt(_0x259429(0x201))/0xa*(parseInt(_0x259429(0x1f6))/0xb);if(_0xc29d98===_0x467622)break;else _0x3858e1['push'](_0x3858e1['shift']());}catch(_0x3c86a2){_0x3858e1['push'](_0x3858e1['shift']());}}}(_0xf656,0x28767));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';function _0x2935(_0x43357b,_0x34f1a5){_0x43357b=_0x43357b-0x1da;const _0xf6567=_0xf656();let _0x293547=_0xf6567[_0x43357b];return _0x293547;}import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x5e49b3=>_0x3dbb79(0x214)+_0x5e49b3+_0x3dbb79(0x1ed),link=(_0x10b0aa,_0x48076d)=>'\x1b]8;;file://'+_0x10b0aa+'\x07'+(_0x48076d||_0x10b0aa)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x1a346c=_0x3dbb79,_0x2f40eb={'Bfufa':function(_0x499ad4,_0x3b4173){return _0x499ad4(_0x3b4173);},'rboGv':_0x1a346c(0x225),'RNumb':_0x1a346c(0x20d),'YkEFs':_0x1a346c(0x1e7),'Exmsq':function(_0x501f24,_0x2ac04b){return _0x501f24!==_0x2ac04b;},'nMphg':function(_0xdd6d6f,_0x50c3b7){return _0xdd6d6f(_0x50c3b7);},'CCyGC':_0x1a346c(0x1e3),'lBjTK':_0x1a346c(0x212),'RUOKw':'debug','NFbfH':_0x1a346c(0x1fc),'beGge':'ignore','zLJXc':'pipe','WozzB':'data'};return new Promise(_0x472b46=>{const _0x33a6bb=_0x1a346c,_0x8d31d7=spawn(_0x2f40eb['lBjTK'],[_0x2f40eb[_0x33a6bb(0x213)],_0x2f40eb[_0x33a6bb(0x1f4)]],{'stdio':[_0x2f40eb['beGge'],_0x2f40eb[_0x33a6bb(0x241)],'pipe']});let _0xbc8df2='';_0x8d31d7['stdout']?.['on'](_0x2f40eb['WozzB'],_0x112bfd=>{_0xbc8df2+=_0x112bfd['toString']();}),_0x8d31d7['stderr']?.['on'](_0x2f40eb[_0x33a6bb(0x234)],_0x5312a5=>{_0xbc8df2+=_0x5312a5['toString']();}),_0x8d31d7['on'](_0x33a6bb(0x1ef),()=>{const _0x29e0fd=_0x33a6bb;_0x2f40eb['Bfufa'](_0x472b46,{'status':_0x2f40eb[_0x29e0fd(0x243)]});}),_0x8d31d7['on'](_0x33a6bb(0x229),_0x51c8c5=>{const _0x17a8c3=_0x33a6bb,_0x2b10fc={'wjYFj':function(_0x45cb75,_0x220c5b){return _0x45cb75!==_0x220c5b;},'cXVeh':_0x2f40eb['RNumb'],'PfnbF':_0x17a8c3(0x210),'BGwla':_0x2f40eb[_0x17a8c3(0x21e)]};if(_0x2f40eb[_0x17a8c3(0x249)](_0x51c8c5,0x0)){_0x472b46({'status':_0x2f40eb['rboGv']});return;}const _0xef5ac8=_0xbc8df2[_0x17a8c3(0x206)]();let _0x323db7=null;if(_0xef5ac8)try{_0x323db7=JSON['parse'](_0xef5ac8);}catch{const _0x4407f8=_0xef5ac8['match'](/\{[\s\S]*\}$/);if(_0x4407f8)try{_0x323db7=JSON['parse'](_0x4407f8[0x0]);}catch{_0x323db7=null;}}const _0x19e83d=Array[_0x17a8c3(0x24e)](_0x323db7?.['plugin'])?_0x323db7?.[_0x17a8c3(0x20c)]:[],_0x2ed9f4=_0x19e83d[_0x17a8c3(0x226)](_0x278cc6=>{const _0x379cd8=_0x17a8c3;if(_0x2b10fc['wjYFj'](typeof _0x278cc6,_0x2b10fc[_0x379cd8(0x22e)]))return![];return _0x278cc6[_0x379cd8(0x1fa)](_0x2b10fc[_0x379cd8(0x205)])||_0x278cc6[_0x379cd8(0x1fa)](_0x2b10fc['BGwla']);});if(_0x2ed9f4){_0x2f40eb[_0x17a8c3(0x22b)](_0x472b46,{'status':_0x17a8c3(0x21f),'details':_0x19e83d['length']>0x0?_0x19e83d['length']+_0x17a8c3(0x1e8):undefined});return;}if(_0x19e83d['length']>0x0){_0x2f40eb['nMphg'](_0x472b46,{'status':_0x2f40eb[_0x17a8c3(0x23d)],'details':_0x19e83d['length']+'\x20plugin(s)\x20configured'});return;}_0x472b46({'status':'not_configured'});});});}async function getSkillsFromDir(_0x3fc56e,_0x33ed71){const _0xf2d75c=_0x3dbb79,_0x5b3d18={'lnyon':function(_0x4763fc,_0x2c9b8a){return _0x4763fc(_0x2c9b8a);},'FkdxK':function(_0x3d7305,_0x22d394,_0x74bb9f){return _0x3d7305(_0x22d394,_0x74bb9f);},'rKgwL':'SKILL.md'};if(!_0x5b3d18[_0xf2d75c(0x21b)](existsSync,_0x3fc56e))return[];const _0x2e187e=[];try{const _0x36ec40=await _0x5b3d18['FkdxK'](readdir,_0x3fc56e,{'withFileTypes':!![]});for(const _0x428338 of _0x36ec40){if(_0x428338['isDirectory']()){const _0x1391f2=join(_0x3fc56e,_0x428338['name'],_0x5b3d18[_0xf2d75c(0x1dc)]);if(_0x5b3d18[_0xf2d75c(0x21b)](existsSync,_0x1391f2)){let _0x392783=_0x428338[_0xf2d75c(0x235)];try{const _0x32c3df=await readFile(_0x1391f2,_0xf2d75c(0x231)),_0x3b134d=_0x32c3df['match'](/name:\s*(.+)/);_0x3b134d&&(_0x392783=_0x3b134d[0x1]['trim']());}catch{}_0x2e187e[_0xf2d75c(0x1ea)]({'name':_0x428338['name'],'displayName':_0x392783,'path':_0x1391f2,'level':_0x33ed71});}}}}catch{return[];}return _0x2e187e;}async function getInstalledSkills(){const _0x418a60=_0x3dbb79,_0x456afc={'XlBKt':function(_0x40a143,_0x42d012,_0x28050c){return _0x40a143(_0x42d012,_0x28050c);},'uGSqD':function(_0x67c26c){return _0x67c26c();},'VUXSB':_0x418a60(0x200),'UZyqQ':'user'},[_0x2fad6f,_0x455c7e]=await Promise['all']([_0x456afc[_0x418a60(0x24f)](getSkillsFromDir,_0x456afc['uGSqD'](getProjectSkillsDir),_0x456afc['VUXSB']),getSkillsFromDir(getUserSkillsDir(),_0x456afc[_0x418a60(0x221)])]);return{'project':_0x2fad6f,'user':_0x455c7e};}async function getEnvironments(){const _0x54e237=_0x3dbb79,_0x109d66={'WgQHq':function(_0x3ced36,_0x35ed02){return _0x3ced36(_0x35ed02);},'ydHTw':function(_0x5176ec,_0x3896c9,_0x37e07a){return _0x5176ec(_0x3896c9,_0x37e07a);},'OmwAa':function(_0x37ebcf,_0x27b4ae){return _0x37ebcf(_0x27b4ae);},'clnAN':function(_0x160efe){return _0x160efe();},'RBKFV':function(_0x666018,_0x3848f7){return _0x666018(_0x3848f7);}},{envNames:_0xd094ca,activeEnv:_0x485235}=await getEnvNames(),_0x1a7bc6=_0x109d66[_0x54e237(0x1fd)](getRangerDir);if(!_0x109d66[_0x54e237(0x1fe)](existsSync,_0x1a7bc6))return{'envs':[],'activeEnv':null};const _0x5744af=_0xd094ca[_0x54e237(0x22d)](_0x4702f2=>{const _0xd68b08=_0x54e237,_0x439f3d=_0x109d66[_0xd68b08(0x215)](getEnvDir,_0x4702f2),_0x1987e0=_0x109d66[_0xd68b08(0x1ee)](join,_0x439f3d,_0xd68b08(0x239)),_0xd04975=join(_0x439f3d,_0xd68b08(0x227)),_0x40d288=join(_0x439f3d,'auth.json.enc');return{'name':_0x4702f2,'settingsPath':_0x109d66[_0xd68b08(0x222)](existsSync,_0x1987e0)?_0x1987e0:'(not\x20found)','hasPlaintextAuth':existsSync(_0xd04975),'hasEncryptedAuth':_0x109d66['WgQHq'](existsSync,_0x40d288),'isActive':_0x4702f2===_0x485235};});return{'envs':_0x5744af,'activeEnv':_0x485235};}function _0xf656(){const _0xd83904=['includes','1476965yXLQxR','config','clnAN','RBKFV','log','project','44910ulRCgP','roXob','bwyip','\x20profiles\x20configured\x20(','PfnbF','trim','BFzRq','xUumR','\x20\x20\x20\x20','\x20cloud','\x20\x20\x20\x20Auth:\x20','plugin','string','XUcfZ','20FwEMtX','@ranger-testing/opencode-plugin','4ggxPNz','opencode','RUOKw','\x1b[1m','WgQHq','Root:\x20','\x20\x20Active:\x20','path','enabled','241132iGldlw','lnyon','\x20[cloud]','\x0a\x20\x20No\x20active\x20profile\x20set','YkEFs','configured','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','UZyqQ','OmwAa','3376pPxtij','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','not_installed','some','auth.json','hasPlaintextAuth','close','join','Bfufa','VxVdJ','map','cXVeh','1467hokApd','fkTah','utf-8','success','\x0a📊\x20Ranger\x20Status\x0a','WozzB','name','264141ZFWUaQ','143796WYHycO','cached\x20(updated\x20','settings.json','Bddau','has','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','CCyGC','version','slGKD','SqGAK','zLJXc','isActive','rboGv','plaintext','vRPGY','env','API\x20Environment:\x20','none','Exmsq','\x20\x20\x20\x20Session:\x20','ranger@trailhead','details','qDCkL','isArray','XlBKt','\x20\x20User-level:','TCiYN','rKgwL','360336rtaqLa','\x20\x20Not\x20installed','cwd','displayName','rfwHO','length','not_configured','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','HrHTu','kQBwF','opencode-plugin','\x20plugin(s)\x20configured','\x20\x20Run:\x20ranger\x20skillup','push','dwhuo','hasEncryptedAuth','\x1b[0m','ydHTw','error','Version:\x20','no\x20session','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','NFbfH','No\x20skills\x20installed','1133UOAfuA','API\x20URL:\x20','BlMkM','\x20\x20Run:\x20ranger\x20setup\x20[token]'];_0xf656=function(){return _0xd83904;};return _0xf656();}export async function status(){const _0x292582=_0x3dbb79,_0x440016={'rfwHO':function(_0x2f1198){return _0x2f1198();},'roXob':function(_0x51acce,_0x159999){return _0x51acce!==_0x159999;},'WYtra':function(_0x36d52f,_0x2b99d6){return _0x36d52f(_0x2b99d6);},'SqGAK':function(_0x29ae7f,_0x2dc9b4){return _0x29ae7f===_0x2dc9b4;},'BlMkM':_0x292582(0x21f),'VxVdJ':'\x20\x20Not\x20configured','VTKTe':_0x292582(0x1f2),'dwhuo':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','bwyip':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','triNK':function(_0x1ddf68,_0x242fa5){return _0x1ddf68(_0x242fa5);},'BFzRq':'unknown','lEbGC':_0x292582(0x219),'fkTah':'disabled','slGKD':function(_0x452b77,_0x4c4e9b){return _0x452b77(_0x4c4e9b);},'XUcfZ':_0x292582(0x1f5),'Bddau':function(_0x386bdf,_0x26ad7d){return _0x386bdf(_0x26ad7d);},'HrHTu':function(_0x2633ba,_0x4bc8e8){return _0x2633ba>_0x4bc8e8;},'TCiYN':function(_0x2fd43d,_0x1fe444,_0x32f850){return _0x2fd43d(_0x1fe444,_0x32f850);},'pFWTI':'\x0a---\x20Profiles\x20---','Opjes':function(_0x21fcb5){return _0x21fcb5();},'XacWU':function(_0x3d1e95,_0x16a08a){return _0x3d1e95+_0x16a08a;},'btDSw':'No\x20profiles\x20configured','vRPGY':function(_0x33c7df,_0x159e31){return _0x33c7df>_0x159e31;},'kQBwF':'\x20(active)','xUumR':_0x292582(0x1f1),'qDCkL':'encrypted','BuYfm':_0x292582(0x244)};console[_0x292582(0x1ff)](_0x292582(0x233));const _0x16b3bf=process[_0x292582(0x1df)](),_0x5703a2=getRangerDir();if(!existsSync(_0x5703a2)){console['log'](_0x292582(0x216)+link(_0x16b3bf,bold(basename(_0x16b3bf)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x292582(0x1ff)](_0x292582(0x224));return;}console[_0x292582(0x1ff)]('Root:\x20'+link(_0x16b3bf,bold(basename(_0x16b3bf))));const _0xab9074=_0x440016[_0x292582(0x1e1)](getCurrentVersion),_0x4bcee2=getLatestVersion();if(_0x4bcee2[_0x292582(0x23e)]&&_0x440016[_0x292582(0x202)](_0x4bcee2['version'],_0xab9074))console[_0x292582(0x1ff)]('Version:\x20'+_0xab9074+'\x20(latest:\x20'+_0x4bcee2['version']+')'),console[_0x292582(0x1ff)]('\x20\x20Run:\x20ranger\x20update');else _0x4bcee2['version']?console[_0x292582(0x1ff)](_0x292582(0x1f0)+_0xab9074+'\x20(up\x20to\x20date)'):console[_0x292582(0x1ff)]('Version:\x20'+_0xab9074);const _0x37ed3e=await getToken();if(_0x37ed3e){const _0x330ed8=await getCurrentUser(_0x37ed3e);_0x330ed8[_0x292582(0x232)]?console[_0x292582(0x1ff)]('Organization:\x20'+_0x440016['WYtra'](bold,_0x330ed8['user']['organizationName'])):(console['log'](_0x292582(0x23c)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x292582(0x1ff)]('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x292582(0x1f9));process[_0x292582(0x246)]['DEBUG']&&(console[_0x292582(0x1ff)](_0x292582(0x247)+getCurrentEnvironment()),console[_0x292582(0x1ff)](_0x292582(0x1f7)+getApiBaseUrl()));console[_0x292582(0x1ff)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x5a4217=await getOpencodePluginStatus();if(_0x440016[_0x292582(0x240)](_0x5a4217['status'],_0x440016[_0x292582(0x1f8)]))console[_0x292582(0x1ff)]('\x20\x20'+bold(_0x292582(0x210))+':\x20configured'),_0x5a4217['details']&&console['log']('\x20\x20'+_0x5a4217['details']);else _0x5a4217['status']===_0x292582(0x1e3)?(console[_0x292582(0x1ff)](_0x440016[_0x292582(0x22c)]),_0x5a4217[_0x292582(0x24c)]&&console['log']('\x20\x20'+_0x5a4217[_0x292582(0x24c)]),console[_0x292582(0x1ff)](_0x440016['VTKTe'])):console[_0x292582(0x1ff)](_0x440016[_0x292582(0x1eb)]);console['log'](_0x440016[_0x292582(0x203)]);const _0x24b98c=await _0x440016['triNK'](getPluginInfo,_0x292582(0x24b));if(_0x24b98c){const _0x4d7db4=_0x24b98c['scope']||_0x440016[_0x292582(0x207)],_0x9aa320=_0x24b98c[_0x292582(0x219)]?_0x440016['lEbGC']:_0x440016[_0x292582(0x230)];console[_0x292582(0x1ff)]('\x20\x20'+_0x440016['slGKD'](bold,'ranger@trailhead')+':\x20installed\x20('+_0x4d7db4+',\x20'+_0x9aa320+')');}else console[_0x292582(0x1ff)](_0x292582(0x1de)),console[_0x292582(0x1ff)](_0x292582(0x220));console[_0x292582(0x1ff)]('\x0a---\x20Skills\x20---');const {project:_0x8cb6b0,user:_0x3874e6}=await _0x440016[_0x292582(0x1e1)](getInstalledSkills),_0xa23d54=_0x8cb6b0['filter'](_0x5107da=>RANGER_MANAGED_SKILLS[_0x292582(0x1fa)](_0x5107da['name'])),_0x31c0dd=_0x3874e6['filter'](_0x56aef7=>RANGER_MANAGED_SKILLS['includes'](_0x56aef7[_0x292582(0x235)])),_0x42f703=_0xa23d54[_0x292582(0x1e2)]+_0x31c0dd[_0x292582(0x1e2)];if(_0x440016['SqGAK'](_0x42f703,0x0))console[_0x292582(0x1ff)](_0x440016[_0x292582(0x20e)]),console['log'](_0x292582(0x1e9));else{if(_0xa23d54['length']>0x0){console['log']('\x20\x20Project-level:');for(const _0x2a90e3 of _0xa23d54){console[_0x292582(0x1ff)]('\x20\x20\x20\x20'+bold(_0x2a90e3[_0x292582(0x1e0)])+':\x20'+link(_0x2a90e3[_0x292582(0x218)],_0x440016[_0x292582(0x23a)](basename,_0x2a90e3['path'])));}}if(_0x440016[_0x292582(0x1e5)](_0x31c0dd[_0x292582(0x1e2)],0x0)){console[_0x292582(0x1ff)](_0x292582(0x1da));for(const _0x294932 of _0x31c0dd){console[_0x292582(0x1ff)](_0x292582(0x209)+bold(_0x294932['displayName'])+':\x20'+_0x440016[_0x292582(0x1db)](link,_0x294932[_0x292582(0x218)],basename(_0x294932[_0x292582(0x218)])));}}}console[_0x292582(0x1ff)](_0x440016['pFWTI']);const {envs:_0x1563e7,activeEnv:_0x391aa8}=await _0x440016['Opjes'](getEnvironments);let _0x20885d=[];if(_0x37ed3e)try{_0x20885d=await listCloudProfiles();}catch{}const _0x217c56=_0x440016['XacWU'](_0x1563e7[_0x292582(0x1e2)],_0x20885d[_0x292582(0x1e2)]);if(_0x217c56===0x0)console[_0x292582(0x1ff)](_0x440016['btDSw']),console[_0x292582(0x1ff)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{if(_0x440016[_0x292582(0x245)](_0x217c56,0x5)){const _0x14aad8=[];_0x20885d['length']>0x0&&_0x14aad8['push'](_0x20885d['length']+_0x292582(0x20a)),_0x1563e7['length']>0x0&&_0x14aad8['push'](_0x1563e7[_0x292582(0x1e2)]+'\x20local'),console['log'](_0x217c56+_0x292582(0x204)+_0x14aad8[_0x292582(0x22a)](',\x20')+')'),_0x391aa8&&console[_0x292582(0x1ff)](_0x292582(0x217)+bold(_0x391aa8)),console[_0x292582(0x1ff)](_0x292582(0x1f3));}else{for(const _0x1ff3af of _0x20885d){const _0x15aa13=_0x1ff3af['name']===_0x391aa8?_0x440016['kQBwF']:'';console['log']('\x20\x20'+bold(_0x1ff3af[_0x292582(0x235)])+_0x292582(0x21c)+_0x15aa13);const _0x20859b=_0x1ff3af['sessionUpdatedAt']?_0x292582(0x238)+_0x1ff3af['sessionUpdatedAt']+')':_0x440016[_0x292582(0x208)];console['log'](_0x292582(0x24a)+_0x20859b);}const _0x3b51d4=new Set(_0x20885d['map'](_0x3b27c1=>_0x3b27c1[_0x292582(0x235)]));for(const _0x34d269 of _0x1563e7){if(_0x3b51d4[_0x292582(0x23b)](_0x34d269['name']))continue;const _0x20b0c5=_0x34d269[_0x292582(0x242)]?_0x440016[_0x292582(0x1e6)]:'',_0x5e6a49=_0x34d269[_0x292582(0x1ec)]?_0x440016[_0x292582(0x24d)]:_0x34d269[_0x292582(0x228)]?_0x440016['BuYfm']:_0x292582(0x248);console['log']('\x20\x20'+_0x440016[_0x292582(0x23f)](bold,_0x34d269['name'])+'\x20[local]'+_0x20b0c5),console['log'](_0x292582(0x20b)+_0x5e6a49),_0x34d269['settingsPath']!=='(not\x20found)'&&console[_0x292582(0x1ff)]('\x20\x20\x20\x20Settings:\x20'+link(_0x34d269['settingsPath'],basename(_0x34d269['settingsPath'])));}if(!_0x391aa8){console['log'](_0x292582(0x21d));const _0x55e03d=[..._0x20885d[_0x292582(0x22d)](_0x818daf=>_0x818daf['name']),..._0x1563e7['filter'](_0x5886a3=>!_0x3b51d4['has'](_0x5886a3['name']))[_0x292582(0x22d)](_0x3e3f5d=>_0x3e3f5d['name'])];console['log'](_0x292582(0x1e4)+_0x55e03d[_0x292582(0x22a)](',\x20')+')');}}}console['log']('');}
1
+ const _0xc59a6b=_0x41f8;function _0xabbe(){const _0x2c5e38=['PFnKr','45IhwvBB','\x20\x20User-level:','SKILL.md','nKpNG','VwIdS','aApSV','\x20plugin(s)\x20configured','RSMEE','trim','toString','273szNZut','onNxK','uxiMY','awrgX','project','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','604986cdFpmG','bnunT','682160VXEPnN','includes','98DWEsAy','\x20profiles\x20configured\x20(','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','push','\x20\x20Run:\x20ranger\x20skillup','version','user','IZjGq','\x20\x20Project-level:','some','auth.json','name','vyadA','HEjxD','KfVAA','3247908jsssXD','\x20local','\x0a\x20\x20No\x20active\x20profile\x20set','PbtJS','configured','filter','string','\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)','length','DEBUG','iBiYv','debug','2156628cpTpAp','\x1b[0m','\x20\x20Not\x20installed','WrHWz','encrypted','\x20\x20\x20\x20','match','settingsPath','1iCcBGh','\x0a---\x20Claude\x20Code\x20Plugin\x20---','stderr','(not\x20found)','log','path','opencode','ranger@trailhead','nZzLp','\x20[local]','success','\x20\x20Not\x20configured','irGhi','Root:\x20','lVxQe','stdout','Version:\x20','ignore','disabled','map','TMxZc',':\x20configured','83410KfXeez','enabled','oSRZe','isActive','utf-8','displayName','\x20(up\x20to\x20date)','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','\x1b]8;;\x07','\x0a---\x20Skills\x20---','236pakMqM','hIGWw','tQmBp','No\x20profiles\x20configured','organizationName','plaintext','not_configured','\x20[cloud]','has','lgiNh','jNnVd','SWTVU','\x20cloud','join','9621670RMiePr','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','isDirectory','details','11beaHjC','config','qEUaf','iYZvC','217725Zhuhin','EAHdw','pipe','hasEncryptedAuth'];_0xabbe=function(){return _0x2c5e38;};return _0xabbe();}(function(_0x3b1fb0,_0x384f4b){const _0x570eb7=_0x41f8,_0x47da8c=_0x3b1fb0();while(!![]){try{const _0x4a803c=parseInt(_0x570eb7(0x125))/0x1*(parseInt(_0x570eb7(0x183))/0x2)+parseInt(_0x570eb7(0x15b))/0x3+-parseInt(_0x570eb7(0x145))/0x4*(-parseInt(_0x570eb7(0x13b))/0x5)+-parseInt(_0x570eb7(0x170))/0x6*(-parseInt(_0x570eb7(0x174))/0x7)+-parseInt(_0x570eb7(0x172))/0x8*(parseInt(_0x570eb7(0x160))/0x9)+parseInt(_0x570eb7(0x153))/0xa*(parseInt(_0x570eb7(0x157))/0xb)+-parseInt(_0x570eb7(0x11d))/0xc*(parseInt(_0x570eb7(0x16a))/0xd);if(_0x4a803c===_0x384f4b)break;else _0x47da8c['push'](_0x47da8c['shift']());}catch(_0x1b0604){_0x47da8c['push'](_0x47da8c['shift']());}}}(_0xabbe,0xd0867));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';function _0x41f8(_0x2c93c1,_0x120aae){_0x2c93c1=_0x2c93c1-0x116;const _0xabbe17=_0xabbe();let _0x41f81f=_0xabbe17[_0x2c93c1];return _0x41f81f;}import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x40a1bc=>'\x1b[1m'+_0x40a1bc+_0xc59a6b(0x11e),link=(_0x5c7cf3,_0x23f8d7)=>'\x1b]8;;file://'+_0x5c7cf3+'\x07'+(_0x23f8d7||_0x5c7cf3)+_0xc59a6b(0x143);async function getOpencodePluginStatus(){const _0x57d9ea=_0xc59a6b,_0x4698e4={'TMxZc':'not_installed','cwycu':function(_0x57fe79,_0x1761df){return _0x57fe79!==_0x1761df;},'awrgX':_0x57d9ea(0x117),'KnCHu':'@ranger-testing/opencode-plugin','HEjxD':function(_0x29b560,_0x45ebd1){return _0x29b560(_0x45ebd1);},'rMOSK':function(_0x4e5957,_0x15fd53){return _0x4e5957>_0x15fd53;},'BRajA':_0x57d9ea(0x14b),'iBiYv':function(_0x17ebec,_0x55bdfc,_0x35e231,_0x24f019){return _0x17ebec(_0x55bdfc,_0x35e231,_0x24f019);},'bnunT':_0x57d9ea(0x158),'jNnVd':_0x57d9ea(0x136),'vyadA':_0x57d9ea(0x15d),'tQmBp':'data','SYJLs':'close'};return new Promise(_0xc52c0a=>{const _0x53488d=_0x57d9ea,_0x35dd08=_0x4698e4[_0x53488d(0x11b)](spawn,_0x53488d(0x12b),[_0x53488d(0x11c),_0x4698e4[_0x53488d(0x171)]],{'stdio':[_0x4698e4[_0x53488d(0x14f)],_0x4698e4[_0x53488d(0x180)],_0x4698e4['vyadA']]});let _0x4af215='';_0x35dd08[_0x53488d(0x134)]?.['on'](_0x4698e4[_0x53488d(0x147)],_0x42f203=>{const _0x4e2c1f=_0x53488d;_0x4af215+=_0x42f203[_0x4e2c1f(0x169)]();}),_0x35dd08[_0x53488d(0x127)]?.['on'](_0x4698e4['tQmBp'],_0x21ff3e=>{_0x4af215+=_0x21ff3e['toString']();}),_0x35dd08['on']('error',()=>{const _0x4c5e4c=_0x53488d;_0xc52c0a({'status':_0x4698e4[_0x4c5e4c(0x139)]});}),_0x35dd08['on'](_0x4698e4['SYJLs'],_0xa1627a=>{const _0x4a8749=_0x53488d,_0x3a751b={'IFtKw':function(_0x11bbe9,_0x11ea9d){return _0x4698e4['cwycu'](_0x11bbe9,_0x11ea9d);},'WrHWz':_0x4698e4[_0x4a8749(0x16d)],'ksapF':_0x4698e4['KnCHu'],'uxiMY':'opencode-plugin'};if(_0xa1627a!==0x0){_0x4698e4[_0x4a8749(0x181)](_0xc52c0a,{'status':_0x4698e4[_0x4a8749(0x139)]});return;}const _0x2fbcac=_0x4af215[_0x4a8749(0x168)]();let _0x9962a4=null;if(_0x2fbcac)try{_0x9962a4=JSON['parse'](_0x2fbcac);}catch{const _0x194fcd=_0x2fbcac[_0x4a8749(0x123)](/\{[\s\S]*\}$/);if(_0x194fcd)try{_0x9962a4=JSON['parse'](_0x194fcd[0x0]);}catch{_0x9962a4=null;}}const _0x37b460=Array['isArray'](_0x9962a4?.['plugin'])?_0x9962a4?.['plugin']:[],_0x51cdd8=_0x37b460[_0x4a8749(0x17d)](_0x144c3f=>{const _0xe4713c=_0x4a8749;if(_0x3a751b['IFtKw'](typeof _0x144c3f,_0x3a751b[_0xe4713c(0x120)]))return![];return _0x144c3f[_0xe4713c(0x173)](_0x3a751b['ksapF'])||_0x144c3f[_0xe4713c(0x173)](_0x3a751b[_0xe4713c(0x16c)]);});if(_0x51cdd8){_0xc52c0a({'status':_0x4a8749(0x187),'details':_0x4698e4['rMOSK'](_0x37b460['length'],0x0)?_0x37b460['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x37b460[_0x4a8749(0x119)]>0x0){_0xc52c0a({'status':_0x4698e4['BRajA'],'details':_0x37b460['length']+_0x4a8749(0x166)});return;}_0xc52c0a({'status':'not_configured'});});});}async function getSkillsFromDir(_0x3ba028,_0x288272){const _0x82a160=_0xc59a6b,_0x429d37={'sDbQp':_0x82a160(0x162),'mZSqT':function(_0x34bc32,_0x3efd7d){return _0x34bc32(_0x3efd7d);},'VwIdS':_0x82a160(0x13f)};if(!existsSync(_0x3ba028))return[];const _0x54f2ee=[];try{const _0x3f28b5=await readdir(_0x3ba028,{'withFileTypes':!![]});for(const _0x168a2b of _0x3f28b5){if(_0x168a2b[_0x82a160(0x155)]()){const _0x392373=join(_0x3ba028,_0x168a2b['name'],_0x429d37['sDbQp']);if(_0x429d37['mZSqT'](existsSync,_0x392373)){let _0x4f9642=_0x168a2b['name'];try{const _0x7944b6=await readFile(_0x392373,_0x429d37[_0x82a160(0x164)]),_0x555b7b=_0x7944b6['match'](/name:\s*(.+)/);_0x555b7b&&(_0x4f9642=_0x555b7b[0x1]['trim']());}catch{}_0x54f2ee['push']({'name':_0x168a2b['name'],'displayName':_0x4f9642,'path':_0x392373,'level':_0x288272});}}}}catch{return[];}return _0x54f2ee;}async function getInstalledSkills(){const _0x3ff8a7=_0xc59a6b,_0x439a50={'KfVAA':function(_0x3d25da,_0x243167,_0x3216e5){return _0x3d25da(_0x243167,_0x3216e5);},'sJdit':_0x3ff8a7(0x16e),'BWOod':_0x3ff8a7(0x17a)},[_0xe45835,_0x3c7e5b]=await Promise['all']([_0x439a50[_0x3ff8a7(0x182)](getSkillsFromDir,getProjectSkillsDir(),_0x439a50['sJdit']),getSkillsFromDir(getUserSkillsDir(),_0x439a50['BWOod'])]);return{'project':_0xe45835,'user':_0x3c7e5b};}async function getEnvironments(){const _0x3978bb=_0xc59a6b,_0x2c182e={'OIlgB':function(_0x1ac24d,_0x4d2003){return _0x1ac24d(_0x4d2003);},'HhTjU':function(_0x4b763e,_0x4badf6,_0x167f86){return _0x4b763e(_0x4badf6,_0x167f86);},'SWTVU':'auth.json.enc','iYZvC':function(_0x174f25,_0x2a2438){return _0x174f25===_0x2a2438;},'ErkPA':function(_0x15d647){return _0x15d647();}},{envNames:_0x27410a,activeEnv:_0x34c107}=await _0x2c182e['ErkPA'](getEnvNames),_0x188b26=getRangerDir();if(!existsSync(_0x188b26))return{'envs':[],'activeEnv':null};const _0x1ff04e=_0x27410a[_0x3978bb(0x138)](_0x26b492=>{const _0x2b93c9=_0x3978bb,_0x3df998=_0x2c182e['OIlgB'](getEnvDir,_0x26b492),_0x4503fc=_0x2c182e['HhTjU'](join,_0x3df998,'settings.json'),_0x518408=join(_0x3df998,_0x2b93c9(0x17e)),_0x1a8a10=join(_0x3df998,_0x2c182e[_0x2b93c9(0x150)]);return{'name':_0x26b492,'settingsPath':existsSync(_0x4503fc)?_0x4503fc:_0x2b93c9(0x128),'hasPlaintextAuth':existsSync(_0x518408),'hasEncryptedAuth':existsSync(_0x1a8a10),'isActive':_0x2c182e[_0x2b93c9(0x15a)](_0x26b492,_0x34c107)};});return{'envs':_0x1ff04e,'activeEnv':_0x34c107};}export async function status(){const _0x188629=_0xc59a6b,_0x4066fd={'nZzLp':function(_0x498864){return _0x498864();},'lVxQe':function(_0x4e309f,_0x515ced){return _0x4e309f(_0x515ced);},'aauep':function(_0x555b35,_0x6800d7,_0x1c62b6){return _0x555b35(_0x6800d7,_0x1c62b6);},'irGhi':function(_0x101ffd,_0x5a78a7){return _0x101ffd!==_0x5a78a7;},'lgiNh':function(_0x6a3405){return _0x6a3405();},'HLMBR':_0x188629(0x187),'FZRDG':function(_0x1f3fc3,_0x3f3a1c){return _0x1f3fc3(_0x3f3a1c);},'oSRZe':function(_0x2891fd,_0x24f578){return _0x2891fd===_0x24f578;},'onNxK':'not_configured','gacYa':_0x188629(0x130),'PFnKr':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','PbtJS':_0x188629(0x12c),'EAHdw':'unknown','rupvg':_0x188629(0x13c),'ILHVr':_0x188629(0x11f),'KoPxA':function(_0x3c85c5){return _0x3c85c5();},'RSMEE':function(_0x226f08,_0x47b7c3){return _0x226f08===_0x47b7c3;},'RjjAd':'No\x20skills\x20installed','nKpNG':function(_0xf99ba7,_0x544fb8){return _0xf99ba7>_0x544fb8;},'pOUPn':_0x188629(0x17c),'IZjGq':function(_0x3025e6,_0x582818){return _0x3025e6+_0x582818;},'RbwSJ':function(_0x225aef,_0x381e0f){return _0x225aef>_0x381e0f;},'WiSLX':function(_0x40b775,_0xf16253){return _0x40b775===_0xf16253;},'hIGWw':'\x20(active)','aApSV':function(_0x3d4222,_0x3c2886){return _0x3d4222(_0x3c2886);},'uinID':_0x188629(0x14a),'qEUaf':function(_0x3fe888,_0x340f8d){return _0x3fe888(_0x340f8d);}};console[_0x188629(0x129)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x5e9d3b=process['cwd'](),_0x41404f=_0x4066fd[_0x188629(0x12d)](getRangerDir);if(!_0x4066fd['lVxQe'](existsSync,_0x41404f)){console['log']('Root:\x20'+link(_0x5e9d3b,bold(_0x4066fd[_0x188629(0x133)](basename,_0x5e9d3b)))),console['log'](_0x188629(0x176)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x188629(0x129)](_0x188629(0x132)+_0x4066fd['aauep'](link,_0x5e9d3b,_0x4066fd['lVxQe'](bold,basename(_0x5e9d3b))));const _0x519eaf=getCurrentVersion(),_0x5ae367=_0x4066fd['nZzLp'](getLatestVersion);if(_0x5ae367[_0x188629(0x179)]&&_0x4066fd[_0x188629(0x131)](_0x5ae367['version'],_0x519eaf))console[_0x188629(0x129)]('Version:\x20'+_0x519eaf+'\x20(latest:\x20'+_0x5ae367[_0x188629(0x179)]+')'),console[_0x188629(0x129)]('\x20\x20Run:\x20ranger\x20update');else _0x5ae367[_0x188629(0x179)]?console[_0x188629(0x129)]('Version:\x20'+_0x519eaf+_0x188629(0x141)):console[_0x188629(0x129)](_0x188629(0x135)+_0x519eaf);const _0x490726=await _0x4066fd[_0x188629(0x14e)](getToken);if(_0x490726){const _0x3ece76=await getCurrentUser(_0x490726);_0x3ece76[_0x188629(0x12f)]?console[_0x188629(0x129)]('Organization:\x20'+_0x4066fd['lVxQe'](bold,_0x3ece76[_0x188629(0x17a)][_0x188629(0x149)])):(console[_0x188629(0x129)](_0x188629(0x142)),console[_0x188629(0x129)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console[_0x188629(0x129)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env'][_0x188629(0x11a)]&&(console[_0x188629(0x129)]('API\x20Environment:\x20'+getCurrentEnvironment()),console[_0x188629(0x129)]('API\x20URL:\x20'+getApiBaseUrl()));console['log']('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x4a7417=await getOpencodePluginStatus();if(_0x4a7417['status']===_0x4066fd['HLMBR'])console[_0x188629(0x129)]('\x20\x20'+_0x4066fd['FZRDG'](bold,'@ranger-testing/opencode-plugin')+_0x188629(0x13a)),_0x4a7417[_0x188629(0x156)]&&console[_0x188629(0x129)]('\x20\x20'+_0x4a7417['details']);else _0x4066fd[_0x188629(0x13d)](_0x4a7417['status'],_0x4066fd[_0x188629(0x16b)])?(console['log'](_0x4066fd['gacYa']),_0x4a7417[_0x188629(0x156)]&&console['log']('\x20\x20'+_0x4a7417['details']),console[_0x188629(0x129)]('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console['log'](_0x4066fd[_0x188629(0x15f)]);console[_0x188629(0x129)](_0x188629(0x126));const _0xdfcb77=await getPluginInfo(_0x4066fd[_0x188629(0x186)]);if(_0xdfcb77){const _0x4ddcd9=_0xdfcb77['scope']||_0x4066fd[_0x188629(0x15c)],_0xf89a14=_0xdfcb77[_0x188629(0x13c)]?_0x4066fd['rupvg']:_0x188629(0x137);console[_0x188629(0x129)]('\x20\x20'+bold(_0x188629(0x12c))+':\x20installed\x20('+_0x4ddcd9+',\x20'+_0xf89a14+')');}else console[_0x188629(0x129)](_0x4066fd['ILHVr']),console[_0x188629(0x129)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console[_0x188629(0x129)](_0x188629(0x144));const {project:_0x240af5,user:_0x265b1d}=await _0x4066fd['KoPxA'](getInstalledSkills),_0x1e3623=_0x240af5['filter'](_0x19f3a7=>RANGER_MANAGED_SKILLS[_0x188629(0x173)](_0x19f3a7[_0x188629(0x17f)])),_0x59d480=_0x265b1d[_0x188629(0x116)](_0x1e4495=>RANGER_MANAGED_SKILLS['includes'](_0x1e4495[_0x188629(0x17f)])),_0x1a4836=_0x1e3623['length']+_0x59d480['length'];if(_0x4066fd[_0x188629(0x167)](_0x1a4836,0x0))console['log'](_0x4066fd['RjjAd']),console[_0x188629(0x129)](_0x188629(0x178));else{if(_0x4066fd['nKpNG'](_0x1e3623[_0x188629(0x119)],0x0)){console[_0x188629(0x129)](_0x4066fd['pOUPn']);for(const _0x43ee00 of _0x1e3623){console[_0x188629(0x129)]('\x20\x20\x20\x20'+bold(_0x43ee00[_0x188629(0x140)])+':\x20'+link(_0x43ee00[_0x188629(0x12a)],basename(_0x43ee00['path'])));}}if(_0x59d480[_0x188629(0x119)]>0x0){console[_0x188629(0x129)](_0x188629(0x161));for(const _0x12980c of _0x59d480){console[_0x188629(0x129)](_0x188629(0x122)+bold(_0x12980c['displayName'])+':\x20'+link(_0x12980c[_0x188629(0x12a)],basename(_0x12980c[_0x188629(0x12a)])));}}}console[_0x188629(0x129)]('\x0a---\x20Profiles\x20---');const {envs:_0x17bc40,activeEnv:_0x4af49b}=await getEnvironments();let _0x9da9c3=[];if(_0x490726)try{_0x9da9c3=await _0x4066fd['nZzLp'](listCloudProfiles);}catch{}const _0x5e981d=_0x4066fd[_0x188629(0x17b)](_0x17bc40['length'],_0x9da9c3[_0x188629(0x119)]);if(_0x5e981d===0x0)console[_0x188629(0x129)](_0x188629(0x148)),console['log'](_0x188629(0x154));else{if(_0x4066fd[_0x188629(0x163)](_0x5e981d,0x5)){const _0x5e3af1=[];_0x9da9c3[_0x188629(0x119)]>0x0&&_0x5e3af1[_0x188629(0x177)](_0x9da9c3[_0x188629(0x119)]+_0x188629(0x151)),_0x4066fd['RbwSJ'](_0x17bc40['length'],0x0)&&_0x5e3af1[_0x188629(0x177)](_0x17bc40['length']+_0x188629(0x184)),console['log'](_0x5e981d+_0x188629(0x175)+_0x5e3af1[_0x188629(0x152)](',\x20')+')'),_0x4af49b&&console[_0x188629(0x129)]('\x20\x20Active:\x20'+bold(_0x4af49b)),console['log'](_0x188629(0x118));}else{for(const _0x51d399 of _0x9da9c3){const _0x208a9e=_0x4066fd['WiSLX'](_0x51d399[_0x188629(0x17f)],_0x4af49b)?_0x4066fd[_0x188629(0x146)]:'';console[_0x188629(0x129)]('\x20\x20'+_0x4066fd[_0x188629(0x165)](bold,_0x51d399[_0x188629(0x17f)])+_0x188629(0x14c)+_0x208a9e);const _0x3af31c=_0x51d399['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x51d399['sessionUpdatedAt']+')':'no\x20session';console['log']('\x20\x20\x20\x20Session:\x20'+_0x3af31c);}const _0x55454d=new Set(_0x9da9c3['map'](_0x22d771=>_0x22d771['name']));for(const _0x3b0921 of _0x17bc40){if(_0x55454d[_0x188629(0x14d)](_0x3b0921['name']))continue;const _0x22c6af=_0x3b0921[_0x188629(0x13e)]?'\x20(active)':'',_0x28c17e=_0x3b0921[_0x188629(0x15e)]?_0x188629(0x121):_0x3b0921['hasPlaintextAuth']?_0x4066fd['uinID']:'none';console[_0x188629(0x129)]('\x20\x20'+bold(_0x3b0921['name'])+_0x188629(0x12e)+_0x22c6af),console[_0x188629(0x129)]('\x20\x20\x20\x20Auth:\x20'+_0x28c17e),_0x4066fd['irGhi'](_0x3b0921['settingsPath'],'(not\x20found)')&&console[_0x188629(0x129)]('\x20\x20\x20\x20Settings:\x20'+link(_0x3b0921[_0x188629(0x124)],_0x4066fd[_0x188629(0x159)](basename,_0x3b0921['settingsPath'])));}if(!_0x4af49b){console[_0x188629(0x129)](_0x188629(0x185));const _0x448493=[..._0x9da9c3['map'](_0x51add2=>_0x51add2[_0x188629(0x17f)]),..._0x17bc40[_0x188629(0x116)](_0x3917fc=>!_0x55454d[_0x188629(0x14d)](_0x3917fc['name']))[_0x188629(0x138)](_0x289fa0=>_0x289fa0['name'])];console['log'](_0x188629(0x16f)+_0x448493['join'](',\x20')+')');}}}console['log']('');}