@ranger-testing/ranger-cli 3.1.2-alpha.b450a14-41 → 3.1.3-alpha.2c5eb8e-44

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 (85) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/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/tunnelClient.js +1 -1
  79. package/build/commands/utils/userApi.js +1 -1
  80. package/build/commands/utils/version.js +1 -1
  81. package/build/commands/verifyFeature.js +1 -1
  82. package/build/commands/verifyFeatureCli.js +1 -1
  83. package/build/commands/verifyFeatureNovaCli.js +1 -1
  84. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  85. package/package.json +2 -2
@@ -1 +1 @@
1
- (function(_0x38dee0,_0x4afe1e){const _0x2bffa1=_0x28c4,_0x445c03=_0x38dee0();while(!![]){try{const _0x4f4b17=parseInt(_0x2bffa1(0x1a0))/0x1*(parseInt(_0x2bffa1(0x190))/0x2)+-parseInt(_0x2bffa1(0x194))/0x3*(-parseInt(_0x2bffa1(0x19c))/0x4)+-parseInt(_0x2bffa1(0x19a))/0x5*(-parseInt(_0x2bffa1(0x198))/0x6)+-parseInt(_0x2bffa1(0x192))/0x7*(-parseInt(_0x2bffa1(0x19f))/0x8)+parseInt(_0x2bffa1(0x19e))/0x9*(-parseInt(_0x2bffa1(0x1a2))/0xa)+-parseInt(_0x2bffa1(0x193))/0xb+-parseInt(_0x2bffa1(0x199))/0xc*(parseInt(_0x2bffa1(0x18e))/0xd);if(_0x4f4b17===_0x4afe1e)break;else _0x445c03['push'](_0x445c03['shift']());}catch(_0x100195){_0x445c03['push'](_0x445c03['shift']());}}}(_0x48fc,0x27f46));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0xd1a9b6=_0x28c4,_0x17f371={'oAOuR':function(_0x2fd8ae){return _0x2fd8ae();},'HsYzE':'Re-authenticating\x20via\x20MCP\x20bootstrap...','rpxUP':_0xd1a9b6(0x18d),'aXwIb':function(_0x2dc503){return _0x2dc503();},'BRgIc':'\x0a✅\x20API\x20key\x20stored\x20successfully','blggC':function(_0x18a23c,_0x31e928){return _0x18a23c instanceof _0x31e928;}},_0x48b9d6=await _0x17f371['oAOuR'](getMcpAuthOrigin);if(_0x48b9d6){console[_0xd1a9b6(0x1a1)](_0x17f371[_0xd1a9b6(0x195)]),await _0x17f371['oAOuR'](mcpBootstrap);return;}if(!isInteractive())throw new Error(_0x17f371[_0xd1a9b6(0x196)]);try{const _0x1c32be=await _0x17f371[_0xd1a9b6(0x19d)](runDeviceAuthFlow),_0x53fb2f=await getCurrentUser(_0x1c32be);_0x53fb2f[_0xd1a9b6(0x19b)]?console[_0xd1a9b6(0x1a1)](_0xd1a9b6(0x18f)+_0x53fb2f[_0xd1a9b6(0x197)]['organizationName']):console['log'](_0x17f371[_0xd1a9b6(0x191)]);}catch(_0x40eba8){throw new Error('Login\x20failed:\x20'+(_0x17f371['blggC'](_0x40eba8,Error)?_0x40eba8['message']:_0x40eba8));}}function _0x28c4(_0x55af19,_0x1f7b67){_0x55af19=_0x55af19-0x18d;const _0x48fcae=_0x48fc();let _0x28c4a8=_0x48fcae[_0x55af19];return _0x28c4a8;}function _0x48fc(){const _0x4717bb=['success','306260ymtKng','aXwIb','63rmWqQY','6856kXvPoj','219LktJtz','log','110570QzttUm','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','1722799kaxLno','\x0a✅\x20Logged\x20in\x20to\x20','1822kqZWgq','BRgIc','2604IMaUjZ','1884993mBGlTA','3sDegll','HsYzE','rpxUP','user','144DwbhRC','24sdwpGz','17205NiuCKX'];_0x48fc=function(){return _0x4717bb;};return _0x48fc();}
1
+ (function(_0x4ef62d,_0x3e9f27){const _0x52cbf1=_0x2a01,_0x3ec2ef=_0x4ef62d();while(!![]){try{const _0x273508=-parseInt(_0x52cbf1(0x1a1))/0x1+parseInt(_0x52cbf1(0x19b))/0x2*(parseInt(_0x52cbf1(0x196))/0x3)+parseInt(_0x52cbf1(0x193))/0x4+parseInt(_0x52cbf1(0x195))/0x5+parseInt(_0x52cbf1(0x192))/0x6*(-parseInt(_0x52cbf1(0x1a0))/0x7)+parseInt(_0x52cbf1(0x197))/0x8+-parseInt(_0x52cbf1(0x199))/0x9*(parseInt(_0x52cbf1(0x194))/0xa);if(_0x273508===_0x3e9f27)break;else _0x3ec2ef['push'](_0x3ec2ef['shift']());}catch(_0x2fa85e){_0x3ec2ef['push'](_0x3ec2ef['shift']());}}}(_0x1803,0xa9e51));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x2a01(_0x1c72f4,_0x4701f4){_0x1c72f4=_0x1c72f4-0x190;const _0x18030f=_0x1803();let _0x2a019c=_0x18030f[_0x1c72f4];return _0x2a019c;}import{getMcpAuthOrigin,mcpBootstrap}from'./mcpBootstrap.js';import{isInteractive}from'./utils/cloudProfileSession.js';export async function login(){const _0x41f346=_0x2a01,_0x1ed82c={'EoXff':function(_0x3f1b80){return _0x3f1b80();},'OaWLE':_0x41f346(0x19c),'ZxRuh':function(_0x36cf4c){return _0x36cf4c();}},_0x343342=await _0x1ed82c['EoXff'](getMcpAuthOrigin);if(_0x343342){console['log'](_0x1ed82c[_0x41f346(0x19f)]),await mcpBootstrap();return;}if(!_0x1ed82c['ZxRuh'](isInteractive))throw new Error(_0x41f346(0x19e));try{const _0x35dce5=await runDeviceAuthFlow(),_0x5020d7=await getCurrentUser(_0x35dce5);_0x5020d7[_0x41f346(0x191)]?console[_0x41f346(0x190)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x5020d7['user'][_0x41f346(0x19a)]):console[_0x41f346(0x190)]('\x0a✅\x20API\x20key\x20stored\x20successfully');}catch(_0x126dc7){throw new Error(_0x41f346(0x198)+(_0x126dc7 instanceof Error?_0x126dc7[_0x41f346(0x19d)]:_0x126dc7));}}function _0x1803(){const _0xbe00c8=['Login\x20failed:\x20','288BGiqeW','organizationName','94854NoBPqP','Re-authenticating\x20via\x20MCP\x20bootstrap...','message','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','OaWLE','7340683vRQxta','533485QkzxrR','log','success','6FCGVRQ','4700752uWVMcC','26740anuTna','2287920UKfRrk','6oUhaaT','5087880RzfYIe'];_0x1803=function(){return _0xbe00c8;};return _0x1803();}
@@ -1 +1 @@
1
- const _0x4fe080=_0x5598;(function(_0x3d7251,_0x9d01dc){const _0xc0be5b=_0x5598,_0x5d42c9=_0x3d7251();while(!![]){try{const _0x11feb6=parseInt(_0xc0be5b(0x13f))/0x1*(-parseInt(_0xc0be5b(0xed))/0x2)+-parseInt(_0xc0be5b(0x144))/0x3*(-parseInt(_0xc0be5b(0x14b))/0x4)+-parseInt(_0xc0be5b(0xe5))/0x5+parseInt(_0xc0be5b(0x127))/0x6+-parseInt(_0xc0be5b(0x110))/0x7+-parseInt(_0xc0be5b(0xd6))/0x8+parseInt(_0xc0be5b(0xe0))/0x9*(parseInt(_0xc0be5b(0xf4))/0xa);if(_0x11feb6===_0x9d01dc)break;else _0x5d42c9['push'](_0x5d42c9['shift']());}catch(_0x390fab){_0x5d42c9['push'](_0x5d42c9['shift']());}}}(_0x5c15,0x831a1));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',_0x4fe080(0x106)),AUTH_ORIGIN_PATH=join(homedir(),'.ranger',_0x4fe080(0x148));export async function getMcpAuthOrigin(){const _0x3dad5a=_0x4fe080,_0x8f051c={'cwtcg':'utf-8','WSlTn':function(_0x30251a,_0x3f7903){return _0x30251a||_0x3f7903;}};try{const _0x59e8fa=(await readFile(AUTH_ORIGIN_PATH,_0x8f051c[_0x3dad5a(0xcd)]))[_0x3dad5a(0xf9)]();return _0x8f051c[_0x3dad5a(0x136)](_0x59e8fa,null);}catch{return null;}}export async function mcpBootstrap(){const _0x5d6f4f=_0x4fe080,_0x57e091={'RovUt':function(_0x97b936){return _0x97b936();},'CtTmP':function(_0x46f056,_0x1aa651){return _0x46f056(_0x1aa651);},'XssSr':function(_0x5c6c61,_0x21b24a){return _0x5c6c61===_0x21b24a;},'gRUPN':function(_0x30e8ab,_0x491abd){return _0x30e8ab(_0x491abd);}},_0x57587f=_0x57e091['RovUt'](getMcpAuthUrl);currentOrigin=_0x57587f;const _0x356d8c=process['stdout']['isTTY']??![];console['log']('\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20'+_0x57587f+'\x0a');const _0x3ca093=await _0x57e091[_0x5d6f4f(0x140)](tryUnauthenticated,_0x57587f);let _0x36da9f=null;if(_0x57e091['XssSr'](_0x3ca093,'proxied'))_0x36da9f='';else{_0x36da9f=await loadCachedToken();if(!_0x36da9f){if(!_0x356d8c)throw new Error('MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a'+_0x5d6f4f(0xc2));_0x36da9f=await _0x57e091[_0x5d6f4f(0xfc)](oauthFlow,_0x57587f);}}await callGetCliToken(_0x57587f,_0x36da9f);}async function tryUnauthenticated(_0xf8f1d9){const _0xfe7b76=_0x4fe080,_0x4690ba={'mAysf':function(_0x1cfaf9,_0x42177f,_0x565aa2){return _0x1cfaf9(_0x42177f,_0x565aa2);},'FmHef':'application/json,\x20text/event-stream','bFqPL':_0xfe7b76(0xc7),'mhURq':_0xfe7b76(0x10c),'RMTXP':_0xfe7b76(0x14d),'FgKAA':'1.0.0','NyqHu':'proxied','HYIlD':function(_0x16a2d7,_0x56018b){return _0x16a2d7===_0x56018b;}},_0x22faf0=await _0x4690ba[_0xfe7b76(0x11d)](fetch,_0xf8f1d9,{'method':_0xfe7b76(0xe7),'headers':{'Content-Type':_0xfe7b76(0x11a),'Accept':_0x4690ba['FmHef']},'body':JSON['stringify']({'jsonrpc':_0x4690ba[_0xfe7b76(0x112)],'id':0x1,'method':'initialize','params':{'protocolVersion':_0x4690ba['mhURq'],'capabilities':{},'clientInfo':{'name':_0x4690ba['RMTXP'],'version':_0x4690ba['FgKAA']}}})});if(_0x22faf0['ok'])return await _0x22faf0[_0xfe7b76(0xda)](),_0x4690ba['NyqHu'];if(_0x4690ba['HYIlD'](_0x22faf0['status'],0x191))return await _0x22faf0['text'](),_0xfe7b76(0xf1);const _0x574441=await _0x22faf0[_0xfe7b76(0xda)]();throw new Error(_0xfe7b76(0x10f)+_0x22faf0['status']+':\x20'+_0x574441);}function _0x5598(_0x119ce8,_0x26e5e7){_0x119ce8=_0x119ce8-0xc2;const _0x5c1566=_0x5c15();let _0x559895=_0x5c1566[_0x119ce8];return _0x559895;}class OAuthTimeoutError extends Error{constructor(_0x4ad7a9){const _0x56b168=_0x4fe080,_0x27a439={'JLoRL':'OAuthTimeoutError'};super(_0x4ad7a9),this['name']=_0x27a439[_0x56b168(0xdd)];}}async function oauthFlow(_0x4ec4ea){const _0x2e65d2=_0x4fe080,_0x512af6={'jLIrV':function(_0x2416ac,_0x3f8011){return _0x2416ac(_0x3f8011);},'gntAj':_0x2e65d2(0x133)};try{return await _0x512af6['jLIrV'](oauthFlowAttempt,_0x4ec4ea);}catch(_0x25a9df){if(_0x25a9df instanceof OAuthTimeoutError&&await loadCachedClient())return console['log'](_0x512af6[_0x2e65d2(0x149)]),await clearCachedClient(),await oauthFlowAttempt(_0x4ec4ea);throw _0x25a9df;}}async function oauthFlowAttempt(_0x1191ac){const _0x4d2428=_0x4fe080,_0x44e8d8={'btZAt':'Discovering\x20authorization\x20server...','trJwi':'Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server','HCDKn':_0x4d2428(0x12b),'oVKvR':_0x4d2428(0xe7),'MILVe':_0x4d2428(0xc4),'Grxku':_0x4d2428(0xec),'QPXwS':'Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','AXtrq':function(_0x4bb9a7,_0x4e66bd){return _0x4bb9a7(_0x4e66bd);},'JsTJB':'sha256','GqQaa':function(_0x30056a,_0xcaaffd){return _0x30056a(_0xcaaffd);},'MntnH':'hex','OrxSo':_0x4d2428(0xeb),'znGrg':_0x4d2428(0x13a),'WBswi':_0x4d2428(0x122),'LeEaK':'code_challenge_method','kFevX':_0x4d2428(0x111),'DRInj':'resource','cDnIQ':_0x4d2428(0xff),'xigqE':_0x4d2428(0x132),'sslYF':function(_0x5d1483,_0x507c4c,_0x65fea1){return _0x5d1483(_0x507c4c,_0x65fea1);},'OLJrb':_0x4d2428(0xc5)},_0x28522d=_0x1191ac['replace'](/\/mcp$/,'');process['stdout'][_0x4d2428(0xdc)](_0x44e8d8[_0x4d2428(0x138)]);const _0x342f0e=await fetch(_0x28522d+_0x4d2428(0xc6));if(!_0x342f0e['ok'])throw new Error(_0x44e8d8[_0x4d2428(0xc3)]);const _0x39b199=await _0x342f0e['json'](),_0x29ebb6=_0x39b199['authorization_servers']?.[0x0];if(!_0x29ebb6)throw new Error('No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata');console[_0x4d2428(0x14f)]('\x20'+_0x29ebb6);const _0x30d34f=await fetchAuthServerMetadata(_0x29ebb6);let _0x5ee89a,_0x5d7d79;const _0x1c5679=await loadCachedClient();if(_0x1c5679)_0x5ee89a=_0x1c5679[_0x4d2428(0x141)],_0x5d7d79=_0x1c5679[_0x4d2428(0x121)];else{if(_0x30d34f['registration_endpoint']){process['stdout']['write'](_0x44e8d8['HCDKn']);const _0x3d3560=await fetch(_0x30d34f['registration_endpoint'],{'method':_0x44e8d8['oVKvR'],'headers':{'Content-Type':'application/json'},'body':JSON[_0x4d2428(0x12e)]({'client_name':_0x44e8d8['MILVe'],'redirect_uris':['http://localhost:'+CALLBACK_PORT+_0x4d2428(0x12a)],'grant_types':[_0x44e8d8[_0x4d2428(0x13c)],'refresh_token'],'response_types':['code'],'token_endpoint_auth_method':_0x4d2428(0x113)})});if(!_0x3d3560['ok']){const _0x354190=await _0x3d3560['text']();throw new Error('Client\x20registration\x20failed:\x20'+_0x354190);}const _0x190cb0=await _0x3d3560['json']();_0x5ee89a=_0x190cb0[_0x4d2428(0x13a)],_0x5d7d79=_0x190cb0['client_secret'],await saveCachedClient(_0x5ee89a,_0x5d7d79),console['log']('\x20done');}else throw new Error(_0x44e8d8[_0x4d2428(0xca)]);}const _0x46b20c=randomBytes(0x20)[_0x4d2428(0xfa)]('base64url'),_0x166483=_0x44e8d8[_0x4d2428(0xdb)](createHash,_0x44e8d8['JsTJB'])['update'](_0x46b20c)[_0x4d2428(0xf0)]('base64url'),_0x5ce671=_0x44e8d8['GqQaa'](randomBytes,0x10)['toString'](_0x44e8d8[_0x4d2428(0x14a)]),_0x1f6ada=new URL(_0x30d34f['authorization_endpoint']);_0x1f6ada['searchParams']['set'](_0x44e8d8['OrxSo'],'code'),_0x1f6ada[_0x4d2428(0xf8)]['set'](_0x44e8d8['znGrg'],_0x5ee89a),_0x1f6ada['searchParams'][_0x4d2428(0x11f)]('redirect_uri','http://localhost:'+CALLBACK_PORT+_0x4d2428(0x12a)),_0x1f6ada['searchParams'][_0x4d2428(0x11f)](_0x44e8d8[_0x4d2428(0x104)],_0x166483),_0x1f6ada[_0x4d2428(0xf8)]['set'](_0x44e8d8['LeEaK'],_0x4d2428(0xde)),_0x1f6ada[_0x4d2428(0xf8)][_0x4d2428(0x11f)](_0x44e8d8[_0x4d2428(0x137)],_0x5ce671);_0x39b199[_0x4d2428(0x142)]&&_0x1f6ada['searchParams'][_0x4d2428(0x11f)](_0x44e8d8['DRInj'],_0x39b199[_0x4d2428(0x142)]);console[_0x4d2428(0x14f)](_0x44e8d8['cDnIQ']),console[_0x4d2428(0x14f)](_0x4d2428(0x13d)+_0x1f6ada['toString']()+'\x0a'),await openBrowser(_0x1f6ada['toString']());const _0x1aeadf=await waitForCallback(_0x5ce671);process['stdout'][_0x4d2428(0xdc)](_0x44e8d8['xigqE']);const _0x534309=new URLSearchParams({'grant_type':_0x44e8d8[_0x4d2428(0x13c)],'code':_0x1aeadf,'redirect_uri':_0x4d2428(0x124)+CALLBACK_PORT+'/callback','client_id':_0x5ee89a,'code_verifier':_0x46b20c});_0x5d7d79&&_0x534309['set'](_0x4d2428(0x100),_0x5d7d79);_0x39b199[_0x4d2428(0x142)]&&_0x534309[_0x4d2428(0x11f)](_0x4d2428(0x142),_0x39b199['resource']);const _0x128900=await _0x44e8d8[_0x4d2428(0xd2)](fetch,_0x30d34f['token_endpoint'],{'method':_0x4d2428(0xe7),'headers':{'Content-Type':_0x4d2428(0xdf)},'body':_0x534309});if(!_0x128900['ok']){const _0x1debbd=await _0x128900[_0x4d2428(0xda)]();throw new Error(_0x4d2428(0xfd)+_0x1debbd);}const _0x300751=await _0x128900[_0x4d2428(0x102)]();return console[_0x4d2428(0x14f)](_0x44e8d8['OLJrb']),await saveCachedToken(_0x300751[_0x4d2428(0x12d)],_0x300751[_0x4d2428(0x14e)],_0x300751['expires_in']),_0x300751[_0x4d2428(0x12d)];}async function callGetCliToken(_0x750e7f,_0x267d60){const _0x3c57aa=_0x4fe080,_0x59fa05={'jCgNP':function(_0x5b9708,_0x569c68,_0x157556){return _0x5b9708(_0x569c68,_0x157556);},'oxXtR':_0x3c57aa(0xe7),'WgKzj':'application/json','DnfDK':function(_0x2a6975,_0x5e20b7){return _0x2a6975(_0x5e20b7);},'WTbzE':'2025-03-26','fqTQT':'1.0.0','thDIs':_0x3c57aa(0xc5),'oMGyU':_0x3c57aa(0xc7),'vrRBk':_0x3c57aa(0x129),'DQEkc':'tools/call','IdfWn':'get_cli_token','yOZoi':_0x3c57aa(0x12c),'odSRK':function(_0x273d9f){return _0x273d9f();},'kKNNL':_0x3c57aa(0x12f),'wuczA':function(_0x2e3b42,_0xa387f3,_0x182a84,_0x3dfd3a){return _0x2e3b42(_0xa387f3,_0x182a84,_0x3dfd3a);},'okJMk':_0x3c57aa(0xfb)},_0x1c0b6f={'Content-Type':_0x59fa05[_0x3c57aa(0x130)],'Accept':'application/json,\x20text/event-stream'};_0x267d60&&(_0x1c0b6f['Authorization']='Bearer\x20'+_0x267d60);const _0x3e68c3=async _0x1eb8a3=>{const _0x28d5ef=_0x3c57aa,_0x32d098=await _0x59fa05[_0x28d5ef(0xd0)](fetch,_0x750e7f,{'method':_0x59fa05[_0x28d5ef(0xf5)],'headers':_0x1c0b6f,'body':JSON[_0x28d5ef(0x12e)](_0x1eb8a3)});if(!_0x32d098['ok']){const _0x30ec33=await _0x32d098['text']();throw new Error('HTTP\x20'+_0x32d098['status']+':\x20'+_0x30ec33);}return parseResponse(_0x32d098);};process['stdout']['write'](_0x3c57aa(0xf2));const _0x11b597=await _0x59fa05[_0x3c57aa(0x108)](_0x3e68c3,{'jsonrpc':_0x3c57aa(0xc7),'id':0x1,'method':_0x3c57aa(0xe8),'params':{'protocolVersion':_0x59fa05['WTbzE'],'capabilities':{},'clientInfo':{'name':'ranger-cli','version':_0x59fa05['fqTQT']}}});if(_0x11b597['error'])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x11b597['error'][_0x3c57aa(0x143)]??JSON[_0x3c57aa(0x12e)](_0x11b597[_0x3c57aa(0xd3)])));console[_0x3c57aa(0x14f)](_0x59fa05[_0x3c57aa(0xea)]),await fetch(_0x750e7f,{'method':_0x59fa05['oxXtR'],'headers':_0x1c0b6f,'body':JSON[_0x3c57aa(0x12e)]({'jsonrpc':_0x59fa05[_0x3c57aa(0xe4)],'method':_0x3c57aa(0x13e)})})['then'](_0x448c49=>_0x448c49[_0x3c57aa(0xda)]()),process[_0x3c57aa(0xd1)][_0x3c57aa(0xdc)](_0x59fa05[_0x3c57aa(0xcb)]);const _0x227b1a=await _0x59fa05['DnfDK'](_0x3e68c3,{'jsonrpc':_0x59fa05[_0x3c57aa(0xe4)],'id':0x2,'method':_0x59fa05['DQEkc'],'params':{'name':_0x59fa05[_0x3c57aa(0x120)],'arguments':{}}});if(_0x227b1a[_0x3c57aa(0xd3)])throw new Error(_0x3c57aa(0x126)+(_0x227b1a[_0x3c57aa(0xd3)]['message']??JSON['stringify'](_0x227b1a['error'])));console[_0x3c57aa(0x14f)](_0x59fa05['thDIs']);const _0x281195=extractToken(_0x227b1a['result']);if(!_0x281195){console[_0x3c57aa(0xd3)](_0x59fa05[_0x3c57aa(0x135)]),console['error'](JSON['stringify'](_0x227b1a['result'],null,0x2));throw new Error('Could\x20not\x20extract\x20token\x20from\x20MCP\x20response');}const _0x56c17e=join(_0x59fa05['odSRK'](homedir),_0x59fa05['kKNNL']),_0x3573e9=_0x59fa05[_0x3c57aa(0xd0)](join,_0x56c17e,_0x3c57aa(0xce));await _0x59fa05['jCgNP'](mkdir,_0x56c17e,{'recursive':!![]}),await _0x59fa05['wuczA'](writeFile,_0x3573e9,_0x281195,{'mode':0x180}),await writeFile(join(_0x56c17e,'auth-origin.txt'),_0x750e7f,{'mode':0x180}),console[_0x3c57aa(0x14f)]('\x0aToken\x20written\x20to\x20'+_0x3573e9),console[_0x3c57aa(0x14f)](_0x59fa05[_0x3c57aa(0xf7)]);}async function fetchAuthServerMetadata(_0x3ef6ac){const _0x349f21=_0x4fe080,_0x44467c=_0x3ef6ac+'/.well-known/oauth-authorization-server',_0xc14f23=await fetch(_0x44467c);if(!_0xc14f23['ok'])throw new Error('Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20'+_0x44467c+':\x20'+_0xc14f23[_0x349f21(0xf6)]);return _0xc14f23[_0x349f21(0x102)]();}function waitForCallback(_0x174615){const _0x46ce69=_0x4fe080,_0x47098e={'UJlFe':function(_0x5c1a46,_0x2ee73b){return _0x5c1a46(_0x2ee73b);},'bjwpD':_0x46ce69(0xc8),'cFljV':function(_0xefd52e){return _0xefd52e();}};return new Promise((_0x5e1036,_0x3b1a22)=>{const _0x46f0d1=_0x46ce69,_0x3326f7={'bHHmf':function(_0x24634a,_0x4ad361){return _0x24634a!==_0x4ad361;},'mgfgh':_0x46f0d1(0x103),'lAVKb':_0x47098e['bjwpD'],'wIPHt':_0x46f0d1(0x131),'RPmnq':_0x46f0d1(0x14c),'wtHsx':function(_0x8cafc7,_0x20f970){return _0x47098e['UJlFe'](_0x8cafc7,_0x20f970);},'gQRWD':function(_0x5db9c5){return _0x47098e['cFljV'](_0x5db9c5);},'Ryxkg':'<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>'},_0x39ed40=()=>{const _0x113d5a=_0x46f0d1;_0x3c0ea5['closeAllConnections'](),_0x3c0ea5[_0x113d5a(0x101)]();},_0x1a3262=setTimeout(()=>{const _0x576eb9=_0x46f0d1;_0x39ed40(),_0x47098e[_0x576eb9(0x11e)](_0x3b1a22,new OAuthTimeoutError('OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes'));},0x1d4c0),_0x3c0ea5=createServer((_0x2fabe3,_0xb64723)=>{const _0x365bda=_0x46f0d1,_0x279342=new URL(_0x2fabe3['url']??'/',_0x365bda(0x124)+CALLBACK_PORT);if(_0x3326f7['bHHmf'](_0x279342['pathname'],'/callback')){_0xb64723[_0x365bda(0x10d)](0x194),_0xb64723[_0x365bda(0x107)](_0x3326f7[_0x365bda(0xd9)]);return;}const _0x4c8c00=_0x279342[_0x365bda(0xf8)][_0x365bda(0xe1)](_0x3326f7[_0x365bda(0x10b)]),_0x5000ae=_0x279342['searchParams']['get'](_0x365bda(0x111)),_0x131cee=_0x279342[_0x365bda(0xf8)][_0x365bda(0xe1)](_0x365bda(0xd3));if(_0x131cee){const _0x540784=_0x279342['searchParams']['get'](_0x3326f7[_0x365bda(0x128)])??_0x131cee;_0xb64723['writeHead'](0xc8,{'Content-Type':_0x3326f7[_0x365bda(0x147)]}),_0xb64723[_0x365bda(0x107)]('<html><body><h2>Authentication\x20failed</h2><p>'+_0x540784+_0x365bda(0x114)),_0x3326f7['wtHsx'](clearTimeout,_0x1a3262),_0x3326f7[_0x365bda(0xcc)](_0x39ed40),_0x3b1a22(new Error('OAuth\x20error:\x20'+_0x540784));return;}if(!_0x4c8c00||_0x3326f7[_0x365bda(0x105)](_0x5000ae,_0x174615)){_0xb64723[_0x365bda(0x10d)](0x190,{'Content-Type':_0x365bda(0x14c)}),_0xb64723['end'](_0x3326f7['Ryxkg']);return;}_0xb64723[_0x365bda(0x10d)](0xc8,{'Content-Type':_0x3326f7[_0x365bda(0x147)]}),_0xb64723[_0x365bda(0x107)]('<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>'),clearTimeout(_0x1a3262),_0x39ed40(),_0x3326f7['wtHsx'](_0x5e1036,_0x4c8c00);});_0x3c0ea5[_0x46f0d1(0x146)](CALLBACK_PORT,'127.0.0.1');});}async function openBrowser(_0x43f865){const _0x460c12=_0x4fe080,_0x2b403e={'dXVky':function(_0x2b5a21,_0x3c662f){return _0x2b5a21===_0x3c662f;},'gxDFT':_0x460c12(0x109),'KUqsF':'win32','vUzye':_0x460c12(0xf3)},_0x158f26=_0x2b403e['dXVky'](process[_0x460c12(0xc9)],_0x2b403e[_0x460c12(0xd7)])?_0x460c12(0x139):process[_0x460c12(0xc9)]===_0x2b403e[_0x460c12(0x11b)]?'start':_0x2b403e[_0x460c12(0xee)];exec(_0x158f26+'\x20\x22'+_0x43f865+'\x22');}function _0x5c15(){const _0x4d7c83=['thDIs','response_type','authorization_code','18nTtpuz','vUzye','origin','digest','needs-oauth','Initializing\x20MCP\x20session...','xdg-open','22579610hevkEL','oxXtR','status','okJMk','searchParams','trim','toString','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','gRUPN','Token\x20exchange\x20failed:\x20','LvIBt','\x0aOpening\x20browser\x20for\x20authentication...','client_secret','close','json','Not\x20found','WBswi','bHHmf','mcp-oauth-tokens.json','end','DnfDK','darwin','gfLug','lAVKb','2025-03-26','writeHead','refreshToken','MCP\x20server\x20returned\x20HTTP\x20','7178668KgUlPF','state','bFqPL','none','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','parse','startsWith','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','headers','oqSWo','application/json','KUqsF','iHcJn','mAysf','UJlFe','set','IdfWn','clientSecret','code_challenge','accessToken','http://localhost:','data:','get_cli_token\x20failed:\x20','520068pdHlDb','wIPHt','Requesting\x20CLI\x20token...','/callback','Registering\x20OAuth\x20client...','\x0aUnexpected\x20response\x20structure:','access_token','stringify','.ranger','WgKzj','error_description','Exchanging\x20authorization\x20code...','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','string','yOZoi','WSlTn','kFevX','btZAt','open','client_id','zptuA','Grxku','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','notifications/initialized','83221uskVpm','CtTmP','clientId','resource','message','525SDUxpV','zNskR','listen','RPmnq','auth-origin.txt','gntAj','MntnH','10876cVIqPT','text/html','ranger-cli','refresh_token','log','Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.','trJwi','Ranger\x20CLI','\x20done','/.well-known/oauth-protected-resource','2.0','code','platform','QPXwS','vrRBk','gQRWD','cwtcg','refresh.txt','content','jCgNP','stdout','sslYF','error','token','text/event-stream','3443712KegLnR','gxDFT','now','mgfgh','text','AXtrq','write','JLoRL','S256','application/x-www-form-urlencoded','9uLXqTA','get','utf-8','iauBG','oMGyU','392470EVTtDH','content-type','POST','initialize','slice'];_0x5c15=function(){return _0x4d7c83;};return _0x5c15();}let currentOrigin='';async function loadCachedToken(){const _0x20c477=_0x4fe080,_0x171c1c={'gfLug':function(_0x56fda3,_0x46ab4f,_0x4c4fe0){return _0x56fda3(_0x46ab4f,_0x4c4fe0);},'KJMye':_0x20c477(0xe2)};try{const _0xbf4355=JSON[_0x20c477(0x115)](await _0x171c1c[_0x20c477(0x10a)](readFile,TOKEN_CACHE_PATH,_0x171c1c['KJMye']));if(_0xbf4355['origin']&&_0xbf4355['origin']!==currentOrigin)return null;if(_0xbf4355['expiresAt']&&Date[_0x20c477(0xd8)]()>_0xbf4355['expiresAt'])return null;return _0xbf4355[_0x20c477(0x123)]??null;}catch{return null;}}async function saveCachedToken(_0x4fd9f0,_0x366dad,_0x43cafc){const _0x4c55b3=_0x4fe080,_0x3c3767={'zNskR':function(_0x3526c0,_0x4952c6){return _0x3526c0+_0x4952c6;},'MrovC':function(_0x2f5f76){return _0x2f5f76();},'TQKSU':_0x4c55b3(0x12f)},_0x465964=await loadCachedData(),_0x9dcb34={..._0x465964,'origin':currentOrigin,'accessToken':_0x4fd9f0,'refreshToken':_0x366dad??_0x465964?.[_0x4c55b3(0x10e)],'expiresAt':_0x43cafc?_0x3c3767[_0x4c55b3(0x145)](Date[_0x4c55b3(0xd8)](),_0x43cafc*0x3e8):undefined};await mkdir(join(_0x3c3767['MrovC'](homedir),_0x3c3767['TQKSU']),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x9dcb34),{'mode':0x180});}async function loadCachedClient(){const _0x3133d5=_0x4fe080,_0x1b0eaf=await loadCachedData();if(_0x1b0eaf?.['origin']&&_0x1b0eaf[_0x3133d5(0xef)]!==currentOrigin)return null;return _0x1b0eaf?.['clientId']?{'clientId':_0x1b0eaf[_0x3133d5(0x141)],'clientSecret':_0x1b0eaf[_0x3133d5(0x121)]}:null;}async function clearCachedClient(){const _0x5b5e95=_0x4fe080,_0x3ded10={'iHcJn':function(_0x37498c){return _0x37498c();},'LvIBt':function(_0x503d6e,_0x4fa3b8,_0x340219,_0x47b752){return _0x503d6e(_0x4fa3b8,_0x340219,_0x47b752);}},_0x3f0d4f=await _0x3ded10[_0x5b5e95(0x11c)](loadCachedData);if(!_0x3f0d4f)return;const {clientId:_0x84b607,clientSecret:_0x3ea6bd,..._0x450dab}=_0x3f0d4f;await _0x3ded10[_0x5b5e95(0xfe)](writeFile,TOKEN_CACHE_PATH,JSON['stringify'](_0x450dab),{'mode':0x180});}async function saveCachedClient(_0x119b91,_0x547299){const _0x1a9f3d=_0x4fe080,_0xc7c1d={'zptuA':function(_0x57af86,_0x5d512c,_0x2e73ac){return _0x57af86(_0x5d512c,_0x2e73ac);},'oqSWo':'.ranger'},_0x5104b3=await loadCachedData(),_0x48b2e7={..._0x5104b3,'origin':currentOrigin,'accessToken':_0x5104b3?.['accessToken']??'','clientId':_0x119b91,'clientSecret':_0x547299};await _0xc7c1d[_0x1a9f3d(0x13b)](mkdir,_0xc7c1d['zptuA'](join,homedir(),_0xc7c1d[_0x1a9f3d(0x119)]),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON['stringify'](_0x48b2e7),{'mode':0x180});}async function loadCachedData(){const _0x238809=_0x4fe080;try{return JSON[_0x238809(0x115)](await readFile(TOKEN_CACHE_PATH,_0x238809(0xe2)));}catch{return null;}}async function parseResponse(_0xb9e6e9){const _0x26754f=_0x4fe080,_0x56595d={'wUnTi':_0x26754f(0xd5),'qHfkj':_0x26754f(0x125),'iauBG':_0x26754f(0x117)},_0x505d22=_0xb9e6e9[_0x26754f(0x118)][_0x26754f(0xe1)](_0x26754f(0xe6))??'';if(_0x505d22['includes'](_0x56595d['wUnTi'])){const _0x230b64=await _0xb9e6e9['text']();for(const _0x41e071 of _0x230b64['split']('\x0a')){const _0x2c34d0=_0x41e071[_0x26754f(0xf9)]();if(_0x2c34d0[_0x26754f(0x116)]('data:')){const _0x4491ae=_0x2c34d0[_0x26754f(0xe9)](_0x56595d['qHfkj']['length'])['trim']();if(!_0x4491ae)continue;try{const _0x3abfce=JSON['parse'](_0x4491ae);if(_0x3abfce['id']!==undefined||_0x3abfce[_0x26754f(0xd3)])return _0x3abfce;}catch{}}}throw new Error(_0x56595d[_0x26754f(0xe3)]);}return _0xb9e6e9['json']();}function extractToken(_0xa7175b){const _0x58bf7a=_0x4fe080,_0x366d10={'isugs':_0x58bf7a(0x134)};if(!_0xa7175b)return null;const _0x3cf8e3=_0xa7175b['structuredContent'];if(_0x3cf8e3?.[_0x58bf7a(0xd4)]&&typeof _0x3cf8e3['token']==='string')return _0x3cf8e3['token'];if(_0xa7175b['isError']){const _0x15d703=_0xa7175b['content'];throw new Error('Server\x20returned\x20error:\x20'+(_0x15d703?.[0x0]?.[_0x58bf7a(0xda)]??'Unknown\x20error'));}const _0x1f420d=_0xa7175b[_0x58bf7a(0xcf)];if(_0x1f420d)for(const _0x4523e8 of _0x1f420d){if(_0x4523e8['type']==='text'&&_0x4523e8[_0x58bf7a(0xda)]){try{const _0x1ecf2b=JSON['parse'](_0x4523e8['text']);if(typeof _0x1ecf2b?.['token']===_0x366d10['isugs'])return _0x1ecf2b[_0x58bf7a(0xd4)];}catch{}const _0x4a4e0f=_0x4523e8['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x4a4e0f)return _0x4a4e0f[0x1];}}return null;}
1
+ const _0xd0a8a1=_0x431c;(function(_0xf69cfc,_0x1b661d){const _0x30e537=_0x431c,_0x5ef4db=_0xf69cfc();while(!![]){try{const _0x1c70c9=parseInt(_0x30e537(0x18c))/0x1+-parseInt(_0x30e537(0x1ad))/0x2+parseInt(_0x30e537(0x143))/0x3*(parseInt(_0x30e537(0x1bb))/0x4)+-parseInt(_0x30e537(0x1b0))/0x5+-parseInt(_0x30e537(0x14b))/0x6*(parseInt(_0x30e537(0x171))/0x7)+-parseInt(_0x30e537(0x137))/0x8+parseInt(_0x30e537(0x140))/0x9;if(_0x1c70c9===_0x1b661d)break;else _0x5ef4db['push'](_0x5ef4db['shift']());}catch(_0x5e3b1d){_0x5ef4db['push'](_0x5ef4db['shift']());}}}(_0x3fe1,0xc38aa));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';function _0x431c(_0x409c9b,_0x42c92a){_0x409c9b=_0x409c9b-0x133;const _0x3fe1c9=_0x3fe1();let _0x431cfa=_0x3fe1c9[_0x409c9b];return _0x431cfa;}const CALLBACK_PORT=0x4d78,TOKEN_CACHE_PATH=join(homedir(),'.ranger',_0xd0a8a1(0x16d)),AUTH_ORIGIN_PATH=join(homedir(),'.ranger','auth-origin.txt');export async function getMcpAuthOrigin(){const _0x720e1a=_0xd0a8a1,_0x4d39f8={'FktAx':function(_0x154454,_0x2efb2a,_0x5d2d20){return _0x154454(_0x2efb2a,_0x5d2d20);},'ZZtbR':'utf-8'};try{const _0x519b1e=(await _0x4d39f8['FktAx'](readFile,AUTH_ORIGIN_PATH,_0x4d39f8[_0x720e1a(0x19d)]))['trim']();return _0x519b1e||null;}catch{return null;}}export async function mcpBootstrap(){const _0xec4fc8=_0xd0a8a1,_0x160bbf={'hMbFJ':function(_0x491cbd){return _0x491cbd();},'qNxQL':'proxied'},_0x315e4b=_0x160bbf[_0xec4fc8(0x158)](getMcpAuthUrl);currentOrigin=_0x315e4b;const _0x347136=process[_0xec4fc8(0x156)][_0xec4fc8(0x16c)]??![];console[_0xec4fc8(0x19b)](_0xec4fc8(0x1ac)+_0x315e4b+'\x0a');const _0x292fdc=await tryUnauthenticated(_0x315e4b);let _0x42661b=null;if(_0x292fdc===_0x160bbf['qNxQL'])_0x42661b='';else{_0x42661b=await loadCachedToken();if(!_0x42661b){if(!_0x347136)throw new Error('MCP\x20server\x20requires\x20authentication\x20but\x20running\x20in\x20non-interactive\x20mode.\x0a'+'Run\x20`ranger\x20setup\x20--mcp-bootstrap`\x20interactively\x20first.');_0x42661b=await oauthFlow(_0x315e4b);}}await callGetCliToken(_0x315e4b,_0x42661b);}async function tryUnauthenticated(_0x5ee2be){const _0x5dfc65=_0xd0a8a1,_0x4f08ff={'QefWA':_0x5dfc65(0x155),'hkpci':_0x5dfc65(0x161),'gIcwe':_0x5dfc65(0x194),'GryWS':_0x5dfc65(0x14e),'nKaXc':_0x5dfc65(0x180),'zXBoW':'2025-03-26','PTWOS':_0x5dfc65(0x1c5),'YGJlg':function(_0x5ac26c,_0x5a2cdf){return _0x5ac26c===_0x5a2cdf;},'iyPNk':'needs-oauth'},_0x21c3e3=await fetch(_0x5ee2be,{'method':_0x4f08ff['QefWA'],'headers':{'Content-Type':_0x4f08ff['hkpci'],'Accept':_0x4f08ff[_0x5dfc65(0x1b6)]},'body':JSON['stringify']({'jsonrpc':_0x4f08ff[_0x5dfc65(0x195)],'id':0x1,'method':_0x4f08ff['nKaXc'],'params':{'protocolVersion':_0x4f08ff[_0x5dfc65(0x188)],'capabilities':{},'clientInfo':{'name':_0x5dfc65(0x181),'version':_0x5dfc65(0x1af)}}})});if(_0x21c3e3['ok'])return await _0x21c3e3['text'](),_0x4f08ff[_0x5dfc65(0x198)];if(_0x4f08ff[_0x5dfc65(0x193)](_0x21c3e3[_0x5dfc65(0x18f)],0x191))return await _0x21c3e3[_0x5dfc65(0x16a)](),_0x4f08ff['iyPNk'];const _0x12fb0e=await _0x21c3e3[_0x5dfc65(0x16a)]();throw new Error(_0x5dfc65(0x186)+_0x21c3e3['status']+':\x20'+_0x12fb0e);}class OAuthTimeoutError extends Error{constructor(_0x2fde3a){const _0x81465c=_0xd0a8a1;super(_0x2fde3a),this[_0x81465c(0x16e)]='OAuthTimeoutError';}}async function oauthFlow(_0x19e906){const _0x420192=_0xd0a8a1,_0x5b4424={'bQnyP':function(_0x4a6a0e,_0x5aa931){return _0x4a6a0e instanceof _0x5aa931;},'kgnuC':function(_0x439a7e){return _0x439a7e();}};try{return await oauthFlowAttempt(_0x19e906);}catch(_0x4bc095){if(_0x5b4424[_0x420192(0x1ae)](_0x4bc095,OAuthTimeoutError)&&await _0x5b4424['kgnuC'](loadCachedClient))return console['log'](_0x420192(0x1c1)),await clearCachedClient(),await oauthFlowAttempt(_0x19e906);throw _0x4bc095;}}async function oauthFlowAttempt(_0xd9e9e1){const _0x16c194=_0xd0a8a1,_0x1459a5={'BeEEY':'No\x20authorization_servers\x20in\x20protected\x20resource\x20metadata','plmjZ':function(_0xf3b360){return _0xf3b360();},'qUJTe':_0x16c194(0x173),'gdluO':function(_0x2c7eec,_0x1fd40f,_0x3634a1){return _0x2c7eec(_0x1fd40f,_0x3634a1);},'IjIOx':_0x16c194(0x155),'jcicL':_0x16c194(0x136),'hJnVQ':function(_0x22725c,_0x4fb4d4,_0x4e1310){return _0x22725c(_0x4fb4d4,_0x4e1310);},'nwPDw':_0x16c194(0x13f),'ePfzi':'Authorization\x20server\x20does\x20not\x20support\x20dynamic\x20client\x20registration\x20and\x20no\x20cached\x20client\x20found','RYjCd':function(_0x265dd2,_0x563411){return _0x265dd2(_0x563411);},'OEIbw':function(_0x5102f3,_0x17c671){return _0x5102f3(_0x17c671);},'FzFYH':_0x16c194(0x1a1),'ioVaL':_0x16c194(0x1c4),'smcrf':'code_challenge','stZrw':'\x0aOpening\x20browser\x20for\x20authentication...','ZjSWv':function(_0x167b92,_0x398a44){return _0x167b92(_0x398a44);},'OIGvl':function(_0xa9656e,_0x590815){return _0xa9656e(_0x590815);},'uitAE':'client_secret','TPNXU':'resource'},_0x1d9518=_0xd9e9e1[_0x16c194(0x1be)](/\/mcp$/,'');process['stdout'][_0x16c194(0x135)]('Discovering\x20authorization\x20server...');const _0x4ad213=await fetch(_0x1d9518+'/.well-known/oauth-protected-resource');if(!_0x4ad213['ok'])throw new Error('Could\x20not\x20fetch\x20protected\x20resource\x20metadata\x20from\x20MCP\x20server');const _0x4120e0=await _0x4ad213[_0x16c194(0x138)](),_0x49c77a=_0x4120e0[_0x16c194(0x1b2)]?.[0x0];if(!_0x49c77a)throw new Error(_0x1459a5['BeEEY']);console['log']('\x20'+_0x49c77a);const _0x5ca4fe=await fetchAuthServerMetadata(_0x49c77a);let _0xcb4f87,_0x387f0d;const _0x2a3074=await _0x1459a5['plmjZ'](loadCachedClient);if(_0x2a3074)_0xcb4f87=_0x2a3074[_0x16c194(0x1a6)],_0x387f0d=_0x2a3074['clientSecret'];else{if(_0x5ca4fe[_0x16c194(0x141)]){process[_0x16c194(0x156)][_0x16c194(0x135)](_0x1459a5[_0x16c194(0x14c)]);const _0x1d98b2=await _0x1459a5['gdluO'](fetch,_0x5ca4fe[_0x16c194(0x141)],{'method':_0x1459a5[_0x16c194(0x149)],'headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'client_name':_0x16c194(0x14f),'redirect_uris':[_0x16c194(0x139)+CALLBACK_PORT+'/callback'],'grant_types':[_0x16c194(0x175),_0x16c194(0x1a7)],'response_types':[_0x1459a5[_0x16c194(0x1a3)]],'token_endpoint_auth_method':_0x16c194(0x147)})});if(!_0x1d98b2['ok']){const _0x5f484c=await _0x1d98b2[_0x16c194(0x16a)]();throw new Error(_0x16c194(0x1a5)+_0x5f484c);}const _0x5c8d64=await _0x1d98b2[_0x16c194(0x138)]();_0xcb4f87=_0x5c8d64['client_id'],_0x387f0d=_0x5c8d64['client_secret'],await _0x1459a5['hJnVQ'](saveCachedClient,_0xcb4f87,_0x387f0d),console['log'](_0x1459a5['nwPDw']);}else throw new Error(_0x1459a5[_0x16c194(0x1bf)]);}const _0x3f68a0=_0x1459a5[_0x16c194(0x15f)](randomBytes,0x20)['toString']('base64url'),_0x1eff34=_0x1459a5[_0x16c194(0x15f)](createHash,_0x16c194(0x134))[_0x16c194(0x151)](_0x3f68a0)['digest'](_0x16c194(0x179)),_0x26998b=_0x1459a5['OEIbw'](randomBytes,0x10)['toString'](_0x1459a5[_0x16c194(0x160)]),_0x5cccd8=new URL(_0x5ca4fe[_0x16c194(0x142)]);_0x5cccd8['searchParams'][_0x16c194(0x146)]('response_type',_0x16c194(0x136)),_0x5cccd8['searchParams'][_0x16c194(0x146)]('client_id',_0xcb4f87),_0x5cccd8[_0x16c194(0x17b)][_0x16c194(0x146)](_0x1459a5['ioVaL'],'http://localhost:'+CALLBACK_PORT+_0x16c194(0x153)),_0x5cccd8[_0x16c194(0x17b)][_0x16c194(0x146)](_0x1459a5['smcrf'],_0x1eff34),_0x5cccd8[_0x16c194(0x17b)]['set']('code_challenge_method','S256'),_0x5cccd8['searchParams'][_0x16c194(0x146)]('state',_0x26998b);_0x4120e0['resource']&&_0x5cccd8[_0x16c194(0x17b)]['set'](_0x16c194(0x1aa),_0x4120e0[_0x16c194(0x1aa)]);console['log'](_0x1459a5['stZrw']),console[_0x16c194(0x19b)](_0x16c194(0x1bd)+_0x5cccd8[_0x16c194(0x1a0)]()+'\x0a'),await _0x1459a5[_0x16c194(0x197)](openBrowser,_0x5cccd8['toString']());const _0x503a74=await _0x1459a5['OIGvl'](waitForCallback,_0x26998b);process[_0x16c194(0x156)][_0x16c194(0x135)](_0x16c194(0x1b3));const _0x26155c=new URLSearchParams({'grant_type':'authorization_code','code':_0x503a74,'redirect_uri':_0x16c194(0x139)+CALLBACK_PORT+'/callback','client_id':_0xcb4f87,'code_verifier':_0x3f68a0});_0x387f0d&&_0x26155c['set'](_0x1459a5['uitAE'],_0x387f0d);_0x4120e0['resource']&&_0x26155c['set'](_0x1459a5[_0x16c194(0x170)],_0x4120e0[_0x16c194(0x1aa)]);const _0x4619aa=await fetch(_0x5ca4fe['token_endpoint'],{'method':_0x16c194(0x155),'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0x26155c});if(!_0x4619aa['ok']){const _0x50c7ab=await _0x4619aa['text']();throw new Error(_0x16c194(0x163)+_0x50c7ab);}const _0x2fb2b0=await _0x4619aa['json']();return console[_0x16c194(0x19b)](_0x1459a5[_0x16c194(0x17c)]),await saveCachedToken(_0x2fb2b0['access_token'],_0x2fb2b0[_0x16c194(0x1a7)],_0x2fb2b0['expires_in']),_0x2fb2b0['access_token'];}async function callGetCliToken(_0x37c3aa,_0x3804c5){const _0x20bbc9=_0xd0a8a1,_0x5e30db={'fQSKR':function(_0x4a0386,_0x2f5abe,_0xf1384d){return _0x4a0386(_0x2f5abe,_0xf1384d);},'RYkTB':_0x20bbc9(0x155),'WvlTO':function(_0x5e8280,_0x45a645){return _0x5e8280(_0x45a645);},'eiEto':'application/json,\x20text/event-stream','kiYRa':'Initializing\x20MCP\x20session...','bQuDv':function(_0x1ae864,_0x501096){return _0x1ae864(_0x501096);},'IJgBO':'ranger-cli','KXueE':_0x20bbc9(0x14e),'eWiSG':'tools/call','oTSxJ':'\x20done','qbRZZ':function(_0x482e5c,_0x301079){return _0x482e5c(_0x301079);},'tlDpp':function(_0x52c8df){return _0x52c8df();},'UrtSX':_0x20bbc9(0x17e),'ibPnX':_0x20bbc9(0x13c),'TeXWX':function(_0xebd5bd,_0x540141,_0x10c220,_0x2bbfd6){return _0xebd5bd(_0x540141,_0x10c220,_0x2bbfd6);},'WRZAj':function(_0x416aa6,_0x175c59,_0x18151b,_0x1185cb){return _0x416aa6(_0x175c59,_0x18151b,_0x1185cb);}},_0x48098d={'Content-Type':'application/json','Accept':_0x5e30db['eiEto']};_0x3804c5&&(_0x48098d[_0x20bbc9(0x1b4)]=_0x20bbc9(0x150)+_0x3804c5);const _0x1479cd=async _0x3ac559=>{const _0x2abbff=_0x20bbc9,_0x3ccc90=await _0x5e30db[_0x2abbff(0x169)](fetch,_0x37c3aa,{'method':_0x5e30db['RYkTB'],'headers':_0x48098d,'body':JSON[_0x2abbff(0x1a8)](_0x3ac559)});if(!_0x3ccc90['ok']){const _0x33aa78=await _0x3ccc90[_0x2abbff(0x16a)]();throw new Error(_0x2abbff(0x1bc)+_0x3ccc90['status']+':\x20'+_0x33aa78);}return _0x5e30db[_0x2abbff(0x167)](parseResponse,_0x3ccc90);};process['stdout'][_0x20bbc9(0x135)](_0x5e30db[_0x20bbc9(0x148)]);const _0x3414dd=await _0x5e30db['bQuDv'](_0x1479cd,{'jsonrpc':_0x20bbc9(0x14e),'id':0x1,'method':_0x20bbc9(0x180),'params':{'protocolVersion':_0x20bbc9(0x168),'capabilities':{},'clientInfo':{'name':_0x5e30db['IJgBO'],'version':'1.0.0'}}});if(_0x3414dd[_0x20bbc9(0x183)])throw new Error('MCP\x20initialize\x20failed:\x20'+(_0x3414dd['error'][_0x20bbc9(0x165)]??JSON[_0x20bbc9(0x1a8)](_0x3414dd['error'])));console['log']('\x20done'),await fetch(_0x37c3aa,{'method':_0x20bbc9(0x155),'headers':_0x48098d,'body':JSON[_0x20bbc9(0x1a8)]({'jsonrpc':_0x5e30db[_0x20bbc9(0x162)],'method':'notifications/initialized'})})[_0x20bbc9(0x18d)](_0x5db2af=>_0x5db2af['text']()),process[_0x20bbc9(0x156)][_0x20bbc9(0x135)](_0x20bbc9(0x1c2));const _0x511f1b=await _0x1479cd({'jsonrpc':_0x5e30db['KXueE'],'id':0x2,'method':_0x5e30db['eWiSG'],'params':{'name':_0x20bbc9(0x133),'arguments':{}}});if(_0x511f1b[_0x20bbc9(0x183)])throw new Error('get_cli_token\x20failed:\x20'+(_0x511f1b['error'][_0x20bbc9(0x165)]??JSON[_0x20bbc9(0x1a8)](_0x511f1b['error'])));console['log'](_0x5e30db['oTSxJ']);const _0x2ace7c=_0x5e30db['qbRZZ'](extractToken,_0x511f1b['result']);if(!_0x2ace7c){console[_0x20bbc9(0x183)](_0x20bbc9(0x13b)),console[_0x20bbc9(0x183)](JSON[_0x20bbc9(0x1a8)](_0x511f1b[_0x20bbc9(0x19c)],null,0x2));throw new Error('Could\x20not\x20extract\x20token\x20from\x20MCP\x20response');}const _0x4e6fb5=join(_0x5e30db['tlDpp'](homedir),_0x5e30db[_0x20bbc9(0x1a2)]),_0x4db7a3=_0x5e30db[_0x20bbc9(0x169)](join,_0x4e6fb5,_0x5e30db['ibPnX']);await mkdir(_0x4e6fb5,{'recursive':!![]}),await _0x5e30db[_0x20bbc9(0x164)](writeFile,_0x4db7a3,_0x2ace7c,{'mode':0x180}),await _0x5e30db[_0x20bbc9(0x154)](writeFile,_0x5e30db[_0x20bbc9(0x169)](join,_0x4e6fb5,_0x20bbc9(0x17d)),_0x37c3aa,{'mode':0x180}),console[_0x20bbc9(0x19b)]('\x0aToken\x20written\x20to\x20'+_0x4db7a3),console[_0x20bbc9(0x19b)](_0x20bbc9(0x13a));}async function fetchAuthServerMetadata(_0x1b7618){const _0x4b9326=_0xd0a8a1,_0x18b2d8=_0x1b7618+_0x4b9326(0x145),_0x9f121d=await fetch(_0x18b2d8);if(!_0x9f121d['ok'])throw new Error(_0x4b9326(0x18a)+_0x18b2d8+':\x20'+_0x9f121d['status']);return _0x9f121d['json']();}function waitForCallback(_0x54ef91){const _0x55485b=_0xd0a8a1,_0x26aeab={'adzir':function(_0x3ede77){return _0x3ede77();},'cRuOs':_0x55485b(0x1c0),'IjYGJ':function(_0x2e4629,_0x5bf376){return _0x2e4629!==_0x5bf376;},'iJaGi':_0x55485b(0x153),'ZSvmD':_0x55485b(0x1a9),'lCORJ':'error_description','zFXWh':function(_0x8f4b93,_0x12d10f){return _0x8f4b93(_0x12d10f);},'LZcVD':'text/html','cnWaH':'<html><body><h2>Invalid\x20callback</h2><p>Missing\x20code\x20or\x20state\x20mismatch.</p></body></html>','wEJmP':'<html><body><h2>Authenticated!</h2><p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p></body></html>','KUQpU':function(_0x427e33,_0x512233){return _0x427e33(_0x512233);},'uxCXz':function(_0x9306f2){return _0x9306f2();},'nDaqG':function(_0x4213bb,_0x1422d2,_0x58b49e){return _0x4213bb(_0x1422d2,_0x58b49e);},'ckywc':function(_0xd16d2b,_0x1bd0ab){return _0xd16d2b(_0x1bd0ab);}};return new Promise((_0x4e2ef4,_0x393385)=>{const _0x33fce9=_0x55485b,_0x15affc=()=>{const _0x5a65dd=_0x431c;_0x25ac14['closeAllConnections'](),_0x25ac14[_0x5a65dd(0x199)]();},_0x1472ae=_0x26aeab['nDaqG'](setTimeout,()=>{const _0x229df5=_0x431c;_0x26aeab[_0x229df5(0x1ba)](_0x15affc),_0x393385(new OAuthTimeoutError(_0x26aeab['cRuOs']));},0x1d4c0),_0x25ac14=_0x26aeab['ckywc'](createServer,(_0x24d441,_0x6873e4)=>{const _0x1088e0=_0x431c,_0x406ff4=new URL(_0x24d441[_0x1088e0(0x1b9)]??'/','http://localhost:'+CALLBACK_PORT);if(_0x26aeab[_0x1088e0(0x196)](_0x406ff4[_0x1088e0(0x15c)],_0x26aeab[_0x1088e0(0x1a4)])){_0x6873e4['writeHead'](0x194),_0x6873e4[_0x1088e0(0x1ab)]('Not\x20found');return;}const _0x4647e0=_0x406ff4['searchParams']['get'](_0x1088e0(0x136)),_0x447b40=_0x406ff4['searchParams'][_0x1088e0(0x185)](_0x26aeab[_0x1088e0(0x190)]),_0x1f7e8b=_0x406ff4[_0x1088e0(0x17b)][_0x1088e0(0x185)]('error');if(_0x1f7e8b){const _0x3504e1=_0x406ff4[_0x1088e0(0x17b)]['get'](_0x26aeab['lCORJ'])??_0x1f7e8b;_0x6873e4[_0x1088e0(0x15d)](0xc8,{'Content-Type':_0x1088e0(0x187)}),_0x6873e4['end']('<html><body><h2>Authentication\x20failed</h2><p>'+_0x3504e1+_0x1088e0(0x1b1)),clearTimeout(_0x1472ae),_0x15affc(),_0x26aeab[_0x1088e0(0x14d)](_0x393385,new Error(_0x1088e0(0x19f)+_0x3504e1));return;}if(!_0x4647e0||_0x447b40!==_0x54ef91){_0x6873e4[_0x1088e0(0x15d)](0x190,{'Content-Type':_0x26aeab[_0x1088e0(0x13e)]}),_0x6873e4[_0x1088e0(0x1ab)](_0x26aeab[_0x1088e0(0x1c3)]);return;}_0x6873e4['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x6873e4['end'](_0x26aeab[_0x1088e0(0x152)]),_0x26aeab[_0x1088e0(0x18b)](clearTimeout,_0x1472ae),_0x26aeab['uxCXz'](_0x15affc),_0x4e2ef4(_0x4647e0);});_0x25ac14[_0x33fce9(0x178)](CALLBACK_PORT,_0x33fce9(0x1b8));});}async function openBrowser(_0x3111b3){const _0x57ed27=_0xd0a8a1,_0x1a2198={'rxOpH':_0x57ed27(0x159),'rfRVE':_0x57ed27(0x19a)},_0x3f51ce=process[_0x57ed27(0x144)]===_0x1a2198['rxOpH']?_0x1a2198['rfRVE']:process[_0x57ed27(0x144)]===_0x57ed27(0x13d)?'start':'xdg-open';exec(_0x3f51ce+'\x20\x22'+_0x3111b3+'\x22');}let currentOrigin='';async function loadCachedToken(){const _0x242820=_0xd0a8a1,_0x59b504={'xtnxa':function(_0x3d3c0d,_0x11e3d1,_0x39cfd9){return _0x3d3c0d(_0x11e3d1,_0x39cfd9);}};try{const _0x45c380=JSON['parse'](await _0x59b504[_0x242820(0x16f)](readFile,TOKEN_CACHE_PATH,_0x242820(0x157)));if(_0x45c380[_0x242820(0x19e)]&&_0x45c380['origin']!==currentOrigin)return null;if(_0x45c380['expiresAt']&&Date[_0x242820(0x1b7)]()>_0x45c380['expiresAt'])return null;return _0x45c380[_0x242820(0x166)]??null;}catch{return null;}}async function saveCachedToken(_0x4a2d0d,_0x1fef74,_0x498e6f){const _0x23a4c8=_0xd0a8a1,_0x14257f={'AbwTe':function(_0x13572a,_0xfa5798){return _0x13572a*_0xfa5798;},'ygQSF':function(_0x396a73,_0x4cfd7d,_0x48cb30){return _0x396a73(_0x4cfd7d,_0x48cb30);},'HEOdj':function(_0x12276f){return _0x12276f();}},_0x589f80=await loadCachedData(),_0x4f4fc7={..._0x589f80,'origin':currentOrigin,'accessToken':_0x4a2d0d,'refreshToken':_0x1fef74??_0x589f80?.['refreshToken'],'expiresAt':_0x498e6f?Date['now']()+_0x14257f['AbwTe'](_0x498e6f,0x3e8):undefined};await mkdir(_0x14257f[_0x23a4c8(0x176)](join,_0x14257f['HEOdj'](homedir),'.ranger'),{'recursive':!![]}),await writeFile(TOKEN_CACHE_PATH,JSON[_0x23a4c8(0x1a8)](_0x4f4fc7),{'mode':0x180});}async function loadCachedClient(){const _0xcccd7e=_0xd0a8a1,_0x2e29fd={'tNlnW':function(_0x20f141){return _0x20f141();}},_0x282cc8=await _0x2e29fd['tNlnW'](loadCachedData);if(_0x282cc8?.[_0xcccd7e(0x19e)]&&_0x282cc8[_0xcccd7e(0x19e)]!==currentOrigin)return null;return _0x282cc8?.['clientId']?{'clientId':_0x282cc8['clientId'],'clientSecret':_0x282cc8['clientSecret']}:null;}async function clearCachedClient(){const _0x1f9a09=_0xd0a8a1,_0x436e45=await loadCachedData();if(!_0x436e45)return;const {clientId:_0x5cf1a6,clientSecret:_0xec0e55,..._0x132d0e}=_0x436e45;await writeFile(TOKEN_CACHE_PATH,JSON[_0x1f9a09(0x1a8)](_0x132d0e),{'mode':0x180});}async function saveCachedClient(_0x303a32,_0x1ede85){const _0x9a2bbe=_0xd0a8a1,_0x38fd69={'pXnHG':function(_0x2b79ac,_0x17bf5f,_0x4f4d4f){return _0x2b79ac(_0x17bf5f,_0x4f4d4f);},'Qtfsm':function(_0x1b33e8,_0x43a7ee,_0x5ee81e,_0x3baae3){return _0x1b33e8(_0x43a7ee,_0x5ee81e,_0x3baae3);}},_0x4fdb1d=await loadCachedData(),_0x53905e={..._0x4fdb1d,'origin':currentOrigin,'accessToken':_0x4fdb1d?.[_0x9a2bbe(0x166)]??'','clientId':_0x303a32,'clientSecret':_0x1ede85};await mkdir(_0x38fd69[_0x9a2bbe(0x15b)](join,homedir(),'.ranger'),{'recursive':!![]}),await _0x38fd69[_0x9a2bbe(0x1b5)](writeFile,TOKEN_CACHE_PATH,JSON[_0x9a2bbe(0x1a8)](_0x53905e),{'mode':0x180});}function _0x3fe1(){const _0x5c5bdd=['Authorization','Qtfsm','gIcwe','now','127.0.0.1','url','adzir','61116JlydPm','HTTP\x20','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x0a','replace','ePfzi','OAuth\x20callback\x20timed\x20out\x20after\x202\x20minutes','\x0aCached\x20OAuth\x20client\x20may\x20be\x20stale\x20—\x20clearing\x20and\x20retrying...\x0a','Requesting\x20CLI\x20token...','cnWaH','redirect_uri','proxied','type','get_cli_token','sha256','write','code','9114064zaTcuO','json','http://localhost:','Run\x20`ranger\x20status`\x20to\x20verify\x20authentication.\x0a','\x0aUnexpected\x20response\x20structure:','refresh.txt','win32','LZcVD','\x20done','28127034Gopaec','registration_endpoint','authorization_endpoint','141hIbHYg','platform','/.well-known/oauth-authorization-server','set','none','kiYRa','IjIOx','parse','682782MUJrxj','qUJTe','zFXWh','2.0','Ranger\x20CLI','Bearer\x20','update','wEJmP','/callback','WRZAj','POST','stdout','utf-8','hMbFJ','darwin','gmxsb','pXnHG','pathname','writeHead','No\x20JSON-RPC\x20response\x20found\x20in\x20SSE\x20stream','RYjCd','FzFYH','application/json','KXueE','Token\x20exchange\x20failed:\x20','TeXWX','message','accessToken','WvlTO','2025-03-26','fQSKR','text','content','isTTY','mcp-oauth-tokens.json','name','xtnxa','TPNXU','21uyumAc','HXtpy','Registering\x20OAuth\x20client...','token','authorization_code','ygQSF','content-type','listen','base64url','data:','searchParams','nwPDw','auth-origin.txt','.ranger','trim','initialize','ranger-cli','text/event-stream','error','includes','get','MCP\x20server\x20returned\x20HTTP\x20','text/html','zXBoW','headers','Could\x20not\x20fetch\x20auth\x20server\x20metadata\x20from\x20','KUQpU','265895jxGqKy','then','AHgOO','status','ZSvmD','isError','length','YGJlg','application/json,\x20text/event-stream','GryWS','IjYGJ','ZjSWv','PTWOS','close','open','log','result','ZZtbR','origin','OAuth\x20error:\x20','toString','hex','UrtSX','jcicL','iJaGi','Client\x20registration\x20failed:\x20','clientId','refresh_token','stringify','state','resource','end','\x0aConnecting\x20to\x20MCP\x20auth\x20server:\x20','1325716cBkuai','bQnyP','1.0.0','5823945TuuJLh','</p><p>You\x20can\x20close\x20this\x20window.</p></body></html>','authorization_servers','Exchanging\x20authorization\x20code...'];_0x3fe1=function(){return _0x5c5bdd;};return _0x3fe1();}async function loadCachedData(){const _0x3d7618=_0xd0a8a1;try{return JSON[_0x3d7618(0x14a)](await readFile(TOKEN_CACHE_PATH,_0x3d7618(0x157)));}catch{return null;}}async function parseResponse(_0x2ac7af){const _0x439f68=_0xd0a8a1,_0x226a03={'DAPnd':_0x439f68(0x177),'PQxym':_0x439f68(0x182),'HXtpy':function(_0x1cc9d8,_0x120389){return _0x1cc9d8!==_0x120389;},'gmxsb':_0x439f68(0x15e)},_0x443ce9=_0x2ac7af[_0x439f68(0x189)][_0x439f68(0x185)](_0x226a03['DAPnd'])??'';if(_0x443ce9[_0x439f68(0x184)](_0x226a03['PQxym'])){const _0x2e4f82=await _0x2ac7af[_0x439f68(0x16a)]();for(const _0x3e25d5 of _0x2e4f82['split']('\x0a')){const _0x2008fb=_0x3e25d5['trim']();if(_0x2008fb['startsWith'](_0x439f68(0x17a))){const _0x6a050d=_0x2008fb['slice'](_0x439f68(0x17a)[_0x439f68(0x192)])[_0x439f68(0x17f)]();if(!_0x6a050d)continue;try{const _0x46f6a9=JSON['parse'](_0x6a050d);if(_0x226a03[_0x439f68(0x172)](_0x46f6a9['id'],undefined)||_0x46f6a9['error'])return _0x46f6a9;}catch{}}}throw new Error(_0x226a03[_0x439f68(0x15a)]);}return _0x2ac7af[_0x439f68(0x138)]();}function extractToken(_0x3b3944){const _0xcd987c=_0xd0a8a1,_0x211655={'hwFlg':function(_0x262d05,_0x3def84){return _0x262d05===_0x3def84;},'WzbGD':function(_0x4db735,_0x4579fd){return _0x4db735===_0x4579fd;},'AHgOO':_0xcd987c(0x16a)};if(!_0x3b3944)return null;const _0x5dd278=_0x3b3944['structuredContent'];if(_0x5dd278?.['token']&&_0x211655['hwFlg'](typeof _0x5dd278['token'],'string'))return _0x5dd278['token'];if(_0x3b3944[_0xcd987c(0x191)]){const _0x1c6ab6=_0x3b3944[_0xcd987c(0x16b)];throw new Error('Server\x20returned\x20error:\x20'+(_0x1c6ab6?.[0x0]?.['text']??'Unknown\x20error'));}const _0x23058f=_0x3b3944['content'];if(_0x23058f)for(const _0x2dcea7 of _0x23058f){if(_0x211655['WzbGD'](_0x2dcea7[_0xcd987c(0x1c6)],_0x211655[_0xcd987c(0x18e)])&&_0x2dcea7[_0xcd987c(0x16a)]){try{const _0x269b9b=JSON['parse'](_0x2dcea7['text']);if(typeof _0x269b9b?.['token']==='string')return _0x269b9b[_0xcd987c(0x174)];}catch{}const _0x524fc8=_0x2dcea7['text']['match'](/(rngr_[A-Za-z0-9_-]+)/);if(_0x524fc8)return _0x524fc8[0x1];}}return null;}
@@ -1 +1 @@
1
- (function(_0x5a71b8,_0x502e3b){var _0x2febe7=_0x7120,_0x418972=_0x5a71b8();while(!![]){try{var _0x19946b=parseInt(_0x2febe7(0x145))/0x1*(-parseInt(_0x2febe7(0x146))/0x2)+-parseInt(_0x2febe7(0x147))/0x3*(parseInt(_0x2febe7(0x13c))/0x4)+-parseInt(_0x2febe7(0x142))/0x5+parseInt(_0x2febe7(0x141))/0x6+parseInt(_0x2febe7(0x143))/0x7+-parseInt(_0x2febe7(0x13d))/0x8+-parseInt(_0x2febe7(0x149))/0x9*(-parseInt(_0x2febe7(0x13f))/0xa);if(_0x19946b===_0x502e3b)break;else _0x418972['push'](_0x418972['shift']());}catch(_0x46b279){_0x418972['push'](_0x418972['shift']());}}}(_0x58a2,0x2d33d));function _0x7120(_0x415180,_0x368b54){_0x415180=_0x415180-0x13c;var _0x58a258=_0x58a2();var _0x7120fe=_0x58a258[_0x415180];return _0x7120fe;}export async function migrateProfile(_0x20dece,_0x15c3f8){var _0x34d594=_0x7120,_0x2113cb={'iRcJC':function(_0x191c82,_0x42f1ad){return _0x191c82+_0x42f1ad;},'EFHvb':'ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','MwAoC':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','gXupr':'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a','acRHS':'fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.'};console[_0x34d594(0x14a)](_0x2113cb[_0x34d594(0x13e)](_0x2113cb[_0x34d594(0x13e)](_0x2113cb[_0x34d594(0x140)]+'\x0a'+_0x34d594(0x144)+_0x2113cb['MwAoC']+'\x0a',_0x34d594(0x148))+'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a'+'\x0a',_0x2113cb['gXupr'])+_0x2113cb['acRHS']),process['exit'](0x1);}function _0x58a2(){var _0x4d6e54=['To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','20yHLWzs','9862jAopkZ','12gquAxc','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','3597786IUcqdM','error','95156MviuOW','551200HJJaTN','iRcJC','10fccTWo','EFHvb','1558062CFAhjD','1463520wbAtYx','567686ufGzjM'];_0x58a2=function(){return _0x4d6e54;};return _0x58a2();}
1
+ (function(_0x4f6a0e,_0x3a3060){var _0x4e755d=_0x1caf,_0x2e1530=_0x4f6a0e();while(!![]){try{var _0x33eae6=parseInt(_0x4e755d(0x168))/0x1*(-parseInt(_0x4e755d(0x167))/0x2)+parseInt(_0x4e755d(0x16e))/0x3*(parseInt(_0x4e755d(0x16a))/0x4)+parseInt(_0x4e755d(0x170))/0x5+parseInt(_0x4e755d(0x173))/0x6*(parseInt(_0x4e755d(0x16d))/0x7)+-parseInt(_0x4e755d(0x176))/0x8*(-parseInt(_0x4e755d(0x165))/0x9)+parseInt(_0x4e755d(0x172))/0xa+-parseInt(_0x4e755d(0x16b))/0xb;if(_0x33eae6===_0x3a3060)break;else _0x2e1530['push'](_0x2e1530['shift']());}catch(_0x2677cf){_0x2e1530['push'](_0x2e1530['shift']());}}}(_0x51a8,0xb73b3));export async function migrateProfile(_0x91f9eb,_0x4f8076){var _0x3bec0b=_0x1caf,_0x3cc3d5={'xfyyy':function(_0x44b1b8,_0x24305f){return _0x44b1b8+_0x24305f;},'eWZrs':_0x3bec0b(0x171),'lXcXE':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','CWNgQ':_0x3bec0b(0x174),'OETQm':_0x3bec0b(0x16c)};console['error'](_0x3cc3d5[_0x3bec0b(0x169)](_0x3cc3d5[_0x3bec0b(0x16f)]+'\x0a',_0x3bec0b(0x166))+_0x3cc3d5['lXcXE']+'\x0a'+_0x3cc3d5['CWNgQ']+'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a'+'\x0a'+'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'+_0x3cc3d5['OETQm']),process[_0x3bec0b(0x175)](0x1);}function _0x1caf(_0xcce018,_0x42dac2){_0xcce018=_0xcce018-0x165;var _0x51a817=_0x51a8();var _0x1caf74=_0x51a817[_0xcce018];return _0x1caf74;}function _0x51a8(){var _0x5db77f=['eWZrs','1759860sWSDhT','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a','2788310TllyvA','1418988ZmtdVG','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','exit','160KVyDsO','580338AkicLc','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','2669686yIfiVB','1scWYwY','xfyyy','1657996fuLuWi','17067358gVpYzm','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','14aNYNBa','9PpJdsm'];_0x51a8=function(){return _0x5db77f;};return _0x51a8();}
@@ -1 +1 @@
1
- (function(_0x19dd09,_0x2de59c){const _0x5c0c14=_0x2735,_0x439766=_0x19dd09();while(!![]){try{const _0x3ab31e=-parseInt(_0x5c0c14(0xcf))/0x1+parseInt(_0x5c0c14(0xa5))/0x2*(-parseInt(_0x5c0c14(0xd0))/0x3)+-parseInt(_0x5c0c14(0xd6))/0x4+-parseInt(_0x5c0c14(0xd1))/0x5+-parseInt(_0x5c0c14(0xc7))/0x6*(parseInt(_0x5c0c14(0xa7))/0x7)+-parseInt(_0x5c0c14(0xd3))/0x8*(parseInt(_0x5c0c14(0xc1))/0x9)+parseInt(_0x5c0c14(0xaf))/0xa;if(_0x3ab31e===_0x2de59c)break;else _0x439766['push'](_0x439766['shift']());}catch(_0x5a47de){_0x439766['push'](_0x439766['shift']());}}}(_0x3018,0x26f10));import{join}from'path';function _0x2735(_0x6c1d5b,_0x5651a2){_0x6c1d5b=_0x6c1d5b-0xa2;const _0x30188e=_0x3018();let _0x273525=_0x30188e[_0x6c1d5b];return _0x273525;}import{existsSync}from'fs';import _0x171137 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x310cc8){const _0x203d51=_0x2735,_0x2bcf10={'MtYcO':function(_0x2f7169,_0x632654){return _0x2f7169(_0x632654);},'YBBkR':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','viGPW':_0x203d51(0xca),'vZack':_0x203d51(0xc5),'JTbOH':_0x203d51(0xb0),'kkChY':_0x203d51(0xb8),'fOJGB':'User\x20(available\x20in\x20all\x20your\x20projects)','wYHGC':'Project\x20(shared\x20with\x20team\x20via\x20git)','XTizp':_0x203d51(0xcc),'sXdRj':'user','bKvMU':_0x203d51(0xc0),'gkvTz':'plugin','uvgtN':'marketplace','HrEqW':_0x203d51(0xb7),'TBUEU':'ranger-testing/trailhead','IPRgB':'❌\x20Failed\x20to\x20add\x20marketplace:','zYbSk':'\x0aYou\x20can\x20install\x20manually\x20with:','uPcYq':'ranger@trailhead','IYeSs':'--scope','zPoGW':function(_0x126336){return _0x126336();},'hlOoK':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','KkJMH':'enable','FVMJv':function(_0x3a5ed1,_0x297e71,_0x1742d5){return _0x3a5ed1(_0x297e71,_0x1742d5);},'bJUEW':function(_0x5d4c8a,_0x5da581){return _0x5d4c8a===_0x5da581;},'HpgNH':_0x203d51(0xbb)},_0x324a20=await _0x2bcf10[_0x203d51(0xbf)](isPluginInstalled,_0x203d51(0xae));if(_0x324a20)return console[_0x203d51(0xcb)](_0x2bcf10[_0x203d51(0xc2)]),![];const _0x179024=_0x2bcf10['MtYcO'](existsSync,join(getProjectRoot(),_0x2bcf10['viGPW']));let _0x2892e2;if(_0x310cc8)_0x2892e2=_0x310cc8;else{if(_0x179024)_0x2892e2='project';else{console['log'](_0x2bcf10['vZack']);const _0x22719e=await _0x171137[_0x203d51(0xa4)]([{'type':'list','name':_0x2bcf10['JTbOH'],'message':_0x2bcf10[_0x203d51(0xaa)],'choices':[{'name':_0x2bcf10['fOJGB'],'value':'user'},{'name':_0x2bcf10['wYHGC'],'value':_0x2bcf10['XTizp']}],'default':_0x2bcf10[_0x203d51(0xbd)]}]);_0x2892e2=_0x22719e['pluginScope'];}}console[_0x203d51(0xcb)](_0x203d51(0xba)+_0x2892e2+'\x20level)...\x0a');const _0x10d8b7=await _0x2bcf10['MtYcO'](isMarketplaceAdded,_0x2bcf10[_0x203d51(0xa2)]);let _0x4d5a83=_0x10d8b7;if(_0x10d8b7)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x524f0b=await runClaudeCommand([_0x2bcf10['gkvTz'],_0x2bcf10[_0x203d51(0xbe)],_0x2bcf10['HrEqW'],_0x2bcf10[_0x203d51(0xc3)]]);!_0x524f0b['success']?(console['error'](_0x2bcf10['IPRgB'],_0x524f0b[_0x203d51(0xa6)]),console[_0x203d51(0xcb)](_0x2bcf10[_0x203d51(0xb9)]),console[_0x203d51(0xcb)](_0x203d51(0xac)),console[_0x203d51(0xcb)](_0x203d51(0xbc)+_0x2892e2)):_0x4d5a83=!![];}if(_0x4d5a83){const _0xef6eb3=await runClaudeCommand([_0x2bcf10['gkvTz'],_0x203d51(0xc9),_0x2bcf10[_0x203d51(0xb4)],_0x2bcf10[_0x203d51(0xd5)],_0x2892e2],{'cwd':_0x2892e2===_0x203d51(0xcc)?_0x2bcf10[_0x203d51(0xa3)](getProjectRoot):undefined});if(!_0xef6eb3['success'])console[_0x203d51(0xa6)](_0x203d51(0xce),_0xef6eb3['error']),console['log'](_0x203d51(0xc6)),console['log'](_0x203d51(0xbc)+_0x2892e2);else{console[_0x203d51(0xcb)](_0x2bcf10['hlOoK']);const _0x4a6a77=[_0x203d51(0xb5),_0x2bcf10['KkJMH'],_0x2bcf10[_0x203d51(0xb4)]];_0x2892e2===_0x2bcf10[_0x203d51(0xc4)]&&_0x4a6a77[_0x203d51(0xc8)](_0x2bcf10[_0x203d51(0xd5)],'project');const _0x5cbd67=await _0x2bcf10['FVMJv'](runClaudeCommand,_0x4a6a77,{'captureOutput':!![],'cwd':_0x2bcf10['bJUEW'](_0x2892e2,_0x2bcf10['XTizp'])?getProjectRoot():undefined}),_0x4e4755=_0x5cbd67[_0x203d51(0xb6)]?.[_0x203d51(0xb3)]('already\x20enabled');!_0x5cbd67[_0x203d51(0xb1)]&&!_0x4e4755?console[_0x203d51(0xa6)](_0x203d51(0xcd),_0x5cbd67['error']):console[_0x203d51(0xcb)](_0x2bcf10['HpgNH']);}}return!![];}function _0x3018(){const _0x413aba=['confirm','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','ajEkH','ranger@trailhead','12023390jUQtBK','pluginScope','success','SKILL.md','includes','uPcYq','plugin','output','add','Where\x20should\x20the\x20plugin\x20be\x20installed?','zYbSk','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','✓\x20Claude\x20Code\x20plugin\x20enabled','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','sXdRj','uvgtN','MtYcO','trailhead','9sNCaje','YBBkR','TBUEU','XTizp','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','\x0aYou\x20can\x20install\x20manually\x20with:','6sJtetI','push','install','.claude','log','project','⚠\x20Failed\x20to\x20enable\x20plugin:','❌\x20Failed\x20to\x20install\x20plugin:','91176Hxngir','3ijyMpn','418140VuKTAw','wantsSkillup','754104DYRVRz','GoUTA','IYeSs','1269188ejAHyl','bKvMU','zPoGW','prompt','520794UtRYsd','error','1372518GuBlec','ranger','vsMXl','kkChY'];_0x3018=function(){return _0x413aba;};return _0x3018();}export async function ensureClaudeSkills(_0x5e0334){const _0x22e784=_0x2735,_0x3023ad={'ajEkH':function(_0x1c4e0f,_0x1da4a9){return _0x1c4e0f(_0x1da4a9);},'ZUbsW':'ranger','asoMt':function(_0x28d71e,_0x5cb07c,_0x554ca0,_0x52b668){return _0x28d71e(_0x5cb07c,_0x554ca0,_0x52b668);},'vsMXl':'SKILL.md','zVQBm':'✓\x20Ranger\x20skills\x20already\x20installed','ppkrj':function(_0x2b5a46,_0x18d54a,_0x171485){return _0x2b5a46(_0x18d54a,_0x171485);},'FAojJ':function(_0x2431e3){return _0x2431e3();},'GoUTA':'project','aYqKC':_0x22e784(0xd2)},_0x530593=_0x3023ad[_0x22e784(0xad)](existsSync,join(getSkillsDir('user'),_0x3023ad['ZUbsW'],_0x22e784(0xb2))),_0x9a174f=existsSync(_0x3023ad['asoMt'](join,getSkillsDir(_0x22e784(0xcc)),_0x22e784(0xa8),_0x3023ad[_0x22e784(0xa9)]));if(_0x530593||_0x9a174f)return console[_0x22e784(0xcb)](_0x3023ad['zVQBm']),![];const _0x275d86=existsSync(_0x3023ad['ppkrj'](join,_0x3023ad['FAojJ'](getProjectRoot),'.claude'));let _0x1a8b9d=!![];if(_0x5e0334)await skillup({'autoInstall':_0x5e0334,'suppressUsage':!![]});else{if(_0x275d86)await skillup({'autoInstall':_0x3023ad[_0x22e784(0xd4)],'suppressUsage':!![]});else{const _0x1884cb=await _0x171137[_0x22e784(0xa4)]([{'type':_0x22e784(0xab),'name':_0x3023ad['aYqKC'],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x1a8b9d=_0x1884cb[_0x22e784(0xd2)],_0x1a8b9d&&await skillup({'suppressUsage':!![]});}}return _0x1a8b9d;}
1
+ (function(_0x5e341b,_0x537519){const _0x10ace7=_0x3cc4,_0x1ff666=_0x5e341b();while(!![]){try{const _0x5b26ca=parseInt(_0x10ace7(0xab))/0x1*(-parseInt(_0x10ace7(0xb1))/0x2)+parseInt(_0x10ace7(0xb3))/0x3*(-parseInt(_0x10ace7(0xaa))/0x4)+-parseInt(_0x10ace7(0xce))/0x5+parseInt(_0x10ace7(0xd2))/0x6+-parseInt(_0x10ace7(0xc5))/0x7*(-parseInt(_0x10ace7(0xb2))/0x8)+-parseInt(_0x10ace7(0xcd))/0x9+-parseInt(_0x10ace7(0xac))/0xa*(-parseInt(_0x10ace7(0xb9))/0xb);if(_0x5b26ca===_0x537519)break;else _0x1ff666['push'](_0x1ff666['shift']());}catch(_0x3bdd7d){_0x1ff666['push'](_0x1ff666['shift']());}}}(_0x28f4,0xec324));import{join}from'path';function _0x3cc4(_0x5d4a20,_0x39e78a){_0x5d4a20=_0x5d4a20-0xa0;const _0x28f4a2=_0x28f4();let _0x3cc4cc=_0x28f4a2[_0x5d4a20];return _0x3cc4cc;}function _0x28f4(){const _0x44880f=['pluginScope','error','11YNIwls','success','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','ranger@trailhead','qrJEH','eKGqP','WhSud','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','User\x20(available\x20in\x20all\x20your\x20projects)','wADFV','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','plugin','41412khLrKG','❌\x20Failed\x20to\x20install\x20plugin:','PnUJo','\x0aYou\x20can\x20install\x20manually\x20with:','qvYHr','vpXIR','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','user','10220130AJwKTn','626395QXkeCT','log','project','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','5007318dYMPeO','prompt','zVTaX','vDRxD','Project\x20(shared\x20with\x20team\x20via\x20git)','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','wantsSkillup','marketplace','kDSoC','FclCE','\x20level)...\x0a','Hlzxp','20iNOoLK','129910tUNZnW','11447420MuLFdS','trailhead','kKjSW','snRPh','output','2skVllP','632dxTZov','53064sdNQfz','⚠\x20Failed\x20to\x20enable\x20plugin:','LSKio','nCrNl'];_0x28f4=function(){return _0x44880f;};return _0x28f4();}import{existsSync}from'fs';import _0x11e256 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x2b00ec){const _0x552c2a=_0x3cc4,_0x288dd1={'qvYHr':function(_0x2d4aa3,_0x191fb6){return _0x2d4aa3(_0x191fb6);},'YtNKs':'ranger@trailhead','zVTaX':_0x552c2a(0xa3),'MAYyG':function(_0x277b37){return _0x277b37();},'WhSud':_0x552c2a(0xd0),'nCrNl':'list','WKCUR':'pluginScope','GRxSB':_0x552c2a(0xc1),'PnUJo':_0x552c2a(0xcc),'eKGqP':_0x552c2a(0xa2),'efpld':function(_0x25283e,_0x40d02b){return _0x25283e(_0x40d02b);},'ENMRj':_0x552c2a(0xad),'qrJEH':_0x552c2a(0xc4),'LSKio':'add','PrACB':'ranger-testing/trailhead','TunBR':'install','ENnbZ':_0x552c2a(0xc8),'kDSoC':_0x552c2a(0xcb),'vDRxD':function(_0x242930,_0x51f0c4){return _0x242930===_0x51f0c4;},'GpUTt':function(_0x5af9d5,_0x3ecc04,_0x19172b){return _0x5af9d5(_0x3ecc04,_0x19172b);},'snRPh':'already\x20enabled','LFeAJ':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x44bb75=await _0x288dd1['qvYHr'](isPluginInstalled,_0x288dd1['YtNKs']);if(_0x44bb75)return console[_0x552c2a(0xcf)](_0x288dd1[_0x552c2a(0xa0)]),![];const _0x1a7312=_0x288dd1[_0x552c2a(0xc9)](existsSync,join(_0x288dd1['MAYyG'](getProjectRoot),'.claude'));let _0x1ca6e4;if(_0x2b00ec)_0x1ca6e4=_0x2b00ec;else{if(_0x1a7312)_0x1ca6e4=_0x288dd1[_0x552c2a(0xbf)];else{console[_0x552c2a(0xcf)](_0x552c2a(0xc3));const _0x2137d2=await _0x11e256['prompt']([{'type':_0x288dd1[_0x552c2a(0xb6)],'name':_0x288dd1['WKCUR'],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x288dd1['GRxSB'],'value':_0x288dd1[_0x552c2a(0xc7)]},{'name':_0x288dd1[_0x552c2a(0xbe)],'value':'project'}],'default':'user'}]);_0x1ca6e4=_0x2137d2[_0x552c2a(0xb7)];}}console['log'](_0x552c2a(0xbb)+_0x1ca6e4+_0x552c2a(0xa8));const _0x5a94d7=await _0x288dd1['efpld'](isMarketplaceAdded,_0x288dd1['ENMRj']);let _0x2462c5=_0x5a94d7;if(_0x5a94d7)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x49dc76=await runClaudeCommand([_0x288dd1[_0x552c2a(0xbd)],_0x552c2a(0xa5),_0x288dd1[_0x552c2a(0xb5)],_0x288dd1['PrACB']]);!_0x49dc76[_0x552c2a(0xba)]?(console[_0x552c2a(0xb8)]('❌\x20Failed\x20to\x20add\x20marketplace:',_0x49dc76[_0x552c2a(0xb8)]),console[_0x552c2a(0xcf)](_0x552c2a(0xc8)),console['log'](_0x552c2a(0xc0)),console[_0x552c2a(0xcf)](_0x552c2a(0xd1)+_0x1ca6e4)):_0x2462c5=!![];}if(_0x2462c5){const _0x555f85=await runClaudeCommand([_0x288dd1[_0x552c2a(0xbd)],_0x288dd1['TunBR'],_0x288dd1['YtNKs'],'--scope',_0x1ca6e4],{'cwd':_0x1ca6e4===_0x288dd1[_0x552c2a(0xbf)]?getProjectRoot():undefined});if(!_0x555f85['success'])console['error'](_0x552c2a(0xc6),_0x555f85['error']),console['log'](_0x288dd1['ENnbZ']),console['log'](_0x552c2a(0xd1)+_0x1ca6e4);else{console['log'](_0x288dd1[_0x552c2a(0xa6)]);const _0x15087b=['plugin','enable',_0x552c2a(0xbc)];_0x288dd1['vDRxD'](_0x1ca6e4,_0x552c2a(0xd0))&&_0x15087b['push']('--scope',_0x288dd1['WhSud']);const _0x3fdec9=await _0x288dd1['GpUTt'](runClaudeCommand,_0x15087b,{'captureOutput':!![],'cwd':_0x288dd1[_0x552c2a(0xa1)](_0x1ca6e4,'project')?getProjectRoot():undefined}),_0x34956d=_0x3fdec9[_0x552c2a(0xb0)]?.['includes'](_0x288dd1[_0x552c2a(0xaf)]);!_0x3fdec9['success']&&!_0x34956d?console['error'](_0x552c2a(0xb4),_0x3fdec9[_0x552c2a(0xb8)]):console['log'](_0x288dd1['LFeAJ']);}}return!![];}export async function ensureClaudeSkills(_0x1481ac){const _0x22c15c=_0x3cc4,_0x2ff4dc={'BKQda':'user','FclCE':'SKILL.md','Hlzxp':function(_0x1e55ed,_0x102af9){return _0x1e55ed(_0x102af9);},'cDyAb':'ranger','eUVeB':function(_0x59d471,_0x2ad928){return _0x59d471||_0x2ad928;},'vpXIR':'✓\x20Ranger\x20skills\x20already\x20installed','kKjSW':function(_0x276767,_0x20ee59,_0x45839d){return _0x276767(_0x20ee59,_0x45839d);},'oJKzf':function(_0x1f6344){return _0x1f6344();},'WLDuU':'.claude','SFVrD':_0x22c15c(0xd0),'wADFV':'confirm','lYZvk':_0x22c15c(0xa4)},_0x2e4c6c=existsSync(join(getSkillsDir(_0x2ff4dc['BKQda']),'ranger',_0x2ff4dc[_0x22c15c(0xa7)])),_0x3eafdc=_0x2ff4dc['Hlzxp'](existsSync,join(getSkillsDir('project'),_0x2ff4dc['cDyAb'],'SKILL.md'));if(_0x2ff4dc['eUVeB'](_0x2e4c6c,_0x3eafdc))return console[_0x22c15c(0xcf)](_0x2ff4dc[_0x22c15c(0xca)]),![];const _0x1b7c61=existsSync(_0x2ff4dc[_0x22c15c(0xae)](join,_0x2ff4dc['oJKzf'](getProjectRoot),_0x2ff4dc['WLDuU']));let _0x21637e=!![];if(_0x1481ac)await _0x2ff4dc[_0x22c15c(0xa9)](skillup,{'autoInstall':_0x1481ac,'suppressUsage':!![]});else{if(_0x1b7c61)await skillup({'autoInstall':_0x2ff4dc['SFVrD'],'suppressUsage':!![]});else{const _0x4a1448=await _0x11e256[_0x22c15c(0xd3)]([{'type':_0x2ff4dc[_0x22c15c(0xc2)],'name':_0x2ff4dc['lYZvk'],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x21637e=_0x4a1448['wantsSkillup'],_0x21637e&&await skillup({'suppressUsage':!![]});}}return _0x21637e;}
@@ -1 +1 @@
1
- function _0x3423(_0x16611a,_0x4f93a3){_0x16611a=_0x16611a-0x1a4;const _0x19ba98=_0x19ba();let _0x3423b6=_0x19ba98[_0x16611a];return _0x3423b6;}function _0x19ba(){const _0x527fe3=['6wPbiFw','104302oRluLC','Project\x20(shared\x20with\x20team\x20via\x20git)','389618hcnzQi','40ygYhDe','pluginScope','9FBgoWZ','270262yWlKjD','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','project','1050126BoSmah','https://opencode.ai/config.json','plugin','154450fUpqpp','opencode.json','Failed\x20to\x20read\x20opencode.json','MsPvu','3262408yxVssP','290JictkE','isArray','KRwPt','list','\x0a📦\x20OpenCode\x20Plugin\x0a','User\x20(available\x20in\x20all\x20your\x20projects)','$schema','2119146AsHJBr','user'];_0x19ba=function(){return _0x527fe3;};return _0x19ba();}(function(_0x1f5c33,_0x13d8fb){const _0x1d7f83=_0x3423,_0x401eed=_0x1f5c33();while(!![]){try{const _0x5649b3=parseInt(_0x1d7f83(0x1a5))/0x1+parseInt(_0x1d7f83(0x1bc))/0x2*(-parseInt(_0x1d7f83(0x1b9))/0x3)+-parseInt(_0x1d7f83(0x1bd))/0x4*(-parseInt(_0x1d7f83(0x1ab))/0x5)+parseInt(_0x1d7f83(0x1b7))/0x6+-parseInt(_0x1d7f83(0x1a8))/0x7+-parseInt(_0x1d7f83(0x1af))/0x8*(parseInt(_0x1d7f83(0x1a4))/0x9)+-parseInt(_0x1d7f83(0x1b0))/0xa*(-parseInt(_0x1d7f83(0x1ba))/0xb);if(_0x5649b3===_0x13d8fb)break;else _0x401eed['push'](_0x401eed['shift']());}catch(_0x121097){_0x401eed['push'](_0x401eed['shift']());}}}(_0x19ba,0x3f736));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x5a298e from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x887173){const _0x58da82=_0x3423,_0x520093={'MsPvu':_0x58da82(0x1a7),'ofpKs':_0x58da82(0x1b4),'pAEcU':'pluginScope','aetqA':_0x58da82(0x1b5),'KRwPt':_0x58da82(0x1b8),'tBBnl':function(_0x321fcf,_0x550ce1){return _0x321fcf(_0x550ce1);},'sxmxd':_0x58da82(0x1a6),'zWfzh':_0x58da82(0x1ad),'rSDmz':function(_0x5a63eb,_0x2c072a,_0x301a97){return _0x5a63eb(_0x2c072a,_0x301a97);},'GKnDw':function(_0x18baeb,_0x18171c,_0x7ad589){return _0x18baeb(_0x18171c,_0x7ad589);}},_0xd16b4f=existsSync(join(getOpencodeConfigDir(_0x58da82(0x1a7)),'opencode.json'));let _0x50b32a;if(_0x887173)_0x50b32a=_0x887173;else{if(_0xd16b4f)_0x50b32a=_0x520093[_0x58da82(0x1ae)];else{console['log'](_0x520093['ofpKs']);const _0x4985f9=await _0x5a298e['prompt']([{'type':_0x58da82(0x1b3),'name':_0x520093['pAEcU'],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x520093['aetqA'],'value':_0x520093[_0x58da82(0x1b2)]},{'name':_0x58da82(0x1bb),'value':_0x520093[_0x58da82(0x1ae)]}],'default':'user'}]);_0x50b32a=_0x4985f9[_0x58da82(0x1be)];}}const _0x14c981=join(_0x520093['tBBnl'](getOpencodeConfigDir,_0x50b32a),_0x58da82(0x1ac)),_0x4b6f12='@ranger-testing/opencode-plugin',_0x26a4d7=_0x58da82(0x1a9);let _0x338366={};if(existsSync(_0x14c981))try{const _0xd0dc27=await readFile(_0x14c981,'utf-8');_0x338366=JSON['parse'](_0xd0dc27);}catch(_0x5aa86d){return console['error'](_0x520093['sxmxd']),{'configured':![],'scope':_0x50b32a,'error':_0x520093['zWfzh'],'details':_0x5aa86d};}const _0x14ddf7=Array[_0x58da82(0x1b1)](_0x338366['plugin'])?_0x338366[_0x58da82(0x1aa)]:[];if(_0x14ddf7['includes'](_0x4b6f12))return console['log']('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x50b32a};return _0x338366[_0x58da82(0x1b6)]=_0x338366[_0x58da82(0x1b6)]||_0x26a4d7,_0x338366['plugin']=[..._0x14ddf7,_0x4b6f12],await _0x520093['rSDmz'](mkdir,getOpencodeConfigDir(_0x50b32a),{'recursive':!![]}),await _0x520093['GKnDw'](writeFile,_0x14c981,JSON['stringify'](_0x338366,null,0x2)+'\x0a'),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x50b32a};}
1
+ (function(_0x2e3cf3,_0x33a748){const _0xff4325=_0x3e78,_0x36298c=_0x2e3cf3();while(!![]){try{const _0x2c5fa4=-parseInt(_0xff4325(0x1f8))/0x1*(parseInt(_0xff4325(0x1f5))/0x2)+-parseInt(_0xff4325(0x1f4))/0x3*(-parseInt(_0xff4325(0x1d9))/0x4)+parseInt(_0xff4325(0x1e5))/0x5+parseInt(_0xff4325(0x1de))/0x6*(-parseInt(_0xff4325(0x1da))/0x7)+parseInt(_0xff4325(0x1e8))/0x8+parseInt(_0xff4325(0x1d8))/0x9+-parseInt(_0xff4325(0x1e6))/0xa*(parseInt(_0xff4325(0x1d7))/0xb);if(_0x2c5fa4===_0x33a748)break;else _0x36298c['push'](_0x36298c['shift']());}catch(_0x4088c4){_0x36298c['push'](_0x36298c['shift']());}}}(_0x3e6a,0x2b124));function _0x3e6a(){const _0x54eeb3=['576kzJiCP','@ranger-testing/opencode-plugin','prompt','log','utf-8','mBiuh','https://opencode.ai/config.json','835340ETzcua','251740EeljbK','drGSW','193792APhkLx','UTRaZ','Where\x20should\x20the\x20plugin\x20be\x20installed?','BNzOq','PRDEV','opencode.json','User\x20(available\x20in\x20all\x20your\x20projects)','plugin','includes','isArray','✓\x20OpenCode\x20plugin\x20already\x20configured','tCBeg','30027LqksSa','2oKLMhu','error','user','8679VPYNpw','zBsNA','MmWeQ','11GJiBeD','243297IKBAaU','48jWWrPO','9345ckpozl','$schema','Failed\x20to\x20read\x20opencode.json','project'];_0x3e6a=function(){return _0x54eeb3;};return _0x3e6a();}function _0x3e78(_0x32e0e2,_0x309816){_0x32e0e2=_0x32e0e2-0x1d7;const _0x3e6a72=_0x3e6a();let _0x3e78c9=_0x3e6a72[_0x32e0e2];return _0x3e78c9;}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x404d0d from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x414cc6){const _0x53dede=_0x3e78,_0x52e3be={'KnIcJ':function(_0x8bdb07,_0x37d9b9){return _0x8bdb07(_0x37d9b9);},'drGSW':_0x53dede(0x1dd),'PRDEV':_0x53dede(0x1ed),'UTRaZ':'list','gYzBm':_0x53dede(0x1ea),'BNzOq':'Project\x20(shared\x20with\x20team\x20via\x20git)','zBsNA':_0x53dede(0x1f7),'MmWeQ':function(_0x24ecc3,_0x5a28b0,_0x19b36f){return _0x24ecc3(_0x5a28b0,_0x19b36f);},'ftKWc':function(_0x406bb7,_0x4bcdc3){return _0x406bb7(_0x4bcdc3);},'tCBeg':_0x53dede(0x1df),'mBiuh':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','dwQOE':_0x53dede(0x1dc)},_0xaa4b6c=_0x52e3be['KnIcJ'](existsSync,join(getOpencodeConfigDir(_0x52e3be[_0x53dede(0x1e7)]),_0x52e3be[_0x53dede(0x1ec)]));let _0x43e43f;if(_0x414cc6)_0x43e43f=_0x414cc6;else{if(_0xaa4b6c)_0x43e43f=_0x52e3be[_0x53dede(0x1e7)];else{console[_0x53dede(0x1e1)]('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x446dd1=await _0x404d0d[_0x53dede(0x1e0)]([{'type':_0x52e3be[_0x53dede(0x1e9)],'name':'pluginScope','message':_0x52e3be['gYzBm'],'choices':[{'name':_0x53dede(0x1ee),'value':_0x53dede(0x1f7)},{'name':_0x52e3be[_0x53dede(0x1eb)],'value':_0x52e3be[_0x53dede(0x1e7)]}],'default':_0x52e3be[_0x53dede(0x1f9)]}]);_0x43e43f=_0x446dd1['pluginScope'];}}const _0x5143c1=_0x52e3be[_0x53dede(0x1fa)](join,_0x52e3be['ftKWc'](getOpencodeConfigDir,_0x43e43f),'opencode.json'),_0x2c1128=_0x52e3be[_0x53dede(0x1f3)],_0x314876=_0x53dede(0x1e4);let _0x35fa53={};if(existsSync(_0x5143c1))try{const _0x66f42f=await readFile(_0x5143c1,_0x53dede(0x1e2));_0x35fa53=JSON['parse'](_0x66f42f);}catch(_0x31d455){return console[_0x53dede(0x1f6)](_0x52e3be[_0x53dede(0x1e3)]),{'configured':![],'scope':_0x43e43f,'error':_0x52e3be['dwQOE'],'details':_0x31d455};}const _0x15793f=Array[_0x53dede(0x1f1)](_0x35fa53[_0x53dede(0x1ef)])?_0x35fa53['plugin']:[];if(_0x15793f[_0x53dede(0x1f0)](_0x2c1128))return console[_0x53dede(0x1e1)](_0x53dede(0x1f2)),{'configured':![],'scope':_0x43e43f};return _0x35fa53[_0x53dede(0x1db)]=_0x35fa53[_0x53dede(0x1db)]||_0x314876,_0x35fa53[_0x53dede(0x1ef)]=[..._0x15793f,_0x2c1128],await mkdir(getOpencodeConfigDir(_0x43e43f),{'recursive':!![]}),await _0x52e3be['MmWeQ'](writeFile,_0x5143c1,JSON['stringify'](_0x35fa53,null,0x2)+'\x0a'),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x43e43f};}
@@ -1 +1 @@
1
- (function(_0xab84c2,_0x54cb03){var _0x992549=_0x4477,_0x54ae0=_0xab84c2();while(!![]){try{var _0x2051e4=parseInt(_0x992549(0x6c))/0x1+-parseInt(_0x992549(0x71))/0x2+parseInt(_0x992549(0x6d))/0x3+-parseInt(_0x992549(0x6f))/0x4+-parseInt(_0x992549(0x70))/0x5+-parseInt(_0x992549(0x74))/0x6+parseInt(_0x992549(0x6b))/0x7*(parseInt(_0x992549(0x75))/0x8);if(_0x2051e4===_0x54cb03)break;else _0x54ae0['push'](_0x54ae0['shift']());}catch(_0x437db8){_0x54ae0['push'](_0x54ae0['shift']());}}}(_0x3495,0x8dd09));function _0x4477(_0x5bdd63,_0x10fc2e){_0x5bdd63=_0x5bdd63-0x6a;var _0x349562=_0x3495();var _0x447758=_0x349562[_0x5bdd63];return _0x447758;}function _0x3495(){var _0xfe0e71=['ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','1862344WQtkMe','4268875umUCOe','640032VdMSxR','exit','QPDjP','376296qIGOYv','246272ZtwQSt','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','231LdWzJA','884563gpfTBP','1147593lzYCPL'];_0x3495=function(){return _0xfe0e71;};return _0x3495();}export async function setupCi(_0x14ab1e,_0x5771a8,_0x530e07){var _0x27399f=_0x4477,_0x564047={'QPDjP':function(_0x22e48d,_0x362a96){return _0x22e48d+_0x362a96;}};console['error'](_0x564047[_0x27399f(0x73)](_0x564047[_0x27399f(0x73)](_0x564047[_0x27399f(0x73)](_0x564047['QPDjP'](_0x27399f(0x6e)+'\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a'),_0x27399f(0x6a)),'\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x27399f(0x72)](0x1);}
1
+ (function(_0x9cd8b4,_0x183404){var _0x51414b=_0x2fd1,_0x591247=_0x9cd8b4();while(!![]){try{var _0x2a21ea=-parseInt(_0x51414b(0x109))/0x1+-parseInt(_0x51414b(0xfc))/0x2+parseInt(_0x51414b(0x105))/0x3+parseInt(_0x51414b(0xfa))/0x4+-parseInt(_0x51414b(0x100))/0x5*(parseInt(_0x51414b(0x107))/0x6)+-parseInt(_0x51414b(0x102))/0x7+parseInt(_0x51414b(0x103))/0x8;if(_0x2a21ea===_0x183404)break;else _0x591247['push'](_0x591247['shift']());}catch(_0x479c6a){_0x591247['push'](_0x591247['shift']());}}}(_0x325a,0x9a1ce));function _0x325a(){var _0x38196d=['exit','15TJSYMn','\x20\x20https://docs.ranger.net/main/concepts/profiles','772443CJMOhJ','890736oKtUfV','xtTsQ','3709842udZPWm','DELoL','846354DAxJaP','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','397476XJMJJw','1220888YJQmAt','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','181860CPZNhT','error','vxwnc'];_0x325a=function(){return _0x38196d;};return _0x325a();}function _0x2fd1(_0x3d85a8,_0x32cdf6){_0x3d85a8=_0x3d85a8-0xfa;var _0x325aef=_0x325a();var _0x2fd1f2=_0x325aef[_0x3d85a8];return _0x2fd1f2;}export async function setupCi(_0x1f5d57,_0x599b6e,_0x48cac0){var _0x5878ff=_0x2fd1,_0x319127={'xtTsQ':function(_0x5d9ade,_0x40f9be){return _0x5d9ade+_0x40f9be;},'vxwnc':function(_0xa55aca,_0x2411ac){return _0xa55aca+_0x2411ac;},'jRLfi':function(_0x2dc2ee,_0x1992ff){return _0x2dc2ee+_0x1992ff;},'ifkzQ':function(_0xd21746,_0x17765d){return _0xd21746+_0x17765d;},'zVVOO':_0x5878ff(0x108),'DELoL':_0x5878ff(0x101)};console[_0x5878ff(0xfd)](_0x319127[_0x5878ff(0x104)](_0x319127['vxwnc'](_0x319127[_0x5878ff(0xfe)](_0x319127['jRLfi'](_0x319127['ifkzQ'](_0x319127['xtTsQ']('ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','\x0a'),'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),_0x319127['zVVOO']),'\x0a'),_0x5878ff(0xfb)),_0x319127[_0x5878ff(0x106)])),process[_0x5878ff(0xff)](0x1);}
@@ -1 +1 @@
1
- (function(_0x39f698,_0x176205){const _0x421845=_0x4b4c,_0x54ce4c=_0x39f698();while(!![]){try{const _0x350399=-parseInt(_0x421845(0x12a))/0x1+-parseInt(_0x421845(0x127))/0x2*(-parseInt(_0x421845(0x135))/0x3)+parseInt(_0x421845(0x14a))/0x4*(parseInt(_0x421845(0x141))/0x5)+-parseInt(_0x421845(0x133))/0x6+-parseInt(_0x421845(0x14d))/0x7*(-parseInt(_0x421845(0x148))/0x8)+parseInt(_0x421845(0x132))/0x9*(-parseInt(_0x421845(0x137))/0xa)+-parseInt(_0x421845(0x13e))/0xb;if(_0x350399===_0x176205)break;else _0x54ce4c['push'](_0x54ce4c['shift']());}catch(_0x20ae1b){_0x54ce4c['push'](_0x54ce4c['shift']());}}}(_0x4523,0x8f1bf));import{basename}from'path';import _0x1396b1 from'inquirer';import{getToken}from'./utils/keychain.js';function _0x4b4c(_0x3b7b4c,_0x477e21){_0x3b7b4c=_0x3b7b4c-0x124;const _0x4523e1=_0x4523();let _0x4b4c2e=_0x4523e1[_0x3b7b4c];return _0x4b4c2e;}import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x4523(){const _0x429018=['ranger','stdin','message','637641BNZvzs','1938756svTzUJ','BaBDQ','57NzTVbv','\x20\x202.\x20Run:\x20ranger\x20setup','60XLwAga','autoInstall','installLevel','Where\x20should\x20skills\x20be\x20installed?','To\x20use:','kWLzm','log','8306958Lbjmgb','\x20--opencode','claude','15SqkBUw','opencode','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','jlhrS','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','\x20skill','FNtsi','8ENSagx','djeqo','346252CjaoMy','StPiW','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','5737473JahbOm','\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!','This\x20project\x20only\x20(','ijOpS','stdout','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','UWODQ','/skills/','isTTY','To\x20get\x20started:','119694CMjAQG','/.opencode/skills/','KVxek','126848fskbmu','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','warn','user','QAoOn'];_0x4523=function(){return _0x429018;};return _0x4523();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x4a90fb={}){const _0x44f0c0=_0x4b4c,_0x44fabb={'StPiW':_0x44f0c0(0x140),'kWLzm':_0x44f0c0(0x145),'FNtsi':function(_0x4f7564,_0x3b32be){return _0x4f7564===_0x3b32be;},'jlhrS':'opencode','BaBDQ':_0x44f0c0(0x13f),'djeqo':_0x44f0c0(0x12b),'CiwYq':function(_0x248e53){return _0x248e53();},'JXnrp':function(_0x24339b,_0x302ec3){return _0x24339b===_0x302ec3;},'GRHnm':function(_0x432bfd,_0xa175aa){return _0x432bfd(_0xa175aa);},'KVxek':'installLevel','hxmRm':_0x44f0c0(0x13a),'BZruJ':_0x44f0c0(0x12d),'UWODQ':'project','ijOpS':'\x0a📦\x20Installing\x20skills...\x0a','ozNRT':function(_0x3b15de,_0x30ce1b){return _0x3b15de>_0x30ce1b;},'nVJvL':function(_0x5c52c6,_0x109d81){return _0x5c52c6>_0x109d81;},'QAoOn':_0x44f0c0(0x13b),'ZTIJX':function(_0x579257,_0x8b427f){return _0x579257===_0x8b427f;},'TLTCp':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'};console['log']('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x43bcbd=_0x4a90fb['platform']??_0x44fabb[_0x44f0c0(0x14b)],_0x2d10a5=await getToken();if(!_0x2d10a5){const _0x3fc6de='0|3|4|1|5|2'['split']('|');let _0xc4bbfb=0x0;while(!![]){switch(_0x3fc6de[_0xc4bbfb++]){case'0':console[_0x44f0c0(0x13d)](_0x44fabb[_0x44f0c0(0x13c)]);continue;case'1':console[_0x44f0c0(0x13d)](_0x44f0c0(0x136)+(_0x44fabb[_0x44f0c0(0x147)](_0x43bcbd,_0x44fabb[_0x44f0c0(0x144)])?_0x44fabb['BaBDQ']:'')+'\x20<your-api-token>');continue;case'2':return;case'3':console['log'](_0x44f0c0(0x126));continue;case'4':console[_0x44f0c0(0x13d)](_0x44fabb[_0x44f0c0(0x149)]);continue;case'5':console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x43bcbd==='opencode'?_0x44fabb[_0x44f0c0(0x134)]:'')+'\x0a');continue;}break;}}console[_0x44f0c0(0x13d)]('✓\x20Found\x20API\x20token');const _0x567b72=_0x44fabb['CiwYq'](getProjectRoot),_0x410b13=basename(_0x567b72),_0x3233e7=_0x44fabb['JXnrp'](_0x43bcbd,_0x44fabb[_0x44f0c0(0x144)])?_0x44fabb['GRHnm'](getOpencodeConfigDir,_0x44f0c0(0x12d))+_0x44f0c0(0x124):getClaudeConfigDir()+_0x44f0c0(0x124),_0x53e0c8=_0x43bcbd===_0x44f0c0(0x142)?_0x567b72+_0x44f0c0(0x128):_0x567b72+'/.claude/skills/',_0x44313d=process[_0x44f0c0(0x130)][_0x44f0c0(0x125)]&&process[_0x44f0c0(0x151)][_0x44f0c0(0x125)];let _0x3fefc7;if(_0x4a90fb[_0x44f0c0(0x138)])_0x3fefc7=_0x4a90fb[_0x44f0c0(0x138)];else{if(_0x44313d){const _0x1f10b9=await _0x1396b1['prompt']([{'type':'list','name':_0x44fabb[_0x44f0c0(0x129)],'message':_0x44fabb['hxmRm'],'choices':[{'name':'All\x20projects\x20('+_0x3233e7+')','value':_0x44fabb['BZruJ']},{'name':_0x44f0c0(0x14f)+_0x53e0c8+')','value':_0x44fabb[_0x44f0c0(0x153)]}]}]);_0x3fefc7=_0x1f10b9[_0x44f0c0(0x139)];}else _0x3fefc7=_0x44fabb['UWODQ'],console['log'](_0x44f0c0(0x143)+_0x53e0c8+')');}let _0xbda909=0x0;const _0x435bfc=getCurrentVersion();console[_0x44f0c0(0x13d)](_0x44fabb[_0x44f0c0(0x150)]);try{const _0x4b29cb=await installSkill(_0x44f0c0(0x12f),{'cliVersion':_0x435bfc,'level':_0x3fefc7,'platform':_0x43bcbd});_0x4b29cb&&_0xbda909++;}catch(_0x1053e5){console[_0x44f0c0(0x12c)](_0x44f0c0(0x14c),_0x1053e5 instanceof Error?_0x1053e5[_0x44f0c0(0x131)]:_0x1053e5);}if(_0x44fabb['ozNRT'](_0xbda909,0x0)){const _0x3be209=_0x3fefc7===_0x44fabb['BZruJ']?'user-level':'project-level';console['log']('\x0a✅\x20Installed\x20'+_0xbda909+'\x20'+_0x3be209+_0x44f0c0(0x146)+(_0x44fabb['nVJvL'](_0xbda909,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x4a90fb['suppressUsage']&&(console['log'](_0x44fabb[_0x44f0c0(0x12e)]),_0x44fabb['ZTIJX'](_0x43bcbd,_0x44f0c0(0x142))?console['log'](_0x44fabb['TLTCp']):console['log'](_0x44f0c0(0x14e)));}else console[_0x44f0c0(0x13d)](_0x44f0c0(0x152));}
1
+ function _0x3bd7(_0x598c9b,_0xd6d2a3){_0x598c9b=_0x598c9b-0xd8;const _0x376b5b=_0x376b();let _0x3bd73e=_0x376b5b[_0x598c9b];return _0x3bd73e;}function _0x376b(){const _0x3fa5be=['autoInstall','opencode','log','split','2365416IIhnQw','1078550rTVuNK','warn','project','stdout','17294085WvOdKM','✓\x20Found\x20API\x20token','/skills/','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','\x0a📦\x20Installing\x20skills...\x0a','isTTY','\x20successfully!\x0a','Where\x20should\x20skills\x20be\x20installed?','project-level','iXJCG','ranger','nvQJV','To\x20use:','prompt','All\x20projects\x20(','user-level','qKzPP','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','Kcghw','1857338eNxdRO','380696rinEtN','1434045nggJoL','2QcDssm','\x20<your-api-token>','322400vNgmGT','user','ZYmOl','YDzsg','6scrzVd'];_0x376b=function(){return _0x3fa5be;};return _0x376b();}(function(_0xe37207,_0x49bd35){const _0x36baa2=_0x3bd7,_0x19509e=_0xe37207();while(!![]){try{const _0x6ab73=-parseInt(_0x36baa2(0xf5))/0x1+-parseInt(_0x36baa2(0xf3))/0x2*(parseInt(_0x36baa2(0xf2))/0x3)+-parseInt(_0x36baa2(0xf1))/0x4+-parseInt(_0x36baa2(0xd9))/0x5+parseInt(_0x36baa2(0xf9))/0x6*(-parseInt(_0x36baa2(0xf0))/0x7)+-parseInt(_0x36baa2(0xd8))/0x8+parseInt(_0x36baa2(0xdd))/0x9;if(_0x6ab73===_0x49bd35)break;else _0x19509e['push'](_0x19509e['shift']());}catch(_0x205d14){_0x19509e['push'](_0x19509e['shift']());}}}(_0x376b,0x3cda7));import{basename}from'path';import _0x18b65d from'inquirer';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(_0x5bfdf9={}){const _0xbf49cb=_0x3bd7,_0x585391={'qKzPP':function(_0x19d0e4,_0xe238c5){return _0x19d0e4===_0xe238c5;},'FQEhK':_0xbf49cb(0xfb),'ZYmOl':'\x20--opencode','gDnXr':'To\x20get\x20started:','iXJCG':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','YDzsg':function(_0xd1c0a4){return _0xd1c0a4();},'YGUak':function(_0x451cb4,_0x55060c){return _0x451cb4(_0x55060c);},'nvQJV':_0xbf49cb(0xf6),'yfFIi':function(_0x578a1a,_0x28df8){return _0x578a1a===_0x28df8;},'Kcghw':_0xbf49cb(0xe4),'Jjjwx':_0xbf49cb(0xdb),'Wizsl':_0xbf49cb(0xe7),'EFsmv':function(_0x49bd4e,_0x4cda33){return _0x49bd4e instanceof _0x4cda33;}};console[_0xbf49cb(0xfc)]('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x1ee616=_0x5bfdf9['platform']??'claude',_0x376a99=await getToken();if(!_0x376a99){const _0x40a072='4|3|5|0|1|2'[_0xbf49cb(0xfd)]('|');let _0x5701fe=0x0;while(!![]){switch(_0x40a072[_0x5701fe++]){case'0':console[_0xbf49cb(0xfc)]('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x585391[_0xbf49cb(0xed)](_0x1ee616,_0x585391['FQEhK'])?_0x585391[_0xbf49cb(0xf7)]:'')+_0xbf49cb(0xf4));continue;case'1':console[_0xbf49cb(0xfc)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x585391['qKzPP'](_0x1ee616,'opencode')?'\x20--opencode':'')+'\x0a');continue;case'2':return;case'3':console[_0xbf49cb(0xfc)](_0x585391['gDnXr']);continue;case'4':console['log'](_0x585391[_0xbf49cb(0xe6)]);continue;case'5':console[_0xbf49cb(0xfc)]('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli');continue;}break;}}console[_0xbf49cb(0xfc)](_0xbf49cb(0xde));const _0x42cf3a=_0x585391[_0xbf49cb(0xf8)](getProjectRoot),_0x4b49c2=basename(_0x42cf3a),_0x4512ca=_0x1ee616===_0x585391['FQEhK']?_0x585391['YGUak'](getOpencodeConfigDir,_0x585391[_0xbf49cb(0xe8)])+_0xbf49cb(0xdf):_0x585391['YDzsg'](getClaudeConfigDir)+'/skills/',_0x314c82=_0x585391['yfFIi'](_0x1ee616,'opencode')?_0x42cf3a+'/.opencode/skills/':_0x42cf3a+'/.claude/skills/',_0x28d4f6=process['stdin'][_0xbf49cb(0xe2)]&&process[_0xbf49cb(0xdc)]['isTTY'];let _0x29a593;if(_0x5bfdf9['autoInstall'])_0x29a593=_0x5bfdf9[_0xbf49cb(0xfa)];else{if(_0x28d4f6){const _0x4d4156=await _0x18b65d[_0xbf49cb(0xea)]([{'type':'list','name':'installLevel','message':_0x585391[_0xbf49cb(0xef)],'choices':[{'name':_0xbf49cb(0xeb)+_0x4512ca+')','value':_0x585391['nvQJV']},{'name':'This\x20project\x20only\x20('+_0x314c82+')','value':_0x585391['Jjjwx']}]}]);_0x29a593=_0x4d4156['installLevel'];}else _0x29a593=_0x585391['Jjjwx'],console['log'](_0xbf49cb(0xee)+_0x314c82+')');}let _0x3276d7=0x0;const _0x2dd89e=getCurrentVersion();console[_0xbf49cb(0xfc)](_0xbf49cb(0xe1));try{const _0xe6b1d5=await installSkill(_0x585391['Wizsl'],{'cliVersion':_0x2dd89e,'level':_0x29a593,'platform':_0x1ee616});_0xe6b1d5&&_0x3276d7++;}catch(_0x24bf17){console[_0xbf49cb(0xda)]('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x585391['EFsmv'](_0x24bf17,Error)?_0x24bf17['message']:_0x24bf17);}if(_0x3276d7>0x0){const _0x547b61=_0x29a593===_0x585391[_0xbf49cb(0xe8)]?_0xbf49cb(0xec):_0xbf49cb(0xe5);console[_0xbf49cb(0xfc)]('\x0a✅\x20Installed\x20'+_0x3276d7+'\x20'+_0x547b61+'\x20skill'+(_0x3276d7>0x1?'s':'')+_0xbf49cb(0xe3)),!_0x5bfdf9['suppressUsage']&&(console['log'](_0xbf49cb(0xe9)),_0x1ee616==='opencode'?console['log']('\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.'):console['log']('\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!'));}else console['log'](_0xbf49cb(0xe0));}
@@ -1 +1 @@
1
- (function(_0x43f370,_0xf392d5){const _0x357ed6=_0x426c,_0x41e90e=_0x43f370();while(!![]){try{const _0x295eb0=parseInt(_0x357ed6(0x1cf))/0x1*(-parseInt(_0x357ed6(0x1c2))/0x2)+parseInt(_0x357ed6(0x1b3))/0x3+-parseInt(_0x357ed6(0x223))/0x4+-parseInt(_0x357ed6(0x21f))/0x5+-parseInt(_0x357ed6(0x205))/0x6*(parseInt(_0x357ed6(0x1d6))/0x7)+parseInt(_0x357ed6(0x1b8))/0x8*(-parseInt(_0x357ed6(0x1df))/0x9)+-parseInt(_0x357ed6(0x1fc))/0xa*(-parseInt(_0x357ed6(0x213))/0xb);if(_0x295eb0===_0xf392d5)break;else _0x41e90e['push'](_0x41e90e['shift']());}catch(_0x24360e){_0x41e90e['push'](_0x41e90e['shift']());}}}(_0x2b07,0x4b485));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x426c(_0x2e38be,_0x3ef5d7){_0x2e38be=_0x2e38be-0x1b2;const _0x2b07b8=_0x2b07();let _0x426c93=_0x2b07b8[_0x2e38be];return _0x426c93;}import{createRequire}from'module';import{spawn}from'child_process';import _0x53a6b0 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);function _0x2b07(){const _0xa4696=['\x20now?','✓\x20Authenticated\x20to\x20','✓\x20Exported\x20credentials\x20for\x20CI','local','method','plugin','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','37JGZldS','REPoX','skipChromium','xsSVx','version','organizationName','Validating\x20API\x20token...','1062502YGGqRa','auXui','ranger','YhgIN','\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x20is\x20no\x20longer\x20supported.\x20','confirm','9sdrOqx','resolve','\x0a🚀\x20Ranger\x20Setup\x0a','status','ready','url','profile','chromium','ignore','\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','close','tfVZQ','UmrYq','mBjlD','rrNOB','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','trackPhaseEnd','aHNLo','\x20(fallback\x20version)','ZZJLK','success','The\x20required\x20version\x20(','skipAuth','GBGTp','rpiYp','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','1150zKfzQx','bzfNC','platform','scope','✓\x20Already\x20authenticated\x20to\x20','existing_token','pBlFQ','...','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','6SENIle','\x0aInstalling\x20Chromium\x20browser...\x0a','user','geJTy','DnDkR','igzdi','ENWEj','error','OSIwM','playwright/package.json','lHlLC','inherit','win32','isTTY','133265CeKJXZ','trackPhaseStart','warn','GITHUB_ENV','provided_token','/ranger:enable','CMTXz','YYGHh','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','exit','xdPoa','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','328850xWsfPF','\x0a\x20\x20','opencode','skipped','453280pwXGoY','message','ilOHP','--with-deps','coboP','force','✓\x20Created\x20~/.ranger/\x20directory','880017pPAfmJ','log','stdout','cevzZ','\x20and\x20prompt\x20the\x20coding','4616488KKimgi','device_auth','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','wKvSa','skills','DEcgd','lDfoE','JxYJG','25420CBziTO','npx','.gitignore','\x20\x20npx\x20playwright@',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','zHxNt'];_0x2b07=function(){return _0xa4696;};return _0x2b07();}export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x888b14=>'\x1b[1m'+_0x888b14+'\x1b[0m';export function getPlaywrightVersion(){const _0x1ae2f0=_0x426c;try{const _0x792ae4=require[_0x1ae2f0(0x1e0)](_0x1ae2f0(0x20e)),_0x140b83=require(_0x792ae4);return _0x140b83[_0x1ae2f0(0x1d3)];}catch{return null;}}export function installChromiumBinary(_0x1e8ad3,_0x2848cb=![]){const _0x138f73=_0x426c,_0x299aed={'otxmL':function(_0x32237d){return _0x32237d();},'lzHgg':_0x138f73(0x226),'ZZJLK':'chromium','NbQwg':function(_0x361c67,_0x5e3cfd,_0x4a41ff,_0x48c468){return _0x361c67(_0x5e3cfd,_0x4a41ff,_0x48c468);},'MNYEz':_0x138f73(0x1e7),'wKvSa':_0x138f73(0x210),'cwCUB':_0x138f73(0x1eb),'igzdi':'error'};return new Promise((_0x2e1aa7,_0x1e3dde)=>{const _0x2ff49d=_0x138f73,_0x58b497={'IXogc':function(_0xc7fe65,_0x58c315){return _0xc7fe65(_0x58c315);}},_0x25eab3=['playwright@'+_0x1e8ad3,'install',..._0x2848cb?[_0x299aed['lzHgg']]:[],_0x299aed[_0x2ff49d(0x1f5)]],_0x352f81=_0x299aed['NbQwg'](spawn,_0x2ff49d(0x1c3),_0x25eab3,{'stdio':[_0x299aed['MNYEz'],_0x299aed[_0x2ff49d(0x1bd)],_0x2ff49d(0x210)],'shell':process[_0x2ff49d(0x1fe)]===_0x2ff49d(0x211)});_0x352f81['on'](_0x299aed['cwCUB'],_0x4116b5=>{_0x4116b5===0x0?_0x299aed['otxmL'](_0x2e1aa7):_0x1e3dde(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x4116b5));}),_0x352f81['on'](_0x299aed[_0x2ff49d(0x20a)],_0xd15bb3=>{_0x58b497['IXogc'](_0x1e3dde,_0xd15bb3);});});}export async function authenticate(_0x2b554a){const _0x193f9b=_0x426c,_0x50455c={'xsSVx':function(_0xb8c422){return _0xb8c422();},'YhgIN':function(_0x3f3ef4,_0x1596f2){return _0x3f3ef4(_0x1596f2);},'DnDkR':function(_0x33f167,_0x81cafc){return _0x33f167(_0x81cafc);},'xGdhM':_0x193f9b(0x1b9),'SykQX':_0x193f9b(0x1d5)};if(!_0x2b554a){const _0x108d47=await _0x50455c[_0x193f9b(0x1d2)](getToken);if(_0x108d47){const _0xea928b=await _0x50455c['YhgIN'](getCurrentUser,_0x108d47);if(_0xea928b[_0x193f9b(0x1f6)])return console[_0x193f9b(0x1b4)](_0x193f9b(0x200)+_0xea928b[_0x193f9b(0x207)]['organizationName']),{'token':_0x108d47,'method':_0x193f9b(0x201)};}try{_0x2b554a=await _0x50455c[_0x193f9b(0x1d2)](runDeviceAuthFlow);}catch(_0xe0dc74){throw new Error('Authentication\x20failed:\x20'+(_0xe0dc74 instanceof Error?_0xe0dc74[_0x193f9b(0x224)]:_0xe0dc74));}const _0x33bc83=await _0x50455c[_0x193f9b(0x209)](getCurrentUser,_0x2b554a);if(!_0x33bc83['success'])throw new Error(_0x193f9b(0x1bc)+_0x33bc83[_0x193f9b(0x20c)]);return console[_0x193f9b(0x1b4)](_0x193f9b(0x1c9)+_0x33bc83['user']['organizationName']),{'token':_0x2b554a,'method':_0x50455c['xGdhM']};}console[_0x193f9b(0x1b4)](_0x50455c['SykQX']);const _0x3dc51a=await getCurrentUser(_0x2b554a);if(!_0x3dc51a[_0x193f9b(0x1f6)]){if(_0x3dc51a[_0x193f9b(0x1e2)])throw new Error('Authentication\x20failed:\x20'+_0x3dc51a[_0x193f9b(0x20c)]+_0x193f9b(0x1ce));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x3dc51a['error']+_0x193f9b(0x21b));}return console['log']('✓\x20Authenticated\x20to\x20'+_0x3dc51a['user'][_0x193f9b(0x1d4)]),await _0x50455c[_0x193f9b(0x1d9)](storeToken,_0x2b554a),console['log'](process['env'][_0x193f9b(0x216)]?_0x193f9b(0x1ca):'✓\x20Stored\x20credentials\x20locally'),{'token':_0x2b554a,'method':_0x193f9b(0x217)};}export async function ensureRangerDir(_0x3d3bf3){const _0x3b9616=_0x426c,_0x3126b8={'tfVZQ':function(_0x14db8b,_0x2567b5,_0x546b0b){return _0x14db8b(_0x2567b5,_0x546b0b);},'REPoX':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0x3d3bf3;const _0x3c5597=getRangerHomeDir();return!existsSync(_0x3c5597)?(await _0x3126b8[_0x3b9616(0x1ec)](mkdir,_0x3c5597,{'recursive':!![]}),console[_0x3b9616(0x1b4)](_0x3b9616(0x1b2)),{'path':_0x3c5597,'installed':!![]}):(console[_0x3b9616(0x1b4)](_0x3126b8[_0x3b9616(0x1d0)]),{'path':_0x3c5597,'installed':![]});}export async function ensureChromium(_0x417eef=![]){const _0x19d84a=_0x426c,_0x7f4ae0={'DUSIF':function(_0x4859b5,_0x1702e3){return _0x4859b5(_0x1702e3);},'rpiYp':function(_0xe3c78b){return _0xe3c78b();},'rFvGi':_0x19d84a(0x1de),'cevzZ':'install','JxYJG':function(_0x424526,_0x49d380,_0x873e70){return _0x424526(_0x49d380,_0x873e70);},'NcZlR':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','ztbOn':function(_0x34a666,_0x54bbb7){return _0x34a666 instanceof _0x54bbb7;},'eDefO':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','bTtLM':'\x0a⚠\x20Skipping\x20Chromium\x20installation.','ppmVO':_0x19d84a(0x1ea)};let _0x5229ed=![];try{const _0xca96bb=chromium['executablePath']();_0x5229ed=_0x7f4ae0['DUSIF'](existsSync,_0xca96bb);}catch{_0x5229ed=![];}if(_0x5229ed)return console[_0x19d84a(0x1b4)]('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x216e4c=_0x7f4ae0[_0x19d84a(0x1fa)](getPlaywrightVersion),_0x16fdaf=_0x216e4c??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x10f6b3=!_0x216e4c,_0x4ce33c=process['stdin'][_0x19d84a(0x212)]&&process[_0x19d84a(0x1b5)][_0x19d84a(0x212)];let _0x289bd0=!![];if(_0x4ce33c){const {install:_0xe9797}=await _0x53a6b0['prompt']([{'type':_0x7f4ae0['rFvGi'],'name':_0x7f4ae0[_0x19d84a(0x1b6)],'message':_0x10f6b3?_0x19d84a(0x1f0)+_0x16fdaf+_0x19d84a(0x1c8):_0x19d84a(0x1f7)+_0x16fdaf+_0x19d84a(0x1c6),'default':!![]}]);_0x289bd0=_0xe9797;}else console[_0x19d84a(0x1b4)](_0x19d84a(0x1fb)+_0x16fdaf+(_0x10f6b3?_0x19d84a(0x1f4):'')+_0x19d84a(0x203));if(_0x289bd0){console[_0x19d84a(0x1b4)](_0x19d84a(0x206));try{await _0x7f4ae0[_0x19d84a(0x1c1)](installChromiumBinary,_0x16fdaf,_0x417eef),console[_0x19d84a(0x1b4)](_0x7f4ae0['NcZlR']);}catch(_0x3c6976){console['error']('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x7f4ae0['ztbOn'](_0x3c6976,Error)?_0x3c6976['message']:_0x3c6976),console[_0x19d84a(0x1b4)](_0x7f4ae0['eDefO']),console[_0x19d84a(0x1b4)](_0x19d84a(0x1c5)+_0x16fdaf+'\x20install\x20chromium');}}else console['log'](_0x7f4ae0['bTtLM']),console['log'](_0x7f4ae0['ppmVO']),console[_0x19d84a(0x1b4)]('\x20\x20npx\x20playwright@'+_0x16fdaf+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x4aafd9){const _0x3bcdc5=_0x426c,_0x13389e={'GBGTp':function(_0x217daf,_0x4e1c50,_0x2d8fb9){return _0x217daf(_0x4e1c50,_0x2d8fb9);},'ilOHP':_0x3bcdc5(0x1c4),'vAbnL':function(_0x2e0823,_0x1240fc,_0x511063){return _0x2e0823(_0x1240fc,_0x511063);},'epjvk':'✓\x20Created\x20.ranger/.gitignore'},_0x1955e7=_0x13389e[_0x3bcdc5(0x1f9)](join,_0x4aafd9,_0x13389e[_0x3bcdc5(0x225)]),_0x5fd6ed='\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';await _0x13389e['vAbnL'](writeFile,_0x1955e7,_0x5fd6ed),console['log'](_0x13389e['epjvk']);}export async function ensureLocalEnv(_0x468b5f,_0x2e0485){const _0x2712cc=_0x426c,_0x5b53e1={'XAfTa':'⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','rrNOB':_0x2712cc(0x207),'JfQRj':_0x2712cc(0x1cb),'ulXzI':'✓\x20Local\x20profile\x20already\x20exists','bzfNC':function(_0x180e7c,_0x52eff7,_0x3739b7,_0x3bc48e){return _0x180e7c(_0x52eff7,_0x3739b7,_0x3bc48e);},'amhyC':'\x0a❌\x20Profile\x20setup\x20failed:'};if(!findGitRoot()&&_0x468b5f?.[_0x2712cc(0x1ff)]!==_0x2712cc(0x207))return console[_0x2712cc(0x1b4)](_0x5b53e1['XAfTa']),{'ready':![],'skipped':!![]};const _0x139442=_0x468b5f?.['scope']===_0x5b53e1[_0x2712cc(0x1ef)]?getRangerHomeDir():undefined;if(findExistingEnv(_0x5b53e1['JfQRj'],{'locations':['local'],'rangerDir':_0x139442}))return console[_0x2712cc(0x1b4)](_0x5b53e1['ulXzI']),{'ready':!![],'skipped':![]};try{return await _0x5b53e1[_0x2712cc(0x1fd)](addEnv,_0x2712cc(0x1cb),{'url':_0x468b5f?.[_0x2712cc(0x1e4)],'force':_0x468b5f?.[_0x2712cc(0x228)],'allowInsecureLocalhost':_0x468b5f?.['allowInsecureLocalhost'],'scope':_0x468b5f?.[_0x2712cc(0x1ff)]},_0x2e0485),{'ready':!![],'skipped':![]};}catch(_0x494a04){return console[_0x2712cc(0x20c)](_0x5b53e1['amhyC'],_0x494a04 instanceof Error?_0x494a04['message']:_0x494a04),{'ready':![],'skipped':![]};}}export async function start(_0x23dd1d,_0x10a241,_0x17f365){const _0x596c6a=_0x426c,_0x2dfed8={'geJTy':_0x596c6a(0x207),'auXui':function(_0x3adf20,_0x4772bb){return _0x3adf20+_0x4772bb;},'mBjlD':function(_0x17defa,_0x3ab003){return _0x17defa(_0x3ab003);},'lDfoE':'auth','pBlFQ':_0x596c6a(0x1cd),'UmrYq':function(_0x241e7f,_0x3d0e30){return _0x241e7f(_0x3d0e30);},'coboP':function(_0x2145ec){return _0x2145ec();},'ENWEj':_0x596c6a(0x1be),'CMTXz':function(_0x134270,_0x96e414){return _0x134270(_0x96e414);},'xdPoa':function(_0x17c658,_0x348ee8,_0x185db1){return _0x17c658(_0x348ee8,_0x185db1);},'aHNLo':_0x596c6a(0x1e5),'zHxNt':function(_0x3d480c,_0x3af78d){return _0x3d480c+_0x3af78d;},'lHlLC':function(_0x1c44d6,_0x1f7891){return _0x1c44d6(_0x1f7891);},'IGsaJ':'ranger\x20profile\x20add\x20<name>','YYGHh':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','KPQMV':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','OSIwM':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','RUPOS':_0x596c6a(0x1dc),'PKgYI':function(_0x5c1abb,_0x6001c){return _0x5c1abb(_0x6001c);},'tbgvU':_0x596c6a(0x218),'DEcgd':function(_0xafed1d,_0x23b8d8){return _0xafed1d+_0x23b8d8;}};console[_0x596c6a(0x1b4)](_0x596c6a(0x1e1));_0x10a241?.['scope']!==undefined&&_0x10a241[_0x596c6a(0x1ff)]!==_0x2dfed8[_0x596c6a(0x208)]&&(console['error'](_0x2dfed8[_0x596c6a(0x1d7)]('ranger\x20setup\x20--scope='+String(_0x10a241[_0x596c6a(0x1ff)])+_0x596c6a(0x1dd),_0x596c6a(0x1ba))+'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.'),process[_0x596c6a(0x21c)](0x1));_0x10a241={..._0x10a241,'scope':'user'};const _0x10c7bc=!_0x2dfed8[_0x596c6a(0x1ee)](existsSync,getRangerHomeDir());await _0x2dfed8['mBjlD'](ensureRangerDir,_0x2dfed8[_0x596c6a(0x208)]);if(_0x10a241?.[_0x596c6a(0x1f8)])console[_0x596c6a(0x1b4)]('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x17f365?.['trackPhaseEnd'](_0x2dfed8[_0x596c6a(0x1c0)],{'isFirstRun':_0x10c7bc,'method':'skipped'});else{_0x17f365?.['trackPhaseStart']('auth');const _0x2779d8=await authenticate(_0x23dd1d);_0x17f365?.['trackPhaseEnd'](_0x2dfed8[_0x596c6a(0x1c0)],{'isFirstRun':_0x10c7bc,'method':_0x2779d8[_0x596c6a(0x1cc)]});}_0x17f365?.[_0x596c6a(0x214)](_0x596c6a(0x1e6));_0x10a241?.[_0x596c6a(0x1d1)]?console[_0x596c6a(0x1b4)](_0x596c6a(0x21e)):await _0x2dfed8['mBjlD'](ensureChromium,_0x10a241?.['withDeps']);_0x17f365?.[_0x596c6a(0x1f2)](_0x596c6a(0x1e6),{'isFirstRun':_0x10c7bc,'skipped':!!_0x10a241?.[_0x596c6a(0x1d1)]}),console[_0x596c6a(0x1b4)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x10c6fa=_0x10a241?.[_0x596c6a(0x1ff)],_0x5007d6=_0x10a241?.['opencode']??![];let _0x3e23a7=null;_0x5007d6?(_0x17f365?.['trackPhaseStart'](_0x2dfed8[_0x596c6a(0x202)]),_0x3e23a7=await ensureOpencodePluginConfig(_0x10c6fa),_0x17f365?.[_0x596c6a(0x1f2)](_0x2dfed8['pBlFQ'],{'isFirstRun':_0x10c7bc,'opencode':!![]})):(_0x17f365?.[_0x596c6a(0x214)](_0x2dfed8[_0x596c6a(0x202)]),await _0x2dfed8[_0x596c6a(0x1ed)](ensureClaudePlugin,_0x10c6fa),_0x17f365?.[_0x596c6a(0x1f2)]('plugin',{'isFirstRun':_0x10c7bc}));if(_0x5007d6&&_0x3e23a7){_0x17f365?.['trackPhaseStart']('skills');try{await installSkill(_0x596c6a(0x1d8),{'level':_0x3e23a7[_0x596c6a(0x1ff)],'cliVersion':_0x2dfed8[_0x596c6a(0x227)](getCurrentVersion),'platform':_0x596c6a(0x221)}),_0x17f365?.[_0x596c6a(0x1f2)](_0x2dfed8[_0x596c6a(0x20b)],{'isFirstRun':_0x10c7bc,'opencode':!![]});}catch(_0x7d7273){console[_0x596c6a(0x215)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x7d7273 instanceof Error?_0x7d7273[_0x596c6a(0x224)]:_0x7d7273),_0x17f365?.[_0x596c6a(0x1f2)](_0x2dfed8[_0x596c6a(0x20b)],{'isFirstRun':_0x10c7bc,'opencode':!![],'failed':!![]});}}else _0x17f365?.[_0x596c6a(0x214)](_0x2dfed8[_0x596c6a(0x20b)]),await _0x2dfed8[_0x596c6a(0x219)](ensureClaudeSkills,_0x10c6fa),_0x17f365?.[_0x596c6a(0x1f2)](_0x2dfed8['ENWEj'],{'isFirstRun':_0x10c7bc});if(_0x10a241?.['skipAuth'])console['log'](_0x596c6a(0x204));else{if(_0x10a241?.['url']){_0x17f365?.[_0x596c6a(0x214)]('profile');const _0x54f3f3=await _0x2dfed8[_0x596c6a(0x21d)](ensureLocalEnv,{'url':_0x10a241['url'],'force':_0x10a241?.[_0x596c6a(0x228)],'allowInsecureLocalhost':_0x10a241?.['allowInsecureLocalhost'],'scope':_0x596c6a(0x207)},_0x17f365);_0x17f365?.['trackPhaseEnd'](_0x2dfed8[_0x596c6a(0x1f3)],{'isFirstRun':_0x10c7bc,'profileReady':_0x54f3f3[_0x596c6a(0x1e3)],'userSkipped':_0x54f3f3[_0x596c6a(0x222)]});}else console[_0x596c6a(0x1b4)](_0x2dfed8['auXui'](_0x2dfed8[_0x596c6a(0x1d7)](_0x2dfed8['zHxNt'](_0x596c6a(0x1f1),_0x596c6a(0x220)+_0x2dfed8[_0x596c6a(0x20f)](bold,_0x2dfed8['IGsaJ']))+_0x596c6a(0x1e9),_0x596c6a(0x1e8)),_0x596c6a(0x1da)));}if(_0x5007d6)console['log'](_0x2dfed8[_0x596c6a(0x21a)]),console['log'](_0x2dfed8['KPQMV']),console['log'](_0x2dfed8[_0x596c6a(0x20d)]),console[_0x596c6a(0x1b4)](_0x2dfed8['RUPOS']);else{const _0x297575=_0x2dfed8['PKgYI'](bold,_0x2dfed8['tbgvU']);console['log'](_0x2dfed8[_0x596c6a(0x1c7)](_0x2dfed8['auXui'](_0x2dfed8[_0x596c6a(0x1bf)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x297575+_0x596c6a(0x1b7),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),_0x596c6a(0x1db)),_0x596c6a(0x1bb)));}}
1
+ const _0x5e927d=_0x5929;(function(_0xeca39e,_0x10267e){const _0x1a4f35=_0x5929,_0x329777=_0xeca39e();while(!![]){try{const _0x447d0f=parseInt(_0x1a4f35(0x224))/0x1+parseInt(_0x1a4f35(0x220))/0x2+-parseInt(_0x1a4f35(0x1c3))/0x3*(parseInt(_0x1a4f35(0x1ed))/0x4)+-parseInt(_0x1a4f35(0x1d6))/0x5*(parseInt(_0x1a4f35(0x1da))/0x6)+parseInt(_0x1a4f35(0x1cb))/0x7+-parseInt(_0x1a4f35(0x1cd))/0x8*(-parseInt(_0x1a4f35(0x1e9))/0x9)+-parseInt(_0x1a4f35(0x221))/0xa;if(_0x447d0f===_0x10267e)break;else _0x329777['push'](_0x329777['shift']());}catch(_0x5d6cc4){_0x329777['push'](_0x329777['shift']());}}}(_0xdab2,0x8cbfb));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x5a99ac 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';function _0xdab2(){const _0x110ad6=['4127076noCoTw','HcFpc','.gitignore','apvoh','1786636kbwOVl','confirm','url','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','organizationName','BnZQn','withDeps','GITHUB_ENV','message','✓\x20Created\x20~/.ranger/\x20directory','rEnCJ','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','PSBGd','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','existing_token','stdin','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','OWtac','hKQpC','opencode','RToqD','provided_token','success','uHyVP','LJkKs','✓\x20Authenticated\x20to\x20','plugin','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','install','ranger\x20profile\x20add\x20<name>','skipAuth','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','XEoPJ','skipChromium','\x20\x20npx\x20playwright@','stdout','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','YPrus','profile','user','platform','\x0aTo\x20set\x20up\x20a\x20profile\x20for\x20your\x20app,\x20run:','local','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','error','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','skills','ZHUGN','OviPV','Installation\x20failed\x20with\x20exit\x20code\x20','945998eKRvsA','16730820fQvtIB','ajBon','force','616921cuiDLR','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','1.58.2','method','/ranger:enable','\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','ranger\x20setup\x20--scope=','oanNd','xxxoX','3dpbyeg','RlcLl','trackPhaseEnd','...','\x0aIn\x20Claude\x20Code,\x20run\x20','resolve','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','playwright@','6597801ereioB','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','16PbJTaB','chromium','scope','rxgBp','sqlvB','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','✓\x20Created\x20.ranger/.gitignore','BDrtg','ranger','5iCvAeZ','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','log','\x0aInstalling\x20Chromium\x20browser...\x0a','1520058CQnQSu','trackPhaseStart','\x0a\x20\x20(opens\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20once)','ebAlN','\x0a🚀\x20Ranger\x20Setup\x0a','close','SsHoV','caKQS','\x20(fallback\x20version)','playwright/package.json','wyLSe',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','FaWzb','\x20install\x20chromium','DQfcY'];_0xdab2=function(){return _0x110ad6;};return _0xdab2();}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=_0x5e927d(0x226);const bold=_0x413cbd=>'\x1b[1m'+_0x413cbd+'\x1b[0m';export function getPlaywrightVersion(){const _0x37eabc=_0x5e927d,_0x3361d7={'riRNx':_0x37eabc(0x1e3)};try{const _0x477ad3=require[_0x37eabc(0x1c8)](_0x3361d7['riRNx']),_0x48c080=require(_0x477ad3);return _0x48c080['version'];}catch{return null;}}export function installChromiumBinary(_0x194c43,_0x34960b=![]){const _0x270e4b=_0x5e927d,_0x5729d6={'hKQpC':_0x270e4b(0x1ce),'rxgBp':function(_0x3fcbf1,_0xfb6a8c,_0x8d975f,_0x35c97a){return _0x3fcbf1(_0xfb6a8c,_0x8d975f,_0x35c97a);},'BDrtg':'ignore','GQicy':'inherit'};return new Promise((_0x95fd54,_0x5c4f98)=>{const _0x2d0ae6=_0x270e4b,_0x3989e0=[_0x2d0ae6(0x1ca)+_0x194c43,_0x2d0ae6(0x20a),..._0x34960b?['--with-deps']:[],_0x5729d6[_0x2d0ae6(0x1ff)]],_0x21643c=_0x5729d6[_0x2d0ae6(0x1d0)](spawn,'npx',_0x3989e0,{'stdio':[_0x5729d6[_0x2d0ae6(0x1d4)],_0x5729d6['GQicy'],'inherit'],'shell':process[_0x2d0ae6(0x216)]==='win32'});_0x21643c['on'](_0x2d0ae6(0x1df),_0x3f601e=>{const _0x382d2d=_0x2d0ae6;_0x3f601e===0x0?_0x95fd54():_0x5c4f98(new Error(_0x382d2d(0x21f)+_0x3f601e));}),_0x21643c['on']('error',_0x3a1384=>{_0x5c4f98(_0x3a1384);});});}export async function authenticate(_0x397b6f){const _0x44ab24=_0x5e927d,_0x582b8d={'aXwyk':function(_0x236c50){return _0x236c50();},'FaWzb':function(_0x4b2114,_0x46c1a4){return _0x4b2114(_0x46c1a4);},'oanNd':'device_auth','HcFpc':function(_0x3c490f,_0xb9ac85){return _0x3c490f(_0xb9ac85);},'IzRAY':'✓\x20Stored\x20credentials\x20locally','rEnCJ':_0x44ab24(0x202)};if(!_0x397b6f){const _0x496856=await getToken();if(_0x496856){const _0x2a460d=await getCurrentUser(_0x496856);if(_0x2a460d[_0x44ab24(0x203)])return console['log']('✓\x20Already\x20authenticated\x20to\x20'+_0x2a460d[_0x44ab24(0x215)][_0x44ab24(0x1f1)]),{'token':_0x496856,'method':_0x44ab24(0x1fb)};}try{_0x397b6f=await _0x582b8d['aXwyk'](runDeviceAuthFlow);}catch(_0x28a76e){throw new Error('Authentication\x20failed:\x20'+(_0x28a76e instanceof Error?_0x28a76e[_0x44ab24(0x1f5)]:_0x28a76e));}const _0x43640b=await _0x582b8d[_0x44ab24(0x1e6)](getCurrentUser,_0x397b6f);if(!_0x43640b[_0x44ab24(0x203)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x43640b[_0x44ab24(0x21a)]);return console[_0x44ab24(0x1d8)](_0x44ab24(0x206)+_0x43640b['user']['organizationName']),{'token':_0x397b6f,'method':_0x582b8d[_0x44ab24(0x1c1)]};}console[_0x44ab24(0x1d8)]('Validating\x20API\x20token...');const _0x32bbc9=await _0x582b8d[_0x44ab24(0x1ea)](getCurrentUser,_0x397b6f);if(!_0x32bbc9[_0x44ab24(0x203)]){if(_0x32bbc9['status'])throw new Error('Authentication\x20failed:\x20'+_0x32bbc9['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x44ab24(0x212)+_0x32bbc9[_0x44ab24(0x21a)]+_0x44ab24(0x1fa));}return console[_0x44ab24(0x1d8)](_0x44ab24(0x206)+_0x32bbc9[_0x44ab24(0x215)]['organizationName']),await storeToken(_0x397b6f),console[_0x44ab24(0x1d8)](process['env'][_0x44ab24(0x1f4)]?'✓\x20Exported\x20credentials\x20for\x20CI':_0x582b8d['IzRAY']),{'token':_0x397b6f,'method':_0x582b8d[_0x44ab24(0x1f7)]};}export async function ensureRangerDir(_0x29cb49){const _0x4757f6=_0x5e927d,_0x529705={'YPrus':function(_0x161129){return _0x161129();},'RlcLl':'✓\x20~/.ranger/\x20directory\x20already\x20exists'};void _0x29cb49;const _0x3b119b=_0x529705[_0x4757f6(0x213)](getRangerHomeDir);return!existsSync(_0x3b119b)?(await mkdir(_0x3b119b,{'recursive':!![]}),console['log'](_0x4757f6(0x1f6)),{'path':_0x3b119b,'installed':!![]}):(console[_0x4757f6(0x1d8)](_0x529705[_0x4757f6(0x1c4)]),{'path':_0x3b119b,'installed':![]});}export async function ensureChromium(_0x20d4bf=![]){const _0x4ea1d3=_0x5e927d,_0x32c355={'xxxoX':function(_0x5297ea){return _0x5297ea();},'FzebM':function(_0x284518,_0x52ffb2){return _0x284518??_0x52ffb2;},'XEoPJ':_0x4ea1d3(0x1ee),'apvoh':'install','uHyVP':_0x4ea1d3(0x1d9),'LJkKs':function(_0x2fe5ac,_0x608454,_0x508719){return _0x2fe5ac(_0x608454,_0x508719);},'tmCvl':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','bHEMX':_0x4ea1d3(0x1fd),'qyQuU':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0x2ee9f5=![];try{const _0xbd3c01=chromium['executablePath']();_0x2ee9f5=existsSync(_0xbd3c01);}catch{_0x2ee9f5=![];}if(_0x2ee9f5)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0x179ca0=_0x32c355[_0x4ea1d3(0x1c2)](getPlaywrightVersion),_0x44d302=_0x32c355['FzebM'](_0x179ca0,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x37c3fc=!_0x179ca0,_0x72d257=process[_0x4ea1d3(0x1fc)]['isTTY']&&process[_0x4ea1d3(0x211)]['isTTY'];let _0x177a26=!![];if(_0x72d257){const {install:_0x176916}=await _0x5a99ac['prompt']([{'type':_0x32c355[_0x4ea1d3(0x20e)],'name':_0x32c355[_0x4ea1d3(0x1ec)],'message':_0x37c3fc?_0x4ea1d3(0x225)+_0x44d302+'\x20now?':'The\x20required\x20version\x20('+_0x44d302+_0x4ea1d3(0x1e5),'default':!![]}]);_0x177a26=_0x176916;}else console['log'](_0x4ea1d3(0x21b)+_0x44d302+(_0x37c3fc?_0x4ea1d3(0x1e2):'')+_0x4ea1d3(0x1c6));if(_0x177a26){console['log'](_0x32c355[_0x4ea1d3(0x204)]);try{await _0x32c355[_0x4ea1d3(0x205)](installChromiumBinary,_0x44d302,_0x20d4bf),console[_0x4ea1d3(0x1d8)](_0x32c355['tmCvl']);}catch(_0x2068f3){console['error'](_0x32c355['bHEMX'],_0x2068f3 instanceof Error?_0x2068f3[_0x4ea1d3(0x1f5)]:_0x2068f3),console['log']('You\x20can\x20install\x20it\x20manually\x20by\x20running:'),console[_0x4ea1d3(0x1d8)](_0x4ea1d3(0x210)+_0x44d302+'\x20install\x20chromium');}}else console[_0x4ea1d3(0x1d8)](_0x32c355['qyQuU']),console[_0x4ea1d3(0x1d8)](_0x4ea1d3(0x1c9)),console[_0x4ea1d3(0x1d8)]('\x20\x20npx\x20playwright@'+_0x44d302+_0x4ea1d3(0x1e7));return!![];}function _0x5929(_0x4b4644,_0x2ca1d1){_0x4b4644=_0x4b4644-0x1bf;const _0xdab220=_0xdab2();let _0x592921=_0xdab220[_0x4b4644];return _0x592921;}export async function writeRangerGitignore(_0x18393f){const _0x392300=_0x5e927d,_0x3087d8={'jkBjd':function(_0x178b9f,_0x3daa96,_0x554528){return _0x178b9f(_0x3daa96,_0x554528);},'VXdtn':_0x392300(0x1eb),'DQfcY':_0x392300(0x1d3)},_0x535633=_0x3087d8['jkBjd'](join,_0x18393f,_0x3087d8['VXdtn']),_0x245772=_0x392300(0x1bf);await writeFile(_0x535633,_0x245772),console[_0x392300(0x1d8)](_0x3087d8[_0x392300(0x1e8)]);}export async function ensureLocalEnv(_0x2b9a5e,_0x3490c0){const _0x4f14f1=_0x5e927d,_0x41b113={'SuGyz':'user','mApZl':_0x4f14f1(0x1f0),'CUIZx':function(_0x2b514d){return _0x2b514d();},'wyLSe':_0x4f14f1(0x218),'KeqTh':'✓\x20Local\x20profile\x20already\x20exists','sdoty':function(_0x12629b,_0x808961,_0x2a001d,_0x4918e0){return _0x12629b(_0x808961,_0x2a001d,_0x4918e0);},'mjdGu':function(_0x5ec6e1,_0x887f62){return _0x5ec6e1 instanceof _0x887f62;}};if(!findGitRoot()&&_0x2b9a5e?.['scope']!==_0x41b113['SuGyz'])return console[_0x4f14f1(0x1d8)](_0x41b113['mApZl']),{'ready':![],'skipped':!![]};const _0x221f01=_0x2b9a5e?.[_0x4f14f1(0x1cf)]==='user'?_0x41b113['CUIZx'](getRangerHomeDir):undefined;if(findExistingEnv(_0x4f14f1(0x218),{'locations':[_0x41b113[_0x4f14f1(0x1e4)]],'rangerDir':_0x221f01}))return console[_0x4f14f1(0x1d8)](_0x41b113['KeqTh']),{'ready':!![],'skipped':![]};try{return await _0x41b113['sdoty'](addEnv,'local',{'url':_0x2b9a5e?.['url'],'force':_0x2b9a5e?.[_0x4f14f1(0x223)],'allowInsecureLocalhost':_0x2b9a5e?.['allowInsecureLocalhost'],'scope':_0x2b9a5e?.['scope']},_0x3490c0),{'ready':!![],'skipped':![]};}catch(_0x273006){return console['error']('\x0a❌\x20Profile\x20setup\x20failed:',_0x41b113['mjdGu'](_0x273006,Error)?_0x273006[_0x4f14f1(0x1f5)]:_0x273006),{'ready':![],'skipped':![]};}}export async function start(_0x1fcfc9,_0xb9e0f,_0x233c79){const _0x1a7c95=_0x5e927d,_0x321941={'sqlvB':_0x1a7c95(0x1de),'KGwPw':function(_0x3440ae,_0x648d33){return _0x3440ae!==_0x648d33;},'SsHoV':function(_0x251727,_0x300a92){return _0x251727+_0x300a92;},'ajBon':'user','ebAlN':'auth','dSBEh':function(_0x563cc1,_0x5f2698){return _0x563cc1(_0x5f2698);},'OviPV':function(_0x8a5792,_0x3ae1a3){return _0x8a5792(_0x3ae1a3);},'OWtac':'chromium','favhu':function(_0xcf28ef,_0x251241){return _0xcf28ef(_0x251241);},'VRHjp':function(_0x52258f){return _0x52258f();},'RToqD':_0x1a7c95(0x200),'fqQOr':function(_0x53a881,_0x2c82c8){return _0x53a881 instanceof _0x2c82c8;},'ZHUGN':'skills','RKNBh':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','DWXtE':_0x1a7c95(0x214),'PSBGd':_0x1a7c95(0x1d7),'BnZQn':function(_0x27b9fa,_0x5aeb72){return _0x27b9fa(_0x5aeb72);},'caKQS':function(_0x41aa61,_0x2000d0){return _0x41aa61+_0x2000d0;}};console['log'](_0x321941[_0x1a7c95(0x1d1)]);_0xb9e0f?.['scope']!==undefined&&_0x321941['KGwPw'](_0xb9e0f[_0x1a7c95(0x1cf)],_0x1a7c95(0x215))&&(console['error'](_0x321941[_0x1a7c95(0x1e0)](_0x1a7c95(0x1c0)+String(_0xb9e0f['scope'])+'\x20is\x20no\x20longer\x20supported.\x20',_0x1a7c95(0x20d))+'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.'),process['exit'](0x1));_0xb9e0f={..._0xb9e0f,'scope':_0x321941[_0x1a7c95(0x222)]};const _0x5460c1=!existsSync(getRangerHomeDir());await ensureRangerDir(_0x321941['ajBon']);if(_0xb9e0f?.[_0x1a7c95(0x20c)])console['log']('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x233c79?.[_0x1a7c95(0x1c5)](_0x321941[_0x1a7c95(0x1dd)],{'isFirstRun':_0x5460c1,'method':'skipped'});else{_0x233c79?.['trackPhaseStart'](_0x321941[_0x1a7c95(0x1dd)]);const _0x907eac=await _0x321941['dSBEh'](authenticate,_0x1fcfc9);_0x233c79?.['trackPhaseEnd'](_0x321941['ebAlN'],{'isFirstRun':_0x5460c1,'method':_0x907eac[_0x1a7c95(0x227)]});}_0x233c79?.[_0x1a7c95(0x1db)](_0x1a7c95(0x1ce));_0xb9e0f?.[_0x1a7c95(0x20f)]?console[_0x1a7c95(0x1d8)](_0x1a7c95(0x219)):await _0x321941[_0x1a7c95(0x21e)](ensureChromium,_0xb9e0f?.[_0x1a7c95(0x1f3)]);_0x233c79?.[_0x1a7c95(0x1c5)](_0x321941[_0x1a7c95(0x1fe)],{'isFirstRun':_0x5460c1,'skipped':!!_0xb9e0f?.[_0x1a7c95(0x20f)]}),console['log'](_0x1a7c95(0x209));const _0x194205=_0xb9e0f?.[_0x1a7c95(0x1cf)],_0x2698f1=_0xb9e0f?.['opencode']??![];let _0x16b975=null;_0x2698f1?(_0x233c79?.[_0x1a7c95(0x1db)](_0x1a7c95(0x207)),_0x16b975=await _0x321941['favhu'](ensureOpencodePluginConfig,_0x194205),_0x233c79?.[_0x1a7c95(0x1c5)](_0x1a7c95(0x207),{'isFirstRun':_0x5460c1,'opencode':!![]})):(_0x233c79?.['trackPhaseStart']('plugin'),await ensureClaudePlugin(_0x194205),_0x233c79?.[_0x1a7c95(0x1c5)](_0x1a7c95(0x207),{'isFirstRun':_0x5460c1}));if(_0x2698f1&&_0x16b975){_0x233c79?.[_0x1a7c95(0x1db)]('skills');try{await installSkill(_0x1a7c95(0x1d5),{'level':_0x16b975[_0x1a7c95(0x1cf)],'cliVersion':_0x321941['VRHjp'](getCurrentVersion),'platform':_0x321941[_0x1a7c95(0x201)]}),_0x233c79?.[_0x1a7c95(0x1c5)]('skills',{'isFirstRun':_0x5460c1,'opencode':!![]});}catch(_0x2123d8){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x321941['fqQOr'](_0x2123d8,Error)?_0x2123d8[_0x1a7c95(0x1f5)]:_0x2123d8),_0x233c79?.['trackPhaseEnd'](_0x1a7c95(0x21c),{'isFirstRun':_0x5460c1,'opencode':!![],'failed':!![]});}}else _0x233c79?.['trackPhaseStart'](_0x321941[_0x1a7c95(0x21d)]),await _0x321941[_0x1a7c95(0x21e)](ensureClaudeSkills,_0x194205),_0x233c79?.[_0x1a7c95(0x1c5)]('skills',{'isFirstRun':_0x5460c1});if(_0xb9e0f?.[_0x1a7c95(0x20c)])console[_0x1a7c95(0x1d8)](_0x321941['RKNBh']);else{if(_0xb9e0f?.[_0x1a7c95(0x1ef)]){_0x233c79?.[_0x1a7c95(0x1db)](_0x1a7c95(0x214));const _0x53a93d=await ensureLocalEnv({'url':_0xb9e0f[_0x1a7c95(0x1ef)],'force':_0xb9e0f?.[_0x1a7c95(0x223)],'allowInsecureLocalhost':_0xb9e0f?.['allowInsecureLocalhost'],'scope':_0x1a7c95(0x215)},_0x233c79);_0x233c79?.[_0x1a7c95(0x1c5)](_0x321941['DWXtE'],{'isFirstRun':_0x5460c1,'profileReady':_0x53a93d['ready'],'userSkipped':_0x53a93d['skipped']});}else console[_0x1a7c95(0x1d8)](_0x321941['SsHoV'](_0x1a7c95(0x217)+('\x0a\x20\x20'+bold(_0x1a7c95(0x20b))),_0x1a7c95(0x1dc))+'\x0a\x0aFor\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:'+'\x0a\x20\x20https://docs.ranger.net/main/concepts/profiles');}if(_0x2698f1)console['log'](_0x321941[_0x1a7c95(0x1f9)]),console['log'](_0x1a7c95(0x208)),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x1c1551=_0x321941[_0x1a7c95(0x1f2)](bold,_0x1a7c95(0x228));console['log'](_0x321941['SsHoV'](_0x321941[_0x1a7c95(0x1e1)](_0x1a7c95(0x1c7)+_0x1c1551+'\x20and\x20prompt\x20the\x20coding',_0x1a7c95(0x1f8)),_0x1a7c95(0x1cc))+_0x1a7c95(0x1d2));}}
@@ -1 +1 @@
1
- const _0x54954e=_0x3c88;(function(_0x3053d3,_0x527049){const _0x4b4cea=_0x3c88,_0x4f14e2=_0x3053d3();while(!![]){try{const _0x3dad6a=parseInt(_0x4b4cea(0x14d))/0x1*(-parseInt(_0x4b4cea(0xfe))/0x2)+parseInt(_0x4b4cea(0xf2))/0x3*(parseInt(_0x4b4cea(0x111))/0x4)+-parseInt(_0x4b4cea(0xea))/0x5*(-parseInt(_0x4b4cea(0x145))/0x6)+-parseInt(_0x4b4cea(0x13a))/0x7*(parseInt(_0x4b4cea(0x123))/0x8)+parseInt(_0x4b4cea(0x143))/0x9+parseInt(_0x4b4cea(0x107))/0xa+-parseInt(_0x4b4cea(0x144))/0xb*(parseInt(_0x4b4cea(0x147))/0xc);if(_0x3dad6a===_0x527049)break;else _0x4f14e2['push'](_0x4f14e2['shift']());}catch(_0x34b089){_0x4f14e2['push'](_0x4f14e2['shift']());}}}(_0x3968,0xc8fc2));import{readFile,readdir}from'fs/promises';function _0x3c88(_0x29798d,_0x3738e4){_0x29798d=_0x29798d-0xe6;const _0x3968e2=_0x3968();let _0x3c88de=_0x3968e2[_0x29798d];return _0x3c88de;}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';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=_0x5c773b=>'\x1b[1m'+_0x5c773b+_0x54954e(0x135),link=(_0x29e6a1,_0x33d27c)=>_0x54954e(0x148)+_0x29e6a1+'\x07'+(_0x33d27c||_0x29e6a1)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x317634=_0x54954e,_0x33c722={'KVRnf':_0x317634(0xe8),'wAljD':_0x317634(0xfc),'Yddqr':_0x317634(0x149),'plEDN':'not_configured','fLplX':_0x317634(0x10c),'ALwOb':_0x317634(0x11a),'MiuYD':_0x317634(0x130),'UbdMC':_0x317634(0x137)};return new Promise(_0x177bc7=>{const _0x2400d2=_0x317634,_0x3d8336={'MwESw':_0x33c722[_0x2400d2(0x115)],'wVfqC':_0x33c722[_0x2400d2(0x110)],'cSeDW':_0x33c722[_0x2400d2(0x113)],'MGOSa':function(_0x34ee40,_0x2d4a66){return _0x34ee40(_0x2d4a66);},'HTrWB':_0x33c722['plEDN']},_0x4718c4=spawn('opencode',[_0x33c722['fLplX'],_0x33c722[_0x2400d2(0x14e)]],{'stdio':[_0x33c722['MiuYD'],'pipe','pipe']});let _0x4ffaf5='';_0x4718c4[_0x2400d2(0x11b)]?.['on']('data',_0x403523=>{const _0x5b0027=_0x2400d2;_0x4ffaf5+=_0x403523[_0x5b0027(0xf1)]();}),_0x4718c4['stderr']?.['on'](_0x33c722[_0x2400d2(0x119)],_0x10b89f=>{_0x4ffaf5+=_0x10b89f['toString']();}),_0x4718c4['on'](_0x2400d2(0x109),()=>{_0x177bc7({'status':'not_installed'});}),_0x4718c4['on'](_0x2400d2(0x128),_0x38d9ac=>{const _0x50ac10=_0x2400d2;if(_0x38d9ac!==0x0){_0x177bc7({'status':_0x50ac10(0x14f)});return;}const _0x26387f=_0x4ffaf5['trim']();let _0x1d17fd=null;if(_0x26387f)try{_0x1d17fd=JSON['parse'](_0x26387f);}catch{const _0x3384df=_0x26387f['match'](/\{[\s\S]*\}$/);if(_0x3384df)try{_0x1d17fd=JSON['parse'](_0x3384df[0x0]);}catch{_0x1d17fd=null;}}const _0x1a34ab=Array['isArray'](_0x1d17fd?.['plugin'])?_0x1d17fd?.[_0x50ac10(0xf6)]:[],_0x75775c=_0x1a34ab['some'](_0x406810=>{const _0x295c5b=_0x50ac10;if(typeof _0x406810!==_0x3d8336['MwESw'])return![];return _0x406810['includes'](_0x295c5b(0x14b))||_0x406810[_0x295c5b(0x105)](_0x3d8336[_0x295c5b(0x14a)]);});if(_0x75775c){_0x177bc7({'status':_0x3d8336['cSeDW'],'details':_0x1a34ab[_0x50ac10(0xf8)]>0x0?_0x1a34ab['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x1a34ab['length']>0x0){_0x3d8336[_0x50ac10(0xf0)](_0x177bc7,{'status':_0x3d8336['HTrWB'],'details':_0x1a34ab['length']+'\x20plugin(s)\x20configured'});return;}_0x3d8336[_0x50ac10(0xf0)](_0x177bc7,{'status':_0x50ac10(0x11e)});});});}async function getSkillsFromDir(_0x4a1428,_0x1ff255){const _0x4b848c=_0x54954e,_0x4a9667={'nzGvf':function(_0x446dc6,_0x9423a6){return _0x446dc6(_0x9423a6);},'OtxBg':function(_0x4fcb3f,_0x23f049,_0x54c405){return _0x4fcb3f(_0x23f049,_0x54c405);},'pKByD':'SKILL.md','CLnKv':function(_0x55efe6,_0x54da81){return _0x55efe6(_0x54da81);},'udWZs':function(_0x308637,_0x179c59,_0xd09979){return _0x308637(_0x179c59,_0xd09979);}};if(!_0x4a9667[_0x4b848c(0x131)](existsSync,_0x4a1428))return[];const _0x5373d3=[];try{const _0x354ee2=await _0x4a9667[_0x4b848c(0xee)](readdir,_0x4a1428,{'withFileTypes':!![]});for(const _0x2cfeb1 of _0x354ee2){if(_0x2cfeb1[_0x4b848c(0x146)]()){const _0x5f29ad=join(_0x4a1428,_0x2cfeb1[_0x4b848c(0x150)],_0x4a9667['pKByD']);if(_0x4a9667['CLnKv'](existsSync,_0x5f29ad)){let _0x11351d=_0x2cfeb1['name'];try{const _0x253b14=await _0x4a9667[_0x4b848c(0x104)](readFile,_0x5f29ad,_0x4b848c(0x11f)),_0x50cc8a=_0x253b14['match'](/name:\s*(.+)/);_0x50cc8a&&(_0x11351d=_0x50cc8a[0x1]['trim']());}catch{}_0x5373d3[_0x4b848c(0x14c)]({'name':_0x2cfeb1[_0x4b848c(0x150)],'displayName':_0x11351d,'path':_0x5f29ad,'level':_0x1ff255});}}}}catch{return[];}return _0x5373d3;}function _0x3968(){const _0x2641fa=['project','bTqBh','\x0a---\x20Profiles\x20---','\x20\x20\x20\x20Session:\x20','DEBUG','string','VSzFL','615SGMBIE','settingsPath','version','No\x20profiles\x20configured','OtxBg','\x0a---\x20Claude\x20Code\x20Plugin\x20---','MGOSa','toString','9IvaWri','YoAbc','rlUKs','scope','plugin','GIMSD','length','ranger@trailhead','UAGhE','path','opencode-plugin','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','14426jDbZbQ','disabled','all','map','Xsfmt','cwd','udWZs','includes','PWqdF','14702160UgEQTI','organizationName','error','\x0a---\x20OpenCode\x20Plugin\x20---','unknown','debug','\x20\x20\x20\x20','\x20\x20Run:\x20ranger\x20update','\x0a\x20\x20No\x20active\x20profile\x20set','wAljD','1734556QucfWz','hasEncryptedAuth','Yddqr','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','KVRnf','TClPI','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','no\x20session','UbdMC','config','stdout','has','\x0a📊\x20Ranger\x20Status\x0a','not_configured','utf-8','\x20(up\x20to\x20date)','KdKdi','Root:\x20','1208edwPIJ','\x20\x20Not\x20installed','\x20\x20\x20\x20Auth:\x20','uqyWQ','success','close','join','isActive','\x20\x20Run:\x20ranger\x20setup\x20--opencode','\x20\x20Project-level:','\x20local','\x20\x20Run:\x20ranger\x20skillup','filter','ignore','nzGvf','enabled','Organization:\x20','details','\x1b[0m','env','data',':\x20installed\x20(','log','5348grwCdt','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','cached\x20(updated\x20','displayName','hasPlaintextAuth','Version:\x20','lKRNJ','QUfWc','\x20\x20\x20\x20Settings:\x20','3658284lcilpt','29330312PSOLur','63774VfLIGy','isDirectory','12BamHwL','\x1b]8;;file://','configured','wVfqC','@ranger-testing/opencode-plugin','push','122kvtOFA','ALwOb','not_installed','name'];_0x3968=function(){return _0x2641fa;};return _0x3968();}async function getInstalledSkills(){const _0x2a73f=_0x54954e,_0x2febdb={'UWoxR':function(_0x215afd,_0x1e35b7,_0x1bc5cc){return _0x215afd(_0x1e35b7,_0x1bc5cc);},'pGrgQ':function(_0x119106){return _0x119106();}},[_0x388bc7,_0x32abe0]=await Promise[_0x2a73f(0x100)]([_0x2febdb['UWoxR'](getSkillsFromDir,_0x2febdb['pGrgQ'](getProjectSkillsDir),_0x2a73f(0x151)),_0x2febdb['UWoxR'](getSkillsFromDir,getUserSkillsDir(),'user')]);return{'project':_0x388bc7,'user':_0x32abe0};}async function getEnvironments(){const _0xc775d5={'Xsfmt':'settings.json','ZvgMF':function(_0x52802b,_0x2dd05e){return _0x52802b(_0x2dd05e);},'ZbDhG':'(not\x20found)'},{envNames:_0x2aadde,activeEnv:_0x2806fb}=await getEnvNames(),_0x4fece1=getRangerDir();if(!existsSync(_0x4fece1))return{'envs':[],'activeEnv':null};const _0x3bb61b=_0x2aadde['map'](_0x1ddcf0=>{const _0x48e338=_0x3c88,_0x18e008=getEnvDir(_0x1ddcf0),_0x3be000=join(_0x18e008,_0xc775d5[_0x48e338(0x102)]),_0x456765=join(_0x18e008,'auth.json'),_0xb72b4=join(_0x18e008,'auth.json.enc');return{'name':_0x1ddcf0,'settingsPath':_0xc775d5['ZvgMF'](existsSync,_0x3be000)?_0x3be000:_0xc775d5['ZbDhG'],'hasPlaintextAuth':existsSync(_0x456765),'hasEncryptedAuth':_0xc775d5['ZvgMF'](existsSync,_0xb72b4),'isActive':_0x1ddcf0===_0x2806fb};});return{'envs':_0x3bb61b,'activeEnv':_0x2806fb};}export async function status(){const _0xd2682f=_0x54954e,_0x31655b={'bTqBh':function(_0x32e7f3,_0x8e5526){return _0x32e7f3(_0x8e5526);},'VSzFL':function(_0xa6e807,_0x36baa9){return _0xa6e807(_0x36baa9);},'gwSoZ':function(_0x577ae2,_0x3ba73e){return _0x577ae2(_0x3ba73e);},'rwpEk':function(_0x3988ce,_0x1793f9){return _0x3988ce(_0x1793f9);},'oJBlY':function(_0x46d14c){return _0x46d14c();},'lKRNJ':function(_0x1942fd){return _0x1942fd();},'CsceK':function(_0x3b5fd5,_0x29e98e){return _0x3b5fd5(_0x29e98e);},'CxOEh':function(_0x1e34c1){return _0x1e34c1();},'hCYYH':function(_0x4fc09b){return _0x4fc09b();},'GIMSD':_0xd2682f(0x10a),'QWSnU':function(_0x16dcc2){return _0x16dcc2();},'CWBqJ':function(_0x4131d1,_0xaeed42){return _0x4131d1===_0xaeed42;},'mansY':_0xd2682f(0x149),'UAGhE':'@ranger-testing/opencode-plugin','KdKdi':function(_0x1e401f,_0x499899){return _0x1e401f===_0x499899;},'rlUKs':'\x20\x20Not\x20configured','JOyjz':_0xd2682f(0x12b),'QUfWc':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','uqyWQ':_0xd2682f(0xef),'YxxwV':_0xd2682f(0x10b),'tGHZP':_0xd2682f(0x124),'Sazrl':'\x0a---\x20Skills\x20---','gciEy':function(_0x16c5c8,_0x276414){return _0x16c5c8+_0x276414;},'PWqdF':function(_0x2e1ac9,_0x4c0b24,_0x2fbdd2){return _0x2e1ac9(_0x4c0b24,_0x2fbdd2);},'qoaeg':function(_0x3d95cd,_0x3b2c04){return _0x3d95cd>_0x3b2c04;},'YoAbc':_0xd2682f(0x153),'yqlfC':function(_0x4fef68){return _0x4fef68();},'rZXRg':function(_0x1e30c4,_0x436d85){return _0x1e30c4+_0x436d85;},'RtAAn':function(_0x474727,_0x3cd2eb){return _0x474727>_0x3cd2eb;},'IAtaM':function(_0x2b70f5,_0x351d4a){return _0x2b70f5>_0x351d4a;},'TClPI':'\x20(active)','fgfZI':'(not\x20found)'};console['log'](_0xd2682f(0x11d));const _0x45fea1=process[_0xd2682f(0x103)](),_0x1abbe4=getRangerDir();if(!_0x31655b[_0xd2682f(0x152)](existsSync,_0x1abbe4)){console['log']('Root:\x20'+link(_0x45fea1,_0x31655b[_0xd2682f(0xe9)](bold,_0x31655b['gwSoZ'](basename,_0x45fea1)))),console['log'](_0xd2682f(0x13b)),console[_0xd2682f(0x139)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0xd2682f(0x139)](_0xd2682f(0x122)+link(_0x45fea1,_0x31655b['gwSoZ'](bold,_0x31655b['rwpEk'](basename,_0x45fea1))));const _0x84951d=getCurrentVersion(),_0x23db44=_0x31655b['oJBlY'](getLatestVersion);if(_0x23db44['version']&&_0x23db44[_0xd2682f(0xec)]!==_0x84951d)console[_0xd2682f(0x139)](_0xd2682f(0x13f)+_0x84951d+'\x20(latest:\x20'+_0x23db44[_0xd2682f(0xec)]+')'),console['log'](_0xd2682f(0x10e));else _0x23db44[_0xd2682f(0xec)]?console[_0xd2682f(0x139)]('Version:\x20'+_0x84951d+_0xd2682f(0x120)):console[_0xd2682f(0x139)](_0xd2682f(0x13f)+_0x84951d);const _0x480c38=await _0x31655b[_0xd2682f(0x140)](getToken);if(_0x480c38){const _0x350dcd=await _0x31655b['CsceK'](getCurrentUser,_0x480c38);_0x350dcd[_0xd2682f(0x127)]?console[_0xd2682f(0x139)](_0xd2682f(0x133)+bold(_0x350dcd['user'][_0xd2682f(0x108)])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0xd2682f(0x139)]('API\x20Token:\x20✗\x20Not\x20found'),console[_0xd2682f(0x139)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0xd2682f(0x136)][_0xd2682f(0xe7)]&&(console[_0xd2682f(0x139)]('API\x20Environment:\x20'+_0x31655b['CxOEh'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+_0x31655b['hCYYH'](getApiBaseUrl)));console[_0xd2682f(0x139)](_0x31655b[_0xd2682f(0xf7)]);const _0xe6148=await _0x31655b['QWSnU'](getOpencodePluginStatus);if(_0x31655b['CWBqJ'](_0xe6148['status'],_0x31655b['mansY']))console['log']('\x20\x20'+bold(_0x31655b[_0xd2682f(0xfa)])+':\x20configured'),_0xe6148[_0xd2682f(0x134)]&&console['log']('\x20\x20'+_0xe6148['details']);else _0x31655b[_0xd2682f(0x121)](_0xe6148['status'],'not_configured')?(console[_0xd2682f(0x139)](_0x31655b[_0xd2682f(0xf4)]),_0xe6148[_0xd2682f(0x134)]&&console[_0xd2682f(0x139)]('\x20\x20'+_0xe6148['details']),console['log'](_0x31655b['JOyjz'])):console[_0xd2682f(0x139)](_0x31655b[_0xd2682f(0x141)]);console['log'](_0x31655b[_0xd2682f(0x126)]);const _0x300893=await getPluginInfo(_0xd2682f(0xf9));if(_0x300893){const _0xf8cdc8=_0x300893[_0xd2682f(0xf5)]||_0x31655b['YxxwV'],_0x120ddc=_0x300893[_0xd2682f(0x132)]?_0xd2682f(0x132):_0xd2682f(0xff);console['log']('\x20\x20'+bold(_0xd2682f(0xf9))+_0xd2682f(0x138)+_0xf8cdc8+',\x20'+_0x120ddc+')');}else console['log'](_0x31655b['tGHZP']),console[_0xd2682f(0x139)](_0xd2682f(0x114));console[_0xd2682f(0x139)](_0x31655b['Sazrl']);const {project:_0xb10494,user:_0x229cd8}=await getInstalledSkills(),_0x9cb307=_0xb10494[_0xd2682f(0x12f)](_0x18bcbb=>RANGER_MANAGED_SKILLS[_0xd2682f(0x105)](_0x18bcbb[_0xd2682f(0x150)])),_0x1785de=_0x229cd8[_0xd2682f(0x12f)](_0x50cb7f=>RANGER_MANAGED_SKILLS[_0xd2682f(0x105)](_0x50cb7f[_0xd2682f(0x150)])),_0x1428eb=_0x31655b['gciEy'](_0x9cb307[_0xd2682f(0xf8)],_0x1785de[_0xd2682f(0xf8)]);if(_0x31655b['KdKdi'](_0x1428eb,0x0))console['log']('No\x20skills\x20installed'),console['log'](_0xd2682f(0x12e));else{if(_0x9cb307[_0xd2682f(0xf8)]>0x0){console['log'](_0xd2682f(0x12c));for(const _0x1efea3 of _0x9cb307){console['log'](_0xd2682f(0x10d)+bold(_0x1efea3['displayName'])+':\x20'+_0x31655b[_0xd2682f(0x106)](link,_0x1efea3[_0xd2682f(0xfb)],basename(_0x1efea3[_0xd2682f(0xfb)])));}}if(_0x31655b['qoaeg'](_0x1785de[_0xd2682f(0xf8)],0x0)){console[_0xd2682f(0x139)]('\x20\x20User-level:');for(const _0x422ac5 of _0x1785de){console[_0xd2682f(0x139)]('\x20\x20\x20\x20'+_0x31655b['VSzFL'](bold,_0x422ac5[_0xd2682f(0x13d)])+':\x20'+link(_0x422ac5['path'],basename(_0x422ac5['path'])));}}}console['log'](_0x31655b[_0xd2682f(0xf3)]);const {envs:_0x4d3a2c,activeEnv:_0x1ede43}=await _0x31655b['CxOEh'](getEnvironments);let _0x235c65=[];if(_0x480c38)try{_0x235c65=await _0x31655b['yqlfC'](listCloudProfiles);}catch{}const _0x2dabee=_0x31655b['rZXRg'](_0x4d3a2c[_0xd2682f(0xf8)],_0x235c65[_0xd2682f(0xf8)]);if(_0x31655b['KdKdi'](_0x2dabee,0x0))console[_0xd2682f(0x139)](_0xd2682f(0xed)),console[_0xd2682f(0x139)](_0xd2682f(0x117));else{if(_0x31655b['RtAAn'](_0x2dabee,0x5)){const _0xb77f09=[];_0x235c65['length']>0x0&&_0xb77f09['push'](_0x235c65['length']+'\x20cloud'),_0x31655b['IAtaM'](_0x4d3a2c['length'],0x0)&&_0xb77f09[_0xd2682f(0x14c)](_0x4d3a2c['length']+_0xd2682f(0x12d)),console[_0xd2682f(0x139)](_0x2dabee+'\x20profiles\x20configured\x20('+_0xb77f09[_0xd2682f(0x129)](',\x20')+')'),_0x1ede43&&console['log']('\x20\x20Active:\x20'+bold(_0x1ede43)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x227afc of _0x235c65){const _0x60e761=_0x227afc['name']===_0x1ede43?'\x20(active)':'';console[_0xd2682f(0x139)]('\x20\x20'+bold(_0x227afc[_0xd2682f(0x150)])+'\x20[cloud]'+_0x60e761);const _0x5b6b06=_0x227afc['sessionUpdatedAt']?_0xd2682f(0x13c)+_0x227afc['sessionUpdatedAt']+')':_0xd2682f(0x118);console['log'](_0xd2682f(0xe6)+_0x5b6b06);}const _0x7e9a43=new Set(_0x235c65[_0xd2682f(0x101)](_0x44f5dc=>_0x44f5dc[_0xd2682f(0x150)]));for(const _0x25b987 of _0x4d3a2c){if(_0x7e9a43[_0xd2682f(0x11c)](_0x25b987['name']))continue;const _0x48842d=_0x25b987[_0xd2682f(0x12a)]?_0x31655b[_0xd2682f(0x116)]:'',_0x45666d=_0x25b987[_0xd2682f(0x112)]?'encrypted':_0x25b987[_0xd2682f(0x13e)]?'plaintext':'none';console['log']('\x20\x20'+_0x31655b['rwpEk'](bold,_0x25b987[_0xd2682f(0x150)])+'\x20[local]'+_0x48842d),console[_0xd2682f(0x139)](_0xd2682f(0x125)+_0x45666d),_0x25b987[_0xd2682f(0xeb)]!==_0x31655b['fgfZI']&&console['log'](_0xd2682f(0x142)+_0x31655b[_0xd2682f(0x106)](link,_0x25b987['settingsPath'],basename(_0x25b987[_0xd2682f(0xeb)])));}if(!_0x1ede43){console['log'](_0xd2682f(0x10f));const _0x36a968=[..._0x235c65['map'](_0x5c063b=>_0x5c063b[_0xd2682f(0x150)]),..._0x4d3a2c[_0xd2682f(0x12f)](_0xb7e5b6=>!_0x7e9a43[_0xd2682f(0x11c)](_0xb7e5b6['name']))['map'](_0x243a7e=>_0x243a7e[_0xd2682f(0x150)])];console['log'](_0xd2682f(0xfd)+_0x36a968['join'](',\x20')+')');}}}console[_0xd2682f(0x139)]('');}
1
+ const _0x33cabd=_0x1055;(function(_0x4f4d32,_0x36fbbd){const _0x53d801=_0x1055,_0x4637a7=_0x4f4d32();while(!![]){try{const _0x1a0408=-parseInt(_0x53d801(0x14d))/0x1*(-parseInt(_0x53d801(0x154))/0x2)+-parseInt(_0x53d801(0x14f))/0x3*(-parseInt(_0x53d801(0x1af))/0x4)+-parseInt(_0x53d801(0x1b1))/0x5*(-parseInt(_0x53d801(0x1ae))/0x6)+parseInt(_0x53d801(0x165))/0x7+parseInt(_0x53d801(0x149))/0x8*(-parseInt(_0x53d801(0x153))/0x9)+parseInt(_0x53d801(0x14b))/0xa*(-parseInt(_0x53d801(0x1b2))/0xb)+parseInt(_0x53d801(0x1a0))/0xc;if(_0x1a0408===_0x36fbbd)break;else _0x4637a7['push'](_0x4637a7['shift']());}catch(_0x111cef){_0x4637a7['push'](_0x4637a7['shift']());}}}(_0x5e3d,0xe8716));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';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{listCloudProfiles}from'./utils/cloudProfile.js';function _0x5e3d(){const _0x9337f=['\x20\x20\x20\x20Settings:\x20','length','parse','map','\x20\x20Not\x20configured','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','Version:\x20','debug','SKILL.md','data','\x0a---\x20Skills\x20---','close','hasEncryptedAuth','filter','IFwQx','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','JeGEV','\x20\x20Run:\x20ranger\x20setup\x20--opencode','encrypted','\x20\x20Project-level:','ecapg','yvYxt','path','scope','No\x20profiles\x20configured','uXxef','no\x20session','ttnby','\x20\x20Run:\x20ranger\x20setup\x20[token]','NAefU','MmTQZ','match','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','QeOqC','3913236zwJXjk','\x20plugin(s)\x20configured','auth.json.enc','sessionUpdatedAt','plugin','zhCyf','OqptM','\x0a\x20\x20No\x20active\x20profile\x20set','\x1b]8;;\x07','isDirectory','tLqfW','some','version','trim','655614tDcTEu','420Cqyhhr','EqBBN','40fgguHz','6611473tNkxjE','auth.json','ranger@trailhead','\x20\x20Active:\x20','hMdzE','includes','\x20\x20Run:\x20ranger\x20update','Organization:\x20','push','has','status','details','\x0a---\x20Claude\x20Code\x20Plugin\x20---','576536KEvste','all','10EYrAqZ','opencode-plugin','4427sAWZtj','settings.json','5097NQCIeH','gBHRZ','toString','success','63yNtoBx','142uKzXdC','stdout','not_configured','kAcJr','thbxn','log','\x20[local]','none','xhlAY','API\x20Environment:\x20','displayName','ZVMXN','name','JdyTS','unknown','MzMTp','isArray','2552417AMJXUt','error','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','\x20\x20\x20\x20Session:\x20','\x20\x20\x20\x20','jZkjE','cgZRJ','RuNsJ','OqAnT','join','opencode','jtIGQ','fflmr','hVhmI',':\x20configured','project','not_installed','utf-8','\x0a---\x20Profiles\x20---','env','(not\x20found)','dfDnU','@ranger-testing/opencode-plugin','\x1b[1m','API\x20Token:\x20✗\x20Not\x20found'];_0x5e3d=function(){return _0x9337f;};return _0x5e3d();}import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x1587d0=>_0x33cabd(0x17c)+_0x1587d0+'\x1b[0m',link=(_0x57ee12,_0x526082)=>'\x1b]8;;file://'+_0x57ee12+'\x07'+(_0x526082||_0x57ee12)+_0x33cabd(0x1a8);async function getOpencodePluginStatus(){const _0x125550=_0x33cabd,_0x537a6d={'TvMCg':'@ranger-testing/opencode-plugin','nPrKi':function(_0x5ebe84,_0x4c60c7){return _0x5ebe84!==_0x4c60c7;},'JdyTS':function(_0x4ba0a2,_0x70cdde){return _0x4ba0a2(_0x70cdde);},'EqBBN':'not_configured','ZVMXN':function(_0x48a67f,_0xfbcb61,_0x11e68a,_0x3506c3){return _0x48a67f(_0xfbcb61,_0x11e68a,_0x3506c3);},'xGHWi':_0x125550(0x185),'skpiH':'config','aPRyx':_0x125550(0x187),'fflmr':_0x125550(0x189)};return new Promise(_0x9a889a=>{const _0x34d18a=_0x125550,_0x317713={'hIatR':_0x34d18a(0x175)},_0x3c983f=_0x537a6d[_0x34d18a(0x15f)](spawn,_0x34d18a(0x16f),[_0x537a6d['xGHWi'],_0x537a6d['skpiH']],{'stdio':['ignore','pipe','pipe']});let _0x43ecee='';_0x3c983f[_0x34d18a(0x155)]?.['on'](_0x537a6d['aPRyx'],_0x2b30c5=>{const _0x24081d=_0x34d18a;_0x43ecee+=_0x2b30c5[_0x24081d(0x151)]();}),_0x3c983f['stderr']?.['on'](_0x34d18a(0x187),_0x34b7ff=>{_0x43ecee+=_0x34b7ff['toString']();}),_0x3c983f['on'](_0x34d18a(0x166),()=>{_0x9a889a({'status':_0x317713['hIatR']});}),_0x3c983f['on'](_0x537a6d[_0x34d18a(0x171)],_0x46c800=>{const _0x5324e8=_0x34d18a,_0x2ccd68={'ttnby':_0x537a6d['TvMCg']};if(_0x537a6d['nPrKi'](_0x46c800,0x0)){_0x537a6d['JdyTS'](_0x9a889a,{'status':_0x5324e8(0x175)});return;}const _0x22a66f=_0x43ecee[_0x5324e8(0x1ad)]();let _0x25c882=null;if(_0x22a66f)try{_0x25c882=JSON[_0x5324e8(0x180)](_0x22a66f);}catch{const _0x519a1b=_0x22a66f[_0x5324e8(0x19d)](/\{[\s\S]*\}$/);if(_0x519a1b)try{_0x25c882=JSON[_0x5324e8(0x180)](_0x519a1b[0x0]);}catch{_0x25c882=null;}}const _0x4c372c=Array[_0x5324e8(0x164)](_0x25c882?.['plugin'])?_0x25c882?.[_0x5324e8(0x1a4)]:[],_0x3cf59a=_0x4c372c[_0x5324e8(0x1ab)](_0x32c2aa=>{const _0x56f132=_0x5324e8;if(typeof _0x32c2aa!=='string')return![];return _0x32c2aa['includes'](_0x2ccd68[_0x56f132(0x199)])||_0x32c2aa[_0x56f132(0x1b7)](_0x56f132(0x14c));});if(_0x3cf59a){_0x9a889a({'status':'configured','details':_0x4c372c['length']>0x0?_0x4c372c['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x4c372c['length']>0x0){_0x9a889a({'status':'not_configured','details':_0x4c372c[_0x5324e8(0x17f)]+_0x5324e8(0x1a1)});return;}_0x537a6d[_0x5324e8(0x161)](_0x9a889a,{'status':_0x537a6d[_0x5324e8(0x1b0)]});});});}async function getSkillsFromDir(_0x1c6f54,_0x343ab6){const _0x19fd94=_0x33cabd,_0x51e810={'ecapg':function(_0x209af9,_0x47682c){return _0x209af9(_0x47682c);},'yvYxt':function(_0x32a1f2,_0x293ae,_0x3262e5){return _0x32a1f2(_0x293ae,_0x3262e5);}};if(!_0x51e810[_0x19fd94(0x192)](existsSync,_0x1c6f54))return[];const _0x30626b=[];try{const _0x43f6bd=await _0x51e810[_0x19fd94(0x193)](readdir,_0x1c6f54,{'withFileTypes':!![]});for(const _0x41a2c8 of _0x43f6bd){if(_0x41a2c8[_0x19fd94(0x1a9)]()){const _0x3ca584=join(_0x1c6f54,_0x41a2c8['name'],_0x19fd94(0x186));if(existsSync(_0x3ca584)){let _0x26b528=_0x41a2c8[_0x19fd94(0x160)];try{const _0xcdabee=await readFile(_0x3ca584,_0x19fd94(0x176)),_0x265428=_0xcdabee['match'](/name:\s*(.+)/);_0x265428&&(_0x26b528=_0x265428[0x1]['trim']());}catch{}_0x30626b[_0x19fd94(0x144)]({'name':_0x41a2c8['name'],'displayName':_0x26b528,'path':_0x3ca584,'level':_0x343ab6});}}}}catch{return[];}return _0x30626b;}async function getInstalledSkills(){const _0x563eb0=_0x33cabd,_0x193278={'uYMOz':function(_0x2cc17e,_0x24c198,_0x46e64a){return _0x2cc17e(_0x24c198,_0x46e64a);},'pIHvY':function(_0x2f0c56){return _0x2f0c56();},'gBHRZ':function(_0x390fa8,_0x4a357d,_0x1d805d){return _0x390fa8(_0x4a357d,_0x1d805d);}},[_0x5e43e0,_0x281c13]=await Promise[_0x563eb0(0x14a)]([_0x193278['uYMOz'](getSkillsFromDir,_0x193278['pIHvY'](getProjectSkillsDir),_0x563eb0(0x174)),_0x193278[_0x563eb0(0x150)](getSkillsFromDir,getUserSkillsDir(),'user')]);return{'project':_0x5e43e0,'user':_0x281c13};}async function getEnvironments(){const _0x3245f5=_0x33cabd,_0x5f412d={'JopVJ':function(_0x26147b,_0x159156){return _0x26147b(_0x159156);},'NAefU':function(_0x2cfee7,_0x542eff,_0x546448){return _0x2cfee7(_0x542eff,_0x546448);},'OqptM':_0x3245f5(0x1b3),'mPriX':function(_0x208d8b,_0x383f76,_0x187deb){return _0x208d8b(_0x383f76,_0x187deb);},'nJqwQ':function(_0x5ada57,_0x51e024){return _0x5ada57(_0x51e024);},'eLRRu':_0x3245f5(0x179),'RuNsJ':function(_0x3f103a,_0x4a1d2c){return _0x3f103a===_0x4a1d2c;},'lXtuZ':function(_0xf42935,_0x1bf90f){return _0xf42935(_0x1bf90f);}},{envNames:_0x1b151b,activeEnv:_0x3821ff}=await getEnvNames(),_0x13a146=getRangerDir();if(!_0x5f412d['lXtuZ'](existsSync,_0x13a146))return{'envs':[],'activeEnv':null};const _0x17ff16=_0x1b151b[_0x3245f5(0x181)](_0x52c3cc=>{const _0x34653d=_0x3245f5,_0x3963ce=_0x5f412d['JopVJ'](getEnvDir,_0x52c3cc),_0x29fcbf=join(_0x3963ce,_0x34653d(0x14e)),_0x8d87b4=_0x5f412d[_0x34653d(0x19b)](join,_0x3963ce,_0x5f412d[_0x34653d(0x1a6)]),_0x2b1658=_0x5f412d['mPriX'](join,_0x3963ce,_0x34653d(0x1a2));return{'name':_0x52c3cc,'settingsPath':_0x5f412d['nJqwQ'](existsSync,_0x29fcbf)?_0x29fcbf:_0x5f412d['eLRRu'],'hasPlaintextAuth':_0x5f412d['nJqwQ'](existsSync,_0x8d87b4),'hasEncryptedAuth':existsSync(_0x2b1658),'isActive':_0x5f412d[_0x34653d(0x16c)](_0x52c3cc,_0x3821ff)};});return{'envs':_0x17ff16,'activeEnv':_0x3821ff};}function _0x1055(_0x31d2c5,_0xa9122a){_0x31d2c5=_0x31d2c5-0x142;const _0x5e3d74=_0x5e3d();let _0x105556=_0x5e3d74[_0x31d2c5];return _0x105556;}export async function status(){const _0x516de2=_0x33cabd,_0x362325={'MmTQZ':function(_0x102c6a,_0x230784,_0x17985e){return _0x102c6a(_0x230784,_0x17985e);},'uXxef':function(_0x323a9c,_0x29e827){return _0x323a9c(_0x29e827);},'OqAnT':function(_0x38d6d0,_0x4676d9){return _0x38d6d0(_0x4676d9);},'jtIGQ':function(_0x2584c8,_0x4cd33e){return _0x2584c8(_0x4cd33e);},'dfDnU':function(_0x1d8870){return _0x1d8870();},'HAcjO':function(_0x2255d6,_0x12d145){return _0x2255d6!==_0x12d145;},'FUfAp':function(_0x228144){return _0x228144();},'kAcJr':function(_0x2177e8,_0x20409e){return _0x2177e8===_0x20409e;},'xhlAY':_0x516de2(0x17b),'TFYsc':_0x516de2(0x156),'hMdzE':_0x516de2(0x182),'thbxn':_0x516de2(0x18f),'jZkjE':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','ISZjV':_0x516de2(0x148),'Knizt':function(_0x4c515a,_0x49aea4){return _0x4c515a(_0x49aea4);},'ffwLf':_0x516de2(0x162),'zhCyf':'enabled','ZLKUI':'ranger@trailhead','cLSKk':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','EgCIT':_0x516de2(0x188),'MzMTp':function(_0x474216){return _0x474216();},'hVhmI':_0x516de2(0x191),'IFwQx':function(_0x1396de,_0xf619bd){return _0x1396de>_0xf619bd;},'QeOqC':'\x20\x20User-level:','JeGEV':function(_0x5c8b4a){return _0x5c8b4a();},'SWuGF':function(_0x17780c,_0x521e03){return _0x17780c+_0x521e03;},'MSreI':function(_0x180b27,_0x59db02){return _0x180b27>_0x59db02;},'vzkQo':function(_0xc768dc,_0x26a7db){return _0xc768dc(_0x26a7db);},'xZvfd':'\x20(active)','tLqfW':'plaintext','cgZRJ':function(_0x15f6cb,_0x41d48c){return _0x15f6cb(_0x41d48c);},'UjArf':_0x516de2(0x179)};console[_0x516de2(0x159)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x40a164=process['cwd'](),_0x2ed041=getRangerDir();if(!existsSync(_0x2ed041)){console['log']('Root:\x20'+_0x362325[_0x516de2(0x19c)](link,_0x40a164,_0x362325[_0x516de2(0x197)](bold,_0x362325[_0x516de2(0x16d)](basename,_0x40a164)))),console['log'](_0x516de2(0x183)),console[_0x516de2(0x159)](_0x516de2(0x167));return;}console['log']('Root:\x20'+link(_0x40a164,_0x362325[_0x516de2(0x170)](bold,basename(_0x40a164))));const _0x245c91=getCurrentVersion(),_0x31641a=_0x362325[_0x516de2(0x17a)](getLatestVersion);if(_0x31641a[_0x516de2(0x1ac)]&&_0x362325['HAcjO'](_0x31641a['version'],_0x245c91))console[_0x516de2(0x159)](_0x516de2(0x184)+_0x245c91+'\x20(latest:\x20'+_0x31641a['version']+')'),console[_0x516de2(0x159)](_0x516de2(0x142));else _0x31641a['version']?console['log'](_0x516de2(0x184)+_0x245c91+'\x20(up\x20to\x20date)'):console['log']('Version:\x20'+_0x245c91);const _0xaa925=await getToken();if(_0xaa925){const _0x56b09d=await _0x362325[_0x516de2(0x16d)](getCurrentUser,_0xaa925);_0x56b09d[_0x516de2(0x152)]?console[_0x516de2(0x159)](_0x516de2(0x143)+bold(_0x56b09d['user']['organizationName'])):(console[_0x516de2(0x159)](_0x516de2(0x19e)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x516de2(0x159)](_0x516de2(0x17d)),console[_0x516de2(0x159)](_0x516de2(0x19a));process[_0x516de2(0x178)]['DEBUG']&&(console[_0x516de2(0x159)](_0x516de2(0x15d)+getCurrentEnvironment()),console[_0x516de2(0x159)]('API\x20URL:\x20'+_0x362325['dfDnU'](getApiBaseUrl)));console[_0x516de2(0x159)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x951635=await _0x362325['FUfAp'](getOpencodePluginStatus);if(_0x362325[_0x516de2(0x157)](_0x951635[_0x516de2(0x146)],'configured'))console[_0x516de2(0x159)]('\x20\x20'+bold(_0x362325[_0x516de2(0x15c)])+_0x516de2(0x173)),_0x951635[_0x516de2(0x147)]&&console[_0x516de2(0x159)]('\x20\x20'+_0x951635[_0x516de2(0x147)]);else _0x951635[_0x516de2(0x146)]===_0x362325['TFYsc']?(console['log'](_0x362325[_0x516de2(0x1b6)]),_0x951635[_0x516de2(0x147)]&&console['log']('\x20\x20'+_0x951635['details']),console[_0x516de2(0x159)](_0x362325[_0x516de2(0x158)])):console['log'](_0x362325[_0x516de2(0x16a)]);console[_0x516de2(0x159)](_0x362325['ISZjV']);const _0x5ea9c2=await _0x362325['Knizt'](getPluginInfo,_0x516de2(0x1b4));if(_0x5ea9c2){const _0x584c02=_0x5ea9c2[_0x516de2(0x195)]||_0x362325['ffwLf'],_0x5ee07b=_0x5ea9c2['enabled']?_0x362325[_0x516de2(0x1a5)]:'disabled';console['log']('\x20\x20'+_0x362325['jtIGQ'](bold,_0x362325['ZLKUI'])+':\x20installed\x20('+_0x584c02+',\x20'+_0x5ee07b+')');}else console['log']('\x20\x20Not\x20installed'),console[_0x516de2(0x159)](_0x362325['cLSKk']);console['log'](_0x362325['EgCIT']);const {project:_0x448ef7,user:_0x2ea082}=await _0x362325[_0x516de2(0x163)](getInstalledSkills),_0x509d0c=_0x448ef7['filter'](_0x3782cd=>RANGER_MANAGED_SKILLS[_0x516de2(0x1b7)](_0x3782cd['name'])),_0x1c4f1e=_0x2ea082[_0x516de2(0x18b)](_0xbe9202=>RANGER_MANAGED_SKILLS['includes'](_0xbe9202['name'])),_0x549a91=_0x509d0c['length']+_0x1c4f1e['length'];if(_0x549a91===0x0)console['log']('No\x20skills\x20installed'),console[_0x516de2(0x159)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x509d0c[_0x516de2(0x17f)]>0x0){console[_0x516de2(0x159)](_0x362325[_0x516de2(0x172)]);for(const _0x31fb3d of _0x509d0c){console['log'](_0x516de2(0x169)+_0x362325[_0x516de2(0x197)](bold,_0x31fb3d[_0x516de2(0x15e)])+':\x20'+_0x362325[_0x516de2(0x19c)](link,_0x31fb3d['path'],_0x362325[_0x516de2(0x197)](basename,_0x31fb3d[_0x516de2(0x194)])));}}if(_0x362325[_0x516de2(0x18c)](_0x1c4f1e[_0x516de2(0x17f)],0x0)){console[_0x516de2(0x159)](_0x362325[_0x516de2(0x19f)]);for(const _0x115528 of _0x1c4f1e){console[_0x516de2(0x159)]('\x20\x20\x20\x20'+_0x362325['uXxef'](bold,_0x115528[_0x516de2(0x15e)])+':\x20'+link(_0x115528['path'],basename(_0x115528['path'])));}}}console[_0x516de2(0x159)](_0x516de2(0x177));const {envs:_0x42ae07,activeEnv:_0x517738}=await getEnvironments();let _0x356259=[];if(_0xaa925)try{_0x356259=await _0x362325[_0x516de2(0x18e)](listCloudProfiles);}catch{}const _0x4d7a66=_0x362325['SWuGF'](_0x42ae07[_0x516de2(0x17f)],_0x356259[_0x516de2(0x17f)]);if(_0x4d7a66===0x0)console['log'](_0x516de2(0x196)),console[_0x516de2(0x159)](_0x516de2(0x18d));else{if(_0x4d7a66>0x5){const _0x5cf805=[];_0x362325[_0x516de2(0x18c)](_0x356259[_0x516de2(0x17f)],0x0)&&_0x5cf805[_0x516de2(0x144)](_0x356259['length']+'\x20cloud'),_0x362325['MSreI'](_0x42ae07[_0x516de2(0x17f)],0x0)&&_0x5cf805['push'](_0x42ae07['length']+'\x20local'),console[_0x516de2(0x159)](_0x4d7a66+'\x20profiles\x20configured\x20('+_0x5cf805[_0x516de2(0x16e)](',\x20')+')'),_0x517738&&console[_0x516de2(0x159)](_0x516de2(0x1b5)+_0x362325['vzkQo'](bold,_0x517738)),console[_0x516de2(0x159)]('\x20\x20Run:\x20ranger\x20profile\x20ls\x20\x20(list\x20all)');}else{for(const _0x1f7f61 of _0x356259){const _0x3c84b9=_0x1f7f61['name']===_0x517738?_0x362325['xZvfd']:'';console['log']('\x20\x20'+bold(_0x1f7f61[_0x516de2(0x160)])+'\x20[cloud]'+_0x3c84b9);const _0x4d099d=_0x1f7f61[_0x516de2(0x1a3)]?'cached\x20(updated\x20'+_0x1f7f61['sessionUpdatedAt']+')':_0x516de2(0x198);console['log'](_0x516de2(0x168)+_0x4d099d);}const _0x977023=new Set(_0x356259['map'](_0x3be989=>_0x3be989[_0x516de2(0x160)]));for(const _0x4a0fc8 of _0x42ae07){if(_0x977023[_0x516de2(0x145)](_0x4a0fc8['name']))continue;const _0x4d58f2=_0x4a0fc8['isActive']?'\x20(active)':'',_0x57f424=_0x4a0fc8[_0x516de2(0x18a)]?_0x516de2(0x190):_0x4a0fc8['hasPlaintextAuth']?_0x362325[_0x516de2(0x1aa)]:_0x516de2(0x15b);console[_0x516de2(0x159)]('\x20\x20'+_0x362325[_0x516de2(0x16b)](bold,_0x4a0fc8[_0x516de2(0x160)])+_0x516de2(0x15a)+_0x4d58f2),console[_0x516de2(0x159)]('\x20\x20\x20\x20Auth:\x20'+_0x57f424),_0x4a0fc8['settingsPath']!==_0x362325['UjArf']&&console[_0x516de2(0x159)](_0x516de2(0x17e)+_0x362325[_0x516de2(0x19c)](link,_0x4a0fc8['settingsPath'],basename(_0x4a0fc8['settingsPath'])));}if(!_0x517738){console['log'](_0x516de2(0x1a7));const _0x55064d=[..._0x356259[_0x516de2(0x181)](_0x497e59=>_0x497e59['name']),..._0x42ae07['filter'](_0x576dd4=>!_0x977023['has'](_0x576dd4['name']))['map'](_0x46e202=>_0x46e202[_0x516de2(0x160)])];console[_0x516de2(0x159)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x55064d[_0x516de2(0x16e)](',\x20')+')');}}}console['log']('');}