@ranger-testing/ranger-cli 2.5.4 → 3.0.1-alpha.55b593b-29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/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/deleteProfile.js +1 -0
  8. package/build/commands/env.js +1 -1
  9. package/build/commands/feature.js +1 -1
  10. package/build/commands/hook.js +1 -1
  11. package/build/commands/hooks/autoPrompt.js +1 -1
  12. package/build/commands/hooks/disable.js +1 -1
  13. package/build/commands/hooks/enable.js +1 -1
  14. package/build/commands/hooks/exitPlanMode.js +1 -1
  15. package/build/commands/hooks/index.js +1 -1
  16. package/build/commands/hooks/output.js +1 -1
  17. package/build/commands/hooks/planReminder.js +1 -1
  18. package/build/commands/hooks/planStart.js +1 -1
  19. package/build/commands/hooks/postEdit.js +1 -1
  20. package/build/commands/hooks/preCompact.js +1 -1
  21. package/build/commands/hooks/sessionEnd.js +1 -1
  22. package/build/commands/hooks/sessionStart.js +1 -1
  23. package/build/commands/hooks/stopHook.js +1 -1
  24. package/build/commands/index.js +1 -1
  25. package/build/commands/login.js +1 -1
  26. package/build/commands/mcpBootstrap.js +1 -1
  27. package/build/commands/migrateProfile.js +1 -0
  28. package/build/commands/setup/claude.js +1 -1
  29. package/build/commands/setup/opencode.js +1 -1
  30. package/build/commands/setupCi.js +1 -1
  31. package/build/commands/skillup.js +1 -1
  32. package/build/commands/start.js +1 -1
  33. package/build/commands/status.js +1 -1
  34. package/build/commands/update.js +1 -1
  35. package/build/commands/updateEnv.js +1 -1
  36. package/build/commands/useEnv.js +1 -1
  37. package/build/commands/utils/activeProfile.js +1 -1
  38. package/build/commands/utils/agentEnv.js +1 -1
  39. package/build/commands/utils/browserSessionsApi.js +1 -1
  40. package/build/commands/utils/claudeConfig.js +1 -1
  41. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  42. package/build/commands/utils/claudePlugin.js +1 -1
  43. package/build/commands/utils/cloudProfile.js +1 -0
  44. package/build/commands/utils/cloudProfileSession.js +1 -0
  45. package/build/commands/utils/crypto.js +1 -1
  46. package/build/commands/utils/desirePathLog.js +1 -1
  47. package/build/commands/utils/deviceAuth.js +1 -1
  48. package/build/commands/utils/environment.js +1 -1
  49. package/build/commands/utils/featureApi.js +1 -1
  50. package/build/commands/utils/fixWebmDuration.js +1 -1
  51. package/build/commands/utils/gitTracked.js +1 -0
  52. package/build/commands/utils/keychain.js +1 -1
  53. package/build/commands/utils/legacyWarning.js +1 -0
  54. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  55. package/build/commands/utils/matchAuthEnvironment.js +1 -0
  56. package/build/commands/utils/mcpImageBase64.js +1 -1
  57. package/build/commands/utils/model.js +1 -1
  58. package/build/commands/utils/novaActCli.js +1 -0
  59. package/build/commands/utils/opencodeConfig.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -0
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/resolveProfileContext.js +1 -0
  67. package/build/commands/utils/resolveProfileUrl.js +1 -0
  68. package/build/commands/utils/retry.js +1 -1
  69. package/build/commands/utils/sessionCache.js +1 -1
  70. package/build/commands/utils/settings.js +1 -1
  71. package/build/commands/utils/skillContent.js +1 -1
  72. package/build/commands/utils/skills.js +1 -1
  73. package/build/commands/utils/stitchWebmFiles.js +1 -1
  74. package/build/commands/utils/telemetry.js +1 -1
  75. package/build/commands/utils/tokenRefresh.js +1 -1
  76. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  77. package/build/commands/utils/userApi.js +1 -1
  78. package/build/commands/utils/version.js +1 -1
  79. package/build/commands/verifyFeature.js +1 -1
  80. package/build/commands/verifyFeatureCli.js +1 -1
  81. package/build/commands/verifyFeatureNovaCli.js +1 -0
  82. package/build/skills/ranger/SKILL.md +36 -6
  83. package/build/skills/ranger/create.md +19 -0
  84. package/build/skills/ranger/verify.md +46 -7
  85. package/package.json +8 -3
