@ranger-testing/ranger-cli 2.5.4-alpha.57338f5-12 → 2.5.4-alpha.5f9facb-17

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 (81) hide show
  1. package/README.md +36 -14
  2. package/build/cli.js +1 -1
  3. package/build/commands/addEnv.js +1 -1
  4. package/build/commands/authEncrypt.js +1 -1
  5. package/build/commands/clean.js +1 -1
  6. package/build/commands/config.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/opencodeConfig.js +1 -1
  58. package/build/commands/utils/playwrightCli.js +1 -1
  59. package/build/commands/utils/profileMessages.js +1 -1
  60. package/build/commands/utils/profileSetupBanner.js +1 -1
  61. package/build/commands/utils/projectsConfig.js +1 -1
  62. package/build/commands/utils/rangerConfig.js +1 -1
  63. package/build/commands/utils/rangerRoot.js +1 -1
  64. package/build/commands/utils/resolveProfileContext.js +1 -1
  65. package/build/commands/utils/resolveProfileUrl.js +1 -1
  66. package/build/commands/utils/retry.js +1 -1
  67. package/build/commands/utils/sessionCache.js +1 -1
  68. package/build/commands/utils/settings.js +1 -1
  69. package/build/commands/utils/skillContent.js +1 -1
  70. package/build/commands/utils/skills.js +1 -1
  71. package/build/commands/utils/stitchWebmFiles.js +1 -1
  72. package/build/commands/utils/telemetry.js +1 -1
  73. package/build/commands/utils/tokenRefresh.js +1 -1
  74. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  75. package/build/commands/utils/userApi.js +1 -1
  76. package/build/commands/utils/version.js +1 -1
  77. package/build/commands/verifyFeature.js +1 -1
  78. package/build/commands/verifyFeatureCli.js +1 -1
  79. package/build/skills/ranger/SKILL.md +15 -5
  80. package/build/skills/ranger/verify.md +15 -3
  81. package/package.json +3 -2
