@ranger-testing/ranger-cli 3.1.6 → 3.1.7-alpha.387730d-58

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 (86) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/deleteProfile.js +1 -1
  7. package/build/commands/env.js +1 -1
  8. package/build/commands/feature.js +1 -1
  9. package/build/commands/hook.js +1 -1
  10. package/build/commands/hooks/autoPrompt.js +1 -1
  11. package/build/commands/hooks/disable.js +1 -1
  12. package/build/commands/hooks/enable.js +1 -1
  13. package/build/commands/hooks/exitPlanMode.js +1 -1
  14. package/build/commands/hooks/index.js +1 -1
  15. package/build/commands/hooks/output.js +1 -1
  16. package/build/commands/hooks/planReminder.js +1 -1
  17. package/build/commands/hooks/planStart.js +1 -1
  18. package/build/commands/hooks/postEdit.js +1 -1
  19. package/build/commands/hooks/preCompact.js +1 -1
  20. package/build/commands/hooks/sessionEnd.js +1 -1
  21. package/build/commands/hooks/sessionStart.js +1 -1
  22. package/build/commands/hooks/stopHook.js +1 -1
  23. package/build/commands/index.js +1 -1
  24. package/build/commands/login.js +1 -1
  25. package/build/commands/mcpBootstrap.js +1 -1
  26. package/build/commands/migrateProfile.js +1 -1
  27. package/build/commands/setup/claude.js +1 -1
  28. package/build/commands/setup/opencode.js +1 -1
  29. package/build/commands/setupCi.js +1 -1
  30. package/build/commands/skillup.js +1 -1
  31. package/build/commands/start.js +1 -1
  32. package/build/commands/status.js +1 -1
  33. package/build/commands/update.js +1 -1
  34. package/build/commands/updateEnv.js +1 -1
  35. package/build/commands/useEnv.js +1 -1
  36. package/build/commands/utils/activeProfile.js +1 -1
  37. package/build/commands/utils/agentEnv.js +1 -1
  38. package/build/commands/utils/browserSessionsApi.js +1 -1
  39. package/build/commands/utils/claudeConfig.js +1 -1
  40. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  41. package/build/commands/utils/claudePlugin.js +1 -1
  42. package/build/commands/utils/cloudProfile.js +1 -1
  43. package/build/commands/utils/cloudProfileSession.js +1 -1
  44. package/build/commands/utils/crypto.js +1 -1
  45. package/build/commands/utils/desirePathLog.js +1 -1
  46. package/build/commands/utils/deviceAuth.js +1 -1
  47. package/build/commands/utils/environment.js +1 -1
  48. package/build/commands/utils/featureApi.js +1 -1
  49. package/build/commands/utils/fixWebmDuration.js +1 -1
  50. package/build/commands/utils/gitTracked.js +1 -1
  51. package/build/commands/utils/keychain.js +1 -1
  52. package/build/commands/utils/legacyWarning.js +1 -1
  53. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  54. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  55. package/build/commands/utils/mcpImageBase64.js +1 -1
  56. package/build/commands/utils/model.js +1 -1
  57. package/build/commands/utils/novaActCli.js +1 -1
  58. package/build/commands/utils/opencodeConfig.js +1 -1
  59. package/build/commands/utils/organizationEnvApi.js +1 -1
  60. package/build/commands/utils/playwrightCli.js +1 -1
  61. package/build/commands/utils/profileMessages.js +1 -1
  62. package/build/commands/utils/profileSetupBanner.js +1 -1
  63. package/build/commands/utils/projectsConfig.js +1 -1
  64. package/build/commands/utils/rangerConfig.js +1 -1
  65. package/build/commands/utils/rangerRoot.js +1 -1
  66. package/build/commands/utils/rangerwrightCli.js +1 -1
  67. package/build/commands/utils/resolveProfileContext.js +1 -1
  68. package/build/commands/utils/resolveProfileUrl.js +1 -1
  69. package/build/commands/utils/retry.js +1 -1
  70. package/build/commands/utils/scenarioOriginCheck.js +1 -1
  71. package/build/commands/utils/sessionCache.js +1 -1
  72. package/build/commands/utils/settings.js +1 -1
  73. package/build/commands/utils/skillContent.js +1 -1
  74. package/build/commands/utils/skills.js +1 -1
  75. package/build/commands/utils/stitchWebmFiles.js +1 -1
  76. package/build/commands/utils/telemetry.js +1 -1
  77. package/build/commands/utils/tokenRefresh.js +1 -1
  78. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  79. package/build/commands/utils/tunnelClient.js +1 -1
  80. package/build/commands/utils/userApi.js +1 -1
  81. package/build/commands/utils/version.js +1 -1
  82. package/build/commands/verifyFeature.js +1 -1
  83. package/build/commands/verifyFeatureCli.js +1 -1
  84. package/build/commands/verifyFeatureNovaCli.js +1 -1
  85. package/build/commands/verifyFeatureRangerwrightCli.js +1 -1
  86. package/package.json +2 -5