@@ -1 +1 @@
1
- (function(_0x1e65e0,_0x3b23c9){const _0x2617e6=_0x409c,_0x457ae2=_0x1e65e0();while(!![]){try{const _0x213fe8=parseInt(_0x2617e6(0xe0))/0x1*(parseInt(_0x2617e6(0xc3))/0x2)+parseInt(_0x2617e6(0xd8))/0x3+parseInt(_0x2617e6(0x125))/0x4*(-parseInt(_0x2617e6(0xba))/0x5)+-parseInt(_0x2617e6(0x132))/0x6*(-parseInt(_0x2617e6(0xc4))/0x7)+-parseInt(_0x2617e6(0xf5))/0x8*(-parseInt(_0x2617e6(0xd1))/0x9)+parseInt(_0x2617e6(0x105))/0xa*(-parseInt(_0x2617e6(0x12b))/0xb)+-parseInt(_0x2617e6(0x110))/0xc;if(_0x213fe8===_0x3b23c9)break;else _0x457ae2['push'](_0x457ae2['shift']());}catch(_0x30dd83){_0x457ae2['push'](_0x457ae2['shift']());}}}(_0x58d8,0xa95bf));import{mkdir,writeFile,readFile,unlink,rm,mkdtemp,rename}from'fs/promises';import{join}from'path';import _0x4dbb64 from'inquirer';import{chromium}from'playwright';import{findExistingEnv,loadSettings}from'./utils/settings.js';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';function _0x409c(_0x496bad,_0x376467){_0x496bad=_0x496bad-0xb0;const _0x58d826=_0x58d8();let _0x409cba=_0x58d826[_0x496bad];return _0x409cba;}import{writeActiveProfileName}from'./utils/activeProfile.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';async function checkUrlReachability(_0x323df2){const _0x108aa8=_0x409c,_0x109c10={'OhRtV':function(_0x387d7f,_0xcafb61,_0x172154){return _0x387d7f(_0xcafb61,_0x172154);},'KGDjy':'HEAD','yrWTK':'manual','HSUXW':function(_0x3a98de,_0x4b2bb7){return _0x3a98de(_0x4b2bb7);},'NLBoA':_0x108aa8(0xd0),'MVgDw':function(_0x13ef12,_0x313a00){return _0x13ef12===_0x313a00;},'wWeHX':_0x108aa8(0xb3)};try{const _0x17d89e=new AbortController(),_0x4b1423=_0x109c10[_0x108aa8(0xc2)](setTimeout,()=>_0x17d89e['abort'](),0x1388),_0x450d13={'method':_0x109c10['KGDjy'],'signal':_0x17d89e['signal'],'redirect':_0x109c10['yrWTK']};/^https:\/\/localhost(:\d+)?/i[_0x108aa8(0x108)](_0x323df2)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x360efb=await fetch(_0x323df2,_0x450d13);delete process[_0x108aa8(0xbf)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0x109c10['HSUXW'](clearTimeout,_0x4b1423);if(_0x360efb['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x108aa8(0xf1)+_0x360efb['status']};}catch(_0x2e6c19){delete process['env']['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x24e286=_0x2e6c19,_0x2f03fe=_0x24e286[_0x108aa8(0xf8)]||_0x109c10[_0x108aa8(0x12c)](String,_0x2e6c19),_0x341a64=_0x2f03fe['includes'](_0x109c10['NLBoA'])||_0x109c10['MVgDw'](_0x24e286[_0x108aa8(0xdb)],'TypeError')||_0x2f03fe[_0x108aa8(0xed)](_0x109c10['wWeHX']);return{'ok':![],'error':_0x2f03fe,'isProtocolError':_0x341a64};}}export async function addEnv(_0x3b1dac,_0x550d59={},_0x5c3aa1){const _0x5714c3=_0x409c,_0x396852={'rzKpx':'close','Ppkfo':'user','sekTg':function(_0x179e02,_0x2b5ba1,_0x193a7d,_0x3fa2c8){return _0x179e02(_0x2b5ba1,_0x193a7d,_0x3fa2c8);},'dHQsn':function(_0x193106,_0x56b60d){return _0x193106+_0x56b60d;},'WHseH':function(_0x2f5b26,_0x3b6d64,_0x52499b){return _0x2f5b26(_0x3b6d64,_0x52499b);},'JHCto':function(_0x55395e,_0x28e75d){return _0x55395e!==_0x28e75d;},'Gqutq':_0x5714c3(0x12e),'grUEZ':function(_0x321e11,_0x44fdd9,_0x55be4e){return _0x321e11(_0x44fdd9,_0x55be4e);},'mpEbN':function(_0x19b1b6,_0x434c74){return _0x19b1b6===_0x434c74;},'ljQAr':'confirm','divnj':'overwrite','rkjQy':_0x5714c3(0xc5),'fIbzP':_0x5714c3(0x106),'MKjoA':function(_0x3b7d4f,_0x3de76a){return _0x3b7d4f(_0x3de76a);},'RYOFr':_0x5714c3(0x10b),'SXyas':'\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a','oSNbB':'baseUrl','WtDbt':_0x5714c3(0xb1),'lXYAS':_0x5714c3(0xe1),'CkQzA':function(_0x4e78ab,_0x1bd660){return _0x4e78ab||_0x1bd660;},'RhQbh':function(_0x560a92,_0x7fea36){return _0x560a92(_0x7fea36);},'NoRho':_0x5714c3(0xf2),'IKZRi':_0x5714c3(0x107),'tLlqx':_0x5714c3(0xdf),'jWQiQ':'continue','akOxP':function(_0x454576,_0x23afae){return _0x454576===_0x23afae;},'ymNMD':_0x5714c3(0x12f),'TmlUs':function(_0x1fe122,_0x2c09b6){return _0x1fe122(_0x2c09b6);},'CndcK':function(_0x47fe2b,_0x4a843a){return _0x47fe2b===_0x4a843a;},'QjPVT':_0x5714c3(0xf9),'jpezy':function(_0x3e8b2f,_0x4bf73a){return _0x3e8b2f(_0x4bf73a);},'GBKsZ':function(_0x1e1081,_0x54d3fd,_0x25fe19){return _0x1e1081(_0x54d3fd,_0x25fe19);},'DXQiH':_0x5714c3(0x122),'ZSBnQ':_0x5714c3(0xe2),'oAuqg':'\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.','hFkxi':'\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.','qjNwX':_0x5714c3(0x119),'QAvhl':'--allow-insecure-localhost','Fzzbs':function(_0x3aea90,_0x4c59c9){return _0x3aea90||_0x4c59c9;},'nUXBg':_0x5714c3(0xc7),'AoEWo':_0x5714c3(0xcb),'jPaeT':'You\x20can\x20try\x20again\x20with\x20one\x20of:','dcFiR':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','aNPqa':function(_0x31bbde){return _0x31bbde();},'tkfsX':_0x5714c3(0xe5),'YVGAL':function(_0x91f294,_0x5d7191){return _0x91f294(_0x5d7191);},'fKHKD':_0x5714c3(0x130),'Rmame':function(_0x2dc0fb,_0x4e78a4,_0x457dd6){return _0x2dc0fb(_0x4e78a4,_0x457dd6);},'AlDWN':function(_0x370e73,_0x4d131f){return _0x370e73+_0x4d131f;},'sGmGM':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','ZcAJi':_0x5714c3(0x104),'XXzFo':'config_write','RHiFo':function(_0x234f0c,_0xcbbcce,_0x2f5569){return _0x234f0c(_0xcbbcce,_0x2f5569);},'TNRWa':function(_0x35b015,_0x32f82e){return _0x35b015(_0x32f82e);},'MKYeI':_0x5714c3(0xbe),'WWAWI':function(_0x7008bc,_0x589471,_0x2915ac){return _0x7008bc(_0x589471,_0x2915ac);}},_0x4ee75c=_0x550d59['ci']??![],_0x33327f=_0x4ee75c?'ci':_0x5714c3(0x121),_0xc43885=_0x550d59[_0x5714c3(0xb8)]===_0x396852['Ppkfo']?getRangerHomeDir():getRangerDir(),_0x38d099=_0x396852['sekTg'](join,_0xc43885,_0x33327f,_0x3b1dac),_0x9eeca8={};if(_0x550d59[_0x5714c3(0x116)])for(const _0x38232c of _0x550d59['setupHeader']){const _0x3e1531=_0x38232c['indexOf'](':');if(_0x3e1531===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x38232c+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x48fa74=_0x38232c[_0x5714c3(0xbc)](0x0,_0x3e1531)[_0x5714c3(0xb5)](),_0x9d0156=_0x38232c['slice'](_0x396852[_0x5714c3(0x120)](_0x3e1531,0x1))[_0x5714c3(0xb5)]();_0x9eeca8[_0x48fa74]=_0x9d0156;}const _0x3adcfd=_0x396852[_0x5714c3(0xcc)](join,_0xc43885,_0x33327f);if(_0x396852['JHCto'](_0x550d59['cdpEndpoint'],undefined)&&_0x550d59[_0x5714c3(0xc9)][_0x5714c3(0xb5)]()==='')throw new Error(_0x396852['Gqutq']);if(_0x550d59[_0x5714c3(0xc9)]&&_0x550d59['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.');if(_0x550d59['cdpEndpoint']&&_0x550d59['ci'])throw new Error('--ci\x20and\x20--cdp-endpoint\x20cannot\x20be\x20used\x20together.\x20Electron/CDP\x20profiles\x20only\x20work\x20with\x20a\x20locally\x20running\x20app\x20and\x20are\x20not\x20supported\x20in\x20CI.');const _0x394d67=Boolean(_0x550d59[_0x5714c3(0xc9)]),_0x29fd85=!_0x550d59[_0x5714c3(0x11f)]&&!_0x394d67,_0x509f3a=process[_0x5714c3(0x11b)][_0x5714c3(0x102)]&&process['stdout']['isTTY'];if(!_0x509f3a&&!_0x550d59[_0x5714c3(0x114)]&&!_0x394d67)throw new Error('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');const _0x37960f=_0x396852['grUEZ'](findExistingEnv,_0x3b1dac,{'rangerDir':_0xc43885});let _0x52d69c=null;if(_0x37960f){if(!_0x509f3a)_0x52d69c=_0x37960f;else{if(_0x396852[_0x5714c3(0xec)](_0x37960f[_0x5714c3(0x10c)],_0x33327f)){const {overwrite:_0x26ed03}=await _0x4dbb64['prompt']([{'type':_0x396852[_0x5714c3(0x131)],'name':_0x396852['divnj'],'message':'Profile\x20\x22'+_0x3b1dac+'\x22\x20already\x20exists.\x20Overwrite?','default':![]}]);if(!_0x26ed03){console['log']('Aborted.');return;}_0x52d69c=_0x37960f;}else{const _0x463012=_0x396852[_0x5714c3(0xec)](_0x37960f[_0x5714c3(0x10c)],'legacy')?'root\x20(.ranger/)':_0x37960f[_0x5714c3(0x10c)];console['error'](_0x5714c3(0x10a)+_0x3b1dac+'\x22\x20already\x20exists\x20in\x20'+_0x463012+':\x20'+_0x37960f[_0x5714c3(0xc1)]),console['error']('\x20\x20\x20Creating\x20it\x20in\x20'+_0x33327f+'\x20would\x20shadow\x20the\x20existing\x20profile.');const {shouldReplace:_0x57d747}=await _0x4dbb64[_0x5714c3(0xd9)]([{'type':_0x5714c3(0xd4),'name':_0x5714c3(0x10f),'message':'Delete\x20existing\x20and\x20create\x20new\x20in\x20'+_0x33327f+'?','default':![]}]);if(!_0x57d747){console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0xd7)]);return;}_0x52d69c=_0x37960f;}}}_0x5c3aa1?.['trackPhaseStart'](_0x5714c3(0xf9));let _0x47f07e='';if(_0x394d67)console['log'](_0x396852[_0x5714c3(0xb4)]),console[_0x5714c3(0xcf)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x550d59['cdpEndpoint']),console['log'](_0x5714c3(0xfa));else{if(_0x550d59[_0x5714c3(0x114)]){_0x47f07e=_0x550d59['url'];const _0x5ff7e2=await _0x396852[_0x5714c3(0xde)](checkUrlReachability,_0x47f07e);if(!_0x5ff7e2['ok']&&!_0x550d59['force'])throw new Error('Could\x20not\x20reach\x20'+_0x47f07e+':\x20'+_0x5ff7e2[_0x5714c3(0x129)]+_0x5714c3(0xee));!_0x5ff7e2['ok']&&_0x550d59[_0x5714c3(0x128)]&&console[_0x5714c3(0xcf)](_0x5714c3(0xf3)+_0x47f07e+':\x20'+_0x5ff7e2['error']+_0x5714c3(0x103));}else{console['log'](_0x396852[_0x5714c3(0x11e)]),console[_0x5714c3(0xcf)](_0x5714c3(0x123)),console['log'](_0x396852[_0x5714c3(0x117)]);let _0x3cd0fa=![];while(!![]){const _0x27f66d=await _0x4dbb64[_0x5714c3(0xd9)]([{'type':'input','name':_0x396852[_0x5714c3(0xce)],'message':_0x3cd0fa?_0x396852['WtDbt']:_0x396852['lXYAS'],'default':_0x396852[_0x5714c3(0xfd)](_0x47f07e,_0x5714c3(0xbb))}]);_0x47f07e=_0x27f66d['baseUrl'];const _0x3952b9=await _0x396852[_0x5714c3(0xd2)](checkUrlReachability,_0x47f07e);if(_0x3952b9['ok'])break;const _0x4413d9=/^[a-zA-Z][\w+.-]*:\/\//[_0x5714c3(0x108)](_0x47f07e),_0x1f6d86=_0x3952b9['isProtocolError']&&!_0x4413d9,_0xce4183=_0x1f6d86?_0x5714c3(0x126)+_0x47f07e:null;_0x3cd0fa=!![],console['log'](_0x5714c3(0x10e)+_0x47f07e+':\x20'+_0x3952b9['error']);_0xce4183&&console['log']('\x20\x20Did\x20you\x20mean\x20'+_0xce4183+'?');const {action:_0xd66dff}=await _0x4dbb64['prompt']([{'type':_0x5714c3(0xe4),'name':_0x396852[_0x5714c3(0xb7)],'message':_0x396852[_0x5714c3(0xbd)],'choices':[..._0xce4183?[{'name':'Use\x20'+_0xce4183,'value':'use_suggestion'}]:[],{'name':_0x396852[_0x5714c3(0xfe)],'value':'retry'},{'name':_0x5714c3(0xe3),'value':_0x396852['jWQiQ']}]}]);if(_0x396852['akOxP'](_0xd66dff,_0x396852[_0x5714c3(0x10d)])&&_0xce4183){_0x47f07e=_0xce4183;const _0x5ecc62=await _0x396852['TmlUs'](checkUrlReachability,_0x47f07e);if(_0x5ecc62['ok'])break;console[_0x5714c3(0xcf)](_0x5714c3(0x12a)+_0x47f07e+':\x20'+_0x5ecc62['error']);}else{if(_0x396852[_0x5714c3(0x127)](_0xd66dff,_0x5714c3(0xb2)))break;}}}}_0x5c3aa1?.[_0x5714c3(0xda)](_0x396852['QjPVT']);const _0x3de90b={};if(_0x52d69c){const _0x5e73fd=await loadSettings(_0x3b1dac);Object[_0x5714c3(0xd6)](_0x3de90b,_0x5e73fd['setupHeaders']);}Object['assign'](_0x3de90b,_0x9eeca8),await _0x396852[_0x5714c3(0xcc)](mkdir,_0x3adcfd,{'recursive':!![]});const _0x34421b=await _0x396852['jpezy'](mkdtemp,_0x396852['WHseH'](join,_0x3adcfd,'.tmp-'+_0x3b1dac+'-')),_0x590349=_0x396852['GBKsZ'](join,_0x34421b,_0x5714c3(0x11d)),_0x386932=_0x396852['RhQbh'](Boolean,_0x47f07e)&&/^https:\/\/localhost(:\d+)?/i['test'](_0x47f07e);try{if(_0x29fd85){_0x5c3aa1?.[_0x5714c3(0xb9)](_0x396852['DXQiH']),console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0xd3)]),console['log'](_0x396852[_0x5714c3(0x112)]),console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0xe6)]);!_0x509f3a?(console['log'](_0x5714c3(0x11a)),console['log'](_0x396852[_0x5714c3(0xef)])):console['log']('');await new Promise(_0x604305=>setTimeout(_0x604305,0xbb8));const _0x252328=[];_0x550d59[_0x5714c3(0xca)]&&_0x252328[_0x5714c3(0xf6)](_0x5714c3(0xff));const _0x46bcba=_0x550d59['allowInsecureLocalhost']||_0x386932;_0x46bcba&&_0x252328[_0x5714c3(0xf6)](_0x396852[_0x5714c3(0xc6)]);const _0x123339=await chromium[_0x5714c3(0xf4)]({'headless':![],..._0x252328['length']>0x0?{'args':_0x252328}:{}});try{const _0x73bcda=Object['keys'](_0x3de90b)[_0x5714c3(0x111)]>0x0,_0x16865d={'ignoreHTTPSErrors':!![]};_0x73bcda&&(_0x16865d['extraHTTPHeaders']=_0x3de90b);const _0x25735f=await _0x123339['newContext'](_0x16865d);await addProfileSetupBanner(_0x25735f);const _0x323753=await _0x25735f['newPage']();await _0x323753[_0x5714c3(0xeb)](_0x396852['Fzzbs'](_0x47f07e,_0x396852['nUXBg']));let _0x55de33=![];await new Promise(_0x5525d8=>{const _0x2e912e={'OTsnM':'Saving\x20authentication\x20state...','BlKEl':function(_0x1790b8){return _0x1790b8();}};_0x323753['on'](_0x396852['rzKpx'],async()=>{const _0xabbcda=_0x409c;try{console['log'](_0x2e912e[_0xabbcda(0xfc)]),await _0x25735f['storageState']({'path':_0x590349}),_0x55de33=!![];}catch{}_0x2e912e[_0xabbcda(0x100)](_0x5525d8);});});if(!_0x55de33){console['log'](_0x396852['AoEWo']);!_0x550d59[_0x5714c3(0xca)]&&(console[_0x5714c3(0xcf)]('This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a'),console[_0x5714c3(0xcf)](_0x396852['jPaeT']),console[_0x5714c3(0xcf)]('\x20\x20ranger\x20profile\x20add\x20'+_0x3b1dac+'\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)'),console['log']('\x20\x20ranger\x20profile\x20add\x20'+_0x3b1dac+'\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a'));throw new Error(_0x396852[_0x5714c3(0xea)]);}}finally{await _0x123339['close']()['catch'](()=>{});}if(_0x4ee75c){const _0x5d4208=await readFile(_0x590349,_0x5714c3(0x124)),_0x65e9e4=await _0x396852[_0x5714c3(0x109)](getToken);if(!_0x65e9e4){console['error'](_0x396852['tkfsX']),await _0x396852[_0x5714c3(0xdc)](unlink,_0x590349)['catch'](()=>{});throw new Error(_0x396852[_0x5714c3(0x12d)]);}else{const _0x388cfb=_0x396852[_0x5714c3(0xc8)](encrypt,_0x5d4208,_0x65e9e4);await _0x396852[_0x5714c3(0x11c)](writeFile,_0x396852['AlDWN'](_0x590349,_0x5714c3(0x113)),_0x388cfb),await _0x396852[_0x5714c3(0x101)](unlink,_0x590349),console[_0x5714c3(0xcf)]('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x590349+_0x5714c3(0x113)),console[_0x5714c3(0xcf)](_0x396852[_0x5714c3(0x115)]),console['log'](_0x396852[_0x5714c3(0xb0)]);}}else console[_0x5714c3(0xcf)](_0x5714c3(0xdd)+_0x590349);_0x5c3aa1?.[_0x5714c3(0xda)](_0x396852['DXQiH']);}_0x5c3aa1?.[_0x5714c3(0xb9)](_0x396852['XXzFo']);const _0x2dba53={};_0x47f07e&&(_0x2dba53[_0x5714c3(0xf0)]=_0x47f07e);_0x550d59['cdpEndpoint']&&(_0x2dba53[_0x5714c3(0xc9)]=_0x550d59[_0x5714c3(0xc9)],_0x2dba53[_0x5714c3(0xe7)]=!![]);(_0x550d59[_0x5714c3(0x118)]||_0x386932)&&(_0x2dba53[_0x5714c3(0x118)]=!![]);_0x550d59['safeMode']&&(_0x2dba53['safeMode']=!![]);Object['keys'](_0x3de90b)['length']>0x0&&(_0x2dba53[_0x5714c3(0xcd)]=_0x3de90b);await writeFile(join(_0x34421b,_0x5714c3(0xe8)),JSON[_0x5714c3(0xd5)](_0x2dba53,null,0x2)),console['log'](_0x5714c3(0xb6)+join(_0x38d099,'settings.json'));if(_0x396852['mpEbN'](_0x52d69c?.[_0x5714c3(0x10c)],_0x33327f)){const _0x37f8cc=_0x52d69c['path']+'.backup-'+Date['now']();await _0x396852[_0x5714c3(0xc8)](rename,_0x52d69c[_0x5714c3(0xc1)],_0x37f8cc);try{await _0x396852['grUEZ'](rename,_0x34421b,_0x38d099);}catch(_0x2de28e){await _0x396852['RHiFo'](rename,_0x37f8cc,_0x52d69c['path']);throw _0x2de28e;}try{await rm(_0x37f8cc,{'recursive':!![]});}catch{console[_0x5714c3(0xcf)]('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20'+_0x37f8cc);}}else{await _0x396852['GBKsZ'](rename,_0x34421b,_0x38d099);if(_0x52d69c)try{await rm(_0x52d69c['path'],{'recursive':!![]}),console['log'](_0x5714c3(0xfb)+_0x52d69c[_0x5714c3(0xc1)]);}catch{console[_0x5714c3(0xcf)]('Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20'+_0x52d69c[_0x5714c3(0xc1)]);}}try{await _0x396852[_0x5714c3(0xf7)](writeActiveProfileName,_0x3b1dac),console[_0x5714c3(0xcf)]('\x20\x20Set\x20active\x20profile:\x20'+_0x3b1dac);}catch{console[_0x5714c3(0xcf)](_0x396852['MKYeI']);}_0x5c3aa1?.['trackPhaseEnd'](_0x396852[_0x5714c3(0xe9)]),console['log']('\x0a\x20\x20Profile\x20\x22'+_0x3b1dac+'\x22\x20configured');}catch(_0xeca34b){await _0x396852[_0x5714c3(0xc0)](rm,_0x34421b,{'recursive':!![],'force':!![]});throw _0xeca34b;}}function _0x58d8(){const _0x53aaa6=['Rmame','cdpEndpoint','safeMode','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','WHseH','setupHeaders','oSNbB','log','Invalid\x20URL','313515SdxHgh','RhQbh','ZSBnQ','confirm','stringify','assign','rkjQy','3204954URDPhs','prompt','trackPhaseEnd','name','YVGAL','✓\x20Auth\x20state\x20saved\x20to:\x20','MKjoA','Enter\x20a\x20different\x20URL','4GrfQfo','What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','\x0a📋\x20Authentication\x20Setup','Continue\x20anyway','list','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','hFkxi','isElectron','settings.json','XXzFo','dcFiR','goto','mpEbN','includes','\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.','qjNwX','baseUrl','HTTP\x20','action','⚠\x20Could\x20not\x20reach\x20','launch','88iDSPap','push','TNRWa','message','url_setup','\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a','Removed\x20existing\x20profile\x20at\x20','OTsnM','CkQzA','tLlqx','--disable-features=WebBluetooth','BlKEl','TmlUs','isTTY','\x20(continuing\x20with\x20--force)','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','170bIZIrY','\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','What\x20would\x20you\x20like\x20to\x20do?','test','aNPqa','\x0a⚠️\x20\x20Profile\x20\x22','\x0a🌐\x20Profile\x20Setup\x0a','location','ymNMD','\x0a\x20\x20Could\x20not\x20reach\x20','shouldReplace','12321684TJppoQ','length','oAuqg','.enc','url','sGmGM','setupHeader','SXyas','allowInsecureLocalhost','\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','\x0a\x20\x20\x20⚠\x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.','stdin','grUEZ','auth.json','RYOFr','skipAuth','dHQsn','local','browser_auth','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','utf-8','1272uObCAe','http://','CndcK','force','error','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','126467XyZJim','HSUXW','fKHKD','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','use_suggestion','Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.','ljQAr','12zDSVtU','ZcAJi','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','continue','fetch\x20failed','fIbzP','trim','✓\x20Created\x20settings:\x20','NoRho','scope','trackPhaseStart','15735PwtlGP','http://localhost:3000','slice','IKZRi','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','env','WWAWI','path','OhRtV','73574oTQCRC','4613161HrFABW','Aborted.','QAvhl','about:blank'];_0x58d8=function(){return _0x53aaa6;};return _0x58d8();}
1
+ const _0x2c48bc=_0x50c6;(function(_0x29be0a,_0x4634e1){const _0x9dc9cf=_0x50c6,_0x4eb88f=_0x29be0a();while(!![]){try{const _0x52faaa=parseInt(_0x9dc9cf(0x1b5))/0x1*(parseInt(_0x9dc9cf(0x185))/0x2)+-parseInt(_0x9dc9cf(0x1b8))/0x3+parseInt(_0x9dc9cf(0x15d))/0x4*(-parseInt(_0x9dc9cf(0x176))/0x5)+parseInt(_0x9dc9cf(0x164))/0x6*(-parseInt(_0x9dc9cf(0x156))/0x7)+parseInt(_0x9dc9cf(0x1a0))/0x8+-parseInt(_0x9dc9cf(0x1a8))/0x9+parseInt(_0x9dc9cf(0x14f))/0xa;if(_0x52faaa===_0x4634e1)break;else _0x4eb88f['push'](_0x4eb88f['shift']());}catch(_0x3c31dd){_0x4eb88f['push'](_0x4eb88f['shift']());}}}(_0x103c,0x33a23));import{readdir,rm}from'fs/promises';import{join}from'path';function _0x50c6(_0x4e8e2f,_0x500f5a){_0x4e8e2f=_0x4e8e2f-0x148;const _0x103c6f=_0x103c();let _0x50c640=_0x103c6f[_0x4e8e2f];return _0x50c640;}import{existsSync}from'fs';import _0x3a8ca4 from'inquirer';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';const CLOUD_PROFILE_SHARING_WARNING=_0x2c48bc(0x1bf);function warnCloudProfileSharedInOrg(){const _0x126352=_0x2c48bc;if(!process[_0x126352(0x1b6)][_0x126352(0x1aa)])return;console[_0x126352(0x1c2)](CLOUD_PROFILE_SHARING_WARNING);}async function checkUrlReachability(_0x5d1323){const _0x40908b=_0x2c48bc,_0x17b90a={'SaxBu':function(_0xa19661,_0x5c1182,_0x139062){return _0xa19661(_0x5c1182,_0x139062);},'fjndh':'HEAD','QcNjD':'TypeError','nBQIO':'fetch\x20failed'};try{const _0x3e7030=new AbortController(),_0x2456d9=_0x17b90a['SaxBu'](setTimeout,()=>_0x3e7030[_0x40908b(0x19c)](),0x1388),_0x19104a={'method':_0x17b90a[_0x40908b(0x14a)],'signal':_0x3e7030[_0x40908b(0x160)],'redirect':'manual'};/^https:\/\/localhost(:\d+)?/i[_0x40908b(0x1b4)](_0x5d1323)&&(process[_0x40908b(0x192)][_0x40908b(0x182)]='0');const _0x12aa86=await fetch(_0x5d1323,_0x19104a);delete process[_0x40908b(0x192)]['NODE_TLS_REJECT_UNAUTHORIZED'],clearTimeout(_0x2456d9);if(_0x12aa86[_0x40908b(0x193)]<0x190)return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x12aa86['status']};}catch(_0x56630e){delete process[_0x40908b(0x192)]['NODE_TLS_REJECT_UNAUTHORIZED'];const _0x48a6cd=_0x56630e,_0x3fba42=_0x48a6cd[_0x40908b(0x195)]||String(_0x56630e),_0x3ed541=_0x3fba42[_0x40908b(0x19b)]('Invalid\x20URL')||_0x48a6cd['name']===_0x17b90a[_0x40908b(0x17d)]||_0x3fba42['includes'](_0x17b90a['nBQIO']);return{'ok':![],'error':_0x3fba42,'isProtocolError':_0x3ed541};}}function _0x103c(){const _0x28e298=['kBOrO','KlKoU','dnJlT','\x0a\x20\x20No\x20auth\x20env\x20matches\x20','no_match','exit','prompt','3388977PAjyas','Continue\x20anyway','isTTY','nFuzv','length','lFUIt','OKpyZ','setupHeader','startsWith','What\x20would\x20you\x20like\x20to\x20do?',')\x0a\x20\x20Save\x20\x27','force','test','187102knleFY','stdout','✓\x20Cloud\x20profile\x20\x27','694692erbnbH','\x0a✓\x20Profile\x20\x27','environments','zQCDl','slice','\x27\x20matching\x20','jGCaR','This\x20account\x20will\x20be\x20shared\x20with\x20everyone\x20at\x20your\x20organization','✓\x20Profile\x20\x27','vPuvt','warn','\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20','some','trim','zonCP','fjndh','\x20\x20Did\x20you\x20mean\x20','lobTd','\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','PYMXr','10626140CouAqn','\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20','OLgFt','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','⚠\x20Could\x20not\x20reach\x20','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','139741yOURhF','continue','user_declined','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','trackPhaseEnd','AYmjf','iRCoE','16broIok','origin','join','signal','\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','VsSrn','fEVxy','78fBVTTQ','SEOZe','\x0a\x20\x20A\x20profile\x20named\x20\x22','capture','rKdnU','use_suggestion','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x0a\x20\x20(domains:\x20','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','oVFUA','yHEYq','UTRaR','profile.add.autoRouteSkipped','url','\x20\x20Next:\x20ranger\x20go\x20--profile\x20','baseUrl','local','399505rYnZQv','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','profile.add.autoRouted','Enter\x20a\x20different\x20URL','indexOf','\x20--skip-auth\x0a','QcNjD','.\x20Configured\x20envs:\x20','nSKuH','no_auth_config','isProtocolError','NODE_TLS_REJECT_UNAUTHORIZED','input','domains','2XZdtrn','skipAuth','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','Could\x20not\x20reach\x20','keys','confirm','cdpEndpoint','mzvxL','--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','rouUn','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','list','env','status','cwd','message','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','sUAwj','error','log','\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20','includes','abort','aqmBy','\x0a🌐\x20Profile\x20Setup\x0a','ycGmj','1192120tEmWkJ'];_0x103c=function(){return _0x28e298;};return _0x103c();}async function sweepOrphanLocalProfile(_0x131fd3,_0x506c6f,_0x4af4cc){const _0x2fc69c=_0x2c48bc,_0x2526e1={'OLgFt':function(_0x2c2b3f,_0xc49000){return _0x2c2b3f(_0xc49000);},'SSfNh':function(_0xdca2f9,_0x5d5ed2){return _0xdca2f9(_0x5d5ed2);},'OFXzm':function(_0x2c9993,_0x5941e7,_0x301473){return _0x2c9993(_0x5941e7,_0x301473);}},_0x2245b6=join(_0x506c6f,_0x2fc69c(0x175)),_0x41254c=join(_0x2245b6,_0x131fd3);_0x2526e1['OLgFt'](existsSync,_0x41254c)&&(_0x4af4cc&&await isPathGitTracked(_0x41254c)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0x41254c+_0x2fc69c(0x1c3)):(await rm(_0x41254c,{'recursive':!![],'force':!![]}),console[_0x2fc69c(0x199)](_0x2fc69c(0x16a)+_0x41254c)));if(_0x2526e1[_0x2fc69c(0x151)](existsSync,_0x2245b6)){let _0x3981b0=[];try{_0x3981b0=await _0x2526e1['SSfNh'](readdir,_0x2245b6);}catch{return;}const _0x37811d='.tmp-'+_0x131fd3+'-';for(const _0x57beb1 of _0x3981b0){if(!_0x57beb1[_0x2fc69c(0x1b0)](_0x37811d))continue;const _0x107c80=join(_0x2245b6,_0x57beb1);await _0x2526e1['OFXzm'](rm,_0x107c80,{'recursive':!![],'force':!![]}),console['log']('\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20'+_0x107c80);}}}async function sweepOrphansBestEffort(_0x149228){const _0x2e698d=_0x2c48bc,_0x3ebeb3={'OKpyZ':function(_0x14158a,_0x44e9f3,_0x449e97,_0x3bb8ea){return _0x14158a(_0x44e9f3,_0x449e97,_0x3bb8ea);},'NZmFF':function(_0x737c87){return _0x737c87();},'VtrEN':function(_0x45fc66){return _0x45fc66();}};try{await _0x3ebeb3[_0x2e698d(0x1ae)](sweepOrphanLocalProfile,_0x149228,_0x3ebeb3['NZmFF'](getRangerHomeDir),![]);const _0x5d6da8=getRangerDir();_0x5d6da8!==_0x3ebeb3['VtrEN'](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x149228,_0x5d6da8,!![]);}catch(_0x38f4a8){console['log']('\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20('+(_0x38f4a8 instanceof Error?_0x38f4a8[_0x2e698d(0x195)]:String(_0x38f4a8))+').');}}async function markActive(_0x1c5756){const _0xd30e25=_0x2c48bc,_0x42c61e={'eYBAj':function(_0x4f84b9,_0x1d2e0b){return _0x4f84b9(_0x1d2e0b);}};try{await _0x42c61e['eYBAj'](writeActiveProfileName,_0x1c5756),console[_0xd30e25(0x199)]('\x20\x20Set\x20active\x20profile:\x20'+_0x1c5756);}catch{console[_0xd30e25(0x199)](_0xd30e25(0x159));}}async function tryAutoRouteCloudProfile(_0x1e570e,_0x25ca73,_0x479955,_0x230d10,_0x558394){const _0x226970=_0x2c48bc,_0x1523d3={'XkzMG':function(_0x19c235,_0x2295bf){return _0x19c235===_0x2295bf;},'sSBBx':function(_0x5f4e07){return _0x5f4e07();},'vPuvt':function(_0x1716ce,_0xc7783d){return _0x1716ce instanceof _0xc7783d;},'PYMXr':'profile.add.autoRouteSkipped','sUAwj':function(_0x582537,_0x52bf35){return _0x582537+_0x52bf35;},'xyABB':function(_0x18b29c,_0x461638){return _0x18b29c+_0x461638;},'WNpFA':function(_0x3fb860,_0x14732b){return _0x3fb860+_0x14732b;},'kBOrO':_0x226970(0x14d),'mGQaF':'\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','RHXHS':_0x226970(0x1a5),'eElTp':_0x226970(0x18a),'nSKuH':'saveToCloud','PIBZU':function(_0x297ace,_0x719245){return _0x297ace+_0x719245;},'KvmAW':function(_0x5144e0,_0x4c087b){return _0x5144e0+_0x4c087b;},'sGRKt':function(_0x79c28b,_0xc9d41e){return _0x79c28b(_0xc9d41e);}};let _0x256a1a;try{_0x256a1a=await _0x1523d3['sSBBx'](fetchAuthConfig);}catch(_0x4f0afb){return _0x558394?.['trackPhaseEnd'](_0x226970(0x171),{'reason':'no_auth_config','profileName':_0x1e570e}),console[_0x226970(0x198)](_0x226970(0x150)+(_0x1523d3['vPuvt'](_0x4f0afb,Error)?_0x4f0afb['message']:String(_0x4f0afb))),![];}if(!_0x256a1a||!_0x256a1a['environments']||Object[_0x226970(0x189)](_0x256a1a[_0x226970(0x1ba)])['length']===0x0){if(_0x230d10)return await captureEnvLessProfile(_0x1e570e,_0x25ca73,_0x479955,_0x558394);return _0x558394?.['trackPhaseEnd'](_0x1523d3[_0x226970(0x14e)],{'reason':_0x226970(0x180),'profileName':_0x1e570e}),console['error'](_0x1523d3[_0x226970(0x197)](_0x1523d3['xyABB'](_0x1523d3['WNpFA'](_0x1523d3['sUAwj'](_0x1523d3[_0x226970(0x1a1)]+'\x0a','\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a'),'\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0x1e570e+'\x20--url\x20'+_0x25ca73+_0x226970(0x17c))+'\x0a',_0x1523d3['mGQaF']),_0x226970(0x16d))),![];}const _0x59eca3=matchAuthEnvironment(_0x25ca73,_0x256a1a);if(!_0x59eca3)return _0x558394?.[_0x226970(0x15a)](_0x1523d3[_0x226970(0x14e)],{'reason':_0x1523d3['RHXHS'],'profileName':_0x1e570e}),console[_0x226970(0x198)](_0x226970(0x1a4)+_0x25ca73+_0x226970(0x17e)+Object['keys'](_0x256a1a[_0x226970(0x1ba)])['join'](',\x20')+'.'),![];const _0x3ab8ef=_0x256a1a[_0x226970(0x1ba)][_0x59eca3],_0x1bc60b=_0x3ab8ef?.[_0x226970(0x184)]??[];if(_0x230d10&&!_0x479955['yes']){const {saveToCloud:_0x2c3d82}=await _0x3a8ca4['prompt']([{'type':_0x1523d3['eElTp'],'name':_0x1523d3[_0x226970(0x17f)],'message':'Found\x20auth\x20environment\x20\x27'+_0x59eca3+_0x226970(0x1bd)+_0x25ca73+_0x226970(0x16c)+_0x1bc60b[_0x226970(0x15f)](',\x20')+_0x226970(0x1b2)+_0x1e570e+'\x27\x20to\x20the\x20cloud?','default':!![]}]);if(!_0x2c3d82)return _0x558394?.['trackPhaseEnd'](_0x1523d3[_0x226970(0x14e)],{'reason':_0x226970(0x158),'profileName':_0x1e570e}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.'),![];}const _0x168796=_0x1bc60b[_0x226970(0x1c5)](_0x5cc318=>{const _0x536970=_0x226970;try{return _0x1523d3['XkzMG'](new URL(_0x5cc318)[_0x536970(0x15e)],new URL(_0x25ca73)[_0x536970(0x15e)]);}catch{return![];}}),_0x21408d={};!_0x168796&&(_0x21408d['baseUrl']=_0x25ca73);try{await createCloudProfile(_0x1e570e,_0x59eca3,{'settings':_0x21408d}),_0x1523d3['sSBBx'](warnCloudProfileSharedInOrg);}catch(_0x4f7b54){if(_0x1523d3[_0x226970(0x1c1)](_0x4f7b54,ApiError)&&_0x4f7b54[_0x226970(0x193)]===0x199){console[_0x226970(0x198)](_0x1523d3['PIBZU'](_0x226970(0x166)+_0x1e570e+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x1e570e));throw _0x4f7b54;}throw _0x4f7b54;}return console['log'](_0x1523d3['KvmAW']('✓\x20Profile\x20\x27'+_0x1e570e+'\x27\x20created.\x0a',_0x226970(0x173)+_0x1e570e)),await _0x1523d3['sGRKt'](sweepOrphansBestEffort,_0x1e570e),_0x558394?.['trackPhaseEnd'](_0x226970(0x179),{'envKey':_0x59eca3,'profileName':_0x1e570e}),!![];}async function createUnconfiguredCloudProfile(_0x5a7f5d,_0x4aa1b6){const _0xce5043=_0x2c48bc,_0x34c027={'AYmjf':function(_0x13c307,_0x43d90b,_0x5b4d8a,_0x293024){return _0x13c307(_0x43d90b,_0x5b4d8a,_0x293024);},'AUcKy':function(_0xab6ce4,_0x4b9489){return _0xab6ce4 instanceof _0x4b9489;}};try{await _0x34c027[_0xce5043(0x15b)](createCloudProfile,_0x5a7f5d,undefined,{'settings':_0x4aa1b6}),warnCloudProfileSharedInOrg();}catch(_0xc0c1d3){_0x34c027['AUcKy'](_0xc0c1d3,ApiError)&&_0xc0c1d3[_0xce5043(0x193)]===0x199&&console['error']('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x5a7f5d+'\x22\x20already\x20exists.\x20To\x20refresh\x20its\x20session,\x20run:\x0a'+('\x20\x20\x20\x20\x20\x20ranger\x20profile\x20update\x20'+_0x5a7f5d));throw _0xc0c1d3;}}async function captureEnvLessProfile(_0x3cc89f,_0x43d9e2,_0xd7b11e,_0x16715c){const _0x17032e=_0x2c48bc,_0x448c28={'LtDqu':'confirm','yUeDH':'profile.add.autoRouteSkipped','lmhXo':'user_declined','zonCP':function(_0x51d5b7,_0x2575c1){return _0x51d5b7===_0x2575c1;},'KlKoU':function(_0x175f8c,_0x5d1604){return _0x175f8c+_0x5d1604;},'lobTd':function(_0x317b4c,_0x94926c){return _0x317b4c>_0x94926c;},'NpjHX':function(_0x13acfb,_0x403763){return _0x13acfb instanceof _0x403763;},'ycGmj':function(_0x19bc32,_0x36c364){return _0x19bc32+_0x36c364;},'iRCoE':function(_0xc059c9,_0x5e5748,_0x220e06){return _0xc059c9(_0x5e5748,_0x220e06);},'oVFUA':function(_0x2b9306,_0x36e7e6){return _0x2b9306+_0x36e7e6;}};if(!_0xd7b11e['yes']){const {capture:_0x5126db}=await _0x3a8ca4[_0x17032e(0x1a7)]([{'type':_0x448c28['LtDqu'],'name':_0x17032e(0x167),'message':_0x17032e(0x196),'default':!![]}]);if(!_0x5126db)return _0x16715c?.[_0x17032e(0x15a)](_0x448c28['yUeDH'],{'reason':_0x448c28['lmhXo'],'profileName':_0x3cc89f}),console['error']('\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a'+'\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.'),![];}const _0x8d5419={};if(_0xd7b11e['setupHeader'])for(const _0x2cfe4d of _0xd7b11e[_0x17032e(0x1af)]){const _0x59bfd7=_0x2cfe4d['indexOf'](':');if(_0x448c28[_0x17032e(0x149)](_0x59bfd7,-0x1))continue;_0x8d5419[_0x2cfe4d['slice'](0x0,_0x59bfd7)['trim']()]=_0x2cfe4d[_0x17032e(0x1bc)](_0x448c28[_0x17032e(0x1a2)](_0x59bfd7,0x1))[_0x17032e(0x148)]();}const _0x435f80={'baseUrl':_0x43d9e2};_0x448c28['lobTd'](Object[_0x17032e(0x189)](_0x8d5419)[_0x17032e(0x1ac)],0x0)&&(_0x435f80['setupHeaders']=_0x8d5419);let _0x4c2e7a;try{_0x4c2e7a=await createCloudProfile(_0x3cc89f,undefined,{'settings':_0x435f80}),warnCloudProfileSharedInOrg();}catch(_0x334c75){_0x448c28['NpjHX'](_0x334c75,ApiError)&&_0x448c28[_0x17032e(0x149)](_0x334c75[_0x17032e(0x193)],0x199)&&console[_0x17032e(0x198)](_0x448c28[_0x17032e(0x19f)]('\x0a\x20\x20A\x20profile\x20named\x20\x22'+_0x3cc89f+_0x17032e(0x161),_0x17032e(0x1c4)+_0x3cc89f));throw _0x334c75;}return await _0x448c28[_0x17032e(0x15c)](manualBrowserLogin,_0x4c2e7a,{'key':'','domains':[_0x43d9e2],'setupHeaders':_0x448c28[_0x17032e(0x14c)](Object['keys'](_0x8d5419)[_0x17032e(0x1ac)],0x0)?_0x8d5419:undefined}),console['log'](_0x448c28[_0x17032e(0x16e)](_0x17032e(0x1b9)+_0x3cc89f+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a','\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x3cc89f)),await sweepOrphansBestEffort(_0x3cc89f),_0x16715c?.['trackPhaseEnd'](_0x17032e(0x179),{'envKey':null,'profileName':_0x3cc89f}),!![];}export async function addEnv(_0x3e91dc,_0x53f2a0={},_0x24a5f6){const _0x18665b=_0x2c48bc,_0x1441aa={'dnJlT':function(_0x5160f6,_0x41476c){return _0x5160f6+_0x41476c;},'aqmBy':function(_0x36e6c1,_0x3be76d){return _0x36e6c1+_0x3be76d;},'rKdnU':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','lFUIt':'for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','mzvxL':_0x18665b(0x178),'jGCaR':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','ordUk':function(_0xb2ffe5,_0x4e44cf){return _0xb2ffe5===_0x4e44cf;},'VsSrn':function(_0x382e95,_0x95db8){return _0x382e95+_0x95db8;},'gUpMd':_0x18665b(0x18d),'rouUn':function(_0x10c489,_0x2aefc3){return _0x10c489(_0x2aefc3);},'hdIkx':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','Zrrvg':function(_0x84abff,_0x1cdeb0){return _0x84abff>_0x1cdeb0;},'Oaeor':_0x18665b(0x19e),'yHEYq':_0x18665b(0x177),'fEVxy':_0x18665b(0x183),'SEOZe':'baseUrl','zEaFL':_0x18665b(0x154),'nFuzv':'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','zQCDl':function(_0x39a5e5,_0x5c9e03){return _0x39a5e5||_0x5c9e03;},'UTRaR':'http://localhost:3000','DmwDJ':_0x18665b(0x1a9),'eUmsN':function(_0x2a241c,_0x4de17b){return _0x2a241c(_0x4de17b);},'eKDjv':_0x18665b(0x157),'wSPMK':function(_0x489d49,_0x4d8a89){return _0x489d49(_0x4d8a89);}};_0x53f2a0['ci']&&(console['error'](_0x1441aa['dnJlT'](_0x1441aa['dnJlT'](_0x1441aa['dnJlT'](_0x1441aa[_0x18665b(0x19d)](_0x1441aa[_0x18665b(0x1a3)](_0x1441aa[_0x18665b(0x168)],_0x1441aa[_0x18665b(0x1ad)]),'\x0a'),_0x1441aa[_0x18665b(0x18c)])+_0x1441aa[_0x18665b(0x1be)],'\x0a'),_0x18665b(0x190))+'\x20\x20https://docs.ranger.net/main/concepts/profiles'),process['exit'](0x1));const _0x248737={};if(_0x53f2a0['setupHeader'])for(const _0x684dc0 of _0x53f2a0[_0x18665b(0x1af)]){const _0x158f94=_0x684dc0[_0x18665b(0x17b)](':');if(_0x1441aa['ordUk'](_0x158f94,-0x1))throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x684dc0+_0x18665b(0x18e));const _0x5ec60f=_0x684dc0[_0x18665b(0x1bc)](0x0,_0x158f94)[_0x18665b(0x148)](),_0x4827ca=_0x684dc0[_0x18665b(0x1bc)](_0x1441aa[_0x18665b(0x162)](_0x158f94,0x1))['trim']();_0x248737[_0x5ec60f]=_0x4827ca;}if(_0x53f2a0['cdpEndpoint']!==undefined&&_0x53f2a0[_0x18665b(0x18b)]['trim']()==='')throw new Error('--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222');if(_0x53f2a0[_0x18665b(0x18b)]&&_0x53f2a0[_0x18665b(0x172)])throw new Error(_0x1441aa['gUpMd']);const _0x48a449=_0x1441aa['rouUn'](Boolean,_0x53f2a0['cdpEndpoint']),_0x166cb4=isInteractive();if(!_0x166cb4&&!_0x53f2a0[_0x18665b(0x172)]&&!_0x48a449&&!_0x53f2a0[_0x18665b(0x186)])throw new Error(_0x18665b(0x187));if(_0x48a449){const _0x1350fc=_0x53f2a0[_0x18665b(0x18b)];console[_0x18665b(0x199)](_0x1441aa['hdIkx']),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1350fc);const _0x3cb31a={'cdpEndpoint':_0x1350fc,'isElectron':!![]};Object[_0x18665b(0x189)](_0x248737)['length']>0x0&&(_0x3cb31a['setupHeaders']=_0x248737);await createUnconfiguredCloudProfile(_0x3e91dc,_0x3cb31a);try{setProfileOverride(process[_0x18665b(0x194)](),_0x3e91dc,_0x18665b(0x18b),_0x1350fc),setProfileOverride(process[_0x18665b(0x194)](),_0x3e91dc,'isElectron',!![]);}catch(_0x2efef2){console[_0x18665b(0x198)](_0x18665b(0x19a)+(_0x2efef2 instanceof Error?_0x2efef2['message']:String(_0x2efef2)));}console[_0x18665b(0x199)](_0x18665b(0x1b7)+_0x3e91dc+'\x27\x20created\x20(CDP).'),await sweepOrphansBestEffort(_0x3e91dc),await markActive(_0x3e91dc);return;}if(_0x53f2a0[_0x18665b(0x186)]){const _0x1937dd={};_0x53f2a0[_0x18665b(0x172)]&&(_0x1937dd[_0x18665b(0x174)]=_0x53f2a0[_0x18665b(0x172)]);_0x1441aa['Zrrvg'](Object['keys'](_0x248737)[_0x18665b(0x1ac)],0x0)&&(_0x1937dd['setupHeaders']=_0x248737);await createUnconfiguredCloudProfile(_0x3e91dc,_0x1937dd),console[_0x18665b(0x199)](_0x1441aa['VsSrn'](_0x18665b(0x1c0)+_0x3e91dc+'\x27\x20created\x20(no\x20session).\x0a',_0x18665b(0x16b)+_0x3e91dc+'`\x20again\x20without\x20--skip-auth.')),await sweepOrphansBestEffort(_0x3e91dc),await markActive(_0x3e91dc);return;}if(_0x53f2a0['url']){const _0x2346f6=_0x53f2a0[_0x18665b(0x172)],_0x30a93c=await _0x1441aa[_0x18665b(0x18f)](checkUrlReachability,_0x2346f6);if(!_0x30a93c['ok']&&!_0x53f2a0[_0x18665b(0x1b3)])throw new Error(_0x18665b(0x188)+_0x2346f6+':\x20'+_0x30a93c['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x30a93c['ok']&&_0x53f2a0['force']&&console['log'](_0x18665b(0x153)+_0x2346f6+':\x20'+_0x30a93c['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x18665b(0x199)](_0x1441aa['Oaeor']),console['log'](_0x1441aa[_0x18665b(0x16f)]),console[_0x18665b(0x199)](_0x18665b(0x152));let _0x2f9767='',_0x57ae39=![];while(!![]){const _0x577f46=await _0x3a8ca4[_0x18665b(0x1a7)]([{'type':_0x1441aa[_0x18665b(0x163)],'name':_0x1441aa[_0x18665b(0x165)],'message':_0x57ae39?_0x1441aa['zEaFL']:_0x1441aa[_0x18665b(0x1ab)],'default':_0x1441aa[_0x18665b(0x1bb)](_0x2f9767,_0x1441aa[_0x18665b(0x170)])}]);_0x2f9767=_0x577f46[_0x18665b(0x174)];const _0xb09ac6=await _0x1441aa[_0x18665b(0x18f)](checkUrlReachability,_0x2f9767);if(_0xb09ac6['ok'])break;const _0xb098ea=/^[a-zA-Z][\w+.-]*:\/\//[_0x18665b(0x1b4)](_0x2f9767),_0x3d719c=_0xb09ac6[_0x18665b(0x181)]&&!_0xb098ea,_0x163435=_0x3d719c?'http://'+_0x2f9767:null;_0x57ae39=!![],console['log']('\x0a\x20\x20Could\x20not\x20reach\x20'+_0x2f9767+':\x20'+_0xb09ac6[_0x18665b(0x198)]);_0x163435&&console['log'](_0x18665b(0x14b)+_0x163435+'?');const {action:_0x26bfad}=await _0x3a8ca4['prompt']([{'type':_0x18665b(0x191),'name':'action','message':_0x18665b(0x1b1),'choices':[..._0x163435?[{'name':'Use\x20'+_0x163435,'value':_0x18665b(0x169)}]:[],{'name':_0x18665b(0x17a),'value':'retry'},{'name':_0x1441aa['DmwDJ'],'value':'continue'}]}]);if(_0x26bfad===_0x18665b(0x169)&&_0x163435){_0x2f9767=_0x163435;const _0x5eafe4=await _0x1441aa['eUmsN'](checkUrlReachability,_0x2f9767);if(_0x5eafe4['ok'])break;console['log']('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x2f9767+':\x20'+_0x5eafe4[_0x18665b(0x198)]);}else{if(_0x26bfad===_0x1441aa['eKDjv'])break;}}_0x53f2a0={..._0x53f2a0,'url':_0x2f9767};}let _0x49091a=![];try{_0x49091a=await tryAutoRouteCloudProfile(_0x3e91dc,_0x53f2a0[_0x18665b(0x172)],_0x53f2a0,_0x166cb4,_0x24a5f6);}catch(_0x25894e){console[_0x18665b(0x198)](_0x18665b(0x155)+_0x3e91dc+'\x22:\x20'+(_0x25894e instanceof Error?_0x25894e['message']:String(_0x25894e))),process[_0x18665b(0x1a6)](0x1);}!_0x49091a&&process['exit'](0x1),await _0x1441aa['wSPMK'](markActive,_0x3e91dc);}
@@ -1 +1 @@
1
- (function(_0x2fdb09,_0x11d51c){const _0x3a4618=_0x1a36,_0x528618=_0x2fdb09();while(!![]){try{const _0x11376a=-parseInt(_0x3a4618(0xa4))/0x1*(parseInt(_0x3a4618(0xad))/0x2)+parseInt(_0x3a4618(0xa0))/0x3+parseInt(_0x3a4618(0xaa))/0x4+-parseInt(_0x3a4618(0xa2))/0x5*(-parseInt(_0x3a4618(0xaf))/0x6)+-parseInt(_0x3a4618(0x9c))/0x7+parseInt(_0x3a4618(0xae))/0x8*(-parseInt(_0x3a4618(0xac))/0x9)+-parseInt(_0x3a4618(0xab))/0xa;if(_0x11376a===_0x11d51c)break;else _0x528618['push'](_0x528618['shift']());}catch(_0x1a1261){_0x528618['push'](_0x528618['shift']());}}}(_0x1aed,0x9cab1));import{readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';function _0x1aed(){const _0x3c839c=['No\x20auth.json\x20found\x20at\x20','\x0a✓\x20Encrypted\x20auth\x20saved\x20to:\x20','1035366iaiPSV','VEWFd','255BhwUjZ','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','2447saygcq','.enc','uALpK','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update','log','4655812JVpxfN','2313950UlbRoP','5554935DPPUlx','16VbCyBH','8WHzBoK','3480MmzvMQ','201292JWwyAm','YLJzN'];_0x1aed=function(){return _0x3c839c;};return _0x1aed();}import{getEnvDir}from'./utils/settings.js';function _0x1a36(_0x157993,_0xab2c41){_0x157993=_0x157993-0x9c;const _0x1aed84=_0x1aed();let _0x1a3672=_0x1aed84[_0x157993];return _0x1a3672;}export async function authEncrypt(_0x2eb997){const _0x5253c9=_0x1a36,_0x21485a={'uALpK':function(_0x3f4164,_0x3f6f82){return _0x3f4164(_0x3f6f82);},'YLJzN':function(_0x194bec,_0x2e4b71){return _0x194bec(_0x2e4b71);},'VEWFd':function(_0x232c74,_0x40e60d,_0x3fdf5b){return _0x232c74(_0x40e60d,_0x3fdf5b);}},_0x1702ee=_0x21485a[_0x5253c9(0xa6)](getEnvDir,_0x2eb997),_0x235553=join(_0x1702ee,'auth.json'),_0x3e87a0=_0x235553+_0x5253c9(0xa5);if(!existsSync(_0x1702ee))throw new Error('Profile\x20\x22'+_0x2eb997+_0x5253c9(0xa3)+_0x2eb997);if(!_0x21485a[_0x5253c9(0x9d)](existsSync,_0x235553))throw new Error(_0x5253c9(0x9e)+_0x235553+_0x5253c9(0xa8));const _0x29c548=await getToken();if(!_0x29c548)throw new Error(_0x5253c9(0xa7));const _0x1f1d71=await readFile(_0x235553,'utf-8'),_0x43953a=_0x21485a[_0x5253c9(0xa1)](encrypt,_0x1f1d71,_0x29c548);await writeFile(_0x3e87a0,_0x43953a),console[_0x5253c9(0xa9)](_0x5253c9(0x9f)+_0x3e87a0),console[_0x5253c9(0xa9)]('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console[_0x5253c9(0xa9)]('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.'),_0x21485a['YLJzN'](existsSync,_0x3e87a0)&&(console[_0x5253c9(0xa9)]('\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.'),console['log']('\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.'));}
1
+ (function(_0x820639,_0x58f3c2){var _0x3d6c6b=_0x8287,_0x19cf62=_0x820639();while(!![]){try{var _0x58b4d4=-parseInt(_0x3d6c6b(0x13c))/0x1+parseInt(_0x3d6c6b(0x130))/0x2*(parseInt(_0x3d6c6b(0x134))/0x3)+parseInt(_0x3d6c6b(0x131))/0x4+-parseInt(_0x3d6c6b(0x132))/0x5*(-parseInt(_0x3d6c6b(0x13b))/0x6)+-parseInt(_0x3d6c6b(0x137))/0x7*(parseInt(_0x3d6c6b(0x133))/0x8)+parseInt(_0x3d6c6b(0x138))/0x9+-parseInt(_0x3d6c6b(0x136))/0xa;if(_0x58b4d4===_0x58f3c2)break;else _0x19cf62['push'](_0x19cf62['shift']());}catch(_0xa3b6d4){_0x19cf62['push'](_0x19cf62['shift']());}}}(_0x4810,0xeaf8d));function _0x8287(_0x1e9164,_0x5f4554){_0x1e9164=_0x1e9164-0x130;var _0x48100a=_0x4810();var _0x8287d=_0x48100a[_0x1e9164];return _0x8287d;}export async function authEncrypt(_0x11e659){var _0x3f1253=_0x8287,_0x36cece={'jnsKg':function(_0x301257,_0x3d253c){return _0x301257+_0x3d253c;},'qWtsc':function(_0x4e79e2,_0x5d488d){return _0x4e79e2+_0x5d488d;},'MUHQq':'session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a'};console['error'](_0x36cece[_0x3f1253(0x135)](_0x36cece['qWtsc'](_0x36cece['qWtsc'](_0x36cece['jnsKg'](_0x3f1253(0x139)+_0x36cece['MUHQq'],'\x0a'),'To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a')+'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','\x0a')+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','\x20\x20https://docs.ranger.net/main/concepts/profiles')),process[_0x3f1253(0x13a)](0x1);}function _0x4810(){var _0x72eec5=['6193359qZhaYv','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','exit','5290440PzHdeC','834996LeBzMs','2pMVpIp','3086032nnWoqG','5QRfWIa','16pQyQvq','2942619FZRQPt','jnsKg','3117770uIRBvh','4245689ieQOQP'];_0x4810=function(){return _0x72eec5;};return _0x4810();}
@@ -1 +1 @@
1
- const _0x3fe56e=_0x43fd;(function(_0x112cee,_0x596709){const _0x29f1b7=_0x43fd,_0x454f74=_0x112cee();while(!![]){try{const _0x50a7f3=parseInt(_0x29f1b7(0xdd))/0x1*(parseInt(_0x29f1b7(0xdc))/0x2)+parseInt(_0x29f1b7(0xff))/0x3*(-parseInt(_0x29f1b7(0xda))/0x4)+-parseInt(_0x29f1b7(0xe1))/0x5*(-parseInt(_0x29f1b7(0xd5))/0x6)+parseInt(_0x29f1b7(0xec))/0x7*(-parseInt(_0x29f1b7(0xe8))/0x8)+parseInt(_0x29f1b7(0xfd))/0x9*(parseInt(_0x29f1b7(0xef))/0xa)+-parseInt(_0x29f1b7(0xe6))/0xb*(parseInt(_0x29f1b7(0x10e))/0xc)+-parseInt(_0x29f1b7(0xfc))/0xd;if(_0x50a7f3===_0x596709)break;else _0x454f74['push'](_0x454f74['shift']());}catch(_0x57366f){_0x454f74['push'](_0x454f74['shift']());}}}(_0x35f7,0xca032));function _0x35f7(){const _0x5dc3cd=['nxdTh','string','✓\x20Removed\x20stored\x20credentials','772mmTOzd','project','2jMVyyR','1569044oaTeqj','✓\x20Removed\x20user\x20skill:\x20','RdqwO','replace','30jmKxtg','QLabG','close','HeaAU','feature-tracker','1535413DBHUMc','noBKQ','16rPghUs','koOBF','platform','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','1090327shcRBD','filter','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','88710EWlrwT','nzewU','ranger@trailhead','bug-bash','pkOZf','akwPy','zpSLD','prlaD','e2e-test-recommender','plugin','pipe','error','claude','3819257vRbqmA','90PsbHfq','remove','297tWgBYt','jlJNh','UFjMl','PMVEz','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','length','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','AtqHG','win32','Equzl','log','JEyjd','NlGET','QhHCZ','IYIUM','24RjOEBM','\x0a✅\x20Cleanup\x20complete!\x0a','dWdlq','ScPoQ','tJZUZ','73272YJIvlt','✓\x20Removed\x20.ranger/\x20directory'];_0x35f7=function(){return _0x5dc3cd;};return _0x35f7();}import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';function _0x43fd(_0x4ead94,_0x45fd59){_0x4ead94=_0x4ead94-0xd2;const _0x35f7cb=_0x35f7();let _0x43fdd3=_0x35f7cb[_0x4ead94];return _0x43fdd3;}import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x3fe56e(0xe5),_0x3fe56e(0xf2),_0x3fe56e(0xf7)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x14427e){const _0x416cc6=_0x3fe56e,_0x4db217=_0x14427e['replace'](/\/\*[\s\S]*?\*\//g,''),_0x31e19c=_0x4db217[_0x416cc6(0xe0)](/^\s*\/\/.*$/gm,''),_0x438fec=_0x31e19c['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x438fec);}async function removeOpencodePluginConfig(_0x552ec9){const _0x29323e=_0x3fe56e,_0x300b82={'dWdlq':_0x29323e(0xd8),'jlJNh':function(_0x32c3e9,_0xf29790){return _0x32c3e9(_0xf29790);},'PMzpe':'utf-8','Uefuu':function(_0x87f5f3,_0xe7f38a){return _0x87f5f3(_0xe7f38a);},'kHzdX':function(_0x2a83d7,_0x4be4c9,_0x225c16){return _0x2a83d7(_0x4be4c9,_0x225c16);}};if(!_0x300b82[_0x29323e(0x100)](existsSync,_0x552ec9))return![];let _0x44090b;try{const _0x23ef6b=await readFile(_0x552ec9,_0x300b82['PMzpe']);_0x44090b=_0x300b82['Uefuu'](parseJsonc,_0x23ef6b);}catch{return![];}const _0xe5cdc8=Array['isArray'](_0x44090b[_0x29323e(0xf8)])?_0x44090b[_0x29323e(0xf8)]:[];if(_0xe5cdc8[_0x29323e(0x104)]===0x0)return![];const _0x555c8c=_0xe5cdc8[_0x29323e(0xed)](_0xfd70a6=>{const _0x2a96d6=_0x29323e;if(typeof _0xfd70a6!==_0x300b82[_0x2a96d6(0xd2)])return!![];return _0xfd70a6!==opencodePluginName;});if(_0x555c8c['length']===_0xe5cdc8[_0x29323e(0x104)])return![];return _0x555c8c['length']===0x0?delete _0x44090b[_0x29323e(0xf8)]:_0x44090b['plugin']=_0x555c8c,await _0x300b82['kHzdX'](writeFile,_0x552ec9,JSON['stringify'](_0x44090b,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x1fc935){const _0x321b8b=_0x3fe56e,_0x4ee2fb={'gcEOs':function(_0x5655da,_0x2a04b7){return _0x5655da(_0x2a04b7);},'nzewU':function(_0x26d88d,_0x3caba2){return _0x26d88d===_0x3caba2;},'tPsUc':function(_0x13d8f8,_0x4c66f9){return _0x13d8f8(_0x4c66f9);},'JEyjd':_0x321b8b(0xf8),'ScPoQ':function(_0x5e658f,_0x317af7,_0x288a33,_0x13f4ec){return _0x5e658f(_0x317af7,_0x288a33,_0x13f4ec);},'yhaar':'claude','eAycn':_0x321b8b(0x107),'akwPy':_0x321b8b(0xe3)};return new Promise(_0x1e98ad=>{const _0x4c8552=_0x321b8b,_0x3f42c8={'CTNAa':function(_0x54af25,_0x295a3e){return _0x4ee2fb['gcEOs'](_0x54af25,_0x295a3e);},'nxdTh':function(_0x39862f,_0x215304){const _0x13c436=_0x43fd;return _0x4ee2fb[_0x13c436(0xf0)](_0x39862f,_0x215304);},'NlGET':function(_0x2e2403,_0x5ee547){return _0x4ee2fb['tPsUc'](_0x2e2403,_0x5ee547);}},_0x36bb77=[_0x4ee2fb[_0x4c8552(0x10a)],'uninstall',_0x4c8552(0xf1)];_0x1fc935&&_0x36bb77['push']('--scope',_0x1fc935);const _0x592104=_0x4ee2fb[_0x4c8552(0xd3)](spawn,_0x4ee2fb['yhaar'],_0x36bb77,{'stdio':'pipe','shell':process[_0x4c8552(0xea)]===_0x4ee2fb['eAycn']});_0x592104['on'](_0x4ee2fb[_0x4c8552(0xf4)],_0x349ef8=>{const _0x46f67b=_0x4c8552;_0x3f42c8['CTNAa'](_0x1e98ad,_0x3f42c8[_0x46f67b(0xd7)](_0x349ef8,0x0));}),_0x592104['on'](_0x4c8552(0xfa),()=>{const _0x11c3c7=_0x4c8552;_0x3f42c8[_0x11c3c7(0x10b)](_0x1e98ad,![]);});});}async function removeMarketplace(){const _0x1f5b38=_0x3fe56e,_0x21daa2={'XnMLl':function(_0x362179,_0x16ac66){return _0x362179(_0x16ac66);},'sFxAr':function(_0x43e0ec,_0xc1a3e7){return _0x43e0ec===_0xc1a3e7;},'pkOZf':function(_0x4428ac,_0x2e6455,_0x405572,_0x1d8c7d){return _0x4428ac(_0x2e6455,_0x405572,_0x1d8c7d);},'NHLSS':_0x1f5b38(0xfb),'hEpbk':'marketplace','PdhLL':'trailhead','UFjMl':_0x1f5b38(0xf9),'Equzl':'win32','QhHCZ':'error'};return new Promise(_0x5b40e8=>{const _0x24fe29=_0x1f5b38,_0x4d2c67=_0x21daa2[_0x24fe29(0xf3)](spawn,_0x21daa2['NHLSS'],[_0x24fe29(0xf8),_0x21daa2['hEpbk'],_0x24fe29(0xfe),_0x21daa2['PdhLL']],{'stdio':_0x21daa2[_0x24fe29(0x101)],'shell':process['platform']===_0x21daa2[_0x24fe29(0x108)]});_0x4d2c67['on']('close',_0x4c0c63=>{_0x21daa2['XnMLl'](_0x5b40e8,_0x21daa2['sFxAr'](_0x4c0c63,0x0));}),_0x4d2c67['on'](_0x21daa2[_0x24fe29(0x10c)],()=>{_0x5b40e8(![]);});});}export async function clean(){const _0x305343=_0x3fe56e,_0x393ca7={'gdvtH':function(_0x4b9194){return _0x4b9194();},'prlaD':function(_0x1fa1c1,_0x51d888){return _0x1fa1c1(_0x51d888);},'SQTaM':function(_0x57f9f7){return _0x57f9f7();},'tJZUZ':function(_0x1f9ec9,_0x51d898,_0x226cd7){return _0x1f9ec9(_0x51d898,_0x226cd7);},'FCEWl':_0x305343(0xd6),'AtqHG':function(_0xcd7fae,_0x2513fb){return _0xcd7fae(_0x2513fb);},'koOBF':'project','tkQeN':function(_0x1f3f52,_0x5783ee,_0x341906){return _0x1f3f52(_0x5783ee,_0x341906);},'IYIUM':'user','noBKQ':function(_0x5c7a08,_0x76b366,_0x492e97){return _0x5c7a08(_0x76b366,_0x492e97);},'PMVEz':function(_0x2e05e1,_0x1c9c97){return _0x2e05e1(_0x1c9c97);},'RdqwO':_0x305343(0xee),'HeaAU':function(_0x41446b,_0x2c5059){return _0x41446b(_0x2c5059);},'DkIMy':'opencode.json','ENhor':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','zpSLD':function(_0x28571b){return _0x28571b();},'QLabG':_0x305343(0x10f)};console[_0x305343(0x109)](_0x305343(0x103));let _0xc26dbd=![];try{await deleteAllCredentials(),console['log'](_0x305343(0xd9)),_0xc26dbd=!![];}catch{}const _0x403bde=_0x393ca7['gdvtH'](getCacheFile);_0x393ca7['prlaD'](existsSync,_0x403bde)&&(await _0x393ca7[_0x305343(0xf6)](rm,_0x403bde),_0xc26dbd=!![]);const _0x4d528b=_0x393ca7['SQTaM'](getRangerDir);_0x393ca7[_0x305343(0xf6)](existsSync,_0x4d528b)&&(await _0x393ca7[_0x305343(0xd4)](rm,_0x4d528b,{'recursive':!![]}),console['log'](_0x393ca7['FCEWl']),_0xc26dbd=!![]);const _0x1a9a5c=getProjectSkillsDir();for(const _0x2f4bc6 of skillsToRemove){const _0xcb0687=join(_0x1a9a5c,_0x2f4bc6);_0x393ca7[_0x305343(0x106)](existsSync,_0xcb0687)&&(await _0x393ca7['tJZUZ'](rm,_0xcb0687,{'recursive':!![]}),console[_0x305343(0x109)]('✓\x20Removed\x20project\x20skill:\x20'+_0x2f4bc6),_0xc26dbd=!![]);}const _0x579769=getUserSkillsDir();for(const _0x87af67 of skillsToRemove){const _0x1a2f9f=join(_0x579769,_0x87af67);existsSync(_0x1a2f9f)&&(await rm(_0x1a2f9f,{'recursive':!![]}),console[_0x305343(0x109)](_0x305343(0xde)+_0x87af67),_0xc26dbd=!![]);}const _0x2281a4=getOpencodeSkillsDir(_0x393ca7[_0x305343(0xe9)]);for(const _0xd6134a of skillsToRemove){const _0x5cabb7=_0x393ca7['tJZUZ'](join,_0x2281a4,_0xd6134a);existsSync(_0x5cabb7)&&(await _0x393ca7['tkQeN'](rm,_0x5cabb7,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0xd6134a),_0xc26dbd=!![]);}const _0x57c88f=_0x393ca7[_0x305343(0x106)](getOpencodeSkillsDir,_0x393ca7[_0x305343(0x10d)]);for(const _0x3e21ac of skillsToRemove){const _0x126f4d=join(_0x57c88f,_0x3e21ac);_0x393ca7['prlaD'](existsSync,_0x126f4d)&&(await rm(_0x126f4d,{'recursive':!![]}),console[_0x305343(0x109)](_0x305343(0xeb)+_0x3e21ac),_0xc26dbd=!![]);}const _0x3f9721=_0x393ca7[_0x305343(0xe7)](join,_0x393ca7['AtqHG'](getOpencodeConfigDir,'project'),'opencode.json');await _0x393ca7['PMVEz'](removeOpencodePluginConfig,_0x3f9721)&&(console[_0x305343(0x109)](_0x393ca7[_0x305343(0xdf)]),_0xc26dbd=!![]);const _0x1bd865=_0x393ca7[_0x305343(0xe7)](join,_0x393ca7[_0x305343(0xe4)](getOpencodeConfigDir,_0x393ca7[_0x305343(0x10d)]),_0x393ca7['DkIMy']);await removeOpencodePluginConfig(_0x1bd865)&&(console['log'](_0x305343(0x105)),_0xc26dbd=!![]);const _0x395ddc=await uninstallClaudePlugin();_0x395ddc&&(console[_0x305343(0x109)](_0x393ca7['ENhor']),_0xc26dbd=!![]);const _0x3c47c8=await _0x393ca7[_0x305343(0x102)](uninstallClaudePlugin,_0x305343(0xdb));_0x3c47c8&&(console['log']('✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)'),_0xc26dbd=!![]);const _0x15585d=await _0x393ca7[_0x305343(0xf5)](removeMarketplace);_0x15585d&&(console[_0x305343(0x109)]('✓\x20Removed\x20trailhead\x20marketplace'),_0xc26dbd=!![]),_0xc26dbd?console['log'](_0x393ca7[_0x305343(0xe2)]):console[_0x305343(0x109)]('Nothing\x20to\x20clean\x20up.\x0a');}
1
+ const _0x3d4d1b=_0x3025;(function(_0x4647aa,_0x35e91f){const _0x2bb8ee=_0x3025,_0xd100be=_0x4647aa();while(!![]){try{const _0x577723=-parseInt(_0x2bb8ee(0x8f))/0x1+-parseInt(_0x2bb8ee(0x90))/0x2+-parseInt(_0x2bb8ee(0x86))/0x3*(-parseInt(_0x2bb8ee(0x9b))/0x4)+-parseInt(_0x2bb8ee(0x72))/0x5+-parseInt(_0x2bb8ee(0x83))/0x6*(parseInt(_0x2bb8ee(0x93))/0x7)+parseInt(_0x2bb8ee(0x87))/0x8+-parseInt(_0x2bb8ee(0x8e))/0x9*(-parseInt(_0x2bb8ee(0xa1))/0xa);if(_0x577723===_0x35e91f)break;else _0xd100be['push'](_0xd100be['shift']());}catch(_0x12673f){_0xd100be['push'](_0xd100be['shift']());}}}(_0x276a,0x464bd));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=[_0x3d4d1b(0x91),_0x3d4d1b(0x8a),_0x3d4d1b(0x88),_0x3d4d1b(0x85)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x9a96a4){const _0x37294a=_0x3d4d1b,_0x3b939e=_0x9a96a4['replace'](/\/\*[\s\S]*?\*\//g,''),_0x4220c5=_0x3b939e[_0x37294a(0xa3)](/^\s*\/\/.*$/gm,''),_0x47fcd6=_0x4220c5['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x47fcd6);}async function removeOpencodePluginConfig(_0x24a807){const _0x5e9502=_0x3d4d1b,_0x3a8cf6={'RVAad':function(_0x429322,_0x4462a0,_0xaee1a2){return _0x429322(_0x4462a0,_0xaee1a2);},'Bvpfj':function(_0x5889fa,_0x2ce996){return _0x5889fa===_0x2ce996;},'cnkbH':function(_0x5e7ed1,_0x1e61ac){return _0x5e7ed1===_0x1e61ac;},'vijfk':function(_0x33ae50,_0x224128,_0x572ddd){return _0x33ae50(_0x224128,_0x572ddd);},'jaOHs':function(_0x5567f9,_0x315d7a){return _0x5567f9+_0x315d7a;}};if(!existsSync(_0x24a807))return![];let _0x5f96e5;try{const _0x4ab55e=await _0x3a8cf6['RVAad'](readFile,_0x24a807,_0x5e9502(0x9a));_0x5f96e5=parseJsonc(_0x4ab55e);}catch{return![];}const _0x339d59=Array['isArray'](_0x5f96e5[_0x5e9502(0xa6)])?_0x5f96e5['plugin']:[];if(_0x3a8cf6['Bvpfj'](_0x339d59[_0x5e9502(0x73)],0x0))return![];const _0xfc97eb=_0x339d59['filter'](_0x5b9acb=>{const _0x3518ff=_0x5e9502;if(typeof _0x5b9acb!==_0x3518ff(0xa5))return!![];return _0x5b9acb!==opencodePluginName;});if(_0x3a8cf6[_0x5e9502(0x89)](_0xfc97eb['length'],_0x339d59[_0x5e9502(0x73)]))return![];return _0x3a8cf6[_0x5e9502(0x7a)](_0xfc97eb[_0x5e9502(0x73)],0x0)?delete _0x5f96e5['plugin']:_0x5f96e5[_0x5e9502(0xa6)]=_0xfc97eb,await _0x3a8cf6[_0x5e9502(0x7f)](writeFile,_0x24a807,_0x3a8cf6['jaOHs'](JSON['stringify'](_0x5f96e5,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x2f8550){const _0x548e0f=_0x3d4d1b,_0x199586={'hRavu':_0x548e0f(0x8c),'IVPDR':_0x548e0f(0x7c),'aJBML':function(_0xb54b70){return _0xb54b70();},'EIrkM':function(_0x1208e6,_0x40491f){return _0x1208e6===_0x40491f;},'FeoIU':_0x548e0f(0x98)};return new Promise(_0x1008d9=>{const _0x109da0=_0x548e0f,_0x3cf18b=['plugin',_0x109da0(0x7b),'ranger@trailhead'];_0x2f8550&&_0x3cf18b['push'](_0x199586['hRavu'],_0x2f8550);const _0x4ba81b=spawn(_0x109da0(0xa4),_0x3cf18b,{'stdio':[_0x109da0(0x7c),_0x199586['IVPDR'],_0x199586[_0x109da0(0x74)]],'cwd':_0x2f8550?_0x199586['aJBML'](getProjectRoot):undefined,'shell':_0x199586[_0x109da0(0x99)](process['platform'],_0x199586[_0x109da0(0x96)])});_0x4ba81b['on']('close',_0x3a92f6=>{_0x1008d9(_0x3a92f6===0x0);}),_0x4ba81b['on']('error',()=>{_0x1008d9(![]);});});}function _0x276a(){const _0x17ba29=['6JZDKCt','jcReo','e2e-test-recommender','49089OUgXjs','1438384xXzdkM','bug-bash','Bvpfj','feature-tracker','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','--scope','flIyY','36027oKiPwq','387158pclpQY','584388BPoFmM','ranger','✓\x20Removed\x20user\x20skill:\x20','3717091ELxgnX','HUCJs','blJPM','FeoIU','remove','win32','EIrkM','utf-8','56gvdISS','BSMyO','KCUrE','oeBSK','user','MxZfF','3470qInEXF','Nothing\x20to\x20clean\x20up.\x0a','replace','claude','string','plugin','yeaPu','opencode.json','1498115NbCkBO','length','IVPDR','project','✓\x20Removed\x20stored\x20credentials','close','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','BfDPp','cnkbH','uninstall','ignore','platform','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','vijfk','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','hAkxu','log'];_0x276a=function(){return _0x17ba29;};return _0x276a();}function _0x3025(_0x185c2b,_0x5d794a){_0x185c2b=_0x185c2b-0x71;const _0x276a91=_0x276a();let _0x30250a=_0x276a91[_0x185c2b];return _0x30250a;}async function removeMarketplace(){const _0x18461b=_0x3d4d1b,_0xf72ec4={'oeBSK':function(_0xc36d16,_0x2ddd2a){return _0xc36d16(_0x2ddd2a);},'ZhUAB':function(_0x4e966c,_0x710c43,_0x3a3571,_0x28e4b7){return _0x4e966c(_0x710c43,_0x3a3571,_0x28e4b7);},'BnEMy':'marketplace','fmpao':_0x18461b(0x97),'KCUrE':'trailhead','Eyfuq':'ignore','BfDPp':_0x18461b(0x98)};return new Promise(_0xd878c4=>{const _0x35f514=_0x18461b,_0x485599=_0xf72ec4['ZhUAB'](spawn,'claude',[_0x35f514(0xa6),_0xf72ec4['BnEMy'],_0xf72ec4['fmpao'],_0xf72ec4[_0x35f514(0x9d)]],{'stdio':[_0x35f514(0x7c),_0xf72ec4['Eyfuq'],_0x35f514(0x7c)],'shell':process[_0x35f514(0x7d)]===_0xf72ec4[_0x35f514(0x79)]});_0x485599['on'](_0x35f514(0x77),_0x4fb4d3=>{const _0x533603=_0x35f514;_0xf72ec4[_0x533603(0x9e)](_0xd878c4,_0x4fb4d3===0x0);}),_0x485599['on']('error',()=>{_0xd878c4(![]);});});}export async function clean(){const _0xbd5a60=_0x3d4d1b,_0x4979a7={'blJPM':_0xbd5a60(0x8b),'dSZvr':_0xbd5a60(0x76),'BSMyO':function(_0xc15088,_0x5c08f4){return _0xc15088(_0x5c08f4);},'jcReo':function(_0x35c71){return _0x35c71();},'pBHkg':function(_0x30b543,_0x488cfd,_0x3411f0){return _0x30b543(_0x488cfd,_0x3411f0);},'yeaPu':function(_0x137b5a,_0x125a7c,_0x34352c){return _0x137b5a(_0x125a7c,_0x34352c);},'HUCJs':function(_0x4ed363,_0x28b19e){return _0x4ed363(_0x28b19e);},'flIyY':'project','TKBca':function(_0xcae822,_0x297832,_0x35468b){return _0xcae822(_0x297832,_0x35468b);},'olwFq':function(_0x1b5d8d,_0xa28033,_0x194fa7){return _0x1b5d8d(_0xa28033,_0x194fa7);},'vvSBd':_0xbd5a60(0x80),'hAkxu':'user','MxZfF':function(_0x27ddba){return _0x27ddba();},'UBUKh':function(_0x418f5b,_0xab23c8){return _0x418f5b(_0xab23c8);},'GkUNa':'✓\x20Removed\x20trailhead\x20marketplace'};console[_0xbd5a60(0x82)](_0x4979a7[_0xbd5a60(0x95)]);let _0x4787d1=![];try{await deleteAllCredentials(),console['log'](_0x4979a7['dSZvr']),_0x4787d1=!![];}catch{}const _0x4ee4d6=getCacheFile();existsSync(_0x4ee4d6)&&(await _0x4979a7[_0xbd5a60(0x9c)](rm,_0x4ee4d6),_0x4787d1=!![]);const _0x1452a4=getRangerDir();existsSync(_0x1452a4)&&(await rm(_0x1452a4,{'recursive':!![]}),console[_0xbd5a60(0x82)]('✓\x20Removed\x20.ranger/\x20directory'),_0x4787d1=!![]);const _0x4ea148=_0x4979a7[_0xbd5a60(0x84)](getProjectSkillsDir);for(const _0x36036f of skillsToRemove){const _0x169a48=join(_0x4ea148,_0x36036f);existsSync(_0x169a48)&&(await rm(_0x169a48,{'recursive':!![]}),console['log']('✓\x20Removed\x20project\x20skill:\x20'+_0x36036f),_0x4787d1=!![]);}const _0x44d44a=_0x4979a7['jcReo'](getUserSkillsDir);for(const _0x30930f of skillsToRemove){const _0x21faf0=_0x4979a7['pBHkg'](join,_0x44d44a,_0x30930f);existsSync(_0x21faf0)&&(await _0x4979a7['yeaPu'](rm,_0x21faf0,{'recursive':!![]}),console['log'](_0xbd5a60(0x92)+_0x30930f),_0x4787d1=!![]);}const _0x3203f6=_0x4979a7['HUCJs'](getOpencodeSkillsDir,_0x4979a7[_0xbd5a60(0x8d)]);for(const _0x5b9eaf of skillsToRemove){const _0x3d0745=_0x4979a7['TKBca'](join,_0x3203f6,_0x5b9eaf);_0x4979a7[_0xbd5a60(0x94)](existsSync,_0x3d0745)&&(await rm(_0x3d0745,{'recursive':!![]}),console[_0xbd5a60(0x82)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5b9eaf),_0x4787d1=!![]);}const _0x327cac=getOpencodeSkillsDir(_0xbd5a60(0x9f));for(const _0x3b30e1 of skillsToRemove){const _0x4eee33=_0x4979a7[_0xbd5a60(0xa7)](join,_0x327cac,_0x3b30e1);_0x4979a7['BSMyO'](existsSync,_0x4eee33)&&(await rm(_0x4eee33,{'recursive':!![]}),console['log']('✓\x20Removed\x20OpenCode\x20user\x20skill:\x20'+_0x3b30e1),_0x4787d1=!![]);}const _0x258b71=_0x4979a7['olwFq'](join,getOpencodeConfigDir(_0xbd5a60(0x75)),'opencode.json');await _0x4979a7['BSMyO'](removeOpencodePluginConfig,_0x258b71)&&(console['log'](_0x4979a7['vvSBd']),_0x4787d1=!![]);const _0xcbd5b1=join(getOpencodeConfigDir(_0x4979a7[_0xbd5a60(0x81)]),_0xbd5a60(0x71));await _0x4979a7['BSMyO'](removeOpencodePluginConfig,_0xcbd5b1)&&(console[_0xbd5a60(0x82)]('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x4787d1=!![]);const _0x5c8292=await _0x4979a7[_0xbd5a60(0xa0)](uninstallClaudePlugin);_0x5c8292&&(console[_0xbd5a60(0x82)](_0xbd5a60(0x7e)),_0x4787d1=!![]);const _0x3d7ce9=await _0x4979a7['UBUKh'](uninstallClaudePlugin,'project');_0x3d7ce9&&(console['log'](_0xbd5a60(0x78)),_0x4787d1=!![]);const _0x207bd3=await removeMarketplace();_0x207bd3&&(console['log'](_0x4979a7['GkUNa']),_0x4787d1=!![]),_0x4787d1?console['log']('\x0a✅\x20Cleanup\x20complete!\x0a'):console[_0xbd5a60(0x82)](_0xbd5a60(0xa2));}
@@ -1 +1 @@
1
- const _0x2a29cb=_0x5187;(function(_0x1b2859,_0x1566ce){const _0x43ab4c=_0x5187,_0x2bd312=_0x1b2859();while(!![]){try{const _0x44cfb8=parseInt(_0x43ab4c(0xef))/0x1*(parseInt(_0x43ab4c(0xf8))/0x2)+-parseInt(_0x43ab4c(0x107))/0x3*(parseInt(_0x43ab4c(0xff))/0x4)+-parseInt(_0x43ab4c(0xf4))/0x5*(parseInt(_0x43ab4c(0x10e))/0x6)+parseInt(_0x43ab4c(0x108))/0x7+-parseInt(_0x43ab4c(0x104))/0x8+-parseInt(_0x43ab4c(0xf2))/0x9*(-parseInt(_0x43ab4c(0x112))/0xa)+-parseInt(_0x43ab4c(0xf9))/0xb*(parseInt(_0x43ab4c(0xfb))/0xc);if(_0x44cfb8===_0x1566ce)break;else _0x2bd312['push'](_0x2bd312['shift']());}catch(_0x18c45f){_0x2bd312['push'](_0x2bd312['shift']());}}}(_0x13fe,0x4757f));import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';function _0x13fe(){const _0x10cd95=['3830080DIGQNX','Profile\x20\x22','stringify','37233nSolPV','3957583SypmNg','UEDSS','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','nTFVb','true','false','6ybvYxu','headless','No\x20configuration\x20set\x20for\x20\x22','JAPKH','70NzSADn','GpLmH','15CcQAFV','includes','(not\x20set)','485163PcbtcQ','\x22\x20not\x20found','298805xVLXOb','object','\x22\x20does\x20not\x20exist.','log','36020vdvcPW','1336423ExxPzV','EYzfC','12QcmGQx','Set\x20','arckW','TfTjn','84WigRZV','Key\x20\x22','Removed\x20','allowInsecureLocalhost','Invalid\x20value\x20for\x20'];_0x13fe=function(){return _0x10cd95;};return _0x13fe();}function _0x5187(_0x50a4ff,_0x1aeddb){_0x50a4ff=_0x50a4ff-0xef;const _0x13feed=_0x13fe();let _0x5187a3=_0x13feed[_0x50a4ff];return _0x5187a3;}const BOOLEAN_KEYS=[_0x2a29cb(0x10f),_0x2a29cb(0x102)];function parseValue(_0x47609c,_0x4d10a6){const _0x14f6d9=_0x2a29cb,_0x5d1d24={'arckW':function(_0x33f3ca,_0x9b7321){return _0x33f3ca===_0x9b7321;},'UEDSS':_0x14f6d9(0x10c)};if(BOOLEAN_KEYS[_0x14f6d9(0xf0)](_0x47609c)){if(_0x5d1d24[_0x14f6d9(0xfd)](_0x4d10a6,_0x5d1d24[_0x14f6d9(0x109)]))return!![];if(_0x4d10a6===_0x14f6d9(0x10d))return![];throw new Error(_0x14f6d9(0x103)+_0x47609c+':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22');}return _0x4d10a6;}export async function configSet(_0x3881eb,_0x3fd8ea,_0x37968f){const _0x25caf4=_0x2a29cb,_0x2e7dab={'TfTjn':function(_0x4930b6,_0x4ca95e){return _0x4930b6(_0x4ca95e);},'nTFVb':function(_0x4654b0,_0x182477,_0x4ee7d3,_0x4f85bf){return _0x4654b0(_0x182477,_0x4ee7d3,_0x4f85bf);},'Fbgnf':function(_0xf62d0b,_0x5747af,_0x22ee73){return _0xf62d0b(_0x5747af,_0x22ee73);}},_0x5484c6=_0x2e7dab['TfTjn'](getEnvDir,_0x3881eb);if(!_0x2e7dab[_0x25caf4(0xfe)](existsSync,_0x5484c6))throw new Error(_0x25caf4(0x105)+_0x3881eb+_0x25caf4(0x10a)+_0x3881eb);const _0x1c9a19=await loadSettings(_0x3881eb),_0x33b12c=parseValue(_0x3fd8ea,_0x37968f);_0x2e7dab[_0x25caf4(0x10b)](setNestedValue,_0x1c9a19,_0x3fd8ea,_0x33b12c),await _0x2e7dab['Fbgnf'](saveSettings,_0x3881eb,_0x1c9a19),console[_0x25caf4(0xf7)](_0x25caf4(0xfc)+_0x3fd8ea+'\x20=\x20'+_0x33b12c);}export async function configGet(_0x435294,_0x373833){const _0x4def4a=_0x2a29cb,_0x4b0867={'GpLmH':function(_0x4e8521,_0x4f2762){return _0x4e8521(_0x4f2762);},'EYzfC':function(_0x2a487e,_0x2abc4b){return _0x2a487e===_0x2abc4b;}},_0x11e5d4=getEnvDir(_0x435294);if(!_0x4b0867['GpLmH'](existsSync,_0x11e5d4))throw new Error(_0x4def4a(0x105)+_0x435294+_0x4def4a(0xf6));const _0x2f35a6=await _0x4b0867[_0x4def4a(0x113)](loadSettings,_0x435294),_0x18c218=getNestedValue(_0x2f35a6,_0x373833);if(_0x4b0867[_0x4def4a(0xfa)](_0x18c218,undefined))console['log'](_0x4def4a(0xf1));else typeof _0x18c218===_0x4def4a(0xf5)?console['log'](JSON[_0x4def4a(0x106)](_0x18c218,null,0x2)):console['log'](_0x18c218);}export async function configList(_0x520fc){const _0x5401dd=_0x2a29cb,_0x32d951={'JAPKH':function(_0x396b66,_0x1571da){return _0x396b66(_0x1571da);},'DhsXv':function(_0x1c1021,_0x165f4e){return _0x1c1021(_0x165f4e);}},_0x44d868=_0x32d951[_0x5401dd(0x111)](getSettingsPath,_0x520fc);if(!_0x32d951['DhsXv'](existsSync,_0x44d868)){const _0x8c5fd0=_0x32d951['DhsXv'](getEnvDir,_0x520fc);if(!existsSync(_0x8c5fd0))throw new Error('Profile\x20\x22'+_0x520fc+'\x22\x20does\x20not\x20exist.');console[_0x5401dd(0xf7)](_0x5401dd(0x110)+_0x520fc+'\x22');return;}const _0x11a4d8=await loadSettings(_0x520fc),_0x3aaae4=formatSettings(_0x11a4d8);!_0x3aaae4?console['log'](_0x5401dd(0x110)+_0x520fc+'\x22'):console['log'](_0x3aaae4);}export async function configUnset(_0x309d43,_0x2c0595){const _0x4c0c67=_0x2a29cb,_0x3d6635={'BELFq':function(_0x16bfec,_0x2cfa38){return _0x16bfec(_0x2cfa38);}},_0x2f33bf=getEnvDir(_0x309d43);if(!existsSync(_0x2f33bf))throw new Error(_0x4c0c67(0x105)+_0x309d43+'\x22\x20does\x20not\x20exist.');const _0x30c2ab=await _0x3d6635['BELFq'](loadSettings,_0x309d43),_0x5f0dd6=deleteNestedValue(_0x30c2ab,_0x2c0595);_0x5f0dd6?(await saveSettings(_0x309d43,_0x30c2ab),console[_0x4c0c67(0xf7)](_0x4c0c67(0x101)+_0x2c0595)):console['log'](_0x4c0c67(0x100)+_0x2c0595+_0x4c0c67(0xf3));}
1
+ const _0x3d0a5f=_0x4bcf;(function(_0x123a68,_0x3081fb){const _0x2d108a=_0x4bcf,_0x47a688=_0x123a68();while(!![]){try{const _0xa8b2b3=parseInt(_0x2d108a(0x125))/0x1+-parseInt(_0x2d108a(0xf8))/0x2*(-parseInt(_0x2d108a(0x100))/0x3)+-parseInt(_0x2d108a(0xef))/0x4*(parseInt(_0x2d108a(0x10f))/0x5)+-parseInt(_0x2d108a(0xf4))/0x6+parseInt(_0x2d108a(0xf3))/0x7*(parseInt(_0x2d108a(0xfc))/0x8)+-parseInt(_0x2d108a(0x127))/0x9+parseInt(_0x2d108a(0xf6))/0xa*(-parseInt(_0x2d108a(0x10d))/0xb);if(_0xa8b2b3===_0x3081fb)break;else _0x47a688['push'](_0x47a688['shift']());}catch(_0x3ab09a){_0x47a688['push'](_0x47a688['shift']());}}}(_0x58ce,0x1c85a));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 _0x58ce(){const _0x24bba8=['nmCcu','\x20\x20Note:\x20\x22','(not\x20set)','134360mIGYpx','isSafeInteger','atzyZ','DgAum','647571MowBnD','VuCvD','DplXC','yOnAu','\x22\x20not\x20found','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','QUuXo','CWAmP','endsWith','UelEc','trim','Removed\x20','NVZVl','12914hbtUtn','Qbdun','177565cntnJc','dQpxt','local','HbhKJ','kind','alsoExistsElsewhere','uashe','aZmqy','Key\x20\x22','UyvIF','isNaN','stringify','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','oRGof','lPOER','cloud','GWJBZ','sWWiF','log','undefined','headless','test','226035dMvcOl','\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22','957609JNsQaH','allowInsecureLocalhost','true','LxCxl',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','12BuCrZu','Profile\x20\x22','startsWith','NbZdG','7xSSVHR','322710yxpUyH','NmwJp','640bIbvQN','keys','2FfdRRt'];_0x58ce=function(){return _0x24bba8;};return _0x58ce();}const BOOLEAN_KEYS=[_0x3d0a5f(0x123),_0x3d0a5f(0x128)];function parseLocalValue(_0x492acb,_0x43b473){const _0x451c57=_0x3d0a5f,_0x4b608b={'jMbjs':function(_0xb4acba,_0x3da5ad){return _0xb4acba===_0x3da5ad;},'DgAum':'false'};if(BOOLEAN_KEYS['includes'](_0x492acb)){if(_0x43b473==='true')return!![];if(_0x4b608b['jMbjs'](_0x43b473,_0x4b608b[_0x451c57(0xff)]))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x492acb+_0x451c57(0xed));}return _0x43b473;}function _0x4bcf(_0x3f43ef,_0x2b619b){_0x3f43ef=_0x3f43ef-0xeb;const _0x58ce60=_0x58ce();let _0x4bcfeb=_0x58ce60[_0x3f43ef];return _0x4bcfeb;}function parseOverrideValue(_0x17aac2){const _0x4b08c7=_0x3d0a5f,_0x11b46c={'uashe':'false'};if(_0x17aac2===_0x4b08c7(0xeb))return!![];if(_0x17aac2===_0x11b46c[_0x4b08c7(0x115)])return![];if(_0x17aac2==='null')return null;if(_0x17aac2===_0x4b08c7(0x122))return undefined;if(/^-?\d+$/[_0x4b08c7(0x124)](_0x17aac2)){const _0x4fb012=Number(_0x17aac2);if(Number[_0x4b08c7(0xfd)](_0x4fb012))return _0x4fb012;}if(/^-?\d+\.\d+$/[_0x4b08c7(0x124)](_0x17aac2)){const _0x2d7349=Number(_0x17aac2);if(!Number[_0x4b08c7(0x119)](_0x2d7349))return _0x2d7349;}const _0xa3f34f=_0x17aac2[_0x4b08c7(0x10a)]();if(_0xa3f34f[_0x4b08c7(0xf1)]('{')&&_0xa3f34f[_0x4b08c7(0x108)]('}')||_0xa3f34f['startsWith']('[')&&_0xa3f34f['endsWith'](']'))try{return JSON['parse'](_0xa3f34f);}catch{}return _0x17aac2;}async function resolveProfileTarget(_0x3e1e42){const _0x4220c8=_0x3d0a5f,_0x495a61={'Qbdun':function(_0x324aa2,_0x1e7c14){return _0x324aa2(_0x1e7c14);},'sWWiF':_0x4220c8(0x111)},_0x2f8300=_0x495a61[_0x4220c8(0x10e)](existsSync,getEnvDir(_0x3e1e42));let _0xb6fee5=![];try{const _0x4f3f22=await _0x495a61[_0x4220c8(0x10e)](fetchCloudProfile,_0x3e1e42);_0xb6fee5=Boolean(_0x4f3f22);}catch{}if(_0xb6fee5)return{'kind':_0x4220c8(0x11e),'alsoExistsElsewhere':_0x2f8300};if(_0x2f8300)return{'kind':_0x495a61[_0x4220c8(0x120)],'alsoExistsElsewhere':![]};throw new Error(_0x4220c8(0xf0)+_0x3e1e42+_0x4220c8(0x105)+_0x3e1e42);}function printDualExistsHint(_0x895bc1){const _0x40e005=_0x3d0a5f;console[_0x40e005(0x121)](_0x40e005(0xfa)+_0x895bc1+_0x40e005(0xee));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x29b6b9){const _0xe268c2=_0x3d0a5f,_0x2fed67={'qAzuS':function(_0x35556d,_0x48253e){return _0x35556d(_0x48253e);},'atzyZ':function(_0x4d19eb,_0x515de0,_0x31861a){return _0x4d19eb(_0x515de0,_0x31861a);},'VuCvD':function(_0x5c88a2){return _0x5c88a2();}},_0x49c13f=await _0x2fed67['qAzuS'](fetchCloudProfile,_0x29b6b9),_0x5e7e07=_0x2fed67[_0xe268c2(0xfe)](readProfileOverrides,_0x2fed67[_0xe268c2(0x101)](getProjectPath),_0x29b6b9);return mergeCloudProfileSettings(_0x49c13f?.['settings']??{},_0x5e7e07??undefined);}export async function configSet(_0x169ee3,_0x3f53bd,_0x4833e1){const _0x8e615f=_0x3d0a5f,_0x1275d7={'DCcZZ':function(_0x5e10e0,_0x394329){return _0x5e10e0(_0x394329);},'oRGof':function(_0x19f6d6,_0x1e0919){return _0x19f6d6===_0x1e0919;},'NVZVl':function(_0x328515,_0x3e790c){return _0x328515(_0x3e790c);},'Wcazj':function(_0x2ca454,_0x591a9e,_0x233598,_0x194af6,_0x11864b){return _0x2ca454(_0x591a9e,_0x233598,_0x194af6,_0x11864b);},'EnDbB':function(_0x2ee6ea){return _0x2ee6ea();},'mqLva':function(_0x549039,_0x143614,_0x5dbc80,_0x5d6db5,_0x41c6ad){return _0x549039(_0x143614,_0x5dbc80,_0x5d6db5,_0x41c6ad);}},_0x17ed42=await _0x1275d7['DCcZZ'](resolveProfileTarget,_0x169ee3);if(_0x1275d7[_0x8e615f(0x11c)](_0x17ed42['kind'],'cloud')){if(_0x17ed42[_0x8e615f(0x114)])_0x1275d7[_0x8e615f(0x10c)](printDualExistsHint,_0x169ee3);const _0x1567a6=_0x1275d7[_0x8e615f(0x10c)](parseOverrideValue,_0x4833e1);_0x1275d7['Wcazj'](setProfileOverride,_0x1275d7['EnDbB'](getProjectPath),_0x169ee3,_0x3f53bd,_0x1567a6),console['log']('Set\x20'+_0x3f53bd+'\x20=\x20'+JSON[_0x8e615f(0x11a)](_0x1567a6)+'\x20for\x20\x22'+_0x169ee3+'\x22');return;}const _0x5de0b9=parseLocalValue(_0x3f53bd,_0x4833e1);_0x1275d7['mqLva'](setProfileOverride,getProjectPath(),_0x169ee3,_0x3f53bd,_0x5de0b9),console['log']('Set\x20'+_0x3f53bd+'\x20=\x20'+_0x5de0b9+'\x20for\x20\x22'+_0x169ee3+'\x22');}export async function configGet(_0x2b9ca1,_0x420375){const _0x484890=_0x3d0a5f,_0x34f63a={'aUfQd':'cloud','DplXC':function(_0x4b89cc,_0x31d882){return _0x4b89cc(_0x31d882);},'fVOCk':function(_0x3f1617,_0x2b0f3a){return _0x3f1617===_0x2b0f3a;},'QUuXo':function(_0x235699,_0x339457){return _0x235699(_0x339457);},'Flxiy':function(_0x11aaf2,_0x123e6d,_0x1dce84){return _0x11aaf2(_0x123e6d,_0x1dce84);}},_0x227ea3=await resolveProfileTarget(_0x2b9ca1);if(_0x227ea3[_0x484890(0x113)]===_0x34f63a['aUfQd']){const _0xf8546=await _0x34f63a[_0x484890(0x102)](loadEffectiveCloudSettings,_0x2b9ca1),_0x4f99ee=getNestedValue(_0xf8546,_0x420375);if(_0x34f63a['fVOCk'](_0x4f99ee,undefined))console[_0x484890(0x121)](_0x484890(0xfb));else typeof _0x4f99ee==='object'?console['log'](JSON['stringify'](_0x4f99ee,null,0x2)):console['log'](_0x4f99ee);return;}const _0x5170a9=await _0x34f63a[_0x484890(0x106)](loadSettings,_0x2b9ca1),_0x2b4065=_0x34f63a['Flxiy'](getNestedValue,_0x5170a9,_0x420375);if(_0x2b4065===undefined)console['log']('(not\x20set)');else typeof _0x2b4065==='object'?console[_0x484890(0x121)](JSON[_0x484890(0x11a)](_0x2b4065,null,0x2)):console[_0x484890(0x121)](_0x2b4065);}export async function configList(_0x2d2a6c){const _0x6f5960=_0x3d0a5f,_0x4b1bed={'NmwJp':function(_0x4eed9e,_0x154d0f){return _0x4eed9e(_0x154d0f);},'UyvIF':'cloud','UelEc':function(_0x3d52c3,_0x1da2bd){return _0x3d52c3===_0x1da2bd;},'dQpxt':function(_0x22958d,_0xbe366b){return _0x22958d(_0xbe366b);},'lPOER':function(_0x368203,_0x1dff3e){return _0x368203(_0x1dff3e);},'GWJBZ':function(_0x36a92c,_0x5b6cb0){return _0x36a92c(_0x5b6cb0);}},_0x136915=await _0x4b1bed['NmwJp'](resolveProfileTarget,_0x2d2a6c);if(_0x136915[_0x6f5960(0x113)]===_0x4b1bed[_0x6f5960(0x118)]){const _0x73d315=await _0x4b1bed[_0x6f5960(0xf5)](loadEffectiveCloudSettings,_0x2d2a6c);if(!_0x73d315||_0x4b1bed[_0x6f5960(0x109)](Object[_0x6f5960(0xf7)](_0x73d315)['length'],0x0)){console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x2d2a6c+'\x22');return;}console['log'](JSON['stringify'](_0x73d315,null,0x2));return;}const _0x13256c=_0x4b1bed[_0x6f5960(0x110)](getSettingsPath,_0x2d2a6c);if(!_0x4b1bed[_0x6f5960(0x11d)](existsSync,_0x13256c)){console[_0x6f5960(0x121)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2d2a6c+'\x22');return;}const _0x279bff=await loadSettings(_0x2d2a6c),_0x2301c6=_0x4b1bed[_0x6f5960(0x11f)](formatSettings,_0x279bff);!_0x2301c6?console[_0x6f5960(0x121)]('No\x20configuration\x20set\x20for\x20\x22'+_0x2d2a6c+'\x22'):console[_0x6f5960(0x121)](_0x2301c6);}export async function configUnset(_0x27b3bb,_0x6aaff9){const _0x260543=_0x3d0a5f,_0x8aeb8c={'HbhKJ':function(_0x806039,_0x3f58ab){return _0x806039(_0x3f58ab);},'nmCcu':function(_0x212635,_0x2c725a){return _0x212635===_0x2c725a;},'yOnAu':function(_0x19c1a8,_0x50c6a8,_0x4c7a2a,_0x1c02bd){return _0x19c1a8(_0x50c6a8,_0x4c7a2a,_0x1c02bd);},'LxCxl':function(_0x167960,_0x3191be,_0x3542c9,_0x356631){return _0x167960(_0x3191be,_0x3542c9,_0x356631);},'NbZdG':function(_0x32b221){return _0x32b221();},'YiJaZ':function(_0xe7366b,_0x1f8d88,_0x3b376a){return _0xe7366b(_0x1f8d88,_0x3b376a);}},_0x2373ac=await _0x8aeb8c[_0x260543(0x112)](resolveProfileTarget,_0x27b3bb);if(_0x8aeb8c[_0x260543(0xf9)](_0x2373ac['kind'],_0x260543(0x11e))){if(_0x2373ac['alsoExistsElsewhere'])printDualExistsHint(_0x27b3bb);const _0x4eeb7d=_0x8aeb8c[_0x260543(0x103)](unsetProfileOverride,getProjectPath(),_0x27b3bb,_0x6aaff9);_0x4eeb7d?console['log'](_0x260543(0x10b)+_0x6aaff9+'\x20for\x20\x22'+_0x27b3bb+'\x22'):console['log'](_0x260543(0x117)+_0x6aaff9+_0x260543(0x104));return;}const _0x65e891=_0x8aeb8c[_0x260543(0xec)](unsetProfileOverride,_0x8aeb8c[_0x260543(0xf2)](getProjectPath),_0x27b3bb,_0x6aaff9);if(_0x65e891){console[_0x260543(0x121)]('Removed\x20'+_0x6aaff9);return;}const _0x17861e=await loadSettings(_0x27b3bb),_0x3b5d59=_0x8aeb8c['YiJaZ'](deleteNestedValue,_0x17861e,_0x6aaff9);_0x3b5d59?console[_0x260543(0x121)]('Key\x20\x22'+_0x6aaff9+_0x260543(0x126)+_0x27b3bb+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x260543(0x121)]('Key\x20\x22'+_0x6aaff9+_0x260543(0x104));}export async function configReset(_0x12c474){const _0x53f085=_0x3d0a5f,_0x5f7693={'CWAmP':_0x53f085(0x11e),'aZmqy':function(_0x4ae52e){return _0x4ae52e();}},_0x3139e1=await resolveProfileTarget(_0x12c474);if(_0x3139e1['kind']===_0x5f7693[_0x53f085(0x107)]){resetProfileOverrides(_0x5f7693[_0x53f085(0x116)](getProjectPath),_0x12c474),console[_0x53f085(0x121)]('Cleared\x20local\x20overrides\x20for\x20\x22'+_0x12c474+'\x22');return;}console[_0x53f085(0x121)]('\x22'+_0x12c474+_0x53f085(0x11b)+_0x12c474+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
@@ -0,0 +1 @@
1
+ (function(_0x55bf30,_0x3d027d){const _0x2c28ab=_0x3927,_0x25b0ab=_0x55bf30();while(!![]){try{const _0x2c5a18=parseInt(_0x2c28ab(0x1d2))/0x1*(-parseInt(_0x2c28ab(0x1d5))/0x2)+parseInt(_0x2c28ab(0x1e5))/0x3+parseInt(_0x2c28ab(0x1d1))/0x4*(-parseInt(_0x2c28ab(0x1e4))/0x5)+-parseInt(_0x2c28ab(0x1d4))/0x6*(parseInt(_0x2c28ab(0x1db))/0x7)+parseInt(_0x2c28ab(0x1da))/0x8+-parseInt(_0x2c28ab(0x1d7))/0x9+parseInt(_0x2c28ab(0x1d9))/0xa;if(_0x2c5a18===_0x3d027d)break;else _0x25b0ab['push'](_0x25b0ab['shift']());}catch(_0x396274){_0x25b0ab['push'](_0x25b0ab['shift']());}}}(_0x41c2,0xea76d));import _0x5e1d5c from'inquirer';import{deleteCloudProfile,fetchCloudProfile}from'./utils/cloudProfile.js';import{isInteractive}from'./utils/cloudProfileSession.js';function _0x41c2(){const _0x1bd83c=['12027104lAxfum','686agywmQ','\x0aWarning:\x20this\x20deletes\x20the\x20shared\x20cloud\x20profile\x20\x22','Profile\x20deletion\x20cancelled:\x20confirmation\x20did\x20not\x20match.','\x22\x20not\x20found.','cwd','WqKLy','yes','Profile\x20deletion\x20requires\x20an\x20interactive\x20terminal\x20so\x20the\x20profile\x20name\x20can\x20be\x20typed\x20for\x20confirmation.\x20Pass\x20--yes\x20to\x20skip\x20confirmation.','QTUZO','379565YeLOln','3877917SCeJsb','Type\x20\x22','12JsjaLz','102117aajJEI','input','28266mbokyU','24rycAIE','cQFNJ','3941055XimmdW','\x22\x20for\x20everyone\x20in\x20your\x20organization.','5170540SUHSbp'];_0x41c2=function(){return _0x1bd83c;};return _0x41c2();}import{clearLastProfile,resetProfileOverrides}from'./utils/projectsConfig.js';function _0x3927(_0x3c9aa9,_0x22415f){_0x3c9aa9=_0x3c9aa9-0x1d0;const _0x41c2b0=_0x41c2();let _0x3927d2=_0x41c2b0[_0x3c9aa9];return _0x3927d2;}export async function deleteProfile(_0x11f510,_0x4e19b5={}){const _0x419161=_0x3927,_0x3a0078={'cQFNJ':function(_0x2b6794,_0x543aa9){return _0x2b6794(_0x543aa9);},'WqKLy':function(_0x18e7d2){return _0x18e7d2();},'QTUZO':_0x419161(0x1d3),'wVpaS':function(_0x55968e,_0x6420c6,_0x2a65ba){return _0x55968e(_0x6420c6,_0x2a65ba);}},_0x3b53f7=await _0x3a0078[_0x419161(0x1d6)](fetchCloudProfile,_0x11f510);if(!_0x3b53f7)throw new Error('Cloud\x20profile\x20\x22'+_0x11f510+_0x419161(0x1de));if(!_0x4e19b5[_0x419161(0x1e1)]&&!_0x3a0078[_0x419161(0x1e0)](isInteractive))throw new Error(_0x419161(0x1e2));console['log'](_0x419161(0x1dc)+_0x11f510+_0x419161(0x1d8));if(!_0x4e19b5[_0x419161(0x1e1)]){const {confirmation:_0x2cbe65}=await _0x5e1d5c['prompt']([{'type':_0x3a0078[_0x419161(0x1e3)],'name':'confirmation','message':_0x419161(0x1d0)+_0x11f510+'\x22\x20to\x20confirm\x20deletion:'}]);if(_0x2cbe65!==_0x11f510)throw new Error(_0x419161(0x1dd));}await deleteCloudProfile(_0x11f510),_0x3a0078['wVpaS'](resetProfileOverrides,process[_0x419161(0x1df)](),_0x11f510),clearLastProfile(process['cwd'](),_0x11f510),console['log']('✓\x20Deleted\x20cloud\x20profile\x20\x22'+_0x11f510+'\x22.');}
@@ -1 +1 @@
1
- const _0x160dd0=_0x301f;function _0x35f2(){const _0x3741f6=['sort','isDirectory','\x0aProfiles:','yVxVg','2907110ucFZyb','2521068VmzZgn','7atzPwl','5295766KoljRN','5iKmWtd','249272UHkPNJ','push','local','settings.json','4922784LgvsFU','endsWith','\x20\x20\x20\x20\x20\x20Details:\x20','reports','8rsumQS','3732aflYWe','\x0a*\x20=\x20active\x20profile','sessions','48081bfNjAu','mTSQw','log','GvVZe','baseUrl','fUVdA','gXTZz','545667xwUQAF','includes','Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x0aNo\x20profiles\x20found.','ufuzx','4XVfQAc'];_0x35f2=function(){return _0x3741f6;};return _0x35f2();}(function(_0x2f433e,_0xdc93e2){const _0x37337e=_0x301f,_0x3f1f49=_0x2f433e();while(!![]){try{const _0x5d230d=-parseInt(_0x37337e(0x18f))/0x1*(parseInt(_0x37337e(0x192))/0x2)+-parseInt(_0x37337e(0x183))/0x3*(-parseInt(_0x37337e(0x188))/0x4)+-parseInt(_0x37337e(0x191))/0x5*(-parseInt(_0x37337e(0x18e))/0x6)+-parseInt(_0x37337e(0x190))/0x7+parseInt(_0x37337e(0x19a))/0x8*(parseInt(_0x37337e(0x196))/0x9)+-parseInt(_0x37337e(0x18d))/0xa+parseInt(_0x37337e(0x19e))/0xb*(parseInt(_0x37337e(0x19b))/0xc);if(_0x5d230d===_0xdc93e2)break;else _0x3f1f49['push'](_0x3f1f49['shift']());}catch(_0x3e96b5){_0x3f1f49['push'](_0x3f1f49['shift']());}}}(_0x35f2,0x8fbb3));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';const NON_ENV_DIRS=[_0x160dd0(0x19d),'bug-bashes',_0x160dd0(0x199),'local','ci'];function _0x301f(_0x52f0ff,_0x39e84b){_0x52f0ff=_0x52f0ff-0x182;const _0x35f29f=_0x35f2();let _0x301f5e=_0x35f29f[_0x52f0ff];return _0x301f5e;}export async function getEnvNames(){const _0x2c5423=_0x160dd0,_0x235624={'yVxVg':function(_0x1d7030,_0x38083a,_0x2a6d74){return _0x1d7030(_0x38083a,_0x2a6d74);},'fUVdA':'local','gXTZz':function(_0x107869,_0x2d9bd5){return _0x107869(_0x2d9bd5);},'mTSQw':function(_0x2ed62f,_0x22c6ee){return _0x2ed62f(_0x22c6ee);},'NGDEy':function(_0x462eef,_0x30b74f,_0x2d0bf2){return _0x462eef(_0x30b74f,_0x2d0bf2);},'GvVZe':function(_0x13e5b3,_0x3c96ba){return _0x13e5b3(_0x3c96ba);},'PfJti':function(_0x21b7c3,_0x4ff575){return _0x21b7c3(_0x4ff575);},'xyEtD':'legacy'},_0x2a5f8a=getRangerDir();if(!existsSync(_0x2a5f8a))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x237eb1=await readActiveProfileName(),_0x90e1d1=[],_0x85a408={},_0x14abed=_0x235624[_0x2c5423(0x18c)](join,_0x2a5f8a,_0x235624[_0x2c5423(0x1a3)]);if(existsSync(_0x14abed)){const _0x2efa2a=await _0x235624[_0x2c5423(0x182)](readdir,_0x14abed);for(const _0x3ce8b7 of _0x2efa2a){const _0x27fb2b=join(_0x14abed,_0x3ce8b7),_0x179298=await _0x235624[_0x2c5423(0x19f)](stat,_0x27fb2b);_0x179298['isDirectory']()&&(_0x90e1d1['push'](_0x3ce8b7),_0x85a408[_0x3ce8b7]=_0x235624[_0x2c5423(0x1a3)]);}}const _0x675a6a=_0x235624['NGDEy'](join,_0x2a5f8a,'ci');if(_0x235624[_0x2c5423(0x182)](existsSync,_0x675a6a)){const _0x297ea2=await _0x235624[_0x2c5423(0x1a1)](readdir,_0x675a6a);for(const _0x4cc119 of _0x297ea2){const _0x3cf11f=join(_0x675a6a,_0x4cc119),_0x5c1819=await _0x235624['PfJti'](stat,_0x3cf11f);_0x5c1819[_0x2c5423(0x18a)]()&&(_0x90e1d1[_0x2c5423(0x193)](_0x4cc119),_0x85a408[_0x4cc119]='ci');}}const _0x3dd3ac=await readdir(_0x2a5f8a);for(const _0x10266d of _0x3dd3ac){if(NON_ENV_DIRS[_0x2c5423(0x184)](_0x10266d))continue;if(_0x10266d['startsWith']('.'))continue;if(_0x10266d[_0x2c5423(0x197)]('.txt'))continue;const _0x4b17ba=join(_0x2a5f8a,_0x10266d),_0x34a941=await stat(_0x4b17ba);_0x34a941[_0x2c5423(0x18a)]()&&existsSync(join(_0x4b17ba,_0x2c5423(0x195)))&&(!_0x90e1d1['includes'](_0x10266d)&&(_0x90e1d1[_0x2c5423(0x193)](_0x10266d),_0x85a408[_0x10266d]=_0x235624['xyEtD']));}return{'envNames':_0x90e1d1,'activeEnv':_0x237eb1,'envTypes':_0x85a408};}export async function envList(){const _0x3d206f=_0x160dd0,_0x184933={'TlyTQ':function(_0x1dcd3f,_0x349a15){return _0x1dcd3f===_0x349a15;},'Pbqss':_0x3d206f(0x186),'cptmg':_0x3d206f(0x185),'ufuzx':_0x3d206f(0x18b),'KIJbm':function(_0x2c6d4b,_0x2a15fd){return _0x2c6d4b===_0x2a15fd;}},{envNames:_0x27d013,activeEnv:_0x3d6b2c,envTypes:_0x18d6ab}=await getEnvNames();if(_0x184933['TlyTQ'](_0x27d013['length'],0x0)){console['log'](_0x184933['Pbqss']),console[_0x3d206f(0x1a0)](_0x184933['cptmg']);return;}console[_0x3d206f(0x1a0)](_0x184933[_0x3d206f(0x187)]);for(const _0x514d17 of _0x27d013[_0x3d206f(0x189)]()){const _0x211527=_0x184933['TlyTQ'](_0x514d17,_0x3d6b2c),_0x2cac56=_0x18d6ab[_0x514d17]||_0x3d206f(0x194),_0x29157e=await loadSettings(_0x514d17),_0x36dcca=_0x184933['KIJbm'](_0x2cac56,'legacy')?'':'\x20['+_0x2cac56+']';console[_0x3d206f(0x1a0)]('\x20\x20'+(_0x211527?'*\x20':'\x20\x20')+_0x514d17+_0x36dcca),_0x29157e[_0x3d206f(0x1a2)]&&console[_0x3d206f(0x1a0)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x29157e[_0x3d206f(0x1a2)]),_0x29157e['environmentDetails']&&console[_0x3d206f(0x1a0)](_0x3d206f(0x198)+_0x29157e['environmentDetails']);}_0x3d6b2c&&console['log'](_0x3d206f(0x19c));}
1
+ const _0x24a807=_0x16ba;(function(_0x5684c1,_0x3a553b){const _0x3becbb=_0x16ba,_0x3dea15=_0x5684c1();while(!![]){try{const _0x3670cc=-parseInt(_0x3becbb(0xd3))/0x1+parseInt(_0x3becbb(0xe1))/0x2+-parseInt(_0x3becbb(0xd0))/0x3+-parseInt(_0x3becbb(0xd5))/0x4*(parseInt(_0x3becbb(0xd7))/0x5)+parseInt(_0x3becbb(0xe4))/0x6*(-parseInt(_0x3becbb(0xd8))/0x7)+parseInt(_0x3becbb(0xce))/0x8*(parseInt(_0x3becbb(0xe6))/0x9)+parseInt(_0x3becbb(0xdb))/0xa;if(_0x3670cc===_0x3a553b)break;else _0x3dea15['push'](_0x3dea15['shift']());}catch(_0x23aa84){_0x3dea15['push'](_0x3dea15['shift']());}}}(_0x28f0,0x25bba));import{readdir,stat}from'fs/promises';function _0x28f0(){const _0x5dd1fc=['push','cached\x20(updated\x20','sort','isDirectory','environmentKey','local','message','environmentDetails','map','LKAxc','414944wtfdAt','endsWith','539157PNvWqe','IJRoK','includes','207023HFsvyd','dOeIk','4VwUluH','name','323630hbxTsw','35MkGmfr','\x0aLocal\x20Profiles\x20(legacy):','\x20\x20\x20\x20\x20\x20Details:\x20','3897380WgHwoe','PQDso','log','\x20\x20\x20\x20\x20\x20Session:\x20','settings.json','sessions','254786dgqauD','\x0a*\x20=\x20active\x20profile','RwUTo','17814ijYaJv','no\x20session','18uQBumD'];_0x28f0=function(){return _0x5dd1fc;};return _0x28f0();}function _0x16ba(_0x30c290,_0x6a532a){_0x30c290=_0x30c290-0xcb;const _0x28f0a2=_0x28f0();let _0x16bab4=_0x28f0a2[_0x30c290];return _0x16bab4;}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{getToken}from'./utils/keychain.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x24a807(0xe0),'bug-bashes','reports',_0x24a807(0xec),'ci'];export async function getEnvNames(){const _0x574d37=_0x24a807,_0x3ab58d={'dOeIk':function(_0x3dc176){return _0x3dc176();},'fOtDE':function(_0x505cd9,_0x2b0b99){return _0x505cd9(_0x2b0b99);},'RwUTo':function(_0x95d8b,_0x553208){return _0x95d8b(_0x553208);},'rsDGd':'local','LKAxc':function(_0x1132f4,_0x303539,_0x520e89){return _0x1132f4(_0x303539,_0x520e89);},'rsXtP':function(_0x54aaf7,_0x25f45b,_0x142f9e){return _0x54aaf7(_0x25f45b,_0x142f9e);},'IJRoK':'.txt','fCUSh':_0x574d37(0xdf)},_0x3fdc5e=_0x3ab58d[_0x574d37(0xd4)](getRangerDir);if(!existsSync(_0x3fdc5e))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3871fd=await readActiveProfileName(),_0x5efc1f=[],_0x228292={},_0x41753a=join(_0x3fdc5e,'local');if(_0x3ab58d['fOtDE'](existsSync,_0x41753a)){const _0x4a83fa=await _0x3ab58d[_0x574d37(0xe3)](readdir,_0x41753a);for(const _0x5bb4c9 of _0x4a83fa){const _0x18a90f=join(_0x41753a,_0x5bb4c9),_0x5201bf=await _0x3ab58d[_0x574d37(0xe3)](stat,_0x18a90f);_0x5201bf[_0x574d37(0xea)]()&&(_0x5efc1f['push'](_0x5bb4c9),_0x228292[_0x5bb4c9]=_0x3ab58d['rsDGd']);}}const _0x26a68b=_0x3ab58d[_0x574d37(0xcd)](join,_0x3fdc5e,'ci');if(existsSync(_0x26a68b)){const _0x11395a=await _0x3ab58d['fOtDE'](readdir,_0x26a68b);for(const _0x3a002b of _0x11395a){const _0x17b46e=_0x3ab58d['rsXtP'](join,_0x26a68b,_0x3a002b),_0x4395f3=await stat(_0x17b46e);_0x4395f3[_0x574d37(0xea)]()&&(_0x5efc1f[_0x574d37(0xe7)](_0x3a002b),_0x228292[_0x3a002b]='ci');}}const _0x3266bc=await readdir(_0x3fdc5e);for(const _0xa880e of _0x3266bc){if(NON_ENV_DIRS[_0x574d37(0xd2)](_0xa880e))continue;if(_0xa880e['startsWith']('.'))continue;if(_0xa880e[_0x574d37(0xcf)](_0x3ab58d[_0x574d37(0xd1)]))continue;const _0x2035a5=join(_0x3fdc5e,_0xa880e),_0x2faae=await _0x3ab58d[_0x574d37(0xe3)](stat,_0x2035a5);_0x2faae[_0x574d37(0xea)]()&&existsSync(_0x3ab58d['rsXtP'](join,_0x2035a5,_0x3ab58d['fCUSh']))&&(!_0x5efc1f['includes'](_0xa880e)&&(_0x5efc1f['push'](_0xa880e),_0x228292[_0xa880e]='legacy'));}return{'envNames':_0x5efc1f,'activeEnv':_0x3871fd,'envTypes':_0x228292};}export async function envList(){const _0x1c7cd8=_0x24a807,_0x6728a1={'PQDso':function(_0x57e173){return _0x57e173();},'suyhP':function(_0xa803be,_0xe11903){return _0xa803be(_0xe11903);},'rlGyi':_0x1c7cd8(0xd9),'DDYRU':function(_0x553f9e,_0x180022){return _0x553f9e===_0x180022;},'KwokL':'legacy','lWAfU':function(_0x254a81,_0x52a48e){return _0x254a81>_0x52a48e;}},{envNames:_0x3c7b33,activeEnv:_0x1a4019,envTypes:_0x11c55a}=await _0x6728a1[_0x1c7cd8(0xdc)](getEnvNames);let _0x2c0d19=[];const _0x236f4f=await _0x6728a1[_0x1c7cd8(0xdc)](getToken);if(_0x236f4f)try{_0x2c0d19=await _0x6728a1['PQDso'](listCloudProfiles);}catch(_0x57fc73){console['error']('\x0aWarning:\x20could\x20not\x20fetch\x20cloud\x20profiles:\x20'+(_0x57fc73 instanceof Error?_0x57fc73[_0x1c7cd8(0xed)]:_0x6728a1['suyhP'](String,_0x57fc73)));}if(_0x3c7b33['length']===0x0&&_0x2c0d19['length']===0x0){console['log']('\x0aNo\x20profiles\x20found.'),console[_0x1c7cd8(0xdd)]('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x1dff71=new Set(_0x2c0d19[_0x1c7cd8(0xcc)](_0x49b928=>_0x49b928['name']));if(_0x3c7b33['length']>0x0){console['log'](_0x6728a1['rlGyi']);for(const _0x54b7fe of _0x3c7b33[_0x1c7cd8(0xe9)]()){const _0x177c87=_0x6728a1['DDYRU'](_0x54b7fe,_0x1a4019)&&!_0x1dff71['has'](_0x54b7fe),_0x55019c=_0x11c55a[_0x54b7fe]||'local',_0x1fb08a=await loadSettings(_0x54b7fe),_0x4fb732=_0x55019c===_0x6728a1['KwokL']?'':'\x20['+_0x55019c+']';console['log']('\x20\x20'+(_0x177c87?'*\x20':'\x20\x20')+_0x54b7fe+_0x4fb732),_0x1fb08a['baseUrl']&&console[_0x1c7cd8(0xdd)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x1fb08a['baseUrl']),_0x1fb08a[_0x1c7cd8(0xcb)]&&console[_0x1c7cd8(0xdd)](_0x1c7cd8(0xda)+_0x1fb08a['environmentDetails']);}}if(_0x6728a1['lWAfU'](_0x2c0d19['length'],0x0)){console[_0x1c7cd8(0xdd)]('\x0aCloud\x20Profiles:');for(const _0x593611 of _0x2c0d19[_0x1c7cd8(0xe9)]((_0x14b054,_0x1a3fce)=>_0x14b054['name']['localeCompare'](_0x1a3fce[_0x1c7cd8(0xd6)]))){const _0x5df93f=_0x593611[_0x1c7cd8(0xd6)]===_0x1a4019,_0x1561d9=_0x593611[_0x1c7cd8(0xeb)]?'\x20('+_0x593611['environmentKey']+')':'',_0x4f75fd=_0x593611['sessionUpdatedAt']?_0x1c7cd8(0xe8)+_0x593611['sessionUpdatedAt']+')':_0x1c7cd8(0xe5);console['log']('\x20\x20'+(_0x5df93f?'*\x20':'\x20\x20')+_0x593611[_0x1c7cd8(0xd6)]+'\x20[cloud]'+_0x1561d9),console['log'](_0x1c7cd8(0xde)+_0x4f75fd);}}_0x1a4019&&console['log'](_0x1c7cd8(0xe2));}
@@ -1 +1 @@
1
- const _0x5ccc84=_0x4e5e;(function(_0x1d7d6a,_0x2876a6){const _0x34c9e0=_0x4e5e,_0x3f6a49=_0x1d7d6a();while(!![]){try{const _0x138357=-parseInt(_0x34c9e0(0xa4))/0x1+parseInt(_0x34c9e0(0x107))/0x2*(parseInt(_0x34c9e0(0xc3))/0x3)+parseInt(_0x34c9e0(0xed))/0x4+-parseInt(_0x34c9e0(0x111))/0x5*(parseInt(_0x34c9e0(0x11e))/0x6)+-parseInt(_0x34c9e0(0x115))/0x7*(-parseInt(_0x34c9e0(0x106))/0x8)+-parseInt(_0x34c9e0(0x130))/0x9+parseInt(_0x34c9e0(0x131))/0xa;if(_0x138357===_0x2876a6)break;else _0x3f6a49['push'](_0x3f6a49['shift']());}catch(_0x93185c){_0x3f6a49['push'](_0x3f6a49['shift']());}}}(_0x3995,0x3325a));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x3c4e02 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';const ACTIVE_FEATURE_FILE=_0x5ccc84(0x141),bold=_0x8e1747=>_0x5ccc84(0xad)+_0x8e1747+_0x5ccc84(0xc4);function getGitRepoUrl(){const _0x6baccf=_0x5ccc84,_0x1525f8={'NClhD':'pipe'};try{const _0x3bbd4b=execSync(_0x6baccf(0xb8),{'encoding':_0x6baccf(0xc1),'stdio':[_0x6baccf(0xd1),_0x1525f8['NClhD'],_0x1525f8[_0x6baccf(0xcf)]]})[_0x6baccf(0x15c)]();return _0x3bbd4b['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,'github.com/')['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x45efff=_0x5ccc84,_0x309fdc={'FMsmm':function(_0x38fd20,_0x41e9d7,_0x88a6db){return _0x38fd20(_0x41e9d7,_0x88a6db);},'rNQNG':'pipe'};try{return _0x309fdc['FMsmm'](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x45efff(0xc1),'stdio':[_0x309fdc[_0x45efff(0x160)],_0x309fdc[_0x45efff(0x160)],_0x309fdc['rNQNG']]})[_0x45efff(0x15c)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x434b6d=_0x5ccc84,_0x252ec2={'JqdmV':function(_0x1284c1,_0x54620e,_0x59a17b){return _0x1284c1(_0x54620e,_0x59a17b);},'Zbtjl':function(_0xefe4c9){return _0xefe4c9();},'HklAG':function(_0x2b91ed,_0x51991c,_0x21c5b7){return _0x2b91ed(_0x51991c,_0x21c5b7);},'yluAJ':_0x434b6d(0xc1)},_0x356ade=_0x252ec2[_0x434b6d(0x78)](join,_0x252ec2['Zbtjl'](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x356ade))return null;try{const _0x1e4ac3=await _0x252ec2[_0x434b6d(0xe6)](readFile,_0x356ade,_0x252ec2[_0x434b6d(0x149)]);return _0x1e4ac3['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x560a40){const _0x3d311f=_0x5ccc84,_0x576da9={'MumEu':function(_0x45283b){return _0x45283b();},'TjRlp':function(_0x3638e1,_0x53ba20,_0x25344d){return _0x3638e1(_0x53ba20,_0x25344d);},'fkphW':function(_0x278668,_0x2fd36e){return _0x278668(_0x2fd36e);}},_0x149510=_0x576da9[_0x3d311f(0x15d)](getRangerDir),_0x294c64=_0x576da9['TjRlp'](join,_0x149510,ACTIVE_FEATURE_FILE);!_0x576da9[_0x3d311f(0xd4)](existsSync,_0x149510)&&await mkdir(_0x149510,{'recursive':!![]}),await writeFile(_0x294c64,_0x560a40,'utf-8');}function _0x4e5e(_0x5aa5dc,_0x3741f7){_0x5aa5dc=_0x5aa5dc-0x70;const _0x399529=_0x3995();let _0x4e5e09=_0x399529[_0x5aa5dc];return _0x4e5e09;}function getProgressDisplay(_0x16008f){const _0x43518d=_0x5ccc84,_0x28deee={'etBsP':function(_0x1ad7a5,_0x3463ce){return _0x1ad7a5+_0x3463ce;},'rBLKm':function(_0x5b4c47,_0x4623e7){return _0x5b4c47===_0x4623e7;},'EpqYs':function(_0x1d95b0,_0x218ac8){return _0x1d95b0*_0x218ac8;},'FqFpC':function(_0x46a5a9,_0x482ff3){return _0x46a5a9+_0x482ff3;},'gVrUJ':function(_0x639b7c,_0x2564d1){return _0x639b7c>_0x2564d1;},'wtCFm':function(_0x26a423,_0x335928){return _0x26a423>_0x335928;},'VVSip':function(_0x3d36f0,_0x4c9f90){return _0x3d36f0>_0x4c9f90;}},_0x47c324=_0x16008f['verifiedItems']||0x0,_0x538b3f=_0x16008f[_0x43518d(0x136)]||0x0,_0x56ced2=_0x16008f['blockedItems']||0x0,_0x551f6a=_0x16008f[_0x43518d(0xbf)]||0x0,_0x994d7d=_0x16008f['pendingItems']||0x0,_0x3c627f=_0x28deee[_0x43518d(0x9e)](_0x28deee['etBsP'](_0x28deee[_0x43518d(0x9e)](_0x47c324+_0x538b3f,_0x56ced2),_0x551f6a),_0x994d7d);if(_0x28deee[_0x43518d(0xfd)](_0x3c627f,0x0))return'-';const _0x4f5b0f=0xa,_0x3f9109=Math['round'](_0x28deee['EpqYs'](_0x47c324/_0x3c627f,_0x4f5b0f)),_0x305dc4=_0x28deee['FqFpC']('█'[_0x43518d(0x152)](_0x3f9109),'░'[_0x43518d(0x152)](_0x4f5b0f-_0x3f9109)),_0x5a4cc0=[];if(_0x28deee['gVrUJ'](_0x56ced2,0x0))_0x5a4cc0['push'](_0x56ced2+_0x43518d(0x145));if(_0x28deee['wtCFm'](_0x551f6a,0x0))_0x5a4cc0['push'](_0x551f6a+_0x43518d(0xae));if(_0x28deee['VVSip'](_0x538b3f,0x0))_0x5a4cc0[_0x43518d(0x12a)](_0x538b3f+'\x20in\x20progress');const _0x3ae0f5=_0x28deee['gVrUJ'](_0x5a4cc0['length'],0x0)?'\x20('+_0x5a4cc0['join'](',\x20')+')':'';return _0x305dc4+'\x20'+_0x47c324+'/'+_0x3c627f+'\x20verified'+_0x3ae0f5;}function getCurrentSessionItems(_0xb226b3,_0x286f85){const _0x442363=_0x5ccc84;if(!_0xb226b3[_0x442363(0x144)])return _0x286f85['filter'](_0x22840e=>!_0x22840e['sessionId']);return _0x286f85['filter'](_0x28fb69=>_0x28fb69[_0x442363(0x119)]===_0xb226b3['currentSessionId']||!_0x28fb69[_0x442363(0x119)]);}function displayFeature(_0x2bb8de,_0xc469da){const _0xc67079=_0x5ccc84,_0x2d79b2={'EYSur':function(_0x35788a,_0x2a721b){return _0x35788a(_0x2a721b);},'huLLw':'\x0a\x20\x20\x20Scenarios:','mwZhW':_0xc67079(0xf9),'Oltgt':function(_0x275f4b,_0x155f94){return _0x275f4b===_0x155f94;},'iDfbZ':'verified','OJdTq':'incomplete','gFyPs':'verification_in_progress','UTXmJ':function(_0x26db8a,_0x3f1ed1){return _0x26db8a!==_0x3f1ed1;},'tavCr':_0xc67079(0xbe),'OOEuN':function(_0x287e6d,_0x5d6cba){return _0x287e6d===_0x5d6cba;},'tlqaR':function(_0x27f20b,_0x459b07){return _0x27f20b===_0x459b07;},'WHuqk':'approved'};console['log']('\x0a'+_0x2bb8de[_0xc67079(0x162)]+'\x20('+_0x2bb8de[_0xc67079(0xd0)]+')');_0x2bb8de[_0xc67079(0xb2)]&&console[_0xc67079(0x153)]('\x20\x20\x20Progress:\x20'+_0x2d79b2[_0xc67079(0x12e)](getProgressDisplay,_0x2bb8de['stats']));_0x2bb8de[_0xc67079(0xbc)]&&console['log'](_0xc67079(0xbb)+_0x2bb8de['description']);_0x2bb8de['gitRepoUrl']&&console['log'](_0xc67079(0x13e)+_0x2bb8de['gitRepoUrl']);_0x2bb8de['gitBranch']&&console['log']('\x20\x20\x20Branch:\x20'+_0x2bb8de['gitBranch']);console[_0xc67079(0x153)](_0xc67079(0xab)+new Date(_0x2bb8de[_0xc67079(0xe3)])[_0xc67079(0xac)]());_0x2bb8de[_0xc67079(0x74)]&&console[_0xc67079(0x153)]('\x20\x20\x20Completed:\x20'+new Date(_0x2bb8de[_0xc67079(0x74)])['toLocaleString']());if(_0xc469da&&_0xc469da['length']>0x0){console[_0xc67079(0x153)](_0x2d79b2[_0xc67079(0x87)]);for(let _0x35c828=0x0;_0x35c828<_0xc469da['length'];_0x35c828++){const _0x179125=_0xc469da[_0x35c828];let _0x5a62ae;if(_0x179125['status']===_0x2d79b2[_0xc67079(0x14e)]&&_0x2d79b2['Oltgt'](_0x179125['terminalReason'],'approved'))_0x5a62ae='✅';else{if(_0x179125['status']===_0x2d79b2[_0xc67079(0x150)])_0x5a62ae='🟢';else{if(_0x179125[_0xc67079(0xc5)]===_0x2d79b2['OJdTq'])_0x5a62ae='🟠';else{if(_0x179125['status']===_0xc67079(0xd5))_0x5a62ae='🛑';else{if(_0x179125[_0xc67079(0xc5)]===_0x2d79b2[_0xc67079(0x14e)])_0x5a62ae='⛔';else _0x179125[_0xc67079(0xc5)]===_0x2d79b2[_0xc67079(0x13b)]?_0x5a62ae='⏳':_0x5a62ae='⬜';}}}}const _0x4a2e49=_0x179125[_0xc67079(0x148)]>0x1?_0xc67079(0xf0)+_0x179125['version']+')':'',_0x15b35c=_0x179125[_0xc67079(0x148)]>0x1&&_0x179125['parentItemId']&&_0x2d79b2[_0xc67079(0xaa)](_0x179125['status'],'closed')&&_0x179125[_0xc67079(0xc5)]!==_0xc67079(0xe4)?_0x2d79b2['tavCr']:'';console['log']('\x20\x20\x20'+(_0x35c828+0x1)+'.\x20'+_0x5a62ae+'\x20'+_0x179125[_0xc67079(0xbc)]+_0x4a2e49+_0x15b35c);_0x2d79b2['OOEuN'](_0x179125['status'],_0xc67079(0xd5))&&_0x179125['blockedReason']&&console[_0xc67079(0x153)]('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x179125['blockedReason']);_0x2d79b2['tlqaR'](_0x179125['status'],_0x2d79b2['OJdTq'])&&_0x179125[_0xc67079(0xc9)]&&console['log'](_0xc67079(0x125)+_0x179125['incompleteReason']);if(_0x2d79b2['Oltgt'](_0x179125['status'],'closed')&&_0x2d79b2['tlqaR'](_0x179125['terminalReason'],_0x2d79b2['WHuqk']))console['log']('\x20\x20\x20\x20\x20\x20Approved');else _0x179125[_0xc67079(0xc5)]===_0x2d79b2['mwZhW']&&_0x179125[_0xc67079(0xca)]&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x179125['canceledReason']);}}}export async function featureCreate(_0x17f7de,_0x83acc9){const _0x39c171=_0x5ccc84,_0x1b9f0e={'NdRZT':function(_0x5356b6){return _0x5356b6();},'Nipcs':function(_0xab9b4b,_0xb4dcc6){return _0xab9b4b(_0xb4dcc6);},'jEmof':function(_0x33558b){return _0x33558b();},'rOliH':'\x0aCreating\x20feature\x20review...','GFONK':function(_0x106eac,_0x3c8cbf){return _0x106eac(_0x3c8cbf);},'IAeYE':function(_0x1f3098,_0x272ab7,_0x121831){return _0x1f3098(_0x272ab7,_0x121831);}},{envNames:_0x4abff2}=await _0x1b9f0e[_0x39c171(0xdd)](getEnvNames);_0x4abff2['length']===0x0&&console[_0x39c171(0xb5)]('\x0a'+_0x1b9f0e['Nipcs'](formatProfileRequiredMessage,_0x59c7f1=>bold(_0x59c7f1)));const _0x1f1b2e=_0x83acc9[_0x39c171(0x92)]?_0x83acc9[_0x39c171(0x92)][_0x39c171(0xf2)](_0x1cc694=>_0x1cc694['trim']()):[],_0x3f7ab9=getGitRepoUrl(),_0xe42535=_0x1b9f0e[_0x39c171(0xf1)](getGitBranch);console[_0x39c171(0x153)](_0x1b9f0e[_0x39c171(0x12b)]);const _0x43a28b=await _0x1b9f0e[_0x39c171(0x8c)](createFeature,{'name':_0x17f7de,'description':_0x83acc9['description'],'checklist':_0x1f1b2e,'gitRepoUrl':_0x3f7ab9,'gitBranch':_0xe42535});await setActiveFeatureId(_0x43a28b['id']),await tryStartCurrentSession(_0x43a28b['id']);const _0x1f3972=process['env']['CLAUDE_SESSION_ID'];_0x1f3972&&_0x1b9f0e[_0x39c171(0xd6)](registerSession,_0x1f3972,_0x43a28b['id']),console[_0x39c171(0x153)](_0x39c171(0x81)+_0x43a28b['id']),_0x1b9f0e[_0x39c171(0xd6)](displayFeature,_0x43a28b,_0x43a28b[_0x39c171(0x117)]),console['log'](_0x39c171(0xee));}export async function featureList(_0x48c49e){const _0x337a5b=_0x5ccc84,_0x1600ee={'JkRKO':function(_0xfee8f4,_0x3b5047){return _0xfee8f4===_0x3b5047;},'WIDMl':function(_0x1af9f1,_0x64ec41){return _0x1af9f1(_0x64ec41);},'QpAEB':function(_0x4bd541,_0x5d3372){return _0x4bd541+_0x5d3372;},'IRRVg':function(_0x19c787,_0x164349){return _0x19c787<_0x164349;},'VtuTa':function(_0x437e4b,_0x166ee9){return _0x437e4b!==_0x166ee9;},'Dfzdx':'\x20--current-branch'},_0x26b3ea={'limit':_0x48c49e['limit']??0xa,'offset':_0x48c49e[_0x337a5b(0xa0)]??0x0,'includeDeleted':_0x48c49e['includeDeleted']};_0x48c49e['currentBranch']&&(_0x26b3ea['gitRepoUrl']=getGitRepoUrl(),_0x26b3ea['gitBranch']=getGitBranch());const _0x2c569a=await listFeatures(_0x26b3ea);if(_0x1600ee[_0x337a5b(0xcc)](_0x2c569a['items']['length'],0x0)){console[_0x337a5b(0x153)]('\x0aNo\x20feature\x20reviews\x20found.');return;}const _0x4c73ed=_0x2c569a[_0x337a5b(0x94)]>_0x2c569a[_0x337a5b(0x158)]['length']?_0x337a5b(0x11c)+_0x2c569a[_0x337a5b(0x158)]['length']+'\x20of\x20'+_0x2c569a[_0x337a5b(0x94)]:_0x2c569a[_0x337a5b(0x94)]+_0x337a5b(0x11f);console['log']('\x0a'+_0x4c73ed+':\x0a');for(const _0x338180 of _0x2c569a[_0x337a5b(0x158)]){const _0x304ba3=_0x337a5b(0x12c)['split']('|');let _0x2c194b=0x0;while(!![]){switch(_0x304ba3[_0x2c194b++]){case'0':_0x338180[_0x337a5b(0x151)]&&console['log']('\x20\x20\x20Branch:\x20'+_0x338180[_0x337a5b(0x151)]);continue;case'1':console[_0x337a5b(0x153)]('\x20\x20\x20Created:\x20'+new Date(_0x338180[_0x337a5b(0xe3)])[_0x337a5b(0xbd)]());continue;case'2':console[_0x337a5b(0x153)](''+_0x338180['name']);continue;case'3':console[_0x337a5b(0x153)](_0x337a5b(0x11b)+_0x338180['id']);continue;case'4':_0x338180['stats']&&console[_0x337a5b(0x153)](_0x337a5b(0x139)+_0x1600ee['WIDMl'](getProgressDisplay,_0x338180['stats']));continue;case'5':console[_0x337a5b(0x153)]('');continue;}break;}}const _0x58fdb9=_0x26b3ea[_0x337a5b(0x102)]??0xa,_0x336adb=_0x1600ee[_0x337a5b(0x15b)](_0x26b3ea[_0x337a5b(0xa0)]??0x0,_0x2c569a[_0x337a5b(0x158)]['length']);if(_0x1600ee[_0x337a5b(0xe7)](_0x336adb,_0x2c569a['totalCount'])){const _0x4099fb=_0x1600ee[_0x337a5b(0x13f)](_0x58fdb9,0xa)?'\x20--limit\x20'+_0x58fdb9:'',_0x1e0dd4=_0x48c49e[_0x337a5b(0xdf)]?_0x1600ee['Dfzdx']:'',_0x5dee40=_0x48c49e['includeDeleted']?_0x337a5b(0x135):'';console['log']('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x336adb+_0x4099fb+_0x1e0dd4+_0x5dee40);}}export async function featureShow(_0x2fd802){const _0x5668ef=_0x5ccc84,_0x15ef57={'pZXQW':function(_0x17a768){return _0x17a768();}},_0x42f53d=_0x2fd802||await _0x15ef57[_0x5668ef(0xda)](getActiveFeatureId);if(!_0x42f53d)throw new Error(_0x5668ef(0x96));const _0x2c5a18=await getFeature(_0x42f53d);displayFeature(_0x2c5a18,_0x2c5a18[_0x5668ef(0x117)]);}export async function featureResume(_0x424312){const _0x2bdccf=_0x5ccc84,_0x3c0fcd={'mYimd':function(_0x51c417,_0x1d05dc){return _0x51c417(_0x1d05dc);},'DiEAN':function(_0x9d503b,_0xa9825f){return _0x9d503b(_0xa9825f);},'amsXT':function(_0x140a44){return _0x140a44();},'NGDlL':function(_0x27fc26,_0x50207f){return _0x27fc26!==_0x50207f;},'NWtbA':function(_0x5544da,_0x17590d,_0x2fb711){return _0x5544da(_0x17590d,_0x2fb711);},'lGiaF':function(_0x322d31,_0xbd2d81,_0x1b1965){return _0x322d31(_0xbd2d81,_0x1b1965);},'cUPWM':function(_0x243d86,_0x2b9c81){return _0x243d86(_0x2b9c81);},'ulTLn':function(_0x2a6065){return _0x2a6065();},'NiEaY':_0x2bdccf(0x126),'YeapK':_0x2bdccf(0x82),'tWxHg':function(_0x322986,_0x2ec4aa){return _0x322986(_0x2ec4aa);},'VYNLT':_0x2bdccf(0x146),'YaEHY':_0x2bdccf(0xb9),'iykzt':_0x2bdccf(0xb6)};if(_0x424312){const _0x8da21d=await _0x3c0fcd['mYimd'](getFeature,_0x424312);await _0x3c0fcd[_0x2bdccf(0x7d)](setActiveFeatureId,_0x8da21d['id']);const _0x18e754=_0x3c0fcd[_0x2bdccf(0x85)](getGitBranch);_0x18e754&&_0x3c0fcd[_0x2bdccf(0x7a)](_0x18e754,_0x8da21d[_0x2bdccf(0x151)])&&(await _0x3c0fcd['NWtbA'](updateFeature,_0x8da21d['id'],{'gitBranch':_0x18e754}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x18e754));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x8da21d[_0x2bdccf(0x162)]+'\x20('+_0x8da21d['id']+')'),await _0x3c0fcd[_0x2bdccf(0x8f)](tryStartCurrentSession,_0x8da21d['id']);const _0x522192=process['env'][_0x2bdccf(0xa3)];_0x522192&&_0x3c0fcd['lGiaF'](registerSession,_0x522192,_0x8da21d['id']);_0x3c0fcd['NWtbA'](displayFeature,_0x8da21d,_0x8da21d[_0x2bdccf(0x117)]),await _0x3c0fcd[_0x2bdccf(0x14c)](printFeedbackNudge,_0x8da21d['id']);return;}const _0x462396=_0x3c0fcd['ulTLn'](getGitRepoUrl),_0x22906b=getGitBranch();if(!_0x462396&&!_0x22906b)throw new Error(_0x3c0fcd['NiEaY']);console['log'](_0x2bdccf(0xf6)+(_0x462396||_0x3c0fcd[_0x2bdccf(0xa9)])+'\x20/\x20'+(_0x22906b||_0x3c0fcd[_0x2bdccf(0xa9)])+_0x2bdccf(0xfa));const _0x4bcea2=await _0x3c0fcd[_0x2bdccf(0x80)](listFeatures,{'gitRepoUrl':_0x462396,'gitBranch':_0x22906b}),_0x172afb=_0x4bcea2['items'][_0x2bdccf(0x134)](_0x52b0a8=>_0x52b0a8['status']?_0x52b0a8['status']!=='verified':!_0x52b0a8['completedAt']);if(_0x172afb[_0x2bdccf(0xd2)]===0x0){console['log'](_0x3c0fcd['VYNLT']),console[_0x2bdccf(0x153)](_0x2bdccf(0xd7));return;}let _0x4b91ec;if(_0x172afb[_0x2bdccf(0xd2)]===0x1)_0x4b91ec=_0x172afb[0x0];else{const _0xb43e29=process[_0x2bdccf(0xb7)][_0x2bdccf(0x159)]&&process[_0x2bdccf(0x10c)]['isTTY'];if(!_0xb43e29){console['log']('\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:');for(const _0x50a3a2 of _0x172afb){console['log']('\x20\x20'+_0x50a3a2['name']),console['log'](_0x2bdccf(0x8d)+_0x50a3a2['id']),_0x50a3a2['stats']&&console['log'](_0x2bdccf(0x7e)+getProgressDisplay(_0x50a3a2['stats'])),_0x50a3a2['gitBranch']&&console['log'](_0x2bdccf(0xdb)+_0x50a3a2[_0x2bdccf(0x151)]);}throw new Error(_0x3c0fcd['YaEHY']);}const {selected:_0x1e941d}=await _0x3c4e02['prompt']([{'type':_0x3c0fcd[_0x2bdccf(0x8b)],'name':'selected','message':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','choices':_0x172afb['map'](_0x281d3e=>({'name':_0x281d3e['name']+'\x20('+_0x281d3e['id']+')','value':_0x281d3e['id']}))}]);_0x4b91ec=_0x172afb[_0x2bdccf(0x73)](_0x55ba87=>_0x55ba87['id']===_0x1e941d);}await _0x3c0fcd[_0x2bdccf(0x8f)](setActiveFeatureId,_0x4b91ec['id']);_0x22906b&&_0x22906b!==_0x4b91ec['gitBranch']&&(await updateFeature(_0x4b91ec['id'],{'gitBranch':_0x22906b}),console[_0x2bdccf(0x153)](_0x2bdccf(0x13c)+_0x22906b));console['log'](_0x2bdccf(0xc8)+_0x4b91ec['name']+'\x20('+_0x4b91ec['id']+')'),await tryStartCurrentSession(_0x4b91ec['id']);const _0x16f497=await getFeature(_0x4b91ec['id']),_0x222365=process['env']['CLAUDE_SESSION_ID'];_0x222365&&_0x3c0fcd['lGiaF'](registerSession,_0x222365,_0x16f497['id']),_0x3c0fcd['lGiaF'](displayFeature,_0x16f497,_0x16f497[_0x2bdccf(0x117)]),await printFeedbackNudge(_0x16f497['id']);}async function printFeedbackNudge(_0x5d3f0d){const _0x1f393b=_0x5ccc84,_0x320a13={'PXecu':function(_0x2cec2e,_0x59257d){return _0x2cec2e(_0x59257d);},'iyXSl':function(_0x5449b5,_0x44991e,_0x3311fd){return _0x5449b5(_0x44991e,_0x3311fd);},'SpJft':function(_0x54fb2c,_0x4bd081){return _0x54fb2c>_0x4bd081;}};try{const {items:_0x423850}=await _0x320a13['PXecu'](getActionItems,_0x5d3f0d);let _0x416917=0x0,_0x387e1d=0x0;for(const _0x4f2a90 of _0x423850){const _0x2b3046=await _0x320a13['iyXSl'](getItemFeedback,_0x5d3f0d,_0x4f2a90['id']);_0x2b3046[_0x1f393b(0x123)][_0x1f393b(0xd2)]>0x0&&(_0x416917+=_0x2b3046[_0x1f393b(0x123)][_0x1f393b(0xd2)],_0x387e1d++);}_0x320a13['SpJft'](_0x416917,0x0)&&(console['log'](_0x1f393b(0xe1)+_0x416917+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x387e1d+'\x20scenario(s).'),console['log'](_0x1f393b(0xa5)));}catch{}}async function tryStartCurrentSession(_0x597215){const _0xd0d54f=_0x5ccc84,_0xf2fb32={'oJGcb':function(_0x837383,_0x42bdce){return _0x837383(_0x42bdce);},'cZIar':function(_0x389951,_0x385533,_0x56c185){return _0x389951(_0x385533,_0x56c185);}};try{const {sessions:_0x262fc3}=await _0xf2fb32[_0xd0d54f(0x91)](listFeatureSessions,_0x597215),_0x4ac39a=_0x262fc3['find'](_0x2a81ed=>_0x2a81ed['status']===_0xd0d54f(0xea));_0x4ac39a&&(await _0xf2fb32['cZIar'](startSession,_0x597215,_0x4ac39a['id']),console['log'](_0xd0d54f(0xe2)+_0x4ac39a['iteration']));}catch{}}export async function featureReport(_0x3e7f34,_0x55ed3c){const _0x188164=_0x5ccc84,_0x3c0cb4={'uHGVA':_0x188164(0x143),'CbZRT':'\x0aGenerating\x20report...','izJum':function(_0x1d7571,_0x373aa0,_0x5a46f6){return _0x1d7571(_0x373aa0,_0x5a46f6);},'nmLid':function(_0x1347ae,_0x4dfd48,_0x308bdb,_0x241927){return _0x1347ae(_0x4dfd48,_0x308bdb,_0x241927);},'dvueM':function(_0x5039d1){return _0x5039d1();},'SdPfZ':_0x188164(0x113),'KoawY':function(_0xefb94d,_0x1cb99b,_0x403ebe){return _0xefb94d(_0x1cb99b,_0x403ebe);},'TxAJO':function(_0x701db3,_0x172d6e){return _0x701db3(_0x172d6e);}},_0x583568=_0x3e7f34||await getActiveFeatureId();if(!_0x583568)throw new Error(_0x3c0cb4['uHGVA']);console[_0x188164(0x153)](_0x3c0cb4['CbZRT']);const _0x380d6f=await _0x3c0cb4['izJum'](getFeatureReportMarkdown,_0x583568,{'style':_0x55ed3c['style']}),_0x56decf=_0x55ed3c[_0x188164(0xa7)]||_0x3c0cb4[_0x188164(0x10f)](join,_0x3c0cb4['dvueM'](getRangerDir),_0x3c0cb4['SdPfZ'],_0x583568+'.md'),_0x5b3b4f=_0x3c0cb4[_0x188164(0x99)](join,_0x56decf,'..');!_0x3c0cb4['TxAJO'](existsSync,_0x5b3b4f)&&await mkdir(_0x5b3b4f,{'recursive':!![]}),await writeFile(_0x56decf,_0x380d6f,'utf-8'),console[_0x188164(0x153)](_0x188164(0x147)+_0x56decf);}function getScenarioResult(_0x41f5fc){const _0x3b901a=_0x5ccc84,_0x32d411={'AqFTv':function(_0x42877f,_0x620b96){return _0x42877f===_0x620b96;},'TwYzT':'closed','UTyhA':_0x3b901a(0x118),'FDcmr':_0x3b901a(0x105)};if(_0x32d411['AqFTv'](_0x41f5fc['status'],_0x3b901a(0xf9)))return _0x41f5fc[_0x3b901a(0xe0)]??_0x32d411[_0x3b901a(0x93)];if(_0x32d411[_0x3b901a(0x128)](_0x41f5fc[_0x3b901a(0xc5)],_0x32d411['UTyhA']))return _0x32d411[_0x3b901a(0xf3)];return _0x41f5fc['status'];}function _0x3995(){const _0xbd3780=['write','\x20\x20\x20Repository:\x20','VtuTa','split','active-feature.txt','toFixed','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','currentSessionId','\x20blocked','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','\x0a✅\x20Report\x20generated:\x20','version','yluAJ','rkwQs','assetType','cUPWM','.png','mwZhW','domRef','iDfbZ','gitBranch','repeat','log','completed','json','KBMmJ','qKGJf','items','isTTY','RkKML','QpAEB','trim','MumEu','feedback-images','No\x20active\x20session\x20for\x20this\x20feature\x20review.','rNQNG','INokR','name','\x0a✅\x20Session\x20is\x20already\x20completed.','screenshotUrls','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','YVcwW','comment_','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','find','completedAt','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','osfgm','NDEVP','JqdmV','OEFlN','NGDlL','\x0a❌\x20Invalid\x20scenario\x20index:\x20','get','DiEAN','\x20\x20\x20\x20\x20Progress:\x20','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','tWxHg','\x0a✅\x20Feature\x20review\x20created:\x20','any','ESRfl','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','amsXT','mKQTK','huLLw','XiCZY','GQEEx','IOpnE','iykzt','GFONK','\x20\x20\x20\x20\x20ID:\x20','VhvWX','mYimd',':\x20\x22','oJGcb','scenarios','TwYzT','totalCount','storage','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','replace','\x20\x20\x20\x20\x20📋\x20Selector:\x20','KoawY','all','\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20(','\x0a📋\x20Feedback\x20for:\x20','HsHGR','etBsP','\x0aConcluding\x20session...','offset','EZqYN','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','CLAUDE_SESSION_ID','379204eOGUmX','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','authorEmail','output','has','YeapK','UTXmJ','\x20\x20\x20Created:\x20','toLocaleString','\x1b[1m','\x20incomplete','stepName','/artifacts/','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','stats','\x0aAvailable\x20scenarios:','\x20—\x20','warn','list','stdin','git\x20remote\x20get-url\x20origin','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','\x20>\x20','\x20\x20\x20Description:\x20','description','toLocaleDateString','\x20[has\x20reviewer\x20feedback]','incompleteItems','\x20\x20\x20\x20','utf-8','join','6EtqDpe','\x1b[0m','status','short','jNbZg','\x0a✅\x20Resumed\x20feature\x20review:\x20','incompleteReason','canceledReason','OhteI','JkRKO','iteration','from','NClhD','dashboardUrl','pipe','length','timing','fkphW','blocked','IAeYE','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','vnYbT','/api/v1/mcp/browser-sessions/','pZXQW','\x20\x20\x20\x20\x20Branch:\x20','scenario','NdRZT','\x20\x20💬\x20','currentBranch','terminalReason','\x0a⚠️\x20\x20','\x20\x20\x20▶️\x20Started\x20session\x20','createdAt','verified','tMAti','HklAG','IRRVg','VcPhp','\x20scenarios.','ready','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','content','1319648MVVAUj','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','browserSessionId','\x20(v','jEmof','map','FDcmr','DqvKZ','notes','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20','error','\x20\x20✅\x20No\x20feedback\x20to\x20address','closed','...','pop','oPXQW','rBLKm','mlIda','wIkgM','Scenario\x20','selector','limit','latestReview','canonicalFlow','in_progress','16rgfQmu','20708HyPcsE','kemjN','location','spatial','No\x20sessions\x20found.','stdout','Unknown','BcIJh','nmLid','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','5hugfnL','element','reports','jsRvJ','1250851sJrxwE','AFbnw','checklistItems','verification_in_progress','sessionId','dorGk','\x20\x20\x20ID:\x20','Showing\x20','ynZaJ','1034730HbmtPL','\x20feature\x20review(s)\x20found','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','TvxPz','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','unaddressedComments','submittedAt','\x20\x20\x20\x20\x20\x20Incomplete:\x20','Not\x20in\x20a\x20git\x20repository.','textContent','AqFTv','slice','push','rOliH','2|3|4|0|1|5','screenshot','EYSur','RUIKM','2330415rBhLaG','3120860pwvbFO','Please\x20finish\x20your\x20review\x20first:','exit','filter','\x20--include-deleted','verificationInProgressItems','excludeScenarios','\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.','\x20\x20\x20Progress:\x20','blockedReason','gFyPs','\x20\x20\x20Updated\x20branch\x20to:\x20'];_0x3995=function(){return _0xbd3780;};return _0x3995();}function getScenarioRationale(_0x9dc01a,_0x143f36){const _0x24b301=_0x5ccc84,_0x4e4d1e='3|1|0|2|4|5'['split']('|');let _0x20c364=0x0;while(!![]){switch(_0x4e4d1e[_0x20c364++]){case'0':if(_0x9dc01a['incompleteReason'])return _0x9dc01a[_0x24b301(0xc9)];continue;case'1':if(_0x9dc01a[_0x24b301(0x13a)])return _0x9dc01a[_0x24b301(0x13a)];continue;case'2':if(_0x9dc01a[_0x24b301(0xca)])return _0x9dc01a[_0x24b301(0xca)];continue;case'3':if(_0x143f36)return _0x143f36;continue;case'4':if(_0x9dc01a[_0x24b301(0xf5)])return _0x9dc01a['notes'];continue;case'5':return null;}break;}}export async function featureReportPrDescription(_0x2701dd,_0x350dc9){const _0x5b1a0e=_0x5ccc84,_0x384d54={'NyElS':function(_0x20b643){return _0x20b643();},'HsHGR':function(_0x3c1bae,_0xbbfcab,_0x39a51b){return _0x3c1bae(_0xbbfcab,_0x39a51b);},'qKGJf':function(_0x5709da,_0x3dfce9){return _0x5709da===_0x3dfce9;},'TvxPz':function(_0x29a77c,_0x3780e3){return _0x29a77c>_0x3780e3;},'ESRfl':'\x0aAvailable\x20scenarios:','VZkxR':function(_0x1c0345,_0x22bdbb){return _0x1c0345<_0x22bdbb;}},_0x5ae0bf=_0x2701dd||await _0x384d54['NyElS'](getActiveFeatureId);if(!_0x5ae0bf)throw new Error(_0x5b1a0e(0x143));const _0x196d2d=await getFeature(_0x5ae0bf),_0x512bab=_0x196d2d[_0x5b1a0e(0x117)]||[],_0x25406f=_0x384d54[_0x5b1a0e(0x9d)](getCurrentSessionItems,_0x196d2d,_0x512bab);_0x384d54[_0x5b1a0e(0x157)](_0x25406f[_0x5b1a0e(0xd2)],0x0)&&(console[_0x5b1a0e(0xf7)]('\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.'),process['exit'](0x1));const _0x5edae7=_0x350dc9[_0x5b1a0e(0x137)]??[],_0x5abf6d=_0x5edae7[_0x5b1a0e(0x134)](_0x12b486=>!Number['isInteger'](_0x12b486)||_0x12b486<0x1||_0x12b486>_0x25406f[_0x5b1a0e(0xd2)]);if(_0x384d54[_0x5b1a0e(0x121)](_0x5abf6d['length'],0x0)){console['error'](_0x5b1a0e(0x165)+_0x5abf6d[_0x5b1a0e(0xc2)](',\x20')),console[_0x5b1a0e(0x153)](_0x384d54[_0x5b1a0e(0x83)]);for(let _0x92927b=0x0;_0x384d54['VZkxR'](_0x92927b,_0x25406f['length']);_0x92927b++){console['log']('\x20\x20'+(_0x92927b+0x1)+'.\x20'+_0x25406f[_0x92927b]['description']);}process['exit'](0x1);}const _0x379698=new Set(_0x5edae7['map'](_0x260332=>_0x260332-0x1)),_0x38538f=_0x25406f[_0x5b1a0e(0x134)]((_0x315196,_0x414838)=>!_0x379698[_0x5b1a0e(0xa8)](_0x414838));_0x384d54[_0x5b1a0e(0x157)](_0x38538f['length'],0x0)&&(console[_0x5b1a0e(0xf7)](_0x5b1a0e(0x72)),process[_0x5b1a0e(0x133)](0x1));if(_0x350dc9[_0x5b1a0e(0x155)])await outputJsonReport(_0x5ae0bf,_0x196d2d,_0x38538f);else{const _0x5d5d13=await _0x384d54[_0x5b1a0e(0x9d)](getFeatureReportMarkdown,_0x5ae0bf,{'itemIds':_0x38538f[_0x5b1a0e(0xf2)](_0x3e7578=>_0x3e7578['id'])});process[_0x5b1a0e(0x10c)][_0x5b1a0e(0x13d)](_0x5d5d13['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x1f2102,_0x3dcfc8,_0x2b291d){const _0x1eea6d=_0x5ccc84,_0x44763b={'Tuluw':function(_0x37b1ee,_0x5b27a3){return _0x37b1ee(_0x5b27a3);},'YFarC':function(_0x77a9a,_0x36a7f7){return _0x77a9a===_0x36a7f7;},'TvaQO':function(_0x273bcb,_0xc21b6f){return _0x273bcb(_0xc21b6f);}},_0x19f317=getApiBaseUrl(),_0x3bff3a=await _0x44763b['TvaQO'](getFeatureReport,_0x1f2102),_0x5db49a=new Map(_0x3bff3a[_0x1eea6d(0x117)][_0x1eea6d(0xf2)](_0x2ccbde=>[_0x2ccbde['id'],_0x2ccbde])),_0x1c9555=await Promise[_0x1eea6d(0x9a)](_0x2b291d['map'](async _0x395b12=>{const _0x2e4309=_0x1eea6d,_0x47774d=_0x5db49a[_0x2e4309(0x7c)](_0x395b12['id']),_0x1d8be2=_0x47774d?.['linkedSession']??null;let _0x57bce4=[];if(_0x395b12[_0x2e4309(0xef)])try{const {steps:_0x3eeba7}=await _0x44763b['Tuluw'](getBrowserSessionSteps,_0x395b12['browserSessionId']);_0x3eeba7[_0x2e4309(0xd2)]>0x0&&(_0x57bce4=_0x3eeba7['map'](_0x44913f=>{const _0x4e8c82=_0x2e4309,_0x8c3478=_0x44913f['assets'][_0x4e8c82(0x73)](_0x2852e7=>_0x2852e7[_0x4e8c82(0x14b)]===_0x4e8c82(0x12d)&&_0x2852e7[_0x4e8c82(0xd3)]==='after')??_0x44913f['assets']['find'](_0x343cd6=>_0x343cd6['assetType']==='screenshot');let _0x2a4e08=null,_0x2e1f78=null;if(_0x8c3478){const _0x194db1=_0x8c3478[_0x4e8c82(0x95)][_0x4e8c82(0x109)][_0x4e8c82(0x140)]('/')[_0x4e8c82(0xfb)]();_0x2a4e08=_0x19f317+_0x4e8c82(0xd9)+_0x395b12[_0x4e8c82(0xef)]+_0x4e8c82(0xb0)+_0x194db1,_0x194db1&&(_0x2e1f78=_0x194db1['replace'](/\.\w+$/,'')[_0x4e8c82(0x97)](/^(key_)?\d+_/,'')[_0x4e8c82(0x97)](/[-_]/g,'\x20'));}return{'description':_0x2e1f78||_0x44913f['description']||_0x44913f[_0x4e8c82(0xaf)]||'Step\x20'+_0x44913f['position'],'screenshot':_0x2a4e08,'is_key_step':_0x44913f['isKeyStep']};}));}catch{}return _0x44763b['YFarC'](_0x57bce4['length'],0x0)&&_0x1d8be2?.[_0x2e4309(0x164)]&&(_0x57bce4=_0x1d8be2[_0x2e4309(0x164)]['map']((_0xe892ee,_0x337ad5)=>({'description':'Screenshot\x20'+(_0x337ad5+0x1),'screenshot':_0xe892ee,'is_key_step':![]}))),{'description':_0x395b12['description'],'result':_0x44763b['Tuluw'](getScenarioResult,_0x395b12),'rationale':getScenarioRationale(_0x395b12,_0x1d8be2?.['agentResponse']),'steps':_0x57bce4};})),_0x774183={'url':_0x3dcfc8[_0x1eea6d(0xd0)],'scenarios':_0x1c9555};process['stdout'][_0x1eea6d(0x13d)](JSON['stringify'](_0x774183,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x319674){const _0x1f1a27=_0x5ccc84,_0x2e9c61={'nfabf':function(_0xf7853d,_0x4dca16){return _0xf7853d(_0x4dca16);},'dorGk':_0x1f1a27(0x15f),'gfFOC':function(_0x4de3b0,_0x532de4){return _0x4de3b0(_0x532de4);},'fMdTN':'Current\x20session\x20not\x20found.','tMAti':_0x1f1a27(0x163),'OEFlN':function(_0x18cace,_0x42de00){return _0x18cace!==_0x42de00;},'mVNLl':'in_progress'},_0x4bd3f6=_0x319674||await getActiveFeatureId();if(!_0x4bd3f6)throw new Error(_0x1f1a27(0x96));const _0x13a42e=await _0x2e9c61['nfabf'](getFeature,_0x4bd3f6);if(!_0x13a42e[_0x1f1a27(0x144)])throw new Error(_0x2e9c61[_0x1f1a27(0x11a)]);const {sessions:_0x11df0f}=await _0x2e9c61['gfFOC'](listFeatureSessions,_0x4bd3f6),_0x5ea0a3=_0x11df0f['find'](_0x5b4e2c=>_0x5b4e2c['id']===_0x13a42e['currentSessionId']);if(!_0x5ea0a3)throw new Error(_0x2e9c61['fMdTN']);if(_0x5ea0a3['status']===_0x1f1a27(0x154)){console[_0x1f1a27(0x153)](_0x2e9c61[_0x1f1a27(0xe5)]);return;}if(_0x2e9c61[_0x1f1a27(0x79)](_0x5ea0a3['status'],_0x2e9c61['mVNLl']))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x5ea0a3[_0x1f1a27(0xc5)]);console['log'](_0x1f1a27(0x9f)),await concludeSession(_0x4bd3f6,_0x13a42e['currentSessionId']),console['log']('\x0a✅\x20Session\x20'+_0x5ea0a3[_0x1f1a27(0xcd)]+'\x20concluded.'),console['log'](_0x1f1a27(0x138));}export async function featureSessions(_0x3f61df){const _0x4c1cf7=_0x5ccc84,_0x13abfb={'Rjqcd':function(_0x2abfd0){return _0x2abfd0();},'wIkgM':function(_0x10288a,_0x569c66){return _0x10288a(_0x569c66);},'IjeVt':_0x4c1cf7(0x154)},_0x2a7d49=_0x3f61df||await _0x13abfb['Rjqcd'](getActiveFeatureId);if(!_0x2a7d49)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');const _0x3be47c=await getFeature(_0x2a7d49);console['log'](_0x4c1cf7(0xa2)+_0x3be47c['name']+'\x0a');const {sessions:_0x132fce}=await _0x13abfb[_0x4c1cf7(0xff)](listFeatureSessions,_0x2a7d49);if(_0x132fce['length']===0x0){console['log'](_0x4c1cf7(0x10b));return;}for(const _0x213e1d of _0x132fce){const _0x4a1f6d=_0x213e1d['status']===_0x13abfb['IjeVt']?'✅':_0x213e1d['status']===_0x4c1cf7(0x105)?'🔄':'▶️';console['log'](_0x4a1f6d+'\x20Session\x20'+_0x213e1d[_0x4c1cf7(0xcd)]+'\x20('+_0x213e1d['id']+')'),console[_0x4c1cf7(0x153)]('\x20\x20\x20Status:\x20'+_0x213e1d['status']),console['log']('\x20\x20\x20Created:\x20'+new Date(_0x213e1d[_0x4c1cf7(0xe3)])['toLocaleString']()),_0x213e1d[_0x4c1cf7(0x74)]&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x213e1d[_0x4c1cf7(0x74)])['toLocaleString']()),console[_0x4c1cf7(0x153)]('');}}export async function featureAddScenario(_0x4f7dd9,_0x2b9229){const _0x15e48c=_0x5ccc84,_0x3ee17b={'dUmTZ':function(_0x4470f5){return _0x4470f5();},'GQEEx':function(_0x24ad60,_0x4709be){return _0x24ad60(_0x4709be);}},_0x55b367=_0x2b9229||await _0x3ee17b['dUmTZ'](getActiveFeatureId);if(!_0x55b367)throw new Error(_0x15e48c(0x96));const _0x3b39e9=await _0x3ee17b['GQEEx'](getFeature,_0x55b367);if(_0x3b39e9['latestReview']&&!_0x3b39e9['latestReview'][_0x15e48c(0x124)])throw new Error(_0x15e48c(0x75)+_0x3b39e9[_0x15e48c(0xd0)]);await createChecklistItem(_0x55b367,_0x4f7dd9);const _0x2b9ee9=await _0x3ee17b[_0x15e48c(0x89)](getFeature,_0x55b367);console['log']('\x0a✅\x20Scenario\x20added'),displayFeature(_0x2b9ee9,_0x2b9ee9[_0x15e48c(0x117)]);}export async function featureEditScenario(_0x27a49f,_0x552480){const _0x2c570b=_0x5ccc84,_0x455efd={'oPXQW':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','tnBLE':_0x2c570b(0xb1),'uaiHG':function(_0xc61f45,_0x7532e6){return _0xc61f45(_0x7532e6);},'mlIda':_0x2c570b(0x122),'NYqlt':function(_0x51e36f,_0x159682){return _0x51e36f===_0x159682;},'vnYbT':'\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','VWWoz':function(_0x27f338,_0x306cea){return _0x27f338<_0x306cea;},'EZqYN':function(_0x5b19f0,_0x4a6706){return _0x5b19f0+_0x4a6706;},'YVcwW':function(_0xb89011,_0x2df9be){return _0xb89011-_0x2df9be;},'fjUtk':function(_0x474981,_0xb65e4e){return _0x474981>=_0xb65e4e;},'KBMmJ':function(_0x1b2260,_0x426550){return _0x1b2260+_0x426550;},'uHlsw':function(_0xf7af1d,_0x436c8d,_0x2dc625){return _0xf7af1d(_0x436c8d,_0x2dc625);}},_0x15e1c3=_0x552480['id']||await getActiveFeatureId();!_0x15e1c3&&(console['error'](_0x455efd[_0x2c570b(0xfc)]),console[_0x2c570b(0xf7)](_0x455efd['tnBLE']),process['exit'](0x1));const _0x20c0ba=await _0x455efd['uaiHG'](getFeature,_0x15e1c3);_0x20c0ba[_0x2c570b(0x103)]&&!_0x20c0ba[_0x2c570b(0x103)]['submittedAt']&&(console[_0x2c570b(0xf7)](_0x455efd[_0x2c570b(0xfe)]),console[_0x2c570b(0xf7)](_0x2c570b(0x132)),console[_0x2c570b(0xf7)]('\x20\x20'+_0x20c0ba[_0x2c570b(0xd0)]),process['exit'](0x1));const _0x9167d1=_0x20c0ba['checklistItems']||[];_0x455efd['NYqlt'](_0x9167d1[_0x2c570b(0xd2)],0x0)&&(console[_0x2c570b(0xf7)](_0x2c570b(0x110)),process['exit'](0x1));if(_0x552480[_0x2c570b(0xdc)]===undefined){console[_0x2c570b(0xf7)](_0x455efd[_0x2c570b(0xd8)]),console['log']('\x0aAvailable\x20scenarios:');for(let _0xddc6d9=0x0;_0x455efd['VWWoz'](_0xddc6d9,_0x9167d1[_0x2c570b(0xd2)]);_0xddc6d9++){console[_0x2c570b(0x153)]('\x20\x20'+_0x455efd[_0x2c570b(0xa1)](_0xddc6d9,0x1)+'.\x20'+_0x9167d1[_0xddc6d9][_0x2c570b(0xbc)]);}process['exit'](0x1);}const _0xdb1bd8=_0x455efd[_0x2c570b(0x70)](_0x552480['scenario'],0x1);if(_0xdb1bd8<0x0||_0x455efd['fjUtk'](_0xdb1bd8,_0x9167d1['length'])){console['error'](_0x2c570b(0x7b)+_0x552480[_0x2c570b(0xdc)]+'.\x20Feature\x20review\x20has\x20'+_0x9167d1['length']+_0x2c570b(0xe9)),console[_0x2c570b(0x153)](_0x2c570b(0xb3));for(let _0x44ca67=0x0;_0x455efd['VWWoz'](_0x44ca67,_0x9167d1[_0x2c570b(0xd2)]);_0x44ca67++){console['log']('\x20\x20'+_0x455efd[_0x2c570b(0x156)](_0x44ca67,0x1)+'.\x20'+_0x9167d1[_0x44ca67]['description']);}process[_0x2c570b(0x133)](0x1);}const _0x541667=_0x9167d1[_0xdb1bd8];await updateChecklistItem(_0x15e1c3,_0x541667['id'],{'description':_0x27a49f});const _0x4e4bb9=await _0x455efd['uaiHG'](getFeature,_0x15e1c3);console['log']('\x0a✅\x20Scenario\x20updated'),_0x455efd['uHlsw'](displayFeature,_0x4e4bb9,_0x4e4bb9['checklistItems']);}async function downloadFeedbackImage(_0x5bd1d0,_0x39a7c6){const _0x5eb4d8=_0x5ccc84,_0x1158d0={'DqvKZ':function(_0x45f636,_0x25855e,_0x1a8cd8){return _0x45f636(_0x25855e,_0x1a8cd8);},'mKQTK':function(_0x278fb7){return _0x278fb7();},'ynZaJ':_0x5eb4d8(0x15e),'RkKML':function(_0x1f154b,_0xfb67d3,_0x53fcb6){return _0x1f154b(_0xfb67d3,_0x53fcb6);},'IOpnE':function(_0x2900fa,_0x4f0fee){return _0x2900fa(_0x4f0fee);}};try{const _0x5b24b2=_0x1158d0[_0x5eb4d8(0xf4)](join,_0x1158d0[_0x5eb4d8(0x86)](getRangerDir),_0x1158d0[_0x5eb4d8(0x11d)]);await mkdir(_0x5b24b2,{'recursive':!![]});const _0xc0c7a1=_0x1158d0[_0x5eb4d8(0x15a)](join,_0x5b24b2,_0x5eb4d8(0x71)+_0x39a7c6+_0x5eb4d8(0x14d)),_0x18c715=await _0x1158d0[_0x5eb4d8(0x8a)](fetch,_0x5bd1d0);if(!_0x18c715['ok'])return null;const _0x39b1e4=Buffer[_0x5eb4d8(0xce)](await _0x18c715['arrayBuffer']());return await _0x1158d0[_0x5eb4d8(0xf4)](writeFile,_0xc0c7a1,_0x39b1e4),_0xc0c7a1;}catch{return null;}}export async function featureGetReview(_0x334bbd){const _0x5e3af8=_0x5ccc84,_0x53dbb8={'VcPhp':function(_0x54810e){return _0x54810e();},'rkwQs':_0x5e3af8(0x96),'UYHYE':function(_0x56fcec,_0x4ed33d){return _0x56fcec(_0x4ed33d);},'osfgm':function(_0x2b786b,_0x4635f2){return _0x2b786b(_0x4635f2);},'kemjN':function(_0x5b330e,_0x10aa1c){return _0x5b330e>_0x10aa1c;},'IFgJb':function(_0x411bdc,_0x18a20b,_0x2c3de8){return _0x411bdc(_0x18a20b,_0x2c3de8);},'INokR':function(_0x4d5bb4,_0x3257f5){return _0x4d5bb4+_0x3257f5;},'sCbia':'en-US','XiCZY':'numeric','AFbnw':_0x5e3af8(0x10d),'jNbZg':_0x5e3af8(0xba),'BcIJh':_0x5e3af8(0x112),'jsRvJ':function(_0x4c0602,_0x267b2e){return _0x4c0602===_0x267b2e;},'qfyNh':'point'},_0x13486f=_0x334bbd||await _0x53dbb8[_0x5e3af8(0xe8)](getActiveFeatureId);if(!_0x13486f)throw new Error(_0x53dbb8[_0x5e3af8(0x14a)]);const _0x53f3fb=await _0x53dbb8['UYHYE'](getFeature,_0x13486f),{items:_0x3a96b3}=await _0x53dbb8[_0x5e3af8(0x76)](getActionItems,_0x13486f);console['log'](_0x5e3af8(0x9c)+_0x53f3fb['name']+'\x20('+_0x53f3fb['id']+')\x0a');if(_0x3a96b3[_0x5e3af8(0xd2)]===0x0){console['log']('No\x20scenarios\x20found.');return;}for(let _0x525741=0x0;_0x525741<_0x3a96b3['length'];_0x525741++){const _0x9e77b4=_0x3a96b3[_0x525741],_0x16918b=_0x53dbb8['kemjN'](_0x9e77b4[_0x5e3af8(0x148)],0x1)?'\x20(v'+_0x9e77b4[_0x5e3af8(0x148)]+')':'',_0x4931b3=await _0x53dbb8['IFgJb'](getItemFeedback,_0x13486f,_0x9e77b4['id']);if(_0x53dbb8[_0x5e3af8(0x108)](_0x4931b3[_0x5e3af8(0x123)][_0x5e3af8(0xd2)],0x0)){console['log'](_0x5e3af8(0x100)+_0x53dbb8[_0x5e3af8(0x161)](_0x525741,0x1)+_0x5e3af8(0x90)+_0x9e77b4[_0x5e3af8(0xbc)]+'\x22'+_0x16918b+_0x5e3af8(0xb4)+_0x4931b3['unaddressedComments']['length']+'\x20unaddressed\x20comment(s)');for(const _0x4dc86f of _0x4931b3[_0x5e3af8(0x123)]){const _0x4f6338=new Date(_0x4dc86f[_0x5e3af8(0xe3)])['toLocaleDateString'](_0x53dbb8['sCbia'],{'month':_0x5e3af8(0xc6),'day':_0x53dbb8[_0x5e3af8(0x88)]}),_0x8964a=_0x4dc86f['authorName']||_0x4dc86f[_0x5e3af8(0xa6)]||_0x53dbb8[_0x5e3af8(0x116)];console[_0x5e3af8(0x153)](_0x5e3af8(0xde)+_0x8964a+'\x20('+_0x4f6338+'):\x20\x22'+_0x4dc86f[_0x5e3af8(0xec)]+'\x22');if(_0x4dc86f['assetUrl']){const _0x45721d=await _0x53dbb8['IFgJb'](downloadFeedbackImage,_0x4dc86f['assetUrl'],_0x4dc86f['id']);_0x45721d&&console['log']('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x45721d);}if(_0x4dc86f[_0x5e3af8(0x14f)]){const _0x1691fd=_0x4dc86f['domRef'][_0x5e3af8(0x101)][_0x5e3af8(0x140)](_0x53dbb8[_0x5e3af8(0xc7)])['pop']()?.[_0x5e3af8(0x140)](':')[0x0]||_0x53dbb8[_0x5e3af8(0x10e)],_0xa29c5d=_0x4dc86f['domRef'][_0x5e3af8(0x127)]?'\x20\x22'+_0x4dc86f['domRef']['textContent'][_0x5e3af8(0x129)](0x0,0x3c)+'\x22':'';console['log'](_0x5e3af8(0x84)+_0x1691fd+'>'+_0xa29c5d),console[_0x5e3af8(0x153)](_0x5e3af8(0x98)+_0x4dc86f[_0x5e3af8(0x14f)]['selector']);}else{if(_0x4dc86f[_0x5e3af8(0x10a)]){const _0x121f30=_0x4dc86f[_0x5e3af8(0x10a)]['coordinates'];_0x53dbb8[_0x5e3af8(0x114)](_0x4dc86f[_0x5e3af8(0x10a)]['type'],_0x53dbb8['qfyNh'])&&_0x121f30['length']>=0x2?console['log'](_0x5e3af8(0x9b)+_0x121f30[0x0][_0x5e3af8(0x142)](0x2)+',\x20'+_0x121f30[0x1][_0x5e3af8(0x142)](0x2)+')'):console['log'](_0x5e3af8(0x120)+_0x4dc86f[_0x5e3af8(0x10a)]['type']+'\x20at\x20['+_0x121f30['map'](_0x2601cd=>_0x2601cd[_0x5e3af8(0x142)](0x2))[_0x5e3af8(0xc2)](',\x20')+']');}}}if(_0x4931b3[_0x5e3af8(0x104)]){console[_0x5e3af8(0x153)]('\x20\x20Expected\x20flow:');for(const _0x4058b1 of _0x4931b3[_0x5e3af8(0x104)]['split']('\x0a')){console[_0x5e3af8(0x153)](_0x5e3af8(0xc0)+_0x4058b1);}}}else console[_0x5e3af8(0x153)]('Scenario\x20'+(_0x525741+0x1)+_0x5e3af8(0x90)+_0x9e77b4['description']+'\x22'+_0x16918b+'\x20—\x20no\x20comments'),console[_0x5e3af8(0x153)](_0x5e3af8(0xf8));console['log']('');}}export async function featureDelete(_0x189a7b){const _0x15f4f3=_0x5ccc84,_0x20f768={'OhteI':function(_0xa76016,_0x4fa9a7){return _0xa76016(_0x4fa9a7);},'NDEVP':_0x15f4f3(0xeb)},_0x5cea3b=_0x189a7b||await getActiveFeatureId();if(!_0x5cea3b)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 _0x1a1633=await getFeature(_0x5cea3b);await _0x20f768[_0x15f4f3(0xcb)](softDeleteFeature,_0x5cea3b),console['log'](_0x15f4f3(0x7f)+_0x1a1633[_0x15f4f3(0x162)]+'\x20('+_0x5cea3b+')'),console[_0x15f4f3(0x153)](_0x20f768[_0x15f4f3(0x77)]+_0x5cea3b);}export async function featureRestore(_0x146ca6){const _0x5c0b62=_0x5ccc84,_0x200e94={'VhvWX':function(_0x1434cb,_0x41eb0d){return _0x1434cb(_0x41eb0d);},'RUIKM':function(_0x442574,_0x36bb19,_0x17323b){return _0x442574(_0x36bb19,_0x17323b);}};await _0x200e94[_0x5c0b62(0x8e)](restoreFeature,_0x146ca6);const _0x3a5213=await getFeature(_0x146ca6);console[_0x5c0b62(0x153)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x3a5213['name']+'\x20('+_0x146ca6+')'),_0x200e94[_0x5c0b62(0x12f)](displayFeature,_0x3a5213,_0x3a5213[_0x5c0b62(0x117)]);}
1
+ const _0x2456e6=_0x550f;(function(_0x4dbcd3,_0x1af69f){const _0x51babc=_0x550f,_0x3f9d87=_0x4dbcd3();while(!![]){try{const _0xb74d2b=parseInt(_0x51babc(0x1ee))/0x1+-parseInt(_0x51babc(0x263))/0x2*(-parseInt(_0x51babc(0x1ea))/0x3)+-parseInt(_0x51babc(0x295))/0x4*(parseInt(_0x51babc(0x1b3))/0x5)+-parseInt(_0x51babc(0x1ac))/0x6*(-parseInt(_0x51babc(0x1f8))/0x7)+parseInt(_0x51babc(0x1a7))/0x8+parseInt(_0x51babc(0x21e))/0x9*(-parseInt(_0x51babc(0x28d))/0xa)+-parseInt(_0x51babc(0x22e))/0xb*(parseInt(_0x51babc(0x1fd))/0xc);if(_0xb74d2b===_0x1af69f)break;else _0x3f9d87['push'](_0x3f9d87['shift']());}catch(_0x4c3501){_0x3f9d87['push'](_0x3f9d87['shift']());}}}(_0x2665,0x996fc));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x2f5d42 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=_0x2456e6(0x239),bold=_0x89781b=>_0x2456e6(0x23a)+_0x89781b+'\x1b[0m';function getGitRepoUrl(){const _0x1bd29e=_0x2456e6,_0x15697f={'VazTk':function(_0x27783e,_0x308031,_0x2cd304){return _0x27783e(_0x308031,_0x2cd304);},'QqgbU':_0x1bd29e(0x224),'VtaUi':'utf-8','RYBMe':'pipe','tGJzI':_0x1bd29e(0x1d4)};try{const _0x22ebf2=_0x15697f[_0x1bd29e(0x1c3)](execSync,_0x15697f['QqgbU'],{'encoding':_0x15697f['VtaUi'],'stdio':[_0x15697f[_0x1bd29e(0x1c2)],_0x1bd29e(0x289),_0x1bd29e(0x289)]})[_0x1bd29e(0x229)]();return _0x22ebf2[_0x1bd29e(0x243)](/\.git$/,'')['replace'](/^git@github\.com:/,_0x15697f[_0x1bd29e(0x27d)])['replace'](/^https?:\/\//,'');}catch{return undefined;}}function _0x2665(){const _0x22e92b=['short','any','\x20\x20\x20\x20\x20ID:\x20','ljdHG','git\x20remote\x20get-url\x20origin','linkedSession','ready','OFkiU','kTtyo','trim','pendingItems','\x20\x20✅\x20No\x20feedback\x20to\x20address','limit','\x20\x20\x20Description:\x20','7572301RGKrtd','CkaSB','Not\x20in\x20a\x20git\x20repository.','rktLe','terminalReason','iXGKr','zRtlN','authorEmail','JmHIa','OsQaM','toLocaleString','active-feature.txt','\x1b[1m','riRRC','qwzwf','aGrpi','in_progress','submittedAt','NHbjz','stats','BHoPe','replace','warn','RHoRT','\x0aNo\x20feature\x20reviews\x20found.','stdout','filter','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','completed','verification_in_progress','storage','gitBranch','\x0a✅\x20Scenario\x20added','comment_','ojqHA','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','find','\x0aConcluding\x20session...','name','\x20\x20\x20','incomplete','point','uWCDb','error','utgPW','FJAdW','\x20--limit\x20','\x20feature\x20review(s)\x20found','assetType','uqzfM','incompleteItems','\x20\x20Expected\x20flow:','yyQZB','1561696rUhAQp','eMjVK','hMOHh','offset','.\x20Feature\x20review\x20has\x20','kkaOr','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','approved','jGoqa','/artifacts/','split','KRyef','kgtAl','totalCount','\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','trimEnd','GDOjS','MaYOu','No\x20sessions\x20found.','join','VLYQn','createdAt','description','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','\x20\x20\x20Updated\x20branch\x20to:\x20','tGJzI','spatial','prompt','\x20--include-deleted','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','YCJjK','verified','xZKCW','DkITq','canceledReason','eWftW','dZxqs','pipe','BAauV','log','assets','3040230TyOYlu','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','.png','includeDeleted','latestReview','No\x20scenarios\x20found.','feedback-images','timing','764912xFLfHH','\x20(v','\x20verified','unaddressedComments','Please\x20finish\x20your\x20review\x20first:','GFTxd','selector','element',':\x20\x22','\x20scenarios.','uNzFS','5991896dypAvn','\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','\x20\x20\x20▶️\x20Started\x20session\x20','iteration','CLAUDE_SESSION_ID','7517586mCthrW','completedAt','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','push','style','\x20Session\x20','BqCaa','30BvLVIE','\x20\x20\x20Created:\x20','exit','parentItemId','sessionId','scenarios','wBiAC','map','NYOdL','screenshot','items','Cfoqz','\x20incomplete','vcnBE','QIFuG','RYBMe','VazTk','location','RANGER_TEST_USERNAME','KEhni','excludeScenarios','\x20/\x20','\x20\x20\x20\x20\x20Branch:\x20','numeric','blocked','aIbeL','isKeyStep','tFinQ','aeAQq','RATvh','uDWrg','Step\x20','\x20at\x20[','github.com/','\x0a✅\x20Session\x20is\x20already\x20completed.','notes','assetUrl','gFOCl','Current\x20session\x20not\x20found.','status','mfOfw','ZYMsi','content','iHZiB','btqUn','authorName','Unknown','get','stringify','\x20\x20\x20Progress:\x20','type','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','MMaYn','hqvcC','canonicalFlow','3HGPEpH','IENKT','slice','\x20scenario(s).','673883BuhtCa','pop','\x20\x20\x20Completed:\x20','):\x20\x22','NZDKg','Screenshot\x20','\x0a✅\x20Resumed\x20feature\x20review:\x20','blockedItems','IVBLi','\x0a⚠️\x20\x20','7FvbdLN','agentResponse','\x20\x20\x20Status:\x20','browserSessionId','XTDxR','24VeNQfE','blockedReason','ghWnI','json','scenario','env','checklistItems','closed','MXoFf','length','toFixed','has','\x0aAvailable\x20scenarios:','\x20\x20\x20\x20\x20\x20Blocked:\x20','rLYUZ','xvMlF','\x20\x20\x20Branch:\x20','currentBranch','isTTY','incompleteReason','currentSessionId','utf-8','\x20\x20💬\x20','\x20blocked','YsMUO','RWAGP','coordinates','domRef','\x20in\x20progress','\x20\x20\x20\x20\x20\x20Approved','\x20\x20\x20\x20\x20📋\x20Selector:\x20','DRcHp','dnVib','9gHvmTC','version'];_0x2665=function(){return _0x22e92b;};return _0x2665();}function getGitBranch(){const _0x5d5ee1=_0x2456e6,_0x1c0a71={'YCJjK':function(_0x33ace4,_0x12741c,_0x1d0c24){return _0x33ace4(_0x12741c,_0x1d0c24);},'kkaOr':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','mShrx':'pipe'};try{return _0x1c0a71[_0x5d5ee1(0x282)](execSync,_0x1c0a71[_0x5d5ee1(0x268)],{'encoding':_0x5d5ee1(0x212),'stdio':['pipe',_0x1c0a71['mShrx'],_0x5d5ee1(0x289)]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x568d02=_0x2456e6,_0x369e29={'gFOCl':function(_0x43a312,_0x4b2857,_0x386880){return _0x43a312(_0x4b2857,_0x386880);},'BqCaa':function(_0x2b2341,_0x2d0395){return _0x2b2341(_0x2d0395);},'DfKPa':_0x568d02(0x212)},_0x3062d1=_0x369e29[_0x568d02(0x1d8)](join,getRangerDir(),ACTIVE_FEATURE_FILE);if(!_0x369e29[_0x568d02(0x1b2)](existsSync,_0x3062d1))return null;try{const _0x2f0ba4=await _0x369e29['gFOCl'](readFile,_0x3062d1,_0x369e29['DfKPa']);return _0x2f0ba4['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0xe9dd6a){const _0x6df1f3=_0x2456e6,_0x555496={'OFkiU':function(_0x274a5c,_0x1b8644,_0x4eafc5,_0x2a34e2){return _0x274a5c(_0x1b8644,_0x4eafc5,_0x2a34e2);},'RATvh':'utf-8'},_0x1b076f=getRangerDir(),_0x966478=join(_0x1b076f,ACTIVE_FEATURE_FILE);!existsSync(_0x1b076f)&&await mkdir(_0x1b076f,{'recursive':!![]}),await _0x555496[_0x6df1f3(0x227)](writeFile,_0x966478,_0xe9dd6a,_0x555496[_0x6df1f3(0x1d0)]);}function getProgressDisplay(_0x7f104b){const _0x15aaea=_0x2456e6,_0x3d72c7={'OsQaM':function(_0x165751,_0x246109){return _0x165751+_0x246109;},'kqEOt':function(_0x3434ac,_0x4f602f){return _0x3434ac===_0x4f602f;},'rktLe':function(_0x1e9e00,_0x436443){return _0x1e9e00/_0x436443;},'pySah':function(_0x2ed07a,_0x269da9){return _0x2ed07a-_0x269da9;},'dnVib':function(_0x4cdb6f,_0x2a75a1){return _0x4cdb6f>_0x2a75a1;},'ljdHG':function(_0x4edce0,_0x2a1139){return _0x4edce0>_0x2a1139;}},_0x2eba7e=_0x7f104b['verifiedItems']||0x0,_0x3902e3=_0x7f104b['verificationInProgressItems']||0x0,_0x4e8265=_0x7f104b[_0x15aaea(0x1f5)]||0x0,_0x54d0a5=_0x7f104b[_0x15aaea(0x260)]||0x0,_0x4ee3d2=_0x7f104b[_0x15aaea(0x22a)]||0x0,_0xca1dd5=_0x3d72c7[_0x15aaea(0x237)](_0x2eba7e+_0x3902e3+_0x4e8265,_0x54d0a5)+_0x4ee3d2;if(_0x3d72c7['kqEOt'](_0xca1dd5,0x0))return'-';const _0x4e7102=0xa,_0x4eec33=Math['round'](_0x3d72c7[_0x15aaea(0x231)](_0x2eba7e,_0xca1dd5)*_0x4e7102),_0x2e1a7b='█'['repeat'](_0x4eec33)+'░'['repeat'](_0x3d72c7['pySah'](_0x4e7102,_0x4eec33)),_0x245ca8=[];if(_0x3d72c7[_0x15aaea(0x21d)](_0x4e8265,0x0))_0x245ca8[_0x15aaea(0x1af)](_0x4e8265+_0x15aaea(0x214));if(_0x3d72c7[_0x15aaea(0x21d)](_0x54d0a5,0x0))_0x245ca8[_0x15aaea(0x1af)](_0x54d0a5+_0x15aaea(0x1bf));if(_0x3902e3>0x0)_0x245ca8['push'](_0x3902e3+_0x15aaea(0x219));const _0x4dc1b7=_0x3d72c7[_0x15aaea(0x223)](_0x245ca8[_0x15aaea(0x206)],0x0)?'\x20('+_0x245ca8[_0x15aaea(0x277)](',\x20')+')':'';return _0x2e1a7b+'\x20'+_0x2eba7e+'/'+_0xca1dd5+_0x15aaea(0x19e)+_0x4dc1b7;}function getCurrentSessionItems(_0x5856a2,_0xad53bb){const _0x119464=_0x2456e6;if(!_0x5856a2[_0x119464(0x211)])return _0xad53bb[_0x119464(0x248)](_0x3b8e51=>!_0x3b8e51[_0x119464(0x1b7)]);return _0xad53bb['filter'](_0xc18bb2=>_0xc18bb2['sessionId']===_0x5856a2['currentSessionId']||!_0xc18bb2['sessionId']);}function _0x550f(_0x304d01,_0x288c98){_0x304d01=_0x304d01-0x19d;const _0x2665ce=_0x2665();let _0x550ff8=_0x2665ce[_0x304d01];return _0x550ff8;}function displayFeature(_0x35f6c2,_0x12d438){const _0x3a2366=_0x2456e6,_0x100de4={'ghWnI':function(_0x559483,_0x26b6ae){return _0x559483(_0x26b6ae);},'wilLb':function(_0x54ee2a,_0x409708){return _0x54ee2a>_0x409708;},'JSxdL':function(_0x1a24dc,_0x39b739){return _0x1a24dc<_0x39b739;},'dZxqs':'closed','BAauV':function(_0x104d44,_0x4b840f){return _0x104d44===_0x4b840f;},'NrAkO':function(_0x320491,_0x516fd1){return _0x320491===_0x516fd1;},'zRtlN':_0x3a2366(0x1cb),'aeAQq':_0x3a2366(0x24b),'sjIhh':function(_0x465fa3,_0x5efbbe){return _0x465fa3!==_0x5efbbe;},'iHZiB':_0x3a2366(0x283),'pOUFR':'\x20[has\x20reviewer\x20feedback]','xZKCW':function(_0x49f8a5,_0xf8ec3b){return _0x49f8a5+_0xf8ec3b;},'RqnSG':function(_0x24c3bb,_0x32fa95){return _0x24c3bb===_0x32fa95;},'DRcHp':_0x3a2366(0x256),'rWCtZ':'approved'};console['log']('\x0a'+_0x35f6c2['name']+'\x20('+_0x35f6c2['dashboardUrl']+')');_0x35f6c2['stats']&&console['log']('\x20\x20\x20Progress:\x20'+_0x100de4[_0x3a2366(0x1ff)](getProgressDisplay,_0x35f6c2[_0x3a2366(0x241)]));_0x35f6c2[_0x3a2366(0x27a)]&&console['log'](_0x3a2366(0x22d)+_0x35f6c2[_0x3a2366(0x27a)]);_0x35f6c2['gitRepoUrl']&&console[_0x3a2366(0x28b)]('\x20\x20\x20Repository:\x20'+_0x35f6c2['gitRepoUrl']);_0x35f6c2[_0x3a2366(0x24d)]&&console[_0x3a2366(0x28b)]('\x20\x20\x20Branch:\x20'+_0x35f6c2['gitBranch']);console['log'](_0x3a2366(0x1b4)+new Date(_0x35f6c2['createdAt'])[_0x3a2366(0x238)]());_0x35f6c2[_0x3a2366(0x1ad)]&&console[_0x3a2366(0x28b)](_0x3a2366(0x1f0)+new Date(_0x35f6c2[_0x3a2366(0x1ad)])['toLocaleString']());if(_0x12d438&&_0x100de4['wilLb'](_0x12d438[_0x3a2366(0x206)],0x0)){console['log']('\x0a\x20\x20\x20Scenarios:');for(let _0x12a43a=0x0;_0x100de4['JSxdL'](_0x12a43a,_0x12d438['length']);_0x12a43a++){const _0x6639b1=_0x12d438[_0x12a43a];let _0x214926;if(_0x6639b1[_0x3a2366(0x1da)]===_0x100de4[_0x3a2366(0x288)]&&_0x100de4[_0x3a2366(0x28a)](_0x6639b1[_0x3a2366(0x232)],_0x3a2366(0x26b)))_0x214926='✅';else{if(_0x100de4['NrAkO'](_0x6639b1[_0x3a2366(0x1da)],'verified'))_0x214926='🟢';else{if(_0x6639b1[_0x3a2366(0x1da)]===_0x3a2366(0x256))_0x214926='🟠';else{if(_0x6639b1['status']===_0x100de4[_0x3a2366(0x234)])_0x214926='🛑';else{if(_0x6639b1[_0x3a2366(0x1da)]===_0x100de4[_0x3a2366(0x288)])_0x214926='⛔';else _0x6639b1[_0x3a2366(0x1da)]===_0x100de4[_0x3a2366(0x1cf)]?_0x214926='⏳':_0x214926='⬜';}}}}const _0x550ace=_0x6639b1['version']>0x1?_0x3a2366(0x19d)+_0x6639b1['version']+')':'',_0x37d216=_0x6639b1['version']>0x1&&_0x6639b1[_0x3a2366(0x1b6)]&&_0x100de4['sjIhh'](_0x6639b1[_0x3a2366(0x1da)],_0x100de4['dZxqs'])&&_0x6639b1[_0x3a2366(0x1da)]!==_0x100de4[_0x3a2366(0x1de)]?_0x100de4['pOUFR']:'';console['log'](_0x3a2366(0x255)+_0x100de4[_0x3a2366(0x284)](_0x12a43a,0x1)+'.\x20'+_0x214926+'\x20'+_0x6639b1[_0x3a2366(0x27a)]+_0x550ace+_0x37d216);_0x100de4['RqnSG'](_0x6639b1['status'],_0x100de4[_0x3a2366(0x234)])&&_0x6639b1['blockedReason']&&console['log'](_0x3a2366(0x20a)+_0x6639b1['blockedReason']);_0x6639b1[_0x3a2366(0x1da)]===_0x100de4[_0x3a2366(0x21c)]&&_0x6639b1['incompleteReason']&&console['log']('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x6639b1['incompleteReason']);if(_0x6639b1[_0x3a2366(0x1da)]===_0x100de4[_0x3a2366(0x288)]&&_0x6639b1['terminalReason']===_0x100de4['rWCtZ'])console['log'](_0x3a2366(0x21a));else _0x6639b1[_0x3a2366(0x1da)]==='closed'&&_0x6639b1['canceledReason']&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x6639b1['canceledReason']);}}}export async function featureCreate(_0x375297,_0x541d2d){const _0x4a0041=_0x2456e6,_0x149132={'lVGbp':function(_0x1c603e){return _0x1c603e();},'kuixi':function(_0x4350db,_0x4c9a61){return _0x4350db===_0x4c9a61;},'kgtAl':function(_0x54836e,_0x9b232e){return _0x54836e(_0x9b232e);},'kOSTs':function(_0x2b3f9b){return _0x2b3f9b();},'aGrpi':'\x0aCreating\x20feature\x20review...','fCIDv':function(_0x2a51d4,_0x1c608b){return _0x2a51d4(_0x1c608b);},'KEhni':function(_0x45f24c,_0x5ab40a,_0x2c91b0){return _0x45f24c(_0x5ab40a,_0x2c91b0);}},{envNames:_0x3784a9}=await _0x149132['lVGbp'](getEnvNames);if(_0x149132['kuixi'](_0x3784a9[_0x4a0041(0x206)],0x0)&&!process[_0x4a0041(0x202)][_0x4a0041(0x1c5)]){let _0x322d3b=0x0;try{_0x322d3b=(await listCloudProfiles())['length'];}catch{_0x322d3b=0x1;}_0x322d3b===0x0&&console[_0x4a0041(0x244)]('\x0a'+_0x149132[_0x4a0041(0x270)](formatProfileRequiredMessage,_0x584cb7=>bold(_0x584cb7)));}const _0x2e55d2=_0x541d2d[_0x4a0041(0x1b8)]?_0x541d2d[_0x4a0041(0x1b8)][_0x4a0041(0x1ba)](_0xb47bef=>_0xb47bef[_0x4a0041(0x229)]()):[],_0x3327b9=_0x149132['kOSTs'](getGitRepoUrl),_0x1ac5db=getGitBranch();console['log'](_0x149132[_0x4a0041(0x23d)]);const _0x25c32c=await createFeature({'name':_0x375297,'description':_0x541d2d['description'],'checklist':_0x2e55d2,'gitRepoUrl':_0x3327b9,'gitBranch':_0x1ac5db});await setActiveFeatureId(_0x25c32c['id']),await _0x149132['fCIDv'](tryStartCurrentSession,_0x25c32c['id']);const _0x1a7b8f=process['env'][_0x4a0041(0x1ab)];_0x1a7b8f&&registerSession(_0x1a7b8f,_0x25c32c['id']),console[_0x4a0041(0x28b)]('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x25c32c['id']),_0x149132[_0x4a0041(0x1c6)](displayFeature,_0x25c32c,_0x25c32c['checklistItems']),console[_0x4a0041(0x28b)](_0x4a0041(0x269));}export async function featureList(_0x2b86a2){const _0x2a00db=_0x2456e6,_0x130d60={'pFbak':function(_0x339a26){return _0x339a26();},'omSMU':_0x2a00db(0x246),'XmYRl':function(_0x19c00b,_0x4f2887){return _0x19c00b(_0x4f2887);},'iSpXc':function(_0x734d83,_0x3a9a76){return _0x734d83+_0x3a9a76;},'RBmnT':function(_0x1555ae,_0x1b637b){return _0x1555ae!==_0x1b637b;},'NYOdL':'\x20--current-branch'},_0x2fee1d={'limit':_0x2b86a2['limit']??0xa,'offset':_0x2b86a2[_0x2a00db(0x266)]??0x0,'includeDeleted':_0x2b86a2[_0x2a00db(0x290)]};_0x2b86a2['currentBranch']&&(_0x2fee1d['gitRepoUrl']=getGitRepoUrl(),_0x2fee1d[_0x2a00db(0x24d)]=_0x130d60['pFbak'](getGitBranch));const _0x2a77b3=await listFeatures(_0x2fee1d);if(_0x2a77b3['items'][_0x2a00db(0x206)]===0x0){console['log'](_0x130d60['omSMU']);return;}const _0x430ba9=_0x2a77b3[_0x2a00db(0x271)]>_0x2a77b3[_0x2a00db(0x1bd)]['length']?'Showing\x20'+_0x2a77b3['items'][_0x2a00db(0x206)]+'\x20of\x20'+_0x2a77b3['totalCount']:_0x2a77b3['totalCount']+_0x2a00db(0x25d);console[_0x2a00db(0x28b)]('\x0a'+_0x430ba9+':\x0a');for(const _0x278c04 of _0x2a77b3[_0x2a00db(0x1bd)]){console['log'](''+_0x278c04['name']),console['log']('\x20\x20\x20ID:\x20'+_0x278c04['id']),_0x278c04[_0x2a00db(0x241)]&&console['log'](_0x2a00db(0x1e4)+_0x130d60['XmYRl'](getProgressDisplay,_0x278c04['stats'])),_0x278c04[_0x2a00db(0x24d)]&&console['log'](_0x2a00db(0x20d)+_0x278c04[_0x2a00db(0x24d)]),console[_0x2a00db(0x28b)]('\x20\x20\x20Created:\x20'+new Date(_0x278c04['createdAt'])['toLocaleDateString']()),console['log']('');}const _0x54322a=_0x2fee1d[_0x2a00db(0x22c)]??0xa,_0x3242db=_0x130d60['iSpXc'](_0x2fee1d[_0x2a00db(0x266)]??0x0,_0x2a77b3[_0x2a00db(0x1bd)][_0x2a00db(0x206)]);if(_0x3242db<_0x2a77b3['totalCount']){const _0x27c3c5=_0x130d60['RBmnT'](_0x54322a,0xa)?_0x2a00db(0x25c)+_0x54322a:'',_0x246398=_0x2b86a2[_0x2a00db(0x20e)]?_0x130d60[_0x2a00db(0x1bb)]:'',_0x4bd7e0=_0x2b86a2[_0x2a00db(0x290)]?_0x2a00db(0x280):'';console[_0x2a00db(0x28b)]('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x3242db+_0x27c3c5+_0x246398+_0x4bd7e0);}}export async function featureShow(_0x1b125a){const _0x232818=_0x2456e6,_0x254f05={'mSnjF':function(_0xf14dea){return _0xf14dea();},'OzAbC':function(_0xf5e566,_0x43ceae){return _0xf5e566(_0x43ceae);},'LAydv':function(_0x33b486,_0x2db3f1,_0x3ea5c4){return _0x33b486(_0x2db3f1,_0x3ea5c4);}},_0x12466e=_0x1b125a||await _0x254f05['mSnjF'](getActiveFeatureId);if(!_0x12466e)throw new Error(_0x232818(0x251));const _0x16e661=await _0x254f05['OzAbC'](getFeature,_0x12466e);_0x254f05['LAydv'](displayFeature,_0x16e661,_0x16e661['checklistItems']);}export async function featureResume(_0x2cee92){const _0x4c12ec=_0x2456e6,_0x2f0335={'yyQZB':function(_0x57f412,_0x3cc870){return _0x57f412(_0x3cc870);},'uNzFS':function(_0x3d403e,_0x3cb36a){return _0x3d403e(_0x3cb36a);},'ojqHA':function(_0x5c9e25){return _0x5c9e25();},'vLMJS':function(_0x3ea51c,_0x5b65f5){return _0x3ea51c(_0x5b65f5);},'qwzwf':function(_0x31a03a){return _0x31a03a();},'KRyef':function(_0x1cbc53,_0x147804){return _0x1cbc53||_0x147804;},'btqUn':'any','wzjps':function(_0x268deb,_0x454862){return _0x268deb===_0x454862;},'orsTp':_0x4c12ec(0x28e),'MaYOu':_0x4c12ec(0x281),'XjNHh':_0x4c12ec(0x26a),'wBiAC':function(_0x581378,_0x54dfc3){return _0x581378(_0x54dfc3);},'aIbeL':'Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','qlVEV':'list','qgKOU':'selected','xvMlF':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','gBqfN':function(_0x3b16c0,_0x901c6c){return _0x3b16c0(_0x901c6c);},'DkITq':function(_0x51490e,_0xf0fe1a){return _0x51490e!==_0xf0fe1a;},'CvTkT':function(_0x106def,_0x5afb0e,_0x30ac41){return _0x106def(_0x5afb0e,_0x30ac41);}};if(_0x2cee92){const _0x28ce98=await _0x2f0335[_0x4c12ec(0x262)](getFeature,_0x2cee92);await _0x2f0335[_0x4c12ec(0x1a6)](setActiveFeatureId,_0x28ce98['id']);const _0x1adbb5=_0x2f0335[_0x4c12ec(0x250)](getGitBranch);_0x1adbb5&&_0x1adbb5!==_0x28ce98[_0x4c12ec(0x24d)]&&(await updateFeature(_0x28ce98['id'],{'gitBranch':_0x1adbb5}),console[_0x4c12ec(0x28b)](_0x4c12ec(0x27c)+_0x1adbb5));console['log'](_0x4c12ec(0x1f4)+_0x28ce98[_0x4c12ec(0x254)]+'\x20('+_0x28ce98['id']+')'),await tryStartCurrentSession(_0x28ce98['id']);const _0x3f6df9=process['env'][_0x4c12ec(0x1ab)];_0x3f6df9&&registerSession(_0x3f6df9,_0x28ce98['id']);displayFeature(_0x28ce98,_0x28ce98['checklistItems']),await _0x2f0335['vLMJS'](printFeedbackNudge,_0x28ce98['id']);return;}const _0x226b6d=getGitRepoUrl(),_0x274c26=_0x2f0335[_0x4c12ec(0x23c)](getGitBranch);if(!_0x226b6d&&!_0x274c26)throw new Error(_0x4c12ec(0x230));console[_0x4c12ec(0x28b)]('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+_0x2f0335[_0x4c12ec(0x26f)](_0x226b6d,_0x4c12ec(0x221))+_0x4c12ec(0x1c8)+_0x2f0335['KRyef'](_0x274c26,_0x2f0335[_0x4c12ec(0x1df)])+'...');const _0x538add=await listFeatures({'gitRepoUrl':_0x226b6d,'gitBranch':_0x274c26}),_0x5d64fa=_0x538add['items']['filter'](_0x13d223=>_0x13d223[_0x4c12ec(0x1da)]?_0x13d223[_0x4c12ec(0x1da)]!=='verified':!_0x13d223[_0x4c12ec(0x1ad)]);if(_0x2f0335['wzjps'](_0x5d64fa[_0x4c12ec(0x206)],0x0)){console[_0x4c12ec(0x28b)](_0x2f0335['orsTp']),console[_0x4c12ec(0x28b)](_0x2f0335[_0x4c12ec(0x275)]);return;}let _0x42f620;if(_0x5d64fa[_0x4c12ec(0x206)]===0x1)_0x42f620=_0x5d64fa[0x0];else{const _0x4612fc=process['stdin'][_0x4c12ec(0x20f)]&&process['stdout'][_0x4c12ec(0x20f)];if(!_0x4612fc){console['log'](_0x2f0335['XjNHh']);for(const _0x3b60ad of _0x5d64fa){console[_0x4c12ec(0x28b)]('\x20\x20'+_0x3b60ad[_0x4c12ec(0x254)]),console['log'](_0x4c12ec(0x222)+_0x3b60ad['id']),_0x3b60ad[_0x4c12ec(0x241)]&&console['log']('\x20\x20\x20\x20\x20Progress:\x20'+_0x2f0335[_0x4c12ec(0x1b9)](getProgressDisplay,_0x3b60ad[_0x4c12ec(0x241)])),_0x3b60ad['gitBranch']&&console[_0x4c12ec(0x28b)](_0x4c12ec(0x1c9)+_0x3b60ad[_0x4c12ec(0x24d)]);}throw new Error(_0x2f0335[_0x4c12ec(0x1cc)]);}const {selected:_0x134f0f}=await _0x2f5d42[_0x4c12ec(0x27f)]([{'type':_0x2f0335['qlVEV'],'name':_0x2f0335['qgKOU'],'message':_0x2f0335[_0x4c12ec(0x20c)],'choices':_0x5d64fa[_0x4c12ec(0x1ba)](_0x5599cc=>({'name':_0x5599cc[_0x4c12ec(0x254)]+'\x20('+_0x5599cc['id']+')','value':_0x5599cc['id']}))}]);_0x42f620=_0x5d64fa[_0x4c12ec(0x252)](_0x1b200c=>_0x1b200c['id']===_0x134f0f);}await _0x2f0335['gBqfN'](setActiveFeatureId,_0x42f620['id']);_0x274c26&&_0x2f0335[_0x4c12ec(0x285)](_0x274c26,_0x42f620[_0x4c12ec(0x24d)])&&(await updateFeature(_0x42f620['id'],{'gitBranch':_0x274c26}),console[_0x4c12ec(0x28b)]('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x274c26));console['log'](_0x4c12ec(0x1f4)+_0x42f620['name']+'\x20('+_0x42f620['id']+')'),await tryStartCurrentSession(_0x42f620['id']);const _0x30f39a=await getFeature(_0x42f620['id']),_0x2b0530=process['env']['CLAUDE_SESSION_ID'];_0x2b0530&&_0x2f0335['CvTkT'](registerSession,_0x2b0530,_0x30f39a['id']),displayFeature(_0x30f39a,_0x30f39a['checklistItems']),await printFeedbackNudge(_0x30f39a['id']);}async function printFeedbackNudge(_0x2ebf84){const _0x3ee411=_0x2456e6,_0x499fce={'zFUTV':function(_0x49ce0a,_0xd49036){return _0x49ce0a(_0xd49036);}};try{const {items:_0x199e10}=await _0x499fce['zFUTV'](getActionItems,_0x2ebf84);let _0xce893b=0x0,_0x46e097=0x0;for(const _0x1a15ca of _0x199e10){const _0x1c7ee6=await getItemFeedback(_0x2ebf84,_0x1a15ca['id']);_0x1c7ee6[_0x3ee411(0x19f)]['length']>0x0&&(_0xce893b+=_0x1c7ee6[_0x3ee411(0x19f)]['length'],_0x46e097++);}_0xce893b>0x0&&(console[_0x3ee411(0x28b)](_0x3ee411(0x1f7)+_0xce893b+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x46e097+_0x3ee411(0x1ed)),console['log']('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x1c4e2c){const _0x2e365c=_0x2456e6,_0x4e1339={'iXGKr':function(_0x550d11,_0x28602c){return _0x550d11(_0x28602c);}};try{const {sessions:_0x2c2fa6}=await _0x4e1339[_0x2e365c(0x233)](listFeatureSessions,_0x1c4e2c),_0x19bef7=_0x2c2fa6[_0x2e365c(0x252)](_0x539d38=>_0x539d38[_0x2e365c(0x1da)]===_0x2e365c(0x226));_0x19bef7&&(await startSession(_0x1c4e2c,_0x19bef7['id']),console['log'](_0x2e365c(0x1a9)+_0x19bef7['iteration']));}catch{}}export async function featureReport(_0x340346,_0x4c8520){const _0x2a65d4=_0x2456e6,_0x2204c4={'hqvcC':function(_0x44ff7){return _0x44ff7();},'GDOjS':function(_0x447111,_0x4a87db){return _0x447111(_0x4a87db);},'RDenQ':function(_0x5747be,_0x3612d8,_0x4c3dc3){return _0x5747be(_0x3612d8,_0x4c3dc3);},'RWQjp':'utf-8'},_0xf6ecba=_0x340346||await _0x2204c4[_0x2a65d4(0x1e8)](getActiveFeatureId);if(!_0xf6ecba)throw new Error(_0x2a65d4(0x1e6));console['log']('\x0aGenerating\x20report...');const _0x10e6c6=await getFeatureReportMarkdown(_0xf6ecba,{'style':_0x4c8520[_0x2a65d4(0x1b0)]}),_0x33aff4=_0x4c8520['output']||join(getRangerDir(),'reports',_0xf6ecba+'.md'),_0x5d2abd=join(_0x33aff4,'..');!_0x2204c4[_0x2a65d4(0x274)](existsSync,_0x5d2abd)&&await _0x2204c4['RDenQ'](mkdir,_0x5d2abd,{'recursive':!![]}),await writeFile(_0x33aff4,_0x10e6c6,_0x2204c4['RWQjp']),console[_0x2a65d4(0x28b)]('\x0a✅\x20Report\x20generated:\x20'+_0x33aff4);}function getScenarioResult(_0x52af23){const _0x476f0f=_0x2456e6,_0x4df004={'MMaYn':function(_0x1947ed,_0x5897d3){return _0x1947ed===_0x5897d3;},'bAphZ':_0x476f0f(0x204),'HPvMu':'verification_in_progress','eMjVK':'in_progress'};if(_0x4df004[_0x476f0f(0x1e7)](_0x52af23[_0x476f0f(0x1da)],_0x4df004['bAphZ']))return _0x52af23['terminalReason']??_0x476f0f(0x204);if(_0x52af23['status']===_0x4df004['HPvMu'])return _0x4df004[_0x476f0f(0x264)];return _0x52af23[_0x476f0f(0x1da)];}function getScenarioRationale(_0x56a500,_0x33554d){const _0x1cfadf=_0x2456e6;if(_0x33554d)return _0x33554d;if(_0x56a500[_0x1cfadf(0x1fe)])return _0x56a500[_0x1cfadf(0x1fe)];if(_0x56a500['incompleteReason'])return _0x56a500[_0x1cfadf(0x210)];if(_0x56a500[_0x1cfadf(0x286)])return _0x56a500['canceledReason'];if(_0x56a500[_0x1cfadf(0x1d6)])return _0x56a500['notes'];return null;}export async function featureReportPrDescription(_0x1f868d,_0x5c071a){const _0x12e01a=_0x2456e6,_0x1d3bbd={'MByzD':function(_0x21f6a8){return _0x21f6a8();},'IENKT':function(_0x170bb4,_0x25ef98){return _0x170bb4===_0x25ef98;},'DcEZZ':function(_0x29ed67,_0x5ca0ba){return _0x29ed67>_0x5ca0ba;},'hMOHh':_0x12e01a(0x209),'cjbGJ':function(_0x49c8c8,_0x69e9d4){return _0x49c8c8<_0x69e9d4;},'oBEuo':function(_0x51681a,_0x14d08b){return _0x51681a+_0x14d08b;},'riRRC':'\x0a❌\x20All\x20scenarios\x20were\x20excluded.','YsMUO':function(_0x13829e,_0x79170,_0x4c23d4,_0x3cd99e){return _0x13829e(_0x79170,_0x4c23d4,_0x3cd99e);}},_0x5eef03=_0x1f868d||await _0x1d3bbd['MByzD'](getActiveFeatureId);if(!_0x5eef03)throw new Error(_0x12e01a(0x1e6));const _0x42385b=await getFeature(_0x5eef03),_0x3909a2=_0x42385b['checklistItems']||[],_0x5ad16b=getCurrentSessionItems(_0x42385b,_0x3909a2);_0x1d3bbd['IENKT'](_0x5ad16b[_0x12e01a(0x206)],0x0)&&(console[_0x12e01a(0x259)](_0x12e01a(0x249)),process[_0x12e01a(0x1b5)](0x1));const _0x3b5db0=_0x5c071a[_0x12e01a(0x1c7)]??[],_0x199db8=_0x3b5db0[_0x12e01a(0x248)](_0x40e7ff=>!Number['isInteger'](_0x40e7ff)||_0x40e7ff<0x1||_0x40e7ff>_0x5ad16b[_0x12e01a(0x206)]);if(_0x1d3bbd['DcEZZ'](_0x199db8['length'],0x0)){console['error']('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0x199db8[_0x12e01a(0x277)](',\x20')),console[_0x12e01a(0x28b)](_0x1d3bbd[_0x12e01a(0x265)]);for(let _0x6a78a1=0x0;_0x1d3bbd['cjbGJ'](_0x6a78a1,_0x5ad16b[_0x12e01a(0x206)]);_0x6a78a1++){console['log']('\x20\x20'+_0x1d3bbd['oBEuo'](_0x6a78a1,0x1)+'.\x20'+_0x5ad16b[_0x6a78a1]['description']);}process[_0x12e01a(0x1b5)](0x1);}const _0x1df847=new Set(_0x3b5db0['map'](_0x196b9f=>_0x196b9f-0x1)),_0x3cff83=_0x5ad16b['filter']((_0x147d72,_0x33822d)=>!_0x1df847[_0x12e01a(0x208)](_0x33822d));_0x1d3bbd[_0x12e01a(0x1eb)](_0x3cff83[_0x12e01a(0x206)],0x0)&&(console[_0x12e01a(0x259)](_0x1d3bbd[_0x12e01a(0x23b)]),process['exit'](0x1));if(_0x5c071a[_0x12e01a(0x200)])await _0x1d3bbd[_0x12e01a(0x215)](outputJsonReport,_0x5eef03,_0x42385b,_0x3cff83);else{const _0x470bf3=await getFeatureReportMarkdown(_0x5eef03,{'itemIds':_0x3cff83['map'](_0xddbe15=>_0xddbe15['id'])});process[_0x12e01a(0x247)]['write'](_0x470bf3[_0x12e01a(0x273)]()+'\x0a');}}async function outputJsonReport(_0x4dc8b5,_0x49efdc,_0xc1fdfe){const _0x4e906c=_0x2456e6,_0x1b8c58={'ZYMsi':function(_0x499519,_0x2714ca){return _0x499519(_0x2714ca);},'AeARy':function(_0x1c2cfc,_0x502388){return _0x1c2cfc>_0x502388;},'taDRW':function(_0x43198a){return _0x43198a();},'ITymb':function(_0x4fc48c,_0x40b191){return _0x4fc48c(_0x40b191);},'CLAeU':function(_0x57527f,_0x3bbd8c){return _0x57527f+_0x3bbd8c;}},_0x134e56=_0x1b8c58['taDRW'](getApiBaseUrl),_0x149f47=await _0x1b8c58['ITymb'](getFeatureReport,_0x4dc8b5),_0x17bf8b=new Map(_0x149f47[_0x4e906c(0x203)][_0x4e906c(0x1ba)](_0x11992c=>[_0x11992c['id'],_0x11992c])),_0x5a3dae=await Promise['all'](_0xc1fdfe['map'](async _0x12477f=>{const _0x203382=_0x4e906c,_0x3b5dce=_0x17bf8b[_0x203382(0x1e2)](_0x12477f['id']),_0x3fc867=_0x3b5dce?.[_0x203382(0x225)]??null;let _0x2f787f=[];if(_0x12477f[_0x203382(0x1fb)])try{const {steps:_0x14a23a}=await _0x1b8c58[_0x203382(0x1dc)](getBrowserSessionSteps,_0x12477f[_0x203382(0x1fb)]);_0x1b8c58['AeARy'](_0x14a23a['length'],0x0)&&(_0x2f787f=_0x14a23a['map'](_0x48c37a=>{const _0x15fe4b=_0x203382,_0x554e54=_0x48c37a[_0x15fe4b(0x28c)]['find'](_0x52077d=>_0x52077d['assetType']===_0x15fe4b(0x1bc)&&_0x52077d[_0x15fe4b(0x294)]==='after')??_0x48c37a[_0x15fe4b(0x28c)][_0x15fe4b(0x252)](_0x555c9b=>_0x555c9b[_0x15fe4b(0x25e)]===_0x15fe4b(0x1bc));let _0x1695f1=null,_0x4a6c3b=null;if(_0x554e54){const _0x2ad902=_0x554e54[_0x15fe4b(0x24c)][_0x15fe4b(0x1c4)]['split']('/')[_0x15fe4b(0x1ef)]();_0x1695f1=_0x134e56+'/api/v1/mcp/browser-sessions/'+_0x12477f['browserSessionId']+_0x15fe4b(0x26d)+_0x2ad902,_0x2ad902&&(_0x4a6c3b=_0x2ad902[_0x15fe4b(0x243)](/\.\w+$/,'')[_0x15fe4b(0x243)](/^(key_)?\d+_/,'')[_0x15fe4b(0x243)](/[-_]/g,'\x20'));}return{'description':_0x4a6c3b||_0x48c37a[_0x15fe4b(0x27a)]||_0x48c37a['stepName']||_0x15fe4b(0x1d2)+_0x48c37a['position'],'screenshot':_0x1695f1,'is_key_step':_0x48c37a[_0x15fe4b(0x1cd)]};}));}catch{}return _0x2f787f[_0x203382(0x206)]===0x0&&_0x3fc867?.['screenshotUrls']&&(_0x2f787f=_0x3fc867['screenshotUrls']['map']((_0x2c2061,_0x22e797)=>({'description':_0x203382(0x1f3)+(_0x22e797+0x1),'screenshot':_0x2c2061,'is_key_step':![]}))),{'description':_0x12477f['description'],'result':getScenarioResult(_0x12477f),'rationale':getScenarioRationale(_0x12477f,_0x3fc867?.[_0x203382(0x1f9)]),'steps':_0x2f787f};})),_0x4efb6d={'url':_0x49efdc['dashboardUrl'],'scenarios':_0x5a3dae};process['stdout']['write'](_0x1b8c58['CLAeU'](JSON[_0x4e906c(0x1e3)](_0x4efb6d,null,0x2),'\x0a'));}export async function featureConcludeSession(_0x4be9dd){const _0x26c0ea=_0x2456e6,_0x45beea={'HYdCO':function(_0x30833a){return _0x30833a();},'jGoqa':function(_0x4fa0c1,_0x11d22c){return _0x4fa0c1(_0x11d22c);},'IVBLi':_0x26c0ea(0x1d9),'utgPW':function(_0x325b66,_0xa26f25){return _0x325b66===_0xa26f25;},'jMvyg':_0x26c0ea(0x1d5),'PSoGt':'in_progress','JmHIa':function(_0x266733,_0x5c2bc4,_0x819b6f){return _0x266733(_0x5c2bc4,_0x819b6f);}},_0xadfce1=_0x4be9dd||await _0x45beea['HYdCO'](getActiveFeatureId);if(!_0xadfce1)throw new Error(_0x26c0ea(0x251));const _0x4667a1=await getFeature(_0xadfce1);if(!_0x4667a1['currentSessionId'])throw new Error('No\x20active\x20session\x20for\x20this\x20feature\x20review.');const {sessions:_0x5d20ff}=await _0x45beea[_0x26c0ea(0x26c)](listFeatureSessions,_0xadfce1),_0x339ace=_0x5d20ff['find'](_0x26b098=>_0x26b098['id']===_0x4667a1[_0x26c0ea(0x211)]);if(!_0x339ace)throw new Error(_0x45beea[_0x26c0ea(0x1f6)]);if(_0x45beea[_0x26c0ea(0x25a)](_0x339ace['status'],_0x26c0ea(0x24a))){console[_0x26c0ea(0x28b)](_0x45beea['jMvyg']);return;}if(_0x339ace['status']!==_0x45beea['PSoGt'])throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x339ace[_0x26c0ea(0x1da)]);console[_0x26c0ea(0x28b)](_0x26c0ea(0x253)),await _0x45beea[_0x26c0ea(0x236)](concludeSession,_0xadfce1,_0x4667a1[_0x26c0ea(0x211)]),console['log']('\x0a✅\x20Session\x20'+_0x339ace[_0x26c0ea(0x1aa)]+'\x20concluded.'),console[_0x26c0ea(0x28b)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x508dc5){const _0x32b624=_0x2456e6,_0x35008c={'BlKDN':function(_0x2ee03e,_0x3d84c4){return _0x2ee03e(_0x3d84c4);},'yqEhU':function(_0x20804b,_0x42b48d){return _0x20804b===_0x42b48d;},'HXtwb':function(_0x2d860d,_0x55cb4d){return _0x2d860d===_0x55cb4d;},'eWftW':'completed','uWCDb':_0x32b624(0x23e)},_0x3604ce=_0x508dc5||await getActiveFeatureId();if(!_0x3604ce)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');const _0x1fbfb8=await getFeature(_0x3604ce);console['log']('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x1fbfb8['name']+'\x0a');const {sessions:_0x1eafc2}=await _0x35008c['BlKDN'](listFeatureSessions,_0x3604ce);if(_0x35008c['yqEhU'](_0x1eafc2[_0x32b624(0x206)],0x0)){console[_0x32b624(0x28b)](_0x32b624(0x276));return;}for(const _0x154a9f of _0x1eafc2){const _0x4485fe=_0x35008c['HXtwb'](_0x154a9f[_0x32b624(0x1da)],_0x35008c[_0x32b624(0x287)])?'✅':_0x154a9f[_0x32b624(0x1da)]===_0x35008c[_0x32b624(0x258)]?'🔄':'▶️';console[_0x32b624(0x28b)](_0x4485fe+_0x32b624(0x1b1)+_0x154a9f[_0x32b624(0x1aa)]+'\x20('+_0x154a9f['id']+')'),console['log'](_0x32b624(0x1fa)+_0x154a9f[_0x32b624(0x1da)]),console[_0x32b624(0x28b)](_0x32b624(0x1b4)+new Date(_0x154a9f['createdAt'])['toLocaleString']()),_0x154a9f[_0x32b624(0x1ad)]&&console[_0x32b624(0x28b)]('\x20\x20\x20Completed:\x20'+new Date(_0x154a9f['completedAt'])['toLocaleString']()),console[_0x32b624(0x28b)]('');}}export async function featureAddScenario(_0x150a2a,_0x1d1637){const _0xd4f465=_0x2456e6,_0x38c99a={'dNBIs':function(_0x6c166b){return _0x6c166b();},'XTDxR':_0xd4f465(0x251),'tFinQ':function(_0x7805fc,_0x351bd0){return _0x7805fc(_0x351bd0);},'CkaSB':function(_0x1afc00,_0x2204ce,_0x271c5f){return _0x1afc00(_0x2204ce,_0x271c5f);}},_0x20cf14=_0x1d1637||await _0x38c99a['dNBIs'](getActiveFeatureId);if(!_0x20cf14)throw new Error(_0x38c99a[_0xd4f465(0x1fc)]);const _0x4d18d7=await getFeature(_0x20cf14);if(_0x4d18d7['latestReview']&&!_0x4d18d7['latestReview'][_0xd4f465(0x23f)])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x4d18d7['dashboardUrl']);await createChecklistItem(_0x20cf14,_0x150a2a);const _0x433410=await _0x38c99a[_0xd4f465(0x1ce)](getFeature,_0x20cf14);console[_0xd4f465(0x28b)](_0xd4f465(0x24e)),_0x38c99a[_0xd4f465(0x22f)](displayFeature,_0x433410,_0x433410[_0xd4f465(0x203)]);}export async function featureEditScenario(_0x4df225,_0x2f1280){const _0x2656a5=_0x2456e6,_0x31a1e6={'RWAGP':function(_0x463b3c){return _0x463b3c();},'GFTxd':_0x2656a5(0x272),'GuEbA':'Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','VLYQn':_0x2656a5(0x1a0),'MXoFf':_0x2656a5(0x27b),'rLYUZ':_0x2656a5(0x1a8),'FJAdW':_0x2656a5(0x209),'kTtyo':function(_0x3a2c7e,_0x3271c5){return _0x3a2c7e+_0x3271c5;},'xgYIR':function(_0x5de4ac,_0x119d2c){return _0x5de4ac-_0x119d2c;},'Cfoqz':function(_0x49df4b,_0x27aff3){return _0x49df4b<_0x27aff3;},'nGWpM':function(_0x19423b,_0x99872e){return _0x19423b>=_0x99872e;},'nLCJI':function(_0xb42480,_0x3d3926,_0x200dfa,_0xbd284c){return _0xb42480(_0x3d3926,_0x200dfa,_0xbd284c);},'uqzfM':function(_0x398fa4,_0x36e260,_0x87f789){return _0x398fa4(_0x36e260,_0x87f789);}},_0x1244f8=_0x2f1280['id']||await _0x31a1e6[_0x2656a5(0x216)](getActiveFeatureId);!_0x1244f8&&(console[_0x2656a5(0x259)](_0x31a1e6[_0x2656a5(0x1a1)]),console[_0x2656a5(0x259)](_0x31a1e6['GuEbA']),process[_0x2656a5(0x1b5)](0x1));const _0x4e69c3=await getFeature(_0x1244f8);_0x4e69c3[_0x2656a5(0x291)]&&!_0x4e69c3[_0x2656a5(0x291)][_0x2656a5(0x23f)]&&(console[_0x2656a5(0x259)]('\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.'),console[_0x2656a5(0x259)](_0x31a1e6[_0x2656a5(0x278)]),console['error']('\x20\x20'+_0x4e69c3['dashboardUrl']),process[_0x2656a5(0x1b5)](0x1));const _0x476be6=_0x4e69c3[_0x2656a5(0x203)]||[];_0x476be6[_0x2656a5(0x206)]===0x0&&(console[_0x2656a5(0x259)](_0x31a1e6[_0x2656a5(0x205)]),process['exit'](0x1));if(_0x2f1280['scenario']===undefined){console['error'](_0x31a1e6[_0x2656a5(0x20b)]),console[_0x2656a5(0x28b)](_0x31a1e6[_0x2656a5(0x25b)]);for(let _0x4d88bb=0x0;_0x4d88bb<_0x476be6['length'];_0x4d88bb++){console['log']('\x20\x20'+_0x31a1e6['kTtyo'](_0x4d88bb,0x1)+'.\x20'+_0x476be6[_0x4d88bb]['description']);}process[_0x2656a5(0x1b5)](0x1);}const _0x2896f6=_0x31a1e6['xgYIR'](_0x2f1280['scenario'],0x1);if(_0x31a1e6[_0x2656a5(0x1be)](_0x2896f6,0x0)||_0x31a1e6['nGWpM'](_0x2896f6,_0x476be6[_0x2656a5(0x206)])){console['error']('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x2f1280[_0x2656a5(0x201)]+_0x2656a5(0x267)+_0x476be6[_0x2656a5(0x206)]+_0x2656a5(0x1a5)),console[_0x2656a5(0x28b)]('\x0aAvailable\x20scenarios:');for(let _0x1c93b4=0x0;_0x1c93b4<_0x476be6[_0x2656a5(0x206)];_0x1c93b4++){console['log']('\x20\x20'+_0x31a1e6[_0x2656a5(0x228)](_0x1c93b4,0x1)+'.\x20'+_0x476be6[_0x1c93b4][_0x2656a5(0x27a)]);}process['exit'](0x1);}const _0x30f215=_0x476be6[_0x2896f6];await _0x31a1e6['nLCJI'](updateChecklistItem,_0x1244f8,_0x30f215['id'],{'description':_0x4df225});const _0x43e174=await getFeature(_0x1244f8);console[_0x2656a5(0x28b)]('\x0a✅\x20Scenario\x20updated'),_0x31a1e6[_0x2656a5(0x25f)](displayFeature,_0x43e174,_0x43e174['checklistItems']);}async function downloadFeedbackImage(_0x14e2cb,_0x4fcf4b){const _0x91bb77=_0x2456e6,_0xd51a88={'QIFuG':function(_0x44b515,_0x3d7faa,_0x22eed9){return _0x44b515(_0x3d7faa,_0x22eed9);},'NHbjz':_0x91bb77(0x293),'mfOfw':function(_0x38d502,_0x4c91b2){return _0x38d502(_0x4c91b2);}};try{const _0x5392f6=_0xd51a88[_0x91bb77(0x1c1)](join,getRangerDir(),_0xd51a88[_0x91bb77(0x240)]);await mkdir(_0x5392f6,{'recursive':!![]});const _0xb17063=join(_0x5392f6,_0x91bb77(0x24f)+_0x4fcf4b+_0x91bb77(0x28f)),_0x17ca2b=await _0xd51a88[_0x91bb77(0x1db)](fetch,_0x14e2cb);if(!_0x17ca2b['ok'])return null;const _0xf241d5=Buffer['from'](await _0x17ca2b['arrayBuffer']());return await _0xd51a88['QIFuG'](writeFile,_0xb17063,_0xf241d5),_0xb17063;}catch{return null;}}export async function featureGetReview(_0x5a2315){const _0x2a3ac5=_0x2456e6,_0xef7f90={'BHoPe':function(_0x585f25,_0xc284d0){return _0x585f25===_0xc284d0;},'vcnBE':function(_0x209ffb,_0x1a8af6){return _0x209ffb<_0x1a8af6;},'vfpOg':function(_0x173076,_0xd6f503){return _0x173076>_0xd6f503;},'RHoRT':'en-US','uDWrg':_0x2a3ac5(0x1e1),'cIoHi':function(_0x19043e,_0x5a5e74){return _0x19043e>=_0x5a5e74;}},_0x468894=_0x5a2315||await getActiveFeatureId();if(!_0x468894)throw new Error(_0x2a3ac5(0x251));const _0x253e25=await getFeature(_0x468894),{items:_0x1771ec}=await getActionItems(_0x468894);console['log']('\x0a📋\x20Feedback\x20for:\x20'+_0x253e25['name']+'\x20('+_0x253e25['id']+')\x0a');if(_0xef7f90[_0x2a3ac5(0x242)](_0x1771ec[_0x2a3ac5(0x206)],0x0)){console[_0x2a3ac5(0x28b)](_0x2a3ac5(0x292));return;}for(let _0x2d15ec=0x0;_0xef7f90[_0x2a3ac5(0x1c0)](_0x2d15ec,_0x1771ec[_0x2a3ac5(0x206)]);_0x2d15ec++){const _0x22a901=_0x1771ec[_0x2d15ec],_0x1f8173=_0xef7f90['vfpOg'](_0x22a901['version'],0x1)?_0x2a3ac5(0x19d)+_0x22a901[_0x2a3ac5(0x21f)]+')':'',_0x43710b=await getItemFeedback(_0x468894,_0x22a901['id']);if(_0x43710b[_0x2a3ac5(0x19f)][_0x2a3ac5(0x206)]>0x0){console[_0x2a3ac5(0x28b)]('Scenario\x20'+(_0x2d15ec+0x1)+_0x2a3ac5(0x1a4)+_0x22a901[_0x2a3ac5(0x27a)]+'\x22'+_0x1f8173+'\x20—\x20'+_0x43710b['unaddressedComments']['length']+'\x20unaddressed\x20comment(s)');for(const _0x4087a5 of _0x43710b[_0x2a3ac5(0x19f)]){const _0x5817e8=new Date(_0x4087a5[_0x2a3ac5(0x279)])['toLocaleDateString'](_0xef7f90[_0x2a3ac5(0x245)],{'month':_0x2a3ac5(0x220),'day':_0x2a3ac5(0x1ca)}),_0x28d894=_0x4087a5[_0x2a3ac5(0x1e0)]||_0x4087a5[_0x2a3ac5(0x235)]||_0xef7f90[_0x2a3ac5(0x1d1)];console['log'](_0x2a3ac5(0x213)+_0x28d894+'\x20('+_0x5817e8+_0x2a3ac5(0x1f1)+_0x4087a5[_0x2a3ac5(0x1dd)]+'\x22');if(_0x4087a5[_0x2a3ac5(0x1d7)]){const _0x2fb2b7=await downloadFeedbackImage(_0x4087a5[_0x2a3ac5(0x1d7)],_0x4087a5['id']);_0x2fb2b7&&console['log']('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x2fb2b7);}if(_0x4087a5[_0x2a3ac5(0x218)]){const _0x3c7f10=_0x4087a5[_0x2a3ac5(0x218)]['selector'][_0x2a3ac5(0x26e)]('\x20>\x20')[_0x2a3ac5(0x1ef)]()?.[_0x2a3ac5(0x26e)](':')[0x0]||_0x2a3ac5(0x1a3),_0x504652=_0x4087a5['domRef']['textContent']?'\x20\x22'+_0x4087a5[_0x2a3ac5(0x218)]['textContent'][_0x2a3ac5(0x1ec)](0x0,0x3c)+'\x22':'';console[_0x2a3ac5(0x28b)]('\x20\x20\x20\x20\x20🎯\x20Element:\x20<'+_0x3c7f10+'>'+_0x504652),console[_0x2a3ac5(0x28b)](_0x2a3ac5(0x21b)+_0x4087a5['domRef'][_0x2a3ac5(0x1a2)]);}else{if(_0x4087a5['spatial']){const _0x15e101=_0x4087a5[_0x2a3ac5(0x27e)][_0x2a3ac5(0x217)];_0xef7f90[_0x2a3ac5(0x242)](_0x4087a5['spatial'][_0x2a3ac5(0x1e5)],_0x2a3ac5(0x257))&&_0xef7f90['cIoHi'](_0x15e101[_0x2a3ac5(0x206)],0x2)?console[_0x2a3ac5(0x28b)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x15e101[0x0][_0x2a3ac5(0x207)](0x2)+',\x20'+_0x15e101[0x1]['toFixed'](0x2)+')'):console['log'](_0x2a3ac5(0x1ae)+_0x4087a5[_0x2a3ac5(0x27e)]['type']+_0x2a3ac5(0x1d3)+_0x15e101['map'](_0x32b187=>_0x32b187['toFixed'](0x2))[_0x2a3ac5(0x277)](',\x20')+']');}}}if(_0x43710b['canonicalFlow']){console['log'](_0x2a3ac5(0x261));for(const _0x24f4e5 of _0x43710b[_0x2a3ac5(0x1e9)]['split']('\x0a')){console['log']('\x20\x20\x20\x20'+_0x24f4e5);}}}else console['log']('Scenario\x20'+(_0x2d15ec+0x1)+_0x2a3ac5(0x1a4)+_0x22a901['description']+'\x22'+_0x1f8173+'\x20—\x20no\x20comments'),console[_0x2a3ac5(0x28b)](_0x2a3ac5(0x22b));console[_0x2a3ac5(0x28b)]('');}}export async function featureDelete(_0x3a2c8e){const _0x1a7fc2=_0x2456e6,_0xc1723c=_0x3a2c8e||await getActiveFeatureId();if(!_0xc1723c)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 _0x38133b=await getFeature(_0xc1723c);await softDeleteFeature(_0xc1723c),console[_0x1a7fc2(0x28b)]('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x38133b['name']+'\x20('+_0xc1723c+')'),console['log']('\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20'+_0xc1723c);}export async function featureRestore(_0x1af928){const _0x12a9e4=_0x2456e6,_0x2586c8={'NZDKg':function(_0x4b2047,_0x10bb18){return _0x4b2047(_0x10bb18);}};await _0x2586c8[_0x12a9e4(0x1f2)](restoreFeature,_0x1af928);const _0x35679d=await _0x2586c8[_0x12a9e4(0x1f2)](getFeature,_0x1af928);console[_0x12a9e4(0x28b)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x35679d['name']+'\x20('+_0x1af928+')'),displayFeature(_0x35679d,_0x35679d[_0x12a9e4(0x203)]);}