@@ -1 +1 @@
1
- (function(_0x33f85d,_0x50efd1){const _0x2b80d9=_0x304e,_0x346106=_0x33f85d();while(!![]){try{const _0x520538=-parseInt(_0x2b80d9(0x16e))/0x1*(-parseInt(_0x2b80d9(0x165))/0x2)+parseInt(_0x2b80d9(0x141))/0x3+-parseInt(_0x2b80d9(0x18a))/0x4*(-parseInt(_0x2b80d9(0x158))/0x5)+parseInt(_0x2b80d9(0x18d))/0x6*(-parseInt(_0x2b80d9(0x131))/0x7)+parseInt(_0x2b80d9(0x180))/0x8*(parseInt(_0x2b80d9(0x17b))/0x9)+-parseInt(_0x2b80d9(0x15e))/0xa*(parseInt(_0x2b80d9(0x199))/0xb)+parseInt(_0x2b80d9(0x138))/0xc;if(_0x520538===_0x50efd1)break;else _0x346106['push'](_0x346106['shift']());}catch(_0x1a5808){_0x346106['push'](_0x346106['shift']());}}}(_0x46e4,0xa83c2));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x304e(_0x47eaac,_0x33c2df){_0x47eaac=_0x47eaac-0x131;const _0x46e489=_0x46e4();let _0x304edd=_0x46e489[_0x47eaac];return _0x304edd;}import{existsSync}from'fs';import _0x26d8dc from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x270d25){const _0x4f7ac8=_0x304e,_0x4c7f33={'gmyDy':function(_0x3fc6e6,_0x381562,_0x1b0526){return _0x3fc6e6(_0x381562,_0x1b0526);},'BDXUh':'manual','Ckeup':function(_0x472e79,_0x82a2d1){return _0x472e79(_0x82a2d1);},'OsRIc':function(_0x353355,_0x53d8b1){return _0x353355<_0x53d8b1;},'PbCDt':_0x4f7ac8(0x147),'cJAdL':_0x4f7ac8(0x16d),'VkTkX':'fetch\x20failed'};try{const _0x37fb6b=new AbortController(),_0x45cede=_0x4c7f33[_0x4f7ac8(0x14f)](setTimeout,()=>_0x37fb6b[_0x4f7ac8(0x14c)](),0x1388),_0x1640c6={'method':'HEAD','signal':_0x37fb6b[_0x4f7ac8(0x167)],'redirect':_0x4c7f33['BDXUh']};/^https:\/\/localhost(:\d+)?/i[_0x4f7ac8(0x194)](_0x270d25)&&(process[_0x4f7ac8(0x164)][_0x4f7ac8(0x142)]='0');const _0x15b392=await fetch(_0x270d25,_0x1640c6);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],_0x4c7f33['Ckeup'](clearTimeout,_0x45cede);if(_0x4c7f33['OsRIc'](_0x15b392[_0x4f7ac8(0x16b)],0x190))return{'ok':!![]};return{'ok':![],'error':_0x4f7ac8(0x16f)+_0x15b392[_0x4f7ac8(0x16b)]};}catch(_0x31c020){delete process[_0x4f7ac8(0x164)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x250162=_0x31c020,_0x2a389c=_0x250162['message']||_0x4c7f33['Ckeup'](String,_0x31c020),_0x399570=_0x2a389c[_0x4f7ac8(0x159)](_0x4c7f33[_0x4f7ac8(0x13c)])||_0x250162[_0x4f7ac8(0x134)]===_0x4c7f33['cJAdL']||_0x2a389c['includes'](_0x4c7f33[_0x4f7ac8(0x13f)]);return{'ok':![],'error':_0x2a389c,'isProtocolError':_0x399570};}}async function sweepOrphanLocalProfile(_0x238142,_0x111307,_0xd2b534){const _0x4a8250=_0x304e,_0x56900d={'Vezjn':function(_0x18e2ae,_0x5adc42,_0x5d455e){return _0x18e2ae(_0x5adc42,_0x5d455e);},'FTMRu':function(_0x185d4b,_0x470b08){return _0x185d4b(_0x470b08);},'mvsKM':function(_0x2939d9,_0x219403,_0x1a8541){return _0x2939d9(_0x219403,_0x1a8541);}},_0x1e1900=join(_0x111307,_0x4a8250(0x15c)),_0x4962b1=_0x56900d[_0x4a8250(0x15f)](join,_0x1e1900,_0x238142);existsSync(_0x4962b1)&&(_0xd2b534&&await _0x56900d[_0x4a8250(0x149)](isPathGitTracked,_0x4962b1)?console[_0x4a8250(0x18b)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x4962b1+_0x4a8250(0x13b)):(await rm(_0x4962b1,{'recursive':!![],'force':!![]}),console[_0x4a8250(0x18b)]('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x4962b1)));if(existsSync(_0x1e1900)){let _0x2406cb=[];try{_0x2406cb=await readdir(_0x1e1900);}catch{return;}const _0x22d507=_0x4a8250(0x176)+_0x238142+'-';for(const _0x32dd1d of _0x2406cb){if(!_0x32dd1d['startsWith'](_0x22d507))continue;const _0x40b7b0=_0x56900d['Vezjn'](join,_0x1e1900,_0x32dd1d);await _0x56900d['mvsKM'](rm,_0x40b7b0,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x40b7b0);}}}async function sweepOrphansBestEffort(_0x4ee9f9){const _0x119af0=_0x304e,_0x18db0d={'IyRiR':function(_0x234df8,_0x2e7079,_0x1f4baf,_0x39616e){return _0x234df8(_0x2e7079,_0x1f4baf,_0x39616e);},'HoqsH':function(_0xd8fa39){return _0xd8fa39();},'fEnPW':function(_0x48e1ea,_0x421826){return _0x48e1ea!==_0x421826;},'RQcYJ':function(_0x5b966d,_0x30e697){return _0x5b966d(_0x30e697);}};try{await _0x18db0d[_0x119af0(0x19c)](sweepOrphanLocalProfile,_0x4ee9f9,_0x18db0d[_0x119af0(0x19f)](getRangerHomeDir),![]);const _0x22d2a9=getRangerDir();_0x18db0d[_0x119af0(0x152)](_0x22d2a9,getRangerHomeDir())&&await sweepOrphanLocalProfile(_0x4ee9f9,_0x22d2a9,!![]);}catch(_0x28043c){console[_0x119af0(0x18b)](_0x119af0(0x193)+(_0x28043c instanceof Error?_0x28043c[_0x119af0(0x163)]:_0x18db0d['RQcYJ'](String,_0x28043c))+').');}}async function markActive(_0x5edf18){const _0xc4d736=_0x304e,_0x22c985={'tDgOB':function(_0x1f15ac,_0x3bc129){return _0x1f15ac(_0x3bc129);}};try{await _0x22c985['tDgOB'](writeActiveProfileName,_0x5edf18),console['log'](_0xc4d736(0x171)+_0x5edf18);}catch{console[_0xc4d736(0x18b)](_0xc4d736(0x151));}}function _0x46e4(){const _0x1caf39=['origin','1285290YRQRvD','NODE_TLS_REJECT_UNAUTHORIZED','keys','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','skipAuth','\x20\x20\x20\x20\x20\x20\x20\x20to\x20materialize\x20a\x20session\x20via\x20server-side\x20login.','Invalid\x20URL','Use\x20the\x20new\x20flow:\x0a','FTMRu','FyEDB','retry','abort','\x27\x20created,\x20linked\x20to\x20env\x20\x27','profile.add.autoRouted','gmyDy','error','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','fEnPW','agWlS','PPaTS','no_auth_config','some','force','5WryGlH','includes','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','HiQft','local','setupHeader','717310SzXBWv','Vezjn','GiYsv','MrqRx','cdpEndpoint','message','env','2DIgNsm','cwd','signal','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','MRMPr','url','status','stdout','TypeError','1239258yyOfRQ','HTTP\x20','xceYh','\x20\x20Set\x20active\x20profile:\x20','Could\x20not\x20reach\x20','length','setupHeaders','baseUrl','.tmp-','ISgDl','wlmOy','exit','fZHGO','45cqiCLY','trim','gYoSZ','\x0a\x20\x20Could\x20not\x20reach\x20','oEEwe','1204712koXsfk','eiRYb','use_suggestion','indexOf','list','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x0a\x20\x20This\x20org\x20has\x20no\x20cloud-profile\x20auth\x20config\x20configured.\x20Ask\x20an\x20admin\x20to\x20set\x20one\x20up,\x20or\x20pass\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session.','http://localhost:3000','yes','Enter\x20a\x20different\x20URL','216508hHjJWw','log','aiYbg','47106tAiiza','✓\x20Cloud\x20profile\x20\x27','vjwrv','See:\x20docs/feature/cloud-profiles-old-vs-new-structure.md','prompt','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','test','hbiVD','continue','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','trackPhaseEnd','187nXkOAO','\x27.\x0a','JPuPU','IyRiR','join','isTTY','HoqsH','profile.add.autoRouteSkipped','saveToCloud','WdBwK','623ouPfeB','DrOlz','input','name','isElectron','Found\x20auth\x20environment\x20\x27','slice','1589952AYmvtF','KTqri','\x27\x20created\x20(CDP).','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','PbCDt','\x22:\x20','user_declined','VkTkX'];_0x46e4=function(){return _0x1caf39;};return _0x46e4();}async function tryAutoRouteCloudProfile(_0x47dd21,_0x242d5c,_0x4fa38a,_0x12143d,_0x28b3a0){const _0x588383=_0x304e,_0x5894eb={'oEEwe':function(_0x1fb115,_0x103cfd){return _0x1fb115===_0x103cfd;},'aiYbg':function(_0x2ccc5d,_0x89d4e0){return _0x2ccc5d instanceof _0x89d4e0;},'wlmOy':'profile.add.autoRouteSkipped','gYoSZ':_0x588383(0x155),'JRHfu':function(_0xf9d91f,_0x461783,_0x4ba5a7){return _0xf9d91f(_0x461783,_0x4ba5a7);},'fZHGO':'\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','agWlS':function(_0x47c3e9,_0x3bc5c4,_0x79fffc,_0x505476){return _0x47c3e9(_0x3bc5c4,_0x79fffc,_0x505476);},'MRMPr':function(_0x196965,_0x441685){return _0x196965 instanceof _0x441685;}};let _0x18e853;try{_0x18e853=await fetchAuthConfig();}catch(_0x32aff8){return _0x28b3a0?.[_0x588383(0x198)]('profile.add.autoRouteSkipped',{'reason':'no_auth_config','profileName':_0x47dd21}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x5894eb[_0x588383(0x18c)](_0x32aff8,Error)?_0x32aff8[_0x588383(0x163)]:String(_0x32aff8))),![];}if(!_0x18e853||!_0x18e853['environments']||Object[_0x588383(0x143)](_0x18e853['environments'])['length']===0x0)return _0x28b3a0?.['trackPhaseEnd'](_0x5894eb[_0x588383(0x178)],{'reason':_0x5894eb[_0x588383(0x17d)],'profileName':_0x47dd21}),console['error'](_0x588383(0x186)),![];const _0x2613a6=_0x5894eb['JRHfu'](matchAuthEnvironment,_0x242d5c,_0x18e853);if(!_0x2613a6)return _0x28b3a0?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':'no_match','profileName':_0x47dd21}),console[_0x588383(0x150)]('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x242d5c+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x18e853['environments'])['join'](',\x20')+'.'),![];const _0x50bc6d=_0x18e853['environments'][_0x2613a6],_0x47bab1=_0x50bc6d?.['domains']??[];if(_0x12143d&&!_0x4fa38a[_0x588383(0x188)]){const {saveToCloud:_0x1be636}=await _0x26d8dc[_0x588383(0x191)]([{'type':'confirm','name':_0x588383(0x1a1),'message':_0x588383(0x136)+_0x2613a6+'\x27\x20matching\x20'+_0x242d5c+'\x0a\x20\x20(domains:\x20'+_0x47bab1[_0x588383(0x19d)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x47dd21+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x1be636)return _0x28b3a0?.[_0x588383(0x198)](_0x588383(0x1a0),{'reason':_0x588383(0x13e),'profileName':_0x47dd21}),console[_0x588383(0x150)](_0x5894eb[_0x588383(0x17a)]),![];}const _0x470cc5=_0x47bab1[_0x588383(0x156)](_0x498cfb=>{const _0x8ef8ee=_0x588383;try{return _0x5894eb[_0x8ef8ee(0x17f)](new URL(_0x498cfb)['origin'],new URL(_0x242d5c)[_0x8ef8ee(0x140)]);}catch{return![];}}),_0x4f2434={};!_0x470cc5&&(_0x4f2434[_0x588383(0x175)]=_0x242d5c);try{await _0x5894eb[_0x588383(0x153)](createCloudProfile,_0x47dd21,_0x2613a6,{'settings':_0x4f2434});}catch(_0x54bf89){if(_0x5894eb[_0x588383(0x169)](_0x54bf89,ApiError)&&_0x54bf89[_0x588383(0x16b)]===0x199){console['error']('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x47dd21+_0x588383(0x168));throw _0x54bf89;}throw _0x54bf89;}return console[_0x588383(0x18b)]('✓\x20Cloud\x20profile\x20\x27'+_0x47dd21+_0x588383(0x14d)+_0x2613a6+_0x588383(0x19a)+('\x20\x20Next:\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--profile\x20'+_0x47dd21)),await sweepOrphansBestEffort(_0x47dd21),_0x28b3a0?.['trackPhaseEnd'](_0x588383(0x14e),{'envKey':_0x2613a6,'profileName':_0x47dd21}),!![];}async function createUnconfiguredCloudProfile(_0x58e2c8,_0x37a734){const _0x2bdb82=_0x304e,_0x1b2838={'MrqRx':function(_0x92185,_0x1ab30b){return _0x92185 instanceof _0x1ab30b;}};try{await createCloudProfile(_0x58e2c8,undefined,{'settings':_0x37a734});}catch(_0x249780){_0x1b2838[_0x2bdb82(0x161)](_0x249780,ApiError)&&_0x249780['status']===0x199&&console['error'](_0x2bdb82(0x197)+_0x58e2c8+_0x2bdb82(0x168));throw _0x249780;}}export async function addEnv(_0x2e7b27,_0x1caa16={},_0x4e0370){const _0x37b2e6=_0x304e,_0x4578ef={'GiYsv':function(_0x5651ae,_0x4a3826){return _0x5651ae+_0x4a3826;},'uGaNY':function(_0x24538b,_0x3656f7){return _0x24538b+_0x3656f7;},'KTqri':_0x37b2e6(0x190),'BBFQx':function(_0x2ba731,_0xce676e){return _0x2ba731===_0xce676e;},'hCxJU':function(_0x50e548,_0x3e605d){return _0x50e548+_0x3e605d;},'FyEDB':function(_0x5d06ea,_0x5d1640){return _0x5d06ea!==_0x5d1640;},'JPuPU':function(_0x1f3658,_0x46383b){return _0x1f3658===_0x46383b;},'kCGAc':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','TzVvl':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','vjwrv':function(_0x43a043,_0x22b00f){return _0x43a043(_0x22b00f);},'djWvf':'Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','oXyZo':function(_0x276560,_0x38a21a,_0x1a0c98){return _0x276560(_0x38a21a,_0x1a0c98);},'KAIWB':_0x37b2e6(0x162),'WdBwK':function(_0x319dba,_0x92050d,_0x4e88c9,_0xa15eee,_0x41126e){return _0x319dba(_0x92050d,_0x4e88c9,_0xa15eee,_0x41126e);},'nzuTM':_0x37b2e6(0x135),'ISgDl':function(_0x3d84bf,_0x3cfe31){return _0x3d84bf instanceof _0x3cfe31;},'ENHLj':function(_0x31c58e,_0x5830d9){return _0x31c58e>_0x5830d9;},'EqsTw':function(_0x453be3,_0x170dd6){return _0x453be3+_0x170dd6;},'jiqtn':function(_0x336b04,_0x2e372e){return _0x336b04(_0x2e372e);},'QPYAp':'\x0a🌐\x20Profile\x20Setup\x0a','xceYh':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','FxKfc':_0x37b2e6(0x185),'VqhEK':_0x37b2e6(0x187),'CAeVK':function(_0x1c60a7,_0xec07f3){return _0x1c60a7(_0xec07f3);},'hbiVD':_0x37b2e6(0x184),'OdkXs':'action','DrOlz':'What\x20would\x20you\x20like\x20to\x20do?','PPaTS':_0x37b2e6(0x189),'HZpQs':'Continue\x20anyway','ihEGx':_0x37b2e6(0x196),'eiRYb':function(_0x180821,_0xa673e5,_0x5a4f34,_0x58a11b,_0x1c9834,_0x55eb44){return _0x180821(_0xa673e5,_0x5a4f34,_0x58a11b,_0x1c9834,_0x55eb44);},'HiQft':function(_0x3c3e43,_0x2acf2c){return _0x3c3e43(_0x2acf2c);}};_0x1caa16['ci']&&(console['error'](_0x4578ef[_0x37b2e6(0x160)](_0x4578ef[_0x37b2e6(0x160)](_0x4578ef['uGaNY'](_0x4578ef['GiYsv']('ranger\x20profile\x20add\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'+'Cloud\x20profiles\x20store\x20session\x20state\x20server-side;\x20the\x20--ci\x20flag\x20is\x20gone.\x0a',_0x37b2e6(0x148)),'\x20\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--base-url\x20<url>\x0a'),'For\x20a\x20shared\x20cloud\x20profile:\x20ranger\x20profile\x20add\x20<account-email>\x0a'),_0x4578ef[_0x37b2e6(0x139)])),process['exit'](0x1));const _0x385b29={};if(_0x1caa16[_0x37b2e6(0x15d)])for(const _0x490023 of _0x1caa16[_0x37b2e6(0x15d)]){const _0x54e0c0=_0x490023[_0x37b2e6(0x183)](':');if(_0x4578ef['BBFQx'](_0x54e0c0,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x490023+_0x37b2e6(0x192));const _0x504904=_0x490023['slice'](0x0,_0x54e0c0)[_0x37b2e6(0x17c)](),_0x3f1b5f=_0x490023[_0x37b2e6(0x137)](_0x4578ef['hCxJU'](_0x54e0c0,0x1))['trim']();_0x385b29[_0x504904]=_0x3f1b5f;}if(_0x4578ef[_0x37b2e6(0x14a)](_0x1caa16[_0x37b2e6(0x162)],undefined)&&_0x4578ef[_0x37b2e6(0x19b)](_0x1caa16[_0x37b2e6(0x162)]['trim'](),''))throw new Error(_0x4578ef['kCGAc']);if(_0x1caa16[_0x37b2e6(0x162)]&&_0x1caa16[_0x37b2e6(0x16a)])throw new Error(_0x4578ef['TzVvl']);const _0x1bf837=_0x4578ef['vjwrv'](Boolean,_0x1caa16[_0x37b2e6(0x162)]),_0x1f4065=process['stdin'][_0x37b2e6(0x19e)]&&process[_0x37b2e6(0x16c)][_0x37b2e6(0x19e)];if(!_0x1f4065&&!_0x1caa16['url']&&!_0x1bf837&&!_0x1caa16['skipAuth'])throw new Error(_0x4578ef['djWvf']);if(_0x1bf837){const _0xc7213e=_0x1caa16['cdpEndpoint'];console[_0x37b2e6(0x18b)]('\x0a🔌\x20CDP\x20Profile\x20Setup\x0a'),console[_0x37b2e6(0x18b)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0xc7213e);const _0x50586b={'cdpEndpoint':_0xc7213e,'isElectron':!![]};Object[_0x37b2e6(0x143)](_0x385b29)[_0x37b2e6(0x173)]>0x0&&(_0x50586b[_0x37b2e6(0x174)]=_0x385b29);await _0x4578ef['oXyZo'](createUnconfiguredCloudProfile,_0x2e7b27,_0x50586b);try{setProfileOverride(process[_0x37b2e6(0x166)](),_0x2e7b27,_0x4578ef['KAIWB'],_0xc7213e),_0x4578ef[_0x37b2e6(0x1a2)](setProfileOverride,process['cwd'](),_0x2e7b27,_0x4578ef['nzuTM'],!![]);}catch(_0x8dafb4){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x4578ef[_0x37b2e6(0x177)](_0x8dafb4,Error)?_0x8dafb4[_0x37b2e6(0x163)]:_0x4578ef['vjwrv'](String,_0x8dafb4)));}console['log'](_0x37b2e6(0x18e)+_0x2e7b27+_0x37b2e6(0x13a)),await sweepOrphansBestEffort(_0x2e7b27),await markActive(_0x2e7b27);return;}if(_0x1caa16[_0x37b2e6(0x145)]){const _0x5ac572={};_0x1caa16[_0x37b2e6(0x16a)]&&(_0x5ac572['baseUrl']=_0x1caa16[_0x37b2e6(0x16a)]);_0x4578ef['ENHLj'](Object['keys'](_0x385b29)['length'],0x0)&&(_0x5ac572['setupHeaders']=_0x385b29);await createUnconfiguredCloudProfile(_0x2e7b27,_0x5ac572),console[_0x37b2e6(0x18b)](_0x4578ef['EqsTw'](_0x4578ef['GiYsv']('✓\x20Cloud\x20profile\x20\x27'+_0x2e7b27+'\x27\x20created\x20with\x20no\x20session.\x0a','\x20\x20Next:\x20set\x20RANGER_TEST_USERNAME\x20/\x20RANGER_TEST_PASSWORD\x20and\x20run\x0a')+('\x20\x20\x20\x20\x20\x20\x20\x20`ranger\x20go\x20--profile\x20'+_0x2e7b27+'`\x0a'),_0x37b2e6(0x146))),await _0x4578ef[_0x37b2e6(0x18f)](sweepOrphansBestEffort,_0x2e7b27),await _0x4578ef['jiqtn'](markActive,_0x2e7b27);return;}if(_0x1caa16['url']){const _0xcb3341=_0x1caa16['url'],_0x234b94=await _0x4578ef['vjwrv'](checkUrlReachability,_0xcb3341);if(!_0x234b94['ok']&&!_0x1caa16[_0x37b2e6(0x157)])throw new Error(_0x37b2e6(0x172)+_0xcb3341+':\x20'+_0x234b94[_0x37b2e6(0x150)]+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x234b94['ok']&&_0x1caa16[_0x37b2e6(0x157)]&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0xcb3341+':\x20'+_0x234b94[_0x37b2e6(0x150)]+'\x20(continuing\x20with\x20--force)');}else{console['log'](_0x4578ef['QPYAp']),console['log'](_0x4578ef[_0x37b2e6(0x170)]),console['log'](_0x37b2e6(0x144));let _0x2fe0af='',_0x3344ce=![];while(!![]){const _0x2b5045=await _0x26d8dc[_0x37b2e6(0x191)]([{'type':_0x37b2e6(0x133),'name':'baseUrl','message':_0x3344ce?_0x4578ef['FxKfc']:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x2fe0af||_0x4578ef['VqhEK']}]);_0x2fe0af=_0x2b5045['baseUrl'];const _0x5c7298=await _0x4578ef['CAeVK'](checkUrlReachability,_0x2fe0af);if(_0x5c7298['ok'])break;const _0x3e0307=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x2fe0af),_0x4f6eda=_0x5c7298['isProtocolError']&&!_0x3e0307,_0x3d4ac5=_0x4f6eda?'http://'+_0x2fe0af:null;_0x3344ce=!![],console['log'](_0x37b2e6(0x17e)+_0x2fe0af+':\x20'+_0x5c7298['error']);_0x3d4ac5&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0x3d4ac5+'?');const {action:_0xb5b7}=await _0x26d8dc['prompt']([{'type':_0x4578ef[_0x37b2e6(0x195)],'name':_0x4578ef['OdkXs'],'message':_0x4578ef[_0x37b2e6(0x132)],'choices':[..._0x3d4ac5?[{'name':'Use\x20'+_0x3d4ac5,'value':'use_suggestion'}]:[],{'name':_0x4578ef[_0x37b2e6(0x154)],'value':_0x37b2e6(0x14b)},{'name':_0x4578ef['HZpQs'],'value':_0x4578ef['ihEGx']}]}]);if(_0xb5b7===_0x37b2e6(0x182)&&_0x3d4ac5){_0x2fe0af=_0x3d4ac5;const _0x36a25c=await checkUrlReachability(_0x2fe0af);if(_0x36a25c['ok'])break;console[_0x37b2e6(0x18b)](_0x37b2e6(0x15a)+_0x2fe0af+':\x20'+_0x36a25c['error']);}else{if(_0xb5b7==='continue')break;}}_0x1caa16={..._0x1caa16,'url':_0x2fe0af};}let _0x68fdf9=![];try{_0x68fdf9=await _0x4578ef[_0x37b2e6(0x181)](tryAutoRouteCloudProfile,_0x2e7b27,_0x1caa16[_0x37b2e6(0x16a)],_0x1caa16,_0x1f4065,_0x4e0370);}catch(_0x4315a8){console['error']('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x2e7b27+_0x37b2e6(0x13d)+(_0x4578ef['ISgDl'](_0x4315a8,Error)?_0x4315a8[_0x37b2e6(0x163)]:String(_0x4315a8))),process[_0x37b2e6(0x179)](0x1);}!_0x68fdf9&&process[_0x37b2e6(0x179)](0x1),await _0x4578ef[_0x37b2e6(0x15b)](markActive,_0x2e7b27);}
1
+ (function(_0x329cb8,_0x54eaa3){const _0x523fe2=_0x38c4,_0x4caef0=_0x329cb8();while(!![]){try{const _0x54e0f9=parseInt(_0x523fe2(0x1b2))/0x1+parseInt(_0x523fe2(0x166))/0x2*(-parseInt(_0x523fe2(0x15b))/0x3)+-parseInt(_0x523fe2(0x140))/0x4*(-parseInt(_0x523fe2(0x170))/0x5)+parseInt(_0x523fe2(0x19c))/0x6*(parseInt(_0x523fe2(0x183))/0x7)+-parseInt(_0x523fe2(0x178))/0x8+parseInt(_0x523fe2(0x169))/0x9*(parseInt(_0x523fe2(0x1c0))/0xa)+parseInt(_0x523fe2(0x199))/0xb*(-parseInt(_0x523fe2(0x198))/0xc);if(_0x54e0f9===_0x54eaa3)break;else _0x4caef0['push'](_0x4caef0['shift']());}catch(_0x43e3e0){_0x4caef0['push'](_0x4caef0['shift']());}}}(_0x4575,0xaa66f));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x331e62 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';function _0x38c4(_0x58589e,_0x26bfd7){_0x58589e=_0x58589e-0x13f;const _0x4575b5=_0x4575();let _0x38c4ca=_0x4575b5[_0x58589e];return _0x38c4ca;}import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';function _0x4575(){const _0x1885b9=['for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','error','pkexj','NODE_TLS_REJECT_UNAUTHORIZED','77136dzJbPF','2288kfyeUm','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','profile.add.autoRouted','78MxioUM','indexOf','qJMZX','.tmp-','\x20--url\x20','isElectron','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','stdin','\x0a\x20\x20Could\x20not\x20reach\x20','trim','oOeLa','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','log','yes','ivqNM','force','status','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','TkjOj','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','confirm','\x0a\x20\x20(domains:\x20','667976ZLUzym','PbjPg','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','JMjwW','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','HEAD','TCdaZ','PMfLW','TypeError','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','url','continue','\x20\x20Did\x20you\x20mean\x20','baseUrl','20dwAYSj','\x27\x20to\x20the\x20cloud?','trackPhaseEnd','404BDfzPS','hoOWS','djAYb','phYXk','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','Cndew','env','RNxiz','profile.add.autoRouteSkipped','✓\x20Cloud\x20profile\x20\x27','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','`\x20again\x20without\x20--skip-auth.','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','Enter\x20a\x20different\x20URL','GXRQr','YeylD','\x20--skip-auth\x0a','SYQDq','lLPOG','list','DXRFN','\x20\x20https://docs.ranger.net/main/concepts/profiles','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','cdpEndpoint','retry','isProtocolError','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','360uUtyes','QAJJb','Could\x20not\x20reach\x20','cwd','manual','uwYxD','local','setupHeader','eBDYk','TpFND','environments','18552YCuAdj','test','EuDQq','1418787aFDepU','AWfRB','origin','prompt','message','\x27\x20created.\x0a','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','66895FigreW','IrJDt','HihVJ','\x27\x20created\x20(CDP).','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','skipAuth','exit','PCIer','1131280BeyMad','bDVBB','LNDEL','SZWgT','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','lKCob','WnBmg','Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000','slice','pFaTS','\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','514220LQggfB','\x20(continuing\x20with\x20--force)','FDvdB','Continue\x20anyway','RpFhC','XXKFH','Use\x20','user_declined','ulULb','XFwfS','LowYC','length','includes','fetch\x20failed','setupHeaders','keys','\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'];_0x4575=function(){return _0x1885b9;};return _0x4575();}async function checkUrlReachability(_0x2e7add){const _0x262c67=_0x38c4,_0x5715ca={'MauRy':function(_0x19f5a5,_0x517ac4,_0x1531bf){return _0x19f5a5(_0x517ac4,_0x1531bf);},'rQCwx':'Invalid\x20URL','lLPOG':function(_0xbf9a47,_0x33f8b4){return _0xbf9a47===_0x33f8b4;},'KduZr':_0x262c67(0x1ba)};try{const _0x4704f9=new AbortController(),_0x5c9ced=setTimeout(()=>_0x4704f9['abort'](),0x1388),_0x56173c={'method':_0x262c67(0x1b7),'signal':_0x4704f9['signal'],'redirect':_0x262c67(0x15f)};/^https:\/\/localhost(:\d+)?/i[_0x262c67(0x167)](_0x2e7add)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x5bcfeb=await _0x5715ca['MauRy'](fetch,_0x2e7add,_0x56173c);delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x5c9ced);if(_0x5bcfeb[_0x262c67(0x1ac)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x5bcfeb['status']};}catch(_0x2b1fea){delete process[_0x262c67(0x146)][_0x262c67(0x197)];const _0x403039=_0x2b1fea,_0x3387a4=_0x403039['message']||String(_0x2b1fea),_0x2d3009=_0x3387a4[_0x262c67(0x18f)](_0x5715ca['rQCwx'])||_0x5715ca[_0x262c67(0x152)](_0x403039['name'],_0x5715ca['KduZr'])||_0x3387a4['includes'](_0x262c67(0x190));return{'ok':![],'error':_0x3387a4,'isProtocolError':_0x2d3009};}}async function sweepOrphanLocalProfile(_0x57072c,_0x2d825d,_0x4aa5e6){const _0x151780=_0x38c4,_0x1d25b5={'WGXra':function(_0x28753f,_0x5725db,_0x16fa56){return _0x28753f(_0x5725db,_0x16fa56);},'lKCob':function(_0x3aeb1f,_0x54dc79){return _0x3aeb1f(_0x54dc79);},'EuDQq':function(_0x7df959,_0x1a2fcb){return _0x7df959(_0x1a2fcb);},'ivqNM':function(_0x38551d,_0x1b582f){return _0x38551d(_0x1b582f);}},_0xf8269=join(_0x2d825d,_0x151780(0x161)),_0x1d7111=_0x1d25b5['WGXra'](join,_0xf8269,_0x57072c);_0x1d25b5[_0x151780(0x17d)](existsSync,_0x1d7111)&&(_0x4aa5e6&&await _0x1d25b5[_0x151780(0x168)](isPathGitTracked,_0x1d7111)?console[_0x151780(0x1a8)]('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x1d7111+_0x151780(0x144)):(await _0x1d25b5['WGXra'](rm,_0x1d7111,{'recursive':!![],'force':!![]}),console[_0x151780(0x1a8)](_0x151780(0x16f)+_0x1d7111)));if(_0x1d25b5[_0x151780(0x1aa)](existsSync,_0xf8269)){let _0x5b9c10=[];try{_0x5b9c10=await _0x1d25b5[_0x151780(0x17d)](readdir,_0xf8269);}catch{return;}const _0x62667b=_0x151780(0x19f)+_0x57072c+'-';for(const _0x2a7a70 of _0x5b9c10){if(!_0x2a7a70['startsWith'](_0x62667b))continue;const _0x32ee00=join(_0xf8269,_0x2a7a70);await rm(_0x32ee00,{'recursive':!![],'force':!![]}),console[_0x151780(0x1a8)](_0x151780(0x16f)+_0x32ee00);}}}async function sweepOrphansBestEffort(_0x171400){const _0x109c84=_0x38c4,_0x3d75fb={'BZGlk':function(_0x2eeca8){return _0x2eeca8();},'PbjPg':function(_0x3cfd71,_0x417806,_0x5d9b51,_0xb2f458){return _0x3cfd71(_0x417806,_0x5d9b51,_0xb2f458);},'qJMZX':function(_0x50c988,_0xc0a237){return _0x50c988 instanceof _0xc0a237;}};try{await sweepOrphanLocalProfile(_0x171400,_0x3d75fb['BZGlk'](getRangerHomeDir),![]);const _0xefa6f6=_0x3d75fb['BZGlk'](getRangerDir);_0xefa6f6!==getRangerHomeDir()&&await _0x3d75fb[_0x109c84(0x1b3)](sweepOrphanLocalProfile,_0x171400,_0xefa6f6,!![]);}catch(_0x331ebd){console[_0x109c84(0x1a8)](_0x109c84(0x17c)+(_0x3d75fb[_0x109c84(0x19e)](_0x331ebd,Error)?_0x331ebd['message']:String(_0x331ebd))+').');}}async function markActive(_0x2ddc9d){const _0x1d16ae=_0x38c4;try{await writeActiveProfileName(_0x2ddc9d),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x2ddc9d);}catch{console['log'](_0x1d16ae(0x14a));}}async function tryAutoRouteCloudProfile(_0x3e7985,_0x4d2662,_0xf37d06,_0x1cec55,_0x3d0f2c){const _0x5435e7=_0x38c4,_0x33bcda={'XxWok':function(_0x5c27ac,_0x30d7f9){return _0x5c27ac===_0x30d7f9;},'QAJJb':'no_auth_config','XFwfS':function(_0x3f1682,_0x381775){return _0x3f1682 instanceof _0x381775;},'PCIer':function(_0x381596,_0x4661e2,_0x51d5ad,_0x3a1bfc,_0x381271){return _0x381596(_0x4661e2,_0x51d5ad,_0x3a1bfc,_0x381271);},'RNxiz':function(_0x5b6cde,_0xd7bba3){return _0x5b6cde+_0xd7bba3;},'WnBmg':function(_0x54245b,_0x265959){return _0x54245b+_0x265959;},'NOsHf':function(_0x2bd9d0,_0x37d684){return _0x2bd9d0+_0x37d684;},'YeylD':_0x5435e7(0x174),'phYXk':_0x5435e7(0x1b4),'TpFND':_0x5435e7(0x148),'gJFXC':_0x5435e7(0x18a),'TCdaZ':function(_0x57c65f,_0x134979,_0x4d2b53,_0x54f52e){return _0x57c65f(_0x134979,_0x4d2b53,_0x54f52e);},'djAYb':_0x5435e7(0x19b)};let _0x4467c7;try{_0x4467c7=await fetchAuthConfig();}catch(_0x2be99c){return _0x3d0f2c?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x33bcda[_0x5435e7(0x15c)],'profileName':_0x3e7985}),console['error']('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x33bcda[_0x5435e7(0x18c)](_0x2be99c,Error)?_0x2be99c['message']:String(_0x2be99c))),![];}if(!_0x4467c7||!_0x4467c7[_0x5435e7(0x165)]||Object[_0x5435e7(0x192)](_0x4467c7[_0x5435e7(0x165)])['length']===0x0){if(_0x1cec55)return await _0x33bcda[_0x5435e7(0x177)](captureEnvLessProfile,_0x3e7985,_0x4d2662,_0xf37d06,_0x3d0f2c);return _0x3d0f2c?.[_0x5435e7(0x13f)](_0x5435e7(0x148),{'reason':_0x33bcda[_0x5435e7(0x15c)],'profileName':_0x3e7985}),console['error'](_0x33bcda[_0x5435e7(0x147)](_0x33bcda[_0x5435e7(0x147)](_0x33bcda['WnBmg'](_0x33bcda[_0x5435e7(0x17e)](_0x33bcda['NOsHf'](_0x5435e7(0x182),'\x0a'),_0x5435e7(0x156)),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x3e7985+_0x5435e7(0x1a0)+_0x4d2662+_0x5435e7(0x150))+'\x0a',_0x33bcda[_0x5435e7(0x14f)]),_0x33bcda[_0x5435e7(0x143)])),![];}const _0x44425e=matchAuthEnvironment(_0x4d2662,_0x4467c7);if(!_0x44425e)return _0x3d0f2c?.['trackPhaseEnd'](_0x33bcda[_0x5435e7(0x164)],{'reason':'no_match','profileName':_0x3e7985}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x4d2662+'.\x20Configured\x20envs:\x20'+Object[_0x5435e7(0x192)](_0x4467c7[_0x5435e7(0x165)])['join'](',\x20')+'.'),![];const _0xc9af4d=_0x4467c7[_0x5435e7(0x165)][_0x44425e],_0x562e27=_0xc9af4d?.['domains']??[];if(_0x1cec55&&!_0xf37d06[_0x5435e7(0x1a9)]){const {saveToCloud:_0x24fdb6}=await _0x331e62['prompt']([{'type':_0x5435e7(0x1b0),'name':'saveToCloud','message':'Found\x20auth\x20environment\x20\x27'+_0x44425e+'\x27\x20matching\x20'+_0x4d2662+_0x5435e7(0x1b1)+_0x562e27['join'](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0x3e7985+_0x5435e7(0x1c1),'default':!![]}]);if(!_0x24fdb6)return _0x3d0f2c?.[_0x5435e7(0x13f)]('profile.add.autoRouteSkipped',{'reason':_0x33bcda['gJFXC'],'profileName':_0x3e7985}),console[_0x5435e7(0x195)]('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x42c07f=_0x562e27['some'](_0x3c622e=>{const _0x3a582b=_0x5435e7;try{return _0x33bcda['XxWok'](new URL(_0x3c622e)['origin'],new URL(_0x4d2662)[_0x3a582b(0x16b)]);}catch{return![];}}),_0x278f27={};!_0x42c07f&&(_0x278f27['baseUrl']=_0x4d2662);try{await _0x33bcda[_0x5435e7(0x1b8)](createCloudProfile,_0x3e7985,_0x44425e,{'settings':_0x278f27});}catch(_0x1342b7){if(_0x33bcda['XFwfS'](_0x1342b7,ApiError)&&_0x1342b7['status']===0x199){console['error']('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x3e7985+_0x5435e7(0x14c));throw _0x1342b7;}throw _0x1342b7;}return console[_0x5435e7(0x1a8)](_0x33bcda['RNxiz']('✓\x20Profile\x20\x27'+_0x3e7985+_0x5435e7(0x16e),_0x5435e7(0x1a2)+_0x3e7985)),await sweepOrphansBestEffort(_0x3e7985),_0x3d0f2c?.[_0x5435e7(0x13f)](_0x33bcda[_0x5435e7(0x142)],{'envKey':_0x44425e,'profileName':_0x3e7985}),!![];}async function createUnconfiguredCloudProfile(_0x3e3512,_0x76c8b7){const _0x53fe7f=_0x38c4,_0x160ced={'oOeLa':function(_0x5e0d23,_0x1491e0,_0x3f8e9e,_0x17d0c9){return _0x5e0d23(_0x1491e0,_0x3f8e9e,_0x17d0c9);}};try{await _0x160ced[_0x53fe7f(0x1a6)](createCloudProfile,_0x3e3512,undefined,{'settings':_0x76c8b7});}catch(_0x216940){_0x216940 instanceof ApiError&&_0x216940[_0x53fe7f(0x1ac)]===0x199&&console['error']('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0x3e3512+_0x53fe7f(0x14c));throw _0x216940;}}async function captureEnvLessProfile(_0x3e20fc,_0x328c5d,_0x3044f0,_0x20bc05){const _0x1f2e27=_0x38c4,_0x3f6b6c={'eBDYk':'capture','BWOsf':_0x1f2e27(0x1b6),'HihVJ':function(_0x5d3fdd,_0x56c58b){return _0x5d3fdd+_0x56c58b;},'FDvdB':function(_0x5cd2af,_0x6a2f15){return _0x5cd2af>_0x6a2f15;},'xAPDU':function(_0x3a2c26,_0x337158,_0x1ca6ce,_0x3a03b4){return _0x3a2c26(_0x337158,_0x1ca6ce,_0x3a03b4);},'hoOWS':function(_0x3a744f,_0x12a576){return _0x3a744f instanceof _0x12a576;},'SYQDq':function(_0x2faa78,_0x41112b,_0xec410e){return _0x2faa78(_0x41112b,_0xec410e);},'JMjwW':_0x1f2e27(0x19b)};if(!_0x3044f0[_0x1f2e27(0x1a9)]){const {capture:_0x269592}=await _0x331e62[_0x1f2e27(0x16c)]([{'type':'confirm','name':_0x3f6b6c[_0x1f2e27(0x163)],'message':_0x3f6b6c['BWOsf'],'default':!![]}]);if(!_0x269592)return _0x20bc05?.[_0x1f2e27(0x13f)](_0x1f2e27(0x148),{'reason':_0x1f2e27(0x18a),'profileName':_0x3e20fc}),console['error'](_0x3f6b6c[_0x1f2e27(0x172)](_0x1f2e27(0x1ad),'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.')),![];}const _0x4c9ded={};if(_0x3044f0[_0x1f2e27(0x162)])for(const _0x5592e3 of _0x3044f0['setupHeader']){const _0x38174e=_0x5592e3[_0x1f2e27(0x19d)](':');if(_0x38174e===-0x1)continue;_0x4c9ded[_0x5592e3[_0x1f2e27(0x180)](0x0,_0x38174e)['trim']()]=_0x5592e3['slice'](_0x38174e+0x1)[_0x1f2e27(0x1a5)]();}const _0x5267df={'baseUrl':_0x328c5d};_0x3f6b6c[_0x1f2e27(0x185)](Object['keys'](_0x4c9ded)[_0x1f2e27(0x18e)],0x0)&&(_0x5267df[_0x1f2e27(0x191)]=_0x4c9ded);let _0x2b0b76;try{_0x2b0b76=await _0x3f6b6c['xAPDU'](createCloudProfile,_0x3e20fc,undefined,{'settings':_0x5267df});}catch(_0x2c0b9e){_0x3f6b6c[_0x1f2e27(0x141)](_0x2c0b9e,ApiError)&&_0x2c0b9e[_0x1f2e27(0x1ac)]===0x199&&console['error'](_0x1f2e27(0x1af)+_0x3e20fc+_0x1f2e27(0x14c));throw _0x2c0b9e;}return await _0x3f6b6c[_0x1f2e27(0x151)](manualBrowserLogin,_0x2b0b76,{'key':'','domains':[_0x328c5d],'setupHeaders':Object['keys'](_0x4c9ded)['length']>0x0?_0x4c9ded:undefined}),console['log'](_0x3f6b6c[_0x1f2e27(0x172)]('\x0a✓\x20Profile\x20\x27'+_0x3e20fc+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a',_0x1f2e27(0x1a2)+_0x3e20fc)),await sweepOrphansBestEffort(_0x3e20fc),_0x20bc05?.['trackPhaseEnd'](_0x3f6b6c[_0x1f2e27(0x1b5)],{'envKey':null,'profileName':_0x3e20fc}),!![];}export async function addEnv(_0x4cc629,_0x42338c={},_0x1f8440){const _0x2d5cd6=_0x38c4,_0x11fcca={'fjLrP':function(_0x1a1a89,_0x2003e8){return _0x1a1a89+_0x2003e8;},'iBVxV':function(_0xda3179,_0x578977){return _0xda3179+_0x578977;},'bDVBB':function(_0x144692,_0x39399c){return _0x144692+_0x39399c;},'xEojz':function(_0x33fea5,_0x5dc5d0){return _0x33fea5+_0x5dc5d0;},'IrJDt':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','GXRQr':_0x2d5cd6(0x194),'zZkFv':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','fySKK':'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','pkexj':function(_0x1261fe,_0x16c6e6){return _0x1261fe===_0x16c6e6;},'offpI':function(_0x2b617f,_0x1db3c5){return _0x2b617f!==_0x1db3c5;},'XXKFH':'--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','uwYxD':_0x2d5cd6(0x17f),'AWfRB':_0x2d5cd6(0x1bb),'DXRFN':function(_0x49053e,_0x547d17){return _0x49053e>_0x547d17;},'qKcoh':function(_0x381dc5,_0x38a6bf,_0x3b5610,_0x5d6968,_0x17fcbe){return _0x381dc5(_0x38a6bf,_0x3b5610,_0x5d6968,_0x17fcbe);},'pFaTS':function(_0x530e48,_0x119dfa){return _0x530e48 instanceof _0x119dfa;},'LowYC':function(_0x101a9a,_0x54c5b2){return _0x101a9a(_0x54c5b2);},'Cndew':function(_0xade3d6,_0x141699){return _0xade3d6(_0x141699);},'TyItm':'\x0a🌐\x20Profile\x20Setup\x0a','LNDEL':function(_0xdf1497,_0x17f119){return _0xdf1497||_0x17f119;},'SZWgT':_0x2d5cd6(0x153),'RpFhC':'action','PMfLW':'What\x20would\x20you\x20like\x20to\x20do?','ulULb':function(_0x5be887,_0x5882d3){return _0x5be887===_0x5882d3;},'jKMkO':'use_suggestion','TkjOj':function(_0x526f32,_0x3c73f0){return _0x526f32===_0x3c73f0;}};_0x42338c['ci']&&(console['error'](_0x11fcca['fjLrP'](_0x11fcca['iBVxV'](_0x11fcca[_0x2d5cd6(0x179)](_0x11fcca['xEojz'](_0x11fcca[_0x2d5cd6(0x171)],_0x11fcca[_0x2d5cd6(0x14e)])+'\x0a'+'To\x20set\x20up\x20a\x20profile,\x20run:\x0a',_0x11fcca['zZkFv']),'\x0a')+_0x11fcca['fySKK'],_0x2d5cd6(0x155))),process[_0x2d5cd6(0x176)](0x1));const _0x1f3062={};if(_0x42338c[_0x2d5cd6(0x162)])for(const _0x2a9b0f of _0x42338c[_0x2d5cd6(0x162)]){const _0x507063=_0x2a9b0f[_0x2d5cd6(0x19d)](':');if(_0x11fcca[_0x2d5cd6(0x196)](_0x507063,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x2a9b0f+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x5add99=_0x2a9b0f[_0x2d5cd6(0x180)](0x0,_0x507063)[_0x2d5cd6(0x1a5)](),_0x19da6e=_0x2a9b0f[_0x2d5cd6(0x180)](_0x507063+0x1)['trim']();_0x1f3062[_0x5add99]=_0x19da6e;}if(_0x11fcca['offpI'](_0x42338c[_0x2d5cd6(0x157)],undefined)&&_0x11fcca[_0x2d5cd6(0x196)](_0x42338c[_0x2d5cd6(0x157)]['trim'](),''))throw new Error(_0x11fcca[_0x2d5cd6(0x188)]);if(_0x42338c['cdpEndpoint']&&_0x42338c['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');const _0x1ec749=Boolean(_0x42338c['cdpEndpoint']),_0x2d7187=process[_0x2d5cd6(0x1a3)]['isTTY']&&process['stdout']['isTTY'];if(!_0x2d7187&&!_0x42338c['url']&&!_0x1ec749&&!_0x42338c[_0x2d5cd6(0x175)])throw new Error(_0x11fcca[_0x2d5cd6(0x160)]);if(_0x1ec749){const _0x188515=_0x42338c[_0x2d5cd6(0x157)];console[_0x2d5cd6(0x1a8)](_0x11fcca[_0x2d5cd6(0x16a)]),console['log'](_0x2d5cd6(0x193)+_0x188515);const _0x220e62={'cdpEndpoint':_0x188515,'isElectron':!![]};_0x11fcca[_0x2d5cd6(0x154)](Object[_0x2d5cd6(0x192)](_0x1f3062)[_0x2d5cd6(0x18e)],0x0)&&(_0x220e62[_0x2d5cd6(0x191)]=_0x1f3062);await createUnconfiguredCloudProfile(_0x4cc629,_0x220e62);try{_0x11fcca['qKcoh'](setProfileOverride,process[_0x2d5cd6(0x15e)](),_0x4cc629,'cdpEndpoint',_0x188515),_0x11fcca['qKcoh'](setProfileOverride,process['cwd'](),_0x4cc629,_0x2d5cd6(0x1a1),!![]);}catch(_0x7768b6){console['error']('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x11fcca[_0x2d5cd6(0x181)](_0x7768b6,Error)?_0x7768b6[_0x2d5cd6(0x16d)]:_0x11fcca[_0x2d5cd6(0x18d)](String,_0x7768b6)));}console['log'](_0x2d5cd6(0x149)+_0x4cc629+_0x2d5cd6(0x173)),await _0x11fcca[_0x2d5cd6(0x145)](sweepOrphansBestEffort,_0x4cc629),await markActive(_0x4cc629);return;}if(_0x42338c[_0x2d5cd6(0x175)]){const _0x1241d9={};_0x42338c[_0x2d5cd6(0x1bc)]&&(_0x1241d9[_0x2d5cd6(0x1bf)]=_0x42338c['url']);_0x11fcca['DXRFN'](Object[_0x2d5cd6(0x192)](_0x1f3062)['length'],0x0)&&(_0x1241d9[_0x2d5cd6(0x191)]=_0x1f3062);await createUnconfiguredCloudProfile(_0x4cc629,_0x1241d9),console[_0x2d5cd6(0x1a8)]('✓\x20Profile\x20\x27'+_0x4cc629+'\x27\x20created\x20(no\x20session).\x0a'+('\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20'+_0x4cc629+_0x2d5cd6(0x14b))),await sweepOrphansBestEffort(_0x4cc629),await _0x11fcca['Cndew'](markActive,_0x4cc629);return;}if(_0x42338c[_0x2d5cd6(0x1bc)]){const _0x2e41d9=_0x42338c['url'],_0x1e4520=await checkUrlReachability(_0x2e41d9);if(!_0x1e4520['ok']&&!_0x42338c[_0x2d5cd6(0x1ab)])throw new Error(_0x2d5cd6(0x15d)+_0x2e41d9+':\x20'+_0x1e4520[_0x2d5cd6(0x195)]+_0x2d5cd6(0x15a));!_0x1e4520['ok']&&_0x42338c['force']&&console[_0x2d5cd6(0x1a8)]('⚠\x20Could\x20not\x20reach\x20'+_0x2e41d9+':\x20'+_0x1e4520[_0x2d5cd6(0x195)]+_0x2d5cd6(0x184));}else{console['log'](_0x11fcca['TyItm']),console[_0x2d5cd6(0x1a8)]('\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.'),console[_0x2d5cd6(0x1a8)](_0x2d5cd6(0x19a));let _0xe14623='',_0x118e03=![];while(!![]){const _0x7f655a=await _0x331e62['prompt']([{'type':'input','name':_0x2d5cd6(0x1bf),'message':_0x118e03?'Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):':_0x2d5cd6(0x1a7),'default':_0x11fcca[_0x2d5cd6(0x17a)](_0xe14623,'http://localhost:3000')}]);_0xe14623=_0x7f655a[_0x2d5cd6(0x1bf)];const _0x4736c9=await _0x11fcca['Cndew'](checkUrlReachability,_0xe14623);if(_0x4736c9['ok'])break;const _0x41391e=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0xe14623),_0x4ee90b=_0x4736c9[_0x2d5cd6(0x159)]&&!_0x41391e,_0x55af82=_0x4ee90b?'http://'+_0xe14623:null;_0x118e03=!![],console[_0x2d5cd6(0x1a8)](_0x2d5cd6(0x1a4)+_0xe14623+':\x20'+_0x4736c9['error']);_0x55af82&&console['log'](_0x2d5cd6(0x1be)+_0x55af82+'?');const {action:_0x1c0574}=await _0x331e62['prompt']([{'type':_0x11fcca[_0x2d5cd6(0x17b)],'name':_0x11fcca[_0x2d5cd6(0x187)],'message':_0x11fcca[_0x2d5cd6(0x1b9)],'choices':[..._0x55af82?[{'name':_0x2d5cd6(0x189)+_0x55af82,'value':'use_suggestion'}]:[],{'name':_0x2d5cd6(0x14d),'value':_0x2d5cd6(0x158)},{'name':_0x2d5cd6(0x186),'value':_0x2d5cd6(0x1bd)}]}]);if(_0x11fcca[_0x2d5cd6(0x18b)](_0x1c0574,_0x11fcca['jKMkO'])&&_0x55af82){_0xe14623=_0x55af82;const _0x52c863=await checkUrlReachability(_0xe14623);if(_0x52c863['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0xe14623+':\x20'+_0x52c863['error']);}else{if(_0x11fcca[_0x2d5cd6(0x1ae)](_0x1c0574,_0x2d5cd6(0x1bd)))break;}}_0x42338c={..._0x42338c,'url':_0xe14623};}let _0x32704b=![];try{_0x32704b=await tryAutoRouteCloudProfile(_0x4cc629,_0x42338c['url'],_0x42338c,_0x2d7187,_0x1f8440);}catch(_0x1591d8){console[_0x2d5cd6(0x195)]('\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22'+_0x4cc629+'\x22:\x20'+(_0x1591d8 instanceof Error?_0x1591d8['message']:_0x11fcca[_0x2d5cd6(0x145)](String,_0x1591d8))),process[_0x2d5cd6(0x176)](0x1);}!_0x32704b&&process[_0x2d5cd6(0x176)](0x1),await markActive(_0x4cc629);}
@@ -1 +1 @@
1
- (function(_0x19fc95,_0xf24bb0){var _0x43bb37=_0x5d38,_0x4622b3=_0x19fc95();while(!![]){try{var _0x39d308=parseInt(_0x43bb37(0x1dd))/0x1*(-parseInt(_0x43bb37(0x1db))/0x2)+parseInt(_0x43bb37(0x1da))/0x3+parseInt(_0x43bb37(0x1d3))/0x4+parseInt(_0x43bb37(0x1d2))/0x5*(-parseInt(_0x43bb37(0x1e2))/0x6)+-parseInt(_0x43bb37(0x1d8))/0x7*(-parseInt(_0x43bb37(0x1d1))/0x8)+parseInt(_0x43bb37(0x1de))/0x9*(parseInt(_0x43bb37(0x1e0))/0xa)+parseInt(_0x43bb37(0x1d4))/0xb;if(_0x39d308===_0xf24bb0)break;else _0x4622b3['push'](_0x4622b3['shift']());}catch(_0x2ddb3f){_0x4622b3['push'](_0x4622b3['shift']());}}}(_0x4538,0x2066d));export async function authEncrypt(_0x33c39a){var _0x4a15e9=_0x5d38,_0x4f55b9={'ygiXI':function(_0x45fddd,_0xd6d6e){return _0x45fddd+_0xd6d6e;},'wLSdJ':function(_0x2bf04d,_0x52a5e){return _0x2bf04d+_0x52a5e;},'exagv':'For\x20SSO/headed\x20login:\x20ranger\x20profile\x20add\x20<account-email>\x0a','TDgFj':_0x4a15e9(0x1e1)};console[_0x4a15e9(0x1df)](_0x4f55b9['ygiXI'](_0x4f55b9['wLSdJ'](_0x4f55b9[_0x4a15e9(0x1d7)]('ranger\x20profile\x20encrypt-auth\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a',_0x4a15e9(0x1d6))+'Use\x20the\x20new\x20flow:\x0a','\x20\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--base-url\x20<url>\x0a')+_0x4f55b9[_0x4a15e9(0x1d9)],_0x4f55b9[_0x4a15e9(0x1d5)])),process[_0x4a15e9(0x1dc)](0x1);}function _0x5d38(_0x479397,_0x28dc6d){_0x479397=_0x479397-0x1d1;var _0x4538eb=_0x4538();var _0x5d3866=_0x4538eb[_0x479397];return _0x5d3866;}function _0x4538(){var _0x197dc2=['9JOSMbc','666CVRgHx','error','34900aUwAUL','See:\x20docs/feature/cloud-profiles-old-vs-new-structure.md','6becFrZ','8UYHydw','674165sKqwXt','145828tEZWUL','279158gsynXD','TDgFj','Cloud\x20profiles\x20store\x20session\x20state\x20server-side;\x20encrypted\x20on-disk\x20auth\x20is\x20gone.\x0a','ygiXI','241948EYYdkL','exagv','25602rUhTQH','21254wmQXvP','exit'];_0x4538=function(){return _0x197dc2;};return _0x4538();}
1
+ (function(_0x56a00f,_0x5c9fbe){var _0xf9ccc5=_0x3bcc,_0x1394d0=_0x56a00f();while(!![]){try{var _0x1aaf0f=-parseInt(_0xf9ccc5(0x141))/0x1*(-parseInt(_0xf9ccc5(0x13b))/0x2)+-parseInt(_0xf9ccc5(0x136))/0x3+parseInt(_0xf9ccc5(0x139))/0x4*(-parseInt(_0xf9ccc5(0x137))/0x5)+-parseInt(_0xf9ccc5(0x140))/0x6+parseInt(_0xf9ccc5(0x134))/0x7*(parseInt(_0xf9ccc5(0x13c))/0x8)+-parseInt(_0xf9ccc5(0x13a))/0x9*(parseInt(_0xf9ccc5(0x144))/0xa)+parseInt(_0xf9ccc5(0x13d))/0xb;if(_0x1aaf0f===_0x5c9fbe)break;else _0x1394d0['push'](_0x1394d0['shift']());}catch(_0x72f64c){_0x1394d0['push'](_0x1394d0['shift']());}}}(_0x4e37,0xbd092));function _0x4e37(){var _0x4d9573=['\x20\x20https://docs.ranger.net/main/concepts/profiles','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','20dGCAkK','45066SBhAHR','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','2062551dJNCfh','10TpIefd','dvHVg','2280932fNNGRE','3307563daJwSE','248384SjGjZM','72GdijQs','43248964LWSXxM','uciZm','exit','4659426yEskUP','1TtohUK'];_0x4e37=function(){return _0x4d9573;};return _0x4e37();}function _0x3bcc(_0x70614a,_0x1e6965){_0x70614a=_0x70614a-0x134;var _0x4e37d6=_0x4e37();var _0x3bccd4=_0x4e37d6[_0x70614a];return _0x3bccd4;}export async function authEncrypt(_0x3e7efc){var _0x20aa37=_0x3bcc,_0x2c7acc={'uciZm':function(_0x5c524c,_0x1b6946){return _0x5c524c+_0x1b6946;},'dvHVg':function(_0x1db1ca,_0x16ef03){return _0x1db1ca+_0x16ef03;},'mUGqc':'ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','uDPMv':_0x20aa37(0x142)};console['error'](_0x2c7acc[_0x20aa37(0x13e)](_0x2c7acc['dvHVg'](_0x2c7acc[_0x20aa37(0x13e)](_0x2c7acc[_0x20aa37(0x138)](_0x2c7acc['mUGqc'],'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a')+'\x0a',_0x20aa37(0x143))+_0x20aa37(0x135),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a')+_0x2c7acc['uDPMv']),process[_0x20aa37(0x13f)](0x1);}
@@ -1 +1 @@
1
- const _0x59c348=_0x16aa;(function(_0x1db2e8,_0x48c158){const _0x532a99=_0x16aa,_0x459009=_0x1db2e8();while(!![]){try{const _0x1fc1d8=-parseInt(_0x532a99(0x1d9))/0x1*(-parseInt(_0x532a99(0x1de))/0x2)+-parseInt(_0x532a99(0x1b3))/0x3+parseInt(_0x532a99(0x1b7))/0x4*(parseInt(_0x532a99(0x1c6))/0x5)+-parseInt(_0x532a99(0x1b6))/0x6*(-parseInt(_0x532a99(0x1d4))/0x7)+parseInt(_0x532a99(0x1c5))/0x8+-parseInt(_0x532a99(0x1d5))/0x9*(-parseInt(_0x532a99(0x1df))/0xa)+parseInt(_0x532a99(0x1c3))/0xb*(-parseInt(_0x532a99(0x1e0))/0xc);if(_0x1fc1d8===_0x48c158)break;else _0x459009['push'](_0x459009['shift']());}catch(_0x2f1614){_0x459009['push'](_0x459009['shift']());}}}(_0x2d38,0x35498));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x16aa(_0x231c3f,_0xab716d){_0x231c3f=_0x231c3f-0x1af;const _0x2d386c=_0x2d38();let _0x16aab0=_0x2d386c[_0x231c3f];return _0x16aab0;}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';function _0x2d38(){const _0x3df5a2=['469170qwfwOf','kuZxp','error','bBwfc','11UMymtH','parse','CRyrj','dTDUW','hAmmS','19742TbCPux','20TOKwBl','6477756dfiHgw','tPYZD','rHIYP','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','UYLpr','QQPOV','Hcqqz','log','USglo','ignore','platform','close','win32','marketplace','39894BPPHew','isArray','KDgjF','44706vARcZy','4zOItFS','claude','FpICW','plugin','BbsPu','UUdmb','lRCaJ','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','feature-tracker','user','eyyyc','GXLYx','11CscilB','replace','901536kzInsj','1744895kxOccE','CdZDU','oIUYa','uninstall','VXkfW','length','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','rFUQK','IdLCj','BOJxr','✓\x20Removed\x20project\x20skill:\x20','stringify','nDGEj','91RrdcHp'];_0x2d38=function(){return _0x3df5a2;};return _0x2d38();}import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x59c348(0x1bf),'bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x5b8d26){const _0x2cda05=_0x59c348,_0x3800f3=_0x5b8d26['replace'](/\/\*[\s\S]*?\*\//g,''),_0x380abf=_0x3800f3[_0x2cda05(0x1c4)](/^\s*\/\/.*$/gm,''),_0x4fc25c=_0x380abf[_0x2cda05(0x1c4)](/,\s*([}\]])/g,'$1');return JSON[_0x2cda05(0x1da)](_0x4fc25c);}async function removeOpencodePluginConfig(_0x3288b4){const _0x154491=_0x59c348,_0x1240e3={'hKlzk':function(_0xc23dcb,_0xb01fd9){return _0xc23dcb!==_0xb01fd9;},'pNTKi':function(_0x370de0,_0x40adf1){return _0x370de0(_0x40adf1);},'wiXYK':function(_0x1548aa,_0x156608,_0x1db826){return _0x1548aa(_0x156608,_0x1db826);},'KZfdI':'utf-8','JSSAH':function(_0x172c9f,_0x3538b2){return _0x172c9f(_0x3538b2);},'IdLCj':function(_0x5709ec,_0x337fe9){return _0x5709ec===_0x337fe9;},'iuvKT':function(_0x158a65,_0x2960c4){return _0x158a65===_0x2960c4;}};if(!_0x1240e3['pNTKi'](existsSync,_0x3288b4))return![];let _0x1df23c;try{const _0x1544f9=await _0x1240e3['wiXYK'](readFile,_0x3288b4,_0x1240e3['KZfdI']);_0x1df23c=_0x1240e3['JSSAH'](parseJsonc,_0x1544f9);}catch{return![];}const _0x240aec=Array[_0x154491(0x1b4)](_0x1df23c['plugin'])?_0x1df23c[_0x154491(0x1ba)]:[];if(_0x1240e3[_0x154491(0x1cf)](_0x240aec[_0x154491(0x1cb)],0x0))return![];const _0x54d9f7=_0x240aec['filter'](_0x40609c=>{if(typeof _0x40609c!=='string')return!![];return _0x1240e3['hKlzk'](_0x40609c,opencodePluginName);});if(_0x1240e3[_0x154491(0x1cf)](_0x54d9f7[_0x154491(0x1cb)],_0x240aec[_0x154491(0x1cb)]))return![];return _0x1240e3['iuvKT'](_0x54d9f7['length'],0x0)?delete _0x1df23c[_0x154491(0x1ba)]:_0x1df23c[_0x154491(0x1ba)]=_0x54d9f7,await writeFile(_0x3288b4,JSON[_0x154491(0x1d2)](_0x1df23c,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x11a42d){const _0xcd7bc=_0x59c348,_0x32cfba={'BOJxr':function(_0x38d650,_0x168cb5){return _0x38d650(_0x168cb5);},'tPYZD':'plugin','dTDUW':_0xcd7bc(0x1c9),'nJUhX':'ranger@trailhead','ozcBj':'--scope','UUdmb':function(_0x584266,_0x33c083,_0x7886b6,_0x199684){return _0x584266(_0x33c083,_0x7886b6,_0x199684);},'GXLYx':_0xcd7bc(0x1e9),'hAmmS':function(_0x5d2d37){return _0x5d2d37();},'kuZxp':_0xcd7bc(0x1b1),'Hcqqz':'close','UYLpr':_0xcd7bc(0x1d7)};return new Promise(_0x3bb09a=>{const _0x37778a=_0xcd7bc,_0x42fc9e=[_0x32cfba[_0x37778a(0x1e1)],_0x32cfba[_0x37778a(0x1dc)],_0x32cfba['nJUhX']];_0x11a42d&&_0x42fc9e['push'](_0x32cfba['ozcBj'],_0x11a42d);const _0x4fa61f=_0x32cfba[_0x37778a(0x1bc)](spawn,'claude',_0x42fc9e,{'stdio':[_0x32cfba['GXLYx'],_0x32cfba[_0x37778a(0x1c2)],'ignore'],'cwd':_0x11a42d?_0x32cfba[_0x37778a(0x1dd)](getProjectRoot):undefined,'shell':process[_0x37778a(0x1af)]===_0x32cfba[_0x37778a(0x1d6)]});_0x4fa61f['on'](_0x32cfba[_0x37778a(0x1e6)],_0x2a70b8=>{const _0x3d298d=_0x37778a;_0x32cfba[_0x3d298d(0x1d0)](_0x3bb09a,_0x2a70b8===0x0);}),_0x4fa61f['on'](_0x32cfba[_0x37778a(0x1e4)],()=>{_0x32cfba['BOJxr'](_0x3bb09a,![]);});});}async function removeMarketplace(){const _0x5ca7ea=_0x59c348,_0x465202={'tNptM':function(_0xa7296,_0x42a04e){return _0xa7296(_0x42a04e);},'KDgjF':function(_0x465f97,_0x1aaf5e){return _0x465f97===_0x1aaf5e;},'ukoZe':_0x5ca7ea(0x1b8),'lRCaJ':_0x5ca7ea(0x1ba),'nDGEj':_0x5ca7ea(0x1b2),'CRyrj':'trailhead','BbsPu':_0x5ca7ea(0x1e9),'QQPOV':_0x5ca7ea(0x1b0)};return new Promise(_0x565e56=>{const _0x11ff4a=_0x5ca7ea,_0x46f4d7={'Xzagd':function(_0x4c6970,_0x10e44e){return _0x465202['tNptM'](_0x4c6970,_0x10e44e);},'kDdUG':function(_0x4f0b4b,_0x45bc73){const _0x41cc69=_0x16aa;return _0x465202[_0x41cc69(0x1b5)](_0x4f0b4b,_0x45bc73);}},_0x348471=spawn(_0x465202['ukoZe'],[_0x465202[_0x11ff4a(0x1bd)],_0x465202[_0x11ff4a(0x1d3)],'remove',_0x465202[_0x11ff4a(0x1db)]],{'stdio':[_0x465202['BbsPu'],_0x465202[_0x11ff4a(0x1bb)],_0x465202['BbsPu']],'shell':process[_0x11ff4a(0x1af)]===_0x11ff4a(0x1b1)});_0x348471['on'](_0x465202[_0x11ff4a(0x1e5)],_0x26cb9c=>{_0x46f4d7['Xzagd'](_0x565e56,_0x46f4d7['kDdUG'](_0x26cb9c,0x0));}),_0x348471['on'](_0x11ff4a(0x1d7),()=>{_0x565e56(![]);});});}export async function clean(){const _0x13d74a=_0x59c348,_0x1fa483={'IdmCs':_0x13d74a(0x1be),'USglo':'✓\x20Removed\x20stored\x20credentials','CdZDU':function(_0x202684,_0x55830e){return _0x202684(_0x55830e);},'InwYx':function(_0x2b9f4c,_0x882526,_0x2fdf58){return _0x2b9f4c(_0x882526,_0x2fdf58);},'oIKwI':'✓\x20Removed\x20.ranger/\x20directory','VXkfW':function(_0xb83325,_0x25a014,_0x703344){return _0xb83325(_0x25a014,_0x703344);},'bBwfc':function(_0x4442cf){return _0x4442cf();},'ThRoF':function(_0x33b227,_0x4a58f1,_0x3289a6){return _0x33b227(_0x4a58f1,_0x3289a6);},'rFUQK':function(_0x56ad9d,_0x4a1a39,_0x21c759){return _0x56ad9d(_0x4a1a39,_0x21c759);},'ICzZz':function(_0x3343d4,_0x425a83,_0x3c1ebf){return _0x3343d4(_0x425a83,_0x3c1ebf);},'NhktB':function(_0x4abd8c,_0x16f32f,_0x385674){return _0x4abd8c(_0x16f32f,_0x385674);},'FSOfz':_0x13d74a(0x1c0),'EZDpE':'opencode.json','oIUYa':_0x13d74a(0x1cc),'TftZW':'project','eyyyc':_0x13d74a(0x1e3),'FpICW':'✓\x20Removed\x20trailhead\x20marketplace','rHIYP':'\x0a✅\x20Cleanup\x20complete!\x0a'};console[_0x13d74a(0x1e7)](_0x1fa483['IdmCs']);let _0x3b5eea=![];try{await deleteAllCredentials(),console['log'](_0x1fa483[_0x13d74a(0x1e8)]),_0x3b5eea=!![];}catch{}const _0xf76a31=getCacheFile();existsSync(_0xf76a31)&&(await _0x1fa483[_0x13d74a(0x1c7)](rm,_0xf76a31),_0x3b5eea=!![]);const _0xb80ae3=getRangerDir();_0x1fa483['CdZDU'](existsSync,_0xb80ae3)&&(await _0x1fa483['InwYx'](rm,_0xb80ae3,{'recursive':!![]}),console['log'](_0x1fa483['oIKwI']),_0x3b5eea=!![]);const _0x4bca53=getProjectSkillsDir();for(const _0x27c4ec of skillsToRemove){const _0x2749e0=_0x1fa483['VXkfW'](join,_0x4bca53,_0x27c4ec);existsSync(_0x2749e0)&&(await _0x1fa483[_0x13d74a(0x1ca)](rm,_0x2749e0,{'recursive':!![]}),console['log'](_0x13d74a(0x1d1)+_0x27c4ec),_0x3b5eea=!![]);}const _0x282f0b=_0x1fa483['bBwfc'](getUserSkillsDir);for(const _0x5b337c of skillsToRemove){const _0x3d7a22=_0x1fa483['ThRoF'](join,_0x282f0b,_0x5b337c);existsSync(_0x3d7a22)&&(await rm(_0x3d7a22,{'recursive':!![]}),console['log']('✓\x20Removed\x20user\x20skill:\x20'+_0x5b337c),_0x3b5eea=!![]);}const _0x50da42=_0x1fa483['CdZDU'](getOpencodeSkillsDir,'project');for(const _0x19f9a0 of skillsToRemove){const _0x27e1ae=_0x1fa483[_0x13d74a(0x1ce)](join,_0x50da42,_0x19f9a0);existsSync(_0x27e1ae)&&(await _0x1fa483['ICzZz'](rm,_0x27e1ae,{'recursive':!![]}),console[_0x13d74a(0x1e7)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x19f9a0),_0x3b5eea=!![]);}const _0x223c7c=_0x1fa483['CdZDU'](getOpencodeSkillsDir,'user');for(const _0x581474 of skillsToRemove){const _0x3d57d0=_0x1fa483['NhktB'](join,_0x223c7c,_0x581474);existsSync(_0x3d57d0)&&(await _0x1fa483['InwYx'](rm,_0x3d57d0,{'recursive':!![]}),console['log'](_0x13d74a(0x1cd)+_0x581474),_0x3b5eea=!![]);}const _0x590822=_0x1fa483['ICzZz'](join,getOpencodeConfigDir('project'),'opencode.json');await removeOpencodePluginConfig(_0x590822)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x3b5eea=!![]);const _0x2e8995=_0x1fa483[_0x13d74a(0x1ca)](join,_0x1fa483[_0x13d74a(0x1c7)](getOpencodeConfigDir,_0x1fa483['FSOfz']),_0x1fa483['EZDpE']);await _0x1fa483['CdZDU'](removeOpencodePluginConfig,_0x2e8995)&&(console[_0x13d74a(0x1e7)](_0x1fa483[_0x13d74a(0x1c8)]),_0x3b5eea=!![]);const _0x4b5755=await _0x1fa483[_0x13d74a(0x1d8)](uninstallClaudePlugin);_0x4b5755&&(console[_0x13d74a(0x1e7)]('✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)'),_0x3b5eea=!![]);const _0x10a2c4=await _0x1fa483[_0x13d74a(0x1c7)](uninstallClaudePlugin,_0x1fa483['TftZW']);_0x10a2c4&&(console[_0x13d74a(0x1e7)](_0x1fa483[_0x13d74a(0x1c1)]),_0x3b5eea=!![]);const _0xe5a66c=await _0x1fa483['bBwfc'](removeMarketplace);_0xe5a66c&&(console['log'](_0x1fa483[_0x13d74a(0x1b9)]),_0x3b5eea=!![]),_0x3b5eea?console['log'](_0x1fa483[_0x13d74a(0x1e2)]):console['log']('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x15ce39=_0x11c2;(function(_0x4c420e,_0x361910){const _0x423866=_0x11c2,_0x725bb3=_0x4c420e();while(!![]){try{const _0x5eac8a=parseInt(_0x423866(0x11a))/0x1*(parseInt(_0x423866(0x113))/0x2)+parseInt(_0x423866(0x11d))/0x3*(parseInt(_0x423866(0x112))/0x4)+parseInt(_0x423866(0x124))/0x5*(parseInt(_0x423866(0xfa))/0x6)+parseInt(_0x423866(0x107))/0x7+parseInt(_0x423866(0x10a))/0x8*(-parseInt(_0x423866(0x121))/0x9)+parseInt(_0x423866(0x100))/0xa*(parseInt(_0x423866(0xfd))/0xb)+-parseInt(_0x423866(0x126))/0xc*(parseInt(_0x423866(0x103))/0xd);if(_0x5eac8a===_0x361910)break;else _0x725bb3['push'](_0x725bb3['shift']());}catch(_0x4d1442){_0x725bb3['push'](_0x725bb3['shift']());}}}(_0xb0da,0x72468));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';function _0xb0da(){const _0x4a38c8=['4908TeIeWd','666tuXVce','string','pScKn','enoxq','fHNvD','gujLd','LDRbA','85OtVEQd','HGNeu','ranger','573IAQnEA','CZuPl','\x0a✅\x20Cleanup\x20complete!\x0a','✓\x20Removed\x20OpenCode\x20project\x20skill:\x20','532647PXdOpY','ranger@trailhead','log','75jKfCqz','mfvmN','108ofXTTT','fQFfE','marketplace','trailhead','win32','length','claude','QUePN','plugin','✓\x20Removed\x20.ranger/\x20directory','feature-tracker','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','Heooe','OPDBv','gZpOv','BNVfs','✓\x20Removed\x20user\x20skill:\x20','67098SHjldF','push','QPaRD','11DBofni','isArray','remove','1861990tSPfgQ','opencode.json','ignore','1005927eEgaog','zeagF','BVCmT','Nothing\x20to\x20clean\x20up.\x0a','5492263WxDQsb','bLIEG','✓\x20Removed\x20trailhead\x20marketplace','32nPydTJ','stringify','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','project','filter','replace','slPno'];_0xb0da=function(){return _0x4a38c8;};return _0xb0da();}import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x15ce39(0x11c),_0x15ce39(0xf3),'bug-bash','e2e-test-recommender'],opencodePluginName='@ranger-testing/opencode-plugin';function _0x11c2(_0x158ad2,_0x1752ff){_0x158ad2=_0x158ad2-0xf0;const _0xb0daab=_0xb0da();let _0x11c21f=_0xb0daab[_0x158ad2];return _0x11c21f;}function parseJsonc(_0x129ef6){const _0x183bbd=_0x15ce39,_0x3e9b13=_0x129ef6['replace'](/\/\*[\s\S]*?\*\//g,''),_0x3539eb=_0x3e9b13[_0x183bbd(0x110)](/^\s*\/\/.*$/gm,''),_0x3cadbb=_0x3539eb[_0x183bbd(0x110)](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x3cadbb);}async function removeOpencodePluginConfig(_0x52b732){const _0x3a283c=_0x15ce39,_0x231866={'vCSab':function(_0x2e7d4b,_0x15d6f5){return _0x2e7d4b!==_0x15d6f5;},'fQFfE':'utf-8','gujLd':function(_0x56038a,_0x3a8044){return _0x56038a===_0x3a8044;},'NCmdb':function(_0x3680a5,_0x480386){return _0x3680a5+_0x480386;}};if(!existsSync(_0x52b732))return![];let _0x1702ea;try{const _0x37544a=await readFile(_0x52b732,_0x231866[_0x3a283c(0x127)]);_0x1702ea=parseJsonc(_0x37544a);}catch{return![];}const _0x3d003f=Array[_0x3a283c(0xfe)](_0x1702ea['plugin'])?_0x1702ea['plugin']:[];if(_0x231866[_0x3a283c(0x118)](_0x3d003f['length'],0x0))return![];const _0x5245fa=_0x3d003f[_0x3a283c(0x10f)](_0x36777e=>{const _0x162bb6=_0x3a283c;if(_0x231866['vCSab'](typeof _0x36777e,_0x162bb6(0x114)))return!![];return _0x36777e!==opencodePluginName;});if(_0x231866[_0x3a283c(0x118)](_0x5245fa[_0x3a283c(0x12b)],_0x3d003f['length']))return![];return _0x5245fa[_0x3a283c(0x12b)]===0x0?delete _0x1702ea[_0x3a283c(0xf1)]:_0x1702ea['plugin']=_0x5245fa,await writeFile(_0x52b732,_0x231866['NCmdb'](JSON[_0x3a283c(0x10b)](_0x1702ea,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x93de34){const _0x4fe822=_0x15ce39,_0x3c8d2b={'slPno':function(_0x55e4a1,_0x36081e){return _0x55e4a1(_0x36081e);},'gdMXy':_0x4fe822(0xf1),'SpdtR':'--scope','zeagF':'ignore','fHNvD':function(_0x671fcf){return _0x671fcf();},'OdcSp':function(_0x26caa9,_0x3f5568){return _0x26caa9===_0x3f5568;},'QPaRD':'error'};return new Promise(_0x43b301=>{const _0x5116aa=_0x4fe822,_0x2c2e80={'QUePN':function(_0x5a8d48,_0x1e33af){return _0x5a8d48(_0x1e33af);}},_0x4cb657=[_0x3c8d2b['gdMXy'],'uninstall',_0x5116aa(0x122)];_0x93de34&&_0x4cb657[_0x5116aa(0xfb)](_0x3c8d2b['SpdtR'],_0x93de34);const _0x26bc64=spawn('claude',_0x4cb657,{'stdio':[_0x5116aa(0x102),_0x3c8d2b[_0x5116aa(0x104)],_0x5116aa(0x102)],'cwd':_0x93de34?_0x3c8d2b[_0x5116aa(0x117)](getProjectRoot):undefined,'shell':_0x3c8d2b['OdcSp'](process['platform'],'win32')});_0x26bc64['on']('close',_0xa3113a=>{const _0x5061fc=_0x5116aa;_0x3c8d2b[_0x5061fc(0x111)](_0x43b301,_0xa3113a===0x0);}),_0x26bc64['on'](_0x3c8d2b[_0x5116aa(0xfc)],()=>{const _0x301e37=_0x5116aa;_0x2c2e80[_0x301e37(0xf0)](_0x43b301,![]);});});}async function removeMarketplace(){const _0x5f4c79=_0x15ce39,_0x3eb86f={'BNVfs':function(_0x909069,_0x5a8999){return _0x909069(_0x5a8999);},'BVCmT':function(_0x5bdb9c,_0x41a22d){return _0x5bdb9c===_0x41a22d;},'xZvKI':function(_0x6bde8a,_0x518157,_0x58e139,_0x5a972b){return _0x6bde8a(_0x518157,_0x58e139,_0x5a972b);},'vAoyn':_0x5f4c79(0x12c),'HmLzu':'plugin','aWmsy':_0x5f4c79(0x128),'RYnom':_0x5f4c79(0x102),'OPDBv':_0x5f4c79(0x12a),'HGNeu':'close'};return new Promise(_0x2d9696=>{const _0xb23e9a=_0x5f4c79,_0x4bc88f={'VkaXK':function(_0x241f62,_0xcfe263){const _0x2a0607=_0x11c2;return _0x3eb86f[_0x2a0607(0x105)](_0x241f62,_0xcfe263);}},_0x56a557=_0x3eb86f['xZvKI'](spawn,_0x3eb86f['vAoyn'],[_0x3eb86f['HmLzu'],_0x3eb86f['aWmsy'],_0xb23e9a(0xff),_0xb23e9a(0x129)],{'stdio':[_0xb23e9a(0x102),_0x3eb86f['RYnom'],_0x3eb86f['RYnom']],'shell':_0x3eb86f[_0xb23e9a(0x105)](process['platform'],_0x3eb86f[_0xb23e9a(0xf6)])});_0x56a557['on'](_0x3eb86f[_0xb23e9a(0x11b)],_0x2cb8e6=>{_0x2d9696(_0x4bc88f['VkaXK'](_0x2cb8e6,0x0));}),_0x56a557['on']('error',()=>{const _0x1f6ac8=_0xb23e9a;_0x3eb86f[_0x1f6ac8(0xf8)](_0x2d9696,![]);});});}export async function clean(){const _0x1b51a0=_0x15ce39,_0x384a40={'ankzv':_0x1b51a0(0x10c),'yiIGY':'✓\x20Removed\x20stored\x20credentials','wuZgZ':function(_0x90dd40){return _0x90dd40();},'bLIEG':function(_0x38dfe9,_0x2c5c57){return _0x38dfe9(_0x2c5c57);},'kOVxS':function(_0x4fbe2d){return _0x4fbe2d();},'IQhsT':function(_0x4a006c){return _0x4a006c();},'pScKn':function(_0x2ee554,_0x116cb7,_0x4a9f92){return _0x2ee554(_0x116cb7,_0x4a9f92);},'enoxq':_0x1b51a0(0x10e),'LDRbA':'user','mfvmN':function(_0x4514bb,_0x583eea,_0x8239df){return _0x4514bb(_0x583eea,_0x8239df);},'gZpOv':_0x1b51a0(0x101),'LGSZv':function(_0x26ba50,_0x375f43){return _0x26ba50(_0x375f43);},'tMYQg':_0x1b51a0(0x10d),'CZuPl':function(_0x1a568d){return _0x1a568d();},'HLSEL':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','Heooe':'✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','YDmtZ':_0x1b51a0(0x106)};console['log'](_0x384a40['ankzv']);let _0x3922e2=![];try{await deleteAllCredentials(),console[_0x1b51a0(0x123)](_0x384a40['yiIGY']),_0x3922e2=!![];}catch{}const _0x353737=_0x384a40['wuZgZ'](getCacheFile);existsSync(_0x353737)&&(await _0x384a40['bLIEG'](rm,_0x353737),_0x3922e2=!![]);const _0x2ced12=getRangerDir();existsSync(_0x2ced12)&&(await rm(_0x2ced12,{'recursive':!![]}),console['log'](_0x1b51a0(0xf2)),_0x3922e2=!![]);const _0x5bb5cc=_0x384a40['kOVxS'](getProjectSkillsDir);for(const _0x236f5d of skillsToRemove){const _0xe70eb0=join(_0x5bb5cc,_0x236f5d);existsSync(_0xe70eb0)&&(await rm(_0xe70eb0,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x236f5d),_0x3922e2=!![]);}const _0x38930d=_0x384a40['IQhsT'](getUserSkillsDir);for(const _0x49511c of skillsToRemove){const _0x5b566e=_0x384a40['pScKn'](join,_0x38930d,_0x49511c);existsSync(_0x5b566e)&&(await rm(_0x5b566e,{'recursive':!![]}),console[_0x1b51a0(0x123)](_0x1b51a0(0xf9)+_0x49511c),_0x3922e2=!![]);}const _0x35e5c9=getOpencodeSkillsDir(_0x384a40[_0x1b51a0(0x116)]);for(const _0x1963f6 of skillsToRemove){const _0x55d2bd=_0x384a40['pScKn'](join,_0x35e5c9,_0x1963f6);existsSync(_0x55d2bd)&&(await _0x384a40['pScKn'](rm,_0x55d2bd,{'recursive':!![]}),console[_0x1b51a0(0x123)](_0x1b51a0(0x120)+_0x1963f6),_0x3922e2=!![]);}const _0xd06c00=getOpencodeSkillsDir(_0x384a40[_0x1b51a0(0x119)]);for(const _0x5a9fe8 of skillsToRemove){const _0xd5f135=_0x384a40[_0x1b51a0(0x125)](join,_0xd06c00,_0x5a9fe8);_0x384a40[_0x1b51a0(0x108)](existsSync,_0xd5f135)&&(await _0x384a40[_0x1b51a0(0x115)](rm,_0xd5f135,{'recursive':!![]}),console[_0x1b51a0(0x123)]('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x5a9fe8),_0x3922e2=!![]);}const _0x1b731d=join(getOpencodeConfigDir('project'),_0x384a40[_0x1b51a0(0xf7)]);await removeOpencodePluginConfig(_0x1b731d)&&(console[_0x1b51a0(0x123)](_0x1b51a0(0xf4)),_0x3922e2=!![]);const _0x3885bc=join(_0x384a40['LGSZv'](getOpencodeConfigDir,_0x384a40[_0x1b51a0(0x119)]),_0x384a40['gZpOv']);await removeOpencodePluginConfig(_0x3885bc)&&(console[_0x1b51a0(0x123)](_0x384a40['tMYQg']),_0x3922e2=!![]);const _0x3a7872=await _0x384a40[_0x1b51a0(0x11e)](uninstallClaudePlugin);_0x3a7872&&(console[_0x1b51a0(0x123)](_0x384a40['HLSEL']),_0x3922e2=!![]);const _0x35189f=await uninstallClaudePlugin(_0x1b51a0(0x10e));_0x35189f&&(console[_0x1b51a0(0x123)](_0x384a40[_0x1b51a0(0xf5)]),_0x3922e2=!![]);const _0x49f9da=await _0x384a40['wuZgZ'](removeMarketplace);_0x49f9da&&(console[_0x1b51a0(0x123)](_0x1b51a0(0x109)),_0x3922e2=!![]),_0x3922e2?console[_0x1b51a0(0x123)](_0x1b51a0(0x11f)):console[_0x1b51a0(0x123)](_0x384a40['YDmtZ']);}
@@ -1 +1 @@
1
- const _0x43a503=_0x34bc;(function(_0x5c6e40,_0x30ced7){const _0x1a068c=_0x34bc,_0x539ca3=_0x5c6e40();while(!![]){try{const _0x3a9807=-parseInt(_0x1a068c(0xe0))/0x1*(-parseInt(_0x1a068c(0xe2))/0x2)+parseInt(_0x1a068c(0xd5))/0x3*(parseInt(_0x1a068c(0xd9))/0x4)+-parseInt(_0x1a068c(0xdf))/0x5+-parseInt(_0x1a068c(0xd0))/0x6+-parseInt(_0x1a068c(0xc0))/0x7*(-parseInt(_0x1a068c(0xc2))/0x8)+parseInt(_0x1a068c(0xe7))/0x9+-parseInt(_0x1a068c(0xbc))/0xa;if(_0x3a9807===_0x30ced7)break;else _0x539ca3['push'](_0x539ca3['shift']());}catch(_0x44eb83){_0x539ca3['push'](_0x539ca3['shift']());}}}(_0x15af,0xd8c29));import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';function _0x15af(){const _0x3b338c=['OcOBS','allowInsecureLocalhost','includes','headless','log','Cleared\x20local\x20overrides\x20for\x20\x22','10734300wkHhsh','AllWk','(not\x20set)','null','9381463TejdnP','peyFC','8lMtVSh','\x22\x20not\x20found','\x20for\x20\x22','true','No\x20configuration\x20set\x20for\x20\x22','faIuX','vNsOM','length','keys','xkfKV','alsoExistsElsewhere','PmRgw','endsWith','cloud','10483302qVkqRK','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','EfdWd','\x20=\x20','undefined','18jkzshE','NpbMh','kind','bOpKu','975404yVshXw','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','cwd','gJqrr','startsWith','yppCJ','6516945PzZpBf','1plmPfG','Invalid\x20value\x20for\x20','3360982zursVB','Key\x20\x22',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','parse','JSCRi','4752711iDbVuv','object','Removed\x20'];_0x15af=function(){return _0x3b338c;};return _0x15af();}const BOOLEAN_KEYS=[_0x43a503(0xb9),_0x43a503(0xb7)];function parseLocalValue(_0x3bca43,_0x160a0e){const _0x3f680a=_0x43a503,_0x376ed4={'xkfKV':'false'};if(BOOLEAN_KEYS[_0x3f680a(0xb8)](_0x3bca43)){if(_0x160a0e==='true')return!![];if(_0x160a0e===_0x376ed4[_0x3f680a(0xcb)])return![];throw new Error(_0x3f680a(0xe1)+_0x3bca43+_0x3f680a(0xe4));}return _0x160a0e;}function parseOverrideValue(_0x99368d){const _0x255cb3=_0x43a503,_0x4b8e68={'RDfmI':function(_0x1d5b02,_0x560c5c){return _0x1d5b02===_0x560c5c;},'lqSfk':_0x255cb3(0xbf),'PmRgw':function(_0x404d97,_0x1728e6){return _0x404d97(_0x1728e6);}};if(_0x99368d===_0x255cb3(0xc5))return!![];if(_0x4b8e68['RDfmI'](_0x99368d,'false'))return![];if(_0x4b8e68['RDfmI'](_0x99368d,_0x4b8e68['lqSfk']))return null;if(_0x99368d===_0x255cb3(0xd4))return undefined;if(/^-?\d+$/['test'](_0x99368d)){const _0x44c923=Number(_0x99368d);if(Number['isSafeInteger'](_0x44c923))return _0x44c923;}if(/^-?\d+\.\d+$/['test'](_0x99368d)){const _0x3ae58f=_0x4b8e68[_0x255cb3(0xcd)](Number,_0x99368d);if(!Number['isNaN'](_0x3ae58f))return _0x3ae58f;}const _0x4dd56e=_0x99368d['trim']();if(_0x4dd56e[_0x255cb3(0xdd)]('{')&&_0x4dd56e[_0x255cb3(0xce)]('}')||_0x4dd56e[_0x255cb3(0xdd)]('[')&&_0x4dd56e[_0x255cb3(0xce)](']'))try{return JSON[_0x255cb3(0xe5)](_0x4dd56e);}catch{}return _0x99368d;}async function resolveProfileTarget(_0x3ea1c5){const _0x1f20ce=_0x43a503,_0x3b2d03={'FobQO':function(_0x4871ac,_0x39a3f2){return _0x4871ac(_0x39a3f2);},'OcOBS':function(_0x356060,_0x352dd7){return _0x356060(_0x352dd7);},'YdGNT':'local'},_0x36909f=existsSync(_0x3b2d03['FobQO'](getEnvDir,_0x3ea1c5));let _0x4185c3=![];try{const _0x55157e=await fetchCloudProfile(_0x3ea1c5);_0x4185c3=_0x3b2d03[_0x1f20ce(0xea)](Boolean,_0x55157e);}catch{}if(_0x4185c3)return{'kind':'cloud','alsoExistsElsewhere':_0x36909f};if(_0x36909f)return{'kind':_0x3b2d03['YdGNT'],'alsoExistsElsewhere':![]};throw new Error('Profile\x20\x22'+_0x3ea1c5+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x3ea1c5);}function printDualExistsHint(_0x2bf9ce){console['log']('\x20\x20Note:\x20\x22'+_0x2bf9ce+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0x1bdc97=_0x43a503;return process[_0x1bdc97(0xdb)]();}async function loadEffectiveCloudSettings(_0x1e2b19){const _0x56a519=_0x43a503,_0x20b0cd={'bOpKu':function(_0x173a23,_0x2eceb2,_0x8fff22){return _0x173a23(_0x2eceb2,_0x8fff22);}},_0x15ff7a=await fetchCloudProfile(_0x1e2b19),_0x5aa38c=readProfileOverrides(getProjectPath(),_0x1e2b19);return _0x20b0cd[_0x56a519(0xd8)](mergeCloudProfileSettings,_0x15ff7a?.['settings']??{},_0x5aa38c??undefined);}export async function configSet(_0x4af076,_0x118ea5,_0x47427a){const _0x1b00bc=_0x43a503,_0x4ceea6={'gJqrr':function(_0x4b4708,_0x1b5c1a){return _0x4b4708(_0x1b5c1a);},'jeqAH':function(_0x52e1d0,_0x97054d){return _0x52e1d0===_0x97054d;},'ZgSAV':'cloud','Krvfg':function(_0x294db3,_0x3b0d30){return _0x294db3(_0x3b0d30);},'peyFC':function(_0x179bd1,_0x137f4a){return _0x179bd1(_0x137f4a);},'tRhwm':function(_0x37be95,_0x419f00,_0x4d460f,_0x1e6d75,_0x5a95b5){return _0x37be95(_0x419f00,_0x4d460f,_0x1e6d75,_0x5a95b5);}},_0x1ae772=await _0x4ceea6[_0x1b00bc(0xdc)](resolveProfileTarget,_0x4af076);if(_0x4ceea6['jeqAH'](_0x1ae772[_0x1b00bc(0xd7)],_0x4ceea6['ZgSAV'])){if(_0x1ae772[_0x1b00bc(0xcc)])_0x4ceea6['Krvfg'](printDualExistsHint,_0x4af076);const _0x1a70ec=_0x4ceea6[_0x1b00bc(0xc1)](parseOverrideValue,_0x47427a);_0x4ceea6['tRhwm'](setProfileOverride,getProjectPath(),_0x4af076,_0x118ea5,_0x1a70ec),console[_0x1b00bc(0xba)]('Set\x20'+_0x118ea5+'\x20=\x20'+JSON['stringify'](_0x1a70ec)+_0x1b00bc(0xc4)+_0x4af076+'\x22');return;}const _0x1a7f9c=parseLocalValue(_0x118ea5,_0x47427a);setProfileOverride(getProjectPath(),_0x4af076,_0x118ea5,_0x1a7f9c),console[_0x1b00bc(0xba)]('Set\x20'+_0x118ea5+_0x1b00bc(0xd3)+_0x1a7f9c+_0x1b00bc(0xc4)+_0x4af076+'\x22');}export async function configGet(_0x41e48f,_0x10fb84){const _0x468c7b=_0x43a503,_0x4f2671={'eCutU':function(_0xec18c6,_0xd3f863){return _0xec18c6(_0xd3f863);},'YDiHq':function(_0x5e94d0,_0x15591b){return _0x5e94d0===_0x15591b;},'faIuX':function(_0x148577,_0x4576b5){return _0x148577===_0x4576b5;},'UFFmU':function(_0x581380,_0x5e6f30){return _0x581380(_0x5e6f30);},'EfdWd':function(_0x5c49bb,_0x35d572){return _0x5c49bb===_0x35d572;},'ZTIsk':'object'},_0x9ffdc0=await _0x4f2671['eCutU'](resolveProfileTarget,_0x41e48f);if(_0x9ffdc0['kind']==='cloud'){const _0x3af3d9=await loadEffectiveCloudSettings(_0x41e48f),_0x4ee1a0=getNestedValue(_0x3af3d9,_0x10fb84);if(_0x4f2671['YDiHq'](_0x4ee1a0,undefined))console[_0x468c7b(0xba)](_0x468c7b(0xbe));else _0x4f2671[_0x468c7b(0xc7)](typeof _0x4ee1a0,_0x468c7b(0xe8))?console['log'](JSON['stringify'](_0x4ee1a0,null,0x2)):console[_0x468c7b(0xba)](_0x4ee1a0);return;}const _0x549abb=await _0x4f2671['UFFmU'](loadSettings,_0x41e48f),_0x1e1a73=getNestedValue(_0x549abb,_0x10fb84);if(_0x4f2671[_0x468c7b(0xd2)](_0x1e1a73,undefined))console[_0x468c7b(0xba)]('(not\x20set)');else typeof _0x1e1a73===_0x4f2671['ZTIsk']?console['log'](JSON['stringify'](_0x1e1a73,null,0x2)):console[_0x468c7b(0xba)](_0x1e1a73);}function _0x34bc(_0x216936,_0x3159fd){_0x216936=_0x216936-0xb7;const _0x15af26=_0x15af();let _0x34bc0f=_0x15af26[_0x216936];return _0x34bc0f;}export async function configList(_0x646c44){const _0x51ff29=_0x43a503,_0x891f79={'mnspa':function(_0x2b8050,_0x594ad4){return _0x2b8050(_0x594ad4);},'AllWk':function(_0x3c56d7,_0x24f4e2){return _0x3c56d7===_0x24f4e2;},'JSCRi':_0x51ff29(0xcf)},_0x386adb=await _0x891f79['mnspa'](resolveProfileTarget,_0x646c44);if(_0x891f79[_0x51ff29(0xbd)](_0x386adb[_0x51ff29(0xd7)],_0x891f79[_0x51ff29(0xe6)])){const _0x1d1402=await loadEffectiveCloudSettings(_0x646c44);if(!_0x1d1402||_0x891f79['AllWk'](Object[_0x51ff29(0xca)](_0x1d1402)[_0x51ff29(0xc9)],0x0)){console['log'](_0x51ff29(0xc6)+_0x646c44+'\x22');return;}console[_0x51ff29(0xba)](JSON['stringify'](_0x1d1402,null,0x2));return;}const _0x10f732=getSettingsPath(_0x646c44);if(!existsSync(_0x10f732)){console[_0x51ff29(0xba)](_0x51ff29(0xc6)+_0x646c44+'\x22');return;}const _0x3285a5=await loadSettings(_0x646c44),_0x4c2293=_0x891f79['mnspa'](formatSettings,_0x3285a5);!_0x4c2293?console[_0x51ff29(0xba)](_0x51ff29(0xc6)+_0x646c44+'\x22'):console[_0x51ff29(0xba)](_0x4c2293);}export async function configUnset(_0x26203a,_0x6210d9){const _0x2b69ac=_0x43a503,_0x27d0f0={'eBxIh':function(_0x27c08f,_0x59bc9d){return _0x27c08f===_0x59bc9d;},'DfgWn':_0x2b69ac(0xcf),'yppCJ':function(_0x3e34dd,_0x59d936,_0x52e910,_0x264d36){return _0x3e34dd(_0x59d936,_0x52e910,_0x264d36);},'NpbMh':function(_0x3020c1){return _0x3020c1();}},_0x277753=await resolveProfileTarget(_0x26203a);if(_0x27d0f0['eBxIh'](_0x277753['kind'],_0x27d0f0['DfgWn'])){if(_0x277753[_0x2b69ac(0xcc)])printDualExistsHint(_0x26203a);const _0x3e1711=_0x27d0f0[_0x2b69ac(0xde)](unsetProfileOverride,_0x27d0f0[_0x2b69ac(0xd6)](getProjectPath),_0x26203a,_0x6210d9);_0x3e1711?console[_0x2b69ac(0xba)](_0x2b69ac(0xe9)+_0x6210d9+'\x20for\x20\x22'+_0x26203a+'\x22'):console['log']('Key\x20\x22'+_0x6210d9+'\x22\x20not\x20found');return;}const _0x286a63=unsetProfileOverride(getProjectPath(),_0x26203a,_0x6210d9);if(_0x286a63){console[_0x2b69ac(0xba)]('Removed\x20'+_0x6210d9);return;}const _0x2c887f=await loadSettings(_0x26203a),_0x491c14=deleteNestedValue(_0x2c887f,_0x6210d9);_0x491c14?console[_0x2b69ac(0xba)](_0x2b69ac(0xe3)+_0x6210d9+_0x2b69ac(0xda)+_0x26203a+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console['log'](_0x2b69ac(0xe3)+_0x6210d9+_0x2b69ac(0xc3));}export async function configReset(_0x4f7fb6){const _0xa2ad1d=_0x43a503,_0x5db501={'vNsOM':function(_0x58f3f7,_0x3f76f6){return _0x58f3f7===_0x3f76f6;},'ixHPL':function(_0x28442d,_0x1a2624,_0x464854){return _0x28442d(_0x1a2624,_0x464854);},'pJHyL':function(_0xb078a8){return _0xb078a8();}},_0x131f3a=await resolveProfileTarget(_0x4f7fb6);if(_0x5db501[_0xa2ad1d(0xc8)](_0x131f3a[_0xa2ad1d(0xd7)],'cloud')){_0x5db501['ixHPL'](resetProfileOverrides,_0x5db501['pJHyL'](getProjectPath),_0x4f7fb6),console['log'](_0xa2ad1d(0xbb)+_0x4f7fb6+'\x22');return;}console[_0xa2ad1d(0xba)]('\x22'+_0x4f7fb6+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x4f7fb6+_0xa2ad1d(0xd1));}
1
+ (function(_0x4368a0,_0x3ee270){const _0x232563=_0x4b20,_0x2594ef=_0x4368a0();while(!![]){try{const _0x17de47=-parseInt(_0x232563(0xc6))/0x1+parseInt(_0x232563(0xd2))/0x2+-parseInt(_0x232563(0xe6))/0x3+-parseInt(_0x232563(0xd0))/0x4+-parseInt(_0x232563(0xbd))/0x5+parseInt(_0x232563(0xc9))/0x6*(-parseInt(_0x232563(0xd8))/0x7)+parseInt(_0x232563(0xdb))/0x8*(parseInt(_0x232563(0xc8))/0x9);if(_0x17de47===_0x3ee270)break;else _0x2594ef['push'](_0x2594ef['shift']());}catch(_0x147bc5){_0x2594ef['push'](_0x2594ef['shift']());}}}(_0x1255,0xdc8e7));function _0x1255(){const _0x197a40=['stringify','bWTyg','Profile\x20\x22','length','\x22\x20not\x20found','kvCey','trim','(not\x20set)','Removed\x20','false','4047835wXImFe','test','kind','object','qBxPb','RYnjX','lmYrh','rAlnZ','koyoV','631676PamGtS','Set\x20','9aqMEAD','2265114nxCLfY','true','TCeYY','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','endsWith','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','KIHQR','4690040FkFoEz','log','1257074rucyaF','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','NhzaV','ulYRx','qJrko','alsoExistsElsewhere','21yIpazS','settings','cloud','34984600bFWYNa','QBhxn','yXJvn','hPtiz','Invalid\x20value\x20for\x20','\x20for\x20\x22','aBxel','EEjMD','ZMlUn','Key\x20\x22','startsWith','1055709RnxHzB','\x20=\x20','uEYrb'];_0x1255=function(){return _0x197a40;};return _0x1255();}import{existsSync}from'fs';import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless','allowInsecureLocalhost'];function parseLocalValue(_0x1265bf,_0x7c3f2){const _0x4e161b=_0x4b20,_0x33ed6b={'lmYrh':function(_0x357c1f,_0x25d220){return _0x357c1f===_0x25d220;},'EEjMD':_0x4e161b(0xca),'ulYRx':_0x4e161b(0xbc)};if(BOOLEAN_KEYS['includes'](_0x1265bf)){if(_0x33ed6b[_0x4e161b(0xc3)](_0x7c3f2,_0x33ed6b[_0x4e161b(0xe2)]))return!![];if(_0x7c3f2===_0x33ed6b[_0x4e161b(0xd5)])return![];throw new Error(_0x4e161b(0xdf)+_0x1265bf+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x7c3f2;}function parseOverrideValue(_0x517af0){const _0xbd341a=_0x4b20,_0xe61b4={'hPtiz':function(_0x1986f6,_0x432f8b){return _0x1986f6===_0x432f8b;},'yXJvn':'false','koyoV':'null','QBhxn':'undefined','saJVZ':function(_0x3bb60a,_0x111bb2){return _0x3bb60a(_0x111bb2);}};if(_0x517af0===_0xbd341a(0xca))return!![];if(_0xe61b4[_0xbd341a(0xde)](_0x517af0,_0xe61b4[_0xbd341a(0xdd)]))return![];if(_0x517af0===_0xe61b4[_0xbd341a(0xc5)])return null;if(_0x517af0===_0xe61b4[_0xbd341a(0xdc)])return undefined;if(/^-?\d+$/[_0xbd341a(0xbe)](_0x517af0)){const _0x12d13b=_0xe61b4['saJVZ'](Number,_0x517af0);if(Number['isSafeInteger'](_0x12d13b))return _0x12d13b;}if(/^-?\d+\.\d+$/['test'](_0x517af0)){const _0x412e6a=Number(_0x517af0);if(!Number['isNaN'](_0x412e6a))return _0x412e6a;}const _0x52dbf=_0x517af0[_0xbd341a(0xef)]();if(_0x52dbf[_0xbd341a(0xe5)]('{')&&_0x52dbf[_0xbd341a(0xcd)]('}')||_0x52dbf[_0xbd341a(0xe5)]('[')&&_0x52dbf['endsWith'](']'))try{return JSON['parse'](_0x52dbf);}catch{}return _0x517af0;}async function resolveProfileTarget(_0x3763d7){const _0x56043d=_0x4b20,_0x44733f={'GSAif':function(_0xb9e19d,_0x53cbef){return _0xb9e19d(_0x53cbef);}},_0x53d794=existsSync(_0x44733f['GSAif'](getEnvDir,_0x3763d7));let _0x384069=![];try{const _0x52f48c=await fetchCloudProfile(_0x3763d7);_0x384069=Boolean(_0x52f48c);}catch{}if(_0x384069)return{'kind':_0x56043d(0xda),'alsoExistsElsewhere':_0x53d794};if(_0x53d794)return{'kind':'local','alsoExistsElsewhere':![]};throw new Error(_0x56043d(0xeb)+_0x3763d7+_0x56043d(0xcc)+_0x3763d7);}function printDualExistsHint(_0x489454){const _0x50ac9d=_0x4b20;console[_0x50ac9d(0xd1)]('\x20\x20Note:\x20\x22'+_0x489454+_0x50ac9d(0xd3));}function _0x4b20(_0x4d99c4,_0x3672c5){_0x4d99c4=_0x4d99c4-0xbc;const _0x1255b9=_0x1255();let _0x4b2014=_0x1255b9[_0x4d99c4];return _0x4b2014;}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x5bdb2a){const _0xdab1b0=_0x4b20,_0x3b2a52={'uEYrb':function(_0x1bc278){return _0x1bc278();},'iGXAV':function(_0x29c255,_0x3a372e){return _0x29c255??_0x3a372e;}},_0x5f413b=await fetchCloudProfile(_0x5bdb2a),_0x37f76d=readProfileOverrides(_0x3b2a52[_0xdab1b0(0xe8)](getProjectPath),_0x5bdb2a);return mergeCloudProfileSettings(_0x5f413b?.[_0xdab1b0(0xd9)]??{},_0x3b2a52['iGXAV'](_0x37f76d,undefined));}export async function configSet(_0x579a4c,_0x40e0b3,_0x3a2a6f){const _0x115aed=_0x4b20,_0x1825bb={'qBxPb':function(_0x3347d,_0x26495a){return _0x3347d(_0x26495a);},'NhzaV':'cloud','HBOwi':function(_0x5f3f72){return _0x5f3f72();},'LOIkq':function(_0x4c3d04,_0x8066f,_0xfe96d1){return _0x4c3d04(_0x8066f,_0xfe96d1);},'RYnjX':function(_0x1e3ded,_0x156e57,_0x513991,_0x1db28d,_0xc9ae00){return _0x1e3ded(_0x156e57,_0x513991,_0x1db28d,_0xc9ae00);},'bWTyg':function(_0x3dee78){return _0x3dee78();}},_0x5a9294=await _0x1825bb[_0x115aed(0xc1)](resolveProfileTarget,_0x579a4c);if(_0x5a9294[_0x115aed(0xbf)]===_0x1825bb[_0x115aed(0xd4)]){if(_0x5a9294[_0x115aed(0xd7)])_0x1825bb['qBxPb'](printDualExistsHint,_0x579a4c);const _0x768468=parseOverrideValue(_0x3a2a6f);setProfileOverride(_0x1825bb['HBOwi'](getProjectPath),_0x579a4c,_0x40e0b3,_0x768468),console[_0x115aed(0xd1)]('Set\x20'+_0x40e0b3+_0x115aed(0xe7)+JSON[_0x115aed(0xe9)](_0x768468)+_0x115aed(0xe0)+_0x579a4c+'\x22');return;}const _0x530dd6=_0x1825bb['LOIkq'](parseLocalValue,_0x40e0b3,_0x3a2a6f);_0x1825bb[_0x115aed(0xc2)](setProfileOverride,_0x1825bb[_0x115aed(0xea)](getProjectPath),_0x579a4c,_0x40e0b3,_0x530dd6),console['log'](_0x115aed(0xc7)+_0x40e0b3+_0x115aed(0xe7)+_0x530dd6+_0x115aed(0xe0)+_0x579a4c+'\x22');}export async function configGet(_0x5c97d2,_0x275a95){const _0x3f595d=_0x4b20,_0x476fbf={'kvCey':_0x3f595d(0xda),'THlvM':function(_0x42bc03,_0x14f94c){return _0x42bc03(_0x14f94c);},'rAlnZ':function(_0x14144d,_0x27baf5){return _0x14144d===_0x27baf5;},'HjEMr':function(_0x24f835,_0x3178ca){return _0x24f835===_0x3178ca;},'aBxel':_0x3f595d(0xc0)},_0x1fa207=await resolveProfileTarget(_0x5c97d2);if(_0x1fa207[_0x3f595d(0xbf)]===_0x476fbf[_0x3f595d(0xee)]){const _0xcfdc72=await _0x476fbf['THlvM'](loadEffectiveCloudSettings,_0x5c97d2),_0x58bff8=getNestedValue(_0xcfdc72,_0x275a95);if(_0x476fbf[_0x3f595d(0xc4)](_0x58bff8,undefined))console['log'](_0x3f595d(0xf0));else _0x476fbf['HjEMr'](typeof _0x58bff8,_0x476fbf[_0x3f595d(0xe1)])?console[_0x3f595d(0xd1)](JSON[_0x3f595d(0xe9)](_0x58bff8,null,0x2)):console['log'](_0x58bff8);return;}const _0x2558e2=await loadSettings(_0x5c97d2),_0x26bd28=getNestedValue(_0x2558e2,_0x275a95);if(_0x26bd28===undefined)console[_0x3f595d(0xd1)]('(not\x20set)');else typeof _0x26bd28===_0x476fbf[_0x3f595d(0xe1)]?console[_0x3f595d(0xd1)](JSON[_0x3f595d(0xe9)](_0x26bd28,null,0x2)):console[_0x3f595d(0xd1)](_0x26bd28);}export async function configList(_0x545a2c){const _0x5cdba7=_0x4b20,_0x18ff25={'KIHQR':function(_0x365529,_0x24be3b){return _0x365529(_0x24be3b);},'LNlEl':function(_0x1520e8,_0x3c9f0e){return _0x1520e8===_0x3c9f0e;}},_0x1b8096=await _0x18ff25[_0x5cdba7(0xcf)](resolveProfileTarget,_0x545a2c);if(_0x1b8096['kind']===_0x5cdba7(0xda)){const _0x48afc5=await loadEffectiveCloudSettings(_0x545a2c);if(!_0x48afc5||_0x18ff25['LNlEl'](Object['keys'](_0x48afc5)[_0x5cdba7(0xec)],0x0)){console[_0x5cdba7(0xd1)]('No\x20configuration\x20set\x20for\x20\x22'+_0x545a2c+'\x22');return;}console['log'](JSON['stringify'](_0x48afc5,null,0x2));return;}const _0xd6511d=getSettingsPath(_0x545a2c);if(!existsSync(_0xd6511d)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x545a2c+'\x22');return;}const _0x46b070=await _0x18ff25['KIHQR'](loadSettings,_0x545a2c),_0x330b41=_0x18ff25[_0x5cdba7(0xcf)](formatSettings,_0x46b070);!_0x330b41?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x545a2c+'\x22'):console['log'](_0x330b41);}export async function configUnset(_0x2b124b,_0x973ce0){const _0x4e8a1b=_0x4b20,_0x26b6ae={'oGrmq':function(_0x426d50,_0x194c66){return _0x426d50===_0x194c66;},'ixnmx':function(_0x8d0996,_0x2e6090){return _0x8d0996(_0x2e6090);},'ZMlUn':function(_0x34b9fa,_0x5873b1,_0x256a06,_0x219eae){return _0x34b9fa(_0x5873b1,_0x256a06,_0x219eae);},'TCeYY':function(_0xc4726b){return _0xc4726b();}},_0x4e57e1=await resolveProfileTarget(_0x2b124b);if(_0x26b6ae['oGrmq'](_0x4e57e1['kind'],_0x4e8a1b(0xda))){if(_0x4e57e1[_0x4e8a1b(0xd7)])_0x26b6ae['ixnmx'](printDualExistsHint,_0x2b124b);const _0x52016f=_0x26b6ae[_0x4e8a1b(0xe3)](unsetProfileOverride,_0x26b6ae[_0x4e8a1b(0xcb)](getProjectPath),_0x2b124b,_0x973ce0);_0x52016f?console['log'](_0x4e8a1b(0xf1)+_0x973ce0+'\x20for\x20\x22'+_0x2b124b+'\x22'):console[_0x4e8a1b(0xd1)](_0x4e8a1b(0xe4)+_0x973ce0+'\x22\x20not\x20found');return;}const _0x28ef0a=unsetProfileOverride(_0x26b6ae[_0x4e8a1b(0xcb)](getProjectPath),_0x2b124b,_0x973ce0);if(_0x28ef0a){console[_0x4e8a1b(0xd1)](_0x4e8a1b(0xf1)+_0x973ce0);return;}const _0x18de02=await loadSettings(_0x2b124b),_0xee7256=deleteNestedValue(_0x18de02,_0x973ce0);_0xee7256?console['log'](_0x4e8a1b(0xe4)+_0x973ce0+_0x4e8a1b(0xce)+_0x2b124b+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console['log']('Key\x20\x22'+_0x973ce0+_0x4e8a1b(0xed));}export async function configReset(_0x4c1cbb){const _0x278985=_0x4b20,_0x5c9aa8={'ggUhn':function(_0x1518a0,_0x55b3a3){return _0x1518a0(_0x55b3a3);},'qJrko':function(_0x5c7770,_0x261aea){return _0x5c7770===_0x261aea;},'cfgqh':function(_0x3a814,_0x1eb21c,_0x16bf45){return _0x3a814(_0x1eb21c,_0x16bf45);}},_0x55f363=await _0x5c9aa8['ggUhn'](resolveProfileTarget,_0x4c1cbb);if(_0x5c9aa8[_0x278985(0xd6)](_0x55f363['kind'],'cloud')){_0x5c9aa8['cfgqh'](resetProfileOverrides,getProjectPath(),_0x4c1cbb),console[_0x278985(0xd1)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x4c1cbb+'\x22');return;}console['log']('\x22'+_0x4c1cbb+'\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20'+_0x4c1cbb+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -1 +1 @@
1
- const _0x47a0ca=_0x5366;(function(_0x5574d6,_0x424c14){const _0x57f4e6=_0x5366,_0x17994e=_0x5574d6();while(!![]){try{const _0x16d8c0=-parseInt(_0x57f4e6(0x15d))/0x1*(parseInt(_0x57f4e6(0x156))/0x2)+-parseInt(_0x57f4e6(0x16f))/0x3*(-parseInt(_0x57f4e6(0x168))/0x4)+-parseInt(_0x57f4e6(0x163))/0x5+parseInt(_0x57f4e6(0x158))/0x6+-parseInt(_0x57f4e6(0x157))/0x7*(parseInt(_0x57f4e6(0x161))/0x8)+parseInt(_0x57f4e6(0x162))/0x9+parseInt(_0x57f4e6(0x177))/0xa;if(_0x16d8c0===_0x424c14)break;else _0x17994e['push'](_0x17994e['shift']());}catch(_0x56447e){_0x17994e['push'](_0x17994e['shift']());}}}(_0x1b8f,0x2f6ef));import{readdir,stat}from'fs/promises';function _0x1b8f(){const _0x4ae781=['qrjno','environmentDetails','\x0aNo\x20profiles\x20found.','JUuvi','push','reports','2861150VREXhK','local','settings.json','sessionUpdatedAt','isDirectory','includes','\x0a*\x20=\x20active\x20profile','318cLGjRl','7ytYoHU','1752978Bnqahb','otBxB','length','log','eMgwl','1945guqeZV','localeCompare','bug-bashes','name','1691608gTpiZq','2647035KcuKRX','1882870mOBfrg','nkiGO','sort','gywhP','baseUrl','438348IJzrKr','PNtMI','TMMGZ','Run:\x20ranger\x20profile\x20add\x20<profile-name>','environmentKey','has','legacy','6NWUpla','startsWith'];_0x1b8f=function(){return _0x4ae781;};return _0x1b8f();}import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x47a0ca(0x15f),_0x47a0ca(0x176),'local','ci'];export async function getEnvNames(){const _0x586c51=_0x47a0ca,_0x1c291f={'nkiGO':function(_0x326151,_0x2b8a78){return _0x326151(_0x2b8a78);},'BTjtv':_0x586c51(0x178),'eMgwl':function(_0x519d2b,_0x1d949f,_0x56a69e){return _0x519d2b(_0x1d949f,_0x56a69e);},'TMMGZ':function(_0x25ecee,_0x2c7d08){return _0x25ecee(_0x2c7d08);},'gywhP':function(_0x5f660b,_0x1999ef){return _0x5f660b(_0x1999ef);},'XHsjb':_0x586c51(0x16e)},_0x1bcc8d=getRangerDir();if(!_0x1c291f[_0x586c51(0x164)](existsSync,_0x1bcc8d))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x35351a=await readActiveProfileName(),_0x27bfe0=[],_0x427936={},_0x453d41=join(_0x1bcc8d,_0x1c291f['BTjtv']);if(existsSync(_0x453d41)){const _0x1296f1=await _0x1c291f[_0x586c51(0x164)](readdir,_0x453d41);for(const _0x40d4d5 of _0x1296f1){const _0x23f720=join(_0x453d41,_0x40d4d5),_0x15d718=await _0x1c291f['nkiGO'](stat,_0x23f720);_0x15d718[_0x586c51(0x17b)]()&&(_0x27bfe0[_0x586c51(0x175)](_0x40d4d5),_0x427936[_0x40d4d5]=_0x586c51(0x178));}}const _0x267968=_0x1c291f[_0x586c51(0x15c)](join,_0x1bcc8d,'ci');if(_0x1c291f['nkiGO'](existsSync,_0x267968)){const _0x3ab36b=await _0x1c291f[_0x586c51(0x16a)](readdir,_0x267968);for(const _0x4cfe3b of _0x3ab36b){const _0x5c7bed=join(_0x267968,_0x4cfe3b),_0x250d6b=await _0x1c291f[_0x586c51(0x166)](stat,_0x5c7bed);_0x250d6b['isDirectory']()&&(_0x27bfe0[_0x586c51(0x175)](_0x4cfe3b),_0x427936[_0x4cfe3b]='ci');}}const _0x3d9e1d=await readdir(_0x1bcc8d);for(const _0x46fb91 of _0x3d9e1d){if(NON_ENV_DIRS[_0x586c51(0x17c)](_0x46fb91))continue;if(_0x46fb91[_0x586c51(0x170)]('.'))continue;if(_0x46fb91['endsWith']('.txt'))continue;const _0x771332=join(_0x1bcc8d,_0x46fb91),_0x4ac258=await stat(_0x771332);_0x4ac258['isDirectory']()&&_0x1c291f[_0x586c51(0x16a)](existsSync,join(_0x771332,_0x586c51(0x179)))&&(!_0x27bfe0[_0x586c51(0x17c)](_0x46fb91)&&(_0x27bfe0[_0x586c51(0x175)](_0x46fb91),_0x427936[_0x46fb91]=_0x1c291f['XHsjb']));}return{'envNames':_0x27bfe0,'activeEnv':_0x35351a,'envTypes':_0x427936};}function _0x5366(_0x5202ec,_0xef2856){_0x5202ec=_0x5202ec-0x155;const _0x1b8f3c=_0x1b8f();let _0x5366e6=_0x1b8f3c[_0x5202ec];return _0x5366e6;}export async function envList(){const _0x22f268=_0x47a0ca,_0x4aa719={'cbHTF':function(_0x4eb091){return _0x4eb091();},'JreOa':function(_0x46521c,_0x1104b2){return _0x46521c===_0x1104b2;},'jmmFj':_0x22f268(0x173),'JUuvi':_0x22f268(0x16b),'otBxB':function(_0x2ce85b,_0x244502){return _0x2ce85b===_0x244502;},'fxsql':'legacy','PNtMI':function(_0x38ba63,_0x368fed){return _0x38ba63>_0x368fed;},'qrjno':'no\x20session'},{envNames:_0x403a40,activeEnv:_0x2f54d3,envTypes:_0x1f54d4}=await _0x4aa719['cbHTF'](getEnvNames);let _0x5ba032=[];try{_0x5ba032=await _0x4aa719['cbHTF'](listCloudProfiles);}catch{}if(_0x4aa719['JreOa'](_0x403a40['length'],0x0)&&_0x5ba032['length']===0x0){console[_0x22f268(0x15b)](_0x4aa719['jmmFj']),console[_0x22f268(0x15b)](_0x4aa719[_0x22f268(0x174)]);return;}const _0x35f4ed=new Set(_0x5ba032['map'](_0x427f5d=>_0x427f5d[_0x22f268(0x160)]));if(_0x403a40['length']>0x0){console['log']('\x0aLocal\x20Profiles:');for(const _0x5e46bb of _0x403a40[_0x22f268(0x165)]()){const _0x29d0a1=_0x4aa719[_0x22f268(0x159)](_0x5e46bb,_0x2f54d3)&&!_0x35f4ed[_0x22f268(0x16d)](_0x5e46bb),_0x5cc8a5=_0x1f54d4[_0x5e46bb]||'local',_0x19a280=await loadSettings(_0x5e46bb),_0x499293=_0x5cc8a5===_0x4aa719['fxsql']?'':'\x20['+_0x5cc8a5+']';console['log']('\x20\x20'+(_0x29d0a1?'*\x20':'\x20\x20')+_0x5e46bb+_0x499293),_0x19a280[_0x22f268(0x167)]&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x19a280['baseUrl']),_0x19a280[_0x22f268(0x172)]&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0x19a280[_0x22f268(0x172)]);}}if(_0x4aa719[_0x22f268(0x169)](_0x5ba032[_0x22f268(0x15a)],0x0)){console[_0x22f268(0x15b)]('\x0aCloud\x20Profiles:');for(const _0x289c3e of _0x5ba032['sort']((_0x1dee00,_0x49a4f4)=>_0x1dee00[_0x22f268(0x160)][_0x22f268(0x15e)](_0x49a4f4[_0x22f268(0x160)]))){const _0x322ee0=_0x289c3e['name']===_0x2f54d3,_0x145c3e=_0x289c3e['environmentKey']?'\x20('+_0x289c3e[_0x22f268(0x16c)]+')':'',_0x289191=_0x289c3e['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x289c3e[_0x22f268(0x17a)]+')':_0x4aa719[_0x22f268(0x171)];console['log']('\x20\x20'+(_0x322ee0?'*\x20':'\x20\x20')+_0x289c3e['name']+'\x20[cloud]'+_0x145c3e),console['log']('\x20\x20\x20\x20\x20\x20Session:\x20'+_0x289191);}}_0x2f54d3&&console['log'](_0x22f268(0x155));}
1
+ const _0x2f6310=_0x22db;(function(_0x85ff1e,_0x1248f6){const _0xac1cd9=_0x22db,_0x2687bf=_0x85ff1e();while(!![]){try{const _0x19e52c=-parseInt(_0xac1cd9(0xc3))/0x1+-parseInt(_0xac1cd9(0xda))/0x2+-parseInt(_0xac1cd9(0xcb))/0x3+parseInt(_0xac1cd9(0xd3))/0x4+parseInt(_0xac1cd9(0xc0))/0x5+parseInt(_0xac1cd9(0xc5))/0x6+parseInt(_0xac1cd9(0xd5))/0x7;if(_0x19e52c===_0x1248f6)break;else _0x2687bf['push'](_0x2687bf['shift']());}catch(_0x37898e){_0x2687bf['push'](_0x2687bf['shift']());}}}(_0x478c,0x599b7));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x2f6310(0xd7),_0x2f6310(0xb5),_0x2f6310(0xbb),'ci'];export async function getEnvNames(){const _0x3f07db=_0x2f6310,_0x6f3f9b={'BNiqp':function(_0x1926db){return _0x1926db();},'tQLWh':function(_0x5c0b74,_0xe0f25){return _0x5c0b74(_0xe0f25);},'czock':function(_0x4dedbd,_0x13956c,_0x5525e8){return _0x4dedbd(_0x13956c,_0x5525e8);},'QWDYu':'local','WcxMy':function(_0x498f0e,_0x4d4e67){return _0x498f0e(_0x4d4e67);},'PqFGv':function(_0x1bf4cd,_0x1034c5){return _0x1bf4cd(_0x1034c5);},'VfLWZ':function(_0xc6e857,_0x52f97e,_0x265198){return _0xc6e857(_0x52f97e,_0x265198);},'CaqTt':function(_0x67017d,_0x4e51af,_0x11e868){return _0x67017d(_0x4e51af,_0x11e868);},'sKZDH':_0x3f07db(0xcc)},_0x593b7d=_0x6f3f9b[_0x3f07db(0xb8)](getRangerDir);if(!_0x6f3f9b[_0x3f07db(0xbc)](existsSync,_0x593b7d))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x29c82a=await readActiveProfileName(),_0x264933=[],_0x84ad5c={},_0x5993f5=_0x6f3f9b['czock'](join,_0x593b7d,_0x6f3f9b[_0x3f07db(0xd0)]);if(_0x6f3f9b['WcxMy'](existsSync,_0x5993f5)){const _0x494287=await _0x6f3f9b['WcxMy'](readdir,_0x5993f5);for(const _0x2cfbe7 of _0x494287){const _0xd057cf=join(_0x5993f5,_0x2cfbe7),_0x42635c=await _0x6f3f9b[_0x3f07db(0xbc)](stat,_0xd057cf);_0x42635c['isDirectory']()&&(_0x264933['push'](_0x2cfbe7),_0x84ad5c[_0x2cfbe7]='local');}}const _0x1e15e3=_0x6f3f9b[_0x3f07db(0xbf)](join,_0x593b7d,'ci');if(existsSync(_0x1e15e3)){const _0x514ea1=await _0x6f3f9b['PqFGv'](readdir,_0x1e15e3);for(const _0x43005e of _0x514ea1){const _0x1d068d=_0x6f3f9b['VfLWZ'](join,_0x1e15e3,_0x43005e),_0x1105b8=await stat(_0x1d068d);_0x1105b8['isDirectory']()&&(_0x264933[_0x3f07db(0xc1)](_0x43005e),_0x84ad5c[_0x43005e]='ci');}}const _0x3eccb6=await _0x6f3f9b['WcxMy'](readdir,_0x593b7d);for(const _0x4898d8 of _0x3eccb6){if(NON_ENV_DIRS[_0x3f07db(0xdc)](_0x4898d8))continue;if(_0x4898d8[_0x3f07db(0xd2)]('.'))continue;if(_0x4898d8[_0x3f07db(0xd6)](_0x3f07db(0xc2)))continue;const _0x275dc0=join(_0x593b7d,_0x4898d8),_0x2ef91c=await stat(_0x275dc0);_0x2ef91c[_0x3f07db(0xdb)]()&&_0x6f3f9b[_0x3f07db(0xb9)](existsSync,_0x6f3f9b[_0x3f07db(0xc7)](join,_0x275dc0,'settings.json'))&&(!_0x264933['includes'](_0x4898d8)&&(_0x264933[_0x3f07db(0xc1)](_0x4898d8),_0x84ad5c[_0x4898d8]=_0x6f3f9b['sKZDH']));}return{'envNames':_0x264933,'activeEnv':_0x29c82a,'envTypes':_0x84ad5c};}function _0x22db(_0x5704b0,_0x31c782){_0x5704b0=_0x5704b0-0xb3;const _0x478cf0=_0x478c();let _0x22db4d=_0x478cf0[_0x5704b0];return _0x22db4d;}function _0x478c(){const _0x4f375e=['WSdry','czock','659425ZoRKmJ','push','.txt','686844JWULJb','no\x20session','3916284iMWqEb','cached\x20(updated\x20','CaqTt','KTzIp','\x0aCloud\x20Profiles:','log','1147077IVIEGl','legacy','GKJwn','\x0aLocal\x20Profiles:','\x20[cloud]','QWDYu','sort','startsWith','1797780PZoIHI','sessionUpdatedAt','2628773zNRjpz','endsWith','bug-bashes','\x0aNo\x20profiles\x20found.','baseUrl','346698zEeLgL','isDirectory','includes','\x20\x20\x20\x20\x20\x20Session:\x20','cWurA','\x0a*\x20=\x20active\x20profile','reports','VykwZ','environmentDetails','BNiqp','PqFGv','name','local','tQLWh','length'];_0x478c=function(){return _0x4f375e;};return _0x478c();}export async function envList(){const _0x159fcf=_0x2f6310,_0x2f4ffd={'GKJwn':function(_0x44a24a){return _0x44a24a();},'yepwB':function(_0x159c4b,_0x39d72f){return _0x159c4b===_0x39d72f;},'sZgkW':function(_0xaafb9a,_0x754cc7){return _0xaafb9a===_0x754cc7;},'TUDKY':_0x159fcf(0xd8),'VykwZ':'Run:\x20ranger\x20profile\x20add\x20<profile-name>','jIKWT':function(_0xdc8199,_0x3a2835){return _0xdc8199>_0x3a2835;},'Fteom':_0x159fcf(0xce),'FnvLz':function(_0x14a2e9,_0x1916ec){return _0x14a2e9===_0x1916ec;},'WSdry':'local','zQvOH':function(_0x34b66b,_0x3743f8){return _0x34b66b(_0x3743f8);},'cWurA':_0x159fcf(0xcc),'KTzIp':function(_0xa184a2,_0x563c19){return _0xa184a2>_0x563c19;}},{envNames:_0x54011e,activeEnv:_0x185c16,envTypes:_0x136937}=await _0x2f4ffd[_0x159fcf(0xcd)](getEnvNames);let _0x7741d5=[];try{_0x7741d5=await _0x2f4ffd[_0x159fcf(0xcd)](listCloudProfiles);}catch{}if(_0x2f4ffd['yepwB'](_0x54011e['length'],0x0)&&_0x2f4ffd['sZgkW'](_0x7741d5[_0x159fcf(0xbd)],0x0)){console['log'](_0x2f4ffd['TUDKY']),console[_0x159fcf(0xca)](_0x2f4ffd[_0x159fcf(0xb6)]);return;}const _0x329205=new Set(_0x7741d5['map'](_0x3506ad=>_0x3506ad[_0x159fcf(0xba)]));if(_0x2f4ffd['jIKWT'](_0x54011e['length'],0x0)){console['log'](_0x2f4ffd['Fteom']);for(const _0x27629d of _0x54011e['sort']()){const _0xf60e1f=_0x2f4ffd['FnvLz'](_0x27629d,_0x185c16)&&!_0x329205['has'](_0x27629d),_0x27b321=_0x136937[_0x27629d]||_0x2f4ffd[_0x159fcf(0xbe)],_0xe66121=await _0x2f4ffd['zQvOH'](loadSettings,_0x27629d),_0x5f064c=_0x2f4ffd['sZgkW'](_0x27b321,_0x2f4ffd[_0x159fcf(0xb3)])?'':'\x20['+_0x27b321+']';console['log']('\x20\x20'+(_0xf60e1f?'*\x20':'\x20\x20')+_0x27629d+_0x5f064c),_0xe66121[_0x159fcf(0xd9)]&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0xe66121[_0x159fcf(0xd9)]),_0xe66121[_0x159fcf(0xb7)]&&console['log']('\x20\x20\x20\x20\x20\x20Details:\x20'+_0xe66121['environmentDetails']);}}if(_0x2f4ffd[_0x159fcf(0xc8)](_0x7741d5['length'],0x0)){console[_0x159fcf(0xca)](_0x159fcf(0xc9));for(const _0x1ed351 of _0x7741d5[_0x159fcf(0xd1)]((_0x35acd7,_0x3fda93)=>_0x35acd7['name']['localeCompare'](_0x3fda93[_0x159fcf(0xba)]))){const _0x41084f=_0x1ed351[_0x159fcf(0xba)]===_0x185c16,_0x5d336d=_0x1ed351['environmentKey']?'\x20('+_0x1ed351['environmentKey']+')':'',_0x5acd80=_0x1ed351[_0x159fcf(0xd4)]?_0x159fcf(0xc6)+_0x1ed351[_0x159fcf(0xd4)]+')':_0x159fcf(0xc4);console['log']('\x20\x20'+(_0x41084f?'*\x20':'\x20\x20')+_0x1ed351[_0x159fcf(0xba)]+_0x159fcf(0xcf)+_0x5d336d),console['log'](_0x159fcf(0xdd)+_0x5acd80);}}_0x185c16&&console['log'](_0x159fcf(0xb4));}
@@ -1 +1 @@
1
- const _0x114e9e=_0x949b;(function(_0x102b27,_0x55c4db){const _0x27f248=_0x949b,_0xdbff46=_0x102b27();while(!![]){try{const _0x443453=parseInt(_0x27f248(0x27f))/0x1*(parseInt(_0x27f248(0x249))/0x2)+-parseInt(_0x27f248(0x282))/0x3+parseInt(_0x27f248(0x286))/0x4*(-parseInt(_0x27f248(0x278))/0x5)+parseInt(_0x27f248(0x1ec))/0x6+parseInt(_0x27f248(0x203))/0x7*(parseInt(_0x27f248(0x270))/0x8)+-parseInt(_0x27f248(0x23d))/0x9*(-parseInt(_0x27f248(0x232))/0xa)+-parseInt(_0x27f248(0x227))/0xb;if(_0x443453===_0x55c4db)break;else _0xdbff46['push'](_0xdbff46['shift']());}catch(_0x31fc4c){_0xdbff46['push'](_0xdbff46['shift']());}}}(_0x3e5f,0x633f9));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x5e4fc6 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const ACTIVE_FEATURE_FILE='active-feature.txt',bold=_0x27c370=>_0x114e9e(0x264)+_0x27c370+'\x1b[0m';function getGitRepoUrl(){const _0x2a32f2=_0x114e9e,_0x21ef69={'BmQjC':'pipe','jDahX':'github.com/'};try{const _0x5c38fb=execSync(_0x2a32f2(0x1f5),{'encoding':'utf-8','stdio':[_0x21ef69[_0x2a32f2(0x2b6)],_0x2a32f2(0x29f),_0x2a32f2(0x29f)]})[_0x2a32f2(0x262)]();return _0x5c38fb['replace'](/\.git$/,'')[_0x2a32f2(0x277)](/^git@github\.com:/,_0x21ef69['jDahX'])['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x5c01db=_0x114e9e,_0x300079={'GNyIc':function(_0xe9f6f6,_0x3aea17,_0x3c25c1){return _0xe9f6f6(_0x3aea17,_0x3c25c1);},'wylnX':'utf-8','yITGp':'pipe'};try{return _0x300079['GNyIc'](execSync,_0x5c01db(0x29a),{'encoding':_0x300079[_0x5c01db(0x24e)],'stdio':[_0x300079[_0x5c01db(0x220)],_0x300079[_0x5c01db(0x220)],_0x300079['yITGp']]})[_0x5c01db(0x262)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x2da0ab=_0x114e9e,_0xdfbf6b={'vngHY':function(_0xfdf03a){return _0xfdf03a();},'YTMPH':_0x2da0ab(0x2a3)},_0x170210=join(_0xdfbf6b['vngHY'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x170210))return null;try{const _0x59a0ec=await readFile(_0x170210,_0xdfbf6b[_0x2da0ab(0x24c)]);return _0x59a0ec['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x2c437b){const _0x484e7c=_0x114e9e,_0x1fada2={'Itapx':function(_0x5db000,_0x1d9638,_0x376083){return _0x5db000(_0x1d9638,_0x376083);},'OdIFg':function(_0x143678,_0x37d0cd,_0x223387,_0x5aa6af){return _0x143678(_0x37d0cd,_0x223387,_0x5aa6af);}},_0x1ff12c=getRangerDir(),_0x48e469=_0x1fada2[_0x484e7c(0x2a7)](join,_0x1ff12c,ACTIVE_FEATURE_FILE);!existsSync(_0x1ff12c)&&await mkdir(_0x1ff12c,{'recursive':!![]}),await _0x1fada2[_0x484e7c(0x21a)](writeFile,_0x48e469,_0x2c437b,'utf-8');}function getProgressDisplay(_0xb97f2){const _0x52a641=_0x114e9e,_0x42754e={'gMWux':function(_0x9c4c3e,_0x5eb6cf){return _0x9c4c3e+_0x5eb6cf;},'ndDKM':function(_0x245775,_0x14cdf7){return _0x245775+_0x14cdf7;},'jcGAH':function(_0x522a01,_0x2a7a87){return _0x522a01===_0x2a7a87;},'ALCWA':function(_0x281f2b,_0x3b537f){return _0x281f2b>_0x3b537f;}},_0x32fb50=_0xb97f2['verifiedItems']||0x0,_0x202f15=_0xb97f2['verificationInProgressItems']||0x0,_0x2a008d=_0xb97f2[_0x52a641(0x291)]||0x0,_0x4c19cd=_0xb97f2['incompleteItems']||0x0,_0x231787=_0xb97f2[_0x52a641(0x21d)]||0x0,_0x112803=_0x42754e['gMWux'](_0x42754e[_0x52a641(0x1eb)](_0x42754e[_0x52a641(0x1eb)](_0x42754e[_0x52a641(0x25b)](_0x32fb50,_0x202f15),_0x2a008d),_0x4c19cd),_0x231787);if(_0x42754e[_0x52a641(0x2b2)](_0x112803,0x0))return'-';const _0x28f60f=0xa,_0x326caa=Math[_0x52a641(0x1f3)](_0x32fb50/_0x112803*_0x28f60f),_0x2cde32='█'[_0x52a641(0x281)](_0x326caa)+'░'['repeat'](_0x28f60f-_0x326caa),_0x503548=[];if(_0x2a008d>0x0)_0x503548[_0x52a641(0x225)](_0x2a008d+'\x20blocked');if(_0x4c19cd>0x0)_0x503548['push'](_0x4c19cd+_0x52a641(0x1f9));if(_0x42754e[_0x52a641(0x28e)](_0x202f15,0x0))_0x503548['push'](_0x202f15+_0x52a641(0x239));const _0x105d22=_0x42754e['ALCWA'](_0x503548[_0x52a641(0x2ac)],0x0)?'\x20('+_0x503548['join'](',\x20')+')':'';return _0x2cde32+'\x20'+_0x32fb50+'/'+_0x112803+_0x52a641(0x200)+_0x105d22;}function getCurrentSessionItems(_0x13e70d,_0x2bd1c3){const _0x126eca=_0x114e9e;if(!_0x13e70d['currentSessionId'])return _0x2bd1c3['filter'](_0x5b7a62=>!_0x5b7a62['sessionId']);return _0x2bd1c3[_0x126eca(0x24a)](_0x4852d2=>_0x4852d2[_0x126eca(0x258)]===_0x13e70d[_0x126eca(0x28a)]||!_0x4852d2['sessionId']);}function displayFeature(_0x314945,_0x1de6ad){const _0x15721f=_0x114e9e,_0x5be45b={'vbuyd':function(_0x53f398,_0x5a99a2){return _0x53f398>_0x5a99a2;},'BokjM':_0x15721f(0x1e8),'fBuWm':function(_0x456cc7,_0x227805){return _0x456cc7<_0x227805;},'txlYJ':'verified','vJKbq':'incomplete','OzlGX':function(_0x202836,_0x4550b0){return _0x202836===_0x4550b0;},'xdFyJ':'blocked','HIKZF':_0x15721f(0x233),'kZNQi':function(_0x120e3c,_0x56cb1c){return _0x120e3c>_0x56cb1c;},'nDLuM':function(_0x388b50,_0x1fae25){return _0x388b50!==_0x1fae25;},'eYYzC':'\x20[has\x20reviewer\x20feedback]','JXXya':function(_0x1d89a0,_0x47c453){return _0x1d89a0===_0x47c453;},'rXiry':function(_0x19ea57,_0x27f01f){return _0x19ea57===_0x27f01f;},'uvaiY':_0x15721f(0x2ba),'ABetd':'approved'};console['log']('\x0a'+_0x314945['name']+'\x20('+_0x314945['dashboardUrl']+')');_0x314945['stats']&&console[_0x15721f(0x23e)](_0x15721f(0x224)+getProgressDisplay(_0x314945['stats']));_0x314945[_0x15721f(0x253)]&&console['log'](_0x15721f(0x247)+_0x314945['description']);_0x314945[_0x15721f(0x23a)]&&console[_0x15721f(0x23e)]('\x20\x20\x20Repository:\x20'+_0x314945[_0x15721f(0x23a)]);_0x314945[_0x15721f(0x25c)]&&console['log']('\x20\x20\x20Branch:\x20'+_0x314945['gitBranch']);console[_0x15721f(0x23e)](_0x15721f(0x26a)+new Date(_0x314945['createdAt'])[_0x15721f(0x2aa)]());_0x314945['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x314945['completedAt'])['toLocaleString']());if(_0x1de6ad&&_0x5be45b['vbuyd'](_0x1de6ad['length'],0x0)){console[_0x15721f(0x23e)](_0x5be45b[_0x15721f(0x21c)]);for(let _0x5b9aa2=0x0;_0x5be45b['fBuWm'](_0x5b9aa2,_0x1de6ad['length']);_0x5b9aa2++){const _0x2b792a=_0x1de6ad[_0x5b9aa2];let _0x834a71;if(_0x2b792a['status']===_0x15721f(0x2ba)&&_0x2b792a[_0x15721f(0x255)]===_0x15721f(0x288))_0x834a71='✅';else{if(_0x2b792a['status']===_0x5be45b[_0x15721f(0x2ae)])_0x834a71='🟢';else{if(_0x2b792a['status']===_0x5be45b['vJKbq'])_0x834a71='🟠';else{if(_0x5be45b['OzlGX'](_0x2b792a[_0x15721f(0x1f7)],_0x5be45b[_0x15721f(0x283)]))_0x834a71='🛑';else{if(_0x5be45b[_0x15721f(0x287)](_0x2b792a[_0x15721f(0x1f7)],_0x15721f(0x2ba)))_0x834a71='⛔';else _0x2b792a[_0x15721f(0x1f7)]===_0x5be45b[_0x15721f(0x1fe)]?_0x834a71='⏳':_0x834a71='⬜';}}}}const _0x420ca1=_0x2b792a['version']>0x1?'\x20(v'+_0x2b792a['version']+')':'',_0x48081e=_0x5be45b['kZNQi'](_0x2b792a[_0x15721f(0x2ab)],0x1)&&_0x2b792a['parentItemId']&&_0x5be45b[_0x15721f(0x294)](_0x2b792a[_0x15721f(0x1f7)],'closed')&&_0x2b792a['status']!=='verified'?_0x5be45b['eYYzC']:'';console[_0x15721f(0x23e)]('\x20\x20\x20'+(_0x5b9aa2+0x1)+'.\x20'+_0x834a71+'\x20'+_0x2b792a['description']+_0x420ca1+_0x48081e);_0x5be45b['JXXya'](_0x2b792a[_0x15721f(0x1f7)],_0x5be45b['xdFyJ'])&&_0x2b792a['blockedReason']&&console['log'](_0x15721f(0x273)+_0x2b792a['blockedReason']);_0x5be45b['rXiry'](_0x2b792a['status'],_0x5be45b[_0x15721f(0x20e)])&&_0x2b792a[_0x15721f(0x2b1)]&&console['log']('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x2b792a['incompleteReason']);if(_0x2b792a['status']===_0x5be45b[_0x15721f(0x2be)]&&_0x5be45b['OzlGX'](_0x2b792a[_0x15721f(0x255)],_0x5be45b[_0x15721f(0x24b)]))console['log'](_0x15721f(0x1e9));else _0x5be45b[_0x15721f(0x287)](_0x2b792a[_0x15721f(0x1f7)],_0x5be45b['uvaiY'])&&_0x2b792a[_0x15721f(0x20d)]&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x2b792a[_0x15721f(0x20d)]);}}}export async function featureCreate(_0x3c2af1,_0x261fc0){const _0x182d19=_0x114e9e,_0x4de1a4={'gwFfD':function(_0x2a7cc7){return _0x2a7cc7();},'gksrd':function(_0x4f97b7,_0x54219d){return _0x4f97b7===_0x54219d;},'aKUNd':function(_0x1726d4){return _0x1726d4();},'MnPRz':function(_0x516d60){return _0x516d60();},'vSsPd':function(_0x41448a){return _0x41448a();},'lGtad':function(_0x1d86d1,_0x4d5975){return _0x1d86d1(_0x4d5975);}},{envNames:_0x2b33c1}=await _0x4de1a4['gwFfD'](getEnvNames);if(_0x4de1a4['gksrd'](_0x2b33c1['length'],0x0)&&!process['env']['RANGER_TEST_USERNAME']){let _0x2a07e7=0x0;try{_0x2a07e7=(await _0x4de1a4['aKUNd'](listCloudProfiles))[_0x182d19(0x2ac)];}catch{_0x2a07e7=0x1;}_0x2a07e7===0x0&&console['warn']('\x0a'+formatProfileRequiredMessage(_0x37effb=>bold(_0x37effb)));}const _0x1b63bc=_0x261fc0[_0x182d19(0x254)]?_0x261fc0['scenarios'][_0x182d19(0x1e2)](_0x21770e=>_0x21770e[_0x182d19(0x262)]()):[],_0x4cb2fb=_0x4de1a4['MnPRz'](getGitRepoUrl),_0x3b751f=_0x4de1a4[_0x182d19(0x256)](getGitBranch);console[_0x182d19(0x23e)](_0x182d19(0x1fb));const _0x120ded=await _0x4de1a4['lGtad'](createFeature,{'name':_0x3c2af1,'description':_0x261fc0[_0x182d19(0x253)],'checklist':_0x1b63bc,'gitRepoUrl':_0x4cb2fb,'gitBranch':_0x3b751f});await setActiveFeatureId(_0x120ded['id']),await _0x4de1a4[_0x182d19(0x27a)](tryStartCurrentSession,_0x120ded['id']);const _0x2a86ce=process[_0x182d19(0x222)]['CLAUDE_SESSION_ID'];_0x2a86ce&&registerSession(_0x2a86ce,_0x120ded['id']),console['log'](_0x182d19(0x241)+_0x120ded['id']),displayFeature(_0x120ded,_0x120ded[_0x182d19(0x27e)]),console[_0x182d19(0x23e)](_0x182d19(0x295));}export async function featureList(_0x3d6143){const _0x136280=_0x114e9e,_0xa1c9b5={'HJdBg':function(_0x3f3ef3){return _0x3f3ef3();},'ahnOT':function(_0x4a943a,_0x1c0d83){return _0x4a943a(_0x1c0d83);},'rMTds':function(_0x44fa72,_0x2147fb){return _0x44fa72>_0x2147fb;},'HOYVz':function(_0x5409de,_0x59d9e5){return _0x5409de<_0x59d9e5;},'OglQg':function(_0x1be696,_0x50e0d7){return _0x1be696!==_0x50e0d7;},'huZAK':_0x136280(0x2b3),'lvCpc':'\x20--include-deleted'},_0x1d032a={'limit':_0x3d6143['limit']??0xa,'offset':_0x3d6143['offset']??0x0,'includeDeleted':_0x3d6143[_0x136280(0x263)]};_0x3d6143[_0x136280(0x1f4)]&&(_0x1d032a[_0x136280(0x23a)]=getGitRepoUrl(),_0x1d032a['gitBranch']=_0xa1c9b5['HJdBg'](getGitBranch));const _0x101895=await _0xa1c9b5[_0x136280(0x2c1)](listFeatures,_0x1d032a);if(_0x101895['items']['length']===0x0){console[_0x136280(0x23e)](_0x136280(0x259));return;}const _0x5ba27d=_0xa1c9b5['rMTds'](_0x101895[_0x136280(0x252)],_0x101895[_0x136280(0x272)][_0x136280(0x2ac)])?'Showing\x20'+_0x101895['items']['length']+'\x20of\x20'+_0x101895['totalCount']:_0x101895['totalCount']+_0x136280(0x24f);console[_0x136280(0x23e)]('\x0a'+_0x5ba27d+':\x0a');for(const _0x166b53 of _0x101895['items']){const _0x3f0664=_0x136280(0x22c)[_0x136280(0x1ed)]('|');let _0x33eec9=0x0;while(!![]){switch(_0x3f0664[_0x33eec9++]){case'0':console[_0x136280(0x23e)]('\x20\x20\x20ID:\x20'+_0x166b53['id']);continue;case'1':_0x166b53[_0x136280(0x216)]&&console[_0x136280(0x23e)](_0x136280(0x224)+_0xa1c9b5[_0x136280(0x2c1)](getProgressDisplay,_0x166b53['stats']));continue;case'2':console['log']('\x20\x20\x20Created:\x20'+new Date(_0x166b53[_0x136280(0x1fa)])[_0x136280(0x268)]());continue;case'3':console['log'](''+_0x166b53[_0x136280(0x1e4)]);continue;case'4':_0x166b53['gitBranch']&&console[_0x136280(0x23e)](_0x136280(0x2c8)+_0x166b53['gitBranch']);continue;case'5':console[_0x136280(0x23e)]('');continue;}break;}}const _0x53cfa0=_0x1d032a['limit']??0xa,_0x296dcd=(_0x1d032a[_0x136280(0x223)]??0x0)+_0x101895['items'][_0x136280(0x2ac)];if(_0xa1c9b5[_0x136280(0x2c3)](_0x296dcd,_0x101895['totalCount'])){const _0x2a79ba=_0xa1c9b5[_0x136280(0x20f)](_0x53cfa0,0xa)?_0x136280(0x250)+_0x53cfa0:'',_0x407e93=_0x3d6143['currentBranch']?_0xa1c9b5['huZAK']:'',_0x368ff6=_0x3d6143['includeDeleted']?_0xa1c9b5['lvCpc']:'';console['log'](_0x136280(0x2c0)+_0x296dcd+_0x2a79ba+_0x407e93+_0x368ff6);}}export async function featureShow(_0x5a3b36){const _0x5141c0=_0x114e9e,_0x33d0f6={'eCjTJ':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','DHUYN':function(_0x27110f,_0x19fc1d){return _0x27110f(_0x19fc1d);}},_0x27da61=_0x5a3b36||await getActiveFeatureId();if(!_0x27da61)throw new Error(_0x33d0f6[_0x5141c0(0x2bc)]);const _0x10f71d=await _0x33d0f6[_0x5141c0(0x218)](getFeature,_0x27da61);displayFeature(_0x10f71d,_0x10f71d[_0x5141c0(0x27e)]);}export async function featureResume(_0x460a83){const _0x11f8a7=_0x114e9e,_0x2157f4={'bDfam':function(_0x19b56c,_0x15e3c0){return _0x19b56c(_0x15e3c0);},'BqEbf':function(_0x2fc4ed,_0x194572){return _0x2fc4ed(_0x194572);},'udCTz':function(_0x100ad4){return _0x100ad4();},'gmiLf':function(_0x461769,_0x3758fb){return _0x461769!==_0x3758fb;},'AbYlm':function(_0x34cc3f,_0x4e29e0,_0x4dbaaa){return _0x34cc3f(_0x4e29e0,_0x4dbaaa);},'qqmgh':function(_0x371c07,_0x59b1aa){return _0x371c07(_0x59b1aa);},'wRDQc':'Not\x20in\x20a\x20git\x20repository.','lSkpu':function(_0x22d07c,_0x1510de){return _0x22d07c||_0x1510de;},'WipJC':function(_0x4af600,_0x4e2cef){return _0x4af600===_0x4e2cef;},'mcylB':'\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','YkcoZ':_0x11f8a7(0x1e3),'uQydu':function(_0x42a674,_0x25e8cf){return _0x42a674===_0x25e8cf;},'MjgQN':'\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','radQK':function(_0x1bc432,_0x1f5c04){return _0x1bc432(_0x1f5c04);},'bnyYc':function(_0x3ebd67,_0x19bb85){return _0x3ebd67!==_0x19bb85;},'rvgqL':function(_0x4829f5,_0x303287){return _0x4829f5(_0x303287);}};if(_0x460a83){const _0x226ba1=await _0x2157f4[_0x11f8a7(0x20c)](getFeature,_0x460a83);await _0x2157f4['BqEbf'](setActiveFeatureId,_0x226ba1['id']);const _0xa011bc=_0x2157f4[_0x11f8a7(0x230)](getGitBranch);_0xa011bc&&_0x2157f4['gmiLf'](_0xa011bc,_0x226ba1['gitBranch'])&&(await _0x2157f4[_0x11f8a7(0x1ff)](updateFeature,_0x226ba1['id'],{'gitBranch':_0xa011bc}),console[_0x11f8a7(0x23e)](_0x11f8a7(0x1e7)+_0xa011bc));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x226ba1['name']+'\x20('+_0x226ba1['id']+')'),await tryStartCurrentSession(_0x226ba1['id']);const _0x3c7f96=process[_0x11f8a7(0x222)][_0x11f8a7(0x2a4)];_0x3c7f96&&_0x2157f4['AbYlm'](registerSession,_0x3c7f96,_0x226ba1['id']);displayFeature(_0x226ba1,_0x226ba1[_0x11f8a7(0x27e)]),await _0x2157f4['qqmgh'](printFeedbackNudge,_0x226ba1['id']);return;}const _0x1495ea=getGitRepoUrl(),_0x914c0e=_0x2157f4['udCTz'](getGitBranch);if(!_0x1495ea&&!_0x914c0e)throw new Error(_0x2157f4[_0x11f8a7(0x1e6)]);console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+_0x2157f4['lSkpu'](_0x1495ea,_0x11f8a7(0x2bd))+'\x20/\x20'+(_0x914c0e||_0x11f8a7(0x2bd))+_0x11f8a7(0x274));const _0x2a35bc=await listFeatures({'gitRepoUrl':_0x1495ea,'gitBranch':_0x914c0e}),_0x24ddaf=_0x2a35bc['items']['filter'](_0x13a462=>_0x13a462['status']?_0x13a462[_0x11f8a7(0x1f7)]!==_0x11f8a7(0x2a5):!_0x13a462[_0x11f8a7(0x1f2)]);if(_0x2157f4[_0x11f8a7(0x2a0)](_0x24ddaf[_0x11f8a7(0x2ac)],0x0)){console[_0x11f8a7(0x23e)](_0x2157f4['mcylB']),console[_0x11f8a7(0x23e)](_0x2157f4[_0x11f8a7(0x2a1)]);return;}let _0x147946;if(_0x2157f4[_0x11f8a7(0x2b4)](_0x24ddaf['length'],0x1))_0x147946=_0x24ddaf[0x0];else{const _0x1fa1b4=process[_0x11f8a7(0x23b)]['isTTY']&&process['stdout'][_0x11f8a7(0x2b7)];if(!_0x1fa1b4){console[_0x11f8a7(0x23e)](_0x2157f4['MjgQN']);for(const _0x374f7f of _0x24ddaf){console[_0x11f8a7(0x23e)]('\x20\x20'+_0x374f7f['name']),console['log']('\x20\x20\x20\x20\x20ID:\x20'+_0x374f7f['id']),_0x374f7f[_0x11f8a7(0x216)]&&console[_0x11f8a7(0x23e)]('\x20\x20\x20\x20\x20Progress:\x20'+_0x2157f4['radQK'](getProgressDisplay,_0x374f7f[_0x11f8a7(0x216)])),_0x374f7f[_0x11f8a7(0x25c)]&&console['log'](_0x11f8a7(0x2a6)+_0x374f7f['gitBranch']);}throw new Error('Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>');}const {selected:_0x3a1101}=await _0x5e4fc6['prompt']([{'type':_0x11f8a7(0x240),'name':'selected','message':_0x11f8a7(0x298),'choices':_0x24ddaf[_0x11f8a7(0x1e2)](_0x21269d=>({'name':_0x21269d[_0x11f8a7(0x1e4)]+'\x20('+_0x21269d['id']+')','value':_0x21269d['id']}))}]);_0x147946=_0x24ddaf[_0x11f8a7(0x25e)](_0x131216=>_0x131216['id']===_0x3a1101);}await setActiveFeatureId(_0x147946['id']);_0x914c0e&&_0x2157f4['bnyYc'](_0x914c0e,_0x147946[_0x11f8a7(0x25c)])&&(await updateFeature(_0x147946['id'],{'gitBranch':_0x914c0e}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x914c0e));console[_0x11f8a7(0x23e)](_0x11f8a7(0x280)+_0x147946['name']+'\x20('+_0x147946['id']+')'),await _0x2157f4['qqmgh'](tryStartCurrentSession,_0x147946['id']);const _0x2f1c99=await getFeature(_0x147946['id']),_0x13c2cc=process[_0x11f8a7(0x222)][_0x11f8a7(0x2a4)];_0x13c2cc&&registerSession(_0x13c2cc,_0x2f1c99['id']),displayFeature(_0x2f1c99,_0x2f1c99[_0x11f8a7(0x27e)]),await _0x2157f4['rvgqL'](printFeedbackNudge,_0x2f1c99['id']);}async function printFeedbackNudge(_0x587f60){const _0x507f7a=_0x114e9e,_0x35a8b7={'EcoCw':function(_0x31196e,_0x256f66,_0x5eaed7){return _0x31196e(_0x256f66,_0x5eaed7);},'ggrcP':function(_0x1c3055,_0xb9a9a2){return _0x1c3055>_0xb9a9a2;},'jORga':function(_0x3f73d7,_0x5cf8d0){return _0x3f73d7>_0x5cf8d0;}};try{const {items:_0x34275b}=await getActionItems(_0x587f60);let _0x55eb70=0x0,_0x273006=0x0;for(const _0x1553dc of _0x34275b){const _0x3cc1a2=await _0x35a8b7[_0x507f7a(0x213)](getItemFeedback,_0x587f60,_0x1553dc['id']);_0x35a8b7['ggrcP'](_0x3cc1a2[_0x507f7a(0x207)]['length'],0x0)&&(_0x55eb70+=_0x3cc1a2['unaddressedComments']['length'],_0x273006++);}_0x35a8b7['jORga'](_0x55eb70,0x0)&&(console[_0x507f7a(0x23e)](_0x507f7a(0x20b)+_0x55eb70+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x273006+_0x507f7a(0x2a2)),console['log']('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x33e95c){const _0x287f0a=_0x114e9e,_0xdd96d0={'OQDNB':function(_0xfb337e,_0x6dea5a){return _0xfb337e(_0x6dea5a);}};try{const {sessions:_0x12997d}=await _0xdd96d0['OQDNB'](listFeatureSessions,_0x33e95c),_0x3186f5=_0x12997d['find'](_0x3a3e3e=>_0x3a3e3e[_0x287f0a(0x1f7)]===_0x287f0a(0x1f1));_0x3186f5&&(await startSession(_0x33e95c,_0x3186f5['id']),console['log']('\x20\x20\x20▶️\x20Started\x20session\x20'+_0x3186f5['iteration']));}catch{}}function _0x949b(_0x3da59f,_0x210c13){_0x3da59f=_0x3da59f-0x1de;const _0x3e5fb1=_0x3e5f();let _0x949bc7=_0x3e5fb1[_0x3da59f];return _0x949bc7;}export async function featureReport(_0x26b196,_0x385686){const _0xcf316a=_0x114e9e,_0x3b544f={'dVZBE':function(_0x5427ca){return _0x5427ca();},'jpAwb':function(_0x2d79b0,_0x1372d0,_0x131a6b,_0x59deaf){return _0x2d79b0(_0x1372d0,_0x131a6b,_0x59deaf);},'xANRq':function(_0x3d8a79,_0x5882cb){return _0x3d8a79(_0x5882cb);},'XMgYR':function(_0x14725f,_0xa91e23,_0x45ca98){return _0x14725f(_0xa91e23,_0x45ca98);},'myOMQ':_0xcf316a(0x2a3)},_0x51bc2b=_0x26b196||await _0x3b544f[_0xcf316a(0x1e0)](getActiveFeatureId);if(!_0x51bc2b)throw new Error(_0xcf316a(0x212));console['log']('\x0aGenerating\x20report...');const _0x2bf667=await getFeatureReportMarkdown(_0x51bc2b,{'style':_0x385686['style']}),_0x6a8d5f=_0x385686[_0xcf316a(0x2a8)]||_0x3b544f[_0xcf316a(0x290)](join,getRangerDir(),'reports',_0x51bc2b+'.md'),_0xaa1a2e=join(_0x6a8d5f,'..');!_0x3b544f['xANRq'](existsSync,_0xaa1a2e)&&await _0x3b544f['XMgYR'](mkdir,_0xaa1a2e,{'recursive':!![]}),await writeFile(_0x6a8d5f,_0x2bf667,_0x3b544f['myOMQ']),console[_0xcf316a(0x23e)](_0xcf316a(0x1f6)+_0x6a8d5f);}function getScenarioResult(_0x122db9){const _0x155acf=_0x114e9e,_0x4477d5={'hOytY':function(_0x398613,_0x88ffc6){return _0x398613===_0x88ffc6;},'NDpcD':_0x155acf(0x2ba),'NHHvo':'in_progress'};if(_0x4477d5['hOytY'](_0x122db9['status'],'closed'))return _0x122db9[_0x155acf(0x255)]??_0x4477d5[_0x155acf(0x208)];if(_0x4477d5[_0x155acf(0x242)](_0x122db9['status'],_0x155acf(0x233)))return _0x4477d5[_0x155acf(0x21f)];return _0x122db9['status'];}function getScenarioRationale(_0x1b7cad,_0x4088d7){const _0x18c65d=_0x114e9e;if(_0x4088d7)return _0x4088d7;if(_0x1b7cad[_0x18c65d(0x26c)])return _0x1b7cad[_0x18c65d(0x26c)];if(_0x1b7cad['incompleteReason'])return _0x1b7cad[_0x18c65d(0x2b1)];if(_0x1b7cad[_0x18c65d(0x20d)])return _0x1b7cad['canceledReason'];if(_0x1b7cad[_0x18c65d(0x2b5)])return _0x1b7cad[_0x18c65d(0x2b5)];return null;}export async function featureReportPrDescription(_0x497905,_0x4bb1c0){const _0x1a91d2=_0x114e9e,_0x3e70e6={'mPqOq':function(_0x869267){return _0x869267();},'hfLvi':_0x1a91d2(0x296),'koJxA':function(_0x4c77c2,_0x342a11){return _0x4c77c2<_0x342a11;},'PsWAa':function(_0x46d0a9,_0x2a9655){return _0x46d0a9===_0x2a9655;},'Lidwp':function(_0x31cde6,_0x398cae,_0x108d70,_0xd5eca9){return _0x31cde6(_0x398cae,_0x108d70,_0xd5eca9);},'hwqkf':function(_0x591365,_0x4be051,_0x5c99bd){return _0x591365(_0x4be051,_0x5c99bd);}},_0x1ce6b2=_0x497905||await _0x3e70e6[_0x1a91d2(0x29d)](getActiveFeatureId);if(!_0x1ce6b2)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');const _0x571d0c=await getFeature(_0x1ce6b2),_0x5401fe=_0x571d0c[_0x1a91d2(0x27e)]||[],_0x1217e0=getCurrentSessionItems(_0x571d0c,_0x5401fe);_0x1217e0['length']===0x0&&(console['error'](_0x3e70e6[_0x1a91d2(0x284)]),process[_0x1a91d2(0x25f)](0x1));const _0x588d0a=_0x4bb1c0['excludeScenarios']??[],_0x299553=_0x588d0a['filter'](_0x2661fe=>!Number[_0x1a91d2(0x261)](_0x2661fe)||_0x2661fe<0x1||_0x2661fe>_0x1217e0[_0x1a91d2(0x2ac)]);if(_0x299553['length']>0x0){console['error']('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0x299553[_0x1a91d2(0x2c9)](',\x20')),console[_0x1a91d2(0x23e)](_0x1a91d2(0x236));for(let _0x321ba4=0x0;_0x3e70e6[_0x1a91d2(0x209)](_0x321ba4,_0x1217e0['length']);_0x321ba4++){console['log']('\x20\x20'+(_0x321ba4+0x1)+'.\x20'+_0x1217e0[_0x321ba4]['description']);}process[_0x1a91d2(0x25f)](0x1);}const _0x343362=new Set(_0x588d0a['map'](_0x40d6e8=>_0x40d6e8-0x1)),_0x13dde2=_0x1217e0['filter']((_0x194ada,_0x4c39fa)=>!_0x343362['has'](_0x4c39fa));_0x3e70e6['PsWAa'](_0x13dde2[_0x1a91d2(0x2ac)],0x0)&&(console[_0x1a91d2(0x20a)](_0x1a91d2(0x28f)),process['exit'](0x1));if(_0x4bb1c0[_0x1a91d2(0x202)])await _0x3e70e6['Lidwp'](outputJsonReport,_0x1ce6b2,_0x571d0c,_0x13dde2);else{const _0x28b515=await _0x3e70e6['hwqkf'](getFeatureReportMarkdown,_0x1ce6b2,{'itemIds':_0x13dde2['map'](_0x3110fc=>_0x3110fc['id'])});process['stdout'][_0x1a91d2(0x2ad)](_0x28b515['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x475b60,_0x6495df,_0x48dbf4){const _0x554866=_0x114e9e,_0x315b99={'FUdhB':function(_0x3af426,_0x31515b){return _0x3af426===_0x31515b;},'dPFqH':function(_0x1b844c,_0x18c8f0){return _0x1b844c(_0x18c8f0);},'vYLXP':function(_0x22ca85,_0x1d2b7f){return _0x22ca85+_0x1d2b7f;}},_0x3c39e8=getApiBaseUrl(),_0x8839b1=await _0x315b99[_0x554866(0x22f)](getFeatureReport,_0x475b60),_0x25fc4a=new Map(_0x8839b1[_0x554866(0x27e)]['map'](_0x268c89=>[_0x268c89['id'],_0x268c89])),_0x1cd101=await Promise['all'](_0x48dbf4[_0x554866(0x1e2)](async _0x4e15bb=>{const _0x3824d5=_0x554866,_0x4cb5fd=_0x25fc4a[_0x3824d5(0x205)](_0x4e15bb['id']),_0x5ca194=_0x4cb5fd?.['linkedSession']??null;let _0x38050a=[];if(_0x4e15bb['browserSessionId'])try{const {steps:_0x19ba29}=await getBrowserSessionSteps(_0x4e15bb[_0x3824d5(0x26b)]);_0x19ba29['length']>0x0&&(_0x38050a=_0x19ba29['map'](_0x3df033=>{const _0x2b1e0f=_0x3824d5,_0x43a1f3=_0x3df033[_0x2b1e0f(0x285)][_0x2b1e0f(0x25e)](_0x869f16=>_0x869f16[_0x2b1e0f(0x1f8)]==='screenshot'&&_0x869f16[_0x2b1e0f(0x245)]===_0x2b1e0f(0x231))??_0x3df033['assets']['find'](_0x23c36e=>_0x23c36e['assetType']===_0x2b1e0f(0x2b0));let _0x1a9acc=null,_0x13c426=null;if(_0x43a1f3){const _0x41a18a=_0x43a1f3[_0x2b1e0f(0x23c)]['location']['split']('/')[_0x2b1e0f(0x26e)]();_0x1a9acc=_0x3c39e8+'/api/v1/mcp/browser-sessions/'+_0x4e15bb['browserSessionId']+'/artifacts/'+_0x41a18a,_0x41a18a&&(_0x13c426=_0x41a18a['replace'](/\.\w+$/,'')['replace'](/^(key_)?\d+_/,'')['replace'](/[-_]/g,'\x20'));}return{'description':_0x13c426||_0x3df033['description']||_0x3df033['stepName']||'Step\x20'+_0x3df033[_0x2b1e0f(0x1f0)],'screenshot':_0x1a9acc,'is_key_step':_0x3df033['isKeyStep']};}));}catch{}return _0x315b99[_0x3824d5(0x1fd)](_0x38050a['length'],0x0)&&_0x5ca194?.[_0x3824d5(0x1de)]&&(_0x38050a=_0x5ca194['screenshotUrls'][_0x3824d5(0x1e2)]((_0x185cde,_0x25e3b8)=>({'description':_0x3824d5(0x2a9)+(_0x25e3b8+0x1),'screenshot':_0x185cde,'is_key_step':![]}))),{'description':_0x4e15bb['description'],'result':getScenarioResult(_0x4e15bb),'rationale':getScenarioRationale(_0x4e15bb,_0x5ca194?.['agentResponse']),'steps':_0x38050a};})),_0x40ad14={'url':_0x6495df[_0x554866(0x2cb)],'scenarios':_0x1cd101};process[_0x554866(0x24d)]['write'](_0x315b99['vYLXP'](JSON[_0x554866(0x267)](_0x40ad14,null,0x2),'\x0a'));}export async function featureConcludeSession(_0x2cf0c7){const _0x19f39a=_0x114e9e,_0x19cc93={'HuLIZ':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','bYZoe':function(_0x174dd6,_0x59eee6){return _0x174dd6(_0x59eee6);},'vgwfM':_0x19f39a(0x279),'ZIwoF':function(_0x39bae3,_0xc3e87e){return _0x39bae3(_0xc3e87e);},'AJrjw':'completed','tilxE':_0x19f39a(0x2bb),'QmGHk':function(_0x1b2bae,_0x1f150f,_0xcbe88a){return _0x1b2bae(_0x1f150f,_0xcbe88a);}},_0x4270ba=_0x2cf0c7||await getActiveFeatureId();if(!_0x4270ba)throw new Error(_0x19cc93['HuLIZ']);const _0xd75ec1=await _0x19cc93[_0x19f39a(0x204)](getFeature,_0x4270ba);if(!_0xd75ec1[_0x19f39a(0x28a)])throw new Error(_0x19cc93[_0x19f39a(0x2c4)]);const {sessions:_0x10addc}=await _0x19cc93[_0x19f39a(0x251)](listFeatureSessions,_0x4270ba),_0x2cc60e=_0x10addc['find'](_0x150731=>_0x150731['id']===_0xd75ec1['currentSessionId']);if(!_0x2cc60e)throw new Error(_0x19f39a(0x246));if(_0x2cc60e[_0x19f39a(0x1f7)]===_0x19cc93[_0x19f39a(0x219)]){console['log'](_0x19cc93[_0x19f39a(0x25d)]);return;}if(_0x2cc60e['status']!==_0x19f39a(0x1fc))throw new Error(_0x19f39a(0x235)+_0x2cc60e[_0x19f39a(0x1f7)]);console['log']('\x0aConcluding\x20session...'),await _0x19cc93[_0x19f39a(0x215)](concludeSession,_0x4270ba,_0xd75ec1[_0x19f39a(0x28a)]),console['log'](_0x19f39a(0x22e)+_0x2cc60e['iteration']+_0x19f39a(0x21b)),console[_0x19f39a(0x23e)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x1c09b7){const _0x1491e3=_0x114e9e,_0x56e65d={'oWsvN':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','HCDVf':function(_0x32ff4a,_0x1b3702){return _0x32ff4a(_0x1b3702);},'wooIN':function(_0x2a719b,_0x416004){return _0x2a719b(_0x416004);},'anTfh':function(_0x562131,_0x191f0a){return _0x562131===_0x191f0a;},'ztCAT':'completed'},_0x5f4424=_0x1c09b7||await getActiveFeatureId();if(!_0x5f4424)throw new Error(_0x56e65d['oWsvN']);const _0x12cbcf=await _0x56e65d[_0x1491e3(0x238)](getFeature,_0x5f4424);console[_0x1491e3(0x23e)](_0x1491e3(0x1df)+_0x12cbcf[_0x1491e3(0x1e4)]+'\x0a');const {sessions:_0x43d4d2}=await _0x56e65d['wooIN'](listFeatureSessions,_0x5f4424);if(_0x56e65d['anTfh'](_0x43d4d2[_0x1491e3(0x2ac)],0x0)){console[_0x1491e3(0x23e)]('No\x20sessions\x20found.');return;}for(const _0x18513e of _0x43d4d2){const _0x3ccf8f=_0x56e65d[_0x1491e3(0x206)](_0x18513e['status'],_0x56e65d[_0x1491e3(0x28b)])?'✅':_0x18513e[_0x1491e3(0x1f7)]==='in_progress'?'🔄':'▶️';console['log'](_0x3ccf8f+_0x1491e3(0x229)+_0x18513e[_0x1491e3(0x22a)]+'\x20('+_0x18513e['id']+')'),console['log'](_0x1491e3(0x2b8)+_0x18513e['status']),console['log'](_0x1491e3(0x26a)+new Date(_0x18513e[_0x1491e3(0x1fa)])[_0x1491e3(0x2aa)]()),_0x18513e['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x18513e['completedAt'])['toLocaleString']()),console[_0x1491e3(0x23e)]('');}}export async function featureAddScenario(_0x1dc1e4,_0x5d6f67){const _0x300253=_0x114e9e,_0x30ee9d={'vNPYF':function(_0x4acb61,_0x550381,_0xdf6694){return _0x4acb61(_0x550381,_0xdf6694);}},_0x5b874e=_0x5d6f67||await getActiveFeatureId();if(!_0x5b874e)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x1fcf28=await getFeature(_0x5b874e);if(_0x1fcf28[_0x300253(0x2c5)]&&!_0x1fcf28[_0x300253(0x2c5)]['submittedAt'])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x1fcf28['dashboardUrl']);await _0x30ee9d[_0x300253(0x27b)](createChecklistItem,_0x5b874e,_0x1dc1e4);const _0x3a3877=await getFeature(_0x5b874e);console['log'](_0x300253(0x226)),_0x30ee9d[_0x300253(0x27b)](displayFeature,_0x3a3877,_0x3a3877[_0x300253(0x27e)]);}function _0x3e5f(){const _0x40b399=['ZIwoF','totalCount','description','scenarios','terminalReason','vSsPd','FZZxL','sessionId','\x0aNo\x20feature\x20reviews\x20found.','submittedAt','ndDKM','gitBranch','tilxE','find','exit','Unknown','isInteger','trim','includeDeleted','\x1b[1m','\x20\x20✅\x20No\x20feedback\x20to\x20address','wPUiK','stringify','toLocaleDateString','ZQRgC','\x20\x20\x20Created:\x20','browserSessionId','blockedReason','domRef','pop','GQeIz','18584aeAELX','ORXtK','items','\x20\x20\x20\x20\x20\x20Blocked:\x20','...','\x0a✅\x20Restored\x20feature\x20review:\x20','icgJQ','replace','1045505iOlHaf','No\x20active\x20session\x20for\x20this\x20feature\x20review.','lGtad','vNPYF','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','textContent','checklistItems','23nfXOxT','\x0a✅\x20Resumed\x20feature\x20review:\x20','repeat','1896261ZWafkr','xdFyJ','hfLvi','assets','4DpqMMe','OzlGX','approved','\x20unaddressed\x20comment(s)','currentSessionId','ztCAT','No\x20scenarios\x20found.','from','ALCWA','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','jpAwb','blockedItems','MRUNQ','Scenario\x20','nDLuM','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','\x0a📋\x20Feedback\x20for:\x20','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','qpoHV','git\x20rev-parse\x20--abbrev-ref\x20HEAD','tCuMH','type','mPqOq','\x20at\x20[','pipe','WipJC','YkcoZ','\x20scenario(s).','utf-8','CLAUDE_SESSION_ID','verified','\x20\x20\x20\x20\x20Branch:\x20','Itapx','output','Screenshot\x20','toLocaleString','version','length','write','txlYJ','zsDYu','screenshot','incompleteReason','jcGAH','\x20--current-branch','uQydu','notes','BmQjC','isTTY','\x20\x20\x20Status:\x20','\x20\x20💬\x20','closed','\x0a✅\x20Session\x20is\x20already\x20completed.','eCjTJ','any','uvaiY','element','Next\x20page:\x20ranger\x20list\x20--offset\x20','ahnOT','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','HOYVz','vgwfM','latestReview','\x20—\x20','numeric','\x20\x20\x20Branch:\x20','join','MSnSc','dashboardUrl','screenshotUrls','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','dVZBE','spatial','map','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','name','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','wRDQc','\x20\x20\x20Updated\x20branch\x20to:\x20','\x0a\x20\x20\x20Scenarios:','\x20\x20\x20\x20\x20\x20Approved','toFixed','gMWux','1756482SsUAQg','split','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','HjiVb','position','ready','completedAt','round','currentBranch','git\x20remote\x20get-url\x20origin','\x0a✅\x20Report\x20generated:\x20','status','assetType','\x20incomplete','createdAt','\x0aCreating\x20feature\x20review...','in_progress','FUdhB','HIKZF','AbYlm','\x20verified','canonicalFlow','json','2289wrHkDi','bYZoe','get','anTfh','unaddressedComments','NDpcD','koJxA','error','\x0a⚠️\x20\x20','bDfam','canceledReason','vJKbq','OglQg','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','.\x20Feature\x20review\x20has\x20','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','EcoCw','YHaUR','QmGHk','stats','arrayBuffer','DHUYN','AJrjw','OdIFg','\x20concluded.','BokjM','pendingItems','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','NHHvo','yITGp','\x20—\x20no\x20comments','env','offset','\x20\x20\x20Progress:\x20','push','\x0a✅\x20Scenario\x20added','6643747vkkJHo','nUeXw','\x20Session\x20','iteration','\x20scenarios.','3|0|1|4|2|5','scenario','\x0a✅\x20Session\x20','dPFqH','udCTz','after','3173990IlPfkk','verification_in_progress','\x0a✅\x20Scenario\x20updated','Cannot\x20conclude\x20session\x20with\x20status:\x20','\x0aAvailable\x20scenarios:','\x20\x20\x20\x20','HCDVf','\x20in\x20progress','gitRepoUrl','stdin','storage','9CQrspz','log','en-US','list','\x0a✅\x20Feature\x20review\x20created:\x20','hOytY',':\x20\x22','qNXJY','timing','Current\x20session\x20not\x20found.','\x20\x20\x20Description:\x20','\x20(v','41906GKejPp','filter','ABetd','YTMPH','stdout','wylnX','\x20feature\x20review(s)\x20found','\x20--limit\x20'];_0x3e5f=function(){return _0x40b399;};return _0x3e5f();}export async function featureEditScenario(_0x5595d4,_0x3ca1c1){const _0x524053=_0x114e9e,_0x5a956a={'MMjnO':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','UwtMk':_0x524053(0x210),'qNXJY':'Please\x20finish\x20your\x20review\x20first:','UkDUZ':function(_0x41c218,_0xa89d61){return _0x41c218===_0xa89d61;},'MRUNQ':function(_0x5abc3e,_0x925de9){return _0x5abc3e+_0x925de9;},'zsDYu':function(_0x1c6a2a,_0x1efcf4){return _0x1c6a2a<_0x1efcf4;},'sDMcK':_0x524053(0x236),'icgJQ':function(_0x2042df,_0x536bc8,_0x5ef4b7){return _0x2042df(_0x536bc8,_0x5ef4b7);}},_0x5b23c3=_0x3ca1c1['id']||await getActiveFeatureId();!_0x5b23c3&&(console['error'](_0x5a956a['MMjnO']),console['error'](_0x524053(0x1ee)),process[_0x524053(0x25f)](0x1));const _0x1c83d7=await getFeature(_0x5b23c3);_0x1c83d7['latestReview']&&!_0x1c83d7[_0x524053(0x2c5)][_0x524053(0x25a)]&&(console[_0x524053(0x20a)](_0x5a956a['UwtMk']),console['error'](_0x5a956a[_0x524053(0x244)]),console['error']('\x20\x20'+_0x1c83d7['dashboardUrl']),process[_0x524053(0x25f)](0x1));const _0x749bde=_0x1c83d7['checklistItems']||[];_0x5a956a['UkDUZ'](_0x749bde[_0x524053(0x2ac)],0x0)&&(console['error'](_0x524053(0x21e)),process['exit'](0x1));if(_0x3ca1c1[_0x524053(0x22d)]===undefined){console['error']('\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.'),console['log']('\x0aAvailable\x20scenarios:');for(let _0x2c753b=0x0;_0x2c753b<_0x749bde['length'];_0x2c753b++){console[_0x524053(0x23e)]('\x20\x20'+_0x5a956a[_0x524053(0x292)](_0x2c753b,0x1)+'.\x20'+_0x749bde[_0x2c753b]['description']);}process['exit'](0x1);}const _0x4b1a7b=_0x3ca1c1[_0x524053(0x22d)]-0x1;if(_0x5a956a[_0x524053(0x2af)](_0x4b1a7b,0x0)||_0x4b1a7b>=_0x749bde['length']){console[_0x524053(0x20a)]('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x3ca1c1['scenario']+_0x524053(0x211)+_0x749bde['length']+_0x524053(0x22b)),console[_0x524053(0x23e)](_0x5a956a['sDMcK']);for(let _0x19148f=0x0;_0x5a956a[_0x524053(0x2af)](_0x19148f,_0x749bde[_0x524053(0x2ac)]);_0x19148f++){console['log']('\x20\x20'+(_0x19148f+0x1)+'.\x20'+_0x749bde[_0x19148f][_0x524053(0x253)]);}process[_0x524053(0x25f)](0x1);}const _0x5d28f6=_0x749bde[_0x4b1a7b];await updateChecklistItem(_0x5b23c3,_0x5d28f6['id'],{'description':_0x5595d4});const _0x8aeeab=await getFeature(_0x5b23c3);console['log'](_0x524053(0x234)),_0x5a956a[_0x524053(0x276)](displayFeature,_0x8aeeab,_0x8aeeab[_0x524053(0x27e)]);}async function downloadFeedbackImage(_0x2eddf9,_0xfdd53b){const _0x30d9aa=_0x114e9e,_0x300067={'MSnSc':function(_0x43a297,_0x19017b,_0x505aaf){return _0x43a297(_0x19017b,_0x505aaf);},'GQeIz':function(_0xfc7eb4){return _0xfc7eb4();},'ZQRgC':function(_0x27c900,_0x125d5b,_0x189fd8){return _0x27c900(_0x125d5b,_0x189fd8);}};try{const _0x46d73a=_0x300067[_0x30d9aa(0x2ca)](join,_0x300067[_0x30d9aa(0x26f)](getRangerDir),'feedback-images');await _0x300067['MSnSc'](mkdir,_0x46d73a,{'recursive':!![]});const _0x8d2f59=_0x300067['MSnSc'](join,_0x46d73a,'comment_'+_0xfdd53b+'.png'),_0x17cd93=await fetch(_0x2eddf9);if(!_0x17cd93['ok'])return null;const _0x5394df=Buffer[_0x30d9aa(0x28d)](await _0x17cd93[_0x30d9aa(0x217)]());return await _0x300067[_0x30d9aa(0x269)](writeFile,_0x8d2f59,_0x5394df),_0x8d2f59;}catch{return null;}}export async function featureGetReview(_0x15601f){const _0x2fda8e=_0x114e9e,_0x2f3163={'qpoHV':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','nUeXw':function(_0x50d6e5,_0x19796a){return _0x50d6e5>_0x19796a;},'HjiVb':function(_0x5f06c2,_0x121041,_0x3d32e7){return _0x5f06c2(_0x121041,_0x3d32e7);},'SGiIW':function(_0x3e4948,_0x232e3e){return _0x3e4948>_0x232e3e;},'ORXtK':function(_0x19ed57,_0x295a0a){return _0x19ed57+_0x295a0a;},'FaQqv':_0x2fda8e(0x260),'QZBvJ':_0x2fda8e(0x2bf),'FZZxL':function(_0x584e10,_0x4d1854){return _0x584e10===_0x4d1854;},'YHaUR':'point'},_0x1fdde1=_0x15601f||await getActiveFeatureId();if(!_0x1fdde1)throw new Error(_0x2f3163[_0x2fda8e(0x299)]);const _0x3edbaa=await getFeature(_0x1fdde1),{items:_0x5604c2}=await getActionItems(_0x1fdde1);console['log'](_0x2fda8e(0x297)+_0x3edbaa['name']+'\x20('+_0x3edbaa['id']+')\x0a');if(_0x5604c2['length']===0x0){console['log'](_0x2fda8e(0x28c));return;}for(let _0x3d9297=0x0;_0x3d9297<_0x5604c2[_0x2fda8e(0x2ac)];_0x3d9297++){const _0x54c56a=_0x5604c2[_0x3d9297],_0x57b781=_0x2f3163[_0x2fda8e(0x228)](_0x54c56a[_0x2fda8e(0x2ab)],0x1)?_0x2fda8e(0x248)+_0x54c56a[_0x2fda8e(0x2ab)]+')':'',_0x6fa2a1=await _0x2f3163[_0x2fda8e(0x1ef)](getItemFeedback,_0x1fdde1,_0x54c56a['id']);if(_0x2f3163['SGiIW'](_0x6fa2a1[_0x2fda8e(0x207)][_0x2fda8e(0x2ac)],0x0)){console[_0x2fda8e(0x23e)](_0x2fda8e(0x293)+_0x2f3163['ORXtK'](_0x3d9297,0x1)+':\x20\x22'+_0x54c56a[_0x2fda8e(0x253)]+'\x22'+_0x57b781+_0x2fda8e(0x2c6)+_0x6fa2a1[_0x2fda8e(0x207)]['length']+_0x2fda8e(0x289));for(const _0x110f65 of _0x6fa2a1[_0x2fda8e(0x207)]){const _0x248879=new Date(_0x110f65['createdAt'])['toLocaleDateString'](_0x2fda8e(0x23f),{'month':'short','day':_0x2fda8e(0x2c7)}),_0x334976=_0x110f65['authorName']||_0x110f65['authorEmail']||_0x2f3163['FaQqv'];console['log'](_0x2fda8e(0x2b9)+_0x334976+'\x20('+_0x248879+'):\x20\x22'+_0x110f65['content']+'\x22');if(_0x110f65['assetUrl']){const _0x54e401=await downloadFeedbackImage(_0x110f65['assetUrl'],_0x110f65['id']);_0x54e401&&console['log']('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x54e401);}if(_0x110f65['domRef']){const _0x37ce37=_0x110f65[_0x2fda8e(0x26d)]['selector'][_0x2fda8e(0x1ed)]('\x20>\x20')[_0x2fda8e(0x26e)]()?.[_0x2fda8e(0x1ed)](':')[0x0]||_0x2f3163['QZBvJ'],_0x2ec66b=_0x110f65['domRef']['textContent']?'\x20\x22'+_0x110f65[_0x2fda8e(0x26d)][_0x2fda8e(0x27d)]['slice'](0x0,0x3c)+'\x22':'';console[_0x2fda8e(0x23e)](_0x2fda8e(0x27c)+_0x37ce37+'>'+_0x2ec66b),console['log']('\x20\x20\x20\x20\x20📋\x20Selector:\x20'+_0x110f65[_0x2fda8e(0x26d)]['selector']);}else{if(_0x110f65[_0x2fda8e(0x1e1)]){const _0x1aad48=_0x110f65['spatial']['coordinates'];_0x2f3163[_0x2fda8e(0x257)](_0x110f65['spatial'][_0x2fda8e(0x29c)],_0x2f3163[_0x2fda8e(0x214)])&&_0x1aad48[_0x2fda8e(0x2ac)]>=0x2?console['log'](_0x2fda8e(0x1e5)+_0x1aad48[0x0][_0x2fda8e(0x1ea)](0x2)+',\x20'+_0x1aad48[0x1][_0x2fda8e(0x1ea)](0x2)+')'):console[_0x2fda8e(0x23e)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x110f65[_0x2fda8e(0x1e1)]['type']+_0x2fda8e(0x29e)+_0x1aad48['map'](_0xf8795e=>_0xf8795e['toFixed'](0x2))[_0x2fda8e(0x2c9)](',\x20')+']');}}}if(_0x6fa2a1[_0x2fda8e(0x201)]){console[_0x2fda8e(0x23e)]('\x20\x20Expected\x20flow:');for(const _0x37240c of _0x6fa2a1[_0x2fda8e(0x201)][_0x2fda8e(0x1ed)]('\x0a')){console['log'](_0x2fda8e(0x237)+_0x37240c);}}}else console['log']('Scenario\x20'+_0x2f3163[_0x2fda8e(0x271)](_0x3d9297,0x1)+_0x2fda8e(0x243)+_0x54c56a['description']+'\x22'+_0x57b781+_0x2fda8e(0x221)),console['log'](_0x2fda8e(0x265));console[_0x2fda8e(0x23e)]('');}}export async function featureDelete(_0xa3a36b){const _0x386881=_0x114e9e,_0x55c1bb={'tCuMH':function(_0x3b2b47){return _0x3b2b47();},'dRwJD':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','wPUiK':function(_0x2b59de,_0x12a094){return _0x2b59de(_0x12a094);},'eremE':function(_0x4c503c,_0x208f8c){return _0x4c503c(_0x208f8c);},'GfFXX':function(_0x2cf1e8,_0x407b4d){return _0x2cf1e8+_0x407b4d;},'CPubY':_0x386881(0x2c2)},_0x5c66a8=_0xa3a36b||await _0x55c1bb[_0x386881(0x29b)](getActiveFeatureId);if(!_0x5c66a8)throw new Error(_0x55c1bb['dRwJD']);const _0x2ceef7=await _0x55c1bb[_0x386881(0x266)](getFeature,_0x5c66a8);await _0x55c1bb['eremE'](softDeleteFeature,_0x5c66a8),console[_0x386881(0x23e)]('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x2ceef7['name']+'\x20('+_0x5c66a8+')'),console[_0x386881(0x23e)](_0x55c1bb['GfFXX'](_0x55c1bb['CPubY'],_0x5c66a8));}export async function featureRestore(_0x3a1402){const _0xc66e07=_0x114e9e,_0x1f2db7={'DYCpO':function(_0x4b7541,_0x243319){return _0x4b7541(_0x243319);}};await _0x1f2db7['DYCpO'](restoreFeature,_0x3a1402);const _0x53b943=await getFeature(_0x3a1402);console['log'](_0xc66e07(0x275)+_0x53b943[_0xc66e07(0x1e4)]+'\x20('+_0x3a1402+')'),displayFeature(_0x53b943,_0x53b943['checklistItems']);}
1
+ const _0x5145ea=_0x198d;(function(_0x26b27b,_0xb91930){const _0x32bb20=_0x198d,_0x5f7321=_0x26b27b();while(!![]){try{const _0x248704=parseInt(_0x32bb20(0x17a))/0x1+-parseInt(_0x32bb20(0x14a))/0x2*(parseInt(_0x32bb20(0x127))/0x3)+-parseInt(_0x32bb20(0xec))/0x4*(parseInt(_0x32bb20(0xa9))/0x5)+-parseInt(_0x32bb20(0x164))/0x6*(-parseInt(_0x32bb20(0x10b))/0x7)+-parseInt(_0x32bb20(0x167))/0x8+-parseInt(_0x32bb20(0xf4))/0x9+parseInt(_0x32bb20(0x124))/0xa;if(_0x248704===_0xb91930)break;else _0x5f7321['push'](_0x5f7321['shift']());}catch(_0xc3aed5){_0x5f7321['push'](_0x5f7321['shift']());}}}(_0x3d36,0x3e295));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x354d65 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const ACTIVE_FEATURE_FILE=_0x5145ea(0x11b),bold=_0x5d52f0=>'\x1b[1m'+_0x5d52f0+_0x5145ea(0xc8);function getGitRepoUrl(){const _0x2796b5=_0x5145ea,_0x4ae9ae={'Wukdh':_0x2796b5(0x14e),'gyVEY':_0x2796b5(0xa5)};try{const _0x5e5743=execSync(_0x4ae9ae[_0x2796b5(0xc5)],{'encoding':_0x2796b5(0x105),'stdio':['pipe','pipe','pipe']})['trim']();return _0x5e5743['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,_0x4ae9ae[_0x2796b5(0x158)])[_0x2796b5(0x14d)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x5b81e6=_0x5145ea,_0x37cac2={'zpmlq':function(_0x5cd200,_0x31c024,_0x15eac7){return _0x5cd200(_0x31c024,_0x15eac7);},'vxjkl':'utf-8','GxxmP':'pipe'};try{return _0x37cac2[_0x5b81e6(0xaf)](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x37cac2['vxjkl'],'stdio':[_0x37cac2[_0x5b81e6(0x134)],_0x37cac2[_0x5b81e6(0x134)],_0x5b81e6(0xf3)]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x3ee141=_0x5145ea,_0x5dfba2={'rVIad':function(_0x13ef98,_0x3c793d,_0x90e803){return _0x13ef98(_0x3c793d,_0x90e803);},'DFZEJ':'utf-8'},_0x3e0244=_0x5dfba2[_0x3ee141(0xf5)](join,getRangerDir(),ACTIVE_FEATURE_FILE);if(!existsSync(_0x3e0244))return null;try{const _0x12c517=await readFile(_0x3e0244,_0x5dfba2[_0x3ee141(0xc1)]);return _0x12c517[_0x3ee141(0xb7)]()||null;}catch{return null;}}async function setActiveFeatureId(_0x5ca44e){const _0x24d4dd=_0x5145ea,_0x11134e={'yIIxY':function(_0x182806){return _0x182806();},'CSENz':function(_0x5cee9f,_0x58b1ff,_0x225735){return _0x5cee9f(_0x58b1ff,_0x225735);},'AJmpQ':function(_0x46ffc5,_0x301774){return _0x46ffc5(_0x301774);},'TAfcW':'utf-8'},_0x539e0c=_0x11134e['yIIxY'](getRangerDir),_0x4f8dbd=_0x11134e[_0x24d4dd(0x110)](join,_0x539e0c,ACTIVE_FEATURE_FILE);!_0x11134e[_0x24d4dd(0xfb)](existsSync,_0x539e0c)&&await _0x11134e['CSENz'](mkdir,_0x539e0c,{'recursive':!![]}),await writeFile(_0x4f8dbd,_0x5ca44e,_0x11134e[_0x24d4dd(0x15f)]);}function getProgressDisplay(_0x101ac1){const _0x33f78d=_0x5145ea,_0x1e30a1={'MNuUj':function(_0x4ab128,_0x24fe6a){return _0x4ab128+_0x24fe6a;},'qjqgp':function(_0x27ecdf,_0x46eca9){return _0x27ecdf===_0x46eca9;},'AXZlz':function(_0x31dbe6,_0x4ecb54){return _0x31dbe6*_0x4ecb54;},'mJFfs':function(_0x1591e7,_0x2d6adf){return _0x1591e7/_0x2d6adf;},'FHUID':function(_0x4b7f07,_0x4ed1e8){return _0x4b7f07+_0x4ed1e8;},'JpXIL':function(_0x16e20a,_0x38eb1d){return _0x16e20a-_0x38eb1d;},'xkwNw':function(_0x3d58cf,_0x528183){return _0x3d58cf>_0x528183;},'CghmU':function(_0x404ea7,_0x54a2e2){return _0x404ea7>_0x54a2e2;},'xByvb':function(_0xbebeec,_0x17b627){return _0xbebeec>_0x17b627;}},_0x2a06a1=_0x101ac1['verifiedItems']||0x0,_0x1a2652=_0x101ac1['verificationInProgressItems']||0x0,_0x3b1a5a=_0x101ac1[_0x33f78d(0x15c)]||0x0,_0xf35295=_0x101ac1[_0x33f78d(0x12c)]||0x0,_0x1500a6=_0x101ac1['pendingItems']||0x0,_0x561a55=_0x1e30a1['MNuUj'](_0x1e30a1['MNuUj'](_0x2a06a1,_0x1a2652)+_0x3b1a5a+_0xf35295,_0x1500a6);if(_0x1e30a1[_0x33f78d(0x145)](_0x561a55,0x0))return'-';const _0x4fc7de=0xa,_0x101726=Math[_0x33f78d(0x121)](_0x1e30a1[_0x33f78d(0xcf)](_0x1e30a1['mJFfs'](_0x2a06a1,_0x561a55),_0x4fc7de)),_0x36a8e0=_0x1e30a1[_0x33f78d(0x12b)]('█'[_0x33f78d(0x125)](_0x101726),'░'['repeat'](_0x1e30a1['JpXIL'](_0x4fc7de,_0x101726))),_0x45af66=[];if(_0x1e30a1['xkwNw'](_0x3b1a5a,0x0))_0x45af66[_0x33f78d(0xc3)](_0x3b1a5a+_0x33f78d(0xf9));if(_0x1e30a1[_0x33f78d(0xd4)](_0xf35295,0x0))_0x45af66[_0x33f78d(0xc3)](_0xf35295+'\x20incomplete');if(_0x1a2652>0x0)_0x45af66['push'](_0x1a2652+'\x20in\x20progress');const _0x14ee76=_0x1e30a1[_0x33f78d(0xba)](_0x45af66[_0x33f78d(0x14c)],0x0)?'\x20('+_0x45af66['join'](',\x20')+')':'';return _0x36a8e0+'\x20'+_0x2a06a1+'/'+_0x561a55+_0x33f78d(0x10f)+_0x14ee76;}function getCurrentSessionItems(_0x12715c,_0x632398){const _0x39084d=_0x5145ea;if(!_0x12715c['currentSessionId'])return _0x632398['filter'](_0x1a0fa3=>!_0x1a0fa3['sessionId']);return _0x632398[_0x39084d(0xd3)](_0x26358b=>_0x26358b['sessionId']===_0x12715c[_0x39084d(0xbb)]||!_0x26358b[_0x39084d(0x101)]);}function displayFeature(_0x25e419,_0x3f96b4){const _0x53196f=_0x5145ea,_0x42b6fc={'eZbso':'\x0a\x20\x20\x20Scenarios:','PDUQJ':function(_0x1d67c8,_0x199e98){return _0x1d67c8===_0x199e98;},'kmqjZ':_0x53196f(0x131),'qXwwX':_0x53196f(0xa7),'arRML':function(_0x23d45d,_0x54b24c){return _0x23d45d===_0x54b24c;},'ujhBo':_0x53196f(0x10e),'fjboJ':'closed','QmEuW':function(_0x4f4f63,_0x1c154b){return _0x4f4f63===_0x1c154b;},'EFLZj':_0x53196f(0xd2),'DolUE':function(_0xcecf06,_0x36e295){return _0xcecf06!==_0x36e295;},'NnCLZ':'\x20[has\x20reviewer\x20feedback]','awrob':function(_0x12a25f,_0x1a5a0b){return _0x12a25f===_0x1a5a0b;},'tuvPn':_0x53196f(0xce),'xqIOg':function(_0x24ff92,_0x3b1125){return _0x24ff92===_0x3b1125;},'IOCdj':function(_0x52d165,_0x53efb6){return _0x52d165===_0x53efb6;}};console[_0x53196f(0x15b)]('\x0a'+_0x25e419['name']+'\x20('+_0x25e419['dashboardUrl']+')');_0x25e419[_0x53196f(0xd5)]&&console[_0x53196f(0x15b)]('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x25e419['stats']));_0x25e419['description']&&console['log']('\x20\x20\x20Description:\x20'+_0x25e419[_0x53196f(0xc2)]);_0x25e419['gitRepoUrl']&&console[_0x53196f(0x15b)]('\x20\x20\x20Repository:\x20'+_0x25e419['gitRepoUrl']);_0x25e419['gitBranch']&&console[_0x53196f(0x15b)](_0x53196f(0x126)+_0x25e419[_0x53196f(0x12d)]);console['log']('\x20\x20\x20Created:\x20'+new Date(_0x25e419['createdAt'])[_0x53196f(0xe5)]());_0x25e419[_0x53196f(0xc0)]&&console[_0x53196f(0x15b)](_0x53196f(0x106)+new Date(_0x25e419['completedAt'])[_0x53196f(0xe5)]());if(_0x3f96b4&&_0x3f96b4[_0x53196f(0x14c)]>0x0){console[_0x53196f(0x15b)](_0x42b6fc['eZbso']);for(let _0x3cf432=0x0;_0x3cf432<_0x3f96b4[_0x53196f(0x14c)];_0x3cf432++){const _0x495343=_0x3f96b4[_0x3cf432];let _0x49002d;if(_0x495343['status']===_0x53196f(0x130)&&_0x42b6fc['PDUQJ'](_0x495343['terminalReason'],_0x42b6fc[_0x53196f(0x11c)]))_0x49002d='✅';else{if(_0x495343[_0x53196f(0x157)]===_0x42b6fc['qXwwX'])_0x49002d='🟢';else{if(_0x42b6fc[_0x53196f(0x15e)](_0x495343['status'],_0x42b6fc[_0x53196f(0xe1)]))_0x49002d='🟠';else{if(_0x495343[_0x53196f(0x157)]==='blocked')_0x49002d='🛑';else{if(_0x495343['status']===_0x42b6fc['fjboJ'])_0x49002d='⛔';else _0x42b6fc[_0x53196f(0x104)](_0x495343[_0x53196f(0x157)],_0x42b6fc['EFLZj'])?_0x49002d='⏳':_0x49002d='⬜';}}}}const _0x42e635=_0x495343['version']>0x1?_0x53196f(0x14f)+_0x495343['version']+')':'',_0x3b3c0f=_0x495343[_0x53196f(0x100)]>0x1&&_0x495343['parentItemId']&&_0x495343['status']!==_0x42b6fc['fjboJ']&&_0x42b6fc['DolUE'](_0x495343[_0x53196f(0x157)],_0x53196f(0xa7))?_0x42b6fc['NnCLZ']:'';console['log'](_0x53196f(0xa3)+(_0x3cf432+0x1)+'.\x20'+_0x49002d+'\x20'+_0x495343[_0x53196f(0xc2)]+_0x42e635+_0x3b3c0f);_0x42b6fc[_0x53196f(0xf2)](_0x495343['status'],_0x42b6fc[_0x53196f(0x185)])&&_0x495343[_0x53196f(0x175)]&&console['log'](_0x53196f(0x114)+_0x495343['blockedReason']);_0x495343[_0x53196f(0x157)]===_0x53196f(0x10e)&&_0x495343['incompleteReason']&&console['log']('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x495343[_0x53196f(0xbf)]);if(_0x42b6fc['xqIOg'](_0x495343['status'],_0x42b6fc['fjboJ'])&&_0x495343[_0x53196f(0x119)]===_0x53196f(0x131))console[_0x53196f(0x15b)](_0x53196f(0xea));else _0x42b6fc['IOCdj'](_0x495343[_0x53196f(0x157)],_0x42b6fc[_0x53196f(0x10a)])&&_0x495343[_0x53196f(0x128)]&&console[_0x53196f(0x15b)](_0x53196f(0xeb)+_0x495343['canceledReason']);}}}export async function featureCreate(_0x22abd8,_0x5ca191){const _0xe71f78=_0x5145ea,_0x454560={'tlWmC':function(_0x45e89b,_0x43842a){return _0x45e89b===_0x43842a;},'PhpcE':function(_0x835462){return _0x835462();},'YzBGV':function(_0x466bd7){return _0x466bd7();},'eVsSD':'\x0aCreating\x20feature\x20review...','cAGIk':function(_0x4e65cf,_0x30734a){return _0x4e65cf(_0x30734a);}},{envNames:_0x105542}=await getEnvNames();if(_0x454560[_0xe71f78(0xb6)](_0x105542['length'],0x0)&&!process[_0xe71f78(0x172)]['RANGER_TEST_USERNAME']){let _0x2461c9=0x0;try{_0x2461c9=(await listCloudProfiles())['length'];}catch{_0x2461c9=0x1;}_0x2461c9===0x0&&console[_0xe71f78(0xa8)]('\x0a'+formatProfileRequiredMessage(_0xa5bb3a=>bold(_0xa5bb3a)));}const _0x26c963=_0x5ca191['scenarios']?_0x5ca191['scenarios']['map'](_0x4174c9=>_0x4174c9['trim']()):[],_0x74f365=_0x454560[_0xe71f78(0x11a)](getGitRepoUrl),_0x508fd4=_0x454560[_0xe71f78(0xb3)](getGitBranch);console['log'](_0x454560[_0xe71f78(0xca)]);const _0x433875=await createFeature({'name':_0x22abd8,'description':_0x5ca191[_0xe71f78(0xc2)],'checklist':_0x26c963,'gitRepoUrl':_0x74f365,'gitBranch':_0x508fd4});await _0x454560['cAGIk'](setActiveFeatureId,_0x433875['id']),await tryStartCurrentSession(_0x433875['id']);const _0x1bceef=process[_0xe71f78(0x172)]['CLAUDE_SESSION_ID'];_0x1bceef&&registerSession(_0x1bceef,_0x433875['id']),console[_0xe71f78(0x15b)]('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x433875['id']),displayFeature(_0x433875,_0x433875['checklistItems']),console[_0xe71f78(0x15b)](_0xe71f78(0xfc));}export async function featureList(_0x1e52c9){const _0x2c0698=_0x5145ea,_0x12dcdf={'HvGjr':function(_0x3ec7a9){return _0x3ec7a9();},'tdKNJ':'\x20--current-branch'},_0x4d36b8={'limit':_0x1e52c9[_0x2c0698(0x147)]??0xa,'offset':_0x1e52c9['offset']??0x0,'includeDeleted':_0x1e52c9[_0x2c0698(0x188)]};_0x1e52c9[_0x2c0698(0x117)]&&(_0x4d36b8['gitRepoUrl']=_0x12dcdf[_0x2c0698(0x183)](getGitRepoUrl),_0x4d36b8[_0x2c0698(0x12d)]=getGitBranch());const _0x5106dc=await listFeatures(_0x4d36b8);if(_0x5106dc['items'][_0x2c0698(0x14c)]===0x0){console['log']('\x0aNo\x20feature\x20reviews\x20found.');return;}const _0x384a94=_0x5106dc[_0x2c0698(0x146)]>_0x5106dc['items'][_0x2c0698(0x14c)]?_0x2c0698(0xad)+_0x5106dc['items']['length']+'\x20of\x20'+_0x5106dc[_0x2c0698(0x146)]:_0x5106dc[_0x2c0698(0x146)]+_0x2c0698(0x184);console['log']('\x0a'+_0x384a94+':\x0a');for(const _0x5e56f4 of _0x5106dc['items']){console[_0x2c0698(0x15b)](''+_0x5e56f4[_0x2c0698(0xe8)]),console[_0x2c0698(0x15b)](_0x2c0698(0x118)+_0x5e56f4['id']),_0x5e56f4[_0x2c0698(0xd5)]&&console[_0x2c0698(0x15b)](_0x2c0698(0x187)+getProgressDisplay(_0x5e56f4['stats'])),_0x5e56f4['gitBranch']&&console[_0x2c0698(0x15b)]('\x20\x20\x20Branch:\x20'+_0x5e56f4['gitBranch']),console[_0x2c0698(0x15b)]('\x20\x20\x20Created:\x20'+new Date(_0x5e56f4[_0x2c0698(0xaa)])[_0x2c0698(0xb4)]()),console['log']('');}const _0x1c18d2=_0x4d36b8['limit']??0xa,_0x18ecf6=(_0x4d36b8['offset']??0x0)+_0x5106dc[_0x2c0698(0xb2)]['length'];if(_0x18ecf6<_0x5106dc[_0x2c0698(0x146)]){const _0x1e24ad=_0x1c18d2!==0xa?'\x20--limit\x20'+_0x1c18d2:'',_0xe2f470=_0x1e52c9['currentBranch']?_0x12dcdf['tdKNJ']:'',_0x487db2=_0x1e52c9[_0x2c0698(0x188)]?'\x20--include-deleted':'';console[_0x2c0698(0x15b)](_0x2c0698(0x132)+_0x18ecf6+_0x1e24ad+_0xe2f470+_0x487db2);}}export async function featureShow(_0x24239e){const _0x3b2ae9=_0x5145ea,_0xaecedb={'mEPRe':function(_0x54e09f){return _0x54e09f();},'RwTLI':_0x3b2ae9(0x173),'SIbpC':function(_0x663fd2,_0x5c8bce,_0x2dbd46){return _0x663fd2(_0x5c8bce,_0x2dbd46);}},_0x29241c=_0x24239e||await _0xaecedb[_0x3b2ae9(0x142)](getActiveFeatureId);if(!_0x29241c)throw new Error(_0xaecedb[_0x3b2ae9(0x16b)]);const _0x32b16c=await getFeature(_0x29241c);_0xaecedb['SIbpC'](displayFeature,_0x32b16c,_0x32b16c['checklistItems']);}export async function featureResume(_0x221c25){const _0x596527=_0x5145ea,_0x341fab={'UTKMk':function(_0x34ee3d,_0x4618d7){return _0x34ee3d(_0x4618d7);},'sIkjj':function(_0x2071eb,_0x17b9ee){return _0x2071eb(_0x17b9ee);},'KCLYm':function(_0x54dc46,_0x5e28d1){return _0x54dc46!==_0x5e28d1;},'eyAjE':function(_0x2a18cd,_0x3c32d3,_0x4d03e2){return _0x2a18cd(_0x3c32d3,_0x4d03e2);},'dkRMD':function(_0x3ea023,_0x372110){return _0x3ea023(_0x372110);},'krJtV':function(_0x5a275f){return _0x5a275f();},'Bgrfg':function(_0x5240a,_0x40cc01){return _0x5240a&&_0x40cc01;},'Pvjqf':_0x596527(0xdf),'NNTsZ':function(_0x2812be,_0x25a85e){return _0x2812be||_0x25a85e;},'ddgKr':_0x596527(0x11e),'tmrTR':function(_0x4124a8,_0x125555){return _0x4124a8===_0x125555;},'XDitX':'\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','BbRAY':_0x596527(0x107),'tjoXx':_0x596527(0x150),'erGnA':function(_0x1c80ae,_0x35242f,_0x1a84a2){return _0x1c80ae(_0x35242f,_0x1a84a2);}};if(_0x221c25){const _0x69853f=await _0x341fab[_0x596527(0x152)](getFeature,_0x221c25);await _0x341fab[_0x596527(0xd7)](setActiveFeatureId,_0x69853f['id']);const _0x3ebc5f=getGitBranch();_0x3ebc5f&&_0x341fab['KCLYm'](_0x3ebc5f,_0x69853f[_0x596527(0x12d)])&&(await _0x341fab['eyAjE'](updateFeature,_0x69853f['id'],{'gitBranch':_0x3ebc5f}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x3ebc5f));console[_0x596527(0x15b)]('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x69853f['name']+'\x20('+_0x69853f['id']+')'),await _0x341fab['dkRMD'](tryStartCurrentSession,_0x69853f['id']);const _0x4c9218=process[_0x596527(0x172)]['CLAUDE_SESSION_ID'];_0x4c9218&&registerSession(_0x4c9218,_0x69853f['id']);displayFeature(_0x69853f,_0x69853f['checklistItems']),await printFeedbackNudge(_0x69853f['id']);return;}const _0x331854=getGitRepoUrl(),_0x52a253=_0x341fab[_0x596527(0xe3)](getGitBranch);if(_0x341fab[_0x596527(0x17f)](!_0x331854,!_0x52a253))throw new Error(_0x341fab[_0x596527(0x103)]);console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+_0x341fab[_0x596527(0xf1)](_0x331854,_0x341fab[_0x596527(0x12e)])+_0x596527(0x137)+_0x341fab['NNTsZ'](_0x52a253,_0x341fab['ddgKr'])+'...');const _0x3e510c=await listFeatures({'gitRepoUrl':_0x331854,'gitBranch':_0x52a253}),_0x1a54b7=_0x3e510c[_0x596527(0xb2)][_0x596527(0xd3)](_0x2da5b2=>_0x2da5b2['status']?_0x2da5b2['status']!==_0x596527(0xa7):!_0x2da5b2[_0x596527(0xc0)]);if(_0x341fab[_0x596527(0x10d)](_0x1a54b7['length'],0x0)){console[_0x596527(0x15b)](_0x341fab['XDitX']),console[_0x596527(0x15b)]('Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review');return;}let _0x475148;if(_0x1a54b7['length']===0x1)_0x475148=_0x1a54b7[0x0];else{const _0x4fa89f=process[_0x596527(0xcb)][_0x596527(0xb9)]&&process[_0x596527(0xab)][_0x596527(0xb9)];if(!_0x4fa89f){console[_0x596527(0x15b)](_0x341fab[_0x596527(0xde)]);for(const _0x4a3352 of _0x1a54b7){console[_0x596527(0x15b)]('\x20\x20'+_0x4a3352['name']),console['log']('\x20\x20\x20\x20\x20ID:\x20'+_0x4a3352['id']),_0x4a3352[_0x596527(0xd5)]&&console[_0x596527(0x15b)]('\x20\x20\x20\x20\x20Progress:\x20'+_0x341fab['dkRMD'](getProgressDisplay,_0x4a3352['stats'])),_0x4a3352['gitBranch']&&console[_0x596527(0x15b)](_0x596527(0x181)+_0x4a3352['gitBranch']);}throw new Error(_0x596527(0xef));}const {selected:_0x5e99ad}=await _0x354d65[_0x596527(0x16e)]([{'type':_0x341fab[_0x596527(0x12a)],'name':'selected','message':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','choices':_0x1a54b7['map'](_0xe87d69=>({'name':_0xe87d69[_0x596527(0xe8)]+'\x20('+_0xe87d69['id']+')','value':_0xe87d69['id']}))}]);_0x475148=_0x1a54b7['find'](_0x389dab=>_0x389dab['id']===_0x5e99ad);}await setActiveFeatureId(_0x475148['id']);_0x52a253&&_0x52a253!==_0x475148[_0x596527(0x12d)]&&(await updateFeature(_0x475148['id'],{'gitBranch':_0x52a253}),console['log'](_0x596527(0x16f)+_0x52a253));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x475148['name']+'\x20('+_0x475148['id']+')'),await _0x341fab['UTKMk'](tryStartCurrentSession,_0x475148['id']);const _0x4f56e7=await getFeature(_0x475148['id']),_0x1d14a8=process['env'][_0x596527(0x162)];_0x1d14a8&&_0x341fab['erGnA'](registerSession,_0x1d14a8,_0x4f56e7['id']),displayFeature(_0x4f56e7,_0x4f56e7[_0x596527(0xc4)]),await printFeedbackNudge(_0x4f56e7['id']);}async function printFeedbackNudge(_0x40519c){const _0x5a308a=_0x5145ea,_0x44a82d={'HvXJA':function(_0x410821,_0xb1b270){return _0x410821(_0xb1b270);},'DMgJe':function(_0xaa5cd3,_0x5abba5,_0x3468ee){return _0xaa5cd3(_0x5abba5,_0x3468ee);},'xcyLA':function(_0x31320c,_0x2531a5){return _0x31320c>_0x2531a5;},'tzHmT':_0x5a308a(0xfa)};try{const {items:_0x3af307}=await _0x44a82d['HvXJA'](getActionItems,_0x40519c);let _0x5d789d=0x0,_0x1b65e9=0x0;for(const _0x41e305 of _0x3af307){const _0xdc5d8=await _0x44a82d['DMgJe'](getItemFeedback,_0x40519c,_0x41e305['id']);_0x44a82d['xcyLA'](_0xdc5d8['unaddressedComments'][_0x5a308a(0x14c)],0x0)&&(_0x5d789d+=_0xdc5d8['unaddressedComments'][_0x5a308a(0x14c)],_0x1b65e9++);}_0x44a82d['xcyLA'](_0x5d789d,0x0)&&(console[_0x5a308a(0x15b)]('\x0a⚠️\x20\x20'+_0x5d789d+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x1b65e9+_0x5a308a(0x156)),console['log'](_0x44a82d[_0x5a308a(0x163)]));}catch{}}async function tryStartCurrentSession(_0x2565eb){const _0x465914=_0x5145ea,_0x2fa321={'KtRHq':function(_0x44b3c5,_0x47532f,_0x20be17){return _0x44b3c5(_0x47532f,_0x20be17);}};try{const {sessions:_0x5e1ee9}=await listFeatureSessions(_0x2565eb),_0x3f2298=_0x5e1ee9[_0x465914(0xb8)](_0x8e8598=>_0x8e8598['status']===_0x465914(0xdb));_0x3f2298&&(await _0x2fa321[_0x465914(0xe6)](startSession,_0x2565eb,_0x3f2298['id']),console[_0x465914(0x15b)](_0x465914(0x186)+_0x3f2298['iteration']));}catch{}}export async function featureReport(_0x61427e,_0x3be782){const _0x112df9=_0x5145ea,_0x50db86={'wNQcG':_0x112df9(0x14b),'pxtPJ':'\x0aGenerating\x20report...','YflUz':function(_0x450054,_0x391f80,_0x2399a5){return _0x450054(_0x391f80,_0x2399a5);},'apODI':'reports','RhQir':function(_0x301e32,_0x5035a3,_0xaf7e94){return _0x301e32(_0x5035a3,_0xaf7e94);},'HxzWH':function(_0x3707df,_0x4136ab){return _0x3707df(_0x4136ab);}},_0x3127a7=_0x61427e||await getActiveFeatureId();if(!_0x3127a7)throw new Error(_0x50db86[_0x112df9(0x143)]);console['log'](_0x50db86[_0x112df9(0x13f)]);const _0x1df030=await _0x50db86['YflUz'](getFeatureReportMarkdown,_0x3127a7,{'style':_0x3be782['style']}),_0x1f5c38=_0x3be782['output']||join(getRangerDir(),_0x50db86['apODI'],_0x3127a7+_0x112df9(0xae)),_0x6866f5=_0x50db86['RhQir'](join,_0x1f5c38,'..');!_0x50db86['HxzWH'](existsSync,_0x6866f5)&&await _0x50db86['YflUz'](mkdir,_0x6866f5,{'recursive':!![]}),await writeFile(_0x1f5c38,_0x1df030,_0x112df9(0x105)),console['log'](_0x112df9(0xac)+_0x1f5c38);}function getScenarioResult(_0x22a558){const _0x2362c8=_0x5145ea,_0x30d2cf={'wiwzv':'closed','mFcqZ':_0x2362c8(0xd2)};if(_0x22a558['status']===_0x30d2cf[_0x2362c8(0x160)])return _0x22a558[_0x2362c8(0x119)]??_0x30d2cf[_0x2362c8(0x160)];if(_0x22a558['status']===_0x30d2cf['mFcqZ'])return'in_progress';return _0x22a558[_0x2362c8(0x157)];}function getScenarioRationale(_0x512e8a,_0x31db41){const _0x1889af=_0x5145ea,_0xcac41e={'RrQsl':_0x1889af(0x149)},_0x13dc15=_0xcac41e['RrQsl']['split']('|');let _0x47ce6b=0x0;while(!![]){switch(_0x13dc15[_0x47ce6b++]){case'0':if(_0x31db41)return _0x31db41;continue;case'1':if(_0x512e8a[_0x1889af(0x128)])return _0x512e8a['canceledReason'];continue;case'2':if(_0x512e8a[_0x1889af(0xe0)])return _0x512e8a['notes'];continue;case'3':if(_0x512e8a['incompleteReason'])return _0x512e8a['incompleteReason'];continue;case'4':if(_0x512e8a['blockedReason'])return _0x512e8a['blockedReason'];continue;case'5':return null;}break;}}export async function featureReportPrDescription(_0xdd62c5,_0x45ca51){const _0x526781=_0x5145ea,_0x1791f6={'XVGul':function(_0x15476d,_0x31caa5){return _0x15476d===_0x31caa5;},'AGfsI':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','bTAqz':function(_0x49cd8b,_0x12cee3){return _0x49cd8b>_0x12cee3;},'gNFXB':function(_0x1da888,_0x4241e7){return _0x1da888+_0x4241e7;},'bwNBg':_0x526781(0xee),'OhQEJ':function(_0x4d2014,_0xb45cfc,_0x3b8608){return _0x4d2014(_0xb45cfc,_0x3b8608);}},_0x2f4e47=_0xdd62c5||await getActiveFeatureId();if(!_0x2f4e47)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');const _0x13be04=await getFeature(_0x2f4e47),_0x3302d9=_0x13be04['checklistItems']||[],_0x3c0d8e=getCurrentSessionItems(_0x13be04,_0x3302d9);_0x1791f6[_0x526781(0x177)](_0x3c0d8e['length'],0x0)&&(console['error'](_0x1791f6[_0x526781(0x154)]),process[_0x526781(0xa4)](0x1));const _0xacb61d=_0x45ca51['excludeScenarios']??[],_0x3f4643=_0xacb61d['filter'](_0x24b93e=>!Number[_0x526781(0x11d)](_0x24b93e)||_0x24b93e<0x1||_0x24b93e>_0x3c0d8e['length']);if(_0x1791f6['bTAqz'](_0x3f4643['length'],0x0)){console['error'](_0x526781(0xd6)+_0x3f4643[_0x526781(0xdc)](',\x20')),console['log']('\x0aAvailable\x20scenarios:');for(let _0x761378=0x0;_0x761378<_0x3c0d8e['length'];_0x761378++){console[_0x526781(0x15b)]('\x20\x20'+_0x1791f6[_0x526781(0xe2)](_0x761378,0x1)+'.\x20'+_0x3c0d8e[_0x761378]['description']);}process['exit'](0x1);}const _0x585f6e=new Set(_0xacb61d[_0x526781(0x139)](_0x27562e=>_0x27562e-0x1)),_0x2bec38=_0x3c0d8e[_0x526781(0xd3)]((_0x963d06,_0x368125)=>!_0x585f6e['has'](_0x368125));_0x2bec38[_0x526781(0x14c)]===0x0&&(console['error'](_0x1791f6[_0x526781(0x16a)]),process['exit'](0x1));if(_0x45ca51[_0x526781(0x166)])await outputJsonReport(_0x2f4e47,_0x13be04,_0x2bec38);else{const _0x572f23=await _0x1791f6['OhQEJ'](getFeatureReportMarkdown,_0x2f4e47,{'itemIds':_0x2bec38['map'](_0x20841a=>_0x20841a['id'])});process['stdout']['write'](_0x572f23['trimEnd']()+'\x0a');}}async function outputJsonReport(_0xeb1a6f,_0x521f69,_0x20706e){const _0x4f7119=_0x5145ea,_0x3658ca={'WmdiW':function(_0x44bbf8,_0x3c32c7){return _0x44bbf8(_0x3c32c7);},'aeGgd':function(_0x415b72,_0x52a121){return _0x415b72===_0x52a121;},'EGJKt':function(_0x1af6bc,_0x898e6b,_0x406149){return _0x1af6bc(_0x898e6b,_0x406149);},'RewLS':function(_0x3b97bb){return _0x3b97bb();}},_0x42b690=_0x3658ca[_0x4f7119(0x178)](getApiBaseUrl),_0x4141d3=await _0x3658ca[_0x4f7119(0x15d)](getFeatureReport,_0xeb1a6f),_0x554f85=new Map(_0x4141d3[_0x4f7119(0xc4)]['map'](_0x148ec9=>[_0x148ec9['id'],_0x148ec9])),_0x390e1b=await Promise['all'](_0x20706e[_0x4f7119(0x139)](async _0x3d8fb1=>{const _0x471e50=_0x4f7119,_0x1c7aa3=_0x554f85[_0x471e50(0xa1)](_0x3d8fb1['id']),_0x52a265=_0x1c7aa3?.['linkedSession']??null;let _0x2424e7=[];if(_0x3d8fb1[_0x471e50(0xb0)])try{const {steps:_0x6070d5}=await _0x3658ca['WmdiW'](getBrowserSessionSteps,_0x3d8fb1['browserSessionId']);_0x6070d5[_0x471e50(0x14c)]>0x0&&(_0x2424e7=_0x6070d5[_0x471e50(0x139)](_0x4f43e4=>{const _0xec2641=_0x471e50,_0x24f63f=_0x4f43e4['assets'][_0xec2641(0xb8)](_0x1f1c81=>_0x1f1c81['assetType']===_0xec2641(0xda)&&_0x1f1c81['timing']===_0xec2641(0xd9))??_0x4f43e4['assets']['find'](_0x2f4420=>_0x2f4420['assetType']==='screenshot');let _0x1ab085=null,_0x3123c7=null;if(_0x24f63f){const _0x1687cf=_0x24f63f['storage']['location'][_0xec2641(0x140)]('/')[_0xec2641(0x15a)]();_0x1ab085=_0x42b690+'/api/v1/mcp/browser-sessions/'+_0x3d8fb1['browserSessionId']+'/artifacts/'+_0x1687cf,_0x1687cf&&(_0x3123c7=_0x1687cf[_0xec2641(0x14d)](/\.\w+$/,'')['replace'](/^(key_)?\d+_/,'')[_0xec2641(0x14d)](/[-_]/g,'\x20'));}return{'description':_0x3123c7||_0x4f43e4['description']||_0x4f43e4[_0xec2641(0x129)]||_0xec2641(0x174)+_0x4f43e4['position'],'screenshot':_0x1ab085,'is_key_step':_0x4f43e4['isKeyStep']};}));}catch{}return _0x3658ca['aeGgd'](_0x2424e7['length'],0x0)&&_0x52a265?.['screenshotUrls']&&(_0x2424e7=_0x52a265['screenshotUrls']['map']((_0x1916e7,_0x205f9e)=>({'description':'Screenshot\x20'+(_0x205f9e+0x1),'screenshot':_0x1916e7,'is_key_step':![]}))),{'description':_0x3d8fb1['description'],'result':getScenarioResult(_0x3d8fb1),'rationale':_0x3658ca['EGJKt'](getScenarioRationale,_0x3d8fb1,_0x52a265?.[_0x471e50(0xd8)]),'steps':_0x2424e7};})),_0x3e2d6e={'url':_0x521f69['dashboardUrl'],'scenarios':_0x390e1b};process[_0x4f7119(0xab)]['write'](JSON['stringify'](_0x3e2d6e,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x1459d7){const _0xfcd3fb=_0x5145ea,_0x33bb36={'dYLzq':function(_0x43fd54){return _0x43fd54();},'iViDg':'No\x20active\x20session\x20for\x20this\x20feature\x20review.','VzlZi':'Current\x20session\x20not\x20found.','nLcdZ':_0xfcd3fb(0x123),'BsEtb':'in_progress','scnFu':function(_0x34b5b4,_0x2c6c7f,_0x142d3a){return _0x34b5b4(_0x2c6c7f,_0x142d3a);}},_0x28e012=_0x1459d7||await _0x33bb36['dYLzq'](getActiveFeatureId);if(!_0x28e012)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x50c2fe=await getFeature(_0x28e012);if(!_0x50c2fe[_0xfcd3fb(0xbb)])throw new Error(_0x33bb36['iViDg']);const {sessions:_0x5b3e6f}=await listFeatureSessions(_0x28e012),_0xae9ed5=_0x5b3e6f[_0xfcd3fb(0xb8)](_0x7af8ab=>_0x7af8ab['id']===_0x50c2fe[_0xfcd3fb(0xbb)]);if(!_0xae9ed5)throw new Error(_0x33bb36[_0xfcd3fb(0xf8)]);if(_0xae9ed5[_0xfcd3fb(0x157)]===_0x33bb36[_0xfcd3fb(0x116)]){console[_0xfcd3fb(0x15b)](_0xfcd3fb(0xb5));return;}if(_0xae9ed5[_0xfcd3fb(0x157)]!==_0x33bb36['BsEtb'])throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0xae9ed5[_0xfcd3fb(0x157)]);console['log']('\x0aConcluding\x20session...'),await _0x33bb36[_0xfcd3fb(0x17b)](concludeSession,_0x28e012,_0x50c2fe[_0xfcd3fb(0xbb)]),console[_0xfcd3fb(0x15b)]('\x0a✅\x20Session\x20'+_0xae9ed5['iteration']+'\x20concluded.'),console['log']('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x14f7cb){const _0x32fe5f=_0x5145ea,_0x3666b4={'FZJFx':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','IsOic':'completed','edqah':function(_0x57e0ad,_0x39a682){return _0x57e0ad===_0x39a682;},'CvTge':_0x32fe5f(0x112)},_0x41872b=_0x14f7cb||await getActiveFeatureId();if(!_0x41872b)throw new Error(_0x3666b4[_0x32fe5f(0xd0)]);const _0x281a36=await getFeature(_0x41872b);console[_0x32fe5f(0x15b)]('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x281a36[_0x32fe5f(0xe8)]+'\x0a');const {sessions:_0x39ac78}=await listFeatureSessions(_0x41872b);if(_0x39ac78['length']===0x0){console[_0x32fe5f(0x15b)]('No\x20sessions\x20found.');return;}for(const _0x2e96d4 of _0x39ac78){const _0x5e5c2d=_0x2e96d4['status']===_0x3666b4['IsOic']?'✅':_0x3666b4[_0x32fe5f(0xbe)](_0x2e96d4['status'],_0x3666b4['CvTge'])?'🔄':'▶️';console['log'](_0x5e5c2d+_0x32fe5f(0x159)+_0x2e96d4['iteration']+'\x20('+_0x2e96d4['id']+')'),console[_0x32fe5f(0x15b)](_0x32fe5f(0x182)+_0x2e96d4[_0x32fe5f(0x157)]),console['log'](_0x32fe5f(0x102)+new Date(_0x2e96d4[_0x32fe5f(0xaa)])['toLocaleString']()),_0x2e96d4['completedAt']&&console['log'](_0x32fe5f(0x106)+new Date(_0x2e96d4['completedAt'])['toLocaleString']()),console[_0x32fe5f(0x15b)]('');}}export async function featureAddScenario(_0x3933f4,_0xceb91d){const _0x54d90e=_0x5145ea,_0x1dacd1={'UaZTc':function(_0x1c1056){return _0x1c1056();},'hefUv':_0x54d90e(0x173),'vBZUF':function(_0x2dc797,_0x3716dd){return _0x2dc797(_0x3716dd);},'lQjXR':function(_0x20e9d9,_0x1320d1){return _0x20e9d9(_0x1320d1);}},_0x38e19e=_0xceb91d||await _0x1dacd1['UaZTc'](getActiveFeatureId);if(!_0x38e19e)throw new Error(_0x1dacd1['hefUv']);const _0x2831af=await _0x1dacd1[_0x54d90e(0x17e)](getFeature,_0x38e19e);if(_0x2831af['latestReview']&&!_0x2831af[_0x54d90e(0x153)][_0x54d90e(0xa6)])throw new Error(_0x54d90e(0x170)+_0x2831af['dashboardUrl']);await createChecklistItem(_0x38e19e,_0x3933f4);const _0xb00211=await _0x1dacd1[_0x54d90e(0x141)](getFeature,_0x38e19e);console['log'](_0x54d90e(0xbd)),displayFeature(_0xb00211,_0xb00211[_0x54d90e(0xc4)]);}export async function featureEditScenario(_0x464382,_0x3bd50a){const _0x639add=_0x5145ea,_0x88c0ab={'ItqWN':function(_0x1250e8){return _0x1250e8();},'iioby':'Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','VrEAe':function(_0x17850b,_0x1128f3){return _0x17850b(_0x1128f3);},'cbqaK':function(_0x2bf1d3,_0x9c24fc){return _0x2bf1d3===_0x9c24fc;},'eYeWT':_0x639add(0x148),'ihEdd':function(_0x5a183c,_0x3ec61b){return _0x5a183c-_0x3ec61b;},'EXfgi':function(_0x83ca07,_0x2349e8){return _0x83ca07<_0x2349e8;},'qkVBA':function(_0x279b4d,_0xcde292){return _0x279b4d>=_0xcde292;},'kRBAL':'\x0aAvailable\x20scenarios:','MFrJj':function(_0x5d5c0a,_0x18548c){return _0x5d5c0a+_0x18548c;},'JDmOF':function(_0x3f21a7,_0x19c722,_0x698bdc,_0x65d2c4){return _0x3f21a7(_0x19c722,_0x698bdc,_0x65d2c4);}},_0x5008e8=_0x3bd50a['id']||await _0x88c0ab['ItqWN'](getActiveFeatureId);!_0x5008e8&&(console[_0x639add(0xd1)](_0x639add(0xdd)),console['error'](_0x88c0ab['iioby']),process[_0x639add(0xa4)](0x1));const _0x2cc79b=await _0x88c0ab['VrEAe'](getFeature,_0x5008e8);_0x2cc79b[_0x639add(0x153)]&&!_0x2cc79b[_0x639add(0x153)]['submittedAt']&&(console['error'](_0x639add(0x111)),console['error'](_0x639add(0xff)),console['error']('\x20\x20'+_0x2cc79b[_0x639add(0x13e)]),process[_0x639add(0xa4)](0x1));const _0x4b0815=_0x2cc79b[_0x639add(0xc4)]||[];_0x88c0ab[_0x639add(0x16d)](_0x4b0815['length'],0x0)&&(console['error'](_0x639add(0x13c)),process[_0x639add(0xa4)](0x1));if(_0x88c0ab['cbqaK'](_0x3bd50a['scenario'],undefined)){console[_0x639add(0xd1)](_0x88c0ab['eYeWT']),console['log'](_0x639add(0x13a));for(let _0x284116=0x0;_0x284116<_0x4b0815['length'];_0x284116++){console[_0x639add(0x15b)]('\x20\x20'+(_0x284116+0x1)+'.\x20'+_0x4b0815[_0x284116][_0x639add(0xc2)]);}process['exit'](0x1);}const _0x57ee6e=_0x88c0ab[_0x639add(0xe4)](_0x3bd50a['scenario'],0x1);if(_0x88c0ab['EXfgi'](_0x57ee6e,0x0)||_0x88c0ab[_0x639add(0x13b)](_0x57ee6e,_0x4b0815[_0x639add(0x14c)])){console['error'](_0x639add(0x13d)+_0x3bd50a['scenario']+_0x639add(0x17c)+_0x4b0815[_0x639add(0x14c)]+_0x639add(0xcc)),console['log'](_0x88c0ab['kRBAL']);for(let _0x3245f2=0x0;_0x3245f2<_0x4b0815[_0x639add(0x14c)];_0x3245f2++){console[_0x639add(0x15b)]('\x20\x20'+_0x88c0ab[_0x639add(0xc7)](_0x3245f2,0x1)+'.\x20'+_0x4b0815[_0x3245f2]['description']);}process['exit'](0x1);}const _0x39eb77=_0x4b0815[_0x57ee6e];await _0x88c0ab[_0x639add(0x179)](updateChecklistItem,_0x5008e8,_0x39eb77['id'],{'description':_0x464382});const _0x4d0e00=await getFeature(_0x5008e8);console[_0x639add(0x15b)]('\x0a✅\x20Scenario\x20updated'),displayFeature(_0x4d0e00,_0x4d0e00[_0x639add(0xc4)]);}function _0x198d(_0x5bc642,_0x431540){_0x5bc642=_0x5bc642-0xa1;const _0x3d36ad=_0x3d36();let _0x198d0c=_0x3d36ad[_0x5bc642];return _0x198d0c;}async function downloadFeedbackImage(_0x34c9a9,_0x4b8a81){const _0x4457be=_0x5145ea,_0x1955d1={'HTqtu':_0x4457be(0x120),'ZntSC':function(_0x591b16,_0x4c9af8,_0x49c218){return _0x591b16(_0x4c9af8,_0x49c218);},'bRksP':function(_0x3089f4,_0x489fda,_0x5ae334){return _0x3089f4(_0x489fda,_0x5ae334);},'YIGYH':function(_0x6ba5c1,_0x1464dd,_0x2aec08){return _0x6ba5c1(_0x1464dd,_0x2aec08);}};try{const _0x20bc94=join(getRangerDir(),_0x1955d1['HTqtu']);await _0x1955d1[_0x4457be(0x176)](mkdir,_0x20bc94,{'recursive':!![]});const _0x272ddd=_0x1955d1[_0x4457be(0xfe)](join,_0x20bc94,'comment_'+_0x4b8a81+_0x4457be(0xbc)),_0x5f24a1=await fetch(_0x34c9a9);if(!_0x5f24a1['ok'])return null;const _0x5564c8=Buffer['from'](await _0x5f24a1[_0x4457be(0x169)]());return await _0x1955d1['YIGYH'](writeFile,_0x272ddd,_0x5564c8),_0x272ddd;}catch{return null;}}export async function featureGetReview(_0x2f9ea4){const _0x2c8bad=_0x5145ea,_0x411f58={'JHNdC':function(_0x16639b){return _0x16639b();},'Cvnpe':function(_0x550984,_0x18db2c){return _0x550984(_0x18db2c);},'PbeNQ':function(_0x26b3f9,_0x2a93be){return _0x26b3f9(_0x2a93be);},'loXtu':function(_0x4b3b96,_0x5305f2){return _0x4b3b96===_0x5305f2;},'qvyLp':'No\x20scenarios\x20found.','YKrWI':function(_0x41caab,_0x47fa28){return _0x41caab>_0x47fa28;},'zfePb':function(_0x2b36d7,_0x128086){return _0x2b36d7+_0x128086;},'VJDzC':_0x2c8bad(0x115),'uMJWI':_0x2c8bad(0xe7),'qbNPM':_0x2c8bad(0x161)},_0x1f5d21=_0x2f9ea4||await _0x411f58[_0x2c8bad(0xb1)](getActiveFeatureId);if(!_0x1f5d21)throw new Error(_0x2c8bad(0x173));const _0xb91e2f=await _0x411f58[_0x2c8bad(0x10c)](getFeature,_0x1f5d21),{items:_0x4cbe87}=await _0x411f58['PbeNQ'](getActionItems,_0x1f5d21);console[_0x2c8bad(0x15b)]('\x0a📋\x20Feedback\x20for:\x20'+_0xb91e2f['name']+'\x20('+_0xb91e2f['id']+')\x0a');if(_0x411f58['loXtu'](_0x4cbe87[_0x2c8bad(0x14c)],0x0)){console['log'](_0x411f58['qvyLp']);return;}for(let _0x5e662a=0x0;_0x5e662a<_0x4cbe87[_0x2c8bad(0x14c)];_0x5e662a++){const _0x1296d6=_0x4cbe87[_0x5e662a],_0x4183d8=_0x411f58[_0x2c8bad(0xed)](_0x1296d6['version'],0x1)?_0x2c8bad(0x14f)+_0x1296d6['version']+')':'',_0x243237=await getItemFeedback(_0x1f5d21,_0x1296d6['id']);if(_0x411f58[_0x2c8bad(0xed)](_0x243237['unaddressedComments'][_0x2c8bad(0x14c)],0x0)){console[_0x2c8bad(0x15b)](_0x2c8bad(0x11f)+_0x411f58[_0x2c8bad(0x171)](_0x5e662a,0x1)+_0x2c8bad(0xe9)+_0x1296d6['description']+'\x22'+_0x4183d8+'\x20—\x20'+_0x243237['unaddressedComments'][_0x2c8bad(0x14c)]+'\x20unaddressed\x20comment(s)');for(const _0x424e08 of _0x243237[_0x2c8bad(0x180)]){const _0x5de012=new Date(_0x424e08[_0x2c8bad(0xaa)])[_0x2c8bad(0xb4)](_0x411f58['VJDzC'],{'month':_0x411f58[_0x2c8bad(0x138)],'day':_0x2c8bad(0x108)}),_0x2667cd=_0x424e08['authorName']||_0x424e08['authorEmail']||'Unknown';console[_0x2c8bad(0x15b)](_0x2c8bad(0x136)+_0x2667cd+'\x20('+_0x5de012+_0x2c8bad(0xf0)+_0x424e08[_0x2c8bad(0x113)]+'\x22');if(_0x424e08[_0x2c8bad(0xf7)]){const _0x5e4714=await downloadFeedbackImage(_0x424e08[_0x2c8bad(0xf7)],_0x424e08['id']);_0x5e4714&&console[_0x2c8bad(0x15b)](_0x2c8bad(0x16c)+_0x5e4714);}if(_0x424e08['domRef']){const _0x8ad98c=_0x424e08[_0x2c8bad(0x168)]['selector']['split'](_0x411f58['qbNPM'])[_0x2c8bad(0x15a)]()?.['split'](':')[0x0]||_0x2c8bad(0x12f),_0x18d4e4=_0x424e08['domRef']['textContent']?'\x20\x22'+_0x424e08[_0x2c8bad(0x168)]['textContent']['slice'](0x0,0x3c)+'\x22':'';console['log'](_0x2c8bad(0xcd)+_0x8ad98c+'>'+_0x18d4e4),console['log'](_0x2c8bad(0xa2)+_0x424e08['domRef'][_0x2c8bad(0x135)]);}else{if(_0x424e08[_0x2c8bad(0x109)]){const _0x3d3e0a=_0x424e08['spatial'][_0x2c8bad(0xfd)];_0x411f58['loXtu'](_0x424e08['spatial'][_0x2c8bad(0x133)],'point')&&_0x3d3e0a[_0x2c8bad(0x14c)]>=0x2?console[_0x2c8bad(0x15b)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x3d3e0a[0x0][_0x2c8bad(0x155)](0x2)+',\x20'+_0x3d3e0a[0x1]['toFixed'](0x2)+')'):console['log']('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x424e08['spatial']['type']+'\x20at\x20['+_0x3d3e0a['map'](_0x340aec=>_0x340aec['toFixed'](0x2))['join'](',\x20')+']');}}}if(_0x243237[_0x2c8bad(0x17d)]){console['log'](_0x2c8bad(0xc9));for(const _0x4fef6e of _0x243237[_0x2c8bad(0x17d)][_0x2c8bad(0x140)]('\x0a')){console[_0x2c8bad(0x15b)](_0x2c8bad(0xc6)+_0x4fef6e);}}}else console[_0x2c8bad(0x15b)](_0x2c8bad(0x11f)+(_0x5e662a+0x1)+_0x2c8bad(0xe9)+_0x1296d6[_0x2c8bad(0xc2)]+'\x22'+_0x4183d8+'\x20—\x20no\x20comments'),console['log'](_0x2c8bad(0xf6));console[_0x2c8bad(0x15b)]('');}}export async function featureDelete(_0x143a7e){const _0x3ad009=_0x5145ea,_0x28fa07={'LlZOy':function(_0x4209de){return _0x4209de();},'qbSlD':_0x3ad009(0x173),'iFbzN':function(_0x1e5f2f,_0x4d096e){return _0x1e5f2f(_0x4d096e);}},_0x1b39fb=_0x143a7e||await _0x28fa07['LlZOy'](getActiveFeatureId);if(!_0x1b39fb)throw new Error(_0x28fa07['qbSlD']);const _0x3bef9c=await getFeature(_0x1b39fb);await _0x28fa07[_0x3ad009(0x122)](softDeleteFeature,_0x1b39fb),console['log']('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x3bef9c['name']+'\x20('+_0x1b39fb+')'),console['log']('\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20'+_0x1b39fb);}function _0x3d36(){const _0x32953a=['active-feature.txt','kmqjZ','isInteger','any','Scenario\x20','feedback-images','round','iFbzN','completed','7471890oVJDCY','repeat','\x20\x20\x20Branch:\x20','28878dtGoTG','canceledReason','stepName','tjoXx','FHUID','incompleteItems','gitBranch','ddgKr','element','closed','approved','Next\x20page:\x20ranger\x20list\x20--offset\x20','type','GxxmP','selector','\x20\x20💬\x20','\x20/\x20','uMJWI','map','\x0aAvailable\x20scenarios:','qkVBA','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','\x0a❌\x20Invalid\x20scenario\x20index:\x20','dashboardUrl','pxtPJ','split','lQjXR','mEPRe','wNQcG','jugQV','qjqgp','totalCount','limit','\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','0|4|3|1|2|5','70pQyEtQ','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','length','replace','git\x20remote\x20get-url\x20origin','\x20(v','list','lsOHm','UTKMk','latestReview','AGfsI','toFixed','\x20scenario(s).','status','gyVEY','\x20Session\x20','pop','log','blockedItems','WmdiW','arRML','TAfcW','wiwzv','\x20>\x20','CLAUDE_SESSION_ID','tzHmT','6UugUzs','\x0a✅\x20Restored\x20feature\x20review:\x20','json','1839400KeZnLe','domRef','arrayBuffer','bwNBg','RwTLI','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','cbqaK','prompt','\x20\x20\x20Updated\x20branch\x20to:\x20','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','zfePb','env','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','Step\x20','blockedReason','ZntSC','XVGul','RewLS','JDmOF','411005tAgGmL','scnFu','.\x20Feature\x20review\x20has\x20','canonicalFlow','vBZUF','Bgrfg','unaddressedComments','\x20\x20\x20\x20\x20Branch:\x20','\x20\x20\x20Status:\x20','HvGjr','\x20feature\x20review(s)\x20found','tuvPn','\x20\x20\x20▶️\x20Started\x20session\x20','\x20\x20\x20Progress:\x20','includeDeleted','get','\x20\x20\x20\x20\x20📋\x20Selector:\x20','\x20\x20\x20','exit','github.com/','submittedAt','verified','warn','70NNsuWT','createdAt','stdout','\x0a✅\x20Report\x20generated:\x20','Showing\x20','.md','zpmlq','browserSessionId','JHNdC','items','YzBGV','toLocaleDateString','\x0a✅\x20Session\x20is\x20already\x20completed.','tlWmC','trim','find','isTTY','xByvb','currentSessionId','.png','\x0a✅\x20Scenario\x20added','edqah','incompleteReason','completedAt','DFZEJ','description','push','checklistItems','Wukdh','\x20\x20\x20\x20','MFrJj','\x1b[0m','\x20\x20Expected\x20flow:','eVsSD','stdin','\x20scenarios.','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','blocked','AXZlz','FZJFx','error','verification_in_progress','filter','CghmU','stats','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','sIkjj','agentResponse','after','screenshot','ready','join','\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','BbRAY','Not\x20in\x20a\x20git\x20repository.','notes','ujhBo','gNFXB','krJtV','ihEdd','toLocaleString','KtRHq','short','name',':\x20\x22','\x20\x20\x20\x20\x20\x20Approved','\x20\x20\x20\x20\x20\x20Cancelled:\x20','100420kReZfp','YKrWI','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','):\x20\x22','NNTsZ','awrob','pipe','1784475puLIdQ','rVIad','\x20\x20✅\x20No\x20feedback\x20to\x20address','assetUrl','VzlZi','\x20blocked','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','AJmpQ','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','coordinates','bRksP','Please\x20finish\x20your\x20review\x20first:','version','sessionId','\x20\x20\x20Created:\x20','Pvjqf','QmEuW','utf-8','\x20\x20\x20Completed:\x20','\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','numeric','spatial','fjboJ','1490993QriVOX','Cvnpe','tmrTR','incomplete','\x20verified','CSENz','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','in_progress','content','\x20\x20\x20\x20\x20\x20Blocked:\x20','en-US','nLcdZ','currentBranch','\x20\x20\x20ID:\x20','terminalReason','PhpcE'];_0x3d36=function(){return _0x32953a;};return _0x3d36();}export async function featureRestore(_0x12b494){const _0x1846f3=_0x5145ea,_0x4ad957={'lsOHm':function(_0x4bff77,_0x5df129){return _0x4bff77(_0x5df129);},'jugQV':function(_0x59312b,_0x151dd7,_0x1abaaf){return _0x59312b(_0x151dd7,_0x1abaaf);}};await _0x4ad957[_0x1846f3(0x151)](restoreFeature,_0x12b494);const _0x1983f0=await getFeature(_0x12b494);console['log'](_0x1846f3(0x165)+_0x1983f0['name']+'\x20('+_0x12b494+')'),_0x4ad957[_0x1846f3(0x144)](displayFeature,_0x1983f0,_0x1983f0[_0x1846f3(0xc4)]);}
@@ -1 +1 @@
1
- (function(_0x48d4a5,_0x288efa){const _0x55ef18=_0x2695,_0x137a68=_0x48d4a5();while(!![]){try{const _0x46cf33=parseInt(_0x55ef18(0x1c3))/0x1+-parseInt(_0x55ef18(0x1c8))/0x2+-parseInt(_0x55ef18(0x1c9))/0x3+-parseInt(_0x55ef18(0x1cb))/0x4+-parseInt(_0x55ef18(0x1d1))/0x5+parseInt(_0x55ef18(0x1cd))/0x6+-parseInt(_0x55ef18(0x1c5))/0x7*(-parseInt(_0x55ef18(0x1cc))/0x8);if(_0x46cf33===_0x288efa)break;else _0x137a68['push'](_0x137a68['shift']());}catch(_0x23350b){_0x137a68['push'](_0x137a68['shift']());}}}(_0x4c58,0x28039));import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};let cancellationHandlersInstalled=![];function installCancellationHandlers(){const _0x27a8a3=_0x2695,_0x2d724f={'HjjNm':_0x27a8a3(0x1c4),'iwDEw':_0x27a8a3(0x1d0),'xkFKE':'SIGHUP'};if(cancellationHandlersInstalled)return;const _0x216a21=()=>{process['exit'](0x0);};process['once'](_0x2d724f['HjjNm'],_0x216a21),process['once'](_0x2d724f['iwDEw'],_0x216a21),process['once'](_0x2d724f[_0x27a8a3(0x1ce)],_0x216a21),cancellationHandlersInstalled=!![];}function _0x2695(_0x42db2b,_0x1c196c){_0x42db2b=_0x42db2b-0x1c3;const _0x4c581c=_0x4c58();let _0x269506=_0x4c581c[_0x42db2b];return _0x269506;}export async function hook(_0x3a66b3,_0x42a159){const _0x340da8=_0x2695,_0x16aece={'fFLbf':function(_0x53e88e,_0x2da120){return _0x53e88e(_0x2da120);}};installCancellationHandlers();const _0x5ad5c0=HOOKS[_0x3a66b3];if(!_0x5ad5c0){const _0x51ad7c=Object[_0x340da8(0x1c6)](HOOKS)['join'](',\x20');console[_0x340da8(0x1cf)]('Unknown\x20hook:\x20'+_0x3a66b3),console[_0x340da8(0x1cf)](_0x340da8(0x1ca)+_0x51ad7c),process[_0x340da8(0x1c7)](0x1);}await _0x16aece['fFLbf'](_0x5ad5c0,_0x42a159);}function _0x4c58(){const _0x167397=['40587MtIyvc','Valid\x20hooks:\x20','824196TAFgxO','4422984AJRksH','1168764nwYtyi','xkFKE','error','SIGTERM','843510CgGAii','8803QibZKB','SIGINT','7nfgyuJ','keys','exit','408586RgCRer'];_0x4c58=function(){return _0x167397;};return _0x4c58();}
1
+ (function(_0x339900,_0x339044){const _0xc01f14=_0x4f16,_0x387774=_0x339900();while(!![]){try{const _0x4e6cfd=-parseInt(_0xc01f14(0xbb))/0x1+parseInt(_0xc01f14(0xc1))/0x2*(parseInt(_0xc01f14(0xbc))/0x3)+-parseInt(_0xc01f14(0xb9))/0x4*(-parseInt(_0xc01f14(0xba))/0x5)+parseInt(_0xc01f14(0xc0))/0x6+-parseInt(_0xc01f14(0xbf))/0x7+-parseInt(_0xc01f14(0xbe))/0x8+parseInt(_0xc01f14(0xc7))/0x9*(parseInt(_0xc01f14(0xbd))/0xa);if(_0x4e6cfd===_0x339044)break;else _0x387774['push'](_0x387774['shift']());}catch(_0x181c05){_0x387774['push'](_0x387774['shift']());}}}(_0x3b1f,0x2478c));function _0x4f16(_0x544ffb,_0x2609db){_0x544ffb=_0x544ffb-0xb8;const _0x3b1f83=_0x3b1f();let _0x4f1663=_0x3b1f83[_0x544ffb];return _0x4f1663;}function _0x3b1f(){const _0x5a9425=['4032333siCJSV','exit','once','96372zmjdRD','5UUvSvo','102495oPzPwM','6HjcBUG','10cbFSvM','2100416ywJDNu','1428490DZXoIa','668922ouHjlG','134888ZYpUHj','SIGINT','error','Unknown\x20hook:\x20','SIGTERM','join'];_0x3b1f=function(){return _0x5a9425;};return _0x3b1f();}import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};let cancellationHandlersInstalled=![];function installCancellationHandlers(){const _0x2464b2=_0x4f16,_0x531240={'WCyFR':_0x2464b2(0xc2)};if(cancellationHandlersInstalled)return;const _0x2bfd5a=()=>{process['exit'](0x0);};process[_0x2464b2(0xb8)](_0x531240['WCyFR'],_0x2bfd5a),process['once'](_0x2464b2(0xc5),_0x2bfd5a),process[_0x2464b2(0xb8)]('SIGHUP',_0x2bfd5a),cancellationHandlersInstalled=!![];}export async function hook(_0x16258e,_0x1d3bb8){const _0x5e107=_0x4f16,_0x1e4fa2={'hKSpe':function(_0x5a4897,_0x16b0b5){return _0x5a4897(_0x16b0b5);}};installCancellationHandlers();const _0x161f23=HOOKS[_0x16258e];if(!_0x161f23){const _0x118aae=Object['keys'](HOOKS)[_0x5e107(0xc6)](',\x20');console[_0x5e107(0xc3)](_0x5e107(0xc4)+_0x16258e),console['error']('Valid\x20hooks:\x20'+_0x118aae),process[_0x5e107(0xc8)](0x1);}await _0x1e4fa2['hKSpe'](_0x161f23,_0x1d3bb8);}