@ranger-testing/ranger-cli 2.2.0 → 2.2.1

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 (67) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/browserSessionsApi.js +1 -1
  35. package/build/commands/utils/claudeConfig.js +1 -1
  36. package/build/commands/utils/claudePlugin.js +1 -1
  37. package/build/commands/utils/crypto.js +1 -1
  38. package/build/commands/utils/desirePathLog.js +1 -1
  39. package/build/commands/utils/deviceAuth.js +1 -1
  40. package/build/commands/utils/environment.js +1 -1
  41. package/build/commands/utils/featureApi.js +1 -1
  42. package/build/commands/utils/featureReportGenerator.js +1 -1
  43. package/build/commands/utils/fixWebmDuration.js +1 -1
  44. package/build/commands/utils/git.js +1 -1
  45. package/build/commands/utils/keychain.js +1 -1
  46. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  47. package/build/commands/utils/mcpImageBase64.js +1 -1
  48. package/build/commands/utils/model.js +1 -1
  49. package/build/commands/utils/opencodeConfig.js +1 -1
  50. package/build/commands/utils/profileMessages.js +1 -1
  51. package/build/commands/utils/profileSetupBanner.js +1 -1
  52. package/build/commands/utils/rangerConfig.js +1 -1
  53. package/build/commands/utils/rangerRoot.js +1 -1
  54. package/build/commands/utils/reportGenerator.js +1 -1
  55. package/build/commands/utils/retry.js +1 -1
  56. package/build/commands/utils/sessionCache.js +1 -1
  57. package/build/commands/utils/settings.js +1 -1
  58. package/build/commands/utils/skillContent.js +1 -1
  59. package/build/commands/utils/skills.js +1 -1
  60. package/build/commands/utils/stitchWebmFiles.js +1 -1
  61. package/build/commands/utils/telemetry.js +1 -1
  62. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  63. package/build/commands/utils/userApi.js +1 -1
  64. package/build/commands/utils/version.js +1 -1
  65. package/build/commands/verifyFeature.js +1 -1
  66. package/build/commands/verifyInBrowser.js +1 -1
  67. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x2bbf37,_0x209acd){const _0x565b64=_0x42bd,_0x4f6eca=_0x2bbf37();while(!![]){try{const _0x5e2687=parseInt(_0x565b64(0x77))/0x1*(parseInt(_0x565b64(0x84))/0x2)+parseInt(_0x565b64(0x74))/0x3+parseInt(_0x565b64(0x8c))/0x4+parseInt(_0x565b64(0x7b))/0x5+parseInt(_0x565b64(0x80))/0x6+parseInt(_0x565b64(0x93))/0x7+-parseInt(_0x565b64(0x6e))/0x8;if(_0x5e2687===_0x209acd)break;else _0x4f6eca['push'](_0x4f6eca['shift']());}catch(_0x3f1876){_0x4f6eca['push'](_0x4f6eca['shift']());}}}(_0x416e,0xa8f4c));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x416e(){const _0x2e5e94=['browser_auth','trackPhaseStart','utf-8','5214600jEEONT','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','storageState','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','97594dgIbne','jPqEx','oKZlI','string','about:blank','config_write','goto','uRwau','1784544puVduW','stdin','close','log','pSMqe','✓\x20Auth\x20state\x20saved\x20to:\x20','TYZMS','3945382FNJDAV','.enc','isTTY','browser','bdHjE','xQEEh','24499032ThTLTt','qcRiV','launch','cVxEv','newPage','baseUrl','320250KFdEBn','\x0a✅\x20Profile\x20\x22','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','15cvuYub','trackPhaseEnd','\x22\x20authentication\x20updated','parse','5184280EcGMwx','IZIYp'];_0x416e=function(){return _0x2e5e94;};return _0x416e();}import{chromium}from'playwright';function _0x42bd(_0x37e12b,_0x233da7){_0x37e12b=_0x37e12b-0x6c;const _0x416eb9=_0x416e();let _0x42bd73=_0x416eb9[_0x37e12b];return _0x42bd73;}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x46d55e,_0x244b95){const _0x3a225e=_0x42bd,_0x212556={'nZYJZ':function(_0x1d7d1f){return _0x1d7d1f();},'jPqEx':function(_0x56638a,_0x3146f5){return _0x56638a(_0x3146f5);},'cVxEv':function(_0x29d8b1,_0x44471b,_0x53afb5){return _0x29d8b1(_0x44471b,_0x53afb5);},'qcRiV':'auth.json','gBHnd':_0x3a225e(0x94),'ByAqE':'Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','VXekR':function(_0xd34db1,_0x2b6e12){return _0xd34db1(_0x2b6e12);},'jofnQ':function(_0x62972,_0x522c16){return _0x62972(_0x522c16);},'uRwau':function(_0x89755f,_0x5ac666){return _0x89755f===_0x5ac666;},'IZIYp':function(_0x215cfe,_0x3a7a60){return _0x215cfe(_0x3a7a60);},'hiKZV':'browser_auth','JRGJm':'\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','XFSMd':'\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','xQEEh':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','qBElG':function(_0x3b7211,_0x3d0bf6){return _0x3b7211(_0x3d0bf6);},'bdHjE':function(_0x318d84,_0x1f0c56){return _0x318d84||_0x1f0c56;},'pSMqe':function(_0x207d76,_0x56aeb0,_0x2625fb){return _0x207d76(_0x56aeb0,_0x2625fb);},'qCQRO':'utf-8','motEp':function(_0x4222e3,_0x325408,_0x34a478){return _0x4222e3(_0x325408,_0x34a478);},'TYZMS':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','oKZlI':'config_write'},_0x26ca42=_0x212556['jPqEx'](getEnvDir,_0x46d55e),_0x36014f=join(_0x26ca42,'settings.json'),_0x17bb72=_0x212556['cVxEv'](join,_0x26ca42,_0x212556[_0x3a225e(0x6f)]),_0x3f0921=_0x17bb72+_0x212556['gBHnd'],_0x4d6bb4=process[_0x3a225e(0x8d)][_0x3a225e(0x95)]&&process['stdout']['isTTY'];if(!_0x4d6bb4)throw new Error(_0x212556['ByAqE']);if(!_0x212556['VXekR'](existsSync,_0x26ca42))throw new Error('Profile\x20\x22'+_0x46d55e+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x46d55e);if(!_0x212556['jofnQ'](existsSync,_0x36014f))throw new Error('Config\x20not\x20found\x20at\x20'+_0x36014f+_0x3a225e(0x81)+_0x46d55e);const _0x31023f=await readFile(_0x36014f,_0x3a225e(0x7f)),_0xdee712=JSON[_0x3a225e(0x7a)](_0x31023f),_0x393d41=resolveEnvVars(_0xdee712),_0x39a693=_0x212556[_0x3a225e(0x8b)](typeof _0x393d41[_0x3a225e(0x73)],_0x3a225e(0x87))?_0x393d41[_0x3a225e(0x73)]:undefined,_0x22a02f=_0x212556['jPqEx'](existsSync,_0x17bb72),_0x445472=_0x212556[_0x3a225e(0x7c)](isEnvCi,_0x46d55e);_0x244b95?.['trackPhaseStart'](_0x212556['hiKZV']),console[_0x3a225e(0x8f)]('\x0a📋\x20Authentication\x20Update'),console[_0x3a225e(0x8f)](_0x212556['JRGJm']),console[_0x3a225e(0x8f)](_0x212556['XFSMd']),console['log'](_0x212556[_0x3a225e(0x6d)]);const {launchOptions:_0x12e78e,contextOptions:_0x2f980c}=_0x212556[_0x3a225e(0x71)](buildBrowserOptionsFromSettings,_0x393d41,{'headless':![],'storageStatePath':_0x22a02f?_0x17bb72:undefined}),_0x272e97=await chromium[_0x3a225e(0x70)](_0x12e78e);let _0x1116a3=null;try{_0x1116a3=await _0x272e97['newContext'](_0x2f980c),await _0x212556['qBElG'](addProfileSetupBanner,_0x1116a3);const _0x2930c7=await _0x1116a3[_0x3a225e(0x72)]();await _0x2930c7[_0x3a225e(0x8a)](_0x212556[_0x3a225e(0x6c)](_0x39a693,_0x3a225e(0x88))),await new Promise(_0x3435cf=>{const _0x161638=_0x3a225e;_0x2930c7['on'](_0x161638(0x8e),async()=>{const _0x26744e=_0x161638;try{console[_0x26744e(0x8f)]('Saving\x20authentication\x20state...'),await _0x1116a3?.[_0x26744e(0x82)]({'path':_0x17bb72}),_0x3435cf();}catch{_0x212556['nZYJZ'](_0x3435cf);}});});}finally{_0x1116a3&&await _0x1116a3[_0x3a225e(0x8e)]()['catch'](()=>{}),await _0x272e97['close']()['catch'](()=>{});}if(_0x445472){const _0x1e9dda=await _0x212556[_0x3a225e(0x90)](readFile,_0x17bb72,_0x212556['qCQRO']),_0x5f3677=await getToken();if(!_0x5f3677)console['error'](_0x3a225e(0x83)),console['log'](_0x3a225e(0x91)+_0x17bb72);else{const _0x50f489=_0x212556['motEp'](encrypt,_0x1e9dda,_0x5f3677);await _0x212556['pSMqe'](writeFile,_0x3f0921,_0x50f489),await _0x212556[_0x3a225e(0x85)](unlink,_0x17bb72),console[_0x3a225e(0x8f)](_0x3a225e(0x76)+_0x3f0921),console['log'](_0x212556[_0x3a225e(0x92)]),console['log']('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.');}}else console['log'](_0x3a225e(0x91)+_0x17bb72);_0x244b95?.[_0x3a225e(0x78)](_0x3a225e(0x7d)),_0x244b95?.[_0x3a225e(0x7e)](_0x212556[_0x3a225e(0x86)]),_0xdee712['browser']=_0xdee712[_0x3a225e(0x96)]||{},_0xdee712[_0x3a225e(0x96)]['contextOptions']=_0xdee712[_0x3a225e(0x96)]['contextOptions']||{},_0xdee712[_0x3a225e(0x96)]['contextOptions'][_0x3a225e(0x82)]=_0x17bb72,await _0x212556[_0x3a225e(0x90)](writeFile,_0x36014f,JSON['stringify'](_0xdee712,null,0x2)),console[_0x3a225e(0x8f)]('✓\x20Updated\x20config:\x20'+_0x36014f),_0x244b95?.['trackPhaseEnd'](_0x3a225e(0x89)),console[_0x3a225e(0x8f)](_0x3a225e(0x75)+_0x46d55e+_0x3a225e(0x79));}
