@ranger-testing/ranger-cli 2.4.5 → 2.4.7

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 (78) 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/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/agentEnv.js +1 -1
  35. package/build/commands/utils/browserSessionsApi.js +1 -1
  36. package/build/commands/utils/claudeConfig.js +1 -1
  37. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  38. package/build/commands/utils/claudePlugin.js +1 -1
  39. package/build/commands/utils/crypto.js +1 -1
  40. package/build/commands/utils/desirePathLog.js +1 -1
  41. package/build/commands/utils/deviceAuth.js +1 -1
  42. package/build/commands/utils/environment.js +1 -1
  43. package/build/commands/utils/featureApi.js +1 -1
  44. package/build/commands/utils/featureReportGenerator.js +1 -1
  45. package/build/commands/utils/fixWebmDuration.js +1 -1
  46. package/build/commands/utils/git.js +1 -1
  47. package/build/commands/utils/keychain.js +1 -1
  48. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  49. package/build/commands/utils/mcpImageBase64.js +1 -1
  50. package/build/commands/utils/model.js +1 -1
  51. package/build/commands/utils/opencodeConfig.js +1 -1
  52. package/build/commands/utils/playwrightCli.js +1 -1
  53. package/build/commands/utils/profileMessages.js +1 -1
  54. package/build/commands/utils/profileSetupBanner.js +1 -1
  55. package/build/commands/utils/rangerConfig.js +1 -1
  56. package/build/commands/utils/rangerRoot.js +1 -1
  57. package/build/commands/utils/reportGenerator.js +1 -1
  58. package/build/commands/utils/retry.js +1 -1
  59. package/build/commands/utils/sessionCache.js +1 -1
  60. package/build/commands/utils/settings.js +1 -1
  61. package/build/commands/utils/skillContent.js +1 -1
  62. package/build/commands/utils/skills.js +1 -1
  63. package/build/commands/utils/stitchWebmFiles.js +1 -1
  64. package/build/commands/utils/telemetry.js +1 -1
  65. package/build/commands/utils/tokenRefresh.js +1 -1
  66. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  67. package/build/commands/utils/userApi.js +1 -1
  68. package/build/commands/utils/version.js +1 -1
  69. package/build/commands/verifyFeature.js +1 -1
  70. package/build/commands/verifyFeatureCli.js +1 -1
  71. package/build/commands/verifyInBrowser.js +1 -1
  72. package/build/skills/ranger/SKILL.md +38 -41
  73. package/build/skills/ranger/create.md +5 -13
  74. package/build/skills/ranger/feedback.md +3 -3
  75. package/build/skills/ranger/start.md +13 -13
  76. package/build/skills/ranger/verify.md +15 -28
  77. package/package.json +5 -3
  78. package/scripts/postinstall.js +4 -1