@@ -1 +1 @@
1
- (function(_0xb8cb0e,_0x182f1b){const _0x5e4576=_0x3eda,_0x595137=_0xb8cb0e();while(!![]){try{const _0x540599=-parseInt(_0x5e4576(0x1d7))/0x1+-parseInt(_0x5e4576(0x1c1))/0x2*(parseInt(_0x5e4576(0x1cd))/0x3)+parseInt(_0x5e4576(0x1b1))/0x4*(parseInt(_0x5e4576(0x1bb))/0x5)+parseInt(_0x5e4576(0x1c3))/0x6+-parseInt(_0x5e4576(0x1bc))/0x7*(parseInt(_0x5e4576(0x1be))/0x8)+-parseInt(_0x5e4576(0x1bd))/0x9+parseInt(_0x5e4576(0x1ef))/0xa;if(_0x540599===_0x182f1b)break;else _0x595137['push'](_0x595137['shift']());}catch(_0x8ec472){_0x595137['push'](_0x595137['shift']());}}}(_0x255d,0x37de1));import{existsSync}from'fs';import _0x1d3c38 from'inquirer';function _0x255d(){const _0x2a7167=['39633NwEQMG','HdaAv','qCkOJ','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','source','settings','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','telemetry','NjZWl','cwd','351352jCeVsV','\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a','iQZeD','length','DbnbJ','GwlJY','env','url','pLxPh','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','list','\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a','MYqKa','authEnv','name','Active\x20profile\x20\x22','envBaseUrl','Vnxlb','key','baseUrl','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','\x20to\x20override.','\x20does\x20not\x20exist.','`ranger\x20profile\x20add`\x20to\x20create\x20one.','3647410ZEDxzB','local','\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).','startPath','Profile\x20\x22','environmentKey','80dBVtJZ','XSCyk','domains','prompt','string','cdpEndpoint','EeDcV','\x22.\x20Pass\x20--profile\x20','hOgWK','status','57825fOngZv','1169VRqdzi','446913eDFnxk','2032zxatUN','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','50BCkgnY','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','2438964EsCaXw','envStartPath','ZkCtp','profile','UrrnV','aTPSj','aFSfJ','RANGER_TEST_USERNAME','NVLXD','log'];_0x255d=function(){return _0x2a7167;};return _0x255d();}import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x312ff8){const _0x5aa24e=_0x3eda,_0x32f00a={'zskuk':function(_0x3152c3){return _0x3152c3();},'bkFzf':function(_0x2642c8,_0x5e9a70){return _0x2642c8!==_0x5e9a70;},'DbnbJ':function(_0x254f35,_0x2f6204){return _0x254f35 instanceof _0x2f6204;},'GwlJY':function(_0x10f03f,_0x2e385a){return _0x10f03f(_0x2e385a);},'eAsjY':function(_0x5839de){return _0x5839de();},'halGu':function(_0x4e28ae,_0x18ca3b){return _0x4e28ae+_0x18ca3b;},'UrrnV':function(_0xf14ba0,_0x226863){return _0xf14ba0+_0x226863;},'sPMot':function(_0x4122ad,_0x45fb2f){return _0x4122ad+_0x45fb2f;},'MYqKa':function(_0x165a22,_0x374f9a){return _0x165a22+_0x374f9a;},'ZkCtp':_0x5aa24e(0x1c2),'XLLUd':_0x5aa24e(0x1e0),'qCkOJ':function(_0x225291,_0x1f8770){return _0x225291(_0x1f8770);},'EpkFm':function(_0x173f2d,_0x3450f0){return _0x173f2d instanceof _0x3450f0;},'hOgWK':function(_0x4d5101,_0x63a9a8){return _0x4d5101===_0x63a9a8;},'aTPSj':function(_0xfdd74a,_0x5a938){return _0xfdd74a&&_0x5a938;},'qeJBy':'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20','NVLXD':_0x5aa24e(0x1e1),'NjZWl':_0x5aa24e(0x1d1),'Vnxlb':'Cloud\x20profile\x20(recommended)','XSCyk':'cloud','iQZeD':function(_0xa3837,_0x31597e,_0x4700cf){return _0xa3837(_0x31597e,_0x4700cf);},'pLxPh':function(_0x181898,_0x35f611){return _0x181898+_0x35f611;},'EeDcV':_0x5aa24e(0x1d8),'nQVIi':_0x5aa24e(0x1bf)},_0x343074=_0x312ff8[_0x5aa24e(0x1c6)];let _0x4ef03d=_0x343074,_0x12edd1=null;const _0x12ceea=_0x343074?null:await _0x32f00a['zskuk'](readActiveProfileName);if(_0x312ff8['authEnv']&&_0x343074)console['log']('\x20\x20Note:\x20--env\x20\x22'+_0x312ff8['authEnv']+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x343074+_0x5aa24e(0x1f1));else _0x312ff8['authEnv']&&!process['env'][_0x5aa24e(0x1ca)]&&console[_0x5aa24e(0x1cc)]('\x20\x20Note:\x20--env\x20\x22'+_0x312ff8[_0x5aa24e(0x1e4)]+_0x5aa24e(0x1d3));if(!_0x343074&&process[_0x5aa24e(0x1dd)]['RANGER_TEST_USERNAME'])try{const _0x54bc63=await resolveAdHocProfile({'targetUrl':_0x312ff8[_0x5aa24e(0x1ea)]??readUrlEnvVars()[_0x5aa24e(0x1e7)],'envKey':_0x312ff8[_0x5aa24e(0x1e4)]});_0x54bc63&&(_0x12ceea&&_0x32f00a['bkFzf'](_0x12ceea,_0x54bc63[_0x5aa24e(0x1e5)])&&console['log']('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x54bc63[_0x5aa24e(0x1e5)]+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x12ceea+_0x5aa24e(0x1b8)+_0x12ceea+_0x5aa24e(0x1ec)),_0x4ef03d=_0x54bc63[_0x5aa24e(0x1e5)],_0x12edd1=_0x54bc63['profile']);}catch(_0x230e97){if(!_0x12ceea||_0x312ff8['authEnv'])throw _0x230e97;console[_0x5aa24e(0x1cc)]('\x20\x20Warning:\x20'+(_0x32f00a[_0x5aa24e(0x1db)](_0x230e97,Error)?_0x230e97['message']:_0x32f00a[_0x5aa24e(0x1dc)](String,_0x230e97))),console[_0x5aa24e(0x1cc)](_0x5aa24e(0x1d0)+_0x12ceea+'\x22.');}if(!_0x4ef03d)_0x4ef03d=_0x12ceea??undefined;if(!_0x4ef03d)try{const _0x2eedbd=await _0x32f00a['eAsjY'](listCloudProfiles);if(_0x2eedbd[_0x5aa24e(0x1da)]===0x1){const _0x43a28f=_0x2eedbd[0x0];_0x4ef03d=_0x43a28f[_0x5aa24e(0x1e5)],console[_0x5aa24e(0x1cc)]('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x43a28f[_0x5aa24e(0x1e5)]),console['log']('\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)');}}catch{}if(!_0x4ef03d)throw new Error(_0x32f00a['halGu'](_0x32f00a[_0x5aa24e(0x1c7)](_0x32f00a['sPMot'](_0x32f00a[_0x5aa24e(0x1e3)]('Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a'),_0x32f00a[_0x5aa24e(0x1c5)]),'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'),_0x32f00a['XLLUd']));const _0x3d8be0=_0x32f00a['qCkOJ'](getEnvDir,_0x4ef03d),_0x14c9e5=existsSync(_0x3d8be0);let _0x594e4c=_0x12edd1,_0x3c9b31=![];if(!_0x594e4c)try{_0x594e4c=await _0x32f00a['GwlJY'](fetchCloudProfile,_0x4ef03d);if(!_0x594e4c)_0x3c9b31=!![];}catch(_0x32af3c){_0x32f00a['EpkFm'](_0x32af3c,ApiError)&&_0x32f00a[_0x5aa24e(0x1b9)](_0x32af3c[_0x5aa24e(0x1ba)],0x194)&&(_0x3c9b31=!![]);}if(_0x32f00a[_0x5aa24e(0x1c8)](_0x343074,_0x3c9b31)&&!_0x14c9e5&&!_0x594e4c)throw new Error(_0x5aa24e(0x1af)+_0x343074+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a'+_0x32f00a['qeJBy']+_0x5aa24e(0x1ee));if(_0x594e4c&&_0x14c9e5){let _0x465122=!![];if(isInteractive()){const {source:_0x2149c0}=await _0x1d3c38[_0x5aa24e(0x1b4)]([{'type':_0x32f00a[_0x5aa24e(0x1cb)],'name':_0x32f00a[_0x5aa24e(0x1d5)],'message':_0x5aa24e(0x1af)+_0x4ef03d+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x32f00a[_0x5aa24e(0x1e8)],'value':_0x32f00a[_0x5aa24e(0x1b2)]},{'name':'Local\x20profile','value':_0x5aa24e(0x1f0)}],'default':'cloud'}]);_0x465122=_0x2149c0===_0x32f00a['XSCyk'];}if(!_0x465122)_0x594e4c=null;}const _0x54b787=readProfileOverrides(process[_0x5aa24e(0x1d6)](),_0x4ef03d);let _0x2051aa=null,_0x57f251,_0x528a39,_0x2e92ea,_0x24d7e8,_0x528cf6=null,_0x5bd2fb,_0x202348;const _0x1b3b23=_0x32f00a[_0x5aa24e(0x1cf)](expandOverrides,_0x54b787),_0x33d575=readUrlEnvVars();if(_0x594e4c){_0x2051aa=_0x594e4c;const _0x23beb5=_0x594e4c['settings']??{},_0xcd639f=mergeCloudProfileSettings(_0x23beb5,_0x54b787??undefined),_0x46f07d={..._0x594e4c,'settings':_0xcd639f};_0x528cf6={'baseUrl':expandString(_0x23beb5[_0x5aa24e(0x1ea)]),'startPath':_0x32f00a[_0x5aa24e(0x1cf)](expandString,_0x23beb5[_0x5aa24e(0x1ae)])};const _0x8a64a9=await fetchAuthConfig(),_0x1d594c=_0x8a64a9?resolveAuthEnvironmentLocally(_0x8a64a9,_0x594e4c[_0x5aa24e(0x1b0)]):null;_0x5bd2fb=_0x1d594c?.[_0x5aa24e(0x1b3)]?.[0x0],_0x202348=_0x1d594c?.[_0x5aa24e(0x1e9)];const _0x22506e=_0x32f00a[_0x5aa24e(0x1dc)](resolveProfileUrl,{'flagBaseUrl':_0x312ff8[_0x5aa24e(0x1ea)],'flagStartPath':_0x312ff8[_0x5aa24e(0x1ae)],'envBaseUrl':_0x33d575['envBaseUrl'],'envStartPath':_0x33d575['envStartPath'],'projectOverrides':_0x1b3b23,'cloudSettings':_0x528cf6,'authEnvironmentDomain':_0x5bd2fb}),_0x20e9f4=process[_0x5aa24e(0x1dd)]['RANGER_SESSION_STATE_PATH'];if(_0x20e9f4){if(!existsSync(_0x20e9f4))throw new Error('RANGER_SESSION_STATE_PATH='+_0x20e9f4+_0x5aa24e(0x1ed));_0x57f251=_0x20e9f4,_0x528a39=resolveEnvVars(_0xcd639f),_0x2e92ea=Boolean(_0x528a39['cdpEndpoint']);}else{const _0x34fa8d=await _0x32f00a[_0x5aa24e(0x1d9)](resolveCloudProfileSession,_0x46f07d,{'effectiveBaseUrl':_0x22506e[_0x5aa24e(0x1ea)],'telemetry':_0x312ff8[_0x5aa24e(0x1d4)],'assertedEnv':_0x312ff8[_0x5aa24e(0x1e4)]});_0x57f251=_0x34fa8d['authPath'],_0x528a39=_0x32f00a[_0x5aa24e(0x1dc)](resolveEnvVars,_0x34fa8d[_0x5aa24e(0x1d2)]),_0x2e92ea=Boolean(_0x528a39[_0x5aa24e(0x1b6)]),_0x5bd2fb=_0x34fa8d['resolvedEnv']?.['domains']?.[0x0],_0x202348=_0x34fa8d['resolvedEnv']?.[_0x5aa24e(0x1e9)];}}else{if(!_0x14c9e5){const _0x4a804c=!_0x343074;throw new Error(_0x4a804c?_0x32f00a[_0x5aa24e(0x1df)](_0x32f00a['sPMot'](_0x5aa24e(0x1e6)+_0x4ef03d+_0x5aa24e(0x1e2),_0x32f00a[_0x5aa24e(0x1b7)])+_0x32f00a['nQVIi'],_0x5aa24e(0x1c0)+_0x4ef03d+'`\x20to\x20recreate\x20it.'):_0x5aa24e(0x1af)+_0x4ef03d+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x4ef03d);}const _0x1250d9=await _0x32f00a[_0x5aa24e(0x1cf)](loadSettings,_0x4ef03d);_0x528a39=resolveEnvVars(_0x1250d9),_0x2e92ea=Boolean(_0x528a39['cdpEndpoint']),_0x24d7e8=_0x528a39[_0x5aa24e(0x1ea)];}const _0x328ce1=resolveProfileUrl({'flagBaseUrl':_0x312ff8[_0x5aa24e(0x1ea)],'flagStartPath':_0x312ff8['startPath'],'envBaseUrl':_0x33d575[_0x5aa24e(0x1e7)],'envStartPath':_0x33d575[_0x5aa24e(0x1c4)],'localSettingsBaseUrl':_0x24d7e8,'projectOverrides':_0x1b3b23,'cloudSettings':_0x528cf6,'authEnvironmentDomain':_0x5bd2fb}),_0xfcc7f6=_0x328ce1[_0x5aa24e(0x1de)]??_0x328ce1[_0x5aa24e(0x1ea)];if(!_0xfcc7f6&&!_0x2e92ea)throw new Error(_0x5aa24e(0x1eb)+_0x4ef03d+'\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20'+_0x4ef03d+'\x20baseUrl\x20<url>');return{'activeProfile':_0x4ef03d,'resolvedCloudProfile':_0x2051aa,'cloudAuthPath':_0x57f251,'resolvedSettings':_0x528a39,'isCdpMode':_0x2e92ea,'url':_0xfcc7f6,'baseUrlSource':_0x328ce1['baseUrlSource'],'authEnvKey':_0x202348,'startPath':_0x328ce1[_0x5aa24e(0x1ae)]};}function expandString(_0x3be827){const _0x42ab20=_0x3eda,_0x3ab1a={'LIRTx':function(_0x51378c,_0x1a1829){return _0x51378c!==_0x1a1829;},'UeGMh':function(_0x5a1ea7,_0x17a70b){return _0x5a1ea7(_0x17a70b);}};if(_0x3ab1a['LIRTx'](typeof _0x3be827,_0x42ab20(0x1b5)))return _0x3be827;return _0x3ab1a['UeGMh'](resolveEnvVars,_0x3be827);}function _0x3eda(_0x4fd58d,_0xd81712){_0x4fd58d=_0x4fd58d-0x1ae;const _0x255d9e=_0x255d();let _0x3edacb=_0x255d9e[_0x4fd58d];return _0x3edacb;}function expandOverrides(_0x300e49){const _0x597f90=_0x3eda,_0x223e52={'HdaAv':function(_0x1dab9c,_0x47fb8a){return _0x1dab9c===_0x47fb8a;},'aFSfJ':_0x597f90(0x1b5),'XlxhM':function(_0x1f792f,_0xde45d3){return _0x1f792f(_0xde45d3);}};if(!_0x300e49)return _0x300e49;const _0x3219b4={..._0x300e49};return _0x223e52[_0x597f90(0x1ce)](typeof _0x3219b4['baseUrl'],_0x223e52[_0x597f90(0x1c9)])&&(_0x3219b4['baseUrl']=_0x223e52['XlxhM'](resolveEnvVars,_0x3219b4[_0x597f90(0x1ea)])),typeof _0x3219b4[_0x597f90(0x1ae)]===_0x597f90(0x1b5)&&(_0x3219b4['startPath']=resolveEnvVars(_0x3219b4['startPath'])),_0x3219b4;}
1
+ (function(_0x506844,_0xa6d8d9){const _0x564221=_0x2a51,_0x126b7a=_0x506844();while(!![]){try{const _0x2e3935=parseInt(_0x564221(0x1f9))/0x1*(-parseInt(_0x564221(0x203))/0x2)+-parseInt(_0x564221(0x20b))/0x3*(-parseInt(_0x564221(0x1e8))/0x4)+parseInt(_0x564221(0x1ea))/0x5*(parseInt(_0x564221(0x200))/0x6)+parseInt(_0x564221(0x214))/0x7+-parseInt(_0x564221(0x1f5))/0x8+parseInt(_0x564221(0x205))/0x9+-parseInt(_0x564221(0x1fc))/0xa;if(_0x2e3935===_0xa6d8d9)break;else _0x126b7a['push'](_0x126b7a['shift']());}catch(_0x45e6fe){_0x126b7a['push'](_0x126b7a['shift']());}}}(_0x22c8,0x89ddf));import{existsSync}from'fs';import _0x513919 from'inquirer';import{ApiError,fetchAuthConfig,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive,resolveAuthEnvironmentLocally}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';function _0x22c8(){const _0x943b65=['baseUrl','cdpEndpoint','BGOzm','2093912ZZukNY','\x20\x20Note:\x20--env\x20\x22','Local\x20profile','qfTSr','218871nmqNaD','CHJdd','bMdKd','3337270QkiEys','\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20','RANGER_SESSION_STATE_PATH=','Profile\x20\x22','6ItCECj','local','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','2RgpTOG','lBPph','486288CpEabF','HgVqp','authPath','utlcQ','XtLay','authEnv','55383rlsRfC','key','domains','env','\x20does\x20not\x20exist.','envStartPath','settings','`\x20to\x20recreate\x20it.','ADkxc','6401444XbuUME','qDaBt','\x20\x20Falling\x20back\x20to\x20saved\x20active\x20profile\x20\x22','source','HAlri','string','name','length','envBaseUrl','\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one\x20ad\x20hoc,\x20or\x0a','\x20to\x20override.','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','profile','resolvedEnv','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','CQUIE','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','status','log','20FRDIbr','\x22\x20only\x20affects\x20ad-hoc\x20profile\x20resolution;\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20use\x20it.','1591055xxNIHA','vsHhh','\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','aplvw','environmentKey','No\x20baseUrl\x20configured\x20for\x20profile\x20\x22','CrNLm','startPath'];_0x22c8=function(){return _0x943b65;};return _0x22c8();}import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x1e1433){const _0xf8ed0b=_0x2a51,_0x14fb65={'ADkxc':function(_0x587b56){return _0x587b56();},'XtLay':function(_0x198841,_0x2337a8){return _0x198841(_0x2337a8);},'qDaBt':function(_0x21cad0,_0x56bc12){return _0x21cad0!==_0x56bc12;},'oZibk':function(_0x3da6d3,_0x4e2495){return _0x3da6d3 instanceof _0x4e2495;},'qfTSr':function(_0x534449,_0x180bb1){return _0x534449??_0x180bb1;},'eKuGP':function(_0x38a9ec,_0x50d626){return _0x38a9ec+_0x50d626;},'XScPL':function(_0x2e4c65,_0xcfd9d1){return _0x2e4c65+_0xcfd9d1;},'vsHhh':function(_0x3ff502,_0x422e2d){return _0x3ff502+_0x422e2d;},'aplvw':_0xf8ed0b(0x1e0),'BiItr':_0xf8ed0b(0x21d),'HAlri':'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a','xZzTw':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','uOBEQ':function(_0x121ddf,_0x5ba874){return _0x121ddf(_0x5ba874);},'lBPph':function(_0x487359,_0x2037e2){return _0x487359 instanceof _0x2037e2;},'HgVqp':function(_0x5d6a4e,_0x4a1711){return _0x5d6a4e&&_0x4a1711;},'elsIb':'`ranger\x20profile\x20add`\x20to\x20create\x20one.','CQUIE':function(_0x193a0e,_0x175c9d){return _0x193a0e&&_0x175c9d;},'CrNLm':'list','bMdKd':'Cloud\x20profile\x20(recommended)','anaWz':'cloud','tDoFj':function(_0x2f19b1,_0x5bb546,_0x564ac2){return _0x2f19b1(_0x5bb546,_0x564ac2);},'EGTTZ':_0xf8ed0b(0x21e),'TJLEN':function(_0x17dcdc,_0x275e18){return _0x17dcdc(_0x275e18);}},_0x1054c3=_0x1e1433['profile'];let _0xb56c0f=_0x1054c3,_0x449571=null;const _0x15a3c6=_0x1054c3?null:await _0x14fb65['ADkxc'](readActiveProfileName);if(_0x1e1433['authEnv']&&_0x1054c3)console['log'](_0xf8ed0b(0x1f6)+_0x1e1433[_0xf8ed0b(0x20a)]+'\x22\x20is\x20used\x20as\x20the\x20auth-environment\x20assertion\x20for\x20\x22'+_0x1054c3+'\x22\x20this\x20run\x20(overrides\x20the\x20profile\x27s\x20pinned\x20env\x20for\x20login).');else _0x1e1433['authEnv']&&!process[_0xf8ed0b(0x20e)]['RANGER_TEST_USERNAME']&&console[_0xf8ed0b(0x1e7)](_0xf8ed0b(0x1f6)+_0x1e1433['authEnv']+_0xf8ed0b(0x1e9));if(!_0x1054c3&&process[_0xf8ed0b(0x20e)]['RANGER_TEST_USERNAME'])try{const _0x360195=await _0x14fb65['XtLay'](resolveAdHocProfile,{'targetUrl':_0x1e1433['baseUrl']??readUrlEnvVars()['envBaseUrl'],'envKey':_0x1e1433['authEnv']});_0x360195&&(_0x15a3c6&&_0x14fb65[_0xf8ed0b(0x215)](_0x15a3c6,_0x360195['name'])&&console[_0xf8ed0b(0x1e7)]('\x20\x20RANGER_TEST_USERNAME\x20is\x20set\x20—\x20using\x20profile\x20\x22'+_0x360195['name']+'\x22\x20instead\x20of\x20the\x20saved\x20active\x20profile\x20\x22'+_0x15a3c6+'\x22.\x20Pass\x20--profile\x20'+_0x15a3c6+_0xf8ed0b(0x1df)),_0xb56c0f=_0x360195['name'],_0x449571=_0x360195[_0xf8ed0b(0x1e1)]);}catch(_0x3e0769){if(!_0x15a3c6||_0x1e1433[_0xf8ed0b(0x20a)])throw _0x3e0769;console['log']('\x20\x20Warning:\x20'+(_0x14fb65['oZibk'](_0x3e0769,Error)?_0x3e0769['message']:String(_0x3e0769))),console[_0xf8ed0b(0x1e7)](_0xf8ed0b(0x216)+_0x15a3c6+'\x22.');}if(!_0xb56c0f)_0xb56c0f=_0x14fb65[_0xf8ed0b(0x1f8)](_0x15a3c6,undefined);if(!_0xb56c0f)try{const _0x58f1cb=await _0x14fb65['ADkxc'](listCloudProfiles);if(_0x58f1cb[_0xf8ed0b(0x21b)]===0x1){const _0x13099e=_0x58f1cb[0x0];_0xb56c0f=_0x13099e[_0xf8ed0b(0x21a)],console[_0xf8ed0b(0x1e7)]('\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20'+_0x13099e['name']),console['log'](_0xf8ed0b(0x202));}}catch{}if(!_0xb56c0f)throw new Error(_0x14fb65['eKuGP'](_0x14fb65['XScPL'](_0x14fb65['vsHhh'](_0xf8ed0b(0x1e5),_0x14fb65[_0xf8ed0b(0x1ed)]),_0x14fb65['BiItr'])+_0x14fb65[_0xf8ed0b(0x218)],_0x14fb65['xZzTw']));const _0x424203=getEnvDir(_0xb56c0f),_0x9ac97c=_0x14fb65[_0xf8ed0b(0x209)](existsSync,_0x424203);let _0x1d5bcf=_0x449571,_0x5eb39f=![];if(!_0x1d5bcf)try{_0x1d5bcf=await _0x14fb65['uOBEQ'](fetchCloudProfile,_0xb56c0f);if(!_0x1d5bcf)_0x5eb39f=!![];}catch(_0x4b558f){_0x14fb65[_0xf8ed0b(0x204)](_0x4b558f,ApiError)&&_0x4b558f[_0xf8ed0b(0x1e6)]===0x194&&(_0x5eb39f=!![]);}if(_0x14fb65[_0xf8ed0b(0x206)](_0x1054c3,_0x5eb39f)&&!_0x9ac97c&&!_0x1d5bcf)throw new Error(_0x14fb65[_0xf8ed0b(0x1eb)](_0x14fb65[_0xf8ed0b(0x1eb)](_0xf8ed0b(0x1ff)+_0x1054c3+_0xf8ed0b(0x1ec),'\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20'),_0x14fb65['elsIb']));if(_0x14fb65[_0xf8ed0b(0x1e4)](_0x1d5bcf,_0x9ac97c)){let _0x27aa48=!![];if(isInteractive()){const {source:_0x4e6d6c}=await _0x513919['prompt']([{'type':_0x14fb65[_0xf8ed0b(0x1f0)],'name':_0xf8ed0b(0x217),'message':'Profile\x20\x22'+_0xb56c0f+'\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','choices':[{'name':_0x14fb65[_0xf8ed0b(0x1fb)],'value':_0x14fb65['anaWz']},{'name':_0xf8ed0b(0x1f7),'value':_0xf8ed0b(0x201)}],'default':'cloud'}]);_0x27aa48=_0x4e6d6c===_0x14fb65['anaWz'];}if(!_0x27aa48)_0x1d5bcf=null;}const _0x32e391=_0x14fb65['tDoFj'](readProfileOverrides,process['cwd'](),_0xb56c0f);let _0x359ed2=null,_0x28e6bd,_0x5ac2be,_0x9616e4,_0x39dedd,_0x121f35=null,_0x5a31c6,_0x29e380;const _0x37cb00=expandOverrides(_0x32e391),_0x44a0d5=_0x14fb65[_0xf8ed0b(0x213)](readUrlEnvVars);if(_0x1d5bcf){_0x359ed2=_0x1d5bcf;const _0x5c13e5=_0x1d5bcf['settings']??{},_0x221203=mergeCloudProfileSettings(_0x5c13e5,_0x32e391??undefined),_0x53b05a={..._0x1d5bcf,'settings':_0x221203};_0x121f35={'baseUrl':expandString(_0x5c13e5[_0xf8ed0b(0x1f2)]),'startPath':expandString(_0x5c13e5[_0xf8ed0b(0x1f1)])};const _0x132030=await fetchAuthConfig(),_0x416e44=_0x132030?resolveAuthEnvironmentLocally(_0x132030,_0x1d5bcf[_0xf8ed0b(0x1ee)]):null;_0x5a31c6=_0x416e44?.['domains']?.[0x0],_0x29e380=_0x416e44?.[_0xf8ed0b(0x20c)];const _0x552d86=resolveProfileUrl({'flagBaseUrl':_0x1e1433[_0xf8ed0b(0x1f2)],'flagStartPath':_0x1e1433['startPath'],'envBaseUrl':_0x44a0d5[_0xf8ed0b(0x21c)],'envStartPath':_0x44a0d5['envStartPath'],'projectOverrides':_0x37cb00,'cloudSettings':_0x121f35,'authEnvironmentDomain':_0x5a31c6}),_0x2444e0=process[_0xf8ed0b(0x20e)]['RANGER_SESSION_STATE_PATH'];if(_0x2444e0){if(!existsSync(_0x2444e0))throw new Error(_0xf8ed0b(0x1fe)+_0x2444e0+_0xf8ed0b(0x20f));_0x28e6bd=_0x2444e0,_0x5ac2be=resolveEnvVars(_0x221203),_0x9616e4=Boolean(_0x5ac2be['cdpEndpoint']);}else{const _0x59c4e2=await resolveCloudProfileSession(_0x53b05a,{'effectiveBaseUrl':_0x552d86[_0xf8ed0b(0x1f2)],'telemetry':_0x1e1433['telemetry'],'assertedEnv':_0x1e1433[_0xf8ed0b(0x20a)]});_0x28e6bd=_0x59c4e2[_0xf8ed0b(0x207)],_0x5ac2be=resolveEnvVars(_0x59c4e2[_0xf8ed0b(0x211)]),_0x9616e4=Boolean(_0x5ac2be[_0xf8ed0b(0x1f3)]),_0x5a31c6=_0x59c4e2[_0xf8ed0b(0x1e2)]?.[_0xf8ed0b(0x20d)]?.[0x0],_0x29e380=_0x59c4e2[_0xf8ed0b(0x1e2)]?.[_0xf8ed0b(0x20c)];}}else{if(!_0x9ac97c){const _0x18bb91=!_0x1054c3;throw new Error(_0x18bb91?'Active\x20profile\x20\x22'+_0xb56c0f+'\x22\x20no\x20longer\x20exists\x20(or\x20could\x20not\x20be\x20fetched).\x20Options:\x0a'+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20to\x20switch\x20(see\x20`ranger\x20profile\x20ls`),\x20or\x0a'+_0x14fb65['EGTTZ']+(_0xf8ed0b(0x1fd)+_0xb56c0f+_0xf8ed0b(0x212)):'Profile\x20\x22'+_0xb56c0f+'\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20'+_0xb56c0f);}const _0x3ad634=await loadSettings(_0xb56c0f);_0x5ac2be=resolveEnvVars(_0x3ad634),_0x9616e4=_0x14fb65['TJLEN'](Boolean,_0x5ac2be[_0xf8ed0b(0x1f3)]),_0x39dedd=_0x5ac2be[_0xf8ed0b(0x1f2)];}const _0xbf3e7=resolveProfileUrl({'flagBaseUrl':_0x1e1433['baseUrl'],'flagStartPath':_0x1e1433['startPath'],'envBaseUrl':_0x44a0d5['envBaseUrl'],'envStartPath':_0x44a0d5[_0xf8ed0b(0x210)],'localSettingsBaseUrl':_0x39dedd,'projectOverrides':_0x37cb00,'cloudSettings':_0x121f35,'authEnvironmentDomain':_0x5a31c6}),_0x26013c=_0xbf3e7['url']??_0xbf3e7['baseUrl'];if(!_0x26013c&&!_0x9616e4)throw new Error(_0xf8ed0b(0x1ef)+_0xb56c0f+_0xf8ed0b(0x1e3)+_0xb56c0f+'\x20baseUrl\x20<url>');return{'activeProfile':_0xb56c0f,'resolvedCloudProfile':_0x359ed2,'cloudAuthPath':_0x28e6bd,'resolvedSettings':_0x5ac2be,'isCdpMode':_0x9616e4,'url':_0x26013c,'baseUrlSource':_0xbf3e7['baseUrlSource'],'authEnvKey':_0x29e380,'startPath':_0xbf3e7['startPath']};}function _0x2a51(_0x296d05,_0x466988){_0x296d05=_0x296d05-0x1df;const _0x22c811=_0x22c8();let _0x2a510a=_0x22c811[_0x296d05];return _0x2a510a;}function expandString(_0x5e57b0){const _0x2c1a4=_0x2a51,_0x1af8b6={'BGOzm':_0x2c1a4(0x219)};if(typeof _0x5e57b0!==_0x1af8b6[_0x2c1a4(0x1f4)])return _0x5e57b0;return resolveEnvVars(_0x5e57b0);}function expandOverrides(_0x29e55d){const _0x279b9d=_0x2a51,_0x3d7d5a={'utlcQ':function(_0x1bfc4c,_0x122d37){return _0x1bfc4c(_0x122d37);},'ZxXUv':'string','CHJdd':function(_0x206c7c,_0x1a8904){return _0x206c7c(_0x1a8904);}};if(!_0x29e55d)return _0x29e55d;const _0xca6035={..._0x29e55d};return typeof _0xca6035['baseUrl']==='string'&&(_0xca6035['baseUrl']=_0x3d7d5a[_0x279b9d(0x208)](resolveEnvVars,_0xca6035[_0x279b9d(0x1f2)])),typeof _0xca6035['startPath']===_0x3d7d5a['ZxXUv']&&(_0xca6035[_0x279b9d(0x1f1)]=_0x3d7d5a[_0x279b9d(0x1fa)](resolveEnvVars,_0xca6035[_0x279b9d(0x1f1)])),_0xca6035;}
@@ -1 +1 @@
1
- (function(_0x38b78,_0x25097f){const _0x68869c=_0xf1ad,_0x1056b4=_0x38b78();while(!![]){try{const _0x736a83=parseInt(_0x68869c(0x19e))/0x1+-parseInt(_0x68869c(0x18e))/0x2+-parseInt(_0x68869c(0x186))/0x3+parseInt(_0x68869c(0x189))/0x4+parseInt(_0x68869c(0x19b))/0x5+-parseInt(_0x68869c(0x18a))/0x6*(-parseInt(_0x68869c(0x19c))/0x7)+parseInt(_0x68869c(0x185))/0x8*(-parseInt(_0x68869c(0x187))/0x9);if(_0x736a83===_0x25097f)break;else _0x1056b4['push'](_0x1056b4['shift']());}catch(_0x571b21){_0x1056b4['push'](_0x1056b4['shift']());}}}(_0xaaa5,0xb3684));function firstDefined(..._0x2ec218){const _0x6bbe61={'OAKFJ':function(_0x13b140,_0x27066e){return _0x13b140!==_0x27066e;},'bBXGU':function(_0x4781e8,_0x43b099){return _0x4781e8!==_0x43b099;}};for(const _0x15531a of _0x2ec218){if(_0x6bbe61['OAKFJ'](_0x15531a,undefined)&&_0x6bbe61['bBXGU'](_0x15531a,null)&&_0x15531a!=='')return _0x15531a;}return undefined;}function _0xf1ad(_0x4951d0,_0x26fc6c){_0x4951d0=_0x4951d0-0x184;const _0xaaa5d1=_0xaaa5();let _0xf1adc3=_0xaaa5d1[_0x4951d0];return _0xf1adc3;}function normalizeAuthEnvironmentDomain(_0x285663){const _0x22a93c=_0xf1ad;if(!_0x285663)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i[_0x22a93c(0x193)](_0x285663))return _0x285663;return'https://'+_0x285663;}export function resolveBaseUrlWithSource(_0x1f70c0){const _0x4b03e1=_0xf1ad,_0x33ef6e={'CkAGZ':'baseUrl','ROfvc':function(_0x403ead,_0x48ac8a){return _0x403ead===_0x48ac8a;},'aIiES':'--base-url','raUJB':'RANGER_BASE_URL','PBCrE':'local\x20profile\x20settings','lWpnc':function(_0xa84b00,_0x269237){return _0xa84b00===_0x269237;},'gxWop':_0x4b03e1(0x18f),'EXEPu':function(_0x538d40,_0x47d419){return _0x538d40(_0x47d419);},'bOAzc':function(_0x50e943,_0x384b51){return _0x50e943!==_0x384b51;}},_0x4e179b=_0x1f70c0[_0x4b03e1(0x197)],_0x1d7f2f=!!_0x4e179b&&_0x33ef6e['CkAGZ']in _0x4e179b,_0x1700b8=_0x4e179b?.[_0x4b03e1(0x18b)],_0x49b7aa=!(_0x1d7f2f&&_0x33ef6e['ROfvc'](_0x1700b8,null)),_0x1e19ea=[[_0x1f70c0[_0x4b03e1(0x196)],_0x33ef6e[_0x4b03e1(0x190)]],[_0x1f70c0[_0x4b03e1(0x19d)],_0x33ef6e[_0x4b03e1(0x198)]],[_0x1f70c0['localSettingsBaseUrl'],_0x33ef6e['PBCrE']],[_0x33ef6e[_0x4b03e1(0x18c)](typeof _0x1700b8,'string')?_0x1700b8:undefined,_0x4b03e1(0x18d)],[_0x49b7aa?_0x1f70c0[_0x4b03e1(0x184)]?.['baseUrl']:undefined,_0x33ef6e['gxWop']],[_0x49b7aa?_0x33ef6e['EXEPu'](normalizeAuthEnvironmentDomain,_0x1f70c0['authEnvironmentDomain']):undefined,'auth\x20environment\x20domain']];for(const [_0x33d63d,_0x476230]of _0x1e19ea){if(_0x33d63d!==undefined&&_0x33ef6e[_0x4b03e1(0x199)](_0x33d63d,null)&&_0x33d63d!=='')return{'baseUrl':_0x33d63d,'source':_0x476230};}return{};}function _0xaaa5(){const _0x566f4c=['raUJB','bOAzc','flagStartPath','4904960Wzljrd','196133xEqLrl','envBaseUrl','902593FErDKn','cloudSettings','2814352bGhWMp','3040905JStXMq','9REmWpX','psFOI','597744Easzxx','126NajfIV','baseUrl','lWpnc','projects.json\x20override','1042278TySPty','cloud\x20profile\x20settings','aIiES','bfHnj','PtENl','test','startPath','RANGER_START_PATH','flagBaseUrl','projectOverrides'];_0xaaa5=function(){return _0x566f4c;};return _0xaaa5();}export function resolveBaseUrl(_0x290077){const _0x30485f=_0xf1ad,_0x462f3a={'mlhMT':function(_0x102865,_0x4c08c5){return _0x102865(_0x4c08c5);}};return _0x462f3a['mlhMT'](resolveBaseUrlWithSource,_0x290077)[_0x30485f(0x18b)];}export function resolveStartPath(_0x22f8b3){const _0x250289=_0xf1ad,_0x4a04e5={'psFOI':_0x250289(0x194),'fWpGm':function(_0x2f0acc,_0x30edc0,_0x31014f,_0x45756b,_0x435e29){return _0x2f0acc(_0x30edc0,_0x31014f,_0x45756b,_0x435e29);},'bfHnj':function(_0x3c56c5,_0x5656f5){return _0x3c56c5===_0x5656f5;}},_0x5c2dd6=_0x22f8b3['projectOverrides'],_0x21b9e5=!!_0x5c2dd6&&_0x4a04e5[_0x250289(0x188)]in _0x5c2dd6,_0x1f2077=_0x5c2dd6?.[_0x250289(0x194)],_0x557085=!(_0x21b9e5&&_0x1f2077===null);return _0x4a04e5['fWpGm'](firstDefined,_0x22f8b3[_0x250289(0x19a)],_0x22f8b3['envStartPath'],_0x4a04e5[_0x250289(0x191)](typeof _0x1f2077,'string')?_0x1f2077:undefined,_0x557085?_0x22f8b3[_0x250289(0x184)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x58e05e,_0x6b8586){if(!_0x58e05e)return undefined;if(!_0x6b8586)return _0x58e05e;const _0x38b68e=_0x58e05e['endsWith']('/')?_0x58e05e['slice'](0x0,-0x1):_0x58e05e,_0x2a5f0c=_0x6b8586['startsWith']('/')?_0x6b8586:'/'+_0x6b8586;return _0x38b68e+_0x2a5f0c;}export function resolveProfileUrl(_0x21660f){const _0x2e8109=_0xf1ad,_0x2372c1={'PtENl':function(_0x4cbb6d,_0x30d4ee){return _0x4cbb6d(_0x30d4ee);}},{baseUrl:_0x42d5e8,source:_0x214394}=resolveBaseUrlWithSource(_0x21660f),_0x29b848=_0x2372c1[_0x2e8109(0x192)](resolveStartPath,_0x21660f);return{'baseUrl':_0x42d5e8,'baseUrlSource':_0x214394,'startPath':_0x29b848,'url':joinBaseAndPath(_0x42d5e8,_0x29b848)};}export function readUrlEnvVars(_0x531d84=process['env']){const _0x41649e=_0xf1ad;return{'envBaseUrl':_0x531d84['RANGER_BASE_URL'],'envStartPath':_0x531d84[_0x41649e(0x195)]};}
1
+ (function(_0x538b38,_0xa584b7){const _0x4b1c75=_0x54d3,_0x3c8e63=_0x538b38();while(!![]){try{const _0x5a6642=parseInt(_0x4b1c75(0x168))/0x1*(-parseInt(_0x4b1c75(0x175))/0x2)+-parseInt(_0x4b1c75(0x17d))/0x3+-parseInt(_0x4b1c75(0x171))/0x4*(parseInt(_0x4b1c75(0x167))/0x5)+parseInt(_0x4b1c75(0x16c))/0x6*(parseInt(_0x4b1c75(0x177))/0x7)+-parseInt(_0x4b1c75(0x16f))/0x8+parseInt(_0x4b1c75(0x179))/0x9+parseInt(_0x4b1c75(0x16d))/0xa;if(_0x5a6642===_0xa584b7)break;else _0x3c8e63['push'](_0x3c8e63['shift']());}catch(_0x456f8e){_0x3c8e63['push'](_0x3c8e63['shift']());}}}(_0x1797,0x841ab));function _0x1797(){const _0x56f14f=['flagBaseUrl','140852ZahYjG','SbDss','auth\x20environment\x20domain','BKQwl','1104510TNofvZ','authEnvironmentDomain','4415369fdSFYf','projects.json\x20override','84807PLHxha','startsWith','OEzZJ','baseUrl','2027217ZvqCoS','FZVWY','cloudSettings','wpCKO','--base-url','MbPvq','flagStartPath','cloud\x20profile\x20settings','localSettingsBaseUrl','projectOverrides','5jHyagr','1ubMQIy','endsWith','tVIJA','ceSCU','6wBVxEQ','11747270wujgMk','envBaseUrl','84888aqvHGb'];_0x1797=function(){return _0x56f14f;};return _0x1797();}function _0x54d3(_0x50dee0,_0x346254){_0x50dee0=_0x50dee0-0x15f;const _0x179782=_0x1797();let _0x54d3d3=_0x179782[_0x50dee0];return _0x54d3d3;}function firstDefined(..._0x649eef){const _0x19d428=_0x54d3,_0x58ebac={'FZVWY':function(_0xf7c746,_0x287541){return _0xf7c746!==_0x287541;}};for(const _0x2ab596 of _0x649eef){if(_0x58ebac[_0x19d428(0x17e)](_0x2ab596,undefined)&&_0x58ebac[_0x19d428(0x17e)](_0x2ab596,null)&&_0x58ebac[_0x19d428(0x17e)](_0x2ab596,''))return _0x2ab596;}return undefined;}function normalizeAuthEnvironmentDomain(_0x2de9e9){if(!_0x2de9e9)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x2de9e9))return _0x2de9e9;return'https://'+_0x2de9e9;}export function resolveBaseUrlWithSource(_0x3211de){const _0x1533e2=_0x54d3,_0x627a89={'IuEgb':function(_0x55c07f,_0x471697){return _0x55c07f in _0x471697;},'MbPvq':_0x1533e2(0x17c),'ceSCU':function(_0x13c7cd,_0x2288d4){return _0x13c7cd===_0x2288d4;},'wpCKO':_0x1533e2(0x178),'tVIJA':_0x1533e2(0x173),'GJlar':function(_0xb09954,_0x107558){return _0xb09954!==_0x107558;},'BKQwl':function(_0x2c7e10,_0x2e2a04){return _0x2c7e10!==_0x2e2a04;}},_0x3e65cc=_0x3211de[_0x1533e2(0x166)],_0x5eb833=!!_0x3e65cc&&_0x627a89['IuEgb'](_0x627a89[_0x1533e2(0x162)],_0x3e65cc),_0x4d6c69=_0x3e65cc?.[_0x1533e2(0x17c)],_0x51aa7a=!(_0x5eb833&&_0x627a89[_0x1533e2(0x16b)](_0x4d6c69,null)),_0x1c2d78=[[_0x3211de[_0x1533e2(0x170)],_0x1533e2(0x161)],[_0x3211de[_0x1533e2(0x16e)],'RANGER_BASE_URL'],[_0x3211de[_0x1533e2(0x165)],'local\x20profile\x20settings'],[_0x627a89['ceSCU'](typeof _0x4d6c69,'string')?_0x4d6c69:undefined,_0x627a89[_0x1533e2(0x160)]],[_0x51aa7a?_0x3211de[_0x1533e2(0x15f)]?.[_0x1533e2(0x17c)]:undefined,_0x1533e2(0x164)],[_0x51aa7a?normalizeAuthEnvironmentDomain(_0x3211de[_0x1533e2(0x176)]):undefined,_0x627a89[_0x1533e2(0x16a)]]];for(const [_0x5a45ae,_0x427c28]of _0x1c2d78){if(_0x627a89['GJlar'](_0x5a45ae,undefined)&&_0x5a45ae!==null&&_0x627a89[_0x1533e2(0x174)](_0x5a45ae,''))return{'baseUrl':_0x5a45ae,'source':_0x427c28};}return{};}export function resolveBaseUrl(_0x18103c){const _0x43725f=_0x54d3;return resolveBaseUrlWithSource(_0x18103c)[_0x43725f(0x17c)];}export function resolveStartPath(_0x3d9096){const _0x5b2935=_0x54d3,_0x2f5276={'SbDss':'startPath','OEzZJ':function(_0x1fbf56,_0xef2f7c,_0x149d58,_0x7e6a81,_0x2ed656){return _0x1fbf56(_0xef2f7c,_0x149d58,_0x7e6a81,_0x2ed656);}},_0x419b34=_0x3d9096['projectOverrides'],_0x48ec11=!!_0x419b34&&_0x2f5276[_0x5b2935(0x172)]in _0x419b34,_0x71388c=_0x419b34?.['startPath'],_0x156c64=!(_0x48ec11&&_0x71388c===null);return _0x2f5276[_0x5b2935(0x17b)](firstDefined,_0x3d9096[_0x5b2935(0x163)],_0x3d9096['envStartPath'],typeof _0x71388c==='string'?_0x71388c:undefined,_0x156c64?_0x3d9096[_0x5b2935(0x15f)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x5acf0c,_0x1c4431){const _0x19bd56=_0x54d3,_0x5b23d0={'MWGlL':function(_0x3080ab,_0x25662f){return _0x3080ab+_0x25662f;}};if(!_0x5acf0c)return undefined;if(!_0x1c4431)return _0x5acf0c;const _0x124a7c=_0x5acf0c[_0x19bd56(0x169)]('/')?_0x5acf0c['slice'](0x0,-0x1):_0x5acf0c,_0x4dd58f=_0x1c4431[_0x19bd56(0x17a)]('/')?_0x1c4431:_0x5b23d0['MWGlL']('/',_0x1c4431);return _0x124a7c+_0x4dd58f;}export function resolveProfileUrl(_0x4685d0){const _0x7e7ca0={'PZfTW':function(_0x50d137,_0x2b2035){return _0x50d137(_0x2b2035);},'kHOoz':function(_0x17f3ed,_0x2bbe11,_0x146213){return _0x17f3ed(_0x2bbe11,_0x146213);}},{baseUrl:_0x124b98,source:_0x42d7b4}=resolveBaseUrlWithSource(_0x4685d0),_0x218c26=_0x7e7ca0['PZfTW'](resolveStartPath,_0x4685d0);return{'baseUrl':_0x124b98,'baseUrlSource':_0x42d7b4,'startPath':_0x218c26,'url':_0x7e7ca0['kHOoz'](joinBaseAndPath,_0x124b98,_0x218c26)};}export function readUrlEnvVars(_0x251e13=process['env']){return{'envBaseUrl':_0x251e13['RANGER_BASE_URL'],'envStartPath':_0x251e13['RANGER_START_PATH']};}
@@ -1 +1 @@
1
- function _0x43cc(){const _0x1cdb5e=['10893410pREdOY','9HJZsLL','589256LJrqKI','5201364RwKLTb','1756192NotWOd','\x20failed\x20(attempt\x20','mIoWN','maxRetries','214193FJndpU','536TCcEDC','855834vTdnQJ','1908YcFaAb','poIjN','5iPuBUk','ms...'];_0x43cc=function(){return _0x1cdb5e;};return _0x43cc();}function _0x1384(_0x6db7d3,_0x236859){_0x6db7d3=_0x6db7d3-0xef;const _0x43cceb=_0x43cc();let _0x1384bd=_0x43cceb[_0x6db7d3];return _0x1384bd;}(function(_0x3411c0,_0x570132){const _0xb08458=_0x1384,_0x36e28f=_0x3411c0();while(!![]){try{const _0x24202a=parseInt(_0xb08458(0xf3))/0x1+parseInt(_0xb08458(0xef))/0x2+parseInt(_0xb08458(0xf6))/0x3*(parseInt(_0xb08458(0xf4))/0x4)+parseInt(_0xb08458(0xf8))/0x5*(-parseInt(_0xb08458(0xf5))/0x6)+parseInt(_0xb08458(0xfd))/0x7+-parseInt(_0xb08458(0xfc))/0x8+parseInt(_0xb08458(0xfb))/0x9*(-parseInt(_0xb08458(0xfa))/0xa);if(_0x24202a===_0x570132)break;else _0x36e28f['push'](_0x36e28f['shift']());}catch(_0x2cfc3e){_0x36e28f['push'](_0x36e28f['shift']());}}}(_0x43cc,0x96210));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;export async function withRetry(_0x444fe3,_0x210bdc){const _0x51299a=_0x1384,_0x3d004f={'fTNXa':function(_0x1d7a98,_0x34d6c2){return _0x1d7a98<=_0x34d6c2;},'poIjN':function(_0x1bdad8,_0x38ffba){return _0x1bdad8 instanceof _0x38ffba;},'mIoWN':function(_0x22ea6d,_0x32a62f){return _0x22ea6d(_0x32a62f);}},_0x26eb7b=_0x210bdc?.[_0x51299a(0xf2)]??DEFAULT_MAX_RETRIES,_0x38ebb2=_0x210bdc?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x36bc49;for(let _0x1ad806=0x0;_0x3d004f['fTNXa'](_0x1ad806,_0x26eb7b);_0x1ad806++){try{return await _0x444fe3();}catch(_0x5160b9){_0x36bc49=_0x3d004f[_0x51299a(0xf7)](_0x5160b9,Error)?_0x5160b9:new Error(_0x3d004f[_0x51299a(0xf1)](String,_0x5160b9));if(_0x1ad806<_0x26eb7b){const _0x5b3956=_0x38ebb2*Math['pow'](0x2,_0x1ad806);_0x210bdc?.['label']&&console['error'](_0x210bdc['label']+_0x51299a(0xf0)+(_0x1ad806+0x1)+'/'+(_0x26eb7b+0x1)+'),\x20retrying\x20in\x20'+_0x5b3956+_0x51299a(0xf9)),await new Promise(_0x36fed1=>setTimeout(_0x36fed1,_0x5b3956));}}}throw _0x36bc49;}
1
+ (function(_0x153233,_0x1fcc3c){const _0x2c89cf=_0x22e2,_0x59d0b4=_0x153233();while(!![]){try{const _0x5c11eb=parseInt(_0x2c89cf(0x18a))/0x1+parseInt(_0x2c89cf(0x18e))/0x2+-parseInt(_0x2c89cf(0x192))/0x3+-parseInt(_0x2c89cf(0x187))/0x4*(-parseInt(_0x2c89cf(0x18b))/0x5)+parseInt(_0x2c89cf(0x195))/0x6+parseInt(_0x2c89cf(0x18f))/0x7+-parseInt(_0x2c89cf(0x194))/0x8;if(_0x5c11eb===_0x1fcc3c)break;else _0x59d0b4['push'](_0x59d0b4['shift']());}catch(_0x2233f4){_0x59d0b4['push'](_0x59d0b4['shift']());}}}(_0x37e6,0x6922f));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x37e6(){const _0x24de2a=['1950288ilrXwA','SSfSw','1402484PLaGZo','FKnzL','ms...','155504vEObjt','10Sgciqt','baseDelayMs','\x20failed\x20(attempt\x20','563482NSFWEI','2641275cLDOib','KrJpe','pow','921528WuRbAX','label','8824360aQdCNr'];_0x37e6=function(){return _0x24de2a;};return _0x37e6();}function _0x22e2(_0x730e03,_0x32471c){_0x730e03=_0x730e03-0x186;const _0x37e6e3=_0x37e6();let _0x22e24a=_0x37e6e3[_0x730e03];return _0x22e24a;}export async function withRetry(_0x13cd2b,_0x406937){const _0xbee77b=_0x22e2,_0x1ad137={'KrJpe':function(_0x1e200c,_0x27ef76){return _0x1e200c instanceof _0x27ef76;},'SSfSw':function(_0x4c17b1,_0x40c195){return _0x4c17b1(_0x40c195);},'FKnzL':function(_0x371ce8,_0x39eabe){return _0x371ce8+_0x39eabe;}},_0x25a2bf=_0x406937?.['maxRetries']??DEFAULT_MAX_RETRIES,_0xeca81b=_0x406937?.[_0xbee77b(0x18c)]??DEFAULT_BASE_DELAY_MS;let _0x596303;for(let _0x17875a=0x0;_0x17875a<=_0x25a2bf;_0x17875a++){try{return await _0x13cd2b();}catch(_0x38ce35){_0x596303=_0x1ad137[_0xbee77b(0x190)](_0x38ce35,Error)?_0x38ce35:new Error(_0x1ad137[_0xbee77b(0x186)](String,_0x38ce35));if(_0x17875a<_0x25a2bf){const _0x4adfbf=_0xeca81b*Math[_0xbee77b(0x191)](0x2,_0x17875a);_0x406937?.[_0xbee77b(0x193)]&&console['error'](_0x406937[_0xbee77b(0x193)]+_0xbee77b(0x18d)+_0x1ad137[_0xbee77b(0x188)](_0x17875a,0x1)+'/'+(_0x25a2bf+0x1)+'),\x20retrying\x20in\x20'+_0x4adfbf+_0xbee77b(0x189)),await new Promise(_0x8ab750=>setTimeout(_0x8ab750,_0x4adfbf));}}}throw _0x596303;}
@@ -1 +1 @@
1
- (function(_0x225920,_0x1d20a0){const _0x29b442=_0x1358,_0xd81da6=_0x225920();while(!![]){try{const _0x34047d=parseInt(_0x29b442(0x163))/0x1*(-parseInt(_0x29b442(0x15e))/0x2)+-parseInt(_0x29b442(0x15d))/0x3+-parseInt(_0x29b442(0x15c))/0x4*(parseInt(_0x29b442(0x15f))/0x5)+parseInt(_0x29b442(0x161))/0x6+parseInt(_0x29b442(0x160))/0x7*(-parseInt(_0x29b442(0x167))/0x8)+-parseInt(_0x29b442(0x166))/0x9*(-parseInt(_0x29b442(0x168))/0xa)+parseInt(_0x29b442(0x164))/0xb;if(_0x34047d===_0x1d20a0)break;else _0xd81da6['push'](_0xd81da6['shift']());}catch(_0x151842){_0xd81da6['push'](_0xd81da6['shift']());}}}(_0x47d0,0xedafd));function _0x1358(_0x248f48,_0x531a9c){_0x248f48=_0x248f48-0x15c;const _0x47d0f2=_0x47d0();let _0x13583c=_0x47d0f2[_0x248f48];return _0x13583c;}const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;export function extractUrlOrigins(_0x433639){const _0x5cc081=_0x1358,_0x17bc53=new Set();for(const _0x3c1e31 of _0x433639['matchAll'](ABSOLUTE_URL_PATTERN)){const _0x571571=_0x3c1e31[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x17bc53[_0x5cc081(0x162)](new URL(_0x571571)[_0x5cc081(0x165)]);}catch{}}return[..._0x17bc53];}function _0x47d0(){const _0x2af39b=['3550308AdcIcT','2AdywAX','125185oKbPRs','1596KLftkA','2512122kxKAdY','add','1322373GNwrnq','24850661qeJBGH','origin','54meocYb','2584mHvdyH','3044310rJubYH','152eHmIHn'];_0x47d0=function(){return _0x2af39b;};return _0x47d0();}export function findScenarioOriginMismatches(_0x54ed31,_0x3b56cf){const _0x125a82=_0x1358;let _0x3eb466;try{_0x3eb466=new URL(_0x3b56cf)[_0x125a82(0x165)];}catch{return[];}return extractUrlOrigins(_0x54ed31)['filter'](_0x5101e8=>_0x5101e8!==_0x3eb466);}
1
+ (function(_0x32c6dc,_0x139f07){const _0x19fdc1=_0x2a97,_0x2047fb=_0x32c6dc();while(!![]){try{const _0x17a02c=parseInt(_0x19fdc1(0x88))/0x1+-parseInt(_0x19fdc1(0x8b))/0x2+parseInt(_0x19fdc1(0x8c))/0x3+parseInt(_0x19fdc1(0x87))/0x4*(parseInt(_0x19fdc1(0x8d))/0x5)+-parseInt(_0x19fdc1(0x8e))/0x6*(-parseInt(_0x19fdc1(0x8f))/0x7)+parseInt(_0x19fdc1(0x91))/0x8*(parseInt(_0x19fdc1(0x92))/0x9)+parseInt(_0x19fdc1(0x8a))/0xa*(-parseInt(_0x19fdc1(0x90))/0xb);if(_0x17a02c===_0x139f07)break;else _0x2047fb['push'](_0x2047fb['shift']());}catch(_0x40c6a8){_0x2047fb['push'](_0x2047fb['shift']());}}}(_0x4ef0,0xc0a1a));const ABSOLUTE_URL_PATTERN=/https?:\/\/[^\s"'<>()\[\]]+/gi;function _0x2a97(_0x4bddc3,_0x80dfa6){_0x4bddc3=_0x4bddc3-0x87;const _0x4ef082=_0x4ef0();let _0x2a9713=_0x4ef082[_0x4bddc3];return _0x2a9713;}export function extractUrlOrigins(_0x2e8561){const _0x455a93=_0x2a97,_0x15cc87=new Set();for(const _0x1d3592 of _0x2e8561['matchAll'](ABSOLUTE_URL_PATTERN)){const _0x21eb0e=_0x1d3592[0x0]['replace'](/[.,;:!?]+$/,'');try{_0x15cc87['add'](new URL(_0x21eb0e)[_0x455a93(0x89)]);}catch{}}return[..._0x15cc87];}export function findScenarioOriginMismatches(_0x19c254,_0x3e4ec3){const _0x5ae48a=_0x2a97,_0x5cac7c={'eaLhp':function(_0x1ca737,_0x556edb){return _0x1ca737(_0x556edb);}};let _0x54d723;try{_0x54d723=new URL(_0x3e4ec3)[_0x5ae48a(0x89)];}catch{return[];}return _0x5cac7c['eaLhp'](extractUrlOrigins,_0x19c254)['filter'](_0x3ef3df=>_0x3ef3df!==_0x54d723);}function _0x4ef0(){const _0x259af3=['154IDmlOQ','6282232DDIhAO','9gevBAa','4137124bsvjhK','512213OYDigz','origin','2940560UmTEWi','111374YpfnGW','3559449bwmTpl','5IJZlZj','787218xtFpZU','77jxRZNz'];_0x4ef0=function(){return _0x259af3;};return _0x4ef0();}
@@ -1 +1 @@
1
- function _0x3b30(){const _0x2526e6=['MtAeF','36WVfnHd','2otAOCk','JFXiu','JCzqe','utf-8','enabled','existsSync','ZhfRx','tjgrq','1356UXcPMC','knZxI','SXoRH','mszHs','7nuTuGm','tnWaO','branches','qMgZl','AhnmF','currentBranch','git\x20rev-parse\x20--abbrev-ref\x20HEAD','lastEnabledSessionClearedAt','1524mhdPuZ','qWKtw','2180712YLFral','izPUz','746559cMlQNp','featureId','trim','lBWap','IOJbj','prompted','47911dWQNwi','toISOString','422160QyWpEa','registeredAt','Pcbbm','homedir','iqqcs','pipe','mkdirSync','iviSB','311670fthCGQ','MrODP','sFMmc','rqpeE','IiuOn','main','readFileSync','sessions','6EXStwE','1232913ALklYF','teUmr','YtKTz','nquFU','uGGHb','.ranger_cache.json','lastPlanReminderAt','now','lastStopReminderAt'];_0x3b30=function(){return _0x2526e6;};return _0x3b30();}const _0x53a591=_0x4be0;(function(_0x113d46,_0x393532){const _0x47a54c=_0x4be0,_0x4af3c2=_0x113d46();while(!![]){try{const _0x49a947=-parseInt(_0x47a54c(0x1d2))/0x1*(-parseInt(_0x47a54c(0x1b4))/0x2)+-parseInt(_0x47a54c(0x1bc))/0x3*(parseInt(_0x47a54c(0x1c8))/0x4)+-parseInt(_0x47a54c(0x1d4))/0x5*(-parseInt(_0x47a54c(0x1e4))/0x6)+-parseInt(_0x47a54c(0x1c0))/0x7*(parseInt(_0x47a54c(0x1ca))/0x8)+parseInt(_0x47a54c(0x1cc))/0x9+parseInt(_0x47a54c(0x1dc))/0xa+parseInt(_0x47a54c(0x1e5))/0xb*(parseInt(_0x47a54c(0x1ef))/0xc);if(_0x49a947===_0x393532)break;else _0x4af3c2['push'](_0x4af3c2['shift']());}catch(_0x2724c5){_0x4af3c2['push'](_0x4af3c2['shift']());}}}(_0x3b30,0x21ab5));import*as _0x6b9ccb from'fs';import*as _0x3c94c7 from'path';import*as _0x4f9733 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x3c94c7['join'](_0x4f9733[_0x53a591(0x1d7)](),'.claude',_0x53a591(0x1ea));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x556466=_0x53a591,_0x30ed74={'YtKTz':'utf-8','JVouP':function(_0x1c4d28){return _0x1c4d28();}};try{if(_0x6b9ccb['existsSync'](CACHE_FILE)){const _0x1ce740=JSON['parse'](_0x6b9ccb[_0x556466(0x1e2)](CACHE_FILE,_0x30ed74[_0x556466(0x1e7)]));return{'version':0x3,'sessions':_0x1ce740[_0x556466(0x1e3)]||{},'branches':_0x1ce740['branches']||{},'lastEnabledSessionClearedAt':_0x1ce740[_0x556466(0x1c7)]};}}catch{}return _0x30ed74['JVouP'](createEmptyCache);}function saveCache(_0x148872){const _0x3f1805=_0x53a591;try{const _0x47e7ca=_0x3c94c7['dirname'](CACHE_FILE);!_0x6b9ccb[_0x3f1805(0x1b9)](_0x47e7ca)&&_0x6b9ccb[_0x3f1805(0x1da)](_0x47e7ca,{'recursive':!![]}),_0x6b9ccb['writeFileSync'](CACHE_FILE,JSON['stringify'](_0x148872,null,0x2));}catch{}}export function getCurrentBranch(){const _0x19c18c=_0x53a591,_0xdbafe0={'epQvW':_0x19c18c(0x1c6),'AhnmF':'pipe','Pcbbm':function(_0x4cc596,_0x308b30){return _0x4cc596===_0x308b30;}};try{const _0x2b7722=execSync(_0xdbafe0['epQvW'],{'encoding':_0x19c18c(0x1b7),'stdio':[_0x19c18c(0x1d9),_0xdbafe0[_0x19c18c(0x1c4)],_0xdbafe0[_0x19c18c(0x1c4)]]})[_0x19c18c(0x1ce)]();if(!_0x2b7722||_0xdbafe0[_0x19c18c(0x1d6)](_0x2b7722,'HEAD'))return null;return _0x2b7722;}catch{return null;}}export function enableBranch(_0x2e2b00){const _0x5ca090=_0x53a591,_0x192c39={'qWKtw':function(_0x2bd248){return _0x2bd248();},'qHyrg':function(_0x129045,_0x7bedfa){return _0x129045(_0x7bedfa);}},_0x17959e=_0x192c39[_0x5ca090(0x1c9)](loadCache);_0x17959e['branches'][_0x2e2b00]=!![],_0x192c39['qHyrg'](saveCache,_0x17959e);}export function disableBranch(_0x10b5b5){const _0xb238b8=_0x53a591,_0x4dbb33=loadCache();delete _0x4dbb33[_0xb238b8(0x1c2)][_0x10b5b5],saveCache(_0x4dbb33);}export function isBranchEnabled(_0x2b0ea9){const _0xfd011f=_0x53a591,_0x1fcdf5={'uGGHb':function(_0x341685){return _0x341685();},'JFXiu':function(_0x6d5822,_0x12ec2b){return _0x6d5822===_0x12ec2b;}},_0x2e9c93=_0x1fcdf5[_0xfd011f(0x1e9)](loadCache);return _0x1fcdf5[_0xfd011f(0x1b5)](_0x2e9c93['branches'][_0x2b0ea9],!![]);}function getOrCreateSession(_0x5c6108,_0x425e14){const _0x4849de=_0x53a591;return!_0x5c6108[_0x4849de(0x1e3)][_0x425e14]&&(_0x5c6108[_0x4849de(0x1e3)][_0x425e14]={}),_0x5c6108['sessions'][_0x425e14];}export function enableSession(_0x2dfbf0){const _0xa4d94d=_0x53a591,_0x2a8537={'qWObk':function(_0x572fa4){return _0x572fa4();},'PckTk':function(_0x33ddc8,_0x32cd04,_0x4f2308){return _0x33ddc8(_0x32cd04,_0x4f2308);}},_0x13955e=_0x2a8537['qWObk'](loadCache),_0x35c066=_0x2a8537['PckTk'](getOrCreateSession,_0x13955e,_0x2dfbf0);_0x35c066['enabled']=!![];const _0x27b33d=getCurrentBranch();_0x27b33d&&_0x27b33d!==_0xa4d94d(0x1e1)&&_0x27b33d!=='master'&&(_0x13955e['branches'][_0x27b33d]=!![],_0x35c066['currentBranch']=_0x27b33d),saveCache(_0x13955e);}export function isSessionEnabled(_0x4330f1){const _0x91c3ee=_0x53a591,_0x8c9010={'ZhfRx':function(_0x53806e){return _0x53806e();},'tnWaO':'main','rqpeE':'master','XZfPm':function(_0x3e85bc,_0x5b4f08){return _0x3e85bc===_0x5b4f08;},'tjgrq':function(_0x7f8058,_0x350a3a){return _0x7f8058||_0x350a3a;}},_0x5188f4=_0x8c9010[_0x91c3ee(0x1ba)](loadCache),_0x13105a=_0x8c9010[_0x91c3ee(0x1ba)](getCurrentBranch);if(!_0x13105a||_0x13105a===_0x8c9010[_0x91c3ee(0x1c1)]||_0x13105a===_0x8c9010[_0x91c3ee(0x1df)])return _0x8c9010['XZfPm'](_0x5188f4['sessions'][_0x4330f1]?.[_0x91c3ee(0x1b8)],!![]);const _0x2657eb=_0x5188f4[_0x91c3ee(0x1c2)][_0x13105a]===!![],_0x84e375=_0x5188f4['sessions'][_0x4330f1]?.['enabled']===!![];return _0x8c9010[_0x91c3ee(0x1bb)](_0x2657eb,_0x84e375);}function _0x4be0(_0x127400,_0x109ba4){_0x127400=_0x127400-0x1b4;const _0x3b30de=_0x3b30();let _0x4be053=_0x3b30de[_0x127400];return _0x4be053;}export function disableSession(_0x53227f){const _0xcf6045=_0x53a591,_0x3af768={'FpoXE':function(_0x5de32a,_0x573e01,_0x3a519e){return _0x5de32a(_0x573e01,_0x3a519e);}},_0x14a0f1=loadCache(),_0x593609=_0x3af768['FpoXE'](getOrCreateSession,_0x14a0f1,_0x53227f);_0x593609[_0xcf6045(0x1b8)]=![],saveCache(_0x14a0f1);}export function updateBranchTracking(_0x39b8e3){const _0x25c030=_0x53a591,_0x1aba44={'gAeFw':function(_0x5212ac){return _0x5212ac();},'ZjUDl':'main','Uwkwa':function(_0x50810f,_0x410028){return _0x50810f===_0x410028;},'gDkFd':function(_0x2b6d6d,_0x5779d7){return _0x2b6d6d(_0x5779d7);}},_0x4cbb65=_0x1aba44['gAeFw'](loadCache),_0x470be3=_0x4cbb65['sessions'][_0x39b8e3];if(!_0x470be3?.[_0x25c030(0x1b8)])return;const _0x106aaa=_0x1aba44['gAeFw'](getCurrentBranch);if(!_0x106aaa||_0x106aaa===_0x1aba44['ZjUDl']||_0x1aba44['Uwkwa'](_0x106aaa,'master'))return;_0x470be3[_0x25c030(0x1c5)]!==_0x106aaa&&(_0x4cbb65['branches'][_0x106aaa]=!![],_0x470be3[_0x25c030(0x1c5)]=_0x106aaa,_0x1aba44['gDkFd'](saveCache,_0x4cbb65));}export function initBranchTracking(_0x38ab81){const _0xf07e9e=_0x53a591,_0x55d638={'VBxBm':function(_0x14dae2){return _0x14dae2();},'iviSB':function(_0x198ed2,_0x3fe67c){return _0x198ed2===_0x3fe67c;},'knZxI':_0xf07e9e(0x1e1),'YvBul':'master','izPUz':function(_0x5424c5,_0x1580b2){return _0x5424c5===_0x1580b2;},'sFMmc':function(_0x5ef881,_0x511210,_0x24b1f5){return _0x5ef881(_0x511210,_0x24b1f5);}},_0x1d6e69=loadCache(),_0x4bf197=_0x55d638['VBxBm'](getCurrentBranch);if(!_0x4bf197||_0x55d638[_0xf07e9e(0x1db)](_0x4bf197,_0x55d638[_0xf07e9e(0x1bd)])||_0x55d638['iviSB'](_0x4bf197,_0x55d638['YvBul']))return;if(_0x55d638[_0xf07e9e(0x1cb)](_0x1d6e69['branches'][_0x4bf197],!![])){const _0x2beefc=_0x55d638[_0xf07e9e(0x1de)](getOrCreateSession,_0x1d6e69,_0x38ab81);_0x2beefc[_0xf07e9e(0x1b8)]=!![],_0x2beefc[_0xf07e9e(0x1c5)]=_0x4bf197,saveCache(_0x1d6e69);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x184af2){const _0x96d2de=_0x53a591,_0x143ba6={'gmSkt':function(_0x531e29){return _0x531e29();},'iqqcs':function(_0x2fb7fc,_0x2da55d){return _0x2fb7fc(_0x2da55d);}},_0x821ab8=_0x143ba6['gmSkt'](loadCache),_0x2a2c31=_0x821ab8['sessions'][_0x184af2];_0x2a2c31?.['enabled']&&(_0x821ab8['lastEnabledSessionClearedAt']=Date['now'](),_0x143ba6[_0x96d2de(0x1d8)](saveCache,_0x821ab8));}export function shouldAutoEnableAfterClear(_0x37f925){const _0x1dfacc=_0x53a591,_0x44a38c={'mszHs':function(_0x72bf89,_0x35e5b9){return _0x72bf89!==_0x35e5b9;},'lBWap':'clear'};if(_0x44a38c[_0x1dfacc(0x1bf)](_0x37f925,_0x44a38c[_0x1dfacc(0x1cf)]))return![];const _0x1d4f7c=loadCache(),_0x19e42f=_0x1d4f7c['lastEnabledSessionClearedAt'];if(!_0x19e42f)return![];const _0x4f8343=Date[_0x1dfacc(0x1ec)]()-_0x19e42f;return _0x4f8343<=CLEAR_AUTO_ENABLE_WINDOW_MS;}export function autoEnableAfterClear(_0x166f30){const _0x2384f1=_0x53a591,_0x34dc62={'AwIRc':function(_0x462ab6){return _0x462ab6();},'JCzqe':function(_0x2178ba){return _0x2178ba();},'kNgCo':function(_0x4c23ec,_0x4ff618){return _0x4c23ec!==_0x4ff618;},'teUmr':'master'},_0x455bb4=_0x34dc62['AwIRc'](loadCache),_0xebd78d=getOrCreateSession(_0x455bb4,_0x166f30);_0xebd78d['enabled']=!![];const _0x1dbc76=_0x34dc62[_0x2384f1(0x1b6)](getCurrentBranch);_0x1dbc76&&_0x34dc62['kNgCo'](_0x1dbc76,'main')&&_0x1dbc76!==_0x34dc62[_0x2384f1(0x1e6)]&&(_0xebd78d[_0x2384f1(0x1c5)]=_0x1dbc76),delete _0x455bb4['lastEnabledSessionClearedAt'],saveCache(_0x455bb4);}export function registerSession(_0x1a86ea,_0x418f62){const _0x293b58=_0x53a591,_0x3e88a9={'CxHMC':function(_0x43b73c){return _0x43b73c();},'kUUKW':function(_0x170db8,_0xb617f3){return _0x170db8(_0xb617f3);}},_0x33596b=_0x3e88a9['CxHMC'](loadCache),_0x18c202=getOrCreateSession(_0x33596b,_0x1a86ea);_0x18c202['featureId']=_0x418f62,_0x18c202['registeredAt']=new Date()[_0x293b58(0x1d3)](),_0x3e88a9['kUUKW'](saveCache,_0x33596b);}export function getSessionEntry(_0x17cc35){const _0x2ff935=_0x53a591,_0x2a5c35=loadCache(),_0x1cb5b9=_0x2a5c35[_0x2ff935(0x1e3)][_0x17cc35];if(_0x1cb5b9?.[_0x2ff935(0x1cd)]&&_0x1cb5b9?.[_0x2ff935(0x1d5)])return{'featureId':_0x1cb5b9[_0x2ff935(0x1cd)],'registeredAt':_0x1cb5b9[_0x2ff935(0x1d5)]};return null;}export function unregisterSession(_0x4eb86d){const _0x1dd83c=_0x53a591,_0x464038={'IiuOn':function(_0x29b1d4,_0x1992f3){return _0x29b1d4(_0x1992f3);}},_0x471662=loadCache(),_0x2bbd8e=_0x471662[_0x1dd83c(0x1e3)][_0x4eb86d];_0x2bbd8e&&(delete _0x2bbd8e[_0x1dd83c(0x1cd)],delete _0x2bbd8e[_0x1dd83c(0x1d5)],_0x464038[_0x1dd83c(0x1e0)](saveCache,_0x471662));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x4fbf1c){const _0x3d7ffd=_0x53a591,_0x36b335={'SXoRH':function(_0x44cc53,_0x37489b,_0x6d778c){return _0x44cc53(_0x37489b,_0x6d778c);},'MrODP':function(_0x4359dd,_0x21616d){return _0x4359dd-_0x21616d;},'qMgZl':function(_0x17e046,_0x3ad50b){return _0x17e046(_0x3ad50b);}},_0x9957fe=loadCache(),_0x374e95=_0x36b335[_0x3d7ffd(0x1be)](getOrCreateSession,_0x9957fe,_0x4fbf1c),_0x110a8e=_0x374e95['lastPlanReminderAt']||0x0,_0x338029=Date['now']();if(_0x36b335[_0x3d7ffd(0x1dd)](_0x338029,_0x110a8e)>=PLAN_REMINDER_INTERVAL_MS)return _0x374e95[_0x3d7ffd(0x1eb)]=_0x338029,_0x36b335[_0x3d7ffd(0x1c3)](saveCache,_0x9957fe),!![];return![];}export function shouldShowStopReminder(_0x1ed93e){const _0x2a7ab3=_0x53a591,_0x56932c={'IOJbj':function(_0x311f02,_0x3513fc,_0x279734){return _0x311f02(_0x3513fc,_0x279734);},'Tlxhp':function(_0x82fedc,_0x3d2859){return _0x82fedc>=_0x3d2859;},'MtAeF':function(_0x39c9ec,_0x23b581){return _0x39c9ec-_0x23b581;},'VmRLd':function(_0x32fad1,_0x5d09d7){return _0x32fad1(_0x5d09d7);}},_0x11e1da=loadCache(),_0xcf4cf8=_0x56932c[_0x2a7ab3(0x1d0)](getOrCreateSession,_0x11e1da,_0x1ed93e),_0x8ef11d=_0xcf4cf8[_0x2a7ab3(0x1ed)]||0x0,_0x2aae6a=Date['now']();if(_0x56932c['Tlxhp'](_0x56932c[_0x2a7ab3(0x1ee)](_0x2aae6a,_0x8ef11d),STOP_REMINDER_INTERVAL_MS))return _0xcf4cf8[_0x2a7ab3(0x1ed)]=_0x2aae6a,_0x56932c['VmRLd'](saveCache,_0x11e1da),!![];return![];}export function hasSessionBeenPrompted(_0x489569){const _0x2af40a=_0x53a591,_0x43aef2={'bpBzl':function(_0x50c35a,_0x3729ef){return _0x50c35a===_0x3729ef;}},_0x39a008=loadCache();return _0x43aef2['bpBzl'](_0x39a008[_0x2af40a(0x1e3)][_0x489569]?.[_0x2af40a(0x1d1)],!![]);}export function markSessionPrompted(_0xe5a503){const _0x3a8b15=_0x53a591,_0x137d6b={'nquFU':function(_0x3e6d36){return _0x3e6d36();}},_0x2605d8=_0x137d6b[_0x3a8b15(0x1e8)](loadCache),_0x40072f=getOrCreateSession(_0x2605d8,_0xe5a503);_0x40072f[_0x3a8b15(0x1d1)]=!![],saveCache(_0x2605d8);}export function getCacheFile(){return CACHE_FILE;}
1
+ const _0x43e164=_0x303e;(function(_0x4ff1a9,_0x3c9400){const _0x8f43c7=_0x303e,_0x28e713=_0x4ff1a9();while(!![]){try{const _0xfb866e=-parseInt(_0x8f43c7(0x173))/0x1*(-parseInt(_0x8f43c7(0x146))/0x2)+-parseInt(_0x8f43c7(0x176))/0x3*(-parseInt(_0x8f43c7(0x164))/0x4)+-parseInt(_0x8f43c7(0x167))/0x5+parseInt(_0x8f43c7(0x15f))/0x6+-parseInt(_0x8f43c7(0x168))/0x7+-parseInt(_0x8f43c7(0x16f))/0x8+parseInt(_0x8f43c7(0x15a))/0x9;if(_0xfb866e===_0x3c9400)break;else _0x28e713['push'](_0x28e713['shift']());}catch(_0x38a58c){_0x28e713['push'](_0x28e713['shift']());}}}(_0x520a,0xea9e0));import*as _0x4fe0ff from'fs';function _0x520a(){const _0x2835ef=['prompted','99729ffouwS','toISOString','8xCLwyJ','iMzIA','writeFileSync','featureId','CyVzC','qugVQ','dShUH','homedir','YveKY','StVdK','lastStopReminderAt','clear','kMXOu','dhVIR','mkdirSync','fdDOT','SEWRp','IxoDT','now','enabled','6515388lxfjHE','master','nObmV','HEAD','TrMZh','5347278ZLAxVJ','HtPtp','lastPlanReminderAt','stringify','existsSync','52ikfegb','main','VsZQy','4998370IebdMQ','1599080IFvfaq','branches','uvUHr','currentBranch','SfKIw','KxlWT','DqTyG','667952yWJeYH','sessions','CSTJG','registeredAt','56324iXoNOh','rPflq'];_0x520a=function(){return _0x2835ef;};return _0x520a();}import*as _0x235dec from'path';import*as _0x2919f0 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x235dec['join'](_0x2919f0[_0x43e164(0x14d)](),'.claude','.ranger_cache.json');function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x5541cd=_0x43e164,_0x21a6fd={'SEWRp':'utf-8'};try{if(_0x4fe0ff[_0x5541cd(0x163)](CACHE_FILE)){const _0x5829d1=JSON['parse'](_0x4fe0ff['readFileSync'](CACHE_FILE,_0x21a6fd[_0x5541cd(0x156)]));return{'version':0x3,'sessions':_0x5829d1['sessions']||{},'branches':_0x5829d1['branches']||{},'lastEnabledSessionClearedAt':_0x5829d1['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x2d39df){const _0xb21d4=_0x43e164;try{const _0x3366c1=_0x235dec['dirname'](CACHE_FILE);!_0x4fe0ff[_0xb21d4(0x163)](_0x3366c1)&&_0x4fe0ff[_0xb21d4(0x154)](_0x3366c1,{'recursive':!![]}),_0x4fe0ff[_0xb21d4(0x148)](CACHE_FILE,JSON[_0xb21d4(0x162)](_0x2d39df,null,0x2));}catch{}}export function getCurrentBranch(){const _0x2494e2=_0x43e164,_0x437553={'IxoDT':function(_0x2ac004,_0x556910,_0x1f6060){return _0x2ac004(_0x556910,_0x1f6060);},'SfKIw':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','VsZQy':'utf-8','EPKaq':'pipe'};try{const _0x68e3c=_0x437553[_0x2494e2(0x157)](execSync,_0x437553[_0x2494e2(0x16c)],{'encoding':_0x437553[_0x2494e2(0x166)],'stdio':[_0x437553['EPKaq'],'pipe','pipe']})['trim']();if(!_0x68e3c||_0x68e3c===_0x2494e2(0x15d))return null;return _0x68e3c;}catch{return null;}}export function enableBranch(_0x493c04){const _0x26966b=_0x43e164,_0x74a007={'HtPtp':function(_0xf57c6c){return _0xf57c6c();}},_0x674659=_0x74a007[_0x26966b(0x160)](loadCache);_0x674659['branches'][_0x493c04]=!![],saveCache(_0x674659);}export function disableBranch(_0x541f70){const _0x1b4300=_0x43e164,_0x3d0bba=loadCache();delete _0x3d0bba[_0x1b4300(0x169)][_0x541f70],saveCache(_0x3d0bba);}export function isBranchEnabled(_0x555229){const _0x31a22e=_0x43e164,_0x2d10ef={'TrMZh':function(_0x2cef99){return _0x2cef99();},'HQGae':function(_0x33ea02,_0x5481e8){return _0x33ea02===_0x5481e8;}},_0xb380ae=_0x2d10ef[_0x31a22e(0x15e)](loadCache);return _0x2d10ef['HQGae'](_0xb380ae[_0x31a22e(0x169)][_0x555229],!![]);}function getOrCreateSession(_0x2eb182,_0x352ad8){const _0x5edaa=_0x43e164;return!_0x2eb182[_0x5edaa(0x170)][_0x352ad8]&&(_0x2eb182[_0x5edaa(0x170)][_0x352ad8]={}),_0x2eb182[_0x5edaa(0x170)][_0x352ad8];}export function enableSession(_0x464fdf){const _0x1d4492=_0x43e164,_0x20605c={'CyVzC':function(_0x39a643){return _0x39a643();},'NWnrk':function(_0x58c46d,_0x5e8517){return _0x58c46d!==_0x5e8517;},'ktwXv':'main','zdbqs':_0x1d4492(0x15b)},_0x5af54e=_0x20605c[_0x1d4492(0x14a)](loadCache),_0x3e914f=getOrCreateSession(_0x5af54e,_0x464fdf);_0x3e914f[_0x1d4492(0x159)]=!![];const _0x28c909=_0x20605c[_0x1d4492(0x14a)](getCurrentBranch);_0x28c909&&_0x20605c['NWnrk'](_0x28c909,_0x20605c['ktwXv'])&&_0x28c909!==_0x20605c['zdbqs']&&(_0x5af54e[_0x1d4492(0x169)][_0x28c909]=!![],_0x3e914f[_0x1d4492(0x16b)]=_0x28c909),saveCache(_0x5af54e);}export function isSessionEnabled(_0x2a23aa){const _0x42eda9=_0x43e164,_0x5f3f30={'BzefS':function(_0x41ee0b){return _0x41ee0b();},'StVdK':function(_0x4a8ab2,_0x51fb45){return _0x4a8ab2===_0x51fb45;},'dSmZG':'main','KxlWT':_0x42eda9(0x15b),'YveKY':function(_0x5cc75c,_0x1570d3){return _0x5cc75c||_0x1570d3;}},_0x21ae89=loadCache(),_0x2200b5=_0x5f3f30['BzefS'](getCurrentBranch);if(!_0x2200b5||_0x5f3f30['StVdK'](_0x2200b5,_0x5f3f30['dSmZG'])||_0x2200b5===_0x5f3f30[_0x42eda9(0x16d)])return _0x21ae89[_0x42eda9(0x170)][_0x2a23aa]?.['enabled']===!![];const _0x3b45f4=_0x5f3f30[_0x42eda9(0x14f)](_0x21ae89['branches'][_0x2200b5],!![]),_0x130d59=_0x21ae89[_0x42eda9(0x170)][_0x2a23aa]?.[_0x42eda9(0x159)]===!![];return _0x5f3f30[_0x42eda9(0x14e)](_0x3b45f4,_0x130d59);}export function disableSession(_0x38a2f0){const _0x565ea5={'ALqGE':function(_0x22695a){return _0x22695a();}},_0x29af2e=_0x565ea5['ALqGE'](loadCache),_0x41f968=getOrCreateSession(_0x29af2e,_0x38a2f0);_0x41f968['enabled']=![],saveCache(_0x29af2e);}export function updateBranchTracking(_0x3899cc){const _0x2b6d24=_0x43e164,_0x319402={'uNMyH':function(_0x8b423b){return _0x8b423b();},'Wejdi':function(_0x5cf2b2,_0x3b8a4b){return _0x5cf2b2===_0x3b8a4b;},'HZMuM':'master','dhVIR':function(_0xbeaaba,_0x11669d){return _0xbeaaba(_0x11669d);}},_0x128506=_0x319402['uNMyH'](loadCache),_0x366dae=_0x128506['sessions'][_0x3899cc];if(!_0x366dae?.['enabled'])return;const _0x21b314=getCurrentBranch();if(!_0x21b314||_0x319402['Wejdi'](_0x21b314,_0x2b6d24(0x165))||_0x21b314===_0x319402['HZMuM'])return;_0x366dae[_0x2b6d24(0x16b)]!==_0x21b314&&(_0x128506['branches'][_0x21b314]=!![],_0x366dae['currentBranch']=_0x21b314,_0x319402[_0x2b6d24(0x153)](saveCache,_0x128506));}export function initBranchTracking(_0x3f95b1){const _0x3b76b8=_0x43e164,_0x48de32={'UdpBo':function(_0x747c95){return _0x747c95();},'kMXOu':'main','CSTJG':function(_0x1bf18a,_0x3c5989){return _0x1bf18a===_0x3c5989;},'iMzIA':_0x3b76b8(0x15b),'GHbdo':function(_0x456923,_0x423ce9){return _0x456923(_0x423ce9);}},_0x1a8075=_0x48de32['UdpBo'](loadCache),_0x2b9a8a=getCurrentBranch();if(!_0x2b9a8a||_0x2b9a8a===_0x48de32[_0x3b76b8(0x152)]||_0x48de32[_0x3b76b8(0x171)](_0x2b9a8a,_0x48de32[_0x3b76b8(0x147)]))return;if(_0x1a8075['branches'][_0x2b9a8a]===!![]){const _0x2b1fc7=getOrCreateSession(_0x1a8075,_0x3f95b1);_0x2b1fc7[_0x3b76b8(0x159)]=!![],_0x2b1fc7['currentBranch']=_0x2b9a8a,_0x48de32['GHbdo'](saveCache,_0x1a8075);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x5cad6e){const _0x35160b=_0x43e164,_0x29c9f4=loadCache(),_0x315aa1=_0x29c9f4[_0x35160b(0x170)][_0x5cad6e];_0x315aa1?.['enabled']&&(_0x29c9f4['lastEnabledSessionClearedAt']=Date['now'](),saveCache(_0x29c9f4));}export function shouldAutoEnableAfterClear(_0x4d3af5){const _0x260e4f=_0x43e164,_0x9a7500={'DhHcW':function(_0x3c1297){return _0x3c1297();},'qugVQ':function(_0x270f79,_0x221e8d){return _0x270f79-_0x221e8d;},'nObmV':function(_0x2f6e20,_0x839f8a){return _0x2f6e20<=_0x839f8a;}};if(_0x4d3af5!==_0x260e4f(0x151))return![];const _0x71a379=_0x9a7500['DhHcW'](loadCache),_0x45be31=_0x71a379['lastEnabledSessionClearedAt'];if(!_0x45be31)return![];const _0x32cffc=_0x9a7500[_0x260e4f(0x14b)](Date['now'](),_0x45be31);return _0x9a7500[_0x260e4f(0x15c)](_0x32cffc,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x31315c){const _0x9da7e=_0x43e164,_0x1295b2={'dShUH':function(_0x94cb5e,_0x1e60dc,_0x2ebb58){return _0x94cb5e(_0x1e60dc,_0x2ebb58);},'gwoGP':function(_0x2ab456,_0x1fac22){return _0x2ab456!==_0x1fac22;},'fdDOT':function(_0x8a686d,_0x1cbda4){return _0x8a686d!==_0x1cbda4;}},_0x3bdf56=loadCache(),_0xa01579=_0x1295b2[_0x9da7e(0x14c)](getOrCreateSession,_0x3bdf56,_0x31315c);_0xa01579[_0x9da7e(0x159)]=!![];const _0x47250e=getCurrentBranch();_0x47250e&&_0x1295b2['gwoGP'](_0x47250e,_0x9da7e(0x165))&&_0x1295b2[_0x9da7e(0x155)](_0x47250e,_0x9da7e(0x15b))&&(_0xa01579[_0x9da7e(0x16b)]=_0x47250e),delete _0x3bdf56['lastEnabledSessionClearedAt'],saveCache(_0x3bdf56);}export function registerSession(_0x553026,_0x2bef30){const _0x3180f3=_0x43e164,_0x45d239={'uvUHr':function(_0x23e1bc){return _0x23e1bc();}},_0x5b8c70=_0x45d239[_0x3180f3(0x16a)](loadCache),_0x300ad6=getOrCreateSession(_0x5b8c70,_0x553026);_0x300ad6[_0x3180f3(0x149)]=_0x2bef30,_0x300ad6['registeredAt']=new Date()[_0x3180f3(0x145)](),saveCache(_0x5b8c70);}export function getSessionEntry(_0x36e777){const _0x1d0ffe=_0x43e164,_0x6ec80b=loadCache(),_0x3ed321=_0x6ec80b[_0x1d0ffe(0x170)][_0x36e777];if(_0x3ed321?.['featureId']&&_0x3ed321?.['registeredAt'])return{'featureId':_0x3ed321[_0x1d0ffe(0x149)],'registeredAt':_0x3ed321[_0x1d0ffe(0x172)]};return null;}export function unregisterSession(_0x2fbf49){const _0x2bd1dd=_0x43e164,_0x8a05c0={'DqTyG':function(_0x368a13){return _0x368a13();}},_0x465364=_0x8a05c0[_0x2bd1dd(0x16e)](loadCache),_0xad0993=_0x465364[_0x2bd1dd(0x170)][_0x2fbf49];_0xad0993&&(delete _0xad0993['featureId'],delete _0xad0993[_0x2bd1dd(0x172)],saveCache(_0x465364));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8,STOP_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x43b8cc){const _0x290123=_0x43e164,_0x40c9c0={'rPflq':function(_0x334c77,_0xf42efb){return _0x334c77>=_0xf42efb;},'Vbmzn':function(_0x3602bd,_0x1fc08f){return _0x3602bd-_0x1fc08f;}},_0x44aa41=loadCache(),_0x19883f=getOrCreateSession(_0x44aa41,_0x43b8cc),_0x2e419e=_0x19883f['lastPlanReminderAt']||0x0,_0x453e3e=Date['now']();if(_0x40c9c0[_0x290123(0x174)](_0x40c9c0['Vbmzn'](_0x453e3e,_0x2e419e),PLAN_REMINDER_INTERVAL_MS))return _0x19883f[_0x290123(0x161)]=_0x453e3e,saveCache(_0x44aa41),!![];return![];}function _0x303e(_0x257b9f,_0x1a9ce2){_0x257b9f=_0x257b9f-0x145;const _0x520ab7=_0x520a();let _0x303e5f=_0x520ab7[_0x257b9f];return _0x303e5f;}export function shouldShowStopReminder(_0x260bd0){const _0x4fc7bf=_0x43e164,_0x40d218={'WwCMI':function(_0x191ec5,_0x158731){return _0x191ec5>=_0x158731;},'wjRNJ':function(_0x3ab63e,_0xf3532b){return _0x3ab63e-_0xf3532b;}},_0x3b0212=loadCache(),_0x597c47=getOrCreateSession(_0x3b0212,_0x260bd0),_0x48fbd1=_0x597c47[_0x4fc7bf(0x150)]||0x0,_0x328429=Date[_0x4fc7bf(0x158)]();if(_0x40d218['WwCMI'](_0x40d218['wjRNJ'](_0x328429,_0x48fbd1),STOP_REMINDER_INTERVAL_MS))return _0x597c47[_0x4fc7bf(0x150)]=_0x328429,saveCache(_0x3b0212),!![];return![];}export function hasSessionBeenPrompted(_0x3eeec4){const _0xad4b7f=_0x43e164,_0x4fd445=loadCache();return _0x4fd445[_0xad4b7f(0x170)][_0x3eeec4]?.[_0xad4b7f(0x175)]===!![];}export function markSessionPrompted(_0x53bbf2){const _0x4012be=_0x43e164,_0x4afa94={'wXGMU':function(_0x3ceeca,_0x349e60,_0x3954b8){return _0x3ceeca(_0x349e60,_0x3954b8);},'cODSe':function(_0x33318f,_0x4d2cbf){return _0x33318f(_0x4d2cbf);}},_0x233f3d=loadCache(),_0x8f2028=_0x4afa94['wXGMU'](getOrCreateSession,_0x233f3d,_0x53bbf2);_0x8f2028[_0x4012be(0x175)]=!![],_0x4afa94['cODSe'](saveCache,_0x233f3d);}export function getCacheFile(){return CACHE_FILE;}
@@ -1 +1 @@
1
- const _0x352746=_0x47e0;(function(_0x296239,_0x1d6b21){const _0x254cab=_0x47e0,_0x38c259=_0x296239();while(!![]){try{const _0x79fbed=parseInt(_0x254cab(0x205))/0x1*(-parseInt(_0x254cab(0x1ce))/0x2)+parseInt(_0x254cab(0x1ee))/0x3+-parseInt(_0x254cab(0x1f0))/0x4+parseInt(_0x254cab(0x218))/0x5*(parseInt(_0x254cab(0x1cc))/0x6)+parseInt(_0x254cab(0x1a9))/0x7*(-parseInt(_0x254cab(0x1b1))/0x8)+-parseInt(_0x254cab(0x1d7))/0x9*(-parseInt(_0x254cab(0x227))/0xa)+-parseInt(_0x254cab(0x20f))/0xb;if(_0x79fbed===_0x1d6b21)break;else _0x38c259['push'](_0x38c259['shift']());}catch(_0x19ee43){_0x38c259['push'](_0x38c259['shift']());}}}(_0x10ef,0xd95ae));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function findEnvInRoot(_0x95553,_0x204981){const _0x22a4ca=_0x47e0,_0x1442d0={'avNXy':function(_0x407fe0,_0x48b092,_0x515a5a,_0x3495b9){return _0x407fe0(_0x48b092,_0x515a5a,_0x3495b9);},'hVyBm':_0x22a4ca(0x1d8),'GgXBW':function(_0x41d01a,_0x236236,_0x5cce5c){return _0x41d01a(_0x236236,_0x5cce5c);},'zpfnT':function(_0x54db65,_0x46c2d8){return _0x54db65(_0x46c2d8);}},_0x3374c5=_0x1442d0[_0x22a4ca(0x1a1)](join,_0x204981,'ci',_0x95553),_0x5d8876=join(_0x204981,_0x1442d0[_0x22a4ca(0x1a2)],_0x95553),_0x44a19e=join(_0x204981,_0x95553),_0x135cbb=_0x1442d0['GgXBW'](join,_0x204981,'local'),_0x47582d=join(_0x204981,'ci');if(_0x1442d0[_0x22a4ca(0x1fa)](existsSync,_0x3374c5))return _0x3374c5;if(existsSync(_0x5d8876))return _0x5d8876;if(existsSync(_0x44a19e)&&(_0x44a19e!==_0x135cbb&&_0x44a19e!==_0x47582d?!![]:hasLegacyProfileFiles(_0x44a19e)))return _0x44a19e;return null;}function _0x47e0(_0x4e02ee,_0x43d109){_0x4e02ee=_0x4e02ee-0x19e;const _0x10efc5=_0x10ef();let _0x47e033=_0x10efc5[_0x4e02ee];return _0x47e033;}export function getEnvDir(_0xb5d464,_0x3a0818={}){const _0x58100d=_0x47e0,_0x283821={'olucC':function(_0x6c51d7){return _0x6c51d7();},'mYEJS':function(_0x101e21,_0x184429,_0x554ce0){return _0x101e21(_0x184429,_0x554ce0);},'XgOxU':function(_0x3b10c9,_0x41e14e){return _0x3b10c9!==_0x41e14e;},'FpFPp':function(_0x6686,_0x2d5bc0){return _0x6686(_0x2d5bc0);},'IpUzN':_0x58100d(0x1d8)},_0x171a53=_0x283821[_0x58100d(0x1eb)](getRangerDir),_0x7a3d6f=_0x283821[_0x58100d(0x1d9)](findEnvInRoot,_0xb5d464,_0x171a53);if(_0x7a3d6f){if(_0x3a0818[_0x58100d(0x20d)]&&isLegacyEnvPath(_0x7a3d6f))throw legacyWriteError(_0xb5d464,_0x7a3d6f);return _0x7a3d6f;}const _0x1c39f1=getRangerHomeDir();if(_0x283821['XgOxU'](_0x1c39f1,_0x171a53)){const _0xd3d0f9=_0x283821['mYEJS'](findEnvInRoot,_0xb5d464,_0x1c39f1);if(_0xd3d0f9){if(_0x3a0818[_0x58100d(0x20d)]&&_0x283821[_0x58100d(0x1fc)](isLegacyEnvPath,_0xd3d0f9))throw legacyWriteError(_0xb5d464,_0xd3d0f9);return _0xd3d0f9;}}const _0x233231=join(_0x1c39f1,_0x283821['IpUzN'],_0xb5d464);if(_0x3a0818['forWrite'])throw legacyWriteError(_0xb5d464,_0x233231);return _0x233231;}function isLegacyEnvPath(_0x5a95c0){const _0x380bb0=_0x47e0,_0x289896={'fysdd':function(_0x24d97e){return _0x24d97e();},'ouCdL':function(_0x3db529,_0x26e6ae){return _0x3db529+_0x26e6ae;}},_0x1fa4e1=_0x289896['fysdd'](getRangerDir),_0x1c1a73=getRangerHomeDir();for(const _0x50c39b of new Set([_0x1fa4e1,_0x1c1a73])){const _0x4654fb=_0x50c39b[_0x380bb0(0x1f6)]('/')?_0x50c39b:_0x289896[_0x380bb0(0x19f)](_0x50c39b,'/');if(_0x5a95c0===_0x50c39b||_0x5a95c0[_0x380bb0(0x1e3)](_0x4654fb))return!![];}return![];}function legacyWriteError(_0xc9539f,_0x46f0e8){const _0x5090a3=_0x47e0,_0x47b5b5={'sNWJO':function(_0x365d94,_0x5e2eb2){return _0x365d94+_0x5e2eb2;},'NJRxq':function(_0x22e6b0,_0x5db6bc){return _0x22e6b0+_0x5db6bc;}};return new Error(_0x47b5b5['sNWJO'](_0x47b5b5[_0x5090a3(0x19e)]('Refusing\x20to\x20write\x20profile\x20\x22'+_0xc9539f+'\x22\x20to\x20legacy\x20path\x20'+_0x46f0e8+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a')+_0x5090a3(0x1aa));}function _0x10ef(){const _0x3cafcd=['FpFPp','isArray','xEERK','none','bnUHg','--unsafely-treat-insecure-origin-as-secure=http://localhost','map','msYnI','aEivC','163zIIRse','ALGkB','GXVac','path','JnZMT','string','ENOENT','NyPcV','forWrite','RWMQY','1070113jiSAmz','IQHTI','headless','uclWb','--allow-insecure-localhost','install','wFyyY','location','getuid','2688330xZuxQK','settings.json','cKnPg','AtRvt','parse','indexOf','VFsUD','wSMMA','wFCQw','nWmRH','aVIIp','xQwFo','fmdYP','PBCOh','\x20is\x20not\x20set','440DCqNEm','wJqjB','vIfQU','env','configPath','hnvxY','bYYsP','clipboard-write','NJRxq','ouCdL','tabs','avNXy','hVyBm','auth.json.enc','NIHBO','UKRcY','includes','catch','ZuwUa','4487cUTCca','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','tGdhp','clipboard-read','entries','sessions','axvxd','now','4168iiPGiO','vision','contextOptions','npPPB','.json','allowInsecureLocalhost','WGxtC','locations','WdiQV','ZvzXt','extraHTTPHeaders','setupHeader','OBZea','TBBzi','legacy','browser','fAmyF','wDBGJ','AjZjC','headers','keys','gGIwH','length','aDotL','stringify','NFPiO','baseUrl','18qQvfas','--no-sandbox','4622hykjFr','nlOSw','auth.json','UtTlE','args','storageStatePath','fromEntries','HATpZ','wHezZ','157590tHLvxy','local','mYEJS','maBbB','cdpEndpoint','safeMode','PTTaD','YqCVK','wSJYV','ranger-auth-','bcvHP','launchOptions','startsWith','stagehand','GwMqN','kXyub','core','ecsgV','Failed\x20to\x20decrypt\x20auth\x20state:\x20','oQxtt','olucC','object','userAgent','2885604HeyzXP','filter','6588332oKtpbb','JZzvR','kekPI','nKOrM','--disable-features=WebBluetooth','pOvkK','endsWith','RdGex','tempAuthPath','chromium','zpfnT','storageState'];_0x10ef=function(){return _0x3cafcd;};return _0x10ef();}export function findExistingEnv(_0x3e9df7,_0x5bc0e1){const _0x3c4f07=_0x47e0,_0xf97a1c={'fmdYP':'legacy','kekPI':'local','oiVLt':function(_0x22aa42,_0x187a7b,_0x462549){return _0x22aa42(_0x187a7b,_0x462549);},'bzhuZ':function(_0x58108b,_0x18a2d8){return _0x58108b===_0x18a2d8;},'uclWb':function(_0x3ff5af,_0x46a5ea){return _0x3ff5af(_0x46a5ea);}},_0x5ce8a5=_0x5bc0e1?.['rangerDir'],_0x457a18=_0x5ce8a5?[_0x5ce8a5]:[getRangerDir(),getRangerHomeDir()][_0x3c4f07(0x1ef)]((_0x19d49e,_0x4ab79f,_0x313b85)=>_0x313b85[_0x3c4f07(0x21d)](_0x19d49e)===_0x4ab79f),_0x36f6bf=_0x5bc0e1?.[_0x3c4f07(0x1b8)]??['ci',_0x3c4f07(0x1d8),_0xf97a1c[_0x3c4f07(0x224)]];for(const _0x34e039 of _0x457a18){const _0x537452=join(_0x34e039,_0xf97a1c[_0x3c4f07(0x1f2)]),_0x5dbd64=_0xf97a1c['oiVLt'](join,_0x34e039,'ci'),_0x5361d6=[{'location':'ci','path':join(_0x34e039,'ci',_0x3e9df7)},{'location':_0xf97a1c[_0x3c4f07(0x1f2)],'path':join(_0x34e039,_0xf97a1c['kekPI'],_0x3e9df7)},{'location':_0xf97a1c['fmdYP'],'path':join(_0x34e039,_0x3e9df7)}];for(const _0x467d81 of _0x5361d6){if(_0x36f6bf['includes'](_0x467d81[_0x3c4f07(0x216)])&&existsSync(_0x467d81['path'])){if(_0x467d81[_0x3c4f07(0x216)]===_0x3c4f07(0x1bf)&&(_0x467d81[_0x3c4f07(0x208)]===_0x537452||_0xf97a1c['bzhuZ'](_0x467d81[_0x3c4f07(0x208)],_0x5dbd64))&&!_0xf97a1c[_0x3c4f07(0x212)](hasLegacyProfileFiles,_0x467d81[_0x3c4f07(0x208)]))continue;return{'path':_0x467d81['path'],'location':_0x467d81['location']};}}}return null;}function hasLegacyProfileFiles(_0x56e0bf){const _0x45ed66=_0x47e0,_0x162b9e={'wJqjB':function(_0x23e493,_0x50f175){return _0x23e493(_0x50f175);},'hVwao':function(_0x5e5dc7,_0xe8ebd,_0x25b564){return _0x5e5dc7(_0xe8ebd,_0x25b564);},'bcvHP':function(_0x25dae1,_0x32bec3){return _0x25dae1(_0x32bec3);},'gGIwH':function(_0x493666,_0x129aed){return _0x493666(_0x129aed);},'aYigI':'auth.json.enc'};return _0x162b9e[_0x45ed66(0x228)](existsSync,_0x162b9e['hVwao'](join,_0x56e0bf,_0x45ed66(0x219)))||_0x162b9e[_0x45ed66(0x1e1)](existsSync,_0x162b9e['hVwao'](join,_0x56e0bf,_0x45ed66(0x1d0)))||_0x162b9e[_0x45ed66(0x1c6)](existsSync,join(_0x56e0bf,_0x162b9e['aYigI']));}export function isEnvCi(_0x3b1cf4){const _0x5a5b62=_0x47e0,_0x22c830={'WGxtC':function(_0x2bf7ec,_0x1c538c){return _0x2bf7ec(_0x1c538c);},'npPPB':function(_0x50b81c){return _0x50b81c();},'Jvsdi':function(_0x5b7cee,_0x5302e9){return _0x5b7cee!==_0x5302e9;}};if(_0x22c830[_0x5a5b62(0x1b7)](existsSync,join(_0x22c830['npPPB'](getRangerDir),'ci',_0x3b1cf4)))return!![];const _0x4061ba=_0x22c830[_0x5a5b62(0x1b4)](getRangerHomeDir);if(_0x22c830['Jvsdi'](_0x4061ba,getRangerDir())&&_0x22c830[_0x5a5b62(0x1b7)](existsSync,join(_0x4061ba,'ci',_0x3b1cf4)))return!![];return![];}export async function cleanupTempFiles(_0x532f31){const _0x47205a=_0x47e0,_0x42f9b9={'ZvzXt':_0x47205a(0x20b)},_0x255bf8=[_0x532f31[_0x47205a(0x1f8)],_0x532f31[_0x47205a(0x22b)]][_0x47205a(0x1ef)](Boolean);await Promise['all'](_0x255bf8['map'](_0x38e41c=>unlink(_0x38e41c)[_0x47205a(0x1a7)](_0x36dbf6=>{const _0x3bacd6=_0x47205a;_0x36dbf6['code']!==_0x42f9b9[_0x3bacd6(0x1ba)]&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x38e41c+':',_0x36dbf6['message']);})));}export function getSettingsPath(_0x576945){const _0x199bb9=_0x47e0,_0xd8dcb5={'ecsgV':function(_0xc9cdb8,_0x302565){return _0xc9cdb8(_0x302565);}};return join(_0xd8dcb5[_0x199bb9(0x1e8)](getEnvDir,_0x576945),'settings.json');}export async function loadSettings(_0x26d5b5){const _0x3d1961=_0x47e0,_0x5eab40={'bYYsP':function(_0x8b5fa6,_0x104573){return _0x8b5fa6(_0x104573);}},_0x3fe5d9=_0x5eab40['bYYsP'](getSettingsPath,_0x26d5b5);if(!_0x5eab40[_0x3d1961(0x22d)](existsSync,_0x3fe5d9))return{};try{const _0x1919a0=await readFile(_0x3fe5d9,'utf-8');return JSON[_0x3d1961(0x21c)](_0x1919a0);}catch{return{};}}export async function saveSettings(_0x4b8a4d,_0x36db0f){const _0x5ca7eb=_0x47e0,_0x527892={'wSJYV':function(_0x2061e4,_0x342f57){return _0x2061e4(_0x342f57);},'ALGkB':function(_0x2a7d32,_0x192e73,_0x724595){return _0x2a7d32(_0x192e73,_0x724595);}},_0x2be9c5=_0x527892[_0x5ca7eb(0x1df)](getSettingsPath,_0x4b8a4d),_0x170bd4=dirname(_0x2be9c5);!_0x527892['wSJYV'](existsSync,_0x170bd4)&&await mkdir(_0x170bd4,{'recursive':!![]}),await _0x527892[_0x5ca7eb(0x206)](writeFile,_0x2be9c5,JSON[_0x5ca7eb(0x1c9)](_0x36db0f,null,0x2));}export function resolveEnvVars(_0x487fcd){const _0x417f24=_0x47e0,_0x4fe688={'tGdhp':function(_0x2a146b,_0x2d86b3){return _0x2a146b===_0x2d86b3;},'YhOnc':function(_0x46c461,_0x3ad67e){return _0x46c461===_0x3ad67e;},'EhnwC':_0x417f24(0x1ec)};if(typeof _0x487fcd===_0x417f24(0x20a))return _0x487fcd['replace'](/\$\{(\w+)\}/g,(_0x4b2b3d,_0x1dba65)=>{const _0x34b00b=_0x417f24,_0x479b50=process[_0x34b00b(0x22a)][_0x1dba65];if(_0x4fe688[_0x34b00b(0x1ab)](_0x479b50,undefined))throw new Error('Environment\x20variable\x20'+_0x1dba65+_0x34b00b(0x226));return _0x479b50;});if(Array['isArray'](_0x487fcd))return _0x487fcd[_0x417f24(0x202)](resolveEnvVars);if(_0x487fcd&&_0x4fe688['YhOnc'](typeof _0x487fcd,_0x4fe688['EhnwC']))return Object[_0x417f24(0x1d4)](Object['entries'](_0x487fcd)['map'](([_0x3d76b5,_0x1bbeca])=>[_0x3d76b5,resolveEnvVars(_0x1bbeca)]));return _0x487fcd;}const isRecord=_0x47f82a=>typeof _0x47f82a==='object'&&_0x47f82a!==null&&!Array[_0x352746(0x1fd)](_0x47f82a),asRecord=_0x2c0c54=>isRecord(_0x2c0c54)?_0x2c0c54:undefined,mergeHeaders=(_0x382d4d,_0x4eb380)=>{const _0x6decd3=_0x352746,_0xf581d2={'GXVac':function(_0xac076a,_0x2ca331){return _0xac076a??_0x2ca331;}},_0x322439={..._0x382d4d??{},..._0xf581d2[_0x6decd3(0x207)](_0x4eb380,{})};return Object[_0x6decd3(0x1c5)](_0x322439)['length']?_0x322439:undefined;},SAFE_MODE_ARGS=[_0x352746(0x1f4)],ALLOW_LOCALHOST_ARGS=['--disable-web-security','--allow-running-insecure-content',_0x352746(0x201),_0x352746(0x213)];export function buildBrowserOptionsFromSettings(_0x7d4f70,_0x18da3a={}){const _0x3c9789=_0x352746,_0x423649={'TBBzi':function(_0x46e065,_0x3b6aed){return _0x46e065(_0x3b6aed);},'RdGex':function(_0x3026c6,_0x5e6346){return _0x3026c6===_0x5e6346;},'msYnI':'string','NIHBO':function(_0x54c650,_0x41925f){return _0x54c650(_0x41925f);}},_0x27787c=_0x423649[_0x3c9789(0x1be)](asRecord,_0x7d4f70[_0x3c9789(0x1c0)]),_0x177409={...asRecord(_0x27787c?.[_0x3c9789(0x1e2)])??{}};typeof _0x18da3a['headless']==='boolean'&&(_0x177409['headless']=_0x18da3a[_0x3c9789(0x211)]);if(_0x7d4f70[_0x3c9789(0x1dc)]){const _0x576bd2=_0x177409['args']??[],_0x52c859=SAFE_MODE_ARGS[_0x3c9789(0x1ef)](_0xe35761=>!_0x576bd2[_0x3c9789(0x1a6)](_0xe35761));_0x177409['args']=[..._0x576bd2,..._0x52c859];}if(_0x7d4f70[_0x3c9789(0x1b6)]){const _0x2d895d=_0x177409[_0x3c9789(0x1d2)]??[],_0x2aa3fe=ALLOW_LOCALHOST_ARGS[_0x3c9789(0x1ef)](_0x24f097=>!_0x2d895d[_0x3c9789(0x1a6)](_0x24f097));_0x177409[_0x3c9789(0x1d2)]=[..._0x2d895d,..._0x2aa3fe];}const _0x5dcdca={...asRecord(_0x27787c?.[_0x3c9789(0x1b3)])??{}};_0x5dcdca['ignoreHTTPSErrors']=!![];_0x423649[_0x3c9789(0x1f7)](typeof _0x7d4f70[_0x3c9789(0x1ed)],_0x423649[_0x3c9789(0x203)])&&(_0x5dcdca[_0x3c9789(0x1ed)]=_0x7d4f70[_0x3c9789(0x1ed)]);const _0x505aa3=mergeHeaders(_0x423649[_0x3c9789(0x1a4)](asRecord,_0x5dcdca[_0x3c9789(0x1bb)]),asRecord(_0x7d4f70['headers']));return _0x505aa3?_0x5dcdca['extraHTTPHeaders']=_0x505aa3:delete _0x5dcdca[_0x3c9789(0x1bb)],_0x18da3a['storageStatePath']&&(_0x5dcdca['storageState']=_0x18da3a[_0x3c9789(0x1d3)]),{'launchOptions':_0x177409,'contextOptions':_0x5dcdca};}export async function resolveProfileStorageState(_0x22cc3a){const _0x498b7e={'zvBoO':function(_0x51a06c,_0x188cc3){return _0x51a06c(_0x188cc3);},'kdtBk':function(_0x37e988,_0x11dfde){return _0x37e988(_0x11dfde);}};return _0x498b7e['zvBoO'](resolveLocalAuthPath,_0x498b7e['kdtBk'](getEnvDir,_0x22cc3a));}async function resolveLocalAuthPath(_0x5208c){const _0x5e2b4d=_0x352746,_0x2b92de={'AjZjC':_0x5e2b4d(0x1a3),'zBnsd':function(_0x4f6d16,_0x13ecea,_0x21b6e9){return _0x4f6d16(_0x13ecea,_0x21b6e9);},'wHezZ':_0x5e2b4d(0x1d0),'uBwra':function(_0xddd6f1,_0x49a982){return _0xddd6f1(_0x49a982);},'OBZea':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','rNpdT':function(_0x30091d){return _0x30091d();}},_0x37297d=join(_0x5208c,_0x2b92de[_0x5e2b4d(0x1c3)]),_0x4c224a=_0x2b92de['zBnsd'](join,_0x5208c,_0x2b92de[_0x5e2b4d(0x1d6)]);if(_0x2b92de['uBwra'](existsSync,_0x37297d))try{const _0x30cbb2=await getToken();if(!_0x30cbb2)throw new Error(_0x2b92de[_0x5e2b4d(0x1bd)]);const _0x20aa60=await readFile(_0x37297d),_0x58040c=_0x2b92de['zBnsd'](decrypt,_0x20aa60,_0x30cbb2),_0x4f21f0=join(_0x2b92de['rNpdT'](tmpdir),_0x5e2b4d(0x1e0)+Date['now']()+'.json');return await _0x2b92de['zBnsd'](writeFile,_0x4f21f0,_0x58040c),{'storageStatePath':_0x4f21f0,'tempAuthPath':_0x4f21f0};}catch(_0x5c5f82){const _0x54b1d6=_0x5c5f82 instanceof Error?_0x5c5f82['message']:String(_0x5c5f82);throw new Error(_0x5e2b4d(0x1e9)+_0x54b1d6);}if(existsSync(_0x4c224a))return{'storageStatePath':_0x4c224a};return{};}export async function buildPlaywrightConfig(_0x402b90,_0x4e5f03,_0x410903,_0x28c5c2,_0x57ec5d){const _0x3b94fc=_0x352746,_0x528bec={'ZmawQ':function(_0x33a4a9,_0x31260e,_0x3a4683,_0x4c9358,_0x1f9406,_0x2d05b9,_0x24f18c){return _0x33a4a9(_0x31260e,_0x3a4683,_0x4c9358,_0x1f9406,_0x2d05b9,_0x24f18c);},'AtRvt':function(_0x5b5085,_0x4ef531){return _0x5b5085(_0x4ef531);},'UKRcY':function(_0x34849c,_0xccc240,_0x4a73e8,_0x78341a,_0x1b889b,_0x1a1d72,_0x4e6866){return _0x34849c(_0xccc240,_0x4a73e8,_0x78341a,_0x1b889b,_0x1a1d72,_0x4e6866);},'GwMqN':_0x3b94fc(0x1e4)};if(_0x57ec5d)return _0x528bec['ZmawQ'](buildPlaywrightConfigCore,_0x402b90,_0x57ec5d,_0x4e5f03,_0x410903,_0x28c5c2,'stagehand');const {storageStatePath:_0x39fb64,tempAuthPath:_0x5efb07}=await resolveLocalAuthPath(_0x528bec[_0x3b94fc(0x21b)](getEnvDir,_0x4e5f03));try{const _0x4c172b=await _0x528bec[_0x3b94fc(0x1a5)](buildPlaywrightConfigCore,_0x402b90,_0x39fb64,_0x4e5f03,_0x410903,_0x28c5c2,_0x528bec[_0x3b94fc(0x1e5)]);return{..._0x4c172b,'tempAuthPath':_0x5efb07};}catch(_0x14acc8){_0x5efb07&&await unlink(_0x5efb07)['catch'](()=>{});throw _0x14acc8;}}export async function buildPlaywrightConfigCore(_0x28d7a0,_0xe1a15c,_0x380c2f,_0xa9b2cb,_0x39b5e8,_0x1cee6e='stagehand'){const _0x2b1eda=_0x352746,_0x413529={'nWmRH':function(_0x2abe34,_0x52436b,_0x1843a4){return _0x2abe34(_0x52436b,_0x1843a4);},'hwGqD':'clipboard-read','PkjZx':'clipboard-write','nKOrM':function(_0x5142db,_0x15a66b,_0x25fd74,_0x7347c2){return _0x5142db(_0x15a66b,_0x25fd74,_0x7347c2);},'vDVLl':'sessions','zDHAb':'chromium','aEivC':function(_0x3becaa,_0x46c793){return _0x3becaa===_0x46c793;},'fAmyF':'playwright-cli','aVIIp':'file','maBbB':_0x2b1eda(0x1ff),'cjCjp':_0x2b1eda(0x1e7),'LMAEj':_0x2b1eda(0x214),'aROWX':'pdf','PfQxs':'allow','iHfob':function(_0x5099c9,_0x32afc6){return _0x5099c9===_0x32afc6;},'xQwFo':function(_0x5af7b3,_0x53e30d,_0x56560b){return _0x5af7b3(_0x53e30d,_0x56560b);},'ycpqZ':'-cli','QWtfw':function(_0x227b50,_0x551243,_0x3896e3){return _0x227b50(_0x551243,_0x3896e3);}},_0x22c78c=_0xa9b2cb||randomUUID(),_0x45edf1=_0x413529[_0x2b1eda(0x1f3)](join,getRangerDir(),_0x413529['vDVLl'],_0x22c78c),_0x48c7b2=Boolean(_0x28d7a0['cdpEndpoint']),_0x5e6bb1=_0x48c7b2?{'browserName':_0x413529['zDHAb'],'cdpEndpoint':_0x28d7a0['cdpEndpoint']}:((()=>{const _0xa04f45=_0x2b1eda,{launchOptions:_0x4447b2,contextOptions:_0x2f9e99}=_0x413529[_0xa04f45(0x221)](buildBrowserOptionsFromSettings,_0x28d7a0,{'headless':_0x39b5e8?![]:_0x28d7a0['headless']??!![],'storageStatePath':_0xe1a15c});if(process[_0xa04f45(0x217)]?.()===0x0){const _0x17d75a=[_0xa04f45(0x1cd),'--disable-setuid-sandbox'],_0x55ed68=_0x4447b2[_0xa04f45(0x1d2)]??[],_0x1f6d92=_0x17d75a[_0xa04f45(0x1ef)](_0x10e2c6=>!_0x55ed68['includes'](_0x10e2c6));_0x4447b2[_0xa04f45(0x1d2)]=[..._0x55ed68,..._0x1f6d92];}return{'isolated':!![],'browserName':_0xa04f45(0x1f9),'launchOptions':_0x4447b2,'contextOptions':{..._0x2f9e99,'permissions':[_0x413529['hwGqD'],_0x413529['PkjZx']],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x524ae1=_0x413529[_0x2b1eda(0x204)](_0x1cee6e,_0x413529[_0x2b1eda(0x1c1)])?{'browser':_0x5e6bb1,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x45edf1,'outputMode':_0x413529[_0x2b1eda(0x222)],'codegen':_0x413529[_0x2b1eda(0x1da)]}:{'name':_0x380c2f,'browser':_0x5e6bb1,'capabilities':[_0x413529['cjCjp'],_0x2b1eda(0x1a0),_0x413529['LMAEj'],_0x413529['aROWX'],_0x2b1eda(0x1b2)],'imageResponses':_0x413529['PfQxs'],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x45edf1};if(!_0x48c7b2){const _0x3dbeba=_0x524ae1[_0x2b1eda(0x1c0)],_0x33f40a=_0x3dbeba['contextOptions'];if(_0x413529['iHfob'](_0x33f40a['userAgent'],undefined))delete _0x33f40a['userAgent'];if(_0x413529['iHfob'](_0x33f40a['storageState'],undefined))delete _0x33f40a[_0x2b1eda(0x1fb)];}const _0x2ed9b8=_0x413529[_0x2b1eda(0x223)](join,tmpdir(),'ranger-config');!existsSync(_0x2ed9b8)&&await mkdir(_0x2ed9b8,{'recursive':!![]});const _0x59386c=_0x1cee6e===_0x413529[_0x2b1eda(0x1c1)]?_0x413529['ycpqZ']:'',_0x53dc60=join(_0x2ed9b8,_0x380c2f+'-'+Date[_0x2b1eda(0x1b0)]()+_0x59386c+_0x2b1eda(0x1b5));return await _0x413529['QWtfw'](writeFile,_0x53dc60,JSON[_0x2b1eda(0x1c9)](_0x524ae1,null,0x2)),{'configPath':_0x53dc60,'storageStatePath':_0xe1a15c};}export async function buildPlaywrightCliConfig(_0x153654,_0x4002f7,_0x154cfa,_0xda3d9e,_0x1a7852){const _0x3d4941=_0x352746,_0x5ed46b={'PTTaD':'playwright-cli','vIfQU':function(_0x515b36,_0x33dd6d,_0x56e362,_0x1a1ce3,_0x3268d5,_0x454a57,_0x234769){return _0x515b36(_0x33dd6d,_0x56e362,_0x1a1ce3,_0x3268d5,_0x454a57,_0x234769);},'kyKQH':function(_0x5c4373,_0x156c0c){return _0x5c4373(_0x156c0c);}};if(_0x1a7852)return buildPlaywrightConfigCore(_0x153654,_0x1a7852,_0x4002f7,_0x154cfa,_0xda3d9e,_0x5ed46b[_0x3d4941(0x1dd)]);const {storageStatePath:_0x587d0d,tempAuthPath:_0x173bed}=await resolveLocalAuthPath(getEnvDir(_0x4002f7));try{const _0x545909=await _0x5ed46b[_0x3d4941(0x229)](buildPlaywrightConfigCore,_0x153654,_0x587d0d,_0x4002f7,_0x154cfa,_0xda3d9e,_0x5ed46b[_0x3d4941(0x1dd)]);return{..._0x545909,'tempAuthPath':_0x173bed};}catch(_0x3bb8d2){_0x173bed&&await _0x5ed46b['kyKQH'](unlink,_0x173bed)['catch'](()=>{});throw _0x3bb8d2;}}export async function buildRangerwrightCliConfig(_0x409c17,_0x537886,_0x7d6f9b,_0x37c7fe,_0x5477a5){const _0x140e56=_0x352746,_0x6f20fd={'nlOSw':function(_0x48d6b9,_0x274ee7,_0x7f8975){return _0x48d6b9(_0x274ee7,_0x7f8975);},'kVuqH':function(_0xeb16f4,_0x18e519){return _0xeb16f4===_0x18e519;},'VFsUD':_0x140e56(0x1ac),'NyPcV':_0x140e56(0x22e),'hnvxY':function(_0x19d0e9,_0x57aa05){return _0x19d0e9(_0x57aa05);},'bnUHg':function(_0x199d53){return _0x199d53();},'fdktg':function(_0x5b12c6,_0x5aebcb,_0x1074b7,_0x56df9b){return _0x5b12c6(_0x5aebcb,_0x1074b7,_0x56df9b);},'BJIJt':_0x140e56(0x1ae),'JZzvR':_0x140e56(0x1f9),'JnZMT':function(_0x565235,_0x4f2065){return _0x565235===_0x4f2065;},'qrEGv':function(_0x5175ad,_0x2086a4,_0x153ea8){return _0x5175ad(_0x2086a4,_0x153ea8);},'RWMQY':function(_0x4c0985){return _0x4c0985();},'oQxtt':'ranger-config','lkGNx':function(_0x4ee6c6,_0x133323,_0x1ae1b6){return _0x4ee6c6(_0x133323,_0x1ae1b6);},'wSMMA':function(_0x1a76d7,_0x3ae4a9){return _0x1a76d7(_0x3ae4a9);}},{storageStatePath:_0x28198a,tempAuthPath:_0x24666f}=_0x5477a5?{'storageStatePath':_0x5477a5,'tempAuthPath':undefined}:await _0x6f20fd['hnvxY'](resolveLocalAuthPath,getEnvDir(_0x537886)),_0xa90122=_0x7d6f9b||_0x6f20fd[_0x140e56(0x200)](randomUUID),_0x171f7b=_0x6f20fd['fdktg'](join,getRangerDir(),_0x6f20fd['BJIJt'],_0xa90122),_0x343268=Boolean(_0x409c17[_0x140e56(0x1db)]),_0x5e4425=_0x343268?{'browserName':_0x6f20fd[_0x140e56(0x1f1)],'cdpEndpoint':_0x409c17[_0x140e56(0x1db)]}:((()=>{const _0x45518a=_0x140e56,{launchOptions:_0x51c2a4,contextOptions:_0x8504a8}=_0x6f20fd[_0x45518a(0x1cf)](buildBrowserOptionsFromSettings,_0x409c17,{'headless':_0x37c7fe?![]:_0x409c17[_0x45518a(0x211)]??!![],'storageStatePath':_0x28198a});if(_0x6f20fd['kVuqH'](process[_0x45518a(0x217)]?.(),0x0)){const _0x1c7955=[_0x45518a(0x1cd),'--disable-setuid-sandbox'],_0x4678c0=_0x51c2a4['args']??[],_0x18a9e8=_0x1c7955['filter'](_0x26ee76=>!_0x4678c0[_0x45518a(0x1a6)](_0x26ee76));_0x51c2a4[_0x45518a(0x1d2)]=[..._0x4678c0,..._0x18a9e8];}return{'browserName':_0x45518a(0x1f9),'launchOptions':_0x51c2a4,'contextOptions':{..._0x8504a8,'permissions':[_0x6f20fd[_0x45518a(0x21e)],_0x6f20fd[_0x45518a(0x20c)]],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x343268){const _0x47b42a=_0x5e4425['contextOptions'];if(_0x47b42a){if(_0x6f20fd['kVuqH'](_0x47b42a[_0x140e56(0x1ed)],undefined))delete _0x47b42a[_0x140e56(0x1ed)];if(_0x6f20fd[_0x140e56(0x209)](_0x47b42a[_0x140e56(0x1fb)],undefined))delete _0x47b42a['storageState'];}}const _0x31ffd3={'browser':_0x5e4425,'outputDir':_0x171f7b,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x216bb7;try{const _0x23371e=_0x6f20fd['qrEGv'](join,_0x6f20fd[_0x140e56(0x20e)](tmpdir),_0x6f20fd[_0x140e56(0x1ea)]);!_0x6f20fd[_0x140e56(0x22c)](existsSync,_0x23371e)&&await mkdir(_0x23371e,{'recursive':!![]}),_0x216bb7=join(_0x23371e,_0x537886+'-'+Date[_0x140e56(0x1b0)]()+'-rangerwright.json'),await _0x6f20fd['lkGNx'](writeFile,_0x216bb7,JSON[_0x140e56(0x1c9)](_0x31ffd3,null,0x2));}catch(_0x1c4db1){_0x24666f&&await _0x6f20fd[_0x140e56(0x21f)](unlink,_0x24666f)[_0x140e56(0x1a7)](()=>{});throw _0x1c4db1;}return{'configPath':_0x216bb7,'storageStatePath':_0x28198a,'tempAuthPath':_0x24666f,'outputDir':_0x171f7b};}export async function buildNovaActCliConfig(_0x3ee38e,_0x36c820,_0x36ccb4,_0x2529e9,_0x1e9cfb){const _0x5b6e2a=_0x352746,_0x2f7863={'ailVW':function(_0x4abc63,_0x2ced7b){return _0x4abc63(_0x2ced7b);},'wFCQw':function(_0x4de28a,_0xc7baa3){return _0x4de28a(_0xc7baa3);},'HATpZ':function(_0xa3cf9b){return _0xa3cf9b();},'NFPiO':function(_0xe74b49,_0x3824f8,_0x4c9b0a,_0x23e4b2){return _0xe74b49(_0x3824f8,_0x4c9b0a,_0x23e4b2);},'zvzGc':'sessions','OUbZT':function(_0x351050,_0x1b64c8,_0x27fdd3){return _0x351050(_0x1b64c8,_0x27fdd3);},'mXNZN':'nova-user-data','wDBGJ':'Default','aDotL':'--disable-setuid-sandbox','WdiQV':'string','kXyub':function(_0x3987e1,_0x2830d3){return _0x3987e1(_0x2830d3);}},{storageStatePath:_0x3a4f31,tempAuthPath:_0x25cc12}=_0x1e9cfb?{'storageStatePath':_0x1e9cfb,'tempAuthPath':undefined}:await _0x2f7863['ailVW'](resolveLocalAuthPath,_0x2f7863[_0x5b6e2a(0x220)](getEnvDir,_0x36c820)),_0x2c59b1=_0x36ccb4||_0x2f7863[_0x5b6e2a(0x1d5)](randomUUID),_0x2f8fe6=_0x2f7863[_0x5b6e2a(0x1ca)](join,getRangerDir(),_0x2f7863['zvzGc'],_0x2c59b1),_0xd4ee28=_0x2f7863['OUbZT'](join,_0x2f8fe6,_0x2f7863['mXNZN']),_0x6fea39=_0x3a4f31?join(_0xd4ee28,_0x2f7863[_0x5b6e2a(0x1c2)]):undefined,{launchOptions:_0x28508c,contextOptions:_0x35a66a}=buildBrowserOptionsFromSettings(_0x3ee38e,{'headless':_0x2529e9?![]:_0x3ee38e['headless']??!![],'storageStatePath':_0x3a4f31});if(process[_0x5b6e2a(0x217)]?.()===0x0){const _0x1c385e=[_0x5b6e2a(0x1cd),_0x2f7863[_0x5b6e2a(0x1c8)]],_0x1092c3=_0x28508c['args']??[],_0x1e8f98=_0x1c385e[_0x5b6e2a(0x1ef)](_0x20734d=>!_0x1092c3[_0x5b6e2a(0x1a6)](_0x20734d));_0x28508c['args']=[..._0x1092c3,..._0x1e8f98];}const _0x238aac=typeof _0x28508c['executablePath']===_0x2f7863[_0x5b6e2a(0x1b9)]?_0x28508c['executablePath']:_0x3a4f31?chromium['executablePath']():undefined;return{'storageStatePath':_0x3a4f31,'tempAuthPath':_0x25cc12,'baseUrl':_0x3ee38e[_0x5b6e2a(0x1cb)],'headless':_0x2f7863[_0x5b6e2a(0x1e6)](Boolean,_0x28508c[_0x5b6e2a(0x211)]),'userDataDir':_0xd4ee28,'browserProfilePath':_0x6fea39,'executablePath':_0x238aac,'launchArgs':Array['isArray'](_0x28508c['args'])?_0x28508c[_0x5b6e2a(0x1d2)][_0x5b6e2a(0x1ef)](_0x151a83=>typeof _0x151a83===_0x5b6e2a(0x20a)):[],'userAgent':typeof _0x35a66a[_0x5b6e2a(0x1ed)]===_0x5b6e2a(0x20a)?_0x35a66a[_0x5b6e2a(0x1ed)]:undefined,'extraHTTPHeaders':_0x35a66a[_0x5b6e2a(0x1bb)],'allowInsecureLocalhost':_0x2f7863['ailVW'](Boolean,_0x3ee38e[_0x5b6e2a(0x1b6)]),'safeMode':_0x2f7863[_0x5b6e2a(0x220)](Boolean,_0x3ee38e[_0x5b6e2a(0x1dc)]),'cdpEndpoint':_0x3ee38e[_0x5b6e2a(0x1db)],'isCdpMode':Boolean(_0x3ee38e['cdpEndpoint'])};}export function getNestedValue(_0x5864c2,_0x103178){const _0x223d52=_0x352746,_0x10b00e={'UtTlE':function(_0x2dca2b,_0x5e66e8){return _0x2dca2b===_0x5e66e8;},'IQHTI':function(_0x2fd11c,_0x3b5c93){return _0x2fd11c===_0x3b5c93;},'QEAEP':function(_0x1b2aef,_0x208ae8){return _0x1b2aef!==_0x208ae8;}},_0x5c0438=parseKeyPath(_0x103178);let _0x54811f=_0x5864c2;for(const _0x56b15a of _0x5c0438){if(_0x10b00e[_0x223d52(0x1d1)](_0x54811f,null)||_0x10b00e[_0x223d52(0x210)](_0x54811f,undefined)||_0x10b00e['QEAEP'](typeof _0x54811f,'object'))return undefined;_0x54811f=_0x54811f[_0x56b15a];}return _0x54811f;}export function setNestedValue(_0x4cafd7,_0x282bfd,_0x417f74){const _0x190063=_0x352746,_0x15cdf3={'cKnPg':function(_0x399b56,_0x57aa2c){return _0x399b56(_0x57aa2c);},'YqCVK':function(_0x55c506,_0x478968){return _0x55c506 in _0x478968;},'wFyyY':function(_0x36f949,_0x187f3c){return _0x36f949!==_0x187f3c;},'axvxd':'object'},_0x2b8fed=_0x15cdf3[_0x190063(0x21a)](parseKeyPath,_0x282bfd);let _0x38cef6=_0x4cafd7;for(let _0x355307=0x0;_0x355307<_0x2b8fed[_0x190063(0x1c7)]-0x1;_0x355307++){const _0x2adbff=_0x2b8fed[_0x355307];(!_0x15cdf3[_0x190063(0x1de)](_0x2adbff,_0x38cef6)||_0x15cdf3[_0x190063(0x215)](typeof _0x38cef6[_0x2adbff],_0x15cdf3[_0x190063(0x1af)]))&&(_0x38cef6[_0x2adbff]={}),_0x38cef6=_0x38cef6[_0x2adbff];}_0x38cef6[_0x2b8fed[_0x2b8fed[_0x190063(0x1c7)]-0x1]]=_0x417f74;}export function deleteNestedValue(_0x471abf,_0x154e96){const _0x69f5bd=_0x352746,_0x145f19={'auyug':'object','PBCOh':function(_0x43b3d8,_0x4dbd28){return _0x43b3d8===_0x4dbd28;},'pOvkK':function(_0x13ac6c,_0x5a0ee4){return _0x13ac6c===_0x5a0ee4;},'ZuwUa':function(_0x2aeede,_0x12c7b5){return _0x2aeede in _0x12c7b5;}},_0x11e027=parseKeyPath(_0x154e96);let _0x4a3785=_0x471abf;for(let _0x31181b=0x0;_0x31181b<_0x11e027['length']-0x1;_0x31181b++){if(_0x4a3785===null||_0x4a3785===undefined||typeof _0x4a3785!==_0x145f19['auyug'])return![];_0x4a3785=_0x4a3785[_0x11e027[_0x31181b]];}if(_0x145f19[_0x69f5bd(0x225)](_0x4a3785,null)||_0x145f19[_0x69f5bd(0x1f5)](_0x4a3785,undefined)||typeof _0x4a3785!==_0x69f5bd(0x1ec))return![];const _0x2fafbe=_0x11e027[_0x11e027[_0x69f5bd(0x1c7)]-0x1];if(_0x145f19[_0x69f5bd(0x1a8)](_0x2fafbe,_0x4a3785))return delete _0x4a3785[_0x2fafbe],!![];return![];}function parseKeyPath(_0x185202){const _0x50e9bb=_0x352746,_0x177400={'fZMJD':'setupHeaders'},_0x46129b=_0x185202['split']('.');return _0x46129b[0x0]==='header'&&(_0x46129b[0x0]=_0x50e9bb(0x1c4)),_0x46129b[0x0]===_0x50e9bb(0x1bc)&&(_0x46129b[0x0]=_0x177400['fZMJD']),_0x46129b;}export function formatSettings(_0xd3419d,_0x7457c0=0x0){const _0x5df920=_0x352746,_0x348956={'xEERK':function(_0x24e7c1,_0x364450){return _0x24e7c1===_0x364450;},'pdDLH':'object'},_0x1b6cd1=[],_0x596bab='\x20\x20'['repeat'](_0x7457c0);for(const [_0x513238,_0x2f166c]of Object['entries'](_0xd3419d)){if(_0x348956[_0x5df920(0x1fe)](_0x2f166c,undefined))continue;if(typeof _0x2f166c===_0x348956['pdDLH']&&_0x2f166c!==null){_0x1b6cd1['push'](''+_0x596bab+_0x513238+':');for(const [_0x192d41,_0x2fd060]of Object[_0x5df920(0x1ad)](_0x2f166c)){_0x1b6cd1['push'](_0x596bab+'\x20\x20'+_0x192d41+':\x20'+_0x2fd060);}}else _0x1b6cd1['push'](''+_0x596bab+_0x513238+':\x20'+_0x2f166c);}return _0x1b6cd1['join']('\x0a');}
1
+ const _0x350f8c=_0x2f80;(function(_0x55556d,_0xd5332){const _0x37a092=_0x2f80,_0x2a48b1=_0x55556d();while(!![]){try{const _0x1a1ea7=-parseInt(_0x37a092(0x199))/0x1+parseInt(_0x37a092(0x1d5))/0x2+-parseInt(_0x37a092(0x1ef))/0x3*(-parseInt(_0x37a092(0x19f))/0x4)+-parseInt(_0x37a092(0x1d9))/0x5+-parseInt(_0x37a092(0x1c4))/0x6+-parseInt(_0x37a092(0x1f5))/0x7*(-parseInt(_0x37a092(0x1b6))/0x8)+parseInt(_0x37a092(0x1ba))/0x9*(-parseInt(_0x37a092(0x1e6))/0xa);if(_0x1a1ea7===_0xd5332)break;else _0x2a48b1['push'](_0x2a48b1['shift']());}catch(_0x1cfa39){_0x2a48b1['push'](_0x2a48b1['shift']());}}}(_0x49fe,0x6c142));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{chromium}from'playwright';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function _0x2f80(_0x32bc04,_0x210b90){_0x32bc04=_0x32bc04-0x182;const _0x49fe67=_0x49fe();let _0x2f8091=_0x49fe67[_0x32bc04];return _0x2f8091;}function findEnvInRoot(_0x520bf1,_0x43cb26){const _0x4a31a0=_0x2f80,_0xfd4a3c={'hofmX':function(_0x25619d,_0x5e08a9,_0x5b1a28,_0x3c45da){return _0x25619d(_0x5e08a9,_0x5b1a28,_0x3c45da);},'xpQwq':function(_0xda294e,_0x1b880f,_0x4b7a86){return _0xda294e(_0x1b880f,_0x4b7a86);},'jfyXJ':_0x4a31a0(0x1b0),'uJJqJ':function(_0xe12b2,_0x2b3012){return _0xe12b2(_0x2b3012);},'BwPIG':function(_0x48ff7f,_0x3e61c0){return _0x48ff7f(_0x3e61c0);}},_0x245abc=join(_0x43cb26,'ci',_0x520bf1),_0x4bd130=_0xfd4a3c['hofmX'](join,_0x43cb26,'local',_0x520bf1),_0x16e0c0=join(_0x43cb26,_0x520bf1),_0xc02627=_0xfd4a3c['xpQwq'](join,_0x43cb26,_0xfd4a3c[_0x4a31a0(0x18e)]),_0xa3767a=join(_0x43cb26,'ci');if(_0xfd4a3c['uJJqJ'](existsSync,_0x245abc))return _0x245abc;if(_0xfd4a3c[_0x4a31a0(0x1ea)](existsSync,_0x4bd130))return _0x4bd130;if(existsSync(_0x16e0c0)&&(_0x16e0c0!==_0xc02627&&_0x16e0c0!==_0xa3767a?!![]:hasLegacyProfileFiles(_0x16e0c0)))return _0x16e0c0;return null;}export function getEnvDir(_0x44288c,_0x3b6741={}){const _0x35b20d=_0x2f80,_0x48f76b={'MsDEY':function(_0xffa0ca,_0x1168e6,_0x4f8db1){return _0xffa0ca(_0x1168e6,_0x4f8db1);},'mgGza':function(_0x5e19ee){return _0x5e19ee();},'gJLSG':function(_0x47059b,_0x1cda7c){return _0x47059b!==_0x1cda7c;}},_0x153285=getRangerDir(),_0x1467b7=_0x48f76b[_0x35b20d(0x20b)](findEnvInRoot,_0x44288c,_0x153285);if(_0x1467b7){if(_0x3b6741['forWrite']&&isLegacyEnvPath(_0x1467b7))throw _0x48f76b['MsDEY'](legacyWriteError,_0x44288c,_0x1467b7);return _0x1467b7;}const _0x1502ff=_0x48f76b['mgGza'](getRangerHomeDir);if(_0x48f76b[_0x35b20d(0x1bf)](_0x1502ff,_0x153285)){const _0xb0edbb=_0x48f76b['MsDEY'](findEnvInRoot,_0x44288c,_0x1502ff);if(_0xb0edbb){if(_0x3b6741[_0x35b20d(0x202)]&&isLegacyEnvPath(_0xb0edbb))throw legacyWriteError(_0x44288c,_0xb0edbb);return _0xb0edbb;}}const _0x17ffac=join(_0x1502ff,'local',_0x44288c);if(_0x3b6741['forWrite'])throw legacyWriteError(_0x44288c,_0x17ffac);return _0x17ffac;}function isLegacyEnvPath(_0x374a72){const _0x1a635a=_0x2f80,_0x11aa2f={'VXLLO':function(_0x148bf4){return _0x148bf4();}},_0x5a00f9=getRangerDir(),_0x4f9d5a=_0x11aa2f['VXLLO'](getRangerHomeDir);for(const _0x36146f of new Set([_0x5a00f9,_0x4f9d5a])){const _0x393221=_0x36146f['endsWith']('/')?_0x36146f:_0x36146f+'/';if(_0x374a72===_0x36146f||_0x374a72[_0x1a635a(0x189)](_0x393221))return!![];}return![];}function legacyWriteError(_0x418738,_0x59770a){const _0x212ad9=_0x2f80,_0x1de295={'WPoqG':function(_0x51fcd0,_0x5f5d85){return _0x51fcd0+_0x5f5d85;},'RfnMp':function(_0x52d914,_0x38e725){return _0x52d914+_0x38e725;}};return new Error(_0x1de295[_0x212ad9(0x1e8)](_0x1de295[_0x212ad9(0x1cb)](_0x1de295['RfnMp']('Refusing\x20to\x20write\x20profile\x20\x22'+_0x418738+'\x22\x20to\x20legacy\x20path\x20'+_0x59770a+'.\x0a','That\x20directory\x20is\x20read-only\x20now.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'),_0x212ad9(0x1b4)));}export function findExistingEnv(_0x24daf0,_0x5905c5){const _0x2796d0=_0x2f80,_0x1d80c0={'jMboe':function(_0x381e23){return _0x381e23();},'RiEwH':'local','WkCmv':'legacy','nsDNV':function(_0x547671,_0x310b15){return _0x547671(_0x310b15);},'bZWCh':function(_0xdf7e3b,_0x66e673){return _0xdf7e3b===_0x66e673;},'JcNvS':function(_0xd0842e,_0x4a1085){return _0xd0842e(_0x4a1085);}},_0x1224e0=_0x5905c5?.[_0x2796d0(0x1e1)],_0x3873e9=_0x1224e0?[_0x1224e0]:[getRangerDir(),_0x1d80c0['jMboe'](getRangerHomeDir)]['filter']((_0x2d45bd,_0x546fca,_0x70f74c)=>_0x70f74c[_0x2796d0(0x196)](_0x2d45bd)===_0x546fca),_0x52009a=_0x5905c5?.[_0x2796d0(0x1b8)]??['ci','local',_0x2796d0(0x1bb)];for(const _0x322280 of _0x3873e9){const _0x365b1f=join(_0x322280,_0x1d80c0['RiEwH']),_0x19d39f=join(_0x322280,'ci'),_0x7bb8cd=[{'location':'ci','path':join(_0x322280,'ci',_0x24daf0)},{'location':_0x2796d0(0x1b0),'path':join(_0x322280,'local',_0x24daf0)},{'location':_0x1d80c0['WkCmv'],'path':join(_0x322280,_0x24daf0)}];for(const _0x23bad8 of _0x7bb8cd){if(_0x52009a[_0x2796d0(0x1ff)](_0x23bad8[_0x2796d0(0x19a)])&&_0x1d80c0[_0x2796d0(0x1a4)](existsSync,_0x23bad8[_0x2796d0(0x197)])){if(_0x1d80c0[_0x2796d0(0x1dd)](_0x23bad8['location'],_0x1d80c0[_0x2796d0(0x204)])&&(_0x23bad8['path']===_0x365b1f||_0x23bad8[_0x2796d0(0x197)]===_0x19d39f)&&!_0x1d80c0['JcNvS'](hasLegacyProfileFiles,_0x23bad8[_0x2796d0(0x197)]))continue;return{'path':_0x23bad8[_0x2796d0(0x197)],'location':_0x23bad8[_0x2796d0(0x19a)]};}}}return null;}function hasLegacyProfileFiles(_0x4ca009){const _0x213b9c=_0x2f80,_0x7a3c67={'tllfD':function(_0x2208b6,_0x21ad17){return _0x2208b6(_0x21ad17);},'mygQn':function(_0x4d85f8,_0x4d69e8,_0x1e5894){return _0x4d85f8(_0x4d69e8,_0x1e5894);},'MqnCX':'settings.json','LitAO':function(_0x1f02fc,_0x1174dc){return _0x1f02fc(_0x1174dc);},'drSid':_0x213b9c(0x1c2),'XwpmN':function(_0x2b7770,_0x2e24a5){return _0x2b7770(_0x2e24a5);}};return _0x7a3c67['tllfD'](existsSync,_0x7a3c67['mygQn'](join,_0x4ca009,_0x7a3c67['MqnCX']))||_0x7a3c67[_0x213b9c(0x1d8)](existsSync,_0x7a3c67['mygQn'](join,_0x4ca009,_0x7a3c67[_0x213b9c(0x1d3)]))||_0x7a3c67[_0x213b9c(0x1d1)](existsSync,_0x7a3c67['mygQn'](join,_0x4ca009,_0x213b9c(0x1c8)));}export function isEnvCi(_0x3531fc){const _0x5f29f3=_0x2f80,_0x67fa22={'TobjP':function(_0x516dba,_0x4c9f85){return _0x516dba(_0x4c9f85);},'ExjSg':function(_0x23901b,_0x6d5dbd,_0x2ecace,_0x10c559){return _0x23901b(_0x6d5dbd,_0x2ecace,_0x10c559);},'ksyCo':function(_0x1f9f13){return _0x1f9f13();},'sxhzv':function(_0x4ad9bb){return _0x4ad9bb();},'BozCn':function(_0x238d67,_0xcf80bf){return _0x238d67!==_0xcf80bf;},'jEDEf':function(_0x316b28){return _0x316b28();}};if(_0x67fa22[_0x5f29f3(0x1aa)](existsSync,_0x67fa22[_0x5f29f3(0x1dc)](join,_0x67fa22[_0x5f29f3(0x205)](getRangerDir),'ci',_0x3531fc)))return!![];const _0x42759f=_0x67fa22['sxhzv'](getRangerHomeDir);if(_0x67fa22['BozCn'](_0x42759f,_0x67fa22['jEDEf'](getRangerDir))&&existsSync(_0x67fa22[_0x5f29f3(0x1dc)](join,_0x42759f,'ci',_0x3531fc)))return!![];return![];}export async function cleanupTempFiles(_0x906de6){const _0x19cf6b=_0x2f80,_0x161c8b={'tTrdv':function(_0x19f47b,_0x6faee6){return _0x19f47b!==_0x6faee6;},'yRZBT':_0x19cf6b(0x1a3)},_0x5b9382=[_0x906de6[_0x19cf6b(0x188)],_0x906de6[_0x19cf6b(0x1db)]]['filter'](Boolean);await Promise[_0x19cf6b(0x209)](_0x5b9382['map'](_0x5d7a37=>unlink(_0x5d7a37)[_0x19cf6b(0x1b7)](_0x3992c=>{const _0x38930f=_0x19cf6b;_0x161c8b[_0x38930f(0x1a9)](_0x3992c['code'],_0x161c8b[_0x38930f(0x1f6)])&&console['warn']('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x5d7a37+':',_0x3992c[_0x38930f(0x1be)]);})));}export function getSettingsPath(_0x3f6fe5){const _0x16c023=_0x2f80,_0x1e7a19={'CRtaG':function(_0xf04beb,_0x219e79){return _0xf04beb(_0x219e79);},'TEltg':'settings.json'};return join(_0x1e7a19[_0x16c023(0x1a2)](getEnvDir,_0x3f6fe5),_0x1e7a19['TEltg']);}export async function loadSettings(_0xc59663){const _0x23feba=_0x2f80,_0x416175={'KvFcr':function(_0x542d20,_0x15384e){return _0x542d20(_0x15384e);},'MiFsT':'utf-8'},_0x409fed=getSettingsPath(_0xc59663);if(!_0x416175['KvFcr'](existsSync,_0x409fed))return{};try{const _0xcfaee9=await readFile(_0x409fed,_0x416175[_0x23feba(0x1d2)]);return JSON['parse'](_0xcfaee9);}catch{return{};}}export async function saveSettings(_0x285a52,_0x4568ee){const _0x326495=_0x2f80,_0x229a02={'VOIyn':function(_0x3e95e9,_0x3a7931){return _0x3e95e9(_0x3a7931);},'vuyDK':function(_0x511886,_0x246dd0,_0x2b0c12){return _0x511886(_0x246dd0,_0x2b0c12);}},_0x4e60a2=getSettingsPath(_0x285a52),_0x1c8543=_0x229a02['VOIyn'](dirname,_0x4e60a2);!_0x229a02['VOIyn'](existsSync,_0x1c8543)&&await _0x229a02['vuyDK'](mkdir,_0x1c8543,{'recursive':!![]}),await writeFile(_0x4e60a2,JSON[_0x326495(0x185)](_0x4568ee,null,0x2));}function _0x49fe(){const _0x17a419=['ranger-auth-','1848COhsAg','--allow-running-insecure-content','none','CRtaG','ENOENT','nsDNV','ellII','AAaOj','allowInsecureLocalhost','uSmXx','tTrdv','TobjP','bGRgH','executablePath','NjkgC','xvDqS','env','local','cnclN','clipboard-read','filter','See\x20https://docs.ranger.net/main/concepts/profiles\x20for\x20setup\x20options.','RCcjL','368fHAJVQ','catch','locations','NTgJf','9wRvLio','legacy','rZMQx','PDsCz','message','gJLSG','OrtHn','safeMode','auth.json','pCPgg','1056198piEEFo','VLuaI','core','join','auth.json.enc','EuTfP','nwLZA','RfnMp','cdpEndpoint','string','cCPFK','TGFvL','EnkaZ','XwpmN','MiFsT','drSid','isArray','288522KlqdOA','object','userAgent','LitAO','508395WhPZLU','playwright-cli','configPath','ExjSg','bZWCh','urbUF','--allow-insecure-localhost','storageStatePath','rangerDir','ranger-config','--unsafely-treat-insecure-origin-as-secure=http://localhost','suUvr','baseUrl','7912190jBhvmM','zGVvu','WPoqG','ignoreHTTPSErrors','BwPIG','SUUWA','push','keys','aQOwY','5205klwqWl','getuid','WHcqO','WqOhx','AePqd','lPtja','120379zJASHT','yRZBT','WEUoH','eoLqi','kxhvt','No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','XXaPX','headers','chromium','Ltklg','includes','headless','IVsFw','forWrite','Environment\x20variable\x20','WkCmv','ksyCo','TYBFg','entries','vision','all','pXPxe','MsDEY','args','contextOptions','--no-sandbox','sessions','lwsLd','hELEk','file','stringify','xTMGp','ecwTB','tempAuthPath','startsWith','iiCMt','RPhdY','clipboard-write','--disable-setuid-sandbox','jfyXJ','JlAwn','XOHBj','storageState','split','mgQNl','map','header','indexOf','path','extraHTTPHeaders','225272dRnNnJ','location','ZtIlD','nzbIU','length'];_0x49fe=function(){return _0x17a419;};return _0x49fe();}export function resolveEnvVars(_0x3ead2f){const _0x5a82bf=_0x2f80,_0x28280b={'zuUvZ':function(_0x5618e2,_0x40f3d3){return _0x5618e2===_0x40f3d3;},'pCPgg':'string','VLuaI':_0x5a82bf(0x1d6)};if(typeof _0x3ead2f===_0x28280b[_0x5a82bf(0x1c3)])return _0x3ead2f['replace'](/\$\{(\w+)\}/g,(_0x3d7318,_0x2dd057)=>{const _0x47d489=_0x5a82bf,_0x339773=process[_0x47d489(0x1af)][_0x2dd057];if(_0x28280b['zuUvZ'](_0x339773,undefined))throw new Error(_0x47d489(0x203)+_0x2dd057+'\x20is\x20not\x20set');return _0x339773;});if(Array['isArray'](_0x3ead2f))return _0x3ead2f['map'](resolveEnvVars);if(_0x3ead2f&&_0x28280b['zuUvZ'](typeof _0x3ead2f,_0x28280b[_0x5a82bf(0x1c5)]))return Object['fromEntries'](Object['entries'](_0x3ead2f)[_0x5a82bf(0x194)](([_0x11237a,_0x4f329e])=>[_0x11237a,resolveEnvVars(_0x4f329e)]));return _0x3ead2f;}const isRecord=_0x39e917=>typeof _0x39e917===_0x350f8c(0x1d6)&&_0x39e917!==null&&!Array[_0x350f8c(0x1d4)](_0x39e917),asRecord=_0xe308ae=>isRecord(_0xe308ae)?_0xe308ae:undefined,mergeHeaders=(_0x449264,_0x22d19f)=>{const _0x33fba8=_0x350f8c,_0x1cb80f={'TYBFg':function(_0x34419c,_0x11e5bc){return _0x34419c??_0x11e5bc;}},_0x316b2a={..._0x1cb80f[_0x33fba8(0x206)](_0x449264,{}),..._0x1cb80f['TYBFg'](_0x22d19f,{})};return Object[_0x33fba8(0x1ed)](_0x316b2a)[_0x33fba8(0x19d)]?_0x316b2a:undefined;},SAFE_MODE_ARGS=['--disable-features=WebBluetooth'],ALLOW_LOCALHOST_ARGS=['--disable-web-security',_0x350f8c(0x1a0),_0x350f8c(0x1e3),_0x350f8c(0x1df)];export function buildBrowserOptionsFromSettings(_0x5e1c27,_0x46f17b={}){const _0x203d79=_0x350f8c,_0x21d281={'iiCMt':function(_0x369535,_0x581d74){return _0x369535===_0x581d74;},'bBUws':function(_0xee2908,_0x48ec71){return _0xee2908(_0x48ec71);},'nidNQ':function(_0x4e73b7,_0x279df5){return _0x4e73b7(_0x279df5);}},_0x5366e0=asRecord(_0x5e1c27['browser']),_0x8222c5={...asRecord(_0x5366e0?.['launchOptions'])??{}};_0x21d281['iiCMt'](typeof _0x46f17b[_0x203d79(0x200)],'boolean')&&(_0x8222c5['headless']=_0x46f17b[_0x203d79(0x200)]);if(_0x5e1c27['safeMode']){const _0x56c5bb=_0x8222c5['args']??[],_0x149880=SAFE_MODE_ARGS['filter'](_0x369426=>!_0x56c5bb[_0x203d79(0x1ff)](_0x369426));_0x8222c5['args']=[..._0x56c5bb,..._0x149880];}if(_0x5e1c27['allowInsecureLocalhost']){const _0x30aa53=_0x8222c5['args']??[],_0x1ee3ca=ALLOW_LOCALHOST_ARGS[_0x203d79(0x1b3)](_0x89ed36=>!_0x30aa53['includes'](_0x89ed36));_0x8222c5[_0x203d79(0x20c)]=[..._0x30aa53,..._0x1ee3ca];}const _0x5a0aa5={..._0x21d281['bBUws'](asRecord,_0x5366e0?.[_0x203d79(0x20d)])??{}};_0x5a0aa5[_0x203d79(0x1e9)]=!![];_0x21d281[_0x203d79(0x18a)](typeof _0x5e1c27['userAgent'],'string')&&(_0x5a0aa5[_0x203d79(0x1d7)]=_0x5e1c27['userAgent']);const _0xe53d91=mergeHeaders(_0x21d281['nidNQ'](asRecord,_0x5a0aa5[_0x203d79(0x198)]),_0x21d281['bBUws'](asRecord,_0x5e1c27[_0x203d79(0x1fc)]));return _0xe53d91?_0x5a0aa5[_0x203d79(0x198)]=_0xe53d91:delete _0x5a0aa5['extraHTTPHeaders'],_0x46f17b[_0x203d79(0x1e0)]&&(_0x5a0aa5['storageState']=_0x46f17b['storageStatePath']),{'launchOptions':_0x8222c5,'contextOptions':_0x5a0aa5};}export async function resolveProfileStorageState(_0x3a4597){return resolveLocalAuthPath(getEnvDir(_0x3a4597));}async function resolveLocalAuthPath(_0x479053){const _0x3aec3a=_0x350f8c,_0x2ad0e7={'FtsKk':_0x3aec3a(0x1c8),'zGVvu':_0x3aec3a(0x1c2),'IVsFw':function(_0x44e244,_0x12f80f){return _0x44e244(_0x12f80f);},'yPVpB':_0x3aec3a(0x1fa),'xTMGp':function(_0x29581a,_0x1cad01,_0x4e4f08){return _0x29581a(_0x1cad01,_0x4e4f08);}},_0x27e8e7=join(_0x479053,_0x2ad0e7['FtsKk']),_0xbda852=join(_0x479053,_0x2ad0e7[_0x3aec3a(0x1e7)]);if(_0x2ad0e7['IVsFw'](existsSync,_0x27e8e7))try{const _0x230815=await getToken();if(!_0x230815)throw new Error(_0x2ad0e7['yPVpB']);const _0x108a37=await _0x2ad0e7[_0x3aec3a(0x201)](readFile,_0x27e8e7),_0x3ed77b=decrypt(_0x108a37,_0x230815),_0x4b80e0=_0x2ad0e7[_0x3aec3a(0x186)](join,tmpdir(),_0x3aec3a(0x19e)+Date['now']()+'.json');return await _0x2ad0e7['xTMGp'](writeFile,_0x4b80e0,_0x3ed77b),{'storageStatePath':_0x4b80e0,'tempAuthPath':_0x4b80e0};}catch(_0x16a8f4){const _0xbd04d0=_0x16a8f4 instanceof Error?_0x16a8f4['message']:_0x2ad0e7['IVsFw'](String,_0x16a8f4);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0xbd04d0);}if(existsSync(_0xbda852))return{'storageStatePath':_0xbda852};return{};}export async function buildPlaywrightConfig(_0x405714,_0x4a44ec,_0x5bed6b,_0x498030,_0x586364){const _0x1e5c18=_0x350f8c,_0x33c820={'JlAwn':function(_0x1cba71,_0xd47356,_0x3a863b,_0x53c5c5,_0x383e12,_0x51316a,_0x31634a){return _0x1cba71(_0xd47356,_0x3a863b,_0x53c5c5,_0x383e12,_0x51316a,_0x31634a);}};if(_0x586364)return buildPlaywrightConfigCore(_0x405714,_0x586364,_0x4a44ec,_0x5bed6b,_0x498030,'stagehand');const {storageStatePath:_0x45eac0,tempAuthPath:_0x2f2742}=await resolveLocalAuthPath(getEnvDir(_0x4a44ec));try{const _0xa67f15=await _0x33c820[_0x1e5c18(0x18f)](buildPlaywrightConfigCore,_0x405714,_0x45eac0,_0x4a44ec,_0x5bed6b,_0x498030,'stagehand');return{..._0xa67f15,'tempAuthPath':_0x2f2742};}catch(_0x5dd097){_0x2f2742&&await unlink(_0x2f2742)['catch'](()=>{});throw _0x5dd097;}}export async function buildPlaywrightConfigCore(_0x453d3f,_0x268ec0,_0x4adfd9,_0x5aeb4b,_0x31a246,_0x4425dc='stagehand'){const _0x227e03=_0x350f8c,_0x3cd448={'XXaPX':'--no-sandbox','bGRgH':'chromium','Ltklg':'clipboard-read','YEMDg':function(_0x111f1c,_0x2ae577,_0x5b3f25,_0xc06953){return _0x111f1c(_0x2ae577,_0x5b3f25,_0xc06953);},'fpHJs':function(_0x91a835){return _0x91a835();},'EHWzi':_0x227e03(0x20f),'gZOgJ':function(_0x6798ab,_0x18faca){return _0x6798ab===_0x18faca;},'xvDqS':_0x227e03(0x1da),'lPtja':_0x227e03(0x184),'eoLqi':_0x227e03(0x1a1),'ellII':_0x227e03(0x1c6),'jEIAT':'tabs','kxhvt':'install','vMMFr':'pdf','TGFvL':'allow','WHcqO':function(_0x37e80b,_0x382a61){return _0x37e80b===_0x382a61;},'hELEk':_0x227e03(0x1e2),'RCcjL':function(_0xc7dc66,_0x10e13f){return _0xc7dc66(_0x10e13f);},'XOHBj':function(_0x336e9d,_0x2e32b0,_0x5e5267){return _0x336e9d(_0x2e32b0,_0x5e5267);},'nwLZA':'-cli'},_0x29db8d=_0x5aeb4b||randomUUID(),_0x4d55b8=_0x3cd448['YEMDg'](join,_0x3cd448['fpHJs'](getRangerDir),_0x3cd448['EHWzi'],_0x29db8d),_0x5cebd0=Boolean(_0x453d3f['cdpEndpoint']),_0x2619ea=_0x5cebd0?{'browserName':_0x3cd448[_0x227e03(0x1ab)],'cdpEndpoint':_0x453d3f[_0x227e03(0x1cc)]}:((()=>{const _0x3a9dfd=_0x227e03,{launchOptions:_0x19e1c3,contextOptions:_0x220181}=buildBrowserOptionsFromSettings(_0x453d3f,{'headless':_0x31a246?![]:_0x453d3f['headless']??!![],'storageStatePath':_0x268ec0});if(process[_0x3a9dfd(0x1f0)]?.()===0x0){const _0x2291ac=[_0x3cd448[_0x3a9dfd(0x1fb)],_0x3a9dfd(0x18d)],_0x31e494=_0x19e1c3['args']??[],_0x2ebc1e=_0x2291ac[_0x3a9dfd(0x1b3)](_0x3a598f=>!_0x31e494[_0x3a9dfd(0x1ff)](_0x3a598f));_0x19e1c3['args']=[..._0x31e494,..._0x2ebc1e];}return{'isolated':!![],'browserName':_0x3cd448['bGRgH'],'launchOptions':_0x19e1c3,'contextOptions':{..._0x220181,'permissions':[_0x3cd448[_0x3a9dfd(0x1fe)],'clipboard-write'],'viewport':{'width':0x500,'height':0x2d0}}};})()),_0x43bb7=_0x3cd448['gZOgJ'](_0x4425dc,_0x3cd448[_0x227e03(0x1ae)])?{'browser':_0x2619ea,'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4d55b8,'outputMode':_0x3cd448[_0x227e03(0x1f4)],'codegen':_0x3cd448[_0x227e03(0x1f8)]}:{'name':_0x4adfd9,'browser':_0x2619ea,'capabilities':[_0x3cd448[_0x227e03(0x1a5)],_0x3cd448['jEIAT'],_0x3cd448[_0x227e03(0x1f9)],_0x3cd448['vMMFr'],_0x227e03(0x208)],'imageResponses':_0x3cd448[_0x227e03(0x1cf)],'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x4d55b8};if(!_0x5cebd0){const _0x1dd577=_0x43bb7['browser'],_0x253f6f=_0x1dd577[_0x227e03(0x20d)];if(_0x253f6f[_0x227e03(0x1d7)]===undefined)delete _0x253f6f[_0x227e03(0x1d7)];if(_0x3cd448[_0x227e03(0x1f1)](_0x253f6f[_0x227e03(0x191)],undefined))delete _0x253f6f[_0x227e03(0x191)];}const _0x2ec152=join(tmpdir(),_0x3cd448[_0x227e03(0x183)]);!_0x3cd448[_0x227e03(0x1b5)](existsSync,_0x2ec152)&&await _0x3cd448[_0x227e03(0x190)](mkdir,_0x2ec152,{'recursive':!![]});const _0x28b24c=_0x4425dc===_0x3cd448['xvDqS']?_0x3cd448[_0x227e03(0x1ca)]:'',_0xe11acf=join(_0x2ec152,_0x4adfd9+'-'+Date['now']()+_0x28b24c+'.json');return await writeFile(_0xe11acf,JSON[_0x227e03(0x185)](_0x43bb7,null,0x2)),{'configPath':_0xe11acf,'storageStatePath':_0x268ec0};}export async function buildPlaywrightCliConfig(_0x216c90,_0x365210,_0x124998,_0x14f13d,_0x4db165){const _0xe1ea70=_0x350f8c,_0x32fea1={'pXPxe':_0xe1ea70(0x1da)};if(_0x4db165)return buildPlaywrightConfigCore(_0x216c90,_0x4db165,_0x365210,_0x124998,_0x14f13d,_0x32fea1['pXPxe']);const {storageStatePath:_0x15dd43,tempAuthPath:_0x354e93}=await resolveLocalAuthPath(getEnvDir(_0x365210));try{const _0x20b55d=await buildPlaywrightConfigCore(_0x216c90,_0x15dd43,_0x365210,_0x124998,_0x14f13d,_0x32fea1[_0xe1ea70(0x20a)]);return{..._0x20b55d,'tempAuthPath':_0x354e93};}catch(_0x5caf30){_0x354e93&&await unlink(_0x354e93)[_0xe1ea70(0x1b7)](()=>{});throw _0x5caf30;}}export async function buildRangerwrightCliConfig(_0x174b49,_0x49e5d5,_0x2ec594,_0xb9caaf,_0x4566c9){const _0x357164=_0x350f8c,_0x34ad57={'wqFNB':function(_0x159cd1,_0x1e781e){return _0x159cd1===_0x1e781e;},'OrtHn':_0x357164(0x20e),'zUwgO':'chromium','ceWcN':_0x357164(0x1b2),'fayrb':_0x357164(0x18c),'PDsCz':function(_0x1e3ae0){return _0x1e3ae0();},'NTgJf':function(_0x4fb436,_0x432341,_0x40f73b,_0x124242){return _0x4fb436(_0x432341,_0x40f73b,_0x124242);},'AAaOj':function(_0x1fe97c,_0x596d85){return _0x1fe97c===_0x596d85;},'mgQNl':function(_0x9656b6,_0x4eebfa,_0x265f7a){return _0x9656b6(_0x4eebfa,_0x265f7a);},'zbpix':function(_0x389bfd){return _0x389bfd();},'UzxOi':_0x357164(0x1e2),'ZtIlD':function(_0x31e7c2,_0x45a713,_0xe3de54){return _0x31e7c2(_0x45a713,_0xe3de54);},'lwsLd':function(_0x43af1c,_0x5f09d6){return _0x43af1c(_0x5f09d6);}},{storageStatePath:_0x35c4ac,tempAuthPath:_0x3f0d7a}=_0x4566c9?{'storageStatePath':_0x4566c9,'tempAuthPath':undefined}:await resolveLocalAuthPath(getEnvDir(_0x49e5d5)),_0x23a522=_0x2ec594||_0x34ad57[_0x357164(0x1bd)](randomUUID),_0x35a18c=_0x34ad57[_0x357164(0x1b9)](join,getRangerDir(),_0x357164(0x20f),_0x23a522),_0x419e8e=Boolean(_0x174b49[_0x357164(0x1cc)]),_0x1e1b5a=_0x419e8e?{'browserName':_0x357164(0x1fd),'cdpEndpoint':_0x174b49['cdpEndpoint']}:((()=>{const _0x4e8b17=_0x357164,{launchOptions:_0x3c35f1,contextOptions:_0x10a965}=buildBrowserOptionsFromSettings(_0x174b49,{'headless':_0xb9caaf?![]:_0x174b49['headless']??!![],'storageStatePath':_0x35c4ac});if(_0x34ad57['wqFNB'](process[_0x4e8b17(0x1f0)]?.(),0x0)){const _0x2ef18d=[_0x34ad57[_0x4e8b17(0x1c0)],_0x4e8b17(0x18d)],_0x10aee4=_0x3c35f1['args']??[],_0x3276fa=_0x2ef18d[_0x4e8b17(0x1b3)](_0x4c5a9a=>!_0x10aee4[_0x4e8b17(0x1ff)](_0x4c5a9a));_0x3c35f1['args']=[..._0x10aee4,..._0x3276fa];}return{'browserName':_0x34ad57['zUwgO'],'launchOptions':_0x3c35f1,'contextOptions':{..._0x10a965,'permissions':[_0x34ad57['ceWcN'],_0x34ad57['fayrb']],'viewport':{'width':0x500,'height':0x2d0}}};})());if(!_0x419e8e){const _0x889143=_0x1e1b5a['contextOptions'];if(_0x889143){if(_0x34ad57[_0x357164(0x1a6)](_0x889143[_0x357164(0x1d7)],undefined))delete _0x889143['userAgent'];if(_0x889143['storageState']===undefined)delete _0x889143[_0x357164(0x191)];}}const _0x449a69={'browser':_0x1e1b5a,'outputDir':_0x35a18c,'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'settle':{'navigationLoadTimeoutMs':0x7530,'networkSettleTimeoutMs':0x1388,'networkIdleWindowMs':0x1f4,'postActionAnimationFrameCount':0x2}};let _0x422f30;try{const _0x593e7c=_0x34ad57[_0x357164(0x193)](join,_0x34ad57['zbpix'](tmpdir),_0x34ad57['UzxOi']);!existsSync(_0x593e7c)&&await mkdir(_0x593e7c,{'recursive':!![]}),_0x422f30=join(_0x593e7c,_0x49e5d5+'-'+Date['now']()+'-rangerwright.json'),await _0x34ad57[_0x357164(0x19b)](writeFile,_0x422f30,JSON[_0x357164(0x185)](_0x449a69,null,0x2));}catch(_0x5c9b79){_0x3f0d7a&&await _0x34ad57[_0x357164(0x182)](unlink,_0x3f0d7a)['catch'](()=>{});throw _0x5c9b79;}return{'configPath':_0x422f30,'storageStatePath':_0x35c4ac,'tempAuthPath':_0x3f0d7a,'outputDir':_0x35a18c};}export async function buildNovaActCliConfig(_0x1792d2,_0x28e4f3,_0x500464,_0x4dcdb0,_0x14d626){const _0x27705d=_0x350f8c,_0x3cf182={'godxh':function(_0x306fe5,_0x434f0e){return _0x306fe5(_0x434f0e);},'SUUWA':function(_0x4114e2){return _0x4114e2();},'uSmXx':'sessions','aQOwY':function(_0x32c407,_0x1c56fe,_0x4feac5){return _0x32c407(_0x1c56fe,_0x4feac5);},'EuTfP':'nova-user-data','cnclN':function(_0x4f1203,_0x5cb2b5,_0xd7558a){return _0x4f1203(_0x5cb2b5,_0xd7558a);},'DDNgA':'Default','AePqd':function(_0x87ffa4,_0x5946c3){return _0x87ffa4===_0x5946c3;},'WEUoH':'--disable-setuid-sandbox','GJnqD':'string','fUKkt':function(_0x36484d,_0x211fb3){return _0x36484d(_0x211fb3);},'MyPAy':function(_0x2aa3cd,_0x3ed27c){return _0x2aa3cd(_0x3ed27c);}},{storageStatePath:_0xf920be,tempAuthPath:_0x3f9dde}=_0x14d626?{'storageStatePath':_0x14d626,'tempAuthPath':undefined}:await _0x3cf182['godxh'](resolveLocalAuthPath,getEnvDir(_0x28e4f3)),_0x1d034d=_0x500464||_0x3cf182[_0x27705d(0x1eb)](randomUUID),_0x1d8469=join(getRangerDir(),_0x3cf182[_0x27705d(0x1a8)],_0x1d034d),_0x51bd5b=_0x3cf182[_0x27705d(0x1ee)](join,_0x1d8469,_0x3cf182[_0x27705d(0x1c9)]),_0x17a367=_0xf920be?_0x3cf182[_0x27705d(0x1b1)](join,_0x51bd5b,_0x3cf182['DDNgA']):undefined,{launchOptions:_0x295564,contextOptions:_0x4789a8}=_0x3cf182[_0x27705d(0x1ee)](buildBrowserOptionsFromSettings,_0x1792d2,{'headless':_0x4dcdb0?![]:_0x1792d2['headless']??!![],'storageStatePath':_0xf920be});if(_0x3cf182[_0x27705d(0x1f3)](process[_0x27705d(0x1f0)]?.(),0x0)){const _0x72a8a2=[_0x27705d(0x20e),_0x3cf182[_0x27705d(0x1f7)]],_0x531a11=_0x295564[_0x27705d(0x20c)]??[],_0x5664e8=_0x72a8a2[_0x27705d(0x1b3)](_0x3555ff=>!_0x531a11['includes'](_0x3555ff));_0x295564[_0x27705d(0x20c)]=[..._0x531a11,..._0x5664e8];}const _0x575e56=typeof _0x295564[_0x27705d(0x1ac)]===_0x3cf182['GJnqD']?_0x295564[_0x27705d(0x1ac)]:_0xf920be?chromium[_0x27705d(0x1ac)]():undefined;return{'storageStatePath':_0xf920be,'tempAuthPath':_0x3f9dde,'baseUrl':_0x1792d2[_0x27705d(0x1e5)],'headless':Boolean(_0x295564[_0x27705d(0x200)]),'userDataDir':_0x51bd5b,'browserProfilePath':_0x17a367,'executablePath':_0x575e56,'launchArgs':Array['isArray'](_0x295564[_0x27705d(0x20c)])?_0x295564[_0x27705d(0x20c)][_0x27705d(0x1b3)](_0x27955b=>typeof _0x27955b==='string'):[],'userAgent':_0x3cf182['AePqd'](typeof _0x4789a8['userAgent'],_0x27705d(0x1cd))?_0x4789a8[_0x27705d(0x1d7)]:undefined,'extraHTTPHeaders':_0x4789a8['extraHTTPHeaders'],'allowInsecureLocalhost':_0x3cf182['fUKkt'](Boolean,_0x1792d2[_0x27705d(0x1a7)]),'safeMode':_0x3cf182['fUKkt'](Boolean,_0x1792d2[_0x27705d(0x1c1)]),'cdpEndpoint':_0x1792d2[_0x27705d(0x1cc)],'isCdpMode':_0x3cf182['MyPAy'](Boolean,_0x1792d2[_0x27705d(0x1cc)])};}export function getNestedValue(_0x1b32ea,_0x6ed700){const _0x26409b=_0x350f8c,_0x5848fa={'WqOhx':function(_0x1052ae,_0x3c9b62){return _0x1052ae(_0x3c9b62);},'cCPFK':function(_0x2e93a6,_0x1ab77e){return _0x2e93a6===_0x1ab77e;},'fABFA':function(_0x5a357b,_0x5c54bc){return _0x5a357b!==_0x5c54bc;},'jYMPM':'object'},_0x4d2ae7=_0x5848fa[_0x26409b(0x1f2)](parseKeyPath,_0x6ed700);let _0x3cd5d0=_0x1b32ea;for(const _0x40e6fd of _0x4d2ae7){if(_0x3cd5d0===null||_0x5848fa[_0x26409b(0x1ce)](_0x3cd5d0,undefined)||_0x5848fa['fABFA'](typeof _0x3cd5d0,_0x5848fa['jYMPM']))return undefined;_0x3cd5d0=_0x3cd5d0[_0x40e6fd];}return _0x3cd5d0;}export function setNestedValue(_0x435e50,_0x488a64,_0x44607b){const _0x165333=_0x350f8c,_0x58c074={'DQgIj':function(_0x28fec3,_0x55e527){return _0x28fec3(_0x55e527);},'vvfyu':function(_0x5e0141,_0x2b7f6d){return _0x5e0141-_0x2b7f6d;},'jlWAM':function(_0x50e8b9,_0x5ddfb8){return _0x50e8b9 in _0x5ddfb8;},'EnkaZ':function(_0x34962d,_0xf625f0){return _0x34962d!==_0xf625f0;},'sWKWZ':_0x165333(0x1d6),'HQiqn':function(_0x592d73,_0x1d0502){return _0x592d73-_0x1d0502;}},_0x174507=_0x58c074['DQgIj'](parseKeyPath,_0x488a64);let _0x5b17d9=_0x435e50;for(let _0x4361e6=0x0;_0x4361e6<_0x58c074['vvfyu'](_0x174507['length'],0x1);_0x4361e6++){const _0x29a249=_0x174507[_0x4361e6];(!_0x58c074['jlWAM'](_0x29a249,_0x5b17d9)||_0x58c074[_0x165333(0x1d0)](typeof _0x5b17d9[_0x29a249],_0x58c074['sWKWZ']))&&(_0x5b17d9[_0x29a249]={}),_0x5b17d9=_0x5b17d9[_0x29a249];}_0x5b17d9[_0x174507[_0x58c074['HQiqn'](_0x174507[_0x165333(0x19d)],0x1)]]=_0x44607b;}export function deleteNestedValue(_0x5bd15f,_0x1dcee5){const _0x9172f3=_0x350f8c,_0x18ab43={'urbUF':function(_0x5277e2,_0x1a08f4){return _0x5277e2<_0x1a08f4;},'suUvr':function(_0x38bf16,_0x1adcd1){return _0x38bf16-_0x1adcd1;},'RTETM':function(_0x5b8dcf,_0x188d1d){return _0x5b8dcf===_0x188d1d;},'ecwTB':function(_0x197058,_0x22f5a7){return _0x197058!==_0x22f5a7;},'NjkgC':'object','RPhdY':function(_0x40c108,_0x2e4f36){return _0x40c108!==_0x2e4f36;},'dPTfn':function(_0x22e4f1,_0x243798){return _0x22e4f1-_0x243798;},'MVugv':function(_0x326dc0,_0x3d0328){return _0x326dc0 in _0x3d0328;}},_0x18fff6=parseKeyPath(_0x1dcee5);let _0x2d73c6=_0x5bd15f;for(let _0x9dc07a=0x0;_0x18ab43[_0x9172f3(0x1de)](_0x9dc07a,_0x18ab43[_0x9172f3(0x1e4)](_0x18fff6[_0x9172f3(0x19d)],0x1));_0x9dc07a++){if(_0x2d73c6===null||_0x18ab43['RTETM'](_0x2d73c6,undefined)||_0x18ab43[_0x9172f3(0x187)](typeof _0x2d73c6,_0x18ab43[_0x9172f3(0x1ad)]))return![];_0x2d73c6=_0x2d73c6[_0x18fff6[_0x9dc07a]];}if(_0x2d73c6===null||_0x2d73c6===undefined||_0x18ab43[_0x9172f3(0x18b)](typeof _0x2d73c6,_0x18ab43[_0x9172f3(0x1ad)]))return![];const _0x34d6d7=_0x18fff6[_0x18ab43['dPTfn'](_0x18fff6[_0x9172f3(0x19d)],0x1)];if(_0x18ab43['MVugv'](_0x34d6d7,_0x2d73c6))return delete _0x2d73c6[_0x34d6d7],!![];return![];}function parseKeyPath(_0x48813d){const _0x2244fe=_0x350f8c,_0x28f1e4={'ZPERX':function(_0x575bc1,_0x5e28a4){return _0x575bc1===_0x5e28a4;},'Agelu':_0x2244fe(0x195),'nzbIU':_0x2244fe(0x1fc),'DaybF':'setupHeader'},_0x1e25d5=_0x48813d[_0x2244fe(0x192)]('.');return _0x28f1e4['ZPERX'](_0x1e25d5[0x0],_0x28f1e4['Agelu'])&&(_0x1e25d5[0x0]=_0x28f1e4[_0x2244fe(0x19c)]),_0x28f1e4['ZPERX'](_0x1e25d5[0x0],_0x28f1e4['DaybF'])&&(_0x1e25d5[0x0]='setupHeaders'),_0x1e25d5;}export function formatSettings(_0x2e02fe,_0x15c740=0x0){const _0x32dd9b=_0x350f8c,_0x1d9088={'rZMQx':_0x32dd9b(0x1d6)},_0x2ea690=[],_0x15bfa5='\x20\x20'['repeat'](_0x15c740);for(const [_0x2f856d,_0x41aa1b]of Object['entries'](_0x2e02fe)){if(_0x41aa1b===undefined)continue;if(typeof _0x41aa1b===_0x1d9088[_0x32dd9b(0x1bc)]&&_0x41aa1b!==null){_0x2ea690[_0x32dd9b(0x1ec)](''+_0x15bfa5+_0x2f856d+':');for(const [_0x578ab8,_0x14e6ab]of Object[_0x32dd9b(0x207)](_0x41aa1b)){_0x2ea690['push'](_0x15bfa5+'\x20\x20'+_0x578ab8+':\x20'+_0x14e6ab);}}else _0x2ea690[_0x32dd9b(0x1ec)](''+_0x15bfa5+_0x2f856d+':\x20'+_0x41aa1b);}return _0x2ea690[_0x32dd9b(0x1c7)]('\x0a');}
@@ -1 +1 @@
1
- (function(_0x1409cb,_0x7650b8){const _0x27f097=_0x4a92,_0x51867c=_0x1409cb();while(!![]){try{const _0x836b7b=parseInt(_0x27f097(0x145))/0x1*(parseInt(_0x27f097(0x144))/0x2)+parseInt(_0x27f097(0x13f))/0x3*(-parseInt(_0x27f097(0x147))/0x4)+-parseInt(_0x27f097(0x13d))/0x5+-parseInt(_0x27f097(0x140))/0x6*(parseInt(_0x27f097(0x13e))/0x7)+parseInt(_0x27f097(0x142))/0x8*(parseInt(_0x27f097(0x13c))/0x9)+-parseInt(_0x27f097(0x146))/0xa+parseInt(_0x27f097(0x141))/0xb*(parseInt(_0x27f097(0x143))/0xc);if(_0x836b7b===_0x7650b8)break;else _0x51867c['push'](_0x51867c['shift']());}catch(_0x6e8612){_0x51867c['push'](_0x51867c['shift']());}}}(_0x5b7b,0x8a310));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function _0x4a92(_0x43b431,_0x196b40){_0x43b431=_0x43b431-0x139;const _0x5b7b65=_0x5b7b();let _0x4a9291=_0x5b7b65[_0x43b431];return _0x4a9291;}function _0x5b7b(){const _0x55b6fa=['2066398HCvloq','1ZEXLxJ','5523040tRAQgg','132UbzwyV','utf-8','TlAPM','ranger/SKILL.md','27rKeetn','5495820WnaGtX','6898766rQtULc','98994ukfkti','6iEZUIY','33338074WQCWgu','608104YTlatw','12rsCpIe'];_0x5b7b=function(){return _0x55b6fa;};return _0x5b7b();}export function readSkillContent(_0x36a38d){const _0x33e6bd=_0x4a92,_0x3e790b={'Jkbln':function(_0xb5c231,_0x5e057e,_0x157ac1,_0x375f60,_0x105ef3){return _0xb5c231(_0x5e057e,_0x157ac1,_0x375f60,_0x105ef3);},'TlAPM':function(_0x3cc804,_0x2d5283,_0x20eb14){return _0x3cc804(_0x2d5283,_0x20eb14);},'uCYQz':_0x33e6bd(0x139)},_0x533107=_0x3e790b['Jkbln'](join,__dirname,'..','..','skills'),_0x2728f1=_0x3e790b[_0x33e6bd(0x13a)](join,_0x533107,_0x36a38d);try{return readFileSync(_0x2728f1,_0x3e790b['uCYQz']);}catch{return'';}}export function getRangerSkillContent(){const _0x4e46c6=_0x4a92;return readSkillContent(_0x4e46c6(0x13b));}
1
+ (function(_0x42a0ee,_0x33e4bb){const _0x17f124=_0x51c2,_0x471484=_0x42a0ee();while(!![]){try{const _0x1707b6=-parseInt(_0x17f124(0x92))/0x1+-parseInt(_0x17f124(0x99))/0x2*(parseInt(_0x17f124(0x94))/0x3)+parseInt(_0x17f124(0x93))/0x4+parseInt(_0x17f124(0x91))/0x5+parseInt(_0x17f124(0x8f))/0x6+parseInt(_0x17f124(0x8c))/0x7*(parseInt(_0x17f124(0x97))/0x8)+parseInt(_0x17f124(0x8e))/0x9*(-parseInt(_0x17f124(0x95))/0xa);if(_0x1707b6===_0x33e4bb)break;else _0x471484['push'](_0x471484['shift']());}catch(_0x2a8d2f){_0x471484['push'](_0x471484['shift']());}}}(_0x1fe6,0x1ff2b));import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';function _0x51c2(_0x503b1e,_0x33da26){_0x503b1e=_0x503b1e-0x8c;const _0x1fe6d3=_0x1fe6();let _0x51c2fb=_0x1fe6d3[_0x503b1e];return _0x51c2fb;}function _0x1fe6(){const _0x25fe6e=['9TSefOQ','20uAICHX','fpkJV','2360wbNcDS','ranger/SKILL.md','95638LOrnVK','5747jBdBgx','qSAZy','1275903XwSiBL','1472208YcTTIc','skills','762010OKNAha','108660gcTteZ','106180zfLigW'];_0x1fe6=function(){return _0x25fe6e;};return _0x1fe6();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x3d86f1){const _0x3d0d82=_0x51c2,_0x15483a={'fpkJV':function(_0x213b19,_0x562dc0,_0x368018,_0x41e56b,_0xbed51e){return _0x213b19(_0x562dc0,_0x368018,_0x41e56b,_0xbed51e);},'qSAZy':_0x3d0d82(0x90),'mFCze':function(_0x119dea,_0xd83eab,_0x276cd4){return _0x119dea(_0xd83eab,_0x276cd4);},'kHrAE':'utf-8'},_0x4262d0=_0x15483a[_0x3d0d82(0x96)](join,__dirname,'..','..',_0x15483a[_0x3d0d82(0x8d)]),_0x557192=_0x15483a['mFCze'](join,_0x4262d0,_0x3d86f1);try{return _0x15483a['mFCze'](readFileSync,_0x557192,_0x15483a['kHrAE']);}catch{return'';}}export function getRangerSkillContent(){const _0x154565=_0x51c2;return readSkillContent(_0x154565(0x98));}
@@ -1 +1 @@
1
- const _0x46f14a=_0x488b;(function(_0x253ae4,_0x15bcff){const _0xcd736b=_0x488b,_0x54ff8d=_0x253ae4();while(!![]){try{const _0x5457da=parseInt(_0xcd736b(0x105))/0x1+parseInt(_0xcd736b(0x103))/0x2+-parseInt(_0xcd736b(0x11c))/0x3+parseInt(_0xcd736b(0x10c))/0x4+parseInt(_0xcd736b(0x119))/0x5+parseInt(_0xcd736b(0x112))/0x6+parseInt(_0xcd736b(0x104))/0x7*(-parseInt(_0xcd736b(0x10d))/0x8);if(_0x5457da===_0x15bcff)break;else _0x54ff8d['push'](_0x54ff8d['shift']());}catch(_0x4ffbb3){_0x54ff8d['push'](_0x54ff8d['shift']());}}}(_0x5f1d,0xd8b71));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';function _0x5f1d(){const _0x5a471b=['2905018FIPrJM','1772029fnddiC','364768bzNyfe','kFaIw','push','catch','VsBqk','filter','match','4251876NLaBcp','136XIpCGy','rSDlN','DWsZf','length','\x20\x20Skill\x20not\x20found:\x20','10398330AiIlRH','WExyD','isDirectory','trim','log','SMAzr','\x20\x20Files:\x20','8167720lcTCEw','project','npNJD','3167043ETlCzM','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','ranger','warn','utf-8','SKILL.md'];_0x5f1d=function(){return _0x5a471b;};return _0x5f1d();}import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';function _0x488b(_0x3099d4,_0x49eda0){_0x3099d4=_0x3099d4-0x103;const _0x5f1d02=_0x5f1d();let _0x488b10=_0x5f1d02[_0x3099d4];return _0x488b10;}import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=[_0x46f14a(0x11e)];export const DEPRECATED_SKILLS=['e2e-test-recommender','bug-bash','feature-tracker'];export async function installSkill(_0x598226,_0x460040={}){const _0x27075c=_0x46f14a,_0x49f366={'eSuXC':_0x27075c(0x11a),'kFaIw':'claude','JmznD':function(_0x5e5dc5){return _0x5e5dc5();},'eNHDC':function(_0x57aff9,_0x59eaf3){return _0x57aff9(_0x59eaf3);},'DWsZf':function(_0x432567,_0x19fbf4){return _0x432567(_0x19fbf4);},'SMAzr':'opencode','npNJD':function(_0x115f17,_0xb6bfbb,_0x7e342b){return _0x115f17(_0xb6bfbb,_0x7e342b);},'rSDlN':function(_0x333e50,_0x146f4d){return _0x333e50(_0x146f4d);},'fDJZU':function(_0x2892c6,_0xa14040,_0x15deb6){return _0x2892c6(_0xa14040,_0x15deb6);},'VsBqk':'SKILL.md','HVcmK':_0x27075c(0x120),'WExyD':function(_0x7f0471,_0x2a40cf,_0x4da33a){return _0x7f0471(_0x2a40cf,_0x4da33a);},'yMQkU':function(_0x329088,_0x1dc915){return _0x329088>_0x1dc915;}},{level:level=_0x49f366['eSuXC'],cliVersion:_0x189f2e,platform:platform=_0x49f366[_0x27075c(0x106)]}=_0x460040,_0xf130c1=_0x49f366['JmznD'](getSourceSkillsDir),_0x4ee4ef=join(_0xf130c1,_0x598226),_0xf34a23=join(_0xf130c1,_0x598226+'.md'),_0x5420cc=existsSync(_0x4ee4ef)&&_0x49f366['eNHDC'](statSync,_0x4ee4ef)[_0x27075c(0x114)]()&&existsSync(join(_0x4ee4ef,_0x27075c(0x121))),_0x41f27e=_0x49f366[_0x27075c(0x10f)](existsSync,_0xf34a23);if(!_0x5420cc&&!_0x41f27e)return console[_0x27075c(0x11f)](_0x27075c(0x111)+_0x598226),![];const _0x1405cf=platform===_0x49f366[_0x27075c(0x117)]?getOpencodeSkillsDir(level):_0x49f366['DWsZf'](getSkillsDir,level),_0x1b86ca=join(_0x1405cf,_0x598226);await _0x49f366['npNJD'](mkdir,_0x1b86ca,{'recursive':!![]});let _0x11ad71,_0xd9c709=[];if(_0x5420cc){const _0xe76788=await _0x49f366[_0x27075c(0x10e)](readdir,_0x4ee4ef),_0x120310=_0xe76788[_0x27075c(0x10a)](_0x1cfce0=>_0x1cfce0['endsWith']('.md'));for(const _0x7b9942 of _0x120310){const _0x234c21=_0x49f366[_0x27075c(0x11b)](join,_0x4ee4ef,_0x7b9942),_0x4b6745=join(_0x1b86ca,_0x7b9942);await _0x49f366['npNJD'](copyFile,_0x234c21,_0x4b6745),_0xd9c709[_0x27075c(0x107)](_0x7b9942);}_0x11ad71=await _0x49f366['fDJZU'](readFile,join(_0x4ee4ef,_0x49f366['VsBqk']),_0x49f366['HVcmK']);}else{_0x11ad71=await readFile(_0xf34a23,'utf-8');const _0x219c64=_0x49f366[_0x27075c(0x113)](join,_0x1b86ca,_0x27075c(0x121));await writeFile(_0x219c64,_0x11ad71,_0x27075c(0x120)),_0xd9c709[_0x27075c(0x107)](_0x49f366[_0x27075c(0x109)]);}const {name:_0x3dd546}=parseFrontmatter(_0x11ad71);return console[_0x27075c(0x116)]('\x20\x20Installed\x20skill:\x20'+_0x3dd546),console[_0x27075c(0x116)]('\x20\x20Location:\x20'+_0x1b86ca),_0x49f366['yMQkU'](_0xd9c709[_0x27075c(0x110)],0x1)&&console['log'](_0x27075c(0x118)+_0xd9c709['join'](',\x20')),logLocalAgentInstallation(_0x598226,{'skillDisplayName':_0x3dd546,'installLevel':level},_0x189f2e)[_0x27075c(0x108)](()=>{}),!![];}function getSourceSkillsDir(){const _0x143ffa={'DpsKO':function(_0x4f295b,_0x4efde6,_0x349a06,_0x1f3ee2,_0x3d1a4c){return _0x4f295b(_0x4efde6,_0x349a06,_0x1f3ee2,_0x3d1a4c);},'WWxbX':function(_0x4cfddf,_0x350872,_0x581fcf,_0x16b84b,_0x32ff47,_0x3c71b3){return _0x4cfddf(_0x350872,_0x581fcf,_0x16b84b,_0x32ff47,_0x3c71b3);},'DGXvN':'skills'},_0x55b544=[_0x143ffa['DpsKO'](join,__dirname,'..','..','skills'),_0x143ffa['WWxbX'](join,__dirname,'..','..','..',_0x143ffa['DGXvN'])];for(const _0x584fa4 of _0x55b544){if(existsSync(_0x584fa4))return _0x584fa4;}return _0x55b544[0x0];}function parseFrontmatter(_0x27130b){const _0x4880ee=_0x46f14a,_0x37b9da={'kzvvP':'Invalid\x20skill\x20frontmatter'},_0x2f94cb=_0x27130b['match'](/^---\n([\s\S]+?)\n---/);if(!_0x2f94cb)throw new Error(_0x37b9da['kzvvP']);const _0x37fee9=_0x2f94cb[0x1],_0x44c8db=_0x37fee9['match'](/name:\s*(.+)/),_0xa66ee9=_0x37fee9[_0x4880ee(0x10b)](/description:\s*"?(.+?)"?\n/);return{'name':_0x44c8db?.[0x1][_0x4880ee(0x115)]()||'','description':_0xa66ee9?.[0x1][_0x4880ee(0x115)]()||''};}export async function removeSkill(_0x118500,_0x5ad87e){const _0x110898=_0x46f14a,_0x47c546={'MIdCK':function(_0x51892d,_0x39fc3b,_0x156f54){return _0x51892d(_0x39fc3b,_0x156f54);},'tEBof':function(_0xba7cc1,_0x146f47){return _0xba7cc1(_0x146f47);}},_0x4f98c1=getSkillsDir(_0x5ad87e),_0x230020=_0x47c546['MIdCK'](join,_0x4f98c1,_0x118500);if(!_0x47c546['tEBof'](existsSync,_0x230020))return![];try{return await rm(_0x230020,{'recursive':!![]}),console[_0x110898(0x116)]('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x118500),!![];}catch{return console['warn'](_0x110898(0x11d)+_0x118500),![];}}
1
+ function _0x5058(_0x486140,_0x596a0f){_0x486140=_0x486140-0xbd;const _0x4002cf=_0x4002();let _0x50581f=_0x4002cf[_0x486140];return _0x50581f;}const _0x71c45b=_0x5058;(function(_0xbfa259,_0xb3ee0c){const _0x2da4e3=_0x5058,_0xe75eaa=_0xbfa259();while(!![]){try{const _0x41cbaa=parseInt(_0x2da4e3(0xd3))/0x1*(-parseInt(_0x2da4e3(0xd8))/0x2)+parseInt(_0x2da4e3(0xca))/0x3*(-parseInt(_0x2da4e3(0xbe))/0x4)+parseInt(_0x2da4e3(0xdd))/0x5+-parseInt(_0x2da4e3(0xc6))/0x6*(parseInt(_0x2da4e3(0xd9))/0x7)+-parseInt(_0x2da4e3(0xd2))/0x8+-parseInt(_0x2da4e3(0xcf))/0x9+parseInt(_0x2da4e3(0xcc))/0xa;if(_0x41cbaa===_0xb3ee0c)break;else _0xe75eaa['push'](_0xe75eaa['shift']());}catch(_0x3dcb94){_0xe75eaa['push'](_0xe75eaa['shift']());}}}(_0x4002,0xb7819));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=['e2e-test-recommender',_0x71c45b(0xc2),'feature-tracker'];export async function installSkill(_0x552a14,_0x235bb7={}){const _0xa2b726=_0x71c45b,_0x38fe35={'wpkgm':_0xa2b726(0xd0),'ggqiY':function(_0x4c69bf){return _0x4c69bf();},'PiUhM':function(_0x225f97,_0x207d45,_0x53177d){return _0x225f97(_0x207d45,_0x53177d);},'TtVlh':function(_0x18c60e,_0x660e51,_0x48fef7){return _0x18c60e(_0x660e51,_0x48fef7);},'LFGHS':_0xa2b726(0xd4),'flMZy':function(_0x22c7ed,_0x162a6d){return _0x22c7ed(_0x162a6d);},'IMTgI':function(_0xccdae8,_0x7d08c1){return _0xccdae8&&_0x7d08c1;},'HuBKl':function(_0x489cae,_0xf2951d){return _0x489cae===_0xf2951d;},'rQCFK':function(_0x490e2c,_0x5433df,_0x33e1b8){return _0x490e2c(_0x5433df,_0x33e1b8);},'rZUgO':function(_0x2ea7bd,_0x30e2c1,_0x5be85b){return _0x2ea7bd(_0x30e2c1,_0x5be85b);},'TuqKR':function(_0x53e0bd,_0xd3fa69,_0x2cbfb7){return _0x53e0bd(_0xd3fa69,_0x2cbfb7);},'KFlpE':'utf-8','FzqEc':function(_0x4e7716,_0xd1851e,_0x1aad5d,_0x450f78){return _0x4e7716(_0xd1851e,_0x1aad5d,_0x450f78);},'LSGWc':function(_0x1272f3,_0x593b13,_0x8cb231,_0x90d9){return _0x1272f3(_0x593b13,_0x8cb231,_0x90d9);}},{level:level=_0x38fe35['wpkgm'],cliVersion:_0xc01fe4,platform:platform=_0xa2b726(0xc1)}=_0x235bb7,_0x56efba=_0x38fe35['ggqiY'](getSourceSkillsDir),_0x5823a3=_0x38fe35[_0xa2b726(0xda)](join,_0x56efba,_0x552a14),_0x1b930c=_0x38fe35['TtVlh'](join,_0x56efba,_0x552a14+_0xa2b726(0xd6)),_0x3ebc19=existsSync(_0x5823a3)&&statSync(_0x5823a3)[_0xa2b726(0xdf)]()&&existsSync(join(_0x5823a3,_0x38fe35[_0xa2b726(0xce)])),_0x32a6ff=_0x38fe35['flMZy'](existsSync,_0x1b930c);if(_0x38fe35['IMTgI'](!_0x3ebc19,!_0x32a6ff))return console[_0xa2b726(0xd1)]('\x20\x20Skill\x20not\x20found:\x20'+_0x552a14),![];const _0x4a03b2=_0x38fe35['HuBKl'](platform,_0xa2b726(0xd7))?getOpencodeSkillsDir(level):getSkillsDir(level),_0x5ef416=_0x38fe35[_0xa2b726(0xbd)](join,_0x4a03b2,_0x552a14);await _0x38fe35['rZUgO'](mkdir,_0x5ef416,{'recursive':!![]});let _0x3ef4ae,_0x4de45a=[];if(_0x3ebc19){const _0x3f6b2d=await readdir(_0x5823a3),_0x98e0f9=_0x3f6b2d[_0xa2b726(0xdb)](_0x92989e=>_0x92989e[_0xa2b726(0xc8)](_0xa2b726(0xd6)));for(const _0x1c415c of _0x98e0f9){const _0x1e5fd9=_0x38fe35[_0xa2b726(0xc7)](join,_0x5823a3,_0x1c415c),_0x4e15cb=join(_0x5ef416,_0x1c415c);await copyFile(_0x1e5fd9,_0x4e15cb),_0x4de45a['push'](_0x1c415c);}_0x3ef4ae=await readFile(_0x38fe35[_0xa2b726(0xbd)](join,_0x5823a3,_0x38fe35[_0xa2b726(0xce)]),_0xa2b726(0xdc));}else{_0x3ef4ae=await readFile(_0x1b930c,_0x38fe35['KFlpE']);const _0x2dd03a=join(_0x5ef416,_0x38fe35[_0xa2b726(0xce)]);await _0x38fe35[_0xa2b726(0xde)](writeFile,_0x2dd03a,_0x3ef4ae,_0x38fe35['KFlpE']),_0x4de45a['push'](_0xa2b726(0xd4));}const {name:_0x4d6a9a}=_0x38fe35['flMZy'](parseFrontmatter,_0x3ef4ae);return console['log'](_0xa2b726(0xcb)+_0x4d6a9a),console[_0xa2b726(0xbf)]('\x20\x20Location:\x20'+_0x5ef416),_0x4de45a[_0xa2b726(0xc4)]>0x1&&console[_0xa2b726(0xbf)](_0xa2b726(0xe1)+_0x4de45a['join'](',\x20')),_0x38fe35['LSGWc'](logLocalAgentInstallation,_0x552a14,{'skillDisplayName':_0x4d6a9a,'installLevel':level},_0xc01fe4)[_0xa2b726(0xc9)](()=>{}),!![];}function getSourceSkillsDir(){const _0x33ab8=_0x71c45b,_0xa7a3f1={'XWdHc':function(_0x354999,_0x3540a2,_0x249869,_0x4b0ca8,_0x4c0c7b){return _0x354999(_0x3540a2,_0x249869,_0x4b0ca8,_0x4c0c7b);},'iXgHw':function(_0x490c83,_0x489f9f,_0x221408,_0x561b62,_0x43ced4,_0x1ea1cf){return _0x490c83(_0x489f9f,_0x221408,_0x561b62,_0x43ced4,_0x1ea1cf);},'yRmCY':_0x33ab8(0xc0)},_0xb53fd3=[_0xa7a3f1[_0x33ab8(0xe0)](join,__dirname,'..','..','skills'),_0xa7a3f1['iXgHw'](join,__dirname,'..','..','..',_0xa7a3f1['yRmCY'])];for(const _0x52da of _0xb53fd3){if(existsSync(_0x52da))return _0x52da;}return _0xb53fd3[0x0];}function _0x4002(){const _0x18f27e=['filter','utf-8','368015YmxinF','FzqEc','isDirectory','XWdHc','\x20\x20Files:\x20','rQCFK','17452JCPDUj','log','skills','claude','bug-bash','trim','length','\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20','156EaYDPf','TuqKR','endsWith','catch','372KQTFfN','\x20\x20Installed\x20skill:\x20','29340360MCSVAj','match','LFGHS','1401246QKcPvz','project','warn','1739664fxwdOD','55624dpwrXt','SKILL.md','\x20\x20Removed\x20deprecated\x20skill:\x20','.md','opencode','26uwUlwX','166579pYEFOL','PiUhM'];_0x4002=function(){return _0x18f27e;};return _0x4002();}function parseFrontmatter(_0x31ce73){const _0x8eda56=_0x71c45b,_0x17f58f=_0x31ce73[_0x8eda56(0xcd)](/^---\n([\s\S]+?)\n---/);if(!_0x17f58f)throw new Error('Invalid\x20skill\x20frontmatter');const _0x3599b9=_0x17f58f[0x1],_0x5d12ee=_0x3599b9[_0x8eda56(0xcd)](/name:\s*(.+)/),_0x318758=_0x3599b9[_0x8eda56(0xcd)](/description:\s*"?(.+?)"?\n/);return{'name':_0x5d12ee?.[0x1][_0x8eda56(0xc3)]()||'','description':_0x318758?.[0x1][_0x8eda56(0xc3)]()||''};}export async function removeSkill(_0x50cd8c,_0x37a4c1){const _0x507e0b=_0x71c45b,_0x3cc637={'HrneC':function(_0x2efd70,_0x247c8a){return _0x2efd70(_0x247c8a);},'EwUQG':function(_0x1280a6,_0x1538c3){return _0x1280a6(_0x1538c3);}},_0x1d4814=_0x3cc637['HrneC'](getSkillsDir,_0x37a4c1),_0x4adced=join(_0x1d4814,_0x50cd8c);if(!_0x3cc637['EwUQG'](existsSync,_0x4adced))return![];try{return await rm(_0x4adced,{'recursive':!![]}),console[_0x507e0b(0xbf)](_0x507e0b(0xd5)+_0x50cd8c),!![];}catch{return console['warn'](_0x507e0b(0xc5)+_0x50cd8c),![];}}
@@ -1 +1 @@
1
- const _0x158248=_0x89a1;(function(_0x2d2978,_0x4d25d7){const _0xc524ae=_0x89a1,_0x329398=_0x2d2978();while(!![]){try{const _0x1734af=-parseInt(_0xc524ae(0x20b))/0x1*(-parseInt(_0xc524ae(0x203))/0x2)+-parseInt(_0xc524ae(0x1e2))/0x3*(parseInt(_0xc524ae(0x1ed))/0x4)+-parseInt(_0xc524ae(0x1f4))/0x5*(parseInt(_0xc524ae(0x1f3))/0x6)+parseInt(_0xc524ae(0x1d4))/0x7*(parseInt(_0xc524ae(0x1f6))/0x8)+parseInt(_0xc524ae(0x21b))/0x9+parseInt(_0xc524ae(0x1fa))/0xa*(parseInt(_0xc524ae(0x205))/0xb)+-parseInt(_0xc524ae(0x1ee))/0xc;if(_0x1734af===_0x4d25d7)break;else _0x329398['push'](_0x329398['shift']());}catch(_0xc39b6a){_0x329398['push'](_0x329398['shift']());}}}(_0x3654,0x71b2d));import{readFileSync,writeFileSync}from'fs';function _0x89a1(_0x1757b9,_0x3cbc56){_0x1757b9=_0x1757b9-0x1ce;const _0x3654ca=_0x3654();let _0x89a11e=_0x3654ca[_0x1757b9];return _0x89a11e;}const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x3d6ff6,_0x35e493){const _0x328376=_0x89a1,_0x1b989e={'vTMff':function(_0x1f534f,_0x145ccf){return _0x1f534f>=_0x145ccf;},'mTyiS':function(_0x20c908,_0xb534c){return _0x20c908>_0xb534c;},'hTKIJ':function(_0x33e414,_0x3f7d5c){return _0x33e414+_0x3f7d5c;},'wApre':function(_0x1b972d,_0x5aa98a){return _0x1b972d-_0x5aa98a;},'XjuSq':function(_0x43d09d,_0x44c233){return _0x43d09d<_0x44c233;},'Ckbxp':function(_0x50fc70,_0x278076){return _0x50fc70*_0x278076;}};if(_0x1b989e[_0x328376(0x1e0)](_0x35e493,_0x3d6ff6[_0x328376(0x1d1)]))return[0x0,0x0];const _0x9b0d66=_0x3d6ff6[_0x35e493];let _0x39dfb6=0x1,_0x4c70a0=0x80;while(_0x39dfb6<=0x8&&!(_0x9b0d66&_0x4c70a0)){_0x39dfb6++,_0x4c70a0>>=0x1;}if(_0x1b989e['mTyiS'](_0x1b989e['hTKIJ'](_0x35e493,_0x39dfb6),_0x3d6ff6['length']))return[0x0,0x0];let _0x5fdd6a=_0x9b0d66&_0x1b989e[_0x328376(0x210)](_0x4c70a0,0x1);for(let _0x3f1ad6=0x1;_0x1b989e['XjuSq'](_0x3f1ad6,_0x39dfb6);_0x3f1ad6++){_0x5fdd6a=_0x1b989e['Ckbxp'](_0x5fdd6a,0x100)+_0x3d6ff6[_0x1b989e[_0x328376(0x1d9)](_0x35e493,_0x3f1ad6)];}return[_0x5fdd6a,_0x39dfb6];}function readId(_0xb5a9,_0x421bbb){const _0x41cc4e=_0x89a1,_0xb5946d={'zjecf':function(_0x4eedd0,_0x517eb8){return _0x4eedd0>=_0x517eb8;},'fUyXH':function(_0x3293ae,_0x5bfd4a){return _0x3293ae>=_0x5bfd4a;},'FfvUE':function(_0x45e792,_0x385ed8){return _0x45e792+_0x385ed8;}};if(_0x421bbb>=_0xb5a9[_0x41cc4e(0x1d1)])return[0x0,0x0];const _0x5b0084=_0xb5a9[_0x421bbb];let _0x59398d;if(_0xb5946d[_0x41cc4e(0x1de)](_0x5b0084,0x80))_0x59398d=0x1;else{if(_0xb5946d[_0x41cc4e(0x211)](_0x5b0084,0x40))_0x59398d=0x2;else{if(_0x5b0084>=0x20)_0x59398d=0x3;else{if(_0xb5946d['fUyXH'](_0x5b0084,0x10))_0x59398d=0x4;else return[_0x5b0084,0x1];}}}if(_0xb5946d[_0x41cc4e(0x1da)](_0x421bbb,_0x59398d)>_0xb5a9[_0x41cc4e(0x1d1)])return[0x0,0x0];let _0xbf50af=0x0;for(let _0xa34bc7=0x0;_0xa34bc7<_0x59398d;_0xa34bc7++){_0xbf50af=_0xbf50af*0x100+_0xb5a9[_0xb5946d[_0x41cc4e(0x1da)](_0x421bbb,_0xa34bc7)];}return[_0xbf50af,_0x59398d];}function readUint(_0xca0439,_0x2c91d8,_0x2af87c){const _0x2a7283=_0x89a1,_0xd51671={'OFHRo':function(_0x251aac,_0x165a72){return _0x251aac<_0x165a72;},'hOXoj':function(_0x50caaf,_0x2f6838){return _0x50caaf+_0x2f6838;}};let _0xd6f911=0x0;for(let _0x2817e1=0x0;_0xd51671[_0x2a7283(0x1d3)](_0x2817e1,_0x2af87c);_0x2817e1++){_0xd6f911=_0xd51671['hOXoj'](_0xd6f911*0x100,_0xca0439[_0x2c91d8+_0x2817e1]);}return _0xd6f911;}function isUnknownSize(_0x1c55a6,_0x298fb0){const _0x4c7b64=_0x89a1;return _0x1c55a6===Math[_0x4c7b64(0x217)](0x2,0x7*_0x298fb0)-0x1;}function writeVint(_0x16dcb6,_0x1daabc){const _0x1e7130=_0x89a1,_0x120f3={'eRwlG':function(_0x402859,_0x2c099d){return _0x402859||_0x2c099d;},'hvfoi':function(_0x1f582e,_0x19f687){return _0x1f582e-_0x19f687;},'dIMGv':function(_0x55a62f,_0x16a412){return _0x55a62f>=_0x16a412;},'WikQJ':function(_0x527a9d,_0x16c188){return _0x527a9d<<_0x16c188;}};let _0x1728a2=_0x120f3['eRwlG'](_0x1daabc,0x1);while(_0x120f3['hvfoi'](Math['pow'](0x2,0x7*_0x1728a2),0x2)<_0x16dcb6)_0x1728a2++;const _0x3a7b4f=Buffer[_0x1e7130(0x215)](_0x1728a2);for(let _0x132c9a=_0x1728a2-0x1;_0x120f3['dIMGv'](_0x132c9a,0x0);_0x132c9a--){_0x3a7b4f[_0x132c9a]=_0x16dcb6&0xff,_0x16dcb6=Math['floor'](_0x16dcb6/0x100);}return _0x3a7b4f[0x0]|=_0x120f3['WikQJ'](0x1,_0x120f3['hvfoi'](0x8,_0x1728a2)),_0x3a7b4f;}function writeUint(_0x2a9b20,_0x470bea){const _0x33a608=_0x89a1,_0x4002da={'FBoqZ':function(_0x341012,_0x434b18){return _0x341012/_0x434b18;}},_0x393dee=Buffer[_0x33a608(0x215)](_0x470bea);for(let _0x3d3b51=_0x470bea-0x1;_0x3d3b51>=0x0;_0x3d3b51--){_0x393dee[_0x3d3b51]=_0x2a9b20&0xff,_0x2a9b20=Math['floor'](_0x4002da[_0x33a608(0x214)](_0x2a9b20,0x100));}return _0x393dee;}function writeUnknownSizeVint(_0x36b25c){const _0x36bac4=Buffer['alloc'](_0x36b25c,0xff);return _0x36bac4[0x0]=0xff>>_0x36b25c-0x1,_0x36bac4;}function uintSize(_0x3863ac){const _0x587b09=_0x89a1,_0x592264={'pEOfu':function(_0x7c650a,_0x939bcc){return _0x7c650a===_0x939bcc;},'ldTlb':function(_0x32ad46,_0x434b7a){return _0x32ad46>_0x434b7a;}};if(_0x592264[_0x587b09(0x1e9)](_0x3863ac,0x0))return 0x1;let _0x1531ab=0x0,_0x1270a5=_0x3863ac;while(_0x592264['ldTlb'](_0x1270a5,0x0)){_0x1531ab++,_0x1270a5=Math['floor'](_0x1270a5/0x100);}return _0x1531ab;}function _0x3654(){const _0x3417ee=['OeFVN','concat','mKKDm','qFXqS','timestamp','65210MbIXKG','ezaIP','27159sAGHaQ','slice','HlGTe','PmtaP','CMAFR','ZFJSj','19YyjqEf','argv','EoVny','UHYzh','stitchWebmFiles.js','wApre','fUyXH','log','lgMZI','FBoqZ','alloc','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','pow','min','clusters','RwBTz','4759830mgODOK','oTJbi','TvhEM','LOiiY','lPfUI','length','error','OFHRo','7PMXInc','rgHGl','indexOf','sZZWY','FDVeG','hTKIJ','FfvUE','Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.','hkrZy','Jybnh','zjecf','readInt16BE','vTMff','maxTicks','6PoZLPy','sQPsD','FZFIi','rjdVE','rjGSm','bodyAfterTimestamp','svIKv','pEOfu','IcnGH','bCDMX','btUzF','1032316pruIay','14010360OGVGHz','SrjSw','JFiUV','from','exit','554172SXLnKb','5zZsnbs','dBiNu','2051224NkfWJy','OKcGz','endsWith','nnQTK','3390IVUDqp','DbYRd','bodyBeforeTimestamp','push'];_0x3654=function(){return _0x3417ee;};return _0x3654();}function findTimestampScale(_0x16ea69,_0xa3417c){const _0x197134=_0x89a1,_0x1a1b8b={'DbYRd':function(_0x42f225,_0x38a2ba){return _0x42f225<_0x38a2ba;},'nnQTK':function(_0x4a8bbd,_0x286fe8){return _0x4a8bbd+_0x286fe8;},'FZFIi':function(_0x5cf25d,_0x3b07f1,_0xe009c7){return _0x5cf25d(_0x3b07f1,_0xe009c7);},'CMAFR':function(_0x44be9c,_0x661d51,_0x3a0e87){return _0x44be9c(_0x661d51,_0x3a0e87);},'mKKDm':function(_0x3df952,_0x3c608e){return _0x3df952===_0x3c608e;},'dBiNu':function(_0x409ab7,_0x8c4437,_0x228a1c){return _0x409ab7(_0x8c4437,_0x228a1c);},'svIKv':function(_0x1a79a4,_0x4c07f1){return _0x1a79a4+_0x4c07f1;}};let _0x2a7f22=_0xa3417c;const _0x4d3bdc=Math[_0x197134(0x218)](_0x16ea69['length'],_0xa3417c+0x2710);while(_0x1a1b8b[_0x197134(0x1fb)](_0x2a7f22,_0x4d3bdc)){const [_0x35f5fd,_0x5ef0f8]=readId(_0x16ea69,_0x2a7f22),[_0x4e9e95,_0x338ab8]=readVint(_0x16ea69,_0x2a7f22+_0x5ef0f8);if(_0x35f5fd===ID_INFO){let _0x427312=_0x1a1b8b[_0x197134(0x1f9)](_0x2a7f22,_0x5ef0f8)+_0x338ab8;const _0x26d7b3=_0x427312+_0x4e9e95;while(_0x1a1b8b[_0x197134(0x1fb)](_0x427312,_0x26d7b3)){const [_0x48636f,_0x5f17de]=_0x1a1b8b[_0x197134(0x1e4)](readId,_0x16ea69,_0x427312),[_0x4b41a2,_0x5719a3]=_0x1a1b8b[_0x197134(0x209)](readVint,_0x16ea69,_0x427312+_0x5f17de);if(_0x1a1b8b['mKKDm'](_0x48636f,ID_TIMESTAMP_SCALE))return readUint(_0x16ea69,_0x1a1b8b[_0x197134(0x1f9)](_0x427312,_0x5f17de)+_0x5719a3,_0x4b41a2);_0x427312+=_0x5f17de+_0x5719a3+_0x4b41a2;}break;}if(_0x1a1b8b[_0x197134(0x200)](_0x35f5fd,ID_CLUSTER))break;if(_0x1a1b8b[_0x197134(0x1f5)](isUnknownSize,_0x4e9e95,_0x338ab8))break;_0x2a7f22+=_0x1a1b8b[_0x197134(0x1e8)](_0x5ef0f8+_0x338ab8,_0x4e9e95);}return 0xf4240;}function findFirstClusterOffset(_0x51c696,_0x4fb256){const _0xe70e52={'kJwMW':function(_0x18b545,_0x52c654,_0x581ee9){return _0x18b545(_0x52c654,_0x581ee9);},'qmZQv':function(_0x5c8e12,_0x19e347){return _0x5c8e12+_0x19e347;}};let _0x358597=_0x4fb256;while(_0x358597<_0x51c696['length']){const [_0x3627e3,_0x58ab68]=readId(_0x51c696,_0x358597);if(_0x3627e3===ID_CLUSTER)return _0x358597;const [_0x295b34,_0x5d756b]=readVint(_0x51c696,_0x358597+_0x58ab68);if(_0xe70e52['kJwMW'](isUnknownSize,_0x295b34,_0x5d756b))return _0x358597;_0x358597+=_0xe70e52['qmZQv'](_0xe70e52['qmZQv'](_0x58ab68,_0x5d756b),_0x295b34);}return _0x51c696['length'];}function findClusterEnd(_0x4a0c15,_0x224103,_0x195939,_0x3a73de){const _0x5f3dd3=_0x89a1,_0x4e55e5={'rjGSm':function(_0x3a117e,_0x233782,_0x22d0ff){return _0x3a117e(_0x233782,_0x22d0ff);},'RwBTz':function(_0x546b3c,_0x3983e7){return _0x546b3c+_0x3983e7;},'wsHaR':function(_0x217254,_0x175be8){return _0x217254<_0x175be8;}};if(!_0x4e55e5[_0x5f3dd3(0x1e6)](isUnknownSize,_0x195939,_0x3a73de))return _0x4e55e5['RwBTz'](_0x224103,_0x195939);const _0x45ee49=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x37e422=_0x224103;while(_0x4e55e5['wsHaR'](_0x37e422,_0x4a0c15[_0x5f3dd3(0x1d1)]-0x4)){const [_0xe819b2,_0x18b1e3]=readId(_0x4a0c15,_0x37e422);if(_0x45ee49['has'](_0xe819b2))return _0x37e422;const [_0x2e859c,_0x20d380]=_0x4e55e5['rjGSm'](readVint,_0x4a0c15,_0x4e55e5[_0x5f3dd3(0x21a)](_0x37e422,_0x18b1e3));if(isUnknownSize(_0x2e859c,_0x20d380))return _0x4a0c15['length'];_0x37e422+=_0x18b1e3+_0x20d380+_0x2e859c;}return _0x4a0c15['length'];}function extractClusters(_0x5ef852,_0x309f28){const _0x2caad2=_0x89a1,_0x1b02e4={'LOiiY':function(_0x482aa4,_0x4e36e9){return _0x482aa4<_0x4e36e9;},'OeFVN':function(_0x305c36,_0x29fde7){return _0x305c36+_0x29fde7;},'JyMXd':function(_0x4297f5,_0x5dd623){return _0x4297f5+_0x5dd623;},'PmtaP':function(_0x4f5c16,_0x5bbf52){return _0x4f5c16<_0x5bbf52;},'qkJVJ':function(_0x4f521c,_0x194ca0){return _0x4f521c+_0x194ca0;},'EoVny':function(_0x35186e,_0x393363){return _0x35186e+_0x393363;},'hkrZy':function(_0x6ea25b,_0xc869e7){return _0x6ea25b+_0xc869e7;},'eMEve':function(_0x4de059,_0x41a710){return _0x4de059===_0x41a710;},'lgMZI':function(_0x44940b,_0x596e23,_0x59ec8c){return _0x44940b(_0x596e23,_0x59ec8c);},'iAaGX':function(_0x5b30bd,_0x938f97){return _0x5b30bd>=_0x938f97;}},_0x2f513a=[],_0x355a58=Buffer[_0x2caad2(0x1f1)]([0x1f,0x43,0xb6,0x75]);let _0x30b2ec=0x0;while(_0x1b02e4[_0x2caad2(0x1cf)](_0x30b2ec,_0x5ef852[_0x2caad2(0x1d1)])){const _0x1d0c2e=_0x5ef852[_0x2caad2(0x1d6)](_0x355a58,_0x30b2ec);if(_0x1d0c2e===-0x1)break;const [_0x36a6ba,_0x14e089]=readId(_0x5ef852,_0x1d0c2e);if(_0x36a6ba!==ID_CLUSTER){_0x30b2ec=_0x1d0c2e+0x1;continue;}const [_0x4e2040,_0x49a30a]=readVint(_0x5ef852,_0x1b02e4[_0x2caad2(0x1fe)](_0x1d0c2e,_0x14e089)),_0x51a28b=_0x1b02e4['JyMXd'](_0x1d0c2e,_0x14e089)+_0x49a30a,_0x238555=findClusterEnd(_0x5ef852,_0x51a28b,_0x4e2040,_0x49a30a);let _0x218929=_0x51a28b,_0x3736f7=0x0,_0x4cdb70=0x2,_0x7a097d=![],_0x38f19c=Buffer['alloc'](0x0),_0x57c6d6=Buffer[_0x2caad2(0x215)](0x0);while(_0x1b02e4[_0x2caad2(0x208)](_0x218929,_0x238555)){const [_0x35bcb9,_0x285337]=readId(_0x5ef852,_0x218929),[_0x51d876,_0x1fcec7]=readVint(_0x5ef852,_0x1b02e4['qkJVJ'](_0x218929,_0x285337));if(_0x35bcb9===ID_TIMESTAMP){_0x3736f7=readUint(_0x5ef852,_0x1b02e4[_0x2caad2(0x20d)](_0x218929+_0x285337,_0x1fcec7),_0x51d876),_0x4cdb70=_0x51d876,_0x7a097d=!![],_0x38f19c=_0x5ef852['slice'](_0x51a28b,_0x218929);const _0x205ec6=_0x1b02e4['hkrZy'](_0x218929,_0x285337)+_0x1fcec7+_0x51d876;_0x57c6d6=_0x5ef852[_0x2caad2(0x206)](_0x205ec6,_0x238555);break;}if(_0x1b02e4['eMEve'](_0x35bcb9,ID_CLUSTER))break;if(_0x1b02e4['lgMZI'](isUnknownSize,_0x51d876,_0x1fcec7))break;_0x218929+=_0x1b02e4['hkrZy'](_0x285337,_0x1fcec7)+_0x51d876;}!_0x7a097d&&(_0x57c6d6=_0x5ef852[_0x2caad2(0x206)](_0x51a28b,_0x238555));let _0x56ea52=_0x3736f7;_0x218929=_0x51a28b;while(_0x218929<_0x238555){const [_0x1abce9,_0x21bee5]=_0x1b02e4[_0x2caad2(0x213)](readId,_0x5ef852,_0x218929),[_0x24cb4c,_0x5dd9d5]=_0x1b02e4['lgMZI'](readVint,_0x5ef852,_0x218929+_0x21bee5);if(_0x1abce9===ID_SIMPLE_BLOCK&&_0x1b02e4['iAaGX'](_0x24cb4c,0x4)){const _0x448419=_0x1b02e4[_0x2caad2(0x1dc)](_0x218929+_0x21bee5,_0x5dd9d5),[,_0x273ebf]=readVint(_0x5ef852,_0x448419),_0x229684=_0x5ef852[_0x2caad2(0x1df)](_0x448419+_0x273ebf),_0x14efd3=_0x1b02e4['qkJVJ'](_0x3736f7,_0x229684);if(_0x14efd3>_0x56ea52)_0x56ea52=_0x14efd3;}if(_0x1abce9===ID_CLUSTER)break;if(isUnknownSize(_0x24cb4c,_0x5dd9d5))break;_0x218929+=_0x21bee5+_0x5dd9d5+_0x24cb4c;}_0x2f513a['push']({'timestamp':_0x3736f7,'maxTicks':_0x56ea52,'bodyBeforeTimestamp':_0x38f19c,'bodyAfterTimestamp':_0x57c6d6,'timestampElementSize':_0x4cdb70}),_0x30b2ec=_0x238555;}return _0x2f513a;}function parseWebm(_0x4b760b){const _0x225176=_0x89a1,_0x1135d1={'qFXqS':function(_0x2a9089,_0x39a8f7,_0x3890aa){return _0x2a9089(_0x39a8f7,_0x3890aa);},'rjdVE':function(_0x6a99ce,_0xa95590){return _0x6a99ce+_0xa95590;},'oTJbi':function(_0x5e02c4,_0x581a52){return _0x5e02c4!==_0x581a52;},'sQPsD':function(_0x18f3e2,_0x14c2c1){return _0x18f3e2+_0x14c2c1;},'MbsYs':function(_0xf148ae,_0x52e6d6){return _0xf148ae+_0x52e6d6;},'sZZWY':function(_0x5a292a,_0x5b10eb){return _0x5a292a>_0x5b10eb;}};let _0x3cba43=0x0;const [,_0x136112]=_0x1135d1['qFXqS'](readId,_0x4b760b,_0x3cba43),[_0x13c381,_0x59285d]=_0x1135d1[_0x225176(0x201)](readVint,_0x4b760b,_0x1135d1[_0x225176(0x1e5)](_0x3cba43,_0x136112));_0x3cba43+=_0x1135d1['rjdVE'](_0x136112,_0x59285d)+_0x13c381;const [_0x512ed5,_0x588416]=readId(_0x4b760b,_0x3cba43);if(_0x1135d1[_0x225176(0x21c)](_0x512ed5,ID_SEGMENT))return null;const [,_0x5a7045]=readVint(_0x4b760b,_0x1135d1[_0x225176(0x1e3)](_0x3cba43,_0x588416)),_0x2d5422=_0x1135d1['MbsYs'](_0x3cba43+_0x588416,_0x5a7045),_0x56f2e9=findTimestampScale(_0x4b760b,_0x2d5422),_0x7e22f7=findFirstClusterOffset(_0x4b760b,_0x2d5422),_0x414f19=_0x4b760b['slice'](0x0,_0x7e22f7),_0xd7cbab=_0x1135d1['qFXqS'](extractClusters,_0x4b760b,_0x56f2e9);let _0x236aec=0x0;for(const _0x51a968 of _0xd7cbab){if(_0x1135d1[_0x225176(0x1d7)](_0x51a968[_0x225176(0x1e1)],_0x236aec))_0x236aec=_0x51a968['maxTicks'];}return{'header':_0x414f19,'clusters':_0xd7cbab,'timestampScale':_0x56f2e9,'maxTimestampTicks':_0x236aec};}function buildCluster(_0x444dcc,_0x3f1e36,_0x3b1786){const _0x232f85=_0x89a1,_0x15e8d1={'IcnGH':function(_0x43ab0f,_0x4dcd0b){return _0x43ab0f(_0x4dcd0b);}},_0x5940a4=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0xd582d0=Math['max'](0x4,uintSize(_0x444dcc)),_0x39fb95=Buffer[_0x232f85(0x1ff)]([Buffer['from']([ID_TIMESTAMP]),_0x15e8d1[_0x232f85(0x1ea)](writeVint,_0xd582d0),writeUint(_0x444dcc,_0xd582d0)]),_0x2e8dd9=Buffer['concat']([_0x3f1e36,_0x39fb95,_0x3b1786]),_0x2bbf0a=writeVint(_0x2e8dd9[_0x232f85(0x1d1)]);return Buffer['concat']([_0x5940a4,_0x2bbf0a,_0x2e8dd9]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x3b1f8e){const _0x36cec0=_0x89a1,_0x2241d7={'SrjSw':function(_0x246df9,_0xff64cd,_0x4c385d){return _0x246df9(_0xff64cd,_0x4c385d);},'Jybnh':function(_0x46bae4,_0x19c5cc){return _0x46bae4+_0x19c5cc;},'TvhEM':function(_0x37acf9,_0x1985b3){return _0x37acf9(_0x1985b3);},'HlGTe':function(_0x57af59,_0x165193,_0x3707e6){return _0x57af59(_0x165193,_0x3707e6);},'geVgq':function(_0xdb3055,_0x2eb390,_0x26fcef){return _0xdb3055(_0x2eb390,_0x26fcef);},'UHYzh':function(_0x334f00,_0x3ddeb5,_0x4d5dab){return _0x334f00(_0x3ddeb5,_0x4d5dab);},'ZFJSj':function(_0x21613f,_0x10804d){return _0x21613f===_0x10804d;},'btUzF':function(_0x436d5b,_0x1f0a48){return _0x436d5b+_0x1f0a48;},'lPfUI':function(_0x3bb120,_0x2f48e3){return _0x3bb120+_0x2f48e3;},'FDVeG':function(_0x50f62a,_0x277fd0){return _0x50f62a<_0x277fd0;},'OKcGz':function(_0x493205,_0x3abf83){return _0x493205+_0x3abf83;}},_0x184352=Buffer[_0x36cec0(0x1f1)](_0x3b1f8e);let _0xed2142=0x0;const [,_0x3fc20a]=readId(_0x184352,_0xed2142),[_0x51ebec,_0x4ca97e]=_0x2241d7[_0x36cec0(0x1ef)](readVint,_0x184352,_0xed2142+_0x3fc20a),_0x4202d8=_0xed2142+_0x3fc20a+_0x4ca97e+_0x51ebec,[,_0x47050e]=_0x2241d7[_0x36cec0(0x1ef)](readId,_0x184352,_0x4202d8),[,_0x1ff7a4]=_0x2241d7[_0x36cec0(0x1ef)](readVint,_0x184352,_0x2241d7[_0x36cec0(0x1dd)](_0x4202d8,_0x47050e)),_0x5e067f=_0x2241d7[_0x36cec0(0x1dd)](_0x4202d8+_0x47050e,_0x1ff7a4),_0x42a104=_0x2241d7[_0x36cec0(0x1ce)](writeUnknownSizeVint,_0x1ff7a4);_0x42a104['copy'](_0x184352,_0x2241d7[_0x36cec0(0x1dd)](_0x4202d8,_0x47050e));let _0x1fa5a3=_0x5e067f;const _0x53432e=Math['min'](_0x184352[_0x36cec0(0x1d1)],_0x5e067f+0x2710);while(_0x1fa5a3<_0x53432e){const [_0x476ae1,_0x29adf1]=_0x2241d7[_0x36cec0(0x207)](readId,_0x184352,_0x1fa5a3),[_0x57a7b3,_0x29d640]=_0x2241d7['geVgq'](readVint,_0x184352,_0x1fa5a3+_0x29adf1);if(_0x476ae1===ID_CLUSTER)break;if(_0x2241d7[_0x36cec0(0x20e)](isUnknownSize,_0x57a7b3,_0x29d640))break;if(_0x2241d7[_0x36cec0(0x20a)](_0x476ae1,ID_INFO)){const _0x388a95=_0x2241d7[_0x36cec0(0x1ec)](_0x2241d7[_0x36cec0(0x1d0)](_0x1fa5a3,_0x29adf1),_0x29d640),_0x539aff=_0x2241d7[_0x36cec0(0x1ec)](_0x388a95,_0x57a7b3),_0x2f81a7=[];let _0x3c4430=_0x388a95;while(_0x2241d7[_0x36cec0(0x1d8)](_0x3c4430,_0x539aff)){const [_0x4e3722,_0x3f5480]=_0x2241d7['UHYzh'](readId,_0x184352,_0x3c4430),[_0x28e20e,_0x14e7f9]=readVint(_0x184352,_0x2241d7['btUzF'](_0x3c4430,_0x3f5480)),_0x1d12c5=_0x2241d7[_0x36cec0(0x1d0)](_0x3f5480,_0x14e7f9)+_0x28e20e;_0x4e3722!==ID_DURATION&&_0x2f81a7[_0x36cec0(0x1fd)](_0x184352['slice'](_0x3c4430,_0x2241d7[_0x36cec0(0x1ec)](_0x3c4430,_0x1d12c5))),_0x3c4430+=_0x1d12c5;}const _0x443577=Buffer['concat'](_0x2f81a7),_0x32c2ce=Buffer['concat']([_0x184352[_0x36cec0(0x206)](_0x1fa5a3,_0x1fa5a3+_0x29adf1),_0x2241d7['SrjSw'](writeVint,_0x443577['length'],_0x29d640)]);return Buffer['concat']([_0x184352[_0x36cec0(0x206)](0x0,_0x1fa5a3),_0x32c2ce,_0x443577,_0x184352['slice'](_0x539aff)]);}_0x1fa5a3+=_0x2241d7[_0x36cec0(0x1f7)](_0x2241d7['Jybnh'](_0x29adf1,_0x29d640),_0x57a7b3);}return _0x184352;}export function stitchWebmFiles(_0x4d6f61,_0x10f881){const _0x25035e=_0x89a1,_0x2dffad={'bCDMX':function(_0x370bce,_0x5dfebf){return _0x370bce(_0x5dfebf);},'JFiUV':function(_0x568c93,_0x572047){return _0x568c93(_0x572047);},'rgHGl':function(_0x14fcc0,_0x553bd3){return _0x14fcc0===_0x553bd3;},'ezaIP':function(_0x3a0202,_0x5150ee){return _0x3a0202<_0x5150ee;},'MvbRg':function(_0xe94fd1,_0x1969b3){return _0xe94fd1+_0x1969b3;}};if(_0x4d6f61[_0x25035e(0x1d1)]<=0x1)return![];const _0x4048b8=[];for(const _0x369c43 of _0x4d6f61){const _0x2fdbb4=_0x2dffad[_0x25035e(0x1eb)](readFileSync,_0x369c43),_0x131a87=_0x2dffad[_0x25035e(0x1f0)](parseWebm,_0x2fdbb4);if(!_0x131a87||_0x2dffad[_0x25035e(0x1d5)](_0x131a87[_0x25035e(0x219)][_0x25035e(0x1d1)],0x0))return![];_0x4048b8['push'](_0x131a87);}const _0x5a713b=_0x4048b8[0x0],_0x4e7817=rebuildHeaderWithoutDuration(_0x5a713b['header']),_0x2e5a9f=[_0x4e7817];let _0x10b871=0x0;for(let _0x90148e=0x0;_0x2dffad[_0x25035e(0x204)](_0x90148e,_0x4048b8['length']);_0x90148e++){const _0xf8d0b0=_0x4048b8[_0x90148e];for(const _0x5eab5d of _0xf8d0b0['clusters']){const _0x340042=_0x2dffad['MvbRg'](_0x5eab5d[_0x25035e(0x202)],_0x10b871);_0x2e5a9f['push'](buildCluster(_0x340042,_0x5eab5d[_0x25035e(0x1fc)],_0x5eab5d[_0x25035e(0x1e7)]));}const _0xd4c4e5=0x1e;_0x10b871+=_0x2dffad['MvbRg'](_0xf8d0b0['maxTimestampTicks'],_0xd4c4e5);}return writeFileSync(_0x10f881,Buffer['concat'](_0x2e5a9f)),!![];}if(process[_0x158248(0x20c)][0x1]?.[_0x158248(0x1f8)]('stitchWebmFiles.ts')||process[_0x158248(0x20c)][0x1]?.[_0x158248(0x1f8)](_0x158248(0x20f))){const args=process['argv']['slice'](0x2);args['length']<0x3&&(console[_0x158248(0x1d2)](_0x158248(0x216)),process[_0x158248(0x1f2)](0x1));const output=args[args[_0x158248(0x1d1)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console[_0x158248(0x212)]('Stitched\x20'+inputs['length']+'\x20files\x20->\x20'+output):console[_0x158248(0x212)](_0x158248(0x1db));}
1
+ const _0x569038=_0x5b66;(function(_0x3adcc8,_0x31ef91){const _0x2c9f3b=_0x5b66,_0x3721a9=_0x3adcc8();while(!![]){try{const _0x8a8feb=-parseInt(_0x2c9f3b(0xed))/0x1+-parseInt(_0x2c9f3b(0xe9))/0x2*(parseInt(_0x2c9f3b(0xdd))/0x3)+-parseInt(_0x2c9f3b(0xad))/0x4+parseInt(_0x2c9f3b(0xf3))/0x5+-parseInt(_0x2c9f3b(0xf0))/0x6+parseInt(_0x2c9f3b(0xee))/0x7*(-parseInt(_0x2c9f3b(0xe4))/0x8)+parseInt(_0x2c9f3b(0xdc))/0x9;if(_0x8a8feb===_0x31ef91)break;else _0x3721a9['push'](_0x3721a9['shift']());}catch(_0xca097f){_0x3721a9['push'](_0x3721a9['shift']());}}}(_0x3c0f,0x45456));function _0x3c0f(){const _0x77f15d=['rooTt','mVvDH','OovYr','66fbvSCc','length','floor','IiTaB','493749iGZrcm','21zkRQUH','WvrOE','323550CIxeBP','HgZFb','exit','195700CVqOni','has','BaQWa','PVKBB','361292hUnIiE','SldNy','vCvJu','concat','PWgsq','whFeB','from','push','JKcZd','clusters','lEoRr','xTLDS','xCdZd','LLvEM','timestamp','gNhuu','YiYBv','BMxpr','OewBj','alloc','bodyAfterTimestamp','CpKpS','maxTicks','tRcgF','SZYiH','YeUmI','HYjQj','slice','UiSaH','pow','\x20files\x20->\x20','eMeBS','VSAsE','header','log','oGiGI','tDIFr','RQaPn','JFZux','stitchWebmFiles.ts','UNPuk','Usage:\x20stitchWebmFiles\x20<input1.webm>\x20<input2.webm>\x20[...]\x20<output.webm>','uWSQY','oJMAn','xdUcl','tRNbw','AYGzF','10949391rZEBLE','22791QBlliO','EtFcX','BuKJn','AUSgi','PgaGD','yMzOk','argv','222152JcSPmc','DpMpX'];_0x3c0f=function(){return _0x77f15d;};return _0x3c0f();}import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x1a7fba,_0x3fae18){const _0x2ac671=_0x5b66,_0x29c61e={'BYCjz':function(_0x7330bc,_0x3dea85){return _0x7330bc>_0x3dea85;},'YiYBv':function(_0x107b46,_0x21f72d){return _0x107b46&_0x21f72d;},'tRNbw':function(_0x1464de,_0x1abb68){return _0x1464de-_0x1abb68;},'aWXzs':function(_0x1abdba,_0x5399fd){return _0x1abdba<_0x5399fd;},'VmWNz':function(_0x3ad7f7,_0x2b382b){return _0x3ad7f7+_0x2b382b;},'JKcZd':function(_0xd2c7d6,_0x145479){return _0xd2c7d6*_0x145479;},'DpMpX':function(_0x1d8781,_0x4666d1){return _0x1d8781+_0x4666d1;}};if(_0x3fae18>=_0x1a7fba['length'])return[0x0,0x0];const _0x494296=_0x1a7fba[_0x3fae18];let _0x15e978=0x1,_0x330c5c=0x80;while(_0x15e978<=0x8&&!(_0x494296&_0x330c5c)){_0x15e978++,_0x330c5c>>=0x1;}if(_0x29c61e['BYCjz'](_0x3fae18+_0x15e978,_0x1a7fba[_0x2ac671(0xea)]))return[0x0,0x0];let _0x19686f=_0x29c61e[_0x2ac671(0xbd)](_0x494296,_0x29c61e[_0x2ac671(0xda)](_0x330c5c,0x1));for(let _0x634530=0x1;_0x29c61e['aWXzs'](_0x634530,_0x15e978);_0x634530++){_0x19686f=_0x29c61e['VmWNz'](_0x29c61e[_0x2ac671(0xb5)](_0x19686f,0x100),_0x1a7fba[_0x29c61e[_0x2ac671(0xe5)](_0x3fae18,_0x634530)]);}return[_0x19686f,_0x15e978];}function readId(_0x530813,_0x1faa77){const _0x49cb61=_0x5b66,_0x2874d8={'xBeop':function(_0xae23a8,_0x2ebc54){return _0xae23a8>=_0x2ebc54;},'OovYr':function(_0x1137d7,_0x27d9b1){return _0x1137d7>=_0x27d9b1;},'JFZux':function(_0x5ee9fc,_0x23b9f4){return _0x5ee9fc>=_0x23b9f4;},'uWSQY':function(_0x511c18,_0x30504b){return _0x511c18+_0x30504b;},'sazkS':function(_0x37c212,_0x44ea63){return _0x37c212<_0x44ea63;},'FLKrj':function(_0x57dc81,_0x22b233){return _0x57dc81*_0x22b233;},'PlokQ':function(_0x6ef1bc,_0x827f27){return _0x6ef1bc+_0x827f27;}};if(_0x2874d8['xBeop'](_0x1faa77,_0x530813[_0x49cb61(0xea)]))return[0x0,0x0];const _0x4084a0=_0x530813[_0x1faa77];let _0x56da06;if(_0x4084a0>=0x80)_0x56da06=0x1;else{if(_0x2874d8[_0x49cb61(0xe8)](_0x4084a0,0x40))_0x56da06=0x2;else{if(_0x4084a0>=0x20)_0x56da06=0x3;else{if(_0x2874d8[_0x49cb61(0xd3)](_0x4084a0,0x10))_0x56da06=0x4;else return[_0x4084a0,0x1];}}}if(_0x2874d8[_0x49cb61(0xd7)](_0x1faa77,_0x56da06)>_0x530813[_0x49cb61(0xea)])return[0x0,0x0];let _0x1a13ee=0x0;for(let _0x3f97c5=0x0;_0x2874d8['sazkS'](_0x3f97c5,_0x56da06);_0x3f97c5++){_0x1a13ee=_0x2874d8['FLKrj'](_0x1a13ee,0x100)+_0x530813[_0x2874d8['PlokQ'](_0x1faa77,_0x3f97c5)];}return[_0x1a13ee,_0x56da06];}function readUint(_0x3291e4,_0x5308a5,_0x8be05a){const _0x3d4dcb=_0x5b66,_0x5710fe={'nZyiw':function(_0x5c203d,_0x140ec3){return _0x5c203d<_0x140ec3;},'BMxpr':function(_0x3fd942,_0xc4088){return _0x3fd942+_0xc4088;}};let _0x5a09f2=0x0;for(let _0x483c54=0x0;_0x5710fe['nZyiw'](_0x483c54,_0x8be05a);_0x483c54++){_0x5a09f2=_0x5710fe[_0x3d4dcb(0xbe)](_0x5a09f2*0x100,_0x3291e4[_0x5308a5+_0x483c54]);}return _0x5a09f2;}function isUnknownSize(_0x16c846,_0x289b97){const _0x4cd650=_0x5b66,_0x1ed84a={'lEoRr':function(_0x4b528d,_0x2b671e){return _0x4b528d===_0x2b671e;},'LYGlK':function(_0x40f493,_0x1b6337){return _0x40f493*_0x1b6337;}};return _0x1ed84a[_0x4cd650(0xb7)](_0x16c846,Math[_0x4cd650(0xca)](0x2,_0x1ed84a['LYGlK'](0x7,_0x289b97))-0x1);}function writeVint(_0xd684a2,_0x4f7f66){const _0x3e9508=_0x5b66,_0x99ba36={'rooTt':function(_0x3c789a,_0x15bc97){return _0x3c789a<_0x15bc97;},'IiTaB':function(_0x3bc057,_0x5e491c){return _0x3bc057*_0x5e491c;},'XYiIu':function(_0xd9dc85,_0x56aa79){return _0xd9dc85>=_0x56aa79;},'PTOlE':function(_0x5295ff,_0x4a7c15){return _0x5295ff-_0x4a7c15;}};let _0x1a1769=_0x4f7f66||0x1;while(_0x99ba36[_0x3e9508(0xe6)](Math[_0x3e9508(0xca)](0x2,_0x99ba36[_0x3e9508(0xec)](0x7,_0x1a1769))-0x2,_0xd684a2))_0x1a1769++;const _0x38e0b4=Buffer[_0x3e9508(0xc0)](_0x1a1769);for(let _0x5da985=_0x1a1769-0x1;_0x99ba36['XYiIu'](_0x5da985,0x0);_0x5da985--){_0x38e0b4[_0x5da985]=_0xd684a2&0xff,_0xd684a2=Math[_0x3e9508(0xeb)](_0xd684a2/0x100);}return _0x38e0b4[0x0]|=0x1<<_0x99ba36['PTOlE'](0x8,_0x1a1769),_0x38e0b4;}function writeUint(_0x185854,_0x3ebe58){const _0x479822=_0x5b66,_0xdd0a24={'lwCsO':function(_0x59c69c,_0x3d830e){return _0x59c69c>=_0x3d830e;},'tRcgF':function(_0x28a2b9,_0x109c1f){return _0x28a2b9&_0x109c1f;},'PVKBB':function(_0x216b0c,_0x8c6727){return _0x216b0c/_0x8c6727;}},_0x81c265=Buffer[_0x479822(0xc0)](_0x3ebe58);for(let _0x39aef0=_0x3ebe58-0x1;_0xdd0a24['lwCsO'](_0x39aef0,0x0);_0x39aef0--){_0x81c265[_0x39aef0]=_0xdd0a24[_0x479822(0xc4)](_0x185854,0xff),_0x185854=Math['floor'](_0xdd0a24[_0x479822(0xac)](_0x185854,0x100));}return _0x81c265;}function writeUnknownSizeVint(_0x33fcab){const _0x3148ef=_0x5b66,_0x1806f0={'EtFcX':function(_0x5f3eff,_0x10fc2a){return _0x5f3eff>>_0x10fc2a;},'wzJpd':function(_0x34797f,_0xdd9c9e){return _0x34797f-_0xdd9c9e;}},_0x137764=Buffer['alloc'](_0x33fcab,0xff);return _0x137764[0x0]=_0x1806f0[_0x3148ef(0xde)](0xff,_0x1806f0['wzJpd'](_0x33fcab,0x1)),_0x137764;}function uintSize(_0x4806db){const _0x3849de=_0x5b66,_0x290fa9={'PxUEL':function(_0x427147,_0x107cdb){return _0x427147===_0x107cdb;},'SZYiH':function(_0x579a0a,_0xd0022d){return _0x579a0a/_0xd0022d;}};if(_0x290fa9['PxUEL'](_0x4806db,0x0))return 0x1;let _0x5c832b=0x0,_0x2588e3=_0x4806db;while(_0x2588e3>0x0){_0x5c832b++,_0x2588e3=Math[_0x3849de(0xeb)](_0x290fa9[_0x3849de(0xc5)](_0x2588e3,0x100));}return _0x5c832b;}function findTimestampScale(_0x4e966a,_0x56dcbc){const _0x3d4ce9=_0x5b66,_0xd58dac={'PgaGD':function(_0x437139,_0x44f2c1){return _0x437139+_0x44f2c1;},'CUMXc':function(_0x258e23,_0x471c5a){return _0x258e23<_0x471c5a;},'BuKJn':function(_0x46523d,_0x2c0382,_0x4d0a43){return _0x46523d(_0x2c0382,_0x4d0a43);},'UNPuk':function(_0x20b333,_0x5edf7d){return _0x20b333===_0x5edf7d;},'grHqO':function(_0x43a09a,_0x2267c3){return _0x43a09a+_0x2267c3;},'mVvDH':function(_0x6806e5,_0x5121d2,_0x1dbb6a){return _0x6806e5(_0x5121d2,_0x1dbb6a);},'xCdZd':function(_0x2ef130,_0x417f42,_0x427e85,_0x171ef0){return _0x2ef130(_0x417f42,_0x427e85,_0x171ef0);},'KUSXl':function(_0x9dffd,_0x369431){return _0x9dffd+_0x369431;}};let _0xf4b434=_0x56dcbc;const _0x128b76=Math['min'](_0x4e966a['length'],_0xd58dac['PgaGD'](_0x56dcbc,0x2710));while(_0xd58dac['CUMXc'](_0xf4b434,_0x128b76)){const [_0x38bfde,_0x4ac107]=_0xd58dac[_0x3d4ce9(0xdf)](readId,_0x4e966a,_0xf4b434),[_0x11203c,_0x1f27c1]=readVint(_0x4e966a,_0xf4b434+_0x4ac107);if(_0xd58dac[_0x3d4ce9(0xd5)](_0x38bfde,ID_INFO)){let _0xf5191a=_0xf4b434+_0x4ac107+_0x1f27c1;const _0x2b7667=_0xd58dac['grHqO'](_0xf5191a,_0x11203c);while(_0xf5191a<_0x2b7667){const [_0x5771c2,_0x3387a4]=_0xd58dac[_0x3d4ce9(0xe7)](readId,_0x4e966a,_0xf5191a),[_0x2015f9,_0x6ed0f1]=_0xd58dac['BuKJn'](readVint,_0x4e966a,_0xf5191a+_0x3387a4);if(_0xd58dac[_0x3d4ce9(0xd5)](_0x5771c2,ID_TIMESTAMP_SCALE))return _0xd58dac[_0x3d4ce9(0xb9)](readUint,_0x4e966a,_0xd58dac['KUSXl'](_0xd58dac[_0x3d4ce9(0xe1)](_0xf5191a,_0x3387a4),_0x6ed0f1),_0x2015f9);_0xf5191a+=_0x3387a4+_0x6ed0f1+_0x2015f9;}break;}if(_0x38bfde===ID_CLUSTER)break;if(_0xd58dac['mVvDH'](isUnknownSize,_0x11203c,_0x1f27c1))break;_0xf4b434+=_0x4ac107+_0x1f27c1+_0x11203c;}return 0xf4240;}function findFirstClusterOffset(_0x49df9b,_0x2b9caa){const _0x2cb0ca=_0x5b66,_0x1fcb14={'qpdVl':function(_0x1fc6a6,_0x516ecd){return _0x1fc6a6<_0x516ecd;},'VSAsE':function(_0x3f5dbb,_0x432090,_0x26e08){return _0x3f5dbb(_0x432090,_0x26e08);},'plClo':function(_0x38e681,_0x150c80){return _0x38e681===_0x150c80;}};let _0x46aed9=_0x2b9caa;while(_0x1fcb14['qpdVl'](_0x46aed9,_0x49df9b['length'])){const [_0x20122d,_0x5e81bf]=_0x1fcb14[_0x2cb0ca(0xcd)](readId,_0x49df9b,_0x46aed9);if(_0x1fcb14['plClo'](_0x20122d,ID_CLUSTER))return _0x46aed9;const [_0x31f4d8,_0x3cdca3]=readVint(_0x49df9b,_0x46aed9+_0x5e81bf);if(isUnknownSize(_0x31f4d8,_0x3cdca3))return _0x46aed9;_0x46aed9+=_0x5e81bf+_0x3cdca3+_0x31f4d8;}return _0x49df9b['length'];}function findClusterEnd(_0x2bb740,_0x2c0ae7,_0x105ba7,_0x5a0faf){const _0x10b3c5=_0x5b66,_0xf4ad8e={'bsiGG':function(_0x32fe8a,_0x453a2d){return _0x32fe8a<_0x453a2d;},'yMzOk':function(_0x33849d,_0x1f8e60,_0x4c14a7){return _0x33849d(_0x1f8e60,_0x4c14a7);},'oJMAn':function(_0x46a067,_0x269eca,_0x281d65){return _0x46a067(_0x269eca,_0x281d65);},'CpKpS':function(_0x3c0249,_0x390af3){return _0x3c0249+_0x390af3;},'RQaPn':function(_0x2b0af9,_0x1090bd){return _0x2b0af9+_0x1090bd;}};if(!isUnknownSize(_0x105ba7,_0x5a0faf))return _0x2c0ae7+_0x105ba7;const _0x44dd80=new Set([ID_CLUSTER,0x1c53bb6b,0x1254c367]);let _0x527d53=_0x2c0ae7;while(_0xf4ad8e['bsiGG'](_0x527d53,_0x2bb740[_0x10b3c5(0xea)]-0x4)){const [_0x45ee44,_0x3bca9e]=_0xf4ad8e[_0x10b3c5(0xe2)](readId,_0x2bb740,_0x527d53);if(_0x44dd80[_0x10b3c5(0xf4)](_0x45ee44))return _0x527d53;const [_0x1061fa,_0x21bac3]=_0xf4ad8e['yMzOk'](readVint,_0x2bb740,_0x527d53+_0x3bca9e);if(_0xf4ad8e[_0x10b3c5(0xd8)](isUnknownSize,_0x1061fa,_0x21bac3))return _0x2bb740['length'];_0x527d53+=_0xf4ad8e[_0x10b3c5(0xc2)](_0xf4ad8e[_0x10b3c5(0xd2)](_0x3bca9e,_0x21bac3),_0x1061fa);}return _0x2bb740[_0x10b3c5(0xea)];}function extractClusters(_0x33c183,_0x57eb5a){const _0x337914=_0x5b66,_0x49c067={'vCvJu':function(_0x157a6c,_0x3d1989){return _0x157a6c<_0x3d1989;},'LLvEM':function(_0x151b02,_0x16093f,_0x57acc8){return _0x151b02(_0x16093f,_0x57acc8);},'WvrOE':function(_0x4534f4,_0x55a1b9){return _0x4534f4+_0x55a1b9;},'HgZFb':function(_0x1050cd,_0x448787){return _0x1050cd===_0x448787;},'AUSgi':function(_0x4858af,_0x4f645c){return _0x4858af+_0x4f645c;},'zLnZV':function(_0x488ffc,_0x38f97b,_0x2ca03e){return _0x488ffc(_0x38f97b,_0x2ca03e);},'lttBg':function(_0x1a3db5,_0x5aa84a){return _0x1a3db5+_0x5aa84a;},'mgloS':function(_0x555f08,_0x5a3b98,_0x43e786){return _0x555f08(_0x5a3b98,_0x43e786);},'gNhuu':function(_0x586abe,_0x361906,_0x546130){return _0x586abe(_0x361906,_0x546130);},'Ftrix':function(_0x20e17a,_0x2492e6){return _0x20e17a>=_0x2492e6;},'oGiGI':function(_0x5e0bb6,_0x5dab7f,_0x1479de){return _0x5e0bb6(_0x5dab7f,_0x1479de);}},_0x243be4=[],_0x4ddf58=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x307a1f=0x0;while(_0x49c067[_0x337914(0xaf)](_0x307a1f,_0x33c183['length'])){const _0x39f2d0=_0x33c183['indexOf'](_0x4ddf58,_0x307a1f);if(_0x39f2d0===-0x1)break;const [_0x2c9f78,_0x36367f]=_0x49c067[_0x337914(0xba)](readId,_0x33c183,_0x39f2d0);if(_0x2c9f78!==ID_CLUSTER){_0x307a1f=_0x49c067[_0x337914(0xef)](_0x39f2d0,0x1);continue;}const [_0x340cf2,_0x250397]=readVint(_0x33c183,_0x39f2d0+_0x36367f),_0x530be7=_0x49c067['WvrOE'](_0x39f2d0+_0x36367f,_0x250397),_0xfae74a=findClusterEnd(_0x33c183,_0x530be7,_0x340cf2,_0x250397);let _0x12c575=_0x530be7,_0x3c2550=0x0,_0x2e276d=0x2,_0x1aeef7=![],_0x251e45=Buffer[_0x337914(0xc0)](0x0),_0x5aadbe=Buffer['alloc'](0x0);while(_0x12c575<_0xfae74a){const [_0x47cf75,_0x2eae39]=readId(_0x33c183,_0x12c575),[_0x48b9b7,_0x41b5c8]=readVint(_0x33c183,_0x49c067[_0x337914(0xef)](_0x12c575,_0x2eae39));if(_0x49c067['HgZFb'](_0x47cf75,ID_TIMESTAMP)){_0x3c2550=readUint(_0x33c183,_0x49c067[_0x337914(0xe0)](_0x12c575+_0x2eae39,_0x41b5c8),_0x48b9b7),_0x2e276d=_0x48b9b7,_0x1aeef7=!![],_0x251e45=_0x33c183['slice'](_0x530be7,_0x12c575);const _0x2f6016=_0x12c575+_0x2eae39+_0x41b5c8+_0x48b9b7;_0x5aadbe=_0x33c183[_0x337914(0xc8)](_0x2f6016,_0xfae74a);break;}if(_0x47cf75===ID_CLUSTER)break;if(_0x49c067['zLnZV'](isUnknownSize,_0x48b9b7,_0x41b5c8))break;_0x12c575+=_0x49c067['lttBg'](_0x2eae39,_0x41b5c8)+_0x48b9b7;}!_0x1aeef7&&(_0x5aadbe=_0x33c183['slice'](_0x530be7,_0xfae74a));let _0x54fe0d=_0x3c2550;_0x12c575=_0x530be7;while(_0x12c575<_0xfae74a){const [_0x27797b,_0x2f348d]=_0x49c067['mgloS'](readId,_0x33c183,_0x12c575),[_0x3edeaa,_0x7f2d50]=_0x49c067[_0x337914(0xbc)](readVint,_0x33c183,_0x12c575+_0x2f348d);if(_0x49c067[_0x337914(0xf1)](_0x27797b,ID_SIMPLE_BLOCK)&&_0x49c067['Ftrix'](_0x3edeaa,0x4)){const _0x39a129=_0x12c575+_0x2f348d+_0x7f2d50,[,_0x876e4c]=_0x49c067[_0x337914(0xbc)](readVint,_0x33c183,_0x39a129),_0x332e07=_0x33c183['readInt16BE'](_0x49c067['WvrOE'](_0x39a129,_0x876e4c)),_0x39ba86=_0x49c067['AUSgi'](_0x3c2550,_0x332e07);if(_0x39ba86>_0x54fe0d)_0x54fe0d=_0x39ba86;}if(_0x49c067[_0x337914(0xf1)](_0x27797b,ID_CLUSTER))break;if(_0x49c067[_0x337914(0xd0)](isUnknownSize,_0x3edeaa,_0x7f2d50))break;_0x12c575+=_0x49c067['AUSgi'](_0x2f348d+_0x7f2d50,_0x3edeaa);}_0x243be4[_0x337914(0xb4)]({'timestamp':_0x3c2550,'maxTicks':_0x54fe0d,'bodyBeforeTimestamp':_0x251e45,'bodyAfterTimestamp':_0x5aadbe,'timestampElementSize':_0x2e276d}),_0x307a1f=_0xfae74a;}return _0x243be4;}function _0x5b66(_0xad5ff9,_0xa02ba0){_0xad5ff9=_0xad5ff9-0xab;const _0x3c0f8f=_0x3c0f();let _0x5b66a9=_0x3c0f8f[_0xad5ff9];return _0x5b66a9;}function parseWebm(_0x412d83){const _0x4d7f44=_0x5b66,_0x4b55ab={'OewBj':function(_0x4c75ee,_0x26b0fe,_0x16f39b){return _0x4c75ee(_0x26b0fe,_0x16f39b);},'eMeBS':function(_0x4797cc,_0x157877){return _0x4797cc+_0x157877;},'xCbXm':function(_0xd9b259,_0x1ecc84,_0xb53f7c){return _0xd9b259(_0x1ecc84,_0xb53f7c);}};let _0x19ef22=0x0;const [,_0xde7e54]=_0x4b55ab[_0x4d7f44(0xbf)](readId,_0x412d83,_0x19ef22),[_0xac7a0b,_0x1af31e]=_0x4b55ab[_0x4d7f44(0xbf)](readVint,_0x412d83,_0x4b55ab[_0x4d7f44(0xcc)](_0x19ef22,_0xde7e54));_0x19ef22+=_0x4b55ab['eMeBS'](_0xde7e54+_0x1af31e,_0xac7a0b);const [_0x466efc,_0x15c602]=readId(_0x412d83,_0x19ef22);if(_0x466efc!==ID_SEGMENT)return null;const [,_0x364442]=readVint(_0x412d83,_0x19ef22+_0x15c602),_0x5dde42=_0x4b55ab['eMeBS'](_0x19ef22+_0x15c602,_0x364442),_0x484713=_0x4b55ab['xCbXm'](findTimestampScale,_0x412d83,_0x5dde42),_0x25e955=findFirstClusterOffset(_0x412d83,_0x5dde42),_0xf30474=_0x412d83[_0x4d7f44(0xc8)](0x0,_0x25e955),_0x1df83c=extractClusters(_0x412d83,_0x484713);let _0x381d24=0x0;for(const _0x4a912a of _0x1df83c){if(_0x4a912a[_0x4d7f44(0xc3)]>_0x381d24)_0x381d24=_0x4a912a['maxTicks'];}return{'header':_0xf30474,'clusters':_0x1df83c,'timestampScale':_0x484713,'maxTimestampTicks':_0x381d24};}function buildCluster(_0x279d85,_0x47f05c,_0x47ff7e){const _0xc04d4e=_0x5b66,_0x13e865={'aDEZd':function(_0x2c8f5e,_0x1e7152){return _0x2c8f5e(_0x1e7152);}},_0x500c95=Buffer['from']([0x1f,0x43,0xb6,0x75]),_0x5616eb=Math['max'](0x4,_0x13e865['aDEZd'](uintSize,_0x279d85)),_0x42f680=Buffer[_0xc04d4e(0xb0)]([Buffer[_0xc04d4e(0xb3)]([ID_TIMESTAMP]),writeVint(_0x5616eb),writeUint(_0x279d85,_0x5616eb)]),_0x49530a=Buffer[_0xc04d4e(0xb0)]([_0x47f05c,_0x42f680,_0x47ff7e]),_0x5f41f5=writeVint(_0x49530a[_0xc04d4e(0xea)]);return Buffer[_0xc04d4e(0xb0)]([_0x500c95,_0x5f41f5,_0x49530a]);}const ID_DURATION=0x4489;function rebuildHeaderWithoutDuration(_0x3b1c81){const _0x473285=_0x5b66,_0x47ac88={'Ybxhl':function(_0x1435ed,_0x436a0e,_0x5b8b3d){return _0x1435ed(_0x436a0e,_0x5b8b3d);},'BaQWa':function(_0x2ebb8d,_0x86c3f2,_0x4350e9){return _0x2ebb8d(_0x86c3f2,_0x4350e9);},'xTLDS':function(_0x529a0b,_0x28d5e0){return _0x529a0b+_0x28d5e0;},'XcdCt':function(_0x5bf97b,_0x1a4f13){return _0x5bf97b(_0x1a4f13);},'tDIFr':function(_0x5efe7a,_0x1717b8){return _0x5efe7a+_0x1717b8;},'gcjZY':function(_0x2177a3,_0x55d830){return _0x2177a3<_0x55d830;},'whFeB':function(_0x41b1d1,_0x1c355b,_0x59d2bc){return _0x41b1d1(_0x1c355b,_0x59d2bc);},'PWgsq':function(_0x4e22f9,_0x307359){return _0x4e22f9===_0x307359;},'UiSaH':function(_0xb42d82,_0x3b9231){return _0xb42d82+_0x3b9231;},'YeUmI':function(_0x45a9ac,_0x5f22a1){return _0x45a9ac+_0x5f22a1;},'AYGzF':function(_0x58251c,_0x55e0eb){return _0x58251c!==_0x55e0eb;}},_0x50ace4=Buffer['from'](_0x3b1c81);let _0x48065b=0x0;const [,_0x5c25e0]=_0x47ac88['Ybxhl'](readId,_0x50ace4,_0x48065b),[_0x4b93af,_0x3fd1f0]=_0x47ac88[_0x473285(0xab)](readVint,_0x50ace4,_0x48065b+_0x5c25e0),_0x8d4c8f=_0x47ac88[_0x473285(0xb8)](_0x48065b,_0x5c25e0)+_0x3fd1f0+_0x4b93af,[,_0x2d8296]=readId(_0x50ace4,_0x8d4c8f),[,_0x48533a]=readVint(_0x50ace4,_0x47ac88[_0x473285(0xb8)](_0x8d4c8f,_0x2d8296)),_0x140a2f=_0x8d4c8f+_0x2d8296+_0x48533a,_0x4b4318=_0x47ac88['XcdCt'](writeUnknownSizeVint,_0x48533a);_0x4b4318['copy'](_0x50ace4,_0x47ac88['xTLDS'](_0x8d4c8f,_0x2d8296));let _0xe8b395=_0x140a2f;const _0x375672=Math['min'](_0x50ace4[_0x473285(0xea)],_0x47ac88[_0x473285(0xd1)](_0x140a2f,0x2710));while(_0x47ac88['gcjZY'](_0xe8b395,_0x375672)){const [_0x50e832,_0x3e4343]=_0x47ac88['BaQWa'](readId,_0x50ace4,_0xe8b395),[_0x29ce7b,_0x5a6f8a]=_0x47ac88['whFeB'](readVint,_0x50ace4,_0xe8b395+_0x3e4343);if(_0x47ac88[_0x473285(0xb1)](_0x50e832,ID_CLUSTER))break;if(_0x47ac88[_0x473285(0xb2)](isUnknownSize,_0x29ce7b,_0x5a6f8a))break;if(_0x50e832===ID_INFO){const _0x593f85=_0x47ac88[_0x473285(0xc9)](_0xe8b395+_0x3e4343,_0x5a6f8a),_0x945e2f=_0x47ac88[_0x473285(0xc6)](_0x593f85,_0x29ce7b),_0x10e6ed=[];let _0x5f1b5d=_0x593f85;while(_0x47ac88['gcjZY'](_0x5f1b5d,_0x945e2f)){const [_0x5248d2,_0x303a2a]=readId(_0x50ace4,_0x5f1b5d),[_0x5cab33,_0x43b707]=_0x47ac88['whFeB'](readVint,_0x50ace4,_0x5f1b5d+_0x303a2a),_0x3a24c1=_0x303a2a+_0x43b707+_0x5cab33;_0x47ac88[_0x473285(0xdb)](_0x5248d2,ID_DURATION)&&_0x10e6ed['push'](_0x50ace4['slice'](_0x5f1b5d,_0x47ac88[_0x473285(0xb8)](_0x5f1b5d,_0x3a24c1))),_0x5f1b5d+=_0x3a24c1;}const _0x127ee7=Buffer['concat'](_0x10e6ed),_0x285b8f=Buffer['concat']([_0x50ace4[_0x473285(0xc8)](_0xe8b395,_0x47ac88['YeUmI'](_0xe8b395,_0x3e4343)),_0x47ac88[_0x473285(0xab)](writeVint,_0x127ee7['length'],_0x5a6f8a)]);return Buffer['concat']([_0x50ace4['slice'](0x0,_0xe8b395),_0x285b8f,_0x127ee7,_0x50ace4['slice'](_0x945e2f)]);}_0xe8b395+=_0x47ac88[_0x473285(0xd1)](_0x3e4343,_0x5a6f8a)+_0x29ce7b;}return _0x50ace4;}export function stitchWebmFiles(_0x4a6c6f,_0x76fdd5){const _0x305e42=_0x5b66,_0xeb3850={'xdUcl':function(_0x4b53aa,_0x5905ae){return _0x4b53aa<=_0x5905ae;},'wHVvv':function(_0x422e5c,_0x5f0d66){return _0x422e5c(_0x5f0d66);},'SldNy':function(_0x30521f,_0xe45845,_0x346a00,_0x3ca9c9){return _0x30521f(_0xe45845,_0x346a00,_0x3ca9c9);},'lUtnJ':function(_0x154bfc,_0xc35caf){return _0x154bfc+_0xc35caf;},'HYjQj':function(_0x36b3e3,_0x228c94,_0x86adcf){return _0x36b3e3(_0x228c94,_0x86adcf);}};if(_0xeb3850[_0x305e42(0xd9)](_0x4a6c6f['length'],0x1))return![];const _0xea04ad=[];for(const _0x290118 of _0x4a6c6f){const _0x59bf81=readFileSync(_0x290118),_0x492b6a=_0xeb3850['wHVvv'](parseWebm,_0x59bf81);if(!_0x492b6a||_0x492b6a[_0x305e42(0xb6)][_0x305e42(0xea)]===0x0)return![];_0xea04ad['push'](_0x492b6a);}const _0x358576=_0xea04ad[0x0],_0x59c5b2=rebuildHeaderWithoutDuration(_0x358576[_0x305e42(0xce)]),_0x4c6571=[_0x59c5b2];let _0x2c5f5b=0x0;for(let _0x25f0ef=0x0;_0x25f0ef<_0xea04ad[_0x305e42(0xea)];_0x25f0ef++){const _0x55c69b=_0xea04ad[_0x25f0ef];for(const _0x13bbae of _0x55c69b[_0x305e42(0xb6)]){const _0x3334bb=_0x13bbae[_0x305e42(0xbb)]+_0x2c5f5b;_0x4c6571['push'](_0xeb3850[_0x305e42(0xae)](buildCluster,_0x3334bb,_0x13bbae['bodyBeforeTimestamp'],_0x13bbae[_0x305e42(0xc1)]));}const _0x70345=0x1e;_0x2c5f5b+=_0xeb3850['lUtnJ'](_0x55c69b['maxTimestampTicks'],_0x70345);}return _0xeb3850[_0x305e42(0xc7)](writeFileSync,_0x76fdd5,Buffer[_0x305e42(0xb0)](_0x4c6571)),!![];}if(process['argv'][0x1]?.['endsWith'](_0x569038(0xd4))||process[_0x569038(0xe3)][0x1]?.['endsWith']('stitchWebmFiles.js')){const args=process['argv'][_0x569038(0xc8)](0x2);args['length']<0x3&&(console['error'](_0x569038(0xd6)),process[_0x569038(0xf2)](0x1));const output=args[args[_0x569038(0xea)]-0x1],inputs=args['slice'](0x0,-0x1),ok=stitchWebmFiles(inputs,output);ok?console['log']('Stitched\x20'+inputs[_0x569038(0xea)]+_0x569038(0xcb)+output):console[_0x569038(0xcf)]('Stitching\x20failed\x20or\x20only\x20one\x20input\x20file.');}