1
+ (function(_0x1822ea,_0x458643){const _0x5c6b14=_0x260f,_0x135097=_0x1822ea();while(!![]){try{const _0x1e4680=-parseInt(_0x5c6b14(0x103))/0x1*(parseInt(_0x5c6b14(0x122))/0x2)+parseInt(_0x5c6b14(0x117))/0x3+-parseInt(_0x5c6b14(0x10e))/0x4*(-parseInt(_0x5c6b14(0x109))/0x5)+parseInt(_0x5c6b14(0x110))/0x6+parseInt(_0x5c6b14(0x10a))/0x7*(parseInt(_0x5c6b14(0xfb))/0x8)+-parseInt(_0x5c6b14(0x10b))/0x9*(-parseInt(_0x5c6b14(0x114))/0xa)+parseInt(_0x5c6b14(0xfd))/0xb*(-parseInt(_0x5c6b14(0x112))/0xc);if(_0x1e4680===_0x458643)break;else _0x135097['push'](_0x135097['shift']());}catch(_0x249173){_0x135097['push'](_0x135097['shift']());}}}(_0x4604,0xe84d8));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';function _0x260f(_0xdc119d,_0x23d86d){_0xdc119d=_0xdc119d-0xf9;const _0x46047d=_0x4604();let _0x260f4b=_0x46047d[_0xdc119d];return _0x260f4b;}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x48ef5f,_0x26c77a){const _0xafbffc=_0x260f,_0x35af39={'PuyLI':function(_0x183d45){return _0x183d45();},'edWyX':function(_0x5301ef,_0x4f15d3){return _0x5301ef+_0x4f15d3;},'BmvMi':_0xafbffc(0x128),'HUCYs':_0xafbffc(0x11e),'RRJTR':function(_0x329015,_0x50b38d){return _0x329015(_0x50b38d);},'MYFMv':'utf-8','DbPbS':function(_0x4fdb46,_0x3c40e2){return _0x4fdb46===_0x3c40e2;},'yaMTr':function(_0x468daa,_0x133774,_0x26c3a8){return _0x468daa(_0x133774,_0x26c3a8);},'PumXH':_0xafbffc(0x10f),'pPrSe':function(_0x2ef7a4,_0x41d8f6,_0x4a0fda){return _0x2ef7a4(_0x41d8f6,_0x4a0fda);},'Zexge':_0xafbffc(0x10d)},_0x341c7e=getEnvDir(_0x48ef5f),_0x40c569=join(_0x341c7e,_0xafbffc(0x108)),_0xb8b805=join(_0x341c7e,_0xafbffc(0x121)),_0x3e6ab3=_0x35af39['edWyX'](_0xb8b805,_0x35af39[_0xafbffc(0x116)]),_0x48bf1a=process[_0xafbffc(0x102)][_0xafbffc(0x115)]&&process['stdout'][_0xafbffc(0x115)];if(!_0x48bf1a)throw new Error(_0x35af39['HUCYs']);if(!_0x35af39[_0xafbffc(0x120)](existsSync,_0x341c7e))throw new Error('Profile\x20\x22'+_0x48ef5f+_0xafbffc(0x123)+_0x48ef5f);if(!_0x35af39[_0xafbffc(0x120)](existsSync,_0x40c569))throw new Error(_0xafbffc(0x118)+_0x40c569+_0xafbffc(0x11f)+_0x48ef5f);const _0x2b9515=await readFile(_0x40c569,_0x35af39['MYFMv']),_0x33bc59=JSON['parse'](_0x2b9515),_0x350b23=resolveEnvVars(_0x33bc59),_0x4b7e42=_0x35af39[_0xafbffc(0xfe)](typeof _0x350b23[_0xafbffc(0x107)],'string')?_0x350b23[_0xafbffc(0x107)]:undefined,_0x22bbce=_0x35af39[_0xafbffc(0x120)](existsSync,_0xb8b805),_0x1fd735=isEnvCi(_0x48ef5f);_0x26c77a?.['trackPhaseStart']('browser_auth'),console['log'](_0xafbffc(0x126)),console[_0xafbffc(0x11a)](_0xafbffc(0x100)),console['log'](_0xafbffc(0x11d)),console['log'](_0xafbffc(0x105));const {launchOptions:_0x20ced8,contextOptions:_0x27ace9}=_0x35af39['yaMTr'](buildBrowserOptionsFromSettings,_0x350b23,{'headless':![],'storageStatePath':_0x22bbce?_0xb8b805:undefined}),_0x5a3513=await chromium['launch'](_0x20ced8);let _0x5963f7=null;try{_0x5963f7=await _0x5a3513[_0xafbffc(0x119)](_0x27ace9),await addProfileSetupBanner(_0x5963f7);const _0x16c2dc=await _0x5963f7[_0xafbffc(0x113)]();await _0x16c2dc[_0xafbffc(0xfc)](_0x4b7e42||'about:blank'),await new Promise(_0x56580a=>{const _0x4e12ae=_0xafbffc;_0x16c2dc['on'](_0x4e12ae(0x10c),async()=>{const _0x5d2676=_0x4e12ae;try{console[_0x5d2676(0x11a)](_0x5d2676(0x11b)),await _0x5963f7?.['storageState']({'path':_0xb8b805}),_0x56580a();}catch{_0x35af39['PuyLI'](_0x56580a);}});});}finally{_0x5963f7&&await _0x5963f7['close']()['catch'](()=>{}),await _0x5a3513[_0xafbffc(0x10c)]()['catch'](()=>{});}if(_0x1fd735){const _0x45894d=await readFile(_0xb8b805,_0xafbffc(0x127)),_0xa24d5a=await getToken();if(!_0xa24d5a)console[_0xafbffc(0x124)](_0x35af39[_0xafbffc(0x101)]),console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0xb8b805);else{const _0x305673=encrypt(_0x45894d,_0xa24d5a);await _0x35af39['pPrSe'](writeFile,_0x3e6ab3,_0x305673),await unlink(_0xb8b805),console[_0xafbffc(0x11a)](_0xafbffc(0x11c)+_0x3e6ab3),console[_0xafbffc(0x11a)](_0xafbffc(0x104)),console['log']('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.');}}else console[_0xafbffc(0x11a)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0xb8b805);_0x26c77a?.['trackPhaseEnd']('browser_auth'),_0x26c77a?.['trackPhaseStart'](_0x35af39['Zexge']),_0x33bc59['browser']=_0x33bc59['browser']||{},_0x33bc59[_0xafbffc(0x125)]['contextOptions']=_0x33bc59[_0xafbffc(0x125)][_0xafbffc(0x106)]||{},_0x33bc59[_0xafbffc(0x125)]['contextOptions']['storageState']=_0xb8b805,await writeFile(_0x40c569,JSON[_0xafbffc(0xfa)](_0x33bc59,null,0x2)),console['log'](_0xafbffc(0xf9)+_0x40c569),_0x26c77a?.[_0xafbffc(0xff)]('config_write'),console['log']('\x0a✅\x20Profile\x20\x22'+_0x48ef5f+_0xafbffc(0x111));}function _0x4604(){const _0x1d416c=['\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','RRJTR','auth.json','400366CGhBKy','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','error','browser','\x0a📋\x20Authentication\x20Update','utf-8','.enc','✓\x20Updated\x20config:\x20','stringify','1577064KjepnQ','goto','1034NPXgvq','DbPbS','trackPhaseEnd','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','PumXH','stdin','2qMpYwv','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','contextOptions','baseUrl','settings.json','48715ctdkaU','63pNLqaG','9oQJTcp','close','config_write','644rcDwmg','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','5621508sMrqEb','\x22\x20authentication\x20updated','731532VRgTHF','newPage','14071530JqkBOU','isTTY','BmvMi','4185963xFnupd','Config\x20not\x20found\x20at\x20','newContext','log','Saving\x20authentication\x20state...','✓\x20Encrypted\x20auth\x20saved\x20to:\x20'];_0x4604=function(){return _0x1d416c;};return _0x4604();}
@@ -1 +1 @@
1
- (function(_0x22edf2,_0x718c9b){const _0x58a89b=_0xf9df,_0x50bcd7=_0x22edf2();while(!![]){try{const _0x43c619=-parseInt(_0x58a89b(0xce))/0x1+-parseInt(_0x58a89b(0xd3))/0x2+-parseInt(_0x58a89b(0xc7))/0x3+-parseInt(_0x58a89b(0xd2))/0x4*(parseInt(_0x58a89b(0xcb))/0x5)+-parseInt(_0x58a89b(0xd1))/0x6*(parseInt(_0x58a89b(0xd0))/0x7)+-parseInt(_0x58a89b(0xcf))/0x8+parseInt(_0x58a89b(0xca))/0x9*(parseInt(_0x58a89b(0xc8))/0xa);if(_0x43c619===_0x718c9b)break;else _0x50bcd7['push'](_0x50bcd7['shift']());}catch(_0x429106){_0x50bcd7['push'](_0x50bcd7['shift']());}}}(_0x4e33,0x4f0b2));import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';function _0xf9df(_0x55faec,_0x3539b0){_0x55faec=_0x55faec-0xc7;const _0x4e334d=_0x4e33();let _0xf9df40=_0x4e334d[_0x55faec];return _0xf9df40;}function _0x4e33(){const _0x3390cb=['settings.json','299365OrFFLo','1646000GccrHJ','159096QrjNmy','66OcyhSk','9064NPUZVy','525482yhzEas','1657980EWQCFQ','26500OblQfy','\x0a✓\x20Now\x20using\x20profile\x20\x22','6849EevIYk','270SCmElj','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'];_0x4e33=function(){return _0x3390cb;};return _0x4e33();}import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x36fb00){const _0x5f15c8=_0xf9df,_0x55b1de={'oRcfy':_0x5f15c8(0xcd),'hZhNy':function(_0x32fc51,_0x3619e7){return _0x32fc51(_0x3619e7);}},_0x54f29f=getEnvDir(_0x36fb00),_0x261b4c=join(_0x54f29f,_0x55b1de['oRcfy']);if(!_0x55b1de['hZhNy'](existsSync,_0x54f29f))throw new Error('Profile\x20\x22'+_0x36fb00+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x36fb00);if(!_0x55b1de['hZhNy'](existsSync,_0x261b4c))throw new Error('Config\x20not\x20found\x20at\x20'+_0x261b4c+_0x5f15c8(0xcc)+_0x36fb00);await writeActiveProfileName(_0x36fb00),console['log'](_0x5f15c8(0xc9)+_0x36fb00+'\x22');}
1
+ (function(_0x5e0669,_0x114926){const _0x364797=_0xdbcd,_0x2c0ca1=_0x5e0669();while(!![]){try{const _0x19f843=-parseInt(_0x364797(0xba))/0x1+parseInt(_0x364797(0xc1))/0x2+-parseInt(_0x364797(0xc3))/0x3*(parseInt(_0x364797(0xbb))/0x4)+parseInt(_0x364797(0xbe))/0x5*(-parseInt(_0x364797(0xc4))/0x6)+parseInt(_0x364797(0xca))/0x7*(parseInt(_0x364797(0xc7))/0x8)+parseInt(_0x364797(0xc0))/0x9+parseInt(_0x364797(0xc2))/0xa;if(_0x19f843===_0x114926)break;else _0x2c0ca1['push'](_0x2c0ca1['shift']());}catch(_0x4858f2){_0x2c0ca1['push'](_0x2c0ca1['shift']());}}}(_0xe5d7,0x79ace));function _0xe5d7(){const _0x248d14=['38818WBihKB','33284JNAPVE','QeJwQ','log','126385gLnLhE','RWuNA','8011656qpwTqT','620362CJzfAe','2839540BZVyCa','342LinWYE','174fevppX','Config\x20not\x20found\x20at\x20','COBFQ','96IABuMq','\x0a✓\x20Now\x20using\x20profile\x20\x22','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','428463tIgDOb'];_0xe5d7=function(){return _0x248d14;};return _0xe5d7();}function _0xdbcd(_0x36da8f,_0x45ac8b){_0x36da8f=_0x36da8f-0xba;const _0xe5d754=_0xe5d7();let _0xdbcdf1=_0xe5d754[_0x36da8f];return _0xdbcdf1;}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x3c0631){const _0x26fc1d=_0xdbcd,_0x4e4bcf={'COBFQ':function(_0x1b0b9c,_0x55170f,_0x4c4d96){return _0x1b0b9c(_0x55170f,_0x4c4d96);},'QeJwQ':'settings.json','RWuNA':function(_0x21ba9,_0x58ba63){return _0x21ba9(_0x58ba63);},'kkjYn':function(_0x272f8f,_0x3b69d6){return _0x272f8f(_0x3b69d6);}},_0x5552e1=getEnvDir(_0x3c0631),_0x6e1821=_0x4e4bcf[_0x26fc1d(0xc6)](join,_0x5552e1,_0x4e4bcf[_0x26fc1d(0xbc)]);if(!_0x4e4bcf['RWuNA'](existsSync,_0x5552e1))throw new Error('Profile\x20\x22'+_0x3c0631+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3c0631);if(!_0x4e4bcf['kkjYn'](existsSync,_0x6e1821))throw new Error(_0x26fc1d(0xc5)+_0x6e1821+_0x26fc1d(0xc9)+_0x3c0631);await _0x4e4bcf[_0x26fc1d(0xbf)](writeActiveProfileName,_0x3c0631),console[_0x26fc1d(0xbd)](_0x26fc1d(0xc8)+_0x3c0631+'\x22');}
@@ -1 +1 @@
1
- (function(_0x4ec012,_0x2d8b94){const _0x27d4e7=_0x4cfa,_0x1298bb=_0x4ec012();while(!![]){try{const _0x77965d=parseInt(_0x27d4e7(0xaa))/0x1*(parseInt(_0x27d4e7(0xb0))/0x2)+parseInt(_0x27d4e7(0x9e))/0x3*(-parseInt(_0x27d4e7(0xa6))/0x4)+parseInt(_0x27d4e7(0xa8))/0x5*(-parseInt(_0x27d4e7(0xa1))/0x6)+parseInt(_0x27d4e7(0xaf))/0x7*(-parseInt(_0x27d4e7(0x9d))/0x8)+parseInt(_0x27d4e7(0xae))/0x9*(-parseInt(_0x27d4e7(0xad))/0xa)+-parseInt(_0x27d4e7(0xb2))/0xb+-parseInt(_0x27d4e7(0x9c))/0xc*(-parseInt(_0x27d4e7(0xac))/0xd);if(_0x77965d===_0x2d8b94)break;else _0x1298bb['push'](_0x1298bb['shift']());}catch(_0x186b19){_0x1298bb['push'](_0x1298bb['shift']());}}}(_0x4fb6,0x1da31));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';function _0x4fb6(){const _0x16759b=['trim','11616CgyRQM','vPXAz','79356bIJvbl','8Nlvmot','9bLgLQu','wxRwQ','QMtSy','754302LWgppE','ccKCT','uYMnA','PujHC','ZFaUf','27868PwDTgB','hWprg','5YFmAvi','OGxrU','7FZzNey','utf-8','377sCIdJO','90710btzOUp','108jXmpas','173033eLCoGL','60246LKKoKz'];_0x4fb6=function(){return _0x16759b;};return _0x4fb6();}import{join}from'path';import{getRangerDir}from'./rangerRoot.js';function _0x4cfa(_0x5eafa8,_0x118cae){_0x5eafa8=_0x5eafa8-0x9b;const _0x4fb644=_0x4fb6();let _0x4cfa22=_0x4fb644[_0x5eafa8];return _0x4cfa22;}const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0x119ace={'frJmA':function(_0x51af01,_0x1385fb,_0x250382){return _0x51af01(_0x1385fb,_0x250382);}};return _0x119ace['frJmA'](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x50313c=_0x4cfa,_0x421297={'nNeQg':function(_0x4b3704,_0x4de53c,_0x11a944){return _0x4b3704(_0x4de53c,_0x11a944);},'ccKCT':function(_0x5984df){return _0x5984df();}};return _0x421297['nNeQg'](join,_0x421297[_0x50313c(0xa2)](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x43b954=_0x4cfa,_0x423e31={'QMtSy':function(_0x5bd71c){return _0x5bd71c();},'hWprg':function(_0x23ccf5,_0x25882a){return _0x23ccf5(_0x25882a);},'OsSKv':function(_0x1433c5,_0x442868,_0x11f764){return _0x1433c5(_0x442868,_0x11f764);},'lgfBe':function(_0x49e78e,_0x5514b6,_0x581d70){return _0x49e78e(_0x5514b6,_0x581d70);},'OuxSs':function(_0x1a85b3,_0x56cf2a,_0x477847,_0x457ae5){return _0x1a85b3(_0x56cf2a,_0x477847,_0x457ae5);}},_0x8cb164=_0x423e31['QMtSy'](getLegacyActiveEnvPath);if(!_0x423e31[_0x43b954(0xa7)](existsSync,_0x8cb164))return null;let _0x3ed7f3=null;try{_0x3ed7f3=(await _0x423e31['OsSKv'](readFile,_0x8cb164,_0x43b954(0xab)))[_0x43b954(0xb1)]()||null;}catch{_0x3ed7f3=null;}if(!_0x3ed7f3)return null;const _0x37938a=_0x423e31[_0x43b954(0xa0)](getActiveProfilePath);try{await _0x423e31['lgfBe'](rename,_0x8cb164,_0x37938a);}catch{try{const _0x1eaa56=getRangerDir();await _0x423e31['lgfBe'](mkdir,_0x1eaa56,{'recursive':!![]}),await _0x423e31['OuxSs'](writeFile,_0x37938a,_0x3ed7f3,_0x43b954(0xab)),await unlink(_0x8cb164);}catch{}}return _0x3ed7f3;}export async function readActiveProfileName(){const _0x528976=_0x4cfa,_0x288daf={'PujHC':function(_0x2a7903){return _0x2a7903();},'wxRwQ':function(_0x591ac2,_0xf624e2){return _0x591ac2(_0xf624e2);},'uYMnA':'utf-8'},_0x4dc5a8=_0x288daf['PujHC'](getActiveProfilePath);if(_0x288daf[_0x528976(0x9f)](existsSync,_0x4dc5a8))try{return(await readFile(_0x4dc5a8,_0x288daf[_0x528976(0xa3)]))['trim']()||null;}catch{return null;}return await _0x288daf[_0x528976(0xa4)](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x3462e8){const _0x5e15d8=_0x4cfa,_0x56ff47={'ozJaJ':function(_0x55ee05){return _0x55ee05();},'OGxrU':function(_0x3e336b,_0x282619,_0x34daa9){return _0x3e336b(_0x282619,_0x34daa9);},'vPXAz':'utf-8','ZFaUf':function(_0x5f2285,_0x267d26){return _0x5f2285(_0x267d26);}},_0x10e156=_0x56ff47['ozJaJ'](getRangerDir);await _0x56ff47[_0x5e15d8(0xa9)](mkdir,_0x10e156,{'recursive':!![]});const _0x1d02dc=getActiveProfilePath();await writeFile(_0x1d02dc,_0x3462e8,_0x56ff47[_0x5e15d8(0x9b)]);const _0x397d13=getLegacyActiveEnvPath();if(_0x56ff47[_0x5e15d8(0xa5)](existsSync,_0x397d13))try{await unlink(_0x397d13);}catch{}}export async function migrateActiveProfileFile(){const _0x47a2a0={'qwPOu':function(_0x289cbb,_0x2d5b27){return _0x289cbb!==_0x2d5b27;}},_0x1688f9=await migrateLegacyActiveEnv();return _0x47a2a0['qwPOu'](_0x1688f9,null);}
1
+ const _0x19ffce=_0x1d96;(function(_0x1afc84,_0x2c7255){const _0x4c99e3=_0x1d96,_0x5dfcf8=_0x1afc84();while(!![]){try{const _0xd8f945=-parseInt(_0x4c99e3(0x134))/0x1+-parseInt(_0x4c99e3(0x12d))/0x2+-parseInt(_0x4c99e3(0x12b))/0x3+-parseInt(_0x4c99e3(0x12f))/0x4*(-parseInt(_0x4c99e3(0x137))/0x5)+parseInt(_0x4c99e3(0x126))/0x6+-parseInt(_0x4c99e3(0x12c))/0x7*(-parseInt(_0x4c99e3(0x132))/0x8)+-parseInt(_0x4c99e3(0x127))/0x9*(parseInt(_0x4c99e3(0x130))/0xa);if(_0xd8f945===_0x2c7255)break;else _0x5dfcf8['push'](_0x5dfcf8['shift']());}catch(_0x5639c1){_0x5dfcf8['push'](_0x5dfcf8['shift']());}}}(_0x285c,0xd8bfb));import{existsSync}from'fs';import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';function _0x285c(){const _0x2e45b8=['ukPMv','DgDIm','2532441pjdNuL','7XmkSzo','881288ShVHDj','utf-8','820EkKhAG','10YkHeNS','QwjMB','12858280sBbmQs','awPZe','739553MxYovx','active-profile.txt','YfOjo','17725gSXxJQ','Umitn','8945856wqlCHF','8215551LgXVlA','sOOOT'];_0x285c=function(){return _0x2e45b8;};return _0x285c();}import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE=_0x19ffce(0x135),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){const _0xddcaed=_0x19ffce,_0xa51281={'DgDIm':function(_0x1ea21c){return _0x1ea21c();}};return join(_0xa51281[_0xddcaed(0x12a)](getRangerDir),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x437524=_0x19ffce,_0x4b54a4={'awPZe':function(_0x4d5486,_0x227828,_0x43208c){return _0x4d5486(_0x227828,_0x43208c);}};return _0x4b54a4[_0x437524(0x133)](join,getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}function _0x1d96(_0x49695d,_0x24193c){_0x49695d=_0x49695d-0x126;const _0x285c8b=_0x285c();let _0x1d9647=_0x285c8b[_0x49695d];return _0x1d9647;}async function migrateLegacyActiveEnv(){const _0x322cbb=_0x19ffce,_0xd63a7c={'ALszv':function(_0x231592,_0x17fad9,_0x1492f0){return _0x231592(_0x17fad9,_0x1492f0);},'EFMmH':_0x322cbb(0x12e),'dBtbE':function(_0x1626e8){return _0x1626e8();},'Umitn':function(_0x2044e9,_0x21822f,_0x1ed193){return _0x2044e9(_0x21822f,_0x1ed193);}},_0xc871e=getLegacyActiveEnvPath();if(!existsSync(_0xc871e))return null;let _0x26603f=null;try{_0x26603f=(await _0xd63a7c['ALszv'](readFile,_0xc871e,_0xd63a7c['EFMmH']))['trim']()||null;}catch{_0x26603f=null;}if(!_0x26603f)return null;const _0x42ffec=_0xd63a7c['dBtbE'](getActiveProfilePath);try{await _0xd63a7c[_0x322cbb(0x138)](rename,_0xc871e,_0x42ffec);}catch{try{const _0x5888a7=_0xd63a7c['dBtbE'](getRangerDir);await mkdir(_0x5888a7,{'recursive':!![]}),await writeFile(_0x42ffec,_0x26603f,'utf-8'),await unlink(_0xc871e);}catch{}}return _0x26603f;}export async function readActiveProfileName(){const _0x3eb6d6=_0x19ffce,_0x4ae9f0={'ukPMv':function(_0x58e993){return _0x58e993();},'QwjMB':function(_0x5c3d60,_0x24857d){return _0x5c3d60(_0x24857d);},'sOOOT':_0x3eb6d6(0x12e)},_0x5298c3=_0x4ae9f0[_0x3eb6d6(0x129)](getActiveProfilePath);if(_0x4ae9f0[_0x3eb6d6(0x131)](existsSync,_0x5298c3))try{return(await readFile(_0x5298c3,_0x4ae9f0[_0x3eb6d6(0x128)]))['trim']()||null;}catch{return null;}return await _0x4ae9f0['ukPMv'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x5e9d19){const _0x3af34a=_0x19ffce,_0x286990={'YfOjo':function(_0x1ee851){return _0x1ee851();},'MPGDF':'utf-8','xFanM':function(_0x58db59,_0xf8c7cc){return _0x58db59(_0xf8c7cc);}},_0x293b4c=_0x286990[_0x3af34a(0x136)](getRangerDir);await mkdir(_0x293b4c,{'recursive':!![]});const _0x1fb271=getActiveProfilePath();await writeFile(_0x1fb271,_0x5e9d19,_0x286990['MPGDF']);const _0x1191a1=_0x286990[_0x3af34a(0x136)](getLegacyActiveEnvPath);if(_0x286990['xFanM'](existsSync,_0x1191a1))try{await unlink(_0x1191a1);}catch{}}export async function migrateActiveProfileFile(){const _0xac85e8={'UQkfc':function(_0x3ad526,_0x2ebb9e){return _0x3ad526!==_0x2ebb9e;}},_0x5bd19f=await migrateLegacyActiveEnv();return _0xac85e8['UQkfc'](_0x5bd19f,null);}
@@ -1 +1 @@
1
- (function(_0x43b6e6,_0x312b80){const _0x1635aa=_0x549c,_0x5ecc5d=_0x43b6e6();while(!![]){try{const _0x4fa40d=-parseInt(_0x1635aa(0xaf))/0x1*(-parseInt(_0x1635aa(0x94))/0x2)+parseInt(_0x1635aa(0xc7))/0x3*(-parseInt(_0x1635aa(0xd7))/0x4)+-parseInt(_0x1635aa(0x9d))/0x5+-parseInt(_0x1635aa(0xb8))/0x6+-parseInt(_0x1635aa(0xc1))/0x7*(-parseInt(_0x1635aa(0x8f))/0x8)+parseInt(_0x1635aa(0xde))/0x9*(parseInt(_0x1635aa(0xbc))/0xa)+parseInt(_0x1635aa(0xdf))/0xb;if(_0x4fa40d===_0x312b80)break;else _0x5ecc5d['push'](_0x5ecc5d['shift']());}catch(_0x4b9d09){_0x5ecc5d['push'](_0x5ecc5d['shift']());}}}(_0x18ab,0x9340d));const _0x4e5a44=(function(){const _0x1f7909=_0x549c,_0x1d82cf={'ZroTz':function(_0x5c2741,_0x32a4f3){return _0x5c2741!==_0x32a4f3;},'XIxvr':'rIRWS','sVlWe':_0x1f7909(0xc5)};let _0x5e1a63=!![];return function(_0x34618a,_0x38910d){const _0x519457=_0x1f7909,_0x1d961c={'iDAoK':function(_0x8a8529,_0x4c5029){return _0x1d82cf['ZroTz'](_0x8a8529,_0x4c5029);},'ilvxn':_0x1d82cf['XIxvr']};if(_0x1d82cf[_0x519457(0xb5)]!==_0x519457(0xc5))throw new _0x56ec2f(_0x519457(0xc0));else{const _0x51bda8=_0x5e1a63?function(){const _0x239963=_0x519457;if(_0x38910d){if(_0x1d961c[_0x239963(0xb6)](_0x1d961c[_0x239963(0xc9)],_0x1d961c['ilvxn'])){const _0x451036=_0x578eda?function(){if(_0x36448f){const _0x4438c2=_0x565657['apply'](_0xfe22e6,arguments);return _0x4e47a6=null,_0x4438c2;}}:function(){};return _0x2667dd=![],_0x451036;}else{const _0x3caad8=_0x38910d[_0x239963(0xae)](_0x34618a,arguments);return _0x38910d=null,_0x3caad8;}}}:function(){};return _0x5e1a63=![],_0x51bda8;}};}()),_0x7948d8=_0x4e5a44(this,function(){const _0x432fd7=_0x549c;return _0x7948d8[_0x432fd7(0xce)]()[_0x432fd7(0xe0)](_0x432fd7(0xb1))[_0x432fd7(0xce)]()[_0x432fd7(0xc8)](_0x7948d8)[_0x432fd7(0xe0)]('(((.+)+)+)+$');});_0x7948d8();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x5c09bd){const _0x4ae703=_0x549c,_0x28c8a1={'LBKCW':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','rEdVl':function(_0x169b29){return _0x169b29();},'CkmsI':function(_0x5d6ea0,_0x5794ad,_0x12a52d){return _0x5d6ea0(_0x5794ad,_0x12a52d);},'ZIGIU':_0x4ae703(0xeb),'TkFcc':'application/json'},_0x1ecb19=await getToken();if(!_0x1ecb19)throw new Error(_0x28c8a1[_0x4ae703(0xa7)]);const _0x5b67f3=_0x28c8a1['rEdVl'](getApiBaseUrl),_0x5337d3=await _0x28c8a1['CkmsI'](fetch,_0x5b67f3+_0x4ae703(0xdd),{'method':_0x28c8a1[_0x4ae703(0xbe)],'headers':{'Authorization':'Bearer\x20'+_0x1ecb19,'Content-Type':_0x28c8a1[_0x4ae703(0x96)]},'body':JSON[_0x4ae703(0x8b)]({'environmentName':_0x5c09bd?.['environmentName'],'settings':_0x5c09bd?.[_0x4ae703(0xb0)],'task':_0x5c09bd?.[_0x4ae703(0xd8)],'url':_0x5c09bd?.[_0x4ae703(0xa5)],'featureId':_0x5c09bd?.[_0x4ae703(0xd5)],'checklistItemId':_0x5c09bd?.[_0x4ae703(0xd0)]})});if(!_0x5337d3['ok']){const _0x2a5159=await _0x5337d3[_0x4ae703(0xa3)]();throw new Error(_0x4ae703(0xdc)+_0x2a5159);}return _0x5337d3[_0x4ae703(0x93)]();}export async function updateBrowserSession(_0x30600d,_0x3b3d72){const _0x40dc7f=_0x549c,_0x120fd4={'wvjYf':function(_0x4d9c44,_0x5cae16){return _0x4d9c44(_0x5cae16);},'hjpJu':function(_0x1c53e5){return _0x1c53e5();},'cueHD':_0x40dc7f(0xc0),'bcxCo':function(_0x41a6e4){return _0x41a6e4();},'kphrd':_0x40dc7f(0xd3),'bxtaB':function(_0x1bbb53,_0x1b3935){return _0x1bbb53===_0x1b3935;},'gbxvL':_0x40dc7f(0x97),'wjKIP':_0x40dc7f(0xa6)};return withRetry(async()=>{const _0x37e185=_0x40dc7f,_0x462a1f={'qwaAf':function(_0x21fa61,_0xc7d1ef){const _0x3d66b4=_0x549c;return _0x120fd4[_0x3d66b4(0x88)](_0x21fa61,_0xc7d1ef);}},_0x2f48f8=await _0x120fd4[_0x37e185(0xcd)](getToken);if(!_0x2f48f8)throw new Error(_0x120fd4[_0x37e185(0xe8)]);const _0x5219b3=_0x120fd4[_0x37e185(0xe1)](getApiBaseUrl),_0x3b5252=await fetch(_0x5219b3+_0x37e185(0xb7)+_0x30600d,{'method':_0x120fd4[_0x37e185(0xda)],'headers':{'Authorization':_0x37e185(0x87)+_0x2f48f8,'Content-Type':'application/json'},'body':JSON[_0x37e185(0x8b)](_0x3b3d72)});if(!_0x3b5252['ok']){if(_0x120fd4[_0x37e185(0x99)](_0x120fd4[_0x37e185(0x91)],_0x120fd4['gbxvL'])){const _0x517c6f=await _0x3b5252['text']();throw new Error(_0x37e185(0xb3)+_0x517c6f);}else{const _0x3ead0d=_0x462a1f[_0x37e185(0xe3)](_0x211e87,_0x13c066);return _0x37e185(0xdb)+_0x3ead0d;}}return _0x3b5252['json']();},{'label':_0x120fd4[_0x40dc7f(0xe7)]});}export async function getBrowserSession(_0x18dc9e){const _0x255c86=_0x549c,_0x51522f={'BcoGd':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','CUAhZ':function(_0x23bfe4){return _0x23bfe4();},'hdNUv':_0x255c86(0xd6),'jmwKl':function(_0x296b3c,_0x4bd0eb){return _0x296b3c!==_0x4bd0eb;},'ciVlk':'YrSwm'},_0x1af7be=await _0x51522f[_0x255c86(0xc3)](getToken);if(!_0x1af7be)throw new Error(_0x51522f['BcoGd']);const _0x2d3e62=getApiBaseUrl(),_0xf5f51c=await fetch(_0x2d3e62+_0x255c86(0xb7)+_0x18dc9e,{'method':_0x51522f[_0x255c86(0xa8)],'headers':{'Authorization':'Bearer\x20'+_0x1af7be}});if(!_0xf5f51c['ok']){if(_0x51522f[_0x255c86(0xa1)]('TmzOp',_0x51522f[_0x255c86(0x8c)])){const _0x55a69a=await _0xf5f51c['text']();throw new Error(_0x255c86(0xad)+_0x55a69a);}else throw new _0x17743d(_0x51522f['BcoGd']);}return _0xf5f51c[_0x255c86(0x93)]();}export async function getUploadUrls(_0x3f03ff,_0x435dfd,_0x5a7334,_0x3ff6e4){const _0x58b4df=_0x549c,_0x37fc1f={'tXVKf':function(_0x31594e,_0x4fd1e6){return _0x31594e!==_0x4fd1e6;},'MRXGl':_0x58b4df(0xcb),'gZjbS':_0x58b4df(0xc0),'RnfuX':function(_0x9de206){return _0x9de206();},'SMHzc':function(_0xa849bf,_0x1185ef,_0x46be50){return _0xa849bf(_0x1185ef,_0x46be50);},'lRdQS':_0x58b4df(0xeb),'DhqbQ':_0x58b4df(0xa9)},_0x317d96=await getToken();if(!_0x317d96){if(_0x37fc1f['tXVKf'](_0x37fc1f['MRXGl'],_0x37fc1f['MRXGl'])){if(_0x55d2f3){const _0x10ba93=_0x73d202[_0x58b4df(0xae)](_0x329b51,arguments);return _0x2ec6a4=null,_0x10ba93;}}else throw new Error(_0x37fc1f[_0x58b4df(0xcc)]);}const _0x19b473=_0x37fc1f['RnfuX'](getApiBaseUrl),_0x45f6f0=await _0x37fc1f[_0x58b4df(0x98)](fetch,_0x19b473+_0x58b4df(0xb7)+_0x3f03ff+_0x58b4df(0xd9),{'method':_0x37fc1f[_0x58b4df(0xbd)],'headers':{'Authorization':_0x58b4df(0x87)+_0x317d96,'Content-Type':_0x37fc1f[_0x58b4df(0xa2)]},'body':JSON[_0x58b4df(0x8b)]({'filename':_0x435dfd,'filetype':_0x5a7334,..._0x37fc1f[_0x58b4df(0xe2)](_0x3ff6e4?.[_0x58b4df(0x90)],undefined)&&{'size':_0x3ff6e4['size']},..._0x37fc1f[_0x58b4df(0xe2)](_0x3ff6e4?.[_0x58b4df(0xd4)],undefined)&&{'checksum':_0x3ff6e4['checksum']},..._0x3ff6e4?.[_0x58b4df(0xa4)]!==undefined&&{'metadata':_0x3ff6e4[_0x58b4df(0xa4)]}})});if(!_0x45f6f0['ok']){const _0x367601=await _0x45f6f0[_0x58b4df(0xa3)]();throw new Error(_0x58b4df(0x9c)+_0x367601);}return _0x45f6f0[_0x58b4df(0x93)]();}function _0x18ab(){const _0x1c6943=['tfvPrNm','mtiXotbNz1bKvMW','BfjKuvm','wKLhsvu','vg9bBM0','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','n1rJEKXgBq','l2fZC2v0CW','q1vbAfO','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','sfrLtuC','ww1Yv3G','mJD3AhPju08','y29UC3rYDwn0B3i','AwX2Eg4','B2zgyKK','CLDXrw4','z1PQyLm','AgPWsNu','Dg9tDhjPBMC','BMXsyNe','y2HLy2TSAxn0sxrLBuLK','D1HRqK4','tu1Pv3K','uefuq0G','y2HLy2TZDw0','zMvHDhvYzuLK','r0vu','mty0mtK2y1DqBgPJ','DgfZAW','l3vWBg9Hzc11CMXZ','A3bOCMq','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','nti4m1rgC0DqBa','mtaWmZaZmtDOtKTKs0G','C2vHCMnO','yMn4q28','DfHws2y','CxDHqwy','CgP0D20','ANjIweC','vK1Jz1i','D2Plsva','y3vLseq','CwTKCg4','yuzizvC','ue9tva','Aw1Hz2uVCg5N','l3n0zxbZlW','yxbWBgLJyxrPB24VEMLW','qMvHCMvYia','D3zQwwy','B0TAshm','r25LB0K','C3rYAw5NAwz5','y2LwBgS','ufvu','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','mZCXnJi5nK51t2ndDG','C2L6zq','z2j4DKW','sMLcywq','ANnVBG','mNHtq3jXDa','DxbKyxrL','vgTgy2m','C01Sz00','u01iEMm','yNH0yui','uKDbvNK','yMfZzty0','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','mZm3nJeXmfPjAeDrDG','Axvyzve','AhDHBhG','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','AM13s2W','rgHXyLe','Dgv4Da','Bwv0ywrHDge','DxjS','DxbKyxrLqNjVD3nLCLnLC3nPB24','tejlq1C','Agrovxy','yxbWBgLJyxrPB24VANnVBG','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','AMHOtvG','vgngs2y','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','yxbWBhK','nZuXmJq2y1rMEwPi','C2v0DgLUz3m','kcGOlISPkYKRksSK','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','EuXft3q','C1zSv2u','AurbB0S','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','nZe3mJiYnMHyzKHoCq','Bwq1','zeDZz0e'];_0x18ab=function(){return _0x1c6943;};return _0x18ab();}export async function uploadFile(_0xccadb9,_0x21d663,_0x316cbf){const _0x347b7a=_0x549c,_0x46d796={'RGAVy':_0x347b7a(0x8d)},_0x3c0bd6=await fetch(_0xccadb9,{'method':_0x46d796[_0x347b7a(0x9a)],'headers':{'Content-Type':_0x316cbf,'Content-Length':_0x21d663['length'][_0x347b7a(0xce)]()},'body':_0x21d663});if(!_0x3c0bd6['ok']){const _0x1b406e=await _0x3c0bd6['text']();throw new Error('Failed\x20to\x20upload\x20file:\x20'+_0x1b406e);}}export async function uploadTrace(_0x4703c8,_0x5bf16f){const _0x557e95=_0x549c,_0x4cf644={'LUiFs':function(_0x1334fb,_0x1b7e95,_0x17c2c2,_0x221fd5){return _0x1334fb(_0x1b7e95,_0x17c2c2,_0x221fd5);},'jrbXG':_0x557e95(0x86)};return _0x4cf644[_0x557e95(0xbb)](uploadFile,_0x4703c8,_0x5bf16f,_0x4cf644[_0x557e95(0xe5)]);}export async function uploadConversation(_0x31ac99,_0x505db2){return uploadFile(_0x31ac99,_0x505db2,'application/jsonl');}export async function uploadScreenshot(_0x47d449,_0x390a27){const _0x4c4e94=_0x549c,_0x5d7865={'dGsgA':_0x4c4e94(0xec)};return uploadFile(_0x47d449,_0x390a27,_0x5d7865[_0x4c4e94(0xba)]);}export async function uploadVideo(_0x4c2a51,_0x3d9de0){const _0x4790e7=_0x549c,_0x1885f7={'qkdpn':function(_0x5c8a4b,_0x5491fa,_0x1db97b,_0x2a6a3b){return _0x5c8a4b(_0x5491fa,_0x1db97b,_0x2a6a3b);},'pjtwm':'video/webm'};return _0x1885f7[_0x4790e7(0xe9)](uploadFile,_0x4c2a51,_0x3d9de0,_0x1885f7[_0x4790e7(0xe4)]);}function _0x549c(_0x1bb58a,_0x455590){_0x1bb58a=_0x1bb58a-0x85;const _0x48be64=_0x18ab();let _0x7948d8=_0x48be64[_0x1bb58a];if(_0x549c['hqBzfG']===undefined){var _0x4e5a44=function(_0x54f6c9){const _0x492da6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1ab39b='',_0x15bb2c='',_0x55ba48=_0x1ab39b+_0x4e5a44;for(let _0x3f9319=0x0,_0x14bfab,_0x4759e0,_0x5427d9=0x0;_0x4759e0=_0x54f6c9['charAt'](_0x5427d9++);~_0x4759e0&&(_0x14bfab=_0x3f9319%0x4?_0x14bfab*0x40+_0x4759e0:_0x4759e0,_0x3f9319++%0x4)?_0x1ab39b+=_0x55ba48['charCodeAt'](_0x5427d9+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x14bfab>>(-0x2*_0x3f9319&0x6)):_0x3f9319:0x0){_0x4759e0=_0x492da6['indexOf'](_0x4759e0);}for(let _0x555e16=0x0,_0x578d3e=_0x1ab39b['length'];_0x555e16<_0x578d3e;_0x555e16++){_0x15bb2c+='%'+('00'+_0x1ab39b['charCodeAt'](_0x555e16)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x15bb2c);};_0x549c['ShDjve']=_0x4e5a44,_0x549c['wYaYME']={},_0x549c['hqBzfG']=!![];}const _0x18abf7=_0x48be64[0x0],_0x549c9c=_0x1bb58a+_0x18abf7,_0x195991=_0x549c['wYaYME'][_0x549c9c];if(!_0x195991){const _0x578eda=function(_0x1a869a){this['XykQzD']=_0x1a869a,this['IhigVf']=[0x1,0x0,0x0],this['QpJkGw']=function(){return'newState';},this['BKAkoD']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['gXgGfC']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x578eda['prototype']['AvOYAl']=function(){const _0x519cb4=new RegExp(this['BKAkoD']+this['gXgGfC']),_0x4efad8=_0x519cb4['test'](this['QpJkGw']['toString']())?--this['IhigVf'][0x1]:--this['IhigVf'][0x0];return this['WieQpL'](_0x4efad8);},_0x578eda['prototype']['WieQpL']=function(_0xa4d8ee){if(!Boolean(~_0xa4d8ee))return _0xa4d8ee;return this['IsDRLu'](this['XykQzD']);},_0x578eda['prototype']['IsDRLu']=function(_0x2667dd){for(let _0x36448f=0x0,_0x220c72=this['IhigVf']['length'];_0x36448f<_0x220c72;_0x36448f++){this['IhigVf']['push'](Math['round'](Math['random']())),_0x220c72=this['IhigVf']['length'];}return _0x2667dd(this['IhigVf'][0x0]);},new _0x578eda(_0x549c)['AvOYAl'](),_0x7948d8=_0x549c['ShDjve'](_0x7948d8),_0x549c['wYaYME'][_0x549c9c]=_0x7948d8;}else _0x7948d8=_0x195991;return _0x7948d8;}export function buildTraceViewerUrl(_0x376318){const _0x1133bb=_0x549c,_0x222d93=encodeURIComponent(_0x376318);return _0x1133bb(0xdb)+_0x222d93;}export async function getProxySessionToken(){const _0x3e86a8=_0x549c,_0x154926={'MMiWy':function(_0x74660d){return _0x74660d();},'DICNR':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','oKZHs':function(_0x11557c){return _0x11557c();},'eTVlR':_0x3e86a8(0xeb)},_0x16438b=await _0x154926[_0x3e86a8(0xd2)](getToken);if(!_0x16438b)throw new Error(_0x154926['DICNR']);const _0x1c4bf7=_0x154926[_0x3e86a8(0x89)](getApiBaseUrl),_0x25ad83=await fetch(_0x1c4bf7+_0x3e86a8(0xb2),{'method':_0x154926['eTVlR'],'headers':{'Authorization':_0x3e86a8(0x87)+_0x16438b}});if(!_0x25ad83['ok']){const _0x57944c=await _0x25ad83[_0x3e86a8(0xa3)]();throw new Error(_0x3e86a8(0xa0)+_0x57944c);}const _0x4494ae=await _0x25ad83[_0x3e86a8(0x93)]();return _0x4494ae['sessionToken'];}export function computeChecksum(_0x1ed96f){const _0x43902e=_0x549c,_0x63a22a={'jhhMX':function(_0x51cf50,_0x3197d1){return _0x51cf50(_0x3197d1);},'yLEOt':_0x43902e(0xb9),'HUqNh':_0x43902e(0x9b)};return _0x63a22a[_0x43902e(0xab)](createHash,_0x63a22a[_0x43902e(0xb4)])[_0x43902e(0x95)](_0x1ed96f)['digest'](_0x63a22a['HUqNh']);}export async function createVerificationStep(_0x3a06e0,_0x3fce8f){const _0x23786f=_0x549c,_0x5cb85e={'zhmaY':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','ToAnm':function(_0x2b4056){return _0x2b4056();},'VMcgR':_0x23786f(0xa9)},_0x3beb0e=await getToken();if(!_0x3beb0e)throw new Error(_0x5cb85e['zhmaY']);const _0x4deeda=_0x5cb85e[_0x23786f(0xbf)](getApiBaseUrl),_0x32259a=await fetch(_0x4deeda+_0x23786f(0xb7)+_0x3a06e0+'/steps',{'method':_0x23786f(0xeb),'headers':{'Authorization':_0x23786f(0x87)+_0x3beb0e,'Content-Type':_0x5cb85e[_0x23786f(0xe6)]},'body':JSON[_0x23786f(0x8b)](_0x3fce8f)});if(!_0x32259a['ok']){const _0x356faa=await _0x32259a[_0x23786f(0xa3)]();throw new Error(_0x23786f(0xaa)+_0x356faa);}return _0x32259a['json']();}export async function createStepAsset(_0x2552fd,_0x26ca95,_0x4f6415){const _0x7cfda8=_0x549c,_0x306efb={'aFHeW':function(_0x2844b3){return _0x2844b3();},'JvlnP':_0x7cfda8(0xc0),'wXkBN':function(_0x51dc79,_0x1c265f,_0x3ec8de){return _0x51dc79(_0x1c265f,_0x3ec8de);},'TcFKf':_0x7cfda8(0xeb),'JiBad':function(_0x2c9f88,_0x274680){return _0x2c9f88===_0x274680;},'nlRbq':_0x7cfda8(0x8a)},_0x158769=await _0x306efb[_0x7cfda8(0xea)](getToken);if(!_0x158769)throw new Error(_0x306efb['JvlnP']);const _0x6c662b=_0x306efb['aFHeW'](getApiBaseUrl),_0x1d4a93=await _0x306efb[_0x7cfda8(0xd1)](fetch,_0x6c662b+_0x7cfda8(0xb7)+_0x2552fd+_0x7cfda8(0x85)+_0x26ca95+_0x7cfda8(0xc2),{'method':_0x306efb[_0x7cfda8(0xac)],'headers':{'Authorization':_0x7cfda8(0x87)+_0x158769,'Content-Type':'application/json'},'body':JSON[_0x7cfda8(0x8b)](_0x4f6415)});if(!_0x1d4a93['ok']){if(_0x306efb[_0x7cfda8(0x92)](_0x306efb[_0x7cfda8(0xcf)],_0x306efb[_0x7cfda8(0xcf)])){const _0x175613=await _0x1d4a93[_0x7cfda8(0xa3)]();throw new Error(_0x7cfda8(0xc4)+_0x175613);}else throw new _0x52627f(_0x7cfda8(0xc0));}return _0x1d4a93['json']();}export async function updateVerificationStep(_0x58f5ba,_0x4053ac,_0x142c98){const _0x3de8e9=_0x549c,_0x5f04ea={'ofFbI':function(_0x32236a){return _0x32236a();},'YmrWx':function(_0x165d76){return _0x165d76();},'hwalx':function(_0x4a5d87,_0x1ccc3f,_0x464994){return _0x4a5d87(_0x1ccc3f,_0x464994);},'iuXeQ':_0x3de8e9(0xd3),'Byynz':_0x3de8e9(0xa9)},_0x502e96=await _0x5f04ea[_0x3de8e9(0xca)](getToken);if(!_0x502e96)throw new Error(_0x3de8e9(0xc0));const _0x276576=_0x5f04ea[_0x3de8e9(0xc6)](getApiBaseUrl),_0x1a187c=await _0x5f04ea[_0x3de8e9(0x9f)](fetch,_0x276576+_0x3de8e9(0xb7)+_0x58f5ba+_0x3de8e9(0x85)+_0x4053ac,{'method':_0x5f04ea[_0x3de8e9(0x9e)],'headers':{'Authorization':_0x3de8e9(0x87)+_0x502e96,'Content-Type':_0x5f04ea['Byynz']},'body':JSON[_0x3de8e9(0x8b)](_0x142c98)});if(!_0x1a187c['ok']){const _0x52b47f=await _0x1a187c['text']();throw new Error(_0x3de8e9(0x8e)+_0x52b47f);}}
1
+ (function(_0x364d80,_0x28bcb2){const _0x2e8390=_0x3498,_0x3aad48=_0x364d80();while(!![]){try{const _0x4bd40e=parseInt(_0x2e8390(0x1fa))/0x1*(-parseInt(_0x2e8390(0x1f1))/0x2)+-parseInt(_0x2e8390(0x24d))/0x3+-parseInt(_0x2e8390(0x24b))/0x4*(-parseInt(_0x2e8390(0x209))/0x5)+parseInt(_0x2e8390(0x224))/0x6+parseInt(_0x2e8390(0x250))/0x7*(-parseInt(_0x2e8390(0x239))/0x8)+parseInt(_0x2e8390(0x223))/0x9+-parseInt(_0x2e8390(0x1fd))/0xa*(-parseInt(_0x2e8390(0x24f))/0xb);if(_0x4bd40e===_0x28bcb2)break;else _0x3aad48['push'](_0x3aad48['shift']());}catch(_0x21338a){_0x3aad48['push'](_0x3aad48['shift']());}}}(_0x4a35,0xd1050));const _0x12ce67=(function(){const _0x26edbe=_0x3498,_0x3639c3={'lFBAu':_0x26edbe(0x1ee),'VXXJw':'GxGXm','iuunH':function(_0x4bb6a7,_0x58443b){return _0x4bb6a7!==_0x58443b;},'HdaMn':_0x26edbe(0x22e),'mkwgJ':function(_0x526bbe,_0x1d0c28){return _0x526bbe===_0x1d0c28;},'JNzCZ':'BThJr'};let _0x206452=!![];return function(_0x3e8637,_0x433870){const _0x140bef=_0x26edbe,_0x584e84={'rvCcZ':_0x3639c3[_0x140bef(0x240)],'gUoTB':function(_0x4a4d1f,_0x2f9670){return _0x4a4d1f===_0x2f9670;},'kFxhR':_0x3639c3[_0x140bef(0x1e8)],'UjBCl':function(_0x4976b7,_0x2041c6){const _0x4a956f=_0x140bef;return _0x3639c3[_0x4a956f(0x237)](_0x4976b7,_0x2041c6);},'hyRCc':_0x3639c3[_0x140bef(0x1fe)],'PZNtz':_0x140bef(0x233)};if(_0x3639c3[_0x140bef(0x25a)](_0x3639c3[_0x140bef(0x206)],_0x3639c3['JNzCZ'])){const _0x5124a6=_0x206452?function(){const _0xfed09a=_0x140bef,_0x2ef5b9={'eDhgc':_0x584e84[_0xfed09a(0x23b)],'BjbyX':function(_0x490808,_0x447b9d,_0x364975,_0xfe447){return _0x490808(_0x447b9d,_0x364975,_0xfe447);},'xcpcz':'application/jsonl'};if(_0x584e84['gUoTB'](_0x584e84[_0xfed09a(0x213)],_0x584e84[_0xfed09a(0x213)])){if(_0x433870){if(_0x584e84['UjBCl'](_0x584e84['hyRCc'],_0x584e84[_0xfed09a(0x234)])){const _0x51d2dd=_0x433870[_0xfed09a(0x23e)](_0x3e8637,arguments);return _0x433870=null,_0x51d2dd;}else throw new _0x4c2e61(_0x2ef5b9[_0xfed09a(0x25f)]);}}else return _0x2ef5b9[_0xfed09a(0x22a)](_0x2258c9,_0x21b5c2,_0x537d54,_0x2ef5b9[_0xfed09a(0x257)]);}:function(){};return _0x206452=![],_0x5124a6;}else{const _0x3d45be=_0x117b17?function(){const _0x3006bb=_0x140bef;if(_0xc0ded4){const _0x4527a1=_0x19ca96[_0x3006bb(0x23e)](_0x4aeaac,arguments);return _0x563c1d=null,_0x4527a1;}}:function(){};return _0x50c91c=![],_0x3d45be;}};}()),_0x58f27b=_0x12ce67(this,function(){const _0x4a3d74=_0x3498,_0x731df2={'okaDT':_0x4a3d74(0x241)};return _0x58f27b[_0x4a3d74(0x21f)]()[_0x4a3d74(0x227)]('(((.+)+)+)+$')[_0x4a3d74(0x21f)]()['constructor'](_0x58f27b)[_0x4a3d74(0x227)](_0x731df2[_0x4a3d74(0x203)]);});_0x58f27b();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x597f2b){const _0x4522f2=_0x3498,_0x57d2d1={'ycNWK':_0x4522f2(0x1ee),'scFOL':function(_0x22062c){return _0x22062c();},'FlMaa':function(_0x2532ed){return _0x2532ed();},'FEAfj':function(_0x5953a5,_0x57a7d7,_0x41067e){return _0x5953a5(_0x57a7d7,_0x41067e);},'dmgfy':_0x4522f2(0x229),'tjGBr':function(_0x1d027a,_0x3ae289){return _0x1d027a===_0x3ae289;},'tJAvc':'JlNee','sCkcS':_0x4522f2(0x212)},_0x2a5868=await _0x57d2d1[_0x4522f2(0x219)](getToken);if(!_0x2a5868)throw new Error(_0x57d2d1[_0x4522f2(0x253)]);const _0x32604e=_0x57d2d1[_0x4522f2(0x249)](getApiBaseUrl),_0x5b3c22=await _0x57d2d1['FEAfj'](fetch,_0x32604e+_0x4522f2(0x226),{'method':_0x57d2d1['dmgfy'],'headers':{'Authorization':'Bearer\x20'+_0x2a5868,'Content-Type':_0x4522f2(0x246)},'body':JSON[_0x4522f2(0x238)]({'environmentName':_0x597f2b?.['environmentName'],'settings':_0x597f2b?.['settings'],'task':_0x597f2b?.[_0x4522f2(0x22d)],'url':_0x597f2b?.[_0x4522f2(0x247)],'featureId':_0x597f2b?.[_0x4522f2(0x221)],'checklistItemId':_0x597f2b?.[_0x4522f2(0x20c)]})});if(!_0x5b3c22['ok']){if(_0x57d2d1[_0x4522f2(0x1ff)](_0x57d2d1['tJAvc'],_0x57d2d1[_0x4522f2(0x24a)]))throw new _0xd02386(_0x57d2d1[_0x4522f2(0x253)]);else{const _0x5c1648=await _0x5b3c22[_0x4522f2(0x222)]();throw new Error(_0x4522f2(0x204)+_0x5c1648);}}return _0x5b3c22[_0x4522f2(0x236)]();}function _0x3498(_0x2f90fe,_0x42b160){_0x2f90fe=_0x2f90fe-0x1e7;const _0x3ae9c2=_0x4a35();let _0x58f27b=_0x3ae9c2[_0x2f90fe];if(_0x3498['gMcCPp']===undefined){var _0x12ce67=function(_0x332568){const _0x53e79c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xf60604='',_0x4a115d='',_0x55e160=_0xf60604+_0x12ce67;for(let _0x8dd6e=0x0,_0x55ee44,_0x90a8bf,_0x2e9334=0x0;_0x90a8bf=_0x332568['charAt'](_0x2e9334++);~_0x90a8bf&&(_0x55ee44=_0x8dd6e%0x4?_0x55ee44*0x40+_0x90a8bf:_0x90a8bf,_0x8dd6e++%0x4)?_0xf60604+=_0x55e160['charCodeAt'](_0x2e9334+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x55ee44>>(-0x2*_0x8dd6e&0x6)):_0x8dd6e:0x0){_0x90a8bf=_0x53e79c['indexOf'](_0x90a8bf);}for(let _0x135980=0x0,_0x26f1ad=_0xf60604['length'];_0x135980<_0x26f1ad;_0x135980++){_0x4a115d+='%'+('00'+_0xf60604['charCodeAt'](_0x135980)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a115d);};_0x3498['cHAupG']=_0x12ce67,_0x3498['MlhWmh']={},_0x3498['gMcCPp']=!![];}const _0x4a3596=_0x3ae9c2[0x0],_0x3498da=_0x2f90fe+_0x4a3596,_0x2a0570=_0x3498['MlhWmh'][_0x3498da];if(!_0x2a0570){const _0x117b17=function(_0xc34082){this['CkajpS']=_0xc34082,this['BsPTMd']=[0x1,0x0,0x0],this['uCcplt']=function(){return'newState';},this['QasMVd']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['dgpzaN']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x117b17['prototype']['lsjWCE']=function(){const _0xeeccc4=new RegExp(this['QasMVd']+this['dgpzaN']),_0xd83fcf=_0xeeccc4['test'](this['uCcplt']['toString']())?--this['BsPTMd'][0x1]:--this['BsPTMd'][0x0];return this['bGYtXP'](_0xd83fcf);},_0x117b17['prototype']['bGYtXP']=function(_0x350c0c){if(!Boolean(~_0x350c0c))return _0x350c0c;return this['hhCVkU'](this['CkajpS']);},_0x117b17['prototype']['hhCVkU']=function(_0x50c91c){for(let _0xc0ded4=0x0,_0x1ef386=this['BsPTMd']['length'];_0xc0ded4<_0x1ef386;_0xc0ded4++){this['BsPTMd']['push'](Math['round'](Math['random']())),_0x1ef386=this['BsPTMd']['length'];}return _0x50c91c(this['BsPTMd'][0x0]);},new _0x117b17(_0x3498)['lsjWCE'](),_0x58f27b=_0x3498['cHAupG'](_0x58f27b),_0x3498['MlhWmh'][_0x3498da]=_0x58f27b;}else _0x58f27b=_0x2a0570;return _0x58f27b;}export async function updateBrowserSession(_0x39a809,_0x48887f){const _0x5716b9=_0x3498,_0x4d5f86={'eCDUh':function(_0x203be1,_0x4bbbfe,_0x1b91bf,_0x5edcb2){return _0x203be1(_0x4bbbfe,_0x1b91bf,_0x5edcb2);},'LOmOW':_0x5716b9(0x216),'akkmz':_0x5716b9(0x1ee),'XoNwA':function(_0x51ed9c){return _0x51ed9c();},'vlcjS':function(_0x336e69,_0x2a039e,_0x5c4355){return _0x336e69(_0x2a039e,_0x5c4355);},'ppHay':'PATCH','lnxYP':function(_0x39810a,_0x39861e){return _0x39810a!==_0x39861e;},'LHNbs':'cBKSO','jtzCf':function(_0x3b6bb8,_0x4e2e9a,_0x3494db){return _0x3b6bb8(_0x4e2e9a,_0x3494db);},'WnnAo':'updateBrowserSession'};return _0x4d5f86['jtzCf'](withRetry,async()=>{const _0x2fc37b=_0x5716b9,_0x40d1a2=await getToken();if(!_0x40d1a2)throw new Error(_0x4d5f86[_0x2fc37b(0x23f)]);const _0x48a430=_0x4d5f86[_0x2fc37b(0x1ea)](getApiBaseUrl),_0x5e38e9=await _0x4d5f86[_0x2fc37b(0x235)](fetch,_0x48a430+_0x2fc37b(0x25b)+_0x39a809,{'method':_0x4d5f86[_0x2fc37b(0x232)],'headers':{'Authorization':_0x2fc37b(0x260)+_0x40d1a2,'Content-Type':_0x2fc37b(0x246)},'body':JSON[_0x2fc37b(0x238)](_0x48887f)});if(!_0x5e38e9['ok']){if(_0x4d5f86[_0x2fc37b(0x25d)](_0x4d5f86[_0x2fc37b(0x25c)],_0x4d5f86['LHNbs']))return _0x4d5f86['eCDUh'](_0x47bc7c,_0x171794,_0x3df639,_0x4d5f86[_0x2fc37b(0x20d)]);else{const _0x10f760=await _0x5e38e9[_0x2fc37b(0x222)]();throw new Error('Failed\x20to\x20update\x20browser\x20session:\x20'+_0x10f760);}}return _0x5e38e9[_0x2fc37b(0x236)]();},{'label':_0x4d5f86['WnnAo']});}export async function getBrowserSession(_0x14a4dd){const _0x49b621=_0x3498,_0x375d97={'btJWe':_0x49b621(0x1ee),'xLynk':function(_0x43ea8b){return _0x43ea8b();},'BPqVY':'GET'},_0x51e4f7=await getToken();if(!_0x51e4f7)throw new Error(_0x375d97[_0x49b621(0x21c)]);const _0x4562ff=_0x375d97[_0x49b621(0x202)](getApiBaseUrl),_0x88182c=await fetch(_0x4562ff+_0x49b621(0x25b)+_0x14a4dd,{'method':_0x375d97['BPqVY'],'headers':{'Authorization':_0x49b621(0x260)+_0x51e4f7}});if(!_0x88182c['ok']){const _0x33e46=await _0x88182c['text']();throw new Error(_0x49b621(0x20a)+_0x33e46);}return _0x88182c[_0x49b621(0x236)]();}export async function getUploadUrls(_0x5e7acb,_0x338881,_0xb3ea78,_0x436136){const _0x123ec9=_0x3498,_0x244f80={'MPqVk':_0x123ec9(0x1ee),'VYNEK':function(_0x462872){return _0x462872();},'djzPp':function(_0x1f075c,_0x4b79ce,_0x477318){return _0x1f075c(_0x4b79ce,_0x477318);},'hRDsd':_0x123ec9(0x246),'AkacY':function(_0x4434f9,_0x191802){return _0x4434f9!==_0x191802;},'jMYMG':_0x123ec9(0x259)},_0x3914fc=await _0x244f80[_0x123ec9(0x217)](getToken);if(!_0x3914fc)throw new Error(_0x244f80[_0x123ec9(0x1f9)]);const _0x3da762=getApiBaseUrl(),_0x27b535=await _0x244f80[_0x123ec9(0x21b)](fetch,_0x3da762+'/api/v1/mcp/browser-sessions/'+_0x5e7acb+_0x123ec9(0x1ed),{'method':_0x123ec9(0x229),'headers':{'Authorization':_0x123ec9(0x260)+_0x3914fc,'Content-Type':_0x244f80[_0x123ec9(0x1fb)]},'body':JSON[_0x123ec9(0x238)]({'filename':_0x338881,'filetype':_0xb3ea78,..._0x244f80['AkacY'](_0x436136?.[_0x123ec9(0x242)],undefined)&&{'size':_0x436136[_0x123ec9(0x242)]},..._0x436136?.[_0x123ec9(0x1e7)]!==undefined&&{'checksum':_0x436136[_0x123ec9(0x1e7)]},..._0x436136?.[_0x123ec9(0x231)]!==undefined&&{'metadata':_0x436136[_0x123ec9(0x231)]}})});if(!_0x27b535['ok']){if(_0x123ec9(0x20e)!==_0x244f80[_0x123ec9(0x1f3)]){const _0x578396=await _0x27b535['text']();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x578396);}else throw new _0x21d13b(_0x244f80[_0x123ec9(0x1f9)]);}return _0x27b535['json']();}export async function uploadFile(_0x2a99f6,_0x4bfcd1,_0xd3b462){const _0x4b6cdd=_0x3498,_0x1a2ada={'QNPoK':function(_0x2efb99,_0x190427,_0xab03bc){return _0x2efb99(_0x190427,_0xab03bc);}},_0x72e11e=await _0x1a2ada['QNPoK'](fetch,_0x2a99f6,{'method':_0x4b6cdd(0x1f5),'headers':{'Content-Type':_0xd3b462,'Content-Length':_0x4bfcd1[_0x4b6cdd(0x21e)][_0x4b6cdd(0x21f)]()},'body':_0x4bfcd1});if(!_0x72e11e['ok']){const _0x4131b0=await _0x72e11e[_0x4b6cdd(0x222)]();throw new Error(_0x4b6cdd(0x1f0)+_0x4131b0);}}export async function uploadTrace(_0x48e58f,_0x3c9ac2){const _0x43b413=_0x3498,_0x4606cc={'oUZMN':function(_0x2b6676,_0x2326e4,_0x444dec,_0x3ba510){return _0x2b6676(_0x2326e4,_0x444dec,_0x3ba510);},'JBnGU':_0x43b413(0x218)};return _0x4606cc[_0x43b413(0x200)](uploadFile,_0x48e58f,_0x3c9ac2,_0x4606cc[_0x43b413(0x201)]);}export async function uploadConversation(_0x2672cd,_0x23b6dd){const _0x11d026={'zjtmg':function(_0x4fc4ad,_0xe9cd38,_0x153e52,_0x5721d7){return _0x4fc4ad(_0xe9cd38,_0x153e52,_0x5721d7);},'inGhQ':'application/jsonl'};return _0x11d026['zjtmg'](uploadFile,_0x2672cd,_0x23b6dd,_0x11d026['inGhQ']);}export async function uploadScreenshot(_0x21d64b,_0x3780b7){const _0x2f8547=_0x3498,_0x51e201={'XZitw':_0x2f8547(0x216)};return uploadFile(_0x21d64b,_0x3780b7,_0x51e201[_0x2f8547(0x230)]);}export async function uploadVideo(_0x289c68,_0x5ef990){const _0xa95186=_0x3498,_0x18d86e={'fBxWR':function(_0x563fc0,_0x22f6e8,_0x392026,_0x42f816){return _0x563fc0(_0x22f6e8,_0x392026,_0x42f816);}};return _0x18d86e[_0xa95186(0x225)](uploadFile,_0x289c68,_0x5ef990,'video/webm');}export function buildTraceViewerUrl(_0x3e4446){const _0x3147fa=_0x3498,_0x1dd017={'FKkqS':function(_0x6d727b,_0x4a386d){return _0x6d727b(_0x4a386d);}},_0x1686d1=_0x1dd017[_0x3147fa(0x251)](encodeURIComponent,_0x3e4446);return _0x3147fa(0x20b)+_0x1686d1;}export async function getProxySessionToken(){const _0x27d89a=_0x3498,_0x312232={'GzRie':_0x27d89a(0x248),'ekmLd':function(_0x1206c0){return _0x1206c0();},'fnlXp':_0x27d89a(0x229),'laFGc':function(_0x3b1271,_0x45adde){return _0x3b1271===_0x45adde;},'kigeh':'xlZVE','VWOEK':_0x27d89a(0x1f8)},_0x4e42c0=await getToken();if(!_0x4e42c0)throw new Error(_0x27d89a(0x1ee));const _0x166d9e=_0x312232[_0x27d89a(0x1ef)](getApiBaseUrl),_0x3c9e56=await fetch(_0x166d9e+'/api/v1/mcp/proxy-session',{'method':_0x312232[_0x27d89a(0x207)],'headers':{'Authorization':_0x27d89a(0x260)+_0x4e42c0}});if(!_0x3c9e56['ok']){if(_0x312232['laFGc'](_0x312232[_0x27d89a(0x254)],_0x312232['VWOEK']))return _0x4dc1ea(_0x6ee9c1,_0x1153d9,_0x312232['GzRie']);else{const _0x5e1c6b=await _0x3c9e56['text']();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x5e1c6b);}}const _0x57a1d0=await _0x3c9e56[_0x27d89a(0x236)]();return _0x57a1d0['sessionToken'];}export function computeChecksum(_0xaabf4c){const _0x12ff52=_0x3498,_0x311bf9={'kALFp':function(_0x272975,_0x4838dc){return _0x272975(_0x4838dc);},'iekrQ':'base64'};return _0x311bf9['kALFp'](createHash,_0x12ff52(0x1ec))[_0x12ff52(0x20f)](_0xaabf4c)[_0x12ff52(0x258)](_0x311bf9[_0x12ff52(0x25e)]);}export async function createVerificationStep(_0x16287b,_0x134a07){const _0x34d2cd=_0x3498,_0x43b37d={'thGsO':_0x34d2cd(0x1ee),'zqMNU':function(_0x2a3e51,_0x464ba5,_0x179b41){return _0x2a3e51(_0x464ba5,_0x179b41);},'nvvNw':_0x34d2cd(0x246)},_0x434bfc=await getToken();if(!_0x434bfc)throw new Error(_0x43b37d[_0x34d2cd(0x23d)]);const _0x4ef831=getApiBaseUrl(),_0x1dc0ab=await _0x43b37d['zqMNU'](fetch,_0x4ef831+_0x34d2cd(0x25b)+_0x16287b+_0x34d2cd(0x23c),{'method':_0x34d2cd(0x229),'headers':{'Authorization':_0x34d2cd(0x260)+_0x434bfc,'Content-Type':_0x43b37d[_0x34d2cd(0x210)]},'body':JSON[_0x34d2cd(0x238)](_0x134a07)});if(!_0x1dc0ab['ok']){const _0x4fdfcb=await _0x1dc0ab[_0x34d2cd(0x222)]();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x4fdfcb);}return _0x1dc0ab[_0x34d2cd(0x236)]();}export async function createStepAsset(_0x4c0ffb,_0x52222c,_0x57afc6){const _0x4f7801=_0x3498,_0x124f3b={'JlrBl':_0x4f7801(0x1ee),'vNxmS':function(_0x45f743,_0x516106){return _0x45f743(_0x516106);},'DvolC':function(_0x5714cf,_0xac1476){return _0x5714cf===_0xac1476;},'FmAqP':_0x4f7801(0x1eb),'nmcbY':_0x4f7801(0x1f2),'Iepmk':function(_0x3b9377){return _0x3b9377();},'yIVBi':function(_0x1e6f65,_0x4b9975,_0x5e954b){return _0x1e6f65(_0x4b9975,_0x5e954b);},'FMmjN':_0x4f7801(0x229),'ZIPmi':_0x4f7801(0x246),'ViRUL':_0x4f7801(0x228)},_0x4150f7=await getToken();if(!_0x4150f7){if(_0x124f3b[_0x4f7801(0x1f4)](_0x124f3b['FmAqP'],_0x124f3b[_0x4f7801(0x24e)]))throw new _0x1e1a71(_0x124f3b['JlrBl']);else throw new Error(_0x124f3b[_0x4f7801(0x23a)]);}const _0x415241=_0x124f3b[_0x4f7801(0x22c)](getApiBaseUrl),_0x2f54be=await _0x124f3b[_0x4f7801(0x22b)](fetch,_0x415241+_0x4f7801(0x25b)+_0x4c0ffb+_0x4f7801(0x205)+_0x52222c+_0x4f7801(0x211),{'method':_0x124f3b[_0x4f7801(0x256)],'headers':{'Authorization':_0x4f7801(0x260)+_0x4150f7,'Content-Type':_0x124f3b[_0x4f7801(0x1e9)]},'body':JSON[_0x4f7801(0x238)](_0x57afc6)});if(!_0x2f54be['ok']){if(_0x124f3b[_0x4f7801(0x1f4)](_0x124f3b['ViRUL'],_0x124f3b[_0x4f7801(0x243)])){const _0x4c643e=await _0x2f54be[_0x4f7801(0x222)]();throw new Error(_0x4f7801(0x1f6)+_0x4c643e);}else{const _0x4b8615=_0x124f3b['vNxmS'](_0x31e69e,_0xc9b441);return _0x4f7801(0x20b)+_0x4b8615;}}return _0x2f54be[_0x4f7801(0x236)]();}export async function updateVerificationStep(_0x42d5ac,_0x5ee6e8,_0xf5adfb){const _0x691df8=_0x3498,_0x4d29c1={'pbpED':function(_0x2fb8be){return _0x2fb8be();},'Vtxke':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','JzPAT':function(_0x27288f,_0x16cb46,_0x239146){return _0x27288f(_0x16cb46,_0x239146);},'YrrBk':_0x691df8(0x21a)},_0x205395=await _0x4d29c1[_0x691df8(0x252)](getToken);if(!_0x205395)throw new Error(_0x4d29c1[_0x691df8(0x220)]);const _0x42dd80=getApiBaseUrl(),_0x2babcb=await _0x4d29c1[_0x691df8(0x208)](fetch,_0x42dd80+_0x691df8(0x25b)+_0x42d5ac+'/steps/'+_0x5ee6e8,{'method':_0x4d29c1[_0x691df8(0x1fc)],'headers':{'Authorization':_0x691df8(0x260)+_0x205395,'Content-Type':_0x691df8(0x246)},'body':JSON[_0x691df8(0x238)](_0xf5adfb)});if(!_0x2babcb['ok']){const _0x37a101=await _0x2babcb[_0x691df8(0x222)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0x37a101);}}function _0x4a35(){const _0x2c635f=['mZyYnta4nLDxsMDZCW','BM1JyLK','mte3nZGXng9qz01swG','n0D1tK1XDW','rKTRCvm','CgjWruq','Ewnov0S','A2LNzwG','Bvvbwe0','rK1TAK4','EgnWy3O','zgLNzxn0','Bfj6z3G','BwT3z0O','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','teHoyNm','Bg54wva','AwvRCLe','zurOz2m','qMvHCMvYia','y2HLy2TZDw0','vLHysNC','wKLqBwK','wg9oD0e','tejbs3K','Bwq1','l3vWBg9Hzc11CMXZ','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','zwTTtgq','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','mZqXmZuWugXbDvLS','wLvlCe4','AK1ztuC','rhzVBem','ufvu','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','uvHxtKm','tLn3AvO','tvbXvMS','n05ivgHYzW','AfjeC2q','wxjYqMS','otb0zfvnALC','sgrHtw4','DgPhqNi','B1vAtu4','sKjUr1u','EeX5BMS','B2THrfq','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','l3n0zxbZlW','sK56q1O','zM5Swha','sNPqqvq','mtKZodCWrNz1zvzi','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','y2HLy2TSAxn0sxrLBuLK','te9Tt1C','wfrkwhm','DxbKyxrL','BNz2tNC','l2fZC2v0CW','tg5OCe0','A0z4Afi','rKnwtMO','C0Ltt2G','Aw1Hz2uVCg5N','vLLoruS','yxbWBgLJyxrPB24VEMLW','C2ngt0W','uefuq0G','zgP6uha','yNrkv2u','sgvxCK0','BgvUz3rO','Dg9tDhjPBMC','vNr4A2u','zMvHDhvYzuLK','Dgv4Da','mZmZmZiYmNn4tunmDG','ndK3nZK2mef4AfHXEq','zKj4v1i','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','C2vHCMnO','wLD4rgm','ue9tva','qMPIEvG','EuLwqMK','swvWBwS','DgfZAW','EeT0sLK','shrryvC','wfPPDhC','Bwv0ywrHDge','ChbiyxK','wenVAuS','ufPoDhO','DMXJALm','ANnVBG','Axv1BKG','C3rYAw5NAwz5','oduXntC2rMv2y2Hw','sMXYqMW','CNzdy1O','l3n0zxbZ','DgHhC08','yxbWBhK','ywTRBxO','Bezcqxu','kcGOlISPkYKRksSK','C2L6zq','vMLsvuW','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','yMfZzty0','yxbWBgLJyxrPB24VANnVBG','DxjS','DMLKzw8VD2vIBq','rMXnywe','C0nRy1m','mti0ru1my21q','re5guuy'];_0x4a35=function(){return _0x2c635f;};return _0x4a35();}export async function getBrowserSessionSteps(_0x16f1f5){const _0x590db8=_0x3498,_0x43f7fe={'sISOh':function(_0x1ccab4,_0x32aecc){return _0x1ccab4(_0x32aecc);},'QXWNC':_0x590db8(0x245),'FCVNj':function(_0xa46bca){return _0xa46bca();},'JeUmX':function(_0x4af24b,_0x55cc0f){return _0x4af24b===_0x55cc0f;},'DNFQF':_0x590db8(0x255),'HeWrM':function(_0x5bc492,_0x3e9072,_0x1da8a9){return _0x5bc492(_0x3e9072,_0x1da8a9);},'HtQaW':'GET'},_0x320e88=await _0x43f7fe[_0x590db8(0x214)](getToken);if(!_0x320e88){if(_0x43f7fe['JeUmX'](_0x590db8(0x255),_0x43f7fe[_0x590db8(0x24c)]))throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');else return _0x43f7fe[_0x590db8(0x215)](_0x360ee8,_0x590db8(0x1ec))[_0x590db8(0x20f)](_0x2c6b24)[_0x590db8(0x258)](_0x43f7fe[_0x590db8(0x1f7)]);}const _0x2a1354=getApiBaseUrl(),_0x4e3a88=await _0x43f7fe[_0x590db8(0x21d)](fetch,_0x2a1354+_0x590db8(0x25b)+_0x16f1f5+_0x590db8(0x23c),{'method':_0x43f7fe[_0x590db8(0x22f)],'headers':{'Authorization':_0x590db8(0x260)+_0x320e88}});if(!_0x4e3a88['ok']){const _0x65ba06=await _0x4e3a88[_0x590db8(0x222)]();throw new Error(_0x590db8(0x244)+_0x65ba06);}return _0x4e3a88[_0x590db8(0x236)]();}
@@ -1 +1 @@
1
- (function(_0x16a6e0,_0x28c627){const _0x16ab14=_0x28c1,_0x109408=_0x16a6e0();while(!![]){try{const _0x4f6f15=parseInt(_0x16ab14(0xae))/0x1+parseInt(_0x16ab14(0xbe))/0x2+-parseInt(_0x16ab14(0xaa))/0x3*(-parseInt(_0x16ab14(0xb9))/0x4)+-parseInt(_0x16ab14(0xa8))/0x5+parseInt(_0x16ab14(0xad))/0x6*(parseInt(_0x16ab14(0xab))/0x7)+-parseInt(_0x16ab14(0xaf))/0x8*(parseInt(_0x16ab14(0xb6))/0x9)+parseInt(_0x16ab14(0xbc))/0xa;if(_0x4f6f15===_0x28c627)break;else _0x109408['push'](_0x109408['shift']());}catch(_0x178600){_0x109408['push'](_0x109408['shift']());}}}(_0x3a4a,0xa4cf3));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x5c8c7f=_0x28c1,_0x68478c={'xdprr':function(_0x225092,_0x5204c0,_0x4a4bbb){return _0x225092(_0x5204c0,_0x4a4bbb);}};return process['env']['CLAUDE_CONFIG_DIR']||_0x68478c['xdprr'](join,homedir(),_0x5c8c7f(0xb8));}export function getUserSkillsDir(){const _0x1fb816=_0x28c1,_0x4fa556={'mMAGF':function(_0xa0716f,_0x3be3aa,_0x616012){return _0xa0716f(_0x3be3aa,_0x616012);},'XxOsY':function(_0x3bb934){return _0x3bb934();}};return _0x4fa556[_0x1fb816(0xc0)](join,_0x4fa556[_0x1fb816(0xb0)](getClaudeConfigDir),'skills');}export function getProjectRoot(){const _0x3d7048=_0x28c1,_0x4ae329={'aqgdR':function(_0x20a293,_0x21b2e3){return _0x20a293(_0x21b2e3);},'WlxUy':function(_0x38b594,_0x1bf8bf,_0x5b80cc){return _0x38b594(_0x1bf8bf,_0x5b80cc);}};let _0x4747f0=process['cwd']();const _0x79c99b=_0x4ae329['aqgdR'](parse,_0x4747f0)[_0x3d7048(0xac)];while(_0x4747f0!==_0x79c99b){if(_0x4ae329[_0x3d7048(0xb4)](existsSync,_0x4ae329['WlxUy'](join,_0x4747f0,'.claude')))return _0x4747f0;if(_0x4ae329[_0x3d7048(0xb4)](existsSync,_0x4ae329['WlxUy'](join,_0x4747f0,'.git')))return _0x4747f0;_0x4747f0=dirname(_0x4747f0);}return process['cwd']();}export function getProjectSkillsDir(){const _0x2e276c=_0x28c1,_0x22f958={'YbAnC':_0x2e276c(0xb8)};return join(getProjectRoot(),_0x22f958[_0x2e276c(0xc1)],_0x2e276c(0xbd));}export function getSkillsDir(_0x5ec3c3){const _0x3e1963={'cFtzt':function(_0x4be17f,_0x50919e){return _0x4be17f===_0x50919e;},'hrIoJ':'user','wfZsr':function(_0xf69f12){return _0xf69f12();}};return _0x3e1963['cFtzt'](_0x5ec3c3,_0x3e1963['hrIoJ'])?getUserSkillsDir():_0x3e1963['wfZsr'](getProjectSkillsDir);}function _0x28c1(_0x29e896,_0x194bce){_0x29e896=_0x29e896-0xa7;const _0x3a4af6=_0x3a4a();let _0x28c13c=_0x3a4af6[_0x29e896];return _0x28c13c;}function _0x3a4a(){const _0x173cf5=['412400SjAWnz','qQHiq','mMAGF','YbAnC','mcpServers','1107920FJzASC','data-mcp-server','1046271sZtTqr','7sDPKhP','root','1542198PaXoIo','464229IBFcTA','47112fleKYg','XxOsY','TuEjj','stringify','jqvsv','aqgdR','npx','1737VPpoUU','settings.json','.claude','4FsfSGl','@ranger-testing/ranger-cli','VKvhd','7570010fLcmhk','skills'];_0x3a4a=function(){return _0x173cf5;};return _0x3a4a();}export function getSettingsPath(){const _0x32e56b=_0x28c1,_0x12c8f8={'RdrWr':function(_0xff3464,_0x178063,_0x467efb){return _0xff3464(_0x178063,_0x467efb);},'qQHiq':_0x32e56b(0xb7)};return _0x12c8f8['RdrWr'](join,getClaudeConfigDir(),_0x12c8f8[_0x32e56b(0xbf)]);}export async function loadClaudeSettings(){const _0x45c10a=_0x28c1,_0x5dbfeb={'VKvhd':function(_0x524e02,_0x234747){return _0x524e02(_0x234747);},'jqvsv':'utf-8'},_0x4e4de9=getSettingsPath();if(!_0x5dbfeb[_0x45c10a(0xbb)](existsSync,_0x4e4de9))return{};try{const _0x5ccc2b=await readFile(_0x4e4de9,_0x5dbfeb[_0x45c10a(0xb3)]);return JSON['parse'](_0x5ccc2b);}catch{return{};}}export async function saveClaudeSettings(_0x1b255c){const _0x45cdfa=_0x28c1,_0x397250={'wqeVs':function(_0x75d101,_0x42ee28){return _0x75d101(_0x42ee28);},'TuEjj':function(_0x3439ea,_0x4dc809,_0x36a33d){return _0x3439ea(_0x4dc809,_0x36a33d);},'fqJjH':function(_0x2d16a6,_0x1993fa){return _0x2d16a6+_0x1993fa;}},_0x45ea58=getSettingsPath(),_0x9f6ec1=getClaudeConfigDir();!_0x397250['wqeVs'](existsSync,_0x9f6ec1)&&await _0x397250[_0x45cdfa(0xb1)](mkdir,_0x9f6ec1,{'recursive':!![]}),await writeFile(_0x45ea58,_0x397250['fqJjH'](JSON[_0x45cdfa(0xb2)](_0x1b255c,null,0x2),'\x0a'),'utf-8');}export function hasRangerServerInSettings(_0x24b1bb){const _0x3e9e2e=_0x28c1;return _0x24b1bb[_0x3e9e2e(0xa7)]?.['ranger']!==undefined;}export function setRangerServerInSettings(_0x19ab37){const _0x518367=_0x28c1,_0x3fc711={'tMLAR':_0x518367(0xb5)};!_0x19ab37[_0x518367(0xa7)]&&(_0x19ab37['mcpServers']={}),_0x19ab37['mcpServers']['ranger']={'command':_0x3fc711['tMLAR'],'args':[_0x518367(0xba),_0x518367(0xa9)]};}
1
+ function _0x4915(_0x48ec83,_0x1192f2){_0x48ec83=_0x48ec83-0xd0;const _0x36563e=_0x3656();let _0x4915b6=_0x36563e[_0x48ec83];return _0x4915b6;}function _0x3656(){const _0x4aa7a5=['1091701HajABh','9eYGBTS','nkCKy','parse','5ZLdKbu','XFjCx','2099218AbWvcZ','3000651AKGAUQ','uJoIl','env','PQTPk','288348dEreoq','ranger','cwd','pjbNj','RTabu','226093KKceIb','.git','kHzQm','pGMmW','ELaFi','XHrmX','6145928EqGfKC','grWBK','253ZSNSYk','zNofW','settings.json','425230HGQrsa','npx','.claude','6WHkFFv'];_0x3656=function(){return _0x4aa7a5;};return _0x3656();}(function(_0x2d7a15,_0x138a7b){const _0x120468=_0x4915,_0x17827f=_0x2d7a15();while(!![]){try{const _0x55852f=-parseInt(_0x120468(0xd1))/0x1+parseInt(_0x120468(0xd7))/0x2+parseInt(_0x120468(0xd8))/0x3+parseInt(_0x120468(0xdc))/0x4*(-parseInt(_0x120468(0xd5))/0x5)+parseInt(_0x120468(0xd0))/0x6*(parseInt(_0x120468(0xe1))/0x7)+-parseInt(_0x120468(0xe7))/0x8*(-parseInt(_0x120468(0xd2))/0x9)+parseInt(_0x120468(0xec))/0xa*(-parseInt(_0x120468(0xe9))/0xb);if(_0x55852f===_0x138a7b)break;else _0x17827f['push'](_0x17827f['shift']());}catch(_0x59c803){_0x17827f['push'](_0x17827f['shift']());}}}(_0x3656,0xacfc5));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x2105f9=_0x4915,_0x538e21={'uJoIl':'.claude'};return process[_0x2105f9(0xda)]['CLAUDE_CONFIG_DIR']||join(homedir(),_0x538e21[_0x2105f9(0xd9)]);}export function getUserSkillsDir(){return join(getClaudeConfigDir(),'skills');}export function getProjectRoot(){const _0x95b745=_0x4915,_0x23bb90={'glOjV':function(_0x2b3783,_0x1c8b4e){return _0x2b3783(_0x1c8b4e);},'PQTPk':_0x95b745(0xe2)};let _0xd09c8d=process[_0x95b745(0xde)]();const _0x9d3d1f=_0x23bb90['glOjV'](parse,_0xd09c8d)['root'];while(_0xd09c8d!==_0x9d3d1f){if(existsSync(join(_0xd09c8d,_0x95b745(0xee))))return _0xd09c8d;if(existsSync(join(_0xd09c8d,_0x23bb90[_0x95b745(0xdb)])))return _0xd09c8d;_0xd09c8d=dirname(_0xd09c8d);}return process['cwd']();}export function getProjectSkillsDir(){const _0x6fd7e9=_0x4915,_0x45a08f={'ELaFi':function(_0x194065){return _0x194065();},'nkCKy':'.claude','bRDME':'skills'};return join(_0x45a08f[_0x6fd7e9(0xe5)](getProjectRoot),_0x45a08f[_0x6fd7e9(0xd3)],_0x45a08f['bRDME']);}export function getSkillsDir(_0x141daa){const _0x10714f=_0x4915,_0x1fd249={'XHrmX':function(_0x3a8396,_0x2dce36){return _0x3a8396===_0x2dce36;},'grWBK':function(_0x68187f){return _0x68187f();}};return _0x1fd249[_0x10714f(0xe6)](_0x141daa,'user')?getUserSkillsDir():_0x1fd249[_0x10714f(0xe8)](getProjectSkillsDir);}export function getSettingsPath(){const _0x45fd1a=_0x4915,_0x2eb4a7={'pjbNj':function(_0x464455,_0x28d8a4,_0x702cac){return _0x464455(_0x28d8a4,_0x702cac);},'pGMmW':function(_0x6d59a5){return _0x6d59a5();},'kHzQm':_0x45fd1a(0xeb)};return _0x2eb4a7[_0x45fd1a(0xdf)](join,_0x2eb4a7[_0x45fd1a(0xe4)](getClaudeConfigDir),_0x2eb4a7[_0x45fd1a(0xe3)]);}export async function loadClaudeSettings(){const _0x58d323=_0x4915,_0x429d45=getSettingsPath();if(!existsSync(_0x429d45))return{};try{const _0x2d58b6=await readFile(_0x429d45,'utf-8');return JSON[_0x58d323(0xd4)](_0x2d58b6);}catch{return{};}}export async function saveClaudeSettings(_0x4e351c){const _0x2dbaf7=_0x4915,_0x277783={'XFjCx':function(_0x5a864e){return _0x5a864e();},'RTabu':function(_0x1f65da,_0x1e1c3c){return _0x1f65da(_0x1e1c3c);},'VrWcA':function(_0x2cb032,_0x323f0e,_0x321e10,_0x3c5621){return _0x2cb032(_0x323f0e,_0x321e10,_0x3c5621);},'uVgCX':function(_0x34d506,_0x183ece){return _0x34d506+_0x183ece;}},_0x1923c4=getSettingsPath(),_0x170e26=_0x277783[_0x2dbaf7(0xd6)](getClaudeConfigDir);!_0x277783[_0x2dbaf7(0xe0)](existsSync,_0x170e26)&&await mkdir(_0x170e26,{'recursive':!![]}),await _0x277783['VrWcA'](writeFile,_0x1923c4,_0x277783['uVgCX'](JSON['stringify'](_0x4e351c,null,0x2),'\x0a'),'utf-8');}export function hasRangerServerInSettings(_0x46f33f){const _0x4bbde8=_0x4915,_0x59e337={'bRDMX':function(_0x54fee0,_0x4ab212){return _0x54fee0!==_0x4ab212;}};return _0x59e337['bRDMX'](_0x46f33f['mcpServers']?.[_0x4bbde8(0xdd)],undefined);}export function setRangerServerInSettings(_0xf29116){const _0x2ffd76=_0x4915,_0x2c9710={'mvMql':'@ranger-testing/ranger-cli','zNofW':'data-mcp-server'};!_0xf29116['mcpServers']&&(_0xf29116['mcpServers']={}),_0xf29116['mcpServers'][_0x2ffd76(0xdd)]={'command':_0x2ffd76(0xed),'args':[_0x2c9710['mvMql'],_0x2c9710[_0x2ffd76(0xea)]]};}
@@ -1 +1 @@
1
- (function(_0x3cb5a3,_0x54b55c){const _0x25783e=_0x5722,_0x21b84e=_0x3cb5a3();while(!![]){try{const _0x2bac45=parseInt(_0x25783e(0x182))/0x1+-parseInt(_0x25783e(0x169))/0x2*(-parseInt(_0x25783e(0x174))/0x3)+-parseInt(_0x25783e(0x181))/0x4*(-parseInt(_0x25783e(0x179))/0x5)+-parseInt(_0x25783e(0x17d))/0x6*(-parseInt(_0x25783e(0x16b))/0x7)+parseInt(_0x25783e(0x17b))/0x8*(parseInt(_0x25783e(0x16f))/0x9)+parseInt(_0x25783e(0x17f))/0xa*(-parseInt(_0x25783e(0x170))/0xb)+-parseInt(_0x25783e(0x171))/0xc*(parseInt(_0x25783e(0x186))/0xd);if(_0x2bac45===_0x54b55c)break;else _0x21b84e['push'](_0x21b84e['shift']());}catch(_0x30338e){_0x21b84e['push'](_0x21b84e['shift']());}}}(_0x3d06,0x7eeb3));import{spawn}from'child_process';export function runClaudeCommand(_0x17ebc7,_0x2ae444){const _0x5ddaa0=_0x5722,_0x5e0a5a={'tYhdj':function(_0x2ff811,_0x129a25){return _0x2ff811(_0x129a25);},'NEDAS':_0x5ddaa0(0x17a),'qfQvY':'inherit','eOLDl':function(_0x412f3f,_0x5e6d10,_0x2bb109,_0x2064f3){return _0x412f3f(_0x5e6d10,_0x2bb109,_0x2064f3);},'NNack':'data','myefJ':_0x5ddaa0(0x175)};return new Promise(_0x59cf4e=>{const _0x93866d=_0x5ddaa0,_0x526aa5=_0x2ae444?.['captureOutput']?_0x5e0a5a['NEDAS']:_0x5e0a5a['qfQvY'],_0x10cc2b=_0x5e0a5a[_0x93866d(0x188)](spawn,_0x93866d(0x180),_0x17ebc7,{'stdio':_0x526aa5});let _0x42abdb='';_0x2ae444?.['captureOutput']&&_0x10cc2b[_0x93866d(0x16d)]&&_0x10cc2b['stdout']['on'](_0x93866d(0x16e),_0x3dce13=>{const _0x11f29d=_0x93866d;_0x42abdb+=_0x3dce13[_0x11f29d(0x167)]();}),_0x2ae444?.[_0x93866d(0x177)]&&_0x10cc2b['stderr']&&_0x10cc2b[_0x93866d(0x176)]['on'](_0x5e0a5a[_0x93866d(0x172)],_0x1b685c=>{const _0x56c095=_0x93866d;_0x42abdb+=_0x1b685c[_0x56c095(0x167)]();}),_0x10cc2b['on']('close',_0x3d6e5f=>{_0x3d6e5f===0x0?_0x5e0a5a['tYhdj'](_0x59cf4e,{'success':!![],'output':_0x42abdb}):_0x59cf4e({'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x3d6e5f,'output':_0x42abdb});}),_0x10cc2b['on'](_0x5e0a5a[_0x93866d(0x16a)],_0x288855=>{const _0x35585d=_0x93866d;_0x59cf4e({'success':![],'error':_0x288855[_0x35585d(0x185)]});});});}export async function isMarketplaceAdded(_0x24710d){const _0x43d54f=_0x5722,_0x10fe51={'KQZDz':function(_0xad7498,_0x2596a8,_0x263990){return _0xad7498(_0x2596a8,_0x263990);},'zDaAg':_0x43d54f(0x16c)},_0xd3210=await _0x10fe51[_0x43d54f(0x189)](runClaudeCommand,['plugin','marketplace',_0x10fe51['zDaAg']],{'captureOutput':!![]});if(!_0xd3210['success']||!_0xd3210['output'])return![];return _0xd3210[_0x43d54f(0x17c)][_0x43d54f(0x168)](_0x24710d);}export async function isPluginInstalled(_0x569501){const _0x517014=_0x5722,_0x45e1c6={'EqlPk':_0x517014(0x16c)},_0x3bf392=await runClaudeCommand([_0x517014(0x187),_0x45e1c6['EqlPk']],{'captureOutput':!![]});if(!_0x3bf392[_0x517014(0x184)]||!_0x3bf392[_0x517014(0x17c)])return![];return _0x3bf392['output']['includes'](_0x569501);}function _0x5722(_0x3dcb5e,_0x240cca){_0x3dcb5e=_0x3dcb5e-0x167;const _0x3d06e2=_0x3d06();let _0x572230=_0x3d06e2[_0x3dcb5e];return _0x572230;}export async function getPluginInfo(_0xc8742f){const _0x25e258=_0x5722,_0x31f2c5={'OjZda':function(_0x188a44,_0xb1cca1,_0x3161de){return _0x188a44(_0xb1cca1,_0x3161de);},'CEbkQ':function(_0x5776a0,_0x24e4cd){return _0x5776a0===_0x24e4cd;}},_0x2ce80b=await _0x31f2c5['OjZda'](runClaudeCommand,[_0x25e258(0x187),_0x25e258(0x16c)],{'captureOutput':!![]});if(!_0x2ce80b['success']||!_0x2ce80b[_0x25e258(0x17c)])return null;if(!_0x2ce80b['output']['includes'](_0xc8742f))return null;const _0x5005e2={'name':_0xc8742f},_0x34e13f=_0x2ce80b['output']['match'](new RegExp(_0xc8742f+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x34e13f&&(_0x5005e2[_0x25e258(0x17e)]=_0x34e13f[0x1][_0x25e258(0x183)]());const _0x196890=_0x2ce80b['output']['match'](new RegExp(_0xc8742f+'[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','i'));_0x196890&&(_0x5005e2['version']=_0x196890[0x1]);const _0x351e4c=_0x2ce80b[_0x25e258(0x17c)]['match'](new RegExp(_0xc8742f+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0x351e4c&&(_0x5005e2['enabled']=_0x31f2c5[_0x25e258(0x178)](_0x351e4c[0x1]['toLowerCase'](),_0x25e258(0x173))),_0x5005e2;}function _0x3d06(){const _0xd5f2=['toLowerCase','success','message','33455903SLcmwg','plugin','eOLDl','KQZDz','toString','includes','6bqzATE','myefJ','137809EhKfcb','list','stdout','data','45rXecLE','319jufmjH','12cxSjsC','NNack','enabled','345501OoiSlc','error','stderr','captureOutput','CEbkQ','79055QjASAI','pipe','860680ecsfQp','output','234IHSuCj','scope','44930zLtrGD','claude','164YfVYUJ','924217shRMqP'];_0x3d06=function(){return _0xd5f2;};return _0x3d06();}
1
+ (function(_0x165c6a,_0x35f49c){const _0x51f5c1=_0x16e1,_0x2a80cd=_0x165c6a();while(!![]){try{const _0x7de53f=-parseInt(_0x51f5c1(0x17c))/0x1*(parseInt(_0x51f5c1(0x18c))/0x2)+-parseInt(_0x51f5c1(0x17d))/0x3*(-parseInt(_0x51f5c1(0x183))/0x4)+-parseInt(_0x51f5c1(0x17e))/0x5*(parseInt(_0x51f5c1(0x187))/0x6)+parseInt(_0x51f5c1(0x185))/0x7+parseInt(_0x51f5c1(0x170))/0x8+parseInt(_0x51f5c1(0x17f))/0x9+-parseInt(_0x51f5c1(0x18a))/0xa;if(_0x7de53f===_0x35f49c)break;else _0x2a80cd['push'](_0x2a80cd['shift']());}catch(_0x318322){_0x2a80cd['push'](_0x2a80cd['shift']());}}}(_0x3116,0xdefa6));import{spawn}from'child_process';export function runClaudeCommand(_0x39e80a,_0x592662){const _0xbd44a8=_0x16e1,_0x371ad9={'VbQFF':function(_0x25b749,_0x3e0625){return _0x25b749===_0x3e0625;},'UoZgB':_0xbd44a8(0x176),'lgqNU':function(_0x446624,_0x286e5f,_0x9caa6,_0x3d56af){return _0x446624(_0x286e5f,_0x9caa6,_0x3d56af);},'GkapF':'claude','tIZTO':_0xbd44a8(0x179),'TgezH':'close','ydybP':'error'};return new Promise(_0x4182bc=>{const _0x58c1ab=_0xbd44a8,_0x74b5bd=_0x592662?.[_0x58c1ab(0x17b)]?'pipe':_0x371ad9[_0x58c1ab(0x18d)],_0x2e7704=_0x371ad9['lgqNU'](spawn,_0x371ad9['GkapF'],_0x39e80a,{'stdio':_0x74b5bd});let _0x12db3c='';_0x592662?.[_0x58c1ab(0x17b)]&&_0x2e7704[_0x58c1ab(0x184)]&&_0x2e7704['stdout']['on'](_0x371ad9[_0x58c1ab(0x18b)],_0x591ee9=>{const _0x37d1f1=_0x58c1ab;_0x12db3c+=_0x591ee9[_0x37d1f1(0x17a)]();}),_0x592662?.['captureOutput']&&_0x2e7704[_0x58c1ab(0x175)]&&_0x2e7704[_0x58c1ab(0x175)]['on']('data',_0x1ee811=>{_0x12db3c+=_0x1ee811['toString']();}),_0x2e7704['on'](_0x371ad9['TgezH'],_0x13a432=>{_0x371ad9['VbQFF'](_0x13a432,0x0)?_0x4182bc({'success':!![],'output':_0x12db3c}):_0x4182bc({'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x13a432,'output':_0x12db3c});}),_0x2e7704['on'](_0x371ad9['ydybP'],_0x322e14=>{const _0x815269=_0x58c1ab;_0x4182bc({'success':![],'error':_0x322e14[_0x815269(0x186)]});});});}export async function isMarketplaceAdded(_0x1bef80){const _0x390702=_0x16e1,_0x5311f7=await runClaudeCommand([_0x390702(0x189),'marketplace','list'],{'captureOutput':!![]});if(!_0x5311f7['success']||!_0x5311f7[_0x390702(0x18e)])return![];return _0x5311f7['output'][_0x390702(0x188)](_0x1bef80);}function _0x3116(){const _0x41061c=['stdout','5519654VBJafu','message','6bdldFx','includes','plugin','13962930MKXtXQ','tIZTO','8506ccWZPr','UoZgB','output','ZjeBD','10233960qwbavD','toLowerCase','[\x5cs\x5cS]*?(enabled|disabled)','cLtvv','VUItX','stderr','inherit','enabled','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','data','toString','captureOutput','353pQMuBY','244638KIZvpb','6248855iQXaub','13725864KxuOpm','Jhluh','success','list','72SgCppe'];_0x3116=function(){return _0x41061c;};return _0x3116();}export async function isPluginInstalled(_0xcc4ffc){const _0x2427ba=_0x16e1,_0xd75d45={'VUItX':function(_0x16eebd,_0x1f23eb,_0x29465f){return _0x16eebd(_0x1f23eb,_0x29465f);},'cLtvv':'plugin'},_0x545e25=await _0xd75d45[_0x2427ba(0x174)](runClaudeCommand,[_0xd75d45[_0x2427ba(0x173)],_0x2427ba(0x182)],{'captureOutput':!![]});if(!_0x545e25['success']||!_0x545e25['output'])return![];return _0x545e25[_0x2427ba(0x18e)][_0x2427ba(0x188)](_0xcc4ffc);}function _0x16e1(_0x3060ce,_0x5328cc){_0x3060ce=_0x3060ce-0x16f;const _0x311644=_0x3116();let _0x16e14a=_0x311644[_0x3060ce];return _0x16e14a;}export async function getPluginInfo(_0x2a306f){const _0x2cef36=_0x16e1,_0x433c43={'FxqWy':function(_0x3c7cb2,_0x52de9a,_0x403073){return _0x3c7cb2(_0x52de9a,_0x403073);},'Jhluh':_0x2cef36(0x189),'ZjeBD':_0x2cef36(0x177)},_0x4d10fd=await _0x433c43['FxqWy'](runClaudeCommand,[_0x433c43[_0x2cef36(0x180)],'list'],{'captureOutput':!![]});if(!_0x4d10fd[_0x2cef36(0x181)]||!_0x4d10fd['output'])return null;if(!_0x4d10fd['output'][_0x2cef36(0x188)](_0x2a306f))return null;const _0x364b12={'name':_0x2a306f},_0x1b7284=_0x4d10fd['output']['match'](new RegExp(_0x2a306f+'[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','i'));_0x1b7284&&(_0x364b12['scope']=_0x1b7284[0x1][_0x2cef36(0x171)]());const _0x393c47=_0x4d10fd['output']['match'](new RegExp(_0x2a306f+_0x2cef36(0x178),'i'));_0x393c47&&(_0x364b12['version']=_0x393c47[0x1]);const _0x4f9b01=_0x4d10fd[_0x2cef36(0x18e)]['match'](new RegExp(_0x2a306f+_0x2cef36(0x172),'i'));return _0x4f9b01&&(_0x364b12[_0x2cef36(0x177)]=_0x4f9b01[0x1][_0x2cef36(0x171)]()===_0x433c43[_0x2cef36(0x16f)]),_0x364b12;}
@@ -1 +1 @@
1
- const _0x1b7974=_0x2048;function _0x229e(){const _0x4147f7=['2332370CcAuyI','sha256','144ChLcQh','KTxgZ','subarray','778717sUFPin','aes-256-gcm','21QaslTj','ranger-auth-encryption','257763CQcmpm','642738TMqDgY','utf8','1548099yhNFXw','19443DkpSCm','3177984YeKuaw','370zeGddv','update','2UFiXuj'];_0x229e=function(){return _0x4147f7;};return _0x229e();}(function(_0xb60312,_0x47968c){const _0x47448d=_0x2048,_0x324285=_0xb60312();while(!![]){try{const _0x55aa43=-parseInt(_0x47448d(0x78))/0x1*(-parseInt(_0x47448d(0x72))/0x2)+parseInt(_0x47448d(0x80))/0x3*(parseInt(_0x47448d(0x75))/0x4)+parseInt(_0x47448d(0x73))/0x5+parseInt(_0x47448d(0x7d))/0x6*(-parseInt(_0x47448d(0x7a))/0x7)+parseInt(_0x47448d(0x81))/0x8+-parseInt(_0x47448d(0x7f))/0x9+parseInt(_0x47448d(0x82))/0xa*(-parseInt(_0x47448d(0x7c))/0xb);if(_0x55aa43===_0x47968c)break;else _0x324285['push'](_0x324285['shift']());}catch(_0x1d0220){_0x324285['push'](_0x324285['shift']());}}}(_0x229e,0x7dd1a));function _0x2048(_0x592242,_0x1e63c7){_0x592242=_0x592242-0x71;const _0x229e75=_0x229e();let _0x20481e=_0x229e75[_0x592242];return _0x20481e;}import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x1b7974(0x79),SALT=_0x1b7974(0x7b),KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x111b34){const _0x21c8a7=_0x1b7974;return pbkdf2Sync(_0x111b34,SALT,0x186a0,KEY_LENGTH,_0x21c8a7(0x74));}export function encrypt(_0x33b4bd,_0x52c12f){const _0x1e742f=_0x1b7974,_0x4096fc={'edCHm':function(_0x4718fb,_0x13f9ae,_0x21c1a3,_0x1680bf){return _0x4718fb(_0x13f9ae,_0x21c1a3,_0x1680bf);}},_0x1912ce=deriveKey(_0x52c12f),_0x4221f9=randomBytes(IV_LENGTH),_0x519d22=_0x4096fc['edCHm'](createCipheriv,ALGORITHM,_0x1912ce,_0x4221f9),_0x27a2ac=Buffer['concat']([_0x519d22['update'](_0x33b4bd,_0x1e742f(0x7e)),_0x519d22['final']()]),_0xe908fa=_0x519d22['getAuthTag']();return Buffer['concat']([_0x4221f9,_0xe908fa,_0x27a2ac]);}export function decrypt(_0x4ee7d8,_0x3b7e08){const _0x33762c=_0x1b7974,_0x48b3d4={'KTxgZ':function(_0x21bb8f,_0x39d975){return _0x21bb8f(_0x39d975);},'ujDPe':function(_0x3dab26,_0x4a22a2){return _0x3dab26+_0x4a22a2;},'DlbZF':function(_0x47a9cd,_0x59a867){return _0x47a9cd+_0x59a867;},'rVOgu':function(_0x2d77b7,_0x3fef89){return _0x2d77b7+_0x3fef89;}},_0x105928=_0x48b3d4[_0x33762c(0x76)](deriveKey,_0x3b7e08),_0x46a668=_0x4ee7d8['subarray'](0x0,IV_LENGTH),_0x1f1b19=_0x4ee7d8[_0x33762c(0x77)](IV_LENGTH,_0x48b3d4['ujDPe'](IV_LENGTH,TAG_LENGTH)),_0x3b9175=_0x4ee7d8['subarray'](_0x48b3d4['DlbZF'](IV_LENGTH,TAG_LENGTH)),_0x5cd7c3=createDecipheriv(ALGORITHM,_0x105928,_0x46a668);return _0x5cd7c3['setAuthTag'](_0x1f1b19),_0x48b3d4['rVOgu'](_0x5cd7c3[_0x33762c(0x71)](_0x3b9175),_0x5cd7c3['final'](_0x33762c(0x7e)));}
1
+ (function(_0x469ac1,_0x2ab660){const _0x15d7b2=_0x1080,_0xde7007=_0x469ac1();while(!![]){try{const _0x351fba=-parseInt(_0x15d7b2(0x70))/0x1+parseInt(_0x15d7b2(0x6c))/0x2+-parseInt(_0x15d7b2(0x76))/0x3+parseInt(_0x15d7b2(0x6a))/0x4+parseInt(_0x15d7b2(0x79))/0x5*(-parseInt(_0x15d7b2(0x6b))/0x6)+-parseInt(_0x15d7b2(0x77))/0x7+-parseInt(_0x15d7b2(0x6d))/0x8*(-parseInt(_0x15d7b2(0x7b))/0x9);if(_0x351fba===_0x2ab660)break;else _0xde7007['push'](_0xde7007['shift']());}catch(_0x2c4859){_0xde7007['push'](_0xde7007['shift']());}}}(_0x401d,0x36cf7));function _0x1080(_0x3a3095,_0x171146){_0x3a3095=_0x3a3095-0x6a;const _0x401d07=_0x401d();let _0x1080a5=_0x401d07[_0x3a3095];return _0x1080a5;}import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM='aes-256-gcm',SALT='ranger-auth-encryption',KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;function _0x401d(){const _0x53adf0=['96PGcpsE','setAuthTag','skmPa','232296DthueV','update','getAuthTag','subarray','concat','LkGAS','660360spZlhK','806519xuDDwR','sha256','35MIUysS','ESGif','240525ferVZj','utf8','1235104sxgZDH','185148tobtMC','757332bpNhoV'];_0x401d=function(){return _0x53adf0;};return _0x401d();}export function deriveKey(_0x5193dd){const _0x3c09e3=_0x1080,_0x252f6d={'ESGif':function(_0x46274e,_0x402fa7,_0x5e3f91,_0x1da6f1,_0x2d54db,_0x56edfd){return _0x46274e(_0x402fa7,_0x5e3f91,_0x1da6f1,_0x2d54db,_0x56edfd);}};return _0x252f6d[_0x3c09e3(0x7a)](pbkdf2Sync,_0x5193dd,SALT,0x186a0,KEY_LENGTH,_0x3c09e3(0x78));}export function encrypt(_0x3e57fe,_0xbc9682){const _0x435e6b=_0x1080,_0x557242={'LkGAS':function(_0x4b57f7,_0x44d931){return _0x4b57f7(_0x44d931);},'skmPa':function(_0x2318f1,_0x476a9a,_0x3ee119,_0x4e617d){return _0x2318f1(_0x476a9a,_0x3ee119,_0x4e617d);}},_0x8b3c3b=deriveKey(_0xbc9682),_0x356214=_0x557242[_0x435e6b(0x75)](randomBytes,IV_LENGTH),_0x37da10=_0x557242[_0x435e6b(0x6f)](createCipheriv,ALGORITHM,_0x8b3c3b,_0x356214),_0x582846=Buffer[_0x435e6b(0x74)]([_0x37da10[_0x435e6b(0x71)](_0x3e57fe,_0x435e6b(0x7c)),_0x37da10['final']()]),_0x254464=_0x37da10[_0x435e6b(0x72)]();return Buffer['concat']([_0x356214,_0x254464,_0x582846]);}export function decrypt(_0x2ed7de,_0x6ab6f0){const _0x2924a0=_0x1080,_0x3d8add={'wXiPg':function(_0x3c347a,_0x42b325){return _0x3c347a+_0x42b325;}},_0x5a112d=deriveKey(_0x6ab6f0),_0x544c47=_0x2ed7de[_0x2924a0(0x73)](0x0,IV_LENGTH),_0x2a17fa=_0x2ed7de['subarray'](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x36eb45=_0x2ed7de[_0x2924a0(0x73)](_0x3d8add['wXiPg'](IV_LENGTH,TAG_LENGTH)),_0x17bf50=createDecipheriv(ALGORITHM,_0x5a112d,_0x544c47);return _0x17bf50[_0x2924a0(0x6e)](_0x2a17fa),_0x3d8add['wXiPg'](_0x17bf50[_0x2924a0(0x71)](_0x36eb45),_0x17bf50['final'](_0x2924a0(0x7c)));}
@@ -1 +1 @@
1
- const _0x21f571=_0x1885;(function(_0x1bbaf2,_0x1fe551){const _0x21721b=_0x1885,_0x2f3fbf=_0x1bbaf2();while(!![]){try{const _0x55967a=parseInt(_0x21721b(0x102))/0x1+parseInt(_0x21721b(0x10b))/0x2+-parseInt(_0x21721b(0x116))/0x3*(-parseInt(_0x21721b(0x124))/0x4)+-parseInt(_0x21721b(0xff))/0x5+parseInt(_0x21721b(0x107))/0x6*(-parseInt(_0x21721b(0x108))/0x7)+parseInt(_0x21721b(0xfd))/0x8+parseInt(_0x21721b(0xfa))/0x9*(-parseInt(_0x21721b(0x117))/0xa);if(_0x55967a===_0x1fe551)break;else _0x2f3fbf['push'](_0x2f3fbf['shift']());}catch(_0x39aebf){_0x2f3fbf['push'](_0x2f3fbf['shift']());}}}(_0x3583,0x29800));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set([_0x21f571(0x11c),'-t',_0x21f571(0x12c),_0x21f571(0xf9),'--apikey',_0x21f571(0x100),'--password',_0x21f571(0x105),_0x21f571(0x104),_0x21f571(0x128),'--header',_0x21f571(0x106),_0x21f571(0x125)]),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x26f998){const _0x313b75=_0x21f571;return TOKEN_PATTERNS[_0x313b75(0x121)](_0x1eb480=>_0x1eb480[_0x313b75(0x118)](_0x26f998));}function _0x3583(){const _0x4c34ae=['Unknown\x20argument','--api-key','99WlNhcU','pNrYZ','stdout','524184gaKPcn','DEBUG','1350730fvwLnX','--key','/api/v1/mcp/desire-path-logs','15650jqshLQ','iQQnF','--auth','--pass','--cookie','237522XiHXcr','7dBGcuk','length','slice','493142jyvLzD','missing_required_argument','ziRDJ','3|4|7|5|1|6|0|2','join','startsWith','[desire-path]\x20Sending\x20log\x20to\x20','igQSa','Unknown\x20command','toLowerCase','invalid_option_value','771YFGJzX','109030PNFQRB','test','error','qVLID','bKyCE','--token','POST','[REDACTED]','Missing\x20required\x20argument','WvaIP','some','unknown_argument','includes','4232jMTArx','--credentials','push','featureId','--authorization','stringify','runtime_error','syntax_error','--secret','Invalid\x20values','gdNxm','sNXsl','errorMessage','btaRL','has_token','sessionId'];_0x3583=function(){return _0x4c34ae;};return _0x3583();}export function sanitizeArgs(_0x36c8ad){const _0x50f9df=_0x21f571,_0x525ce0={'btaRL':function(_0x4100bb,_0x25850a){return _0x4100bb(_0x25850a);}},_0x1bb35=[];let _0x56f285=![];for(let _0x5037f0=0x0;_0x5037f0<_0x36c8ad[_0x50f9df(0x109)];_0x5037f0++){const _0x3c0e16=_0x36c8ad[_0x5037f0];if(_0x56f285){_0x1bb35[_0x50f9df(0x126)](_0x50f9df(0x11e)),_0x56f285=![];continue;}if(_0x3c0e16[_0x50f9df(0x110)]('--')||_0x3c0e16['startsWith']('-')){const _0x4f7563=_0x3c0e16['indexOf']('=');if(_0x4f7563!==-0x1){const _0x584333=_0x3c0e16['slice'](0x0,_0x4f7563)['toLowerCase']();if(SENSITIVE_FLAGS['has'](_0x584333)){_0x1bb35[_0x50f9df(0x126)](_0x3c0e16[_0x50f9df(0x10a)](0x0,_0x4f7563)+'=[REDACTED]');continue;}}else{const _0xd884f9=_0x3c0e16[_0x50f9df(0x114)]();SENSITIVE_FLAGS['has'](_0xd884f9)&&(_0x56f285=!![]);}_0x1bb35[_0x50f9df(0x126)](_0x3c0e16);}else _0x525ce0[_0x50f9df(0xf5)](looksLikeToken,_0x3c0e16)?_0x1bb35[_0x50f9df(0x126)]('[REDACTED]'):_0x1bb35[_0x50f9df(0x126)](_0x3c0e16);}return _0x1bb35[_0x50f9df(0x10f)]('\x20');}export async function logDesirePath(_0x398f1f){const _0x598909=_0x21f571,_0x1d6bd0={'qVLID':function(_0x180f9c){return _0x180f9c();},'nYfGO':'no_token','ziRDJ':'application/json','WvaIP':function(_0x7e6216,_0x2c6e96,_0x44bbba){return _0x7e6216(_0x2c6e96,_0x44bbba);},'igQSa':_0x598909(0x11d)};try{const _0xa25e23=await _0x1d6bd0[_0x598909(0x11a)](getToken)['catch'](()=>null),_0x4cd41e=getApiBaseUrl(),_0x38040e=getCurrentVersion(),_0x1f3b59=_0xa25e23?_0x598909(0xf6):_0x1d6bd0['nYfGO'],_0x1aac75={..._0x398f1f['metadata'],'authStatus':_0x1f3b59,'isTty':process[_0x598909(0xfc)]['isTTY']??![]},_0x333171={'Content-Type':_0x1d6bd0[_0x598909(0x10d)]};_0xa25e23&&(_0x333171['Authorization']='Bearer\x20'+_0xa25e23);const _0x1d1212={'rawCommand':_0x398f1f['rawCommand'],'errorMessage':_0x398f1f[_0x598909(0xf4)],'errorType':_0x398f1f['errorType'],'featureId':_0x398f1f[_0x598909(0x127)],'sessionId':_0x398f1f[_0x598909(0xf7)],'metadata':_0x1aac75,'cliVersion':_0x38040e};process['env'][_0x598909(0xfe)]&&(console['error'](_0x598909(0x111)+_0x4cd41e+'/api/v1/mcp/desire-path-logs'),console[_0x598909(0x119)]('[desire-path]\x20Payload:\x20'+JSON['stringify'](_0x1d1212,null,0x2))),await _0x1d6bd0[_0x598909(0x120)](fetch,_0x4cd41e+_0x598909(0x101),{'method':_0x1d6bd0[_0x598909(0x112)],'headers':_0x333171,'body':JSON[_0x598909(0x129)](_0x1d1212)});}catch(_0x266bb9){process['env']['DEBUG']&&console[_0x598909(0x119)]('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x266bb9);}}function _0x1885(_0x18e7f2,_0x200040){_0x18e7f2=_0x18e7f2-0xf4;const _0x35839c=_0x3583();let _0x188569=_0x35839c[_0x18e7f2];return _0x188569;}export function getErrorType(_0x30785f,_0x14e53c){const _0x5bdd22=_0x21f571,_0x5ea09b={'gdNxm':_0x5bdd22(0x11f),'lcFBX':_0x5bdd22(0x12b),'ptlQJ':'unknown','sNXsl':_0x5bdd22(0x122),'FrRJH':_0x5bdd22(0x12d),'iQQnF':_0x5bdd22(0x115),'pNrYZ':_0x5bdd22(0x113),'bKyCE':'unknown_command'},_0x1ced28=_0x5bdd22(0x10e)['split']('|');let _0x33ed53=0x0;while(!![]){switch(_0x1ced28[_0x33ed53++]){case'0':if(_0x30785f[_0x5bdd22(0x123)](_0x5ea09b[_0x5bdd22(0x12e)]))return'missing_option';continue;case'1':if(_0x30785f['includes']('Not\x20enough\x20non-option\x20arguments'))return _0x5bdd22(0x10c);continue;case'2':return _0x5ea09b['lcFBX'];case'3':if(_0x14e53c)return _0x5bdd22(0x12a);continue;case'4':if(!_0x30785f)return _0x5ea09b['ptlQJ'];continue;case'5':if(_0x30785f['includes'](_0x5bdd22(0xf8)))return _0x5ea09b[_0x5bdd22(0x12f)];continue;case'6':if(_0x30785f[_0x5bdd22(0x123)](_0x5ea09b['FrRJH']))return _0x5ea09b[_0x5bdd22(0x103)];continue;case'7':if(_0x30785f[_0x5bdd22(0x123)](_0x5ea09b[_0x5bdd22(0xfb)]))return _0x5ea09b[_0x5bdd22(0x11b)];continue;}break;}}
1
+ const _0x1d72a2=_0x35ac;function _0x35ac(_0x5a97b8,_0x450253){_0x5a97b8=_0x5a97b8-0x11a;const _0xba30e7=_0xba30();let _0x35ac68=_0xba30e7[_0x5a97b8];return _0x35ac68;}(function(_0x12a383,_0x220935){const _0x515616=_0x35ac,_0x587456=_0x12a383();while(!![]){try{const _0x2af616=parseInt(_0x515616(0x11f))/0x1+parseInt(_0x515616(0x12e))/0x2+parseInt(_0x515616(0x142))/0x3+parseInt(_0x515616(0x132))/0x4*(-parseInt(_0x515616(0x13c))/0x5)+-parseInt(_0x515616(0x11c))/0x6*(parseInt(_0x515616(0x120))/0x7)+-parseInt(_0x515616(0x144))/0x8+parseInt(_0x515616(0x12a))/0x9;if(_0x2af616===_0x220935)break;else _0x587456['push'](_0x587456['shift']());}catch(_0x37401e){_0x587456['push'](_0x587456['shift']());}}}(_0xba30,0x6619b));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0xba30(){const _0x246506=['has','45956mHPxFR','GcDtx','DEBUG','POST','--auth','invalid_option_value','--password','rawCommand','qCUCJ','Authorization','315pvKDev','indexOf','yaDvD','no_token','missing_option','join','1898613yYuEcu','[desire-path]\x20Payload:\x20','5071680wnjebS','catch','env','EBcVt','stdout','/api/v1/mcp/desire-path-logs','--apikey','error','rIeIg','Invalid\x20values','--token','--api-key','--key','=[REDACTED]','2502fUqodP','goYUR','--header','22413odOqMB','9121WDtbDL','--pass','startsWith','Bearer\x20','has_token','stringify','metadata','LlPzH','guSwX','toLowerCase','13127112jewRWt','includes','--credentials','--cookie','410938deelXz','[REDACTED]','dBpYG'];_0xba30=function(){return _0x246506;};return _0xba30();}import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set([_0x1d72a2(0x14e),'-t','--secret',_0x1d72a2(0x14f),_0x1d72a2(0x14a),_0x1d72a2(0x11a),_0x1d72a2(0x138),_0x1d72a2(0x121),_0x1d72a2(0x136),'--authorization',_0x1d72a2(0x11e),_0x1d72a2(0x12d),_0x1d72a2(0x12c)]),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x219d83){return TOKEN_PATTERNS['some'](_0x5e8956=>_0x5e8956['test'](_0x219d83));}export function sanitizeArgs(_0x3a73ca){const _0x533734=_0x1d72a2,_0x4d5dc8={'gQVCx':function(_0x2958a4,_0x5a73e0){return _0x2958a4!==_0x5a73e0;},'KabWV':function(_0x1a59e4,_0x16a90e){return _0x1a59e4(_0x16a90e);}},_0x58b8c1=[];let _0x546385=![];for(let _0x9a1629=0x0;_0x9a1629<_0x3a73ca['length'];_0x9a1629++){const _0x3185bd=_0x3a73ca[_0x9a1629];if(_0x546385){_0x58b8c1['push'](_0x533734(0x12f)),_0x546385=![];continue;}if(_0x3185bd[_0x533734(0x122)]('--')||_0x3185bd['startsWith']('-')){const _0x4f1e18=_0x3185bd[_0x533734(0x13d)]('=');if(_0x4d5dc8['gQVCx'](_0x4f1e18,-0x1)){const _0x31fbcb=_0x3185bd['slice'](0x0,_0x4f1e18)['toLowerCase']();if(SENSITIVE_FLAGS['has'](_0x31fbcb)){_0x58b8c1['push'](_0x3185bd['slice'](0x0,_0x4f1e18)+_0x533734(0x11b));continue;}}else{const _0x1e18cc=_0x3185bd[_0x533734(0x129)]();SENSITIVE_FLAGS[_0x533734(0x131)](_0x1e18cc)&&(_0x546385=!![]);}_0x58b8c1['push'](_0x3185bd);}else _0x4d5dc8['KabWV'](looksLikeToken,_0x3185bd)?_0x58b8c1['push'](_0x533734(0x12f)):_0x58b8c1['push'](_0x3185bd);}return _0x58b8c1[_0x533734(0x141)]('\x20');}export async function logDesirePath(_0x39a236){const _0x4089b7=_0x1d72a2,_0x100000={'goYUR':function(_0x3edfd6){return _0x3edfd6();},'qCUCJ':_0x4089b7(0x124),'yaDvD':_0x4089b7(0x13f),'rIeIg':'application/json','aaPaY':_0x4089b7(0x135)};try{const _0x4ca61a=await _0x100000['goYUR'](getToken)[_0x4089b7(0x145)](()=>null),_0x4dd07f=_0x100000[_0x4089b7(0x11d)](getApiBaseUrl),_0x2312e8=getCurrentVersion(),_0x48b9ee=_0x4ca61a?_0x100000[_0x4089b7(0x13a)]:_0x100000[_0x4089b7(0x13e)],_0x1c3502={..._0x39a236[_0x4089b7(0x126)],'authStatus':_0x48b9ee,'isTty':process[_0x4089b7(0x148)]['isTTY']??![]},_0x5a00b9={'Content-Type':_0x100000[_0x4089b7(0x14c)]};_0x4ca61a&&(_0x5a00b9[_0x4089b7(0x13b)]=_0x4089b7(0x123)+_0x4ca61a);const _0xd4ff3={'rawCommand':_0x39a236[_0x4089b7(0x139)],'errorMessage':_0x39a236['errorMessage'],'errorType':_0x39a236['errorType'],'featureId':_0x39a236['featureId'],'sessionId':_0x39a236['sessionId'],'metadata':_0x1c3502,'cliVersion':_0x2312e8};process['env']['DEBUG']&&(console[_0x4089b7(0x14b)]('[desire-path]\x20Sending\x20log\x20to\x20'+_0x4dd07f+_0x4089b7(0x149)),console[_0x4089b7(0x14b)](_0x4089b7(0x143)+JSON[_0x4089b7(0x125)](_0xd4ff3,null,0x2))),await fetch(_0x4dd07f+_0x4089b7(0x149),{'method':_0x100000['aaPaY'],'headers':_0x5a00b9,'body':JSON[_0x4089b7(0x125)](_0xd4ff3)});}catch(_0x4ab030){process[_0x4089b7(0x146)][_0x4089b7(0x134)]&&console[_0x4089b7(0x14b)]('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x4ab030);}}export function getErrorType(_0x2ee4ca,_0x239e3b){const _0x3fd804=_0x1d72a2,_0x4fd383={'dBpYG':'runtime_error','guSwX':'unknown','NHDZH':'unknown_argument','EBcVt':_0x3fd804(0x14d),'LlPzH':'Missing\x20required\x20argument','GcDtx':_0x3fd804(0x140)};if(_0x239e3b)return _0x4fd383[_0x3fd804(0x130)];if(!_0x2ee4ca)return _0x4fd383[_0x3fd804(0x128)];if(_0x2ee4ca[_0x3fd804(0x12b)]('Unknown\x20command'))return'unknown_command';if(_0x2ee4ca['includes']('Unknown\x20argument'))return _0x4fd383['NHDZH'];if(_0x2ee4ca['includes']('Not\x20enough\x20non-option\x20arguments'))return'missing_required_argument';if(_0x2ee4ca[_0x3fd804(0x12b)](_0x4fd383[_0x3fd804(0x147)]))return _0x3fd804(0x137);if(_0x2ee4ca[_0x3fd804(0x12b)](_0x4fd383[_0x3fd804(0x127)]))return _0x4fd383[_0x3fd804(0x133)];return'syntax_error';}
@@ -1 +1 @@
1
- const _0x49950f=_0x40f2;(function(_0x48d457,_0x4f0149){const _0x38d109=_0x40f2,_0x33b344=_0x48d457();while(!![]){try{const _0xc6fe63=-parseInt(_0x38d109(0x17f))/0x1+parseInt(_0x38d109(0x1a2))/0x2+parseInt(_0x38d109(0x19a))/0x3+-parseInt(_0x38d109(0x186))/0x4*(parseInt(_0x38d109(0x1a0))/0x5)+-parseInt(_0x38d109(0x1a1))/0x6+-parseInt(_0x38d109(0x1ae))/0x7*(parseInt(_0x38d109(0x1b9))/0x8)+-parseInt(_0x38d109(0x1b1))/0x9*(-parseInt(_0x38d109(0x19f))/0xa);if(_0xc6fe63===_0x4f0149)break;else _0x33b344['push'](_0x33b344['shift']());}catch(_0x5273bd){_0x33b344['push'](_0x33b344['shift']());}}}(_0x2e1b,0x9a92a));import{exec}from'child_process';import _0x177733 from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL='https://api.workos.com/user_management/authorize/device',WORKOS_TOKEN_URL=_0x49950f(0x1cb);export async function requestDeviceCode(_0x46155f){const _0x5b0f51=_0x49950f,_0x244154={'KocRN':_0x5b0f51(0x18d),'NMrZI':'application/x-www-form-urlencoded'},_0x1b225d=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x244154['KocRN'],'headers':{'Content-Type':_0x244154[_0x5b0f51(0x1bc)]},'body':new URLSearchParams({'client_id':_0x46155f})});if(!_0x1b225d['ok']){const _0x387ef8=await _0x1b225d['text']();throw new Error(_0x5b0f51(0x189)+_0x1b225d[_0x5b0f51(0x1b8)]+'\x20'+_0x387ef8);}return _0x1b225d['json']();}function _0x2e1b(){const _0x181180=['selected','Invalid\x20JWT\x20format','error_description','log','https://api.workos.com/user_management/authenticate','platform','application/json','104991piPRth','from','XTURp','win32','OhJMu','LrtGs','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','1632016XMHnFo','bUvBU','parse','Failed\x20to\x20request\x20device\x20code:\x20','isTTY','start','AdReV','POST','DICif','PVXCi','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','json','startsWith','map','MLOIW','If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20','prompt','stdout','\x27s\x20CLI\x20Key','TcQXX','1571100skkKlp','name','list','refresh_token','utf-8','26345610kWErpx','15gexVsa','5690058PgfoRe','1252462BSNqao','XBZmV','split','filter','error','bPGip','xGOAN','now','Device\x20authorization\x20timed\x20out','qIeWK','expires_in','length','112QheVjs','open','xdg-open','9VPsCau','jSWff','CLI\x20Key','HRjPf','apiKeys','ZAqHr','text','status','437008ZPnBTh','org_id','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','NMrZI','organizationId','FzIwj','write','stdin','/organization/me','jjNTe','Code:\x20','workosClientId','/api-keys','Setting\x20up\x20your\x20organization...'];_0x2e1b=function(){return _0x181180;};return _0x2e1b();}export async function pollForTokens(_0x2b85a6,_0x4e4519,_0x491e93,_0x3026ca){const _0x3612ed=_0x49950f,_0x406eea={'AdReV':function(_0x489ff9,_0x51b459){return _0x489ff9*_0x51b459;},'uFSML':function(_0x4745b6,_0x7cf62c){return _0x4745b6<_0x7cf62c;},'rgCWc':function(_0x40ae49,_0x25fb0e){return _0x40ae49(_0x25fb0e);},'LrtGs':'application/x-www-form-urlencoded','OUBlO':'authorization_pending','jSWff':function(_0x4943c7,_0x52ded5){return _0x4943c7===_0x52ded5;},'IMvWt':'Authentication\x20failed','jjNTe':_0x3612ed(0x1aa)},_0x5017c3=Date[_0x3612ed(0x1a9)]()+_0x406eea[_0x3612ed(0x18c)](_0x3026ca,0x3e8);let _0x354e89=_0x406eea[_0x3612ed(0x18c)](_0x491e93,0x3e8);while(_0x406eea['uFSML'](Date[_0x3612ed(0x1a9)](),_0x5017c3)){await _0x406eea['rgCWc'](sleep,_0x354e89);const _0xbd59cf=await fetch(WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':_0x406eea[_0x3612ed(0x184)]},'body':new URLSearchParams({'client_id':_0x2b85a6,'device_code':_0x4e4519,'grant_type':'urn:ietf:params:oauth:grant-type:device_code'})});if(_0xbd59cf['ok'])return _0xbd59cf[_0x3612ed(0x191)]();const _0x31f7f9=await _0xbd59cf['json']();if(_0x31f7f9['error']===_0x406eea['OUBlO'])continue;if(_0x406eea[_0x3612ed(0x1b2)](_0x31f7f9[_0x3612ed(0x1a6)],'slow_down')){_0x354e89+=0x3e8;continue;}throw new Error(_0x31f7f9[_0x3612ed(0x1c9)]||_0x31f7f9['error']||_0x406eea['IMvWt']);}throw new Error(_0x406eea[_0x3612ed(0x1c2)]);}async function fetchUserProfile(_0x33bcd0){const _0x18a544=_0x49950f,_0x8f703c={'qPxgi':function(_0x58ea5b){return _0x58ea5b();}},_0x30ed0d=_0x8f703c['qPxgi'](getApiBaseUrl);try{const _0x561110=await fetch(_0x30ed0d+_0x18a544(0x1c1),{'method':'GET','headers':{'workos-token':_0x33bcd0}});if(_0x561110['ok'])return _0x561110['json']();}catch{}return null;}function buildKeyName(_0x3f2cda,_0x570c5e){const _0x54cc66=_0x49950f,_0x707126={'ylJTl':function(_0x252dea,_0x1fd33f){return _0x252dea===_0x1fd33f;},'bUvBU':function(_0x430b2c,_0x5023ec){return _0x430b2c+_0x5023ec;}},_0x5270d0=_0x570c5e[_0x54cc66(0x1a5)](_0x215002=>_0x215002['name']===_0x3f2cda||_0x215002['name'][_0x54cc66(0x192)](_0x3f2cda+'\x20('));if(_0x707126['ylJTl'](_0x5270d0['length'],0x0))return _0x3f2cda;return _0x3f2cda+'\x20('+_0x707126[_0x54cc66(0x187)](_0x5270d0['length'],0x1)+')';}export async function provisionApiKey(_0x3ba9db){const _0x5114b0=_0x49950f,_0x522e12={'axpLN':'GET','qIeWK':'POST','XTURp':'mcp:write'},_0x7d6217=getApiBaseUrl(),_0x67ba7d={'Content-Type':'application/json','workos-token':_0x3ba9db},_0x34f4e6=await fetchUserProfile(_0x3ba9db),_0x4f8cac=_0x34f4e6?.['firstName']||_0x34f4e6?.['email']?.[_0x5114b0(0x1a4)]('@')[0x0],_0x397e0c=_0x4f8cac?_0x4f8cac+_0x5114b0(0x198):_0x5114b0(0x1b3);let _0x21b290=[];try{const _0x561a6f=await fetch(_0x7d6217+'/api-keys',{'method':_0x522e12['axpLN'],'headers':_0x67ba7d});if(_0x561a6f['ok']){const _0x4ecf43=await _0x561a6f[_0x5114b0(0x191)]();_0x21b290=_0x4ecf43[_0x5114b0(0x1b5)];}}catch{}const _0x189656=buildKeyName(_0x397e0c,_0x21b290),_0x47ed45=await fetch(_0x7d6217+_0x5114b0(0x1c5),{'method':_0x522e12[_0x5114b0(0x1ab)],'headers':_0x67ba7d,'body':JSON['stringify']({'name':_0x189656,'scope':_0x522e12[_0x5114b0(0x181)]})});if(!_0x47ed45['ok']){const _0x1395c5=await _0x47ed45[_0x5114b0(0x1b7)]();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x47ed45['status']+'\x20'+_0x1395c5);}const _0x56dfe3=await _0x47ed45[_0x5114b0(0x191)]();return _0x56dfe3['apiKey']['token'];}export function openBrowser(_0x3a915a){const _0x40ea09=_0x49950f,_0xb346c6={'bPGip':function(_0x759f07,_0x326b88){return _0x759f07===_0x326b88;},'xGOAN':_0x40ea09(0x18b),'HeFqk':function(_0x2f5e82,_0x1c5999){return _0x2f5e82(_0x1c5999);}},_0x30e516=process[_0x40ea09(0x17d)],_0x51fe16=_0x30e516==='darwin'?_0x40ea09(0x1af):_0xb346c6[_0x40ea09(0x1a7)](_0x30e516,_0x40ea09(0x182))?_0xb346c6[_0x40ea09(0x1a8)]:_0x40ea09(0x1b0);_0xb346c6['HeFqk'](exec,_0x51fe16+'\x20'+JSON['stringify'](_0x3a915a));}function decodeJwtPayload(_0x3ebbdc){const _0x3de612=_0x49950f,_0x49e24c=_0x3ebbdc['split']('.');if(_0x49e24c[_0x3de612(0x1ad)]!==0x3)throw new Error(_0x3de612(0x1c8));const _0x5029e5=Buffer[_0x3de612(0x180)](_0x49e24c[0x1],'base64url')['toString'](_0x3de612(0x19e));return JSON[_0x3de612(0x188)](_0x5029e5);}async function selfServeSignup(_0x5daa1f){const _0x14097a=_0x49950f,_0x42d537={'VAABP':function(_0x321e7f){return _0x321e7f();},'MLOIW':function(_0x2b0c43,_0x5c9d80,_0x202e4b){return _0x2b0c43(_0x5c9d80,_0x202e4b);},'DICif':_0x14097a(0x18d)},_0x579c86=_0x42d537['VAABP'](getApiBaseUrl),_0x3a18bb=await _0x42d537[_0x14097a(0x194)](fetch,_0x579c86+'/organization/self-serve-signup',{'method':_0x42d537[_0x14097a(0x18e)],'headers':{'Content-Type':_0x14097a(0x17e),'workos-token':_0x5daa1f}});if(!_0x3a18bb['ok']){const _0x33fb7d=await _0x3a18bb[_0x14097a(0x1b7)]();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x3a18bb['status']+'\x20'+_0x33fb7d);}return _0x3a18bb['json']();}async function fetchMyMemberships(_0x34a34c){const _0x54748c=_0x49950f,_0x10e764={'PVXCi':function(_0x23ea81){return _0x23ea81();},'RSxrY':function(_0x5a1a3e,_0x409b7f,_0x50df7f){return _0x5a1a3e(_0x409b7f,_0x50df7f);}},_0x4340cf=_0x10e764[_0x54748c(0x18f)](getApiBaseUrl),_0x53edab=await _0x10e764['RSxrY'](fetch,_0x4340cf+'/organization/my-memberships',{'method':'GET','headers':{'workos-token':_0x34a34c}});if(!_0x53edab['ok']){const _0x4c4782=await _0x53edab['text']();throw new Error('Failed\x20to\x20fetch\x20memberships:\x20'+_0x53edab['status']+'\x20'+_0x4c4782);}const _0x7fba42=await _0x53edab[_0x54748c(0x191)]();return _0x7fba42['memberships'];}async function refreshTokenWithOrg(_0x3a2a37,_0x5d66d6,_0x4afc50){const _0xc00471=_0x49950f,_0x46c79a={'FzIwj':function(_0x294d2f,_0x1507b8,_0x46ba9f){return _0x294d2f(_0x1507b8,_0x46ba9f);}},_0x1a04bb=await _0x46c79a[_0xc00471(0x1be)](fetch,WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x3a2a37,'grant_type':'refresh_token','refresh_token':_0x5d66d6,'organization_id':_0x4afc50})});if(!_0x1a04bb['ok']){const _0x5bc1de=await _0x1a04bb[_0xc00471(0x1b7)]();throw new Error(_0xc00471(0x1bb)+_0x1a04bb['status']+'\x20'+_0x5bc1de);}return _0x1a04bb[_0xc00471(0x191)]();}export async function runDeviceAuthFlow(){const _0x5770cb=_0x49950f,_0xb696f9={'guGRK':function(_0x3bbe3a){return _0x3bbe3a();},'QDfdY':function(_0x58292d,_0x150577){return _0x58292d(_0x150577);},'TcQXX':function(_0x2a2d3f,_0x7924c5){return _0x2a2d3f(_0x7924c5);},'uAYnK':'Waiting\x20for\x20authentication...','OhJMu':function(_0x398d90,_0x1ebea8,_0x2c6cec,_0x23fc15,_0x318fcb){return _0x398d90(_0x1ebea8,_0x2c6cec,_0x23fc15,_0x318fcb);},'lFvMM':function(_0x5554ba,_0xeb0bbe){return _0x5554ba===_0xeb0bbe;},'cpwsc':_0x5770cb(0x1c6),'XBZmV':function(_0x2aaaa5,_0x41c93a){return _0x2aaaa5+_0x41c93a;},'HRjPf':_0x5770cb(0x190),'IbiQQ':_0x5770cb(0x19c),'ZAqHr':'Select\x20an\x20organization:','eQUVQ':function(_0x790ed0,_0x22a4e6,_0x4da33a,_0x2d619e){return _0x790ed0(_0x22a4e6,_0x4da33a,_0x2d619e);},'PaCsB':function(_0x51c90b,_0x403103){return _0x51c90b(_0x403103);}},_0xc9d11c=_0xb696f9['guGRK'](getCurrentEnvironment),_0x53fee7=ENVIRONMENT_CONFIGS[_0xc9d11c][_0x5770cb(0x1c4)],_0x38ece7=await _0xb696f9['QDfdY'](requestDeviceCode,_0x53fee7);console['log']('\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...'),console[_0x5770cb(0x1ca)](_0x5770cb(0x185)),_0xb696f9[_0x5770cb(0x199)](openBrowser,_0x38ece7['verification_uri_complete']),console[_0x5770cb(0x1ca)](_0x5770cb(0x195)+_0x38ece7['verification_uri_complete']),console[_0x5770cb(0x1ca)](_0x5770cb(0x1c3)+_0x38ece7['user_code']+'\x0a'),process[_0x5770cb(0x197)]['write'](_0xb696f9['uAYnK']);let _0x519cf5=await _0xb696f9[_0x5770cb(0x183)](pollForTokens,_0x53fee7,_0x38ece7['device_code'],_0x38ece7['interval'],_0x38ece7[_0x5770cb(0x1ac)]);console[_0x5770cb(0x1ca)]('\x20✓');const _0x51c21d=decodeJwtPayload(_0x519cf5['access_token']);if(!_0x51c21d[_0x5770cb(0x1ba)]){const _0x574217=await fetchMyMemberships(_0x519cf5['access_token']);let _0x947e29;if(_0xb696f9['lFvMM'](_0x574217['length'],0x0)){process[_0x5770cb(0x197)][_0x5770cb(0x1bf)](_0xb696f9['cpwsc']);const _0x299da8=await _0xb696f9['QDfdY'](selfServeSignup,_0x519cf5['access_token']);_0x947e29=_0x299da8['organizationId'],console[_0x5770cb(0x1ca)]('\x20✓');}else{if(_0x574217['length']===0x1)_0x947e29=_0x574217[0x0]['organizationId'],console[_0x5770cb(0x1ca)]('Using\x20organization:\x20'+_0x574217[0x0][_0x5770cb(0x19b)]);else{const _0x45d2f2=process[_0x5770cb(0x1c0)][_0x5770cb(0x18a)]&&process['stdout']['isTTY'];if(!_0x45d2f2)throw new Error(_0xb696f9[_0x5770cb(0x1a3)](_0xb696f9[_0x5770cb(0x1b4)],'Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.'));const {selected:_0x12da77}=await _0x177733[_0x5770cb(0x196)]([{'type':_0xb696f9['IbiQQ'],'name':_0x5770cb(0x1c7),'message':_0xb696f9[_0x5770cb(0x1b6)],'choices':_0x574217[_0x5770cb(0x193)](_0xfde5b7=>({'name':_0xfde5b7['name'],'value':_0xfde5b7[_0x5770cb(0x1bd)]}))}]);_0x947e29=_0x12da77;}}_0x519cf5=await _0xb696f9['eQUVQ'](refreshTokenWithOrg,_0x53fee7,_0x519cf5[_0x5770cb(0x19d)],_0x947e29);}process[_0x5770cb(0x197)]['write']('Provisioning\x20API\x20key...');const _0x48a7b7=await provisionApiKey(_0x519cf5['access_token']);return console['log']('\x20✓'),await _0xb696f9['TcQXX'](storeToken,_0x48a7b7),_0x519cf5[_0x5770cb(0x19d)]&&await _0xb696f9['PaCsB'](storeRefreshToken,_0x519cf5[_0x5770cb(0x19d)]),_0x48a7b7;}function _0x40f2(_0x52547a,_0x100d1d){_0x52547a=_0x52547a-0x17d;const _0x2e1bcb=_0x2e1b();let _0x40f220=_0x2e1bcb[_0x52547a];return _0x40f220;}function sleep(_0x18b6e2){return new Promise(_0x350678=>setTimeout(_0x350678,_0x18b6e2));}
1
+ const _0xe73600=_0x47cd;(function(_0x13b4c8,_0x5b3c2f){const _0x1c10a0=_0x47cd,_0x25143a=_0x13b4c8();while(!![]){try{const _0x1a414a=-parseInt(_0x1c10a0(0xb8))/0x1+parseInt(_0x1c10a0(0xd8))/0x2+parseInt(_0x1c10a0(0xda))/0x3*(parseInt(_0x1c10a0(0xe8))/0x4)+parseInt(_0x1c10a0(0xb7))/0x5+parseInt(_0x1c10a0(0xd0))/0x6*(-parseInt(_0x1c10a0(0xed))/0x7)+-parseInt(_0x1c10a0(0xb5))/0x8*(-parseInt(_0x1c10a0(0xac))/0x9)+parseInt(_0x1c10a0(0xad))/0xa;if(_0x1a414a===_0x5b3c2f)break;else _0x25143a['push'](_0x25143a['shift']());}catch(_0x159c0b){_0x25143a['push'](_0x25143a['shift']());}}}(_0x1f9b,0x8f371));function _0x47cd(_0x13a10d,_0x450f3c){_0x13a10d=_0x13a10d-0xaa;const _0x1f9be7=_0x1f9b();let _0x47cdb5=_0x1f9be7[_0x13a10d];return _0x47cdb5;}function _0x1f9b(){const _0x4b2893=['UjXYX','QMUwL','json','1521HyHMKa','4011740DbeEsG','FizNX','organizationId','toString','ObmbQ','https://api.workos.com/user_management/authenticate','POST','error_description','14296mqAnnF','hwXmd','2582890yHgHqh','977941KhgnQS','utf-8','Invalid\x20JWT\x20format','startsWith','EBwhs','stringify','Failed\x20to\x20request\x20device\x20code:\x20','write','Failed\x20to\x20provision\x20API\x20key:\x20','org_id','VjgFr','start','length','mcp:write','application/x-www-form-urlencoded','xdg-open','darwin','stdout','Select\x20an\x20organization:','dUfnp','base64url','QMfXw','kEoPX','iIYsC','2982OZcfJS','https://api.workos.com/user_management/authorize/device','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','text','name','user_code','workosClientId','Failed\x20to\x20fetch\x20memberships:\x20','812652yPydZm','token','48252loPWcQ','ajKFM','list','application/json','BMVMD','Setting\x20up\x20your\x20organization...','/api-keys','Qqaki','access_token','kKdei','aeLIr','Failed\x20to\x20create\x20organization:\x20','error','log','212NiZvSE','yjLEO','status','YbStj','GET','12873wwgRJx','qcfIE','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','selected','Using\x20organization:\x20','\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','slow_down','stdin','split','zztSa','platform','authorization_pending','email','refresh_token','NBsAP','SpDZp','/organization/my-memberships','verification_uri_complete','isTTY','nNueU'];_0x1f9b=function(){return _0x4b2893;};return _0x1f9b();}import{exec}from'child_process';import _0x3ffb7e from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0xe73600(0xd1),WORKOS_TOKEN_URL=_0xe73600(0xb2);export async function requestDeviceCode(_0xc6a51a){const _0x59e183=_0xe73600,_0x56e9e3={'aTyba':'application/x-www-form-urlencoded'},_0xd583a2=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':'POST','headers':{'Content-Type':_0x56e9e3['aTyba']},'body':new URLSearchParams({'client_id':_0xc6a51a})});if(!_0xd583a2['ok']){const _0x2954b3=await _0xd583a2[_0x59e183(0xd3)]();throw new Error(_0x59e183(0xbe)+_0xd583a2['status']+'\x20'+_0x2954b3);}return _0xd583a2['json']();}export async function pollForTokens(_0x10b9d0,_0x32fbcc,_0x52e2c3,_0x20f319){const _0x3496b2=_0xe73600,_0x810ced={'UjikZ':function(_0x3a154e,_0x350812){return _0x3a154e+_0x350812;},'SpDZp':function(_0x27cd19,_0x41c4e9){return _0x27cd19*_0x41c4e9;},'BMVMD':function(_0x455d24,_0x133ef6){return _0x455d24(_0x133ef6);},'UjXYX':function(_0x3862b9,_0x644069,_0x3728e6){return _0x3862b9(_0x644069,_0x3728e6);},'iIYsC':_0x3496b2(0xb3),'ObmbQ':_0x3496b2(0xc6),'QMUwL':'urn:ietf:params:oauth:grant-type:device_code','cgoPP':function(_0x5846c2,_0x49eafd){return _0x5846c2===_0x49eafd;},'yjLEO':function(_0x5c5e52,_0x1f97d7){return _0x5c5e52===_0x1f97d7;},'qcfIE':'Authentication\x20failed','hwXmd':'Device\x20authorization\x20timed\x20out'},_0x2ca0a9=_0x810ced['UjikZ'](Date['now'](),_0x810ced[_0x3496b2(0xfc)](_0x20f319,0x3e8));let _0x3a94f9=_0x52e2c3*0x3e8;while(Date['now']()<_0x2ca0a9){await _0x810ced[_0x3496b2(0xde)](sleep,_0x3a94f9);const _0x40a7b7=await _0x810ced[_0x3496b2(0x101)](fetch,WORKOS_TOKEN_URL,{'method':_0x810ced[_0x3496b2(0xcf)],'headers':{'Content-Type':_0x810ced[_0x3496b2(0xb1)]},'body':new URLSearchParams({'client_id':_0x10b9d0,'device_code':_0x32fbcc,'grant_type':_0x810ced[_0x3496b2(0xaa)]})});if(_0x40a7b7['ok'])return _0x40a7b7[_0x3496b2(0xab)]();const _0x2596f8=await _0x40a7b7['json']();if(_0x810ced['cgoPP'](_0x2596f8['error'],_0x3496b2(0xf8)))continue;if(_0x810ced[_0x3496b2(0xe9)](_0x2596f8[_0x3496b2(0xe6)],_0x3496b2(0xf3))){_0x3a94f9+=0x3e8;continue;}throw new Error(_0x2596f8[_0x3496b2(0xb4)]||_0x2596f8[_0x3496b2(0xe6)]||_0x810ced[_0x3496b2(0xee)]);}throw new Error(_0x810ced[_0x3496b2(0xb6)]);}async function fetchUserProfile(_0xac4953){const _0x34f87f=_0xe73600,_0x2a829d=getApiBaseUrl();try{const _0x155cad=await fetch(_0x2a829d+'/organization/me',{'method':'GET','headers':{'workos-token':_0xac4953}});if(_0x155cad['ok'])return _0x155cad[_0x34f87f(0xab)]();}catch{}return null;}function buildKeyName(_0x31db52,_0x295261){const _0x52e213=_0xe73600,_0x5e5d33={'eRvgY':function(_0x5dbfcc,_0x43f6a6){return _0x5dbfcc+_0x43f6a6;}},_0x58a501=_0x295261['filter'](_0x45b805=>_0x45b805[_0x52e213(0xd4)]===_0x31db52||_0x45b805['name'][_0x52e213(0xbb)](_0x31db52+'\x20('));if(_0x58a501[_0x52e213(0xc4)]===0x0)return _0x31db52;return _0x31db52+'\x20('+_0x5e5d33['eRvgY'](_0x58a501[_0x52e213(0xc4)],0x1)+')';}export async function provisionApiKey(_0x500e3e){const _0xfbbc69=_0xe73600,_0x9adb8c={'zztSa':_0xfbbc69(0xdd),'FizNX':function(_0x2be461,_0x2e52cd){return _0x2be461(_0x2e52cd);},'peJjM':function(_0x12a761,_0x51cc0e,_0x393024){return _0x12a761(_0x51cc0e,_0x393024);},'kKdei':function(_0x446f76,_0x383574,_0x4406ae){return _0x446f76(_0x383574,_0x4406ae);},'idEMk':_0xfbbc69(0xc5)},_0x45cd36=getApiBaseUrl(),_0x1d38db={'Content-Type':_0x9adb8c[_0xfbbc69(0xf6)],'workos-token':_0x500e3e},_0x27026f=await _0x9adb8c[_0xfbbc69(0xae)](fetchUserProfile,_0x500e3e),_0x4048b0=_0x27026f?.['firstName']||_0x27026f?.[_0xfbbc69(0xf9)]?.['split']('@')[0x0],_0xea0d82=_0x4048b0?_0x4048b0+'\x27s\x20CLI\x20Key':'CLI\x20Key';let _0xc3a650=[];try{const _0x171354=await _0x9adb8c['peJjM'](fetch,_0x45cd36+_0xfbbc69(0xe0),{'method':_0xfbbc69(0xec),'headers':_0x1d38db});if(_0x171354['ok']){const _0x2048ad=await _0x171354[_0xfbbc69(0xab)]();_0xc3a650=_0x2048ad['apiKeys'];}}catch{}const _0x4b951e=buildKeyName(_0xea0d82,_0xc3a650),_0x327ada=await _0x9adb8c[_0xfbbc69(0xe3)](fetch,_0x45cd36+'/api-keys',{'method':'POST','headers':_0x1d38db,'body':JSON['stringify']({'name':_0x4b951e,'scope':_0x9adb8c['idEMk']})});if(!_0x327ada['ok']){const _0x15f7a7=await _0x327ada['text']();throw new Error(_0xfbbc69(0xc0)+_0x327ada[_0xfbbc69(0xea)]+'\x20'+_0x15f7a7);}const _0x575c77=await _0x327ada['json']();return _0x575c77['apiKey'][_0xfbbc69(0xd9)];}export function openBrowser(_0x123938){const _0x3d5aed=_0xe73600,_0x49b076={'cErrT':function(_0xcf1382,_0x321f05){return _0xcf1382===_0x321f05;},'kEoPX':_0x3d5aed(0xc8),'hmFoe':'open','yzERE':function(_0x3f0f7a,_0x527d70){return _0x3f0f7a(_0x527d70);}},_0x28bb62=process[_0x3d5aed(0xf7)],_0x3e62bc=_0x49b076['cErrT'](_0x28bb62,_0x49b076[_0x3d5aed(0xce)])?_0x49b076['hmFoe']:_0x49b076['cErrT'](_0x28bb62,'win32')?_0x3d5aed(0xc3):_0x3d5aed(0xc7);_0x49b076['yzERE'](exec,_0x3e62bc+'\x20'+JSON[_0x3d5aed(0xbd)](_0x123938));}function decodeJwtPayload(_0xac0d71){const _0x4a3ebc=_0xe73600,_0x82eb8f={'nNueU':_0x4a3ebc(0xba)},_0x5e9d68=_0xac0d71[_0x4a3ebc(0xf5)]('.');if(_0x5e9d68['length']!==0x3)throw new Error(_0x82eb8f[_0x4a3ebc(0x100)]);const _0x4adf1c=Buffer['from'](_0x5e9d68[0x1],_0x4a3ebc(0xcc))[_0x4a3ebc(0xb0)](_0x4a3ebc(0xb9));return JSON['parse'](_0x4adf1c);}async function selfServeSignup(_0x440efd){const _0x3ebe2b=_0xe73600,_0x2876c3={'qlujs':function(_0xa09795,_0x33ac57,_0x27e3cd){return _0xa09795(_0x33ac57,_0x27e3cd);}},_0x5f0c98=getApiBaseUrl(),_0x2aea79=await _0x2876c3['qlujs'](fetch,_0x5f0c98+'/organization/self-serve-signup',{'method':'POST','headers':{'Content-Type':_0x3ebe2b(0xdd),'workos-token':_0x440efd}});if(!_0x2aea79['ok']){const _0x3f2eaa=await _0x2aea79[_0x3ebe2b(0xd3)]();throw new Error(_0x3ebe2b(0xe5)+_0x2aea79[_0x3ebe2b(0xea)]+'\x20'+_0x3f2eaa);}return _0x2aea79['json']();}async function fetchMyMemberships(_0x3cb2ad){const _0x341933=_0xe73600,_0xc9d5dd={'aeLIr':'GET'},_0x50d0d1=getApiBaseUrl(),_0x2cb06a=await fetch(_0x50d0d1+_0x341933(0xfd),{'method':_0xc9d5dd[_0x341933(0xe4)],'headers':{'workos-token':_0x3cb2ad}});if(!_0x2cb06a['ok']){const _0x337d72=await _0x2cb06a['text']();throw new Error(_0x341933(0xd7)+_0x2cb06a['status']+'\x20'+_0x337d72);}const _0x23f8b5=await _0x2cb06a['json']();return _0x23f8b5['memberships'];}async function refreshTokenWithOrg(_0x296d63,_0x5e7492,_0x24c493){const _0x53529d=_0xe73600,_0x126cb9={'JyLLs':function(_0x24d4e2,_0x6b0a13,_0x244062){return _0x24d4e2(_0x6b0a13,_0x244062);},'GAsVy':'application/x-www-form-urlencoded','QMfXw':'refresh_token'},_0xd3cd8a=await _0x126cb9['JyLLs'](fetch,WORKOS_TOKEN_URL,{'method':_0x53529d(0xb3),'headers':{'Content-Type':_0x126cb9['GAsVy']},'body':new URLSearchParams({'client_id':_0x296d63,'grant_type':_0x126cb9[_0x53529d(0xcd)],'refresh_token':_0x5e7492,'organization_id':_0x24c493})});if(!_0xd3cd8a['ok']){const _0x135357=await _0xd3cd8a[_0x53529d(0xd3)]();throw new Error(_0x53529d(0xef)+_0xd3cd8a[_0x53529d(0xea)]+'\x20'+_0x135357);}return _0xd3cd8a[_0x53529d(0xab)]();}export async function runDeviceAuthFlow(){const _0x78d9fa=_0xe73600,_0xf49a87={'ajKFM':function(_0x563a17){return _0x563a17();},'Qqaki':function(_0xfac551,_0x27e68c){return _0xfac551(_0x27e68c);},'YbStj':'\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','sfzGL':function(_0x3a7a5b,_0x217591){return _0x3a7a5b(_0x217591);},'noqKm':function(_0x3e828a,_0x48514f){return _0x3e828a===_0x48514f;},'NBsAP':_0x78d9fa(0xdf),'EBwhs':function(_0xa201b2,_0x19374e){return _0xa201b2(_0x19374e);},'uduuE':_0x78d9fa(0xdc),'VjgFr':_0x78d9fa(0xf0),'dUfnp':function(_0x50a021,_0x30949c){return _0x50a021(_0x30949c);}},_0x2ff931=_0xf49a87[_0x78d9fa(0xdb)](getCurrentEnvironment),_0x622e27=ENVIRONMENT_CONFIGS[_0x2ff931][_0x78d9fa(0xd6)],_0x3baed9=await _0xf49a87['Qqaki'](requestDeviceCode,_0x622e27);console['log'](_0xf49a87[_0x78d9fa(0xeb)]),console[_0x78d9fa(0xe7)](_0x78d9fa(0xf2)),_0xf49a87['sfzGL'](openBrowser,_0x3baed9['verification_uri_complete']),console[_0x78d9fa(0xe7)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x3baed9[_0x78d9fa(0xfe)]),console[_0x78d9fa(0xe7)]('Code:\x20'+_0x3baed9[_0x78d9fa(0xd5)]+'\x0a'),process[_0x78d9fa(0xc9)][_0x78d9fa(0xbf)]('Waiting\x20for\x20authentication...');let _0x3502e9=await pollForTokens(_0x622e27,_0x3baed9['device_code'],_0x3baed9['interval'],_0x3baed9['expires_in']);console['log']('\x20✓');const _0x2b0fec=_0xf49a87['sfzGL'](decodeJwtPayload,_0x3502e9[_0x78d9fa(0xe2)]);if(!_0x2b0fec[_0x78d9fa(0xc1)]){const _0x3cfd52=await fetchMyMemberships(_0x3502e9['access_token']);let _0x173da9;if(_0xf49a87['noqKm'](_0x3cfd52['length'],0x0)){process['stdout']['write'](_0xf49a87[_0x78d9fa(0xfb)]);const _0x2227d8=await _0xf49a87[_0x78d9fa(0xbc)](selfServeSignup,_0x3502e9[_0x78d9fa(0xe2)]);_0x173da9=_0x2227d8[_0x78d9fa(0xaf)],console['log']('\x20✓');}else{if(_0xf49a87['noqKm'](_0x3cfd52[_0x78d9fa(0xc4)],0x1))_0x173da9=_0x3cfd52[0x0][_0x78d9fa(0xaf)],console['log'](_0x78d9fa(0xf1)+_0x3cfd52[0x0][_0x78d9fa(0xd4)]);else{const _0x537319=process[_0x78d9fa(0xf4)][_0x78d9fa(0xff)]&&process[_0x78d9fa(0xc9)]['isTTY'];if(!_0x537319)throw new Error(_0x78d9fa(0xd2)+'Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');const {selected:_0x1dd12d}=await _0x3ffb7e['prompt']([{'type':_0xf49a87['uduuE'],'name':_0xf49a87[_0x78d9fa(0xc2)],'message':_0x78d9fa(0xca),'choices':_0x3cfd52['map'](_0x490075=>({'name':_0x490075['name'],'value':_0x490075[_0x78d9fa(0xaf)]}))}]);_0x173da9=_0x1dd12d;}}_0x3502e9=await refreshTokenWithOrg(_0x622e27,_0x3502e9[_0x78d9fa(0xfa)],_0x173da9);}process['stdout']['write']('Provisioning\x20API\x20key...');const _0x1afd9f=await _0xf49a87[_0x78d9fa(0xcb)](provisionApiKey,_0x3502e9['access_token']);return console['log']('\x20✓'),await _0xf49a87[_0x78d9fa(0xe1)](storeToken,_0x1afd9f),_0x3502e9[_0x78d9fa(0xfa)]&&await storeRefreshToken(_0x3502e9[_0x78d9fa(0xfa)]),_0x1afd9f;}function sleep(_0x40e63e){return new Promise(_0x52b9e9=>setTimeout(_0x52b9e9,_0x40e63e));}
@@ -1 +1 @@
1
- const _0x3e449b=_0x478f;function _0x478f(_0x3cae63,_0x1d89bf){_0x3cae63=_0x3cae63-0xef;const _0x19ec10=_0x19ec();let _0x478fde=_0x19ec10[_0x3cae63];return _0x478fde;}function _0x19ec(){const _0x35e1bc=['apiBaseUrl','client_01J9CBYM2DKWV9HM17D95Z540K','300248EzntuR','pwVcI','aiProxyUrl','https://ai-proxy-716115358910.us-central1.run.app','2757gHFGpC','14635QhoUVu','CZIpV','local','490094PPnbyK','15161020OjoNaF','client_01J9CBYM7M5ZETCF7G6614DXR2','5274906RyRmPy','UnwCV','168524IpJChj','1662bdfWbi','aktOf','RANGER_CLI_ENV','2792xWfQRM','http://localhost:8090','22IJPJna','171VyoFRM','prod'];_0x19ec=function(){return _0x35e1bc;};return _0x19ec();}(function(_0x43e3c4,_0x3a20df){const _0x2be1f9=_0x478f,_0x1ac515=_0x43e3c4();while(!![]){try{const _0x455ab7=parseInt(_0x2be1f9(0xf7))/0x1+parseInt(_0x2be1f9(0xfc))/0x2+parseInt(_0x2be1f9(0xf3))/0x3*(parseInt(_0x2be1f9(0x100))/0x4)+parseInt(_0x2be1f9(0xf4))/0x5*(parseInt(_0x2be1f9(0xfd))/0x6)+parseInt(_0x2be1f9(0xfa))/0x7+parseInt(_0x2be1f9(0xef))/0x8*(parseInt(_0x2be1f9(0x103))/0x9)+-parseInt(_0x2be1f9(0xf8))/0xa*(parseInt(_0x2be1f9(0x102))/0xb);if(_0x455ab7===_0x3a20df)break;else _0x1ac515['push'](_0x1ac515['shift']());}catch(_0x16cec0){_0x1ac515['push'](_0x1ac515['shift']());}}}(_0x19ec,0x708f0));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':'https://api.ranger.net','workosClientId':_0x3e449b(0xf9),'aiProxyUrl':_0x3e449b(0xf2)},'staging':{'apiBaseUrl':'https://api.staging.ranger.net','workosClientId':_0x3e449b(0x106),'aiProxyUrl':'https://ai-proxy-301751771437.us-central1.run.app'},'local':{'apiBaseUrl':'http://localhost:8080','workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':_0x3e449b(0x101)}};export const DEFAULT_ENVIRONMENT='prod';export function isValidEnvironment(_0x326635){const _0x1c1035=_0x3e449b,_0x1c6082={'CZIpV':function(_0x5d956c,_0x4abae9){return _0x5d956c===_0x4abae9;},'HUWwR':'staging','aktOf':_0x1c1035(0xf6)};return _0x326635===_0x1c1035(0x104)||_0x1c6082[_0x1c1035(0xf5)](_0x326635,_0x1c6082['HUWwR'])||_0x326635===_0x1c6082[_0x1c1035(0xfe)];}export function getCurrentEnvironment(){const _0x129db0=_0x3e449b,_0x4f606c={'pwVcI':function(_0x3a3fb5,_0x9da113){return _0x3a3fb5(_0x9da113);}},_0x836751=process['env'][_0x129db0(0xff)];if(_0x836751&&_0x4f606c[_0x129db0(0xf0)](isValidEnvironment,_0x836751))return _0x836751;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x5a52e6=_0x3e449b,_0x32e2f4={'UnwCV':function(_0x47d1ff){return _0x47d1ff();}};return ENVIRONMENT_CONFIGS[_0x32e2f4[_0x5a52e6(0xfb)](getCurrentEnvironment)][_0x5a52e6(0x105)];}export function getAiProxyUrl(){const _0x5549ad=_0x3e449b;return ENVIRONMENT_CONFIGS[getCurrentEnvironment()][_0x5549ad(0xf1)];}
1
+ const _0x5500ca=_0x58f0;function _0x58f0(_0x421570,_0x2275ea){_0x421570=_0x421570-0x186;const _0x2c820d=_0x2c82();let _0x58f0f1=_0x2c820d[_0x421570];return _0x58f0f1;}(function(_0xf6bebc,_0x11b89b){const _0x492216=_0x58f0,_0x123d58=_0xf6bebc();while(!![]){try{const _0x11f448=parseInt(_0x492216(0x18f))/0x1+parseInt(_0x492216(0x196))/0x2+parseInt(_0x492216(0x191))/0x3*(-parseInt(_0x492216(0x198))/0x4)+-parseInt(_0x492216(0x186))/0x5+parseInt(_0x492216(0x18e))/0x6+-parseInt(_0x492216(0x18d))/0x7+parseInt(_0x492216(0x193))/0x8;if(_0x11f448===_0x11b89b)break;else _0x123d58['push'](_0x123d58['shift']());}catch(_0x259a1d){_0x123d58['push'](_0x123d58['shift']());}}}(_0x2c82,0xc329d));export const ENVIRONMENT_CONFIGS={'prod':{'apiBaseUrl':'https://api.ranger.net','workosClientId':_0x5500ca(0x195),'aiProxyUrl':'https://ai-proxy-716115358910.us-central1.run.app'},'staging':{'apiBaseUrl':'https://api.staging.ranger.net','workosClientId':_0x5500ca(0x194),'aiProxyUrl':_0x5500ca(0x187)},'local':{'apiBaseUrl':_0x5500ca(0x199),'workosClientId':'client_01J9CBYM2DKWV9HM17D95Z540K','aiProxyUrl':_0x5500ca(0x189)}};export const DEFAULT_ENVIRONMENT='prod';function _0x2c82(){const _0x41cc41=['client_01J9CBYM7M5ZETCF7G6614DXR2','2169308fFzwpr','Xgzik','1436IrcSlA','http://localhost:8080','6291975DmnMPP','https://ai-proxy-301751771437.us-central1.run.app','local','http://localhost:8090','WTkgv','jQPyy','apiBaseUrl','3116085XVIeOS','234522mGnTCb','621321EGfxha','RANGER_CLI_ENV','3081vYqGtk','ZbGAw','9012560ggPytq','client_01J9CBYM2DKWV9HM17D95Z540K'];_0x2c82=function(){return _0x41cc41;};return _0x2c82();}export function isValidEnvironment(_0x33c0f5){const _0x311c7b=_0x5500ca,_0x12f69a={'Xgzik':function(_0x2ec6b0,_0x4ba3fa){return _0x2ec6b0===_0x4ba3fa;},'WTkgv':'prod','jQPyy':function(_0x30f58c,_0x57aa5b){return _0x30f58c===_0x57aa5b;}};return _0x12f69a[_0x311c7b(0x197)](_0x33c0f5,_0x12f69a[_0x311c7b(0x18a)])||_0x33c0f5==='staging'||_0x12f69a[_0x311c7b(0x18b)](_0x33c0f5,_0x311c7b(0x188));}export function getCurrentEnvironment(){const _0x3930e3=_0x5500ca,_0x4aeaf6={'ZbGAw':function(_0x48782d,_0x13705f){return _0x48782d(_0x13705f);}},_0x344a4c=process['env'][_0x3930e3(0x190)];if(_0x344a4c&&_0x4aeaf6[_0x3930e3(0x192)](isValidEnvironment,_0x344a4c))return _0x344a4c;return DEFAULT_ENVIRONMENT;}export function getApiBaseUrl(){const _0x4c605b=_0x5500ca,_0x18adb2={'spWCK':function(_0x2f3876){return _0x2f3876();}};return ENVIRONMENT_CONFIGS[_0x18adb2['spWCK'](getCurrentEnvironment)][_0x4c605b(0x18c)];}export function getAiProxyUrl(){return ENVIRONMENT_CONFIGS[getCurrentEnvironment()]['aiProxyUrl'];}
@@ -1 +1 @@
1
- (function(_0x13aa3e,_0x14861e){const _0x2055c8=_0x275f,_0x3b76c8=_0x13aa3e();while(!![]){try{const _0x4cecfe=-parseInt(_0x2055c8(0x1f3))/0x1*(-parseInt(_0x2055c8(0x215))/0x2)+-parseInt(_0x2055c8(0x20b))/0x3+parseInt(_0x2055c8(0x1fd))/0x4+-parseInt(_0x2055c8(0x1f0))/0x5*(-parseInt(_0x2055c8(0x210))/0x6)+-parseInt(_0x2055c8(0x21f))/0x7+-parseInt(_0x2055c8(0x1f5))/0x8*(-parseInt(_0x2055c8(0x221))/0x9)+parseInt(_0x2055c8(0x209))/0xa*(-parseInt(_0x2055c8(0x1ef))/0xb);if(_0x4cecfe===_0x14861e)break;else _0x3b76c8['push'](_0x3b76c8['shift']());}catch(_0x3e5fa4){_0x3b76c8['push'](_0x3b76c8['shift']());}}}(_0x4f5f,0x9ff60));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x2be9c0){const _0x3a56ad=_0x275f,_0x3b4eb2={'ThZUx':function(_0x2ea6cc){return _0x2ea6cc();},'zFMQy':function(_0x20f968,_0x105da8,_0x20a67a){return _0x20f968(_0x105da8,_0x20a67a);}},_0x34e3b7=await _0x3b4eb2['ThZUx'](getToken);if(!_0x34e3b7)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x5c367c=getApiBaseUrl(),_0x2e73c2=await _0x3b4eb2['zFMQy'](fetch,_0x5c367c+_0x3a56ad(0x206),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x34e3b7,'Content-Type':'application/json'},'body':JSON[_0x3a56ad(0x1ff)](_0x2be9c0)});if(!_0x2e73c2['ok']){const _0x1c87ab=await _0x2e73c2[_0x3a56ad(0x203)]();throw new Error('Failed\x20to\x20create\x20feature\x20review:\x20'+_0x1c87ab);}return _0x2e73c2['json']();}export async function listFeatures(_0x155a7a){const _0x358370=_0x275f,_0x23932e={'RWdHZ':_0x358370(0x207),'IIReO':function(_0x56f328){return _0x56f328();},'VGJqI':'limit','jovfE':_0x358370(0x205),'PPLYt':_0x358370(0x222),'MOqUE':'true','IStcl':function(_0x1125a0,_0x18c1ed,_0xaf96d4){return _0x1125a0(_0x18c1ed,_0xaf96d4);}},_0x2050eb=await getToken();if(!_0x2050eb)throw new Error(_0x23932e[_0x358370(0x1ed)]);const _0x172285=_0x23932e[_0x358370(0x213)](getApiBaseUrl),_0x5ac18a=new URLSearchParams();if(_0x155a7a?.['gitRepoUrl'])_0x5ac18a[_0x358370(0x227)]('gitRepoUrl',_0x155a7a['gitRepoUrl']);if(_0x155a7a?.[_0x358370(0x1f1)])_0x5ac18a[_0x358370(0x227)](_0x358370(0x1f1),_0x155a7a[_0x358370(0x1f1)]);if(_0x155a7a?.['limit'])_0x5ac18a['set'](_0x23932e[_0x358370(0x226)],_0x155a7a['limit']['toString']());if(_0x155a7a?.['offset'])_0x5ac18a['set'](_0x23932e[_0x358370(0x1f7)],_0x155a7a['offset']['toString']());if(_0x155a7a?.[_0x358370(0x222)])_0x5ac18a['set'](_0x23932e['PPLYt'],_0x23932e[_0x358370(0x1f9)]);const _0x16b8fc=_0x172285+'/api/v1/mcp/features'+(_0x5ac18a['toString']()?'?'+_0x5ac18a['toString']():''),_0x125b66=await _0x23932e['IStcl'](fetch,_0x16b8fc,{'method':_0x358370(0x228),'headers':{'Authorization':_0x358370(0x21c)+_0x2050eb}});if(!_0x125b66['ok']){const _0x4eb478=await _0x125b66[_0x358370(0x203)]();throw new Error('Failed\x20to\x20list\x20feature\x20reviews:\x20'+_0x4eb478);}return _0x125b66['json']();}export async function getFeature(_0x535cfa){const _0x4e9526=_0x275f,_0x1c2c66={'dhNFt':function(_0x4d19f5){return _0x4d19f5();},'hGNRi':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','JTDNh':'GET'},_0x1a51b4=await _0x1c2c66[_0x4e9526(0x20d)](getToken);if(!_0x1a51b4)throw new Error(_0x1c2c66[_0x4e9526(0x1f2)]);const _0x7c6d07=_0x1c2c66[_0x4e9526(0x20d)](getApiBaseUrl),_0x1226fe=await fetch(_0x7c6d07+'/api/v1/mcp/features/'+_0x535cfa,{'method':_0x1c2c66[_0x4e9526(0x20c)],'headers':{'Authorization':'Bearer\x20'+_0x1a51b4}});if(!_0x1226fe['ok']){const _0x46552d=await _0x1226fe[_0x4e9526(0x203)]();throw new Error('Failed\x20to\x20get\x20feature\x20review:\x20'+_0x46552d);}return _0x1226fe['json']();}function _0x275f(_0x1fb8e4,_0x181f31){_0x1fb8e4=_0x1fb8e4-0x1ed;const _0x4f5f14=_0x4f5f();let _0x275f83=_0x4f5f14[_0x1fb8e4];return _0x275f83;}export async function updateFeature(_0x24f326,_0x1d4cf0){const _0x34f7f5=_0x275f,_0x17d080={'BmYOC':function(_0x2c8358){return _0x2c8358();},'EKZzK':function(_0x4a9c77,_0x56600f,_0x4aefc6){return _0x4a9c77(_0x56600f,_0x4aefc6);},'TSZSc':'PATCH'},_0x3b89da=await _0x17d080[_0x34f7f5(0x214)](getToken);if(!_0x3b89da)throw new Error(_0x34f7f5(0x207));const _0x5efcbf=_0x17d080[_0x34f7f5(0x214)](getApiBaseUrl),_0x5204bf=await _0x17d080['EKZzK'](fetch,_0x5efcbf+_0x34f7f5(0x1fc)+_0x24f326,{'method':_0x17d080['TSZSc'],'headers':{'Authorization':'Bearer\x20'+_0x3b89da,'Content-Type':'application/json'},'body':JSON['stringify'](_0x1d4cf0)});if(!_0x5204bf['ok']){const _0x1b1a57=await _0x5204bf['text']();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x1b1a57);}return _0x5204bf['json']();}export async function createChecklistItem(_0x56f8f1,_0x344813,_0x17f7c4){const _0x4b10b0=_0x275f,_0x34fbd6={'msSqE':function(_0x15d041){return _0x15d041();},'YAIyz':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','kIGym':function(_0x5064f9,_0x4e8166,_0x5846b7){return _0x5064f9(_0x4e8166,_0x5846b7);}},_0x3c3d9f=await _0x34fbd6[_0x4b10b0(0x21b)](getToken);if(!_0x3c3d9f)throw new Error(_0x34fbd6[_0x4b10b0(0x225)]);const _0x4357f3=_0x34fbd6[_0x4b10b0(0x21b)](getApiBaseUrl),_0x532b3f=await _0x34fbd6[_0x4b10b0(0x216)](fetch,_0x4357f3+'/api/v1/mcp/features/'+_0x56f8f1+'/checklist',{'method':_0x4b10b0(0x202),'headers':{'Authorization':'Bearer\x20'+_0x3c3d9f,'Content-Type':'application/json'},'body':JSON['stringify']({'description':_0x344813,'position':_0x17f7c4})});if(!_0x532b3f['ok']){const _0x3f1b85=await _0x532b3f['text']();throw new Error(_0x4b10b0(0x1fa)+_0x3f1b85);}return _0x532b3f[_0x4b10b0(0x212)]();}export async function updateChecklistItem(_0x2b4baa,_0x55cd0e,_0x531b0b){const _0x5e194e=_0x275f,_0x210bf9={'UxkdM':_0x5e194e(0x207),'pXERM':'application/json','lCMzJ':function(_0x1e6117,_0x50f3b3,_0xa573ac){return _0x1e6117(_0x50f3b3,_0xa573ac);},'jOQSQ':'updateChecklistItem'};return _0x210bf9['lCMzJ'](withRetry,async()=>{const _0x1bf320=_0x5e194e,_0x28107=await getToken();if(!_0x28107)throw new Error(_0x210bf9['UxkdM']);const _0x11e1aa=getApiBaseUrl(),_0x37b7ea=await fetch(_0x11e1aa+_0x1bf320(0x1fc)+_0x2b4baa+'/checklist/'+_0x55cd0e,{'method':'PATCH','headers':{'Authorization':'Bearer\x20'+_0x28107,'Content-Type':_0x210bf9[_0x1bf320(0x22a)]},'body':JSON[_0x1bf320(0x1ff)](_0x531b0b)});if(!_0x37b7ea['ok']){const _0x3adad2=await _0x37b7ea[_0x1bf320(0x203)]();throw new Error('Failed\x20to\x20update\x20scenario:\x20'+_0x3adad2);}return _0x37b7ea[_0x1bf320(0x212)]();},{'label':_0x210bf9['jOQSQ']});}export async function getFeatureReport(_0x2d7523){const _0x23d666=_0x275f,_0xa0f99b={'YtKuc':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]'},_0x257820=await getToken();if(!_0x257820)throw new Error(_0xa0f99b['YtKuc']);const _0x52579f=getApiBaseUrl(),_0x3b200a=await fetch(_0x52579f+_0x23d666(0x1fc)+_0x2d7523+_0x23d666(0x208),{'method':_0x23d666(0x228),'headers':{'Authorization':_0x23d666(0x21c)+_0x257820}});if(!_0x3b200a['ok']){const _0x34420b=await _0x3b200a['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report:\x20'+_0x34420b);}return _0x3b200a[_0x23d666(0x212)]();}export async function getFeatureReportMarkdown(_0x432086,_0x3c724c){const _0x14e239=_0x275f,_0x2033a9={'ocPRG':function(_0x12947b){return _0x12947b();},'zAgCY':function(_0x5aff4e,_0x5a7ba6){return _0x5aff4e>_0x5a7ba6;},'NeMoO':function(_0x2cc438,_0x50155e){return _0x2cc438(_0x50155e);},'tkVXv':_0x14e239(0x217),'AIErl':function(_0x214d09,_0x1723de){return _0x214d09&&_0x1723de;}},_0x35086f=await _0x2033a9[_0x14e239(0x204)](getToken);if(!_0x35086f)throw new Error(_0x14e239(0x207));const _0x22af8f=getApiBaseUrl(),_0x3374c9=new URLSearchParams(),_0x23e94b=_0x2033a9[_0x14e239(0x1ee)](_0x3c724c?.['itemIds']?.['length']??0x0,0x0),_0x5aa5a0=_0x2033a9[_0x14e239(0x1fb)](Boolean,_0x3c724c?.['sessionId']);_0x23e94b&&_0x3c724c?.['itemIds']&&_0x3374c9['set']('itemIds',_0x3c724c['itemIds']['join'](','));_0x5aa5a0&&_0x3c724c?.[_0x14e239(0x217)]&&_0x3374c9['set'](_0x2033a9[_0x14e239(0x21a)],_0x3c724c['sessionId']);_0x2033a9[_0x14e239(0x218)](!_0x23e94b,!_0x5aa5a0)&&_0x3c724c?.[_0x14e239(0x1f8)]&&_0x3374c9['set'](_0x14e239(0x1f8),_0x3c724c['style']);const _0x2c5c80=_0x22af8f+'/api/v1/mcp/features/'+_0x432086+_0x14e239(0x1fe),_0x39ddde=''+_0x2c5c80+(_0x3374c9['toString']()?'?'+_0x3374c9[_0x14e239(0x220)]():''),_0x5196ea=await fetch(_0x39ddde,{'method':'GET','headers':{'Authorization':_0x14e239(0x21c)+_0x35086f}});if(!_0x5196ea['ok']){const _0x274270=await _0x5196ea['text']();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20'+_0x274270);}return _0x5196ea[_0x14e239(0x203)]();}export async function listFeatureSessions(_0x2870c2){const _0x1b451f=_0x275f,_0x3bfa0f={'XIGqz':function(_0x2981ad){return _0x2981ad();},'ojuXY':function(_0x4660c0,_0x479d7a,_0x3101c3){return _0x4660c0(_0x479d7a,_0x3101c3);}},_0x37c93a=await getToken();if(!_0x37c93a)throw new Error(_0x1b451f(0x207));const _0x187223=_0x3bfa0f[_0x1b451f(0x211)](getApiBaseUrl),_0x3ad2cc=await _0x3bfa0f[_0x1b451f(0x21d)](fetch,_0x187223+'/api/v1/mcp/features/'+_0x2870c2+'/sessions',{'method':'GET','headers':{'Authorization':'Bearer\x20'+_0x37c93a}});if(!_0x3ad2cc['ok']){const _0x2e48bd=await _0x3ad2cc['text']();throw new Error('Failed\x20to\x20list\x20sessions:\x20'+_0x2e48bd);}return _0x3ad2cc[_0x1b451f(0x212)]();}export async function startSession(_0x26e134,_0x35b01d){const _0x520126=_0x275f,_0x1a6c15={'cCQhN':function(_0xf06714){return _0xf06714();},'ookHw':_0x520126(0x207)},_0x25d376=await _0x1a6c15[_0x520126(0x1f6)](getToken);if(!_0x25d376)throw new Error(_0x1a6c15[_0x520126(0x20e)]);const _0x3d9634=_0x1a6c15[_0x520126(0x1f6)](getApiBaseUrl),_0x15e456=await fetch(_0x3d9634+_0x520126(0x1fc)+_0x26e134+_0x520126(0x201)+_0x35b01d+'/start',{'method':_0x520126(0x202),'headers':{'Authorization':_0x520126(0x21c)+_0x25d376}});if(!_0x15e456['ok']){const _0x2c77a9=await _0x15e456['text']();throw new Error('Failed\x20to\x20start\x20session:\x20'+_0x2c77a9);}return _0x15e456[_0x520126(0x212)]();}export async function concludeSession(_0x1e4971,_0x49dfd5){const _0x3ef813=_0x275f,_0x4f4165={'UdWxe':function(_0x30e62d){return _0x30e62d();},'zxVJU':function(_0x2b22c8,_0x3675b1,_0xb2765f){return _0x2b22c8(_0x3675b1,_0xb2765f);}},_0x584a3a=await getToken();if(!_0x584a3a)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x33e95c=_0x4f4165['UdWxe'](getApiBaseUrl),_0x2b831d=await _0x4f4165['zxVJU'](fetch,_0x33e95c+_0x3ef813(0x1fc)+_0x1e4971+_0x3ef813(0x201)+_0x49dfd5+'/conclude',{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x584a3a}});if(!_0x2b831d['ok']){const _0x4b015f=await _0x2b831d['text']();throw new Error('Failed\x20to\x20conclude\x20session:\x20'+_0x4b015f);}return _0x2b831d[_0x3ef813(0x212)]();}export async function getActionItems(_0x324721){const _0x4ca391=_0x275f,_0x40e65c={'WPuyQ':function(_0x56bd99){return _0x56bd99();},'moLxf':_0x4ca391(0x207)},_0x1ce7d7=await _0x40e65c['WPuyQ'](getToken);if(!_0x1ce7d7)throw new Error(_0x40e65c['moLxf']);const _0x39c6c0=_0x40e65c['WPuyQ'](getApiBaseUrl),_0x5e215f=await fetch(_0x39c6c0+_0x4ca391(0x1fc)+_0x324721+_0x4ca391(0x21e),{'method':_0x4ca391(0x228),'headers':{'Authorization':_0x4ca391(0x21c)+_0x1ce7d7}});if(!_0x5e215f['ok']){const _0x369c8d=await _0x5e215f[_0x4ca391(0x203)]();throw new Error('Failed\x20to\x20get\x20action\x20items:\x20'+_0x369c8d);}return _0x5e215f[_0x4ca391(0x212)]();}export async function getItemFeedback(_0x501db9,_0x552f11){const _0x105265=_0x275f,_0x1af97a={'kyFdo':function(_0x3063eb){return _0x3063eb();},'voclV':_0x105265(0x207),'WPaTz':function(_0x2fc634,_0x19917c,_0x1c0ec3){return _0x2fc634(_0x19917c,_0x1c0ec3);}},_0x338be7=await _0x1af97a['kyFdo'](getToken);if(!_0x338be7)throw new Error(_0x1af97a['voclV']);const _0x1c198e=getApiBaseUrl(),_0x48efe0=await _0x1af97a[_0x105265(0x224)](fetch,_0x1c198e+'/api/v1/mcp/features/'+_0x501db9+'/checklist-items/'+_0x552f11+_0x105265(0x229),{'method':'GET','headers':{'Authorization':_0x105265(0x21c)+_0x338be7}});if(!_0x48efe0['ok']){const _0xfbd718=await _0x48efe0[_0x105265(0x203)]();throw new Error('Failed\x20to\x20get\x20item\x20feedback:\x20'+_0xfbd718);}return _0x48efe0['json']();}export async function markCommentsAddressed(_0x4265e9,_0x56953e,_0x4c40d8){const _0xbd3316=_0x275f,_0x4e6d9d={'cTizq':function(_0x5d5fcd){return _0x5d5fcd();},'JRfRx':_0xbd3316(0x207)},_0x51dbb8=await _0x4e6d9d[_0xbd3316(0x20a)](getToken);if(!_0x51dbb8)throw new Error(_0x4e6d9d['JRfRx']);const _0x49c62f=_0x4e6d9d[_0xbd3316(0x20a)](getApiBaseUrl),_0x2f3627=await fetch(_0x49c62f+_0xbd3316(0x1fc)+_0x4265e9+'/comments/address',{'method':_0xbd3316(0x202),'headers':{'Authorization':'Bearer\x20'+_0x51dbb8,'Content-Type':_0xbd3316(0x1f4)},'body':JSON[_0xbd3316(0x1ff)]({'checklistItemId':_0x56953e,'commentIds':_0x4c40d8})});if(!_0x2f3627['ok']){const _0xc5bbe7=await _0x2f3627[_0xbd3316(0x203)]();throw new Error('Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20'+_0xc5bbe7);}}function _0x4f5f(){const _0x29a44f=['AIErl','Noevs','tkVXv','msSqE','Bearer\x20','ojuXY','/action-items','2062452kNvGFc','toString','190683pOBwkD','includeDeleted','oWgQM','WPaTz','YAIyz','VGJqI','set','GET','/feedback','pXERM','RWdHZ','zAgCY','12009778tFbkzO','41845oixknZ','gitBranch','hGNRi','41903WQeScS','application/json','72EJOVpl','cCQhN','jovfE','style','MOqUE','Failed\x20to\x20create\x20scenario:\x20','NeMoO','/api/v1/mcp/features/','1855648Bdvfon','/report/markdown','stringify','DELETE','/sessions/','POST','text','ocPRG','offset','/api/v1/mcp/features','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','/report','10IJqsRG','cTizq','60165CZYpkF','JTDNh','dhNFt','ookHw','HXtoW','438vMUopG','XIGqz','json','IIReO','BmYOC','38QXuOqd','kIGym','sessionId'];_0x4f5f=function(){return _0x29a44f;};return _0x4f5f();}export async function softDeleteFeature(_0x59f124){const _0x529fda=_0x275f,_0xe49a5a={'KcQQJ':function(_0x4b22d3){return _0x4b22d3();},'HXtoW':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','oWgQM':function(_0x35839e,_0x2265af,_0x242d3c){return _0x35839e(_0x2265af,_0x242d3c);}},_0x22eeae=await _0xe49a5a['KcQQJ'](getToken);if(!_0x22eeae)throw new Error(_0xe49a5a[_0x529fda(0x20f)]);const _0x4185de=_0xe49a5a['KcQQJ'](getApiBaseUrl),_0x29476a=await _0xe49a5a[_0x529fda(0x223)](fetch,_0x4185de+_0x529fda(0x1fc)+_0x59f124,{'method':_0x529fda(0x200),'headers':{'Authorization':'Bearer\x20'+_0x22eeae}});if(!_0x29476a['ok']){const _0xe9d57e=await _0x29476a[_0x529fda(0x203)]();throw new Error('Failed\x20to\x20delete\x20feature\x20review:\x20'+_0xe9d57e);}}export async function restoreFeature(_0x192ad1){const _0x1d068f=_0x275f,_0x1d9780={'Noevs':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','RETit':function(_0x2318d7,_0x5e3e27,_0x5d5901){return _0x2318d7(_0x5e3e27,_0x5d5901);}},_0x5a4b1f=await getToken();if(!_0x5a4b1f)throw new Error(_0x1d9780[_0x1d068f(0x219)]);const _0x1beb1e=getApiBaseUrl(),_0x4772e9=await _0x1d9780['RETit'](fetch,_0x1beb1e+_0x1d068f(0x1fc)+_0x192ad1+'/restore',{'method':'POST','headers':{'Authorization':_0x1d068f(0x21c)+_0x5a4b1f}});if(!_0x4772e9['ok']){const _0x15ae34=await _0x4772e9['text']();throw new Error('Failed\x20to\x20restore\x20feature\x20review:\x20'+_0x15ae34);}}
1
+ (function(_0x4c4b0a,_0x5806b1){const _0x4a408a=_0x307f,_0x35a9cf=_0x4c4b0a();while(!![]){try{const _0x44d090=parseInt(_0x4a408a(0x83))/0x1+-parseInt(_0x4a408a(0xba))/0x2*(parseInt(_0x4a408a(0xbd))/0x3)+-parseInt(_0x4a408a(0x82))/0x4*(parseInt(_0x4a408a(0xb3))/0x5)+parseInt(_0x4a408a(0x94))/0x6+-parseInt(_0x4a408a(0xb6))/0x7*(-parseInt(_0x4a408a(0x88))/0x8)+-parseInt(_0x4a408a(0xa4))/0x9+parseInt(_0x4a408a(0x87))/0xa;if(_0x44d090===_0x5806b1)break;else _0x35a9cf['push'](_0x35a9cf['shift']());}catch(_0x5c6a70){_0x35a9cf['push'](_0x35a9cf['shift']());}}}(_0x4178,0x7193f));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{withRetry}from'./retry.js';export async function createFeature(_0x4e8904){const _0xbdb20e=_0x307f,_0x1a2e50={'diFcK':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','RwRdu':'application/json'},_0x3823b5=await getToken();if(!_0x3823b5)throw new Error(_0x1a2e50[_0xbdb20e(0x9e)]);const _0x199fa5=getApiBaseUrl(),_0x2f9b2b=await fetch(_0x199fa5+'/api/v1/mcp/features',{'method':'POST','headers':{'Authorization':_0xbdb20e(0xad)+_0x3823b5,'Content-Type':_0x1a2e50['RwRdu']},'body':JSON['stringify'](_0x4e8904)});if(!_0x2f9b2b['ok']){const _0x4326b0=await _0x2f9b2b[_0xbdb20e(0x9c)]();throw new Error('Failed\x20to\x20create\x20feature\x20review:\x20'+_0x4326b0);}return _0x2f9b2b['json']();}export async function listFeatures(_0x2b8147){const _0x16960=_0x307f,_0x35eb2e={'PYRax':function(_0x12f4e5){return _0x12f4e5();},'mqbHL':'gitRepoUrl','vpIwO':_0x16960(0x8b),'pRbHW':function(_0x4784b9,_0x245548,_0x270260){return _0x4784b9(_0x245548,_0x270260);},'BBWat':'GET'},_0x434bd1=await _0x35eb2e[_0x16960(0xa7)](getToken);if(!_0x434bd1)throw new Error(_0x16960(0xbc));const _0x4520c6=getApiBaseUrl(),_0x109594=new URLSearchParams();if(_0x2b8147?.['gitRepoUrl'])_0x109594[_0x16960(0xc2)](_0x35eb2e[_0x16960(0x9f)],_0x2b8147['gitRepoUrl']);if(_0x2b8147?.[_0x16960(0x92)])_0x109594[_0x16960(0xc2)]('gitBranch',_0x2b8147[_0x16960(0x92)]);if(_0x2b8147?.[_0x16960(0xc3)])_0x109594['set'](_0x16960(0xc3),_0x2b8147['limit'][_0x16960(0xb9)]());if(_0x2b8147?.['offset'])_0x109594[_0x16960(0xc2)](_0x16960(0xbe),_0x2b8147[_0x16960(0xbe)]['toString']());if(_0x2b8147?.[_0x16960(0x8b)])_0x109594['set'](_0x35eb2e['vpIwO'],_0x16960(0xaa));const _0x47237e=_0x4520c6+_0x16960(0xc4)+(_0x109594[_0x16960(0xb9)]()?'?'+_0x109594['toString']():''),_0x131462=await _0x35eb2e[_0x16960(0xbb)](fetch,_0x47237e,{'method':_0x35eb2e['BBWat'],'headers':{'Authorization':'Bearer\x20'+_0x434bd1}});if(!_0x131462['ok']){const _0x264d31=await _0x131462[_0x16960(0x9c)]();throw new Error(_0x16960(0xc0)+_0x264d31);}return _0x131462[_0x16960(0xa8)]();}export async function getFeature(_0x16d9b7){const _0x129176=_0x307f,_0x417c9b={'CmETI':function(_0x4194f5){return _0x4194f5();},'yUwjG':_0x129176(0xbc),'kKsGT':function(_0x268843,_0x893d13,_0x6c6266){return _0x268843(_0x893d13,_0x6c6266);},'vmUEO':'GET'},_0x16ef07=await _0x417c9b['CmETI'](getToken);if(!_0x16ef07)throw new Error(_0x417c9b['yUwjG']);const _0x69a6a=getApiBaseUrl(),_0x4ce705=await _0x417c9b[_0x129176(0xb2)](fetch,_0x69a6a+'/api/v1/mcp/features/'+_0x16d9b7,{'method':_0x417c9b['vmUEO'],'headers':{'Authorization':_0x129176(0xad)+_0x16ef07}});if(!_0x4ce705['ok']){const _0x1625e8=await _0x4ce705[_0x129176(0x9c)]();throw new Error('Failed\x20to\x20get\x20feature\x20review:\x20'+_0x1625e8);}return _0x4ce705['json']();}function _0x4178(){const _0x5f252c=['/api/v1/mcp/features','style','4LJUELY','594222EXTRfs','Failed\x20to\x20create\x20scenario:\x20','MJfMf','/restore','5451160dfstfg','2216888PrWbmT','/api/v1/mcp/features/','rUCwU','includeDeleted','/sessions/','Failed\x20to\x20restore\x20feature\x20review:\x20','PrzkG','DELETE','/checklist-items/','uImDa','gitBranch','TOHqR','973722PheAHl','FbOoQ','XgndY','Failed\x20to\x20list\x20sessions:\x20','application/json','/checklist','/report','ULmvY','text','POST','diFcK','mqbHL','VAmNx','itemIds','Failed\x20to\x20start\x20session:\x20','EhuQy','3166875wxEWaq','PvULm','SfFge','PYRax','json','GET','true','cVoNm','/action-items','Bearer\x20','Failed\x20to\x20mark\x20comments\x20as\x20addressed:\x20','RqZRl','nYsyt','/comments/address','kKsGT','1726660weDgNp','PATCH','sessionId','7LKTEKR','EmDMU','stringify','toString','2wJMygE','pRbHW','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','1248942rphSGr','offset','zSuZW','Failed\x20to\x20list\x20feature\x20reviews:\x20','SCByG','set','limit'];_0x4178=function(){return _0x5f252c;};return _0x4178();}export async function updateFeature(_0x5e0676,_0x474b42){const _0x536280=_0x307f,_0x48c1cb={'fiZfo':_0x536280(0xbc),'SdBBI':function(_0x56a3e3,_0x8fd941,_0x32d6c8){return _0x56a3e3(_0x8fd941,_0x32d6c8);},'NQDVT':'PATCH','nTAWq':_0x536280(0x98)},_0x466fa5=await getToken();if(!_0x466fa5)throw new Error(_0x48c1cb['fiZfo']);const _0x392048=getApiBaseUrl(),_0x5fe8e3=await _0x48c1cb['SdBBI'](fetch,_0x392048+'/api/v1/mcp/features/'+_0x5e0676,{'method':_0x48c1cb['NQDVT'],'headers':{'Authorization':_0x536280(0xad)+_0x466fa5,'Content-Type':_0x48c1cb['nTAWq']},'body':JSON['stringify'](_0x474b42)});if(!_0x5fe8e3['ok']){const _0x453707=await _0x5fe8e3[_0x536280(0x9c)]();throw new Error('Failed\x20to\x20update\x20feature\x20review:\x20'+_0x453707);}return _0x5fe8e3[_0x536280(0xa8)]();}export async function createChecklistItem(_0x46cdc0,_0x53a088,_0x4ddd41){const _0x6d7f90=_0x307f,_0x440cf7={'RqZRl':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','nYsyt':function(_0x57be6a,_0x55034b,_0x6af337){return _0x57be6a(_0x55034b,_0x6af337);}},_0x15b129=await getToken();if(!_0x15b129)throw new Error(_0x440cf7[_0x6d7f90(0xaf)]);const _0x2034c7=getApiBaseUrl(),_0x30b4e0=await _0x440cf7[_0x6d7f90(0xb0)](fetch,_0x2034c7+_0x6d7f90(0x89)+_0x46cdc0+_0x6d7f90(0x99),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x15b129,'Content-Type':'application/json'},'body':JSON[_0x6d7f90(0xb8)]({'description':_0x53a088,'position':_0x4ddd41})});if(!_0x30b4e0['ok']){const _0x5296f0=await _0x30b4e0['text']();throw new Error(_0x6d7f90(0x84)+_0x5296f0);}return _0x30b4e0[_0x6d7f90(0xa8)]();}export async function updateChecklistItem(_0x4e0980,_0x300fda,_0x87ee7b){const _0x3b3a75={'uImDa':function(_0x591d4d){return _0x591d4d();},'hVqiD':'application/json'};return withRetry(async()=>{const _0xc48212=_0x307f,_0x463076=await getToken();if(!_0x463076)throw new Error(_0xc48212(0xbc));const _0x20ed8f=_0x3b3a75[_0xc48212(0x91)](getApiBaseUrl),_0x3eed35=await fetch(_0x20ed8f+'/api/v1/mcp/features/'+_0x4e0980+'/checklist/'+_0x300fda,{'method':_0xc48212(0xb4),'headers':{'Authorization':'Bearer\x20'+_0x463076,'Content-Type':_0x3b3a75['hVqiD']},'body':JSON['stringify'](_0x87ee7b)});if(!_0x3eed35['ok']){const _0x56bfb7=await _0x3eed35[_0xc48212(0x9c)]();throw new Error('Failed\x20to\x20update\x20scenario:\x20'+_0x56bfb7);}return _0x3eed35['json']();},{'label':'updateChecklistItem'});}function _0x307f(_0x232a09,_0x46485f){_0x232a09=_0x232a09-0x81;const _0x4178f8=_0x4178();let _0x307ff6=_0x4178f8[_0x232a09];return _0x307ff6;}export async function getFeatureReport(_0x2c7285){const _0x1b5236=_0x307f,_0x480e45={'CNhtR':function(_0x4303e5){return _0x4303e5();}},_0x46647c=await _0x480e45['CNhtR'](getToken);if(!_0x46647c)throw new Error(_0x1b5236(0xbc));const _0x365832=getApiBaseUrl(),_0x46f0ed=await fetch(_0x365832+_0x1b5236(0x89)+_0x2c7285+_0x1b5236(0x9a),{'method':'GET','headers':{'Authorization':_0x1b5236(0xad)+_0x46647c}});if(!_0x46f0ed['ok']){const _0x558c38=await _0x46f0ed[_0x1b5236(0x9c)]();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report:\x20'+_0x558c38);}return _0x46f0ed[_0x1b5236(0xa8)]();}export async function getFeatureReportMarkdown(_0x58228d,_0x497717){const _0x1f6c78=_0x307f,_0x59e46c={'zSuZW':function(_0x556e62){return _0x556e62();},'SCByG':function(_0x3bd640,_0x13c994){return _0x3bd640>_0x13c994;},'LLxSl':function(_0x159513,_0x11a440){return _0x159513(_0x11a440);},'QYnSy':_0x1f6c78(0xa1),'ULmvY':_0x1f6c78(0xb5),'cVoNm':'GET'},_0xf894b=await _0x59e46c[_0x1f6c78(0xbf)](getToken);if(!_0xf894b)throw new Error(_0x1f6c78(0xbc));const _0xf08e39=getApiBaseUrl(),_0x33ee1d=new URLSearchParams(),_0x1063e0=_0x59e46c[_0x1f6c78(0xc1)](_0x497717?.['itemIds']?.['length']??0x0,0x0),_0x109730=_0x59e46c['LLxSl'](Boolean,_0x497717?.['sessionId']);_0x1063e0&&_0x497717?.[_0x1f6c78(0xa1)]&&_0x33ee1d[_0x1f6c78(0xc2)](_0x59e46c['QYnSy'],_0x497717[_0x1f6c78(0xa1)]['join'](','));_0x109730&&_0x497717?.['sessionId']&&_0x33ee1d[_0x1f6c78(0xc2)](_0x59e46c[_0x1f6c78(0x9b)],_0x497717[_0x1f6c78(0xb5)]);!_0x1063e0&&!_0x109730&&_0x497717?.[_0x1f6c78(0x81)]&&_0x33ee1d['set']('style',_0x497717['style']);const _0x53433=_0xf08e39+_0x1f6c78(0x89)+_0x58228d+'/report/markdown',_0x540cf9=''+_0x53433+(_0x33ee1d['toString']()?'?'+_0x33ee1d['toString']():''),_0x33a3c3=await fetch(_0x540cf9,{'method':_0x59e46c[_0x1f6c78(0xab)],'headers':{'Authorization':'Bearer\x20'+_0xf894b}});if(!_0x33a3c3['ok']){const _0x5671b6=await _0x33a3c3[_0x1f6c78(0x9c)]();throw new Error('Failed\x20to\x20get\x20feature\x20review\x20report\x20markdown:\x20'+_0x5671b6);}return _0x33a3c3['text']();}export async function listFeatureSessions(_0x4b4359){const _0x1078db=_0x307f,_0x4f2e77={'NFERK':function(_0x351856){return _0x351856();},'ZXpdT':function(_0x580169){return _0x580169();},'MJfMf':function(_0x344928,_0x26e7af,_0x271ef6){return _0x344928(_0x26e7af,_0x271ef6);},'PvULm':_0x1078db(0xa9)},_0x4bafd2=await _0x4f2e77['NFERK'](getToken);if(!_0x4bafd2)throw new Error(_0x1078db(0xbc));const _0x2815c8=_0x4f2e77['ZXpdT'](getApiBaseUrl),_0x4ba70b=await _0x4f2e77[_0x1078db(0x85)](fetch,_0x2815c8+'/api/v1/mcp/features/'+_0x4b4359+'/sessions',{'method':_0x4f2e77[_0x1078db(0xa5)],'headers':{'Authorization':'Bearer\x20'+_0x4bafd2}});if(!_0x4ba70b['ok']){const _0x345744=await _0x4ba70b['text']();throw new Error(_0x1078db(0x97)+_0x345744);}return _0x4ba70b[_0x1078db(0xa8)]();}export async function startSession(_0x1291d2,_0x367f9f){const _0x54d79e=_0x307f,_0x331c01={'VAmNx':function(_0x233994){return _0x233994();}},_0x314bbd=await _0x331c01[_0x54d79e(0xa0)](getToken);if(!_0x314bbd)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x5816d7=getApiBaseUrl(),_0x15e289=await fetch(_0x5816d7+'/api/v1/mcp/features/'+_0x1291d2+_0x54d79e(0x8c)+_0x367f9f+'/start',{'method':_0x54d79e(0x9d),'headers':{'Authorization':_0x54d79e(0xad)+_0x314bbd}});if(!_0x15e289['ok']){const _0x32c5a7=await _0x15e289['text']();throw new Error(_0x54d79e(0xa2)+_0x32c5a7);}return _0x15e289[_0x54d79e(0xa8)]();}export async function concludeSession(_0x881f3f,_0x42f963){const _0x2109ed=_0x307f,_0x50da42={'SfFge':function(_0x54375c){return _0x54375c();},'TOHqR':function(_0x589dbe,_0xe68a83,_0x2e91c9){return _0x589dbe(_0xe68a83,_0x2e91c9);}},_0x5d99d3=await _0x50da42['SfFge'](getToken);if(!_0x5d99d3)throw new Error(_0x2109ed(0xbc));const _0x46c059=_0x50da42[_0x2109ed(0xa6)](getApiBaseUrl),_0x5c99ac=await _0x50da42[_0x2109ed(0x93)](fetch,_0x46c059+_0x2109ed(0x89)+_0x881f3f+'/sessions/'+_0x42f963+'/conclude',{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x5d99d3}});if(!_0x5c99ac['ok']){const _0x3cb11f=await _0x5c99ac['text']();throw new Error('Failed\x20to\x20conclude\x20session:\x20'+_0x3cb11f);}return _0x5c99ac['json']();}export async function getActionItems(_0x33635d){const _0x1fdad5=_0x307f,_0x54fa62={'FbOoQ':_0x1fdad5(0xa9)},_0x221e0d=await getToken();if(!_0x221e0d)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x2fdd00=getApiBaseUrl(),_0x4e7980=await fetch(_0x2fdd00+'/api/v1/mcp/features/'+_0x33635d+_0x1fdad5(0xac),{'method':_0x54fa62[_0x1fdad5(0x95)],'headers':{'Authorization':'Bearer\x20'+_0x221e0d}});if(!_0x4e7980['ok']){const _0x26477=await _0x4e7980[_0x1fdad5(0x9c)]();throw new Error('Failed\x20to\x20get\x20action\x20items:\x20'+_0x26477);}return _0x4e7980[_0x1fdad5(0xa8)]();}export async function getItemFeedback(_0x2f6afc,_0x1edaef){const _0x25610f=_0x307f,_0x56517f={'VgGPM':function(_0x2e97ed,_0x3f97f6,_0x5e7f39){return _0x2e97ed(_0x3f97f6,_0x5e7f39);},'EmDMU':_0x25610f(0xa9)},_0xe2a8b5=await getToken();if(!_0xe2a8b5)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x25f4aa=getApiBaseUrl(),_0x349b95=await _0x56517f['VgGPM'](fetch,_0x25f4aa+'/api/v1/mcp/features/'+_0x2f6afc+_0x25610f(0x90)+_0x1edaef+'/feedback',{'method':_0x56517f[_0x25610f(0xb7)],'headers':{'Authorization':'Bearer\x20'+_0xe2a8b5}});if(!_0x349b95['ok']){const _0x668b96=await _0x349b95['text']();throw new Error('Failed\x20to\x20get\x20item\x20feedback:\x20'+_0x668b96);}return _0x349b95['json']();}export async function markCommentsAddressed(_0x13d832,_0x234e7d,_0x548101){const _0x1acf23=_0x307f,_0x4e6102={'XgndY':function(_0xc986b8){return _0xc986b8();},'PrzkG':function(_0xa563,_0x13f3a3,_0x1b8b34){return _0xa563(_0x13f3a3,_0x1b8b34);}},_0x5dcd8b=await _0x4e6102[_0x1acf23(0x96)](getToken);if(!_0x5dcd8b)throw new Error(_0x1acf23(0xbc));const _0x15e5a7=getApiBaseUrl(),_0x5c3432=await _0x4e6102[_0x1acf23(0x8e)](fetch,_0x15e5a7+'/api/v1/mcp/features/'+_0x13d832+_0x1acf23(0xb1),{'method':_0x1acf23(0x9d),'headers':{'Authorization':'Bearer\x20'+_0x5dcd8b,'Content-Type':'application/json'},'body':JSON[_0x1acf23(0xb8)]({'checklistItemId':_0x234e7d,'commentIds':_0x548101})});if(!_0x5c3432['ok']){const _0x52cef6=await _0x5c3432[_0x1acf23(0x9c)]();throw new Error(_0x1acf23(0xae)+_0x52cef6);}}export async function softDeleteFeature(_0x34e025){const _0x32fef8=_0x307f,_0x3c2f49={'EhuQy':function(_0xd57d21){return _0xd57d21();},'rUCwU':function(_0x458a3b,_0xd3fb16,_0x58aea0){return _0x458a3b(_0xd3fb16,_0x58aea0);},'yRuBb':_0x32fef8(0x8f)},_0x414851=await getToken();if(!_0x414851)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x3dfd5b=_0x3c2f49[_0x32fef8(0xa3)](getApiBaseUrl),_0x59fb2b=await _0x3c2f49[_0x32fef8(0x8a)](fetch,_0x3dfd5b+_0x32fef8(0x89)+_0x34e025,{'method':_0x3c2f49['yRuBb'],'headers':{'Authorization':'Bearer\x20'+_0x414851}});if(!_0x59fb2b['ok']){const _0x3f1918=await _0x59fb2b[_0x32fef8(0x9c)]();throw new Error('Failed\x20to\x20delete\x20feature\x20review:\x20'+_0x3f1918);}}export async function restoreFeature(_0x430282){const _0x157d2d=_0x307f,_0x3ce755={'DdrEl':function(_0xaccb9a){return _0xaccb9a();},'pIRjw':function(_0x3c86ca,_0x268f07,_0x2bf5cf){return _0x3c86ca(_0x268f07,_0x2bf5cf);}},_0x2e91ca=await _0x3ce755['DdrEl'](getToken);if(!_0x2e91ca)throw new Error(_0x157d2d(0xbc));const _0x3f1572=getApiBaseUrl(),_0x130772=await _0x3ce755['pIRjw'](fetch,_0x3f1572+_0x157d2d(0x89)+_0x430282+_0x157d2d(0x86),{'method':_0x157d2d(0x9d),'headers':{'Authorization':'Bearer\x20'+_0x2e91ca}});if(!_0x130772['ok']){const _0x318dd0=await _0x130772[_0x157d2d(0x9c)]();throw new Error(_0x157d2d(0x8d)+_0x318dd0);}}