@@ -1 +1 @@
1
- function _0x2e5a(_0x3b9632,_0x50ea03){_0x3b9632=_0x3b9632-0x14b;const _0x29f171=_0x29f1();let _0x2e5a87=_0x29f171[_0x3b9632];return _0x2e5a87;}const _0x1f748e=_0x2e5a;(function(_0x492fb6,_0x1fb6c1){const _0x346e37=_0x2e5a,_0x35239a=_0x492fb6();while(!![]){try{const _0x5d6da1=parseInt(_0x346e37(0x15d))/0x1+parseInt(_0x346e37(0x14f))/0x2*(parseInt(_0x346e37(0x14c))/0x3)+parseInt(_0x346e37(0x14e))/0x4*(parseInt(_0x346e37(0x15e))/0x5)+parseInt(_0x346e37(0x154))/0x6+-parseInt(_0x346e37(0x153))/0x7+-parseInt(_0x346e37(0x14d))/0x8*(parseInt(_0x346e37(0x162))/0x9)+parseInt(_0x346e37(0x158))/0xa*(parseInt(_0x346e37(0x157))/0xb);if(_0x5d6da1===_0x1fb6c1)break;else _0x35239a['push'](_0x35239a['shift']());}catch(_0x375812){_0x35239a['push'](_0x35239a['shift']());}}}(_0x29f1,0x3a22e));import{appendFile}from'fs/promises';function _0x29f1(){const _0x599497=['946578XxzJor','main','zVOFC','55vGUdDH','123870ITipXp','SessionStart','tGBzD','KZoCe','wDkdI','58793OzxBOD','1513685tFtsbP','ofwRh','master','=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================','396AGCdBO','YldPe','404811JWFzjY','69840ZMNkbK','4norXDs','6uRdyFh','export\x20CLAUDE_SESSION_ID=\x22','rSzoB','parse','2546551kbQqUl'];_0x29f1=function(){return _0x599497;};return _0x29f1();}import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';import{getToken}from'../utils/keychain.js';const RANGER_AUTO_ENABLED_PROMPT=_0x1f748e(0x161);export async function sessionStart(_0x992cb8){const _0x350698=_0x1f748e,_0x519ec0={'KZoCe':function(_0x2490e4,_0x10e94b){return _0x2490e4||_0x10e94b;},'zVOFC':'source','ofwRh':function(_0x26eb20,_0x3f61dd){return _0x26eb20&&_0x3f61dd;},'tGBzD':function(_0xe91a8,_0x3b7c0e,_0x4ec283){return _0xe91a8(_0x3b7c0e,_0x4ec283);},'wDkdI':function(_0x38ff9a,_0xabd896){return _0x38ff9a(_0xabd896);},'axERl':function(_0x2824b6,_0x4c358b){return _0x2824b6(_0x4c358b);},'rSzoB':'hook:session-start','YldPe':_0x350698(0x155),'LeVsu':function(_0x296ec7,_0x2f5c81){return _0x296ec7!==_0x2f5c81;}};let _0x5e6719=_0x519ec0[_0x350698(0x15b)](_0x992cb8,''),_0x46cd45;if(!_0x992cb8){let _0x118af9='';for await(const _0x289680 of process['stdin']){_0x118af9+=_0x289680;}try{const _0x8722bf=JSON[_0x350698(0x152)](_0x118af9);_0x5e6719=_0x8722bf['session_id']||'',_0x46cd45=_0x8722bf[_0x519ec0[_0x350698(0x156)]];}catch{}const _0x52b5da=process['env']['CLAUDE_ENV_FILE'];if(_0x519ec0[_0x350698(0x15f)](_0x52b5da,_0x5e6719))try{await _0x519ec0[_0x350698(0x15a)](appendFile,_0x52b5da,_0x350698(0x150)+_0x5e6719+'\x22\x0a');}catch{}}try{await getToken();}catch{}if(_0x5e6719){_0x519ec0[_0x350698(0x15c)](shouldAutoEnableAfterClear,_0x46cd45)&&_0x519ec0['axERl'](autoEnableAfterClear,_0x5e6719);initBranchTracking(_0x5e6719);const _0x2c18d7=isSessionEnabled(_0x5e6719);try{const _0x1e5847=createTelemetryCollector(_0x519ec0[_0x350698(0x151)]);await _0x1e5847['trackCommandStart']({'sessionId':_0x5e6719,'hooksEnabled':_0x2c18d7}),await _0x1e5847['trackCommandEnd']('success');}catch{}if(_0x2c18d7){const _0x1100c9=getCurrentBranch(),_0x37873a=_0x1100c9&&_0x1100c9!==_0x519ec0[_0x350698(0x14b)]&&_0x519ec0['LeVsu'](_0x1100c9,_0x350698(0x160))?'\x20(Branch:\x20'+_0x1100c9+')':'',_0x325c64={'hookSpecificOutput':{'hookEventName':_0x350698(0x159),'additionalContext':RANGER_AUTO_ENABLED_PROMPT+_0x37873a}};console['log'](JSON['stringify'](_0x325c64));}}}
1
+ (function(_0x1474d4,_0x57233f){const _0x4b14b5=_0x4239,_0xe70a5c=_0x1474d4();while(!![]){try{const _0x74cbab=-parseInt(_0x4b14b5(0x1c2))/0x1*(parseInt(_0x4b14b5(0x1cd))/0x2)+-parseInt(_0x4b14b5(0x1c0))/0x3+-parseInt(_0x4b14b5(0x1c8))/0x4+-parseInt(_0x4b14b5(0x1c6))/0x5*(-parseInt(_0x4b14b5(0x1bc))/0x6)+-parseInt(_0x4b14b5(0x1c4))/0x7+parseInt(_0x4b14b5(0x1cc))/0x8+parseInt(_0x4b14b5(0x1bd))/0x9*(parseInt(_0x4b14b5(0x1c3))/0xa);if(_0x74cbab===_0x57233f)break;else _0xe70a5c['push'](_0xe70a5c['shift']());}catch(_0x359a40){_0xe70a5c['push'](_0xe70a5c['shift']());}}}(_0x291b,0x7df00));function _0x4239(_0x1cddcf,_0x2d46b6){_0x1cddcf=_0x1cddcf-0x1b7;const _0x291b4d=_0x291b();let _0x4239e0=_0x291b4d[_0x1cddcf];return _0x4239e0;}import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';import{getToken}from'../utils/keychain.js';const RANGER_AUTO_ENABLED_PROMPT='=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================';function _0x291b(){const _0x522e5e=['209162HXNpno','2517840csYjrC','1248296drcrfa','env','2478020vIlcku','\x20(Branch:\x20','1386688GslAPR','RyHZA','export\x20CLAUDE_SESSION_ID=\x22','master','7914624PKFCPG','8WzegvE','hook:session-start','JUBdN','log','main','trackCommandEnd','6dSmsaB','27NZAGUI','CLAUDE_ENV_FILE','success','1088388DaAHNc','session_id'];_0x291b=function(){return _0x522e5e;};return _0x291b();}export async function sessionStart(_0x178384){const _0x1e1e67=_0x4239,_0x53636e={'yDncA':function(_0xb49765,_0x919011){return _0xb49765&&_0x919011;},'RyHZA':function(_0x11fecf,_0x3d1e25){return _0x11fecf(_0x3d1e25);},'UzNmo':_0x1e1e67(0x1bf),'JUBdN':function(_0x521e92){return _0x521e92();}};let _0x1f75c1=_0x178384||'',_0x28bb98;if(!_0x178384){let _0x29244b='';for await(const _0x12594b of process['stdin']){_0x29244b+=_0x12594b;}try{const _0x245c47=JSON['parse'](_0x29244b);_0x1f75c1=_0x245c47[_0x1e1e67(0x1c1)]||'',_0x28bb98=_0x245c47['source'];}catch{}const _0x9d163=process[_0x1e1e67(0x1c5)][_0x1e1e67(0x1be)];if(_0x53636e['yDncA'](_0x9d163,_0x1f75c1))try{await appendFile(_0x9d163,_0x1e1e67(0x1ca)+_0x1f75c1+'\x22\x0a');}catch{}}try{await getToken();}catch{}if(_0x1f75c1){shouldAutoEnableAfterClear(_0x28bb98)&&_0x53636e['RyHZA'](autoEnableAfterClear,_0x1f75c1);initBranchTracking(_0x1f75c1);const _0x410ef9=isSessionEnabled(_0x1f75c1);try{const _0x359440=_0x53636e[_0x1e1e67(0x1c9)](createTelemetryCollector,_0x1e1e67(0x1b7));await _0x359440['trackCommandStart']({'sessionId':_0x1f75c1,'hooksEnabled':_0x410ef9}),await _0x359440[_0x1e1e67(0x1bb)](_0x53636e['UzNmo']);}catch{}if(_0x410ef9){const _0xd88362=_0x53636e[_0x1e1e67(0x1b8)](getCurrentBranch),_0x3bba59=_0xd88362&&_0xd88362!==_0x1e1e67(0x1ba)&&_0xd88362!==_0x1e1e67(0x1cb)?_0x1e1e67(0x1c7)+_0xd88362+')':'',_0x195ada={'hookSpecificOutput':{'hookEventName':'SessionStart','additionalContext':RANGER_AUTO_ENABLED_PROMPT+_0x3bba59}};console[_0x1e1e67(0x1b9)](JSON['stringify'](_0x195ada));}}}
@@ -1 +1 @@
1
- (function(_0x2f77c4,_0x55133b){const _0x19cfc6=_0x326e,_0x3c7633=_0x2f77c4();while(!![]){try{const _0x352b8a=-parseInt(_0x19cfc6(0x169))/0x1+-parseInt(_0x19cfc6(0x166))/0x2+-parseInt(_0x19cfc6(0x167))/0x3+-parseInt(_0x19cfc6(0x162))/0x4+-parseInt(_0x19cfc6(0x15f))/0x5+-parseInt(_0x19cfc6(0x160))/0x6*(parseInt(_0x19cfc6(0x161))/0x7)+-parseInt(_0x19cfc6(0x171))/0x8*(-parseInt(_0x19cfc6(0x174))/0x9);if(_0x352b8a===_0x55133b)break;else _0x3c7633['push'](_0x3c7633['shift']());}catch(_0x5ed6b6){_0x3c7633['push'](_0x3c7633['shift']());}}}(_0x55ff,0x3a73e));import{getToken}from'../utils/keychain.js';function _0x55ff(){const _0x22f53a=['trackCommandEnd','Occgo','565336TppJYu','541251YWMnyQ','filter','419859sXhLCz','featureId','oXQEp','Stop','currentSessionId','BRrmC','trackCommandStart','pEhtK','4024jFAqiM','verified','sessionId','27504HPpvnX','closed','status','417265gPkaHX','12684nCCGoj','966RUznDF','158468TkKsDB','checklistItems'];_0x55ff=function(){return _0x22f53a;};return _0x55ff();}import{getFeature,concludeSession}from'../utils/featureApi.js';function _0x326e(_0x342863,_0x4d8a11){_0x342863=_0x342863-0x15d;const _0x55ffbf=_0x55ff();let _0x326e68=_0x55ffbf[_0x342863];return _0x326e68;}import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x826a41){const _0x26cb73=_0x326e,_0x1b86d0={'BRrmC':function(_0x54cd51,_0x34bed2){return _0x54cd51(_0x34bed2);},'sLCnf':function(_0x33d018,_0xa49e71){return _0x33d018(_0xa49e71);},'Occgo':function(_0x309de3){return _0x309de3();},'pEhtK':function(_0x204453,_0x46e026){return _0x204453(_0x46e026);},'oXQEp':function(_0x5c2877,_0x11c3e5){return _0x5c2877&&_0x11c3e5;},'PJULG':function(_0x1f359a,_0x31f4bd){return _0x1f359a(_0x31f4bd);}},_0x4c238c=await _0x1b86d0[_0x26cb73(0x16e)](getEnabledHookContext,_0x826a41),_0x20c354=_0x4c238c?.[_0x26cb73(0x173)]??null;let _0x182fec=!![];if(!_0x20c354){await trackStop(_0x20c354,![],_0x182fec);return;}try{const _0x734330=_0x1b86d0['sLCnf'](getSessionEntry,_0x20c354);if(!_0x734330){await trackStop(_0x20c354,!![],_0x182fec);return;}const _0x351455=await _0x1b86d0[_0x26cb73(0x165)](getToken),_0x4a22cc='https://dashboard.ranger.net/features/'+_0x734330[_0x26cb73(0x16a)];let _0xe63a0e=null,_0x2cae73=![],_0x55834b=![];if(_0x351455)try{const _0x45a83f=await _0x1b86d0[_0x26cb73(0x170)](getFeature,_0x734330[_0x26cb73(0x16a)]);_0xe63a0e=_0x45a83f[_0x26cb73(0x16d)]??null;const _0x563bb8=_0x45a83f[_0x26cb73(0x163)][_0x26cb73(0x168)](_0x1d0978=>_0x1d0978[_0x26cb73(0x173)]===_0xe63a0e);_0x2cae73=_0x563bb8['some'](_0x50c391=>_0x50c391[_0x26cb73(0x15e)]!==_0x26cb73(0x172)&&_0x50c391['status']!=='blocked'&&_0x50c391['status']!==_0x26cb73(0x15d)&&_0x50c391['status']!=='incomplete'),_0x55834b=_0x563bb8['some'](_0x46a9bf=>_0x46a9bf['status']==='verification_in_progress');}catch{}if(_0x1b86d0[_0x26cb73(0x16b)](_0x351455,_0xe63a0e)&&_0x2cae73){if(!_0x55834b&&_0x1b86d0['PJULG'](shouldShowStopReminder,_0x20c354)){const _0x54cfa3={'hookSpecificOutput':{'hookEventName':_0x26cb73(0x16c),'additionalContext':'RANGER:\x20The\x20active\x20feature\x20review\x20still\x20has\x20unfinished\x20checklist\x20items.\x20Before\x20responding\x20to\x20the\x20user,\x20if\x20this\x20UI\x20work\x20is\x20ready,\x20run\x20`ranger\x20show`\x20and\x20then\x20`ranger\x20go`\x20for\x20the\x20relevant\x20scenario(s).\x20If\x20it\x20is\x20not\x20ready\x20for\x20browser\x20verification\x20yet,\x20continue\x20implementing.\x20Dashboard:\x20'+_0x4a22cc}};console['log'](JSON['stringify'](_0x54cfa3));}}if(_0x351455&&_0xe63a0e&&!_0x2cae73)try{await concludeSession(_0x734330['featureId'],_0xe63a0e);}catch{}await trackStop(_0x20c354,!![],_0x182fec);return;}catch{await trackStop(_0x20c354,!![],_0x182fec);return;}}async function trackStop(_0x2418cc,_0xa08bed,_0x5c9753){const _0x459d49=_0x326e,_0x19832b={'RpuqQ':'hook:stop'};try{const _0xd6f168=createTelemetryCollector(_0x19832b['RpuqQ']);await _0xd6f168[_0x459d49(0x16f)]({'sessionId':_0x2418cc??undefined,'hooksEnabled':_0xa08bed,'stopAllowed':_0x5c9753}),await _0xd6f168[_0x459d49(0x164)]('success');}catch{}}
1
+ (function(_0x4efbe3,_0x16bf1a){const _0x4165a7=_0x1fd8,_0x210dc8=_0x4efbe3();while(!![]){try{const _0x13c250=-parseInt(_0x4165a7(0x1de))/0x1*(-parseInt(_0x4165a7(0x1ec))/0x2)+parseInt(_0x4165a7(0x1e8))/0x3*(parseInt(_0x4165a7(0x1ef))/0x4)+parseInt(_0x4165a7(0x1f0))/0x5+parseInt(_0x4165a7(0x1eb))/0x6*(-parseInt(_0x4165a7(0x1e9))/0x7)+parseInt(_0x4165a7(0x1df))/0x8+-parseInt(_0x4165a7(0x1e0))/0x9+-parseInt(_0x4165a7(0x1e3))/0xa;if(_0x13c250===_0x16bf1a)break;else _0x210dc8['push'](_0x210dc8['shift']());}catch(_0x16bbe0){_0x210dc8['push'](_0x210dc8['shift']());}}}(_0x4844,0x3e550));import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';function _0x4844(){const _0x2f8613=['QhNge','trackCommandStart','https://dashboard.ranger.net/features/','closed','featureId','fzeZS','Stop','incomplete','RANGER:\x20The\x20active\x20feature\x20review\x20still\x20has\x20unfinished\x20checklist\x20items.\x20Before\x20responding\x20to\x20the\x20user,\x20if\x20this\x20UI\x20work\x20is\x20ready,\x20run\x20`ranger\x20show`\x20and\x20then\x20`ranger\x20go`\x20for\x20the\x20relevant\x20scenario(s).\x20If\x20it\x20is\x20not\x20ready\x20for\x20browser\x20verification\x20yet,\x20continue\x20implementing.\x20Dashboard:\x20','filter','7Rauyno','3525096vfpbKw','54144dZcJUc','currentSessionId','sessionId','5245500uNDMCJ','sDDxx','blocked','hook:stop','fKGoR','117870BTVqDG','35BIlJaz','some','475830unNPjA','55894KfHgZA','status','kQqgo','40eBUXmr','766185lGLzaP'];_0x4844=function(){return _0x2f8613;};return _0x4844();}import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x6bc95a){const _0x2d4023=_0x1fd8,_0x351862={'sDDxx':function(_0xb878b4,_0x98a56f){return _0xb878b4(_0x98a56f);},'QhNge':function(_0x273452,_0x48153a,_0x35c6c0,_0x2bea70){return _0x273452(_0x48153a,_0x35c6c0,_0x2bea70);},'kQqgo':function(_0xdb1f0a,_0x409a70){return _0xdb1f0a(_0x409a70);},'OQGlE':_0x2d4023(0x1da),'fKGoR':function(_0x569ed6,_0x4bfff4){return _0x569ed6&&_0x4bfff4;}},_0x5d7580=await _0x351862[_0x2d4023(0x1e4)](getEnabledHookContext,_0x6bc95a),_0x2681f9=_0x5d7580?.[_0x2d4023(0x1e2)]??null;let _0x1c3016=!![];if(!_0x2681f9){await _0x351862['QhNge'](trackStop,_0x2681f9,![],_0x1c3016);return;}try{const _0xe30be4=getSessionEntry(_0x2681f9);if(!_0xe30be4){await _0x351862[_0x2d4023(0x1f1)](trackStop,_0x2681f9,!![],_0x1c3016);return;}const _0x358095=await getToken(),_0x16faa=_0x2d4023(0x1f3)+_0xe30be4[_0x2d4023(0x1f5)];let _0x2e6097=null,_0x2fe353=![],_0x19a25b=![];if(_0x358095)try{const _0x5db996=await _0x351862[_0x2d4023(0x1ee)](getFeature,_0xe30be4['featureId']);_0x2e6097=_0x5db996[_0x2d4023(0x1e1)]??null;const _0x5702d4=_0x5db996['checklistItems'][_0x2d4023(0x1dd)](_0x34f117=>_0x34f117[_0x2d4023(0x1e2)]===_0x2e6097);_0x2fe353=_0x5702d4[_0x2d4023(0x1ea)](_0x599e59=>_0x599e59['status']!=='verified'&&_0x599e59[_0x2d4023(0x1ed)]!==_0x2d4023(0x1e5)&&_0x599e59['status']!==_0x2d4023(0x1f4)&&_0x599e59[_0x2d4023(0x1ed)]!==_0x2d4023(0x1db)),_0x19a25b=_0x5702d4[_0x2d4023(0x1ea)](_0x17260b=>_0x17260b['status']==='verification_in_progress');}catch{}if(_0x358095&&_0x2e6097&&_0x2fe353){if(!_0x19a25b&&shouldShowStopReminder(_0x2681f9)){const _0x566520={'hookSpecificOutput':{'hookEventName':_0x351862['OQGlE'],'additionalContext':_0x2d4023(0x1dc)+_0x16faa}};console['log'](JSON['stringify'](_0x566520));}}if(_0x351862[_0x2d4023(0x1e7)](_0x358095,_0x2e6097)&&!_0x2fe353)try{await concludeSession(_0xe30be4['featureId'],_0x2e6097);}catch{}await _0x351862['QhNge'](trackStop,_0x2681f9,!![],_0x1c3016);return;}catch{await trackStop(_0x2681f9,!![],_0x1c3016);return;}}function _0x1fd8(_0x3b4d4a,_0x2c6104){_0x3b4d4a=_0x3b4d4a-0x1da;const _0x484426=_0x4844();let _0x1fd850=_0x484426[_0x3b4d4a];return _0x1fd850;}async function trackStop(_0x47a722,_0x14f23d,_0x3b3e63){const _0x5d8a92=_0x1fd8,_0x2635ba={'IRaIR':function(_0x3a52cc,_0x370aad){return _0x3a52cc(_0x370aad);},'fzeZS':'success'};try{const _0x22ac06=_0x2635ba['IRaIR'](createTelemetryCollector,_0x5d8a92(0x1e6));await _0x22ac06[_0x5d8a92(0x1f2)]({'sessionId':_0x47a722??undefined,'hooksEnabled':_0x14f23d,'stopAllowed':_0x3b3e63}),await _0x22ac06['trackCommandEnd'](_0x2635ba[_0x5d8a92(0x1f6)]);}catch{}}
@@ -1 +1 @@
1
- (function(_0x4ac852,_0x32efd3){var _0x242b90=_0x15f6,_0x4c0908=_0x4ac852();while(!![]){try{var _0x3ba6c3=-parseInt(_0x242b90(0xe3))/0x1*(-parseInt(_0x242b90(0xe7))/0x2)+-parseInt(_0x242b90(0xea))/0x3+parseInt(_0x242b90(0xeb))/0x4+-parseInt(_0x242b90(0xe6))/0x5*(-parseInt(_0x242b90(0xe5))/0x6)+parseInt(_0x242b90(0xed))/0x7+parseInt(_0x242b90(0xe8))/0x8*(-parseInt(_0x242b90(0xec))/0x9)+-parseInt(_0x242b90(0xe4))/0xa*(-parseInt(_0x242b90(0xe9))/0xb);if(_0x3ba6c3===_0x32efd3)break;else _0x4c0908['push'](_0x4c0908['shift']());}catch(_0x1deaf6){_0x4c0908['push'](_0x4c0908['shift']());}}}(_0x2396,0x58d37));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';function _0x2396(){var _0x11f9e3=['372608xuxtgP','3429yvvRYJ','3960313YjyOxJ','87epiWTQ','920MelPbf','6738wCFNMd','360RVGEhB','2526hcyuqR','5184LhoLjV','35387kfmLkK','1604679EhtNcw'];_0x2396=function(){return _0x11f9e3;};return _0x2396();}export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';function _0x15f6(_0xe2411a,_0x4b41c8){_0xe2411a=_0xe2411a-0xe3;var _0x239687=_0x2396();var _0x15f670=_0x239687[_0xe2411a];return _0x15f670;}export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
1
+ (function(_0x2d2a31,_0x2f88cc){var _0x26492f=_0x4134,_0x2ae603=_0x2d2a31();while(!![]){try{var _0x211df0=-parseInt(_0x26492f(0x1b5))/0x1+-parseInt(_0x26492f(0x1b7))/0x2*(parseInt(_0x26492f(0x1bd))/0x3)+-parseInt(_0x26492f(0x1b4))/0x4*(parseInt(_0x26492f(0x1be))/0x5)+-parseInt(_0x26492f(0x1bb))/0x6*(parseInt(_0x26492f(0x1b8))/0x7)+parseInt(_0x26492f(0x1b9))/0x8*(-parseInt(_0x26492f(0x1bc))/0x9)+-parseInt(_0x26492f(0x1ba))/0xa+parseInt(_0x26492f(0x1b6))/0xb;if(_0x211df0===_0x2f88cc)break;else _0x2ae603['push'](_0x2ae603['shift']());}catch(_0x595b6b){_0x2ae603['push'](_0x2ae603['shift']());}}}(_0x5490,0x6318c));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';function _0x4134(_0x58eef8,_0x15961f){_0x58eef8=_0x58eef8-0x1b4;var _0x549006=_0x5490();var _0x4134f4=_0x549006[_0x58eef8];return _0x4134f4;}export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';function _0x5490(){var _0x4511f4=['18717IIxIDl','1928215DzcnYg','4WxSRiy','40884yrLnkG','31546394cGdLFA','192SynmvV','3283ZFbvlX','24hsGIkm','4792490xIxqkl','3888XxARaY','1959966rbRgGI'];_0x5490=function(){return _0x4511f4;};return _0x5490();}
@@ -1 +1 @@
1
- (function(_0x1a1826,_0x4b36dc){const _0x2f896f=_0x4276,_0x59fac6=_0x1a1826();while(!![]){try{const _0x3adf91=-parseInt(_0x2f896f(0x150))/0x1*(-parseInt(_0x2f896f(0x151))/0x2)+-parseInt(_0x2f896f(0x148))/0x3*(-parseInt(_0x2f896f(0x143))/0x4)+parseInt(_0x2f896f(0x141))/0x5*(parseInt(_0x2f896f(0x146))/0x6)+parseInt(_0x2f896f(0x152))/0x7*(-parseInt(_0x2f896f(0x149))/0x8)+parseInt(_0x2f896f(0x153))/0x9+parseInt(_0x2f896f(0x14d))/0xa+-parseInt(_0x2f896f(0x14c))/0xb*(parseInt(_0x2f896f(0x140))/0xc);if(_0x3adf91===_0x4b36dc)break;else _0x59fac6['push'](_0x59fac6['shift']());}catch(_0x18eb7c){_0x59fac6['push'](_0x59fac6['shift']());}}}(_0xe6cc,0xdf123));function _0xe6cc(){const _0x2bba6c=['108daYFzL','40KSSmVo','Login\x20failed:\x20','60EyCiwn','isTTY','log','762690PtAwRg','stdout','86463hwSmFY','632JajAiP','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','success','2019754wwPmPd','14762600XpXFDZ','stdin','user','48047mwGMQj','4gxHvyn','83454DwwqmZ','4378266hwuRtP'];_0xe6cc=function(){return _0x2bba6c;};return _0xe6cc();}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x4276(_0x1b2a14,_0x1af8ce){_0x1b2a14=_0x1b2a14-0x140;const _0xe6cce2=_0xe6cc();let _0x4276bb=_0xe6cce2[_0x1b2a14];return _0x4276bb;}import{getCurrentUser}from'./utils/userApi.js';export async function login(){const _0x4f1ca8=_0x4276,_0x20623f={'HuozC':_0x4f1ca8(0x14a),'aOwXD':function(_0x325089){return _0x325089();},'eaTWi':function(_0x806de0,_0x5b2a95){return _0x806de0 instanceof _0x5b2a95;}},_0x58aba3=process[_0x4f1ca8(0x14e)][_0x4f1ca8(0x144)]&&process[_0x4f1ca8(0x147)][_0x4f1ca8(0x144)];if(!_0x58aba3)throw new Error(_0x20623f['HuozC']);try{const _0x35a51c=await _0x20623f['aOwXD'](runDeviceAuthFlow),_0x534f98=await getCurrentUser(_0x35a51c);_0x534f98[_0x4f1ca8(0x14b)]?console[_0x4f1ca8(0x145)]('\x0a✅\x20Logged\x20in\x20to\x20'+_0x534f98[_0x4f1ca8(0x14f)]['organizationName']):console['log']('\x0a✅\x20API\x20key\x20stored\x20successfully');}catch(_0x48f0a0){throw new Error(_0x4f1ca8(0x142)+(_0x20623f['eaTWi'](_0x48f0a0,Error)?_0x48f0a0['message']:_0x48f0a0));}}
1
+ (function(_0x2b61a7,_0x1e59eb){const _0x5c5b47=_0xaa57,_0x2b37e7=_0x2b61a7();while(!![]){try{const _0x385a35=parseInt(_0x5c5b47(0xb3))/0x1*(parseInt(_0x5c5b47(0xb1))/0x2)+parseInt(_0x5c5b47(0xb8))/0x3+-parseInt(_0x5c5b47(0xb7))/0x4*(parseInt(_0x5c5b47(0xb9))/0x5)+-parseInt(_0x5c5b47(0xae))/0x6+-parseInt(_0x5c5b47(0xb4))/0x7+-parseInt(_0x5c5b47(0xaa))/0x8*(-parseInt(_0x5c5b47(0xac))/0x9)+-parseInt(_0x5c5b47(0xb0))/0xa;if(_0x385a35===_0x1e59eb)break;else _0x2b37e7['push'](_0x2b37e7['shift']());}catch(_0x52b5b2){_0x2b37e7['push'](_0x2b37e7['shift']());}}}(_0x54a6,0x339ce));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0xaa57(_0x3547c1,_0x5e888f){_0x3547c1=_0x3547c1-0xaa;const _0x54a6e4=_0x54a6();let _0xaa57bb=_0x54a6e4[_0x3547c1];return _0xaa57bb;}export async function login(){const _0x5ae135=_0xaa57,_0x22734e={'cmkkt':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.'},_0x35a286=process['stdin'][_0x5ae135(0xb6)]&&process['stdout']['isTTY'];if(!_0x35a286)throw new Error(_0x22734e[_0x5ae135(0xb5)]);try{const _0x16a737=await runDeviceAuthFlow(),_0x4e97ef=await getCurrentUser(_0x16a737);_0x4e97ef[_0x5ae135(0xab)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x4e97ef['user']['organizationName']):console[_0x5ae135(0xb2)](_0x5ae135(0xad));}catch(_0x5e5e20){throw new Error('Login\x20failed:\x20'+(_0x5e5e20 instanceof Error?_0x5e5e20[_0x5ae135(0xaf)]:_0x5e5e20));}}function _0x54a6(){const _0x1fdd3d=['\x0a✅\x20API\x20key\x20stored\x20successfully','453084XjScQz','message','634980svkauL','2YMWOty','log','206290fgArqe','1185338cSJpzY','cmkkt','isTTY','356kUEmqs','854481WgjeMn','4805fMXPNp','913312STkPJC','success','9YQnahH'];_0x54a6=function(){return _0x1fdd3d;};return _0x54a6();}
@@ -1 +1 @@
1
- function _0x2bc2(){const _0x1f8856=['Where\x20should\x20the\x20plugin\x20be\x20installed?','QdSON','UJerA','error','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','ranger','112194jNTbcT','confirm','✓\x20Claude\x20Code\x20plugin\x20enabled','⚠\x20Failed\x20to\x20enable\x20plugin:','trailhead','SKILL.md','tKTbP','install','FRctX','aBBUI','WgpuX','ffLSt','189aJOwSX','14JlRYBI','ipXDB','\x0aYou\x20can\x20install\x20manually\x20with:','already\x20enabled','yIDjR','.claude','4bWMlpx','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','pluginScope','plugin','ranger@trailhead','--scope','61448DJcpnd','pyRWy','Qucnq','vXslQ','wkfyh','oYwKR','nhIKI','2433462uXINOC','user','4560870AxCKnf','User\x20(available\x20in\x20all\x20your\x20projects)','project','success','1204105tBAHtj','84425UjDIaN','log','dNyyn','❌\x20Failed\x20to\x20add\x20marketplace:','Would\x20you\x20like\x20to\x20install\x20skills?','544458iDpsDt','add'];_0x2bc2=function(){return _0x1f8856;};return _0x2bc2();}(function(_0x3240eb,_0x3844fa){const _0x5614a3=_0x1c6f,_0x5ec955=_0x3240eb();while(!![]){try{const _0x553478=parseInt(_0x5614a3(0x193))/0x1+-parseInt(_0x5614a3(0x1a9))/0x2*(-parseInt(_0x5614a3(0x19c))/0x3)+-parseInt(_0x5614a3(0x1af))/0x4*(-parseInt(_0x5614a3(0x18e))/0x5)+-parseInt(_0x5614a3(0x1bc))/0x6+parseInt(_0x5614a3(0x18d))/0x7+-parseInt(_0x5614a3(0x1b5))/0x8*(-parseInt(_0x5614a3(0x1a8))/0x9)+-parseInt(_0x5614a3(0x1be))/0xa;if(_0x553478===_0x3844fa)break;else _0x5ec955['push'](_0x5ec955['shift']());}catch(_0x2af7e9){_0x5ec955['push'](_0x5ec955['shift']());}}}(_0x2bc2,0x47f7d));import{join}from'path';import{existsSync}from'fs';import _0x13c437 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x1c6f(_0x44a4e0,_0x84ea44){_0x44a4e0=_0x44a4e0-0x18c;const _0x2bc283=_0x2bc2();let _0x1c6fbb=_0x2bc283[_0x44a4e0];return _0x1c6fbb;}export async function ensureClaudePlugin(_0x25e0fe){const _0x54ccb3=_0x1c6f,_0x19da76={'ElSWY':function(_0x2c0beb,_0x4d76f1){return _0x2c0beb(_0x4d76f1);},'aBBUI':_0x54ccb3(0x1b3),'MErsx':_0x54ccb3(0x19a),'dNyyn':function(_0x41a506,_0x35de2b){return _0x41a506(_0x35de2b);},'ipXDB':function(_0x4a0455){return _0x4a0455();},'ivoGp':_0x54ccb3(0x1b0),'oYwKR':_0x54ccb3(0x1bf),'Qucnq':'Project\x20(shared\x20with\x20team\x20via\x20git)','JwJNb':_0x54ccb3(0x1a0),'hHFuV':'✓\x20Marketplace\x20already\x20added','DqJyN':_0x54ccb3(0x194),'QdSON':'ranger-testing/trailhead','WgpuX':_0x54ccb3(0x191),'ffLSt':'\x0aYou\x20can\x20install\x20manually\x20with:','wkfyh':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','vXslQ':_0x54ccb3(0x1a3),'lKHDg':'❌\x20Failed\x20to\x20install\x20plugin:','nhIKI':_0x54ccb3(0x199),'yIDjR':_0x54ccb3(0x1b2),'OMHUC':_0x54ccb3(0x1b4),'tKTbP':_0x54ccb3(0x1ac),'VkHIj':_0x54ccb3(0x19e)},_0x26143d=await _0x19da76['ElSWY'](isPluginInstalled,_0x19da76[_0x54ccb3(0x1a5)]);if(_0x26143d)return console['log'](_0x19da76['MErsx']),![];const _0x4c741f=_0x19da76[_0x54ccb3(0x190)](existsSync,join(_0x19da76[_0x54ccb3(0x1aa)](getProjectRoot),_0x54ccb3(0x1ae)));let _0x587298;if(_0x25e0fe)_0x587298=_0x25e0fe;else{if(_0x4c741f)_0x587298='project';else{console[_0x54ccb3(0x18f)](_0x19da76['ivoGp']);const _0x394914=await _0x13c437['prompt']([{'type':'list','name':_0x54ccb3(0x1b1),'message':_0x54ccb3(0x195),'choices':[{'name':_0x19da76[_0x54ccb3(0x1ba)],'value':_0x54ccb3(0x1bd)},{'name':_0x19da76[_0x54ccb3(0x1b7)],'value':'project'}],'default':'user'}]);_0x587298=_0x394914[_0x54ccb3(0x1b1)];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x587298+'\x20level)...\x0a');const _0xcfc72a=await _0x19da76['ElSWY'](isMarketplaceAdded,_0x19da76['JwJNb']);let _0xaaf258=_0xcfc72a;if(_0xcfc72a)console[_0x54ccb3(0x18f)](_0x19da76['hHFuV']);else{const _0x26e278=await runClaudeCommand([_0x54ccb3(0x1b2),'marketplace',_0x19da76['DqJyN'],_0x19da76[_0x54ccb3(0x196)]]);!_0x26e278[_0x54ccb3(0x18c)]?(console[_0x54ccb3(0x198)](_0x19da76[_0x54ccb3(0x1a6)],_0x26e278[_0x54ccb3(0x198)]),console['log'](_0x19da76[_0x54ccb3(0x1a7)]),console['log'](_0x19da76[_0x54ccb3(0x1b9)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x587298)):_0xaaf258=!![];}if(_0xaaf258){const _0x4af3e2=await runClaudeCommand([_0x54ccb3(0x1b2),_0x19da76[_0x54ccb3(0x1b8)],_0x19da76[_0x54ccb3(0x1a5)],_0x54ccb3(0x1b4),_0x587298]);if(!_0x4af3e2[_0x54ccb3(0x18c)])console['error'](_0x19da76['lKHDg'],_0x4af3e2[_0x54ccb3(0x198)]),console[_0x54ccb3(0x18f)](_0x54ccb3(0x1ab)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x587298);else{console[_0x54ccb3(0x18f)](_0x19da76[_0x54ccb3(0x1bb)]);const _0x2b31c2=[_0x19da76[_0x54ccb3(0x1ad)],'enable',_0x54ccb3(0x1b3)];_0x587298==='project'&&_0x2b31c2['push'](_0x19da76['OMHUC'],_0x54ccb3(0x1c0));const _0x2a06df=await runClaudeCommand(_0x2b31c2,{'captureOutput':!![]}),_0x4da6f6=_0x2a06df['output']?.['includes'](_0x19da76[_0x54ccb3(0x1a2)]);!_0x2a06df[_0x54ccb3(0x18c)]&&!_0x4da6f6?console['error'](_0x54ccb3(0x19f),_0x2a06df[_0x54ccb3(0x198)]):console['log'](_0x19da76['VkHIj']);}}return!![];}export async function ensureClaudeSkills(_0xa031b){const _0x1dd171=_0x1c6f,_0x56b0db={'ETcJz':function(_0x3f1212,_0x403886){return _0x3f1212(_0x403886);},'FRctX':function(_0x5f0fba,_0x26d18a){return _0x5f0fba(_0x26d18a);},'yOTJq':function(_0x48dffa,_0x538618){return _0x48dffa(_0x538618);},'SmIHO':'project','GSYfj':_0x1dd171(0x19b),'pyRWy':'✓\x20Ranger\x20skills\x20already\x20installed','hkAKt':function(_0x46d2a4,_0x32bbb7){return _0x46d2a4(_0x32bbb7);},'UJerA':_0x1dd171(0x19d),'wqser':'wantsSkillup'},_0x31111c=_0x56b0db['ETcJz'](existsSync,join(_0x56b0db[_0x1dd171(0x1a4)](getSkillsDir,_0x1dd171(0x1bd)),'ranger','SKILL.md')),_0x2b8e22=_0x56b0db['yOTJq'](existsSync,join(getSkillsDir(_0x56b0db['SmIHO']),_0x56b0db['GSYfj'],_0x1dd171(0x1a1)));if(_0x31111c||_0x2b8e22)return console['log'](_0x56b0db[_0x1dd171(0x1b6)]),![];const _0x40a76c=_0x56b0db['yOTJq'](existsSync,join(getProjectRoot(),_0x1dd171(0x1ae)));let _0x13e6a8=!![];if(_0xa031b)await skillup({'autoInstall':_0xa031b,'suppressUsage':!![]});else{if(_0x40a76c)await _0x56b0db['hkAKt'](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x1305d7=await _0x13c437['prompt']([{'type':_0x56b0db[_0x1dd171(0x197)],'name':_0x56b0db['wqser'],'message':_0x1dd171(0x192),'default':!![]}]);_0x13e6a8=_0x1305d7['wantsSkillup'],_0x13e6a8&&await skillup({'suppressUsage':!![]});}}return _0x13e6a8;}
1
+ (function(_0x1b5eec,_0x16fc4d){const _0x151696=_0xfe0b,_0x39d965=_0x1b5eec();while(!![]){try{const _0x36c51a=parseInt(_0x151696(0x142))/0x1+parseInt(_0x151696(0x141))/0x2*(-parseInt(_0x151696(0x14a))/0x3)+-parseInt(_0x151696(0x13b))/0x4+-parseInt(_0x151696(0x13f))/0x5+parseInt(_0x151696(0x14c))/0x6*(parseInt(_0x151696(0x15c))/0x7)+parseInt(_0x151696(0x154))/0x8*(parseInt(_0x151696(0x13c))/0x9)+parseInt(_0x151696(0x15e))/0xa;if(_0x36c51a===_0x16fc4d)break;else _0x39d965['push'](_0x39d965['shift']());}catch(_0x13fc5b){_0x39d965['push'](_0x39d965['shift']());}}}(_0x5942,0x20dbf));import{join}from'path';import{existsSync}from'fs';function _0xfe0b(_0x4c5ff6,_0x200640){_0x4c5ff6=_0x4c5ff6-0x12c;const _0x594238=_0x5942();let _0xfe0b00=_0x594238[_0x4c5ff6];return _0xfe0b00;}import _0x224eda from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';function _0x5942(){const _0x360605=['SKILL.md','6eJnZgL','nLLBH','prompt','includes','IJqFD','plugin','✓\x20Marketplace\x20already\x20added','tGyHn','8inxbBT','CCBBO','Project\x20(shared\x20with\x20team\x20via\x20git)','\x0aYou\x20can\x20install\x20manually\x20with:','list','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','already\x20enabled','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','846475qDAIvo','error','3395390VZjCJz','mglQk','log','.claude','✓\x20Ranger\x20skills\x20already\x20installed','❌\x20Failed\x20to\x20install\x20plugin:','ZkPBN','ranger@trailhead','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','ElKKN','Where\x20should\x20the\x20plugin\x20be\x20installed?','yYAJS','vJnwW','wantsSkillup','DmFuf','output','tOTzg','927500rBBbRV','1253871WWpNRr','success','✓\x20Claude\x20Code\x20plugin\x20enabled','978875hJmHuO','jRMCH','142uRJisx','210461iKcPWJ','NAFsa','alzMj','confirm','QrLWJ','eQJiT','push','project','10479TrvjVV'];_0x5942=function(){return _0x360605;};return _0x5942();}export async function ensureClaudePlugin(_0xa6af28){const _0x36681a=_0xfe0b,_0x41b6fe={'yYAJS':function(_0x4aafae,_0x1abbc5){return _0x4aafae(_0x1abbc5);},'icdtL':_0x36681a(0x131),'ElKKN':_0x36681a(0x149),'tGyHn':_0x36681a(0x15b),'hcIUJ':_0x36681a(0x158),'PSXto':_0x36681a(0x134),'tOTzg':'User\x20(available\x20in\x20all\x20your\x20projects)','hZpho':'user','aWkFO':_0x36681a(0x156),'yjoXx':'trailhead','eQJiT':'marketplace','alzMj':'add','nLLBH':'ranger-testing/trailhead','mglQk':'❌\x20Failed\x20to\x20add\x20marketplace:','EzYrO':'\x0aYou\x20can\x20install\x20manually\x20with:','vJnwW':_0x36681a(0x151),'CCBBO':'enable','dIVsM':'--scope','fqSNn':_0x36681a(0x15a),'gmxpQ':_0x36681a(0x13e)},_0x4795b8=await _0x41b6fe['yYAJS'](isPluginInstalled,_0x41b6fe['icdtL']);if(_0x4795b8)return console[_0x36681a(0x12c)]('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x210245=existsSync(join(getProjectRoot(),_0x36681a(0x12d)));let _0x2f9a58;if(_0xa6af28)_0x2f9a58=_0xa6af28;else{if(_0x210245)_0x2f9a58=_0x41b6fe['ElKKN'];else{console['log'](_0x41b6fe[_0x36681a(0x153)]);const _0xb47c4e=await _0x224eda[_0x36681a(0x14e)]([{'type':_0x41b6fe['hcIUJ'],'name':'pluginScope','message':_0x41b6fe['PSXto'],'choices':[{'name':_0x41b6fe[_0x36681a(0x13a)],'value':_0x41b6fe['hZpho']},{'name':_0x41b6fe['aWkFO'],'value':_0x41b6fe[_0x36681a(0x133)]}],'default':_0x41b6fe['hZpho']}]);_0x2f9a58=_0xb47c4e['pluginScope'];}}console[_0x36681a(0x12c)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x2f9a58+'\x20level)...\x0a');const _0x2b2a85=await isMarketplaceAdded(_0x41b6fe['yjoXx']);let _0x287391=_0x2b2a85;if(_0x2b2a85)console['log'](_0x36681a(0x152));else{const _0x4ffbf0=await runClaudeCommand(['plugin',_0x41b6fe[_0x36681a(0x147)],_0x41b6fe[_0x36681a(0x144)],_0x41b6fe[_0x36681a(0x14d)]]);!_0x4ffbf0[_0x36681a(0x13d)]?(console[_0x36681a(0x15d)](_0x41b6fe[_0x36681a(0x15f)],_0x4ffbf0[_0x36681a(0x15d)]),console[_0x36681a(0x12c)](_0x41b6fe['EzYrO']),console[_0x36681a(0x12c)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console[_0x36681a(0x12c)](_0x36681a(0x132)+_0x2f9a58)):_0x287391=!![];}if(_0x287391){const _0x3321d6=await _0x41b6fe[_0x36681a(0x135)](runClaudeCommand,['plugin','install',_0x36681a(0x131),'--scope',_0x2f9a58]);if(!_0x3321d6['success'])console[_0x36681a(0x15d)](_0x36681a(0x12f),_0x3321d6['error']),console['log'](_0x36681a(0x157)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x2f9a58);else{console[_0x36681a(0x12c)](_0x36681a(0x159));const _0x3335cf=[_0x41b6fe[_0x36681a(0x136)],_0x41b6fe[_0x36681a(0x155)],'ranger@trailhead'];_0x2f9a58==='project'&&_0x3335cf[_0x36681a(0x148)](_0x41b6fe['dIVsM'],_0x41b6fe[_0x36681a(0x133)]);const _0x5ab7c7=await runClaudeCommand(_0x3335cf,{'captureOutput':!![]}),_0x2a78cd=_0x5ab7c7[_0x36681a(0x139)]?.[_0x36681a(0x14f)](_0x41b6fe['fqSNn']);!_0x5ab7c7[_0x36681a(0x13d)]&&!_0x2a78cd?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x5ab7c7['error']):console[_0x36681a(0x12c)](_0x41b6fe['gmxpQ']);}}return!![];}export async function ensureClaudeSkills(_0x240cdc){const _0x32a917=_0xfe0b,_0xce9729={'QrLWJ':function(_0x4babd2,_0x4b5590){return _0x4babd2(_0x4b5590);},'IJqFD':function(_0xa6e9a9,_0x1cd789,_0x29dd99,_0x4686ac){return _0xa6e9a9(_0x1cd789,_0x29dd99,_0x4686ac);},'jRMCH':_0x32a917(0x149),'DmFuf':'ranger','OkpQV':function(_0x5346b9,_0x5241cd){return _0x5346b9||_0x5241cd;},'rWCRc':_0x32a917(0x12e),'NAFsa':function(_0x2b1083,_0x471eb6,_0x3f1efa){return _0x2b1083(_0x471eb6,_0x3f1efa);},'BAZsE':function(_0xf7358c){return _0xf7358c();},'GeARZ':'.claude','ExUtv':_0x32a917(0x145),'lcQKQ':'wantsSkillup','ZkPBN':function(_0x2a3bce,_0x581862){return _0x2a3bce(_0x581862);}},_0x51f0d0=_0xce9729[_0x32a917(0x146)](existsSync,_0xce9729[_0x32a917(0x150)](join,getSkillsDir('user'),'ranger',_0x32a917(0x14b))),_0xbdd230=_0xce9729['QrLWJ'](existsSync,_0xce9729[_0x32a917(0x150)](join,getSkillsDir(_0xce9729[_0x32a917(0x140)]),_0xce9729[_0x32a917(0x138)],_0x32a917(0x14b)));if(_0xce9729['OkpQV'](_0x51f0d0,_0xbdd230))return console['log'](_0xce9729['rWCRc']),![];const _0x80305d=_0xce9729['QrLWJ'](existsSync,_0xce9729[_0x32a917(0x143)](join,_0xce9729['BAZsE'](getProjectRoot),_0xce9729['GeARZ']));let _0x199171=!![];if(_0x240cdc)await skillup({'autoInstall':_0x240cdc,'suppressUsage':!![]});else{if(_0x80305d)await skillup({'autoInstall':_0xce9729[_0x32a917(0x140)],'suppressUsage':!![]});else{const _0x23ad6b=await _0x224eda[_0x32a917(0x14e)]([{'type':_0xce9729['ExUtv'],'name':_0xce9729['lcQKQ'],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x199171=_0x23ad6b[_0x32a917(0x137)],_0x199171&&await _0xce9729[_0x32a917(0x130)](skillup,{'suppressUsage':!![]});}}return _0x199171;}
@@ -1 +1 @@
1
- function _0x5111(_0x5b2b7d,_0x8ef34b){_0x5b2b7d=_0x5b2b7d-0x1e7;const _0x4539b4=_0x4539();let _0x511173=_0x4539b4[_0x5b2b7d];return _0x511173;}(function(_0x5e30c3,_0x3e3f68){const _0x4137ad=_0x5111,_0x11491f=_0x5e30c3();while(!![]){try{const _0x22bb05=parseInt(_0x4137ad(0x1fb))/0x1*(-parseInt(_0x4137ad(0x1ee))/0x2)+-parseInt(_0x4137ad(0x1f1))/0x3+parseInt(_0x4137ad(0x207))/0x4+-parseInt(_0x4137ad(0x202))/0x5+-parseInt(_0x4137ad(0x1f2))/0x6*(-parseInt(_0x4137ad(0x1f0))/0x7)+parseInt(_0x4137ad(0x1f8))/0x8*(-parseInt(_0x4137ad(0x1fe))/0x9)+parseInt(_0x4137ad(0x1f5))/0xa*(parseInt(_0x4137ad(0x205))/0xb);if(_0x22bb05===_0x3e3f68)break;else _0x11491f['push'](_0x11491f['shift']());}catch(_0x3b8864){_0x11491f['push'](_0x11491f['shift']());}}}(_0x4539,0xc3a55));function _0x4539(){const _0xea1048=['parse','hWuNA','9ysxDQp','plugin','FXAvb','Failed\x20to\x20read\x20opencode.json','6244820Vawhez','lcrTb','User\x20(available\x20in\x20all\x20your\x20projects)','11VHztTy','✓\x20OpenCode\x20plugin\x20already\x20configured','687804AdZiFS','$schema','wItVq','OMCON','nScyY','stringify','log','project','16fDXUwA','LCVfU','28lGjFnu','335436kmPgci','148362OGnKjt','@ranger-testing/opencode-plugin','Where\x20should\x20the\x20plugin\x20be\x20installed?','28881530cSCsym','QgyEN','https://opencode.ai/config.json','6897592NKXpaZ','error','OhCAX','16834XJxCPo'];_0x4539=function(){return _0xea1048;};return _0x4539();}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x533205 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x36e6e2){const _0x1b68a6=_0x5111,_0x237d96={'QgyEN':function(_0x11ca08,_0x3b14ed){return _0x11ca08(_0x3b14ed);},'nScyY':_0x1b68a6(0x1ed),'qGqyT':'\x0a📦\x20OpenCode\x20Plugin\x0a','qZzQS':'list','LCVfU':'pluginScope','vIcgI':_0x1b68a6(0x204),'lcrTb':'user','fFctU':'Project\x20(shared\x20with\x20team\x20via\x20git)','lbOwS':function(_0x108da6,_0x54e977){return _0x108da6(_0x54e977);},'wItVq':'utf-8','FXAvb':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','OhCAX':_0x1b68a6(0x201),'hWuNA':function(_0x14c559,_0x473c6f){return _0x14c559(_0x473c6f);},'OMCON':function(_0x589356,_0x57974d,_0x488348){return _0x589356(_0x57974d,_0x488348);}},_0x1fbe8b=_0x237d96[_0x1b68a6(0x1f6)](existsSync,join(_0x237d96[_0x1b68a6(0x1f6)](getOpencodeConfigDir,_0x237d96[_0x1b68a6(0x1ea)]),'opencode.json'));let _0x47e54f;if(_0x36e6e2)_0x47e54f=_0x36e6e2;else{if(_0x1fbe8b)_0x47e54f=_0x1b68a6(0x1ed);else{console[_0x1b68a6(0x1ec)](_0x237d96['qGqyT']);const _0x59e005=await _0x533205['prompt']([{'type':_0x237d96['qZzQS'],'name':_0x237d96[_0x1b68a6(0x1ef)],'message':_0x1b68a6(0x1f4),'choices':[{'name':_0x237d96['vIcgI'],'value':_0x237d96[_0x1b68a6(0x203)]},{'name':_0x237d96['fFctU'],'value':_0x1b68a6(0x1ed)}],'default':_0x237d96[_0x1b68a6(0x203)]}]);_0x47e54f=_0x59e005['pluginScope'];}}const _0x427f5d=join(getOpencodeConfigDir(_0x47e54f),'opencode.json'),_0x2c719e=_0x1b68a6(0x1f3),_0x20bbd9=_0x1b68a6(0x1f7);let _0x4fe04e={};if(_0x237d96['lbOwS'](existsSync,_0x427f5d))try{const _0x5b9ff9=await readFile(_0x427f5d,_0x237d96[_0x1b68a6(0x1e8)]);_0x4fe04e=JSON[_0x1b68a6(0x1fc)](_0x5b9ff9);}catch(_0x345146){return console[_0x1b68a6(0x1f9)](_0x237d96[_0x1b68a6(0x200)]),{'configured':![],'scope':_0x47e54f,'error':_0x237d96[_0x1b68a6(0x1fa)],'details':_0x345146};}const _0x129899=Array['isArray'](_0x4fe04e[_0x1b68a6(0x1ff)])?_0x4fe04e['plugin']:[];if(_0x129899['includes'](_0x2c719e))return console['log'](_0x1b68a6(0x206)),{'configured':![],'scope':_0x47e54f};return _0x4fe04e[_0x1b68a6(0x1e7)]=_0x4fe04e[_0x1b68a6(0x1e7)]||_0x20bbd9,_0x4fe04e[_0x1b68a6(0x1ff)]=[..._0x129899,_0x2c719e],await mkdir(_0x237d96[_0x1b68a6(0x1fd)](getOpencodeConfigDir,_0x47e54f),{'recursive':!![]}),await _0x237d96[_0x1b68a6(0x1e9)](writeFile,_0x427f5d,JSON[_0x1b68a6(0x1eb)](_0x4fe04e,null,0x2)+'\x0a'),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x47e54f};}
1
+ (function(_0x183c1e,_0x5c3302){const _0x207206=_0x546c,_0x34d413=_0x183c1e();while(!![]){try{const _0x32fb01=-parseInt(_0x207206(0x173))/0x1*(parseInt(_0x207206(0x15b))/0x2)+-parseInt(_0x207206(0x15e))/0x3*(-parseInt(_0x207206(0x169))/0x4)+-parseInt(_0x207206(0x171))/0x5*(-parseInt(_0x207206(0x167))/0x6)+parseInt(_0x207206(0x15f))/0x7+-parseInt(_0x207206(0x16b))/0x8+-parseInt(_0x207206(0x158))/0x9+-parseInt(_0x207206(0x160))/0xa*(parseInt(_0x207206(0x16c))/0xb);if(_0x32fb01===_0x5c3302)break;else _0x34d413['push'](_0x34d413['shift']());}catch(_0x13bbbe){_0x34d413['push'](_0x34d413['shift']());}}}(_0x2a56,0x8d909));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x2a56(){const _0x240303=['\x0a📦\x20OpenCode\x20Plugin\x0a','https://opencode.ai/config.json','prompt','6OYZNVe','project','20XePYjt','user','1255328IaNDee','53471PXuIkU','list','BTYIZ','YGvIS','log','4186225FIxjDg','RuPpQ','2SOIyif','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','✓\x20OpenCode\x20plugin\x20configured','2689875PbrkUo','opencode.json','Mhkgd','67190YPfJkC','error','Ubxbr','393981VsTkGX','903539Ieigxs','1070tEYsfj','plugin','pluginScope','Project\x20(shared\x20with\x20team\x20via\x20git)'];_0x2a56=function(){return _0x240303;};return _0x2a56();}function _0x546c(_0x197e6e,_0x5d3436){_0x197e6e=_0x197e6e-0x156;const _0x2a5608=_0x2a56();let _0x546c09=_0x2a5608[_0x197e6e];return _0x546c09;}import _0x385a50 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x425767){const _0x4ffd0d=_0x546c,_0x15e942={'McyiE':function(_0x11c569,_0x25e248){return _0x11c569(_0x25e248);},'BTYIZ':function(_0x17351f,_0xe6ff61,_0x345e4a){return _0x17351f(_0xe6ff61,_0x345e4a);},'wdgOE':_0x4ffd0d(0x164),'Ubxbr':_0x4ffd0d(0x16d),'aRBSt':_0x4ffd0d(0x162),'fxqZG':'User\x20(available\x20in\x20all\x20your\x20projects)','RuPpQ':'opencode.json','YGvIS':_0x4ffd0d(0x156),'Mhkgd':'Failed\x20to\x20read\x20opencode.json'},_0x15f264=_0x15e942['McyiE'](existsSync,_0x15e942[_0x4ffd0d(0x16e)](join,getOpencodeConfigDir(_0x4ffd0d(0x168)),_0x4ffd0d(0x159)));let _0x3d4f97;if(_0x425767)_0x3d4f97=_0x425767;else{if(_0x15f264)_0x3d4f97='project';else{console[_0x4ffd0d(0x170)](_0x15e942['wdgOE']);const _0x2f913d=await _0x385a50[_0x4ffd0d(0x166)]([{'type':_0x15e942[_0x4ffd0d(0x15d)],'name':_0x15e942['aRBSt'],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x15e942['fxqZG'],'value':'user'},{'name':_0x4ffd0d(0x163),'value':'project'}],'default':_0x4ffd0d(0x16a)}]);_0x3d4f97=_0x2f913d[_0x4ffd0d(0x162)];}}const _0x153ac8=join(getOpencodeConfigDir(_0x3d4f97),_0x15e942[_0x4ffd0d(0x172)]),_0x1945e9='@ranger-testing/opencode-plugin',_0x4eedc4=_0x4ffd0d(0x165);let _0x446923={};if(existsSync(_0x153ac8))try{const _0x32403b=await readFile(_0x153ac8,'utf-8');_0x446923=JSON['parse'](_0x32403b);}catch(_0x294037){return console[_0x4ffd0d(0x15c)](_0x15e942[_0x4ffd0d(0x16f)]),{'configured':![],'scope':_0x3d4f97,'error':_0x15e942[_0x4ffd0d(0x15a)],'details':_0x294037};}const _0x3687f4=Array['isArray'](_0x446923[_0x4ffd0d(0x161)])?_0x446923[_0x4ffd0d(0x161)]:[];if(_0x3687f4['includes'](_0x1945e9))return console[_0x4ffd0d(0x170)]('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x3d4f97};return _0x446923['$schema']=_0x446923['$schema']||_0x4eedc4,_0x446923['plugin']=[..._0x3687f4,_0x1945e9],await mkdir(getOpencodeConfigDir(_0x3d4f97),{'recursive':!![]}),await writeFile(_0x153ac8,JSON['stringify'](_0x446923,null,0x2)+'\x0a'),console[_0x4ffd0d(0x170)](_0x4ffd0d(0x157)),{'configured':!![],'scope':_0x3d4f97};}
@@ -1 +1 @@
1
- (function(_0x4dc48d,_0x51983e){const _0x4aef3d=_0x4852,_0x28da7f=_0x4dc48d();while(!![]){try{const _0x2dca89=-parseInt(_0x4aef3d(0x8b))/0x1+-parseInt(_0x4aef3d(0xa0))/0x2*(parseInt(_0x4aef3d(0x78))/0x3)+parseInt(_0x4aef3d(0x92))/0x4*(parseInt(_0x4aef3d(0x75))/0x5)+parseInt(_0x4aef3d(0x6b))/0x6+parseInt(_0x4aef3d(0x8d))/0x7+-parseInt(_0x4aef3d(0x70))/0x8+parseInt(_0x4aef3d(0x87))/0x9;if(_0x2dca89===_0x51983e)break;else _0x28da7f['push'](_0x28da7f['shift']());}catch(_0x520f88){_0x28da7f['push'](_0x28da7f['shift']());}}}(_0x2972,0x83b19));function _0x4852(_0x41eff7,_0x2cafc4){_0x41eff7=_0x41eff7-0x69;const _0x297216=_0x2972();let _0x48522f=_0x297216[_0x41eff7];return _0x48522f;}import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x1d3f53){const _0x224a17=_0x4852,_0x2fdc32={'NoDzF':function(_0x2f19d8){return _0x2f19d8();},'Omuur':function(_0x426682,_0x15e820){return _0x426682(_0x15e820);},'EsVdI':function(_0x1e82ff,_0x7f8cff){return _0x1e82ff+_0x7f8cff;},'ggVrc':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','VKiUr':'No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'},_0x1161ac=_0x2fdc32['NoDzF'](getRangerDir),_0x18e5a1=join(_0x1161ac,'ci');if(_0x1d3f53){const _0x5a8c54=join(_0x18e5a1,_0x1d3f53);return{'name':_0x1d3f53,'path':_0x5a8c54};}if(!_0x2fdc32['Omuur'](existsSync,_0x18e5a1))throw new Error(_0x2fdc32[_0x224a17(0xa1)](_0x224a17(0x95),_0x2fdc32['ggVrc']));const _0x45e297=await readdir(_0x18e5a1,{'withFileTypes':!![]}),_0x4a228b=_0x45e297['filter'](_0x1a76b3=>_0x1a76b3[_0x224a17(0x7c)]())['map'](_0x97495e=>_0x97495e['name']);if(_0x4a228b[_0x224a17(0x9f)]===0x0)throw new Error(_0x2fdc32['VKiUr']+_0x224a17(0x91));if(_0x4a228b['length']===0x1){const _0x2ea7c9=_0x4a228b[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x2ea7c9),{'name':_0x2ea7c9,'path':join(_0x18e5a1,_0x2ea7c9)};}throw new Error(_0x224a17(0x94)+_0x4a228b['join'](',\x20')+_0x224a17(0x80));}async function installPluginNonInteractive(){const _0x28624c=_0x4852,_0x1e13cb={'mlqQg':_0x28624c(0x7f),'CLxYj':function(_0x97cbfa,_0x4136a0){return _0x97cbfa(_0x4136a0);},'bJXiq':'install','eYZZu':'--scope','YwTjw':_0x28624c(0x7d),'oSxSy':_0x28624c(0x93),'gWcFR':_0x28624c(0x77)},_0x435054=await isPluginInstalled(_0x1e13cb['mlqQg']);if(_0x435054)return console[_0x28624c(0x89)](_0x28624c(0x9d)),![];console[_0x28624c(0x89)](_0x28624c(0x96));const _0x561a01=await isMarketplaceAdded(_0x28624c(0x83));let _0x4c9215=_0x561a01;if(_0x561a01)console[_0x28624c(0x89)](_0x28624c(0x79));else{const _0x4d81b7=await _0x1e13cb['CLxYj'](runClaudeCommand,['plugin','marketplace','add','ranger-testing/trailhead']);!_0x4d81b7['success']?(console['error']('Failed\x20to\x20add\x20marketplace:',_0x4d81b7[_0x28624c(0x85)]),console[_0x28624c(0x89)](_0x28624c(0x6f))):_0x4c9215=!![];}if(_0x4c9215){const _0x1af7b3=await _0x1e13cb[_0x28624c(0x9c)](runClaudeCommand,['plugin',_0x1e13cb['bJXiq'],'ranger@trailhead',_0x1e13cb[_0x28624c(0x6e)],_0x1e13cb[_0x28624c(0x7b)]]);!_0x1af7b3[_0x28624c(0x7a)]?(console['error'](_0x1e13cb['oSxSy'],_0x1af7b3[_0x28624c(0x85)]),console[_0x28624c(0x89)](_0x1e13cb[_0x28624c(0x6d)])):console['log'](_0x28624c(0x74));}return!![];}export async function setupCi(_0x11e768,_0x4c36fe,_0x1d199e){const _0x5257b0=_0x4852,_0x56eeff={'pWBYS':'auth','dvlwv':function(_0x5c2ed3,_0x382225){return _0x5c2ed3(_0x382225);},'lDkWW':'dir_setup','aNcId':function(_0x48f391,_0x3571f5,_0x4bf0ab){return _0x48f391(_0x3571f5,_0x4bf0ab);},'DxkoK':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','QWZjn':_0x5257b0(0x84),'Invlg':_0x5257b0(0x8a),'MikQa':function(_0x42a183,_0x34e84f,_0x465d6f){return _0x42a183(_0x34e84f,_0x465d6f);},'rTJpN':function(_0xcc82cd,_0x40aaf0,_0x4d76b9){return _0xcc82cd(_0x40aaf0,_0x4d76b9);},'bxaNf':function(_0x2a24bc,_0x2e7df9){return _0x2a24bc(_0x2e7df9);},'bpHCy':function(_0xd6040,_0x1589f5){return _0xd6040 instanceof _0x1589f5;},'xjTrF':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','spEPc':function(_0x4aeb20,_0x847976){return _0x4aeb20(_0x847976);},'Clzbx':function(_0x26cd27){return _0x26cd27();},'aFCsb':_0x5257b0(0x71),'zNabu':'project'};console['log']('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x1d199e?.['trackPhaseStart'](_0x56eeff['pWBYS']),await _0x56eeff[_0x5257b0(0x88)](authenticate,_0x11e768),_0x1d199e?.[_0x5257b0(0x90)](_0x5257b0(0x97)),_0x1d199e?.[_0x5257b0(0x98)](_0x56eeff['lDkWW']);const {path:_0x45ebff,installed:_0xdb455b}=await ensureRangerDir();await writeRangerGitignore(_0x45ebff);const _0x587bdb=join(_0x45ebff,_0x5257b0(0x9a));!existsSync(_0x587bdb)&&await _0x56eeff[_0x5257b0(0x81)](mkdir,_0x587bdb,{'recursive':!![]});_0x1d199e?.[_0x5257b0(0x90)](_0x56eeff['lDkWW'],{'installed':_0xdb455b}),_0x1d199e?.['trackPhaseStart']('chromium');let _0x4b44e2=![];_0x4c36fe?.['skipChromium']?console[_0x5257b0(0x89)](_0x56eeff['DxkoK']):_0x4b44e2=await ensureChromium();_0x1d199e?.['trackPhaseEnd'](_0x56eeff[_0x5257b0(0x9b)],{'installed':_0x4b44e2,'skipped':!!_0x4c36fe?.['skipChromium']}),_0x1d199e?.['trackPhaseStart'](_0x56eeff[_0x5257b0(0x8f)]);const _0x40cbc7=await findCiProfile(_0x4c36fe?.['profile']);let _0x3b18a=![];_0x4c36fe?.[_0x5257b0(0x99)]&&(await mkdir(_0x40cbc7['path'],{'recursive':!![]}),await saveSettings(_0x40cbc7['name'],{'baseUrl':_0x4c36fe['baseUrl'],'headless':!![]}),console[_0x5257b0(0x89)](_0x5257b0(0x8e)+_0x4c36fe[_0x5257b0(0x99)]),_0x3b18a=!![]);const _0x29687f=_0x56eeff[_0x5257b0(0x73)](join,_0x40cbc7['path'],_0x5257b0(0x6a));if(!existsSync(_0x29687f)&&!_0x3b18a)throw new Error('CI\x20profile\x20\x22'+_0x40cbc7['name']+_0x5257b0(0x82));const _0x27b6ce=_0x56eeff[_0x5257b0(0x73)](join,_0x40cbc7['path'],_0x5257b0(0x69)),_0x5775f1=_0x56eeff['rTJpN'](join,_0x40cbc7['path'],_0x5257b0(0x86)),_0x191291=existsSync(_0x27b6ce),_0xdffe9d=_0x56eeff[_0x5257b0(0x8c)](existsSync,_0x5775f1);if(_0xdffe9d)try{const _0x21e814=await getToken();if(!_0x21e814)throw new Error('No\x20API\x20token\x20available\x20for\x20decryption');const _0x1e6717=await _0x56eeff[_0x5257b0(0x8c)](readFile,_0x5775f1);decrypt(_0x1e6717,_0x21e814),console[_0x5257b0(0x89)]('✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)');}catch(_0x59fd48){const _0x9434c0=_0x56eeff['bpHCy'](_0x59fd48,Error)?_0x59fd48['message']:String(_0x59fd48);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x40cbc7[_0x5257b0(0x72)]+_0x5257b0(0x76)+_0x9434c0);}else _0x191291?console[_0x5257b0(0x89)](_0x5257b0(0x6c)):console[_0x5257b0(0x89)](_0x56eeff['xjTrF']);await _0x56eeff[_0x5257b0(0x7e)](writeActiveProfileName,_0x40cbc7['name']),console[_0x5257b0(0x89)]('✓\x20Active\x20profile:\x20'+_0x40cbc7[_0x5257b0(0x72)]),_0x1d199e?.[_0x5257b0(0x90)](_0x5257b0(0x8a),{'profileName':_0x40cbc7['name'],'hasAuth':_0x191291,'hasEncryptedAuth':_0xdffe9d,'createdSettings':_0x3b18a}),_0x1d199e?.['trackPhaseStart']('plugin');const _0x55ace0=await _0x56eeff[_0x5257b0(0x9e)](installPluginNonInteractive);_0x1d199e?.['trackPhaseEnd']('plugin',{'installed':_0x55ace0}),_0x1d199e?.[_0x5257b0(0x98)](_0x56eeff['aFCsb']),await _0x56eeff[_0x5257b0(0x88)](skillup,{'autoInstall':_0x56eeff['zNabu']}),_0x1d199e?.[_0x5257b0(0x90)]('skills'),console['log']('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}function _0x2972(){const _0x2f99c5=['aNcId','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','trailhead','chromium','error','auth.json.enc','9393273CWJjOH','dvlwv','log','profile_activate','1009884CtcUqD','bxaNf','3194709wAmaeH','✓\x20Created\x20profile\x20settings:\x20baseUrl=','Invlg','trackPhaseEnd','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','19596iEZZkC','Failed\x20to\x20install\x20plugin:','Multiple\x20CI\x20profiles\x20found:\x20','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','auth','trackPhaseStart','baseUrl','sessions','QWZjn','CLxYj','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','Clzbx','length','65774PcepRK','EsVdI','auth.json','settings.json','2514114zKUsdr','✓\x20Auth\x20state\x20found','gWcFR','eYZZu','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','6363376QRHdVM','skills','name','MikQa','✓\x20Claude\x20Code\x20plugin\x20installed','1005mocBlt','\x22:\x20','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','51oAFVjJ','✓\x20Marketplace\x20already\x20added','success','YwTjw','isDirectory','project','spEPc','ranger@trailhead','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.'];_0x2972=function(){return _0x2f99c5;};return _0x2972();}
1
+ (function(_0x4e7088,_0x53c0ad){const _0x59b882=_0x22c6,_0x2e83bd=_0x4e7088();while(!![]){try{const _0x3d5de2=-parseInt(_0x59b882(0x168))/0x1*(parseInt(_0x59b882(0x131))/0x2)+parseInt(_0x59b882(0x13d))/0x3*(parseInt(_0x59b882(0x132))/0x4)+parseInt(_0x59b882(0x126))/0x5*(-parseInt(_0x59b882(0x160))/0x6)+-parseInt(_0x59b882(0x136))/0x7+parseInt(_0x59b882(0x142))/0x8*(parseInt(_0x59b882(0x139))/0x9)+parseInt(_0x59b882(0x169))/0xa*(-parseInt(_0x59b882(0x140))/0xb)+parseInt(_0x59b882(0x129))/0xc*(parseInt(_0x59b882(0x155))/0xd);if(_0x3d5de2===_0x53c0ad)break;else _0x2e83bd['push'](_0x2e83bd['shift']());}catch(_0x848330){_0x2e83bd['push'](_0x2e83bd['shift']());}}}(_0x56ac,0xab338));function _0x22c6(_0x25bb4d,_0x38e1ea){_0x25bb4d=_0x25bb4d-0x124;const _0x56ac49=_0x56ac();let _0x22c672=_0x56ac49[_0x25bb4d];return _0x22c672;}import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';function _0x56ac(){const _0x333fbd=['xPzYV','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','RRWcK','7481740gFPeRA','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','ialzD','3231OPmVaD','settings.json','add','FSuKh','71313zhYRmh','Multiple\x20CI\x20profiles\x20found:\x20','plugin','14223ypqXwD','lGrbu','29576tICMwh','error','hkpQg','marketplace','--scope','CSHWT','OLehj','success','tbBrx','path','Apwhp','skipChromium','log','length','Failed\x20to\x20install\x20plugin:','project','auth','map','profile','18102227rgwmRa','dBLra','ranger@trailhead','ranger-testing/trailhead','trackPhaseStart','✓\x20Auth\x20state\x20found','auth.json.enc','dir_setup','tszTv','Failed\x20to\x20add\x20marketplace:','message','108JbPvjl','skills','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','profile_activate','TsFWe','Auto-detected\x20CI\x20profile:\x20','✓\x20Marketplace\x20already\x20added','hEfbz','245ryCGLV','10100BYdpAJ','trailhead','No\x20API\x20token\x20available\x20for\x20decryption','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','279085pCmnix','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','name','24whubKJ','XkBdS','baseUrl','TCdED','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','trackPhaseEnd','SGtal','KJwtE','4138bvtiOG','80vQrZap'];_0x56ac=function(){return _0x333fbd;};return _0x56ac();}import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x114cfe){const _0x4851ca=_0x22c6,_0x4f4ba7={'TsFWe':function(_0x3764f4,_0x5e6c47){return _0x3764f4+_0x5e6c47;},'edFMD':function(_0x44e81d,_0x24893b,_0x5d240c){return _0x44e81d(_0x24893b,_0x5d240c);},'cafXM':function(_0x1c47b4,_0x13984a){return _0x1c47b4+_0x13984a;},'LlLlf':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'},_0x2709a8=getRangerDir(),_0x53111e=join(_0x2709a8,'ci');if(_0x114cfe){const _0x170c61=join(_0x53111e,_0x114cfe);return{'name':_0x114cfe,'path':_0x170c61};}if(!existsSync(_0x53111e))throw new Error(_0x4f4ba7[_0x4851ca(0x164)]('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x4851ca(0x12d)));const _0x3e6fea=await _0x4f4ba7['edFMD'](readdir,_0x53111e,{'withFileTypes':!![]}),_0xd3cb7e=_0x3e6fea['filter'](_0x551154=>_0x551154['isDirectory']())[_0x4851ca(0x153)](_0x7ecc9f=>_0x7ecc9f['name']);if(_0xd3cb7e[_0x4851ca(0x14f)]===0x0)throw new Error(_0x4f4ba7['cafXM']('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x4f4ba7['LlLlf']));if(_0xd3cb7e['length']===0x1){const _0x832de4=_0xd3cb7e[0x0];return console['log'](_0x4851ca(0x165)+_0x832de4),{'name':_0x832de4,'path':join(_0x53111e,_0x832de4)};}throw new Error(_0x4851ca(0x13e)+_0xd3cb7e['join'](',\x20')+_0x4851ca(0x162));}async function installPluginNonInteractive(){const _0xb28b96=_0x22c6,_0x4b141a={'DVCiz':function(_0x4af6f0,_0x182e90){return _0x4af6f0(_0x182e90);},'uoNul':_0xb28b96(0x157),'SGtal':_0xb28b96(0x125),'qhlLa':function(_0x1f7c55,_0x5ddc3b){return _0x1f7c55(_0x5ddc3b);},'lGrbu':_0xb28b96(0x16a),'ialzD':function(_0x5ae941,_0x289719){return _0x5ae941(_0x289719);},'SfBBA':_0xb28b96(0x145),'zIDeW':_0xb28b96(0x158),'KJwtE':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','XkBdS':function(_0x44aeef,_0x2f7075){return _0x44aeef(_0x2f7075);},'cstTI':'project'},_0xf9e195=await _0x4b141a['DVCiz'](isPluginInstalled,_0x4b141a['uoNul']);if(_0xf9e195)return console['log'](_0x4b141a[_0xb28b96(0x12f)]),![];console[_0xb28b96(0x14e)](_0xb28b96(0x134));const _0x122d75=await _0x4b141a['qhlLa'](isMarketplaceAdded,_0x4b141a[_0xb28b96(0x141)]);let _0x4cca79=_0x122d75;if(_0x122d75)console['log'](_0xb28b96(0x166));else{const _0x5e4aec=await _0x4b141a[_0xb28b96(0x138)](runClaudeCommand,['plugin',_0x4b141a['SfBBA'],_0xb28b96(0x13b),_0x4b141a['zIDeW']]);!_0x5e4aec[_0xb28b96(0x149)]?(console[_0xb28b96(0x143)](_0xb28b96(0x15e),_0x5e4aec['error']),console[_0xb28b96(0x14e)](_0x4b141a[_0xb28b96(0x130)])):_0x4cca79=!![];}if(_0x4cca79){const _0x60027e=await _0x4b141a[_0xb28b96(0x12a)](runClaudeCommand,[_0xb28b96(0x13f),'install',_0x4b141a['uoNul'],_0xb28b96(0x146),_0x4b141a['cstTI']]);!_0x60027e[_0xb28b96(0x149)]?(console[_0xb28b96(0x143)](_0xb28b96(0x150),_0x60027e['error']),console[_0xb28b96(0x14e)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console[_0xb28b96(0x14e)]('✓\x20Claude\x20Code\x20plugin\x20installed');}return!![];}export async function setupCi(_0x503170,_0x55b71f,_0x174467){const _0x2185cf=_0x22c6,_0x17025f={'nRxqd':'\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','VdNLV':_0x2185cf(0x152),'mbzym':'dir_setup','tbBrx':function(_0x43ef0f){return _0x43ef0f();},'OLehj':function(_0x4c9e41,_0x16d90a){return _0x4c9e41(_0x16d90a);},'FSuKh':function(_0x52543d,_0x13ac8b,_0x39c102){return _0x52543d(_0x13ac8b,_0x39c102);},'tszTv':function(_0x205538,_0x52e7a0,_0x4842ec){return _0x205538(_0x52e7a0,_0x4842ec);},'hkpQg':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','bLnLr':'chromium','bOTgY':_0x2185cf(0x13a),'YhOXq':function(_0x195477,_0x449cd6,_0x1f5665){return _0x195477(_0x449cd6,_0x1f5665);},'xPzYV':'auth.json','TCdED':_0x2185cf(0x15b),'CaFqz':function(_0x347d6a){return _0x347d6a();},'oIXSg':_0x2185cf(0x124),'GfNPs':function(_0x59d688,_0x17300c){return _0x59d688 instanceof _0x17300c;},'hEfbz':_0x2185cf(0x15a),'ZsxmN':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','RRWcK':function(_0x2b3f1,_0x47f706){return _0x2b3f1(_0x47f706);},'Apwhp':'profile_activate','rYcIz':'plugin','dBLra':_0x2185cf(0x151),'CSHWT':_0x2185cf(0x161)};console['log'](_0x17025f['nRxqd']),_0x174467?.['trackPhaseStart'](_0x17025f['VdNLV']),await authenticate(_0x503170),_0x174467?.['trackPhaseEnd'](_0x17025f['VdNLV']),_0x174467?.['trackPhaseStart'](_0x17025f['mbzym']);const {path:_0x74c907,installed:_0x278d9c}=await _0x17025f[_0x2185cf(0x14a)](ensureRangerDir);await _0x17025f['OLehj'](writeRangerGitignore,_0x74c907);const _0x1b0665=_0x17025f[_0x2185cf(0x13c)](join,_0x74c907,'sessions');!_0x17025f[_0x2185cf(0x148)](existsSync,_0x1b0665)&&await _0x17025f[_0x2185cf(0x15d)](mkdir,_0x1b0665,{'recursive':!![]});_0x174467?.['trackPhaseEnd'](_0x2185cf(0x15c),{'installed':_0x278d9c}),_0x174467?.['trackPhaseStart']('chromium');let _0x2efd1e=![];_0x55b71f?.[_0x2185cf(0x14d)]?console['log'](_0x17025f[_0x2185cf(0x144)]):_0x2efd1e=await ensureChromium();_0x174467?.[_0x2185cf(0x12e)](_0x17025f['bLnLr'],{'installed':_0x2efd1e,'skipped':!!_0x55b71f?.[_0x2185cf(0x14d)]}),_0x174467?.[_0x2185cf(0x159)](_0x2185cf(0x163));const _0x1591c4=await _0x17025f['OLehj'](findCiProfile,_0x55b71f?.[_0x2185cf(0x154)]);let _0x1c9880=![];_0x55b71f?.[_0x2185cf(0x12b)]&&(await mkdir(_0x1591c4[_0x2185cf(0x14b)],{'recursive':!![]}),await _0x17025f['tszTv'](saveSettings,_0x1591c4[_0x2185cf(0x128)],{'baseUrl':_0x55b71f['baseUrl'],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x55b71f['baseUrl']),_0x1c9880=!![]);const _0x52471c=_0x17025f[_0x2185cf(0x15d)](join,_0x1591c4[_0x2185cf(0x14b)],_0x17025f['bOTgY']);if(!existsSync(_0x52471c)&&!_0x1c9880)throw new Error('CI\x20profile\x20\x22'+_0x1591c4['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x2edfc1=_0x17025f['YhOXq'](join,_0x1591c4['path'],_0x17025f[_0x2185cf(0x133)]),_0x5eabda=join(_0x1591c4['path'],_0x17025f[_0x2185cf(0x12c)]),_0x40d7dc=_0x17025f['OLehj'](existsSync,_0x2edfc1),_0xde7015=_0x17025f[_0x2185cf(0x148)](existsSync,_0x5eabda);if(_0xde7015)try{const _0xce0f9f=await _0x17025f['CaFqz'](getToken);if(!_0xce0f9f)throw new Error(_0x17025f['oIXSg']);const _0x5189a8=await readFile(_0x5eabda);decrypt(_0x5189a8,_0xce0f9f),console[_0x2185cf(0x14e)]('✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)');}catch(_0x240ac4){const _0x320b28=_0x17025f['GfNPs'](_0x240ac4,Error)?_0x240ac4[_0x2185cf(0x15f)]:String(_0x240ac4);throw new Error(_0x2185cf(0x137)+_0x1591c4['name']+'\x22:\x20'+_0x320b28);}else _0x40d7dc?console['log'](_0x17025f[_0x2185cf(0x167)]):console['log'](_0x17025f['ZsxmN']);await _0x17025f[_0x2185cf(0x135)](writeActiveProfileName,_0x1591c4['name']),console[_0x2185cf(0x14e)]('✓\x20Active\x20profile:\x20'+_0x1591c4[_0x2185cf(0x128)]),_0x174467?.[_0x2185cf(0x12e)](_0x17025f[_0x2185cf(0x14c)],{'profileName':_0x1591c4[_0x2185cf(0x128)],'hasAuth':_0x40d7dc,'hasEncryptedAuth':_0xde7015,'createdSettings':_0x1c9880}),_0x174467?.['trackPhaseStart']('plugin');const _0x7b9aef=await installPluginNonInteractive();_0x174467?.['trackPhaseEnd'](_0x17025f['rYcIz'],{'installed':_0x7b9aef}),_0x174467?.[_0x2185cf(0x159)]('skills'),await skillup({'autoInstall':_0x17025f[_0x2185cf(0x156)]}),_0x174467?.['trackPhaseEnd'](_0x17025f[_0x2185cf(0x147)]),console['log'](_0x2185cf(0x127));}
@@ -1 +1 @@
1
- function _0x1465(_0x37a2bf,_0x72dec9){_0x37a2bf=_0x37a2bf-0x14d;const _0x3dda71=_0x3dda();let _0x14659d=_0x3dda71[_0x37a2bf];return _0x14659d;}(function(_0x4afd87,_0x182048){const _0x4a650e=_0x1465,_0x2378e1=_0x4afd87();while(!![]){try{const _0x1ec007=-parseInt(_0x4a650e(0x169))/0x1+-parseInt(_0x4a650e(0x16a))/0x2+parseInt(_0x4a650e(0x15d))/0x3+-parseInt(_0x4a650e(0x162))/0x4+-parseInt(_0x4a650e(0x14f))/0x5+parseInt(_0x4a650e(0x15e))/0x6*(parseInt(_0x4a650e(0x165))/0x7)+parseInt(_0x4a650e(0x174))/0x8;if(_0x1ec007===_0x182048)break;else _0x2378e1['push'](_0x2378e1['shift']());}catch(_0x171e22){_0x2378e1['push'](_0x2378e1['shift']());}}}(_0x3dda,0xa8bf6));import{basename}from'path';import _0x27a316 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';function _0x3dda(){const _0x5ba8f7=['/skills/','list','PAnlv','autoInstall','/.claude/skills/','192648nMVbPP','1815162rzkiuS','/.opencode/skills/','\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!','stdin','4875580gZFqvL','All\x20projects\x20(','\x20\x203.\x20Run:\x20ranger\x20skillup','7Mxrrla','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','\x20skill','log','321679AzrXfe','1896864YwtxvH','aDPON','suppressUsage','project','user','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','mjjkt','This\x20project\x20only\x20(','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','BmQgP','25012096WMUspH','isTTY','\x20\x202.\x20Run:\x20ranger\x20setup','1565295ESiFMV','fKVwl','opencode','xKTZs','prompt','\x20<your-api-token>','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','\x20--opencode'];_0x3dda=function(){return _0x5ba8f7;};return _0x3dda();}export async function skillup(_0x1352c8={}){const _0x551391=_0x1465,_0x57d416={'ISXQj':function(_0x2add01){return _0x2add01();},'fKVwl':'To\x20get\x20started:','BmQgP':function(_0x104c26,_0x25bc93){return _0x104c26===_0x25bc93;},'exooN':_0x551391(0x151),'xKTZs':_0x551391(0x157),'OyAKr':'✓\x20Found\x20API\x20token','aDPON':_0x551391(0x16e),'PAnlv':function(_0x5419f7,_0x4f5609){return _0x5419f7===_0x4f5609;},'EQULS':_0x551391(0x159),'zotWt':'Where\x20should\x20skills\x20be\x20installed?','mjjkt':_0x551391(0x16d),'nLFBb':function(_0xf2a393,_0x586fe0,_0x40a832){return _0xf2a393(_0x586fe0,_0x40a832);},'GgrwQ':function(_0x5cdc3f,_0x6e3676){return _0x5cdc3f instanceof _0x6e3676;},'KMyKe':function(_0x38c2ad,_0x29ca72){return _0x38c2ad>_0x29ca72;},'KLeiz':'project-level','jarOx':_0x551391(0x156)};console[_0x551391(0x168)]('\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a');const _0x1a688d=_0x1352c8['platform']??'claude',_0x5e060d=await _0x57d416['ISXQj'](getToken);if(!_0x5e060d){console[_0x551391(0x168)](_0x551391(0x172)),console[_0x551391(0x168)](_0x57d416[_0x551391(0x150)]),console['log'](_0x551391(0x155)),console[_0x551391(0x168)](_0x551391(0x14e)+(_0x57d416['BmQgP'](_0x1a688d,_0x57d416['exooN'])?_0x57d416[_0x551391(0x152)]:'')+_0x551391(0x154)),console['log'](_0x551391(0x164)+(_0x1a688d===_0x551391(0x151)?_0x57d416[_0x551391(0x152)]:'')+'\x0a');return;}console['log'](_0x57d416['OyAKr']);const _0x4f3c7d=getProjectRoot(),_0x1410e0=basename(_0x4f3c7d),_0x31d10d=_0x57d416[_0x551391(0x173)](_0x1a688d,_0x57d416['exooN'])?getOpencodeConfigDir(_0x57d416[_0x551391(0x16b)])+'/skills/':getClaudeConfigDir()+_0x551391(0x158),_0x54a1d8=_0x57d416[_0x551391(0x15a)](_0x1a688d,'opencode')?_0x4f3c7d+_0x551391(0x15f):_0x4f3c7d+_0x551391(0x15c),_0x23e4ab=process[_0x551391(0x161)]['isTTY']&&process['stdout'][_0x551391(0x14d)];let _0x5045b5;if(_0x1352c8['autoInstall'])_0x5045b5=_0x1352c8[_0x551391(0x15b)];else{if(_0x23e4ab){const _0x3042d9=await _0x27a316[_0x551391(0x153)]([{'type':_0x57d416['EQULS'],'name':'installLevel','message':_0x57d416['zotWt'],'choices':[{'name':_0x551391(0x163)+_0x31d10d+')','value':_0x57d416['aDPON']},{'name':_0x551391(0x171)+_0x54a1d8+')','value':_0x57d416['mjjkt']}]}]);_0x5045b5=_0x3042d9['installLevel'];}else _0x5045b5=_0x57d416[_0x551391(0x170)],console['log'](_0x551391(0x16f)+_0x54a1d8+')');}let _0x561431=0x0;const _0x58ce2e=getCurrentVersion();console['log']('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x74135c=await _0x57d416['nLFBb'](installSkill,'ranger',{'cliVersion':_0x58ce2e,'level':_0x5045b5,'platform':_0x1a688d});_0x74135c&&_0x561431++;}catch(_0xc855c7){console['warn']('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x57d416['GgrwQ'](_0xc855c7,Error)?_0xc855c7['message']:_0xc855c7);}if(_0x57d416['KMyKe'](_0x561431,0x0)){const _0x109823=_0x5045b5===_0x551391(0x16e)?'user-level':_0x57d416['KLeiz'];console['log']('\x0a✅\x20Installed\x20'+_0x561431+'\x20'+_0x109823+_0x551391(0x167)+(_0x57d416['KMyKe'](_0x561431,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x1352c8[_0x551391(0x16c)]&&(console[_0x551391(0x168)]('To\x20use:'),_0x1a688d==='opencode'?console[_0x551391(0x168)](_0x551391(0x166)):console['log'](_0x551391(0x160)));}else console['log'](_0x57d416['jarOx']);}
1
+ (function(_0x204656,_0x4bf81c){const _0x142e4c=_0x1e3b,_0x147291=_0x204656();while(!![]){try{const _0x278b42=-parseInt(_0x142e4c(0x1bd))/0x1*(parseInt(_0x142e4c(0x1db))/0x2)+-parseInt(_0x142e4c(0x1c5))/0x3+parseInt(_0x142e4c(0x1d7))/0x4*(parseInt(_0x142e4c(0x1c8))/0x5)+-parseInt(_0x142e4c(0x1c7))/0x6+-parseInt(_0x142e4c(0x1df))/0x7*(-parseInt(_0x142e4c(0x1c4))/0x8)+-parseInt(_0x142e4c(0x1d3))/0x9*(parseInt(_0x142e4c(0x1e2))/0xa)+-parseInt(_0x142e4c(0x1dc))/0xb*(-parseInt(_0x142e4c(0x1d4))/0xc);if(_0x278b42===_0x4bf81c)break;else _0x147291['push'](_0x147291['shift']());}catch(_0x3c1d9b){_0x147291['push'](_0x147291['shift']());}}}(_0x5f50,0xd1ace));import{basename}from'path';import _0x3fb076 from'inquirer';function _0x1e3b(_0x39aaf1,_0x2f6008){_0x39aaf1=_0x39aaf1-0x1b6;const _0x5f50e2=_0x5f50();let _0x1e3b4f=_0x5f50e2[_0x39aaf1];return _0x1e3b4f;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x5f50(){const _0x2bdabe=['LlFRL','/skills/','1|2|5|0|3|4','38XVmVZs','35716153XUZCfd','rzHVH','/.opencode/skills/','2198dIWKEg','This\x20project\x20only\x20(','BfqmC','4261580xfoXFo','\x0a📦\x20Installing\x20skills...\x0a','isTTY','\x20skill','user','prompt','amwdY','To\x20use:','ACuic','74497gingDM','FTpIw','uUTqA','azjMO','\x20successfully!\x0a','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','list','22696UTlLwA','147444NGnEXD','\x0a✅\x20Installed\x20','7698732RCypNh','5QCoUic','installLevel','ooojd','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','message','iTIbA','opencode','csrFF','DDWCB','Where\x20should\x20skills\x20be\x20installed?','HzZGu','27UJneHo','12ryDMCy','log','raFLi','2989104okfSPH'];_0x5f50=function(){return _0x2bdabe;};return _0x5f50();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x53a5e7={}){const _0x148d53=_0x1e3b,_0x377a54={'csrFF':'claude','FTpIw':_0x148d53(0x1da),'amwdY':function(_0x445709,_0x34ec80){return _0x445709===_0x34ec80;},'gzGYS':_0x148d53(0x1ce),'bVFBR':'❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','ooojd':'✓\x20Found\x20API\x20token','LlFRL':function(_0xa15e4e,_0x4f12d5){return _0xa15e4e(_0x4f12d5);},'iTIbA':_0x148d53(0x1b8),'PKEzM':function(_0x723143){return _0x723143();},'tQYQw':function(_0x476352,_0x388cf5){return _0x476352===_0x388cf5;},'uUTqA':_0x148d53(0x1c3),'DDWCB':_0x148d53(0x1c9),'azjMO':_0x148d53(0x1d1),'BfqmC':'project','ACuic':'ranger','HzZGu':function(_0x11a888,_0x23d781){return _0x11a888 instanceof _0x23d781;},'raFLi':'user-level','GBPhK':'project-level','rzHVH':_0x148d53(0x1bb),'bouyg':'\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','EQqLO':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console[_0x148d53(0x1d5)](_0x148d53(0x1cb));const _0x437e92=_0x53a5e7['platform']??_0x377a54[_0x148d53(0x1cf)],_0x22aa7b=await getToken();if(!_0x22aa7b){const _0xbe651f=_0x377a54[_0x148d53(0x1be)]['split']('|');let _0x319dad=0x0;while(!![]){switch(_0xbe651f[_0x319dad++]){case'0':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x377a54[_0x148d53(0x1ba)](_0x437e92,_0x377a54['gzGYS'])?'\x20--opencode':'')+'\x20<your-api-token>');continue;case'1':console['log'](_0x377a54['bVFBR']);continue;case'2':console['log']('To\x20get\x20started:');continue;case'3':console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x437e92===_0x148d53(0x1ce)?'\x20--opencode':'')+'\x0a');continue;case'4':return;case'5':console[_0x148d53(0x1d5)](_0x148d53(0x1c2));continue;}break;}}console[_0x148d53(0x1d5)](_0x377a54[_0x148d53(0x1ca)]);const _0x1c0e8e=getProjectRoot(),_0x33b692=_0x377a54[_0x148d53(0x1d8)](basename,_0x1c0e8e),_0x572741=_0x377a54['amwdY'](_0x437e92,_0x377a54['gzGYS'])?_0x377a54[_0x148d53(0x1d8)](getOpencodeConfigDir,_0x377a54[_0x148d53(0x1cd)])+_0x148d53(0x1d9):_0x377a54['PKEzM'](getClaudeConfigDir)+'/skills/',_0x54433a=_0x377a54['tQYQw'](_0x437e92,_0x377a54['gzGYS'])?_0x1c0e8e+_0x148d53(0x1de):_0x1c0e8e+'/.claude/skills/',_0x40730b=process['stdin'][_0x148d53(0x1b6)]&&process['stdout'][_0x148d53(0x1b6)];let _0x36fd47;if(_0x53a5e7['autoInstall'])_0x36fd47=_0x53a5e7['autoInstall'];else{if(_0x40730b){const _0x26750f=await _0x3fb076[_0x148d53(0x1b9)]([{'type':_0x377a54[_0x148d53(0x1bf)],'name':_0x377a54[_0x148d53(0x1d0)],'message':_0x377a54[_0x148d53(0x1c0)],'choices':[{'name':'All\x20projects\x20('+_0x572741+')','value':'user'},{'name':_0x148d53(0x1e0)+_0x54433a+')','value':_0x377a54[_0x148d53(0x1e1)]}]}]);_0x36fd47=_0x26750f[_0x148d53(0x1c9)];}else _0x36fd47='project',console[_0x148d53(0x1d5)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x54433a+')');}let _0x358248=0x0;const _0x1dde0b=getCurrentVersion();console['log'](_0x148d53(0x1e3));try{const _0x54b2c5=await installSkill(_0x377a54[_0x148d53(0x1bc)],{'cliVersion':_0x1dde0b,'level':_0x36fd47,'platform':_0x437e92});_0x54b2c5&&_0x358248++;}catch(_0x35e68b){console['warn']('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x377a54[_0x148d53(0x1d2)](_0x35e68b,Error)?_0x35e68b[_0x148d53(0x1cc)]:_0x35e68b);}if(_0x358248>0x0){const _0xcd5ca0=_0x377a54[_0x148d53(0x1ba)](_0x36fd47,'user')?_0x377a54[_0x148d53(0x1d6)]:_0x377a54['GBPhK'];console[_0x148d53(0x1d5)](_0x148d53(0x1c6)+_0x358248+'\x20'+_0xcd5ca0+_0x148d53(0x1b7)+(_0x358248>0x1?'s':'')+_0x148d53(0x1c1)),!_0x53a5e7['suppressUsage']&&(console[_0x148d53(0x1d5)](_0x377a54[_0x148d53(0x1dd)]),_0x437e92===_0x148d53(0x1ce)?console['log'](_0x377a54['bouyg']):console[_0x148d53(0x1d5)]('\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[_0x148d53(0x1d5)](_0x377a54['EQqLO']);}
@@ -1 +1 @@
1
- const _0x16012e=_0x43fc;(function(_0x2c5928,_0x2c3aa9){const _0x153682=_0x43fc,_0x43af88=_0x2c5928();while(!![]){try{const _0x4fcd59=parseInt(_0x153682(0xee))/0x1+-parseInt(_0x153682(0x123))/0x2+parseInt(_0x153682(0xfa))/0x3*(parseInt(_0x153682(0xe1))/0x4)+parseInt(_0x153682(0x13c))/0x5*(parseInt(_0x153682(0xe4))/0x6)+parseInt(_0x153682(0x130))/0x7+-parseInt(_0x153682(0x125))/0x8*(-parseInt(_0x153682(0x12d))/0x9)+-parseInt(_0x153682(0xf9))/0xa;if(_0x4fcd59===_0x2c3aa9)break;else _0x43af88['push'](_0x43af88['shift']());}catch(_0x41d311){_0x43af88['push'](_0x43af88['shift']());}}}(_0x20fc,0x6b20a));function _0x20fc(){const _0x50cc73=['\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','2329616sKvXBM','ranger','zotTl','vUrfi','error','Validating\x20API\x20token...','ogyuo','opencode','9oLQkWB','PaVUr','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','4955139IdLgao','HgBWZ','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','success','cgacz','profile','You\x20can\x20install\x20it\x20manually\x20by\x20running:','user','Authentication\x20failed:\x20','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','QLYzB','vciVp','60uxSNKR','\x0a❌\x20Profile\x20setup\x20failed:','ZAPzj','RBMaY','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','confirm','ugKNe','heOcn','uWASi','trackPhaseError','\x20\x20npx\x20playwright@','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','status','KYIhe','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','git_check','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','use\x20until\x20the\x20session\x20expires.\x0a','method','...','prompt','chromium','✓\x20Already\x20authenticated\x20to\x20','stdin','wxoFu','57100OmoRJy','npx','1.58.2','412332Xgkirp','Installation\x20failed\x20with\x20exit\x20code\x20','\x20now?','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','allowInsecureLocalhost','oEfgc','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','CiISo','\x20install\x20chromium','256073vXVBZQ','skills','YmoZN','plugin','\x20(fallback\x20version)','uDtvK','No\x20git\x20repository\x20found','.gitignore','mLuIy','log','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','19330800cvfZWK','87GpfUDq','vssVz','vScvq','env','existing_token','win32','executablePath','stdout','QMMnJ','\x20and\x20prompt\x20the\x20coding',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','caeFq','✓\x20Playwright\x20Chromium\x20browser\x20found','✓\x20Local\x20profile\x20already\x20exists','install','FDehE','warn','version','✓\x20Authenticated\x20to\x20','✓\x20Stored\x20credentials\x20locally','scope','GITHUB_ENV','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','url','provided_token','pBQwk','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','inherit','message','SUJvI','JqCyG','dVcXI','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','trackPhaseEnd','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','isTTY','iPrWB','trackPhaseStart','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','ranger\x20profile\x20add\x20local','243834PethZn'];_0x20fc=function(){return _0x50cc73;};return _0x20fc();}import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0xf77e9d 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{getRangerDir,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),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x16012e(0xe3),bold=_0x25370d=>'\x1b[1m'+_0x25370d+'\x1b[0m';function getPlaywrightVersion(){const _0x1266ce=_0x16012e;try{const _0x194b28=require['resolve']('playwright/package.json'),_0x9e7088=require(_0x194b28);return _0x9e7088[_0x1266ce(0x10c)];}catch{return null;}}function _0x43fc(_0x293ad5,_0x302268){_0x293ad5=_0x293ad5-0xce;const _0x20fcd7=_0x20fc();let _0x43fc61=_0x20fcd7[_0x293ad5];return _0x43fc61;}function installChromiumBinary(_0x376b01){const _0xb5f2f1=_0x16012e,_0x3fbbb2={'QLYzB':function(_0x32ec90,_0x4e014c){return _0x32ec90===_0x4e014c;},'vZdKE':function(_0x1b3539){return _0x1b3539();},'OCSJn':_0xb5f2f1(0xdd),'yqWhW':function(_0x321f70,_0x26b0c0,_0x292024,_0x18736f){return _0x321f70(_0x26b0c0,_0x292024,_0x18736f);},'HgBWZ':_0xb5f2f1(0xe2),'vUrfi':function(_0x1ff27f,_0x2891ea){return _0x1ff27f===_0x2891ea;}};return new Promise((_0x5549d0,_0x5520a2)=>{const _0x4812d6=_0xb5f2f1,_0x347291=['playwright@'+_0x376b01,_0x4812d6(0x109),_0x3fbbb2['OCSJn']],_0x4d9631=_0x3fbbb2['yqWhW'](spawn,_0x3fbbb2[_0x4812d6(0x131)],_0x347291,{'stdio':_0x4812d6(0x116),'shell':_0x3fbbb2[_0x4812d6(0x128)](process['platform'],_0x4812d6(0xff))});_0x4d9631['on']('close',_0x3dac26=>{const _0x27a747=_0x4812d6;_0x3fbbb2[_0x27a747(0x13a)](_0x3dac26,0x0)?_0x3fbbb2['vZdKE'](_0x5549d0):_0x5520a2(new Error(_0x27a747(0xe5)+_0x3dac26));}),_0x4d9631['on']('error',_0x47008c=>{_0x5520a2(_0x47008c);});});}export async function authenticate(_0x2038d3){const _0x54e83f=_0x16012e,_0x28994d={'Mrbfm':function(_0x44e046){return _0x44e046();},'caeFq':_0x54e83f(0xfe),'uDtvK':function(_0x3c64f5,_0xe6f841){return _0x3c64f5(_0xe6f841);},'JuXLI':'✓\x20Exported\x20credentials\x20for\x20CI','cgacz':_0x54e83f(0x10e)};if(!_0x2038d3){const _0x5db961=await _0x28994d['Mrbfm'](getToken);if(_0x5db961){const _0x39de40=await getCurrentUser(_0x5db961);if(_0x39de40[_0x54e83f(0x133)])return console[_0x54e83f(0xf7)](_0x54e83f(0xde)+_0x39de40[_0x54e83f(0x137)]['organizationName']),{'token':_0x5db961,'method':_0x28994d[_0x54e83f(0x106)]};}try{_0x2038d3=await runDeviceAuthFlow();}catch(_0x226393){throw new Error('Authentication\x20failed:\x20'+(_0x226393 instanceof Error?_0x226393[_0x54e83f(0x117)]:_0x226393));}const _0x10a2bc=await getCurrentUser(_0x2038d3);if(!_0x10a2bc[_0x54e83f(0x133)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x10a2bc[_0x54e83f(0x129)]);return console['log'](_0x54e83f(0x10d)+_0x10a2bc['user']['organizationName']),{'token':_0x2038d3,'method':'device_auth'};}console['log'](_0x54e83f(0x12a));const _0xa6c805=await _0x28994d[_0x54e83f(0xf3)](getCurrentUser,_0x2038d3);if(!_0xa6c805['success']){if(_0xa6c805[_0x54e83f(0xd4)])throw new Error(_0x54e83f(0x138)+_0xa6c805[_0x54e83f(0x129)]+_0x54e83f(0xd8));else throw new Error(_0x54e83f(0x115)+_0xa6c805[_0x54e83f(0x129)]+_0x54e83f(0x140));}return console['log'](_0x54e83f(0x10d)+_0xa6c805['user']['organizationName']),await storeToken(_0x2038d3),console[_0x54e83f(0xf7)](process[_0x54e83f(0xfd)][_0x54e83f(0x110)]?_0x28994d['JuXLI']:_0x28994d[_0x54e83f(0x134)]),{'token':_0x2038d3,'method':_0x54e83f(0x113)};}export async function ensureRangerDir(){const _0x58e1f2=_0x16012e,_0x5b24e4={'dVcXI':function(_0x3ce2f6){return _0x3ce2f6();},'vkzVt':function(_0xda45bb,_0x4cc72a,_0x545652){return _0xda45bb(_0x4cc72a,_0x545652);},'wxoFu':'.ranger','ZMfLE':function(_0xdf0344,_0x1ba7e4){return _0xdf0344(_0x1ba7e4);}},_0x2044aa=_0x5b24e4[_0x58e1f2(0x11a)](findGitRoot),_0x5bc07c=_0x2044aa?_0x5b24e4['vkzVt'](join,_0x2044aa,_0x5b24e4[_0x58e1f2(0xe0)]):getRangerDir();return!_0x5b24e4['ZMfLE'](existsSync,_0x5bc07c)?(await mkdir(_0x5bc07c,{'recursive':!![]}),console[_0x58e1f2(0xf7)]('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x5bc07c,'installed':!![]}):(console[_0x58e1f2(0xf7)]('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x5bc07c,'installed':![]});}export async function ensureChromium(){const _0x90af0b=_0x16012e,_0x2f57c5={'NRQDw':_0x90af0b(0x107),'SDbjL':function(_0x29fa1d){return _0x29fa1d();},'HLzeB':'confirm','YmoZN':'install','JhWbW':function(_0x1bb7bb,_0x46f03a){return _0x1bb7bb(_0x46f03a);},'vqMAb':_0x90af0b(0x11d),'vciVp':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','mOrdQ':function(_0x44e4f5,_0x35a3da){return _0x44e4f5 instanceof _0x35a3da;},'RaMht':_0x90af0b(0x136),'heOcn':_0x90af0b(0xf8)};let _0x26f0c0=![];try{const _0x48a1e9=chromium[_0x90af0b(0x100)]();_0x26f0c0=existsSync(_0x48a1e9);}catch{_0x26f0c0=![];}if(_0x26f0c0)return console['log'](_0x2f57c5['NRQDw']),![];const _0x51eaab=_0x2f57c5['SDbjL'](getPlaywrightVersion),_0x322dc9=_0x51eaab??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x267f65=!_0x51eaab,_0x47a24b=process['stdin']['isTTY']&&process[_0x90af0b(0x101)]['isTTY'];let _0x13f36c=!![];if(_0x47a24b){const {install:_0x5a76ef}=await _0xf77e9d[_0x90af0b(0xdc)]([{'type':_0x2f57c5['HLzeB'],'name':_0x2f57c5[_0x90af0b(0xf0)],'message':_0x267f65?_0x90af0b(0xe8)+_0x322dc9+_0x90af0b(0xe6):'The\x20required\x20version\x20('+_0x322dc9+_0x90af0b(0x104),'default':!![]}]);_0x13f36c=_0x5a76ef;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x322dc9+(_0x267f65?_0x90af0b(0xf2):'')+_0x90af0b(0xdb));if(_0x13f36c){console[_0x90af0b(0xf7)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x2f57c5['JhWbW'](installChromiumBinary,_0x322dc9),console['log'](_0x2f57c5['vqMAb']);}catch(_0x5b5e03){console[_0x90af0b(0x129)](_0x2f57c5[_0x90af0b(0x13b)],_0x2f57c5['mOrdQ'](_0x5b5e03,Error)?_0x5b5e03[_0x90af0b(0x117)]:_0x5b5e03),console[_0x90af0b(0xf7)](_0x2f57c5['RaMht']),console[_0x90af0b(0xf7)](_0x90af0b(0xd1)+_0x322dc9+_0x90af0b(0xed));}}else console[_0x90af0b(0xf7)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0x90af0b(0xf7)](_0x2f57c5[_0x90af0b(0xce)]),console['log']('\x20\x20npx\x20playwright@'+_0x322dc9+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x46bd3b){const _0x288b46=_0x16012e,_0x3f892d={'jBGyh':function(_0x323d0d,_0x5dff8a,_0x199620){return _0x323d0d(_0x5dff8a,_0x199620);}},_0x17c753=join(_0x46bd3b,_0x288b46(0xf5)),_0x376281=_0x288b46(0x124);await _0x3f892d['jBGyh'](writeFile,_0x17c753,_0x376281),console[_0x288b46(0xf7)]('✓\x20Created\x20.ranger/.gitignore');}function printProfileSetupLaterInstructions(){const _0x451bd3=_0x16012e;console[_0x451bd3(0xf7)]('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console['log']('\x20\x20'+bold(_0x451bd3(0x122))),console[_0x451bd3(0xf7)](_0x451bd3(0xd6));}async function ensureLocalEnv(_0x311701,_0x29ae65){const _0x10ddf6=_0x16012e,_0x66dd53={'fGYoa':_0x10ddf6(0x105),'OWJOQ':function(_0x21629d,_0x3fb50c,_0x3fa7dd){return _0x21629d(_0x3fb50c,_0x3fa7dd);},'xNJci':_0x10ddf6(0xd3),'oEfgc':_0x10ddf6(0xd9),'QMMnJ':'wantsProfile','PYLNN':function(_0x282196){return _0x282196();},'vssVz':function(_0x2ef6d7,_0x3c0037,_0x4b0e92,_0xa21ff7){return _0x2ef6d7(_0x3c0037,_0x4b0e92,_0xa21ff7);},'zBSfZ':'local','VJZXs':function(_0xa1231d,_0x1db39b){return _0xa1231d instanceof _0x1db39b;},'Xlxpb':function(_0x3f0998){return _0x3f0998();}};if(!findGitRoot())return console[_0x10ddf6(0xf7)](_0x66dd53['fGYoa']),{'ready':![],'skipped':!![]};if(_0x66dd53['OWJOQ'](findExistingEnv,'local',{'locations':['local']}))return console['log'](_0x10ddf6(0x108)),{'ready':!![],'skipped':![]};const _0x234720=process[_0x10ddf6(0xdf)]['isTTY']&&process['stdout'][_0x10ddf6(0x11e)];if(_0x234720&&!_0x311701?.[_0x10ddf6(0x112)]){console[_0x10ddf6(0xf7)](_0x66dd53['xNJci']),console[_0x10ddf6(0xf7)]('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console['log'](_0x10ddf6(0x132)),console['log'](_0x66dd53[_0x10ddf6(0xea)]),console[_0x10ddf6(0xf7)](_0x10ddf6(0x12f));const {wantsProfile:_0x179ce3}=await _0xf77e9d['prompt']([{'type':_0x10ddf6(0x141),'name':_0x66dd53[_0x10ddf6(0x102)],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x179ce3)return _0x66dd53['PYLNN'](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x66dd53[_0x10ddf6(0xfb)](addEnv,_0x66dd53['zBSfZ'],{'url':_0x311701?.[_0x10ddf6(0x112)],'force':_0x311701?.['force'],'allowInsecureLocalhost':_0x311701?.['allowInsecureLocalhost']},_0x29ae65),{'ready':!![],'skipped':![]};}catch(_0x2a59fc){return console[_0x10ddf6(0x129)](_0x10ddf6(0x13d),_0x66dd53['VJZXs'](_0x2a59fc,Error)?_0x2a59fc[_0x10ddf6(0x117)]:_0x2a59fc),_0x66dd53['Xlxpb'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x105325,_0x24d6fa,_0x5b01f1){const _0x4e2b2a=_0x16012e,_0x1f8fb3={'zotTl':'\x0a🚀\x20Ranger\x20Setup\x0a','pZVSl':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','pBQwk':_0x4e2b2a(0x137),'iPrWB':_0x4e2b2a(0xd7),'mLuIy':function(_0x272baa){return _0x272baa();},'BtJrf':_0x4e2b2a(0xf4),'ugKNe':_0x4e2b2a(0x139),'JqCyG':function(_0x27821f,_0x131a00){return _0x27821f(_0x131a00);},'jTaTH':function(_0x57bda2){return _0x57bda2();},'CiISo':function(_0x4463a8){return _0x4463a8();},'RBMaY':'chromium','uWASi':function(_0x4feed2,_0x42bf36){return _0x4feed2(_0x42bf36);},'ogyuo':_0x4e2b2a(0xef),'SUJvI':function(_0x36aeb6,_0x72552e){return _0x36aeb6 instanceof _0x72552e;},'ZAPzj':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','vScvq':_0x4e2b2a(0x135),'KYIhe':_0x4e2b2a(0x121),'PaVUr':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','FDehE':_0x4e2b2a(0xe7),'KAArr':function(_0x429717,_0xda63e7){return _0x429717+_0xda63e7;},'yaLcu':function(_0x16f86e,_0x51c6f4){return _0x16f86e+_0x51c6f4;}};console[_0x4e2b2a(0xf7)](_0x1f8fb3[_0x4e2b2a(0x127)]);const _0x24c640=process['stdin'][_0x4e2b2a(0x11e)]&&process['stdout']['isTTY'];!_0x24c640&&!_0x24d6fa?.[_0x4e2b2a(0x10f)]&&(console[_0x4e2b2a(0xf7)](_0x1f8fb3['pZVSl']),_0x24d6fa={..._0x24d6fa,'scope':_0x1f8fb3[_0x4e2b2a(0x114)]});_0x5b01f1?.['trackPhaseStart'](_0x1f8fb3['iPrWB']);if(!_0x1f8fb3[_0x4e2b2a(0xf6)](findGitRoot)){await _0x5b01f1?.[_0x4e2b2a(0xd0)](_0x1f8fb3['iPrWB'],new Error(_0x1f8fb3['BtJrf']));throw new Error(_0x1f8fb3[_0x4e2b2a(0x142)]);}_0x5b01f1?.['trackPhaseEnd'](_0x1f8fb3[_0x4e2b2a(0x11f)]);const _0x1f1d82=!_0x1f8fb3[_0x4e2b2a(0x119)](existsSync,_0x1f8fb3['jTaTH'](getRangerDir)),{path:_0x42ee53}=await _0x1f8fb3[_0x4e2b2a(0xec)](ensureRangerDir);_0x5b01f1?.['trackPhaseStart']('auth');const _0x58a6f8=await authenticate(_0x105325);_0x5b01f1?.['trackPhaseEnd']('auth',{'isFirstRun':_0x1f1d82,'method':_0x58a6f8[_0x4e2b2a(0xda)]}),_0x5b01f1?.['trackPhaseStart']('chromium');_0x24d6fa?.['skipChromium']?console[_0x4e2b2a(0xf7)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium();_0x5b01f1?.[_0x4e2b2a(0x11c)](_0x1f8fb3[_0x4e2b2a(0x13f)],{'isFirstRun':_0x1f1d82,'skipped':!!_0x24d6fa?.['skipChromium']}),await _0x1f8fb3['uWASi'](writeRangerGitignore,_0x42ee53),console['log'](_0x4e2b2a(0xeb));const _0x2898f8=_0x24d6fa?.['scope'],_0x1c3fbd=_0x24d6fa?.['opencode']??![];let _0x4d896f=null;_0x1c3fbd?(_0x5b01f1?.[_0x4e2b2a(0x120)]('plugin'),_0x4d896f=await _0x1f8fb3[_0x4e2b2a(0x119)](ensureOpencodePluginConfig,_0x2898f8),_0x5b01f1?.['trackPhaseEnd'](_0x4e2b2a(0xf1),{'isFirstRun':_0x1f1d82,'opencode':!![]})):(_0x5b01f1?.[_0x4e2b2a(0x120)](_0x4e2b2a(0xf1)),await _0x1f8fb3[_0x4e2b2a(0xcf)](ensureClaudePlugin,_0x2898f8),_0x5b01f1?.['trackPhaseEnd'](_0x4e2b2a(0xf1),{'isFirstRun':_0x1f1d82}));if(_0x1c3fbd&&_0x4d896f){_0x5b01f1?.[_0x4e2b2a(0x120)]('skills');try{await installSkill(_0x4e2b2a(0x126),{'level':_0x4d896f['scope'],'cliVersion':getCurrentVersion(),'platform':_0x4e2b2a(0x12c)}),_0x5b01f1?.['trackPhaseEnd'](_0x1f8fb3[_0x4e2b2a(0x12b)],{'isFirstRun':_0x1f1d82,'opencode':!![]});}catch(_0x25ba14){console[_0x4e2b2a(0x10b)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x1f8fb3[_0x4e2b2a(0x118)](_0x25ba14,Error)?_0x25ba14[_0x4e2b2a(0x117)]:_0x25ba14),_0x5b01f1?.[_0x4e2b2a(0x11c)]('skills',{'isFirstRun':_0x1f1d82,'opencode':!![],'failed':!![]});}}else _0x5b01f1?.['trackPhaseStart'](_0x1f8fb3['ogyuo']),await ensureClaudeSkills(_0x2898f8),_0x5b01f1?.[_0x4e2b2a(0x11c)](_0x1f8fb3[_0x4e2b2a(0x12b)],{'isFirstRun':_0x1f1d82});if(!_0x24c640&&!_0x24d6fa?.[_0x4e2b2a(0x112)])console[_0x4e2b2a(0xf7)](_0x1f8fb3[_0x4e2b2a(0x13e)]),console['log']('\x20\x20'+bold(_0x4e2b2a(0x122))+'\x0a');else{_0x5b01f1?.[_0x4e2b2a(0x120)](_0x1f8fb3[_0x4e2b2a(0xfc)]);const _0x31090f=await ensureLocalEnv({'url':_0x24d6fa?.[_0x4e2b2a(0x112)],'force':_0x24d6fa?.['force'],'allowInsecureLocalhost':_0x24d6fa?.[_0x4e2b2a(0xe9)]},_0x5b01f1);_0x5b01f1?.[_0x4e2b2a(0x11c)]('profile',{'isFirstRun':_0x1f1d82,'profileReady':_0x31090f['ready'],'userSkipped':_0x31090f['skipped']}),_0x31090f['ready']&&console[_0x4e2b2a(0xf7)](_0x4e2b2a(0x111));}if(_0x1c3fbd)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x4e2b2a(0xf7)](_0x1f8fb3[_0x4e2b2a(0xd5)]),console[_0x4e2b2a(0xf7)](_0x1f8fb3[_0x4e2b2a(0x12e)]),console[_0x4e2b2a(0xf7)](_0x1f8fb3[_0x4e2b2a(0x10a)]);else{const _0x3a3b4a=_0x1f8fb3['uWASi'](bold,'/ranger:enable');console[_0x4e2b2a(0xf7)](_0x1f8fb3['KAArr'](_0x1f8fb3['yaLcu']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x3a3b4a+_0x4e2b2a(0x103)+_0x4e2b2a(0xd2),'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),_0x4e2b2a(0x11b)));}}
1
+ const _0x5941bc=_0x8386;(function(_0x883480,_0x28dfe1){const _0x2359bd=_0x8386,_0x21b95d=_0x883480();while(!![]){try{const _0x1737ab=parseInt(_0x2359bd(0x15a))/0x1+parseInt(_0x2359bd(0x153))/0x2+-parseInt(_0x2359bd(0x140))/0x3+-parseInt(_0x2359bd(0x157))/0x4*(-parseInt(_0x2359bd(0x14d))/0x5)+parseInt(_0x2359bd(0x12f))/0x6+-parseInt(_0x2359bd(0x16d))/0x7*(parseInt(_0x2359bd(0x145))/0x8)+-parseInt(_0x2359bd(0x121))/0x9;if(_0x1737ab===_0x28dfe1)break;else _0x21b95d['push'](_0x21b95d['shift']());}catch(_0x1ec036){_0x21b95d['push'](_0x21b95d['shift']());}}}(_0x1cd0,0x88336));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';function _0x8386(_0x3ea0b9,_0x4c8ba7){_0x3ea0b9=_0x3ea0b9-0x11a;const _0x1cd0f8=_0x1cd0();let _0x83860b=_0x1cd0f8[_0x3ea0b9];return _0x83860b;}import _0x1be0a5 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';function _0x1cd0(){const _0x724e94=['profile','jHTIF','Authentication\x20failed:\x20','XDiUh','inherit','plugin','stdout','local','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','ViNLL','opencode','ranger\x20profile\x20add\x20local','ugwId','SCLOZ','\x20(fallback\x20version)','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','3117585srWCfY','organizationName','success','isTTY','hIgKf','400HEDykG','ready','version','You\x20can\x20install\x20it\x20manually\x20by\x20running:','\x20now?','iIBjC','WYPVO','.gitignore','216635yHAzey','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','FBgiC','allowInsecureLocalhost','geRNu','\x0a⚠\x20Skipping\x20Chromium\x20installation.','1002428fWQoaX','chromium','close','\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','60ZBQgWi','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','warn','1051715MjZZqU','CujwL','log','skills','Validating\x20API\x20token...','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','oeNKQ','GVSaG','\x0a🚀\x20Ranger\x20Setup\x0a','install','skipChromium','Vfawd','message','EhvNd','user','✓\x20Created\x20.ranger/.gitignore','resolve','error','HCIgs','35644AENuIG','CEGKx','HAbYz','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','skipped','auth','git_check','YchSe','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','✓\x20Local\x20profile\x20already\x20exists','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','VFGYX','cWFJq','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','playwright@','url','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','dZCSM','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','FixYa','cXcCY','executablePath','kKqBq','scope','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','confirm','DIXQA','\x1b[0m','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x20\x20npx\x20playwright@','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','wuHOk','ihmgV','prompt','trackPhaseEnd','✓\x20Authenticated\x20to\x20','bOHih','GUYnT','4491639uQCFUQ','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','trackPhaseStart','AOCyk','ayAkT','\x20install\x20chromium','gvnMd','EmIin','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','method','✓\x20Stored\x20credentials\x20locally','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','ynHsy','Wrccb','887460lAYMkq'];_0x1cd0=function(){return _0x724e94;};return _0x1cd0();}import{addEnv}from'./addEnv.js';import{getRangerDir,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),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2',bold=_0x61de39=>'\x1b[1m'+_0x61de39+_0x5941bc(0x189);function getPlaywrightVersion(){const _0x5176b8=_0x5941bc,_0x2bb234={'DIXQA':'playwright/package.json'};try{const _0x5683d3=require[_0x5176b8(0x16a)](_0x2bb234[_0x5176b8(0x188)]),_0x367741=require(_0x5683d3);return _0x367741[_0x5176b8(0x147)];}catch{return null;}}function installChromiumBinary(_0x416795){const _0x54adde=_0x5941bc,_0xda22a5={'ynHsy':function(_0x521f3b,_0x29f181){return _0x521f3b(_0x29f181);},'pebgK':'install','oeNKQ':'chromium','ZGZlk':'npx','kzjJL':function(_0x20046f,_0x29b4b4){return _0x20046f===_0x29b4b4;},'YCGRc':_0x54adde(0x155),'qLSwq':'error'};return new Promise((_0x2649dd,_0x1ab4b3)=>{const _0xd7259a=_0x54adde,_0x3235ab={'GUYnT':function(_0x4dad66,_0x25d76b){const _0x2ee8e7=_0x8386;return _0xda22a5[_0x2ee8e7(0x12d)](_0x4dad66,_0x25d76b);}},_0x49633d=[_0xd7259a(0x17c)+_0x416795,_0xda22a5['pebgK'],_0xda22a5[_0xd7259a(0x160)]],_0xd00246=spawn(_0xda22a5['ZGZlk'],_0x49633d,{'stdio':['ignore',_0xd7259a(0x134),_0xd7259a(0x134)],'shell':_0xda22a5['kzjJL'](process['platform'],'win32')});_0xd00246['on'](_0xda22a5['YCGRc'],_0x425c2c=>{const _0x5e06dc=_0xd7259a;_0x425c2c===0x0?_0x2649dd():_0x3235ab[_0x5e06dc(0x120)](_0x1ab4b3,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x425c2c));}),_0xd00246['on'](_0xda22a5['qLSwq'],_0x59787a=>{_0x3235ab['GUYnT'](_0x1ab4b3,_0x59787a);});});}export async function authenticate(_0x27b3a1){const _0x5f1354=_0x5941bc,_0x571e6a={'XDiUh':function(_0x47ad77){return _0x47ad77();},'SCLOZ':'existing_token','VMhzU':_0x5f1354(0x15e),'EhvNd':'provided_token'};if(!_0x27b3a1){const _0x2baa36=await _0x571e6a[_0x5f1354(0x133)](getToken);if(_0x2baa36){const _0x480958=await getCurrentUser(_0x2baa36);if(_0x480958[_0x5f1354(0x142)])return console[_0x5f1354(0x15c)]('✓\x20Already\x20authenticated\x20to\x20'+_0x480958['user'][_0x5f1354(0x141)]),{'token':_0x2baa36,'method':_0x571e6a[_0x5f1354(0x13d)]};}try{_0x27b3a1=await runDeviceAuthFlow();}catch(_0x3d7134){throw new Error(_0x5f1354(0x132)+(_0x3d7134 instanceof Error?_0x3d7134[_0x5f1354(0x166)]:_0x3d7134));}const _0x488e3d=await getCurrentUser(_0x27b3a1);if(!_0x488e3d[_0x5f1354(0x142)])throw new Error(_0x5f1354(0x175)+_0x488e3d['error']);return console['log'](_0x5f1354(0x11e)+_0x488e3d['user']['organizationName']),{'token':_0x27b3a1,'method':'device_auth'};}console['log'](_0x571e6a['VMhzU']);const _0x47b9fb=await getCurrentUser(_0x27b3a1);if(!_0x47b9fb[_0x5f1354(0x142)]){if(_0x47b9fb['status'])throw new Error('Authentication\x20failed:\x20'+_0x47b9fb[_0x5f1354(0x16b)]+_0x5f1354(0x14e));else throw new Error(_0x5f1354(0x170)+_0x47b9fb['error']+_0x5f1354(0x13f));}return console[_0x5f1354(0x15c)](_0x5f1354(0x11e)+_0x47b9fb[_0x5f1354(0x168)][_0x5f1354(0x141)]),await storeToken(_0x27b3a1),console['log'](process['env']['GITHUB_ENV']?'✓\x20Exported\x20credentials\x20for\x20CI':_0x5f1354(0x12b)),{'token':_0x27b3a1,'method':_0x571e6a[_0x5f1354(0x167)]};}export async function ensureRangerDir(){const _0x34e56b=_0x5941bc,_0xe0105c={'HAbYz':function(_0x1a0f92){return _0x1a0f92();},'CEGKx':function(_0x2e2dec,_0x183882,_0x1edace){return _0x2e2dec(_0x183882,_0x1edace);},'geRNu':'.ranger'},_0x3e31d4=_0xe0105c[_0x34e56b(0x16f)](findGitRoot),_0x1dff0c=_0x3e31d4?_0xe0105c['CEGKx'](join,_0x3e31d4,_0xe0105c[_0x34e56b(0x151)]):_0xe0105c[_0x34e56b(0x16f)](getRangerDir);return!existsSync(_0x1dff0c)?(await _0xe0105c[_0x34e56b(0x16e)](mkdir,_0x1dff0c,{'recursive':!![]}),console[_0x34e56b(0x15c)]('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x1dff0c,'installed':!![]}):(console[_0x34e56b(0x15c)]('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x1dff0c,'installed':![]});}export async function ensureChromium(){const _0x7f803f=_0x5941bc,_0x57855a={'Vfawd':function(_0x45b1cd,_0x1c8278){return _0x45b1cd(_0x1c8278);},'IAmfJ':'✓\x20Playwright\x20Chromium\x20browser\x20found','bOHih':function(_0x4e730d,_0x3d8530){return _0x4e730d??_0x3d8530;},'gvnMd':'confirm','otwGG':_0x7f803f(0x163),'kYjvx':function(_0xd74672,_0x294492){return _0xd74672(_0x294492);},'ihmgV':_0x7f803f(0x15f),'cWFJq':_0x7f803f(0x18a),'YZQvi':_0x7f803f(0x152),'CujwL':_0x7f803f(0x17b)};let _0x9cded4=![];try{const _0x132ff4=chromium[_0x7f803f(0x183)]();_0x9cded4=_0x57855a[_0x7f803f(0x165)](existsSync,_0x132ff4);}catch{_0x9cded4=![];}if(_0x9cded4)return console['log'](_0x57855a['IAmfJ']),![];const _0xe6547c=getPlaywrightVersion(),_0x12da67=_0x57855a[_0x7f803f(0x11f)](_0xe6547c,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x429ace=!_0xe6547c,_0x2ca446=process['stdin'][_0x7f803f(0x143)]&&process[_0x7f803f(0x136)]['isTTY'];let _0x3e26c2=!![];if(_0x2ca446){const {install:_0x51f78d}=await _0x1be0a5[_0x7f803f(0x11c)]([{'type':_0x57855a[_0x7f803f(0x127)],'name':_0x57855a['otwGG'],'message':_0x429ace?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x12da67+_0x7f803f(0x149):'The\x20required\x20version\x20('+_0x12da67+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x3e26c2=_0x51f78d;}else console[_0x7f803f(0x15c)](_0x7f803f(0x180)+_0x12da67+(_0x429ace?_0x7f803f(0x13e):'')+'...');if(_0x3e26c2){console['log']('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x57855a['kYjvx'](installChromiumBinary,_0x12da67),console[_0x7f803f(0x15c)](_0x57855a[_0x7f803f(0x11b)]);}catch(_0x50b40b){console['error'](_0x57855a[_0x7f803f(0x17a)],_0x50b40b instanceof Error?_0x50b40b['message']:_0x50b40b),console[_0x7f803f(0x15c)](_0x7f803f(0x148)),console[_0x7f803f(0x15c)](_0x7f803f(0x18c)+_0x12da67+_0x7f803f(0x126));}}else console[_0x7f803f(0x15c)](_0x57855a['YZQvi']),console['log'](_0x57855a[_0x7f803f(0x15b)]),console['log'](_0x7f803f(0x18c)+_0x12da67+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x3a6d09){const _0x5c6044=_0x5941bc,_0x231c98={'ULTjO':_0x5c6044(0x169)},_0x550d11=join(_0x3a6d09,_0x5c6044(0x14c)),_0x7e5253=_0x5c6044(0x156);await writeFile(_0x550d11,_0x7e5253),console[_0x5c6044(0x15c)](_0x231c98['ULTjO']);}function printProfileSetupLaterInstructions(){const _0x4102fb=_0x5941bc,_0x2991bf={'FBgiC':function(_0xb95655,_0x478c36){return _0xb95655(_0x478c36);},'ayAkT':'ranger\x20profile\x20add\x20local','EpFnz':_0x4102fb(0x186)};console['log']('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console[_0x4102fb(0x15c)]('\x20\x20'+_0x2991bf[_0x4102fb(0x14f)](bold,_0x2991bf[_0x4102fb(0x125)])),console[_0x4102fb(0x15c)](_0x2991bf['EpFnz']);}async function ensureLocalEnv(_0xb90b8e,_0x483afa){const _0x315928=_0x5941bc,_0x12d917={'jVRqx':_0x315928(0x137),'jHTIF':'\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','YchSe':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','cXcCY':'use\x20until\x20the\x20session\x20expires.\x0a','nQrMM':_0x315928(0x177),'AOCyk':_0x315928(0x187),'UDvii':'wantsProfile','EhkYB':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','kKqBq':function(_0x3f468e){return _0x3f468e();},'XdZlA':function(_0x546d40,_0x220957){return _0x546d40 instanceof _0x220957;}};if(!findGitRoot())return console[_0x315928(0x15c)](_0x315928(0x122)),{'ready':![],'skipped':!![]};if(findExistingEnv(_0x12d917['jVRqx'],{'locations':[_0x315928(0x137)]}))return console[_0x315928(0x15c)](_0x315928(0x176)),{'ready':!![],'skipped':![]};const _0x193239=process['stdin']['isTTY']&&process[_0x315928(0x136)]['isTTY'];if(_0x193239&&!_0xb90b8e?.['url']){console[_0x315928(0x15c)](_0x12d917[_0x315928(0x131)]),console[_0x315928(0x15c)](_0x12d917[_0x315928(0x174)]),console['log']('auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to'),console[_0x315928(0x15c)](_0x12d917[_0x315928(0x182)]),console['log'](_0x12d917['nQrMM']);const {wantsProfile:_0x19e178}=await _0x1be0a5[_0x315928(0x11c)]([{'type':_0x12d917[_0x315928(0x124)],'name':_0x12d917['UDvii'],'message':_0x12d917['EhkYB'],'default':!![]}]);if(!_0x19e178)return _0x12d917[_0x315928(0x184)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x12d917['jVRqx'],{'url':_0xb90b8e?.['url'],'force':_0xb90b8e?.['force'],'allowInsecureLocalhost':_0xb90b8e?.[_0x315928(0x150)]},_0x483afa),{'ready':!![],'skipped':![]};}catch(_0x416179){return console['error']('\x0a❌\x20Profile\x20setup\x20failed:',_0x12d917['XdZlA'](_0x416179,Error)?_0x416179[_0x315928(0x166)]:_0x416179),_0x12d917['kKqBq'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x2f50dc,_0x12bfc1,_0x535b18){const _0x4e9117=_0x5941bc,_0x5b9a82={'VFGYX':function(_0x1f04ff){return _0x1f04ff();},'wuHOk':'No\x20git\x20repository\x20found','OAsYL':_0x4e9117(0x178),'iIBjC':_0x4e9117(0x173),'Snceu':function(_0x26a50f){return _0x26a50f();},'hIgKf':_0x4e9117(0x172),'Wrccb':_0x4e9117(0x154),'HCIgs':function(_0x29ee9,_0x415526){return _0x29ee9(_0x415526);},'fitdq':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','WYPVO':_0x4e9117(0x135),'GVSaG':function(_0x5e99f5,_0x5e3220){return _0x5e99f5(_0x5e3220);},'yKCPj':'ranger','ILVTM':_0x4e9117(0x13a),'ugwId':_0x4e9117(0x158),'HzUbQ':function(_0x41ad92,_0x211b1b){return _0x41ad92 instanceof _0x211b1b;},'ViNLL':_0x4e9117(0x15d),'fvDup':function(_0x5410b4,_0x5dd21e,_0x1045b4){return _0x5410b4(_0x5dd21e,_0x1045b4);},'LfYmC':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','dZCSM':_0x4e9117(0x12c),'EmIin':'/ranger:enable','FixYa':function(_0x18d841,_0x42e2f7){return _0x18d841+_0x42e2f7;}};console['log'](_0x4e9117(0x162));const _0x434d59=process['stdin'][_0x4e9117(0x143)]&&process[_0x4e9117(0x136)][_0x4e9117(0x143)];!_0x434d59&&!_0x12bfc1?.[_0x4e9117(0x185)]&&(console['log']('Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'),_0x12bfc1={..._0x12bfc1,'scope':'user'});_0x535b18?.[_0x4e9117(0x123)]('git_check');if(!_0x5b9a82[_0x4e9117(0x179)](findGitRoot)){await _0x535b18?.['trackPhaseError'](_0x4e9117(0x173),new Error(_0x5b9a82[_0x4e9117(0x11a)]));throw new Error(_0x5b9a82['OAsYL']);}_0x535b18?.[_0x4e9117(0x11d)](_0x5b9a82[_0x4e9117(0x14a)]);const _0x54872b=!existsSync(_0x5b9a82['Snceu'](getRangerDir)),{path:_0x1d9695}=await _0x5b9a82['VFGYX'](ensureRangerDir);_0x535b18?.[_0x4e9117(0x123)](_0x5b9a82[_0x4e9117(0x144)]);const _0x287fe5=await authenticate(_0x2f50dc);_0x535b18?.[_0x4e9117(0x11d)](_0x5b9a82[_0x4e9117(0x144)],{'isFirstRun':_0x54872b,'method':_0x287fe5[_0x4e9117(0x12a)]}),_0x535b18?.[_0x4e9117(0x123)](_0x5b9a82[_0x4e9117(0x12e)]);_0x12bfc1?.[_0x4e9117(0x164)]?console[_0x4e9117(0x15c)](_0x4e9117(0x129)):await _0x5b9a82['Snceu'](ensureChromium);_0x535b18?.['trackPhaseEnd'](_0x5b9a82[_0x4e9117(0x12e)],{'isFirstRun':_0x54872b,'skipped':!!_0x12bfc1?.[_0x4e9117(0x164)]}),await _0x5b9a82[_0x4e9117(0x16c)](writeRangerGitignore,_0x1d9695),console[_0x4e9117(0x15c)](_0x5b9a82['fitdq']);const _0x7d5d6b=_0x12bfc1?.['scope'],_0x25bff7=_0x12bfc1?.['opencode']??![];let _0xd7927b=null;_0x25bff7?(_0x535b18?.['trackPhaseStart']('plugin'),_0xd7927b=await ensureOpencodePluginConfig(_0x7d5d6b),_0x535b18?.['trackPhaseEnd'](_0x5b9a82['WYPVO'],{'isFirstRun':_0x54872b,'opencode':!![]})):(_0x535b18?.['trackPhaseStart']('plugin'),await _0x5b9a82[_0x4e9117(0x161)](ensureClaudePlugin,_0x7d5d6b),_0x535b18?.['trackPhaseEnd'](_0x5b9a82[_0x4e9117(0x14b)],{'isFirstRun':_0x54872b}));if(_0x25bff7&&_0xd7927b){_0x535b18?.['trackPhaseStart'](_0x4e9117(0x15d));try{await installSkill(_0x5b9a82['yKCPj'],{'level':_0xd7927b[_0x4e9117(0x185)],'cliVersion':getCurrentVersion(),'platform':_0x5b9a82['ILVTM']}),_0x535b18?.[_0x4e9117(0x11d)](_0x4e9117(0x15d),{'isFirstRun':_0x54872b,'opencode':!![]});}catch(_0x3bcea9){console[_0x4e9117(0x159)](_0x5b9a82[_0x4e9117(0x13c)],_0x5b9a82['HzUbQ'](_0x3bcea9,Error)?_0x3bcea9['message']:_0x3bcea9),_0x535b18?.['trackPhaseEnd'](_0x5b9a82['ViNLL'],{'isFirstRun':_0x54872b,'opencode':!![],'failed':!![]});}}else _0x535b18?.[_0x4e9117(0x123)]('skills'),await ensureClaudeSkills(_0x7d5d6b),_0x535b18?.['trackPhaseEnd'](_0x5b9a82[_0x4e9117(0x139)],{'isFirstRun':_0x54872b});if(!_0x434d59&&!_0x12bfc1?.[_0x4e9117(0x17d)])console[_0x4e9117(0x15c)]('Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:'),console[_0x4e9117(0x15c)]('\x20\x20'+_0x5b9a82['GVSaG'](bold,_0x4e9117(0x13b))+'\x0a');else{_0x535b18?.['trackPhaseStart'](_0x4e9117(0x130));const _0x226402=await _0x5b9a82['fvDup'](ensureLocalEnv,{'url':_0x12bfc1?.[_0x4e9117(0x17d)],'force':_0x12bfc1?.['force'],'allowInsecureLocalhost':_0x12bfc1?.['allowInsecureLocalhost']},_0x535b18);_0x535b18?.['trackPhaseEnd']('profile',{'isFirstRun':_0x54872b,'profileReady':_0x226402[_0x4e9117(0x146)],'userSkipped':_0x226402[_0x4e9117(0x171)]}),_0x226402[_0x4e9117(0x146)]&&console['log'](_0x4e9117(0x18d));}if(_0x25bff7)console[_0x4e9117(0x15c)](_0x5b9a82['LfYmC']),console[_0x4e9117(0x15c)](_0x5b9a82[_0x4e9117(0x17f)]),console[_0x4e9117(0x15c)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console[_0x4e9117(0x15c)](_0x4e9117(0x17e));else{const _0x470631=_0x5b9a82[_0x4e9117(0x161)](bold,_0x5b9a82[_0x4e9117(0x128)]);console['log'](_0x5b9a82[_0x4e9117(0x181)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x470631+'\x20and\x20prompt\x20the\x20coding'+_0x4e9117(0x138),'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser')+_0x4e9117(0x18b));}}
@@ -1 +1 @@
1
- const _0xd96c5d=_0x5207;(function(_0x5bdd86,_0x2a069e){const _0x2bfa94=_0x5207,_0x4a10b8=_0x5bdd86();while(!![]){try{const _0x2d52d4=-parseInt(_0x2bfa94(0x175))/0x1*(-parseInt(_0x2bfa94(0x16a))/0x2)+-parseInt(_0x2bfa94(0x1b2))/0x3*(-parseInt(_0x2bfa94(0x1a1))/0x4)+-parseInt(_0x2bfa94(0x1b9))/0x5*(parseInt(_0x2bfa94(0x182))/0x6)+parseInt(_0x2bfa94(0x1aa))/0x7*(parseInt(_0x2bfa94(0x181))/0x8)+parseInt(_0x2bfa94(0x1af))/0x9+parseInt(_0x2bfa94(0x1bd))/0xa+-parseInt(_0x2bfa94(0x1b1))/0xb;if(_0x2d52d4===_0x2a069e)break;else _0x4a10b8['push'](_0x4a10b8['shift']());}catch(_0x2078a1){_0x4a10b8['push'](_0x4a10b8['shift']());}}}(_0x44b6,0x565d8));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';function _0x44b6(){const _0x526b6a=['settingsPath','all','string','RxAEM','toString','3744CovaCG','1118184uvVouA','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','pipe','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','name','\x20\x20Run:\x20ranger\x20update','version','cwd','DEBUG','\x20\x20\x20\x20Settings:\x20','PnmJg','config','\x20(latest:\x20','plugin','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x20\x20Run:\x20ranger\x20setup\x20--opencode','YdJQF','API\x20URL:\x20','filter','COnYQ','sGFPK','euCpu','enabled','hasPlaintextAuth','auth.json.enc','not_installed','zByOh','not_configured',':\x20installed\x20(','FcGgC','gUDuN','4McxScu','debug','pMpGc','EIHNi','log','qACUV',':\x20configured','\x20\x20\x20\x20','\x0a📊\x20Ranger\x20Status\x0a','9639JTxvCG','isDirectory','length','status','\x20\x20User-level:','5010102RGKEoP','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','16703456mQmTav','105681kJNvrJ','kPibC','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','\x20\x20Run:\x20ranger\x20skillup','imuTQ','tsVEM','AzZzg','5DTkYJd','user','\x1b]8;;file://','includes','2101660nmquNg','data','MGpYT','opencode','DVGxK','\x20\x20Project-level:','(not\x20found)','sYZdC','XIKUc','path','parse','displayName','xlpgr','yEXMd','isArray','ueGNG','rrhRg','close','28470ZKKLBL','stderr','trim','disabled','encrypted','vseMn','error','\x20plugin(s)\x20configured','project','Zozxn','API\x20Environment:\x20','43gRWdfI','organizationName','nGuWx','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','\x20\x20\x20\x20Auth:\x20','details','nZHCp'];_0x44b6=function(){return _0x526b6a;};return _0x44b6();}import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0xc061d=>'\x1b[1m'+_0xc061d+'\x1b[0m',link=(_0x3f17b2,_0xd50be4)=>_0xd96c5d(0x1bb)+_0x3f17b2+'\x07'+(_0xd50be4||_0x3f17b2)+'\x1b]8;;\x07';function _0x5207(_0x611761,_0x3f03f7){_0x611761=_0x611761-0x168;const _0x44b69c=_0x44b6();let _0x520728=_0x44b69c[_0x611761];return _0x520728;}async function getOpencodePluginStatus(){const _0x236a24=_0xd96c5d,_0x1cd974={'EIHNi':function(_0x3cf8cb,_0xc7bd6e){return _0x3cf8cb(_0xc7bd6e);},'GkwdG':_0x236a24(0x17e),'ohyxe':'@ranger-testing/opencode-plugin','zByOh':function(_0x22428c,_0x311592){return _0x22428c>_0x311592;},'pMpGc':function(_0x39fba0,_0x139683,_0x346d9a,_0x49352f){return _0x39fba0(_0x139683,_0x346d9a,_0x49352f);},'gUDuN':_0x236a24(0x18d),'qHABe':_0x236a24(0x1be)};return new Promise(_0x420d7f=>{const _0x52a3c1=_0x236a24,_0x4cb94e={'FcGgC':function(_0x206c95,_0x1a95b3){const _0x2ec9f9=_0x5207;return _0x1cd974[_0x2ec9f9(0x1a4)](_0x206c95,_0x1a95b3);},'imuTQ':_0x1cd974['GkwdG'],'qjVKe':_0x1cd974['ohyxe'],'RxAEM':function(_0x21c9c9,_0x49669c){return _0x21c9c9!==_0x49669c;},'XIKUc':'not_installed','fjutw':function(_0x5a5599,_0x273260){const _0x229adf=_0x5207;return _0x1cd974[_0x229adf(0x19c)](_0x5a5599,_0x273260);},'sYZdC':_0x52a3c1(0x19d)},_0x10cbf6=_0x1cd974[_0x52a3c1(0x1a3)](spawn,_0x52a3c1(0x1c0),[_0x52a3c1(0x1a2),_0x1cd974[_0x52a3c1(0x1a0)]],{'stdio':['ignore',_0x52a3c1(0x184),_0x52a3c1(0x184)]});let _0x3b6d9b='';_0x10cbf6['stdout']?.['on'](_0x1cd974['qHABe'],_0x46e0c9=>{const _0x12c98f=_0x52a3c1;_0x3b6d9b+=_0x46e0c9[_0x12c98f(0x180)]();}),_0x10cbf6[_0x52a3c1(0x16b)]?.['on'](_0x52a3c1(0x1be),_0x40136f=>{_0x3b6d9b+=_0x40136f['toString']();}),_0x10cbf6['on'](_0x52a3c1(0x170),()=>{const _0x41b1b9=_0x52a3c1;_0x4cb94e[_0x41b1b9(0x19f)](_0x420d7f,{'status':_0x41b1b9(0x19b)});}),_0x10cbf6['on'](_0x52a3c1(0x169),_0x53ffc7=>{const _0x45db59=_0x52a3c1;if(_0x4cb94e[_0x45db59(0x17f)](_0x53ffc7,0x0)){_0x4cb94e[_0x45db59(0x19f)](_0x420d7f,{'status':_0x4cb94e[_0x45db59(0x1c5)]});return;}const _0x3c5c3a=_0x3b6d9b[_0x45db59(0x16c)]();let _0x4a2171=null;if(_0x3c5c3a)try{_0x4a2171=JSON[_0x45db59(0x1c7)](_0x3c5c3a);}catch{const _0x4e1bb7=_0x3c5c3a['match'](/\{[\s\S]*\}$/);if(_0x4e1bb7)try{_0x4a2171=JSON['parse'](_0x4e1bb7[0x0]);}catch{_0x4a2171=null;}}const _0x3d8301=Array[_0x45db59(0x1cb)](_0x4a2171?.['plugin'])?_0x4a2171?.[_0x45db59(0x18f)]:[],_0x50f8ed=_0x3d8301['some'](_0x3babaa=>{const _0x31ff37=_0x45db59;if(typeof _0x3babaa!==_0x4cb94e[_0x31ff37(0x1b6)])return![];return _0x3babaa['includes'](_0x4cb94e['qjVKe'])||_0x3babaa[_0x31ff37(0x1bc)]('opencode-plugin');});if(_0x50f8ed){_0x420d7f({'status':'configured','details':_0x4cb94e['fjutw'](_0x3d8301['length'],0x0)?_0x3d8301['length']+_0x45db59(0x171):undefined});return;}if(_0x3d8301[_0x45db59(0x1ac)]>0x0){_0x420d7f({'status':'not_configured','details':_0x3d8301['length']+_0x45db59(0x171)});return;}_0x420d7f({'status':_0x4cb94e[_0x45db59(0x1c4)]});});});}async function getSkillsFromDir(_0x2798df,_0xc06cf0){const _0x584b04=_0xd96c5d,_0x2bc8cd={'MGpYT':function(_0x5279e8,_0x46fe7b,_0xf97157){return _0x5279e8(_0x46fe7b,_0xf97157);},'yEXMd':function(_0x35faaf,_0x4525e7){return _0x35faaf(_0x4525e7);},'kPibC':function(_0x1b252f,_0x103c9c,_0x25289c){return _0x1b252f(_0x103c9c,_0x25289c);},'nGuWx':'utf-8'};if(!existsSync(_0x2798df))return[];const _0x4f7f0d=[];try{const _0x16605d=await _0x2bc8cd[_0x584b04(0x1bf)](readdir,_0x2798df,{'withFileTypes':!![]});for(const _0x498b78 of _0x16605d){if(_0x498b78[_0x584b04(0x1ab)]()){const _0x77d775=join(_0x2798df,_0x498b78[_0x584b04(0x186)],'SKILL.md');if(_0x2bc8cd[_0x584b04(0x1ca)](existsSync,_0x77d775)){let _0x403af3=_0x498b78['name'];try{const _0x567187=await _0x2bc8cd[_0x584b04(0x1b3)](readFile,_0x77d775,_0x2bc8cd[_0x584b04(0x177)]),_0x5cd781=_0x567187['match'](/name:\s*(.+)/);_0x5cd781&&(_0x403af3=_0x5cd781[0x1][_0x584b04(0x16c)]());}catch{}_0x4f7f0d['push']({'name':_0x498b78[_0x584b04(0x186)],'displayName':_0x403af3,'path':_0x77d775,'level':_0xc06cf0});}}}}catch{return[];}return _0x4f7f0d;}async function getInstalledSkills(){const _0x170858=_0xd96c5d,_0x26994b={'AIfPx':function(_0x3a4ac3,_0x183ef7,_0x1544ae){return _0x3a4ac3(_0x183ef7,_0x1544ae);},'qACUV':function(_0x287545){return _0x287545();}},[_0x21d1f5,_0x148eee]=await Promise[_0x170858(0x17d)]([_0x26994b['AIfPx'](getSkillsFromDir,_0x26994b[_0x170858(0x1a6)](getProjectSkillsDir),_0x170858(0x172)),getSkillsFromDir(getUserSkillsDir(),'user')]);return{'project':_0x21d1f5,'user':_0x148eee};}async function getEnvironments(){const _0x2a5165={'vAfpK':'settings.json','moiVK':'auth.json','uhhUc':function(_0x214386){return _0x214386();},'cipIA':function(_0x42dd79,_0x45162e){return _0x42dd79(_0x45162e);}},{envNames:_0x1c6713,activeEnv:_0x3b8659}=await getEnvNames(),_0x210a9e=_0x2a5165['uhhUc'](getRangerDir);if(!_0x2a5165['cipIA'](existsSync,_0x210a9e))return{'envs':[],'activeEnv':null};const _0x1ed307=_0x1c6713['map'](_0x29c0d3=>{const _0x56efd1=_0x5207,_0x5f462c=getEnvDir(_0x29c0d3),_0x1c561f=join(_0x5f462c,_0x2a5165['vAfpK']),_0x213323=join(_0x5f462c,_0x2a5165['moiVK']),_0x57341b=join(_0x5f462c,_0x56efd1(0x19a));return{'name':_0x29c0d3,'settingsPath':existsSync(_0x1c561f)?_0x1c561f:_0x56efd1(0x1c3),'hasPlaintextAuth':existsSync(_0x213323),'hasEncryptedAuth':existsSync(_0x57341b),'isActive':_0x29c0d3===_0x3b8659};});return{'envs':_0x1ed307,'activeEnv':_0x3b8659};}export async function status(){const _0x2973a7=_0xd96c5d,_0x5d43de={'euCpu':function(_0x5ce43d,_0x5ac6d1){return _0x5ce43d(_0x5ac6d1);},'ueGNG':function(_0x15ba68,_0xc30cea,_0x4bbb29){return _0x15ba68(_0xc30cea,_0x4bbb29);},'Yfnra':function(_0x58d44d,_0x531c5b){return _0x58d44d(_0x531c5b);},'tsVEM':function(_0x523bf7){return _0x523bf7();},'YtMCO':function(_0x11e753,_0xacbbae){return _0x11e753!==_0xacbbae;},'yJzhi':function(_0x8f5fa7,_0x22d123){return _0x8f5fa7(_0x22d123);},'eOdBb':'\x0a---\x20OpenCode\x20Plugin\x20---','bGzNJ':'not_configured','rrhRg':_0x2973a7(0x191),'YBJtG':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','qAbJv':'unknown','PnmJg':'ranger@trailhead','xLjLd':_0x2973a7(0x1b4),'vseMn':function(_0x52930d){return _0x52930d();},'nZHCp':function(_0x3bfd92,_0x52ccf1){return _0x3bfd92===_0x52ccf1;},'Zozxn':function(_0x27d173,_0x2968d1){return _0x27d173>_0x2968d1;},'cHisx':_0x2973a7(0x1c2),'xlpgr':function(_0x1fba40,_0x4f2e09,_0xc501b0){return _0x1fba40(_0x4f2e09,_0xc501b0);},'sGFPK':function(_0x3a6e6a){return _0x3a6e6a();},'YdJQF':_0x2973a7(0x16e),'eHNff':'plaintext','DVGxK':'none','AzZzg':function(_0x48a38d,_0x435d48){return _0x48a38d!==_0x435d48;},'COnYQ':_0x2973a7(0x1c3)};console[_0x2973a7(0x1a5)](_0x2973a7(0x1a9));const _0x1c561e=process[_0x2973a7(0x189)](),_0x411440=getRangerDir();if(!_0x5d43de['euCpu'](existsSync,_0x411440)){console['log']('Root:\x20'+_0x5d43de[_0x2973a7(0x1cc)](link,_0x1c561e,bold(_0x5d43de[_0x2973a7(0x197)](basename,_0x1c561e)))),console['log'](_0x2973a7(0x1b0)),console['log'](_0x2973a7(0x183));return;}console[_0x2973a7(0x1a5)]('Root:\x20'+link(_0x1c561e,bold(_0x5d43de['Yfnra'](basename,_0x1c561e))));const _0x507196=getCurrentVersion(),_0x303bb8=_0x5d43de[_0x2973a7(0x1b7)](getLatestVersion);if(_0x303bb8['version']&&_0x5d43de['YtMCO'](_0x303bb8['version'],_0x507196))console[_0x2973a7(0x1a5)]('Version:\x20'+_0x507196+_0x2973a7(0x18e)+_0x303bb8[_0x2973a7(0x188)]+')'),console[_0x2973a7(0x1a5)](_0x2973a7(0x187));else _0x303bb8[_0x2973a7(0x188)]?console[_0x2973a7(0x1a5)]('Version:\x20'+_0x507196+'\x20(up\x20to\x20date)'):console[_0x2973a7(0x1a5)]('Version:\x20'+_0x507196);const _0x61c86a=await getToken();if(_0x61c86a){const _0x2e933c=await _0x5d43de['yJzhi'](getCurrentUser,_0x61c86a);_0x2e933c['success']?console['log']('Organization:\x20'+bold(_0x2e933c[_0x2973a7(0x1ba)][_0x2973a7(0x176)])):(console[_0x2973a7(0x1a5)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x2973a7(0x1a5)](_0x2973a7(0x190)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console[_0x2973a7(0x1a5)](_0x2973a7(0x190));process['env'][_0x2973a7(0x18a)]&&(console['log'](_0x2973a7(0x174)+getCurrentEnvironment()),console[_0x2973a7(0x1a5)](_0x2973a7(0x193)+_0x5d43de[_0x2973a7(0x1b7)](getApiBaseUrl)));console[_0x2973a7(0x1a5)](_0x5d43de['eOdBb']);const _0xe0e08d=await _0x5d43de['tsVEM'](getOpencodePluginStatus);if(_0xe0e08d[_0x2973a7(0x1ad)]==='configured')console['log']('\x20\x20'+bold('@ranger-testing/opencode-plugin')+_0x2973a7(0x1a7)),_0xe0e08d[_0x2973a7(0x17a)]&&console['log']('\x20\x20'+_0xe0e08d['details']);else _0xe0e08d['status']===_0x5d43de['bGzNJ']?(console['log']('\x20\x20Not\x20configured'),_0xe0e08d['details']&&console['log']('\x20\x20'+_0xe0e08d['details']),console['log'](_0x5d43de[_0x2973a7(0x168)])):console['log'](_0x2973a7(0x178));console['log'](_0x5d43de['YBJtG']);const _0x354e0c=await getPluginInfo('ranger@trailhead');if(_0x354e0c){const _0xd37077=_0x354e0c['scope']||_0x5d43de['qAbJv'],_0x93cebc=_0x354e0c['enabled']?_0x2973a7(0x198):_0x2973a7(0x16d);console['log']('\x20\x20'+bold(_0x5d43de[_0x2973a7(0x18c)])+_0x2973a7(0x19e)+_0xd37077+',\x20'+_0x93cebc+')');}else console[_0x2973a7(0x1a5)]('\x20\x20Not\x20installed'),console[_0x2973a7(0x1a5)](_0x5d43de['xLjLd']);console['log']('\x0a---\x20Skills\x20---');const {project:_0x5828b7,user:_0x1773bf}=await _0x5d43de[_0x2973a7(0x16f)](getInstalledSkills),_0x18680a=_0x5828b7[_0x2973a7(0x194)](_0x152002=>RANGER_MANAGED_SKILLS['includes'](_0x152002['name'])),_0x45f8e0=_0x1773bf['filter'](_0x5b26c8=>RANGER_MANAGED_SKILLS[_0x2973a7(0x1bc)](_0x5b26c8[_0x2973a7(0x186)])),_0x480568=_0x18680a['length']+_0x45f8e0['length'];if(_0x5d43de[_0x2973a7(0x17b)](_0x480568,0x0))console['log']('No\x20skills\x20installed'),console['log'](_0x2973a7(0x1b5));else{if(_0x5d43de[_0x2973a7(0x173)](_0x18680a['length'],0x0)){console[_0x2973a7(0x1a5)](_0x5d43de['cHisx']);for(const _0x2a7399 of _0x18680a){console['log'](_0x2973a7(0x1a8)+bold(_0x2a7399[_0x2973a7(0x1c8)])+':\x20'+_0x5d43de[_0x2973a7(0x1c9)](link,_0x2a7399['path'],basename(_0x2a7399[_0x2973a7(0x1c6)])));}}if(_0x5d43de[_0x2973a7(0x173)](_0x45f8e0['length'],0x0)){console['log'](_0x2973a7(0x1ae));for(const _0x1397a3 of _0x45f8e0){console['log']('\x20\x20\x20\x20'+_0x5d43de['yJzhi'](bold,_0x1397a3['displayName'])+':\x20'+link(_0x1397a3['path'],basename(_0x1397a3['path'])));}}}console[_0x2973a7(0x1a5)]('\x0a---\x20Profiles\x20---');const {envs:_0x59b93a,activeEnv:_0x494321}=await _0x5d43de[_0x2973a7(0x196)](getEnvironments);if(_0x5d43de[_0x2973a7(0x17b)](_0x59b93a[_0x2973a7(0x1ac)],0x0))console['log']('No\x20profiles\x20configured'),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0xf958e4 of _0x59b93a){const _0x2e1ea2=_0xf958e4['isActive']?'\x20(active)':'',_0x4b96dd=_0xf958e4['hasEncryptedAuth']?_0x5d43de[_0x2973a7(0x192)]:_0xf958e4[_0x2973a7(0x199)]?_0x5d43de['eHNff']:_0x5d43de[_0x2973a7(0x1c1)];console[_0x2973a7(0x1a5)]('\x20\x20'+bold(_0xf958e4[_0x2973a7(0x186)])+_0x2e1ea2),console['log'](_0x2973a7(0x179)+_0x4b96dd),_0x5d43de[_0x2973a7(0x1b8)](_0xf958e4[_0x2973a7(0x17c)],_0x5d43de[_0x2973a7(0x195)])&&console['log'](_0x2973a7(0x18b)+link(_0xf958e4['settingsPath'],basename(_0xf958e4['settingsPath'])));}!_0x494321&&(console[_0x2973a7(0x1a5)]('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log'](_0x2973a7(0x185)+_0x59b93a['map'](_0x4e5598=>_0x4e5598[_0x2973a7(0x186)])['join'](',\x20')+')'));}console['log']('');}
1
+ const _0x5eef4b=_0x3101;(function(_0x24baf2,_0x204792){const _0x2ce747=_0x3101,_0x58ec68=_0x24baf2();while(!![]){try{const _0x5bed65=parseInt(_0x2ce747(0x163))/0x1*(-parseInt(_0x2ce747(0x187))/0x2)+-parseInt(_0x2ce747(0x17b))/0x3*(parseInt(_0x2ce747(0x122))/0x4)+-parseInt(_0x2ce747(0x14e))/0x5+parseInt(_0x2ce747(0x13c))/0x6*(parseInt(_0x2ce747(0x12d))/0x7)+parseInt(_0x2ce747(0x12f))/0x8*(parseInt(_0x2ce747(0x159))/0x9)+-parseInt(_0x2ce747(0x137))/0xa+parseInt(_0x2ce747(0x189))/0xb;if(_0x5bed65===_0x204792)break;else _0x58ec68['push'](_0x58ec68['shift']());}catch(_0x59cd7c){_0x58ec68['push'](_0x58ec68['shift']());}}}(_0x1850,0x9045e));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';function _0x3101(_0x7a9c84,_0x193c0b){_0x7a9c84=_0x7a9c84-0x11f;const _0x1850c1=_0x1850();let _0x310137=_0x1850c1[_0x7a9c84];return _0x310137;}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{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x107318=>'\x1b[1m'+_0x107318+'\x1b[0m',link=(_0x240a21,_0x546115)=>_0x5eef4b(0x12e)+_0x240a21+'\x07'+(_0x546115||_0x240a21)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x4fbd07=_0x5eef4b,_0x5bd6ef={'wkiyS':function(_0x53c51f,_0x37ca55){return _0x53c51f(_0x37ca55);},'YNIYI':_0x4fbd07(0x152),'KeuHq':_0x4fbd07(0x15c),'YCMPA':_0x4fbd07(0x175),'rAIRK':_0x4fbd07(0x135),'ewuEM':function(_0x121962,_0x55a26d){return _0x121962!==_0x55a26d;},'kJleK':function(_0x387923,_0x1153df){return _0x387923>_0x1153df;},'HszAe':'debug','ovBcP':_0x4fbd07(0x14b),'qPGoF':_0x4fbd07(0x18a)};return new Promise(_0x1528b9=>{const _0x55d277=_0x4fbd07,_0x35fdd3={'FnfIj':_0x5bd6ef[_0x55d277(0x162)],'drpsP':_0x5bd6ef[_0x55d277(0x181)],'BLnVZ':_0x5bd6ef[_0x55d277(0x15b)],'OYmub':function(_0x436abc,_0x2e5cf5){return _0x5bd6ef['ewuEM'](_0x436abc,_0x2e5cf5);},'WunVn':function(_0x34971a,_0x2e5e1d){const _0x1e0ee4=_0x55d277;return _0x5bd6ef[_0x1e0ee4(0x121)](_0x34971a,_0x2e5e1d);},'ZAAiS':_0x5bd6ef[_0x55d277(0x156)],'eQvgl':'configured','oIKag':function(_0x3bf152,_0x14e208){return _0x5bd6ef['kJleK'](_0x3bf152,_0x14e208);}},_0xf2264f=spawn('opencode',[_0x5bd6ef['HszAe'],_0x55d277(0x149)],{'stdio':['ignore',_0x5bd6ef['ovBcP'],_0x5bd6ef['ovBcP']]});let _0x7400c8='';_0xf2264f['stdout']?.['on']('data',_0x49d9c9=>{_0x7400c8+=_0x49d9c9['toString']();}),_0xf2264f['stderr']?.['on']('data',_0x26df5c=>{_0x7400c8+=_0x26df5c['toString']();}),_0xf2264f['on'](_0x5bd6ef[_0x55d277(0x178)],()=>{const _0x3d24be=_0x55d277;_0x5bd6ef['wkiyS'](_0x1528b9,{'status':_0x5bd6ef[_0x3d24be(0x156)]});}),_0xf2264f['on'](_0x55d277(0x165),_0xac5c83=>{const _0x496e74=_0x55d277;if(_0x35fdd3[_0x496e74(0x173)](_0xac5c83,0x0)){_0x35fdd3[_0x496e74(0x123)](_0x1528b9,{'status':_0x35fdd3['ZAAiS']});return;}const _0x589bef=_0x7400c8[_0x496e74(0x132)]();let _0x29f196=null;if(_0x589bef)try{_0x29f196=JSON[_0x496e74(0x17a)](_0x589bef);}catch{const _0x4c7417=_0x589bef[_0x496e74(0x16e)](/\{[\s\S]*\}$/);if(_0x4c7417)try{_0x29f196=JSON[_0x496e74(0x17a)](_0x4c7417[0x0]);}catch{_0x29f196=null;}}const _0x49d9d8=Array[_0x496e74(0x161)](_0x29f196?.[_0x496e74(0x172)])?_0x29f196?.['plugin']:[],_0x2899c8=_0x49d9d8['some'](_0x58a455=>{const _0x4f9c32=_0x496e74;if(typeof _0x58a455!==_0x35fdd3[_0x4f9c32(0x176)])return![];return _0x58a455['includes'](_0x35fdd3['drpsP'])||_0x58a455['includes'](_0x35fdd3[_0x4f9c32(0x184)]);});if(_0x2899c8){_0x1528b9({'status':_0x35fdd3[_0x496e74(0x171)],'details':_0x35fdd3['oIKag'](_0x49d9d8[_0x496e74(0x16f)],0x0)?_0x49d9d8['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x49d9d8[_0x496e74(0x16f)]>0x0){_0x35fdd3[_0x496e74(0x123)](_0x1528b9,{'status':_0x496e74(0x126),'details':_0x49d9d8[_0x496e74(0x16f)]+'\x20plugin(s)\x20configured'});return;}_0x1528b9({'status':_0x496e74(0x126)});});});}async function getSkillsFromDir(_0x377a05,_0x6d69ad){const _0x3892c3=_0x5eef4b,_0x190f1b={'eVPAu':function(_0x3f7665,_0x2b3913){return _0x3f7665(_0x2b3913);},'hynnU':function(_0x165731,_0x3e30cc,_0x3c5310){return _0x165731(_0x3e30cc,_0x3c5310);},'QTtIu':_0x3892c3(0x13d),'JHWRb':_0x3892c3(0x177)};if(!_0x190f1b[_0x3892c3(0x13a)](existsSync,_0x377a05))return[];const _0x3a6e96=[];try{const _0x1d0c71=await _0x190f1b['hynnU'](readdir,_0x377a05,{'withFileTypes':!![]});for(const _0x2dc6cc of _0x1d0c71){if(_0x2dc6cc[_0x3892c3(0x17d)]()){const _0x236a5b=join(_0x377a05,_0x2dc6cc[_0x3892c3(0x142)],_0x190f1b[_0x3892c3(0x154)]);if(existsSync(_0x236a5b)){let _0x3ffbd0=_0x2dc6cc['name'];try{const _0x310beb=await _0x190f1b[_0x3892c3(0x168)](readFile,_0x236a5b,_0x190f1b[_0x3892c3(0x140)]),_0x22eb60=_0x310beb['match'](/name:\s*(.+)/);_0x22eb60&&(_0x3ffbd0=_0x22eb60[0x1]['trim']());}catch{}_0x3a6e96[_0x3892c3(0x130)]({'name':_0x2dc6cc['name'],'displayName':_0x3ffbd0,'path':_0x236a5b,'level':_0x6d69ad});}}}}catch{return[];}return _0x3a6e96;}async function getInstalledSkills(){const _0x2a1de4=_0x5eef4b,_0x5bf531={'xbYrk':_0x2a1de4(0x182)},[_0x415ac7,_0x4e056d]=await Promise[_0x2a1de4(0x16d)]([getSkillsFromDir(getProjectSkillsDir(),'project'),getSkillsFromDir(getUserSkillsDir(),_0x5bf531['xbYrk'])]);return{'project':_0x415ac7,'user':_0x4e056d};}async function getEnvironments(){const _0x570eb7=_0x5eef4b,_0x35cad2={'lAakz':function(_0x22c288,_0x662ca){return _0x22c288(_0x662ca);},'Vyudz':function(_0x267176,_0x39737e,_0x2e6bfc){return _0x267176(_0x39737e,_0x2e6bfc);},'AwArY':_0x570eb7(0x153),'hTXdd':function(_0x21acd8,_0x274000){return _0x21acd8(_0x274000);},'dPZjw':function(_0x622acc){return _0x622acc();}},{envNames:_0x43c791,activeEnv:_0x459a9f}=await _0x35cad2['dPZjw'](getEnvNames),_0x3a4bfa=getRangerDir();if(!_0x35cad2['lAakz'](existsSync,_0x3a4bfa))return{'envs':[],'activeEnv':null};const _0x43875e=_0x43c791[_0x570eb7(0x17c)](_0x3496bf=>{const _0x4d0b78=_0x570eb7,_0xb611bd=_0x35cad2[_0x4d0b78(0x13e)](getEnvDir,_0x3496bf),_0xfb67ad=join(_0xb611bd,_0x4d0b78(0x15f)),_0x38f0ce=_0x35cad2[_0x4d0b78(0x164)](join,_0xb611bd,'auth.json'),_0x361c02=_0x35cad2[_0x4d0b78(0x164)](join,_0xb611bd,_0x4d0b78(0x180));return{'name':_0x3496bf,'settingsPath':_0x35cad2[_0x4d0b78(0x13e)](existsSync,_0xfb67ad)?_0xfb67ad:_0x35cad2[_0x4d0b78(0x133)],'hasPlaintextAuth':_0x35cad2['hTXdd'](existsSync,_0x38f0ce),'hasEncryptedAuth':_0x35cad2[_0x4d0b78(0x124)](existsSync,_0x361c02),'isActive':_0x3496bf===_0x459a9f};});return{'envs':_0x43875e,'activeEnv':_0x459a9f};}export async function status(){const _0x5dfe1e=_0x5eef4b,_0x58fe11={'DeSuc':function(_0xfbe25c){return _0xfbe25c();},'nLZvG':function(_0x398474,_0x1ee32b){return _0x398474(_0x1ee32b);},'lwbxh':function(_0x4fae58,_0xe67908,_0x576e81){return _0x4fae58(_0xe67908,_0x576e81);},'gpBmJ':function(_0x94a550){return _0x94a550();},'LGmmW':function(_0x1e0859){return _0x1e0859();},'jzomp':function(_0x42d440,_0x309f38){return _0x42d440===_0x309f38;},'MXyzx':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','jvJYj':_0x5dfe1e(0x14f),'Dcxti':'unknown','snniz':_0x5dfe1e(0x174),'RxPSc':'\x0a---\x20Skills\x20---','llBrv':function(_0x13b1c1,_0x1dc261){return _0x13b1c1+_0x1dc261;},'RENHH':_0x5dfe1e(0x15d),'VoiJO':_0x5dfe1e(0x188),'fWAdk':function(_0x3f27e6,_0x56caed){return _0x3f27e6(_0x56caed);},'kItyt':function(_0x220b35,_0x202363){return _0x220b35>_0x202363;},'SeKLf':_0x5dfe1e(0x160),'vyRyY':function(_0x4c7878,_0xd36b38){return _0x4c7878===_0xd36b38;},'WSZUB':'\x20(active)','sCWLv':_0x5dfe1e(0x13b),'mQiEx':_0x5dfe1e(0x12b),'OqvWe':'(not\x20found)','Lglww':function(_0x554b4e,_0x576ecd,_0x1b43c9){return _0x554b4e(_0x576ecd,_0x1b43c9);}};console['log'](_0x5dfe1e(0x12c));const _0x4e39c9=process['cwd'](),_0x49a16a=_0x58fe11['DeSuc'](getRangerDir);if(!_0x58fe11[_0x5dfe1e(0x128)](existsSync,_0x49a16a)){console['log']('Root:\x20'+link(_0x4e39c9,bold(basename(_0x4e39c9)))),console['log'](_0x5dfe1e(0x170)),console[_0x5dfe1e(0x185)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x5dfe1e(0x185)]('Root:\x20'+_0x58fe11['lwbxh'](link,_0x4e39c9,bold(_0x58fe11[_0x5dfe1e(0x128)](basename,_0x4e39c9))));const _0x26c718=getCurrentVersion(),_0x26ce0b=_0x58fe11['gpBmJ'](getLatestVersion);if(_0x26ce0b[_0x5dfe1e(0x169)]&&_0x26ce0b['version']!==_0x26c718)console[_0x5dfe1e(0x185)]('Version:\x20'+_0x26c718+'\x20(latest:\x20'+_0x26ce0b['version']+')'),console[_0x5dfe1e(0x185)](_0x5dfe1e(0x146));else _0x26ce0b[_0x5dfe1e(0x169)]?console['log']('Version:\x20'+_0x26c718+_0x5dfe1e(0x183)):console[_0x5dfe1e(0x185)]('Version:\x20'+_0x26c718);const _0x1f2d55=await getToken();if(_0x1f2d55){const _0x34df9c=await getCurrentUser(_0x1f2d55);_0x34df9c[_0x5dfe1e(0x186)]?console[_0x5dfe1e(0x185)](_0x5dfe1e(0x144)+_0x58fe11['nLZvG'](bold,_0x34df9c['user']['organizationName'])):(console['log'](_0x5dfe1e(0x147)),console['log'](_0x5dfe1e(0x139)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x5dfe1e(0x139));process['env']['DEBUG']&&(console['log'](_0x5dfe1e(0x179)+getCurrentEnvironment()),console[_0x5dfe1e(0x185)](_0x5dfe1e(0x158)+_0x58fe11[_0x5dfe1e(0x138)](getApiBaseUrl)));console[_0x5dfe1e(0x185)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x3992fe=await getOpencodePluginStatus();if(_0x58fe11['jzomp'](_0x3992fe['status'],_0x5dfe1e(0x157)))console['log']('\x20\x20'+_0x58fe11[_0x5dfe1e(0x128)](bold,'@ranger-testing/opencode-plugin')+':\x20configured'),_0x3992fe[_0x5dfe1e(0x148)]&&console[_0x5dfe1e(0x185)]('\x20\x20'+_0x3992fe[_0x5dfe1e(0x148)]);else _0x58fe11['jzomp'](_0x3992fe['status'],_0x5dfe1e(0x126))?(console['log'](_0x5dfe1e(0x14d)),_0x3992fe['details']&&console['log']('\x20\x20'+_0x3992fe[_0x5dfe1e(0x148)]),console['log']('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console[_0x5dfe1e(0x185)](_0x58fe11[_0x5dfe1e(0x17e)]);console[_0x5dfe1e(0x185)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x5da060=await getPluginInfo(_0x58fe11['jvJYj']);if(_0x5da060){const _0x2612ac=_0x5da060['scope']||_0x58fe11['Dcxti'],_0x12ab94=_0x5da060['enabled']?'enabled':'disabled';console['log']('\x20\x20'+bold(_0x5dfe1e(0x14f))+_0x5dfe1e(0x150)+_0x2612ac+',\x20'+_0x12ab94+')');}else console['log'](_0x58fe11[_0x5dfe1e(0x17f)]),console['log'](_0x5dfe1e(0x129));console['log'](_0x58fe11['RxPSc']);const {project:_0x58a040,user:_0x10c90f}=await getInstalledSkills(),_0x4c207c=_0x58a040['filter'](_0x51815c=>RANGER_MANAGED_SKILLS[_0x5dfe1e(0x15a)](_0x51815c[_0x5dfe1e(0x142)])),_0x353454=_0x10c90f[_0x5dfe1e(0x141)](_0x15213e=>RANGER_MANAGED_SKILLS['includes'](_0x15213e[_0x5dfe1e(0x142)])),_0x5f3972=_0x58fe11['llBrv'](_0x4c207c['length'],_0x353454[_0x5dfe1e(0x16f)]);if(_0x5f3972===0x0)console[_0x5dfe1e(0x185)](_0x58fe11['RENHH']),console[_0x5dfe1e(0x185)](_0x5dfe1e(0x166));else{if(_0x4c207c['length']>0x0){console[_0x5dfe1e(0x185)](_0x58fe11[_0x5dfe1e(0x134)]);for(const _0x3ccfff of _0x4c207c){console[_0x5dfe1e(0x185)]('\x20\x20\x20\x20'+_0x58fe11['fWAdk'](bold,_0x3ccfff[_0x5dfe1e(0x120)])+':\x20'+_0x58fe11['lwbxh'](link,_0x3ccfff['path'],_0x58fe11[_0x5dfe1e(0x12a)](basename,_0x3ccfff[_0x5dfe1e(0x14c)])));}}if(_0x58fe11[_0x5dfe1e(0x16a)](_0x353454['length'],0x0)){console['log'](_0x5dfe1e(0x15e));for(const _0x43ce3f of _0x353454){console[_0x5dfe1e(0x185)](_0x5dfe1e(0x131)+bold(_0x43ce3f[_0x5dfe1e(0x120)])+':\x20'+link(_0x43ce3f[_0x5dfe1e(0x14c)],_0x58fe11['fWAdk'](basename,_0x43ce3f[_0x5dfe1e(0x14c)])));}}}console[_0x5dfe1e(0x185)](_0x58fe11[_0x5dfe1e(0x136)]);const {envs:_0x153e4f,activeEnv:_0x42204a}=await getEnvironments();if(_0x58fe11[_0x5dfe1e(0x13f)](_0x153e4f[_0x5dfe1e(0x16f)],0x0))console['log'](_0x5dfe1e(0x151)),console['log'](_0x5dfe1e(0x143));else{for(const _0x506a01 of _0x153e4f){const _0x3f9016=_0x506a01['isActive']?_0x58fe11[_0x5dfe1e(0x167)]:'',_0x3305f6=_0x506a01[_0x5dfe1e(0x14a)]?_0x58fe11[_0x5dfe1e(0x127)]:_0x506a01['hasPlaintextAuth']?_0x58fe11['mQiEx']:'none';console['log']('\x20\x20'+bold(_0x506a01[_0x5dfe1e(0x142)])+_0x3f9016),console[_0x5dfe1e(0x185)](_0x5dfe1e(0x16c)+_0x3305f6),_0x506a01[_0x5dfe1e(0x16b)]!==_0x58fe11[_0x5dfe1e(0x125)]&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x58fe11[_0x5dfe1e(0x155)](link,_0x506a01['settingsPath'],basename(_0x506a01['settingsPath'])));}!_0x42204a&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log'](_0x5dfe1e(0x11f)+_0x153e4f['map'](_0x825ce6=>_0x825ce6[_0x5dfe1e(0x142)])[_0x5dfe1e(0x145)](',\x20')+')'));}console['log']('');}function _0x1850(){const _0x25e872=['API\x20Environment:\x20','parse','3UqtHDS','map','isDirectory','MXyzx','snniz','auth.json.enc','YCMPA','user','\x20(up\x20to\x20date)','BLnVZ','log','success','1714946jLekAL','\x20\x20Project-level:','18650841MTRUpN','error','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','displayName','wkiyS','1405176vGQiZC','WunVn','hTXdd','OqvWe','not_configured','sCWLv','nLZvG','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','fWAdk','plaintext','\x0a📊\x20Ranger\x20Status\x0a','91cAgfof','\x1b]8;;file://','8AnHORo','push','\x20\x20\x20\x20','trim','AwArY','VoiJO','opencode-plugin','SeKLf','8717910buttDn','LGmmW','\x20\x20Run:\x20ranger\x20setup\x20[token]','eVPAu','encrypted','494346GlwhjF','SKILL.md','lAakz','vyRyY','JHWRb','filter','name','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','Organization:\x20','join','\x20\x20Run:\x20ranger\x20update','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','details','config','hasEncryptedAuth','pipe','path','\x20\x20Not\x20configured','5105185GYGHKX','ranger@trailhead',':\x20installed\x20(','No\x20profiles\x20configured','not_installed','(not\x20found)','QTtIu','Lglww','YNIYI','configured','API\x20URL:\x20','8333307WLYpIO','includes','rAIRK','string','No\x20skills\x20installed','\x20\x20User-level:','settings.json','\x0a---\x20Profiles\x20---','isArray','KeuHq','1MjbULN','Vyudz','close','\x20\x20Run:\x20ranger\x20skillup','WSZUB','hynnU','version','kItyt','settingsPath','\x20\x20\x20\x20Auth:\x20','all','match','length','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','eQvgl','plugin','OYmub','\x20\x20Not\x20installed','@ranger-testing/opencode-plugin','FnfIj','utf-8','qPGoF'];_0x1850=function(){return _0x25e872;};return _0x1850();}
@@ -1 +1 @@
1
- (function(_0x112c53,_0x1d963e){const _0xf89491=_0x49f4,_0x4f7df5=_0x112c53();while(!![]){try{const _0x385fe5=parseInt(_0xf89491(0x107))/0x1*(-parseInt(_0xf89491(0xec))/0x2)+parseInt(_0xf89491(0xf1))/0x3*(parseInt(_0xf89491(0x126))/0x4)+parseInt(_0xf89491(0x100))/0x5*(-parseInt(_0xf89491(0x106))/0x6)+parseInt(_0xf89491(0x11c))/0x7*(parseInt(_0xf89491(0xfe))/0x8)+parseInt(_0xf89491(0xea))/0x9*(parseInt(_0xf89491(0xee))/0xa)+-parseInt(_0xf89491(0x11f))/0xb*(parseInt(_0xf89491(0xff))/0xc)+parseInt(_0xf89491(0x115))/0xd;if(_0x385fe5===_0x1d963e)break;else _0x4f7df5['push'](_0x4f7df5['shift']());}catch(_0x3a818e){_0x4f7df5['push'](_0x4f7df5['shift']());}}}(_0x3f0b,0xf1340));function _0x3f0b(){const _0x68b23d=[')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','woYbp','1530692wqAZOE','ranger@trailhead','log','qiTUX','pipe','GPrZq','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','warn','iaXZx','207HkhLkB','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','120IlBtqf','plugin','374660jVNdFm','gccjE','@latest','9OJiJPX','Xrioh','IlIPA','\x0aCould\x20not\x20check\x20latest\x20version:\x20','project','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','split','marketplace','Update\x20failed.','luVay','\x20skill\x20','platform','SqNeM','6211768CFVBEI','12VuxRPt','138625XMLkxy','error','active-feature.txt','\x20ranger-managed\x20skill(s)...','hPkKm','Munti','36vTlTNr','27249CPfVgT','utf-8','length','gqoPi','zKffT','active-profile.txt','splice','SRmrS','DXUxA','close','isEci','update','RGFtu','\x0aCurrent\x20version:\x20','14106157eAfoUs','--scope','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','version','EVhwy','Attempting\x20install\x20anyway...','join','7MutoLn','KQAwF','claude','11902429jrPNTY','push','fESCY','YvrCp','\x20\x20Failed\x20to\x20reinstall\x20'];_0x3f0b=function(){return _0x68b23d;};return _0x3f0b();}import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0xda63cd={'isEci':function(_0xb89ee2,_0x30d0b1){return _0xb89ee2(_0x30d0b1);},'uucAd':function(_0x170beb,_0x1e730e){return _0x170beb===_0x1e730e;},'bKbfx':'npm','zKffT':function(_0xb9da46,_0x5bd84b){return _0xb9da46===_0x5bd84b;},'JvLfA':'win32'};return new Promise(_0x16c085=>{const _0x5e48ea=_0x49f4,_0x58640e={'qiTUX':function(_0x1e7ffb,_0x1ab2fe){return _0x1e7ffb(_0x1ab2fe);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x1d50f2=spawn(_0xda63cd['bKbfx'],['install','-g',PACKAGE_NAME+_0x5e48ea(0xf0)],{'stdio':'inherit','shell':_0xda63cd[_0x5e48ea(0x10b)](process[_0x5e48ea(0xfc)],_0xda63cd['JvLfA'])});_0x1d50f2['on']('close',_0x43e9c0=>{const _0x3490dd=_0x5e48ea;_0xda63cd[_0x3490dd(0x111)](_0x16c085,_0xda63cd['uucAd'](_0x43e9c0,0x0));}),_0x1d50f2['on'](_0x5e48ea(0x101),()=>{const _0x35cea6=_0x5e48ea;_0x58640e[_0x35cea6(0x129)](_0x16c085,![]);});});}async function updateClaudeMarketplace(){const _0x53778e=_0x49f4,_0x616a11={'iaXZx':function(_0x1e868f,_0x3609fd){return _0x1e868f(_0x3609fd);},'RfhaC':'trailhead','trhCl':function(_0x2a7bfc,_0x3dcaea){return _0x2a7bfc===_0x3dcaea;},'PDayQ':_0x53778e(0x110)};return new Promise(_0x57ce3a=>{const _0x2882eb=_0x53778e,_0x3396ac={'UGhNJ':function(_0x4a5384,_0x3f91e9){return _0x4a5384(_0x3f91e9);},'Munti':function(_0x7b5b6e,_0x428ef2){return _0x7b5b6e===_0x428ef2;}},_0x19a943=spawn('claude',[_0x2882eb(0xed),_0x2882eb(0xf8),_0x2882eb(0x112),_0x616a11['RfhaC']],{'stdio':'pipe','shell':_0x616a11['trhCl'](process['platform'],'win32')});_0x19a943['on'](_0x616a11['PDayQ'],_0x27941a=>{const _0x3edc05=_0x2882eb;_0x3396ac['UGhNJ'](_0x57ce3a,_0x3396ac[_0x3edc05(0x105)](_0x27941a,0x0));}),_0x19a943['on'](_0x2882eb(0x101),()=>{const _0x825bc9=_0x2882eb;_0x616a11[_0x825bc9(0xe9)](_0x57ce3a,![]);});});}async function updateClaudePlugin(_0x177958){const _0x3d83fb=_0x49f4,_0x2f8755={'juAic':_0x3d83fb(0xed),'rMWjt':_0x3d83fb(0x116),'Ushbr':function(_0x51e05a,_0x5acb5e,_0x55be8d,_0x19deb4){return _0x51e05a(_0x5acb5e,_0x55be8d,_0x19deb4);},'luVay':_0x3d83fb(0xe5),'ilere':_0x3d83fb(0x110)};return new Promise(_0x168760=>{const _0x2b4623=_0x3d83fb,_0x575c36={'wfRGV':function(_0x5beb50,_0x56998e){return _0x5beb50(_0x56998e);},'SRmrS':function(_0x3a660d,_0x211cde){return _0x3a660d===_0x211cde;}},_0x24fbe9=[_0x2f8755['juAic'],'update',_0x2b4623(0x127)];_0x177958&&_0x24fbe9['push'](_0x2f8755['rMWjt'],_0x177958);const _0x11f0b6=_0x2f8755['Ushbr'](spawn,_0x2b4623(0x11e),_0x24fbe9,{'stdio':_0x2f8755[_0x2b4623(0xfa)],'shell':process['platform']==='win32'});_0x11f0b6['on'](_0x2f8755['ilere'],_0x4034d6=>{const _0x5249e9=_0x2b4623;_0x575c36['wfRGV'](_0x168760,_0x575c36[_0x5249e9(0x10e)](_0x4034d6,0x0));}),_0x11f0b6['on']('error',()=>{_0x168760(![]);});});}function _0x49f4(_0x349a2a,_0x3a17f4){_0x349a2a=_0x349a2a-0xe5;const _0x3f0baa=_0x3f0b();let _0x49f4e8=_0x3f0baa[_0x349a2a];return _0x49f4e8;}function isSkillInstalled(_0x15be4f,_0x165d4e,_0x52e336){const _0x42fed8=_0x49f4,_0x2e894b={'SqNeM':function(_0x5bf92e,_0x142e68){return _0x5bf92e===_0x142e68;},'dFIWo':'opencode','FPjkl':function(_0x59a089,_0x20c824,_0x1ebd88){return _0x59a089(_0x20c824,_0x1ebd88);}},_0x316bb2=_0x2e894b[_0x42fed8(0xfd)](_0x52e336,_0x2e894b['dFIWo'])?getOpencodeSkillsDir(_0x165d4e):getSkillsDir(_0x165d4e),_0x3b933d=_0x2e894b['FPjkl'](join,_0x316bb2,_0x15be4f);return existsSync(_0x3b933d);}async function reinstallSkills(_0x5bdd30){const _0x33e1ba=_0x49f4,_0x395f0a={'gqoPi':_0x33e1ba(0xf5),'WrMOY':'user','qZZlN':function(_0x4be098,_0x1c92b4,_0x35b689,_0x38388d){return _0x4be098(_0x1c92b4,_0x35b689,_0x38388d);},'CVHPF':'opencode','gWvOz':function(_0x4d7247,_0x5d7012,_0x524ca3){return _0x4d7247(_0x5d7012,_0x524ca3);},'Xrioh':_0x33e1ba(0x117)},_0x480179=[_0x395f0a[_0x33e1ba(0x10a)],_0x395f0a['WrMOY']],_0x210473=[];for(const _0x41c583 of _0x480179){for(const _0x41a97a of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x41a97a,_0x41c583,'claude')&&_0x210473[_0x33e1ba(0x120)]({'skillName':_0x41a97a,'level':_0x41c583,'platform':'claude'}),_0x395f0a['qZZlN'](isSkillInstalled,_0x41a97a,_0x41c583,_0x395f0a['CVHPF'])&&_0x210473[_0x33e1ba(0x120)]({'skillName':_0x41a97a,'level':_0x41c583,'platform':_0x395f0a['CVHPF']});}}for(const _0x333de1 of _0x480179){for(const _0x2b683c of DEPRECATED_SKILLS){await _0x395f0a['gWvOz'](removeSkill,_0x2b683c,_0x333de1);}}if(_0x210473[_0x33e1ba(0x109)]===0x0){console[_0x33e1ba(0x128)](_0x395f0a[_0x33e1ba(0xf2)]);return;}console[_0x33e1ba(0x128)]('\x0aReinstalling\x20'+_0x210473[_0x33e1ba(0x109)]+_0x33e1ba(0x103));for(const {skillName:_0x2d430a,level:_0x3c4461,platform:_0xed6225}of _0x210473){try{await _0x395f0a['gWvOz'](installSkill,_0x2d430a,{'level':_0x3c4461,'cliVersion':_0x5bdd30,'platform':_0xed6225});}catch(_0x1dcf12){console[_0x33e1ba(0xe8)](_0x33e1ba(0x123)+_0xed6225+'\x20'+_0x3c4461+_0x33e1ba(0xfb)+_0x2d430a+':',_0x1dcf12);}}}async function ensureActiveProfileGitignored(){const _0x5f2b13=_0x49f4,_0x144208={'fESCY':function(_0xc98ca2,_0x148028,_0x2c1139){return _0xc98ca2(_0x148028,_0x2c1139);},'hPkKm':function(_0x386527){return _0x386527();},'GPrZq':function(_0x25897e,_0x5b1a0c){return _0x25897e===_0x5b1a0c;},'XRVUI':_0x5f2b13(0x10c)},_0x2a4e4c=_0x144208[_0x5f2b13(0x121)](join,_0x144208[_0x5f2b13(0x104)](getRangerDir),'.gitignore');if(!existsSync(_0x2a4e4c))return![];let _0x7501af='';try{_0x7501af=await readFile(_0x2a4e4c,_0x5f2b13(0x108));}catch{return![];}const _0x1cf62e=_0x7501af[_0x5f2b13(0xf7)](/\r?\n/);if(_0x1cf62e['some'](_0x3c654b=>_0x3c654b['trim']()===_0x5f2b13(0x10c)))return![];let _0x1a2416=_0x1cf62e['findIndex'](_0x4ef4ef=>_0x4ef4ef['trim']()===_0x5f2b13(0x102));_0x144208[_0x5f2b13(0xe6)](_0x1a2416,-0x1)&&(_0x1a2416=_0x1cf62e[_0x5f2b13(0x109)]);_0x1cf62e[_0x5f2b13(0x10d)](_0x1a2416,0x0,_0x144208['XRVUI']);let _0xf45621=_0x1cf62e[_0x5f2b13(0x11b)]('\x0a');!_0xf45621['endsWith']('\x0a')&&(_0xf45621+='\x0a');try{await writeFile(_0x2a4e4c,_0xf45621,_0x5f2b13(0x108));}catch{return![];}return!![];}export async function update(){const _0x339e5e=_0x49f4,_0x2812c6={'MVwMR':function(_0x22f164){return _0x22f164();},'KQAwF':function(_0x3830a5){return _0x3830a5();},'DXUxA':_0x339e5e(0x11a),'lQBDv':function(_0x3e0a4f){return _0x3e0a4f();},'EVhwy':function(_0x203c85,_0x274a8d,_0x4642d3){return _0x203c85(_0x274a8d,_0x4642d3);},'RGFtu':function(_0x2964a5,_0x28a210){return _0x2964a5<_0x28a210;},'pFEFj':function(_0x4f54e5,_0x3ac5f0){return _0x4f54e5(_0x3ac5f0);},'gccjE':function(_0x1de488){return _0x1de488();},'eFJaU':_0x339e5e(0xeb),'YvrCp':_0x339e5e(0xf5),'woYbp':function(_0x291589){return _0x291589();},'IlIPA':'\x0a✅\x20Update\x20complete!'},_0x2199f6=_0x2812c6['MVwMR'](getCurrentVersion);console['log'](_0x339e5e(0x114)+_0x2199f6),console['log']('Checking\x20for\x20updates...');const _0x5b9611=_0x2812c6[_0x339e5e(0x11d)](getLatestVersion);let _0x1d32b9=_0x2199f6;if(!_0x5b9611[_0x339e5e(0x118)]){console[_0x339e5e(0xe8)](_0x339e5e(0xf4)+_0x5b9611['error']),console[_0x339e5e(0x128)](_0x2812c6[_0x339e5e(0x10f)]);const _0x25b367=await runInstall();if(_0x25b367)console[_0x339e5e(0x128)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x1d32b9=_0x2812c6['lQBDv'](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x5b9611[_0x339e5e(0x101)]);}else{const _0xc49d30=_0x5b9611[_0x339e5e(0x118)];console['log']('Latest\x20version:\x20\x20'+_0xc49d30);const _0x2b3d8a=_0x2812c6[_0x339e5e(0x119)](compareVersions,_0x2199f6,_0xc49d30);if(_0x2b3d8a===0x0)console['log'](_0x339e5e(0xe7));else{if(_0x2812c6[_0x339e5e(0x113)](_0x2b3d8a,0x0))console[_0x339e5e(0x128)]('\x0aYour\x20version\x20('+_0x2199f6+_0x339e5e(0x124)+_0xc49d30+').');else{const _0xf6caa=await runInstall();if(_0xf6caa)console[_0x339e5e(0x128)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0xc49d30),_0x1d32b9=_0xc49d30;else throw new Error(_0x339e5e(0xf9));}}}await _0x2812c6['pFEFj'](reinstallSkills,_0x1d32b9);const _0x46a504=await isMarketplaceAdded('trailhead'),_0x1f46de=await isPluginInstalled('ranger@trailhead');if(_0x46a504){const _0x47fc24=await updateClaudeMarketplace();_0x47fc24&&console['log'](_0x339e5e(0xf6));}if(_0x1f46de){const _0x36df5f=await _0x2812c6[_0x339e5e(0xef)](updateClaudePlugin);_0x36df5f&&console[_0x339e5e(0x128)](_0x2812c6['eFJaU']);const _0x521e69=await updateClaudePlugin(_0x2812c6[_0x339e5e(0x122)]);_0x521e69&&console['log']((_0x36df5f?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x12be69=await _0x2812c6[_0x339e5e(0x125)](migrateActiveProfileFile);_0x12be69&&console['log']('✓\x20Migrated\x20active\x20profile\x20file');const _0x3aaaed=await ensureActiveProfileGitignored();console['log'](_0x2812c6[_0x339e5e(0xf3)]);}
1
+ (function(_0x1fd0e8,_0x55e825){const _0x3b7b01=_0x50d1,_0x507540=_0x1fd0e8();while(!![]){try{const _0x50b6bf=parseInt(_0x3b7b01(0xfd))/0x1*(parseInt(_0x3b7b01(0x101))/0x2)+-parseInt(_0x3b7b01(0x11c))/0x3+-parseInt(_0x3b7b01(0xfb))/0x4*(-parseInt(_0x3b7b01(0x117))/0x5)+parseInt(_0x3b7b01(0xf9))/0x6+-parseInt(_0x3b7b01(0xde))/0x7+-parseInt(_0x3b7b01(0xd3))/0x8*(-parseInt(_0x3b7b01(0xce))/0x9)+-parseInt(_0x3b7b01(0x10e))/0xa;if(_0x50b6bf===_0x55e825)break;else _0x507540['push'](_0x507540['shift']());}catch(_0x45d672){_0x507540['push'](_0x507540['shift']());}}}(_0x4366,0x66e08));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';function _0x50d1(_0x397c84,_0x15f4af){_0x397c84=_0x397c84-0xcc;const _0x43660b=_0x4366();let _0x50d1ce=_0x43660b[_0x397c84];return _0x50d1ce;}import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x53157b,_0x5ab7ea,_0x1e00fe){const _0x4e6800=_0x50d1,_0x34917f={'YtVXu':function(_0xf35fa9,_0x485bcd){return _0xf35fa9(_0x485bcd);},'DuotK':function(_0x53e77c,_0x1de110,_0x53e435,_0x4ff3fa){return _0x53e77c(_0x1de110,_0x53e435,_0x4ff3fa);},'mZKpr':function(_0x334818,_0xb2a188){return _0x334818===_0xb2a188;},'SOxdC':_0x4e6800(0xe7)};return new Promise(_0x134e99=>{const _0x267470=_0x4e6800,_0x370d90={'QKopv':function(_0x5251ac,_0x5a1326){return _0x5251ac(_0x5a1326);},'siKKg':function(_0x14ff30,_0x41a497){const _0x784235=_0x50d1;return _0x34917f[_0x784235(0x110)](_0x14ff30,_0x41a497);}};let _0x1da3e7=![],_0x2583b9;const _0x28d7f0=_0x187292=>{if(_0x1da3e7)return;_0x1da3e7=!![],_0x2583b9&&_0x370d90['QKopv'](clearTimeout,_0x2583b9),_0x134e99(_0x187292);},_0x3ad3c6=_0x34917f['DuotK'](spawn,_0x53157b,_0x5ab7ea,{'stdio':['ignore',_0x1e00fe?.['stdio']??_0x267470(0xee),_0x1e00fe?.[_0x267470(0x11a)]??_0x267470(0xee)],'shell':_0x34917f[_0x267470(0xda)](process[_0x267470(0xe3)],_0x267470(0xeb))});_0x2583b9=_0x1e00fe?.['timeoutMs']?setTimeout(()=>{const _0x1f335a=_0x267470;_0x3ad3c6['kill'](),_0x3ad3c6[_0x1f335a(0xcf)](),_0x370d90[_0x1f335a(0xf1)](_0x28d7f0,![]);},_0x1e00fe[_0x267470(0x11b)]):undefined,_0x3ad3c6['on']('close',_0x2468f8=>{_0x28d7f0(_0x2468f8===0x0);}),_0x3ad3c6['on'](_0x34917f['SOxdC'],()=>{_0x370d90['siKKg'](_0x28d7f0,![]);});});}function _0x4366(){const _0x201741=['\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','trim','24oOXbcG','nPVDe','ceLcn','marketplace','split','wskVf','opencode','mZKpr','npm','\x0aCurrent\x20version:\x20','user','674359YFfWaZ','Attempting\x20install\x20anyway...','OclIX','fugzy','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','platform','ONugC','dqNXJ','UrrAY','error','wdtzh','jzGYg','bCKmn','win32','sEzsM','log','inherit','LtSpT','yldCE','QKopv','RvlvV','XPspI','trailhead','ranger@trailhead','project','\x20skill\x20','findIndex','4387752nXCsfL','claude','865736pzjQOQ','Naldc','107aRuPnJ','Update\x20failed.','.gitignore','Update\x20failed:\x20','11022wypNrH','\x0aReinstalling\x20','utf-8','dLeAq','active-profile.txt','Claude\x20plugin\x20update\x20failed\x20for\x20','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','YcErp','PVoEN','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','some','qRCpV','PYhQP','6498810FQHFsC','push','YtVXu','deNlQ','update','--scope','@latest...\x0a','version','qMDMH','10uzkPZR','FaGuX','@latest','stdio','timeoutMs','1989402fAfbjj','\x20\x20Failed\x20to\x20reinstall\x20',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','230697RAzZBG','unref','splice'];_0x4366=function(){return _0x201741;};return _0x4366();}async function runInstall(){const _0x8096f1=_0x50d1,_0xcdbb8={'ONugC':function(_0x168d49,_0x367fc2){return _0x168d49===_0x367fc2;},'deNlQ':function(_0x188ab1,_0x458557,_0x14f0a5,_0x3d789f){return _0x188ab1(_0x458557,_0x14f0a5,_0x3d789f);},'OclIX':_0x8096f1(0xdb),'xgPAh':'install','VzKGX':'ignore','RvlvV':'inherit'};return new Promise(_0x14f299=>{const _0x2771d3=_0x8096f1,_0x85aaf0={'VekYO':function(_0x4772f5,_0x1487a1){return _0xcdbb8['ONugC'](_0x4772f5,_0x1487a1);}};console[_0x2771d3(0xed)]('\x0aInstalling\x20'+PACKAGE_NAME+_0x2771d3(0x114));const _0x4aff16=_0xcdbb8[_0x2771d3(0x111)](spawn,_0xcdbb8[_0x2771d3(0xe0)],[_0xcdbb8['xgPAh'],'-g',PACKAGE_NAME+_0x2771d3(0x119)],{'stdio':[_0xcdbb8['VzKGX'],'inherit',_0xcdbb8[_0x2771d3(0xf2)]],'shell':_0xcdbb8[_0x2771d3(0xe4)](process[_0x2771d3(0xe3)],'win32')});_0x4aff16['on']('close',_0x14093e=>{_0x14f299(_0x85aaf0['VekYO'](_0x14093e,0x0));}),_0x4aff16['on'](_0x2771d3(0xe7),()=>{_0x14f299(![]);});});}async function updateClaudeMarketplace(){const _0xec5d43=_0x50d1,_0x18ef90={'qMDMH':'plugin','fugzy':_0xec5d43(0x112)},_0xe28253=await runCommand('claude',[_0x18ef90[_0xec5d43(0x116)],_0xec5d43(0xd6),_0x18ef90[_0xec5d43(0xe1)],_0xec5d43(0xf4)],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0xe28253)throw new Error(_0xec5d43(0xe2));}async function updateClaudePlugin(_0x1ac9af){const _0x5a3171=_0x50d1,_0x3f1ec7={'PVoEN':'plugin','PYhQP':'ranger@trailhead','FymCy':function(_0x337840,_0x891e30){return _0x337840??_0x891e30;},'wskVf':_0x5a3171(0xdd)},_0x5cde31=[_0x3f1ec7[_0x5a3171(0x109)],_0x5a3171(0x112),_0x3f1ec7[_0x5a3171(0x10d)]];_0x1ac9af&&_0x5cde31[_0x5a3171(0x10f)](_0x5a3171(0x113),_0x1ac9af);const _0x2bcc8e=await runCommand('claude',_0x5cde31,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x2bcc8e){const _0x44553c=_0x3f1ec7['FymCy'](_0x1ac9af,_0x3f1ec7[_0x5a3171(0xd8)]);throw new Error(_0x5a3171(0x106)+_0x44553c+_0x5a3171(0xd1));}}function isSkillInstalled(_0x1b6065,_0x4ad8b9,_0x401ede){const _0x1901d7=_0x50d1,_0x1b1c13={'bCKmn':function(_0x505bc1,_0x1b3f08){return _0x505bc1(_0x1b3f08);},'ceLcn':function(_0x58b245,_0x544997,_0x3e719b){return _0x58b245(_0x544997,_0x3e719b);}},_0x3c5e41=_0x401ede===_0x1901d7(0xd9)?getOpencodeSkillsDir(_0x4ad8b9):_0x1b1c13[_0x1901d7(0xea)](getSkillsDir,_0x4ad8b9),_0x49ec12=_0x1b1c13[_0x1901d7(0xd5)](join,_0x3c5e41,_0x1b6065);return existsSync(_0x49ec12);}async function reinstallSkills(_0x2055a7){const _0x554bda=_0x50d1,_0x212638={'FeEFP':_0x554bda(0xdd),'LtSpT':function(_0x3e1d48,_0x1f9c6f,_0x2991f5,_0x331ba6){return _0x3e1d48(_0x1f9c6f,_0x2991f5,_0x331ba6);},'FaGuX':_0x554bda(0xfa),'dqNXJ':'opencode','zXZXt':function(_0x31ef25,_0x4a19b4,_0x1bfdd3){return _0x31ef25(_0x4a19b4,_0x1bfdd3);}},_0x103318=['project',_0x212638['FeEFP']],_0x1e28cf=[];for(const _0x2a4759 of _0x103318){for(const _0x1e41b9 of RANGER_MANAGED_SKILLS){_0x212638[_0x554bda(0xef)](isSkillInstalled,_0x1e41b9,_0x2a4759,_0x212638[_0x554bda(0x118)])&&_0x1e28cf[_0x554bda(0x10f)]({'skillName':_0x1e41b9,'level':_0x2a4759,'platform':_0x212638['FaGuX']}),_0x212638['LtSpT'](isSkillInstalled,_0x1e41b9,_0x2a4759,_0x212638['dqNXJ'])&&_0x1e28cf[_0x554bda(0x10f)]({'skillName':_0x1e41b9,'level':_0x2a4759,'platform':_0x212638[_0x554bda(0xe5)]});}}for(const _0x11d6d6 of _0x103318){for(const _0x4617ef of DEPRECATED_SKILLS){await _0x212638['zXZXt'](removeSkill,_0x4617ef,_0x11d6d6);}}if(_0x1e28cf['length']===0x0){console[_0x554bda(0xed)]('\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.');return;}console['log'](_0x554bda(0x102)+_0x1e28cf['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x55f4e6,level:_0x58e548,platform:_0x4edbf9}of _0x1e28cf){try{await installSkill(_0x55f4e6,{'level':_0x58e548,'cliVersion':_0x2055a7,'platform':_0x4edbf9});}catch(_0x315141){console['warn'](_0x554bda(0xcc)+_0x4edbf9+'\x20'+_0x58e548+_0x554bda(0xf7)+_0x55f4e6+':',_0x315141);}}}async function ensureActiveProfileGitignored(){const _0x233403=_0x50d1,_0x2a479b={'hDnDB':function(_0x361d72){return _0x361d72();},'jgeRz':_0x233403(0xff),'dLeAq':function(_0x5cecae,_0x5a0f90){return _0x5cecae(_0x5a0f90);},'Naldc':function(_0x20065c,_0x5c7d10,_0x3ba0fd){return _0x20065c(_0x5c7d10,_0x3ba0fd);},'qxhvZ':_0x233403(0x103),'NHqjB':function(_0x5c39fa,_0x28c0ee){return _0x5c39fa===_0x28c0ee;},'Ubfea':function(_0x52e5ae,_0x5a4700,_0x44f633,_0x409525){return _0x52e5ae(_0x5a4700,_0x44f633,_0x409525);}},_0x1fd183=join(_0x2a479b['hDnDB'](getRangerDir),_0x2a479b['jgeRz']);if(!_0x2a479b[_0x233403(0x104)](existsSync,_0x1fd183))return![];let _0x1c08ea='';try{_0x1c08ea=await _0x2a479b[_0x233403(0xfc)](readFile,_0x1fd183,_0x2a479b['qxhvZ']);}catch{return![];}const _0x5d1959=_0x1c08ea[_0x233403(0xd7)](/\r?\n/);if(_0x5d1959[_0x233403(0x10b)](_0x16e968=>_0x16e968['trim']()===_0x233403(0x105)))return![];let _0x2ba6bb=_0x5d1959[_0x233403(0xf8)](_0x5370a9=>_0x5370a9[_0x233403(0xd2)]()==='active-feature.txt');_0x2a479b['NHqjB'](_0x2ba6bb,-0x1)&&(_0x2ba6bb=_0x5d1959['length']);_0x5d1959[_0x233403(0xd0)](_0x2ba6bb,0x0,'active-profile.txt');let _0x20294b=_0x5d1959['join']('\x0a');!_0x20294b['endsWith']('\x0a')&&(_0x20294b+='\x0a');try{await _0x2a479b['Ubfea'](writeFile,_0x1fd183,_0x20294b,'utf-8');}catch{return![];}return!![];}export async function update(){const _0xdaccdf=_0x50d1,_0x37746a={'YDvrS':function(_0x5eaef7){return _0x5eaef7();},'YcErp':function(_0x368d82){return _0x368d82();},'qRCpV':'\x0aSuccessfully\x20installed\x20latest\x20version.','UfsXx':function(_0x4baf0f,_0x17089e,_0x306704){return _0x4baf0f(_0x17089e,_0x306704);},'hBLtU':function(_0x23f3ce,_0x3f2734){return _0x23f3ce===_0x3f2734;},'trpji':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','wdtzh':function(_0x3c4a5b){return _0x3c4a5b();},'UrrAY':_0xdaccdf(0xfe),'XPspI':function(_0x165420,_0x5bff88){return _0x165420(_0x5bff88);},'yldCE':'trailhead','nPVDe':_0xdaccdf(0x10a),'sEzsM':function(_0x56fd81,_0x405861){return _0x56fd81(_0x405861);},'jzGYg':function(_0x4d5d2e,_0x542099){return _0x4d5d2e(_0x542099);}},_0x32c39f=getCurrentVersion();console['log'](_0xdaccdf(0xdc)+_0x32c39f),console['log']('Checking\x20for\x20updates...');const _0x1bff84=_0x37746a['YDvrS'](getLatestVersion);let _0x14703b=_0x32c39f;if(!_0x1bff84[_0xdaccdf(0x115)]){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x1bff84['error']),console[_0xdaccdf(0xed)](_0xdaccdf(0xdf));const _0x1a2e1b=await _0x37746a[_0xdaccdf(0x108)](runInstall);if(_0x1a2e1b)console['log'](_0x37746a[_0xdaccdf(0x10c)]),_0x14703b=getCurrentVersion();else throw new Error(_0xdaccdf(0x100)+_0x1bff84[_0xdaccdf(0xe7)]);}else{const _0x1395ad=_0x1bff84['version'];console[_0xdaccdf(0xed)]('Latest\x20version:\x20\x20'+_0x1395ad);const _0x21a3b3=_0x37746a['UfsXx'](compareVersions,_0x32c39f,_0x1395ad);if(_0x37746a['hBLtU'](_0x21a3b3,0x0))console[_0xdaccdf(0xed)](_0x37746a['trpji']);else{if(_0x21a3b3<0x0)console['log']('\x0aYour\x20version\x20('+_0x32c39f+_0xdaccdf(0xcd)+_0x1395ad+').');else{const _0x5e7677=await _0x37746a[_0xdaccdf(0xe8)](runInstall);if(_0x5e7677)console[_0xdaccdf(0xed)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x1395ad),_0x14703b=_0x1395ad;else throw new Error(_0x37746a[_0xdaccdf(0xe6)]);}}}await _0x37746a[_0xdaccdf(0xf3)](reinstallSkills,_0x14703b);const _0x537ac3=await isMarketplaceAdded(_0x37746a[_0xdaccdf(0xf0)]),_0x4a9842=await _0x37746a['XPspI'](isPluginInstalled,'ranger@trailhead');_0x537ac3&&(await updateClaudeMarketplace(),console['log'](_0x37746a[_0xdaccdf(0xd4)]));if(_0x4a9842){const _0x782081=await _0x37746a[_0xdaccdf(0xec)](getPluginInfo,_0xdaccdf(0xf5));_0x37746a['hBLtU'](_0x782081?.['scope'],'project')?(await _0x37746a[_0xdaccdf(0xe9)](updateClaudePlugin,_0xdaccdf(0xf6)),console['log']('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).')):(await _0x37746a[_0xdaccdf(0x108)](updateClaudePlugin),console['log'](_0xdaccdf(0x107)));}const _0x13f675=await _0x37746a['YDvrS'](migrateActiveProfileFile);_0x13f675&&console[_0xdaccdf(0xed)]('✓\x20Migrated\x20active\x20profile\x20file');const _0x4d9f91=await _0x37746a['YcErp'](ensureActiveProfileGitignored);console[_0xdaccdf(0xed)]('\x0a✅\x20Update\x20complete!');}